gnulib: import getline
[deliverable/binutils-gdb.git] / gnulib / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for libgnu UNUSED-VERSION.
4 #
5 #
6 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
7 #
8 #
9 # This configure script is free software; the Free Software Foundation
10 # gives unlimited permission to copy, distribute and modify it.
11 ## -------------------- ##
12 ## M4sh Initialization. ##
13 ## -------------------- ##
14
15 # Be more Bourne compatible
16 DUALCASE=1; export DUALCASE # for MKS sh
17 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
18 emulate sh
19 NULLCMD=:
20 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
21 # is contrary to our usage. Disable this feature.
22 alias -g '${1+"$@"}'='"$@"'
23 setopt NO_GLOB_SUBST
24 else
25 case `(set -o) 2>/dev/null` in #(
26 *posix*) :
27 set -o posix ;; #(
28 *) :
29 ;;
30 esac
31 fi
32
33
34 as_nl='
35 '
36 export as_nl
37 # Printing a long string crashes Solaris 7 /usr/bin/printf.
38 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41 # Prefer a ksh shell builtin over an external printf program on Solaris,
42 # but without wasting forks for bash or zsh.
43 if test -z "$BASH_VERSION$ZSH_VERSION" \
44 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45 as_echo='print -r --'
46 as_echo_n='print -rn --'
47 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='printf %s\n'
49 as_echo_n='printf %s'
50 else
51 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53 as_echo_n='/usr/ucb/echo -n'
54 else
55 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56 as_echo_n_body='eval
57 arg=$1;
58 case $arg in #(
59 *"$as_nl"*)
60 expr "X$arg" : "X\\(.*\\)$as_nl";
61 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62 esac;
63 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64 '
65 export as_echo_n_body
66 as_echo_n='sh -c $as_echo_n_body as_echo'
67 fi
68 export as_echo_body
69 as_echo='sh -c $as_echo_body as_echo'
70 fi
71
72 # The user is always right.
73 if test "${PATH_SEPARATOR+set}" != set; then
74 PATH_SEPARATOR=:
75 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77 PATH_SEPARATOR=';'
78 }
79 fi
80
81
82 # IFS
83 # We need space, tab and new line, in precisely that order. Quoting is
84 # there to prevent editors from complaining about space-tab.
85 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
86 # splitting by setting IFS to empty value.)
87 IFS=" "" $as_nl"
88
89 # Find who we are. Look in the path if we contain no directory separator.
90 as_myself=
91 case $0 in #((
92 *[\\/]* ) as_myself=$0 ;;
93 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
94 for as_dir in $PATH
95 do
96 IFS=$as_save_IFS
97 test -z "$as_dir" && as_dir=.
98 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
99 done
100 IFS=$as_save_IFS
101
102 ;;
103 esac
104 # We did not find ourselves, most probably we were run as `sh COMMAND'
105 # in which case we are not to be found in the path.
106 if test "x$as_myself" = x; then
107 as_myself=$0
108 fi
109 if test ! -f "$as_myself"; then
110 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
111 exit 1
112 fi
113
114 # Unset variables that we do not need and which cause bugs (e.g. in
115 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
116 # suppresses any "Segmentation fault" message there. '((' could
117 # trigger a bug in pdksh 5.2.14.
118 for as_var in BASH_ENV ENV MAIL MAILPATH
119 do eval test x\${$as_var+set} = xset \
120 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
121 done
122 PS1='$ '
123 PS2='> '
124 PS4='+ '
125
126 # NLS nuisances.
127 LC_ALL=C
128 export LC_ALL
129 LANGUAGE=C
130 export LANGUAGE
131
132 # CDPATH.
133 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
134
135 # Use a proper internal environment variable to ensure we don't fall
136 # into an infinite loop, continuously re-executing ourselves.
137 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
138 _as_can_reexec=no; export _as_can_reexec;
139 # We cannot yet assume a decent shell, so we have to provide a
140 # neutralization value for shells without unset; and this also
141 # works around shells that cannot unset nonexistent variables.
142 # Preserve -v and -x to the replacement shell.
143 BASH_ENV=/dev/null
144 ENV=/dev/null
145 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
146 case $- in # ((((
147 *v*x* | *x*v* ) as_opts=-vx ;;
148 *v* ) as_opts=-v ;;
149 *x* ) as_opts=-x ;;
150 * ) as_opts= ;;
151 esac
152 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
153 # Admittedly, this is quite paranoid, since all the known shells bail
154 # out after a failed `exec'.
155 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
156 as_fn_exit 255
157 fi
158 # We don't want this to propagate to other subprocesses.
159 { _as_can_reexec=; unset _as_can_reexec;}
160 if test "x$CONFIG_SHELL" = x; then
161 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
162 emulate sh
163 NULLCMD=:
164 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
165 # is contrary to our usage. Disable this feature.
166 alias -g '\${1+\"\$@\"}'='\"\$@\"'
167 setopt NO_GLOB_SUBST
168 else
169 case \`(set -o) 2>/dev/null\` in #(
170 *posix*) :
171 set -o posix ;; #(
172 *) :
173 ;;
174 esac
175 fi
176 "
177 as_required="as_fn_return () { (exit \$1); }
178 as_fn_success () { as_fn_return 0; }
179 as_fn_failure () { as_fn_return 1; }
180 as_fn_ret_success () { return 0; }
181 as_fn_ret_failure () { return 1; }
182
183 exitcode=0
184 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
185 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
186 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
187 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
188 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
189
190 else
191 exitcode=1; echo positional parameters were not saved.
192 fi
193 test x\$exitcode = x0 || exit 1
194 test -x / || exit 1"
195 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
196 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
197 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
198 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
199 test \$(( 1 + 1 )) = 2 || exit 1"
200 if (eval "$as_required") 2>/dev/null; then :
201 as_have_required=yes
202 else
203 as_have_required=no
204 fi
205 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
206
207 else
208 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
209 as_found=false
210 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
211 do
212 IFS=$as_save_IFS
213 test -z "$as_dir" && as_dir=.
214 as_found=:
215 case $as_dir in #(
216 /*)
217 for as_base in sh bash ksh sh5; do
218 # Try only shells that exist, to save several forks.
219 as_shell=$as_dir/$as_base
220 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
221 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
222 CONFIG_SHELL=$as_shell as_have_required=yes
223 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 break 2
225 fi
226 fi
227 done;;
228 esac
229 as_found=false
230 done
231 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
232 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
233 CONFIG_SHELL=$SHELL as_have_required=yes
234 fi; }
235 IFS=$as_save_IFS
236
237
238 if test "x$CONFIG_SHELL" != x; then :
239 export CONFIG_SHELL
240 # We cannot yet assume a decent shell, so we have to provide a
241 # neutralization value for shells without unset; and this also
242 # works around shells that cannot unset nonexistent variables.
243 # Preserve -v and -x to the replacement shell.
244 BASH_ENV=/dev/null
245 ENV=/dev/null
246 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247 case $- in # ((((
248 *v*x* | *x*v* ) as_opts=-vx ;;
249 *v* ) as_opts=-v ;;
250 *x* ) as_opts=-x ;;
251 * ) as_opts= ;;
252 esac
253 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
254 # Admittedly, this is quite paranoid, since all the known shells bail
255 # out after a failed `exec'.
256 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
257 exit 255
258 fi
259
260 if test x$as_have_required = xno; then :
261 $as_echo "$0: This script requires a shell more modern than all"
262 $as_echo "$0: the shells that I found on your system."
263 if test x${ZSH_VERSION+set} = xset ; then
264 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
265 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
266 else
267 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
268 $0: including any error possibly output before this
269 $0: message. Then install a modern shell, or manually run
270 $0: the script under such a shell if you do have one."
271 fi
272 exit 1
273 fi
274 fi
275 fi
276 SHELL=${CONFIG_SHELL-/bin/sh}
277 export SHELL
278 # Unset more variables known to interfere with behavior of common tools.
279 CLICOLOR_FORCE= GREP_OPTIONS=
280 unset CLICOLOR_FORCE GREP_OPTIONS
281
282 ## --------------------- ##
283 ## M4sh Shell Functions. ##
284 ## --------------------- ##
285 # as_fn_unset VAR
286 # ---------------
287 # Portably unset VAR.
288 as_fn_unset ()
289 {
290 { eval $1=; unset $1;}
291 }
292 as_unset=as_fn_unset
293
294 # as_fn_set_status STATUS
295 # -----------------------
296 # Set $? to STATUS, without forking.
297 as_fn_set_status ()
298 {
299 return $1
300 } # as_fn_set_status
301
302 # as_fn_exit STATUS
303 # -----------------
304 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
305 as_fn_exit ()
306 {
307 set +e
308 as_fn_set_status $1
309 exit $1
310 } # as_fn_exit
311
312 # as_fn_mkdir_p
313 # -------------
314 # Create "$as_dir" as a directory, including parents if necessary.
315 as_fn_mkdir_p ()
316 {
317
318 case $as_dir in #(
319 -*) as_dir=./$as_dir;;
320 esac
321 test -d "$as_dir" || eval $as_mkdir_p || {
322 as_dirs=
323 while :; do
324 case $as_dir in #(
325 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
326 *) as_qdir=$as_dir;;
327 esac
328 as_dirs="'$as_qdir' $as_dirs"
329 as_dir=`$as_dirname -- "$as_dir" ||
330 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
331 X"$as_dir" : 'X\(//\)[^/]' \| \
332 X"$as_dir" : 'X\(//\)$' \| \
333 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
334 $as_echo X"$as_dir" |
335 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
336 s//\1/
337 q
338 }
339 /^X\(\/\/\)[^/].*/{
340 s//\1/
341 q
342 }
343 /^X\(\/\/\)$/{
344 s//\1/
345 q
346 }
347 /^X\(\/\).*/{
348 s//\1/
349 q
350 }
351 s/.*/./; q'`
352 test -d "$as_dir" && break
353 done
354 test -z "$as_dirs" || eval "mkdir $as_dirs"
355 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
356
357
358 } # as_fn_mkdir_p
359
360 # as_fn_executable_p FILE
361 # -----------------------
362 # Test if FILE is an executable regular file.
363 as_fn_executable_p ()
364 {
365 test -f "$1" && test -x "$1"
366 } # as_fn_executable_p
367 # as_fn_append VAR VALUE
368 # ----------------------
369 # Append the text in VALUE to the end of the definition contained in VAR. Take
370 # advantage of any shell optimizations that allow amortized linear growth over
371 # repeated appends, instead of the typical quadratic growth present in naive
372 # implementations.
373 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
374 eval 'as_fn_append ()
375 {
376 eval $1+=\$2
377 }'
378 else
379 as_fn_append ()
380 {
381 eval $1=\$$1\$2
382 }
383 fi # as_fn_append
384
385 # as_fn_arith ARG...
386 # ------------------
387 # Perform arithmetic evaluation on the ARGs, and store the result in the
388 # global $as_val. Take advantage of shells that can avoid forks. The arguments
389 # must be portable across $(()) and expr.
390 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
391 eval 'as_fn_arith ()
392 {
393 as_val=$(( $* ))
394 }'
395 else
396 as_fn_arith ()
397 {
398 as_val=`expr "$@" || test $? -eq 1`
399 }
400 fi # as_fn_arith
401
402
403 # as_fn_error STATUS ERROR [LINENO LOG_FD]
404 # ----------------------------------------
405 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
406 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
407 # script with STATUS, using 1 if that was 0.
408 as_fn_error ()
409 {
410 as_status=$1; test $as_status -eq 0 && as_status=1
411 if test "$4"; then
412 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
413 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
414 fi
415 $as_echo "$as_me: error: $2" >&2
416 as_fn_exit $as_status
417 } # as_fn_error
418
419 if expr a : '\(a\)' >/dev/null 2>&1 &&
420 test "X`expr 00001 : '.*\(...\)'`" = X001; then
421 as_expr=expr
422 else
423 as_expr=false
424 fi
425
426 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
427 as_basename=basename
428 else
429 as_basename=false
430 fi
431
432 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
433 as_dirname=dirname
434 else
435 as_dirname=false
436 fi
437
438 as_me=`$as_basename -- "$0" ||
439 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
440 X"$0" : 'X\(//\)$' \| \
441 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
442 $as_echo X/"$0" |
443 sed '/^.*\/\([^/][^/]*\)\/*$/{
444 s//\1/
445 q
446 }
447 /^X\/\(\/\/\)$/{
448 s//\1/
449 q
450 }
451 /^X\/\(\/\).*/{
452 s//\1/
453 q
454 }
455 s/.*/./; q'`
456
457 # Avoid depending upon Character Ranges.
458 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
459 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
460 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
461 as_cr_digits='0123456789'
462 as_cr_alnum=$as_cr_Letters$as_cr_digits
463
464
465 as_lineno_1=$LINENO as_lineno_1a=$LINENO
466 as_lineno_2=$LINENO as_lineno_2a=$LINENO
467 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
468 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
469 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
470 sed -n '
471 p
472 /[$]LINENO/=
473 ' <$as_myself |
474 sed '
475 s/[$]LINENO.*/&-/
476 t lineno
477 b
478 :lineno
479 N
480 :loop
481 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
482 t loop
483 s/-\n.*//
484 ' >$as_me.lineno &&
485 chmod +x "$as_me.lineno" ||
486 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
487
488 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
489 # already done that, so ensure we don't try to do so again and fall
490 # in an infinite loop. This has already happened in practice.
491 _as_can_reexec=no; export _as_can_reexec
492 # Don't try to exec as it changes $[0], causing all sort of problems
493 # (the dirname of $[0] is not the place where we might find the
494 # original and so on. Autoconf is especially sensitive to this).
495 . "./$as_me.lineno"
496 # Exit status is that of the last command.
497 exit
498 }
499
500 ECHO_C= ECHO_N= ECHO_T=
501 case `echo -n x` in #(((((
502 -n*)
503 case `echo 'xy\c'` in
504 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
505 xy) ECHO_C='\c';;
506 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
507 ECHO_T=' ';;
508 esac;;
509 *)
510 ECHO_N='-n';;
511 esac
512
513 rm -f conf$$ conf$$.exe conf$$.file
514 if test -d conf$$.dir; then
515 rm -f conf$$.dir/conf$$.file
516 else
517 rm -f conf$$.dir
518 mkdir conf$$.dir 2>/dev/null
519 fi
520 if (echo >conf$$.file) 2>/dev/null; then
521 if ln -s conf$$.file conf$$ 2>/dev/null; then
522 as_ln_s='ln -s'
523 # ... but there are two gotchas:
524 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
525 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
526 # In both cases, we have to default to `cp -pR'.
527 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
528 as_ln_s='cp -pR'
529 elif ln conf$$.file conf$$ 2>/dev/null; then
530 as_ln_s=ln
531 else
532 as_ln_s='cp -pR'
533 fi
534 else
535 as_ln_s='cp -pR'
536 fi
537 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538 rmdir conf$$.dir 2>/dev/null
539
540 if mkdir -p . 2>/dev/null; then
541 as_mkdir_p='mkdir -p "$as_dir"'
542 else
543 test -d ./-p && rmdir ./-p
544 as_mkdir_p=false
545 fi
546
547 as_test_x='test -x'
548 as_executable_p=as_fn_executable_p
549
550 # Sed expression to map a string onto a valid CPP name.
551 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
552
553 # Sed expression to map a string onto a valid variable name.
554 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
555
556
557 test -n "$DJDIR" || exec 7<&0 </dev/null
558 exec 6>&1
559
560 # Name of the host.
561 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
562 # so uname gets run too.
563 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
564
565 #
566 # Initializations.
567 #
568 ac_default_prefix=/usr/local
569 ac_clean_files=
570 ac_config_libobj_dir=.
571 LIBOBJS=
572 cross_compiling=no
573 subdirs=
574 MFLAGS=
575 MAKEFLAGS=
576
577 # Identity of this package.
578 PACKAGE_NAME='libgnu'
579 PACKAGE_TARNAME='libgnu'
580 PACKAGE_VERSION='UNUSED-VERSION'
581 PACKAGE_STRING='libgnu UNUSED-VERSION'
582 PACKAGE_BUGREPORT=''
583 PACKAGE_URL=''
584
585 ac_unique_file="import/memmem.c"
586 ac_header_list=
587 # Factoring default headers for most tests.
588 ac_includes_default="\
589 #include <stdio.h>
590 #ifdef HAVE_SYS_TYPES_H
591 # include <sys/types.h>
592 #endif
593 #ifdef HAVE_SYS_STAT_H
594 # include <sys/stat.h>
595 #endif
596 #ifdef STDC_HEADERS
597 # include <stdlib.h>
598 # include <stddef.h>
599 #else
600 # ifdef HAVE_STDLIB_H
601 # include <stdlib.h>
602 # endif
603 #endif
604 #ifdef HAVE_STRING_H
605 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
606 # include <memory.h>
607 # endif
608 # include <string.h>
609 #endif
610 #ifdef HAVE_STRINGS_H
611 # include <strings.h>
612 #endif
613 #ifdef HAVE_INTTYPES_H
614 # include <inttypes.h>
615 #endif
616 #ifdef HAVE_STDINT_H
617 # include <stdint.h>
618 #endif
619 #ifdef HAVE_UNISTD_H
620 # include <unistd.h>
621 #endif"
622
623 gl_use_threads_default=
624 gl_use_winpthreads_default=
625 ac_func_list=
626 gl_fnmatch_required=POSIX
627 ac_subst_vars='am__EXEEXT_FALSE
628 am__EXEEXT_TRUE
629 gltests_LTLIBOBJS
630 gltests_LIBOBJS
631 gl_LTLIBOBJS
632 gl_LIBOBJS
633 LTLIBOBJS
634 LIBOBJS
635 LN_S
636 AM_BACKSLASH
637 AM_DEFAULT_VERBOSITY
638 AM_DEFAULT_V
639 AM_V
640 am__fastdepCC_FALSE
641 am__fastdepCC_TRUE
642 CCDEPMODE
643 am__nodep
644 AMDEPBACKSLASH
645 AMDEP_FALSE
646 AMDEP_TRUE
647 am__quote
648 am__include
649 DEPDIR
650 am__untar
651 am__tar
652 AMTAR
653 am__leading_dot
654 SET_MAKE
655 AWK
656 mkdir_p
657 INSTALL_STRIP_PROGRAM
658 STRIP
659 install_sh
660 MAKEINFO
661 AUTOHEADER
662 AUTOMAKE
663 AUTOCONF
664 ACLOCAL
665 VERSION
666 PACKAGE
667 CYGPATH_W
668 am__isrc
669 INSTALL_DATA
670 INSTALL_SCRIPT
671 INSTALL_PROGRAM
672 LIBGNU_LTLIBDEPS
673 LIBGNU_LIBDEPS
674 gltests_WITNESS
675 REPLACE_TOWLOWER
676 REPLACE_ISWCNTRL
677 HAVE_WCTYPE_H
678 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
679 NEXT_WCTYPE_H
680 HAVE_ISWCNTRL
681 REPLACE_ISWXDIGIT
682 REPLACE_ISWDIGIT
683 REPLACE_ISWBLANK
684 HAVE_WCTRANS_T
685 HAVE_WCTYPE_T
686 HAVE_ISWBLANK
687 GNULIB_TOWCTRANS
688 GNULIB_WCTRANS
689 GNULIB_ISWCTYPE
690 GNULIB_WCTYPE
691 GNULIB_ISWXDIGIT
692 GNULIB_ISWDIGIT
693 GNULIB_ISWBLANK
694 HAVE_CRTDEFS_H
695 HAVE_WINT_T
696 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
697 NEXT_WCHAR_H
698 HAVE_UNISTD_H
699 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
700 NEXT_UNISTD_H
701 TIME_H_DEFINES_TIME_UTC
702 UNISTD_H_DEFINES_STRUCT_TIMESPEC
703 PTHREAD_H_DEFINES_STRUCT_TIMESPEC
704 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
705 TIME_H_DEFINES_STRUCT_TIMESPEC
706 NEXT_AS_FIRST_DIRECTIVE_TIME_H
707 NEXT_TIME_H
708 REPLACE_LOCALTIME
709 REPLACE_GMTIME
710 REPLACE_TZSET
711 REPLACE_TIMEGM
712 REPLACE_STRFTIME
713 REPLACE_NANOSLEEP
714 REPLACE_MKTIME
715 REPLACE_LOCALTIME_R
716 REPLACE_CTIME
717 HAVE_TIMEZONE_T
718 HAVE_TIMESPEC_GET
719 HAVE_TIMEGM
720 HAVE_STRPTIME
721 HAVE_NANOSLEEP
722 HAVE_DECL_LOCALTIME_R
723 GNULIB_MDA_TZSET
724 GNULIB_TZSET
725 GNULIB_TIME_RZ
726 GNULIB_TIME_R
727 GNULIB_TIMESPEC_GET
728 GNULIB_TIMEGM
729 GNULIB_STRPTIME
730 GNULIB_STRFTIME
731 GNULIB_NANOSLEEP
732 GNULIB_LOCALTIME
733 GNULIB_MKTIME
734 GNULIB_CTIME
735 HAVE_SYS_UIO_H
736 NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H
737 NEXT_SYS_UIO_H
738 WINDOWS_STAT_INODES
739 WINDOWS_64_BIT_OFF_T
740 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
741 NEXT_SYS_TYPES_H
742 HAVE_SYS_RANDOM_H
743 NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H
744 NEXT_SYS_RANDOM_H
745 NEXT_AS_FIRST_DIRECTIVE_STRING_H
746 NEXT_STRING_H
747 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
748 NEXT_STDLIB_H
749 NEXT_AS_FIRST_DIRECTIVE_STDIO_H
750 NEXT_STDIO_H
751 HAVE__BOOL
752 GL_GENERATE_STDBOOL_H_FALSE
753 GL_GENERATE_STDBOOL_H_TRUE
754 STDBOOL_H
755 GL_GENERATE_STDALIGN_H_FALSE
756 GL_GENERATE_STDALIGN_H_TRUE
757 STDALIGN_H
758 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
759 NEXT_SIGNAL_H
760 REPLACE_RAISE
761 REPLACE_PTHREAD_SIGMASK
762 HAVE_SIGHANDLER_T
763 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
764 HAVE_STRUCT_SIGACTION_SA_SIGACTION
765 HAVE_SIGACTION
766 HAVE_SIGINFO_T
767 HAVE_SIGSET_T
768 HAVE_RAISE
769 HAVE_PTHREAD_SIGMASK
770 HAVE_POSIX_SIGNALBLOCKING
771 GNULIB_SIGACTION
772 GNULIB_SIGPROCMASK
773 GNULIB_SIGNAL_H_SIGPIPE
774 GNULIB_RAISE
775 GNULIB_PTHREAD_SIGMASK
776 GL_GENERATE_NETINET_IN_H_FALSE
777 GL_GENERATE_NETINET_IN_H_TRUE
778 NETINET_IN_H
779 HAVE_NETINET_IN_H
780 NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H
781 NEXT_NETINET_IN_H
782 UNDEFINE_STRTOK_R
783 REPLACE_STRSIGNAL
784 REPLACE_STRERRORNAME_NP
785 REPLACE_STRERROR_R
786 REPLACE_STRERROR
787 REPLACE_STRTOK_R
788 REPLACE_STRCASESTR
789 REPLACE_STRSTR
790 REPLACE_STRNLEN
791 REPLACE_STRNDUP
792 REPLACE_STRNCAT
793 REPLACE_STRDUP
794 REPLACE_STRCHRNUL
795 REPLACE_STPNCPY
796 REPLACE_MEMMEM
797 REPLACE_MEMCHR
798 REPLACE_FFSLL
799 HAVE_STRVERSCMP
800 HAVE_DECL_STRSIGNAL
801 HAVE_SIGDESCR_NP
802 HAVE_SIGABBREV_NP
803 HAVE_STRERRORNAME_NP
804 HAVE_DECL_STRERROR_R
805 HAVE_DECL_STRTOK_R
806 HAVE_STRCASESTR
807 HAVE_STRSEP
808 HAVE_STRPBRK
809 HAVE_DECL_STRNLEN
810 HAVE_DECL_STRNDUP
811 HAVE_DECL_STRDUP
812 HAVE_STRCHRNUL
813 HAVE_STPNCPY
814 HAVE_STPCPY
815 HAVE_RAWMEMCHR
816 HAVE_DECL_MEMRCHR
817 HAVE_MEMPCPY
818 HAVE_DECL_MEMMEM
819 HAVE_FFSLL
820 HAVE_FFSL
821 HAVE_EXPLICIT_BZERO
822 GNULIB_MDA_STRDUP
823 GNULIB_MDA_MEMCCPY
824 HAVE_MBSLEN
825 GNULIB_STRVERSCMP
826 GNULIB_STRSIGNAL
827 GNULIB_SIGDESCR_NP
828 GNULIB_SIGABBREV_NP
829 GNULIB_STRERRORNAME_NP
830 GNULIB_STRERROR_R
831 GNULIB_STRERROR
832 GNULIB_MBSTOK_R
833 GNULIB_MBSSEP
834 GNULIB_MBSSPN
835 GNULIB_MBSPBRK
836 GNULIB_MBSCSPN
837 GNULIB_MBSCASESTR
838 GNULIB_MBSPCASECMP
839 GNULIB_MBSNCASECMP
840 GNULIB_MBSCASECMP
841 GNULIB_MBSSTR
842 GNULIB_MBSRCHR
843 GNULIB_MBSCHR
844 GNULIB_MBSNLEN
845 GNULIB_MBSLEN
846 GNULIB_STRTOK_R
847 GNULIB_STRCASESTR
848 GNULIB_STRSTR
849 GNULIB_STRSEP
850 GNULIB_STRPBRK
851 GNULIB_STRNLEN
852 GNULIB_STRNDUP
853 GNULIB_STRNCAT
854 GNULIB_STRDUP
855 GNULIB_STRCHRNUL
856 GNULIB_STPNCPY
857 GNULIB_STPCPY
858 GNULIB_RAWMEMCHR
859 GNULIB_MEMRCHR
860 GNULIB_MEMPCPY
861 GNULIB_MEMMEM
862 GNULIB_MEMCHR
863 GNULIB_FFSLL
864 GNULIB_FFSL
865 GNULIB_EXPLICIT_BZERO
866 HAVE_VISIBILITY
867 CFLAG_VISIBILITY
868 LIB_MBRTOWC
869 LOCALE_ZH_CN
870 LOCALE_FR_UTF8
871 LOCALE_JA
872 NEXT_AS_FIRST_DIRECTIVE_MATH_H
873 NEXT_MATH_H
874 LTLIBMULTITHREAD
875 LIBMULTITHREAD
876 LTLIBTHREAD
877 LIBTHREAD
878 LIBSTDTHREAD
879 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H
880 NEXT_LOCALE_H
881 HAVE_XLOCALE_H
882 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
883 NEXT_STDDEF_H
884 GL_GENERATE_STDDEF_H_FALSE
885 GL_GENERATE_STDDEF_H_TRUE
886 STDDEF_H
887 HAVE_WCHAR_T
888 HAVE_MAX_ALIGN_T
889 REPLACE_NULL
890 REPLACE_STRUCT_LCONV
891 REPLACE_FREELOCALE
892 REPLACE_DUPLOCALE
893 REPLACE_NEWLOCALE
894 REPLACE_SETLOCALE
895 REPLACE_LOCALECONV
896 HAVE_FREELOCALE
897 HAVE_DUPLOCALE
898 HAVE_NEWLOCALE
899 GNULIB_LOCALENAME
900 GNULIB_DUPLOCALE
901 GNULIB_SETLOCALE_NULL
902 GNULIB_SETLOCALE
903 GNULIB_LOCALECONV
904 LOCALCHARSET_TESTS_ENVIRONMENT
905 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
906 NEXT_INTTYPES_H
907 UINT64_MAX_EQ_ULONG_MAX
908 UINT32_MAX_LT_UINTMAX_MAX
909 PRIPTR_PREFIX
910 INT64_MAX_EQ_LONG_MAX
911 INT32_MAX_LT_INTMAX_MAX
912 REPLACE_STRTOUMAX
913 REPLACE_STRTOIMAX
914 HAVE_IMAXDIV_T
915 HAVE_DECL_STRTOUMAX
916 HAVE_DECL_STRTOIMAX
917 HAVE_DECL_IMAXDIV
918 HAVE_DECL_IMAXABS
919 GNULIB_STRTOUMAX
920 GNULIB_STRTOIMAX
921 GNULIB_IMAXDIV
922 GNULIB_IMAXABS
923 GL_GENERATE_STDINT_H_FALSE
924 GL_GENERATE_STDINT_H_TRUE
925 STDINT_H
926 HAVE_SYS_INTTYPES_H
927 HAVE_SYS_BITYPES_H
928 HAVE_C99_STDINT_H
929 WINT_T_SUFFIX
930 WCHAR_T_SUFFIX
931 SIG_ATOMIC_T_SUFFIX
932 SIZE_T_SUFFIX
933 PTRDIFF_T_SUFFIX
934 HAVE_SIGNED_WINT_T
935 HAVE_SIGNED_WCHAR_T
936 HAVE_SIGNED_SIG_ATOMIC_T
937 BITSIZEOF_WINT_T
938 BITSIZEOF_WCHAR_T
939 BITSIZEOF_SIG_ATOMIC_T
940 BITSIZEOF_SIZE_T
941 BITSIZEOF_PTRDIFF_T
942 APPLE_UNIVERSAL_BUILD
943 HAVE_STDINT_H
944 NEXT_AS_FIRST_DIRECTIVE_STDINT_H
945 NEXT_STDINT_H
946 HAVE_SYS_TYPES_H
947 HAVE_INTTYPES_H
948 HAVE_WCHAR_H
949 GNULIB_OVERRIDES_WINT_T
950 GL_GENERATE_LIMITS_H_FALSE
951 GL_GENERATE_LIMITS_H_TRUE
952 LIMITS_H
953 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H
954 NEXT_LIMITS_H
955 HAVE_SYS_SOCKET_H
956 NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H
957 NEXT_SYS_SOCKET_H
958 HAVE_ACCEPT4
959 HAVE_SA_FAMILY_T
960 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY
961 HAVE_STRUCT_SOCKADDR_STORAGE
962 GNULIB_ACCEPT4
963 GNULIB_SHUTDOWN
964 GNULIB_SETSOCKOPT
965 GNULIB_SENDTO
966 GNULIB_RECVFROM
967 GNULIB_SEND
968 GNULIB_RECV
969 GNULIB_LISTEN
970 GNULIB_GETSOCKOPT
971 GNULIB_GETSOCKNAME
972 GNULIB_GETPEERNAME
973 GNULIB_BIND
974 GNULIB_ACCEPT
975 GNULIB_CONNECT
976 GNULIB_SOCKET
977 INET_NTOP_LIB
978 LIB_HARD_LOCALE
979 LIB_SETLOCALE_NULL
980 LIB_SCHED_YIELD
981 LIBPMULTITHREAD
982 LIBPTHREAD
983 GL_GENERATE_GLOB_H_FALSE
984 GL_GENERATE_GLOB_H_TRUE
985 GLOB_H
986 HAVE_GLOB_H
987 NEXT_AS_FIRST_DIRECTIVE_GLOB_H
988 NEXT_GLOB_H
989 REPLACE_GLOB_PATTERN_P
990 REPLACE_GLOB
991 HAVE_GLOB_PATTERN_P
992 HAVE_GLOB
993 GNULIB_GLOB
994 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
995 NEXT_SYS_TIME_H
996 REPLACE_STRUCT_TIMEVAL
997 REPLACE_GETTIMEOFDAY
998 HAVE_SYS_TIME_H
999 HAVE_STRUCT_TIMEVAL
1000 HAVE_GETTIMEOFDAY
1001 GNULIB_GETTIMEOFDAY
1002 LTLIBINTL
1003 LIBINTL
1004 LIB_GETRANDOM
1005 REPLACE_GETRANDOM
1006 HAVE_GETRANDOM
1007 GNULIB_GETRANDOM
1008 LIB_GETLOGIN
1009 REPLACE_VSPRINTF
1010 REPLACE_VSNPRINTF
1011 REPLACE_VPRINTF
1012 REPLACE_VFPRINTF
1013 REPLACE_VDPRINTF
1014 REPLACE_VASPRINTF
1015 REPLACE_TMPFILE
1016 REPLACE_STDIO_WRITE_FUNCS
1017 REPLACE_STDIO_READ_FUNCS
1018 REPLACE_SPRINTF
1019 REPLACE_SNPRINTF
1020 REPLACE_RENAMEAT
1021 REPLACE_RENAME
1022 REPLACE_REMOVE
1023 REPLACE_PRINTF
1024 REPLACE_POPEN
1025 REPLACE_PERROR
1026 REPLACE_OBSTACK_PRINTF
1027 REPLACE_GETLINE
1028 REPLACE_GETDELIM
1029 REPLACE_FTELLO
1030 REPLACE_FTELL
1031 REPLACE_FSEEKO
1032 REPLACE_FSEEK
1033 REPLACE_FREOPEN
1034 REPLACE_FPURGE
1035 REPLACE_FPRINTF
1036 REPLACE_FOPEN
1037 REPLACE_FFLUSH
1038 REPLACE_FDOPEN
1039 REPLACE_FCLOSE
1040 REPLACE_DPRINTF
1041 HAVE_VDPRINTF
1042 HAVE_VASPRINTF
1043 HAVE_RENAMEAT
1044 HAVE_POPEN
1045 HAVE_PCLOSE
1046 HAVE_FTELLO
1047 HAVE_FSEEKO
1048 HAVE_DPRINTF
1049 HAVE_DECL_VSNPRINTF
1050 HAVE_DECL_SNPRINTF
1051 HAVE_DECL_OBSTACK_PRINTF
1052 HAVE_DECL_GETLINE
1053 HAVE_DECL_GETDELIM
1054 HAVE_DECL_FTELLO
1055 HAVE_DECL_FSEEKO
1056 HAVE_DECL_FPURGE
1057 HAVE_DECL_FCLOSEALL
1058 GNULIB_MDA_TEMPNAM
1059 GNULIB_MDA_PUTW
1060 GNULIB_MDA_GETW
1061 GNULIB_MDA_FILENO
1062 GNULIB_MDA_FDOPEN
1063 GNULIB_MDA_FCLOSEALL
1064 GNULIB_VSPRINTF_POSIX
1065 GNULIB_VSNPRINTF
1066 GNULIB_VPRINTF_POSIX
1067 GNULIB_VPRINTF
1068 GNULIB_VFPRINTF_POSIX
1069 GNULIB_VFPRINTF
1070 GNULIB_VDPRINTF
1071 GNULIB_VSCANF
1072 GNULIB_VFSCANF
1073 GNULIB_VASPRINTF
1074 GNULIB_TMPFILE
1075 GNULIB_STDIO_H_SIGPIPE
1076 GNULIB_STDIO_H_NONBLOCKING
1077 GNULIB_SPRINTF_POSIX
1078 GNULIB_SNPRINTF
1079 GNULIB_SCANF
1080 GNULIB_RENAMEAT
1081 GNULIB_RENAME
1082 GNULIB_REMOVE
1083 GNULIB_PUTS
1084 GNULIB_PUTCHAR
1085 GNULIB_PUTC
1086 GNULIB_PRINTF_POSIX
1087 GNULIB_PRINTF
1088 GNULIB_POPEN
1089 GNULIB_PERROR
1090 GNULIB_PCLOSE
1091 GNULIB_OBSTACK_PRINTF_POSIX
1092 GNULIB_OBSTACK_PRINTF
1093 GNULIB_GETLINE
1094 GNULIB_GETDELIM
1095 GNULIB_GETCHAR
1096 GNULIB_GETC
1097 GNULIB_FWRITE
1098 GNULIB_FTELLO
1099 GNULIB_FTELL
1100 GNULIB_FSEEKO
1101 GNULIB_FSEEK
1102 GNULIB_FSCANF
1103 GNULIB_FREOPEN
1104 GNULIB_FREAD
1105 GNULIB_FPUTS
1106 GNULIB_FPUTC
1107 GNULIB_FPURGE
1108 GNULIB_FPRINTF_POSIX
1109 GNULIB_FPRINTF
1110 GNULIB_FOPEN
1111 GNULIB_FGETS
1112 GNULIB_FGETC
1113 GNULIB_FFLUSH
1114 GNULIB_FDOPEN
1115 GNULIB_FCLOSE
1116 GNULIB_DPRINTF
1117 WINDOWS_64_BIT_ST_SIZE
1118 WINDOWS_STAT_TIMESPEC
1119 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
1120 NEXT_SYS_STAT_H
1121 REPLACE_UTIMENSAT
1122 REPLACE_STAT
1123 REPLACE_MKNODAT
1124 REPLACE_MKNOD
1125 REPLACE_MKFIFOAT
1126 REPLACE_MKFIFO
1127 REPLACE_MKDIR
1128 REPLACE_LSTAT
1129 REPLACE_FUTIMENS
1130 REPLACE_FSTATAT
1131 REPLACE_FSTAT
1132 REPLACE_FCHMODAT
1133 HAVE_UTIMENSAT
1134 HAVE_MKNODAT
1135 HAVE_MKNOD
1136 HAVE_MKFIFOAT
1137 HAVE_MKFIFO
1138 HAVE_MKDIRAT
1139 HAVE_LSTAT
1140 HAVE_LCHMOD
1141 HAVE_GETUMASK
1142 HAVE_FUTIMENS
1143 HAVE_FSTATAT
1144 HAVE_FCHMODAT
1145 GNULIB_MDA_UMASK
1146 GNULIB_MDA_MKDIR
1147 GNULIB_MDA_CHMOD
1148 GNULIB_OVERRIDES_STRUCT_STAT
1149 GNULIB_UTIMENSAT
1150 GNULIB_STAT
1151 GNULIB_MKNODAT
1152 GNULIB_MKNOD
1153 GNULIB_MKFIFOAT
1154 GNULIB_MKFIFO
1155 GNULIB_MKDIRAT
1156 GNULIB_MKDIR
1157 GNULIB_LSTAT
1158 GNULIB_LCHMOD
1159 GNULIB_GETUMASK
1160 GNULIB_FUTIMENS
1161 GNULIB_FSTATAT
1162 GNULIB_FSTAT
1163 GNULIB_FCHMODAT
1164 FREXPL_LIBM
1165 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
1166 FREXP_LIBM
1167 REPLACE_TRUNCL
1168 REPLACE_TRUNCF
1169 REPLACE_TRUNC
1170 REPLACE_TANHF
1171 REPLACE_TANF
1172 REPLACE_SQRTL
1173 REPLACE_SQRTF
1174 REPLACE_SINHF
1175 REPLACE_SINF
1176 REPLACE_SIGNBIT_USING_BUILTINS
1177 REPLACE_SIGNBIT
1178 REPLACE_ROUNDL
1179 REPLACE_ROUNDF
1180 REPLACE_ROUND
1181 REPLACE_RINTL
1182 REPLACE_REMAINDERL
1183 REPLACE_REMAINDERF
1184 REPLACE_REMAINDER
1185 REPLACE_NAN
1186 REPLACE_MODFL
1187 REPLACE_MODFF
1188 REPLACE_MODF
1189 REPLACE_LOGBL
1190 REPLACE_LOGBF
1191 REPLACE_LOGB
1192 REPLACE_LOG2L
1193 REPLACE_LOG2F
1194 REPLACE_LOG2
1195 REPLACE_LOG1PL
1196 REPLACE_LOG1PF
1197 REPLACE_LOG1P
1198 REPLACE_LOG10L
1199 REPLACE_LOG10F
1200 REPLACE_LOG10
1201 REPLACE_LOGL
1202 REPLACE_LOGF
1203 REPLACE_LOG
1204 REPLACE_LDEXPL
1205 REPLACE_ISNAN
1206 REPLACE_ISINF
1207 REPLACE_ISFINITE
1208 REPLACE_ILOGBL
1209 REPLACE_ILOGBF
1210 REPLACE_ILOGB
1211 REPLACE_HYPOTL
1212 REPLACE_HYPOTF
1213 REPLACE_HYPOT
1214 REPLACE_HUGE_VAL
1215 REPLACE_FREXPL
1216 REPLACE_FREXP
1217 REPLACE_FREXPF
1218 REPLACE_FMODL
1219 REPLACE_FMODF
1220 REPLACE_FMOD
1221 REPLACE_FMAL
1222 REPLACE_FMAF
1223 REPLACE_FMA
1224 REPLACE_FLOORL
1225 REPLACE_FLOORF
1226 REPLACE_FLOOR
1227 REPLACE_FABSL
1228 REPLACE_EXP2L
1229 REPLACE_EXP2
1230 REPLACE_EXPM1L
1231 REPLACE_EXPM1F
1232 REPLACE_EXPM1
1233 REPLACE_EXPL
1234 REPLACE_EXPF
1235 REPLACE_COSHF
1236 REPLACE_COSF
1237 REPLACE_CEILL
1238 REPLACE_CEILF
1239 REPLACE_CEIL
1240 REPLACE_CBRTL
1241 REPLACE_CBRTF
1242 REPLACE_ATAN2F
1243 REPLACE_ATANF
1244 REPLACE_ASINF
1245 REPLACE_ACOSF
1246 HAVE_DECL_TRUNCL
1247 HAVE_DECL_TRUNCF
1248 HAVE_DECL_TRUNC
1249 HAVE_DECL_TANL
1250 HAVE_DECL_SQRTL
1251 HAVE_DECL_SINL
1252 HAVE_DECL_ROUNDL
1253 HAVE_DECL_ROUNDF
1254 HAVE_DECL_ROUND
1255 HAVE_DECL_RINTF
1256 HAVE_DECL_REMAINDERL
1257 HAVE_DECL_REMAINDER
1258 HAVE_DECL_LOGB
1259 HAVE_DECL_LOG2L
1260 HAVE_DECL_LOG2F
1261 HAVE_DECL_LOG2
1262 HAVE_DECL_LOG10L
1263 HAVE_DECL_LOGL
1264 HAVE_DECL_LDEXPL
1265 HAVE_DECL_FREXPL
1266 HAVE_DECL_FLOORL
1267 HAVE_DECL_FLOORF
1268 HAVE_DECL_EXPM1L
1269 HAVE_DECL_EXP2L
1270 HAVE_DECL_EXP2F
1271 HAVE_DECL_EXP2
1272 HAVE_DECL_EXPL
1273 HAVE_DECL_COSL
1274 HAVE_DECL_COPYSIGNF
1275 HAVE_DECL_CEILL
1276 HAVE_DECL_CEILF
1277 HAVE_DECL_CBRTL
1278 HAVE_DECL_CBRTF
1279 HAVE_DECL_ATANL
1280 HAVE_DECL_ASINL
1281 HAVE_DECL_ACOSL
1282 HAVE_TANHF
1283 HAVE_TANL
1284 HAVE_TANF
1285 HAVE_SQRTL
1286 HAVE_SQRTF
1287 HAVE_SINHF
1288 HAVE_SINL
1289 HAVE_SINF
1290 HAVE_RINTL
1291 HAVE_RINT
1292 HAVE_REMAINDERF
1293 HAVE_REMAINDER
1294 HAVE_POWF
1295 HAVE_MODFL
1296 HAVE_MODFF
1297 HAVE_LOGBL
1298 HAVE_LOGBF
1299 HAVE_LOG1PL
1300 HAVE_LOG1PF
1301 HAVE_LOG1P
1302 HAVE_LOG10L
1303 HAVE_LOG10F
1304 HAVE_LOGL
1305 HAVE_LOGF
1306 HAVE_LDEXPF
1307 HAVE_ISNANL
1308 HAVE_ISNAND
1309 HAVE_ISNANF
1310 HAVE_ILOGBL
1311 HAVE_ILOGBF
1312 HAVE_ILOGB
1313 HAVE_HYPOTL
1314 HAVE_HYPOTF
1315 HAVE_FREXPF
1316 HAVE_FMODL
1317 HAVE_FMODF
1318 HAVE_FMAL
1319 HAVE_FMAF
1320 HAVE_FMA
1321 HAVE_FABSL
1322 HAVE_FABSF
1323 HAVE_EXPM1F
1324 HAVE_EXPM1
1325 HAVE_EXPL
1326 HAVE_EXPF
1327 HAVE_COSHF
1328 HAVE_COSL
1329 HAVE_COSF
1330 HAVE_COPYSIGNL
1331 HAVE_COPYSIGN
1332 HAVE_CBRTL
1333 HAVE_CBRTF
1334 HAVE_CBRT
1335 HAVE_ATAN2F
1336 HAVE_ATANL
1337 HAVE_ATANF
1338 HAVE_ASINL
1339 HAVE_ASINF
1340 HAVE_ACOSL
1341 HAVE_ACOSF
1342 GNULIB_MDA_YN
1343 GNULIB_MDA_Y1
1344 GNULIB_MDA_Y0
1345 GNULIB_MDA_JN
1346 GNULIB_MDA_J1
1347 GNULIB_MDA_J0
1348 GNULIB_TRUNCL
1349 GNULIB_TRUNCF
1350 GNULIB_TRUNC
1351 GNULIB_TANHF
1352 GNULIB_TANL
1353 GNULIB_TANF
1354 GNULIB_SQRTL
1355 GNULIB_SQRTF
1356 GNULIB_SINHF
1357 GNULIB_SINL
1358 GNULIB_SINF
1359 GNULIB_SIGNBIT
1360 GNULIB_ROUNDL
1361 GNULIB_ROUNDF
1362 GNULIB_ROUND
1363 GNULIB_RINTL
1364 GNULIB_RINTF
1365 GNULIB_RINT
1366 GNULIB_REMAINDERL
1367 GNULIB_REMAINDERF
1368 GNULIB_REMAINDER
1369 GNULIB_POWF
1370 GNULIB_MODFL
1371 GNULIB_MODFF
1372 GNULIB_MODF
1373 GNULIB_LOGBL
1374 GNULIB_LOGBF
1375 GNULIB_LOGB
1376 GNULIB_LOG2L
1377 GNULIB_LOG2F
1378 GNULIB_LOG2
1379 GNULIB_LOG1PL
1380 GNULIB_LOG1PF
1381 GNULIB_LOG1P
1382 GNULIB_LOG10L
1383 GNULIB_LOG10F
1384 GNULIB_LOG10
1385 GNULIB_LOGL
1386 GNULIB_LOGF
1387 GNULIB_LOG
1388 GNULIB_LDEXPL
1389 GNULIB_LDEXPF
1390 GNULIB_ISNANL
1391 GNULIB_ISNAND
1392 GNULIB_ISNANF
1393 GNULIB_ISNAN
1394 GNULIB_ISINF
1395 GNULIB_ISFINITE
1396 GNULIB_ILOGBL
1397 GNULIB_ILOGBF
1398 GNULIB_ILOGB
1399 GNULIB_HYPOTL
1400 GNULIB_HYPOTF
1401 GNULIB_HYPOT
1402 GNULIB_FREXPL
1403 GNULIB_FREXP
1404 GNULIB_FREXPF
1405 GNULIB_FMODL
1406 GNULIB_FMODF
1407 GNULIB_FMOD
1408 GNULIB_FMAL
1409 GNULIB_FMAF
1410 GNULIB_FMA
1411 GNULIB_FLOORL
1412 GNULIB_FLOORF
1413 GNULIB_FLOOR
1414 GNULIB_FABSL
1415 GNULIB_FABSF
1416 GNULIB_EXPM1L
1417 GNULIB_EXPM1F
1418 GNULIB_EXPM1
1419 GNULIB_EXP2L
1420 GNULIB_EXP2F
1421 GNULIB_EXP2
1422 GNULIB_EXPL
1423 GNULIB_EXPF
1424 GNULIB_COSHF
1425 GNULIB_COSL
1426 GNULIB_COSF
1427 GNULIB_COPYSIGNL
1428 GNULIB_COPYSIGNF
1429 GNULIB_COPYSIGN
1430 GNULIB_CEILL
1431 GNULIB_CEILF
1432 GNULIB_CEIL
1433 GNULIB_CBRTL
1434 GNULIB_CBRTF
1435 GNULIB_CBRT
1436 GNULIB_ATAN2F
1437 GNULIB_ATANL
1438 GNULIB_ATANF
1439 GNULIB_ASINL
1440 GNULIB_ASINF
1441 GNULIB_ACOSL
1442 GNULIB_ACOSF
1443 GL_GENERATE_FNMATCH_H_FALSE
1444 GL_GENERATE_FNMATCH_H_TRUE
1445 FNMATCH_H
1446 HAVE_FNMATCH_H
1447 NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H
1448 NEXT_FNMATCH_H
1449 REPLACE_FNMATCH
1450 HAVE_FNMATCH
1451 GNULIB_FNMATCH
1452 REPLACE_ITOLD
1453 GL_GENERATE_FLOAT_H_FALSE
1454 GL_GENERATE_FLOAT_H_TRUE
1455 FLOAT_H
1456 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1457 NEXT_FLOAT_H
1458 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1459 NEXT_FCNTL_H
1460 REPLACE_OPENAT
1461 REPLACE_OPEN
1462 REPLACE_FCNTL
1463 REPLACE_CREAT
1464 HAVE_OPENAT
1465 HAVE_FCNTL
1466 GNULIB_MDA_OPEN
1467 GNULIB_MDA_CREAT
1468 GNULIB_OPENAT
1469 GNULIB_OPEN
1470 GNULIB_NONBLOCKING
1471 GNULIB_FCNTL
1472 GNULIB_CREAT
1473 EOVERFLOW_VALUE
1474 EOVERFLOW_HIDDEN
1475 ENOLINK_VALUE
1476 ENOLINK_HIDDEN
1477 EMULTIHOP_VALUE
1478 EMULTIHOP_HIDDEN
1479 GL_GENERATE_ERRNO_H_FALSE
1480 GL_GENERATE_ERRNO_H_TRUE
1481 ERRNO_H
1482 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1483 NEXT_ERRNO_H
1484 HAVE_DIRENT_H
1485 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1486 NEXT_DIRENT_H
1487 NEXT_AS_FIRST_DIRECTIVE_CTYPE_H
1488 NEXT_CTYPE_H
1489 HAVE_ISBLANK
1490 GNULIB_ISBLANK
1491 REPLACE_FDOPENDIR
1492 REPLACE_DIRFD
1493 REPLACE_CLOSEDIR
1494 REPLACE_OPENDIR
1495 HAVE_ALPHASORT
1496 HAVE_SCANDIR
1497 HAVE_FDOPENDIR
1498 HAVE_DECL_FDOPENDIR
1499 HAVE_DECL_DIRFD
1500 HAVE_CLOSEDIR
1501 HAVE_REWINDDIR
1502 HAVE_READDIR
1503 HAVE_OPENDIR
1504 GNULIB_ALPHASORT
1505 GNULIB_SCANDIR
1506 GNULIB_FDOPENDIR
1507 GNULIB_DIRFD
1508 GNULIB_CLOSEDIR
1509 GNULIB_REWINDDIR
1510 GNULIB_READDIR
1511 GNULIB_OPENDIR
1512 HAVE_WINSOCK2_H
1513 HAVE_MSVC_INVALID_PARAMETER_HANDLER
1514 LIB_CLOCK_GETTIME
1515 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1516 UNISTD_H_HAVE_WINSOCK2_H
1517 UNISTD_H_HAVE_SYS_RANDOM_H
1518 REPLACE_WRITE
1519 REPLACE_USLEEP
1520 REPLACE_UNLINKAT
1521 REPLACE_UNLINK
1522 REPLACE_TTYNAME_R
1523 REPLACE_TRUNCATE
1524 REPLACE_SYMLINKAT
1525 REPLACE_SYMLINK
1526 REPLACE_SLEEP
1527 REPLACE_RMDIR
1528 REPLACE_READLINKAT
1529 REPLACE_READLINK
1530 REPLACE_READ
1531 REPLACE_PWRITE
1532 REPLACE_PREAD
1533 REPLACE_LSEEK
1534 REPLACE_LINKAT
1535 REPLACE_LINK
1536 REPLACE_LCHOWN
1537 REPLACE_ISATTY
1538 REPLACE_GETPASS
1539 REPLACE_GETPAGESIZE
1540 REPLACE_GETGROUPS
1541 REPLACE_GETLOGIN_R
1542 REPLACE_GETDTABLESIZE
1543 REPLACE_GETDOMAINNAME
1544 REPLACE_GETCWD
1545 REPLACE_FTRUNCATE
1546 REPLACE_FCHOWNAT
1547 REPLACE_FACCESSAT
1548 REPLACE_EXECVPE
1549 REPLACE_EXECVP
1550 REPLACE_EXECVE
1551 REPLACE_EXECV
1552 REPLACE_EXECLP
1553 REPLACE_EXECLE
1554 REPLACE_EXECL
1555 REPLACE_DUP2
1556 REPLACE_DUP
1557 REPLACE_CLOSE
1558 REPLACE_CHOWN
1559 REPLACE_ACCESS
1560 HAVE_SYS_PARAM_H
1561 HAVE_OS_H
1562 HAVE_DECL_TTYNAME_R
1563 HAVE_DECL_TRUNCATE
1564 HAVE_DECL_SETHOSTNAME
1565 HAVE_DECL_GETUSERSHELL
1566 HAVE_DECL_GETPAGESIZE
1567 HAVE_DECL_GETLOGIN_R
1568 HAVE_DECL_GETLOGIN
1569 HAVE_DECL_GETDOMAINNAME
1570 HAVE_DECL_FDATASYNC
1571 HAVE_DECL_FCHDIR
1572 HAVE_DECL_EXECVPE
1573 HAVE_DECL_ENVIRON
1574 HAVE_USLEEP
1575 HAVE_UNLINKAT
1576 HAVE_SYMLINKAT
1577 HAVE_SYMLINK
1578 HAVE_SLEEP
1579 HAVE_SETHOSTNAME
1580 HAVE_READLINKAT
1581 HAVE_READLINK
1582 HAVE_PWRITE
1583 HAVE_PREAD
1584 HAVE_PIPE2
1585 HAVE_PIPE
1586 HAVE_LINKAT
1587 HAVE_LINK
1588 HAVE_LCHOWN
1589 HAVE_GROUP_MEMBER
1590 HAVE_GETPASS
1591 HAVE_GETPAGESIZE
1592 HAVE_GETLOGIN
1593 HAVE_GETHOSTNAME
1594 HAVE_GETGROUPS
1595 HAVE_GETENTROPY
1596 HAVE_GETDTABLESIZE
1597 HAVE_FTRUNCATE
1598 HAVE_FSYNC
1599 HAVE_FDATASYNC
1600 HAVE_FCHOWNAT
1601 HAVE_FCHDIR
1602 HAVE_FACCESSAT
1603 HAVE_EXECVPE
1604 HAVE_EUIDACCESS
1605 HAVE_DUP3
1606 HAVE_COPY_FILE_RANGE
1607 HAVE_CHOWN
1608 GNULIB_MDA_WRITE
1609 GNULIB_MDA_UNLINK
1610 GNULIB_MDA_SWAB
1611 GNULIB_MDA_RMDIR
1612 GNULIB_MDA_READ
1613 GNULIB_MDA_LSEEK
1614 GNULIB_MDA_ISATTY
1615 GNULIB_MDA_GETPID
1616 GNULIB_MDA_GETCWD
1617 GNULIB_MDA_EXECVPE
1618 GNULIB_MDA_EXECVP
1619 GNULIB_MDA_EXECVE
1620 GNULIB_MDA_EXECV
1621 GNULIB_MDA_EXECLP
1622 GNULIB_MDA_EXECLE
1623 GNULIB_MDA_EXECL
1624 GNULIB_MDA_DUP2
1625 GNULIB_MDA_DUP
1626 GNULIB_MDA_CLOSE
1627 GNULIB_MDA_CHDIR
1628 GNULIB_MDA_ACCESS
1629 GNULIB_WRITE
1630 GNULIB_USLEEP
1631 GNULIB_UNLINKAT
1632 GNULIB_UNLINK
1633 GNULIB_UNISTD_H_SIGPIPE
1634 GNULIB_UNISTD_H_NONBLOCKING
1635 GNULIB_TTYNAME_R
1636 GNULIB_TRUNCATE
1637 GNULIB_SYMLINKAT
1638 GNULIB_SYMLINK
1639 GNULIB_SLEEP
1640 GNULIB_SETHOSTNAME
1641 GNULIB_RMDIR
1642 GNULIB_READLINKAT
1643 GNULIB_READLINK
1644 GNULIB_READ
1645 GNULIB_PWRITE
1646 GNULIB_PREAD
1647 GNULIB_PIPE2
1648 GNULIB_PIPE
1649 GNULIB_LSEEK
1650 GNULIB_LINKAT
1651 GNULIB_LINK
1652 GNULIB_LCHOWN
1653 GNULIB_ISATTY
1654 GNULIB_GROUP_MEMBER
1655 GNULIB_GETUSERSHELL
1656 GNULIB_GETPASS
1657 GNULIB_GETPAGESIZE
1658 GNULIB_GETOPT_POSIX
1659 GNULIB_GETLOGIN_R
1660 GNULIB_GETLOGIN
1661 GNULIB_GETHOSTNAME
1662 GNULIB_GETGROUPS
1663 GNULIB_GETENTROPY
1664 GNULIB_GETDTABLESIZE
1665 GNULIB_GETDOMAINNAME
1666 GNULIB_GETCWD
1667 GNULIB_FTRUNCATE
1668 GNULIB_FSYNC
1669 GNULIB_FDATASYNC
1670 GNULIB_FCHOWNAT
1671 GNULIB_FCHDIR
1672 GNULIB_FACCESSAT
1673 GNULIB_EXECVPE
1674 GNULIB_EXECVP
1675 GNULIB_EXECVE
1676 GNULIB_EXECV
1677 GNULIB_EXECLP
1678 GNULIB_EXECLE
1679 GNULIB_EXECL
1680 GNULIB_EUIDACCESS
1681 GNULIB_ENVIRON
1682 GNULIB_DUP3
1683 GNULIB_DUP2
1684 GNULIB_DUP
1685 GNULIB_COPY_FILE_RANGE
1686 GNULIB_CLOSE
1687 GNULIB_CHOWN
1688 GNULIB_CHDIR
1689 GNULIB_ACCESS
1690 REPLACE_WCTOMB
1691 REPLACE_UNSETENV
1692 REPLACE_STRTOLD
1693 REPLACE_STRTOD
1694 REPLACE_SETSTATE
1695 REPLACE_SETENV
1696 REPLACE_REALPATH
1697 REPLACE_REALLOC
1698 REPLACE_RANDOM_R
1699 REPLACE_RANDOM
1700 REPLACE_QSORT_R
1701 REPLACE_PUTENV
1702 REPLACE_PTSNAME_R
1703 REPLACE_PTSNAME
1704 REPLACE_POSIX_MEMALIGN
1705 REPLACE_MKSTEMP
1706 REPLACE_MBTOWC
1707 REPLACE_MALLOC
1708 REPLACE_INITSTATE
1709 REPLACE_FREE
1710 REPLACE_CANONICALIZE_FILE_NAME
1711 REPLACE_CALLOC
1712 REPLACE_ALIGNED_ALLOC
1713 HAVE_DECL_UNSETENV
1714 HAVE_UNLOCKPT
1715 HAVE_SYS_LOADAVG_H
1716 HAVE_STRUCT_RANDOM_DATA
1717 HAVE_STRTOULL
1718 HAVE_STRTOLL
1719 HAVE_STRTOLD
1720 HAVE_STRTOD
1721 HAVE_DECL_SETSTATE
1722 HAVE_SETSTATE
1723 HAVE_DECL_SETENV
1724 HAVE_SETENV
1725 HAVE_SECURE_GETENV
1726 HAVE_RPMATCH
1727 HAVE_REALPATH
1728 HAVE_REALLOCARRAY
1729 HAVE_RANDOM_R
1730 HAVE_RANDOM_H
1731 HAVE_RANDOM
1732 HAVE_QSORT_R
1733 HAVE_PTSNAME_R
1734 HAVE_PTSNAME
1735 HAVE_POSIX_OPENPT
1736 HAVE_POSIX_MEMALIGN
1737 HAVE_MKSTEMPS
1738 HAVE_MKSTEMP
1739 HAVE_MKOSTEMPS
1740 HAVE_MKOSTEMP
1741 HAVE_MKDTEMP
1742 HAVE_MBTOWC
1743 HAVE_DECL_INITSTATE
1744 HAVE_INITSTATE
1745 HAVE_GRANTPT
1746 HAVE_GETSUBOPT
1747 HAVE_DECL_GETLOADAVG
1748 HAVE_DECL_GCVT
1749 HAVE_DECL_FCVT
1750 HAVE_DECL_ECVT
1751 HAVE_CANONICALIZE_FILE_NAME
1752 HAVE_ATOLL
1753 HAVE_ALIGNED_ALLOC
1754 HAVE__EXIT
1755 GNULIB_MDA_PUTENV
1756 GNULIB_MDA_MKTEMP
1757 GNULIB_MDA_GCVT
1758 GNULIB_MDA_FCVT
1759 GNULIB_MDA_ECVT
1760 GNULIB_WCTOMB
1761 GNULIB_UNSETENV
1762 GNULIB_UNLOCKPT
1763 GNULIB_SYSTEM_POSIX
1764 GNULIB_STRTOULL
1765 GNULIB_STRTOLL
1766 GNULIB_STRTOLD
1767 GNULIB_STRTOD
1768 GNULIB_SETENV
1769 GNULIB_SECURE_GETENV
1770 GNULIB_RPMATCH
1771 GNULIB_REALPATH
1772 GNULIB_REALLOC_POSIX
1773 GNULIB_REALLOCARRAY
1774 GNULIB_RANDOM_R
1775 GNULIB_RANDOM
1776 GNULIB_QSORT_R
1777 GNULIB_PUTENV
1778 GNULIB_PTSNAME_R
1779 GNULIB_PTSNAME
1780 GNULIB_POSIX_OPENPT
1781 GNULIB_POSIX_MEMALIGN
1782 GNULIB_MKSTEMPS
1783 GNULIB_MKSTEMP
1784 GNULIB_MKOSTEMPS
1785 GNULIB_MKOSTEMP
1786 GNULIB_MKDTEMP
1787 GNULIB_MBTOWC
1788 GNULIB_MALLOC_POSIX
1789 GNULIB_GRANTPT
1790 GNULIB_GETSUBOPT
1791 GNULIB_GETLOADAVG
1792 GNULIB_FREE_POSIX
1793 GNULIB_CANONICALIZE_FILE_NAME
1794 GNULIB_CALLOC_POSIX
1795 GNULIB_ATOLL
1796 GNULIB_ALIGNED_ALLOC
1797 GNULIB__EXIT
1798 LOCALE_FR
1799 REPLACE_WCSTOK
1800 REPLACE_WCSFTIME
1801 REPLACE_WCSWIDTH
1802 REPLACE_WCWIDTH
1803 REPLACE_WCSNRTOMBS
1804 REPLACE_WCSRTOMBS
1805 REPLACE_WCRTOMB
1806 REPLACE_MBSNRTOWCS
1807 REPLACE_MBSRTOWCS
1808 REPLACE_MBRLEN
1809 REPLACE_MBRTOWC
1810 REPLACE_MBSINIT
1811 REPLACE_WCTOB
1812 REPLACE_BTOWC
1813 REPLACE_MBSTATE_T
1814 HAVE_DECL_WCWIDTH
1815 HAVE_DECL_WCSDUP
1816 HAVE_DECL_WCTOB
1817 HAVE_WCSFTIME
1818 HAVE_WCSWIDTH
1819 HAVE_WCSTOK
1820 HAVE_WCSSTR
1821 HAVE_WCSPBRK
1822 HAVE_WCSSPN
1823 HAVE_WCSCSPN
1824 HAVE_WCSRCHR
1825 HAVE_WCSCHR
1826 HAVE_WCSDUP
1827 HAVE_WCSXFRM
1828 HAVE_WCSCOLL
1829 HAVE_WCSNCASECMP
1830 HAVE_WCSCASECMP
1831 HAVE_WCSNCMP
1832 HAVE_WCSCMP
1833 HAVE_WCSNCAT
1834 HAVE_WCSCAT
1835 HAVE_WCPNCPY
1836 HAVE_WCSNCPY
1837 HAVE_WCPCPY
1838 HAVE_WCSCPY
1839 HAVE_WCSNLEN
1840 HAVE_WCSLEN
1841 HAVE_WMEMSET
1842 HAVE_WMEMPCPY
1843 HAVE_WMEMMOVE
1844 HAVE_WMEMCPY
1845 HAVE_WMEMCMP
1846 HAVE_WMEMCHR
1847 HAVE_WCSNRTOMBS
1848 HAVE_WCSRTOMBS
1849 HAVE_WCRTOMB
1850 HAVE_MBSNRTOWCS
1851 HAVE_MBSRTOWCS
1852 HAVE_MBRLEN
1853 HAVE_MBRTOWC
1854 HAVE_MBSINIT
1855 HAVE_BTOWC
1856 GNULIB_MDA_WCSDUP
1857 GNULIB_WCSFTIME
1858 GNULIB_WCSWIDTH
1859 GNULIB_WCSTOK
1860 GNULIB_WCSSTR
1861 GNULIB_WCSPBRK
1862 GNULIB_WCSSPN
1863 GNULIB_WCSCSPN
1864 GNULIB_WCSRCHR
1865 GNULIB_WCSCHR
1866 GNULIB_WCSDUP
1867 GNULIB_WCSXFRM
1868 GNULIB_WCSCOLL
1869 GNULIB_WCSNCASECMP
1870 GNULIB_WCSCASECMP
1871 GNULIB_WCSNCMP
1872 GNULIB_WCSCMP
1873 GNULIB_WCSNCAT
1874 GNULIB_WCSCAT
1875 GNULIB_WCPNCPY
1876 GNULIB_WCSNCPY
1877 GNULIB_WCPCPY
1878 GNULIB_WCSCPY
1879 GNULIB_WCSNLEN
1880 GNULIB_WCSLEN
1881 GNULIB_WMEMSET
1882 GNULIB_WMEMPCPY
1883 GNULIB_WMEMMOVE
1884 GNULIB_WMEMCPY
1885 GNULIB_WMEMCMP
1886 GNULIB_WMEMCHR
1887 GNULIB_WCWIDTH
1888 GNULIB_WCSNRTOMBS
1889 GNULIB_WCSRTOMBS
1890 GNULIB_WCRTOMB
1891 GNULIB_MBSNRTOWCS
1892 GNULIB_MBSRTOWCS
1893 GNULIB_MBRLEN
1894 GNULIB_MBRTOWC
1895 GNULIB_MBSINIT
1896 GNULIB_WCTOB
1897 GNULIB_BTOWC
1898 MKDIR_P
1899 HAVE_WS2TCPIP_H
1900 HAVE_FEATURES_H
1901 NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H
1902 NEXT_ARPA_INET_H
1903 PRAGMA_COLUMNS
1904 PRAGMA_SYSTEM_HEADER
1905 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1906 INCLUDE_NEXT
1907 HAVE_ARPA_INET_H
1908 REPLACE_INET_PTON
1909 REPLACE_INET_NTOP
1910 HAVE_DECL_INET_PTON
1911 HAVE_DECL_INET_NTOP
1912 GNULIB_INET_PTON
1913 GNULIB_INET_NTOP
1914 HAVE_ALLOCA_H
1915 GL_GENERATE_ALLOCA_H_FALSE
1916 GL_GENERATE_ALLOCA_H_TRUE
1917 ALLOCA_H
1918 ALLOCA
1919 GL_COND_LIBTOOL_FALSE
1920 GL_COND_LIBTOOL_TRUE
1921 RANLIB
1922 ARFLAGS
1923 AR
1924 LARGEFILE_CPPFLAGS
1925 target_os
1926 target_vendor
1927 target_cpu
1928 target
1929 host_os
1930 host_vendor
1931 host_cpu
1932 host
1933 build_os
1934 build_vendor
1935 build_cpu
1936 build
1937 EGREP
1938 GREP
1939 CPP
1940 OBJEXT
1941 EXEEXT
1942 ac_ct_CC
1943 CPPFLAGS
1944 LDFLAGS
1945 CFLAGS
1946 CC
1947 MAINT
1948 MAINTAINER_MODE_FALSE
1949 MAINTAINER_MODE_TRUE
1950 target_alias
1951 host_alias
1952 build_alias
1953 LIBS
1954 ECHO_T
1955 ECHO_N
1956 ECHO_C
1957 DEFS
1958 mandir
1959 localedir
1960 libdir
1961 psdir
1962 pdfdir
1963 dvidir
1964 htmldir
1965 infodir
1966 docdir
1967 oldincludedir
1968 includedir
1969 localstatedir
1970 sharedstatedir
1971 sysconfdir
1972 datadir
1973 datarootdir
1974 libexecdir
1975 sbindir
1976 bindir
1977 program_transform_name
1978 prefix
1979 exec_prefix
1980 PACKAGE_URL
1981 PACKAGE_BUGREPORT
1982 PACKAGE_STRING
1983 PACKAGE_VERSION
1984 PACKAGE_TARNAME
1985 PACKAGE_NAME
1986 PATH_SEPARATOR
1987 SHELL'
1988 ac_subst_files=''
1989 ac_user_opts='
1990 enable_option_checking
1991 enable_maintainer_mode
1992 enable_plugins
1993 enable_largefile
1994 enable_threads
1995 enable_cross_guesses
1996 enable_dependency_tracking
1997 enable_silent_rules
1998 '
1999 ac_precious_vars='build_alias
2000 host_alias
2001 target_alias
2002 CC
2003 CFLAGS
2004 LDFLAGS
2005 LIBS
2006 CPPFLAGS
2007 CPP'
2008
2009
2010 # Initialize some variables set by options.
2011 ac_init_help=
2012 ac_init_version=false
2013 ac_unrecognized_opts=
2014 ac_unrecognized_sep=
2015 # The variables have the same names as the options, with
2016 # dashes changed to underlines.
2017 cache_file=/dev/null
2018 exec_prefix=NONE
2019 no_create=
2020 no_recursion=
2021 prefix=NONE
2022 program_prefix=NONE
2023 program_suffix=NONE
2024 program_transform_name=s,x,x,
2025 silent=
2026 site=
2027 srcdir=
2028 verbose=
2029 x_includes=NONE
2030 x_libraries=NONE
2031
2032 # Installation directory options.
2033 # These are left unexpanded so users can "make install exec_prefix=/foo"
2034 # and all the variables that are supposed to be based on exec_prefix
2035 # by default will actually change.
2036 # Use braces instead of parens because sh, perl, etc. also accept them.
2037 # (The list follows the same order as the GNU Coding Standards.)
2038 bindir='${exec_prefix}/bin'
2039 sbindir='${exec_prefix}/sbin'
2040 libexecdir='${exec_prefix}/libexec'
2041 datarootdir='${prefix}/share'
2042 datadir='${datarootdir}'
2043 sysconfdir='${prefix}/etc'
2044 sharedstatedir='${prefix}/com'
2045 localstatedir='${prefix}/var'
2046 includedir='${prefix}/include'
2047 oldincludedir='/usr/include'
2048 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
2049 infodir='${datarootdir}/info'
2050 htmldir='${docdir}'
2051 dvidir='${docdir}'
2052 pdfdir='${docdir}'
2053 psdir='${docdir}'
2054 libdir='${exec_prefix}/lib'
2055 localedir='${datarootdir}/locale'
2056 mandir='${datarootdir}/man'
2057
2058 ac_prev=
2059 ac_dashdash=
2060 for ac_option
2061 do
2062 # If the previous option needs an argument, assign it.
2063 if test -n "$ac_prev"; then
2064 eval $ac_prev=\$ac_option
2065 ac_prev=
2066 continue
2067 fi
2068
2069 case $ac_option in
2070 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
2071 *=) ac_optarg= ;;
2072 *) ac_optarg=yes ;;
2073 esac
2074
2075 # Accept the important Cygnus configure options, so we can diagnose typos.
2076
2077 case $ac_dashdash$ac_option in
2078 --)
2079 ac_dashdash=yes ;;
2080
2081 -bindir | --bindir | --bindi | --bind | --bin | --bi)
2082 ac_prev=bindir ;;
2083 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
2084 bindir=$ac_optarg ;;
2085
2086 -build | --build | --buil | --bui | --bu)
2087 ac_prev=build_alias ;;
2088 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
2089 build_alias=$ac_optarg ;;
2090
2091 -cache-file | --cache-file | --cache-fil | --cache-fi \
2092 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
2093 ac_prev=cache_file ;;
2094 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
2095 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
2096 cache_file=$ac_optarg ;;
2097
2098 --config-cache | -C)
2099 cache_file=config.cache ;;
2100
2101 -datadir | --datadir | --datadi | --datad)
2102 ac_prev=datadir ;;
2103 -datadir=* | --datadir=* | --datadi=* | --datad=*)
2104 datadir=$ac_optarg ;;
2105
2106 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
2107 | --dataroo | --dataro | --datar)
2108 ac_prev=datarootdir ;;
2109 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
2110 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
2111 datarootdir=$ac_optarg ;;
2112
2113 -disable-* | --disable-*)
2114 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
2115 # Reject names that are not valid shell variable names.
2116 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2117 as_fn_error $? "invalid feature name: $ac_useropt"
2118 ac_useropt_orig=$ac_useropt
2119 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2120 case $ac_user_opts in
2121 *"
2122 "enable_$ac_useropt"
2123 "*) ;;
2124 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
2125 ac_unrecognized_sep=', ';;
2126 esac
2127 eval enable_$ac_useropt=no ;;
2128
2129 -docdir | --docdir | --docdi | --doc | --do)
2130 ac_prev=docdir ;;
2131 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
2132 docdir=$ac_optarg ;;
2133
2134 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
2135 ac_prev=dvidir ;;
2136 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
2137 dvidir=$ac_optarg ;;
2138
2139 -enable-* | --enable-*)
2140 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
2141 # Reject names that are not valid shell variable names.
2142 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2143 as_fn_error $? "invalid feature name: $ac_useropt"
2144 ac_useropt_orig=$ac_useropt
2145 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2146 case $ac_user_opts in
2147 *"
2148 "enable_$ac_useropt"
2149 "*) ;;
2150 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
2151 ac_unrecognized_sep=', ';;
2152 esac
2153 eval enable_$ac_useropt=\$ac_optarg ;;
2154
2155 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
2156 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
2157 | --exec | --exe | --ex)
2158 ac_prev=exec_prefix ;;
2159 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
2160 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
2161 | --exec=* | --exe=* | --ex=*)
2162 exec_prefix=$ac_optarg ;;
2163
2164 -gas | --gas | --ga | --g)
2165 # Obsolete; use --with-gas.
2166 with_gas=yes ;;
2167
2168 -help | --help | --hel | --he | -h)
2169 ac_init_help=long ;;
2170 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
2171 ac_init_help=recursive ;;
2172 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
2173 ac_init_help=short ;;
2174
2175 -host | --host | --hos | --ho)
2176 ac_prev=host_alias ;;
2177 -host=* | --host=* | --hos=* | --ho=*)
2178 host_alias=$ac_optarg ;;
2179
2180 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
2181 ac_prev=htmldir ;;
2182 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
2183 | --ht=*)
2184 htmldir=$ac_optarg ;;
2185
2186 -includedir | --includedir | --includedi | --included | --include \
2187 | --includ | --inclu | --incl | --inc)
2188 ac_prev=includedir ;;
2189 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
2190 | --includ=* | --inclu=* | --incl=* | --inc=*)
2191 includedir=$ac_optarg ;;
2192
2193 -infodir | --infodir | --infodi | --infod | --info | --inf)
2194 ac_prev=infodir ;;
2195 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
2196 infodir=$ac_optarg ;;
2197
2198 -libdir | --libdir | --libdi | --libd)
2199 ac_prev=libdir ;;
2200 -libdir=* | --libdir=* | --libdi=* | --libd=*)
2201 libdir=$ac_optarg ;;
2202
2203 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
2204 | --libexe | --libex | --libe)
2205 ac_prev=libexecdir ;;
2206 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
2207 | --libexe=* | --libex=* | --libe=*)
2208 libexecdir=$ac_optarg ;;
2209
2210 -localedir | --localedir | --localedi | --localed | --locale)
2211 ac_prev=localedir ;;
2212 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
2213 localedir=$ac_optarg ;;
2214
2215 -localstatedir | --localstatedir | --localstatedi | --localstated \
2216 | --localstate | --localstat | --localsta | --localst | --locals)
2217 ac_prev=localstatedir ;;
2218 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
2219 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
2220 localstatedir=$ac_optarg ;;
2221
2222 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
2223 ac_prev=mandir ;;
2224 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
2225 mandir=$ac_optarg ;;
2226
2227 -nfp | --nfp | --nf)
2228 # Obsolete; use --without-fp.
2229 with_fp=no ;;
2230
2231 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
2232 | --no-cr | --no-c | -n)
2233 no_create=yes ;;
2234
2235 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
2236 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
2237 no_recursion=yes ;;
2238
2239 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
2240 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
2241 | --oldin | --oldi | --old | --ol | --o)
2242 ac_prev=oldincludedir ;;
2243 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
2244 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
2245 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
2246 oldincludedir=$ac_optarg ;;
2247
2248 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
2249 ac_prev=prefix ;;
2250 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
2251 prefix=$ac_optarg ;;
2252
2253 -program-prefix | --program-prefix | --program-prefi | --program-pref \
2254 | --program-pre | --program-pr | --program-p)
2255 ac_prev=program_prefix ;;
2256 -program-prefix=* | --program-prefix=* | --program-prefi=* \
2257 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
2258 program_prefix=$ac_optarg ;;
2259
2260 -program-suffix | --program-suffix | --program-suffi | --program-suff \
2261 | --program-suf | --program-su | --program-s)
2262 ac_prev=program_suffix ;;
2263 -program-suffix=* | --program-suffix=* | --program-suffi=* \
2264 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
2265 program_suffix=$ac_optarg ;;
2266
2267 -program-transform-name | --program-transform-name \
2268 | --program-transform-nam | --program-transform-na \
2269 | --program-transform-n | --program-transform- \
2270 | --program-transform | --program-transfor \
2271 | --program-transfo | --program-transf \
2272 | --program-trans | --program-tran \
2273 | --progr-tra | --program-tr | --program-t)
2274 ac_prev=program_transform_name ;;
2275 -program-transform-name=* | --program-transform-name=* \
2276 | --program-transform-nam=* | --program-transform-na=* \
2277 | --program-transform-n=* | --program-transform-=* \
2278 | --program-transform=* | --program-transfor=* \
2279 | --program-transfo=* | --program-transf=* \
2280 | --program-trans=* | --program-tran=* \
2281 | --progr-tra=* | --program-tr=* | --program-t=*)
2282 program_transform_name=$ac_optarg ;;
2283
2284 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
2285 ac_prev=pdfdir ;;
2286 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
2287 pdfdir=$ac_optarg ;;
2288
2289 -psdir | --psdir | --psdi | --psd | --ps)
2290 ac_prev=psdir ;;
2291 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
2292 psdir=$ac_optarg ;;
2293
2294 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2295 | -silent | --silent | --silen | --sile | --sil)
2296 silent=yes ;;
2297
2298 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
2299 ac_prev=sbindir ;;
2300 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
2301 | --sbi=* | --sb=*)
2302 sbindir=$ac_optarg ;;
2303
2304 -sharedstatedir | --sharedstatedir | --sharedstatedi \
2305 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
2306 | --sharedst | --shareds | --shared | --share | --shar \
2307 | --sha | --sh)
2308 ac_prev=sharedstatedir ;;
2309 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
2310 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
2311 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
2312 | --sha=* | --sh=*)
2313 sharedstatedir=$ac_optarg ;;
2314
2315 -site | --site | --sit)
2316 ac_prev=site ;;
2317 -site=* | --site=* | --sit=*)
2318 site=$ac_optarg ;;
2319
2320 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2321 ac_prev=srcdir ;;
2322 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2323 srcdir=$ac_optarg ;;
2324
2325 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
2326 | --syscon | --sysco | --sysc | --sys | --sy)
2327 ac_prev=sysconfdir ;;
2328 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
2329 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
2330 sysconfdir=$ac_optarg ;;
2331
2332 -target | --target | --targe | --targ | --tar | --ta | --t)
2333 ac_prev=target_alias ;;
2334 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
2335 target_alias=$ac_optarg ;;
2336
2337 -v | -verbose | --verbose | --verbos | --verbo | --verb)
2338 verbose=yes ;;
2339
2340 -version | --version | --versio | --versi | --vers | -V)
2341 ac_init_version=: ;;
2342
2343 -with-* | --with-*)
2344 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
2345 # Reject names that are not valid shell variable names.
2346 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2347 as_fn_error $? "invalid package name: $ac_useropt"
2348 ac_useropt_orig=$ac_useropt
2349 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2350 case $ac_user_opts in
2351 *"
2352 "with_$ac_useropt"
2353 "*) ;;
2354 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
2355 ac_unrecognized_sep=', ';;
2356 esac
2357 eval with_$ac_useropt=\$ac_optarg ;;
2358
2359 -without-* | --without-*)
2360 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
2361 # Reject names that are not valid shell variable names.
2362 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2363 as_fn_error $? "invalid package name: $ac_useropt"
2364 ac_useropt_orig=$ac_useropt
2365 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2366 case $ac_user_opts in
2367 *"
2368 "with_$ac_useropt"
2369 "*) ;;
2370 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
2371 ac_unrecognized_sep=', ';;
2372 esac
2373 eval with_$ac_useropt=no ;;
2374
2375 --x)
2376 # Obsolete; use --with-x.
2377 with_x=yes ;;
2378
2379 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
2380 | --x-incl | --x-inc | --x-in | --x-i)
2381 ac_prev=x_includes ;;
2382 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
2383 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
2384 x_includes=$ac_optarg ;;
2385
2386 -x-libraries | --x-libraries | --x-librarie | --x-librari \
2387 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
2388 ac_prev=x_libraries ;;
2389 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
2390 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
2391 x_libraries=$ac_optarg ;;
2392
2393 -*) as_fn_error $? "unrecognized option: \`$ac_option'
2394 Try \`$0 --help' for more information"
2395 ;;
2396
2397 *=*)
2398 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
2399 # Reject names that are not valid shell variable names.
2400 case $ac_envvar in #(
2401 '' | [0-9]* | *[!_$as_cr_alnum]* )
2402 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
2403 esac
2404 eval $ac_envvar=\$ac_optarg
2405 export $ac_envvar ;;
2406
2407 *)
2408 # FIXME: should be removed in autoconf 3.0.
2409 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
2410 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
2411 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
2412 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
2413 ;;
2414
2415 esac
2416 done
2417
2418 if test -n "$ac_prev"; then
2419 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
2420 as_fn_error $? "missing argument to $ac_option"
2421 fi
2422
2423 if test -n "$ac_unrecognized_opts"; then
2424 case $enable_option_checking in
2425 no) ;;
2426 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
2427 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2428 esac
2429 fi
2430
2431 # Check all directory arguments for consistency.
2432 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
2433 datadir sysconfdir sharedstatedir localstatedir includedir \
2434 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2435 libdir localedir mandir
2436 do
2437 eval ac_val=\$$ac_var
2438 # Remove trailing slashes.
2439 case $ac_val in
2440 */ )
2441 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2442 eval $ac_var=\$ac_val;;
2443 esac
2444 # Be sure to have absolute directory names.
2445 case $ac_val in
2446 [\\/$]* | ?:[\\/]* ) continue;;
2447 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2448 esac
2449 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
2450 done
2451
2452 # There might be people who depend on the old broken behavior: `$host'
2453 # used to hold the argument of --host etc.
2454 # FIXME: To remove some day.
2455 build=$build_alias
2456 host=$host_alias
2457 target=$target_alias
2458
2459 # FIXME: To remove some day.
2460 if test "x$host_alias" != x; then
2461 if test "x$build_alias" = x; then
2462 cross_compiling=maybe
2463 elif test "x$build_alias" != "x$host_alias"; then
2464 cross_compiling=yes
2465 fi
2466 fi
2467
2468 ac_tool_prefix=
2469 test -n "$host_alias" && ac_tool_prefix=$host_alias-
2470
2471 test "$silent" = yes && exec 6>/dev/null
2472
2473
2474 ac_pwd=`pwd` && test -n "$ac_pwd" &&
2475 ac_ls_di=`ls -di .` &&
2476 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2477 as_fn_error $? "working directory cannot be determined"
2478 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2479 as_fn_error $? "pwd does not report name of working directory"
2480
2481
2482 # Find the source files, if location was not specified.
2483 if test -z "$srcdir"; then
2484 ac_srcdir_defaulted=yes
2485 # Try the directory containing this script, then the parent directory.
2486 ac_confdir=`$as_dirname -- "$as_myself" ||
2487 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2488 X"$as_myself" : 'X\(//\)[^/]' \| \
2489 X"$as_myself" : 'X\(//\)$' \| \
2490 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2491 $as_echo X"$as_myself" |
2492 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2493 s//\1/
2494 q
2495 }
2496 /^X\(\/\/\)[^/].*/{
2497 s//\1/
2498 q
2499 }
2500 /^X\(\/\/\)$/{
2501 s//\1/
2502 q
2503 }
2504 /^X\(\/\).*/{
2505 s//\1/
2506 q
2507 }
2508 s/.*/./; q'`
2509 srcdir=$ac_confdir
2510 if test ! -r "$srcdir/$ac_unique_file"; then
2511 srcdir=..
2512 fi
2513 else
2514 ac_srcdir_defaulted=no
2515 fi
2516 if test ! -r "$srcdir/$ac_unique_file"; then
2517 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2518 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
2519 fi
2520 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2521 ac_abs_confdir=`(
2522 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
2523 pwd)`
2524 # When building in place, set srcdir=.
2525 if test "$ac_abs_confdir" = "$ac_pwd"; then
2526 srcdir=.
2527 fi
2528 # Remove unnecessary trailing slashes from srcdir.
2529 # Double slashes in file names in object file debugging info
2530 # mess up M-x gdb in Emacs.
2531 case $srcdir in
2532 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2533 esac
2534 for ac_var in $ac_precious_vars; do
2535 eval ac_env_${ac_var}_set=\${${ac_var}+set}
2536 eval ac_env_${ac_var}_value=\$${ac_var}
2537 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2538 eval ac_cv_env_${ac_var}_value=\$${ac_var}
2539 done
2540
2541 #
2542 # Report the --help message.
2543 #
2544 if test "$ac_init_help" = "long"; then
2545 # Omit some internal or obsolete options to make the list less imposing.
2546 # This message is too long to be a string in the A/UX 3.1 sh.
2547 cat <<_ACEOF
2548 \`configure' configures libgnu UNUSED-VERSION to adapt to many kinds of systems.
2549
2550 Usage: $0 [OPTION]... [VAR=VALUE]...
2551
2552 To assign environment variables (e.g., CC, CFLAGS...), specify them as
2553 VAR=VALUE. See below for descriptions of some of the useful variables.
2554
2555 Defaults for the options are specified in brackets.
2556
2557 Configuration:
2558 -h, --help display this help and exit
2559 --help=short display options specific to this package
2560 --help=recursive display the short help of all the included packages
2561 -V, --version display version information and exit
2562 -q, --quiet, --silent do not print \`checking ...' messages
2563 --cache-file=FILE cache test results in FILE [disabled]
2564 -C, --config-cache alias for \`--cache-file=config.cache'
2565 -n, --no-create do not create output files
2566 --srcdir=DIR find the sources in DIR [configure dir or \`..']
2567
2568 Installation directories:
2569 --prefix=PREFIX install architecture-independent files in PREFIX
2570 [$ac_default_prefix]
2571 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
2572 [PREFIX]
2573
2574 By default, \`make install' will install all the files in
2575 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
2576 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2577 for instance \`--prefix=\$HOME'.
2578
2579 For better control, use the options below.
2580
2581 Fine tuning of the installation directories:
2582 --bindir=DIR user executables [EPREFIX/bin]
2583 --sbindir=DIR system admin executables [EPREFIX/sbin]
2584 --libexecdir=DIR program executables [EPREFIX/libexec]
2585 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
2586 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
2587 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
2588 --libdir=DIR object code libraries [EPREFIX/lib]
2589 --includedir=DIR C header files [PREFIX/include]
2590 --oldincludedir=DIR C header files for non-gcc [/usr/include]
2591 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
2592 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
2593 --infodir=DIR info documentation [DATAROOTDIR/info]
2594 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
2595 --mandir=DIR man documentation [DATAROOTDIR/man]
2596 --docdir=DIR documentation root [DATAROOTDIR/doc/libgnu]
2597 --htmldir=DIR html documentation [DOCDIR]
2598 --dvidir=DIR dvi documentation [DOCDIR]
2599 --pdfdir=DIR pdf documentation [DOCDIR]
2600 --psdir=DIR ps documentation [DOCDIR]
2601 _ACEOF
2602
2603 cat <<\_ACEOF
2604
2605 Program names:
2606 --program-prefix=PREFIX prepend PREFIX to installed program names
2607 --program-suffix=SUFFIX append SUFFIX to installed program names
2608 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
2609
2610 System types:
2611 --build=BUILD configure for building on BUILD [guessed]
2612 --host=HOST cross-compile to build programs to run on HOST [BUILD]
2613 --target=TARGET configure for building compilers for TARGET [HOST]
2614 _ACEOF
2615 fi
2616
2617 if test -n "$ac_init_help"; then
2618 case $ac_init_help in
2619 short | recursive ) echo "Configuration of libgnu UNUSED-VERSION:";;
2620 esac
2621 cat <<\_ACEOF
2622
2623 Optional Features:
2624 --disable-option-checking ignore unrecognized --enable/--with options
2625 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
2626 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
2627 --enable-maintainer-mode
2628 enable make rules and dependencies not useful (and
2629 sometimes confusing) to the casual installer
2630 --enable-plugins Enable support for plugins
2631 --disable-largefile omit support for large files
2632 --enable-threads={isoc|posix|isoc+posix|windows}
2633 specify multithreading API
2634 --disable-threads build without multithread safety
2635 --enable-cross-guesses={conservative|risky}
2636 specify policy for cross-compilation guesses
2637 --enable-dependency-tracking
2638 do not reject slow dependency extractors
2639 --disable-dependency-tracking
2640 speeds up one-time build
2641 --enable-silent-rules less verbose build output (undo: "make V=1")
2642 --disable-silent-rules verbose build output (undo: "make V=0")
2643
2644 Some influential environment variables:
2645 CC C compiler command
2646 CFLAGS C compiler flags
2647 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2648 nonstandard directory <lib dir>
2649 LIBS libraries to pass to the linker, e.g. -l<library>
2650 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2651 you have headers in a nonstandard directory <include dir>
2652 CPP C preprocessor
2653
2654 Use these variables to override the choices made by `configure' or to help
2655 it to find libraries and programs with nonstandard names/locations.
2656
2657 Report bugs to the package provider.
2658 _ACEOF
2659 ac_status=$?
2660 fi
2661
2662 if test "$ac_init_help" = "recursive"; then
2663 # If there are subdirs, report their specific --help.
2664 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2665 test -d "$ac_dir" ||
2666 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2667 continue
2668 ac_builddir=.
2669
2670 case "$ac_dir" in
2671 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2672 *)
2673 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2674 # A ".." for each directory in $ac_dir_suffix.
2675 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2676 case $ac_top_builddir_sub in
2677 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2678 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2679 esac ;;
2680 esac
2681 ac_abs_top_builddir=$ac_pwd
2682 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2683 # for backward compatibility:
2684 ac_top_builddir=$ac_top_build_prefix
2685
2686 case $srcdir in
2687 .) # We are building in place.
2688 ac_srcdir=.
2689 ac_top_srcdir=$ac_top_builddir_sub
2690 ac_abs_top_srcdir=$ac_pwd ;;
2691 [\\/]* | ?:[\\/]* ) # Absolute name.
2692 ac_srcdir=$srcdir$ac_dir_suffix;
2693 ac_top_srcdir=$srcdir
2694 ac_abs_top_srcdir=$srcdir ;;
2695 *) # Relative name.
2696 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2697 ac_top_srcdir=$ac_top_build_prefix$srcdir
2698 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2699 esac
2700 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2701
2702 cd "$ac_dir" || { ac_status=$?; continue; }
2703 # Check for guested configure.
2704 if test -f "$ac_srcdir/configure.gnu"; then
2705 echo &&
2706 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2707 elif test -f "$ac_srcdir/configure"; then
2708 echo &&
2709 $SHELL "$ac_srcdir/configure" --help=recursive
2710 else
2711 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2712 fi || ac_status=$?
2713 cd "$ac_pwd" || { ac_status=$?; break; }
2714 done
2715 fi
2716
2717 test -n "$ac_init_help" && exit $ac_status
2718 if $ac_init_version; then
2719 cat <<\_ACEOF
2720 libgnu configure UNUSED-VERSION
2721 generated by GNU Autoconf 2.69
2722
2723 Copyright (C) 2012 Free Software Foundation, Inc.
2724 This configure script is free software; the Free Software Foundation
2725 gives unlimited permission to copy, distribute and modify it.
2726 _ACEOF
2727 exit
2728 fi
2729
2730 ## ------------------------ ##
2731 ## Autoconf initialization. ##
2732 ## ------------------------ ##
2733
2734 # ac_fn_c_try_compile LINENO
2735 # --------------------------
2736 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2737 ac_fn_c_try_compile ()
2738 {
2739 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2740 rm -f conftest.$ac_objext
2741 if { { ac_try="$ac_compile"
2742 case "(($ac_try" in
2743 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2744 *) ac_try_echo=$ac_try;;
2745 esac
2746 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2747 $as_echo "$ac_try_echo"; } >&5
2748 (eval "$ac_compile") 2>conftest.err
2749 ac_status=$?
2750 if test -s conftest.err; then
2751 grep -v '^ *+' conftest.err >conftest.er1
2752 cat conftest.er1 >&5
2753 mv -f conftest.er1 conftest.err
2754 fi
2755 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2756 test $ac_status = 0; } && {
2757 test -z "$ac_c_werror_flag" ||
2758 test ! -s conftest.err
2759 } && test -s conftest.$ac_objext; then :
2760 ac_retval=0
2761 else
2762 $as_echo "$as_me: failed program was:" >&5
2763 sed 's/^/| /' conftest.$ac_ext >&5
2764
2765 ac_retval=1
2766 fi
2767 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2768 as_fn_set_status $ac_retval
2769
2770 } # ac_fn_c_try_compile
2771
2772 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2773 # -------------------------------------------------------
2774 # Tests whether HEADER exists and can be compiled using the include files in
2775 # INCLUDES, setting the cache variable VAR accordingly.
2776 ac_fn_c_check_header_compile ()
2777 {
2778 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2780 $as_echo_n "checking for $2... " >&6; }
2781 if eval \${$3+:} false; then :
2782 $as_echo_n "(cached) " >&6
2783 else
2784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2785 /* end confdefs.h. */
2786 $4
2787 #include <$2>
2788 _ACEOF
2789 if ac_fn_c_try_compile "$LINENO"; then :
2790 eval "$3=yes"
2791 else
2792 eval "$3=no"
2793 fi
2794 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2795 fi
2796 eval ac_res=\$$3
2797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2798 $as_echo "$ac_res" >&6; }
2799 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2800
2801 } # ac_fn_c_check_header_compile
2802
2803 # ac_fn_c_try_cpp LINENO
2804 # ----------------------
2805 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2806 ac_fn_c_try_cpp ()
2807 {
2808 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2809 if { { ac_try="$ac_cpp conftest.$ac_ext"
2810 case "(($ac_try" in
2811 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2812 *) ac_try_echo=$ac_try;;
2813 esac
2814 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2815 $as_echo "$ac_try_echo"; } >&5
2816 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2817 ac_status=$?
2818 if test -s conftest.err; then
2819 grep -v '^ *+' conftest.err >conftest.er1
2820 cat conftest.er1 >&5
2821 mv -f conftest.er1 conftest.err
2822 fi
2823 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2824 test $ac_status = 0; } > conftest.i && {
2825 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2826 test ! -s conftest.err
2827 }; then :
2828 ac_retval=0
2829 else
2830 $as_echo "$as_me: failed program was:" >&5
2831 sed 's/^/| /' conftest.$ac_ext >&5
2832
2833 ac_retval=1
2834 fi
2835 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2836 as_fn_set_status $ac_retval
2837
2838 } # ac_fn_c_try_cpp
2839
2840 # ac_fn_c_try_run LINENO
2841 # ----------------------
2842 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2843 # that executables *can* be run.
2844 ac_fn_c_try_run ()
2845 {
2846 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2847 if { { ac_try="$ac_link"
2848 case "(($ac_try" in
2849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2850 *) ac_try_echo=$ac_try;;
2851 esac
2852 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2853 $as_echo "$ac_try_echo"; } >&5
2854 (eval "$ac_link") 2>&5
2855 ac_status=$?
2856 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2857 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2858 { { case "(($ac_try" in
2859 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2860 *) ac_try_echo=$ac_try;;
2861 esac
2862 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2863 $as_echo "$ac_try_echo"; } >&5
2864 (eval "$ac_try") 2>&5
2865 ac_status=$?
2866 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2867 test $ac_status = 0; }; }; then :
2868 ac_retval=0
2869 else
2870 $as_echo "$as_me: program exited with status $ac_status" >&5
2871 $as_echo "$as_me: failed program was:" >&5
2872 sed 's/^/| /' conftest.$ac_ext >&5
2873
2874 ac_retval=$ac_status
2875 fi
2876 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2877 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2878 as_fn_set_status $ac_retval
2879
2880 } # ac_fn_c_try_run
2881
2882 # ac_fn_c_try_link LINENO
2883 # -----------------------
2884 # Try to link conftest.$ac_ext, and return whether this succeeded.
2885 ac_fn_c_try_link ()
2886 {
2887 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2888 rm -f conftest.$ac_objext conftest$ac_exeext
2889 if { { ac_try="$ac_link"
2890 case "(($ac_try" in
2891 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2892 *) ac_try_echo=$ac_try;;
2893 esac
2894 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2895 $as_echo "$ac_try_echo"; } >&5
2896 (eval "$ac_link") 2>conftest.err
2897 ac_status=$?
2898 if test -s conftest.err; then
2899 grep -v '^ *+' conftest.err >conftest.er1
2900 cat conftest.er1 >&5
2901 mv -f conftest.er1 conftest.err
2902 fi
2903 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2904 test $ac_status = 0; } && {
2905 test -z "$ac_c_werror_flag" ||
2906 test ! -s conftest.err
2907 } && test -s conftest$ac_exeext && {
2908 test "$cross_compiling" = yes ||
2909 test -x conftest$ac_exeext
2910 }; then :
2911 ac_retval=0
2912 else
2913 $as_echo "$as_me: failed program was:" >&5
2914 sed 's/^/| /' conftest.$ac_ext >&5
2915
2916 ac_retval=1
2917 fi
2918 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2919 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2920 # interfere with the next link command; also delete a directory that is
2921 # left behind by Apple's compiler. We do this before executing the actions.
2922 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2923 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2924 as_fn_set_status $ac_retval
2925
2926 } # ac_fn_c_try_link
2927
2928 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2929 # -------------------------------------------
2930 # Tests whether TYPE exists after having included INCLUDES, setting cache
2931 # variable VAR accordingly.
2932 ac_fn_c_check_type ()
2933 {
2934 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2936 $as_echo_n "checking for $2... " >&6; }
2937 if eval \${$3+:} false; then :
2938 $as_echo_n "(cached) " >&6
2939 else
2940 eval "$3=no"
2941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2942 /* end confdefs.h. */
2943 $4
2944 int
2945 main ()
2946 {
2947 if (sizeof ($2))
2948 return 0;
2949 ;
2950 return 0;
2951 }
2952 _ACEOF
2953 if ac_fn_c_try_compile "$LINENO"; then :
2954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2955 /* end confdefs.h. */
2956 $4
2957 int
2958 main ()
2959 {
2960 if (sizeof (($2)))
2961 return 0;
2962 ;
2963 return 0;
2964 }
2965 _ACEOF
2966 if ac_fn_c_try_compile "$LINENO"; then :
2967
2968 else
2969 eval "$3=yes"
2970 fi
2971 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2972 fi
2973 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2974 fi
2975 eval ac_res=\$$3
2976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2977 $as_echo "$ac_res" >&6; }
2978 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2979
2980 } # ac_fn_c_check_type
2981
2982 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2983 # -------------------------------------------------------
2984 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2985 # the include files in INCLUDES and setting the cache variable VAR
2986 # accordingly.
2987 ac_fn_c_check_header_mongrel ()
2988 {
2989 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2990 if eval \${$3+:} false; then :
2991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2992 $as_echo_n "checking for $2... " >&6; }
2993 if eval \${$3+:} false; then :
2994 $as_echo_n "(cached) " >&6
2995 fi
2996 eval ac_res=\$$3
2997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2998 $as_echo "$ac_res" >&6; }
2999 else
3000 # Is the header compilable?
3001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
3002 $as_echo_n "checking $2 usability... " >&6; }
3003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3004 /* end confdefs.h. */
3005 $4
3006 #include <$2>
3007 _ACEOF
3008 if ac_fn_c_try_compile "$LINENO"; then :
3009 ac_header_compiler=yes
3010 else
3011 ac_header_compiler=no
3012 fi
3013 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
3015 $as_echo "$ac_header_compiler" >&6; }
3016
3017 # Is the header present?
3018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
3019 $as_echo_n "checking $2 presence... " >&6; }
3020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3021 /* end confdefs.h. */
3022 #include <$2>
3023 _ACEOF
3024 if ac_fn_c_try_cpp "$LINENO"; then :
3025 ac_header_preproc=yes
3026 else
3027 ac_header_preproc=no
3028 fi
3029 rm -f conftest.err conftest.i conftest.$ac_ext
3030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
3031 $as_echo "$ac_header_preproc" >&6; }
3032
3033 # So? What about this header?
3034 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
3035 yes:no: )
3036 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
3037 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
3038 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
3039 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
3040 ;;
3041 no:yes:* )
3042 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
3043 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
3044 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
3045 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
3046 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
3047 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
3048 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
3049 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
3050 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
3051 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
3052 ;;
3053 esac
3054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3055 $as_echo_n "checking for $2... " >&6; }
3056 if eval \${$3+:} false; then :
3057 $as_echo_n "(cached) " >&6
3058 else
3059 eval "$3=\$ac_header_compiler"
3060 fi
3061 eval ac_res=\$$3
3062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3063 $as_echo "$ac_res" >&6; }
3064 fi
3065 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3066
3067 } # ac_fn_c_check_header_mongrel
3068
3069 # ac_fn_c_check_func LINENO FUNC VAR
3070 # ----------------------------------
3071 # Tests whether FUNC exists, setting the cache variable VAR accordingly
3072 ac_fn_c_check_func ()
3073 {
3074 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3076 $as_echo_n "checking for $2... " >&6; }
3077 if eval \${$3+:} false; then :
3078 $as_echo_n "(cached) " >&6
3079 else
3080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3081 /* end confdefs.h. */
3082 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
3083 For example, HP-UX 11i <limits.h> declares gettimeofday. */
3084 #define $2 innocuous_$2
3085
3086 /* System header to define __stub macros and hopefully few prototypes,
3087 which can conflict with char $2 (); below.
3088 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3089 <limits.h> exists even on freestanding compilers. */
3090
3091 #ifdef __STDC__
3092 # include <limits.h>
3093 #else
3094 # include <assert.h>
3095 #endif
3096
3097 #undef $2
3098
3099 /* Override any GCC internal prototype to avoid an error.
3100 Use char because int might match the return type of a GCC
3101 builtin and then its argument prototype would still apply. */
3102 #ifdef __cplusplus
3103 extern "C"
3104 #endif
3105 char $2 ();
3106 /* The GNU C library defines this for functions which it implements
3107 to always fail with ENOSYS. Some functions are actually named
3108 something starting with __ and the normal name is an alias. */
3109 #if defined __stub_$2 || defined __stub___$2
3110 choke me
3111 #endif
3112
3113 int
3114 main ()
3115 {
3116 return $2 ();
3117 ;
3118 return 0;
3119 }
3120 _ACEOF
3121 if ac_fn_c_try_link "$LINENO"; then :
3122 eval "$3=yes"
3123 else
3124 eval "$3=no"
3125 fi
3126 rm -f core conftest.err conftest.$ac_objext \
3127 conftest$ac_exeext conftest.$ac_ext
3128 fi
3129 eval ac_res=\$$3
3130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3131 $as_echo "$ac_res" >&6; }
3132 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3133
3134 } # ac_fn_c_check_func
3135
3136 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
3137 # ---------------------------------------------
3138 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
3139 # accordingly.
3140 ac_fn_c_check_decl ()
3141 {
3142 ac_save_ac_compile="$ac_compile"
3143 if test -n "$ac_compile_for_check_decl"; then
3144 ac_compile="$ac_compile_for_check_decl"
3145 fi
3146 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3147 as_decl_name=`echo $2|sed 's/ *(.*//'`
3148 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
3149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
3150 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
3151 if eval \${$3+:} false; then :
3152 $as_echo_n "(cached) " >&6
3153 else
3154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3155 /* end confdefs.h. */
3156 $4
3157 int
3158 main ()
3159 {
3160 #ifndef $as_decl_name
3161 #ifdef __cplusplus
3162 (void) $as_decl_use;
3163 #else
3164 (void) $as_decl_name;
3165 #endif
3166 #endif
3167
3168 ;
3169 return 0;
3170 }
3171 _ACEOF
3172 if ac_fn_c_try_compile "$LINENO"; then :
3173 eval "$3=yes"
3174 else
3175 eval "$3=no"
3176 fi
3177 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3178 fi
3179 eval ac_res=\$$3
3180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3181 $as_echo "$ac_res" >&6; }
3182 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3183 ac_compile="$ac_save_ac_compile"
3184
3185 } # ac_fn_c_check_decl
3186
3187 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
3188 # --------------------------------------------
3189 # Tries to find the compile-time value of EXPR in a program that includes
3190 # INCLUDES, setting VAR accordingly. Returns whether the value could be
3191 # computed
3192 ac_fn_c_compute_int ()
3193 {
3194 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3195 if test "$cross_compiling" = yes; then
3196 # Depending upon the size, compute the lo and hi bounds.
3197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3198 /* end confdefs.h. */
3199 $4
3200 int
3201 main ()
3202 {
3203 static int test_array [1 - 2 * !(($2) >= 0)];
3204 test_array [0] = 0;
3205 return test_array [0];
3206
3207 ;
3208 return 0;
3209 }
3210 _ACEOF
3211 if ac_fn_c_try_compile "$LINENO"; then :
3212 ac_lo=0 ac_mid=0
3213 while :; do
3214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3215 /* end confdefs.h. */
3216 $4
3217 int
3218 main ()
3219 {
3220 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3221 test_array [0] = 0;
3222 return test_array [0];
3223
3224 ;
3225 return 0;
3226 }
3227 _ACEOF
3228 if ac_fn_c_try_compile "$LINENO"; then :
3229 ac_hi=$ac_mid; break
3230 else
3231 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
3232 if test $ac_lo -le $ac_mid; then
3233 ac_lo= ac_hi=
3234 break
3235 fi
3236 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
3237 fi
3238 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3239 done
3240 else
3241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3242 /* end confdefs.h. */
3243 $4
3244 int
3245 main ()
3246 {
3247 static int test_array [1 - 2 * !(($2) < 0)];
3248 test_array [0] = 0;
3249 return test_array [0];
3250
3251 ;
3252 return 0;
3253 }
3254 _ACEOF
3255 if ac_fn_c_try_compile "$LINENO"; then :
3256 ac_hi=-1 ac_mid=-1
3257 while :; do
3258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3259 /* end confdefs.h. */
3260 $4
3261 int
3262 main ()
3263 {
3264 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
3265 test_array [0] = 0;
3266 return test_array [0];
3267
3268 ;
3269 return 0;
3270 }
3271 _ACEOF
3272 if ac_fn_c_try_compile "$LINENO"; then :
3273 ac_lo=$ac_mid; break
3274 else
3275 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
3276 if test $ac_mid -le $ac_hi; then
3277 ac_lo= ac_hi=
3278 break
3279 fi
3280 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
3281 fi
3282 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3283 done
3284 else
3285 ac_lo= ac_hi=
3286 fi
3287 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3288 fi
3289 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3290 # Binary search between lo and hi bounds.
3291 while test "x$ac_lo" != "x$ac_hi"; do
3292 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
3293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3294 /* end confdefs.h. */
3295 $4
3296 int
3297 main ()
3298 {
3299 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3300 test_array [0] = 0;
3301 return test_array [0];
3302
3303 ;
3304 return 0;
3305 }
3306 _ACEOF
3307 if ac_fn_c_try_compile "$LINENO"; then :
3308 ac_hi=$ac_mid
3309 else
3310 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
3311 fi
3312 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3313 done
3314 case $ac_lo in #((
3315 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
3316 '') ac_retval=1 ;;
3317 esac
3318 else
3319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3320 /* end confdefs.h. */
3321 $4
3322 static long int longval () { return $2; }
3323 static unsigned long int ulongval () { return $2; }
3324 #include <stdio.h>
3325 #include <stdlib.h>
3326 int
3327 main ()
3328 {
3329
3330 FILE *f = fopen ("conftest.val", "w");
3331 if (! f)
3332 return 1;
3333 if (($2) < 0)
3334 {
3335 long int i = longval ();
3336 if (i != ($2))
3337 return 1;
3338 fprintf (f, "%ld", i);
3339 }
3340 else
3341 {
3342 unsigned long int i = ulongval ();
3343 if (i != ($2))
3344 return 1;
3345 fprintf (f, "%lu", i);
3346 }
3347 /* Do not output a trailing newline, as this causes \r\n confusion
3348 on some platforms. */
3349 return ferror (f) || fclose (f) != 0;
3350
3351 ;
3352 return 0;
3353 }
3354 _ACEOF
3355 if ac_fn_c_try_run "$LINENO"; then :
3356 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
3357 else
3358 ac_retval=1
3359 fi
3360 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3361 conftest.$ac_objext conftest.beam conftest.$ac_ext
3362 rm -f conftest.val
3363
3364 fi
3365 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3366 as_fn_set_status $ac_retval
3367
3368 } # ac_fn_c_compute_int
3369
3370 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
3371 # ----------------------------------------------------
3372 # Tries to find if the field MEMBER exists in type AGGR, after including
3373 # INCLUDES, setting cache variable VAR accordingly.
3374 ac_fn_c_check_member ()
3375 {
3376 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
3378 $as_echo_n "checking for $2.$3... " >&6; }
3379 if eval \${$4+:} false; then :
3380 $as_echo_n "(cached) " >&6
3381 else
3382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3383 /* end confdefs.h. */
3384 $5
3385 int
3386 main ()
3387 {
3388 static $2 ac_aggr;
3389 if (ac_aggr.$3)
3390 return 0;
3391 ;
3392 return 0;
3393 }
3394 _ACEOF
3395 if ac_fn_c_try_compile "$LINENO"; then :
3396 eval "$4=yes"
3397 else
3398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3399 /* end confdefs.h. */
3400 $5
3401 int
3402 main ()
3403 {
3404 static $2 ac_aggr;
3405 if (sizeof ac_aggr.$3)
3406 return 0;
3407 ;
3408 return 0;
3409 }
3410 _ACEOF
3411 if ac_fn_c_try_compile "$LINENO"; then :
3412 eval "$4=yes"
3413 else
3414 eval "$4=no"
3415 fi
3416 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3417 fi
3418 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3419 fi
3420 eval ac_res=\$$4
3421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3422 $as_echo "$ac_res" >&6; }
3423 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3424
3425 } # ac_fn_c_check_member
3426 cat >config.log <<_ACEOF
3427 This file contains any messages produced by compilers while
3428 running configure, to aid debugging if configure makes a mistake.
3429
3430 It was created by libgnu $as_me UNUSED-VERSION, which was
3431 generated by GNU Autoconf 2.69. Invocation command line was
3432
3433 $ $0 $@
3434
3435 _ACEOF
3436 exec 5>>config.log
3437 {
3438 cat <<_ASUNAME
3439 ## --------- ##
3440 ## Platform. ##
3441 ## --------- ##
3442
3443 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3444 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3445 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3446 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3447 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3448
3449 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3450 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
3451
3452 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
3453 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
3454 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3455 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
3456 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
3457 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
3458 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
3459
3460 _ASUNAME
3461
3462 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3463 for as_dir in $PATH
3464 do
3465 IFS=$as_save_IFS
3466 test -z "$as_dir" && as_dir=.
3467 $as_echo "PATH: $as_dir"
3468 done
3469 IFS=$as_save_IFS
3470
3471 } >&5
3472
3473 cat >&5 <<_ACEOF
3474
3475
3476 ## ----------- ##
3477 ## Core tests. ##
3478 ## ----------- ##
3479
3480 _ACEOF
3481
3482
3483 # Keep a trace of the command line.
3484 # Strip out --no-create and --no-recursion so they do not pile up.
3485 # Strip out --silent because we don't want to record it for future runs.
3486 # Also quote any args containing shell meta-characters.
3487 # Make two passes to allow for proper duplicate-argument suppression.
3488 ac_configure_args=
3489 ac_configure_args0=
3490 ac_configure_args1=
3491 ac_must_keep_next=false
3492 for ac_pass in 1 2
3493 do
3494 for ac_arg
3495 do
3496 case $ac_arg in
3497 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3498 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3499 | -silent | --silent | --silen | --sile | --sil)
3500 continue ;;
3501 *\'*)
3502 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3503 esac
3504 case $ac_pass in
3505 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3506 2)
3507 as_fn_append ac_configure_args1 " '$ac_arg'"
3508 if test $ac_must_keep_next = true; then
3509 ac_must_keep_next=false # Got value, back to normal.
3510 else
3511 case $ac_arg in
3512 *=* | --config-cache | -C | -disable-* | --disable-* \
3513 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3514 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3515 | -with-* | --with-* | -without-* | --without-* | --x)
3516 case "$ac_configure_args0 " in
3517 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3518 esac
3519 ;;
3520 -* ) ac_must_keep_next=true ;;
3521 esac
3522 fi
3523 as_fn_append ac_configure_args " '$ac_arg'"
3524 ;;
3525 esac
3526 done
3527 done
3528 { ac_configure_args0=; unset ac_configure_args0;}
3529 { ac_configure_args1=; unset ac_configure_args1;}
3530
3531 # When interrupted or exit'd, cleanup temporary files, and complete
3532 # config.log. We remove comments because anyway the quotes in there
3533 # would cause problems or look ugly.
3534 # WARNING: Use '\'' to represent an apostrophe within the trap.
3535 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3536 trap 'exit_status=$?
3537 # Save into config.log some information that might help in debugging.
3538 {
3539 echo
3540
3541 $as_echo "## ---------------- ##
3542 ## Cache variables. ##
3543 ## ---------------- ##"
3544 echo
3545 # The following way of writing the cache mishandles newlines in values,
3546 (
3547 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3548 eval ac_val=\$$ac_var
3549 case $ac_val in #(
3550 *${as_nl}*)
3551 case $ac_var in #(
3552 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3553 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3554 esac
3555 case $ac_var in #(
3556 _ | IFS | as_nl) ;; #(
3557 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3558 *) { eval $ac_var=; unset $ac_var;} ;;
3559 esac ;;
3560 esac
3561 done
3562 (set) 2>&1 |
3563 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3564 *${as_nl}ac_space=\ *)
3565 sed -n \
3566 "s/'\''/'\''\\\\'\'''\''/g;
3567 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3568 ;; #(
3569 *)
3570 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3571 ;;
3572 esac |
3573 sort
3574 )
3575 echo
3576
3577 $as_echo "## ----------------- ##
3578 ## Output variables. ##
3579 ## ----------------- ##"
3580 echo
3581 for ac_var in $ac_subst_vars
3582 do
3583 eval ac_val=\$$ac_var
3584 case $ac_val in
3585 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3586 esac
3587 $as_echo "$ac_var='\''$ac_val'\''"
3588 done | sort
3589 echo
3590
3591 if test -n "$ac_subst_files"; then
3592 $as_echo "## ------------------- ##
3593 ## File substitutions. ##
3594 ## ------------------- ##"
3595 echo
3596 for ac_var in $ac_subst_files
3597 do
3598 eval ac_val=\$$ac_var
3599 case $ac_val in
3600 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3601 esac
3602 $as_echo "$ac_var='\''$ac_val'\''"
3603 done | sort
3604 echo
3605 fi
3606
3607 if test -s confdefs.h; then
3608 $as_echo "## ----------- ##
3609 ## confdefs.h. ##
3610 ## ----------- ##"
3611 echo
3612 cat confdefs.h
3613 echo
3614 fi
3615 test "$ac_signal" != 0 &&
3616 $as_echo "$as_me: caught signal $ac_signal"
3617 $as_echo "$as_me: exit $exit_status"
3618 } >&5
3619 rm -f core *.core core.conftest.* &&
3620 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3621 exit $exit_status
3622 ' 0
3623 for ac_signal in 1 2 13 15; do
3624 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3625 done
3626 ac_signal=0
3627
3628 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3629 rm -f -r conftest* confdefs.h
3630
3631 $as_echo "/* confdefs.h */" > confdefs.h
3632
3633 # Predefined preprocessor variables.
3634
3635 cat >>confdefs.h <<_ACEOF
3636 #define PACKAGE_NAME "$PACKAGE_NAME"
3637 _ACEOF
3638
3639 cat >>confdefs.h <<_ACEOF
3640 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3641 _ACEOF
3642
3643 cat >>confdefs.h <<_ACEOF
3644 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3645 _ACEOF
3646
3647 cat >>confdefs.h <<_ACEOF
3648 #define PACKAGE_STRING "$PACKAGE_STRING"
3649 _ACEOF
3650
3651 cat >>confdefs.h <<_ACEOF
3652 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3653 _ACEOF
3654
3655 cat >>confdefs.h <<_ACEOF
3656 #define PACKAGE_URL "$PACKAGE_URL"
3657 _ACEOF
3658
3659
3660 # Let the site file select an alternate cache file if it wants to.
3661 # Prefer an explicitly selected file to automatically selected ones.
3662 ac_site_file1=NONE
3663 ac_site_file2=NONE
3664 if test -n "$CONFIG_SITE"; then
3665 # We do not want a PATH search for config.site.
3666 case $CONFIG_SITE in #((
3667 -*) ac_site_file1=./$CONFIG_SITE;;
3668 */*) ac_site_file1=$CONFIG_SITE;;
3669 *) ac_site_file1=./$CONFIG_SITE;;
3670 esac
3671 elif test "x$prefix" != xNONE; then
3672 ac_site_file1=$prefix/share/config.site
3673 ac_site_file2=$prefix/etc/config.site
3674 else
3675 ac_site_file1=$ac_default_prefix/share/config.site
3676 ac_site_file2=$ac_default_prefix/etc/config.site
3677 fi
3678 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3679 do
3680 test "x$ac_site_file" = xNONE && continue
3681 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3682 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3683 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3684 sed 's/^/| /' "$ac_site_file" >&5
3685 . "$ac_site_file" \
3686 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3687 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3688 as_fn_error $? "failed to load site script $ac_site_file
3689 See \`config.log' for more details" "$LINENO" 5; }
3690 fi
3691 done
3692
3693 if test -r "$cache_file"; then
3694 # Some versions of bash will fail to source /dev/null (special files
3695 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
3696 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3697 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3698 $as_echo "$as_me: loading cache $cache_file" >&6;}
3699 case $cache_file in
3700 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3701 *) . "./$cache_file";;
3702 esac
3703 fi
3704 else
3705 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3706 $as_echo "$as_me: creating cache $cache_file" >&6;}
3707 >$cache_file
3708 fi
3709
3710 as_fn_append ac_header_list " wchar.h"
3711 as_fn_append ac_header_list " minix/config.h"
3712 as_fn_append ac_header_list " arpa/inet.h"
3713 as_fn_append ac_header_list " features.h"
3714 as_fn_append ac_header_list " sys/socket.h"
3715 as_fn_append ac_func_list " btowc"
3716 as_fn_append ac_func_list " canonicalize_file_name"
3717 as_fn_append ac_func_list " faccessat"
3718 as_fn_append ac_func_list " realpath"
3719 as_fn_append ac_header_list " sys/param.h"
3720 as_fn_append ac_header_list " unistd.h"
3721 as_fn_append ac_func_list " _set_invalid_parameter_handler"
3722 as_fn_append ac_func_list " fchdir"
3723 as_fn_append ac_header_list " dirent.h"
3724 as_fn_append ac_func_list " fcntl"
3725 as_fn_append ac_func_list " symlink"
3726 as_fn_append ac_func_list " fdopendir"
3727 as_fn_append ac_func_list " mempcpy"
3728 as_fn_append ac_header_list " fnmatch.h"
3729 as_fn_append ac_func_list " fnmatch"
3730 as_fn_append ac_func_list " mbsrtowcs"
3731 gl_fnmatch_required=GNU
3732 as_fn_append ac_header_list " sys/stat.h"
3733 as_fn_append ac_func_list " fstatat"
3734 as_fn_append ac_func_list " getdelim"
3735 as_fn_append ac_func_list " getdtablesize"
3736 as_fn_append ac_func_list " getlogin_r"
3737 as_fn_append ac_func_list " getprogname"
3738 as_fn_append ac_func_list " getexecname"
3739 as_fn_append ac_func_list " getrandom"
3740 as_fn_append ac_header_list " sys/time.h"
3741 as_fn_append ac_func_list " gettimeofday"
3742 as_fn_append ac_header_list " glob.h"
3743 as_fn_append ac_func_list " glob"
3744 as_fn_append ac_func_list " glob_pattern_p"
3745 as_fn_append ac_func_list " getpwnam_r"
3746 as_fn_append ac_header_list " threads.h"
3747 as_fn_append ac_header_list " netdb.h"
3748 as_fn_append ac_header_list " netinet/in.h"
3749 as_fn_append ac_header_list " limits.h"
3750 as_fn_append ac_header_list " inttypes.h"
3751 as_fn_append ac_header_list " sys/types.h"
3752 as_fn_append ac_header_list " stdint.h"
3753 as_fn_append ac_func_list " isblank"
3754 as_fn_append ac_header_list " xlocale.h"
3755 as_fn_append ac_func_list " lstat"
3756 as_fn_append ac_header_list " math.h"
3757 as_fn_append ac_func_list " mbsinit"
3758 as_fn_append ac_func_list " mbrtowc"
3759 as_fn_append ac_header_list " sys/mman.h"
3760 as_fn_append ac_func_list " mprotect"
3761 as_fn_append ac_func_list " mkostemp"
3762 as_fn_append ac_func_list " openat"
3763 as_fn_append ac_func_list " pipe"
3764 as_fn_append ac_func_list " readlink"
3765 as_fn_append ac_func_list " link"
3766 as_fn_append ac_func_list " setenv"
3767 as_fn_append ac_func_list " strerror_r"
3768 as_fn_append ac_func_list " __xpg_strerror_r"
3769 as_fn_append ac_func_list " catgets"
3770 as_fn_append ac_func_list " snprintf"
3771 as_fn_append ac_header_list " sys/random.h"
3772 as_fn_append ac_header_list " sys/uio.h"
3773 as_fn_append ac_func_list " localtime_r"
3774 as_fn_append ac_header_list " crtdefs.h"
3775 as_fn_append ac_func_list " iswcntrl"
3776 as_fn_append ac_header_list " wctype.h"
3777 as_fn_append ac_func_list " wmempcpy"
3778 # Check that the precious variables saved in the cache have kept the same
3779 # value.
3780 ac_cache_corrupted=false
3781 for ac_var in $ac_precious_vars; do
3782 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3783 eval ac_new_set=\$ac_env_${ac_var}_set
3784 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3785 eval ac_new_val=\$ac_env_${ac_var}_value
3786 case $ac_old_set,$ac_new_set in
3787 set,)
3788 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3789 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3790 ac_cache_corrupted=: ;;
3791 ,set)
3792 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3793 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3794 ac_cache_corrupted=: ;;
3795 ,);;
3796 *)
3797 if test "x$ac_old_val" != "x$ac_new_val"; then
3798 # differences in whitespace do not lead to failure.
3799 ac_old_val_w=`echo x $ac_old_val`
3800 ac_new_val_w=`echo x $ac_new_val`
3801 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3802 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3803 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3804 ac_cache_corrupted=:
3805 else
3806 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3807 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3808 eval $ac_var=\$ac_old_val
3809 fi
3810 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3811 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3812 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3813 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
3814 fi;;
3815 esac
3816 # Pass precious variables to config.status.
3817 if test "$ac_new_set" = set; then
3818 case $ac_new_val in
3819 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3820 *) ac_arg=$ac_var=$ac_new_val ;;
3821 esac
3822 case " $ac_configure_args " in
3823 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3824 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3825 esac
3826 fi
3827 done
3828 if $ac_cache_corrupted; then
3829 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3830 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3831 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3832 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3833 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3834 fi
3835 ## -------------------- ##
3836 ## Main body of script. ##
3837 ## -------------------- ##
3838
3839 ac_ext=c
3840 ac_cpp='$CPP $CPPFLAGS'
3841 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3842 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3843 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3844
3845
3846
3847
3848
3849
3850 ac_config_headers="$ac_config_headers config.h:config.in"
3851
3852
3853
3854
3855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
3856 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
3857 # Check whether --enable-maintainer-mode was given.
3858 if test "${enable_maintainer_mode+set}" = set; then :
3859 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
3860 else
3861 USE_MAINTAINER_MODE=no
3862 fi
3863
3864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
3865 $as_echo "$USE_MAINTAINER_MODE" >&6; }
3866 if test $USE_MAINTAINER_MODE = yes; then
3867 MAINTAINER_MODE_TRUE=
3868 MAINTAINER_MODE_FALSE='#'
3869 else
3870 MAINTAINER_MODE_TRUE='#'
3871 MAINTAINER_MODE_FALSE=
3872 fi
3873
3874 MAINT=$MAINTAINER_MODE_TRUE
3875
3876
3877
3878 ac_ext=c
3879 ac_cpp='$CPP $CPPFLAGS'
3880 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3881 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3882 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3883 if test -n "$ac_tool_prefix"; then
3884 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3885 set dummy ${ac_tool_prefix}gcc; ac_word=$2
3886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3887 $as_echo_n "checking for $ac_word... " >&6; }
3888 if ${ac_cv_prog_CC+:} false; then :
3889 $as_echo_n "(cached) " >&6
3890 else
3891 if test -n "$CC"; then
3892 ac_cv_prog_CC="$CC" # Let the user override the test.
3893 else
3894 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3895 for as_dir in $PATH
3896 do
3897 IFS=$as_save_IFS
3898 test -z "$as_dir" && as_dir=.
3899 for ac_exec_ext in '' $ac_executable_extensions; do
3900 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3901 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3902 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3903 break 2
3904 fi
3905 done
3906 done
3907 IFS=$as_save_IFS
3908
3909 fi
3910 fi
3911 CC=$ac_cv_prog_CC
3912 if test -n "$CC"; then
3913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3914 $as_echo "$CC" >&6; }
3915 else
3916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3917 $as_echo "no" >&6; }
3918 fi
3919
3920
3921 fi
3922 if test -z "$ac_cv_prog_CC"; then
3923 ac_ct_CC=$CC
3924 # Extract the first word of "gcc", so it can be a program name with args.
3925 set dummy gcc; ac_word=$2
3926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3927 $as_echo_n "checking for $ac_word... " >&6; }
3928 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3929 $as_echo_n "(cached) " >&6
3930 else
3931 if test -n "$ac_ct_CC"; then
3932 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3933 else
3934 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3935 for as_dir in $PATH
3936 do
3937 IFS=$as_save_IFS
3938 test -z "$as_dir" && as_dir=.
3939 for ac_exec_ext in '' $ac_executable_extensions; do
3940 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3941 ac_cv_prog_ac_ct_CC="gcc"
3942 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3943 break 2
3944 fi
3945 done
3946 done
3947 IFS=$as_save_IFS
3948
3949 fi
3950 fi
3951 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3952 if test -n "$ac_ct_CC"; then
3953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3954 $as_echo "$ac_ct_CC" >&6; }
3955 else
3956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3957 $as_echo "no" >&6; }
3958 fi
3959
3960 if test "x$ac_ct_CC" = x; then
3961 CC=""
3962 else
3963 case $cross_compiling:$ac_tool_warned in
3964 yes:)
3965 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3966 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3967 ac_tool_warned=yes ;;
3968 esac
3969 CC=$ac_ct_CC
3970 fi
3971 else
3972 CC="$ac_cv_prog_CC"
3973 fi
3974
3975 if test -z "$CC"; then
3976 if test -n "$ac_tool_prefix"; then
3977 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3978 set dummy ${ac_tool_prefix}cc; ac_word=$2
3979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3980 $as_echo_n "checking for $ac_word... " >&6; }
3981 if ${ac_cv_prog_CC+:} false; then :
3982 $as_echo_n "(cached) " >&6
3983 else
3984 if test -n "$CC"; then
3985 ac_cv_prog_CC="$CC" # Let the user override the test.
3986 else
3987 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3988 for as_dir in $PATH
3989 do
3990 IFS=$as_save_IFS
3991 test -z "$as_dir" && as_dir=.
3992 for ac_exec_ext in '' $ac_executable_extensions; do
3993 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3994 ac_cv_prog_CC="${ac_tool_prefix}cc"
3995 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3996 break 2
3997 fi
3998 done
3999 done
4000 IFS=$as_save_IFS
4001
4002 fi
4003 fi
4004 CC=$ac_cv_prog_CC
4005 if test -n "$CC"; then
4006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4007 $as_echo "$CC" >&6; }
4008 else
4009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4010 $as_echo "no" >&6; }
4011 fi
4012
4013
4014 fi
4015 fi
4016 if test -z "$CC"; then
4017 # Extract the first word of "cc", so it can be a program name with args.
4018 set dummy cc; ac_word=$2
4019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4020 $as_echo_n "checking for $ac_word... " >&6; }
4021 if ${ac_cv_prog_CC+:} false; then :
4022 $as_echo_n "(cached) " >&6
4023 else
4024 if test -n "$CC"; then
4025 ac_cv_prog_CC="$CC" # Let the user override the test.
4026 else
4027 ac_prog_rejected=no
4028 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4029 for as_dir in $PATH
4030 do
4031 IFS=$as_save_IFS
4032 test -z "$as_dir" && as_dir=.
4033 for ac_exec_ext in '' $ac_executable_extensions; do
4034 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4035 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4036 ac_prog_rejected=yes
4037 continue
4038 fi
4039 ac_cv_prog_CC="cc"
4040 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4041 break 2
4042 fi
4043 done
4044 done
4045 IFS=$as_save_IFS
4046
4047 if test $ac_prog_rejected = yes; then
4048 # We found a bogon in the path, so make sure we never use it.
4049 set dummy $ac_cv_prog_CC
4050 shift
4051 if test $# != 0; then
4052 # We chose a different compiler from the bogus one.
4053 # However, it has the same basename, so the bogon will be chosen
4054 # first if we set CC to just the basename; use the full file name.
4055 shift
4056 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4057 fi
4058 fi
4059 fi
4060 fi
4061 CC=$ac_cv_prog_CC
4062 if test -n "$CC"; then
4063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4064 $as_echo "$CC" >&6; }
4065 else
4066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4067 $as_echo "no" >&6; }
4068 fi
4069
4070
4071 fi
4072 if test -z "$CC"; then
4073 if test -n "$ac_tool_prefix"; then
4074 for ac_prog in cl.exe
4075 do
4076 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4077 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4079 $as_echo_n "checking for $ac_word... " >&6; }
4080 if ${ac_cv_prog_CC+:} false; then :
4081 $as_echo_n "(cached) " >&6
4082 else
4083 if test -n "$CC"; then
4084 ac_cv_prog_CC="$CC" # Let the user override the test.
4085 else
4086 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4087 for as_dir in $PATH
4088 do
4089 IFS=$as_save_IFS
4090 test -z "$as_dir" && as_dir=.
4091 for ac_exec_ext in '' $ac_executable_extensions; do
4092 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4093 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4094 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4095 break 2
4096 fi
4097 done
4098 done
4099 IFS=$as_save_IFS
4100
4101 fi
4102 fi
4103 CC=$ac_cv_prog_CC
4104 if test -n "$CC"; then
4105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4106 $as_echo "$CC" >&6; }
4107 else
4108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4109 $as_echo "no" >&6; }
4110 fi
4111
4112
4113 test -n "$CC" && break
4114 done
4115 fi
4116 if test -z "$CC"; then
4117 ac_ct_CC=$CC
4118 for ac_prog in cl.exe
4119 do
4120 # Extract the first word of "$ac_prog", so it can be a program name with args.
4121 set dummy $ac_prog; ac_word=$2
4122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4123 $as_echo_n "checking for $ac_word... " >&6; }
4124 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4125 $as_echo_n "(cached) " >&6
4126 else
4127 if test -n "$ac_ct_CC"; then
4128 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4129 else
4130 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4131 for as_dir in $PATH
4132 do
4133 IFS=$as_save_IFS
4134 test -z "$as_dir" && as_dir=.
4135 for ac_exec_ext in '' $ac_executable_extensions; do
4136 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4137 ac_cv_prog_ac_ct_CC="$ac_prog"
4138 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4139 break 2
4140 fi
4141 done
4142 done
4143 IFS=$as_save_IFS
4144
4145 fi
4146 fi
4147 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4148 if test -n "$ac_ct_CC"; then
4149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4150 $as_echo "$ac_ct_CC" >&6; }
4151 else
4152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4153 $as_echo "no" >&6; }
4154 fi
4155
4156
4157 test -n "$ac_ct_CC" && break
4158 done
4159
4160 if test "x$ac_ct_CC" = x; then
4161 CC=""
4162 else
4163 case $cross_compiling:$ac_tool_warned in
4164 yes:)
4165 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4166 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4167 ac_tool_warned=yes ;;
4168 esac
4169 CC=$ac_ct_CC
4170 fi
4171 fi
4172
4173 fi
4174 if test -z "$CC"; then
4175 if test -n "$ac_tool_prefix"; then
4176 # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
4177 set dummy ${ac_tool_prefix}clang; ac_word=$2
4178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4179 $as_echo_n "checking for $ac_word... " >&6; }
4180 if ${ac_cv_prog_CC+:} false; then :
4181 $as_echo_n "(cached) " >&6
4182 else
4183 if test -n "$CC"; then
4184 ac_cv_prog_CC="$CC" # Let the user override the test.
4185 else
4186 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4187 for as_dir in $PATH
4188 do
4189 IFS=$as_save_IFS
4190 test -z "$as_dir" && as_dir=.
4191 for ac_exec_ext in '' $ac_executable_extensions; do
4192 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4193 ac_cv_prog_CC="${ac_tool_prefix}clang"
4194 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4195 break 2
4196 fi
4197 done
4198 done
4199 IFS=$as_save_IFS
4200
4201 fi
4202 fi
4203 CC=$ac_cv_prog_CC
4204 if test -n "$CC"; then
4205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4206 $as_echo "$CC" >&6; }
4207 else
4208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4209 $as_echo "no" >&6; }
4210 fi
4211
4212
4213 fi
4214 if test -z "$ac_cv_prog_CC"; then
4215 ac_ct_CC=$CC
4216 # Extract the first word of "clang", so it can be a program name with args.
4217 set dummy clang; ac_word=$2
4218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4219 $as_echo_n "checking for $ac_word... " >&6; }
4220 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4221 $as_echo_n "(cached) " >&6
4222 else
4223 if test -n "$ac_ct_CC"; then
4224 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4225 else
4226 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4227 for as_dir in $PATH
4228 do
4229 IFS=$as_save_IFS
4230 test -z "$as_dir" && as_dir=.
4231 for ac_exec_ext in '' $ac_executable_extensions; do
4232 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4233 ac_cv_prog_ac_ct_CC="clang"
4234 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4235 break 2
4236 fi
4237 done
4238 done
4239 IFS=$as_save_IFS
4240
4241 fi
4242 fi
4243 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4244 if test -n "$ac_ct_CC"; then
4245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4246 $as_echo "$ac_ct_CC" >&6; }
4247 else
4248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4249 $as_echo "no" >&6; }
4250 fi
4251
4252 if test "x$ac_ct_CC" = x; then
4253 CC=""
4254 else
4255 case $cross_compiling:$ac_tool_warned in
4256 yes:)
4257 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4258 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4259 ac_tool_warned=yes ;;
4260 esac
4261 CC=$ac_ct_CC
4262 fi
4263 else
4264 CC="$ac_cv_prog_CC"
4265 fi
4266
4267 fi
4268
4269
4270 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4271 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4272 as_fn_error $? "no acceptable C compiler found in \$PATH
4273 See \`config.log' for more details" "$LINENO" 5; }
4274
4275 # Provide some information about the compiler.
4276 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4277 set X $ac_compile
4278 ac_compiler=$2
4279 for ac_option in --version -v -V -qversion -version; do
4280 { { ac_try="$ac_compiler $ac_option >&5"
4281 case "(($ac_try" in
4282 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4283 *) ac_try_echo=$ac_try;;
4284 esac
4285 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4286 $as_echo "$ac_try_echo"; } >&5
4287 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4288 ac_status=$?
4289 if test -s conftest.err; then
4290 sed '10a\
4291 ... rest of stderr output deleted ...
4292 10q' conftest.err >conftest.er1
4293 cat conftest.er1 >&5
4294 fi
4295 rm -f conftest.er1 conftest.err
4296 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4297 test $ac_status = 0; }
4298 done
4299
4300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4301 /* end confdefs.h. */
4302
4303 int
4304 main ()
4305 {
4306
4307 ;
4308 return 0;
4309 }
4310 _ACEOF
4311 ac_clean_files_save=$ac_clean_files
4312 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4313 # Try to create an executable without -o first, disregard a.out.
4314 # It will help us diagnose broken compilers, and finding out an intuition
4315 # of exeext.
4316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4317 $as_echo_n "checking whether the C compiler works... " >&6; }
4318 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4319
4320 # The possible output files:
4321 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4322
4323 ac_rmfiles=
4324 for ac_file in $ac_files
4325 do
4326 case $ac_file in
4327 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4328 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4329 esac
4330 done
4331 rm -f $ac_rmfiles
4332
4333 if { { ac_try="$ac_link_default"
4334 case "(($ac_try" in
4335 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4336 *) ac_try_echo=$ac_try;;
4337 esac
4338 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4339 $as_echo "$ac_try_echo"; } >&5
4340 (eval "$ac_link_default") 2>&5
4341 ac_status=$?
4342 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4343 test $ac_status = 0; }; then :
4344 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4345 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4346 # in a Makefile. We should not override ac_cv_exeext if it was cached,
4347 # so that the user can short-circuit this test for compilers unknown to
4348 # Autoconf.
4349 for ac_file in $ac_files ''
4350 do
4351 test -f "$ac_file" || continue
4352 case $ac_file in
4353 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4354 ;;
4355 [ab].out )
4356 # We found the default executable, but exeext='' is most
4357 # certainly right.
4358 break;;
4359 *.* )
4360 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4361 then :; else
4362 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4363 fi
4364 # We set ac_cv_exeext here because the later test for it is not
4365 # safe: cross compilers may not add the suffix if given an `-o'
4366 # argument, so we may need to know it at that point already.
4367 # Even if this section looks crufty: it has the advantage of
4368 # actually working.
4369 break;;
4370 * )
4371 break;;
4372 esac
4373 done
4374 test "$ac_cv_exeext" = no && ac_cv_exeext=
4375
4376 else
4377 ac_file=''
4378 fi
4379 if test -z "$ac_file"; then :
4380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4381 $as_echo "no" >&6; }
4382 $as_echo "$as_me: failed program was:" >&5
4383 sed 's/^/| /' conftest.$ac_ext >&5
4384
4385 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4386 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4387 as_fn_error 77 "C compiler cannot create executables
4388 See \`config.log' for more details" "$LINENO" 5; }
4389 else
4390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4391 $as_echo "yes" >&6; }
4392 fi
4393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4394 $as_echo_n "checking for C compiler default output file name... " >&6; }
4395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4396 $as_echo "$ac_file" >&6; }
4397 ac_exeext=$ac_cv_exeext
4398
4399 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4400 ac_clean_files=$ac_clean_files_save
4401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4402 $as_echo_n "checking for suffix of executables... " >&6; }
4403 if { { ac_try="$ac_link"
4404 case "(($ac_try" in
4405 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4406 *) ac_try_echo=$ac_try;;
4407 esac
4408 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4409 $as_echo "$ac_try_echo"; } >&5
4410 (eval "$ac_link") 2>&5
4411 ac_status=$?
4412 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4413 test $ac_status = 0; }; then :
4414 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4415 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4416 # work properly (i.e., refer to `conftest.exe'), while it won't with
4417 # `rm'.
4418 for ac_file in conftest.exe conftest conftest.*; do
4419 test -f "$ac_file" || continue
4420 case $ac_file in
4421 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4422 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4423 break;;
4424 * ) break;;
4425 esac
4426 done
4427 else
4428 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4429 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4430 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4431 See \`config.log' for more details" "$LINENO" 5; }
4432 fi
4433 rm -f conftest conftest$ac_cv_exeext
4434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4435 $as_echo "$ac_cv_exeext" >&6; }
4436
4437 rm -f conftest.$ac_ext
4438 EXEEXT=$ac_cv_exeext
4439 ac_exeext=$EXEEXT
4440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4441 /* end confdefs.h. */
4442 #include <stdio.h>
4443 int
4444 main ()
4445 {
4446 FILE *f = fopen ("conftest.out", "w");
4447 return ferror (f) || fclose (f) != 0;
4448
4449 ;
4450 return 0;
4451 }
4452 _ACEOF
4453 ac_clean_files="$ac_clean_files conftest.out"
4454 # Check that the compiler produces executables we can run. If not, either
4455 # the compiler is broken, or we cross compile.
4456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4457 $as_echo_n "checking whether we are cross compiling... " >&6; }
4458 if test "$cross_compiling" != yes; then
4459 { { ac_try="$ac_link"
4460 case "(($ac_try" in
4461 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4462 *) ac_try_echo=$ac_try;;
4463 esac
4464 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4465 $as_echo "$ac_try_echo"; } >&5
4466 (eval "$ac_link") 2>&5
4467 ac_status=$?
4468 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4469 test $ac_status = 0; }
4470 if { ac_try='./conftest$ac_cv_exeext'
4471 { { case "(($ac_try" in
4472 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4473 *) ac_try_echo=$ac_try;;
4474 esac
4475 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4476 $as_echo "$ac_try_echo"; } >&5
4477 (eval "$ac_try") 2>&5
4478 ac_status=$?
4479 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4480 test $ac_status = 0; }; }; then
4481 cross_compiling=no
4482 else
4483 if test "$cross_compiling" = maybe; then
4484 cross_compiling=yes
4485 else
4486 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4487 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4488 as_fn_error $? "cannot run C compiled programs.
4489 If you meant to cross compile, use \`--host'.
4490 See \`config.log' for more details" "$LINENO" 5; }
4491 fi
4492 fi
4493 fi
4494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4495 $as_echo "$cross_compiling" >&6; }
4496
4497 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4498 ac_clean_files=$ac_clean_files_save
4499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4500 $as_echo_n "checking for suffix of object files... " >&6; }
4501 if ${ac_cv_objext+:} false; then :
4502 $as_echo_n "(cached) " >&6
4503 else
4504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4505 /* end confdefs.h. */
4506
4507 int
4508 main ()
4509 {
4510
4511 ;
4512 return 0;
4513 }
4514 _ACEOF
4515 rm -f conftest.o conftest.obj
4516 if { { ac_try="$ac_compile"
4517 case "(($ac_try" in
4518 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4519 *) ac_try_echo=$ac_try;;
4520 esac
4521 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4522 $as_echo "$ac_try_echo"; } >&5
4523 (eval "$ac_compile") 2>&5
4524 ac_status=$?
4525 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4526 test $ac_status = 0; }; then :
4527 for ac_file in conftest.o conftest.obj conftest.*; do
4528 test -f "$ac_file" || continue;
4529 case $ac_file in
4530 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4531 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4532 break;;
4533 esac
4534 done
4535 else
4536 $as_echo "$as_me: failed program was:" >&5
4537 sed 's/^/| /' conftest.$ac_ext >&5
4538
4539 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4540 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4541 as_fn_error $? "cannot compute suffix of object files: cannot compile
4542 See \`config.log' for more details" "$LINENO" 5; }
4543 fi
4544 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4545 fi
4546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4547 $as_echo "$ac_cv_objext" >&6; }
4548 OBJEXT=$ac_cv_objext
4549 ac_objext=$OBJEXT
4550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4551 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4552 if ${ac_cv_c_compiler_gnu+:} false; then :
4553 $as_echo_n "(cached) " >&6
4554 else
4555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4556 /* end confdefs.h. */
4557
4558 int
4559 main ()
4560 {
4561 #ifndef __GNUC__
4562 choke me
4563 #endif
4564
4565 ;
4566 return 0;
4567 }
4568 _ACEOF
4569 if ac_fn_c_try_compile "$LINENO"; then :
4570 ac_compiler_gnu=yes
4571 else
4572 ac_compiler_gnu=no
4573 fi
4574 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4575 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4576
4577 fi
4578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4579 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4580 if test $ac_compiler_gnu = yes; then
4581 GCC=yes
4582 else
4583 GCC=
4584 fi
4585 ac_test_CFLAGS=${CFLAGS+set}
4586 ac_save_CFLAGS=$CFLAGS
4587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4588 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4589 if ${ac_cv_prog_cc_g+:} false; then :
4590 $as_echo_n "(cached) " >&6
4591 else
4592 ac_save_c_werror_flag=$ac_c_werror_flag
4593 ac_c_werror_flag=yes
4594 ac_cv_prog_cc_g=no
4595 CFLAGS="-g"
4596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4597 /* end confdefs.h. */
4598
4599 int
4600 main ()
4601 {
4602
4603 ;
4604 return 0;
4605 }
4606 _ACEOF
4607 if ac_fn_c_try_compile "$LINENO"; then :
4608 ac_cv_prog_cc_g=yes
4609 else
4610 CFLAGS=""
4611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4612 /* end confdefs.h. */
4613
4614 int
4615 main ()
4616 {
4617
4618 ;
4619 return 0;
4620 }
4621 _ACEOF
4622 if ac_fn_c_try_compile "$LINENO"; then :
4623
4624 else
4625 ac_c_werror_flag=$ac_save_c_werror_flag
4626 CFLAGS="-g"
4627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4628 /* end confdefs.h. */
4629
4630 int
4631 main ()
4632 {
4633
4634 ;
4635 return 0;
4636 }
4637 _ACEOF
4638 if ac_fn_c_try_compile "$LINENO"; then :
4639 ac_cv_prog_cc_g=yes
4640 fi
4641 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4642 fi
4643 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4644 fi
4645 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4646 ac_c_werror_flag=$ac_save_c_werror_flag
4647 fi
4648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4649 $as_echo "$ac_cv_prog_cc_g" >&6; }
4650 if test "$ac_test_CFLAGS" = set; then
4651 CFLAGS=$ac_save_CFLAGS
4652 elif test $ac_cv_prog_cc_g = yes; then
4653 if test "$GCC" = yes; then
4654 CFLAGS="-g -O2"
4655 else
4656 CFLAGS="-g"
4657 fi
4658 else
4659 if test "$GCC" = yes; then
4660 CFLAGS="-O2"
4661 else
4662 CFLAGS=
4663 fi
4664 fi
4665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
4666 $as_echo_n "checking for $CC option to enable C11 features... " >&6; }
4667 if ${ac_cv_prog_cc_c11+:} false; then :
4668 $as_echo_n "(cached) " >&6
4669 else
4670 ac_cv_prog_cc_c11=no
4671 ac_save_CC=$CC
4672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4673 /* end confdefs.h. */
4674 #include <stdarg.h>
4675 #include <stdbool.h>
4676 #include <stddef.h>
4677 #include <stdlib.h>
4678 #include <wchar.h>
4679 #include <stdio.h>
4680
4681 // Check varargs macros. These examples are taken from C99 6.10.3.5.
4682 #define debug(...) fprintf (stderr, __VA_ARGS__)
4683 #define showlist(...) puts (#__VA_ARGS__)
4684 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4685 static void
4686 test_varargs_macros (void)
4687 {
4688 int x = 1234;
4689 int y = 5678;
4690 debug ("Flag");
4691 debug ("X = %d\n", x);
4692 showlist (The first, second, and third items.);
4693 report (x>y, "x is %d but y is %d", x, y);
4694 }
4695
4696 // Check long long types.
4697 #define BIG64 18446744073709551615ull
4698 #define BIG32 4294967295ul
4699 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4700 #if !BIG_OK
4701 your preprocessor is broken;
4702 #endif
4703 #if BIG_OK
4704 #else
4705 your preprocessor is broken;
4706 #endif
4707 static long long int bignum = -9223372036854775807LL;
4708 static unsigned long long int ubignum = BIG64;
4709
4710 struct incomplete_array
4711 {
4712 int datasize;
4713 double data[];
4714 };
4715
4716 struct named_init {
4717 int number;
4718 const wchar_t *name;
4719 double average;
4720 };
4721
4722 typedef const char *ccp;
4723
4724 static inline int
4725 test_restrict (ccp restrict text)
4726 {
4727 // See if C++-style comments work.
4728 // Iterate through items via the restricted pointer.
4729 // Also check for declarations in for loops.
4730 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4731 continue;
4732 return 0;
4733 }
4734
4735 // Check varargs and va_copy.
4736 static bool
4737 test_varargs (const char *format, ...)
4738 {
4739 va_list args;
4740 va_start (args, format);
4741 va_list args_copy;
4742 va_copy (args_copy, args);
4743
4744 const char *str = "";
4745 int number = 0;
4746 float fnumber = 0;
4747
4748 while (*format)
4749 {
4750 switch (*format++)
4751 {
4752 case 's': // string
4753 str = va_arg (args_copy, const char *);
4754 break;
4755 case 'd': // int
4756 number = va_arg (args_copy, int);
4757 break;
4758 case 'f': // float
4759 fnumber = va_arg (args_copy, double);
4760 break;
4761 default:
4762 break;
4763 }
4764 }
4765 va_end (args_copy);
4766 va_end (args);
4767
4768 return *str && number && fnumber;
4769 }
4770 // Check _Alignas.
4771 char _Alignas (double) aligned_as_double;
4772 char _Alignas (0) no_special_alignment;
4773 extern char aligned_as_int;
4774 char _Alignas (0) _Alignas (int) aligned_as_int;
4775
4776 // Check _Alignof.
4777 enum
4778 {
4779 int_alignment = _Alignof (int),
4780 int_array_alignment = _Alignof (int[100]),
4781 char_alignment = _Alignof (char)
4782 };
4783 _Static_assert (0 < -_Alignof (int), "_Alignof is signed");
4784
4785 // Check _Noreturn.
4786 int _Noreturn does_not_return (void) { for (;;) continue; }
4787
4788 // Check _Static_assert.
4789 struct test_static_assert
4790 {
4791 int x;
4792 _Static_assert (sizeof (int) <= sizeof (long int),
4793 "_Static_assert does not work in struct");
4794 long int y;
4795 };
4796
4797 // Check UTF-8 literals.
4798 #define u8 syntax error!
4799 char const utf8_literal[] = u8"happens to be ASCII" "another string";
4800
4801 // Check duplicate typedefs.
4802 typedef long *long_ptr;
4803 typedef long int *long_ptr;
4804 typedef long_ptr long_ptr;
4805
4806 // Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
4807 struct anonymous
4808 {
4809 union {
4810 struct { int i; int j; };
4811 struct { int k; long int l; } w;
4812 };
4813 int m;
4814 } v1;
4815
4816 int
4817 main ()
4818 {
4819
4820 // Check bool.
4821 _Bool success = false;
4822
4823 // Check restrict.
4824 if (test_restrict ("String literal") == 0)
4825 success = true;
4826 char *restrict newvar = "Another string";
4827
4828 // Check varargs.
4829 success &= test_varargs ("s, d' f .", "string", 65, 34.234);
4830 test_varargs_macros ();
4831
4832 // Check flexible array members.
4833 struct incomplete_array *ia =
4834 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4835 ia->datasize = 10;
4836 for (int i = 0; i < ia->datasize; ++i)
4837 ia->data[i] = i * 1.234;
4838
4839 // Check named initializers.
4840 struct named_init ni = {
4841 .number = 34,
4842 .name = L"Test wide string",
4843 .average = 543.34343,
4844 };
4845
4846 ni.number = 58;
4847
4848 int dynamic_array[ni.number];
4849 dynamic_array[ni.number - 1] = 543;
4850
4851 // work around unused variable warnings
4852 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
4853 || dynamic_array[ni.number - 1] != 543);
4854
4855 v1.i = 2;
4856 v1.w.k = 5;
4857 _Static_assert ((offsetof (struct anonymous, i)
4858 == offsetof (struct anonymous, w.k)),
4859 "Anonymous union alignment botch");
4860
4861 ;
4862 return 0;
4863 }
4864 _ACEOF
4865 for ac_arg in '' -std=gnu11
4866 do
4867 CC="$ac_save_CC $ac_arg"
4868 if ac_fn_c_try_compile "$LINENO"; then :
4869 ac_cv_prog_cc_c11=$ac_arg
4870 fi
4871 rm -f core conftest.err conftest.$ac_objext
4872 test "x$ac_cv_prog_cc_c11" != "xno" && break
4873 done
4874 rm -f conftest.$ac_ext
4875 CC=$ac_save_CC
4876
4877 fi
4878 # AC_CACHE_VAL
4879 ac_prog_cc_stdc_options=
4880 case "x$ac_cv_prog_cc_c11" in
4881 x)
4882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4883 $as_echo "none needed" >&6; } ;;
4884 xno)
4885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4886 $as_echo "unsupported" >&6; } ;;
4887 *)
4888 ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c11"
4889 CC=$CC$ac_prog_cc_stdc_options
4890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
4891 $as_echo "$ac_cv_prog_cc_c11" >&6; } ;;
4892 esac
4893 if test "x$ac_cv_prog_cc_c11" != xno; then :
4894 ac_prog_cc_stdc=c11
4895 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
4896 else
4897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
4898 $as_echo_n "checking for $CC option to enable C99 features... " >&6; }
4899 if ${ac_cv_prog_cc_c99+:} false; then :
4900 $as_echo_n "(cached) " >&6
4901 else
4902 ac_cv_prog_cc_c99=no
4903 ac_save_CC=$CC
4904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4905 /* end confdefs.h. */
4906 #include <stdarg.h>
4907 #include <stdbool.h>
4908 #include <stddef.h>
4909 #include <stdlib.h>
4910 #include <wchar.h>
4911 #include <stdio.h>
4912
4913 // Check varargs macros. These examples are taken from C99 6.10.3.5.
4914 #define debug(...) fprintf (stderr, __VA_ARGS__)
4915 #define showlist(...) puts (#__VA_ARGS__)
4916 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4917 static void
4918 test_varargs_macros (void)
4919 {
4920 int x = 1234;
4921 int y = 5678;
4922 debug ("Flag");
4923 debug ("X = %d\n", x);
4924 showlist (The first, second, and third items.);
4925 report (x>y, "x is %d but y is %d", x, y);
4926 }
4927
4928 // Check long long types.
4929 #define BIG64 18446744073709551615ull
4930 #define BIG32 4294967295ul
4931 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4932 #if !BIG_OK
4933 your preprocessor is broken;
4934 #endif
4935 #if BIG_OK
4936 #else
4937 your preprocessor is broken;
4938 #endif
4939 static long long int bignum = -9223372036854775807LL;
4940 static unsigned long long int ubignum = BIG64;
4941
4942 struct incomplete_array
4943 {
4944 int datasize;
4945 double data[];
4946 };
4947
4948 struct named_init {
4949 int number;
4950 const wchar_t *name;
4951 double average;
4952 };
4953
4954 typedef const char *ccp;
4955
4956 static inline int
4957 test_restrict (ccp restrict text)
4958 {
4959 // See if C++-style comments work.
4960 // Iterate through items via the restricted pointer.
4961 // Also check for declarations in for loops.
4962 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4963 continue;
4964 return 0;
4965 }
4966
4967 // Check varargs and va_copy.
4968 static bool
4969 test_varargs (const char *format, ...)
4970 {
4971 va_list args;
4972 va_start (args, format);
4973 va_list args_copy;
4974 va_copy (args_copy, args);
4975
4976 const char *str = "";
4977 int number = 0;
4978 float fnumber = 0;
4979
4980 while (*format)
4981 {
4982 switch (*format++)
4983 {
4984 case 's': // string
4985 str = va_arg (args_copy, const char *);
4986 break;
4987 case 'd': // int
4988 number = va_arg (args_copy, int);
4989 break;
4990 case 'f': // float
4991 fnumber = va_arg (args_copy, double);
4992 break;
4993 default:
4994 break;
4995 }
4996 }
4997 va_end (args_copy);
4998 va_end (args);
4999
5000 return *str && number && fnumber;
5001 }
5002 int
5003 main ()
5004 {
5005
5006 // Check bool.
5007 _Bool success = false;
5008
5009 // Check restrict.
5010 if (test_restrict ("String literal") == 0)
5011 success = true;
5012 char *restrict newvar = "Another string";
5013
5014 // Check varargs.
5015 success &= test_varargs ("s, d' f .", "string", 65, 34.234);
5016 test_varargs_macros ();
5017
5018 // Check flexible array members.
5019 struct incomplete_array *ia =
5020 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
5021 ia->datasize = 10;
5022 for (int i = 0; i < ia->datasize; ++i)
5023 ia->data[i] = i * 1.234;
5024
5025 // Check named initializers.
5026 struct named_init ni = {
5027 .number = 34,
5028 .name = L"Test wide string",
5029 .average = 543.34343,
5030 };
5031
5032 ni.number = 58;
5033
5034 int dynamic_array[ni.number];
5035 dynamic_array[ni.number - 1] = 543;
5036
5037 // work around unused variable warnings
5038 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
5039 || dynamic_array[ni.number - 1] != 543);
5040
5041 ;
5042 return 0;
5043 }
5044 _ACEOF
5045 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc1x -qlanglvl=extc99
5046 do
5047 CC="$ac_save_CC $ac_arg"
5048 if ac_fn_c_try_compile "$LINENO"; then :
5049 ac_cv_prog_cc_c99=$ac_arg
5050 fi
5051 rm -f core conftest.err conftest.$ac_objext
5052 test "x$ac_cv_prog_cc_c99" != "xno" && break
5053 done
5054 rm -f conftest.$ac_ext
5055 CC=$ac_save_CC
5056
5057 fi
5058 # AC_CACHE_VAL
5059 ac_prog_cc_stdc_options=
5060 case "x$ac_cv_prog_cc_c99" in
5061 x)
5062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5063 $as_echo "none needed" >&6; } ;;
5064 xno)
5065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5066 $as_echo "unsupported" >&6; } ;;
5067 *)
5068 ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c99"
5069 CC=$CC$ac_prog_cc_stdc_options
5070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
5071 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
5072 esac
5073 if test "x$ac_cv_prog_cc_c99" != xno; then :
5074 ac_prog_cc_stdc=c99
5075 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
5076 else
5077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
5078 $as_echo_n "checking for $CC option to enable C89 features... " >&6; }
5079 if ${ac_cv_prog_cc_c89+:} false; then :
5080 $as_echo_n "(cached) " >&6
5081 else
5082 ac_cv_prog_cc_c89=no
5083 ac_save_CC=$CC
5084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5085 /* end confdefs.h. */
5086 #include <stdarg.h>
5087 #include <stdio.h>
5088 struct stat;
5089 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
5090 struct buf { int x; };
5091 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5092 static char *e (p, i)
5093 char **p;
5094 int i;
5095 {
5096 return p[i];
5097 }
5098 static char *f (char * (*g) (char **, int), char **p, ...)
5099 {
5100 char *s;
5101 va_list v;
5102 va_start (v,p);
5103 s = g (p, va_arg (v,int));
5104 va_end (v);
5105 return s;
5106 }
5107
5108 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
5109 function prototypes and stuff, but not '\xHH' hex character constants.
5110 These don't provoke an error unfortunately, instead are silently treated
5111 as 'x'. The following induces an error, until -std is added to get
5112 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
5113 array size at least. It's necessary to write '\x00'==0 to get something
5114 that's true only with -std. */
5115 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5116
5117 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5118 inside strings and character constants. */
5119 #define FOO(x) 'x'
5120 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5121
5122 int test (int i, double x);
5123 struct s1 {int (*f) (int a);};
5124 struct s2 {int (*f) (double a);};
5125 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5126 int argc;
5127 char **argv;
5128 int
5129 main ()
5130 {
5131 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5132 ;
5133 return 0;
5134 }
5135 _ACEOF
5136 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5137 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5138 do
5139 CC="$ac_save_CC $ac_arg"
5140 if ac_fn_c_try_compile "$LINENO"; then :
5141 ac_cv_prog_cc_c89=$ac_arg
5142 fi
5143 rm -f core conftest.err conftest.$ac_objext
5144 test "x$ac_cv_prog_cc_c89" != "xno" && break
5145 done
5146 rm -f conftest.$ac_ext
5147 CC=$ac_save_CC
5148
5149 fi
5150 # AC_CACHE_VAL
5151 ac_prog_cc_stdc_options=
5152 case "x$ac_cv_prog_cc_c89" in
5153 x)
5154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5155 $as_echo "none needed" >&6; } ;;
5156 xno)
5157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5158 $as_echo "unsupported" >&6; } ;;
5159 *)
5160 ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c89"
5161 CC=$CC$ac_prog_cc_stdc_options
5162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5163 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5164 esac
5165 if test "x$ac_cv_prog_cc_c89" != xno; then :
5166 ac_prog_cc_stdc=c89
5167 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
5168 else
5169 ac_prog_cc_stdc=no
5170 ac_cv_prog_cc_stdc=no
5171 fi
5172
5173 fi
5174
5175 fi
5176
5177 ac_ext=c
5178 ac_cpp='$CPP $CPPFLAGS'
5179 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5180 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5181 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5182
5183
5184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler is clang" >&5
5185 $as_echo_n "checking whether the compiler is clang... " >&6; }
5186 if ${gl_cv_compiler_clang+:} false; then :
5187 $as_echo_n "(cached) " >&6
5188 else
5189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5190 /* end confdefs.h. */
5191
5192 #ifdef __clang__
5193 barfbarf
5194 #endif
5195
5196 int
5197 main ()
5198 {
5199
5200 ;
5201 return 0;
5202 }
5203
5204 _ACEOF
5205 if ac_fn_c_try_compile "$LINENO"; then :
5206 gl_cv_compiler_clang=no
5207 else
5208 gl_cv_compiler_clang=yes
5209 fi
5210 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5211
5212 fi
5213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_clang" >&5
5214 $as_echo "$gl_cv_compiler_clang" >&6; }
5215
5216
5217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler option needed when checking for declarations" >&5
5218 $as_echo_n "checking for compiler option needed when checking for declarations... " >&6; }
5219 if ${gl_cv_compiler_check_decl_option+:} false; then :
5220 $as_echo_n "(cached) " >&6
5221 else
5222 if test $gl_cv_compiler_clang = yes; then
5223 save_ac_compile="$ac_compile"
5224 ac_compile="$ac_compile -Werror=implicit-function-declaration"
5225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5226 /* end confdefs.h. */
5227
5228 int
5229 main ()
5230 {
5231
5232 ;
5233 return 0;
5234 }
5235 _ACEOF
5236 if ac_fn_c_try_compile "$LINENO"; then :
5237 gl_cv_compiler_check_decl_option='-Werror=implicit-function-declaration'
5238 else
5239 gl_cv_compiler_check_decl_option=none
5240 fi
5241 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5242 ac_compile="$save_ac_compile"
5243 else
5244 gl_cv_compiler_check_decl_option=none
5245 fi
5246
5247 fi
5248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_check_decl_option" >&5
5249 $as_echo "$gl_cv_compiler_check_decl_option" >&6; }
5250 if test "x$gl_cv_compiler_check_decl_option" != xnone; then
5251 ac_compile_for_check_decl="$ac_compile $gl_cv_compiler_check_decl_option"
5252 else
5253 ac_compile_for_check_decl="$ac_compile"
5254 fi
5255
5256
5257
5258
5259 ac_ext=c
5260 ac_cpp='$CPP $CPPFLAGS'
5261 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5262 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5263 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5265 $as_echo_n "checking how to run the C preprocessor... " >&6; }
5266 # On Suns, sometimes $CPP names a directory.
5267 if test -n "$CPP" && test -d "$CPP"; then
5268 CPP=
5269 fi
5270 if test -z "$CPP"; then
5271 if ${ac_cv_prog_CPP+:} false; then :
5272 $as_echo_n "(cached) " >&6
5273 else
5274 # Double quotes because CPP needs to be expanded
5275 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5276 do
5277 ac_preproc_ok=false
5278 for ac_c_preproc_warn_flag in '' yes
5279 do
5280 # Use a header file that comes with gcc, so configuring glibc
5281 # with a fresh cross-compiler works.
5282 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5283 # <limits.h> exists even on freestanding compilers.
5284 # On the NeXT, cc -E runs the code through the compiler's parser,
5285 # not just through cpp. "Syntax error" is here to catch this case.
5286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5287 /* end confdefs.h. */
5288 #ifdef __STDC__
5289 # include <limits.h>
5290 #else
5291 # include <assert.h>
5292 #endif
5293 Syntax error
5294 _ACEOF
5295 if ac_fn_c_try_cpp "$LINENO"; then :
5296
5297 else
5298 # Broken: fails on valid input.
5299 continue
5300 fi
5301 rm -f conftest.err conftest.i conftest.$ac_ext
5302
5303 # OK, works on sane cases. Now check whether nonexistent headers
5304 # can be detected and how.
5305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5306 /* end confdefs.h. */
5307 #include <ac_nonexistent.h>
5308 _ACEOF
5309 if ac_fn_c_try_cpp "$LINENO"; then :
5310 # Broken: success on invalid input.
5311 continue
5312 else
5313 # Passes both tests.
5314 ac_preproc_ok=:
5315 break
5316 fi
5317 rm -f conftest.err conftest.i conftest.$ac_ext
5318
5319 done
5320 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5321 rm -f conftest.i conftest.err conftest.$ac_ext
5322 if $ac_preproc_ok; then :
5323 break
5324 fi
5325
5326 done
5327 ac_cv_prog_CPP=$CPP
5328
5329 fi
5330 CPP=$ac_cv_prog_CPP
5331 else
5332 ac_cv_prog_CPP=$CPP
5333 fi
5334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5335 $as_echo "$CPP" >&6; }
5336 ac_preproc_ok=false
5337 for ac_c_preproc_warn_flag in '' yes
5338 do
5339 # Use a header file that comes with gcc, so configuring glibc
5340 # with a fresh cross-compiler works.
5341 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5342 # <limits.h> exists even on freestanding compilers.
5343 # On the NeXT, cc -E runs the code through the compiler's parser,
5344 # not just through cpp. "Syntax error" is here to catch this case.
5345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5346 /* end confdefs.h. */
5347 #ifdef __STDC__
5348 # include <limits.h>
5349 #else
5350 # include <assert.h>
5351 #endif
5352 Syntax error
5353 _ACEOF
5354 if ac_fn_c_try_cpp "$LINENO"; then :
5355
5356 else
5357 # Broken: fails on valid input.
5358 continue
5359 fi
5360 rm -f conftest.err conftest.i conftest.$ac_ext
5361
5362 # OK, works on sane cases. Now check whether nonexistent headers
5363 # can be detected and how.
5364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5365 /* end confdefs.h. */
5366 #include <ac_nonexistent.h>
5367 _ACEOF
5368 if ac_fn_c_try_cpp "$LINENO"; then :
5369 # Broken: success on invalid input.
5370 continue
5371 else
5372 # Passes both tests.
5373 ac_preproc_ok=:
5374 break
5375 fi
5376 rm -f conftest.err conftest.i conftest.$ac_ext
5377
5378 done
5379 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5380 rm -f conftest.i conftest.err conftest.$ac_ext
5381 if $ac_preproc_ok; then :
5382
5383 else
5384 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5385 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5386 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5387 See \`config.log' for more details" "$LINENO" 5; }
5388 fi
5389
5390 ac_ext=c
5391 ac_cpp='$CPP $CPPFLAGS'
5392 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5393 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5394 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5395
5396
5397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5398 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5399 if ${ac_cv_path_GREP+:} false; then :
5400 $as_echo_n "(cached) " >&6
5401 else
5402 if test -z "$GREP"; then
5403 ac_path_GREP_found=false
5404 # Loop through the user's path and test for each of PROGNAME-LIST
5405 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5406 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5407 do
5408 IFS=$as_save_IFS
5409 test -z "$as_dir" && as_dir=.
5410 for ac_prog in grep ggrep; do
5411 for ac_exec_ext in '' $ac_executable_extensions; do
5412 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5413 as_fn_executable_p "$ac_path_GREP" || continue
5414 # Check for GNU ac_path_GREP and select it if it is found.
5415 # Check for GNU $ac_path_GREP
5416 case `"$ac_path_GREP" --version 2>&1` in
5417 *GNU*)
5418 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5419 *)
5420 ac_count=0
5421 $as_echo_n 0123456789 >"conftest.in"
5422 while :
5423 do
5424 cat "conftest.in" "conftest.in" >"conftest.tmp"
5425 mv "conftest.tmp" "conftest.in"
5426 cp "conftest.in" "conftest.nl"
5427 $as_echo 'GREP' >> "conftest.nl"
5428 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5429 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5430 as_fn_arith $ac_count + 1 && ac_count=$as_val
5431 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5432 # Best one so far, save it but keep looking for a better one
5433 ac_cv_path_GREP="$ac_path_GREP"
5434 ac_path_GREP_max=$ac_count
5435 fi
5436 # 10*(2^10) chars as input seems more than enough
5437 test $ac_count -gt 10 && break
5438 done
5439 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5440 esac
5441
5442 $ac_path_GREP_found && break 3
5443 done
5444 done
5445 done
5446 IFS=$as_save_IFS
5447 if test -z "$ac_cv_path_GREP"; then
5448 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5449 fi
5450 else
5451 ac_cv_path_GREP=$GREP
5452 fi
5453
5454 fi
5455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5456 $as_echo "$ac_cv_path_GREP" >&6; }
5457 GREP="$ac_cv_path_GREP"
5458
5459
5460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5461 $as_echo_n "checking for egrep... " >&6; }
5462 if ${ac_cv_path_EGREP+:} false; then :
5463 $as_echo_n "(cached) " >&6
5464 else
5465 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5466 then ac_cv_path_EGREP="$GREP -E"
5467 else
5468 if test -z "$EGREP"; then
5469 ac_path_EGREP_found=false
5470 # Loop through the user's path and test for each of PROGNAME-LIST
5471 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5472 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5473 do
5474 IFS=$as_save_IFS
5475 test -z "$as_dir" && as_dir=.
5476 for ac_prog in egrep; do
5477 for ac_exec_ext in '' $ac_executable_extensions; do
5478 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5479 as_fn_executable_p "$ac_path_EGREP" || continue
5480 # Check for GNU ac_path_EGREP and select it if it is found.
5481 # Check for GNU $ac_path_EGREP
5482 case `"$ac_path_EGREP" --version 2>&1` in
5483 *GNU*)
5484 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5485 *)
5486 ac_count=0
5487 $as_echo_n 0123456789 >"conftest.in"
5488 while :
5489 do
5490 cat "conftest.in" "conftest.in" >"conftest.tmp"
5491 mv "conftest.tmp" "conftest.in"
5492 cp "conftest.in" "conftest.nl"
5493 $as_echo 'EGREP' >> "conftest.nl"
5494 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5495 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5496 as_fn_arith $ac_count + 1 && ac_count=$as_val
5497 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5498 # Best one so far, save it but keep looking for a better one
5499 ac_cv_path_EGREP="$ac_path_EGREP"
5500 ac_path_EGREP_max=$ac_count
5501 fi
5502 # 10*(2^10) chars as input seems more than enough
5503 test $ac_count -gt 10 && break
5504 done
5505 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5506 esac
5507
5508 $ac_path_EGREP_found && break 3
5509 done
5510 done
5511 done
5512 IFS=$as_save_IFS
5513 if test -z "$ac_cv_path_EGREP"; then
5514 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5515 fi
5516 else
5517 ac_cv_path_EGREP=$EGREP
5518 fi
5519
5520 fi
5521 fi
5522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5523 $as_echo "$ac_cv_path_EGREP" >&6; }
5524 EGREP="$ac_cv_path_EGREP"
5525
5526
5527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5528 $as_echo_n "checking for ANSI C header files... " >&6; }
5529 if ${ac_cv_header_stdc+:} false; then :
5530 $as_echo_n "(cached) " >&6
5531 else
5532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5533 /* end confdefs.h. */
5534 #include <stdlib.h>
5535 #include <stdarg.h>
5536 #include <string.h>
5537 #include <float.h>
5538
5539 int
5540 main ()
5541 {
5542
5543 ;
5544 return 0;
5545 }
5546 _ACEOF
5547 if ac_fn_c_try_compile "$LINENO"; then :
5548 ac_cv_header_stdc=yes
5549 else
5550 ac_cv_header_stdc=no
5551 fi
5552 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5553
5554 if test $ac_cv_header_stdc = yes; then
5555 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5557 /* end confdefs.h. */
5558 #include <string.h>
5559
5560 _ACEOF
5561 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5562 $EGREP "memchr" >/dev/null 2>&1; then :
5563
5564 else
5565 ac_cv_header_stdc=no
5566 fi
5567 rm -f conftest*
5568
5569 fi
5570
5571 if test $ac_cv_header_stdc = yes; then
5572 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5574 /* end confdefs.h. */
5575 #include <stdlib.h>
5576
5577 _ACEOF
5578 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5579 $EGREP "free" >/dev/null 2>&1; then :
5580
5581 else
5582 ac_cv_header_stdc=no
5583 fi
5584 rm -f conftest*
5585
5586 fi
5587
5588 if test $ac_cv_header_stdc = yes; then
5589 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5590 if test "$cross_compiling" = yes; then :
5591 :
5592 else
5593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5594 /* end confdefs.h. */
5595 #include <ctype.h>
5596 #include <stdlib.h>
5597 #if ((' ' & 0x0FF) == 0x020)
5598 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5599 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5600 #else
5601 # define ISLOWER(c) \
5602 (('a' <= (c) && (c) <= 'i') \
5603 || ('j' <= (c) && (c) <= 'r') \
5604 || ('s' <= (c) && (c) <= 'z'))
5605 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5606 #endif
5607
5608 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5609 int
5610 main ()
5611 {
5612 int i;
5613 for (i = 0; i < 256; i++)
5614 if (XOR (islower (i), ISLOWER (i))
5615 || toupper (i) != TOUPPER (i))
5616 return 2;
5617 return 0;
5618 }
5619 _ACEOF
5620 if ac_fn_c_try_run "$LINENO"; then :
5621
5622 else
5623 ac_cv_header_stdc=no
5624 fi
5625 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5626 conftest.$ac_objext conftest.beam conftest.$ac_ext
5627 fi
5628
5629 fi
5630 fi
5631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5632 $as_echo "$ac_cv_header_stdc" >&6; }
5633 if test $ac_cv_header_stdc = yes; then
5634
5635 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
5636
5637 fi
5638
5639 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
5640 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5641 inttypes.h stdint.h unistd.h
5642 do :
5643 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5644 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5645 "
5646 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5647 cat >>confdefs.h <<_ACEOF
5648 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5649 _ACEOF
5650
5651 fi
5652
5653 done
5654
5655
5656
5657
5658
5659 for ac_header in $ac_header_list
5660 do :
5661 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5662 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5663 "
5664 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5665 cat >>confdefs.h <<_ACEOF
5666 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5667 _ACEOF
5668
5669 fi
5670
5671 done
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5682 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
5683 if ${ac_cv_safe_to_define___extensions__+:} false; then :
5684 $as_echo_n "(cached) " >&6
5685 else
5686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5687 /* end confdefs.h. */
5688
5689 # define __EXTENSIONS__ 1
5690 $ac_includes_default
5691 int
5692 main ()
5693 {
5694
5695 ;
5696 return 0;
5697 }
5698 _ACEOF
5699 if ac_fn_c_try_compile "$LINENO"; then :
5700 ac_cv_safe_to_define___extensions__=yes
5701 else
5702 ac_cv_safe_to_define___extensions__=no
5703 fi
5704 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5705 fi
5706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5707 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5708
5709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
5710 $as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; }
5711 if ${ac_cv_should_define__xopen_source+:} false; then :
5712 $as_echo_n "(cached) " >&6
5713 else
5714 ac_cv_should_define__xopen_source=no
5715 if test $ac_cv_header_wchar_h = yes; then :
5716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5717 /* end confdefs.h. */
5718
5719 #include <wchar.h>
5720 mbstate_t x;
5721 int
5722 main ()
5723 {
5724
5725 ;
5726 return 0;
5727 }
5728 _ACEOF
5729 if ac_fn_c_try_compile "$LINENO"; then :
5730
5731 else
5732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5733 /* end confdefs.h. */
5734
5735 #define _XOPEN_SOURCE 500
5736 #include <wchar.h>
5737 mbstate_t x;
5738 int
5739 main ()
5740 {
5741
5742 ;
5743 return 0;
5744 }
5745 _ACEOF
5746 if ac_fn_c_try_compile "$LINENO"; then :
5747 ac_cv_should_define__xopen_source=yes
5748 fi
5749 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5750 fi
5751 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5752 fi
5753 fi
5754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
5755 $as_echo "$ac_cv_should_define__xopen_source" >&6; }
5756
5757 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5758
5759 $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
5760
5761 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5762
5763 $as_echo "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h
5764
5765 $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
5766
5767 $as_echo "#define _OPENBSD_SOURCE 1" >>confdefs.h
5768
5769 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5770
5771 $as_echo "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
5772
5773 $as_echo "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
5774
5775 $as_echo "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
5776
5777 $as_echo "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
5778
5779 $as_echo "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
5780
5781 $as_echo "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
5782
5783 $as_echo "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
5784
5785 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5786
5787 if test $ac_cv_header_minix_config_h = yes; then :
5788 MINIX=yes
5789 $as_echo "#define _MINIX 1" >>confdefs.h
5790
5791 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5792
5793 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5794
5795 else
5796 MINIX=
5797 fi
5798 if test $ac_cv_safe_to_define___extensions__ = yes; then :
5799 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5800
5801 fi
5802 if test $ac_cv_should_define__xopen_source = yes; then :
5803 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
5804
5805 fi
5806
5807 # Needs to run before gl_EARLY so it can override AC_SYS_LARGEFILE included
5808 # there.
5809 ac_aux_dir=
5810 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
5811 if test -f "$ac_dir/install-sh"; then
5812 ac_aux_dir=$ac_dir
5813 ac_install_sh="$ac_aux_dir/install-sh -c"
5814 break
5815 elif test -f "$ac_dir/install.sh"; then
5816 ac_aux_dir=$ac_dir
5817 ac_install_sh="$ac_aux_dir/install.sh -c"
5818 break
5819 elif test -f "$ac_dir/shtool"; then
5820 ac_aux_dir=$ac_dir
5821 ac_install_sh="$ac_aux_dir/shtool install -c"
5822 break
5823 fi
5824 done
5825 if test -z "$ac_aux_dir"; then
5826 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
5827 fi
5828
5829 # These three variables are undocumented and unsupported,
5830 # and are intended to be withdrawn in a future Autoconf release.
5831 # They can cause serious problems if a builder's source tree is in a directory
5832 # whose full name contains unusual characters.
5833 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5834 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5835 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5836
5837
5838 # Make sure we can run config.sub.
5839 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
5840 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
5841
5842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
5843 $as_echo_n "checking build system type... " >&6; }
5844 if ${ac_cv_build+:} false; then :
5845 $as_echo_n "(cached) " >&6
5846 else
5847 ac_build_alias=$build_alias
5848 test "x$ac_build_alias" = x &&
5849 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
5850 test "x$ac_build_alias" = x &&
5851 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
5852 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
5853 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
5854
5855 fi
5856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
5857 $as_echo "$ac_cv_build" >&6; }
5858 case $ac_cv_build in
5859 *-*-*) ;;
5860 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
5861 esac
5862 build=$ac_cv_build
5863 ac_save_IFS=$IFS; IFS='-'
5864 set x $ac_cv_build
5865 shift
5866 build_cpu=$1
5867 build_vendor=$2
5868 shift; shift
5869 # Remember, the first character of IFS is used to create $*,
5870 # except with old shells:
5871 build_os=$*
5872 IFS=$ac_save_IFS
5873 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
5874
5875
5876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
5877 $as_echo_n "checking host system type... " >&6; }
5878 if ${ac_cv_host+:} false; then :
5879 $as_echo_n "(cached) " >&6
5880 else
5881 if test "x$host_alias" = x; then
5882 ac_cv_host=$ac_cv_build
5883 else
5884 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
5885 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
5886 fi
5887
5888 fi
5889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
5890 $as_echo "$ac_cv_host" >&6; }
5891 case $ac_cv_host in
5892 *-*-*) ;;
5893 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
5894 esac
5895 host=$ac_cv_host
5896 ac_save_IFS=$IFS; IFS='-'
5897 set x $ac_cv_host
5898 shift
5899 host_cpu=$1
5900 host_vendor=$2
5901 shift; shift
5902 # Remember, the first character of IFS is used to create $*,
5903 # except with old shells:
5904 host_os=$*
5905 IFS=$ac_save_IFS
5906 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
5907
5908
5909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
5910 $as_echo_n "checking target system type... " >&6; }
5911 if ${ac_cv_target+:} false; then :
5912 $as_echo_n "(cached) " >&6
5913 else
5914 if test "x$target_alias" = x; then
5915 ac_cv_target=$ac_cv_host
5916 else
5917 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
5918 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
5919 fi
5920
5921 fi
5922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
5923 $as_echo "$ac_cv_target" >&6; }
5924 case $ac_cv_target in
5925 *-*-*) ;;
5926 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
5927 esac
5928 target=$ac_cv_target
5929 ac_save_IFS=$IFS; IFS='-'
5930 set x $ac_cv_target
5931 shift
5932 target_cpu=$1
5933 target_vendor=$2
5934 shift; shift
5935 # Remember, the first character of IFS is used to create $*,
5936 # except with old shells:
5937 target_os=$*
5938 IFS=$ac_save_IFS
5939 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
5940
5941
5942 # The aliases save the names the user supplied, while $host etc.
5943 # will get canonicalized.
5944 test -n "$target_alias" &&
5945 test "$program_prefix$program_suffix$program_transform_name" = \
5946 NONENONEs,x,x, &&
5947 program_prefix=${target_alias}-
5948
5949 # The tests for host and target for $enable_largefile require
5950 # canonical names.
5951
5952
5953
5954 # As the $enable_largefile decision depends on --enable-plugins we must set it
5955 # even in directories otherwise not depending on the $plugins option.
5956
5957
5958 maybe_plugins=no
5959 for ac_header in dlfcn.h
5960 do :
5961 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
5962 "
5963 if test "x$ac_cv_header_dlfcn_h" = xyes; then :
5964 cat >>confdefs.h <<_ACEOF
5965 #define HAVE_DLFCN_H 1
5966 _ACEOF
5967 maybe_plugins=yes
5968 fi
5969
5970 done
5971
5972 for ac_header in windows.h
5973 do :
5974 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
5975 "
5976 if test "x$ac_cv_header_windows_h" = xyes; then :
5977 cat >>confdefs.h <<_ACEOF
5978 #define HAVE_WINDOWS_H 1
5979 _ACEOF
5980 maybe_plugins=yes
5981 fi
5982
5983 done
5984
5985
5986 # Check whether --enable-plugins was given.
5987 if test "${enable_plugins+set}" = set; then :
5988 enableval=$enable_plugins; case "${enableval}" in
5989 no) plugins=no ;;
5990 *) plugins=yes
5991 if test "$maybe_plugins" != "yes" ; then
5992 as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
5993 fi ;;
5994 esac
5995 else
5996 plugins=$maybe_plugins
5997
5998 fi
5999
6000 if test "$plugins" = "yes"; then
6001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
6002 $as_echo_n "checking for library containing dlsym... " >&6; }
6003 if ${ac_cv_search_dlsym+:} false; then :
6004 $as_echo_n "(cached) " >&6
6005 else
6006 ac_func_search_save_LIBS=$LIBS
6007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6008 /* end confdefs.h. */
6009
6010 /* Override any GCC internal prototype to avoid an error.
6011 Use char because int might match the return type of a GCC
6012 builtin and then its argument prototype would still apply. */
6013 #ifdef __cplusplus
6014 extern "C"
6015 #endif
6016 char dlsym ();
6017 int
6018 main ()
6019 {
6020 return dlsym ();
6021 ;
6022 return 0;
6023 }
6024 _ACEOF
6025 for ac_lib in '' dl; do
6026 if test -z "$ac_lib"; then
6027 ac_res="none required"
6028 else
6029 ac_res=-l$ac_lib
6030 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
6031 fi
6032 if ac_fn_c_try_link "$LINENO"; then :
6033 ac_cv_search_dlsym=$ac_res
6034 fi
6035 rm -f core conftest.err conftest.$ac_objext \
6036 conftest$ac_exeext
6037 if ${ac_cv_search_dlsym+:} false; then :
6038 break
6039 fi
6040 done
6041 if ${ac_cv_search_dlsym+:} false; then :
6042
6043 else
6044 ac_cv_search_dlsym=no
6045 fi
6046 rm conftest.$ac_ext
6047 LIBS=$ac_func_search_save_LIBS
6048 fi
6049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
6050 $as_echo "$ac_cv_search_dlsym" >&6; }
6051 ac_res=$ac_cv_search_dlsym
6052 if test "$ac_res" != no; then :
6053 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6054
6055 fi
6056
6057 fi
6058
6059
6060 case "${host}" in
6061 sparc-*-solaris*|i?86-*-solaris*)
6062 # On native 32-bit Solaris/SPARC and x86, large-file and procfs support
6063 # were mutually exclusive until Solaris 11.3. Without procfs support,
6064 # the bfd/ elf module cannot provide certain routines such as
6065 # elfcore_write_prpsinfo or elfcore_write_prstatus. So unless the user
6066 # explicitly requested large-file support through the
6067 # --enable-largefile switch, disable large-file support in favor of
6068 # procfs support.
6069 #
6070 # Check if <sys/procfs.h> is incompatible with large-file support.
6071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6072 /* end confdefs.h. */
6073 #define _FILE_OFFSET_BITS 64
6074 #define _STRUCTURED_PROC 1
6075 #include <sys/procfs.h>
6076 int
6077 main ()
6078 {
6079
6080 ;
6081 return 0;
6082 }
6083 _ACEOF
6084 if ac_fn_c_try_compile "$LINENO"; then :
6085 acx_cv_procfs_lfs=yes
6086 else
6087 acx_cv_procfs_lfs=no
6088 fi
6089 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6090 #
6091 # Forcefully disable large-file support only if necessary, gdb is in
6092 # tree and enabled.
6093 if test "${target}" = "${host}" -a "$acx_cv_procfs_lfs" = no \
6094 -a -d $srcdir/../gdb -a "$enable_gdb" != no; then
6095 : ${enable_largefile="no"}
6096 if test "$plugins" = yes; then
6097 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
6098 plugin support disabled; require large-file support which is incompatible with GDB." >&5
6099 $as_echo "$as_me: WARNING:
6100 plugin support disabled; require large-file support which is incompatible with GDB." >&2;}
6101 plugins=no
6102 fi
6103 fi
6104 #
6105 # Explicitly undef _FILE_OFFSET_BITS if enable_largefile=no for the
6106 # benefit of g++ 9+ which predefines it on Solaris.
6107 if test "$enable_largefile" = no; then
6108 LARGEFILE_CPPFLAGS="-U_FILE_OFFSET_BITS"
6109
6110 fi
6111 ;;
6112 esac
6113
6114 # Check whether --enable-largefile was given.
6115 if test "${enable_largefile+set}" = set; then :
6116 enableval=$enable_largefile;
6117 fi
6118
6119 if test "$enable_largefile" != no; then
6120
6121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
6122 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
6123 if ${ac_cv_sys_largefile_CC+:} false; then :
6124 $as_echo_n "(cached) " >&6
6125 else
6126 ac_cv_sys_largefile_CC=no
6127 if test "$GCC" != yes; then
6128 ac_save_CC=$CC
6129 while :; do
6130 # IRIX 6.2 and later do not support large files by default,
6131 # so use the C compiler's -n32 option if that helps.
6132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6133 /* end confdefs.h. */
6134 #include <sys/types.h>
6135 /* Check that off_t can represent 2**63 - 1 correctly.
6136 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6137 since some C++ compilers masquerading as C compilers
6138 incorrectly reject 9223372036854775807. */
6139 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
6140 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6141 && LARGE_OFF_T % 2147483647 == 1)
6142 ? 1 : -1];
6143 int
6144 main ()
6145 {
6146
6147 ;
6148 return 0;
6149 }
6150 _ACEOF
6151 if ac_fn_c_try_compile "$LINENO"; then :
6152 break
6153 fi
6154 rm -f core conftest.err conftest.$ac_objext
6155 CC="$CC -n32"
6156 if ac_fn_c_try_compile "$LINENO"; then :
6157 ac_cv_sys_largefile_CC=' -n32'; break
6158 fi
6159 rm -f core conftest.err conftest.$ac_objext
6160 break
6161 done
6162 CC=$ac_save_CC
6163 rm -f conftest.$ac_ext
6164 fi
6165 fi
6166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
6167 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
6168 if test "$ac_cv_sys_largefile_CC" != no; then
6169 CC=$CC$ac_cv_sys_largefile_CC
6170 fi
6171
6172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
6173 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
6174 if ${ac_cv_sys_file_offset_bits+:} false; then :
6175 $as_echo_n "(cached) " >&6
6176 else
6177 while :; do
6178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6179 /* end confdefs.h. */
6180 #include <sys/types.h>
6181 /* Check that off_t can represent 2**63 - 1 correctly.
6182 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6183 since some C++ compilers masquerading as C compilers
6184 incorrectly reject 9223372036854775807. */
6185 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
6186 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6187 && LARGE_OFF_T % 2147483647 == 1)
6188 ? 1 : -1];
6189 int
6190 main ()
6191 {
6192
6193 ;
6194 return 0;
6195 }
6196 _ACEOF
6197 if ac_fn_c_try_compile "$LINENO"; then :
6198 ac_cv_sys_file_offset_bits=no; break
6199 fi
6200 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6202 /* end confdefs.h. */
6203 #define _FILE_OFFSET_BITS 64
6204 #include <sys/types.h>
6205 /* Check that off_t can represent 2**63 - 1 correctly.
6206 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6207 since some C++ compilers masquerading as C compilers
6208 incorrectly reject 9223372036854775807. */
6209 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
6210 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6211 && LARGE_OFF_T % 2147483647 == 1)
6212 ? 1 : -1];
6213 int
6214 main ()
6215 {
6216
6217 ;
6218 return 0;
6219 }
6220 _ACEOF
6221 if ac_fn_c_try_compile "$LINENO"; then :
6222 ac_cv_sys_file_offset_bits=64; break
6223 fi
6224 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6225 ac_cv_sys_file_offset_bits=unknown
6226 break
6227 done
6228 fi
6229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
6230 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
6231 case $ac_cv_sys_file_offset_bits in #(
6232 no | unknown) ;;
6233 *)
6234 cat >>confdefs.h <<_ACEOF
6235 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
6236 _ACEOF
6237 ;;
6238 esac
6239 rm -rf conftest*
6240 if test $ac_cv_sys_file_offset_bits = unknown; then
6241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
6242 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
6243 if ${ac_cv_sys_large_files+:} false; then :
6244 $as_echo_n "(cached) " >&6
6245 else
6246 while :; do
6247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6248 /* end confdefs.h. */
6249 #include <sys/types.h>
6250 /* Check that off_t can represent 2**63 - 1 correctly.
6251 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6252 since some C++ compilers masquerading as C compilers
6253 incorrectly reject 9223372036854775807. */
6254 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
6255 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6256 && LARGE_OFF_T % 2147483647 == 1)
6257 ? 1 : -1];
6258 int
6259 main ()
6260 {
6261
6262 ;
6263 return 0;
6264 }
6265 _ACEOF
6266 if ac_fn_c_try_compile "$LINENO"; then :
6267 ac_cv_sys_large_files=no; break
6268 fi
6269 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6271 /* end confdefs.h. */
6272 #define _LARGE_FILES 1
6273 #include <sys/types.h>
6274 /* Check that off_t can represent 2**63 - 1 correctly.
6275 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6276 since some C++ compilers masquerading as C compilers
6277 incorrectly reject 9223372036854775807. */
6278 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
6279 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6280 && LARGE_OFF_T % 2147483647 == 1)
6281 ? 1 : -1];
6282 int
6283 main ()
6284 {
6285
6286 ;
6287 return 0;
6288 }
6289 _ACEOF
6290 if ac_fn_c_try_compile "$LINENO"; then :
6291 ac_cv_sys_large_files=1; break
6292 fi
6293 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6294 ac_cv_sys_large_files=unknown
6295 break
6296 done
6297 fi
6298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
6299 $as_echo "$ac_cv_sys_large_files" >&6; }
6300 case $ac_cv_sys_large_files in #(
6301 no | unknown) ;;
6302 *)
6303 cat >>confdefs.h <<_ACEOF
6304 #define _LARGE_FILES $ac_cv_sys_large_files
6305 _ACEOF
6306 ;;
6307 esac
6308 rm -rf conftest*
6309 fi
6310 fi
6311
6312
6313
6314
6315
6316
6317 case "$host_os" in
6318 openbsd*)
6319
6320 $as_echo "#define _ISOC11_SOURCE 1" >>confdefs.h
6321
6322 ;;
6323 esac
6324
6325
6326
6327
6328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
6329 $as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
6330 if ${gl_cv_c_amsterdam_compiler+:} false; then :
6331 $as_echo_n "(cached) " >&6
6332 else
6333
6334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6335 /* end confdefs.h. */
6336
6337 #ifdef __ACK__
6338 Amsterdam
6339 #endif
6340
6341 _ACEOF
6342 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6343 $EGREP "Amsterdam" >/dev/null 2>&1; then :
6344 gl_cv_c_amsterdam_compiler=yes
6345 else
6346 gl_cv_c_amsterdam_compiler=no
6347 fi
6348 rm -f conftest*
6349
6350
6351 fi
6352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
6353 $as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
6354
6355 if test $gl_cv_c_amsterdam_compiler = yes; then
6356 if test -z "$AR"; then
6357 AR='cc -c.a'
6358 fi
6359 if test -z "$ARFLAGS"; then
6360 ARFLAGS='-o'
6361 fi
6362 else
6363 :
6364 fi
6365
6366 if test -n "$ac_tool_prefix"; then
6367 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6368 set dummy ${ac_tool_prefix}ar; ac_word=$2
6369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6370 $as_echo_n "checking for $ac_word... " >&6; }
6371 if ${ac_cv_prog_AR+:} false; then :
6372 $as_echo_n "(cached) " >&6
6373 else
6374 if test -n "$AR"; then
6375 ac_cv_prog_AR="$AR" # Let the user override the test.
6376 else
6377 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6378 for as_dir in $PATH
6379 do
6380 IFS=$as_save_IFS
6381 test -z "$as_dir" && as_dir=.
6382 for ac_exec_ext in '' $ac_executable_extensions; do
6383 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6384 ac_cv_prog_AR="${ac_tool_prefix}ar"
6385 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6386 break 2
6387 fi
6388 done
6389 done
6390 IFS=$as_save_IFS
6391
6392 fi
6393 fi
6394 AR=$ac_cv_prog_AR
6395 if test -n "$AR"; then
6396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6397 $as_echo "$AR" >&6; }
6398 else
6399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6400 $as_echo "no" >&6; }
6401 fi
6402
6403
6404 fi
6405 if test -z "$ac_cv_prog_AR"; then
6406 ac_ct_AR=$AR
6407 # Extract the first word of "ar", so it can be a program name with args.
6408 set dummy ar; ac_word=$2
6409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6410 $as_echo_n "checking for $ac_word... " >&6; }
6411 if ${ac_cv_prog_ac_ct_AR+:} false; then :
6412 $as_echo_n "(cached) " >&6
6413 else
6414 if test -n "$ac_ct_AR"; then
6415 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6416 else
6417 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6418 for as_dir in $PATH
6419 do
6420 IFS=$as_save_IFS
6421 test -z "$as_dir" && as_dir=.
6422 for ac_exec_ext in '' $ac_executable_extensions; do
6423 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6424 ac_cv_prog_ac_ct_AR="ar"
6425 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6426 break 2
6427 fi
6428 done
6429 done
6430 IFS=$as_save_IFS
6431
6432 fi
6433 fi
6434 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6435 if test -n "$ac_ct_AR"; then
6436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6437 $as_echo "$ac_ct_AR" >&6; }
6438 else
6439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6440 $as_echo "no" >&6; }
6441 fi
6442
6443 if test "x$ac_ct_AR" = x; then
6444 AR="ar"
6445 else
6446 case $cross_compiling:$ac_tool_warned in
6447 yes:)
6448 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6449 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6450 ac_tool_warned=yes ;;
6451 esac
6452 AR=$ac_ct_AR
6453 fi
6454 else
6455 AR="$ac_cv_prog_AR"
6456 fi
6457
6458 if test -z "$ARFLAGS"; then
6459 ARFLAGS='cr'
6460 fi
6461
6462
6463
6464 if test -z "$RANLIB"; then
6465 if test $gl_cv_c_amsterdam_compiler = yes; then
6466 RANLIB=':'
6467 else
6468 if test -n "$ac_tool_prefix"; then
6469 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6470 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6472 $as_echo_n "checking for $ac_word... " >&6; }
6473 if ${ac_cv_prog_RANLIB+:} false; then :
6474 $as_echo_n "(cached) " >&6
6475 else
6476 if test -n "$RANLIB"; then
6477 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6478 else
6479 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6480 for as_dir in $PATH
6481 do
6482 IFS=$as_save_IFS
6483 test -z "$as_dir" && as_dir=.
6484 for ac_exec_ext in '' $ac_executable_extensions; do
6485 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6486 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6487 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6488 break 2
6489 fi
6490 done
6491 done
6492 IFS=$as_save_IFS
6493
6494 fi
6495 fi
6496 RANLIB=$ac_cv_prog_RANLIB
6497 if test -n "$RANLIB"; then
6498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6499 $as_echo "$RANLIB" >&6; }
6500 else
6501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6502 $as_echo "no" >&6; }
6503 fi
6504
6505
6506 fi
6507 if test -z "$ac_cv_prog_RANLIB"; then
6508 ac_ct_RANLIB=$RANLIB
6509 # Extract the first word of "ranlib", so it can be a program name with args.
6510 set dummy ranlib; ac_word=$2
6511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6512 $as_echo_n "checking for $ac_word... " >&6; }
6513 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
6514 $as_echo_n "(cached) " >&6
6515 else
6516 if test -n "$ac_ct_RANLIB"; then
6517 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6518 else
6519 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6520 for as_dir in $PATH
6521 do
6522 IFS=$as_save_IFS
6523 test -z "$as_dir" && as_dir=.
6524 for ac_exec_ext in '' $ac_executable_extensions; do
6525 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6526 ac_cv_prog_ac_ct_RANLIB="ranlib"
6527 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6528 break 2
6529 fi
6530 done
6531 done
6532 IFS=$as_save_IFS
6533
6534 fi
6535 fi
6536 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6537 if test -n "$ac_ct_RANLIB"; then
6538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6539 $as_echo "$ac_ct_RANLIB" >&6; }
6540 else
6541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6542 $as_echo "no" >&6; }
6543 fi
6544
6545 if test "x$ac_ct_RANLIB" = x; then
6546 RANLIB=":"
6547 else
6548 case $cross_compiling:$ac_tool_warned in
6549 yes:)
6550 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6551 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6552 ac_tool_warned=yes ;;
6553 esac
6554 RANLIB=$ac_ct_RANLIB
6555 fi
6556 else
6557 RANLIB="$ac_cv_prog_RANLIB"
6558 fi
6559
6560 fi
6561 fi
6562
6563
6564
6565
6566
6567
6568 # IEEE behaviour is the default on all CPUs except Alpha and SH
6569 # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
6570 # and the GCC 4.1.2 manual).
6571 case "$host_cpu" in
6572 alpha*)
6573 # On Alpha systems, a compiler option provides the behaviour.
6574 # See the ieee(3) manual page, also available at
6575 # <https://backdrift.org/man/tru64/man3/ieee.3.html>
6576 if test -n "$GCC"; then
6577 # GCC has the option -mieee.
6578 # For full IEEE compliance (rarely needed), use option -mieee-with-inexact.
6579 CPPFLAGS="$CPPFLAGS -mieee"
6580 else
6581 # Compaq (ex-DEC) C has the option -ieee, equivalent to -ieee_with_no_inexact.
6582 # For full IEEE compliance (rarely needed), use option -ieee_with_inexact.
6583 CPPFLAGS="$CPPFLAGS -ieee"
6584 fi
6585 ;;
6586 sh*)
6587 if test -n "$GCC"; then
6588 # GCC has the option -mieee.
6589 CPPFLAGS="$CPPFLAGS -mieee"
6590 fi
6591 ;;
6592 esac
6593
6594
6595
6596
6597
6598
6599
6600 # Check whether --enable-threads was given.
6601 if test "${enable_threads+set}" = set; then :
6602 enableval=$enable_threads; gl_use_threads=$enableval
6603 else
6604 if test -n "$gl_use_threads_default"; then
6605 gl_use_threads="$gl_use_threads_default"
6606 else
6607 case "$host_os" in
6608 osf*) gl_use_threads=no ;;
6609 cygwin*)
6610 case `uname -r` in
6611 1.[0-5].*) gl_use_threads=no ;;
6612 *) gl_use_threads=yes ;;
6613 esac
6614 ;;
6615 mingw*)
6616 case "$gl_use_winpthreads_default" in
6617 yes) gl_use_threads=posix ;;
6618 no) gl_use_threads=windows ;;
6619 *) gl_use_threads=yes ;;
6620 esac
6621 ;;
6622 *) gl_use_threads=yes ;;
6623 esac
6624 fi
6625
6626 fi
6627
6628 if test "$gl_use_threads" = yes \
6629 || test "$gl_use_threads" = isoc \
6630 || test "$gl_use_threads" = posix \
6631 || test "$gl_use_threads" = isoc+posix; then
6632 # For using <threads.h> or <pthread.h>:
6633
6634
6635 if test -z "$gl_anythreadlib_early_done"; then
6636 case "$host_os" in
6637 osf*)
6638 # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
6639 # groks <pthread.h>. cc also understands the flag -pthread, but
6640 # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
6641 # 2. putting a flag into CPPFLAGS that has an effect on the linker
6642 # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
6643 # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
6644 CPPFLAGS="$CPPFLAGS -D_REENTRANT"
6645 ;;
6646 esac
6647 # Some systems optimize for single-threaded programs by default, and
6648 # need special flags to disable these optimizations. For example, the
6649 # definition of 'errno' in <errno.h>.
6650 case "$host_os" in
6651 aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
6652 solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
6653 esac
6654 gl_anythreadlib_early_done=done
6655 fi
6656
6657 fi
6658
6659
6660
6661 # Pre-early section.
6662
6663
6664
6665
6666 # Code from module absolute-header:
6667 # Code from module alloca:
6668 # Code from module alloca-opt:
6669 # Code from module arpa_inet:
6670 # Code from module assure:
6671 # Code from module at-internal:
6672 # Code from module attribute:
6673 # Code from module basename-lgpl:
6674 # Code from module btowc:
6675 # Code from module builtin-expect:
6676 # Code from module c99:
6677 # Code from module canonicalize-lgpl:
6678 # Code from module chdir:
6679 # Code from module chdir-long:
6680 # Code from module clock-time:
6681 # Code from module cloexec:
6682 # Code from module close:
6683 # Code from module closedir:
6684 # Code from module count-one-bits:
6685 # Code from module ctype:
6686 # Code from module d-ino:
6687 # Code from module d-type:
6688 # Code from module dirent:
6689 # Code from module dirfd:
6690 # Code from module dirname-lgpl:
6691 # Code from module double-slash-root:
6692 # Code from module dup:
6693 # Code from module dup2:
6694 # Code from module eloop-threshold:
6695 # Code from module environ:
6696 # Code from module errno:
6697 # Code from module error:
6698 # Code from module exitfail:
6699 # Code from module extensions:
6700 # Code from module extern-inline:
6701 # Code from module fchdir:
6702 # Code from module fcntl:
6703 # Code from module fcntl-h:
6704 # Code from module fd-hook:
6705 # Code from module fd-safer-flag:
6706 # Code from module fdopendir:
6707 # Code from module filename:
6708 # Code from module filenamecat-lgpl:
6709 # Code from module flexmember:
6710 # Code from module float:
6711 # Code from module fnmatch:
6712 # Code from module fnmatch-gnu:
6713 # Code from module fnmatch-h:
6714 # Code from module fpieee:
6715
6716 # Code from module fpucw:
6717 # Code from module free-posix:
6718 # Code from module frexp:
6719 # Code from module frexpl:
6720 # Code from module fstat:
6721 # Code from module fstatat:
6722 # Code from module getcwd:
6723 # Code from module getcwd-lgpl:
6724 # Code from module getdelim:
6725 # Code from module getdtablesize:
6726 # Code from module getline:
6727 # Code from module getlogin_r:
6728 # Code from module getprogname:
6729 # Code from module getrandom:
6730 # Code from module gettext-h:
6731 # Code from module gettimeofday:
6732 # Code from module gitlog-to-changelog:
6733 # Code from module glob:
6734 # Code from module glob-h:
6735 # Code from module hard-locale:
6736 # Code from module idx:
6737 # Code from module include_next:
6738 # Code from module inet_ntop:
6739 # Code from module intprops:
6740 # Code from module inttypes:
6741 # Code from module inttypes-incomplete:
6742 # Code from module isblank:
6743 # Code from module isnand-nolibm:
6744 # Code from module isnanl-nolibm:
6745 # Code from module largefile:
6746
6747 # Code from module libc-config:
6748 # Code from module limits-h:
6749 # Code from module localcharset:
6750 # Code from module locale:
6751 # Code from module lock:
6752 # Code from module lstat:
6753 # Code from module malloc-posix:
6754 # Code from module malloca:
6755 # Code from module math:
6756 # Code from module mbrtowc:
6757 # Code from module mbsinit:
6758 # Code from module mbsrtowcs:
6759 # Code from module mbtowc:
6760 # Code from module memchr:
6761 # Code from module memmem:
6762 # Code from module memmem-simple:
6763 # Code from module mempcpy:
6764 # Code from module memrchr:
6765 # Code from module minmax:
6766 # Code from module mkdir:
6767 # Code from module mkdtemp:
6768 # Code from module mkostemp:
6769 # Code from module msvc-inval:
6770 # Code from module msvc-nothrow:
6771 # Code from module multiarch:
6772 # Code from module netinet_in:
6773 # Code from module nocrash:
6774 # Code from module open:
6775 # Code from module openat:
6776 # Code from module openat-die:
6777 # Code from module openat-h:
6778 # Code from module opendir:
6779 # Code from module pathmax:
6780 # Code from module pipe-posix:
6781 # Code from module rawmemchr:
6782 # Code from module readdir:
6783 # Code from module readlink:
6784 # Code from module realloc-posix:
6785 # Code from module rename:
6786 # Code from module rewinddir:
6787 # Code from module rmdir:
6788 # Code from module same-inode:
6789 # Code from module save-cwd:
6790 # Code from module scratch_buffer:
6791 # Code from module setenv:
6792 # Code from module setlocale-null:
6793 # Code from module signal-h:
6794 # Code from module snippet/_Noreturn:
6795 # Code from module snippet/arg-nonnull:
6796 # Code from module snippet/c++defs:
6797 # Code from module snippet/warn-on-use:
6798 # Code from module socklen:
6799 # Code from module ssize_t:
6800 # Code from module stat:
6801 # Code from module stat-time:
6802 # Code from module std-gnu11:
6803 # Code from module stdalign:
6804 # Code from module stdbool:
6805 # Code from module stddef:
6806 # Code from module stdint:
6807 # Code from module stdio:
6808 # Code from module stdlib:
6809 # Code from module strchrnul:
6810 # Code from module strdup-posix:
6811 # Code from module streq:
6812 # Code from module strerror:
6813 # Code from module strerror-override:
6814 # Code from module strerror_r-posix:
6815 # Code from module string:
6816 # Code from module strnlen:
6817 # Code from module strnlen1:
6818 # Code from module strstr:
6819 # Code from module strstr-simple:
6820 # Code from module strtok_r:
6821 # Code from module sys_random:
6822 # Code from module sys_socket:
6823 # Code from module sys_stat:
6824 # Code from module sys_time:
6825 # Code from module sys_types:
6826 # Code from module sys_uio:
6827 # Code from module tempname:
6828 # Code from module threadlib:
6829
6830
6831
6832 # Code from module time:
6833 # Code from module time_r:
6834 # Code from module unistd:
6835 # Code from module unistd-safer:
6836 # Code from module unsetenv:
6837 # Code from module update-copyright:
6838 # Code from module verify:
6839 # Code from module wchar:
6840 # Code from module wctype-h:
6841 # Code from module windows-mutex:
6842 # Code from module windows-once:
6843 # Code from module windows-recmutex:
6844 # Code from module windows-rwlock:
6845 # Code from module wmemchr:
6846 # Code from module wmempcpy:
6847 # Code from module xalloc-oversized:
6848
6849
6850 am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
6851
6852
6853 ac_aux_dir=
6854 for ac_dir in .. "$srcdir"/..; do
6855 if test -f "$ac_dir/install-sh"; then
6856 ac_aux_dir=$ac_dir
6857 ac_install_sh="$ac_aux_dir/install-sh -c"
6858 break
6859 elif test -f "$ac_dir/install.sh"; then
6860 ac_aux_dir=$ac_dir
6861 ac_install_sh="$ac_aux_dir/install.sh -c"
6862 break
6863 elif test -f "$ac_dir/shtool"; then
6864 ac_aux_dir=$ac_dir
6865 ac_install_sh="$ac_aux_dir/shtool install -c"
6866 break
6867 fi
6868 done
6869 if test -z "$ac_aux_dir"; then
6870 as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
6871 fi
6872
6873 # These three variables are undocumented and unsupported,
6874 # and are intended to be withdrawn in a future Autoconf release.
6875 # They can cause serious problems if a builder's source tree is in a directory
6876 # whose full name contains unusual characters.
6877 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
6878 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
6879 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892 # Check whether --enable-cross-guesses was given.
6893 if test "${enable_cross_guesses+set}" = set; then :
6894 enableval=$enable_cross_guesses; if test "x$enableval" != xconservative && test "x$enableval" != xrisky; then
6895 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: invalid argument supplied to --enable-cross-guesses" >&5
6896 $as_echo "$as_me: WARNING: invalid argument supplied to --enable-cross-guesses" >&2;}
6897 enableval=conservative
6898 fi
6899 gl_cross_guesses="$enableval"
6900 else
6901 gl_cross_guesses=conservative
6902 fi
6903
6904 if test $gl_cross_guesses = risky; then
6905 gl_cross_guess_normal="guessing yes"
6906 gl_cross_guess_inverted="guessing no"
6907 else
6908 gl_cross_guess_normal="guessing no"
6909 gl_cross_guess_inverted="guessing yes"
6910 fi
6911 LIBC_FATAL_STDERR_=1
6912 export LIBC_FATAL_STDERR_
6913
6914
6915 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
6916 if test "x$ac_cv_type_size_t" = xyes; then :
6917
6918 else
6919
6920 cat >>confdefs.h <<_ACEOF
6921 #define size_t unsigned int
6922 _ACEOF
6923
6924 fi
6925
6926 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6927 # for constant arguments. Useless!
6928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
6929 $as_echo_n "checking for working alloca.h... " >&6; }
6930 if ${ac_cv_working_alloca_h+:} false; then :
6931 $as_echo_n "(cached) " >&6
6932 else
6933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6934 /* end confdefs.h. */
6935 #include <alloca.h>
6936 int
6937 main ()
6938 {
6939 char *p = (char *) alloca (2 * sizeof (int));
6940 if (p) return 0;
6941 ;
6942 return 0;
6943 }
6944 _ACEOF
6945 if ac_fn_c_try_link "$LINENO"; then :
6946 ac_cv_working_alloca_h=yes
6947 else
6948 ac_cv_working_alloca_h=no
6949 fi
6950 rm -f core conftest.err conftest.$ac_objext \
6951 conftest$ac_exeext conftest.$ac_ext
6952 fi
6953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
6954 $as_echo "$ac_cv_working_alloca_h" >&6; }
6955 if test $ac_cv_working_alloca_h = yes; then
6956
6957 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
6958
6959 fi
6960
6961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
6962 $as_echo_n "checking for alloca... " >&6; }
6963 if ${ac_cv_func_alloca_works+:} false; then :
6964 $as_echo_n "(cached) " >&6
6965 else
6966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6967 /* end confdefs.h. */
6968 #ifdef __GNUC__
6969 # define alloca __builtin_alloca
6970 #else
6971 # ifdef _MSC_VER
6972 # include <malloc.h>
6973 # define alloca _alloca
6974 # else
6975 # ifdef HAVE_ALLOCA_H
6976 # include <alloca.h>
6977 # else
6978 # ifdef _AIX
6979 #pragma alloca
6980 # else
6981 # ifndef alloca /* predefined by HP cc +Olibcalls */
6982 void *alloca (size_t);
6983 # endif
6984 # endif
6985 # endif
6986 # endif
6987 #endif
6988
6989 int
6990 main ()
6991 {
6992 char *p = (char *) alloca (1);
6993 if (p) return 0;
6994 ;
6995 return 0;
6996 }
6997 _ACEOF
6998 if ac_fn_c_try_link "$LINENO"; then :
6999 ac_cv_func_alloca_works=yes
7000 else
7001 ac_cv_func_alloca_works=no
7002 fi
7003 rm -f core conftest.err conftest.$ac_objext \
7004 conftest$ac_exeext conftest.$ac_ext
7005 fi
7006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
7007 $as_echo "$ac_cv_func_alloca_works" >&6; }
7008
7009 if test $ac_cv_func_alloca_works = yes; then
7010
7011 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
7012
7013 else
7014 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
7015 # that cause trouble. Some versions do not even contain alloca or
7016 # contain a buggy version. If you still want to use their alloca,
7017 # use ar to extract alloca.o from them instead of compiling alloca.c.
7018
7019
7020
7021
7022
7023 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
7024
7025 $as_echo "#define C_ALLOCA 1" >>confdefs.h
7026
7027
7028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
7029 $as_echo_n "checking stack direction for C alloca... " >&6; }
7030 if ${ac_cv_c_stack_direction+:} false; then :
7031 $as_echo_n "(cached) " >&6
7032 else
7033 if test "$cross_compiling" = yes; then :
7034 ac_cv_c_stack_direction=0
7035 else
7036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7037 /* end confdefs.h. */
7038 $ac_includes_default
7039 int
7040 find_stack_direction (int *addr, int depth)
7041 {
7042 int dir, dummy = 0;
7043 if (! addr)
7044 addr = &dummy;
7045 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
7046 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
7047 return dir + dummy;
7048 }
7049
7050 int
7051 main (int argc, char **argv)
7052 {
7053 return find_stack_direction (0, argc + !argv + 20) < 0;
7054 }
7055 _ACEOF
7056 if ac_fn_c_try_run "$LINENO"; then :
7057 ac_cv_c_stack_direction=1
7058 else
7059 ac_cv_c_stack_direction=-1
7060 fi
7061 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7062 conftest.$ac_objext conftest.beam conftest.$ac_ext
7063 fi
7064
7065 fi
7066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
7067 $as_echo "$ac_cv_c_stack_direction" >&6; }
7068 cat >>confdefs.h <<_ACEOF
7069 #define STACK_DIRECTION $ac_cv_c_stack_direction
7070 _ACEOF
7071
7072
7073 fi
7074
7075
7076 GNULIB_INET_NTOP=0;
7077 GNULIB_INET_PTON=0;
7078 HAVE_DECL_INET_NTOP=1;
7079 HAVE_DECL_INET_PTON=1;
7080 REPLACE_INET_NTOP=0;
7081 REPLACE_INET_PTON=0;
7082
7083
7084
7085
7086
7087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
7088 $as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
7089 if ${gl_cv_have_include_next+:} false; then :
7090 $as_echo_n "(cached) " >&6
7091 else
7092 rm -rf conftestd1a conftestd1b conftestd2
7093 mkdir conftestd1a conftestd1b conftestd2
7094 cat <<EOF > conftestd1a/conftest.h
7095 #define DEFINED_IN_CONFTESTD1
7096 #include_next <conftest.h>
7097 #ifdef DEFINED_IN_CONFTESTD2
7098 int foo;
7099 #else
7100 #error "include_next doesn't work"
7101 #endif
7102 EOF
7103 cat <<EOF > conftestd1b/conftest.h
7104 #define DEFINED_IN_CONFTESTD1
7105 #include <stdio.h>
7106 #include_next <conftest.h>
7107 #ifdef DEFINED_IN_CONFTESTD2
7108 int foo;
7109 #else
7110 #error "include_next doesn't work"
7111 #endif
7112 EOF
7113 cat <<EOF > conftestd2/conftest.h
7114 #ifndef DEFINED_IN_CONFTESTD1
7115 #error "include_next test doesn't work"
7116 #endif
7117 #define DEFINED_IN_CONFTESTD2
7118 EOF
7119 gl_save_CPPFLAGS="$CPPFLAGS"
7120 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
7121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7122 /* end confdefs.h. */
7123 #include <conftest.h>
7124 _ACEOF
7125 if ac_fn_c_try_compile "$LINENO"; then :
7126 gl_cv_have_include_next=yes
7127 else
7128 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
7129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7130 /* end confdefs.h. */
7131 #include <conftest.h>
7132 _ACEOF
7133 if ac_fn_c_try_compile "$LINENO"; then :
7134 gl_cv_have_include_next=buggy
7135 else
7136 gl_cv_have_include_next=no
7137 fi
7138 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7139
7140 fi
7141 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7142 CPPFLAGS="$gl_save_CPPFLAGS"
7143 rm -rf conftestd1a conftestd1b conftestd2
7144
7145 fi
7146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
7147 $as_echo "$gl_cv_have_include_next" >&6; }
7148 PRAGMA_SYSTEM_HEADER=
7149 if test $gl_cv_have_include_next = yes; then
7150 INCLUDE_NEXT=include_next
7151 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
7152 if test -n "$GCC"; then
7153 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
7154 fi
7155 else
7156 if test $gl_cv_have_include_next = buggy; then
7157 INCLUDE_NEXT=include
7158 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
7159 else
7160 INCLUDE_NEXT=include
7161 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
7162 fi
7163 fi
7164
7165
7166
7167
7168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether source code line length is unlimited" >&5
7169 $as_echo_n "checking whether source code line length is unlimited... " >&6; }
7170 if ${gl_cv_source_line_length_unlimited+:} false; then :
7171 $as_echo_n "(cached) " >&6
7172 else
7173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7174 /* end confdefs.h. */
7175
7176 #ifdef __TANDEM
7177 choke me
7178 #endif
7179
7180 _ACEOF
7181 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7182 $EGREP "choke me" >/dev/null 2>&1; then :
7183 gl_cv_source_line_length_unlimited=no
7184 else
7185 gl_cv_source_line_length_unlimited=yes
7186 fi
7187 rm -f conftest*
7188
7189
7190 fi
7191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_source_line_length_unlimited" >&5
7192 $as_echo "$gl_cv_source_line_length_unlimited" >&6; }
7193 if test $gl_cv_source_line_length_unlimited = no; then
7194 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
7195 else
7196 PRAGMA_COLUMNS=
7197 fi
7198
7199
7200
7201
7202
7203
7204 if test $ac_cv_header_features_h = yes; then
7205 HAVE_FEATURES_H=1
7206 else
7207 HAVE_FEATURES_H=0
7208 fi
7209
7210
7211
7212
7213
7214 if test $ac_cv_header_sys_socket_h = no; then
7215 for ac_header in ws2tcpip.h
7216 do :
7217 ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
7218 if test "x$ac_cv_header_ws2tcpip_h" = xyes; then :
7219 cat >>confdefs.h <<_ACEOF
7220 #define HAVE_WS2TCPIP_H 1
7221 _ACEOF
7222
7223 fi
7224
7225 done
7226
7227 fi
7228
7229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
7230 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
7231 if test -z "$MKDIR_P"; then
7232 if ${ac_cv_path_mkdir+:} false; then :
7233 $as_echo_n "(cached) " >&6
7234 else
7235 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7236 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
7237 do
7238 IFS=$as_save_IFS
7239 test -z "$as_dir" && as_dir=.
7240 for ac_prog in mkdir gmkdir; do
7241 for ac_exec_ext in '' $ac_executable_extensions; do
7242 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
7243 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
7244 'mkdir (GNU coreutils) '* | \
7245 'mkdir (coreutils) '* | \
7246 'mkdir (fileutils) '4.1*)
7247 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
7248 break 3;;
7249 esac
7250 done
7251 done
7252 done
7253 IFS=$as_save_IFS
7254
7255 fi
7256
7257 test -d ./--version && rmdir ./--version
7258 if test "${ac_cv_path_mkdir+set}" = set; then
7259 MKDIR_P="$ac_cv_path_mkdir -p"
7260 else
7261 # As a last resort, use the slow shell script. Don't cache a
7262 # value for MKDIR_P within a source directory, because that will
7263 # break other packages using the cache if that directory is
7264 # removed, or if the value is a relative name.
7265 MKDIR_P="$ac_install_sh -d"
7266 fi
7267 fi
7268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
7269 $as_echo "$MKDIR_P" >&6; }
7270
7271
7272 GNULIB_BTOWC=0;
7273 GNULIB_WCTOB=0;
7274 GNULIB_MBSINIT=0;
7275 GNULIB_MBRTOWC=0;
7276 GNULIB_MBRLEN=0;
7277 GNULIB_MBSRTOWCS=0;
7278 GNULIB_MBSNRTOWCS=0;
7279 GNULIB_WCRTOMB=0;
7280 GNULIB_WCSRTOMBS=0;
7281 GNULIB_WCSNRTOMBS=0;
7282 GNULIB_WCWIDTH=0;
7283 GNULIB_WMEMCHR=0;
7284 GNULIB_WMEMCMP=0;
7285 GNULIB_WMEMCPY=0;
7286 GNULIB_WMEMMOVE=0;
7287 GNULIB_WMEMPCPY=0;
7288 GNULIB_WMEMSET=0;
7289 GNULIB_WCSLEN=0;
7290 GNULIB_WCSNLEN=0;
7291 GNULIB_WCSCPY=0;
7292 GNULIB_WCPCPY=0;
7293 GNULIB_WCSNCPY=0;
7294 GNULIB_WCPNCPY=0;
7295 GNULIB_WCSCAT=0;
7296 GNULIB_WCSNCAT=0;
7297 GNULIB_WCSCMP=0;
7298 GNULIB_WCSNCMP=0;
7299 GNULIB_WCSCASECMP=0;
7300 GNULIB_WCSNCASECMP=0;
7301 GNULIB_WCSCOLL=0;
7302 GNULIB_WCSXFRM=0;
7303 GNULIB_WCSDUP=0;
7304 GNULIB_WCSCHR=0;
7305 GNULIB_WCSRCHR=0;
7306 GNULIB_WCSCSPN=0;
7307 GNULIB_WCSSPN=0;
7308 GNULIB_WCSPBRK=0;
7309 GNULIB_WCSSTR=0;
7310 GNULIB_WCSTOK=0;
7311 GNULIB_WCSWIDTH=0;
7312 GNULIB_WCSFTIME=0;
7313 GNULIB_MDA_WCSDUP=1;
7314 HAVE_BTOWC=1;
7315 HAVE_MBSINIT=1;
7316 HAVE_MBRTOWC=1;
7317 HAVE_MBRLEN=1;
7318 HAVE_MBSRTOWCS=1;
7319 HAVE_MBSNRTOWCS=1;
7320 HAVE_WCRTOMB=1;
7321 HAVE_WCSRTOMBS=1;
7322 HAVE_WCSNRTOMBS=1;
7323 HAVE_WMEMCHR=1;
7324 HAVE_WMEMCMP=1;
7325 HAVE_WMEMCPY=1;
7326 HAVE_WMEMMOVE=1;
7327 HAVE_WMEMPCPY=1;
7328 HAVE_WMEMSET=1;
7329 HAVE_WCSLEN=1;
7330 HAVE_WCSNLEN=1;
7331 HAVE_WCSCPY=1;
7332 HAVE_WCPCPY=1;
7333 HAVE_WCSNCPY=1;
7334 HAVE_WCPNCPY=1;
7335 HAVE_WCSCAT=1;
7336 HAVE_WCSNCAT=1;
7337 HAVE_WCSCMP=1;
7338 HAVE_WCSNCMP=1;
7339 HAVE_WCSCASECMP=1;
7340 HAVE_WCSNCASECMP=1;
7341 HAVE_WCSCOLL=1;
7342 HAVE_WCSXFRM=1;
7343 HAVE_WCSDUP=1;
7344 HAVE_WCSCHR=1;
7345 HAVE_WCSRCHR=1;
7346 HAVE_WCSCSPN=1;
7347 HAVE_WCSSPN=1;
7348 HAVE_WCSPBRK=1;
7349 HAVE_WCSSTR=1;
7350 HAVE_WCSTOK=1;
7351 HAVE_WCSWIDTH=1;
7352 HAVE_WCSFTIME=1;
7353 HAVE_DECL_WCTOB=1;
7354 HAVE_DECL_WCSDUP=1;
7355 HAVE_DECL_WCWIDTH=1;
7356 REPLACE_MBSTATE_T=0;
7357 REPLACE_BTOWC=0;
7358 REPLACE_WCTOB=0;
7359 REPLACE_MBSINIT=0;
7360 REPLACE_MBRTOWC=0;
7361 REPLACE_MBRLEN=0;
7362 REPLACE_MBSRTOWCS=0;
7363 REPLACE_MBSNRTOWCS=0;
7364 REPLACE_WCRTOMB=0;
7365 REPLACE_WCSRTOMBS=0;
7366 REPLACE_WCSNRTOMBS=0;
7367 REPLACE_WCWIDTH=0;
7368 REPLACE_WCSWIDTH=0;
7369 REPLACE_WCSFTIME=0;
7370 REPLACE_WCSTOK=0;
7371
7372
7373
7374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
7375 $as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
7376 if ${gl_cv_header_wchar_h_correct_inline+:} false; then :
7377 $as_echo_n "(cached) " >&6
7378 else
7379 gl_cv_header_wchar_h_correct_inline=yes
7380 case "$host_os" in
7381 *-gnu* | gnu*)
7382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7383 /* end confdefs.h. */
7384
7385
7386 #define wcstod renamed_wcstod
7387 #include <wchar.h>
7388 extern int zero (void);
7389 int main () { return zero(); }
7390
7391 _ACEOF
7392 save_ac_compile="$ac_compile"
7393 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
7394 if echo '#include "conftest.c"' >conftest1.c \
7395 && { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7396 (eval $ac_compile) 2>&5
7397 ac_status=$?
7398 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7399 test $ac_status = 0; }; then
7400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7401 /* end confdefs.h. */
7402
7403
7404 #define wcstod renamed_wcstod
7405 #include <wchar.h>
7406 int zero (void) { return 0; }
7407
7408 _ACEOF
7409 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
7410 if echo '#include "conftest.c"' >conftest2.c \
7411 && { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7412 (eval $ac_compile) 2>&5
7413 ac_status=$?
7414 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7415 test $ac_status = 0; }; then
7416 if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
7417 :
7418 else
7419 gl_cv_header_wchar_h_correct_inline=no
7420 fi
7421 fi
7422 fi
7423 ac_compile="$save_ac_compile"
7424 rm -f conftest12.c conftest12.$ac_objext conftest$ac_exeext
7425 ;;
7426 esac
7427
7428 fi
7429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
7430 $as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
7431 if test $gl_cv_header_wchar_h_correct_inline = no; then
7432 as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
7433 This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
7434 C99 mode. You have four options:
7435 - Add the flag -fgnu89-inline to CC and reconfigure, or
7436 - Fix your include files, using parts of
7437 <https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
7438 - Use a gcc version older than 4.3, or
7439 - Don't use the flags -std=c99 or -std=gnu99.
7440 Configuration aborted." "$LINENO" 5
7441 fi
7442
7443
7444
7445
7446 for ac_func in $ac_func_list
7447 do :
7448 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7449 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7450 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7451 cat >>confdefs.h <<_ACEOF
7452 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7453 _ACEOF
7454
7455 fi
7456 done
7457
7458
7459
7460
7461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
7462 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
7463 if ${am_cv_langinfo_codeset+:} false; then :
7464 $as_echo_n "(cached) " >&6
7465 else
7466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7467 /* end confdefs.h. */
7468 #include <langinfo.h>
7469 int
7470 main ()
7471 {
7472 char* cs = nl_langinfo(CODESET); return !cs;
7473 ;
7474 return 0;
7475 }
7476 _ACEOF
7477 if ac_fn_c_try_link "$LINENO"; then :
7478 am_cv_langinfo_codeset=yes
7479 else
7480 am_cv_langinfo_codeset=no
7481 fi
7482 rm -f core conftest.err conftest.$ac_objext \
7483 conftest$ac_exeext conftest.$ac_ext
7484
7485 fi
7486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
7487 $as_echo "$am_cv_langinfo_codeset" >&6; }
7488 if test $am_cv_langinfo_codeset = yes; then
7489
7490 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
7491
7492 fi
7493
7494
7495
7496
7497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
7498 $as_echo_n "checking for a traditional french locale... " >&6; }
7499 if ${gt_cv_locale_fr+:} false; then :
7500 $as_echo_n "(cached) " >&6
7501 else
7502
7503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7504 /* end confdefs.h. */
7505
7506 #include <locale.h>
7507 #include <time.h>
7508 #if HAVE_LANGINFO_CODESET
7509 # include <langinfo.h>
7510 #endif
7511 #include <stdlib.h>
7512 #include <string.h>
7513 struct tm t;
7514 char buf[16];
7515 int main () {
7516 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
7517 imitates locale dependent behaviour by looking at the environment
7518 variables, and all locales use the UTF-8 encoding. */
7519 #if defined __BEOS__ || defined __HAIKU__
7520 return 1;
7521 #else
7522 /* Check whether the given locale name is recognized by the system. */
7523 # if defined _WIN32 && !defined __CYGWIN__
7524 /* On native Windows, setlocale(category, "") looks at the system settings,
7525 not at the environment variables. Also, when an encoding suffix such
7526 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
7527 category of the locale to "C". */
7528 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
7529 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
7530 return 1;
7531 # else
7532 if (setlocale (LC_ALL, "") == NULL) return 1;
7533 # endif
7534 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
7535 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
7536 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
7537 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
7538 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
7539 some unit tests fail.
7540 On MirBSD 10, when an unsupported locale is specified, setlocale()
7541 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
7542 # if HAVE_LANGINFO_CODESET
7543 {
7544 const char *cs = nl_langinfo (CODESET);
7545 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
7546 || strcmp (cs, "UTF-8") == 0)
7547 return 1;
7548 }
7549 # endif
7550 # ifdef __CYGWIN__
7551 /* On Cygwin, avoid locale names without encoding suffix, because the
7552 locale_charset() function relies on the encoding suffix. Note that
7553 LC_ALL is set on the command line. */
7554 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
7555 # endif
7556 /* Check whether in the abbreviation of the second month, the second
7557 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
7558 one byte long. This excludes the UTF-8 encoding. */
7559 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
7560 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
7561 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
7562 /* Check whether the decimal separator is a comma.
7563 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
7564 are nl_langinfo(RADIXCHAR) are both ".". */
7565 if (localeconv () ->decimal_point[0] != ',') return 1;
7566 # endif
7567 return 0;
7568 #endif
7569 }
7570
7571 _ACEOF
7572 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
7573 (eval $ac_link) 2>&5
7574 ac_status=$?
7575 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7576 test $ac_status = 0; } && test -s conftest$ac_exeext; then
7577 case "$host_os" in
7578 # Handle native Windows specially, because there setlocale() interprets
7579 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
7580 # "fr" or "fra" as "French" or "French_France.1252",
7581 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
7582 # "ja" as "Japanese" or "Japanese_Japan.932",
7583 # and similar.
7584 mingw*)
7585 # Test for the native Windows locale name.
7586 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7587 gt_cv_locale_fr=French_France.1252
7588 else
7589 # None found.
7590 gt_cv_locale_fr=none
7591 fi
7592 ;;
7593 *)
7594 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
7595 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
7596 # configure script would override the LC_ALL setting. Likewise for
7597 # LC_CTYPE, which is also set at the beginning of the configure script.
7598 # Test for the usual locale name.
7599 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7600 gt_cv_locale_fr=fr_FR
7601 else
7602 # Test for the locale name with explicit encoding suffix.
7603 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7604 gt_cv_locale_fr=fr_FR.ISO-8859-1
7605 else
7606 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
7607 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7608 gt_cv_locale_fr=fr_FR.ISO8859-1
7609 else
7610 # Test for the HP-UX locale name.
7611 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7612 gt_cv_locale_fr=fr_FR.iso88591
7613 else
7614 # Test for the Solaris 7 locale name.
7615 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7616 gt_cv_locale_fr=fr
7617 else
7618 # None found.
7619 gt_cv_locale_fr=none
7620 fi
7621 fi
7622 fi
7623 fi
7624 fi
7625 ;;
7626 esac
7627 fi
7628 rm -fr conftest*
7629
7630 fi
7631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
7632 $as_echo "$gt_cv_locale_fr" >&6; }
7633 LOCALE_FR=$gt_cv_locale_fr
7634
7635
7636
7637 GNULIB__EXIT=0;
7638 GNULIB_ALIGNED_ALLOC=0;
7639 GNULIB_ATOLL=0;
7640 GNULIB_CALLOC_POSIX=0;
7641 GNULIB_CANONICALIZE_FILE_NAME=0;
7642 GNULIB_FREE_POSIX=0;
7643 GNULIB_GETLOADAVG=0;
7644 GNULIB_GETSUBOPT=0;
7645 GNULIB_GRANTPT=0;
7646 GNULIB_MALLOC_POSIX=0;
7647 GNULIB_MBTOWC=0;
7648 GNULIB_MKDTEMP=0;
7649 GNULIB_MKOSTEMP=0;
7650 GNULIB_MKOSTEMPS=0;
7651 GNULIB_MKSTEMP=0;
7652 GNULIB_MKSTEMPS=0;
7653 GNULIB_POSIX_MEMALIGN=0;
7654 GNULIB_POSIX_OPENPT=0;
7655 GNULIB_PTSNAME=0;
7656 GNULIB_PTSNAME_R=0;
7657 GNULIB_PUTENV=0;
7658 GNULIB_QSORT_R=0;
7659 GNULIB_RANDOM=0;
7660 GNULIB_RANDOM_R=0;
7661 GNULIB_REALLOCARRAY=0;
7662 GNULIB_REALLOC_POSIX=0;
7663 GNULIB_REALPATH=0;
7664 GNULIB_RPMATCH=0;
7665 GNULIB_SECURE_GETENV=0;
7666 GNULIB_SETENV=0;
7667 GNULIB_STRTOD=0;
7668 GNULIB_STRTOLD=0;
7669 GNULIB_STRTOLL=0;
7670 GNULIB_STRTOULL=0;
7671 GNULIB_SYSTEM_POSIX=0;
7672 GNULIB_UNLOCKPT=0;
7673 GNULIB_UNSETENV=0;
7674 GNULIB_WCTOMB=0;
7675 GNULIB_MDA_ECVT=1;
7676 GNULIB_MDA_FCVT=1;
7677 GNULIB_MDA_GCVT=1;
7678 GNULIB_MDA_MKTEMP=1;
7679 GNULIB_MDA_PUTENV=1;
7680 HAVE__EXIT=1;
7681 HAVE_ALIGNED_ALLOC=1;
7682 HAVE_ATOLL=1;
7683 HAVE_CANONICALIZE_FILE_NAME=1;
7684 HAVE_DECL_ECVT=1;
7685 HAVE_DECL_FCVT=1;
7686 HAVE_DECL_GCVT=1;
7687 HAVE_DECL_GETLOADAVG=1;
7688 HAVE_GETSUBOPT=1;
7689 HAVE_GRANTPT=1;
7690 HAVE_INITSTATE=1;
7691 HAVE_DECL_INITSTATE=1;
7692 HAVE_MBTOWC=1;
7693 HAVE_MKDTEMP=1;
7694 HAVE_MKOSTEMP=1;
7695 HAVE_MKOSTEMPS=1;
7696 HAVE_MKSTEMP=1;
7697 HAVE_MKSTEMPS=1;
7698 HAVE_POSIX_MEMALIGN=1;
7699 HAVE_POSIX_OPENPT=1;
7700 HAVE_PTSNAME=1;
7701 HAVE_PTSNAME_R=1;
7702 HAVE_QSORT_R=1;
7703 HAVE_RANDOM=1;
7704 HAVE_RANDOM_H=1;
7705 HAVE_RANDOM_R=1;
7706 HAVE_REALLOCARRAY=1;
7707 HAVE_REALPATH=1;
7708 HAVE_RPMATCH=1;
7709 HAVE_SECURE_GETENV=1;
7710 HAVE_SETENV=1;
7711 HAVE_DECL_SETENV=1;
7712 HAVE_SETSTATE=1;
7713 HAVE_DECL_SETSTATE=1;
7714 HAVE_STRTOD=1;
7715 HAVE_STRTOLD=1;
7716 HAVE_STRTOLL=1;
7717 HAVE_STRTOULL=1;
7718 HAVE_STRUCT_RANDOM_DATA=1;
7719 HAVE_SYS_LOADAVG_H=0;
7720 HAVE_UNLOCKPT=1;
7721 HAVE_DECL_UNSETENV=1;
7722 REPLACE_ALIGNED_ALLOC=0;
7723 REPLACE_CALLOC=0;
7724 REPLACE_CANONICALIZE_FILE_NAME=0;
7725 REPLACE_FREE=0;
7726 REPLACE_INITSTATE=0;
7727 REPLACE_MALLOC=0;
7728 REPLACE_MBTOWC=0;
7729 REPLACE_MKSTEMP=0;
7730 REPLACE_POSIX_MEMALIGN=0;
7731 REPLACE_PTSNAME=0;
7732 REPLACE_PTSNAME_R=0;
7733 REPLACE_PUTENV=0;
7734 REPLACE_QSORT_R=0;
7735 REPLACE_RANDOM=0;
7736 REPLACE_RANDOM_R=0;
7737 REPLACE_REALLOC=0;
7738 REPLACE_REALPATH=0;
7739 REPLACE_SETENV=0;
7740 REPLACE_SETSTATE=0;
7741 REPLACE_STRTOD=0;
7742 REPLACE_STRTOLD=0;
7743 REPLACE_UNSETENV=0;
7744 REPLACE_WCTOMB=0;
7745
7746
7747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
7748 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
7749 if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
7750 $as_echo_n "(cached) " >&6
7751 else
7752 rm -f conftest.sym conftest.file
7753 echo >conftest.file
7754 if test "$cross_compiling" = yes; then :
7755 case "$host_os" in
7756 linux-* | linux)
7757 # Guess yes on Linux systems.
7758 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
7759 *-gnu* | gnu*)
7760 # Guess yes on glibc systems.
7761 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
7762 mingw*)
7763 # Guess no on native Windows.
7764 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
7765 *)
7766 # If we don't know, obey --enable-cross-guesses.
7767 gl_cv_func_lstat_dereferences_slashed_symlink="$gl_cross_guess_normal" ;;
7768 esac
7769
7770 else
7771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7772 /* end confdefs.h. */
7773 $ac_includes_default
7774 int
7775 main ()
7776 {
7777 struct stat sbuf;
7778 if (symlink ("conftest.file", "conftest.sym") != 0)
7779 return 1;
7780 /* Linux will dereference the symlink and fail, as required by
7781 POSIX. That is better in the sense that it means we will not
7782 have to compile and use the lstat wrapper. */
7783 return lstat ("conftest.sym/", &sbuf) == 0;
7784
7785 ;
7786 return 0;
7787 }
7788 _ACEOF
7789 if ac_fn_c_try_run "$LINENO"; then :
7790 gl_cv_func_lstat_dereferences_slashed_symlink=yes
7791 else
7792 gl_cv_func_lstat_dereferences_slashed_symlink=no
7793 fi
7794 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7795 conftest.$ac_objext conftest.beam conftest.$ac_ext
7796 fi
7797
7798 rm -f conftest.sym conftest.file
7799
7800 fi
7801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
7802 $as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
7803 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
7804 *yes)
7805
7806 cat >>confdefs.h <<_ACEOF
7807 #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
7808 _ACEOF
7809
7810 ;;
7811 esac
7812
7813
7814
7815
7816
7817
7818
7819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
7820 $as_echo_n "checking whether // is distinct from /... " >&6; }
7821 if ${gl_cv_double_slash_root+:} false; then :
7822 $as_echo_n "(cached) " >&6
7823 else
7824 if test x"$cross_compiling" = xyes ; then
7825 # When cross-compiling, there is no way to tell whether // is special
7826 # short of a list of hosts. However, the only known hosts to date
7827 # that have a distinct // are Apollo DomainOS (too old to port to),
7828 # Cygwin, and z/OS. If anyone knows of another system for which // has
7829 # special semantics and is distinct from /, please report it to
7830 # <bug-gnulib@gnu.org>.
7831 case $host in
7832 *-cygwin | i370-ibm-openedition)
7833 gl_cv_double_slash_root=yes ;;
7834 *)
7835 # Be optimistic and assume that / and // are the same when we
7836 # don't know.
7837 gl_cv_double_slash_root='unknown, assuming no' ;;
7838 esac
7839 else
7840 set x `ls -di / // 2>/dev/null`
7841 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
7842 gl_cv_double_slash_root=no
7843 else
7844 gl_cv_double_slash_root=yes
7845 fi
7846 fi
7847 fi
7848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
7849 $as_echo "$gl_cv_double_slash_root" >&6; }
7850 if test "$gl_cv_double_slash_root" = yes; then
7851
7852 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
7853
7854 fi
7855
7856
7857
7858
7859
7860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
7861 $as_echo_n "checking whether realpath works... " >&6; }
7862 if ${gl_cv_func_realpath_works+:} false; then :
7863 $as_echo_n "(cached) " >&6
7864 else
7865
7866 rm -rf conftest.a conftest.d
7867 touch conftest.a
7868 mkdir conftest.d
7869 if test "$cross_compiling" = yes; then :
7870 case "$host_os" in
7871 # Guess yes on glibc systems.
7872 *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
7873 # Guess yes on musl systems.
7874 *-musl*) gl_cv_func_realpath_works="guessing yes" ;;
7875 # Guess no on native Windows.
7876 mingw*) gl_cv_func_realpath_works="guessing no" ;;
7877 # If we don't know, obey --enable-cross-guesses.
7878 *) gl_cv_func_realpath_works="$gl_cross_guess_normal" ;;
7879 esac
7880
7881 else
7882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7883 /* end confdefs.h. */
7884
7885
7886
7887 #include <stdlib.h>
7888 #if defined __MACH__ && defined __APPLE__
7889 /* Avoid a crash on Mac OS X. */
7890 #include <mach/mach.h>
7891 #include <mach/mach_error.h>
7892 #include <mach/thread_status.h>
7893 #include <mach/exception.h>
7894 #include <mach/task.h>
7895 #include <pthread.h>
7896 /* The exception port on which our thread listens. */
7897 static mach_port_t our_exception_port;
7898 /* The main function of the thread listening for exceptions of type
7899 EXC_BAD_ACCESS. */
7900 static void *
7901 mach_exception_thread (void *arg)
7902 {
7903 /* Buffer for a message to be received. */
7904 struct {
7905 mach_msg_header_t head;
7906 mach_msg_body_t msgh_body;
7907 char data[1024];
7908 } msg;
7909 mach_msg_return_t retval;
7910 /* Wait for a message on the exception port. */
7911 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
7912 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
7913 if (retval != MACH_MSG_SUCCESS)
7914 abort ();
7915 exit (1);
7916 }
7917 static void
7918 nocrash_init (void)
7919 {
7920 mach_port_t self = mach_task_self ();
7921 /* Allocate a port on which the thread shall listen for exceptions. */
7922 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
7923 == KERN_SUCCESS) {
7924 /* See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
7925 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
7926 MACH_MSG_TYPE_MAKE_SEND)
7927 == KERN_SUCCESS) {
7928 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
7929 for us. */
7930 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
7931 /* Create the thread listening on the exception port. */
7932 pthread_attr_t attr;
7933 pthread_t thread;
7934 if (pthread_attr_init (&attr) == 0
7935 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
7936 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
7937 pthread_attr_destroy (&attr);
7938 /* Replace the exception port info for these exceptions with our own.
7939 Note that we replace the exception port for the entire task, not only
7940 for a particular thread. This has the effect that when our exception
7941 port gets the message, the thread specific exception port has already
7942 been asked, and we don't need to bother about it.
7943 See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
7944 task_set_exception_ports (self, mask, our_exception_port,
7945 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
7946 }
7947 }
7948 }
7949 }
7950 #elif defined _WIN32 && ! defined __CYGWIN__
7951 /* Avoid a crash on native Windows. */
7952 #define WIN32_LEAN_AND_MEAN
7953 #include <windows.h>
7954 #include <winerror.h>
7955 static LONG WINAPI
7956 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
7957 {
7958 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
7959 {
7960 case EXCEPTION_ACCESS_VIOLATION:
7961 case EXCEPTION_IN_PAGE_ERROR:
7962 case EXCEPTION_STACK_OVERFLOW:
7963 case EXCEPTION_GUARD_PAGE:
7964 case EXCEPTION_PRIV_INSTRUCTION:
7965 case EXCEPTION_ILLEGAL_INSTRUCTION:
7966 case EXCEPTION_DATATYPE_MISALIGNMENT:
7967 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
7968 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
7969 exit (1);
7970 }
7971 return EXCEPTION_CONTINUE_SEARCH;
7972 }
7973 static void
7974 nocrash_init (void)
7975 {
7976 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
7977 }
7978 #else
7979 /* Avoid a crash on POSIX systems. */
7980 #include <signal.h>
7981 #include <unistd.h>
7982 /* A POSIX signal handler. */
7983 static void
7984 exception_handler (int sig)
7985 {
7986 _exit (1);
7987 }
7988 static void
7989 nocrash_init (void)
7990 {
7991 #ifdef SIGSEGV
7992 signal (SIGSEGV, exception_handler);
7993 #endif
7994 #ifdef SIGBUS
7995 signal (SIGBUS, exception_handler);
7996 #endif
7997 }
7998 #endif
7999
8000 #include <stdlib.h>
8001 #include <string.h>
8002
8003 int
8004 main ()
8005 {
8006
8007 int result = 0;
8008 {
8009 char *name = realpath ("conftest.a", NULL);
8010 if (!(name && *name == '/'))
8011 result |= 1;
8012 free (name);
8013 }
8014 {
8015 char *name = realpath ("conftest.b/../conftest.a", NULL);
8016 if (name != NULL)
8017 result |= 2;
8018 free (name);
8019 }
8020 {
8021 char *name = realpath ("conftest.a/", NULL);
8022 if (name != NULL)
8023 result |= 4;
8024 free (name);
8025 }
8026 {
8027 char *name1 = realpath (".", NULL);
8028 char *name2 = realpath ("conftest.d//./..", NULL);
8029 if (! name1 || ! name2 || strcmp (name1, name2))
8030 result |= 8;
8031 free (name1);
8032 free (name2);
8033 }
8034 return result;
8035
8036 ;
8037 return 0;
8038 }
8039
8040 _ACEOF
8041 if ac_fn_c_try_run "$LINENO"; then :
8042 gl_cv_func_realpath_works=yes
8043 else
8044 gl_cv_func_realpath_works=no
8045 fi
8046 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8047 conftest.$ac_objext conftest.beam conftest.$ac_ext
8048 fi
8049
8050 rm -rf conftest.a conftest.d
8051
8052 fi
8053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
8054 $as_echo "$gl_cv_func_realpath_works" >&6; }
8055 case "$gl_cv_func_realpath_works" in
8056 *yes)
8057
8058 $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
8059
8060 ;;
8061 esac
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071 case "$host_os" in
8072 mingw*) ;;
8073 *) for ac_func in getcwd
8074 do :
8075 ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
8076 if test "x$ac_cv_func_getcwd" = xyes; then :
8077 cat >>confdefs.h <<_ACEOF
8078 #define HAVE_GETCWD 1
8079 _ACEOF
8080
8081 fi
8082 done
8083 ;;
8084 esac
8085
8086
8087
8088
8089
8090
8091 GNULIB_ACCESS=0;
8092 GNULIB_CHDIR=0;
8093 GNULIB_CHOWN=0;
8094 GNULIB_CLOSE=0;
8095 GNULIB_COPY_FILE_RANGE=0;
8096 GNULIB_DUP=0;
8097 GNULIB_DUP2=0;
8098 GNULIB_DUP3=0;
8099 GNULIB_ENVIRON=0;
8100 GNULIB_EUIDACCESS=0;
8101 GNULIB_EXECL=0;
8102 GNULIB_EXECLE=0;
8103 GNULIB_EXECLP=0;
8104 GNULIB_EXECV=0;
8105 GNULIB_EXECVE=0;
8106 GNULIB_EXECVP=0;
8107 GNULIB_EXECVPE=0;
8108 GNULIB_FACCESSAT=0;
8109 GNULIB_FCHDIR=0;
8110 GNULIB_FCHOWNAT=0;
8111 GNULIB_FDATASYNC=0;
8112 GNULIB_FSYNC=0;
8113 GNULIB_FTRUNCATE=0;
8114 GNULIB_GETCWD=0;
8115 GNULIB_GETDOMAINNAME=0;
8116 GNULIB_GETDTABLESIZE=0;
8117 GNULIB_GETENTROPY=0;
8118 GNULIB_GETGROUPS=0;
8119 GNULIB_GETHOSTNAME=0;
8120 GNULIB_GETLOGIN=0;
8121 GNULIB_GETLOGIN_R=0;
8122 GNULIB_GETOPT_POSIX=0;
8123 GNULIB_GETPAGESIZE=0;
8124 GNULIB_GETPASS=0;
8125 GNULIB_GETUSERSHELL=0;
8126 GNULIB_GROUP_MEMBER=0;
8127 GNULIB_ISATTY=0;
8128 GNULIB_LCHOWN=0;
8129 GNULIB_LINK=0;
8130 GNULIB_LINKAT=0;
8131 GNULIB_LSEEK=0;
8132 GNULIB_PIPE=0;
8133 GNULIB_PIPE2=0;
8134 GNULIB_PREAD=0;
8135 GNULIB_PWRITE=0;
8136 GNULIB_READ=0;
8137 GNULIB_READLINK=0;
8138 GNULIB_READLINKAT=0;
8139 GNULIB_RMDIR=0;
8140 GNULIB_SETHOSTNAME=0;
8141 GNULIB_SLEEP=0;
8142 GNULIB_SYMLINK=0;
8143 GNULIB_SYMLINKAT=0;
8144 GNULIB_TRUNCATE=0;
8145 GNULIB_TTYNAME_R=0;
8146 GNULIB_UNISTD_H_NONBLOCKING=0;
8147 GNULIB_UNISTD_H_SIGPIPE=0;
8148 GNULIB_UNLINK=0;
8149 GNULIB_UNLINKAT=0;
8150 GNULIB_USLEEP=0;
8151 GNULIB_WRITE=0;
8152 GNULIB_MDA_ACCESS=1;
8153 GNULIB_MDA_CHDIR=1;
8154 GNULIB_MDA_CLOSE=1;
8155 GNULIB_MDA_DUP=1;
8156 GNULIB_MDA_DUP2=1;
8157 GNULIB_MDA_EXECL=1;
8158 GNULIB_MDA_EXECLE=1;
8159 GNULIB_MDA_EXECLP=1;
8160 GNULIB_MDA_EXECV=1;
8161 GNULIB_MDA_EXECVE=1;
8162 GNULIB_MDA_EXECVP=1;
8163 GNULIB_MDA_EXECVPE=1;
8164 GNULIB_MDA_GETCWD=1;
8165 GNULIB_MDA_GETPID=1;
8166 GNULIB_MDA_ISATTY=1;
8167 GNULIB_MDA_LSEEK=1;
8168 GNULIB_MDA_READ=1;
8169 GNULIB_MDA_RMDIR=1;
8170 GNULIB_MDA_SWAB=1;
8171 GNULIB_MDA_UNLINK=1;
8172 GNULIB_MDA_WRITE=1;
8173 HAVE_CHOWN=1;
8174 HAVE_COPY_FILE_RANGE=1;
8175 HAVE_DUP3=1;
8176 HAVE_EUIDACCESS=1;
8177 HAVE_EXECVPE=1;
8178 HAVE_FACCESSAT=1;
8179 HAVE_FCHDIR=1;
8180 HAVE_FCHOWNAT=1;
8181 HAVE_FDATASYNC=1;
8182 HAVE_FSYNC=1;
8183 HAVE_FTRUNCATE=1;
8184 HAVE_GETDTABLESIZE=1;
8185 HAVE_GETENTROPY=1;
8186 HAVE_GETGROUPS=1;
8187 HAVE_GETHOSTNAME=1;
8188 HAVE_GETLOGIN=1;
8189 HAVE_GETPAGESIZE=1;
8190 HAVE_GETPASS=1;
8191 HAVE_GROUP_MEMBER=1;
8192 HAVE_LCHOWN=1;
8193 HAVE_LINK=1;
8194 HAVE_LINKAT=1;
8195 HAVE_PIPE=1;
8196 HAVE_PIPE2=1;
8197 HAVE_PREAD=1;
8198 HAVE_PWRITE=1;
8199 HAVE_READLINK=1;
8200 HAVE_READLINKAT=1;
8201 HAVE_SETHOSTNAME=1;
8202 HAVE_SLEEP=1;
8203 HAVE_SYMLINK=1;
8204 HAVE_SYMLINKAT=1;
8205 HAVE_UNLINKAT=1;
8206 HAVE_USLEEP=1;
8207 HAVE_DECL_ENVIRON=1;
8208 HAVE_DECL_EXECVPE=1;
8209 HAVE_DECL_FCHDIR=1;
8210 HAVE_DECL_FDATASYNC=1;
8211 HAVE_DECL_GETDOMAINNAME=1;
8212 HAVE_DECL_GETLOGIN=1;
8213 HAVE_DECL_GETLOGIN_R=1;
8214 HAVE_DECL_GETPAGESIZE=1;
8215 HAVE_DECL_GETUSERSHELL=1;
8216 HAVE_DECL_SETHOSTNAME=1;
8217 HAVE_DECL_TRUNCATE=1;
8218 HAVE_DECL_TTYNAME_R=1;
8219 HAVE_OS_H=0;
8220 HAVE_SYS_PARAM_H=0;
8221 REPLACE_ACCESS=0;
8222 REPLACE_CHOWN=0;
8223 REPLACE_CLOSE=0;
8224 REPLACE_DUP=0;
8225 REPLACE_DUP2=0;
8226 REPLACE_EXECL=0;
8227 REPLACE_EXECLE=0;
8228 REPLACE_EXECLP=0;
8229 REPLACE_EXECV=0;
8230 REPLACE_EXECVE=0;
8231 REPLACE_EXECVP=0;
8232 REPLACE_EXECVPE=0;
8233 REPLACE_FACCESSAT=0;
8234 REPLACE_FCHOWNAT=0;
8235 REPLACE_FTRUNCATE=0;
8236 REPLACE_GETCWD=0;
8237 REPLACE_GETDOMAINNAME=0;
8238 REPLACE_GETDTABLESIZE=0;
8239 REPLACE_GETLOGIN_R=0;
8240 REPLACE_GETGROUPS=0;
8241 REPLACE_GETPAGESIZE=0;
8242 REPLACE_GETPASS=0;
8243 REPLACE_ISATTY=0;
8244 REPLACE_LCHOWN=0;
8245 REPLACE_LINK=0;
8246 REPLACE_LINKAT=0;
8247 REPLACE_LSEEK=0;
8248 REPLACE_PREAD=0;
8249 REPLACE_PWRITE=0;
8250 REPLACE_READ=0;
8251 REPLACE_READLINK=0;
8252 REPLACE_READLINKAT=0;
8253 REPLACE_RMDIR=0;
8254 REPLACE_SLEEP=0;
8255 REPLACE_SYMLINK=0;
8256 REPLACE_SYMLINKAT=0;
8257 REPLACE_TRUNCATE=0;
8258 REPLACE_TTYNAME_R=0;
8259 REPLACE_UNLINK=0;
8260 REPLACE_UNLINKAT=0;
8261 REPLACE_USLEEP=0;
8262 REPLACE_WRITE=0;
8263 UNISTD_H_HAVE_SYS_RANDOM_H=0;
8264 UNISTD_H_HAVE_WINSOCK2_H=0;
8265 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277 if test $ac_cv_func__set_invalid_parameter_handler = yes; then
8278 HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
8279
8280 $as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
8281
8282 else
8283 HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
8284 fi
8285
8286
8287
8288
8289
8290 GNULIB_OPENDIR=0;
8291 GNULIB_READDIR=0;
8292 GNULIB_REWINDDIR=0;
8293 GNULIB_CLOSEDIR=0;
8294 GNULIB_DIRFD=0;
8295 GNULIB_FDOPENDIR=0;
8296 GNULIB_SCANDIR=0;
8297 GNULIB_ALPHASORT=0;
8298 HAVE_OPENDIR=1;
8299 HAVE_READDIR=1;
8300 HAVE_REWINDDIR=1;
8301 HAVE_CLOSEDIR=1;
8302 HAVE_DECL_DIRFD=1;
8303 HAVE_DECL_FDOPENDIR=1;
8304 HAVE_FDOPENDIR=1;
8305 HAVE_SCANDIR=1;
8306 HAVE_ALPHASORT=1;
8307 REPLACE_OPENDIR=0;
8308 REPLACE_CLOSEDIR=0;
8309 REPLACE_DIRFD=0;
8310 REPLACE_FDOPENDIR=0;
8311
8312
8313 GNULIB_ISBLANK=0;
8314 HAVE_ISBLANK=1;
8315
8316
8317
8318 gl_mda_defines='
8319 #if defined _WIN32 && !defined __CYGWIN__
8320 #define access _access
8321 #define chdir _chdir
8322 #define chmod _chmod
8323 #define close _close
8324 #define creat _creat
8325 #define dup _dup
8326 #define dup2 _dup2
8327 #define ecvt _ecvt
8328 #define execl _execl
8329 #define execle _execle
8330 #define execlp _execlp
8331 #define execv _execv
8332 #define execve _execve
8333 #define execvp _execvp
8334 #define execvpe _execvpe
8335 #define fcloseall _fcloseall
8336 #define fcvt _fcvt
8337 #define fdopen _fdopen
8338 #define fileno _fileno
8339 #define gcvt _gcvt
8340 #define getcwd _getcwd
8341 #define getpid _getpid
8342 #define getw _getw
8343 #define isatty _isatty
8344 #define j0 _j0
8345 #define j1 _j1
8346 #define jn _jn
8347 #define lfind _lfind
8348 #define lsearch _lsearch
8349 #define lseek _lseek
8350 #define memccpy _memccpy
8351 #define mkdir _mkdir
8352 #define mktemp _mktemp
8353 #define open _open
8354 #define putenv _putenv
8355 #define putw _putw
8356 #define read _read
8357 #define rmdir _rmdir
8358 #define strdup _strdup
8359 #define swab _swab
8360 #define tempnam _tempnam
8361 #define tzset _tzset
8362 #define umask _umask
8363 #define unlink _unlink
8364 #define utime _utime
8365 #define wcsdup _wcsdup
8366 #define write _write
8367 #define y0 _y0
8368 #define y1 _y1
8369 #define yn _yn
8370 #endif
8371 '
8372
8373
8374
8375
8376
8377
8378
8379
8380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
8381 $as_echo_n "checking if environ is properly declared... " >&6; }
8382 if ${gt_cv_var_environ_declaration+:} false; then :
8383 $as_echo_n "(cached) " >&6
8384 else
8385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8386 /* end confdefs.h. */
8387 #if HAVE_UNISTD_H
8388 #include <unistd.h>
8389 #endif
8390 /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
8391 #include <stdlib.h>
8392
8393 extern struct { int foo; } environ;
8394 int
8395 main ()
8396 {
8397 environ.foo = 1;
8398 ;
8399 return 0;
8400 }
8401 _ACEOF
8402 if ac_fn_c_try_compile "$LINENO"; then :
8403 gt_cv_var_environ_declaration=no
8404 else
8405 gt_cv_var_environ_declaration=yes
8406 fi
8407 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8408 fi
8409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
8410 $as_echo "$gt_cv_var_environ_declaration" >&6; }
8411 if test $gt_cv_var_environ_declaration = yes; then
8412
8413 $as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
8414
8415 fi
8416
8417
8418 if test $gt_cv_var_environ_declaration != yes; then
8419 HAVE_DECL_ENVIRON=0
8420 fi
8421
8422
8423
8424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
8425 $as_echo_n "checking for complete errno.h... " >&6; }
8426 if ${gl_cv_header_errno_h_complete+:} false; then :
8427 $as_echo_n "(cached) " >&6
8428 else
8429
8430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8431 /* end confdefs.h. */
8432
8433 #include <errno.h>
8434 #if !defined ETXTBSY
8435 booboo
8436 #endif
8437 #if !defined ENOMSG
8438 booboo
8439 #endif
8440 #if !defined EIDRM
8441 booboo
8442 #endif
8443 #if !defined ENOLINK
8444 booboo
8445 #endif
8446 #if !defined EPROTO
8447 booboo
8448 #endif
8449 #if !defined EMULTIHOP
8450 booboo
8451 #endif
8452 #if !defined EBADMSG
8453 booboo
8454 #endif
8455 #if !defined EOVERFLOW
8456 booboo
8457 #endif
8458 #if !defined ENOTSUP
8459 booboo
8460 #endif
8461 #if !defined ENETRESET
8462 booboo
8463 #endif
8464 #if !defined ECONNABORTED
8465 booboo
8466 #endif
8467 #if !defined ESTALE
8468 booboo
8469 #endif
8470 #if !defined EDQUOT
8471 booboo
8472 #endif
8473 #if !defined ECANCELED
8474 booboo
8475 #endif
8476 #if !defined EOWNERDEAD
8477 booboo
8478 #endif
8479 #if !defined ENOTRECOVERABLE
8480 booboo
8481 #endif
8482 #if !defined EILSEQ
8483 booboo
8484 #endif
8485
8486 _ACEOF
8487 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8488 $EGREP "booboo" >/dev/null 2>&1; then :
8489 gl_cv_header_errno_h_complete=no
8490 else
8491 gl_cv_header_errno_h_complete=yes
8492 fi
8493 rm -f conftest*
8494
8495
8496 fi
8497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
8498 $as_echo "$gl_cv_header_errno_h_complete" >&6; }
8499 if test $gl_cv_header_errno_h_complete = yes; then
8500 ERRNO_H=''
8501 else
8502
8503
8504
8505
8506
8507
8508
8509
8510 if test $gl_cv_have_include_next = yes; then
8511 gl_cv_next_errno_h='<'errno.h'>'
8512 else
8513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
8514 $as_echo_n "checking absolute name of <errno.h>... " >&6; }
8515 if ${gl_cv_next_errno_h+:} false; then :
8516 $as_echo_n "(cached) " >&6
8517 else
8518
8519
8520
8521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8522 /* end confdefs.h. */
8523 #include <errno.h>
8524 _ACEOF
8525 case "$host_os" in
8526 aix*) gl_absname_cpp="$ac_cpp -C" ;;
8527 *) gl_absname_cpp="$ac_cpp" ;;
8528 esac
8529
8530 case "$host_os" in
8531 mingw*)
8532 gl_dirsep_regex='[/\\]'
8533 ;;
8534 *)
8535 gl_dirsep_regex='\/'
8536 ;;
8537 esac
8538 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
8539 gl_header_literal_regex=`echo 'errno.h' \
8540 | sed -e "$gl_make_literal_regex_sed"`
8541 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
8542 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
8543 s|^/[^/]|//&|
8544 p
8545 q
8546 }'
8547
8548 gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
8549 sed -n "$gl_absolute_header_sed"`
8550
8551 gl_header=$gl_cv_absolute_errno_h
8552 gl_cv_next_errno_h='"'$gl_header'"'
8553
8554
8555 fi
8556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
8557 $as_echo "$gl_cv_next_errno_h" >&6; }
8558 fi
8559 NEXT_ERRNO_H=$gl_cv_next_errno_h
8560
8561 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
8562 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
8563 gl_next_as_first_directive='<'errno.h'>'
8564 else
8565 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
8566 gl_next_as_first_directive=$gl_cv_next_errno_h
8567 fi
8568 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
8569
8570
8571
8572
8573 ERRNO_H='errno.h'
8574 fi
8575
8576 if test -n "$ERRNO_H"; then
8577 GL_GENERATE_ERRNO_H_TRUE=
8578 GL_GENERATE_ERRNO_H_FALSE='#'
8579 else
8580 GL_GENERATE_ERRNO_H_TRUE='#'
8581 GL_GENERATE_ERRNO_H_FALSE=
8582 fi
8583
8584
8585 if test -n "$ERRNO_H"; then
8586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
8587 $as_echo_n "checking for EMULTIHOP value... " >&6; }
8588 if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then :
8589 $as_echo_n "(cached) " >&6
8590 else
8591
8592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8593 /* end confdefs.h. */
8594
8595 #include <errno.h>
8596 #ifdef EMULTIHOP
8597 yes
8598 #endif
8599
8600 _ACEOF
8601 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8602 $EGREP "yes" >/dev/null 2>&1; then :
8603 gl_cv_header_errno_h_EMULTIHOP=yes
8604 else
8605 gl_cv_header_errno_h_EMULTIHOP=no
8606 fi
8607 rm -f conftest*
8608
8609 if test $gl_cv_header_errno_h_EMULTIHOP = no; then
8610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8611 /* end confdefs.h. */
8612
8613 #define _XOPEN_SOURCE_EXTENDED 1
8614 #include <errno.h>
8615 #ifdef EMULTIHOP
8616 yes
8617 #endif
8618
8619 _ACEOF
8620 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8621 $EGREP "yes" >/dev/null 2>&1; then :
8622 gl_cv_header_errno_h_EMULTIHOP=hidden
8623 fi
8624 rm -f conftest*
8625
8626 if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
8627 if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
8628 #define _XOPEN_SOURCE_EXTENDED 1
8629 #include <errno.h>
8630 /* The following two lines are a workaround against an autoconf-2.52 bug. */
8631 #include <stdio.h>
8632 #include <stdlib.h>
8633 "; then :
8634
8635 fi
8636
8637 fi
8638 fi
8639
8640 fi
8641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
8642 $as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
8643 case $gl_cv_header_errno_h_EMULTIHOP in
8644 yes | no)
8645 EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
8646 ;;
8647 *)
8648 EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
8649 ;;
8650 esac
8651
8652
8653 fi
8654
8655
8656 if test -n "$ERRNO_H"; then
8657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
8658 $as_echo_n "checking for ENOLINK value... " >&6; }
8659 if ${gl_cv_header_errno_h_ENOLINK+:} false; then :
8660 $as_echo_n "(cached) " >&6
8661 else
8662
8663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8664 /* end confdefs.h. */
8665
8666 #include <errno.h>
8667 #ifdef ENOLINK
8668 yes
8669 #endif
8670
8671 _ACEOF
8672 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8673 $EGREP "yes" >/dev/null 2>&1; then :
8674 gl_cv_header_errno_h_ENOLINK=yes
8675 else
8676 gl_cv_header_errno_h_ENOLINK=no
8677 fi
8678 rm -f conftest*
8679
8680 if test $gl_cv_header_errno_h_ENOLINK = no; then
8681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8682 /* end confdefs.h. */
8683
8684 #define _XOPEN_SOURCE_EXTENDED 1
8685 #include <errno.h>
8686 #ifdef ENOLINK
8687 yes
8688 #endif
8689
8690 _ACEOF
8691 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8692 $EGREP "yes" >/dev/null 2>&1; then :
8693 gl_cv_header_errno_h_ENOLINK=hidden
8694 fi
8695 rm -f conftest*
8696
8697 if test $gl_cv_header_errno_h_ENOLINK = hidden; then
8698 if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
8699 #define _XOPEN_SOURCE_EXTENDED 1
8700 #include <errno.h>
8701 /* The following two lines are a workaround against an autoconf-2.52 bug. */
8702 #include <stdio.h>
8703 #include <stdlib.h>
8704 "; then :
8705
8706 fi
8707
8708 fi
8709 fi
8710
8711 fi
8712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
8713 $as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
8714 case $gl_cv_header_errno_h_ENOLINK in
8715 yes | no)
8716 ENOLINK_HIDDEN=0; ENOLINK_VALUE=
8717 ;;
8718 *)
8719 ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
8720 ;;
8721 esac
8722
8723
8724 fi
8725
8726
8727 if test -n "$ERRNO_H"; then
8728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
8729 $as_echo_n "checking for EOVERFLOW value... " >&6; }
8730 if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then :
8731 $as_echo_n "(cached) " >&6
8732 else
8733
8734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8735 /* end confdefs.h. */
8736
8737 #include <errno.h>
8738 #ifdef EOVERFLOW
8739 yes
8740 #endif
8741
8742 _ACEOF
8743 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8744 $EGREP "yes" >/dev/null 2>&1; then :
8745 gl_cv_header_errno_h_EOVERFLOW=yes
8746 else
8747 gl_cv_header_errno_h_EOVERFLOW=no
8748 fi
8749 rm -f conftest*
8750
8751 if test $gl_cv_header_errno_h_EOVERFLOW = no; then
8752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8753 /* end confdefs.h. */
8754
8755 #define _XOPEN_SOURCE_EXTENDED 1
8756 #include <errno.h>
8757 #ifdef EOVERFLOW
8758 yes
8759 #endif
8760
8761 _ACEOF
8762 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8763 $EGREP "yes" >/dev/null 2>&1; then :
8764 gl_cv_header_errno_h_EOVERFLOW=hidden
8765 fi
8766 rm -f conftest*
8767
8768 if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
8769 if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
8770 #define _XOPEN_SOURCE_EXTENDED 1
8771 #include <errno.h>
8772 /* The following two lines are a workaround against an autoconf-2.52 bug. */
8773 #include <stdio.h>
8774 #include <stdlib.h>
8775 "; then :
8776
8777 fi
8778
8779 fi
8780 fi
8781
8782 fi
8783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
8784 $as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
8785 case $gl_cv_header_errno_h_EOVERFLOW in
8786 yes | no)
8787 EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
8788 ;;
8789 *)
8790 EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
8791 ;;
8792 esac
8793
8794
8795 fi
8796
8797
8798 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
8799 if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
8800 ac_have_decl=1
8801 else
8802 ac_have_decl=0
8803 fi
8804
8805 cat >>confdefs.h <<_ACEOF
8806 #define HAVE_DECL_STRERROR_R $ac_have_decl
8807 _ACEOF
8808
8809 for ac_func in strerror_r
8810 do :
8811 ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
8812 if test "x$ac_cv_func_strerror_r" = xyes; then :
8813 cat >>confdefs.h <<_ACEOF
8814 #define HAVE_STRERROR_R 1
8815 _ACEOF
8816
8817 fi
8818 done
8819
8820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
8821 $as_echo_n "checking whether strerror_r returns char *... " >&6; }
8822 if ${ac_cv_func_strerror_r_char_p+:} false; then :
8823 $as_echo_n "(cached) " >&6
8824 else
8825
8826 ac_cv_func_strerror_r_char_p=no
8827 if test $ac_cv_have_decl_strerror_r = yes; then
8828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8829 /* end confdefs.h. */
8830 $ac_includes_default
8831 int
8832 main ()
8833 {
8834
8835 char buf[100];
8836 char x = *strerror_r (0, buf, sizeof buf);
8837 char *p = strerror_r (0, buf, sizeof buf);
8838 return !p || x;
8839
8840 ;
8841 return 0;
8842 }
8843 _ACEOF
8844 if ac_fn_c_try_compile "$LINENO"; then :
8845 ac_cv_func_strerror_r_char_p=yes
8846 fi
8847 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8848 else
8849 # strerror_r is not declared. Choose between
8850 # systems that have relatively inaccessible declarations for the
8851 # function. BeOS and DEC UNIX 4.0 fall in this category, but the
8852 # former has a strerror_r that returns char*, while the latter
8853 # has a strerror_r that returns `int'.
8854 # This test should segfault on the DEC system.
8855 if test "$cross_compiling" = yes; then :
8856 :
8857 else
8858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8859 /* end confdefs.h. */
8860 $ac_includes_default
8861 extern char *strerror_r ();
8862 int
8863 main ()
8864 {
8865 char buf[100];
8866 char x = *strerror_r (0, buf, sizeof buf);
8867 return ! isalpha (x);
8868 ;
8869 return 0;
8870 }
8871 _ACEOF
8872 if ac_fn_c_try_run "$LINENO"; then :
8873 ac_cv_func_strerror_r_char_p=yes
8874 fi
8875 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8876 conftest.$ac_objext conftest.beam conftest.$ac_ext
8877 fi
8878
8879 fi
8880
8881 fi
8882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
8883 $as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
8884 if test $ac_cv_func_strerror_r_char_p = yes; then
8885
8886 $as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
8887
8888 fi
8889
8890
8891
8892
8893 ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default"
8894 if test "x$ac_cv_have_decl_fchdir" = xyes; then :
8895 ac_have_decl=1
8896 else
8897 ac_have_decl=0
8898 fi
8899
8900 cat >>confdefs.h <<_ACEOF
8901 #define HAVE_DECL_FCHDIR $ac_have_decl
8902 _ACEOF
8903
8904
8905 GNULIB_CREAT=0;
8906 GNULIB_FCNTL=0;
8907 GNULIB_NONBLOCKING=0;
8908 GNULIB_OPEN=0;
8909 GNULIB_OPENAT=0;
8910 GNULIB_MDA_CREAT=1;
8911 GNULIB_MDA_OPEN=1;
8912 HAVE_FCNTL=1;
8913 HAVE_OPENAT=1;
8914 REPLACE_CREAT=0;
8915 REPLACE_FCNTL=0;
8916 REPLACE_OPEN=0;
8917 REPLACE_OPENAT=0;
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
8929 $as_echo_n "checking for working fcntl.h... " >&6; }
8930 if ${gl_cv_header_working_fcntl_h+:} false; then :
8931 $as_echo_n "(cached) " >&6
8932 else
8933 if test "$cross_compiling" = yes; then :
8934 case "$host_os" in
8935 # Guess 'no' on native Windows.
8936 mingw*) gl_cv_header_working_fcntl_h='no' ;;
8937 *) gl_cv_header_working_fcntl_h=cross-compiling ;;
8938 esac
8939
8940 else
8941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8942 /* end confdefs.h. */
8943 #include <sys/types.h>
8944 #include <sys/stat.h>
8945 #if HAVE_UNISTD_H
8946 # include <unistd.h>
8947 #else /* on Windows with MSVC */
8948 # include <io.h>
8949 # include <stdlib.h>
8950 # defined sleep(n) _sleep ((n) * 1000)
8951 #endif
8952 #include <fcntl.h>
8953
8954
8955 $gl_mda_defines
8956
8957 #ifndef O_NOATIME
8958 #define O_NOATIME 0
8959 #endif
8960 #ifndef O_NOFOLLOW
8961 #define O_NOFOLLOW 0
8962 #endif
8963 static int const constants[] =
8964 {
8965 O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
8966 O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
8967 };
8968
8969 int
8970 main ()
8971 {
8972
8973 int result = !constants;
8974 #if HAVE_SYMLINK
8975 {
8976 static char const sym[] = "conftest.sym";
8977 if (symlink ("/dev/null", sym) != 0)
8978 result |= 2;
8979 else
8980 {
8981 int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
8982 if (fd >= 0)
8983 {
8984 close (fd);
8985 result |= 4;
8986 }
8987 }
8988 if (unlink (sym) != 0 || symlink (".", sym) != 0)
8989 result |= 2;
8990 else
8991 {
8992 int fd = open (sym, O_RDONLY | O_NOFOLLOW);
8993 if (fd >= 0)
8994 {
8995 close (fd);
8996 result |= 4;
8997 }
8998 }
8999 unlink (sym);
9000 }
9001 #endif
9002 {
9003 static char const file[] = "confdefs.h";
9004 int fd = open (file, O_RDONLY | O_NOATIME);
9005 if (fd < 0)
9006 result |= 8;
9007 else
9008 {
9009 struct stat st0;
9010 if (fstat (fd, &st0) != 0)
9011 result |= 16;
9012 else
9013 {
9014 char c;
9015 sleep (1);
9016 if (read (fd, &c, 1) != 1)
9017 result |= 24;
9018 else
9019 {
9020 if (close (fd) != 0)
9021 result |= 32;
9022 else
9023 {
9024 struct stat st1;
9025 if (stat (file, &st1) != 0)
9026 result |= 40;
9027 else
9028 if (st0.st_atime != st1.st_atime)
9029 result |= 64;
9030 }
9031 }
9032 }
9033 }
9034 }
9035 return result;
9036 ;
9037 return 0;
9038 }
9039 _ACEOF
9040 if ac_fn_c_try_run "$LINENO"; then :
9041 gl_cv_header_working_fcntl_h=yes
9042 else
9043 case $? in #(
9044 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
9045 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
9046 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
9047 *) gl_cv_header_working_fcntl_h='no';;
9048 esac
9049 fi
9050 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9051 conftest.$ac_objext conftest.beam conftest.$ac_ext
9052 fi
9053
9054
9055 fi
9056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
9057 $as_echo "$gl_cv_header_working_fcntl_h" >&6; }
9058
9059 case $gl_cv_header_working_fcntl_h in #(
9060 *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
9061 *) ac_val=1;;
9062 esac
9063
9064 cat >>confdefs.h <<_ACEOF
9065 #define HAVE_WORKING_O_NOATIME $ac_val
9066 _ACEOF
9067
9068
9069 case $gl_cv_header_working_fcntl_h in #(
9070 *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
9071 *) ac_val=1;;
9072 esac
9073
9074 cat >>confdefs.h <<_ACEOF
9075 #define HAVE_WORKING_O_NOFOLLOW $ac_val
9076 _ACEOF
9077
9078
9079
9080 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
9081 "
9082 if test "x$ac_cv_type_pid_t" = xyes; then :
9083
9084 else
9085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9086 /* end confdefs.h. */
9087
9088 #if defined _WIN64 && !defined __CYGWIN__
9089 LLP64
9090 #endif
9091
9092 int
9093 main ()
9094 {
9095
9096 ;
9097 return 0;
9098 }
9099
9100 _ACEOF
9101 if ac_fn_c_try_compile "$LINENO"; then :
9102 gl_pid_type='int'
9103 else
9104 gl_pid_type='__int64'
9105 fi
9106 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9107
9108 cat >>confdefs.h <<_ACEOF
9109 #define pid_t $gl_pid_type
9110 _ACEOF
9111
9112
9113 fi
9114
9115
9116 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
9117 if test "x$ac_cv_type_mode_t" = xyes; then :
9118
9119 else
9120
9121 cat >>confdefs.h <<_ACEOF
9122 #define mode_t int
9123 _ACEOF
9124
9125 fi
9126
9127
9128
9129
9130
9131
9132 GNULIB_FNMATCH=0;
9133 HAVE_FNMATCH=1;
9134 REPLACE_FNMATCH=0;
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151 if test $gl_cv_have_include_next = yes; then
9152 gl_cv_next_fnmatch_h='<'fnmatch.h'>'
9153 else
9154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fnmatch.h>" >&5
9155 $as_echo_n "checking absolute name of <fnmatch.h>... " >&6; }
9156 if ${gl_cv_next_fnmatch_h+:} false; then :
9157 $as_echo_n "(cached) " >&6
9158 else
9159
9160 if test $ac_cv_header_fnmatch_h = yes; then
9161
9162
9163
9164
9165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9166 /* end confdefs.h. */
9167 #include <fnmatch.h>
9168 _ACEOF
9169 case "$host_os" in
9170 aix*) gl_absname_cpp="$ac_cpp -C" ;;
9171 *) gl_absname_cpp="$ac_cpp" ;;
9172 esac
9173
9174 case "$host_os" in
9175 mingw*)
9176 gl_dirsep_regex='[/\\]'
9177 ;;
9178 *)
9179 gl_dirsep_regex='\/'
9180 ;;
9181 esac
9182 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
9183 gl_header_literal_regex=`echo 'fnmatch.h' \
9184 | sed -e "$gl_make_literal_regex_sed"`
9185 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
9186 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
9187 s|^/[^/]|//&|
9188 p
9189 q
9190 }'
9191
9192 gl_cv_absolute_fnmatch_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
9193 sed -n "$gl_absolute_header_sed"`
9194
9195 gl_header=$gl_cv_absolute_fnmatch_h
9196 gl_cv_next_fnmatch_h='"'$gl_header'"'
9197 else
9198 gl_cv_next_fnmatch_h='<'fnmatch.h'>'
9199 fi
9200
9201
9202 fi
9203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fnmatch_h" >&5
9204 $as_echo "$gl_cv_next_fnmatch_h" >&6; }
9205 fi
9206 NEXT_FNMATCH_H=$gl_cv_next_fnmatch_h
9207
9208 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
9209 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
9210 gl_next_as_first_directive='<'fnmatch.h'>'
9211 else
9212 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
9213 gl_next_as_first_directive=$gl_cv_next_fnmatch_h
9214 fi
9215 NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H=$gl_next_as_first_directive
9216
9217
9218
9219
9220
9221
9222
9223 if test $ac_cv_header_fnmatch_h = yes; then
9224 HAVE_FNMATCH_H=1
9225 else
9226 HAVE_FNMATCH_H=0
9227 fi
9228
9229
9230 FNMATCH_H=''
9231 if false; then
9232 FNMATCH_H=fnmatch.h
9233 else
9234 if test $ac_cv_header_fnmatch_h != yes; then
9235 FNMATCH_H=fnmatch.h
9236 fi
9237 fi
9238
9239
9240 if test -n "$FNMATCH_H"; then
9241 GL_GENERATE_FNMATCH_H_TRUE=
9242 GL_GENERATE_FNMATCH_H_FALSE='#'
9243 else
9244 GL_GENERATE_FNMATCH_H_TRUE='#'
9245 GL_GENERATE_FNMATCH_H_FALSE=
9246 fi
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
9258 $as_echo_n "checking for mbstate_t... " >&6; }
9259 if ${ac_cv_type_mbstate_t+:} false; then :
9260 $as_echo_n "(cached) " >&6
9261 else
9262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9263 /* end confdefs.h. */
9264 $ac_includes_default
9265 #include <wchar.h>
9266 int
9267 main ()
9268 {
9269 mbstate_t x; return sizeof x;
9270 ;
9271 return 0;
9272 }
9273 _ACEOF
9274 if ac_fn_c_try_compile "$LINENO"; then :
9275 ac_cv_type_mbstate_t=yes
9276 else
9277 ac_cv_type_mbstate_t=no
9278 fi
9279 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9280 fi
9281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
9282 $as_echo "$ac_cv_type_mbstate_t" >&6; }
9283 if test $ac_cv_type_mbstate_t = yes; then
9284
9285 $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
9286
9287 else
9288
9289 $as_echo "#define mbstate_t int" >>confdefs.h
9290
9291 fi
9292
9293
9294
9295
9296 GNULIB_ACOSF=0;
9297 GNULIB_ACOSL=0;
9298 GNULIB_ASINF=0;
9299 GNULIB_ASINL=0;
9300 GNULIB_ATANF=0;
9301 GNULIB_ATANL=0;
9302 GNULIB_ATAN2F=0;
9303 GNULIB_CBRT=0;
9304 GNULIB_CBRTF=0;
9305 GNULIB_CBRTL=0;
9306 GNULIB_CEIL=0;
9307 GNULIB_CEILF=0;
9308 GNULIB_CEILL=0;
9309 GNULIB_COPYSIGN=0;
9310 GNULIB_COPYSIGNF=0;
9311 GNULIB_COPYSIGNL=0;
9312 GNULIB_COSF=0;
9313 GNULIB_COSL=0;
9314 GNULIB_COSHF=0;
9315 GNULIB_EXPF=0;
9316 GNULIB_EXPL=0;
9317 GNULIB_EXP2=0;
9318 GNULIB_EXP2F=0;
9319 GNULIB_EXP2L=0;
9320 GNULIB_EXPM1=0;
9321 GNULIB_EXPM1F=0;
9322 GNULIB_EXPM1L=0;
9323 GNULIB_FABSF=0;
9324 GNULIB_FABSL=0;
9325 GNULIB_FLOOR=0;
9326 GNULIB_FLOORF=0;
9327 GNULIB_FLOORL=0;
9328 GNULIB_FMA=0;
9329 GNULIB_FMAF=0;
9330 GNULIB_FMAL=0;
9331 GNULIB_FMOD=0;
9332 GNULIB_FMODF=0;
9333 GNULIB_FMODL=0;
9334 GNULIB_FREXPF=0;
9335 GNULIB_FREXP=0;
9336 GNULIB_FREXPL=0;
9337 GNULIB_HYPOT=0;
9338 GNULIB_HYPOTF=0;
9339 GNULIB_HYPOTL=0;
9340 GNULIB_ILOGB=0;
9341 GNULIB_ILOGBF=0;
9342 GNULIB_ILOGBL=0;
9343 GNULIB_ISFINITE=0;
9344 GNULIB_ISINF=0;
9345 GNULIB_ISNAN=0;
9346 GNULIB_ISNANF=0;
9347 GNULIB_ISNAND=0;
9348 GNULIB_ISNANL=0;
9349 GNULIB_LDEXPF=0;
9350 GNULIB_LDEXPL=0;
9351 GNULIB_LOG=0;
9352 GNULIB_LOGF=0;
9353 GNULIB_LOGL=0;
9354 GNULIB_LOG10=0;
9355 GNULIB_LOG10F=0;
9356 GNULIB_LOG10L=0;
9357 GNULIB_LOG1P=0;
9358 GNULIB_LOG1PF=0;
9359 GNULIB_LOG1PL=0;
9360 GNULIB_LOG2=0;
9361 GNULIB_LOG2F=0;
9362 GNULIB_LOG2L=0;
9363 GNULIB_LOGB=0;
9364 GNULIB_LOGBF=0;
9365 GNULIB_LOGBL=0;
9366 GNULIB_MODF=0;
9367 GNULIB_MODFF=0;
9368 GNULIB_MODFL=0;
9369 GNULIB_POWF=0;
9370 GNULIB_REMAINDER=0;
9371 GNULIB_REMAINDERF=0;
9372 GNULIB_REMAINDERL=0;
9373 GNULIB_RINT=0;
9374 GNULIB_RINTF=0;
9375 GNULIB_RINTL=0;
9376 GNULIB_ROUND=0;
9377 GNULIB_ROUNDF=0;
9378 GNULIB_ROUNDL=0;
9379 GNULIB_SIGNBIT=0;
9380 GNULIB_SINF=0;
9381 GNULIB_SINL=0;
9382 GNULIB_SINHF=0;
9383 GNULIB_SQRTF=0;
9384 GNULIB_SQRTL=0;
9385 GNULIB_TANF=0;
9386 GNULIB_TANL=0;
9387 GNULIB_TANHF=0;
9388 GNULIB_TRUNC=0;
9389 GNULIB_TRUNCF=0;
9390 GNULIB_TRUNCL=0;
9391 GNULIB_MDA_J0=1;
9392 GNULIB_MDA_J1=1;
9393 GNULIB_MDA_JN=1;
9394 GNULIB_MDA_Y0=1;
9395 GNULIB_MDA_Y1=1;
9396 GNULIB_MDA_YN=1;
9397 HAVE_ACOSF=1;
9398 HAVE_ACOSL=1;
9399 HAVE_ASINF=1;
9400 HAVE_ASINL=1;
9401 HAVE_ATANF=1;
9402 HAVE_ATANL=1;
9403 HAVE_ATAN2F=1;
9404 HAVE_CBRT=1;
9405 HAVE_CBRTF=1;
9406 HAVE_CBRTL=1;
9407 HAVE_COPYSIGN=1;
9408 HAVE_COPYSIGNL=1;
9409 HAVE_COSF=1;
9410 HAVE_COSL=1;
9411 HAVE_COSHF=1;
9412 HAVE_EXPF=1;
9413 HAVE_EXPL=1;
9414 HAVE_EXPM1=1;
9415 HAVE_EXPM1F=1;
9416 HAVE_FABSF=1;
9417 HAVE_FABSL=1;
9418 HAVE_FMA=1;
9419 HAVE_FMAF=1;
9420 HAVE_FMAL=1;
9421 HAVE_FMODF=1;
9422 HAVE_FMODL=1;
9423 HAVE_FREXPF=1;
9424 HAVE_HYPOTF=1;
9425 HAVE_HYPOTL=1;
9426 HAVE_ILOGB=1;
9427 HAVE_ILOGBF=1;
9428 HAVE_ILOGBL=1;
9429 HAVE_ISNANF=1;
9430 HAVE_ISNAND=1;
9431 HAVE_ISNANL=1;
9432 HAVE_LDEXPF=1;
9433 HAVE_LOGF=1;
9434 HAVE_LOGL=1;
9435 HAVE_LOG10F=1;
9436 HAVE_LOG10L=1;
9437 HAVE_LOG1P=1;
9438 HAVE_LOG1PF=1;
9439 HAVE_LOG1PL=1;
9440 HAVE_LOGBF=1;
9441 HAVE_LOGBL=1;
9442 HAVE_MODFF=1;
9443 HAVE_MODFL=1;
9444 HAVE_POWF=1;
9445 HAVE_REMAINDER=1;
9446 HAVE_REMAINDERF=1;
9447 HAVE_RINT=1;
9448 HAVE_RINTL=1;
9449 HAVE_SINF=1;
9450 HAVE_SINL=1;
9451 HAVE_SINHF=1;
9452 HAVE_SQRTF=1;
9453 HAVE_SQRTL=1;
9454 HAVE_TANF=1;
9455 HAVE_TANL=1;
9456 HAVE_TANHF=1;
9457 HAVE_DECL_ACOSL=1;
9458 HAVE_DECL_ASINL=1;
9459 HAVE_DECL_ATANL=1;
9460 HAVE_DECL_CBRTF=1;
9461 HAVE_DECL_CBRTL=1;
9462 HAVE_DECL_CEILF=1;
9463 HAVE_DECL_CEILL=1;
9464 HAVE_DECL_COPYSIGNF=1;
9465 HAVE_DECL_COSL=1;
9466 HAVE_DECL_EXPL=1;
9467 HAVE_DECL_EXP2=1;
9468 HAVE_DECL_EXP2F=1;
9469 HAVE_DECL_EXP2L=1;
9470 HAVE_DECL_EXPM1L=1;
9471 HAVE_DECL_FLOORF=1;
9472 HAVE_DECL_FLOORL=1;
9473 HAVE_DECL_FREXPL=1;
9474 HAVE_DECL_LDEXPL=1;
9475 HAVE_DECL_LOGL=1;
9476 HAVE_DECL_LOG10L=1;
9477 HAVE_DECL_LOG2=1;
9478 HAVE_DECL_LOG2F=1;
9479 HAVE_DECL_LOG2L=1;
9480 HAVE_DECL_LOGB=1;
9481 HAVE_DECL_REMAINDER=1;
9482 HAVE_DECL_REMAINDERL=1;
9483 HAVE_DECL_RINTF=1;
9484 HAVE_DECL_ROUND=1;
9485 HAVE_DECL_ROUNDF=1;
9486 HAVE_DECL_ROUNDL=1;
9487 HAVE_DECL_SINL=1;
9488 HAVE_DECL_SQRTL=1;
9489 HAVE_DECL_TANL=1;
9490 HAVE_DECL_TRUNC=1;
9491 HAVE_DECL_TRUNCF=1;
9492 HAVE_DECL_TRUNCL=1;
9493 REPLACE_ACOSF=0;
9494 REPLACE_ASINF=0;
9495 REPLACE_ATANF=0;
9496 REPLACE_ATAN2F=0;
9497 REPLACE_CBRTF=0;
9498 REPLACE_CBRTL=0;
9499 REPLACE_CEIL=0;
9500 REPLACE_CEILF=0;
9501 REPLACE_CEILL=0;
9502 REPLACE_COSF=0;
9503 REPLACE_COSHF=0;
9504 REPLACE_EXPF=0;
9505 REPLACE_EXPL=0;
9506 REPLACE_EXPM1=0;
9507 REPLACE_EXPM1F=0;
9508 REPLACE_EXPM1L=0;
9509 REPLACE_EXP2=0;
9510 REPLACE_EXP2L=0;
9511 REPLACE_FABSL=0;
9512 REPLACE_FLOOR=0;
9513 REPLACE_FLOORF=0;
9514 REPLACE_FLOORL=0;
9515 REPLACE_FMA=0;
9516 REPLACE_FMAF=0;
9517 REPLACE_FMAL=0;
9518 REPLACE_FMOD=0;
9519 REPLACE_FMODF=0;
9520 REPLACE_FMODL=0;
9521 REPLACE_FREXPF=0;
9522 REPLACE_FREXP=0;
9523 REPLACE_FREXPL=0;
9524 REPLACE_HUGE_VAL=0;
9525 REPLACE_HYPOT=0;
9526 REPLACE_HYPOTF=0;
9527 REPLACE_HYPOTL=0;
9528 REPLACE_ILOGB=0;
9529 REPLACE_ILOGBF=0;
9530 REPLACE_ILOGBL=0;
9531 REPLACE_ISFINITE=0;
9532 REPLACE_ISINF=0;
9533 REPLACE_ISNAN=0;
9534 REPLACE_LDEXPL=0;
9535 REPLACE_LOG=0;
9536 REPLACE_LOGF=0;
9537 REPLACE_LOGL=0;
9538 REPLACE_LOG10=0;
9539 REPLACE_LOG10F=0;
9540 REPLACE_LOG10L=0;
9541 REPLACE_LOG1P=0;
9542 REPLACE_LOG1PF=0;
9543 REPLACE_LOG1PL=0;
9544 REPLACE_LOG2=0;
9545 REPLACE_LOG2F=0;
9546 REPLACE_LOG2L=0;
9547 REPLACE_LOGB=0;
9548 REPLACE_LOGBF=0;
9549 REPLACE_LOGBL=0;
9550 REPLACE_MODF=0;
9551 REPLACE_MODFF=0;
9552 REPLACE_MODFL=0;
9553 REPLACE_NAN=0;
9554 REPLACE_REMAINDER=0;
9555 REPLACE_REMAINDERF=0;
9556 REPLACE_REMAINDERL=0;
9557 REPLACE_RINTL=0;
9558 REPLACE_ROUND=0;
9559 REPLACE_ROUNDF=0;
9560 REPLACE_ROUNDL=0;
9561 REPLACE_SIGNBIT=0;
9562 REPLACE_SIGNBIT_USING_BUILTINS=0;
9563 REPLACE_SINF=0;
9564 REPLACE_SINHF=0;
9565 REPLACE_SQRTF=0;
9566 REPLACE_SQRTL=0;
9567 REPLACE_TANF=0;
9568 REPLACE_TANHF=0;
9569 REPLACE_TRUNC=0;
9570 REPLACE_TRUNCF=0;
9571 REPLACE_TRUNCL=0;
9572
9573
9574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5
9575 $as_echo_n "checking whether frexp() can be used without linking with libm... " >&6; }
9576 if ${gl_cv_func_frexp_no_libm+:} false; then :
9577 $as_echo_n "(cached) " >&6
9578 else
9579
9580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9581 /* end confdefs.h. */
9582 #include <math.h>
9583 double x;
9584 int
9585 main ()
9586 {
9587 int e; return frexp (x, &e) > 0;
9588 ;
9589 return 0;
9590 }
9591 _ACEOF
9592 if ac_fn_c_try_link "$LINENO"; then :
9593 gl_cv_func_frexp_no_libm=yes
9594 else
9595 gl_cv_func_frexp_no_libm=no
9596 fi
9597 rm -f core conftest.err conftest.$ac_objext \
9598 conftest$ac_exeext conftest.$ac_ext
9599
9600 fi
9601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
9602 $as_echo "$gl_cv_func_frexp_no_libm" >&6; }
9603
9604 ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
9605 if test "x$ac_cv_have_decl_alarm" = xyes; then :
9606 ac_have_decl=1
9607 else
9608 ac_have_decl=0
9609 fi
9610
9611 cat >>confdefs.h <<_ACEOF
9612 #define HAVE_DECL_ALARM $ac_have_decl
9613 _ACEOF
9614
9615
9616
9617
9618 FREXP_LIBM=
9619 if test $gl_cv_func_frexp_no_libm = no; then
9620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used with libm" >&5
9621 $as_echo_n "checking whether frexp() can be used with libm... " >&6; }
9622 if ${gl_cv_func_frexp_in_libm+:} false; then :
9623 $as_echo_n "(cached) " >&6
9624 else
9625
9626 save_LIBS="$LIBS"
9627 LIBS="$LIBS -lm"
9628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9629 /* end confdefs.h. */
9630 #include <math.h>
9631 double x;
9632 int
9633 main ()
9634 {
9635 int e; return frexp (x, &e) > 0;
9636 ;
9637 return 0;
9638 }
9639 _ACEOF
9640 if ac_fn_c_try_link "$LINENO"; then :
9641 gl_cv_func_frexp_in_libm=yes
9642 else
9643 gl_cv_func_frexp_in_libm=no
9644 fi
9645 rm -f core conftest.err conftest.$ac_objext \
9646 conftest$ac_exeext conftest.$ac_ext
9647 LIBS="$save_LIBS"
9648
9649 fi
9650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_in_libm" >&5
9651 $as_echo "$gl_cv_func_frexp_in_libm" >&6; }
9652 if test $gl_cv_func_frexp_in_libm = yes; then
9653 FREXP_LIBM=-lm
9654 fi
9655 fi
9656 if test $gl_cv_func_frexp_no_libm = yes \
9657 || test $gl_cv_func_frexp_in_libm = yes; then
9658 save_LIBS="$LIBS"
9659 LIBS="$LIBS $FREXP_LIBM"
9660
9661
9662
9663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
9664 $as_echo_n "checking whether frexp works... " >&6; }
9665 if ${gl_cv_func_frexp_works+:} false; then :
9666 $as_echo_n "(cached) " >&6
9667 else
9668
9669 if test "$cross_compiling" = yes; then :
9670 case "$host_os" in
9671 netbsd* | irix*) gl_cv_func_frexp_works="guessing no" ;;
9672 mingw*) # Guess yes with MSVC, no with mingw.
9673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9674 /* end confdefs.h. */
9675
9676 #ifdef _MSC_VER
9677 Good
9678 #endif
9679
9680 _ACEOF
9681 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9682 $EGREP "Good" >/dev/null 2>&1; then :
9683 gl_cv_func_frexp_works="guessing yes"
9684 else
9685 gl_cv_func_frexp_works="guessing no"
9686 fi
9687 rm -f conftest*
9688
9689 ;;
9690 *) gl_cv_func_frexp_works="guessing yes" ;;
9691 esac
9692
9693 else
9694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9695 /* end confdefs.h. */
9696
9697 #include <float.h>
9698 #include <math.h>
9699 #include <string.h>
9700 #if HAVE_DECL_ALARM
9701 # include <signal.h>
9702 # include <unistd.h>
9703 #endif
9704 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
9705 ICC 10.0 has a bug when optimizing the expression -zero.
9706 The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
9707 to PowerPC on Mac OS X 10.5. */
9708 #if defined __hpux || defined __sgi || defined __ICC
9709 static double
9710 compute_minus_zero (void)
9711 {
9712 return -DBL_MIN * DBL_MIN;
9713 }
9714 # define minus_zero compute_minus_zero ()
9715 #else
9716 double minus_zero = -0.0;
9717 #endif
9718 int main()
9719 {
9720 int result = 0;
9721 int i;
9722 volatile double x;
9723 double zero = 0.0;
9724 #if HAVE_DECL_ALARM
9725 /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
9726 number. Let the test fail in this case. */
9727 signal (SIGALRM, SIG_DFL);
9728 alarm (5);
9729 #endif
9730 /* Test on denormalized numbers. */
9731 for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
9732 ;
9733 if (x > 0.0)
9734 {
9735 int exp;
9736 double y = frexp (x, &exp);
9737 /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
9738 On NetBSD: y = 0.75. Correct: y = 0.5. */
9739 if (y != 0.5)
9740 result |= 1;
9741 }
9742 /* Test on infinite numbers. */
9743 x = 1.0 / zero;
9744 {
9745 int exp;
9746 double y = frexp (x, &exp);
9747 if (y != x)
9748 result |= 2;
9749 }
9750 /* Test on negative zero. */
9751 x = minus_zero;
9752 {
9753 int exp;
9754 double y = frexp (x, &exp);
9755 if (memcmp (&y, &x, sizeof x))
9756 result |= 4;
9757 }
9758 return result;
9759 }
9760 _ACEOF
9761 if ac_fn_c_try_run "$LINENO"; then :
9762 gl_cv_func_frexp_works=yes
9763 else
9764 gl_cv_func_frexp_works=no
9765 fi
9766 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9767 conftest.$ac_objext conftest.beam conftest.$ac_ext
9768 fi
9769
9770
9771 fi
9772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
9773 $as_echo "$gl_cv_func_frexp_works" >&6; }
9774
9775 LIBS="$save_LIBS"
9776 case "$gl_cv_func_frexp_works" in
9777 *yes) gl_func_frexp=yes ;;
9778 *) gl_func_frexp=no; REPLACE_FREXP=1; FREXP_LIBM= ;;
9779 esac
9780 else
9781 gl_func_frexp=no
9782 fi
9783 if test $gl_func_frexp = yes; then
9784
9785 $as_echo "#define HAVE_FREXP 1" >>confdefs.h
9786
9787 fi
9788
9789
9790
9791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5
9792 $as_echo_n "checking whether long double and double are the same... " >&6; }
9793 if ${gl_cv_long_double_equals_double+:} false; then :
9794 $as_echo_n "(cached) " >&6
9795 else
9796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9797 /* end confdefs.h. */
9798 #include <float.h>
9799 int
9800 main ()
9801 {
9802 typedef int check[sizeof (long double) == sizeof (double)
9803 && LDBL_MANT_DIG == DBL_MANT_DIG
9804 && LDBL_MAX_EXP == DBL_MAX_EXP
9805 && LDBL_MIN_EXP == DBL_MIN_EXP
9806 ? 1 : -1];
9807
9808 ;
9809 return 0;
9810 }
9811 _ACEOF
9812 if ac_fn_c_try_compile "$LINENO"; then :
9813 gl_cv_long_double_equals_double=yes
9814 else
9815 gl_cv_long_double_equals_double=no
9816 fi
9817 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9818
9819 fi
9820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_long_double_equals_double" >&5
9821 $as_echo "$gl_cv_long_double_equals_double" >&6; }
9822 if test $gl_cv_long_double_equals_double = yes; then
9823
9824 $as_echo "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h
9825
9826 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1
9827 else
9828 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0
9829 fi
9830
9831
9832
9833
9834
9835
9836
9837
9838 ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
9839 "
9840 if test "x$ac_cv_have_decl_frexpl" = xyes; then :
9841
9842 else
9843 HAVE_DECL_FREXPL=0
9844 fi
9845
9846
9847 FREXPL_LIBM=
9848 if test $HAVE_DECL_FREXPL = 1; then
9849
9850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
9851 $as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; }
9852 if ${gl_cv_func_frexpl_no_libm+:} false; then :
9853 $as_echo_n "(cached) " >&6
9854 else
9855
9856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9857 /* end confdefs.h. */
9858 #include <math.h>
9859 long double x;
9860 int
9861 main ()
9862 {
9863 int e; return frexpl (x, &e) > 0;
9864 ;
9865 return 0;
9866 }
9867 _ACEOF
9868 if ac_fn_c_try_link "$LINENO"; then :
9869 gl_cv_func_frexpl_no_libm=yes
9870 else
9871 gl_cv_func_frexpl_no_libm=no
9872 fi
9873 rm -f core conftest.err conftest.$ac_objext \
9874 conftest$ac_exeext conftest.$ac_ext
9875
9876 fi
9877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
9878 $as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
9879
9880 if test $gl_cv_func_frexpl_no_libm = no; then
9881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used with libm" >&5
9882 $as_echo_n "checking whether frexpl() can be used with libm... " >&6; }
9883 if ${gl_cv_func_frexpl_in_libm+:} false; then :
9884 $as_echo_n "(cached) " >&6
9885 else
9886
9887 save_LIBS="$LIBS"
9888 LIBS="$LIBS -lm"
9889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9890 /* end confdefs.h. */
9891 #include <math.h>
9892 long double x;
9893 int
9894 main ()
9895 {
9896 int e; return frexpl (x, &e) > 0;
9897 ;
9898 return 0;
9899 }
9900 _ACEOF
9901 if ac_fn_c_try_link "$LINENO"; then :
9902 gl_cv_func_frexpl_in_libm=yes
9903 else
9904 gl_cv_func_frexpl_in_libm=no
9905 fi
9906 rm -f core conftest.err conftest.$ac_objext \
9907 conftest$ac_exeext conftest.$ac_ext
9908 LIBS="$save_LIBS"
9909
9910 fi
9911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_in_libm" >&5
9912 $as_echo "$gl_cv_func_frexpl_in_libm" >&6; }
9913 if test $gl_cv_func_frexpl_in_libm = yes; then
9914 FREXPL_LIBM=-lm
9915 fi
9916 fi
9917 if test $gl_cv_func_frexpl_no_libm = yes \
9918 || test $gl_cv_func_frexpl_in_libm = yes; then
9919 save_LIBS="$LIBS"
9920 LIBS="$LIBS $FREXPL_LIBM"
9921
9922
9923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
9924 $as_echo_n "checking whether frexpl works... " >&6; }
9925 if ${gl_cv_func_frexpl_works+:} false; then :
9926 $as_echo_n "(cached) " >&6
9927 else
9928
9929 if test "$cross_compiling" = yes; then :
9930
9931 case "$host_os" in
9932 aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
9933 gl_cv_func_frexpl_works="guessing no";;
9934 *) gl_cv_func_frexpl_works="guessing yes";;
9935 esac
9936
9937 else
9938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9939 /* end confdefs.h. */
9940
9941 #include <float.h>
9942 #include <math.h>
9943 /* Override the values of <float.h>, like done in float.in.h. */
9944 #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
9945 # undef LDBL_MIN_EXP
9946 # define LDBL_MIN_EXP (-16381)
9947 #endif
9948 #if defined __i386__ && (defined __FreeBSD__ || defined __DragonFly__)
9949 # undef LDBL_MIN_EXP
9950 # define LDBL_MIN_EXP (-16381)
9951 #endif
9952 #if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
9953 # undef LDBL_MIN_EXP
9954 # define LDBL_MIN_EXP DBL_MIN_EXP
9955 #endif
9956 #if defined __sgi && (LDBL_MANT_DIG >= 106)
9957 # if defined __GNUC__
9958 # undef LDBL_MIN_EXP
9959 # define LDBL_MIN_EXP DBL_MIN_EXP
9960 # endif
9961 #endif
9962 extern
9963 #ifdef __cplusplus
9964 "C"
9965 #endif
9966 long double frexpl (long double, int *);
9967 long double zero = 0.0L;
9968 int main()
9969 {
9970 int result = 0;
9971 volatile long double x;
9972 /* Test on finite numbers that fails on AIX 5.1. */
9973 x = 16.0L;
9974 {
9975 int exp = -9999;
9976 frexpl (x, &exp);
9977 if (exp != 5)
9978 result |= 1;
9979 }
9980 /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
9981 function returns an invalid (incorrectly normalized) value: it returns
9982 y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
9983 but the correct result is
9984 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */
9985 x = 1.01L;
9986 {
9987 int exp = -9999;
9988 long double y = frexpl (x, &exp);
9989 if (!(exp == 1 && y == 0.505L))
9990 result |= 2;
9991 }
9992 /* Test on large finite numbers. This fails on BeOS at i = 16322, while
9993 LDBL_MAX_EXP = 16384.
9994 In the loop end test, we test x against Infinity, rather than comparing
9995 i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */
9996 {
9997 int i;
9998 for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
9999 {
10000 int exp = -9999;
10001 frexpl (x, &exp);
10002 if (exp != i)
10003 {
10004 result |= 4;
10005 break;
10006 }
10007 }
10008 }
10009 /* Test on denormalized numbers. */
10010 {
10011 int i;
10012 for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
10013 ;
10014 if (x > 0.0L)
10015 {
10016 int exp;
10017 long double y = frexpl (x, &exp);
10018 /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
10019 exp = -16382, y = 0.5. On Mac OS X 10.5: exp = -16384, y = 0.5. */
10020 if (exp != LDBL_MIN_EXP - 1)
10021 result |= 8;
10022 }
10023 }
10024 /* Test on infinite numbers. */
10025 /* The Microsoft MSVC 14 compiler chokes on the expression 1.0 / 0.0. */
10026 x = 1.0L / zero;
10027 {
10028 int exp;
10029 long double y = frexpl (x, &exp);
10030 if (y != x)
10031 result |= 16;
10032 }
10033 return result;
10034 }
10035 _ACEOF
10036 if ac_fn_c_try_run "$LINENO"; then :
10037 gl_cv_func_frexpl_works=yes
10038 else
10039 gl_cv_func_frexpl_works=no
10040 fi
10041 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10042 conftest.$ac_objext conftest.beam conftest.$ac_ext
10043 fi
10044
10045
10046 fi
10047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
10048 $as_echo "$gl_cv_func_frexpl_works" >&6; }
10049
10050 LIBS="$save_LIBS"
10051 case "$gl_cv_func_frexpl_works" in
10052 *yes) gl_func_frexpl=yes ;;
10053 *) gl_func_frexpl=no; REPLACE_FREXPL=1 ;;
10054 esac
10055 else
10056 gl_func_frexpl=no
10057 fi
10058 if test $gl_func_frexpl = yes; then
10059
10060 $as_echo "#define HAVE_FREXPL 1" >>confdefs.h
10061
10062 fi
10063 fi
10064 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
10065 if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then
10066
10067 FREXPL_LIBM="$FREXP_LIBM"
10068 else
10069 FREXPL_LIBM=
10070 fi
10071 fi
10072
10073
10074
10075 GNULIB_FCHMODAT=0;
10076 GNULIB_FSTAT=0;
10077 GNULIB_FSTATAT=0;
10078 GNULIB_FUTIMENS=0;
10079 GNULIB_GETUMASK=0;
10080 GNULIB_LCHMOD=0;
10081 GNULIB_LSTAT=0;
10082 GNULIB_MKDIR=0;
10083 GNULIB_MKDIRAT=0;
10084 GNULIB_MKFIFO=0;
10085 GNULIB_MKFIFOAT=0;
10086 GNULIB_MKNOD=0;
10087 GNULIB_MKNODAT=0;
10088 GNULIB_STAT=0;
10089 GNULIB_UTIMENSAT=0;
10090 GNULIB_OVERRIDES_STRUCT_STAT=0;
10091 GNULIB_MDA_CHMOD=1;
10092 GNULIB_MDA_MKDIR=1;
10093 GNULIB_MDA_UMASK=1;
10094 HAVE_FCHMODAT=1;
10095 HAVE_FSTATAT=1;
10096 HAVE_FUTIMENS=1;
10097 HAVE_GETUMASK=1;
10098 HAVE_LCHMOD=1;
10099 HAVE_LSTAT=1;
10100 HAVE_MKDIRAT=1;
10101 HAVE_MKFIFO=1;
10102 HAVE_MKFIFOAT=1;
10103 HAVE_MKNOD=1;
10104 HAVE_MKNODAT=1;
10105 HAVE_UTIMENSAT=1;
10106 REPLACE_FCHMODAT=0;
10107 REPLACE_FSTAT=0;
10108 REPLACE_FSTATAT=0;
10109 REPLACE_FUTIMENS=0;
10110 REPLACE_LSTAT=0;
10111 REPLACE_MKDIR=0;
10112 REPLACE_MKFIFO=0;
10113 REPLACE_MKFIFOAT=0;
10114 REPLACE_MKNOD=0;
10115 REPLACE_MKNODAT=0;
10116 REPLACE_STAT=0;
10117 REPLACE_UTIMENSAT=0;
10118
10119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
10120 $as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
10121 if ${ac_cv_header_stat_broken+:} false; then :
10122 $as_echo_n "(cached) " >&6
10123 else
10124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10125 /* end confdefs.h. */
10126 #include <sys/types.h>
10127 #include <sys/stat.h>
10128
10129 #if defined S_ISBLK && defined S_IFDIR
10130 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
10131 #endif
10132
10133 #if defined S_ISBLK && defined S_IFCHR
10134 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
10135 #endif
10136
10137 #if defined S_ISLNK && defined S_IFREG
10138 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
10139 #endif
10140
10141 #if defined S_ISSOCK && defined S_IFREG
10142 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
10143 #endif
10144
10145 _ACEOF
10146 if ac_fn_c_try_compile "$LINENO"; then :
10147 ac_cv_header_stat_broken=no
10148 else
10149 ac_cv_header_stat_broken=yes
10150 fi
10151 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10152 fi
10153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
10154 $as_echo "$ac_cv_header_stat_broken" >&6; }
10155 if test $ac_cv_header_stat_broken = yes; then
10156
10157 $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
10158
10159 fi
10160
10161
10162
10163
10164
10165 case "$host_os" in
10166 mingw*)
10167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
10168 $as_echo_n "checking for 64-bit off_t... " >&6; }
10169 if ${gl_cv_type_off_t_64+:} false; then :
10170 $as_echo_n "(cached) " >&6
10171 else
10172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10173 /* end confdefs.h. */
10174 #include <sys/types.h>
10175 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
10176
10177 int
10178 main ()
10179 {
10180
10181 ;
10182 return 0;
10183 }
10184 _ACEOF
10185 if ac_fn_c_try_compile "$LINENO"; then :
10186 gl_cv_type_off_t_64=yes
10187 else
10188 gl_cv_type_off_t_64=no
10189 fi
10190 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10191
10192 fi
10193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
10194 $as_echo "$gl_cv_type_off_t_64" >&6; }
10195 if test $gl_cv_type_off_t_64 = no; then
10196 WINDOWS_64_BIT_OFF_T=1
10197 else
10198 WINDOWS_64_BIT_OFF_T=0
10199 fi
10200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit st_size" >&5
10201 $as_echo_n "checking for 64-bit st_size... " >&6; }
10202 if ${gl_cv_member_st_size_64+:} false; then :
10203 $as_echo_n "(cached) " >&6
10204 else
10205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10206 /* end confdefs.h. */
10207 #include <sys/types.h>
10208 struct stat buf;
10209 int verify_st_size_size[sizeof (buf.st_size) >= 8 ? 1 : -1];
10210
10211 int
10212 main ()
10213 {
10214
10215 ;
10216 return 0;
10217 }
10218 _ACEOF
10219 if ac_fn_c_try_compile "$LINENO"; then :
10220 gl_cv_member_st_size_64=yes
10221 else
10222 gl_cv_member_st_size_64=no
10223 fi
10224 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10225
10226 fi
10227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_member_st_size_64" >&5
10228 $as_echo "$gl_cv_member_st_size_64" >&6; }
10229 if test $gl_cv_member_st_size_64 = no; then
10230 WINDOWS_64_BIT_ST_SIZE=1
10231 else
10232 WINDOWS_64_BIT_ST_SIZE=0
10233 fi
10234 ;;
10235 *)
10236 WINDOWS_64_BIT_OFF_T=0
10237 WINDOWS_64_BIT_ST_SIZE=0
10238 ;;
10239 esac
10240
10241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
10242 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
10243 if ${ac_cv_c_restrict+:} false; then :
10244 $as_echo_n "(cached) " >&6
10245 else
10246 ac_cv_c_restrict=no
10247 # Put '__restrict__' first, to avoid problems with glibc and non-GCC; see:
10248 # https://lists.gnu.org/archive/html/bug-autoconf/2016-02/msg00006.html
10249 # Put 'restrict' last, because C++ lacks it.
10250 for ac_kw in __restrict__ __restrict _Restrict restrict; do
10251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10252 /* end confdefs.h. */
10253 typedef int *int_ptr;
10254 int foo (int_ptr $ac_kw ip) { return ip[0]; }
10255 int bar (int [$ac_kw]); /* Catch GCC bug 14050. */
10256 int bar (int ip[$ac_kw]) { return ip[0]; }
10257
10258 int
10259 main ()
10260 {
10261 int s[1];
10262 int *$ac_kw t = s;
10263 t[0] = 0;
10264 return foo (t) + bar (t);
10265
10266 ;
10267 return 0;
10268 }
10269 _ACEOF
10270 if ac_fn_c_try_compile "$LINENO"; then :
10271 ac_cv_c_restrict=$ac_kw
10272 fi
10273 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10274 test "$ac_cv_c_restrict" != no && break
10275 done
10276
10277 fi
10278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
10279 $as_echo "$ac_cv_c_restrict" >&6; }
10280
10281 case $ac_cv_c_restrict in
10282 restrict) ;;
10283 no) $as_echo "#define restrict /**/" >>confdefs.h
10284 ;;
10285 *) cat >>confdefs.h <<_ACEOF
10286 #define restrict $ac_cv_c_restrict
10287 _ACEOF
10288 ;;
10289 esac
10290
10291
10292
10293
10294
10295
10296
10297
10298
10299
10300
10301
10302
10303
10304
10305 if test $gl_cv_have_include_next = yes; then
10306 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
10307 else
10308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
10309 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
10310 if ${gl_cv_next_sys_stat_h+:} false; then :
10311 $as_echo_n "(cached) " >&6
10312 else
10313
10314 if test $ac_cv_header_sys_stat_h = yes; then
10315
10316
10317
10318
10319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10320 /* end confdefs.h. */
10321 #include <sys/stat.h>
10322 _ACEOF
10323 case "$host_os" in
10324 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10325 *) gl_absname_cpp="$ac_cpp" ;;
10326 esac
10327
10328 case "$host_os" in
10329 mingw*)
10330 gl_dirsep_regex='[/\\]'
10331 ;;
10332 *)
10333 gl_dirsep_regex='\/'
10334 ;;
10335 esac
10336 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10337 gl_header_literal_regex=`echo 'sys/stat.h' \
10338 | sed -e "$gl_make_literal_regex_sed"`
10339 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10340 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10341 s|^/[^/]|//&|
10342 p
10343 q
10344 }'
10345
10346 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10347 sed -n "$gl_absolute_header_sed"`
10348
10349 gl_header=$gl_cv_absolute_sys_stat_h
10350 gl_cv_next_sys_stat_h='"'$gl_header'"'
10351 else
10352 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
10353 fi
10354
10355
10356 fi
10357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
10358 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
10359 fi
10360 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
10361
10362 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10363 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10364 gl_next_as_first_directive='<'sys/stat.h'>'
10365 else
10366 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10367 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
10368 fi
10369 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
10370
10371
10372
10373
10374
10375
10376
10377
10378 WINDOWS_STAT_TIMESPEC=0
10379
10380
10381
10382
10383
10384
10385
10386
10387 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
10388 #include <sys/stat.h>
10389 "
10390 if test "x$ac_cv_type_nlink_t" = xyes; then :
10391
10392 else
10393
10394 $as_echo "#define nlink_t int" >>confdefs.h
10395
10396 fi
10397
10398
10399
10400
10401
10402
10403
10404
10405
10406
10407 case "$host_os" in
10408 mingw*)
10409 for ac_header in sdkddkver.h
10410 do :
10411 ac_fn_c_check_header_mongrel "$LINENO" "sdkddkver.h" "ac_cv_header_sdkddkver_h" "$ac_includes_default"
10412 if test "x$ac_cv_header_sdkddkver_h" = xyes; then :
10413 cat >>confdefs.h <<_ACEOF
10414 #define HAVE_SDKDDKVER_H 1
10415 _ACEOF
10416
10417 fi
10418
10419 done
10420
10421 ;;
10422 esac
10423
10424
10425
10426
10427
10428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
10429 $as_echo_n "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
10430 if ${gl_cv_func_getcwd_null+:} false; then :
10431 $as_echo_n "(cached) " >&6
10432 else
10433 if test "$cross_compiling" = yes; then :
10434 case "$host_os" in
10435 # Guess yes on glibc systems.
10436 *-gnu* | gnu*) gl_cv_func_getcwd_null="guessing yes";;
10437 # Guess yes on musl systems.
10438 *-musl*) gl_cv_func_getcwd_null="guessing yes";;
10439 # Guess yes on Cygwin.
10440 cygwin*) gl_cv_func_getcwd_null="guessing yes";;
10441 # If we don't know, obey --enable-cross-guesses.
10442 *) gl_cv_func_getcwd_null="$gl_cross_guess_normal";;
10443 esac
10444
10445 else
10446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10447 /* end confdefs.h. */
10448
10449 # include <stdlib.h>
10450 # if HAVE_UNISTD_H
10451 # include <unistd.h>
10452 # else /* on Windows with MSVC */
10453 # include <direct.h>
10454 # endif
10455
10456
10457 $gl_mda_defines
10458
10459 # ifndef getcwd
10460 char *getcwd ();
10461 # endif
10462
10463 int
10464 main ()
10465 {
10466
10467 #if defined _WIN32 && ! defined __CYGWIN__
10468 /* mingw cwd does not start with '/', but _getcwd does allocate.
10469 However, mingw fails to honor non-zero size. */
10470 #else
10471 if (chdir ("/") != 0)
10472 return 1;
10473 else
10474 {
10475 char *f = getcwd (NULL, 0);
10476 if (! f)
10477 return 2;
10478 if (f[0] != '/')
10479 { free (f); return 3; }
10480 if (f[1] != '\0')
10481 { free (f); return 4; }
10482 free (f);
10483 return 0;
10484 }
10485 #endif
10486
10487 ;
10488 return 0;
10489 }
10490 _ACEOF
10491 if ac_fn_c_try_run "$LINENO"; then :
10492 gl_cv_func_getcwd_null=yes
10493 else
10494 gl_cv_func_getcwd_null=no
10495 fi
10496 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10497 conftest.$ac_objext conftest.beam conftest.$ac_ext
10498 fi
10499
10500 fi
10501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
10502 $as_echo "$gl_cv_func_getcwd_null" >&6; }
10503
10504
10505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
10506 $as_echo_n "checking for getcwd with POSIX signature... " >&6; }
10507 if ${gl_cv_func_getcwd_posix_signature+:} false; then :
10508 $as_echo_n "(cached) " >&6
10509 else
10510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10511 /* end confdefs.h. */
10512 #include <unistd.h>
10513
10514
10515 $gl_mda_defines
10516
10517 int
10518 main ()
10519 {
10520 extern
10521 #ifdef __cplusplus
10522 "C"
10523 #endif
10524 char *getcwd (char *, size_t);
10525
10526 ;
10527 return 0;
10528 }
10529
10530 _ACEOF
10531 if ac_fn_c_try_compile "$LINENO"; then :
10532 gl_cv_func_getcwd_posix_signature=yes
10533 else
10534 gl_cv_func_getcwd_posix_signature=no
10535 fi
10536 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10537
10538 fi
10539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
10540 $as_echo "$gl_cv_func_getcwd_posix_signature" >&6; }
10541
10542 ac_fn_c_check_decl "$LINENO" "getcwd" "ac_cv_have_decl_getcwd" "$ac_includes_default"
10543 if test "x$ac_cv_have_decl_getcwd" = xyes; then :
10544 ac_have_decl=1
10545 else
10546 ac_have_decl=0
10547 fi
10548
10549 cat >>confdefs.h <<_ACEOF
10550 #define HAVE_DECL_GETCWD $ac_have_decl
10551 _ACEOF
10552
10553
10554 GNULIB_DPRINTF=0;
10555 GNULIB_FCLOSE=0;
10556 GNULIB_FDOPEN=0;
10557 GNULIB_FFLUSH=0;
10558 GNULIB_FGETC=0;
10559 GNULIB_FGETS=0;
10560 GNULIB_FOPEN=0;
10561 GNULIB_FPRINTF=0;
10562 GNULIB_FPRINTF_POSIX=0;
10563 GNULIB_FPURGE=0;
10564 GNULIB_FPUTC=0;
10565 GNULIB_FPUTS=0;
10566 GNULIB_FREAD=0;
10567 GNULIB_FREOPEN=0;
10568 GNULIB_FSCANF=0;
10569 GNULIB_FSEEK=0;
10570 GNULIB_FSEEKO=0;
10571 GNULIB_FTELL=0;
10572 GNULIB_FTELLO=0;
10573 GNULIB_FWRITE=0;
10574 GNULIB_GETC=0;
10575 GNULIB_GETCHAR=0;
10576 GNULIB_GETDELIM=0;
10577 GNULIB_GETLINE=0;
10578 GNULIB_OBSTACK_PRINTF=0;
10579 GNULIB_OBSTACK_PRINTF_POSIX=0;
10580 GNULIB_PCLOSE=0;
10581 GNULIB_PERROR=0;
10582 GNULIB_POPEN=0;
10583 GNULIB_PRINTF=0;
10584 GNULIB_PRINTF_POSIX=0;
10585 GNULIB_PUTC=0;
10586 GNULIB_PUTCHAR=0;
10587 GNULIB_PUTS=0;
10588 GNULIB_REMOVE=0;
10589 GNULIB_RENAME=0;
10590 GNULIB_RENAMEAT=0;
10591 GNULIB_SCANF=0;
10592 GNULIB_SNPRINTF=0;
10593 GNULIB_SPRINTF_POSIX=0;
10594 GNULIB_STDIO_H_NONBLOCKING=0;
10595 GNULIB_STDIO_H_SIGPIPE=0;
10596 GNULIB_TMPFILE=0;
10597 GNULIB_VASPRINTF=0;
10598 GNULIB_VFSCANF=0;
10599 GNULIB_VSCANF=0;
10600 GNULIB_VDPRINTF=0;
10601 GNULIB_VFPRINTF=0;
10602 GNULIB_VFPRINTF_POSIX=0;
10603 GNULIB_VPRINTF=0;
10604 GNULIB_VPRINTF_POSIX=0;
10605 GNULIB_VSNPRINTF=0;
10606 GNULIB_VSPRINTF_POSIX=0;
10607 GNULIB_MDA_FCLOSEALL=1;
10608 GNULIB_MDA_FDOPEN=1;
10609 GNULIB_MDA_FILENO=1;
10610 GNULIB_MDA_GETW=1;
10611 GNULIB_MDA_PUTW=1;
10612 GNULIB_MDA_TEMPNAM=1;
10613 HAVE_DECL_FCLOSEALL=1;
10614 HAVE_DECL_FPURGE=1;
10615 HAVE_DECL_FSEEKO=1;
10616 HAVE_DECL_FTELLO=1;
10617 HAVE_DECL_GETDELIM=1;
10618 HAVE_DECL_GETLINE=1;
10619 HAVE_DECL_OBSTACK_PRINTF=1;
10620 HAVE_DECL_SNPRINTF=1;
10621 HAVE_DECL_VSNPRINTF=1;
10622 HAVE_DPRINTF=1;
10623 HAVE_FSEEKO=1;
10624 HAVE_FTELLO=1;
10625 HAVE_PCLOSE=1;
10626 HAVE_POPEN=1;
10627 HAVE_RENAMEAT=1;
10628 HAVE_VASPRINTF=1;
10629 HAVE_VDPRINTF=1;
10630 REPLACE_DPRINTF=0;
10631 REPLACE_FCLOSE=0;
10632 REPLACE_FDOPEN=0;
10633 REPLACE_FFLUSH=0;
10634 REPLACE_FOPEN=0;
10635 REPLACE_FPRINTF=0;
10636 REPLACE_FPURGE=0;
10637 REPLACE_FREOPEN=0;
10638 REPLACE_FSEEK=0;
10639 REPLACE_FSEEKO=0;
10640 REPLACE_FTELL=0;
10641 REPLACE_FTELLO=0;
10642 REPLACE_GETDELIM=0;
10643 REPLACE_GETLINE=0;
10644 REPLACE_OBSTACK_PRINTF=0;
10645 REPLACE_PERROR=0;
10646 REPLACE_POPEN=0;
10647 REPLACE_PRINTF=0;
10648 REPLACE_REMOVE=0;
10649 REPLACE_RENAME=0;
10650 REPLACE_RENAMEAT=0;
10651 REPLACE_SNPRINTF=0;
10652 REPLACE_SPRINTF=0;
10653 REPLACE_STDIO_READ_FUNCS=0;
10654 REPLACE_STDIO_WRITE_FUNCS=0;
10655 REPLACE_TMPFILE=0;
10656 REPLACE_VASPRINTF=0;
10657 REPLACE_VDPRINTF=0;
10658 REPLACE_VFPRINTF=0;
10659 REPLACE_VPRINTF=0;
10660 REPLACE_VSNPRINTF=0;
10661 REPLACE_VSPRINTF=0;
10662
10663 ac_fn_c_check_decl "$LINENO" "getdelim" "ac_cv_have_decl_getdelim" "$ac_includes_default"
10664 if test "x$ac_cv_have_decl_getdelim" = xyes; then :
10665 ac_have_decl=1
10666 else
10667 ac_have_decl=0
10668 fi
10669
10670 cat >>confdefs.h <<_ACEOF
10671 #define HAVE_DECL_GETDELIM $ac_have_decl
10672 _ACEOF
10673
10674
10675
10676
10677
10678 ac_fn_c_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default"
10679 if test "x$ac_cv_have_decl_getdtablesize" = xyes; then :
10680 ac_have_decl=1
10681 else
10682 ac_have_decl=0
10683 fi
10684
10685 cat >>confdefs.h <<_ACEOF
10686 #define HAVE_DECL_GETDTABLESIZE $ac_have_decl
10687 _ACEOF
10688
10689 ac_fn_c_check_decl "$LINENO" "getline" "ac_cv_have_decl_getline" "$ac_includes_default"
10690 if test "x$ac_cv_have_decl_getline" = xyes; then :
10691 ac_have_decl=1
10692 else
10693 ac_have_decl=0
10694 fi
10695
10696 cat >>confdefs.h <<_ACEOF
10697 #define HAVE_DECL_GETLINE $ac_have_decl
10698 _ACEOF
10699
10700 ac_fn_c_check_decl "$LINENO" "getlogin_r" "ac_cv_have_decl_getlogin_r" "$ac_includes_default"
10701 if test "x$ac_cv_have_decl_getlogin_r" = xyes; then :
10702 ac_have_decl=1
10703 else
10704 ac_have_decl=0
10705 fi
10706
10707 cat >>confdefs.h <<_ACEOF
10708 #define HAVE_DECL_GETLOGIN_R $ac_have_decl
10709 _ACEOF
10710
10711
10712
10713 ac_fn_c_check_decl "$LINENO" "getlogin" "ac_cv_have_decl_getlogin" "$ac_includes_default"
10714 if test "x$ac_cv_have_decl_getlogin" = xyes; then :
10715 ac_have_decl=1
10716 else
10717 ac_have_decl=0
10718 fi
10719
10720 cat >>confdefs.h <<_ACEOF
10721 #define HAVE_DECL_GETLOGIN $ac_have_decl
10722 _ACEOF
10723
10724
10725
10726 case $host_os in
10727 mingw*)
10728 LIB_GETLOGIN='-ladvapi32' ;;
10729 *)
10730 LIB_GETLOGIN= ;;
10731 esac
10732
10733
10734
10735
10736
10737
10738
10739 GNULIB_GETRANDOM=0;
10740 HAVE_GETRANDOM=1;
10741 REPLACE_GETRANDOM=0;
10742
10743
10744
10745
10746 GNULIB_GETTIMEOFDAY=0;
10747 HAVE_GETTIMEOFDAY=1;
10748 HAVE_STRUCT_TIMEVAL=1;
10749 HAVE_SYS_TIME_H=1;
10750 REPLACE_GETTIMEOFDAY=0;
10751 REPLACE_STRUCT_TIMEVAL=0;
10752
10753
10754
10755
10756
10757
10758
10759
10760
10761
10762
10763
10764
10765
10766
10767
10768 if test $gl_cv_have_include_next = yes; then
10769 gl_cv_next_sys_time_h='<'sys/time.h'>'
10770 else
10771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
10772 $as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
10773 if ${gl_cv_next_sys_time_h+:} false; then :
10774 $as_echo_n "(cached) " >&6
10775 else
10776
10777 if test $ac_cv_header_sys_time_h = yes; then
10778
10779
10780
10781
10782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10783 /* end confdefs.h. */
10784 #include <sys/time.h>
10785 _ACEOF
10786 case "$host_os" in
10787 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10788 *) gl_absname_cpp="$ac_cpp" ;;
10789 esac
10790
10791 case "$host_os" in
10792 mingw*)
10793 gl_dirsep_regex='[/\\]'
10794 ;;
10795 *)
10796 gl_dirsep_regex='\/'
10797 ;;
10798 esac
10799 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10800 gl_header_literal_regex=`echo 'sys/time.h' \
10801 | sed -e "$gl_make_literal_regex_sed"`
10802 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10803 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10804 s|^/[^/]|//&|
10805 p
10806 q
10807 }'
10808
10809 gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10810 sed -n "$gl_absolute_header_sed"`
10811
10812 gl_header=$gl_cv_absolute_sys_time_h
10813 gl_cv_next_sys_time_h='"'$gl_header'"'
10814 else
10815 gl_cv_next_sys_time_h='<'sys/time.h'>'
10816 fi
10817
10818
10819 fi
10820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
10821 $as_echo "$gl_cv_next_sys_time_h" >&6; }
10822 fi
10823 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
10824
10825 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10826 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10827 gl_next_as_first_directive='<'sys/time.h'>'
10828 else
10829 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10830 gl_next_as_first_directive=$gl_cv_next_sys_time_h
10831 fi
10832 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
10833
10834
10835
10836
10837
10838 if test $ac_cv_header_sys_time_h != yes; then
10839 HAVE_SYS_TIME_H=0
10840 fi
10841
10842
10843
10844
10845
10846 if test $ac_cv_header_sys_socket_h != yes; then
10847 for ac_header in winsock2.h
10848 do :
10849 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
10850 if test "x$ac_cv_header_winsock2_h" = xyes; then :
10851 cat >>confdefs.h <<_ACEOF
10852 #define HAVE_WINSOCK2_H 1
10853 _ACEOF
10854
10855 fi
10856
10857 done
10858
10859 fi
10860 if test "$ac_cv_header_winsock2_h" = yes; then
10861 HAVE_WINSOCK2_H=1
10862 UNISTD_H_HAVE_WINSOCK2_H=1
10863 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
10864 else
10865 HAVE_WINSOCK2_H=0
10866 fi
10867
10868
10869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
10870 $as_echo_n "checking for struct timeval... " >&6; }
10871 if ${gl_cv_sys_struct_timeval+:} false; then :
10872 $as_echo_n "(cached) " >&6
10873 else
10874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10875 /* end confdefs.h. */
10876 #if HAVE_SYS_TIME_H
10877 #include <sys/time.h>
10878 #endif
10879 #include <time.h>
10880 #if HAVE_WINSOCK2_H
10881 # include <winsock2.h>
10882 #endif
10883
10884 int
10885 main ()
10886 {
10887 static struct timeval x; x.tv_sec = x.tv_usec;
10888 ;
10889 return 0;
10890 }
10891 _ACEOF
10892 if ac_fn_c_try_compile "$LINENO"; then :
10893 gl_cv_sys_struct_timeval=yes
10894 else
10895 gl_cv_sys_struct_timeval=no
10896 fi
10897 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10898
10899 fi
10900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
10901 $as_echo "$gl_cv_sys_struct_timeval" >&6; }
10902 if test $gl_cv_sys_struct_timeval != yes; then
10903 HAVE_STRUCT_TIMEVAL=0
10904 else
10905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
10906 $as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
10907 if ${gl_cv_sys_struct_timeval_tv_sec+:} false; then :
10908 $as_echo_n "(cached) " >&6
10909 else
10910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10911 /* end confdefs.h. */
10912 #if HAVE_SYS_TIME_H
10913 #include <sys/time.h>
10914 #endif
10915 #include <time.h>
10916 #if HAVE_WINSOCK2_H
10917 # include <winsock2.h>
10918 #endif
10919
10920 int
10921 main ()
10922 {
10923 static struct timeval x;
10924 typedef int verify_tv_sec_type[
10925 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
10926 ];
10927
10928 ;
10929 return 0;
10930 }
10931 _ACEOF
10932 if ac_fn_c_try_compile "$LINENO"; then :
10933 gl_cv_sys_struct_timeval_tv_sec=yes
10934 else
10935 gl_cv_sys_struct_timeval_tv_sec=no
10936 fi
10937 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10938
10939 fi
10940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
10941 $as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
10942 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
10943 REPLACE_STRUCT_TIMEVAL=1
10944 fi
10945 fi
10946
10947
10948
10949
10950
10951
10952
10953
10954
10955
10956
10957 GNULIB_GLOB=0;
10958 HAVE_GLOB=1;
10959 HAVE_GLOB_PATTERN_P=1;
10960 REPLACE_GLOB=0;
10961 REPLACE_GLOB_PATTERN_P=0;
10962
10963
10964
10965
10966
10967
10968
10969
10970
10971
10972
10973
10974
10975
10976
10977
10978
10979 if test $gl_cv_have_include_next = yes; then
10980 gl_cv_next_glob_h='<'glob.h'>'
10981 else
10982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <glob.h>" >&5
10983 $as_echo_n "checking absolute name of <glob.h>... " >&6; }
10984 if ${gl_cv_next_glob_h+:} false; then :
10985 $as_echo_n "(cached) " >&6
10986 else
10987
10988 if test $ac_cv_header_glob_h = yes; then
10989
10990
10991
10992
10993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10994 /* end confdefs.h. */
10995 #include <glob.h>
10996 _ACEOF
10997 case "$host_os" in
10998 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10999 *) gl_absname_cpp="$ac_cpp" ;;
11000 esac
11001
11002 case "$host_os" in
11003 mingw*)
11004 gl_dirsep_regex='[/\\]'
11005 ;;
11006 *)
11007 gl_dirsep_regex='\/'
11008 ;;
11009 esac
11010 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11011 gl_header_literal_regex=`echo 'glob.h' \
11012 | sed -e "$gl_make_literal_regex_sed"`
11013 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11014 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11015 s|^/[^/]|//&|
11016 p
11017 q
11018 }'
11019
11020 gl_cv_absolute_glob_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11021 sed -n "$gl_absolute_header_sed"`
11022
11023 gl_header=$gl_cv_absolute_glob_h
11024 gl_cv_next_glob_h='"'$gl_header'"'
11025 else
11026 gl_cv_next_glob_h='<'glob.h'>'
11027 fi
11028
11029
11030 fi
11031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_glob_h" >&5
11032 $as_echo "$gl_cv_next_glob_h" >&6; }
11033 fi
11034 NEXT_GLOB_H=$gl_cv_next_glob_h
11035
11036 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11037 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11038 gl_next_as_first_directive='<'glob.h'>'
11039 else
11040 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11041 gl_next_as_first_directive=$gl_cv_next_glob_h
11042 fi
11043 NEXT_AS_FIRST_DIRECTIVE_GLOB_H=$gl_next_as_first_directive
11044
11045
11046
11047
11048
11049 if test $ac_cv_header_glob_h = yes; then
11050 HAVE_GLOB_H=1
11051 else
11052 HAVE_GLOB_H=0
11053 fi
11054
11055
11056 GLOB_H=''
11057 if false; then
11058 GLOB_H=glob.h
11059 else
11060 if test $ac_cv_header_glob_h != yes; then
11061 GLOB_H=glob.h
11062 fi
11063 fi
11064
11065
11066 if test -n "$GLOB_H"; then
11067 GL_GENERATE_GLOB_H_TRUE=
11068 GL_GENERATE_GLOB_H_FALSE='#'
11069 else
11070 GL_GENERATE_GLOB_H_TRUE='#'
11071 GL_GENERATE_GLOB_H_FALSE=
11072 fi
11073
11074
11075
11076
11077
11078
11079
11080
11081
11082
11083
11084
11085
11086
11087
11088
11089 if test -z "$gl_pthreadlib_body_done"; then
11090 gl_pthread_api=no
11091 LIBPTHREAD=
11092 LIBPMULTITHREAD=
11093 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
11094 # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
11095 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
11096 if test "x$ac_cv_header_pthread_h" = xyes; then :
11097 gl_have_pthread_h=yes
11098 else
11099 gl_have_pthread_h=no
11100 fi
11101
11102
11103 if test "$gl_have_pthread_h" = yes; then
11104 # Other possible tests:
11105 # -lpthreads (FSU threads, PCthreads)
11106 # -lgthreads
11107 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
11108 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
11109 # the second one only in libpthread, and lock.c needs it.
11110 #
11111 # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
11112 # needs -pthread for some reason. See:
11113 # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
11114 save_LIBS=$LIBS
11115 for gl_pthread in '' '-pthread'; do
11116 LIBS="$LIBS $gl_pthread"
11117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11118 /* end confdefs.h. */
11119 #include <pthread.h>
11120 pthread_mutex_t m;
11121 pthread_mutexattr_t ma;
11122
11123 int
11124 main ()
11125 {
11126 pthread_mutex_lock (&m);
11127 pthread_mutexattr_init (&ma);
11128 ;
11129 return 0;
11130 }
11131 _ACEOF
11132 if ac_fn_c_try_link "$LINENO"; then :
11133 gl_pthread_api=yes
11134 LIBPTHREAD=$gl_pthread
11135 LIBPMULTITHREAD=$gl_pthread
11136 fi
11137 rm -f core conftest.err conftest.$ac_objext \
11138 conftest$ac_exeext conftest.$ac_ext
11139 LIBS=$save_LIBS
11140 test $gl_pthread_api = yes && break
11141 done
11142
11143 # Test for libpthread by looking for pthread_kill. (Not pthread_self,
11144 # since it is defined as a macro on OSF/1.)
11145 if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
11146 # The program links fine without libpthread. But it may actually
11147 # need to link with libpthread in order to create multiple threads.
11148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
11149 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
11150 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
11151 $as_echo_n "(cached) " >&6
11152 else
11153 ac_check_lib_save_LIBS=$LIBS
11154 LIBS="-lpthread $LIBS"
11155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11156 /* end confdefs.h. */
11157
11158 /* Override any GCC internal prototype to avoid an error.
11159 Use char because int might match the return type of a GCC
11160 builtin and then its argument prototype would still apply. */
11161 #ifdef __cplusplus
11162 extern "C"
11163 #endif
11164 char pthread_kill ();
11165 int
11166 main ()
11167 {
11168 return pthread_kill ();
11169 ;
11170 return 0;
11171 }
11172 _ACEOF
11173 if ac_fn_c_try_link "$LINENO"; then :
11174 ac_cv_lib_pthread_pthread_kill=yes
11175 else
11176 ac_cv_lib_pthread_pthread_kill=no
11177 fi
11178 rm -f core conftest.err conftest.$ac_objext \
11179 conftest$ac_exeext conftest.$ac_ext
11180 LIBS=$ac_check_lib_save_LIBS
11181 fi
11182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
11183 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
11184 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
11185 LIBPMULTITHREAD=-lpthread
11186 # On Solaris and HP-UX, most pthread functions exist also in libc.
11187 # Therefore pthread_in_use() needs to actually try to create a
11188 # thread: pthread_create from libc will fail, whereas
11189 # pthread_create will actually create a thread.
11190 # On Solaris 10 or newer, this test is no longer needed, because
11191 # libc contains the fully functional pthread functions.
11192 case "$host_os" in
11193 solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
11194
11195 $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
11196
11197 esac
11198
11199 fi
11200
11201 elif test $gl_pthread_api != yes; then
11202 # Some library is needed. Try libpthread and libc_r.
11203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
11204 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
11205 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
11206 $as_echo_n "(cached) " >&6
11207 else
11208 ac_check_lib_save_LIBS=$LIBS
11209 LIBS="-lpthread $LIBS"
11210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11211 /* end confdefs.h. */
11212
11213 /* Override any GCC internal prototype to avoid an error.
11214 Use char because int might match the return type of a GCC
11215 builtin and then its argument prototype would still apply. */
11216 #ifdef __cplusplus
11217 extern "C"
11218 #endif
11219 char pthread_kill ();
11220 int
11221 main ()
11222 {
11223 return pthread_kill ();
11224 ;
11225 return 0;
11226 }
11227 _ACEOF
11228 if ac_fn_c_try_link "$LINENO"; then :
11229 ac_cv_lib_pthread_pthread_kill=yes
11230 else
11231 ac_cv_lib_pthread_pthread_kill=no
11232 fi
11233 rm -f core conftest.err conftest.$ac_objext \
11234 conftest$ac_exeext conftest.$ac_ext
11235 LIBS=$ac_check_lib_save_LIBS
11236 fi
11237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
11238 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
11239 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
11240 gl_pthread_api=yes
11241 LIBPTHREAD=-lpthread
11242 LIBPMULTITHREAD=-lpthread
11243 fi
11244
11245 if test $gl_pthread_api != yes; then
11246 # For FreeBSD 4.
11247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
11248 $as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
11249 if ${ac_cv_lib_c_r_pthread_kill+:} false; then :
11250 $as_echo_n "(cached) " >&6
11251 else
11252 ac_check_lib_save_LIBS=$LIBS
11253 LIBS="-lc_r $LIBS"
11254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11255 /* end confdefs.h. */
11256
11257 /* Override any GCC internal prototype to avoid an error.
11258 Use char because int might match the return type of a GCC
11259 builtin and then its argument prototype would still apply. */
11260 #ifdef __cplusplus
11261 extern "C"
11262 #endif
11263 char pthread_kill ();
11264 int
11265 main ()
11266 {
11267 return pthread_kill ();
11268 ;
11269 return 0;
11270 }
11271 _ACEOF
11272 if ac_fn_c_try_link "$LINENO"; then :
11273 ac_cv_lib_c_r_pthread_kill=yes
11274 else
11275 ac_cv_lib_c_r_pthread_kill=no
11276 fi
11277 rm -f core conftest.err conftest.$ac_objext \
11278 conftest$ac_exeext conftest.$ac_ext
11279 LIBS=$ac_check_lib_save_LIBS
11280 fi
11281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
11282 $as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
11283 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then :
11284 gl_pthread_api=yes
11285 LIBPTHREAD=-lc_r
11286 LIBPMULTITHREAD=-lc_r
11287 fi
11288
11289 fi
11290 fi
11291 fi
11292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
11293 $as_echo_n "checking whether POSIX threads API is available... " >&6; }
11294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
11295 $as_echo "$gl_pthread_api" >&6; }
11296
11297
11298 if test $gl_pthread_api = yes; then
11299
11300 $as_echo "#define HAVE_PTHREAD_API 1" >>confdefs.h
11301
11302 fi
11303
11304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11305 /* end confdefs.h. */
11306 #include <sched.h>
11307 int
11308 main ()
11309 {
11310 sched_yield ();
11311 ;
11312 return 0;
11313 }
11314 _ACEOF
11315 if ac_fn_c_try_link "$LINENO"; then :
11316 LIB_SCHED_YIELD=
11317
11318 else
11319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
11320 $as_echo_n "checking for sched_yield in -lrt... " >&6; }
11321 if ${ac_cv_lib_rt_sched_yield+:} false; then :
11322 $as_echo_n "(cached) " >&6
11323 else
11324 ac_check_lib_save_LIBS=$LIBS
11325 LIBS="-lrt $LIBS"
11326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11327 /* end confdefs.h. */
11328
11329 /* Override any GCC internal prototype to avoid an error.
11330 Use char because int might match the return type of a GCC
11331 builtin and then its argument prototype would still apply. */
11332 #ifdef __cplusplus
11333 extern "C"
11334 #endif
11335 char sched_yield ();
11336 int
11337 main ()
11338 {
11339 return sched_yield ();
11340 ;
11341 return 0;
11342 }
11343 _ACEOF
11344 if ac_fn_c_try_link "$LINENO"; then :
11345 ac_cv_lib_rt_sched_yield=yes
11346 else
11347 ac_cv_lib_rt_sched_yield=no
11348 fi
11349 rm -f core conftest.err conftest.$ac_objext \
11350 conftest$ac_exeext conftest.$ac_ext
11351 LIBS=$ac_check_lib_save_LIBS
11352 fi
11353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
11354 $as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
11355 if test "x$ac_cv_lib_rt_sched_yield" = xyes; then :
11356 LIB_SCHED_YIELD=-lrt
11357 else
11358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
11359 $as_echo_n "checking for sched_yield in -lposix4... " >&6; }
11360 if ${ac_cv_lib_posix4_sched_yield+:} false; then :
11361 $as_echo_n "(cached) " >&6
11362 else
11363 ac_check_lib_save_LIBS=$LIBS
11364 LIBS="-lposix4 $LIBS"
11365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11366 /* end confdefs.h. */
11367
11368 /* Override any GCC internal prototype to avoid an error.
11369 Use char because int might match the return type of a GCC
11370 builtin and then its argument prototype would still apply. */
11371 #ifdef __cplusplus
11372 extern "C"
11373 #endif
11374 char sched_yield ();
11375 int
11376 main ()
11377 {
11378 return sched_yield ();
11379 ;
11380 return 0;
11381 }
11382 _ACEOF
11383 if ac_fn_c_try_link "$LINENO"; then :
11384 ac_cv_lib_posix4_sched_yield=yes
11385 else
11386 ac_cv_lib_posix4_sched_yield=no
11387 fi
11388 rm -f core conftest.err conftest.$ac_objext \
11389 conftest$ac_exeext conftest.$ac_ext
11390 LIBS=$ac_check_lib_save_LIBS
11391 fi
11392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
11393 $as_echo "$ac_cv_lib_posix4_sched_yield" >&6; }
11394 if test "x$ac_cv_lib_posix4_sched_yield" = xyes; then :
11395 LIB_SCHED_YIELD=-lposix4
11396 fi
11397
11398 fi
11399
11400
11401 fi
11402 rm -f core conftest.err conftest.$ac_objext \
11403 conftest$ac_exeext conftest.$ac_ext
11404
11405
11406 gl_pthreadlib_body_done=done
11407 fi
11408
11409
11410
11411
11412
11413
11414
11415
11416
11417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (LC_ALL, NULL) is multithread-safe" >&5
11418 $as_echo_n "checking whether setlocale (LC_ALL, NULL) is multithread-safe... " >&6; }
11419 if ${gl_cv_func_setlocale_null_all_mtsafe+:} false; then :
11420 $as_echo_n "(cached) " >&6
11421 else
11422 case "$host_os" in
11423 # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin.
11424 *-musl* | darwin* | freebsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*)
11425 gl_cv_func_setlocale_null_all_mtsafe=no ;;
11426 # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows.
11427 *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*)
11428 gl_cv_func_setlocale_null_all_mtsafe=yes ;;
11429 # If we don't know, obey --enable-cross-guesses.
11430 *)
11431 gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;;
11432 esac
11433
11434 fi
11435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_all_mtsafe" >&5
11436 $as_echo "$gl_cv_func_setlocale_null_all_mtsafe" >&6; }
11437 case "$host_os" in
11438 mingw*) ;;
11439 *)
11440 if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
11441 gl_cv_func_setlocale_null_all_mtsafe="trivially yes"
11442 fi
11443 ;;
11444 esac
11445 case "$gl_cv_func_setlocale_null_all_mtsafe" in
11446 *yes) SETLOCALE_NULL_ALL_MTSAFE=1 ;;
11447 *) SETLOCALE_NULL_ALL_MTSAFE=0 ;;
11448 esac
11449
11450 cat >>confdefs.h <<_ACEOF
11451 #define SETLOCALE_NULL_ALL_MTSAFE $SETLOCALE_NULL_ALL_MTSAFE
11452 _ACEOF
11453
11454
11455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (category, NULL) is multithread-safe" >&5
11456 $as_echo_n "checking whether setlocale (category, NULL) is multithread-safe... " >&6; }
11457 if ${gl_cv_func_setlocale_null_one_mtsafe+:} false; then :
11458 $as_echo_n "(cached) " >&6
11459 else
11460 case "$host_os" in
11461 # Guess no on OpenBSD, AIX.
11462 openbsd* | aix*)
11463 gl_cv_func_setlocale_null_one_mtsafe=no ;;
11464 # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows.
11465 *-gnu* | gnu* | *-musl* | darwin* | freebsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
11466 gl_cv_func_setlocale_null_one_mtsafe=yes ;;
11467 # If we don't know, obey --enable-cross-guesses.
11468 *)
11469 gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;;
11470 esac
11471
11472 fi
11473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_one_mtsafe" >&5
11474 $as_echo "$gl_cv_func_setlocale_null_one_mtsafe" >&6; }
11475 case "$host_os" in
11476 mingw*) ;;
11477 *)
11478 if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
11479 gl_cv_func_setlocale_null_one_mtsafe="trivially yes"
11480 fi
11481 ;;
11482 esac
11483 case "$gl_cv_func_setlocale_null_one_mtsafe" in
11484 *yes) SETLOCALE_NULL_ONE_MTSAFE=1 ;;
11485 *) SETLOCALE_NULL_ONE_MTSAFE=0 ;;
11486 esac
11487
11488 cat >>confdefs.h <<_ACEOF
11489 #define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE
11490 _ACEOF
11491
11492
11493 if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
11494 case "$host_os" in
11495 mingw*) LIB_SETLOCALE_NULL= ;;
11496 *)
11497
11498
11499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
11500 $as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
11501 if ${gl_cv_have_weak+:} false; then :
11502 $as_echo_n "(cached) " >&6
11503 else
11504 gl_cv_have_weak=no
11505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11506 /* end confdefs.h. */
11507 extern void xyzzy ();
11508 #pragma weak xyzzy
11509 int
11510 main ()
11511 {
11512 xyzzy();
11513 ;
11514 return 0;
11515 }
11516 _ACEOF
11517 if ac_fn_c_try_link "$LINENO"; then :
11518 gl_cv_have_weak=maybe
11519 fi
11520 rm -f core conftest.err conftest.$ac_objext \
11521 conftest$ac_exeext conftest.$ac_ext
11522 if test $gl_cv_have_weak = maybe; then
11523 if test "$cross_compiling" = yes; then :
11524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11525 /* end confdefs.h. */
11526 #ifdef __ELF__
11527 Extensible Linking Format
11528 #endif
11529
11530 _ACEOF
11531 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11532 $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
11533 gl_cv_have_weak="guessing yes"
11534 else
11535 gl_cv_have_weak="guessing no"
11536 fi
11537 rm -f conftest*
11538
11539
11540 else
11541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11542 /* end confdefs.h. */
11543
11544 #include <stdio.h>
11545 #pragma weak fputs
11546 int main ()
11547 {
11548 return (fputs == NULL);
11549 }
11550 _ACEOF
11551 if ac_fn_c_try_run "$LINENO"; then :
11552 gl_cv_have_weak=yes
11553 else
11554 gl_cv_have_weak=no
11555 fi
11556 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11557 conftest.$ac_objext conftest.beam conftest.$ac_ext
11558 fi
11559
11560 fi
11561 case " $LDFLAGS " in
11562 *" -static "*) gl_cv_have_weak=no ;;
11563 esac
11564 case "$gl_cv_have_weak" in
11565 *yes)
11566 case "$host_os" in
11567 freebsd* | dragonfly*)
11568 : > conftest1.c
11569 $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
11570 cat <<EOF > conftest2.c
11571 #include <pthread.h>
11572 #pragma weak pthread_mutexattr_gettype
11573 int main ()
11574 {
11575 return (pthread_mutexattr_gettype != NULL);
11576 }
11577 EOF
11578 $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
11579 || gl_cv_have_weak=no
11580 rm -f conftest1.c libempty.so conftest2.c conftest
11581 ;;
11582 esac
11583 ;;
11584 esac
11585
11586 fi
11587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
11588 $as_echo "$gl_cv_have_weak" >&6; }
11589 case "$gl_cv_have_weak" in
11590 *yes)
11591
11592 $as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
11593
11594 ;;
11595 esac
11596
11597 case "$gl_cv_have_weak" in
11598 *yes) LIB_SETLOCALE_NULL= ;;
11599 *) LIB_SETLOCALE_NULL="$LIBPTHREAD" ;;
11600 esac
11601 ;;
11602 esac
11603 else
11604 LIB_SETLOCALE_NULL=
11605 fi
11606
11607
11608
11609
11610
11611 GNULIB_SOCKET=0;
11612 GNULIB_CONNECT=0;
11613 GNULIB_ACCEPT=0;
11614 GNULIB_BIND=0;
11615 GNULIB_GETPEERNAME=0;
11616 GNULIB_GETSOCKNAME=0;
11617 GNULIB_GETSOCKOPT=0;
11618 GNULIB_LISTEN=0;
11619 GNULIB_RECV=0;
11620 GNULIB_SEND=0;
11621 GNULIB_RECVFROM=0;
11622 GNULIB_SENDTO=0;
11623 GNULIB_SETSOCKOPT=0;
11624 GNULIB_SHUTDOWN=0;
11625 GNULIB_ACCEPT4=0;
11626 HAVE_STRUCT_SOCKADDR_STORAGE=1;
11627 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1;
11628
11629 HAVE_SA_FAMILY_T=1;
11630 HAVE_ACCEPT4=1;
11631
11632
11633
11634
11635
11636 case "$host_os" in
11637 osf*)
11638
11639 $as_echo "#define _POSIX_PII_SOCKET 1" >>confdefs.h
11640
11641 ;;
11642 esac
11643
11644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> is self-contained" >&5
11645 $as_echo_n "checking whether <sys/socket.h> is self-contained... " >&6; }
11646 if ${gl_cv_header_sys_socket_h_selfcontained+:} false; then :
11647 $as_echo_n "(cached) " >&6
11648 else
11649
11650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11651 /* end confdefs.h. */
11652 #include <sys/socket.h>
11653 int
11654 main ()
11655 {
11656
11657 ;
11658 return 0;
11659 }
11660 _ACEOF
11661 if ac_fn_c_try_compile "$LINENO"; then :
11662 gl_cv_header_sys_socket_h_selfcontained=yes
11663 else
11664 gl_cv_header_sys_socket_h_selfcontained=no
11665 fi
11666 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11667
11668 fi
11669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_selfcontained" >&5
11670 $as_echo "$gl_cv_header_sys_socket_h_selfcontained" >&6; }
11671 if test $gl_cv_header_sys_socket_h_selfcontained = yes; then
11672 for ac_func in shutdown
11673 do :
11674 ac_fn_c_check_func "$LINENO" "shutdown" "ac_cv_func_shutdown"
11675 if test "x$ac_cv_func_shutdown" = xyes; then :
11676 cat >>confdefs.h <<_ACEOF
11677 #define HAVE_SHUTDOWN 1
11678 _ACEOF
11679
11680 fi
11681 done
11682
11683 if test $ac_cv_func_shutdown = yes; then
11684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> defines the SHUT_* macros" >&5
11685 $as_echo_n "checking whether <sys/socket.h> defines the SHUT_* macros... " >&6; }
11686 if ${gl_cv_header_sys_socket_h_shut+:} false; then :
11687 $as_echo_n "(cached) " >&6
11688 else
11689
11690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11691 /* end confdefs.h. */
11692 #include <sys/socket.h>
11693 int
11694 main ()
11695 {
11696 int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };
11697 ;
11698 return 0;
11699 }
11700 _ACEOF
11701 if ac_fn_c_try_compile "$LINENO"; then :
11702 gl_cv_header_sys_socket_h_shut=yes
11703 else
11704 gl_cv_header_sys_socket_h_shut=no
11705 fi
11706 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11707
11708 fi
11709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_shut" >&5
11710 $as_echo "$gl_cv_header_sys_socket_h_shut" >&6; }
11711 if test $gl_cv_header_sys_socket_h_shut = no; then
11712 SYS_SOCKET_H='sys/socket.h'
11713 fi
11714 fi
11715 fi
11716 # We need to check for ws2tcpip.h now.
11717
11718
11719
11720
11721
11722
11723
11724
11725
11726
11727
11728 if test $gl_cv_have_include_next = yes; then
11729 gl_cv_next_sys_socket_h='<'sys/socket.h'>'
11730 else
11731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/socket.h>" >&5
11732 $as_echo_n "checking absolute name of <sys/socket.h>... " >&6; }
11733 if ${gl_cv_next_sys_socket_h+:} false; then :
11734 $as_echo_n "(cached) " >&6
11735 else
11736
11737 if test $ac_cv_header_sys_socket_h = yes; then
11738
11739
11740
11741
11742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11743 /* end confdefs.h. */
11744 #include <sys/socket.h>
11745 _ACEOF
11746 case "$host_os" in
11747 aix*) gl_absname_cpp="$ac_cpp -C" ;;
11748 *) gl_absname_cpp="$ac_cpp" ;;
11749 esac
11750
11751 case "$host_os" in
11752 mingw*)
11753 gl_dirsep_regex='[/\\]'
11754 ;;
11755 *)
11756 gl_dirsep_regex='\/'
11757 ;;
11758 esac
11759 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11760 gl_header_literal_regex=`echo 'sys/socket.h' \
11761 | sed -e "$gl_make_literal_regex_sed"`
11762 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11763 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11764 s|^/[^/]|//&|
11765 p
11766 q
11767 }'
11768
11769 gl_cv_absolute_sys_socket_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11770 sed -n "$gl_absolute_header_sed"`
11771
11772 gl_header=$gl_cv_absolute_sys_socket_h
11773 gl_cv_next_sys_socket_h='"'$gl_header'"'
11774 else
11775 gl_cv_next_sys_socket_h='<'sys/socket.h'>'
11776 fi
11777
11778
11779 fi
11780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_socket_h" >&5
11781 $as_echo "$gl_cv_next_sys_socket_h" >&6; }
11782 fi
11783 NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_h
11784
11785 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11786 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11787 gl_next_as_first_directive='<'sys/socket.h'>'
11788 else
11789 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11790 gl_next_as_first_directive=$gl_cv_next_sys_socket_h
11791 fi
11792 NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H=$gl_next_as_first_directive
11793
11794
11795
11796
11797 if test $ac_cv_header_sys_socket_h = yes; then
11798 HAVE_SYS_SOCKET_H=1
11799 else
11800 HAVE_SYS_SOCKET_H=0
11801 fi
11802
11803
11804
11805 if test $ac_cv_header_sys_socket_h = yes; then
11806 HAVE_WS2TCPIP_H=0
11807 else
11808 if test $ac_cv_header_ws2tcpip_h = yes; then
11809 HAVE_WS2TCPIP_H=1
11810 else
11811 HAVE_WS2TCPIP_H=0
11812 fi
11813 fi
11814
11815
11816
11817 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "
11818 /* sys/types.h is not needed according to POSIX, but the
11819 sys/socket.h in i386-unknown-freebsd4.10 and
11820 powerpc-apple-darwin5.5 required it. */
11821 #include <sys/types.h>
11822 #ifdef HAVE_SYS_SOCKET_H
11823 #include <sys/socket.h>
11824 #endif
11825 #ifdef HAVE_WS2TCPIP_H
11826 #include <ws2tcpip.h>
11827 #endif
11828
11829 "
11830 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
11831
11832 cat >>confdefs.h <<_ACEOF
11833 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
11834 _ACEOF
11835
11836
11837 fi
11838 ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" "
11839 /* sys/types.h is not needed according to POSIX, but the
11840 sys/socket.h in i386-unknown-freebsd4.10 and
11841 powerpc-apple-darwin5.5 required it. */
11842 #include <sys/types.h>
11843 #ifdef HAVE_SYS_SOCKET_H
11844 #include <sys/socket.h>
11845 #endif
11846 #ifdef HAVE_WS2TCPIP_H
11847 #include <ws2tcpip.h>
11848 #endif
11849
11850 "
11851 if test "x$ac_cv_type_sa_family_t" = xyes; then :
11852
11853 cat >>confdefs.h <<_ACEOF
11854 #define HAVE_SA_FAMILY_T 1
11855 _ACEOF
11856
11857
11858 fi
11859
11860 if test $ac_cv_type_struct_sockaddr_storage = no; then
11861 HAVE_STRUCT_SOCKADDR_STORAGE=0
11862 fi
11863 if test $ac_cv_type_sa_family_t = no; then
11864 HAVE_SA_FAMILY_T=0
11865 fi
11866 if test $ac_cv_type_struct_sockaddr_storage != no; then
11867 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
11868 #ifdef HAVE_SYS_SOCKET_H
11869 #include <sys/socket.h>
11870 #endif
11871 #ifdef HAVE_WS2TCPIP_H
11872 #include <ws2tcpip.h>
11873 #endif
11874
11875 "
11876 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
11877
11878 cat >>confdefs.h <<_ACEOF
11879 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
11880 _ACEOF
11881
11882
11883 else
11884 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0
11885 fi
11886
11887 fi
11888 if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \
11889 || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then
11890 SYS_SOCKET_H='sys/socket.h'
11891 fi
11892
11893
11894
11895
11896 if test $ac_cv_header_sys_socket_h != yes; then
11897 for ac_header in winsock2.h
11898 do :
11899 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
11900 if test "x$ac_cv_header_winsock2_h" = xyes; then :
11901 cat >>confdefs.h <<_ACEOF
11902 #define HAVE_WINSOCK2_H 1
11903 _ACEOF
11904
11905 fi
11906
11907 done
11908
11909 fi
11910 if test "$ac_cv_header_winsock2_h" = yes; then
11911 HAVE_WINSOCK2_H=1
11912 UNISTD_H_HAVE_WINSOCK2_H=1
11913 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
11914 else
11915 HAVE_WINSOCK2_H=0
11916 fi
11917
11918
11919
11920
11921
11922
11923
11924
11925
11926
11927
11928
11929
11930
11931
11932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv4 sockets" >&5
11933 $as_echo_n "checking for IPv4 sockets... " >&6; }
11934 if ${gl_cv_socket_ipv4+:} false; then :
11935 $as_echo_n "(cached) " >&6
11936 else
11937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11938 /* end confdefs.h. */
11939 #include <sys/types.h>
11940 #ifdef HAVE_SYS_SOCKET_H
11941 #include <sys/socket.h>
11942 #endif
11943 #ifdef HAVE_NETINET_IN_H
11944 #include <netinet/in.h>
11945 #endif
11946 #ifdef HAVE_WINSOCK2_H
11947 #include <winsock2.h>
11948 #endif
11949 int
11950 main ()
11951 {
11952 int x = AF_INET; struct in_addr y; struct sockaddr_in z;
11953 if (&x && &y && &z) return 0;
11954 ;
11955 return 0;
11956 }
11957 _ACEOF
11958 if ac_fn_c_try_compile "$LINENO"; then :
11959 gl_cv_socket_ipv4=yes
11960 else
11961 gl_cv_socket_ipv4=no
11962 fi
11963 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11964 fi
11965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv4" >&5
11966 $as_echo "$gl_cv_socket_ipv4" >&6; }
11967 if test $gl_cv_socket_ipv4 = yes; then
11968
11969 $as_echo "#define HAVE_IPV4 1" >>confdefs.h
11970
11971 fi
11972
11973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv6 sockets" >&5
11974 $as_echo_n "checking for IPv6 sockets... " >&6; }
11975 if ${gl_cv_socket_ipv6+:} false; then :
11976 $as_echo_n "(cached) " >&6
11977 else
11978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11979 /* end confdefs.h. */
11980 #include <sys/types.h>
11981 #ifdef HAVE_SYS_SOCKET_H
11982 #include <sys/socket.h>
11983 #endif
11984 #ifdef HAVE_NETINET_IN_H
11985 #include <netinet/in.h>
11986 #endif
11987 #ifdef HAVE_WINSOCK2_H
11988 #include <winsock2.h>
11989 #endif
11990 #ifdef HAVE_WS2TCPIP_H
11991 #include <ws2tcpip.h>
11992 #endif
11993 int
11994 main ()
11995 {
11996 int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z;
11997 if (&x && &y && &z) return 0;
11998 ;
11999 return 0;
12000 }
12001 _ACEOF
12002 if ac_fn_c_try_compile "$LINENO"; then :
12003 gl_cv_socket_ipv6=yes
12004 else
12005 gl_cv_socket_ipv6=no
12006 fi
12007 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12008 fi
12009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv6" >&5
12010 $as_echo "$gl_cv_socket_ipv6" >&6; }
12011 if test $gl_cv_socket_ipv6 = yes; then
12012
12013 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
12014
12015 fi
12016
12017
12018
12019
12020
12021
12022
12023
12024
12025
12026
12027
12028
12029 if test $gl_cv_have_include_next = yes; then
12030 gl_cv_next_limits_h='<'limits.h'>'
12031 else
12032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5
12033 $as_echo_n "checking absolute name of <limits.h>... " >&6; }
12034 if ${gl_cv_next_limits_h+:} false; then :
12035 $as_echo_n "(cached) " >&6
12036 else
12037
12038 if test $ac_cv_header_limits_h = yes; then
12039
12040
12041
12042
12043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12044 /* end confdefs.h. */
12045 #include <limits.h>
12046 _ACEOF
12047 case "$host_os" in
12048 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12049 *) gl_absname_cpp="$ac_cpp" ;;
12050 esac
12051
12052 case "$host_os" in
12053 mingw*)
12054 gl_dirsep_regex='[/\\]'
12055 ;;
12056 *)
12057 gl_dirsep_regex='\/'
12058 ;;
12059 esac
12060 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12061 gl_header_literal_regex=`echo 'limits.h' \
12062 | sed -e "$gl_make_literal_regex_sed"`
12063 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12064 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12065 s|^/[^/]|//&|
12066 p
12067 q
12068 }'
12069
12070 gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12071 sed -n "$gl_absolute_header_sed"`
12072
12073 gl_header=$gl_cv_absolute_limits_h
12074 gl_cv_next_limits_h='"'$gl_header'"'
12075 else
12076 gl_cv_next_limits_h='<'limits.h'>'
12077 fi
12078
12079
12080 fi
12081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
12082 $as_echo "$gl_cv_next_limits_h" >&6; }
12083 fi
12084 NEXT_LIMITS_H=$gl_cv_next_limits_h
12085
12086 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12087 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12088 gl_next_as_first_directive='<'limits.h'>'
12089 else
12090 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12091 gl_next_as_first_directive=$gl_cv_next_limits_h
12092 fi
12093 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive
12094
12095
12096
12097
12098
12099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc." >&5
12100 $as_echo_n "checking whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc.... " >&6; }
12101 if ${gl_cv_header_limits_width+:} false; then :
12102 $as_echo_n "(cached) " >&6
12103 else
12104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12105 /* end confdefs.h. */
12106 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
12107 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
12108 #endif
12109 #include <limits.h>
12110 long long llm = LLONG_MAX;
12111 int wb = WORD_BIT;
12112 int ullw = ULLONG_WIDTH;
12113
12114 int
12115 main ()
12116 {
12117
12118 ;
12119 return 0;
12120 }
12121 _ACEOF
12122 if ac_fn_c_try_compile "$LINENO"; then :
12123 gl_cv_header_limits_width=yes
12124 else
12125 gl_cv_header_limits_width=no
12126 fi
12127 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12128 fi
12129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5
12130 $as_echo "$gl_cv_header_limits_width" >&6; }
12131 if test "$gl_cv_header_limits_width" = yes; then
12132 LIMITS_H=
12133 else
12134 LIMITS_H=limits.h
12135 fi
12136
12137 if test -n "$LIMITS_H"; then
12138 GL_GENERATE_LIMITS_H_TRUE=
12139 GL_GENERATE_LIMITS_H_FALSE='#'
12140 else
12141 GL_GENERATE_LIMITS_H_TRUE='#'
12142 GL_GENERATE_LIMITS_H_FALSE=
12143 fi
12144
12145
12146
12147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
12148 $as_echo_n "checking for wint_t... " >&6; }
12149 if ${gt_cv_c_wint_t+:} false; then :
12150 $as_echo_n "(cached) " >&6
12151 else
12152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12153 /* end confdefs.h. */
12154 #include <wchar.h>
12155 wint_t foo = (wchar_t)'\0';
12156 int
12157 main ()
12158 {
12159
12160 ;
12161 return 0;
12162 }
12163 _ACEOF
12164 if ac_fn_c_try_compile "$LINENO"; then :
12165 gt_cv_c_wint_t=yes
12166 else
12167 gt_cv_c_wint_t=no
12168 fi
12169 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12170 fi
12171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
12172 $as_echo "$gt_cv_c_wint_t" >&6; }
12173 if test $gt_cv_c_wint_t = yes; then
12174
12175 $as_echo "#define HAVE_WINT_T 1" >>confdefs.h
12176
12177
12178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wint_t is large enough" >&5
12179 $as_echo_n "checking whether wint_t is large enough... " >&6; }
12180 if ${gl_cv_type_wint_t_large_enough+:} false; then :
12181 $as_echo_n "(cached) " >&6
12182 else
12183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12184 /* end confdefs.h. */
12185 #include <wchar.h>
12186 int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1];
12187
12188 int
12189 main ()
12190 {
12191
12192 ;
12193 return 0;
12194 }
12195 _ACEOF
12196 if ac_fn_c_try_compile "$LINENO"; then :
12197 gl_cv_type_wint_t_large_enough=yes
12198 else
12199 gl_cv_type_wint_t_large_enough=no
12200 fi
12201 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12202 fi
12203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wint_t_large_enough" >&5
12204 $as_echo "$gl_cv_type_wint_t_large_enough" >&6; }
12205 if test $gl_cv_type_wint_t_large_enough = no; then
12206 GNULIB_OVERRIDES_WINT_T=1
12207 else
12208 GNULIB_OVERRIDES_WINT_T=0
12209 fi
12210 else
12211 GNULIB_OVERRIDES_WINT_T=0
12212 fi
12213
12214
12215
12216
12217
12218
12219
12220
12221
12222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler produces multi-arch binaries" >&5
12223 $as_echo_n "checking whether the compiler produces multi-arch binaries... " >&6; }
12224 if ${gl_cv_c_multiarch+:} false; then :
12225 $as_echo_n "(cached) " >&6
12226 else
12227 gl_cv_c_multiarch=no
12228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12229 /* end confdefs.h. */
12230 #ifndef __APPLE_CC__
12231 not a universal capable compiler
12232 #endif
12233 typedef int dummy;
12234
12235 _ACEOF
12236 if ac_fn_c_try_compile "$LINENO"; then :
12237
12238 arch=
12239 prev=
12240 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
12241 if test -n "$prev"; then
12242 case $word in
12243 i?86 | x86_64 | ppc | ppc64 | arm | arm64)
12244 if test -z "$arch" || test "$arch" = "$word"; then
12245 arch="$word"
12246 else
12247 gl_cv_c_multiarch=yes
12248 fi
12249 ;;
12250 esac
12251 prev=
12252 else
12253 if test "x$word" = "x-arch"; then
12254 prev=arch
12255 fi
12256 fi
12257 done
12258
12259 fi
12260 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12261
12262 fi
12263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_multiarch" >&5
12264 $as_echo "$gl_cv_c_multiarch" >&6; }
12265 if test $gl_cv_c_multiarch = yes; then
12266 APPLE_UNIVERSAL_BUILD=1
12267 else
12268 APPLE_UNIVERSAL_BUILD=0
12269 fi
12270
12271
12272
12273
12274
12275
12276
12277
12278 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
12279
12280
12281 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
12282
12283
12284
12285 if test $ac_cv_header_wchar_h = yes; then
12286 HAVE_WCHAR_H=1
12287 else
12288 HAVE_WCHAR_H=0
12289 fi
12290
12291
12292
12293 if test $ac_cv_header_inttypes_h = yes; then
12294 HAVE_INTTYPES_H=1
12295 else
12296 HAVE_INTTYPES_H=0
12297 fi
12298
12299
12300
12301 if test $ac_cv_header_sys_types_h = yes; then
12302 HAVE_SYS_TYPES_H=1
12303 else
12304 HAVE_SYS_TYPES_H=0
12305 fi
12306
12307
12308
12309
12310
12311
12312
12313
12314
12315
12316
12317 if test $gl_cv_have_include_next = yes; then
12318 gl_cv_next_stdint_h='<'stdint.h'>'
12319 else
12320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
12321 $as_echo_n "checking absolute name of <stdint.h>... " >&6; }
12322 if ${gl_cv_next_stdint_h+:} false; then :
12323 $as_echo_n "(cached) " >&6
12324 else
12325
12326 if test $ac_cv_header_stdint_h = yes; then
12327
12328
12329
12330
12331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12332 /* end confdefs.h. */
12333 #include <stdint.h>
12334 _ACEOF
12335 case "$host_os" in
12336 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12337 *) gl_absname_cpp="$ac_cpp" ;;
12338 esac
12339
12340 case "$host_os" in
12341 mingw*)
12342 gl_dirsep_regex='[/\\]'
12343 ;;
12344 *)
12345 gl_dirsep_regex='\/'
12346 ;;
12347 esac
12348 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12349 gl_header_literal_regex=`echo 'stdint.h' \
12350 | sed -e "$gl_make_literal_regex_sed"`
12351 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12352 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12353 s|^/[^/]|//&|
12354 p
12355 q
12356 }'
12357
12358 gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12359 sed -n "$gl_absolute_header_sed"`
12360
12361 gl_header=$gl_cv_absolute_stdint_h
12362 gl_cv_next_stdint_h='"'$gl_header'"'
12363 else
12364 gl_cv_next_stdint_h='<'stdint.h'>'
12365 fi
12366
12367
12368 fi
12369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
12370 $as_echo "$gl_cv_next_stdint_h" >&6; }
12371 fi
12372 NEXT_STDINT_H=$gl_cv_next_stdint_h
12373
12374 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12375 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12376 gl_next_as_first_directive='<'stdint.h'>'
12377 else
12378 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12379 gl_next_as_first_directive=$gl_cv_next_stdint_h
12380 fi
12381 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
12382
12383
12384
12385
12386 if test $ac_cv_header_stdint_h = yes; then
12387 HAVE_STDINT_H=1
12388 else
12389 HAVE_STDINT_H=0
12390 fi
12391
12392
12393 if test $ac_cv_header_stdint_h = yes; then
12394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
12395 $as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
12396 if ${gl_cv_header_working_stdint_h+:} false; then :
12397 $as_echo_n "(cached) " >&6
12398 else
12399 gl_cv_header_working_stdint_h=no
12400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12401 /* end confdefs.h. */
12402
12403
12404 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
12405 #define __STDC_CONSTANT_MACROS 1
12406 #define __STDC_LIMIT_MACROS 1
12407 #include <stdint.h>
12408 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
12409 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
12410 #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
12411 #endif
12412
12413
12414 #include <stddef.h>
12415 #include <signal.h>
12416 #if HAVE_WCHAR_H
12417 # include <wchar.h>
12418 #endif
12419
12420
12421 #ifdef INT8_MAX
12422 int8_t a1 = INT8_MAX;
12423 int8_t a1min = INT8_MIN;
12424 #endif
12425 #ifdef INT16_MAX
12426 int16_t a2 = INT16_MAX;
12427 int16_t a2min = INT16_MIN;
12428 #endif
12429 #ifdef INT32_MAX
12430 int32_t a3 = INT32_MAX;
12431 int32_t a3min = INT32_MIN;
12432 #endif
12433 #ifdef INT64_MAX
12434 int64_t a4 = INT64_MAX;
12435 int64_t a4min = INT64_MIN;
12436 #endif
12437 #ifdef UINT8_MAX
12438 uint8_t b1 = UINT8_MAX;
12439 #else
12440 typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
12441 #endif
12442 #ifdef UINT16_MAX
12443 uint16_t b2 = UINT16_MAX;
12444 #endif
12445 #ifdef UINT32_MAX
12446 uint32_t b3 = UINT32_MAX;
12447 #endif
12448 #ifdef UINT64_MAX
12449 uint64_t b4 = UINT64_MAX;
12450 #endif
12451 int_least8_t c1 = INT8_C (0x7f);
12452 int_least8_t c1max = INT_LEAST8_MAX;
12453 int_least8_t c1min = INT_LEAST8_MIN;
12454 int_least16_t c2 = INT16_C (0x7fff);
12455 int_least16_t c2max = INT_LEAST16_MAX;
12456 int_least16_t c2min = INT_LEAST16_MIN;
12457 int_least32_t c3 = INT32_C (0x7fffffff);
12458 int_least32_t c3max = INT_LEAST32_MAX;
12459 int_least32_t c3min = INT_LEAST32_MIN;
12460 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
12461 int_least64_t c4max = INT_LEAST64_MAX;
12462 int_least64_t c4min = INT_LEAST64_MIN;
12463 uint_least8_t d1 = UINT8_C (0xff);
12464 uint_least8_t d1max = UINT_LEAST8_MAX;
12465 uint_least16_t d2 = UINT16_C (0xffff);
12466 uint_least16_t d2max = UINT_LEAST16_MAX;
12467 uint_least32_t d3 = UINT32_C (0xffffffff);
12468 uint_least32_t d3max = UINT_LEAST32_MAX;
12469 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
12470 uint_least64_t d4max = UINT_LEAST64_MAX;
12471 int_fast8_t e1 = INT_FAST8_MAX;
12472 int_fast8_t e1min = INT_FAST8_MIN;
12473 int_fast16_t e2 = INT_FAST16_MAX;
12474 int_fast16_t e2min = INT_FAST16_MIN;
12475 int_fast32_t e3 = INT_FAST32_MAX;
12476 int_fast32_t e3min = INT_FAST32_MIN;
12477 int_fast64_t e4 = INT_FAST64_MAX;
12478 int_fast64_t e4min = INT_FAST64_MIN;
12479 uint_fast8_t f1 = UINT_FAST8_MAX;
12480 uint_fast16_t f2 = UINT_FAST16_MAX;
12481 uint_fast32_t f3 = UINT_FAST32_MAX;
12482 uint_fast64_t f4 = UINT_FAST64_MAX;
12483 #ifdef INTPTR_MAX
12484 intptr_t g = INTPTR_MAX;
12485 intptr_t gmin = INTPTR_MIN;
12486 #endif
12487 #ifdef UINTPTR_MAX
12488 uintptr_t h = UINTPTR_MAX;
12489 #endif
12490 intmax_t i = INTMAX_MAX;
12491 uintmax_t j = UINTMAX_MAX;
12492
12493 /* Check that SIZE_MAX has the correct type, if possible. */
12494 #if 201112 <= __STDC_VERSION__
12495 int k = _Generic (SIZE_MAX, size_t: 0);
12496 #elif (2 <= __GNUC__ || 4 <= __clang_major__ || defined __IBM__TYPEOF__ \
12497 || (0x5110 <= __SUNPRO_C && !__STDC__))
12498 extern size_t k;
12499 extern __typeof__ (SIZE_MAX) k;
12500 #endif
12501
12502 #include <limits.h> /* for CHAR_BIT */
12503 #define TYPE_MINIMUM(t) \
12504 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
12505 #define TYPE_MAXIMUM(t) \
12506 ((t) ((t) 0 < (t) -1 \
12507 ? (t) -1 \
12508 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
12509 struct s {
12510 int check_PTRDIFF:
12511 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
12512 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
12513 ? 1 : -1;
12514 /* Detect bug in FreeBSD 6.0 / ia64. */
12515 int check_SIG_ATOMIC:
12516 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
12517 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
12518 ? 1 : -1;
12519 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
12520 int check_WCHAR:
12521 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
12522 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
12523 ? 1 : -1;
12524 /* Detect bug in mingw. */
12525 int check_WINT:
12526 WINT_MIN == TYPE_MINIMUM (wint_t)
12527 && WINT_MAX == TYPE_MAXIMUM (wint_t)
12528 ? 1 : -1;
12529
12530 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
12531 int check_UINT8_C:
12532 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
12533 int check_UINT16_C:
12534 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
12535
12536 /* Detect bugs in OpenBSD 3.9 stdint.h. */
12537 #ifdef UINT8_MAX
12538 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
12539 #endif
12540 #ifdef UINT16_MAX
12541 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
12542 #endif
12543 #ifdef UINT32_MAX
12544 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
12545 #endif
12546 #ifdef UINT64_MAX
12547 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
12548 #endif
12549 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
12550 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
12551 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
12552 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
12553 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
12554 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
12555 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
12556 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
12557 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
12558 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
12559 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
12560 };
12561
12562 int
12563 main ()
12564 {
12565
12566 ;
12567 return 0;
12568 }
12569 _ACEOF
12570 if ac_fn_c_try_compile "$LINENO"; then :
12571 if test "$cross_compiling" = yes; then :
12572 case "$host_os" in
12573 # Guess yes on native Windows.
12574 mingw*) gl_cv_header_working_stdint_h="guessing yes" ;;
12575 # In general, assume it works.
12576 *) gl_cv_header_working_stdint_h="guessing yes" ;;
12577 esac
12578
12579 else
12580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12581 /* end confdefs.h. */
12582
12583
12584 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
12585 #define __STDC_CONSTANT_MACROS 1
12586 #define __STDC_LIMIT_MACROS 1
12587 #include <stdint.h>
12588
12589
12590 #include <stddef.h>
12591 #include <signal.h>
12592 #if HAVE_WCHAR_H
12593 # include <wchar.h>
12594 #endif
12595
12596
12597 #include <stdio.h>
12598 #include <string.h>
12599 #define MVAL(macro) MVAL1(macro)
12600 #define MVAL1(expression) #expression
12601 static const char *macro_values[] =
12602 {
12603 #ifdef INT8_MAX
12604 MVAL (INT8_MAX),
12605 #endif
12606 #ifdef INT16_MAX
12607 MVAL (INT16_MAX),
12608 #endif
12609 #ifdef INT32_MAX
12610 MVAL (INT32_MAX),
12611 #endif
12612 #ifdef INT64_MAX
12613 MVAL (INT64_MAX),
12614 #endif
12615 #ifdef UINT8_MAX
12616 MVAL (UINT8_MAX),
12617 #endif
12618 #ifdef UINT16_MAX
12619 MVAL (UINT16_MAX),
12620 #endif
12621 #ifdef UINT32_MAX
12622 MVAL (UINT32_MAX),
12623 #endif
12624 #ifdef UINT64_MAX
12625 MVAL (UINT64_MAX),
12626 #endif
12627 NULL
12628 };
12629
12630 int
12631 main ()
12632 {
12633
12634 const char **mv;
12635 for (mv = macro_values; *mv != NULL; mv++)
12636 {
12637 const char *value = *mv;
12638 /* Test whether it looks like a cast expression. */
12639 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
12640 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
12641 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
12642 || strncmp (value, "((int)"/*)*/, 6) == 0
12643 || strncmp (value, "((signed short)"/*)*/, 15) == 0
12644 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
12645 return mv - macro_values + 1;
12646 }
12647 return 0;
12648
12649 ;
12650 return 0;
12651 }
12652 _ACEOF
12653 if ac_fn_c_try_run "$LINENO"; then :
12654 gl_cv_header_working_stdint_h=yes
12655 fi
12656 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12657 conftest.$ac_objext conftest.beam conftest.$ac_ext
12658 fi
12659
12660
12661 fi
12662 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12663
12664 fi
12665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
12666 $as_echo "$gl_cv_header_working_stdint_h" >&6; }
12667 fi
12668
12669 HAVE_C99_STDINT_H=0
12670 HAVE_SYS_BITYPES_H=0
12671 HAVE_SYS_INTTYPES_H=0
12672 STDINT_H=stdint.h
12673 case "$gl_cv_header_working_stdint_h" in
12674 *yes)
12675 HAVE_C99_STDINT_H=1
12676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h works without ISO C predefines" >&5
12677 $as_echo_n "checking whether stdint.h works without ISO C predefines... " >&6; }
12678 if ${gl_cv_header_stdint_without_STDC_macros+:} false; then :
12679 $as_echo_n "(cached) " >&6
12680 else
12681 gl_cv_header_stdint_without_STDC_macros=no
12682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12683 /* end confdefs.h. */
12684
12685
12686 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
12687 #include <stdint.h>
12688
12689
12690 #include <stddef.h>
12691 #include <signal.h>
12692 #if HAVE_WCHAR_H
12693 # include <wchar.h>
12694 #endif
12695
12696
12697 intmax_t im = INTMAX_MAX;
12698 int32_t i32 = INT32_C (0x7fffffff);
12699
12700 int
12701 main ()
12702 {
12703
12704 ;
12705 return 0;
12706 }
12707 _ACEOF
12708 if ac_fn_c_try_compile "$LINENO"; then :
12709 gl_cv_header_stdint_without_STDC_macros=yes
12710 fi
12711 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12712
12713 fi
12714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_without_STDC_macros" >&5
12715 $as_echo "$gl_cv_header_stdint_without_STDC_macros" >&6; }
12716
12717 if test $gl_cv_header_stdint_without_STDC_macros = no; then
12718
12719 $as_echo "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
12720
12721
12722 $as_echo "#define __STDC_LIMIT_MACROS 1" >>confdefs.h
12723
12724 fi
12725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5
12726 $as_echo_n "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; }
12727 if ${gl_cv_header_stdint_width+:} false; then :
12728 $as_echo_n "(cached) " >&6
12729 else
12730 gl_cv_header_stdint_width=no
12731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12732 /* end confdefs.h. */
12733
12734 /* Work if build is not clean. */
12735 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
12736 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
12737 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
12738 #endif
12739 #include <stdint.h>
12740
12741 #include <stddef.h>
12742 #include <signal.h>
12743 #if HAVE_WCHAR_H
12744 # include <wchar.h>
12745 #endif
12746
12747 int iw = UINTMAX_WIDTH;
12748
12749 int
12750 main ()
12751 {
12752
12753 ;
12754 return 0;
12755 }
12756 _ACEOF
12757 if ac_fn_c_try_compile "$LINENO"; then :
12758 gl_cv_header_stdint_width=yes
12759 fi
12760 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12761 fi
12762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5
12763 $as_echo "$gl_cv_header_stdint_width" >&6; }
12764 if test "$gl_cv_header_stdint_width" = yes; then
12765 STDINT_H=
12766 fi
12767 ;;
12768 *)
12769 for ac_header in sys/inttypes.h sys/bitypes.h
12770 do :
12771 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12772 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12773 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12774 cat >>confdefs.h <<_ACEOF
12775 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12776 _ACEOF
12777
12778 fi
12779
12780 done
12781
12782 if test $ac_cv_header_sys_inttypes_h = yes; then
12783 HAVE_SYS_INTTYPES_H=1
12784 fi
12785 if test $ac_cv_header_sys_bitypes_h = yes; then
12786 HAVE_SYS_BITYPES_H=1
12787 fi
12788
12789
12790 if test $APPLE_UNIVERSAL_BUILD = 0; then
12791
12792
12793 for gltype in ptrdiff_t size_t ; do
12794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
12795 $as_echo_n "checking for bit size of $gltype... " >&6; }
12796 if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
12797 $as_echo_n "(cached) " >&6
12798 else
12799 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
12800 #include <stddef.h>
12801 #include <signal.h>
12802 #if HAVE_WCHAR_H
12803 # include <wchar.h>
12804 #endif
12805
12806 #include <limits.h>"; then :
12807
12808 else
12809 result=unknown
12810 fi
12811
12812 eval gl_cv_bitsizeof_${gltype}=\$result
12813
12814 fi
12815 eval ac_res=\$gl_cv_bitsizeof_${gltype}
12816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12817 $as_echo "$ac_res" >&6; }
12818 eval result=\$gl_cv_bitsizeof_${gltype}
12819 if test $result = unknown; then
12820 result=0
12821 fi
12822 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
12823 cat >>confdefs.h <<_ACEOF
12824 #define BITSIZEOF_${GLTYPE} $result
12825 _ACEOF
12826
12827 eval BITSIZEOF_${GLTYPE}=\$result
12828 done
12829
12830
12831 fi
12832
12833
12834 for gltype in sig_atomic_t wchar_t wint_t ; do
12835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
12836 $as_echo_n "checking for bit size of $gltype... " >&6; }
12837 if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
12838 $as_echo_n "(cached) " >&6
12839 else
12840 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
12841 #include <stddef.h>
12842 #include <signal.h>
12843 #if HAVE_WCHAR_H
12844 # include <wchar.h>
12845 #endif
12846
12847 #include <limits.h>"; then :
12848
12849 else
12850 result=unknown
12851 fi
12852
12853 eval gl_cv_bitsizeof_${gltype}=\$result
12854
12855 fi
12856 eval ac_res=\$gl_cv_bitsizeof_${gltype}
12857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12858 $as_echo "$ac_res" >&6; }
12859 eval result=\$gl_cv_bitsizeof_${gltype}
12860 if test $result = unknown; then
12861 result=0
12862 fi
12863 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
12864 cat >>confdefs.h <<_ACEOF
12865 #define BITSIZEOF_${GLTYPE} $result
12866 _ACEOF
12867
12868 eval BITSIZEOF_${GLTYPE}=\$result
12869 done
12870
12871
12872
12873
12874 for gltype in sig_atomic_t wchar_t wint_t ; do
12875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
12876 $as_echo_n "checking whether $gltype is signed... " >&6; }
12877 if eval \${gl_cv_type_${gltype}_signed+:} false; then :
12878 $as_echo_n "(cached) " >&6
12879 else
12880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12881 /* end confdefs.h. */
12882
12883 #include <stddef.h>
12884 #include <signal.h>
12885 #if HAVE_WCHAR_H
12886 # include <wchar.h>
12887 #endif
12888
12889 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
12890 int
12891 main ()
12892 {
12893
12894 ;
12895 return 0;
12896 }
12897 _ACEOF
12898 if ac_fn_c_try_compile "$LINENO"; then :
12899 result=yes
12900 else
12901 result=no
12902 fi
12903 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12904 eval gl_cv_type_${gltype}_signed=\$result
12905
12906 fi
12907 eval ac_res=\$gl_cv_type_${gltype}_signed
12908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12909 $as_echo "$ac_res" >&6; }
12910 eval result=\$gl_cv_type_${gltype}_signed
12911 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
12912 if test "$result" = yes; then
12913 cat >>confdefs.h <<_ACEOF
12914 #define HAVE_SIGNED_${GLTYPE} 1
12915 _ACEOF
12916
12917 eval HAVE_SIGNED_${GLTYPE}=1
12918 else
12919 eval HAVE_SIGNED_${GLTYPE}=0
12920 fi
12921 done
12922
12923
12924 gl_cv_type_ptrdiff_t_signed=yes
12925 gl_cv_type_size_t_signed=no
12926 if test $APPLE_UNIVERSAL_BUILD = 0; then
12927
12928
12929 for gltype in ptrdiff_t size_t ; do
12930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
12931 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
12932 if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
12933 $as_echo_n "(cached) " >&6
12934 else
12935 eval gl_cv_type_${gltype}_suffix=no
12936 eval result=\$gl_cv_type_${gltype}_signed
12937 if test "$result" = yes; then
12938 glsufu=
12939 else
12940 glsufu=u
12941 fi
12942 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
12943 case $glsuf in
12944 '') gltype1='int';;
12945 l) gltype1='long int';;
12946 ll) gltype1='long long int';;
12947 i64) gltype1='__int64';;
12948 u) gltype1='unsigned int';;
12949 ul) gltype1='unsigned long int';;
12950 ull) gltype1='unsigned long long int';;
12951 ui64)gltype1='unsigned __int64';;
12952 esac
12953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12954 /* end confdefs.h. */
12955
12956 #include <stddef.h>
12957 #include <signal.h>
12958 #if HAVE_WCHAR_H
12959 # include <wchar.h>
12960 #endif
12961
12962 extern $gltype foo;
12963 extern $gltype1 foo;
12964 int
12965 main ()
12966 {
12967
12968 ;
12969 return 0;
12970 }
12971 _ACEOF
12972 if ac_fn_c_try_compile "$LINENO"; then :
12973 eval gl_cv_type_${gltype}_suffix=\$glsuf
12974 fi
12975 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12976 eval result=\$gl_cv_type_${gltype}_suffix
12977 test "$result" != no && break
12978 done
12979 fi
12980 eval ac_res=\$gl_cv_type_${gltype}_suffix
12981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12982 $as_echo "$ac_res" >&6; }
12983 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
12984 eval result=\$gl_cv_type_${gltype}_suffix
12985 test "$result" = no && result=
12986 eval ${GLTYPE}_SUFFIX=\$result
12987 cat >>confdefs.h <<_ACEOF
12988 #define ${GLTYPE}_SUFFIX $result
12989 _ACEOF
12990
12991 done
12992
12993
12994 fi
12995
12996
12997 for gltype in sig_atomic_t wchar_t wint_t ; do
12998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
12999 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
13000 if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
13001 $as_echo_n "(cached) " >&6
13002 else
13003 eval gl_cv_type_${gltype}_suffix=no
13004 eval result=\$gl_cv_type_${gltype}_signed
13005 if test "$result" = yes; then
13006 glsufu=
13007 else
13008 glsufu=u
13009 fi
13010 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
13011 case $glsuf in
13012 '') gltype1='int';;
13013 l) gltype1='long int';;
13014 ll) gltype1='long long int';;
13015 i64) gltype1='__int64';;
13016 u) gltype1='unsigned int';;
13017 ul) gltype1='unsigned long int';;
13018 ull) gltype1='unsigned long long int';;
13019 ui64)gltype1='unsigned __int64';;
13020 esac
13021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13022 /* end confdefs.h. */
13023
13024 #include <stddef.h>
13025 #include <signal.h>
13026 #if HAVE_WCHAR_H
13027 # include <wchar.h>
13028 #endif
13029
13030 extern $gltype foo;
13031 extern $gltype1 foo;
13032 int
13033 main ()
13034 {
13035
13036 ;
13037 return 0;
13038 }
13039 _ACEOF
13040 if ac_fn_c_try_compile "$LINENO"; then :
13041 eval gl_cv_type_${gltype}_suffix=\$glsuf
13042 fi
13043 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13044 eval result=\$gl_cv_type_${gltype}_suffix
13045 test "$result" != no && break
13046 done
13047 fi
13048 eval ac_res=\$gl_cv_type_${gltype}_suffix
13049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13050 $as_echo "$ac_res" >&6; }
13051 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
13052 eval result=\$gl_cv_type_${gltype}_suffix
13053 test "$result" = no && result=
13054 eval ${GLTYPE}_SUFFIX=\$result
13055 cat >>confdefs.h <<_ACEOF
13056 #define ${GLTYPE}_SUFFIX $result
13057 _ACEOF
13058
13059 done
13060
13061
13062
13063 if test $GNULIB_OVERRIDES_WINT_T = 1; then
13064 BITSIZEOF_WINT_T=32
13065 fi
13066
13067 ;;
13068 esac
13069
13070
13071
13072 LIMITS_H='limits.h'
13073 if test -n "$LIMITS_H"; then
13074 GL_GENERATE_LIMITS_H_TRUE=
13075 GL_GENERATE_LIMITS_H_FALSE='#'
13076 else
13077 GL_GENERATE_LIMITS_H_TRUE='#'
13078 GL_GENERATE_LIMITS_H_FALSE=
13079 fi
13080
13081
13082
13083
13084
13085
13086
13087 if test -n "$STDINT_H"; then
13088 GL_GENERATE_STDINT_H_TRUE=
13089 GL_GENERATE_STDINT_H_FALSE='#'
13090 else
13091 GL_GENERATE_STDINT_H_TRUE='#'
13092 GL_GENERATE_STDINT_H_FALSE=
13093 fi
13094
13095
13096
13097 GNULIB_IMAXABS=0;
13098 GNULIB_IMAXDIV=0;
13099 GNULIB_STRTOIMAX=0;
13100 GNULIB_STRTOUMAX=0;
13101 HAVE_DECL_IMAXABS=1;
13102 HAVE_DECL_IMAXDIV=1;
13103 HAVE_DECL_STRTOIMAX=1;
13104 HAVE_DECL_STRTOUMAX=1;
13105 HAVE_IMAXDIV_T=1;
13106 REPLACE_STRTOIMAX=0;
13107 REPLACE_STRTOUMAX=0;
13108 INT32_MAX_LT_INTMAX_MAX=1;
13109 INT64_MAX_EQ_LONG_MAX='defined _LP64';
13110 PRIPTR_PREFIX=__PRIPTR_PREFIX;
13111 UINT32_MAX_LT_UINTMAX_MAX=1;
13112 UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
13113
13114
13115
13116
13117
13118
13119
13120
13121
13122
13123
13124
13125
13126
13127
13128 if test $gl_cv_have_include_next = yes; then
13129 gl_cv_next_inttypes_h='<'inttypes.h'>'
13130 else
13131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
13132 $as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
13133 if ${gl_cv_next_inttypes_h+:} false; then :
13134 $as_echo_n "(cached) " >&6
13135 else
13136
13137 if test $ac_cv_header_inttypes_h = yes; then
13138
13139
13140
13141
13142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13143 /* end confdefs.h. */
13144 #include <inttypes.h>
13145 _ACEOF
13146 case "$host_os" in
13147 aix*) gl_absname_cpp="$ac_cpp -C" ;;
13148 *) gl_absname_cpp="$ac_cpp" ;;
13149 esac
13150
13151 case "$host_os" in
13152 mingw*)
13153 gl_dirsep_regex='[/\\]'
13154 ;;
13155 *)
13156 gl_dirsep_regex='\/'
13157 ;;
13158 esac
13159 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13160 gl_header_literal_regex=`echo 'inttypes.h' \
13161 | sed -e "$gl_make_literal_regex_sed"`
13162 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13163 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13164 s|^/[^/]|//&|
13165 p
13166 q
13167 }'
13168
13169 gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13170 sed -n "$gl_absolute_header_sed"`
13171
13172 gl_header=$gl_cv_absolute_inttypes_h
13173 gl_cv_next_inttypes_h='"'$gl_header'"'
13174 else
13175 gl_cv_next_inttypes_h='<'inttypes.h'>'
13176 fi
13177
13178
13179 fi
13180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
13181 $as_echo "$gl_cv_next_inttypes_h" >&6; }
13182 fi
13183 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
13184
13185 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13186 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13187 gl_next_as_first_directive='<'inttypes.h'>'
13188 else
13189 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13190 gl_next_as_first_directive=$gl_cv_next_inttypes_h
13191 fi
13192 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
13193
13194
13195
13196
13197
13198
13199
13200
13201
13202
13203
13204
13205
13206
13207
13208
13209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
13210 $as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
13211 if ${gl_cv_cc_double_expbit0+:} false; then :
13212 $as_echo_n "(cached) " >&6
13213 else
13214
13215 if test "$cross_compiling" = yes; then :
13216
13217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13218 /* end confdefs.h. */
13219
13220 #if defined arm || defined __arm || defined __arm__
13221 mixed_endianness
13222 #endif
13223
13224 _ACEOF
13225 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13226 $EGREP "mixed_endianness" >/dev/null 2>&1; then :
13227 gl_cv_cc_double_expbit0="unknown"
13228 else
13229
13230 :
13231 if ${ac_cv_c_bigendian+:} false; then :
13232 $as_echo_n "(cached) " >&6
13233 else
13234 ac_cv_c_bigendian=unknown
13235 # See if we're dealing with a universal compiler.
13236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13237 /* end confdefs.h. */
13238 #ifndef __APPLE_CC__
13239 not a universal capable compiler
13240 #endif
13241 typedef int dummy;
13242
13243 _ACEOF
13244 if ac_fn_c_try_compile "$LINENO"; then :
13245
13246 # Check for potential -arch flags. It is not universal unless
13247 # there are at least two -arch flags with different values.
13248 ac_arch=
13249 ac_prev=
13250 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13251 if test -n "$ac_prev"; then
13252 case $ac_word in
13253 i?86 | x86_64 | ppc | ppc64)
13254 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13255 ac_arch=$ac_word
13256 else
13257 ac_cv_c_bigendian=universal
13258 break
13259 fi
13260 ;;
13261 esac
13262 ac_prev=
13263 elif test "x$ac_word" = "x-arch"; then
13264 ac_prev=arch
13265 fi
13266 done
13267 fi
13268 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13269 if test $ac_cv_c_bigendian = unknown; then
13270 # See if sys/param.h defines the BYTE_ORDER macro.
13271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13272 /* end confdefs.h. */
13273 #include <sys/types.h>
13274 #include <sys/param.h>
13275
13276 int
13277 main ()
13278 {
13279 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13280 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13281 && LITTLE_ENDIAN)
13282 bogus endian macros
13283 #endif
13284
13285 ;
13286 return 0;
13287 }
13288 _ACEOF
13289 if ac_fn_c_try_compile "$LINENO"; then :
13290 # It does; now see whether it defined to BIG_ENDIAN or not.
13291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13292 /* end confdefs.h. */
13293 #include <sys/types.h>
13294 #include <sys/param.h>
13295
13296 int
13297 main ()
13298 {
13299 #if BYTE_ORDER != BIG_ENDIAN
13300 not big endian
13301 #endif
13302
13303 ;
13304 return 0;
13305 }
13306 _ACEOF
13307 if ac_fn_c_try_compile "$LINENO"; then :
13308 ac_cv_c_bigendian=yes
13309 else
13310 ac_cv_c_bigendian=no
13311 fi
13312 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13313 fi
13314 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13315 fi
13316 if test $ac_cv_c_bigendian = unknown; then
13317 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13319 /* end confdefs.h. */
13320 #include <limits.h>
13321
13322 int
13323 main ()
13324 {
13325 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13326 bogus endian macros
13327 #endif
13328
13329 ;
13330 return 0;
13331 }
13332 _ACEOF
13333 if ac_fn_c_try_compile "$LINENO"; then :
13334 # It does; now see whether it defined to _BIG_ENDIAN or not.
13335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13336 /* end confdefs.h. */
13337 #include <limits.h>
13338
13339 int
13340 main ()
13341 {
13342 #ifndef _BIG_ENDIAN
13343 not big endian
13344 #endif
13345
13346 ;
13347 return 0;
13348 }
13349 _ACEOF
13350 if ac_fn_c_try_compile "$LINENO"; then :
13351 ac_cv_c_bigendian=yes
13352 else
13353 ac_cv_c_bigendian=no
13354 fi
13355 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13356 fi
13357 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13358 fi
13359 if test $ac_cv_c_bigendian = unknown; then
13360 # Compile a test program.
13361 if test "$cross_compiling" = yes; then :
13362 # Try to guess by grepping values from an object file.
13363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13364 /* end confdefs.h. */
13365 short int ascii_mm[] =
13366 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13367 short int ascii_ii[] =
13368 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13369 int use_ascii (int i) {
13370 return ascii_mm[i] + ascii_ii[i];
13371 }
13372 short int ebcdic_ii[] =
13373 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13374 short int ebcdic_mm[] =
13375 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13376 int use_ebcdic (int i) {
13377 return ebcdic_mm[i] + ebcdic_ii[i];
13378 }
13379 extern int foo;
13380
13381 int
13382 main ()
13383 {
13384 return use_ascii (foo) == use_ebcdic (foo);
13385 ;
13386 return 0;
13387 }
13388 _ACEOF
13389 if ac_fn_c_try_compile "$LINENO"; then :
13390 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13391 ac_cv_c_bigendian=yes
13392 fi
13393 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13394 if test "$ac_cv_c_bigendian" = unknown; then
13395 ac_cv_c_bigendian=no
13396 else
13397 # finding both strings is unlikely to happen, but who knows?
13398 ac_cv_c_bigendian=unknown
13399 fi
13400 fi
13401 fi
13402 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13403 else
13404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13405 /* end confdefs.h. */
13406 $ac_includes_default
13407 int
13408 main ()
13409 {
13410
13411 /* Are we little or big endian? From Harbison&Steele. */
13412 union
13413 {
13414 long int l;
13415 char c[sizeof (long int)];
13416 } u;
13417 u.l = 1;
13418 return u.c[sizeof (long int) - 1] == 1;
13419
13420 ;
13421 return 0;
13422 }
13423 _ACEOF
13424 if ac_fn_c_try_run "$LINENO"; then :
13425 ac_cv_c_bigendian=no
13426 else
13427 ac_cv_c_bigendian=yes
13428 fi
13429 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13430 conftest.$ac_objext conftest.beam conftest.$ac_ext
13431 fi
13432
13433 fi
13434 fi
13435 :
13436 case $ac_cv_c_bigendian in #(
13437 yes)
13438 gl_cv_cc_double_expbit0="word 0 bit 20";; #(
13439 no)
13440 gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
13441 universal)
13442
13443 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
13444
13445 ;; #(
13446 *)
13447 gl_cv_cc_double_expbit0="unknown" ;;
13448 esac
13449
13450
13451 fi
13452 rm -f conftest*
13453
13454
13455 else
13456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13457 /* end confdefs.h. */
13458
13459 #include <float.h>
13460 #include <stddef.h>
13461 #include <stdio.h>
13462 #include <string.h>
13463 #define NWORDS \
13464 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
13465 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
13466 static unsigned int ored_words[NWORDS];
13467 static unsigned int anded_words[NWORDS];
13468 static void add_to_ored_words (double x)
13469 {
13470 memory_double m;
13471 size_t i;
13472 /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
13473 memset (&m, 0, sizeof (memory_double));
13474 m.value = x;
13475 for (i = 0; i < NWORDS; i++)
13476 {
13477 ored_words[i] |= m.word[i];
13478 anded_words[i] &= m.word[i];
13479 }
13480 }
13481 int main ()
13482 {
13483 size_t j;
13484 FILE *fp = fopen ("conftest.out", "w");
13485 if (fp == NULL)
13486 return 1;
13487 for (j = 0; j < NWORDS; j++)
13488 anded_words[j] = ~ (unsigned int) 0;
13489 add_to_ored_words (0.25);
13490 add_to_ored_words (0.5);
13491 add_to_ored_words (1.0);
13492 add_to_ored_words (2.0);
13493 add_to_ored_words (4.0);
13494 /* Remove bits that are common (e.g. if representation of the first mantissa
13495 bit is explicit). */
13496 for (j = 0; j < NWORDS; j++)
13497 ored_words[j] &= ~anded_words[j];
13498 /* Now find the nonzero word. */
13499 for (j = 0; j < NWORDS; j++)
13500 if (ored_words[j] != 0)
13501 break;
13502 if (j < NWORDS)
13503 {
13504 size_t i;
13505 for (i = j + 1; i < NWORDS; i++)
13506 if (ored_words[i] != 0)
13507 {
13508 fprintf (fp, "unknown");
13509 return (fclose (fp) != 0);
13510 }
13511 for (i = 0; ; i++)
13512 if ((ored_words[j] >> i) & 1)
13513 {
13514 fprintf (fp, "word %d bit %d", (int) j, (int) i);
13515 return (fclose (fp) != 0);
13516 }
13517 }
13518 fprintf (fp, "unknown");
13519 return (fclose (fp) != 0);
13520 }
13521
13522 _ACEOF
13523 if ac_fn_c_try_run "$LINENO"; then :
13524 gl_cv_cc_double_expbit0=`cat conftest.out`
13525 else
13526 gl_cv_cc_double_expbit0="unknown"
13527 fi
13528 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13529 conftest.$ac_objext conftest.beam conftest.$ac_ext
13530 fi
13531
13532 rm -f conftest.out
13533
13534 fi
13535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
13536 $as_echo "$gl_cv_cc_double_expbit0" >&6; }
13537 case "$gl_cv_cc_double_expbit0" in
13538 word*bit*)
13539 word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
13540 bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
13541
13542 cat >>confdefs.h <<_ACEOF
13543 #define DBL_EXPBIT0_WORD $word
13544 _ACEOF
13545
13546
13547 cat >>confdefs.h <<_ACEOF
13548 #define DBL_EXPBIT0_BIT $bit
13549 _ACEOF
13550
13551 ;;
13552 esac
13553
13554
13555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13556 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
13557 if ${ac_cv_c_bigendian+:} false; then :
13558 $as_echo_n "(cached) " >&6
13559 else
13560 ac_cv_c_bigendian=unknown
13561 # See if we're dealing with a universal compiler.
13562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13563 /* end confdefs.h. */
13564 #ifndef __APPLE_CC__
13565 not a universal capable compiler
13566 #endif
13567 typedef int dummy;
13568
13569 _ACEOF
13570 if ac_fn_c_try_compile "$LINENO"; then :
13571
13572 # Check for potential -arch flags. It is not universal unless
13573 # there are at least two -arch flags with different values.
13574 ac_arch=
13575 ac_prev=
13576 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13577 if test -n "$ac_prev"; then
13578 case $ac_word in
13579 i?86 | x86_64 | ppc | ppc64)
13580 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13581 ac_arch=$ac_word
13582 else
13583 ac_cv_c_bigendian=universal
13584 break
13585 fi
13586 ;;
13587 esac
13588 ac_prev=
13589 elif test "x$ac_word" = "x-arch"; then
13590 ac_prev=arch
13591 fi
13592 done
13593 fi
13594 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13595 if test $ac_cv_c_bigendian = unknown; then
13596 # See if sys/param.h defines the BYTE_ORDER macro.
13597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13598 /* end confdefs.h. */
13599 #include <sys/types.h>
13600 #include <sys/param.h>
13601
13602 int
13603 main ()
13604 {
13605 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13606 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13607 && LITTLE_ENDIAN)
13608 bogus endian macros
13609 #endif
13610
13611 ;
13612 return 0;
13613 }
13614 _ACEOF
13615 if ac_fn_c_try_compile "$LINENO"; then :
13616 # It does; now see whether it defined to BIG_ENDIAN or not.
13617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13618 /* end confdefs.h. */
13619 #include <sys/types.h>
13620 #include <sys/param.h>
13621
13622 int
13623 main ()
13624 {
13625 #if BYTE_ORDER != BIG_ENDIAN
13626 not big endian
13627 #endif
13628
13629 ;
13630 return 0;
13631 }
13632 _ACEOF
13633 if ac_fn_c_try_compile "$LINENO"; then :
13634 ac_cv_c_bigendian=yes
13635 else
13636 ac_cv_c_bigendian=no
13637 fi
13638 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13639 fi
13640 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13641 fi
13642 if test $ac_cv_c_bigendian = unknown; then
13643 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13645 /* end confdefs.h. */
13646 #include <limits.h>
13647
13648 int
13649 main ()
13650 {
13651 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13652 bogus endian macros
13653 #endif
13654
13655 ;
13656 return 0;
13657 }
13658 _ACEOF
13659 if ac_fn_c_try_compile "$LINENO"; then :
13660 # It does; now see whether it defined to _BIG_ENDIAN or not.
13661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13662 /* end confdefs.h. */
13663 #include <limits.h>
13664
13665 int
13666 main ()
13667 {
13668 #ifndef _BIG_ENDIAN
13669 not big endian
13670 #endif
13671
13672 ;
13673 return 0;
13674 }
13675 _ACEOF
13676 if ac_fn_c_try_compile "$LINENO"; then :
13677 ac_cv_c_bigendian=yes
13678 else
13679 ac_cv_c_bigendian=no
13680 fi
13681 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13682 fi
13683 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13684 fi
13685 if test $ac_cv_c_bigendian = unknown; then
13686 # Compile a test program.
13687 if test "$cross_compiling" = yes; then :
13688 # Try to guess by grepping values from an object file.
13689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13690 /* end confdefs.h. */
13691 short int ascii_mm[] =
13692 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13693 short int ascii_ii[] =
13694 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13695 int use_ascii (int i) {
13696 return ascii_mm[i] + ascii_ii[i];
13697 }
13698 short int ebcdic_ii[] =
13699 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13700 short int ebcdic_mm[] =
13701 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13702 int use_ebcdic (int i) {
13703 return ebcdic_mm[i] + ebcdic_ii[i];
13704 }
13705 extern int foo;
13706
13707 int
13708 main ()
13709 {
13710 return use_ascii (foo) == use_ebcdic (foo);
13711 ;
13712 return 0;
13713 }
13714 _ACEOF
13715 if ac_fn_c_try_compile "$LINENO"; then :
13716 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13717 ac_cv_c_bigendian=yes
13718 fi
13719 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13720 if test "$ac_cv_c_bigendian" = unknown; then
13721 ac_cv_c_bigendian=no
13722 else
13723 # finding both strings is unlikely to happen, but who knows?
13724 ac_cv_c_bigendian=unknown
13725 fi
13726 fi
13727 fi
13728 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13729 else
13730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13731 /* end confdefs.h. */
13732 $ac_includes_default
13733 int
13734 main ()
13735 {
13736
13737 /* Are we little or big endian? From Harbison&Steele. */
13738 union
13739 {
13740 long int l;
13741 char c[sizeof (long int)];
13742 } u;
13743 u.l = 1;
13744 return u.c[sizeof (long int) - 1] == 1;
13745
13746 ;
13747 return 0;
13748 }
13749 _ACEOF
13750 if ac_fn_c_try_run "$LINENO"; then :
13751 ac_cv_c_bigendian=no
13752 else
13753 ac_cv_c_bigendian=yes
13754 fi
13755 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13756 conftest.$ac_objext conftest.beam conftest.$ac_ext
13757 fi
13758
13759 fi
13760 fi
13761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13762 $as_echo "$ac_cv_c_bigendian" >&6; }
13763 case $ac_cv_c_bigendian in #(
13764 yes)
13765 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13766 ;; #(
13767 no)
13768 ;; #(
13769 universal)
13770
13771 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
13772
13773 ;; #(
13774 *)
13775 as_fn_error $? "unknown endianness
13776 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
13777 esac
13778
13779
13780
13781 GNULIB_LOCALECONV=0;
13782 GNULIB_SETLOCALE=0;
13783 GNULIB_SETLOCALE_NULL=0;
13784 GNULIB_DUPLOCALE=0;
13785 GNULIB_LOCALENAME=0;
13786 HAVE_NEWLOCALE=1;
13787 HAVE_DUPLOCALE=1;
13788 HAVE_FREELOCALE=1;
13789 REPLACE_LOCALECONV=0;
13790 REPLACE_SETLOCALE=0;
13791 REPLACE_NEWLOCALE=0;
13792 REPLACE_DUPLOCALE=0;
13793 REPLACE_FREELOCALE=0;
13794 REPLACE_STRUCT_LCONV=0;
13795
13796
13797 REPLACE_NULL=0;
13798 HAVE_MAX_ALIGN_T=1;
13799 HAVE_WCHAR_T=1;
13800
13801
13802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
13803 $as_echo_n "checking for wchar_t... " >&6; }
13804 if ${gt_cv_c_wchar_t+:} false; then :
13805 $as_echo_n "(cached) " >&6
13806 else
13807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13808 /* end confdefs.h. */
13809 #include <stddef.h>
13810 wchar_t foo = (wchar_t)'\0';
13811 int
13812 main ()
13813 {
13814
13815 ;
13816 return 0;
13817 }
13818 _ACEOF
13819 if ac_fn_c_try_compile "$LINENO"; then :
13820 gt_cv_c_wchar_t=yes
13821 else
13822 gt_cv_c_wchar_t=no
13823 fi
13824 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13825 fi
13826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
13827 $as_echo "$gt_cv_c_wchar_t" >&6; }
13828 if test $gt_cv_c_wchar_t = yes; then
13829
13830 $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
13831
13832 fi
13833
13834
13835
13836
13837
13838
13839
13840 STDDEF_H=
13841
13842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5
13843 $as_echo_n "checking for good max_align_t... " >&6; }
13844 if ${gl_cv_type_max_align_t+:} false; then :
13845 $as_echo_n "(cached) " >&6
13846 else
13847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13848 /* end confdefs.h. */
13849 #include <stddef.h>
13850 unsigned int s = sizeof (max_align_t);
13851 #if defined __GNUC__ || defined __clang__ || defined __IBM__ALIGNOF__
13852 int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
13853 int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1];
13854 #endif
13855 typedef struct { char a; max_align_t b; } max_helper;
13856 typedef struct { char a; long b; } long_helper;
13857 typedef struct { char a; double b; } double_helper;
13858 typedef struct { char a; long double b; } long_double_helper;
13859 int check3[2 * (offsetof (long_helper, b) <= offsetof (max_helper, b)) - 1];
13860 int check4[2 * (offsetof (double_helper, b) <= offsetof (max_helper, b)) - 1];
13861 int check5[2 * (offsetof (long_double_helper, b) <= offsetof (max_helper, b)) - 1];
13862
13863 int
13864 main ()
13865 {
13866
13867 ;
13868 return 0;
13869 }
13870 _ACEOF
13871 if ac_fn_c_try_compile "$LINENO"; then :
13872 gl_cv_type_max_align_t=yes
13873 else
13874 gl_cv_type_max_align_t=no
13875 fi
13876 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13877
13878 fi
13879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5
13880 $as_echo "$gl_cv_type_max_align_t" >&6; }
13881 if test $gl_cv_type_max_align_t = no; then
13882 HAVE_MAX_ALIGN_T=0
13883 STDDEF_H=stddef.h
13884 fi
13885
13886 if test $gt_cv_c_wchar_t = no; then
13887 HAVE_WCHAR_T=0
13888 STDDEF_H=stddef.h
13889 fi
13890
13891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
13892 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
13893 if ${gl_cv_decl_null_works+:} false; then :
13894 $as_echo_n "(cached) " >&6
13895 else
13896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13897 /* end confdefs.h. */
13898 #include <stddef.h>
13899 int test[2 * (sizeof NULL == sizeof (void *)) -1];
13900
13901 int
13902 main ()
13903 {
13904
13905 ;
13906 return 0;
13907 }
13908 _ACEOF
13909 if ac_fn_c_try_compile "$LINENO"; then :
13910 gl_cv_decl_null_works=yes
13911 else
13912 gl_cv_decl_null_works=no
13913 fi
13914 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13915 fi
13916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
13917 $as_echo "$gl_cv_decl_null_works" >&6; }
13918 if test $gl_cv_decl_null_works = no; then
13919 REPLACE_NULL=1
13920 STDDEF_H=stddef.h
13921 fi
13922
13923
13924 if test -n "$STDDEF_H"; then
13925 GL_GENERATE_STDDEF_H_TRUE=
13926 GL_GENERATE_STDDEF_H_FALSE='#'
13927 else
13928 GL_GENERATE_STDDEF_H_TRUE='#'
13929 GL_GENERATE_STDDEF_H_FALSE=
13930 fi
13931
13932 if test -n "$STDDEF_H"; then
13933
13934
13935
13936
13937
13938
13939
13940
13941 if test $gl_cv_have_include_next = yes; then
13942 gl_cv_next_stddef_h='<'stddef.h'>'
13943 else
13944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
13945 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
13946 if ${gl_cv_next_stddef_h+:} false; then :
13947 $as_echo_n "(cached) " >&6
13948 else
13949
13950
13951
13952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13953 /* end confdefs.h. */
13954 #include <stddef.h>
13955 _ACEOF
13956 case "$host_os" in
13957 aix*) gl_absname_cpp="$ac_cpp -C" ;;
13958 *) gl_absname_cpp="$ac_cpp" ;;
13959 esac
13960
13961 case "$host_os" in
13962 mingw*)
13963 gl_dirsep_regex='[/\\]'
13964 ;;
13965 *)
13966 gl_dirsep_regex='\/'
13967 ;;
13968 esac
13969 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13970 gl_header_literal_regex=`echo 'stddef.h' \
13971 | sed -e "$gl_make_literal_regex_sed"`
13972 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13973 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13974 s|^/[^/]|//&|
13975 p
13976 q
13977 }'
13978
13979 gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13980 sed -n "$gl_absolute_header_sed"`
13981
13982 gl_header=$gl_cv_absolute_stddef_h
13983 gl_cv_next_stddef_h='"'$gl_header'"'
13984
13985
13986 fi
13987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
13988 $as_echo "$gl_cv_next_stddef_h" >&6; }
13989 fi
13990 NEXT_STDDEF_H=$gl_cv_next_stddef_h
13991
13992 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13993 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13994 gl_next_as_first_directive='<'stddef.h'>'
13995 else
13996 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13997 gl_next_as_first_directive=$gl_cv_next_stddef_h
13998 fi
13999 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
14000
14001
14002
14003
14004 fi
14005
14006
14007
14008
14009
14010
14011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5
14012 $as_echo_n "checking whether locale.h defines locale_t... " >&6; }
14013 if ${gl_cv_header_locale_has_locale_t+:} false; then :
14014 $as_echo_n "(cached) " >&6
14015 else
14016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14017 /* end confdefs.h. */
14018 #include <locale.h>
14019 locale_t x;
14020 int
14021 main ()
14022 {
14023
14024 ;
14025 return 0;
14026 }
14027 _ACEOF
14028 if ac_fn_c_try_compile "$LINENO"; then :
14029 gl_cv_header_locale_has_locale_t=yes
14030 else
14031 gl_cv_header_locale_has_locale_t=no
14032 fi
14033 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14034
14035 fi
14036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_has_locale_t" >&5
14037 $as_echo "$gl_cv_header_locale_has_locale_t" >&6; }
14038
14039
14040 if test $ac_cv_header_xlocale_h = yes; then
14041 HAVE_XLOCALE_H=1
14042 if test $gl_cv_header_locale_has_locale_t = yes; then
14043 gl_cv_header_locale_h_needs_xlocale_h=no
14044 else
14045 gl_cv_header_locale_h_needs_xlocale_h=yes
14046 fi
14047 HAVE_LOCALE_T=1
14048 else
14049 HAVE_XLOCALE_H=0
14050 gl_cv_header_locale_h_needs_xlocale_h=no
14051 if test $gl_cv_header_locale_has_locale_t = yes; then
14052 HAVE_LOCALE_T=1
14053 else
14054 HAVE_LOCALE_T=0
14055 fi
14056 fi
14057
14058
14059
14060
14061 gl_threads_api=none
14062 LIBTHREAD=
14063 LTLIBTHREAD=
14064 LIBMULTITHREAD=
14065 LTLIBMULTITHREAD=
14066 if test "$gl_use_threads" != no; then
14067
14068
14069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
14070 $as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
14071 if ${gl_cv_have_weak+:} false; then :
14072 $as_echo_n "(cached) " >&6
14073 else
14074 gl_cv_have_weak=no
14075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14076 /* end confdefs.h. */
14077 extern void xyzzy ();
14078 #pragma weak xyzzy
14079 int
14080 main ()
14081 {
14082 xyzzy();
14083 ;
14084 return 0;
14085 }
14086 _ACEOF
14087 if ac_fn_c_try_link "$LINENO"; then :
14088 gl_cv_have_weak=maybe
14089 fi
14090 rm -f core conftest.err conftest.$ac_objext \
14091 conftest$ac_exeext conftest.$ac_ext
14092 if test $gl_cv_have_weak = maybe; then
14093 if test "$cross_compiling" = yes; then :
14094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14095 /* end confdefs.h. */
14096 #ifdef __ELF__
14097 Extensible Linking Format
14098 #endif
14099
14100 _ACEOF
14101 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14102 $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
14103 gl_cv_have_weak="guessing yes"
14104 else
14105 gl_cv_have_weak="guessing no"
14106 fi
14107 rm -f conftest*
14108
14109
14110 else
14111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14112 /* end confdefs.h. */
14113
14114 #include <stdio.h>
14115 #pragma weak fputs
14116 int main ()
14117 {
14118 return (fputs == NULL);
14119 }
14120 _ACEOF
14121 if ac_fn_c_try_run "$LINENO"; then :
14122 gl_cv_have_weak=yes
14123 else
14124 gl_cv_have_weak=no
14125 fi
14126 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14127 conftest.$ac_objext conftest.beam conftest.$ac_ext
14128 fi
14129
14130 fi
14131 case " $LDFLAGS " in
14132 *" -static "*) gl_cv_have_weak=no ;;
14133 esac
14134 case "$gl_cv_have_weak" in
14135 *yes)
14136 case "$host_os" in
14137 freebsd* | dragonfly*)
14138 : > conftest1.c
14139 $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
14140 cat <<EOF > conftest2.c
14141 #include <pthread.h>
14142 #pragma weak pthread_mutexattr_gettype
14143 int main ()
14144 {
14145 return (pthread_mutexattr_gettype != NULL);
14146 }
14147 EOF
14148 $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
14149 || gl_cv_have_weak=no
14150 rm -f conftest1.c libempty.so conftest2.c conftest
14151 ;;
14152 esac
14153 ;;
14154 esac
14155
14156 fi
14157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
14158 $as_echo "$gl_cv_have_weak" >&6; }
14159 case "$gl_cv_have_weak" in
14160 *yes)
14161
14162 $as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
14163
14164 ;;
14165 esac
14166
14167 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
14168
14169 :
14170 fi
14171 if test "$gl_use_threads" = isoc || test "$gl_use_threads" = isoc+posix; then
14172
14173 gl_have_isoc_threads="$ac_cv_header_threads_h"
14174 fi
14175 if test "$gl_use_threads" = yes \
14176 || test "$gl_use_threads" = posix \
14177 || test "$gl_use_threads" = isoc+posix; then
14178
14179
14180 if test -z "$gl_pthreadlib_body_done"; then
14181 gl_pthread_api=no
14182 LIBPTHREAD=
14183 LIBPMULTITHREAD=
14184 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
14185 # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
14186 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
14187 if test "x$ac_cv_header_pthread_h" = xyes; then :
14188 gl_have_pthread_h=yes
14189 else
14190 gl_have_pthread_h=no
14191 fi
14192
14193
14194 if test "$gl_have_pthread_h" = yes; then
14195 # Other possible tests:
14196 # -lpthreads (FSU threads, PCthreads)
14197 # -lgthreads
14198 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
14199 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
14200 # the second one only in libpthread, and lock.c needs it.
14201 #
14202 # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
14203 # needs -pthread for some reason. See:
14204 # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
14205 save_LIBS=$LIBS
14206 for gl_pthread in '' '-pthread'; do
14207 LIBS="$LIBS $gl_pthread"
14208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14209 /* end confdefs.h. */
14210 #include <pthread.h>
14211 pthread_mutex_t m;
14212 pthread_mutexattr_t ma;
14213
14214 int
14215 main ()
14216 {
14217 pthread_mutex_lock (&m);
14218 pthread_mutexattr_init (&ma);
14219 ;
14220 return 0;
14221 }
14222 _ACEOF
14223 if ac_fn_c_try_link "$LINENO"; then :
14224 gl_pthread_api=yes
14225 LIBPTHREAD=$gl_pthread
14226 LIBPMULTITHREAD=$gl_pthread
14227 fi
14228 rm -f core conftest.err conftest.$ac_objext \
14229 conftest$ac_exeext conftest.$ac_ext
14230 LIBS=$save_LIBS
14231 test $gl_pthread_api = yes && break
14232 done
14233
14234 # Test for libpthread by looking for pthread_kill. (Not pthread_self,
14235 # since it is defined as a macro on OSF/1.)
14236 if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
14237 # The program links fine without libpthread. But it may actually
14238 # need to link with libpthread in order to create multiple threads.
14239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
14240 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
14241 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
14242 $as_echo_n "(cached) " >&6
14243 else
14244 ac_check_lib_save_LIBS=$LIBS
14245 LIBS="-lpthread $LIBS"
14246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14247 /* end confdefs.h. */
14248
14249 /* Override any GCC internal prototype to avoid an error.
14250 Use char because int might match the return type of a GCC
14251 builtin and then its argument prototype would still apply. */
14252 #ifdef __cplusplus
14253 extern "C"
14254 #endif
14255 char pthread_kill ();
14256 int
14257 main ()
14258 {
14259 return pthread_kill ();
14260 ;
14261 return 0;
14262 }
14263 _ACEOF
14264 if ac_fn_c_try_link "$LINENO"; then :
14265 ac_cv_lib_pthread_pthread_kill=yes
14266 else
14267 ac_cv_lib_pthread_pthread_kill=no
14268 fi
14269 rm -f core conftest.err conftest.$ac_objext \
14270 conftest$ac_exeext conftest.$ac_ext
14271 LIBS=$ac_check_lib_save_LIBS
14272 fi
14273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
14274 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
14275 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
14276 LIBPMULTITHREAD=-lpthread
14277 # On Solaris and HP-UX, most pthread functions exist also in libc.
14278 # Therefore pthread_in_use() needs to actually try to create a
14279 # thread: pthread_create from libc will fail, whereas
14280 # pthread_create will actually create a thread.
14281 # On Solaris 10 or newer, this test is no longer needed, because
14282 # libc contains the fully functional pthread functions.
14283 case "$host_os" in
14284 solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
14285
14286 $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
14287
14288 esac
14289
14290 fi
14291
14292 elif test $gl_pthread_api != yes; then
14293 # Some library is needed. Try libpthread and libc_r.
14294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
14295 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
14296 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
14297 $as_echo_n "(cached) " >&6
14298 else
14299 ac_check_lib_save_LIBS=$LIBS
14300 LIBS="-lpthread $LIBS"
14301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14302 /* end confdefs.h. */
14303
14304 /* Override any GCC internal prototype to avoid an error.
14305 Use char because int might match the return type of a GCC
14306 builtin and then its argument prototype would still apply. */
14307 #ifdef __cplusplus
14308 extern "C"
14309 #endif
14310 char pthread_kill ();
14311 int
14312 main ()
14313 {
14314 return pthread_kill ();
14315 ;
14316 return 0;
14317 }
14318 _ACEOF
14319 if ac_fn_c_try_link "$LINENO"; then :
14320 ac_cv_lib_pthread_pthread_kill=yes
14321 else
14322 ac_cv_lib_pthread_pthread_kill=no
14323 fi
14324 rm -f core conftest.err conftest.$ac_objext \
14325 conftest$ac_exeext conftest.$ac_ext
14326 LIBS=$ac_check_lib_save_LIBS
14327 fi
14328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
14329 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
14330 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
14331 gl_pthread_api=yes
14332 LIBPTHREAD=-lpthread
14333 LIBPMULTITHREAD=-lpthread
14334 fi
14335
14336 if test $gl_pthread_api != yes; then
14337 # For FreeBSD 4.
14338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
14339 $as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
14340 if ${ac_cv_lib_c_r_pthread_kill+:} false; then :
14341 $as_echo_n "(cached) " >&6
14342 else
14343 ac_check_lib_save_LIBS=$LIBS
14344 LIBS="-lc_r $LIBS"
14345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14346 /* end confdefs.h. */
14347
14348 /* Override any GCC internal prototype to avoid an error.
14349 Use char because int might match the return type of a GCC
14350 builtin and then its argument prototype would still apply. */
14351 #ifdef __cplusplus
14352 extern "C"
14353 #endif
14354 char pthread_kill ();
14355 int
14356 main ()
14357 {
14358 return pthread_kill ();
14359 ;
14360 return 0;
14361 }
14362 _ACEOF
14363 if ac_fn_c_try_link "$LINENO"; then :
14364 ac_cv_lib_c_r_pthread_kill=yes
14365 else
14366 ac_cv_lib_c_r_pthread_kill=no
14367 fi
14368 rm -f core conftest.err conftest.$ac_objext \
14369 conftest$ac_exeext conftest.$ac_ext
14370 LIBS=$ac_check_lib_save_LIBS
14371 fi
14372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
14373 $as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
14374 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then :
14375 gl_pthread_api=yes
14376 LIBPTHREAD=-lc_r
14377 LIBPMULTITHREAD=-lc_r
14378 fi
14379
14380 fi
14381 fi
14382 fi
14383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
14384 $as_echo_n "checking whether POSIX threads API is available... " >&6; }
14385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
14386 $as_echo "$gl_pthread_api" >&6; }
14387
14388
14389 if test $gl_pthread_api = yes; then
14390
14391 $as_echo "#define HAVE_PTHREAD_API 1" >>confdefs.h
14392
14393 fi
14394
14395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14396 /* end confdefs.h. */
14397 #include <sched.h>
14398 int
14399 main ()
14400 {
14401 sched_yield ();
14402 ;
14403 return 0;
14404 }
14405 _ACEOF
14406 if ac_fn_c_try_link "$LINENO"; then :
14407 LIB_SCHED_YIELD=
14408
14409 else
14410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
14411 $as_echo_n "checking for sched_yield in -lrt... " >&6; }
14412 if ${ac_cv_lib_rt_sched_yield+:} false; then :
14413 $as_echo_n "(cached) " >&6
14414 else
14415 ac_check_lib_save_LIBS=$LIBS
14416 LIBS="-lrt $LIBS"
14417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14418 /* end confdefs.h. */
14419
14420 /* Override any GCC internal prototype to avoid an error.
14421 Use char because int might match the return type of a GCC
14422 builtin and then its argument prototype would still apply. */
14423 #ifdef __cplusplus
14424 extern "C"
14425 #endif
14426 char sched_yield ();
14427 int
14428 main ()
14429 {
14430 return sched_yield ();
14431 ;
14432 return 0;
14433 }
14434 _ACEOF
14435 if ac_fn_c_try_link "$LINENO"; then :
14436 ac_cv_lib_rt_sched_yield=yes
14437 else
14438 ac_cv_lib_rt_sched_yield=no
14439 fi
14440 rm -f core conftest.err conftest.$ac_objext \
14441 conftest$ac_exeext conftest.$ac_ext
14442 LIBS=$ac_check_lib_save_LIBS
14443 fi
14444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
14445 $as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
14446 if test "x$ac_cv_lib_rt_sched_yield" = xyes; then :
14447 LIB_SCHED_YIELD=-lrt
14448 else
14449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
14450 $as_echo_n "checking for sched_yield in -lposix4... " >&6; }
14451 if ${ac_cv_lib_posix4_sched_yield+:} false; then :
14452 $as_echo_n "(cached) " >&6
14453 else
14454 ac_check_lib_save_LIBS=$LIBS
14455 LIBS="-lposix4 $LIBS"
14456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14457 /* end confdefs.h. */
14458
14459 /* Override any GCC internal prototype to avoid an error.
14460 Use char because int might match the return type of a GCC
14461 builtin and then its argument prototype would still apply. */
14462 #ifdef __cplusplus
14463 extern "C"
14464 #endif
14465 char sched_yield ();
14466 int
14467 main ()
14468 {
14469 return sched_yield ();
14470 ;
14471 return 0;
14472 }
14473 _ACEOF
14474 if ac_fn_c_try_link "$LINENO"; then :
14475 ac_cv_lib_posix4_sched_yield=yes
14476 else
14477 ac_cv_lib_posix4_sched_yield=no
14478 fi
14479 rm -f core conftest.err conftest.$ac_objext \
14480 conftest$ac_exeext conftest.$ac_ext
14481 LIBS=$ac_check_lib_save_LIBS
14482 fi
14483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
14484 $as_echo "$ac_cv_lib_posix4_sched_yield" >&6; }
14485 if test "x$ac_cv_lib_posix4_sched_yield" = xyes; then :
14486 LIB_SCHED_YIELD=-lposix4
14487 fi
14488
14489 fi
14490
14491
14492 fi
14493 rm -f core conftest.err conftest.$ac_objext \
14494 conftest$ac_exeext conftest.$ac_ext
14495
14496
14497 gl_pthreadlib_body_done=done
14498 fi
14499
14500 LIBTHREAD=$LIBPTHREAD LTLIBTHREAD=$LIBPTHREAD
14501 LIBMULTITHREAD=$LIBPMULTITHREAD LTLIBMULTITHREAD=$LIBPMULTITHREAD
14502 if test $gl_pthread_api = yes; then
14503 if test "$gl_use_threads" = isoc+posix && test "$gl_have_isoc_threads" = yes; then
14504 gl_threads_api='isoc+posix'
14505
14506 $as_echo "#define USE_ISOC_AND_POSIX_THREADS 1" >>confdefs.h
14507
14508 LIBTHREAD= LTLIBTHREAD=
14509 else
14510 gl_threads_api=posix
14511
14512 $as_echo "#define USE_POSIX_THREADS 1" >>confdefs.h
14513
14514 if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
14515 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
14516
14517 $as_echo "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h
14518
14519 LIBTHREAD= LTLIBTHREAD=
14520 else
14521 case "$host_os" in
14522 freebsd* | dragonfly*)
14523 if test "x$LIBTHREAD" != "x$LIBMULTITHREAD"; then
14524
14525 $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
14526
14527 fi
14528 ;;
14529 esac
14530 fi
14531 fi
14532 fi
14533 fi
14534 fi
14535 if test $gl_threads_api = none; then
14536 if test "$gl_use_threads" = isoc && test "$gl_have_isoc_threads" = yes; then
14537
14538
14539
14540 if test -z "$gl_stdthreadlib_body_done"; then
14541
14542
14543 case "$host_os" in
14544 mingw*)
14545 LIBSTDTHREAD=
14546 ;;
14547 *)
14548
14549
14550 if test -z "$gl_pthreadlib_body_done"; then
14551 gl_pthread_api=no
14552 LIBPTHREAD=
14553 LIBPMULTITHREAD=
14554 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
14555 # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
14556 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
14557 if test "x$ac_cv_header_pthread_h" = xyes; then :
14558 gl_have_pthread_h=yes
14559 else
14560 gl_have_pthread_h=no
14561 fi
14562
14563
14564 if test "$gl_have_pthread_h" = yes; then
14565 # Other possible tests:
14566 # -lpthreads (FSU threads, PCthreads)
14567 # -lgthreads
14568 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
14569 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
14570 # the second one only in libpthread, and lock.c needs it.
14571 #
14572 # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
14573 # needs -pthread for some reason. See:
14574 # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
14575 save_LIBS=$LIBS
14576 for gl_pthread in '' '-pthread'; do
14577 LIBS="$LIBS $gl_pthread"
14578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14579 /* end confdefs.h. */
14580 #include <pthread.h>
14581 pthread_mutex_t m;
14582 pthread_mutexattr_t ma;
14583
14584 int
14585 main ()
14586 {
14587 pthread_mutex_lock (&m);
14588 pthread_mutexattr_init (&ma);
14589 ;
14590 return 0;
14591 }
14592 _ACEOF
14593 if ac_fn_c_try_link "$LINENO"; then :
14594 gl_pthread_api=yes
14595 LIBPTHREAD=$gl_pthread
14596 LIBPMULTITHREAD=$gl_pthread
14597 fi
14598 rm -f core conftest.err conftest.$ac_objext \
14599 conftest$ac_exeext conftest.$ac_ext
14600 LIBS=$save_LIBS
14601 test $gl_pthread_api = yes && break
14602 done
14603
14604 # Test for libpthread by looking for pthread_kill. (Not pthread_self,
14605 # since it is defined as a macro on OSF/1.)
14606 if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
14607 # The program links fine without libpthread. But it may actually
14608 # need to link with libpthread in order to create multiple threads.
14609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
14610 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
14611 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
14612 $as_echo_n "(cached) " >&6
14613 else
14614 ac_check_lib_save_LIBS=$LIBS
14615 LIBS="-lpthread $LIBS"
14616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14617 /* end confdefs.h. */
14618
14619 /* Override any GCC internal prototype to avoid an error.
14620 Use char because int might match the return type of a GCC
14621 builtin and then its argument prototype would still apply. */
14622 #ifdef __cplusplus
14623 extern "C"
14624 #endif
14625 char pthread_kill ();
14626 int
14627 main ()
14628 {
14629 return pthread_kill ();
14630 ;
14631 return 0;
14632 }
14633 _ACEOF
14634 if ac_fn_c_try_link "$LINENO"; then :
14635 ac_cv_lib_pthread_pthread_kill=yes
14636 else
14637 ac_cv_lib_pthread_pthread_kill=no
14638 fi
14639 rm -f core conftest.err conftest.$ac_objext \
14640 conftest$ac_exeext conftest.$ac_ext
14641 LIBS=$ac_check_lib_save_LIBS
14642 fi
14643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
14644 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
14645 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
14646 LIBPMULTITHREAD=-lpthread
14647 # On Solaris and HP-UX, most pthread functions exist also in libc.
14648 # Therefore pthread_in_use() needs to actually try to create a
14649 # thread: pthread_create from libc will fail, whereas
14650 # pthread_create will actually create a thread.
14651 # On Solaris 10 or newer, this test is no longer needed, because
14652 # libc contains the fully functional pthread functions.
14653 case "$host_os" in
14654 solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
14655
14656 $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
14657
14658 esac
14659
14660 fi
14661
14662 elif test $gl_pthread_api != yes; then
14663 # Some library is needed. Try libpthread and libc_r.
14664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
14665 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
14666 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
14667 $as_echo_n "(cached) " >&6
14668 else
14669 ac_check_lib_save_LIBS=$LIBS
14670 LIBS="-lpthread $LIBS"
14671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14672 /* end confdefs.h. */
14673
14674 /* Override any GCC internal prototype to avoid an error.
14675 Use char because int might match the return type of a GCC
14676 builtin and then its argument prototype would still apply. */
14677 #ifdef __cplusplus
14678 extern "C"
14679 #endif
14680 char pthread_kill ();
14681 int
14682 main ()
14683 {
14684 return pthread_kill ();
14685 ;
14686 return 0;
14687 }
14688 _ACEOF
14689 if ac_fn_c_try_link "$LINENO"; then :
14690 ac_cv_lib_pthread_pthread_kill=yes
14691 else
14692 ac_cv_lib_pthread_pthread_kill=no
14693 fi
14694 rm -f core conftest.err conftest.$ac_objext \
14695 conftest$ac_exeext conftest.$ac_ext
14696 LIBS=$ac_check_lib_save_LIBS
14697 fi
14698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
14699 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
14700 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
14701 gl_pthread_api=yes
14702 LIBPTHREAD=-lpthread
14703 LIBPMULTITHREAD=-lpthread
14704 fi
14705
14706 if test $gl_pthread_api != yes; then
14707 # For FreeBSD 4.
14708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
14709 $as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
14710 if ${ac_cv_lib_c_r_pthread_kill+:} false; then :
14711 $as_echo_n "(cached) " >&6
14712 else
14713 ac_check_lib_save_LIBS=$LIBS
14714 LIBS="-lc_r $LIBS"
14715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14716 /* end confdefs.h. */
14717
14718 /* Override any GCC internal prototype to avoid an error.
14719 Use char because int might match the return type of a GCC
14720 builtin and then its argument prototype would still apply. */
14721 #ifdef __cplusplus
14722 extern "C"
14723 #endif
14724 char pthread_kill ();
14725 int
14726 main ()
14727 {
14728 return pthread_kill ();
14729 ;
14730 return 0;
14731 }
14732 _ACEOF
14733 if ac_fn_c_try_link "$LINENO"; then :
14734 ac_cv_lib_c_r_pthread_kill=yes
14735 else
14736 ac_cv_lib_c_r_pthread_kill=no
14737 fi
14738 rm -f core conftest.err conftest.$ac_objext \
14739 conftest$ac_exeext conftest.$ac_ext
14740 LIBS=$ac_check_lib_save_LIBS
14741 fi
14742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
14743 $as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
14744 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then :
14745 gl_pthread_api=yes
14746 LIBPTHREAD=-lc_r
14747 LIBPMULTITHREAD=-lc_r
14748 fi
14749
14750 fi
14751 fi
14752 fi
14753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
14754 $as_echo_n "checking whether POSIX threads API is available... " >&6; }
14755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
14756 $as_echo "$gl_pthread_api" >&6; }
14757
14758
14759 if test $gl_pthread_api = yes; then
14760
14761 $as_echo "#define HAVE_PTHREAD_API 1" >>confdefs.h
14762
14763 fi
14764
14765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14766 /* end confdefs.h. */
14767 #include <sched.h>
14768 int
14769 main ()
14770 {
14771 sched_yield ();
14772 ;
14773 return 0;
14774 }
14775 _ACEOF
14776 if ac_fn_c_try_link "$LINENO"; then :
14777 LIB_SCHED_YIELD=
14778
14779 else
14780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
14781 $as_echo_n "checking for sched_yield in -lrt... " >&6; }
14782 if ${ac_cv_lib_rt_sched_yield+:} false; then :
14783 $as_echo_n "(cached) " >&6
14784 else
14785 ac_check_lib_save_LIBS=$LIBS
14786 LIBS="-lrt $LIBS"
14787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14788 /* end confdefs.h. */
14789
14790 /* Override any GCC internal prototype to avoid an error.
14791 Use char because int might match the return type of a GCC
14792 builtin and then its argument prototype would still apply. */
14793 #ifdef __cplusplus
14794 extern "C"
14795 #endif
14796 char sched_yield ();
14797 int
14798 main ()
14799 {
14800 return sched_yield ();
14801 ;
14802 return 0;
14803 }
14804 _ACEOF
14805 if ac_fn_c_try_link "$LINENO"; then :
14806 ac_cv_lib_rt_sched_yield=yes
14807 else
14808 ac_cv_lib_rt_sched_yield=no
14809 fi
14810 rm -f core conftest.err conftest.$ac_objext \
14811 conftest$ac_exeext conftest.$ac_ext
14812 LIBS=$ac_check_lib_save_LIBS
14813 fi
14814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
14815 $as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
14816 if test "x$ac_cv_lib_rt_sched_yield" = xyes; then :
14817 LIB_SCHED_YIELD=-lrt
14818 else
14819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
14820 $as_echo_n "checking for sched_yield in -lposix4... " >&6; }
14821 if ${ac_cv_lib_posix4_sched_yield+:} false; then :
14822 $as_echo_n "(cached) " >&6
14823 else
14824 ac_check_lib_save_LIBS=$LIBS
14825 LIBS="-lposix4 $LIBS"
14826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14827 /* end confdefs.h. */
14828
14829 /* Override any GCC internal prototype to avoid an error.
14830 Use char because int might match the return type of a GCC
14831 builtin and then its argument prototype would still apply. */
14832 #ifdef __cplusplus
14833 extern "C"
14834 #endif
14835 char sched_yield ();
14836 int
14837 main ()
14838 {
14839 return sched_yield ();
14840 ;
14841 return 0;
14842 }
14843 _ACEOF
14844 if ac_fn_c_try_link "$LINENO"; then :
14845 ac_cv_lib_posix4_sched_yield=yes
14846 else
14847 ac_cv_lib_posix4_sched_yield=no
14848 fi
14849 rm -f core conftest.err conftest.$ac_objext \
14850 conftest$ac_exeext conftest.$ac_ext
14851 LIBS=$ac_check_lib_save_LIBS
14852 fi
14853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
14854 $as_echo "$ac_cv_lib_posix4_sched_yield" >&6; }
14855 if test "x$ac_cv_lib_posix4_sched_yield" = xyes; then :
14856 LIB_SCHED_YIELD=-lposix4
14857 fi
14858
14859 fi
14860
14861
14862 fi
14863 rm -f core conftest.err conftest.$ac_objext \
14864 conftest$ac_exeext conftest.$ac_ext
14865
14866
14867 gl_pthreadlib_body_done=done
14868 fi
14869
14870 if test $ac_cv_header_threads_h = yes; then
14871 for ac_func in thrd_create
14872 do :
14873 ac_fn_c_check_func "$LINENO" "thrd_create" "ac_cv_func_thrd_create"
14874 if test "x$ac_cv_func_thrd_create" = xyes; then :
14875 cat >>confdefs.h <<_ACEOF
14876 #define HAVE_THRD_CREATE 1
14877 _ACEOF
14878
14879 fi
14880 done
14881
14882 if test $ac_cv_func_thrd_create = yes; then
14883 LIBSTDTHREAD=
14884 else
14885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thrd_create in -lstdthreads" >&5
14886 $as_echo_n "checking for thrd_create in -lstdthreads... " >&6; }
14887 if ${ac_cv_lib_stdthreads_thrd_create+:} false; then :
14888 $as_echo_n "(cached) " >&6
14889 else
14890 ac_check_lib_save_LIBS=$LIBS
14891 LIBS="-lstdthreads $LIBS"
14892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14893 /* end confdefs.h. */
14894
14895 /* Override any GCC internal prototype to avoid an error.
14896 Use char because int might match the return type of a GCC
14897 builtin and then its argument prototype would still apply. */
14898 #ifdef __cplusplus
14899 extern "C"
14900 #endif
14901 char thrd_create ();
14902 int
14903 main ()
14904 {
14905 return thrd_create ();
14906 ;
14907 return 0;
14908 }
14909 _ACEOF
14910 if ac_fn_c_try_link "$LINENO"; then :
14911 ac_cv_lib_stdthreads_thrd_create=yes
14912 else
14913 ac_cv_lib_stdthreads_thrd_create=no
14914 fi
14915 rm -f core conftest.err conftest.$ac_objext \
14916 conftest$ac_exeext conftest.$ac_ext
14917 LIBS=$ac_check_lib_save_LIBS
14918 fi
14919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_stdthreads_thrd_create" >&5
14920 $as_echo "$ac_cv_lib_stdthreads_thrd_create" >&6; }
14921 if test "x$ac_cv_lib_stdthreads_thrd_create" = xyes; then :
14922
14923 LIBSTDTHREAD='-lstdthreads -lpthread'
14924
14925 else
14926
14927 LIBSTDTHREAD="$LIBPMULTITHREAD"
14928
14929 fi
14930
14931 fi
14932 else
14933 LIBSTDTHREAD="$LIBPMULTITHREAD $LIB_SCHED_YIELD"
14934 fi
14935 ;;
14936 esac
14937
14938
14939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ISO C threads API is available" >&5
14940 $as_echo_n "checking whether ISO C threads API is available... " >&6; }
14941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_threads_h" >&5
14942 $as_echo "$ac_cv_header_threads_h" >&6; }
14943 gl_stdthreadlib_body_done=done
14944 fi
14945
14946 LIBTHREAD=$LIBSTDTHREAD LTLIBTHREAD=$LIBSTDTHREAD
14947 LIBMULTITHREAD=$LIBSTDTHREAD LTLIBMULTITHREAD=$LIBSTDTHREAD
14948 gl_threads_api=isoc
14949
14950 $as_echo "#define USE_ISOC_THREADS 1" >>confdefs.h
14951
14952 fi
14953 fi
14954 if test $gl_threads_api = none; then
14955 case "$gl_use_threads" in
14956 yes | windows | win32) # The 'win32' is for backward compatibility.
14957 if { case "$host_os" in
14958 mingw*) true;;
14959 *) false;;
14960 esac
14961 }; then
14962 gl_threads_api=windows
14963
14964 $as_echo "#define USE_WINDOWS_THREADS 1" >>confdefs.h
14965
14966 fi
14967 ;;
14968 esac
14969 fi
14970 fi
14971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5
14972 $as_echo_n "checking for multithread API to use... " >&6; }
14973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5
14974 $as_echo "$gl_threads_api" >&6; }
14975
14976
14977
14978
14979
14980
14981
14982
14983
14984
14985
14986
14987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
14988 $as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
14989 if ${gl_cv_func_malloc_posix+:} false; then :
14990 $as_echo_n "(cached) " >&6
14991 else
14992
14993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14994 /* end confdefs.h. */
14995
14996 int
14997 main ()
14998 {
14999 #if defined _WIN32 && ! defined __CYGWIN__
15000 choke me
15001 #endif
15002
15003 ;
15004 return 0;
15005 }
15006 _ACEOF
15007 if ac_fn_c_try_compile "$LINENO"; then :
15008 gl_cv_func_malloc_posix=yes
15009 else
15010 gl_cv_func_malloc_posix=no
15011 fi
15012 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15013
15014 fi
15015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
15016 $as_echo "$gl_cv_func_malloc_posix" >&6; }
15017
15018
15019
15020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
15021 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
15022 if ${ac_cv_func_malloc_0_nonnull+:} false; then :
15023 $as_echo_n "(cached) " >&6
15024 else
15025 if test "$cross_compiling" = yes; then :
15026 case "$host_os" in
15027 # Guess yes on platforms where we know the result.
15028 *-gnu* | gnu* | *-musl* | freebsd* | netbsd* | openbsd* \
15029 | hpux* | solaris* | cygwin* | mingw*)
15030 ac_cv_func_malloc_0_nonnull="guessing yes" ;;
15031 # If we don't know, obey --enable-cross-guesses.
15032 *) ac_cv_func_malloc_0_nonnull="$gl_cross_guess_normal" ;;
15033 esac
15034
15035 else
15036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15037 /* end confdefs.h. */
15038 #include <stdlib.h>
15039
15040 int
15041 main ()
15042 {
15043 char *p = malloc (0);
15044 int result = !p;
15045 free (p);
15046 return result;
15047 ;
15048 return 0;
15049 }
15050
15051 _ACEOF
15052 if ac_fn_c_try_run "$LINENO"; then :
15053 ac_cv_func_malloc_0_nonnull=yes
15054 else
15055 ac_cv_func_malloc_0_nonnull=no
15056 fi
15057 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15058 conftest.$ac_objext conftest.beam conftest.$ac_ext
15059 fi
15060
15061
15062 fi
15063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
15064 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
15065 case "$ac_cv_func_malloc_0_nonnull" in
15066 *yes)
15067 gl_cv_func_malloc_0_nonnull=1
15068 ;;
15069 *)
15070 gl_cv_func_malloc_0_nonnull=0
15071 ;;
15072 esac
15073
15074
15075 cat >>confdefs.h <<_ACEOF
15076 #define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
15077 _ACEOF
15078
15079
15080
15081
15082
15083
15084
15085
15086
15087
15088
15089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
15090 $as_echo_n "checking for a traditional japanese locale... " >&6; }
15091 if ${gt_cv_locale_ja+:} false; then :
15092 $as_echo_n "(cached) " >&6
15093 else
15094
15095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15096 /* end confdefs.h. */
15097
15098 #include <locale.h>
15099 #include <time.h>
15100 #if HAVE_LANGINFO_CODESET
15101 # include <langinfo.h>
15102 #endif
15103 #include <stdlib.h>
15104 #include <string.h>
15105 struct tm t;
15106 char buf[16];
15107 int main ()
15108 {
15109 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
15110 imitates locale dependent behaviour by looking at the environment
15111 variables, and all locales use the UTF-8 encoding. */
15112 #if defined __BEOS__ || defined __HAIKU__
15113 return 1;
15114 #else
15115 /* Check whether the given locale name is recognized by the system. */
15116 # if defined _WIN32 && !defined __CYGWIN__
15117 /* On native Windows, setlocale(category, "") looks at the system settings,
15118 not at the environment variables. Also, when an encoding suffix such
15119 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
15120 category of the locale to "C". */
15121 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
15122 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
15123 return 1;
15124 # else
15125 if (setlocale (LC_ALL, "") == NULL) return 1;
15126 # endif
15127 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
15128 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
15129 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
15130 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
15131 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
15132 some unit tests fail.
15133 On MirBSD 10, when an unsupported locale is specified, setlocale()
15134 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
15135 # if HAVE_LANGINFO_CODESET
15136 {
15137 const char *cs = nl_langinfo (CODESET);
15138 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
15139 || strcmp (cs, "UTF-8") == 0)
15140 return 1;
15141 }
15142 # endif
15143 # ifdef __CYGWIN__
15144 /* On Cygwin, avoid locale names without encoding suffix, because the
15145 locale_charset() function relies on the encoding suffix. Note that
15146 LC_ALL is set on the command line. */
15147 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
15148 # endif
15149 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
15150 on Cygwin 1.5.x. */
15151 if (MB_CUR_MAX == 1)
15152 return 1;
15153 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
15154 This excludes the UTF-8 encoding (except on MirBSD). */
15155 {
15156 const char *p;
15157 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
15158 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
15159 for (p = buf; *p != '\0'; p++)
15160 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
15161 return 1;
15162 }
15163 return 0;
15164 #endif
15165 }
15166
15167 _ACEOF
15168 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
15169 (eval $ac_link) 2>&5
15170 ac_status=$?
15171 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15172 test $ac_status = 0; } && test -s conftest$ac_exeext; then
15173 case "$host_os" in
15174 # Handle native Windows specially, because there setlocale() interprets
15175 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
15176 # "fr" or "fra" as "French" or "French_France.1252",
15177 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
15178 # "ja" as "Japanese" or "Japanese_Japan.932",
15179 # and similar.
15180 mingw*)
15181 # Note that on native Windows, the Japanese locale is
15182 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
15183 # cannot use it here.
15184 gt_cv_locale_ja=none
15185 ;;
15186 *)
15187 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
15188 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
15189 # configure script would override the LC_ALL setting. Likewise for
15190 # LC_CTYPE, which is also set at the beginning of the configure script.
15191 # Test for the AIX locale name.
15192 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15193 gt_cv_locale_ja=ja_JP
15194 else
15195 # Test for the locale name with explicit encoding suffix.
15196 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15197 gt_cv_locale_ja=ja_JP.EUC-JP
15198 else
15199 # Test for the HP-UX, OSF/1, NetBSD locale name.
15200 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15201 gt_cv_locale_ja=ja_JP.eucJP
15202 else
15203 # Test for the IRIX, FreeBSD locale name.
15204 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15205 gt_cv_locale_ja=ja_JP.EUC
15206 else
15207 # Test for the Solaris 7 locale name.
15208 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15209 gt_cv_locale_ja=ja
15210 else
15211 # Special test for NetBSD 1.6.
15212 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
15213 gt_cv_locale_ja=ja_JP.eucJP
15214 else
15215 # None found.
15216 gt_cv_locale_ja=none
15217 fi
15218 fi
15219 fi
15220 fi
15221 fi
15222 fi
15223 ;;
15224 esac
15225 fi
15226 rm -fr conftest*
15227
15228 fi
15229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
15230 $as_echo "$gt_cv_locale_ja" >&6; }
15231 LOCALE_JA=$gt_cv_locale_ja
15232
15233
15234
15235
15236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
15237 $as_echo_n "checking for a french Unicode locale... " >&6; }
15238 if ${gt_cv_locale_fr_utf8+:} false; then :
15239 $as_echo_n "(cached) " >&6
15240 else
15241
15242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15243 /* end confdefs.h. */
15244
15245 #include <locale.h>
15246 #include <time.h>
15247 #if HAVE_LANGINFO_CODESET
15248 # include <langinfo.h>
15249 #endif
15250 #include <stdlib.h>
15251 #include <string.h>
15252 struct tm t;
15253 char buf[16];
15254 int main () {
15255 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
15256 imitates locale dependent behaviour by looking at the environment
15257 variables, and all locales use the UTF-8 encoding. */
15258 #if !(defined __BEOS__ || defined __HAIKU__)
15259 /* Check whether the given locale name is recognized by the system. */
15260 # if defined _WIN32 && !defined __CYGWIN__
15261 /* On native Windows, setlocale(category, "") looks at the system settings,
15262 not at the environment variables. Also, when an encoding suffix such
15263 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
15264 category of the locale to "C". */
15265 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
15266 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
15267 return 1;
15268 # else
15269 if (setlocale (LC_ALL, "") == NULL) return 1;
15270 # endif
15271 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
15272 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
15273 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
15274 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
15275 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
15276 some unit tests fail. */
15277 # if HAVE_LANGINFO_CODESET
15278 {
15279 const char *cs = nl_langinfo (CODESET);
15280 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
15281 return 1;
15282 }
15283 # endif
15284 # ifdef __CYGWIN__
15285 /* On Cygwin, avoid locale names without encoding suffix, because the
15286 locale_charset() function relies on the encoding suffix. Note that
15287 LC_ALL is set on the command line. */
15288 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
15289 # endif
15290 /* Check whether in the abbreviation of the second month, the second
15291 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
15292 two bytes long, with UTF-8 encoding. */
15293 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
15294 if (strftime (buf, sizeof (buf), "%b", &t) < 4
15295 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
15296 return 1;
15297 #endif
15298 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
15299 /* Check whether the decimal separator is a comma.
15300 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
15301 are nl_langinfo(RADIXCHAR) are both ".". */
15302 if (localeconv () ->decimal_point[0] != ',') return 1;
15303 #endif
15304 return 0;
15305 }
15306
15307 _ACEOF
15308 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
15309 (eval $ac_link) 2>&5
15310 ac_status=$?
15311 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15312 test $ac_status = 0; } && test -s conftest$ac_exeext; then
15313 case "$host_os" in
15314 # Handle native Windows specially, because there setlocale() interprets
15315 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
15316 # "fr" or "fra" as "French" or "French_France.1252",
15317 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
15318 # "ja" as "Japanese" or "Japanese_Japan.932",
15319 # and similar.
15320 mingw*)
15321 # Test for the hypothetical native Windows locale name.
15322 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15323 gt_cv_locale_fr_utf8=French_France.65001
15324 else
15325 # None found.
15326 gt_cv_locale_fr_utf8=none
15327 fi
15328 ;;
15329 *)
15330 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
15331 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
15332 # configure script would override the LC_ALL setting. Likewise for
15333 # LC_CTYPE, which is also set at the beginning of the configure script.
15334 # Test for the usual locale name.
15335 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15336 gt_cv_locale_fr_utf8=fr_FR
15337 else
15338 # Test for the locale name with explicit encoding suffix.
15339 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15340 gt_cv_locale_fr_utf8=fr_FR.UTF-8
15341 else
15342 # Test for the Solaris 7 locale name.
15343 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15344 gt_cv_locale_fr_utf8=fr.UTF-8
15345 else
15346 # None found.
15347 gt_cv_locale_fr_utf8=none
15348 fi
15349 fi
15350 fi
15351 ;;
15352 esac
15353 fi
15354 rm -fr conftest*
15355
15356 fi
15357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
15358 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
15359 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
15360
15361
15362
15363
15364
15365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
15366 $as_echo_n "checking for a transitional chinese locale... " >&6; }
15367 if ${gt_cv_locale_zh_CN+:} false; then :
15368 $as_echo_n "(cached) " >&6
15369 else
15370
15371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15372 /* end confdefs.h. */
15373
15374 #include <locale.h>
15375 #include <stdlib.h>
15376 #include <time.h>
15377 #if HAVE_LANGINFO_CODESET
15378 # include <langinfo.h>
15379 #endif
15380 #include <stdlib.h>
15381 #include <string.h>
15382 struct tm t;
15383 char buf[16];
15384 int main ()
15385 {
15386 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
15387 imitates locale dependent behaviour by looking at the environment
15388 variables, and all locales use the UTF-8 encoding. */
15389 #if defined __BEOS__ || defined __HAIKU__
15390 return 1;
15391 #else
15392 /* Check whether the given locale name is recognized by the system. */
15393 # if defined _WIN32 && !defined __CYGWIN__
15394 /* On native Windows, setlocale(category, "") looks at the system settings,
15395 not at the environment variables. Also, when an encoding suffix such
15396 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
15397 category of the locale to "C". */
15398 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
15399 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
15400 return 1;
15401 # else
15402 if (setlocale (LC_ALL, "") == NULL) return 1;
15403 # endif
15404 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
15405 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
15406 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
15407 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
15408 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
15409 some unit tests fail.
15410 On MirBSD 10, when an unsupported locale is specified, setlocale()
15411 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
15412 # if HAVE_LANGINFO_CODESET
15413 {
15414 const char *cs = nl_langinfo (CODESET);
15415 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
15416 || strcmp (cs, "UTF-8") == 0)
15417 return 1;
15418 }
15419 # endif
15420 # ifdef __CYGWIN__
15421 /* On Cygwin, avoid locale names without encoding suffix, because the
15422 locale_charset() function relies on the encoding suffix. Note that
15423 LC_ALL is set on the command line. */
15424 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
15425 # endif
15426 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
15427 This excludes the UTF-8 encoding (except on MirBSD). */
15428 {
15429 const char *p;
15430 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
15431 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
15432 for (p = buf; *p != '\0'; p++)
15433 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
15434 return 1;
15435 }
15436 /* Check whether a typical GB18030 multibyte sequence is recognized as a
15437 single wide character. This excludes the GB2312 and GBK encodings. */
15438 if (mblen ("\203\062\332\066", 5) != 4)
15439 return 1;
15440 return 0;
15441 #endif
15442 }
15443
15444 _ACEOF
15445 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
15446 (eval $ac_link) 2>&5
15447 ac_status=$?
15448 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15449 test $ac_status = 0; } && test -s conftest$ac_exeext; then
15450 case "$host_os" in
15451 # Handle native Windows specially, because there setlocale() interprets
15452 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
15453 # "fr" or "fra" as "French" or "French_France.1252",
15454 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
15455 # "ja" as "Japanese" or "Japanese_Japan.932",
15456 # and similar.
15457 mingw*)
15458 # Test for the hypothetical native Windows locale name.
15459 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15460 gt_cv_locale_zh_CN=Chinese_China.54936
15461 else
15462 # None found.
15463 gt_cv_locale_zh_CN=none
15464 fi
15465 ;;
15466 solaris2.8)
15467 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
15468 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
15469 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
15470 gt_cv_locale_zh_CN=none
15471 ;;
15472 *)
15473 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
15474 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
15475 # configure script would override the LC_ALL setting. Likewise for
15476 # LC_CTYPE, which is also set at the beginning of the configure script.
15477 # Test for the locale name without encoding suffix.
15478 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15479 gt_cv_locale_zh_CN=zh_CN
15480 else
15481 # Test for the locale name with explicit encoding suffix.
15482 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15483 gt_cv_locale_zh_CN=zh_CN.GB18030
15484 else
15485 # None found.
15486 gt_cv_locale_zh_CN=none
15487 fi
15488 fi
15489 ;;
15490 esac
15491 else
15492 # If there was a link error, due to mblen(), the system is so old that
15493 # it certainly doesn't have a chinese locale.
15494 gt_cv_locale_zh_CN=none
15495 fi
15496 rm -fr conftest*
15497
15498 fi
15499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
15500 $as_echo "$gt_cv_locale_zh_CN" >&6; }
15501 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
15502
15503
15504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
15505 $as_echo_n "checking for inline... " >&6; }
15506 if ${ac_cv_c_inline+:} false; then :
15507 $as_echo_n "(cached) " >&6
15508 else
15509 ac_cv_c_inline=no
15510 for ac_kw in inline __inline__ __inline; do
15511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15512 /* end confdefs.h. */
15513 #ifndef __cplusplus
15514 typedef int foo_t;
15515 static $ac_kw foo_t static_foo () {return 0; }
15516 $ac_kw foo_t foo () {return 0; }
15517 #endif
15518
15519 _ACEOF
15520 if ac_fn_c_try_compile "$LINENO"; then :
15521 ac_cv_c_inline=$ac_kw
15522 fi
15523 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15524 test "$ac_cv_c_inline" != no && break
15525 done
15526
15527 fi
15528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
15529 $as_echo "$ac_cv_c_inline" >&6; }
15530
15531 case $ac_cv_c_inline in
15532 inline | yes) ;;
15533 *)
15534 case $ac_cv_c_inline in
15535 no) ac_val=;;
15536 *) ac_val=$ac_cv_c_inline;;
15537 esac
15538 cat >>confdefs.h <<_ACEOF
15539 #ifndef __cplusplus
15540 #define inline $ac_val
15541 #endif
15542 _ACEOF
15543 ;;
15544 esac
15545
15546
15547
15548
15549
15550
15551 GNULIB_EXPLICIT_BZERO=0;
15552 GNULIB_FFSL=0;
15553 GNULIB_FFSLL=0;
15554 GNULIB_MEMCHR=0;
15555 GNULIB_MEMMEM=0;
15556 GNULIB_MEMPCPY=0;
15557 GNULIB_MEMRCHR=0;
15558 GNULIB_RAWMEMCHR=0;
15559 GNULIB_STPCPY=0;
15560 GNULIB_STPNCPY=0;
15561 GNULIB_STRCHRNUL=0;
15562 GNULIB_STRDUP=0;
15563 GNULIB_STRNCAT=0;
15564 GNULIB_STRNDUP=0;
15565 GNULIB_STRNLEN=0;
15566 GNULIB_STRPBRK=0;
15567 GNULIB_STRSEP=0;
15568 GNULIB_STRSTR=0;
15569 GNULIB_STRCASESTR=0;
15570 GNULIB_STRTOK_R=0;
15571 GNULIB_MBSLEN=0;
15572 GNULIB_MBSNLEN=0;
15573 GNULIB_MBSCHR=0;
15574 GNULIB_MBSRCHR=0;
15575 GNULIB_MBSSTR=0;
15576 GNULIB_MBSCASECMP=0;
15577 GNULIB_MBSNCASECMP=0;
15578 GNULIB_MBSPCASECMP=0;
15579 GNULIB_MBSCASESTR=0;
15580 GNULIB_MBSCSPN=0;
15581 GNULIB_MBSPBRK=0;
15582 GNULIB_MBSSPN=0;
15583 GNULIB_MBSSEP=0;
15584 GNULIB_MBSTOK_R=0;
15585 GNULIB_STRERROR=0;
15586 GNULIB_STRERROR_R=0;
15587 GNULIB_STRERRORNAME_NP=0;
15588 GNULIB_SIGABBREV_NP=0;
15589 GNULIB_SIGDESCR_NP=0;
15590 GNULIB_STRSIGNAL=0;
15591 GNULIB_STRVERSCMP=0;
15592 HAVE_MBSLEN=0;
15593 GNULIB_MDA_MEMCCPY=1;
15594 GNULIB_MDA_STRDUP=1;
15595 HAVE_EXPLICIT_BZERO=1;
15596 HAVE_FFSL=1;
15597 HAVE_FFSLL=1;
15598 HAVE_DECL_MEMMEM=1;
15599 HAVE_MEMPCPY=1;
15600 HAVE_DECL_MEMRCHR=1;
15601 HAVE_RAWMEMCHR=1;
15602 HAVE_STPCPY=1;
15603 HAVE_STPNCPY=1;
15604 HAVE_STRCHRNUL=1;
15605 HAVE_DECL_STRDUP=1;
15606 HAVE_DECL_STRNDUP=1;
15607 HAVE_DECL_STRNLEN=1;
15608 HAVE_STRPBRK=1;
15609 HAVE_STRSEP=1;
15610 HAVE_STRCASESTR=1;
15611 HAVE_DECL_STRTOK_R=1;
15612 HAVE_DECL_STRERROR_R=1;
15613 HAVE_STRERRORNAME_NP=1;
15614 HAVE_SIGABBREV_NP=1;
15615 HAVE_SIGDESCR_NP=1;
15616 HAVE_DECL_STRSIGNAL=1;
15617 HAVE_STRVERSCMP=1;
15618 REPLACE_FFSLL=0;
15619 REPLACE_MEMCHR=0;
15620 REPLACE_MEMMEM=0;
15621 REPLACE_STPNCPY=0;
15622 REPLACE_STRCHRNUL=0;
15623 REPLACE_STRDUP=0;
15624 REPLACE_STRNCAT=0;
15625 REPLACE_STRNDUP=0;
15626 REPLACE_STRNLEN=0;
15627 REPLACE_STRSTR=0;
15628 REPLACE_STRCASESTR=0;
15629 REPLACE_STRTOK_R=0;
15630 REPLACE_STRERROR=0;
15631 REPLACE_STRERROR_R=0;
15632 REPLACE_STRERRORNAME_NP=0;
15633 REPLACE_STRSIGNAL=0;
15634 UNDEFINE_STRTOK_R=0;
15635
15636
15637
15638
15639
15640
15641 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
15642 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
15643 # irrelevant for anonymous mappings.
15644 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
15645 if test "x$ac_cv_func_mmap" = xyes; then :
15646 gl_have_mmap=yes
15647 else
15648 gl_have_mmap=no
15649 fi
15650
15651
15652 # Try to allow MAP_ANONYMOUS.
15653 gl_have_mmap_anonymous=no
15654 if test $gl_have_mmap = yes; then
15655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
15656 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
15657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15658 /* end confdefs.h. */
15659
15660 #include <sys/mman.h>
15661 #ifdef MAP_ANONYMOUS
15662 I cannot identify this map
15663 #endif
15664
15665 _ACEOF
15666 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15667 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
15668 gl_have_mmap_anonymous=yes
15669 fi
15670 rm -f conftest*
15671
15672 if test $gl_have_mmap_anonymous != yes; then
15673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15674 /* end confdefs.h. */
15675
15676 #include <sys/mman.h>
15677 #ifdef MAP_ANON
15678 I cannot identify this map
15679 #endif
15680
15681 _ACEOF
15682 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15683 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
15684
15685 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
15686
15687 gl_have_mmap_anonymous=yes
15688 fi
15689 rm -f conftest*
15690
15691 fi
15692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
15693 $as_echo "$gl_have_mmap_anonymous" >&6; }
15694 if test $gl_have_mmap_anonymous = yes; then
15695
15696 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
15697
15698 fi
15699 fi
15700
15701
15702
15703
15704
15705 # Detect platform-specific bugs in some versions of glibc:
15706 # memchr should not dereference anything with length 0
15707 # https://bugzilla.redhat.com/show_bug.cgi?id=499689
15708 # memchr should not dereference overestimated length after a match
15709 # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
15710 # https://sourceware.org/bugzilla/show_bug.cgi?id=10162
15711 # memchr should cast the second argument to 'unsigned char'.
15712 # This bug exists in Android 4.3.
15713 # Assume that memchr works on platforms that lack mprotect.
15714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
15715 $as_echo_n "checking whether memchr works... " >&6; }
15716 if ${gl_cv_func_memchr_works+:} false; then :
15717 $as_echo_n "(cached) " >&6
15718 else
15719 if test "$cross_compiling" = yes; then :
15720 case "$host_os" in
15721 # Guess no on Android.
15722 linux*-android*) gl_cv_func_memchr_works="guessing no" ;;
15723 # Guess yes on native Windows.
15724 mingw*) gl_cv_func_memchr_works="guessing yes" ;;
15725 # If we don't know, obey --enable-cross-guesses.
15726 *) gl_cv_func_memchr_works="$gl_cross_guess_normal" ;;
15727 esac
15728
15729 else
15730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15731 /* end confdefs.h. */
15732
15733 #include <string.h>
15734 #if HAVE_SYS_MMAN_H
15735 # include <fcntl.h>
15736 # include <unistd.h>
15737 # include <sys/types.h>
15738 # include <sys/mman.h>
15739 # ifndef MAP_FILE
15740 # define MAP_FILE 0
15741 # endif
15742 #endif
15743
15744 int
15745 main ()
15746 {
15747
15748 int result = 0;
15749 char *fence = NULL;
15750 #if HAVE_SYS_MMAN_H && HAVE_MPROTECT
15751 # if HAVE_MAP_ANONYMOUS
15752 const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
15753 const int fd = -1;
15754 # else /* !HAVE_MAP_ANONYMOUS */
15755 const int flags = MAP_FILE | MAP_PRIVATE;
15756 int fd = open ("/dev/zero", O_RDONLY, 0666);
15757 if (fd >= 0)
15758 # endif
15759 {
15760 int pagesize = getpagesize ();
15761 char *two_pages =
15762 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
15763 flags, fd, 0);
15764 if (two_pages != (char *)(-1)
15765 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
15766 fence = two_pages + pagesize;
15767 }
15768 #endif
15769 if (fence)
15770 {
15771 /* Test against bugs on glibc systems. */
15772 if (memchr (fence, 0, 0))
15773 result |= 1;
15774 strcpy (fence - 9, "12345678");
15775 if (memchr (fence - 9, 0, 79) != fence - 1)
15776 result |= 2;
15777 if (memchr (fence - 1, 0, 3) != fence - 1)
15778 result |= 4;
15779 /* Test against bug on AIX 7.2. */
15780 if (memchr (fence - 4, '6', 16) != fence - 4)
15781 result |= 8;
15782 }
15783 /* Test against bug on Android 4.3. */
15784 {
15785 char input[3];
15786 input[0] = 'a';
15787 input[1] = 'b';
15788 input[2] = 'c';
15789 if (memchr (input, 0x789abc00 | 'b', 3) != input + 1)
15790 result |= 16;
15791 }
15792 return result;
15793
15794 ;
15795 return 0;
15796 }
15797 _ACEOF
15798 if ac_fn_c_try_run "$LINENO"; then :
15799 gl_cv_func_memchr_works=yes
15800 else
15801 gl_cv_func_memchr_works=no
15802 fi
15803 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15804 conftest.$ac_objext conftest.beam conftest.$ac_ext
15805 fi
15806
15807
15808 fi
15809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
15810 $as_echo "$gl_cv_func_memchr_works" >&6; }
15811 case "$gl_cv_func_memchr_works" in
15812 *yes) ;;
15813 *) REPLACE_MEMCHR=1 ;;
15814 esac
15815
15816 ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default"
15817 if test "x$ac_cv_have_decl_memmem" = xyes; then :
15818 ac_have_decl=1
15819 else
15820 ac_have_decl=0
15821 fi
15822
15823 cat >>confdefs.h <<_ACEOF
15824 #define HAVE_DECL_MEMMEM $ac_have_decl
15825 _ACEOF
15826
15827
15828
15829
15830
15831 for ac_func in memmem
15832 do :
15833 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
15834 if test "x$ac_cv_func_memmem" = xyes; then :
15835 cat >>confdefs.h <<_ACEOF
15836 #define HAVE_MEMMEM 1
15837 _ACEOF
15838
15839 fi
15840 done
15841
15842 if test $ac_cv_func_memmem = yes; then
15843 HAVE_MEMMEM=1
15844 else
15845 HAVE_MEMMEM=0
15846 fi
15847
15848 if test $ac_cv_have_decl_memmem = no; then
15849 HAVE_DECL_MEMMEM=0
15850 else
15851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
15852 $as_echo_n "checking whether memmem works... " >&6; }
15853 if ${gl_cv_func_memmem_works_always+:} false; then :
15854 $as_echo_n "(cached) " >&6
15855 else
15856 if test "$cross_compiling" = yes; then :
15857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15858 /* end confdefs.h. */
15859
15860 #ifdef __GNU_LIBRARY__
15861 #include <features.h>
15862 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
15863 || __GLIBC_MINOR__ > 12)) \
15864 || (__GLIBC__ > 2)) \
15865 || defined __UCLIBC__
15866 Lucky user
15867 #endif
15868 #elif defined __CYGWIN__
15869 #include <cygwin/version.h>
15870 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
15871 Lucky user
15872 #endif
15873 #else
15874 Lucky user
15875 #endif
15876
15877 _ACEOF
15878 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15879 $EGREP "Lucky user" >/dev/null 2>&1; then :
15880 gl_cv_func_memmem_works_always="guessing yes"
15881 else
15882 gl_cv_func_memmem_works_always="$gl_cross_guess_normal"
15883 fi
15884 rm -f conftest*
15885
15886
15887 else
15888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15889 /* end confdefs.h. */
15890
15891 #include <string.h> /* for memmem */
15892 #define P "_EF_BF_BD"
15893 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
15894 #define NEEDLE P P P P P
15895
15896 int
15897 main ()
15898 {
15899
15900 int result = 0;
15901 if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
15902 result |= 1;
15903 /* Check for empty needle behavior. */
15904 {
15905 const char *haystack = "AAA";
15906 if (memmem (haystack, 3, (const char *) 1, 0) != haystack)
15907 result |= 2;
15908 }
15909 return result;
15910
15911 ;
15912 return 0;
15913 }
15914 _ACEOF
15915 if ac_fn_c_try_run "$LINENO"; then :
15916 gl_cv_func_memmem_works_always=yes
15917 else
15918 gl_cv_func_memmem_works_always=no
15919 fi
15920 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15921 conftest.$ac_objext conftest.beam conftest.$ac_ext
15922 fi
15923
15924
15925 fi
15926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
15927 $as_echo "$gl_cv_func_memmem_works_always" >&6; }
15928 case "$gl_cv_func_memmem_works_always" in
15929 *yes) ;;
15930 *)
15931 REPLACE_MEMMEM=1
15932 ;;
15933 esac
15934 fi
15935 :
15936
15937 ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
15938 if test "x$ac_cv_have_decl_memrchr" = xyes; then :
15939 ac_have_decl=1
15940 else
15941 ac_have_decl=0
15942 fi
15943
15944 cat >>confdefs.h <<_ACEOF
15945 #define HAVE_DECL_MEMRCHR $ac_have_decl
15946 _ACEOF
15947
15948
15949
15950
15951
15952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <limits.h> defines MIN and MAX" >&5
15953 $as_echo_n "checking whether <limits.h> defines MIN and MAX... " >&6; }
15954 if ${gl_cv_minmax_in_limits_h+:} false; then :
15955 $as_echo_n "(cached) " >&6
15956 else
15957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15958 /* end confdefs.h. */
15959 #include <limits.h>
15960 int x = MIN (42, 17);
15961 int
15962 main ()
15963 {
15964
15965 ;
15966 return 0;
15967 }
15968 _ACEOF
15969 if ac_fn_c_try_compile "$LINENO"; then :
15970 gl_cv_minmax_in_limits_h=yes
15971 else
15972 gl_cv_minmax_in_limits_h=no
15973 fi
15974 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15975 fi
15976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_limits_h" >&5
15977 $as_echo "$gl_cv_minmax_in_limits_h" >&6; }
15978 if test $gl_cv_minmax_in_limits_h = yes; then
15979
15980 $as_echo "#define HAVE_MINMAX_IN_LIMITS_H 1" >>confdefs.h
15981
15982 fi
15983
15984
15985
15986
15987
15988
15989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/param.h> defines MIN and MAX" >&5
15990 $as_echo_n "checking whether <sys/param.h> defines MIN and MAX... " >&6; }
15991 if ${gl_cv_minmax_in_sys_param_h+:} false; then :
15992 $as_echo_n "(cached) " >&6
15993 else
15994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15995 /* end confdefs.h. */
15996 #include <sys/param.h>
15997 int x = MIN (42, 17);
15998 int
15999 main ()
16000 {
16001
16002 ;
16003 return 0;
16004 }
16005 _ACEOF
16006 if ac_fn_c_try_compile "$LINENO"; then :
16007 gl_cv_minmax_in_sys_param_h=yes
16008 else
16009 gl_cv_minmax_in_sys_param_h=no
16010 fi
16011 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16012 fi
16013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_sys_param_h" >&5
16014 $as_echo "$gl_cv_minmax_in_sys_param_h" >&6; }
16015 if test $gl_cv_minmax_in_sys_param_h = yes; then
16016
16017 $as_echo "#define HAVE_MINMAX_IN_SYS_PARAM_H 1" >>confdefs.h
16018
16019 fi
16020
16021
16022
16023
16024
16025
16026
16027
16028
16029
16030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for O_CLOEXEC" >&5
16031 $as_echo_n "checking for O_CLOEXEC... " >&6; }
16032 if ${gl_cv_macro_O_CLOEXEC+:} false; then :
16033 $as_echo_n "(cached) " >&6
16034 else
16035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16036 /* end confdefs.h. */
16037 #include <fcntl.h>
16038 #ifndef O_CLOEXEC
16039 choke me;
16040 #endif
16041
16042 int
16043 main ()
16044 {
16045 return O_CLOEXEC;
16046 ;
16047 return 0;
16048 }
16049 _ACEOF
16050 if ac_fn_c_try_compile "$LINENO"; then :
16051 gl_cv_macro_O_CLOEXEC=yes
16052 else
16053 gl_cv_macro_O_CLOEXEC=no
16054 fi
16055 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16056 fi
16057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_macro_O_CLOEXEC" >&5
16058 $as_echo "$gl_cv_macro_O_CLOEXEC" >&6; }
16059
16060
16061
16062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
16063 $as_echo_n "checking for promoted mode_t type... " >&6; }
16064 if ${gl_cv_promoted_mode_t+:} false; then :
16065 $as_echo_n "(cached) " >&6
16066 else
16067
16068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16069 /* end confdefs.h. */
16070 #include <sys/types.h>
16071 int
16072 main ()
16073 {
16074 typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
16075 ;
16076 return 0;
16077 }
16078 _ACEOF
16079 if ac_fn_c_try_compile "$LINENO"; then :
16080 gl_cv_promoted_mode_t='int'
16081 else
16082 gl_cv_promoted_mode_t='mode_t'
16083 fi
16084 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16085
16086 fi
16087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
16088 $as_echo "$gl_cv_promoted_mode_t" >&6; }
16089
16090 cat >>confdefs.h <<_ACEOF
16091 #define PROMOTED_MODE_T $gl_cv_promoted_mode_t
16092 _ACEOF
16093
16094
16095
16096
16097
16098
16099
16100
16101
16102
16103 ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default"
16104 if test "x$ac_cv_have_decl_setenv" = xyes; then :
16105 ac_have_decl=1
16106 else
16107 ac_have_decl=0
16108 fi
16109
16110 cat >>confdefs.h <<_ACEOF
16111 #define HAVE_DECL_SETENV $ac_have_decl
16112 _ACEOF
16113
16114
16115
16116
16117
16118
16119 if test $ac_cv_have_decl_setenv = no; then
16120 HAVE_DECL_SETENV=0
16121 fi
16122
16123
16124
16125
16126
16127 for ac_header in search.h
16128 do :
16129 ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
16130 if test "x$ac_cv_header_search_h" = xyes; then :
16131 cat >>confdefs.h <<_ACEOF
16132 #define HAVE_SEARCH_H 1
16133 _ACEOF
16134
16135 fi
16136
16137 done
16138
16139 for ac_func in tsearch
16140 do :
16141 ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
16142 if test "x$ac_cv_func_tsearch" = xyes; then :
16143 cat >>confdefs.h <<_ACEOF
16144 #define HAVE_TSEARCH 1
16145 _ACEOF
16146
16147 fi
16148 done
16149
16150
16151
16152
16153 GNULIB_PTHREAD_SIGMASK=0;
16154 GNULIB_RAISE=0;
16155 GNULIB_SIGNAL_H_SIGPIPE=0;
16156 GNULIB_SIGPROCMASK=0;
16157 GNULIB_SIGACTION=0;
16158 HAVE_POSIX_SIGNALBLOCKING=1;
16159 HAVE_PTHREAD_SIGMASK=1;
16160 HAVE_RAISE=1;
16161 HAVE_SIGSET_T=1;
16162 HAVE_SIGINFO_T=1;
16163 HAVE_SIGACTION=1;
16164 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
16165
16166 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
16167
16168 HAVE_SIGHANDLER_T=1;
16169 REPLACE_PTHREAD_SIGMASK=0;
16170 REPLACE_RAISE=0;
16171
16172
16173 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
16174 #include <signal.h>
16175 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
16176 #include <sys/types.h>
16177
16178 "
16179 if test "x$ac_cv_type_sigset_t" = xyes; then :
16180
16181 cat >>confdefs.h <<_ACEOF
16182 #define HAVE_SIGSET_T 1
16183 _ACEOF
16184
16185 gl_cv_type_sigset_t=yes
16186 else
16187 gl_cv_type_sigset_t=no
16188 fi
16189
16190 if test $gl_cv_type_sigset_t != yes; then
16191 HAVE_SIGSET_T=0
16192 fi
16193
16194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
16195 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
16196 if ${ac_cv_type_uid_t+:} false; then :
16197 $as_echo_n "(cached) " >&6
16198 else
16199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16200 /* end confdefs.h. */
16201 #include <sys/types.h>
16202
16203 _ACEOF
16204 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16205 $EGREP "uid_t" >/dev/null 2>&1; then :
16206 ac_cv_type_uid_t=yes
16207 else
16208 ac_cv_type_uid_t=no
16209 fi
16210 rm -f conftest*
16211
16212 fi
16213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
16214 $as_echo "$ac_cv_type_uid_t" >&6; }
16215 if test $ac_cv_type_uid_t = no; then
16216
16217 $as_echo "#define uid_t int" >>confdefs.h
16218
16219
16220 $as_echo "#define gid_t int" >>confdefs.h
16221
16222 fi
16223
16224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
16225 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
16226 if ${ac_cv_header_stdbool_h+:} false; then :
16227 $as_echo_n "(cached) " >&6
16228 else
16229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16230 /* end confdefs.h. */
16231
16232 #include <stdbool.h>
16233
16234 #ifdef __cplusplus
16235 typedef bool Bool;
16236 #else
16237 typedef _Bool Bool;
16238 #ifndef bool
16239 "error: bool is not defined"
16240 #endif
16241 #ifndef false
16242 "error: false is not defined"
16243 #endif
16244 #if false
16245 "error: false is not 0"
16246 #endif
16247 #ifndef true
16248 "error: true is not defined"
16249 #endif
16250 #if true != 1
16251 "error: true is not 1"
16252 #endif
16253 #endif
16254
16255 #ifndef __bool_true_false_are_defined
16256 "error: __bool_true_false_are_defined is not defined"
16257 #endif
16258
16259 struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
16260
16261 char a[true == 1 ? 1 : -1];
16262 char b[false == 0 ? 1 : -1];
16263 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
16264 char d[(bool) 0.5 == true ? 1 : -1];
16265 /* See body of main program for 'e'. */
16266 char f[(Bool) 0.0 == false ? 1 : -1];
16267 char g[true];
16268 char h[sizeof (Bool)];
16269 char i[sizeof s.t];
16270 enum { j = false, k = true, l = false * true, m = true * 256 };
16271 /* The following fails for
16272 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
16273 Bool n[m];
16274 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
16275 char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
16276 /* Catch a bug in an HP-UX C compiler. See
16277 https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
16278 https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html
16279 */
16280 Bool q = true;
16281 Bool *pq = &q;
16282 bool *qq = &q;
16283
16284 int
16285 main ()
16286 {
16287
16288 bool e = &s;
16289 *pq |= q; *pq |= ! q;
16290 *qq |= q; *qq |= ! q;
16291 /* Refer to every declared value, to avoid compiler optimizations. */
16292 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
16293 + !m + !n + !o + !p + !q + !pq + !qq);
16294
16295 ;
16296 return 0;
16297 }
16298 _ACEOF
16299 if ac_fn_c_try_compile "$LINENO"; then :
16300 ac_cv_header_stdbool_h=yes
16301 else
16302 ac_cv_header_stdbool_h=no
16303 fi
16304 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16305 fi
16306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
16307 $as_echo "$ac_cv_header_stdbool_h" >&6; }
16308 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
16309 if test "x$ac_cv_type__Bool" = xyes; then :
16310
16311 cat >>confdefs.h <<_ACEOF
16312 #define HAVE__BOOL 1
16313 _ACEOF
16314
16315
16316 fi
16317
16318
16319 ac_fn_c_check_decl "$LINENO" "fcloseall" "ac_cv_have_decl_fcloseall" "$ac_includes_default"
16320 if test "x$ac_cv_have_decl_fcloseall" = xyes; then :
16321 ac_have_decl=1
16322 else
16323 ac_have_decl=0
16324 fi
16325
16326 cat >>confdefs.h <<_ACEOF
16327 #define HAVE_DECL_FCLOSEALL $ac_have_decl
16328 _ACEOF
16329
16330 ac_fn_c_check_decl "$LINENO" "ecvt" "ac_cv_have_decl_ecvt" "$ac_includes_default"
16331 if test "x$ac_cv_have_decl_ecvt" = xyes; then :
16332 ac_have_decl=1
16333 else
16334 ac_have_decl=0
16335 fi
16336
16337 cat >>confdefs.h <<_ACEOF
16338 #define HAVE_DECL_ECVT $ac_have_decl
16339 _ACEOF
16340
16341 ac_fn_c_check_decl "$LINENO" "fcvt" "ac_cv_have_decl_fcvt" "$ac_includes_default"
16342 if test "x$ac_cv_have_decl_fcvt" = xyes; then :
16343 ac_have_decl=1
16344 else
16345 ac_have_decl=0
16346 fi
16347
16348 cat >>confdefs.h <<_ACEOF
16349 #define HAVE_DECL_FCVT $ac_have_decl
16350 _ACEOF
16351
16352 ac_fn_c_check_decl "$LINENO" "gcvt" "ac_cv_have_decl_gcvt" "$ac_includes_default"
16353 if test "x$ac_cv_have_decl_gcvt" = xyes; then :
16354 ac_have_decl=1
16355 else
16356 ac_have_decl=0
16357 fi
16358
16359 cat >>confdefs.h <<_ACEOF
16360 #define HAVE_DECL_GCVT $ac_have_decl
16361 _ACEOF
16362
16363 ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
16364 if test "x$ac_cv_have_decl_strdup" = xyes; then :
16365 ac_have_decl=1
16366 else
16367 ac_have_decl=0
16368 fi
16369
16370 cat >>confdefs.h <<_ACEOF
16371 #define HAVE_DECL_STRDUP $ac_have_decl
16372 _ACEOF
16373
16374
16375 REPLACE_STRERROR_0=0
16376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
16377 $as_echo_n "checking whether strerror(0) succeeds... " >&6; }
16378 if ${gl_cv_func_strerror_0_works+:} false; then :
16379 $as_echo_n "(cached) " >&6
16380 else
16381 if test "$cross_compiling" = yes; then :
16382 case "$host_os" in
16383 # Guess yes on glibc systems.
16384 *-gnu* | gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
16385 # Guess yes on musl systems.
16386 *-musl*) gl_cv_func_strerror_0_works="guessing yes" ;;
16387 # Guess yes on native Windows.
16388 mingw*) gl_cv_func_strerror_0_works="guessing yes" ;;
16389 # If we don't know, obey --enable-cross-guesses.
16390 *) gl_cv_func_strerror_0_works="$gl_cross_guess_normal" ;;
16391 esac
16392
16393 else
16394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16395 /* end confdefs.h. */
16396 #include <string.h>
16397 #include <errno.h>
16398
16399 int
16400 main ()
16401 {
16402 int result = 0;
16403 char *str;
16404 errno = 0;
16405 str = strerror (0);
16406 if (!*str) result |= 1;
16407 if (errno) result |= 2;
16408 if (strstr (str, "nknown") || strstr (str, "ndefined"))
16409 result |= 4;
16410 return result;
16411 ;
16412 return 0;
16413 }
16414 _ACEOF
16415 if ac_fn_c_try_run "$LINENO"; then :
16416 gl_cv_func_strerror_0_works=yes
16417 else
16418 gl_cv_func_strerror_0_works=no
16419 fi
16420 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16421 conftest.$ac_objext conftest.beam conftest.$ac_ext
16422 fi
16423
16424
16425 fi
16426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
16427 $as_echo "$gl_cv_func_strerror_0_works" >&6; }
16428 case "$gl_cv_func_strerror_0_works" in
16429 *yes) ;;
16430 *)
16431 REPLACE_STRERROR_0=1
16432
16433 $as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h
16434
16435 ;;
16436 esac
16437
16438
16439
16440
16441
16442
16443
16444
16445
16446
16447 if test $ac_cv_func_strerror_r = yes; then
16448 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
16449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strerror_r with POSIX signature" >&5
16450 $as_echo_n "checking for strerror_r with POSIX signature... " >&6; }
16451 if ${gl_cv_func_strerror_r_posix_signature+:} false; then :
16452 $as_echo_n "(cached) " >&6
16453 else
16454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16455 /* end confdefs.h. */
16456 #include <string.h>
16457 int strerror_r (int, char *, size_t);
16458
16459 int
16460 main ()
16461 {
16462
16463 ;
16464 return 0;
16465 }
16466 _ACEOF
16467 if ac_fn_c_try_compile "$LINENO"; then :
16468 gl_cv_func_strerror_r_posix_signature=yes
16469 else
16470 gl_cv_func_strerror_r_posix_signature=no
16471 fi
16472 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16473
16474 fi
16475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_posix_signature" >&5
16476 $as_echo "$gl_cv_func_strerror_r_posix_signature" >&6; }
16477 if test $gl_cv_func_strerror_r_posix_signature = yes; then
16478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r works" >&5
16479 $as_echo_n "checking whether strerror_r works... " >&6; }
16480 if ${gl_cv_func_strerror_r_works+:} false; then :
16481 $as_echo_n "(cached) " >&6
16482 else
16483 if test "$cross_compiling" = yes; then :
16484
16485 case "$host_os" in
16486 # Guess no on AIX.
16487 aix*) gl_cv_func_strerror_r_works="guessing no";;
16488 # Guess no on HP-UX.
16489 hpux*) gl_cv_func_strerror_r_works="guessing no";;
16490 # Guess no on BSD variants.
16491 *bsd*) gl_cv_func_strerror_r_works="guessing no";;
16492 # Guess yes otherwise.
16493 *) gl_cv_func_strerror_r_works="guessing yes";;
16494 esac
16495
16496 else
16497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16498 /* end confdefs.h. */
16499 #include <errno.h>
16500 #include <string.h>
16501
16502 int
16503 main ()
16504 {
16505 int result = 0;
16506 char buf[79];
16507 if (strerror_r (EACCES, buf, 0) < 0)
16508 result |= 1;
16509 errno = 0;
16510 if (strerror_r (EACCES, buf, sizeof buf) != 0)
16511 result |= 2;
16512 strcpy (buf, "Unknown");
16513 if (strerror_r (0, buf, sizeof buf) != 0)
16514 result |= 4;
16515 if (errno)
16516 result |= 8;
16517 if (strstr (buf, "nknown") || strstr (buf, "ndefined"))
16518 result |= 0x10;
16519 errno = 0;
16520 *buf = 0;
16521 if (strerror_r (-3, buf, sizeof buf) < 0)
16522 result |= 0x20;
16523 if (errno)
16524 result |= 0x40;
16525 if (!*buf)
16526 result |= 0x80;
16527 return result;
16528
16529 ;
16530 return 0;
16531 }
16532 _ACEOF
16533 if ac_fn_c_try_run "$LINENO"; then :
16534 gl_cv_func_strerror_r_works=yes
16535 else
16536 gl_cv_func_strerror_r_works=no
16537 fi
16538 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16539 conftest.$ac_objext conftest.beam conftest.$ac_ext
16540 fi
16541
16542
16543 fi
16544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
16545 $as_echo "$gl_cv_func_strerror_r_works" >&6; }
16546 else
16547
16548 if test $ac_cv_func___xpg_strerror_r = yes; then
16549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __xpg_strerror_r works" >&5
16550 $as_echo_n "checking whether __xpg_strerror_r works... " >&6; }
16551 if ${gl_cv_func_strerror_r_works+:} false; then :
16552 $as_echo_n "(cached) " >&6
16553 else
16554 if test "$cross_compiling" = yes; then :
16555 gl_cv_func_strerror_r_works="$gl_cross_guess_normal"
16556
16557 else
16558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16559 /* end confdefs.h. */
16560 #include <errno.h>
16561 #include <string.h>
16562 extern
16563 #ifdef __cplusplus
16564 "C"
16565 #endif
16566 int __xpg_strerror_r(int, char *, size_t);
16567
16568 int
16569 main ()
16570 {
16571 int result = 0;
16572 char buf[256] = "^";
16573 char copy[256];
16574 char *str = strerror (-1);
16575 strcpy (copy, str);
16576 if (__xpg_strerror_r (-2, buf, 1) == 0)
16577 result |= 1;
16578 if (*buf)
16579 result |= 2;
16580 __xpg_strerror_r (-2, buf, 256);
16581 if (strcmp (str, copy))
16582 result |= 4;
16583 return result;
16584
16585 ;
16586 return 0;
16587 }
16588 _ACEOF
16589 if ac_fn_c_try_run "$LINENO"; then :
16590 gl_cv_func_strerror_r_works=yes
16591 else
16592 gl_cv_func_strerror_r_works=no
16593 fi
16594 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16595 conftest.$ac_objext conftest.beam conftest.$ac_ext
16596 fi
16597
16598
16599 fi
16600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
16601 $as_echo "$gl_cv_func_strerror_r_works" >&6; }
16602 fi
16603 fi
16604 fi
16605 fi
16606
16607 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
16608 if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
16609 ac_have_decl=1
16610 else
16611 ac_have_decl=0
16612 fi
16613
16614 cat >>confdefs.h <<_ACEOF
16615 #define HAVE_DECL_STRERROR_R $ac_have_decl
16616 _ACEOF
16617
16618
16619
16620
16621
16622
16623
16624
16625
16626
16627
16628
16629
16630
16631
16632 if test $gl_cv_have_include_next = yes; then
16633 gl_cv_next_string_h='<'string.h'>'
16634 else
16635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
16636 $as_echo_n "checking absolute name of <string.h>... " >&6; }
16637 if ${gl_cv_next_string_h+:} false; then :
16638 $as_echo_n "(cached) " >&6
16639 else
16640
16641
16642
16643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16644 /* end confdefs.h. */
16645 #include <string.h>
16646 _ACEOF
16647 case "$host_os" in
16648 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16649 *) gl_absname_cpp="$ac_cpp" ;;
16650 esac
16651
16652 case "$host_os" in
16653 mingw*)
16654 gl_dirsep_regex='[/\\]'
16655 ;;
16656 *)
16657 gl_dirsep_regex='\/'
16658 ;;
16659 esac
16660 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16661 gl_header_literal_regex=`echo 'string.h' \
16662 | sed -e "$gl_make_literal_regex_sed"`
16663 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16664 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16665 s|^/[^/]|//&|
16666 p
16667 q
16668 }'
16669
16670 gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16671 sed -n "$gl_absolute_header_sed"`
16672
16673 gl_header=$gl_cv_absolute_string_h
16674 gl_cv_next_string_h='"'$gl_header'"'
16675
16676
16677 fi
16678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
16679 $as_echo "$gl_cv_next_string_h" >&6; }
16680 fi
16681 NEXT_STRING_H=$gl_cv_next_string_h
16682
16683 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16684 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16685 gl_next_as_first_directive='<'string.h'>'
16686 else
16687 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
16688 gl_next_as_first_directive=$gl_cv_next_string_h
16689 fi
16690 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
16691
16692
16693
16694
16695
16696
16697
16698
16699
16700
16701
16702 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
16703 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
16704 ac_have_decl=1
16705 else
16706 ac_have_decl=0
16707 fi
16708
16709 cat >>confdefs.h <<_ACEOF
16710 #define HAVE_DECL_STRNLEN $ac_have_decl
16711 _ACEOF
16712
16713
16714
16715
16716 if test $REPLACE_MEMCHR = 1; then
16717 REPLACE_STRSTR=1
16718 else
16719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
16720 $as_echo_n "checking whether strstr works... " >&6; }
16721 if ${gl_cv_func_strstr_works_always+:} false; then :
16722 $as_echo_n "(cached) " >&6
16723 else
16724 if test "$cross_compiling" = yes; then :
16725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16726 /* end confdefs.h. */
16727
16728 #ifdef __GNU_LIBRARY__
16729 #include <features.h>
16730 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
16731 || defined __UCLIBC__
16732 Lucky user
16733 #endif
16734 #elif defined __CYGWIN__
16735 #include <cygwin/version.h>
16736 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
16737 Lucky user
16738 #endif
16739 #else
16740 Lucky user
16741 #endif
16742
16743 _ACEOF
16744 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16745 $EGREP "Lucky user" >/dev/null 2>&1; then :
16746 gl_cv_func_strstr_works_always="guessing yes"
16747 else
16748 gl_cv_func_strstr_works_always="$gl_cross_guess_normal"
16749 fi
16750 rm -f conftest*
16751
16752
16753 else
16754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16755 /* end confdefs.h. */
16756
16757 #include <string.h> /* for strstr */
16758 #ifdef __GNU_LIBRARY__
16759 #include <features.h>
16760 #if __GLIBC__ == 2 && __GLIBC_MINOR__ == 28
16761 Unlucky user
16762 #endif
16763 #endif
16764 #define P "_EF_BF_BD"
16765 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
16766 #define NEEDLE P P P P P
16767
16768 int
16769 main ()
16770 {
16771 return !!strstr (HAYSTACK, NEEDLE);
16772
16773 ;
16774 return 0;
16775 }
16776 _ACEOF
16777 if ac_fn_c_try_run "$LINENO"; then :
16778 gl_cv_func_strstr_works_always=yes
16779 else
16780 gl_cv_func_strstr_works_always=no
16781 fi
16782 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16783 conftest.$ac_objext conftest.beam conftest.$ac_ext
16784 fi
16785
16786
16787 fi
16788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
16789 $as_echo "$gl_cv_func_strstr_works_always" >&6; }
16790 case "$gl_cv_func_strstr_works_always" in
16791 *yes) ;;
16792 *)
16793 REPLACE_STRSTR=1
16794 ;;
16795 esac
16796 fi
16797
16798 ac_fn_c_check_decl "$LINENO" "strtok_r" "ac_cv_have_decl_strtok_r" "$ac_includes_default"
16799 if test "x$ac_cv_have_decl_strtok_r" = xyes; then :
16800 ac_have_decl=1
16801 else
16802 ac_have_decl=0
16803 fi
16804
16805 cat >>confdefs.h <<_ACEOF
16806 #define HAVE_DECL_STRTOK_R $ac_have_decl
16807 _ACEOF
16808
16809
16810
16811
16812
16813
16814
16815
16816
16817
16818
16819
16820
16821 $as_echo "#define _USE_STD_STAT 1" >>confdefs.h
16822
16823
16824
16825
16826
16827
16828
16829
16830
16831
16832
16833 if test $gl_cv_have_include_next = yes; then
16834 gl_cv_next_sys_types_h='<'sys/types.h'>'
16835 else
16836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
16837 $as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
16838 if ${gl_cv_next_sys_types_h+:} false; then :
16839 $as_echo_n "(cached) " >&6
16840 else
16841
16842
16843
16844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16845 /* end confdefs.h. */
16846 #include <sys/types.h>
16847 _ACEOF
16848 case "$host_os" in
16849 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16850 *) gl_absname_cpp="$ac_cpp" ;;
16851 esac
16852
16853 case "$host_os" in
16854 mingw*)
16855 gl_dirsep_regex='[/\\]'
16856 ;;
16857 *)
16858 gl_dirsep_regex='\/'
16859 ;;
16860 esac
16861 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16862 gl_header_literal_regex=`echo 'sys/types.h' \
16863 | sed -e "$gl_make_literal_regex_sed"`
16864 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16865 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16866 s|^/[^/]|//&|
16867 p
16868 q
16869 }'
16870
16871 gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16872 sed -n "$gl_absolute_header_sed"`
16873
16874 gl_header=$gl_cv_absolute_sys_types_h
16875 gl_cv_next_sys_types_h='"'$gl_header'"'
16876
16877
16878 fi
16879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
16880 $as_echo "$gl_cv_next_sys_types_h" >&6; }
16881 fi
16882 NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
16883
16884 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16885 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16886 gl_next_as_first_directive='<'sys/types.h'>'
16887 else
16888 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
16889 gl_next_as_first_directive=$gl_cv_next_sys_types_h
16890 fi
16891 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
16892
16893
16894
16895
16896
16897
16898
16899
16900
16901
16902
16903
16904 WINDOWS_STAT_INODES=0
16905
16906
16907
16908
16909
16910
16911
16912
16913 GNULIB_CTIME=0;
16914 GNULIB_MKTIME=0;
16915 GNULIB_LOCALTIME=0;
16916 GNULIB_NANOSLEEP=0;
16917 GNULIB_STRFTIME=0;
16918 GNULIB_STRPTIME=0;
16919 GNULIB_TIMEGM=0;
16920 GNULIB_TIMESPEC_GET=0;
16921 GNULIB_TIME_R=0;
16922 GNULIB_TIME_RZ=0;
16923 GNULIB_TZSET=0;
16924 GNULIB_MDA_TZSET=1;
16925 HAVE_DECL_LOCALTIME_R=1;
16926 HAVE_NANOSLEEP=1;
16927 HAVE_STRPTIME=1;
16928 HAVE_TIMEGM=1;
16929 HAVE_TIMESPEC_GET=1;
16930 HAVE_TIMEZONE_T=0;
16931 REPLACE_CTIME=GNULIB_PORTCHECK;
16932 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
16933 REPLACE_MKTIME=GNULIB_PORTCHECK;
16934 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
16935 REPLACE_STRFTIME=GNULIB_PORTCHECK;
16936 REPLACE_TIMEGM=GNULIB_PORTCHECK;
16937 REPLACE_TZSET=GNULIB_PORTCHECK;
16938
16939 : ${GNULIB_GETTIMEOFDAY=0};
16940 REPLACE_GMTIME=0;
16941 REPLACE_LOCALTIME=0;
16942
16943
16944
16945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
16946 $as_echo_n "checking for struct timespec in <time.h>... " >&6; }
16947 if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then :
16948 $as_echo_n "(cached) " >&6
16949 else
16950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16951 /* end confdefs.h. */
16952 #include <time.h>
16953
16954 int
16955 main ()
16956 {
16957 static struct timespec x; x.tv_sec = x.tv_nsec;
16958 ;
16959 return 0;
16960 }
16961 _ACEOF
16962 if ac_fn_c_try_compile "$LINENO"; then :
16963 gl_cv_sys_struct_timespec_in_time_h=yes
16964 else
16965 gl_cv_sys_struct_timespec_in_time_h=no
16966 fi
16967 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16968 fi
16969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
16970 $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
16971
16972 TIME_H_DEFINES_STRUCT_TIMESPEC=0
16973 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
16974 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
16975 UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
16976 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
16977 TIME_H_DEFINES_STRUCT_TIMESPEC=1
16978 else
16979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
16980 $as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
16981 if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then :
16982 $as_echo_n "(cached) " >&6
16983 else
16984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16985 /* end confdefs.h. */
16986 #include <sys/time.h>
16987
16988 int
16989 main ()
16990 {
16991 static struct timespec x; x.tv_sec = x.tv_nsec;
16992 ;
16993 return 0;
16994 }
16995 _ACEOF
16996 if ac_fn_c_try_compile "$LINENO"; then :
16997 gl_cv_sys_struct_timespec_in_sys_time_h=yes
16998 else
16999 gl_cv_sys_struct_timespec_in_sys_time_h=no
17000 fi
17001 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17002 fi
17003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
17004 $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
17005 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
17006 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
17007 else
17008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
17009 $as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
17010 if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then :
17011 $as_echo_n "(cached) " >&6
17012 else
17013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17014 /* end confdefs.h. */
17015 #include <pthread.h>
17016
17017 int
17018 main ()
17019 {
17020 static struct timespec x; x.tv_sec = x.tv_nsec;
17021 ;
17022 return 0;
17023 }
17024 _ACEOF
17025 if ac_fn_c_try_compile "$LINENO"; then :
17026 gl_cv_sys_struct_timespec_in_pthread_h=yes
17027 else
17028 gl_cv_sys_struct_timespec_in_pthread_h=no
17029 fi
17030 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17031 fi
17032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
17033 $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
17034 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
17035 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
17036 else
17037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
17038 $as_echo_n "checking for struct timespec in <unistd.h>... " >&6; }
17039 if ${gl_cv_sys_struct_timespec_in_unistd_h+:} false; then :
17040 $as_echo_n "(cached) " >&6
17041 else
17042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17043 /* end confdefs.h. */
17044 #include <unistd.h>
17045
17046 int
17047 main ()
17048 {
17049 static struct timespec x; x.tv_sec = x.tv_nsec;
17050 ;
17051 return 0;
17052 }
17053 _ACEOF
17054 if ac_fn_c_try_compile "$LINENO"; then :
17055 gl_cv_sys_struct_timespec_in_unistd_h=yes
17056 else
17057 gl_cv_sys_struct_timespec_in_unistd_h=no
17058 fi
17059 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17060 fi
17061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5
17062 $as_echo "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
17063 if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
17064 UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
17065 fi
17066 fi
17067 fi
17068 fi
17069
17070
17071
17072
17073
17074
17075
17076
17077
17078
17079
17080
17081
17082
17083
17084
17085 if test $gl_cv_have_include_next = yes; then
17086 gl_cv_next_time_h='<'time.h'>'
17087 else
17088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
17089 $as_echo_n "checking absolute name of <time.h>... " >&6; }
17090 if ${gl_cv_next_time_h+:} false; then :
17091 $as_echo_n "(cached) " >&6
17092 else
17093
17094
17095
17096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17097 /* end confdefs.h. */
17098 #include <time.h>
17099 _ACEOF
17100 case "$host_os" in
17101 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17102 *) gl_absname_cpp="$ac_cpp" ;;
17103 esac
17104
17105 case "$host_os" in
17106 mingw*)
17107 gl_dirsep_regex='[/\\]'
17108 ;;
17109 *)
17110 gl_dirsep_regex='\/'
17111 ;;
17112 esac
17113 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17114 gl_header_literal_regex=`echo 'time.h' \
17115 | sed -e "$gl_make_literal_regex_sed"`
17116 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17117 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17118 s|^/[^/]|//&|
17119 p
17120 q
17121 }'
17122
17123 gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17124 sed -n "$gl_absolute_header_sed"`
17125
17126 gl_header=$gl_cv_absolute_time_h
17127 gl_cv_next_time_h='"'$gl_header'"'
17128
17129
17130 fi
17131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
17132 $as_echo "$gl_cv_next_time_h" >&6; }
17133 fi
17134 NEXT_TIME_H=$gl_cv_next_time_h
17135
17136 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17137 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17138 gl_next_as_first_directive='<'time.h'>'
17139 else
17140 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17141 gl_next_as_first_directive=$gl_cv_next_time_h
17142 fi
17143 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
17144
17145
17146
17147
17148
17149
17150
17151
17152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME_UTC in <time.h>" >&5
17153 $as_echo_n "checking for TIME_UTC in <time.h>... " >&6; }
17154 if ${gl_cv_time_h_has_TIME_UTC+:} false; then :
17155 $as_echo_n "(cached) " >&6
17156 else
17157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17158 /* end confdefs.h. */
17159 #include <time.h>
17160
17161 int
17162 main ()
17163 {
17164 static int x = TIME_UTC; x++;
17165 ;
17166 return 0;
17167 }
17168 _ACEOF
17169 if ac_fn_c_try_compile "$LINENO"; then :
17170 gl_cv_time_h_has_TIME_UTC=yes
17171 else
17172 gl_cv_time_h_has_TIME_UTC=no
17173 fi
17174 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17175 fi
17176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_h_has_TIME_UTC" >&5
17177 $as_echo "$gl_cv_time_h_has_TIME_UTC" >&6; }
17178 if test $gl_cv_time_h_has_TIME_UTC = yes; then
17179 TIME_H_DEFINES_TIME_UTC=1
17180 else
17181 TIME_H_DEFINES_TIME_UTC=0
17182 fi
17183
17184
17185
17186
17187 ac_fn_c_check_decl "$LINENO" "execvpe" "ac_cv_have_decl_execvpe" "$ac_includes_default"
17188 if test "x$ac_cv_have_decl_execvpe" = xyes; then :
17189 ac_have_decl=1
17190 else
17191 ac_have_decl=0
17192 fi
17193
17194 cat >>confdefs.h <<_ACEOF
17195 #define HAVE_DECL_EXECVPE $ac_have_decl
17196 _ACEOF
17197
17198 ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
17199 if test "x$ac_cv_have_decl_unsetenv" = xyes; then :
17200 ac_have_decl=1
17201 else
17202 ac_have_decl=0
17203 fi
17204
17205 cat >>confdefs.h <<_ACEOF
17206 #define HAVE_DECL_UNSETENV $ac_have_decl
17207 _ACEOF
17208
17209
17210
17211
17212
17213 if test $ac_cv_header_crtdefs_h = yes; then
17214 HAVE_CRTDEFS_H=1
17215 else
17216 HAVE_CRTDEFS_H=0
17217 fi
17218
17219
17220
17221 GNULIB_ISWBLANK=0;
17222 GNULIB_ISWDIGIT=0;
17223 GNULIB_ISWXDIGIT=0;
17224 GNULIB_WCTYPE=0;
17225 GNULIB_ISWCTYPE=0;
17226 GNULIB_WCTRANS=0;
17227 GNULIB_TOWCTRANS=0;
17228 HAVE_ISWBLANK=1;
17229 HAVE_WCTYPE_T=1;
17230 HAVE_WCTRANS_T=1;
17231 REPLACE_ISWBLANK=0;
17232 REPLACE_ISWDIGIT=0;
17233 REPLACE_ISWXDIGIT=0;
17234
17235
17236
17237
17238
17239
17240
17241
17242 if false; then
17243 GL_COND_LIBTOOL_TRUE=
17244 GL_COND_LIBTOOL_FALSE='#'
17245 else
17246 GL_COND_LIBTOOL_TRUE='#'
17247 GL_COND_LIBTOOL_FALSE=
17248 fi
17249
17250 gl_cond_libtool=false
17251 gl_libdeps=
17252 gl_ltlibdeps=
17253 gl_m4_base='import/m4'
17254
17255
17256
17257
17258
17259
17260
17261
17262
17263
17264 gl_source_base='import'
17265
17266
17267 if test $ac_cv_func_alloca_works = no; then
17268 :
17269 fi
17270
17271 # Define an additional variable used in the Makefile substitution.
17272 if test $ac_cv_working_alloca_h = yes; then
17273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
17274 $as_echo_n "checking for alloca as a compiler built-in... " >&6; }
17275 if ${gl_cv_rpl_alloca+:} false; then :
17276 $as_echo_n "(cached) " >&6
17277 else
17278
17279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17280 /* end confdefs.h. */
17281
17282 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
17283 Need own alloca
17284 #endif
17285
17286 _ACEOF
17287 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17288 $EGREP "Need own alloca" >/dev/null 2>&1; then :
17289 gl_cv_rpl_alloca=yes
17290 else
17291 gl_cv_rpl_alloca=no
17292 fi
17293 rm -f conftest*
17294
17295
17296 fi
17297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
17298 $as_echo "$gl_cv_rpl_alloca" >&6; }
17299 if test $gl_cv_rpl_alloca = yes; then
17300
17301 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
17302
17303 ALLOCA_H=alloca.h
17304 else
17305 ALLOCA_H=
17306 fi
17307 else
17308 ALLOCA_H=alloca.h
17309 fi
17310
17311 if test -n "$ALLOCA_H"; then
17312 GL_GENERATE_ALLOCA_H_TRUE=
17313 GL_GENERATE_ALLOCA_H_FALSE='#'
17314 else
17315 GL_GENERATE_ALLOCA_H_TRUE='#'
17316 GL_GENERATE_ALLOCA_H_FALSE=
17317 fi
17318
17319
17320 if test $ac_cv_working_alloca_h = yes; then
17321 HAVE_ALLOCA_H=1
17322 else
17323 HAVE_ALLOCA_H=0
17324 fi
17325
17326
17327
17328
17329
17330
17331 if test $ac_cv_header_arpa_inet_h = yes; then
17332 HAVE_ARPA_INET_H=1
17333 else
17334 HAVE_ARPA_INET_H=0
17335 fi
17336
17337
17338
17339
17340
17341
17342
17343
17344
17345
17346 if test $gl_cv_have_include_next = yes; then
17347 gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
17348 else
17349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <arpa/inet.h>" >&5
17350 $as_echo_n "checking absolute name of <arpa/inet.h>... " >&6; }
17351 if ${gl_cv_next_arpa_inet_h+:} false; then :
17352 $as_echo_n "(cached) " >&6
17353 else
17354
17355 if test $ac_cv_header_arpa_inet_h = yes; then
17356
17357
17358
17359
17360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17361 /* end confdefs.h. */
17362 #include <arpa/inet.h>
17363 _ACEOF
17364 case "$host_os" in
17365 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17366 *) gl_absname_cpp="$ac_cpp" ;;
17367 esac
17368
17369 case "$host_os" in
17370 mingw*)
17371 gl_dirsep_regex='[/\\]'
17372 ;;
17373 *)
17374 gl_dirsep_regex='\/'
17375 ;;
17376 esac
17377 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17378 gl_header_literal_regex=`echo 'arpa/inet.h' \
17379 | sed -e "$gl_make_literal_regex_sed"`
17380 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17381 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17382 s|^/[^/]|//&|
17383 p
17384 q
17385 }'
17386
17387 gl_cv_absolute_arpa_inet_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17388 sed -n "$gl_absolute_header_sed"`
17389
17390 gl_header=$gl_cv_absolute_arpa_inet_h
17391 gl_cv_next_arpa_inet_h='"'$gl_header'"'
17392 else
17393 gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
17394 fi
17395
17396
17397 fi
17398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_arpa_inet_h" >&5
17399 $as_echo "$gl_cv_next_arpa_inet_h" >&6; }
17400 fi
17401 NEXT_ARPA_INET_H=$gl_cv_next_arpa_inet_h
17402
17403 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17404 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17405 gl_next_as_first_directive='<'arpa/inet.h'>'
17406 else
17407 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17408 gl_next_as_first_directive=$gl_cv_next_arpa_inet_h
17409 fi
17410 NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H=$gl_next_as_first_directive
17411
17412
17413
17414
17415
17416
17417
17418
17419
17420 if test $ac_cv_header_sys_socket_h = yes; then
17421 HAVE_WS2TCPIP_H=0
17422 else
17423 if test $ac_cv_header_ws2tcpip_h = yes; then
17424 HAVE_WS2TCPIP_H=1
17425 else
17426 HAVE_WS2TCPIP_H=0
17427 fi
17428 fi
17429
17430
17431
17432
17433
17434
17435
17436
17437
17438
17439
17440
17441
17442
17443
17444 if test $ac_cv_func_btowc = no; then
17445 HAVE_BTOWC=0
17446 else
17447
17448
17449
17450
17451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(0) is correct" >&5
17452 $as_echo_n "checking whether btowc(0) is correct... " >&6; }
17453 if ${gl_cv_func_btowc_nul+:} false; then :
17454 $as_echo_n "(cached) " >&6
17455 else
17456
17457 if test "$cross_compiling" = yes; then :
17458
17459 case "$host_os" in
17460 # Guess no on Cygwin.
17461 cygwin*) gl_cv_func_btowc_nul="guessing no" ;;
17462 # Guess yes on native Windows.
17463 mingw*) gl_cv_func_btowc_nul="guessing yes" ;;
17464 # Guess yes otherwise.
17465 *) gl_cv_func_btowc_nul="guessing yes" ;;
17466 esac
17467
17468 else
17469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17470 /* end confdefs.h. */
17471
17472 #include <wchar.h>
17473 int main ()
17474 {
17475 if (btowc ('\0') != 0)
17476 return 1;
17477 return 0;
17478 }
17479 _ACEOF
17480 if ac_fn_c_try_run "$LINENO"; then :
17481 gl_cv_func_btowc_nul=yes
17482 else
17483 gl_cv_func_btowc_nul=no
17484 fi
17485 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17486 conftest.$ac_objext conftest.beam conftest.$ac_ext
17487 fi
17488
17489
17490 fi
17491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_nul" >&5
17492 $as_echo "$gl_cv_func_btowc_nul" >&6; }
17493
17494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(EOF) is correct" >&5
17495 $as_echo_n "checking whether btowc(EOF) is correct... " >&6; }
17496 if ${gl_cv_func_btowc_eof+:} false; then :
17497 $as_echo_n "(cached) " >&6
17498 else
17499
17500 case "$host_os" in
17501 # Guess no on IRIX.
17502 irix*) gl_cv_func_btowc_eof="guessing no" ;;
17503 # Guess yes on native Windows.
17504 mingw*) gl_cv_func_btowc_eof="guessing yes" ;;
17505 # Guess yes otherwise.
17506 *) gl_cv_func_btowc_eof="guessing yes" ;;
17507 esac
17508 if test $LOCALE_FR != none; then
17509 if test "$cross_compiling" = yes; then :
17510 :
17511 else
17512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17513 /* end confdefs.h. */
17514
17515 #include <locale.h>
17516 #include <stdio.h>
17517 #include <wchar.h>
17518 int main ()
17519 {
17520 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
17521 {
17522 if (btowc (EOF) != WEOF)
17523 return 1;
17524 }
17525 return 0;
17526 }
17527 _ACEOF
17528 if ac_fn_c_try_run "$LINENO"; then :
17529 gl_cv_func_btowc_eof=yes
17530 else
17531 gl_cv_func_btowc_eof=no
17532 fi
17533 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17534 conftest.$ac_objext conftest.beam conftest.$ac_ext
17535 fi
17536
17537 fi
17538
17539 fi
17540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5
17541 $as_echo "$gl_cv_func_btowc_eof" >&6; }
17542
17543 case "$gl_cv_func_btowc_nul" in
17544 *yes) ;;
17545 *) REPLACE_BTOWC=1 ;;
17546 esac
17547 case "$gl_cv_func_btowc_eof" in
17548 *yes) ;;
17549 *) REPLACE_BTOWC=1 ;;
17550 esac
17551 fi
17552
17553 if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
17554
17555
17556
17557
17558
17559
17560
17561
17562 gl_LIBOBJS="$gl_LIBOBJS btowc.$ac_objext"
17563
17564
17565 :
17566
17567 fi
17568
17569
17570
17571
17572
17573 GNULIB_BTOWC=1
17574
17575
17576
17577
17578
17579 $as_echo "#define GNULIB_TEST_BTOWC 1" >>confdefs.h
17580
17581
17582
17583
17584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_expect" >&5
17585 $as_echo_n "checking for __builtin_expect... " >&6; }
17586 if ${gl_cv___builtin_expect+:} false; then :
17587 $as_echo_n "(cached) " >&6
17588 else
17589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17590 /* end confdefs.h. */
17591
17592 int
17593 main (int argc, char **argv)
17594 {
17595 argc = __builtin_expect (argc, 100);
17596 return argv[argc != 100][0];
17597 }
17598 _ACEOF
17599 if ac_fn_c_try_link "$LINENO"; then :
17600 gl_cv___builtin_expect=yes
17601 else
17602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17603 /* end confdefs.h. */
17604
17605 #include <builtins.h>
17606 int
17607 main (int argc, char **argv)
17608 {
17609 argc = __builtin_expect (argc, 100);
17610 return argv[argc != 100][0];
17611 }
17612 _ACEOF
17613 if ac_fn_c_try_link "$LINENO"; then :
17614 gl_cv___builtin_expect="in <builtins.h>"
17615 else
17616 gl_cv___builtin_expect=no
17617 fi
17618 rm -f core conftest.err conftest.$ac_objext \
17619 conftest$ac_exeext conftest.$ac_ext
17620 fi
17621 rm -f core conftest.err conftest.$ac_objext \
17622 conftest$ac_exeext conftest.$ac_ext
17623 fi
17624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv___builtin_expect" >&5
17625 $as_echo "$gl_cv___builtin_expect" >&6; }
17626 if test "$gl_cv___builtin_expect" = yes; then
17627 $as_echo "#define HAVE___BUILTIN_EXPECT 1" >>confdefs.h
17628
17629 elif test "$gl_cv___builtin_expect" = "in <builtins.h>"; then
17630 $as_echo "#define HAVE___BUILTIN_EXPECT 2" >>confdefs.h
17631
17632 fi
17633
17634
17635
17636
17637
17638 if test $ac_cv_func_canonicalize_file_name = no; then
17639 HAVE_CANONICALIZE_FILE_NAME=0
17640 if test $ac_cv_func_realpath = no; then
17641 HAVE_REALPATH=0
17642 else
17643 case "$gl_cv_func_realpath_works" in
17644 *yes) ;;
17645 *) REPLACE_REALPATH=1 ;;
17646 esac
17647 fi
17648 else
17649 case "$gl_cv_func_realpath_works" in
17650 *yes)
17651 ;;
17652 *)
17653 REPLACE_CANONICALIZE_FILE_NAME=1
17654 REPLACE_REALPATH=1
17655 ;;
17656 esac
17657 fi
17658
17659 if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
17660
17661
17662
17663
17664
17665
17666
17667
17668 gl_LIBOBJS="$gl_LIBOBJS canonicalize-lgpl.$ac_objext"
17669
17670 fi
17671
17672
17673 cat >>confdefs.h <<_ACEOF
17674 #define GNULIB_CANONICALIZE_LGPL 1
17675 _ACEOF
17676
17677
17678
17679
17680
17681
17682
17683 GNULIB_CANONICALIZE_FILE_NAME=1
17684
17685
17686
17687
17688
17689 $as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
17690
17691
17692
17693
17694
17695
17696
17697
17698 GNULIB_REALPATH=1
17699
17700
17701
17702
17703
17704 $as_echo "#define GNULIB_TEST_REALPATH 1" >>confdefs.h
17705
17706
17707
17708
17709
17710
17711
17712
17713 GNULIB_CHDIR=1
17714
17715
17716
17717
17718
17719 $as_echo "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
17720
17721
17722
17723
17724
17725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this system supports file names of any length" >&5
17726 $as_echo_n "checking whether this system supports file names of any length... " >&6; }
17727 if ${gl_cv_have_unlimited_file_name_length+:} false; then :
17728 $as_echo_n "(cached) " >&6
17729 else
17730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17731 /* end confdefs.h. */
17732
17733 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
17734 #if HAVE_UNISTD_H
17735 # include <unistd.h>
17736 #endif
17737 #include <limits.h>
17738 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
17739 # include <sys/param.h>
17740 #endif
17741 #if !defined PATH_MAX && defined MAXPATHLEN
17742 # define PATH_MAX MAXPATHLEN
17743 #endif
17744 #ifdef __hpux
17745 # undef PATH_MAX
17746 # define PATH_MAX 1024
17747 #endif
17748 #if defined _WIN32 && ! defined __CYGWIN__
17749 # undef PATH_MAX
17750 # define PATH_MAX 260
17751 #endif
17752
17753 #ifdef PATH_MAX
17754 have_arbitrary_file_name_length_limit
17755 #endif
17756 _ACEOF
17757 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17758 $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1; then :
17759 gl_cv_have_unlimited_file_name_length=no
17760 else
17761 gl_cv_have_unlimited_file_name_length=yes
17762 fi
17763 rm -f conftest*
17764
17765 fi
17766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_unlimited_file_name_length" >&5
17767 $as_echo "$gl_cv_have_unlimited_file_name_length" >&6; }
17768
17769 if test $gl_cv_have_unlimited_file_name_length = no; then
17770
17771
17772
17773
17774
17775
17776
17777
17778 gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext"
17779
17780 :
17781 fi
17782
17783
17784
17785 # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
17786 # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
17787
17788 # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all*
17789 # programs in the package would end up linked with that potentially-shared
17790 # library, inducing unnecessary run-time overhead.
17791 LIB_CLOCK_GETTIME=
17792
17793 gl_saved_libs=$LIBS
17794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
17795 $as_echo_n "checking for library containing clock_gettime... " >&6; }
17796 if ${ac_cv_search_clock_gettime+:} false; then :
17797 $as_echo_n "(cached) " >&6
17798 else
17799 ac_func_search_save_LIBS=$LIBS
17800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17801 /* end confdefs.h. */
17802
17803 /* Override any GCC internal prototype to avoid an error.
17804 Use char because int might match the return type of a GCC
17805 builtin and then its argument prototype would still apply. */
17806 #ifdef __cplusplus
17807 extern "C"
17808 #endif
17809 char clock_gettime ();
17810 int
17811 main ()
17812 {
17813 return clock_gettime ();
17814 ;
17815 return 0;
17816 }
17817 _ACEOF
17818 for ac_lib in '' rt posix4; do
17819 if test -z "$ac_lib"; then
17820 ac_res="none required"
17821 else
17822 ac_res=-l$ac_lib
17823 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17824 fi
17825 if ac_fn_c_try_link "$LINENO"; then :
17826 ac_cv_search_clock_gettime=$ac_res
17827 fi
17828 rm -f core conftest.err conftest.$ac_objext \
17829 conftest$ac_exeext
17830 if ${ac_cv_search_clock_gettime+:} false; then :
17831 break
17832 fi
17833 done
17834 if ${ac_cv_search_clock_gettime+:} false; then :
17835
17836 else
17837 ac_cv_search_clock_gettime=no
17838 fi
17839 rm conftest.$ac_ext
17840 LIBS=$ac_func_search_save_LIBS
17841 fi
17842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
17843 $as_echo "$ac_cv_search_clock_gettime" >&6; }
17844 ac_res=$ac_cv_search_clock_gettime
17845 if test "$ac_res" != no; then :
17846 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17847 test "$ac_cv_search_clock_gettime" = "none required" ||
17848 LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
17849 fi
17850
17851 for ac_func in clock_gettime clock_settime
17852 do :
17853 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17854 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17855 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17856 cat >>confdefs.h <<_ACEOF
17857 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17858 _ACEOF
17859
17860 fi
17861 done
17862
17863 LIBS=$gl_saved_libs
17864
17865
17866
17867 $as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
17868
17869
17870
17871
17872
17873
17874 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
17875 REPLACE_CLOSE=1
17876 fi
17877
17878
17879
17880
17881
17882
17883 if test $ac_cv_header_sys_socket_h != yes; then
17884 for ac_header in winsock2.h
17885 do :
17886 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
17887 if test "x$ac_cv_header_winsock2_h" = xyes; then :
17888 cat >>confdefs.h <<_ACEOF
17889 #define HAVE_WINSOCK2_H 1
17890 _ACEOF
17891
17892 fi
17893
17894 done
17895
17896 fi
17897 if test "$ac_cv_header_winsock2_h" = yes; then
17898 HAVE_WINSOCK2_H=1
17899 UNISTD_H_HAVE_WINSOCK2_H=1
17900 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
17901 else
17902 HAVE_WINSOCK2_H=0
17903 fi
17904
17905
17906 if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
17907 REPLACE_CLOSE=1
17908 fi
17909
17910
17911 if test $REPLACE_CLOSE = 0; then
17912
17913
17914
17915 if test $ac_cv_func_fchdir = no; then
17916 HAVE_FCHDIR=0
17917 fi
17918
17919 if test $HAVE_FCHDIR = 0; then
17920 REPLACE_CLOSE=1
17921 fi
17922 fi
17923
17924
17925 if test $REPLACE_CLOSE = 1; then
17926
17927
17928
17929
17930
17931
17932
17933
17934 gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
17935
17936 fi
17937
17938
17939
17940
17941
17942 GNULIB_CLOSE=1
17943
17944
17945
17946
17947
17948 $as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
17949
17950
17951
17952
17953
17954
17955 for ac_func in closedir
17956 do :
17957 ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir"
17958 if test "x$ac_cv_func_closedir" = xyes; then :
17959 cat >>confdefs.h <<_ACEOF
17960 #define HAVE_CLOSEDIR 1
17961 _ACEOF
17962
17963 fi
17964 done
17965
17966 if test $ac_cv_func_closedir = no; then
17967 HAVE_CLOSEDIR=0
17968 fi
17969
17970
17971
17972
17973 if test $ac_cv_func_fchdir = no; then
17974 HAVE_FCHDIR=0
17975 fi
17976
17977 if test $HAVE_FCHDIR = 0; then
17978 if test $HAVE_CLOSEDIR = 1; then
17979 REPLACE_CLOSEDIR=1
17980 fi
17981 fi
17982
17983 case $host_os,$HAVE_CLOSEDIR in
17984 os2*,1)
17985 REPLACE_CLOSEDIR=1;;
17986 esac
17987
17988 if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
17989
17990
17991
17992
17993
17994
17995
17996
17997 gl_LIBOBJS="$gl_LIBOBJS closedir.$ac_objext"
17998
17999 fi
18000
18001
18002
18003
18004
18005 GNULIB_CLOSEDIR=1
18006
18007
18008
18009
18010
18011 $as_echo "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
18012
18013
18014
18015
18016
18017
18018
18019
18020
18021
18022
18023
18024
18025
18026 if test $gl_cv_have_include_next = yes; then
18027 gl_cv_next_ctype_h='<'ctype.h'>'
18028 else
18029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <ctype.h>" >&5
18030 $as_echo_n "checking absolute name of <ctype.h>... " >&6; }
18031 if ${gl_cv_next_ctype_h+:} false; then :
18032 $as_echo_n "(cached) " >&6
18033 else
18034
18035
18036
18037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18038 /* end confdefs.h. */
18039 #include <ctype.h>
18040 _ACEOF
18041 case "$host_os" in
18042 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18043 *) gl_absname_cpp="$ac_cpp" ;;
18044 esac
18045
18046 case "$host_os" in
18047 mingw*)
18048 gl_dirsep_regex='[/\\]'
18049 ;;
18050 *)
18051 gl_dirsep_regex='\/'
18052 ;;
18053 esac
18054 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18055 gl_header_literal_regex=`echo 'ctype.h' \
18056 | sed -e "$gl_make_literal_regex_sed"`
18057 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18058 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18059 s|^/[^/]|//&|
18060 p
18061 q
18062 }'
18063
18064 gl_cv_absolute_ctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18065 sed -n "$gl_absolute_header_sed"`
18066
18067 gl_header=$gl_cv_absolute_ctype_h
18068 gl_cv_next_ctype_h='"'$gl_header'"'
18069
18070
18071 fi
18072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_ctype_h" >&5
18073 $as_echo "$gl_cv_next_ctype_h" >&6; }
18074 fi
18075 NEXT_CTYPE_H=$gl_cv_next_ctype_h
18076
18077 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18078 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18079 gl_next_as_first_directive='<'ctype.h'>'
18080 else
18081 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18082 gl_next_as_first_directive=$gl_cv_next_ctype_h
18083 fi
18084 NEXT_AS_FIRST_DIRECTIVE_CTYPE_H=$gl_next_as_first_directive
18085
18086
18087
18088
18089
18090
18091
18092
18093
18094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
18095 $as_echo_n "checking for d_ino member in directory struct... " >&6; }
18096 if ${gl_cv_struct_dirent_d_ino+:} false; then :
18097 $as_echo_n "(cached) " >&6
18098 else
18099 if test "$cross_compiling" = yes; then :
18100 case "$host_os" in
18101 # Guess yes on glibc systems with Linux kernel.
18102 linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
18103 # Guess yes on musl systems with Linux kernel.
18104 linux*-musl*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
18105 # Guess no on native Windows.
18106 mingw*) gl_cv_struct_dirent_d_ino="guessing no" ;;
18107 # If we don't know, obey --enable-cross-guesses.
18108 *) gl_cv_struct_dirent_d_ino="$gl_cross_guess_normal" ;;
18109 esac
18110
18111 else
18112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18113 /* end confdefs.h. */
18114 #include <sys/types.h>
18115 #include <sys/stat.h>
18116 #include <dirent.h>
18117
18118 int
18119 main ()
18120 {
18121 DIR *dp = opendir (".");
18122 struct dirent *e;
18123 struct stat st;
18124 if (! dp)
18125 return 1;
18126 e = readdir (dp);
18127 if (! e)
18128 { closedir (dp); return 2; }
18129 if (lstat (e->d_name, &st) != 0)
18130 { closedir (dp); return 3; }
18131 if (e->d_ino != st.st_ino)
18132 { closedir (dp); return 4; }
18133 closedir (dp);
18134 return 0;
18135
18136 ;
18137 return 0;
18138 }
18139 _ACEOF
18140 if ac_fn_c_try_run "$LINENO"; then :
18141 gl_cv_struct_dirent_d_ino=yes
18142 else
18143 gl_cv_struct_dirent_d_ino=no
18144 fi
18145 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18146 conftest.$ac_objext conftest.beam conftest.$ac_ext
18147 fi
18148
18149 fi
18150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5
18151 $as_echo "$gl_cv_struct_dirent_d_ino" >&6; }
18152 case "$gl_cv_struct_dirent_d_ino" in
18153 *yes)
18154
18155 $as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h
18156
18157 ;;
18158 esac
18159
18160
18161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_type member in directory struct" >&5
18162 $as_echo_n "checking for d_type member in directory struct... " >&6; }
18163 if ${gl_cv_struct_dirent_d_type+:} false; then :
18164 $as_echo_n "(cached) " >&6
18165 else
18166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18167 /* end confdefs.h. */
18168
18169 #include <sys/types.h>
18170 #include <dirent.h>
18171
18172 int
18173 main ()
18174 {
18175 struct dirent dp; dp.d_type = 0;
18176 ;
18177 return 0;
18178 }
18179 _ACEOF
18180 if ac_fn_c_try_link "$LINENO"; then :
18181 gl_cv_struct_dirent_d_type=yes
18182 else
18183 gl_cv_struct_dirent_d_type=no
18184 fi
18185 rm -f core conftest.err conftest.$ac_objext \
18186 conftest$ac_exeext conftest.$ac_ext
18187
18188
18189 fi
18190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_type" >&5
18191 $as_echo "$gl_cv_struct_dirent_d_type" >&6; }
18192 if test $gl_cv_struct_dirent_d_type = yes; then
18193
18194 $as_echo "#define HAVE_STRUCT_DIRENT_D_TYPE 1" >>confdefs.h
18195
18196 fi
18197
18198
18199
18200
18201
18202
18203
18204
18205
18206
18207
18208
18209
18210
18211 if test $gl_cv_have_include_next = yes; then
18212 gl_cv_next_dirent_h='<'dirent.h'>'
18213 else
18214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
18215 $as_echo_n "checking absolute name of <dirent.h>... " >&6; }
18216 if ${gl_cv_next_dirent_h+:} false; then :
18217 $as_echo_n "(cached) " >&6
18218 else
18219
18220 if test $ac_cv_header_dirent_h = yes; then
18221
18222
18223
18224
18225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18226 /* end confdefs.h. */
18227 #include <dirent.h>
18228 _ACEOF
18229 case "$host_os" in
18230 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18231 *) gl_absname_cpp="$ac_cpp" ;;
18232 esac
18233
18234 case "$host_os" in
18235 mingw*)
18236 gl_dirsep_regex='[/\\]'
18237 ;;
18238 *)
18239 gl_dirsep_regex='\/'
18240 ;;
18241 esac
18242 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18243 gl_header_literal_regex=`echo 'dirent.h' \
18244 | sed -e "$gl_make_literal_regex_sed"`
18245 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18246 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18247 s|^/[^/]|//&|
18248 p
18249 q
18250 }'
18251
18252 gl_cv_absolute_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18253 sed -n "$gl_absolute_header_sed"`
18254
18255 gl_header=$gl_cv_absolute_dirent_h
18256 gl_cv_next_dirent_h='"'$gl_header'"'
18257 else
18258 gl_cv_next_dirent_h='<'dirent.h'>'
18259 fi
18260
18261
18262 fi
18263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
18264 $as_echo "$gl_cv_next_dirent_h" >&6; }
18265 fi
18266 NEXT_DIRENT_H=$gl_cv_next_dirent_h
18267
18268 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18269 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18270 gl_next_as_first_directive='<'dirent.h'>'
18271 else
18272 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18273 gl_next_as_first_directive=$gl_cv_next_dirent_h
18274 fi
18275 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
18276
18277
18278
18279
18280 if test $ac_cv_header_dirent_h = yes; then
18281 HAVE_DIRENT_H=1
18282 else
18283 HAVE_DIRENT_H=0
18284 fi
18285
18286
18287
18288
18289
18290
18291
18292
18293
18294
18295
18296 for ac_func in dirfd
18297 do :
18298 ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
18299 if test "x$ac_cv_func_dirfd" = xyes; then :
18300 cat >>confdefs.h <<_ACEOF
18301 #define HAVE_DIRFD 1
18302 _ACEOF
18303
18304 fi
18305 done
18306
18307 ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
18308 #include <dirent.h>
18309 "
18310 if test "x$ac_cv_have_decl_dirfd" = xyes; then :
18311 ac_have_decl=1
18312 else
18313 ac_have_decl=0
18314 fi
18315
18316 cat >>confdefs.h <<_ACEOF
18317 #define HAVE_DECL_DIRFD $ac_have_decl
18318 _ACEOF
18319
18320 if test $ac_cv_have_decl_dirfd = no; then
18321 HAVE_DECL_DIRFD=0
18322 fi
18323
18324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
18325 $as_echo_n "checking whether dirfd is a macro... " >&6; }
18326 if ${gl_cv_func_dirfd_macro+:} false; then :
18327 $as_echo_n "(cached) " >&6
18328 else
18329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18330 /* end confdefs.h. */
18331
18332 #include <sys/types.h>
18333 #include <dirent.h>
18334 #ifdef dirfd
18335 dirent_header_defines_dirfd
18336 #endif
18337 _ACEOF
18338 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18339 $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1; then :
18340 gl_cv_func_dirfd_macro=yes
18341 else
18342 gl_cv_func_dirfd_macro=no
18343 fi
18344 rm -f conftest*
18345
18346 fi
18347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
18348 $as_echo "$gl_cv_func_dirfd_macro" >&6; }
18349
18350 # Use the replacement if we have no function or macro with that name,
18351 # or if OS/2 kLIBC whose dirfd() does not work.
18352 # Replace only if the system declares dirfd already.
18353 case $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro,$host_os,$ac_cv_have_decl_dirfd in
18354 no,no,*,yes | *,*,os2*,yes)
18355 REPLACE_DIRFD=1
18356
18357 $as_echo "#define REPLACE_DIRFD 1" >>confdefs.h
18358 ;;
18359 esac
18360
18361 if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \
18362 || test $REPLACE_DIRFD = 1; then
18363
18364
18365
18366
18367
18368
18369
18370
18371 gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext"
18372
18373
18374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
18375 $as_echo_n "checking how to get the file descriptor associated with an open DIR*... " >&6; }
18376 if ${gl_cv_sys_dir_fd_member_name+:} false; then :
18377 $as_echo_n "(cached) " >&6
18378 else
18379
18380 dirfd_save_CFLAGS=$CFLAGS
18381 for ac_expr in d_fd dd_fd; do
18382
18383 CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
18384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18385 /* end confdefs.h. */
18386
18387 #include <sys/types.h>
18388 #include <dirent.h>
18389 int
18390 main ()
18391 {
18392 DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
18393 ;
18394 return 0;
18395 }
18396 _ACEOF
18397 if ac_fn_c_try_compile "$LINENO"; then :
18398 dir_fd_found=yes
18399
18400 fi
18401 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18402 CFLAGS=$dirfd_save_CFLAGS
18403 test "$dir_fd_found" = yes && break
18404 done
18405 test "$dir_fd_found" = yes || ac_expr=no_such_member
18406
18407 gl_cv_sys_dir_fd_member_name=$ac_expr
18408
18409
18410 fi
18411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
18412 $as_echo "$gl_cv_sys_dir_fd_member_name" >&6; }
18413 if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
18414
18415 cat >>confdefs.h <<_ACEOF
18416 #define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name
18417 _ACEOF
18418
18419 fi
18420
18421
18422 fi
18423
18424
18425
18426
18427
18428 GNULIB_DIRFD=1
18429
18430
18431
18432
18433
18434 $as_echo "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
18435
18436
18437
18438
18439
18440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
18441 $as_echo_n "checking whether // is distinct from /... " >&6; }
18442 if ${gl_cv_double_slash_root+:} false; then :
18443 $as_echo_n "(cached) " >&6
18444 else
18445 if test x"$cross_compiling" = xyes ; then
18446 # When cross-compiling, there is no way to tell whether // is special
18447 # short of a list of hosts. However, the only known hosts to date
18448 # that have a distinct // are Apollo DomainOS (too old to port to),
18449 # Cygwin, and z/OS. If anyone knows of another system for which // has
18450 # special semantics and is distinct from /, please report it to
18451 # <bug-gnulib@gnu.org>.
18452 case $host in
18453 *-cygwin | i370-ibm-openedition)
18454 gl_cv_double_slash_root=yes ;;
18455 *)
18456 # Be optimistic and assume that / and // are the same when we
18457 # don't know.
18458 gl_cv_double_slash_root='unknown, assuming no' ;;
18459 esac
18460 else
18461 set x `ls -di / // 2>/dev/null`
18462 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
18463 gl_cv_double_slash_root=no
18464 else
18465 gl_cv_double_slash_root=yes
18466 fi
18467 fi
18468 fi
18469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
18470 $as_echo "$gl_cv_double_slash_root" >&6; }
18471 if test "$gl_cv_double_slash_root" = yes; then
18472
18473 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
18474
18475 fi
18476
18477
18478
18479
18480
18481 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
18482 REPLACE_DUP=1
18483 fi
18484
18485
18486
18487
18488
18489 if test $ac_cv_func_fchdir = no; then
18490 HAVE_FCHDIR=0
18491 fi
18492
18493 if test $HAVE_FCHDIR = 0; then
18494 REPLACE_DUP=1
18495 fi
18496
18497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup works" >&5
18498 $as_echo_n "checking whether dup works... " >&6; }
18499 if ${gl_cv_func_dup_works+:} false; then :
18500 $as_echo_n "(cached) " >&6
18501 else
18502 if test "$cross_compiling" = yes; then :
18503 case "$host_os" in
18504 # Guess no on native Windows.
18505 mingw*) gl_cv_func_dup_works="guessing no" ;;
18506 *) gl_cv_func_dup_works="guessing yes" ;;
18507 esac
18508
18509 else
18510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18511 /* end confdefs.h. */
18512 #include <unistd.h>
18513 #include <fcntl.h>
18514 #include <errno.h>
18515
18516
18517 $gl_mda_defines
18518
18519 int
18520 main ()
18521 {
18522 /* On OS/2 kLIBC, dup does not work on a directory fd. */
18523 int fd = open (".", O_RDONLY);
18524 return fd < 0 ? 1 : dup (fd) < 0 ? 2 : 0;
18525
18526 ;
18527 return 0;
18528 }
18529
18530 _ACEOF
18531 if ac_fn_c_try_run "$LINENO"; then :
18532 gl_cv_func_dup_works=yes
18533 else
18534 gl_cv_func_dup_works=no
18535 fi
18536 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18537 conftest.$ac_objext conftest.beam conftest.$ac_ext
18538 fi
18539
18540
18541 fi
18542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup_works" >&5
18543 $as_echo "$gl_cv_func_dup_works" >&6; }
18544 case "$gl_cv_func_dup_works" in
18545 *yes) ;;
18546 *)
18547 REPLACE_DUP=1
18548 ;;
18549 esac
18550
18551 if test $REPLACE_DUP = 1; then
18552
18553
18554
18555
18556
18557
18558
18559
18560 gl_LIBOBJS="$gl_LIBOBJS dup.$ac_objext"
18561
18562 :
18563 fi
18564
18565
18566
18567
18568
18569 GNULIB_DUP=1
18570
18571
18572
18573
18574
18575 $as_echo "#define GNULIB_TEST_DUP 1" >>confdefs.h
18576
18577
18578
18579
18580
18581
18582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
18583 $as_echo_n "checking whether dup2 works... " >&6; }
18584 if ${gl_cv_func_dup2_works+:} false; then :
18585 $as_echo_n "(cached) " >&6
18586 else
18587 if test "$cross_compiling" = yes; then :
18588 case "$host_os" in
18589 mingw*) # on this platform, dup2 always returns 0 for success
18590 gl_cv_func_dup2_works="guessing no" ;;
18591 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
18592 gl_cv_func_dup2_works="guessing no" ;;
18593 aix* | freebsd*)
18594 # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
18595 # not EBADF.
18596 gl_cv_func_dup2_works="guessing no" ;;
18597 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
18598 gl_cv_func_dup2_works="guessing no" ;;
18599 *-android*) # implemented using dup3(), which fails if oldfd == newfd
18600 gl_cv_func_dup2_works="guessing no" ;;
18601 os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
18602 gl_cv_func_dup2_works="guessing no" ;;
18603 *) gl_cv_func_dup2_works="guessing yes" ;;
18604 esac
18605 else
18606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18607 /* end confdefs.h. */
18608
18609 #include <errno.h>
18610 #include <fcntl.h>
18611 #include <limits.h>
18612 #include <sys/resource.h>
18613 #include <unistd.h>
18614
18615
18616 $gl_mda_defines
18617
18618 #ifndef RLIM_SAVED_CUR
18619 # define RLIM_SAVED_CUR RLIM_INFINITY
18620 #endif
18621 #ifndef RLIM_SAVED_MAX
18622 # define RLIM_SAVED_MAX RLIM_INFINITY
18623 #endif
18624
18625 int
18626 main ()
18627 {
18628 int result = 0;
18629 int bad_fd = INT_MAX;
18630 struct rlimit rlim;
18631 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
18632 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
18633 && rlim.rlim_cur != RLIM_INFINITY
18634 && rlim.rlim_cur != RLIM_SAVED_MAX
18635 && rlim.rlim_cur != RLIM_SAVED_CUR)
18636 bad_fd = rlim.rlim_cur;
18637 #ifdef FD_CLOEXEC
18638 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
18639 result |= 1;
18640 #endif
18641 if (dup2 (1, 1) != 1)
18642 result |= 2;
18643 #ifdef FD_CLOEXEC
18644 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
18645 result |= 4;
18646 #endif
18647 close (0);
18648 if (dup2 (0, 0) != -1)
18649 result |= 8;
18650 /* Many gnulib modules require POSIX conformance of EBADF. */
18651 if (dup2 (2, bad_fd) == -1 && errno != EBADF)
18652 result |= 16;
18653 /* Flush out some cygwin core dumps. */
18654 if (dup2 (2, -1) != -1 || errno != EBADF)
18655 result |= 32;
18656 dup2 (2, 255);
18657 dup2 (2, 256);
18658 /* On OS/2 kLIBC, dup2() does not work on a directory fd. */
18659 {
18660 int fd = open (".", O_RDONLY);
18661 if (fd == -1)
18662 result |= 64;
18663 else if (dup2 (fd, fd + 1) == -1)
18664 result |= 128;
18665 close (fd);
18666 }
18667 return result;
18668 ;
18669 return 0;
18670 }
18671
18672 _ACEOF
18673 if ac_fn_c_try_run "$LINENO"; then :
18674 gl_cv_func_dup2_works=yes
18675 else
18676 gl_cv_func_dup2_works=no
18677 fi
18678 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18679 conftest.$ac_objext conftest.beam conftest.$ac_ext
18680 fi
18681
18682
18683 fi
18684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
18685 $as_echo "$gl_cv_func_dup2_works" >&6; }
18686 case "$gl_cv_func_dup2_works" in
18687 *yes) ;;
18688 *)
18689 REPLACE_DUP2=1
18690 for ac_func in setdtablesize
18691 do :
18692 ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
18693 if test "x$ac_cv_func_setdtablesize" = xyes; then :
18694 cat >>confdefs.h <<_ACEOF
18695 #define HAVE_SETDTABLESIZE 1
18696 _ACEOF
18697
18698 fi
18699 done
18700
18701 ;;
18702 esac
18703
18704
18705
18706
18707 if test $ac_cv_func_fchdir = no; then
18708 HAVE_FCHDIR=0
18709 fi
18710
18711 if test $HAVE_FCHDIR = 0; then
18712 REPLACE_DUP2=1
18713 fi
18714
18715
18716 if test $REPLACE_DUP2 = 1; then
18717
18718
18719
18720
18721
18722
18723
18724
18725 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
18726
18727
18728 fi
18729
18730
18731
18732
18733
18734 GNULIB_DUP2=1
18735
18736
18737
18738
18739
18740 $as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h
18741
18742
18743
18744
18745
18746
18747
18748
18749
18750 GNULIB_ENVIRON=1
18751
18752
18753
18754
18755
18756 $as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
18757
18758
18759
18760
18761
18762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
18763 $as_echo_n "checking for error_at_line... " >&6; }
18764 if ${ac_cv_lib_error_at_line+:} false; then :
18765 $as_echo_n "(cached) " >&6
18766 else
18767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18768 /* end confdefs.h. */
18769 #include <error.h>
18770 int
18771 main ()
18772 {
18773 error_at_line (0, 0, "", 0, "an error occurred");
18774 ;
18775 return 0;
18776 }
18777 _ACEOF
18778 if ac_fn_c_try_link "$LINENO"; then :
18779 ac_cv_lib_error_at_line=yes
18780 else
18781 ac_cv_lib_error_at_line=no
18782 fi
18783 rm -f core conftest.err conftest.$ac_objext \
18784 conftest$ac_exeext conftest.$ac_ext
18785 fi
18786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
18787 $as_echo "$ac_cv_lib_error_at_line" >&6; }
18788
18789 if test $ac_cv_lib_error_at_line = no; then
18790
18791
18792
18793
18794
18795
18796
18797
18798 gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
18799
18800
18801
18802 :
18803
18804 fi
18805
18806
18807
18808
18809
18810
18811
18812 if test $ac_cv_have_decl_fchdir = no; then
18813 HAVE_DECL_FCHDIR=0
18814 fi
18815
18816
18817 if test $HAVE_FCHDIR = 0; then
18818
18819
18820
18821
18822
18823
18824
18825
18826 gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext"
18827
18828 :
18829
18830 $as_echo "#define REPLACE_FCHDIR 1" >>confdefs.h
18831
18832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5
18833 $as_echo_n "checking whether open can visit directories... " >&6; }
18834 if ${gl_cv_func_open_directory_works+:} false; then :
18835 $as_echo_n "(cached) " >&6
18836 else
18837 if test "$cross_compiling" = yes; then :
18838 case "$host_os" in
18839 # Guess yes on Linux systems.
18840 linux-* | linux) gl_cv_func_open_directory_works="guessing yes" ;;
18841 # Guess yes on glibc systems.
18842 *-gnu* | gnu*) gl_cv_func_open_directory_works="guessing yes" ;;
18843 # Guess no on native Windows.
18844 mingw*) gl_cv_func_open_directory_works="guessing no" ;;
18845 # If we don't know, obey --enable-cross-guesses.
18846 *) gl_cv_func_open_directory_works="$gl_cross_guess_normal" ;;
18847 esac
18848
18849 else
18850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18851 /* end confdefs.h. */
18852 #include <fcntl.h>
18853
18854
18855 $gl_mda_defines
18856
18857 int
18858 main ()
18859 {
18860 return open(".", O_RDONLY) < 0;
18861 ;
18862 return 0;
18863 }
18864 _ACEOF
18865 if ac_fn_c_try_run "$LINENO"; then :
18866 gl_cv_func_open_directory_works=yes
18867 else
18868 gl_cv_func_open_directory_works=no
18869 fi
18870 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18871 conftest.$ac_objext conftest.beam conftest.$ac_ext
18872 fi
18873
18874 fi
18875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5
18876 $as_echo "$gl_cv_func_open_directory_works" >&6; }
18877 case "$gl_cv_func_open_directory_works" in
18878 *yes) ;;
18879 *)
18880
18881 $as_echo "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h
18882
18883 ;;
18884 esac
18885 fi
18886
18887
18888
18889
18890
18891
18892 GNULIB_FCHDIR=1
18893
18894
18895
18896
18897
18898 $as_echo "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h
18899
18900
18901
18902
18903
18904
18905
18906
18907 if test $ac_cv_func_fcntl = no; then
18908
18909
18910
18911 if test $ac_cv_func_fcntl = no; then
18912 HAVE_FCNTL=0
18913 else
18914 REPLACE_FCNTL=1
18915 fi
18916
18917 else
18918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
18919 $as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
18920 if ${gl_cv_func_fcntl_f_dupfd_works+:} false; then :
18921 $as_echo_n "(cached) " >&6
18922 else
18923 if test "$cross_compiling" = yes; then :
18924 case $host_os in
18925 aix* | cygwin* | haiku*)
18926 gl_cv_func_fcntl_f_dupfd_works="guessing no" ;;
18927 *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;;
18928 esac
18929 else
18930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18931 /* end confdefs.h. */
18932 #include <errno.h>
18933 #include <fcntl.h>
18934 #include <limits.h>
18935 #include <sys/resource.h>
18936 #include <unistd.h>
18937
18938
18939 $gl_mda_defines
18940
18941 #ifndef RLIM_SAVED_CUR
18942 # define RLIM_SAVED_CUR RLIM_INFINITY
18943 #endif
18944 #ifndef RLIM_SAVED_MAX
18945 # define RLIM_SAVED_MAX RLIM_INFINITY
18946 #endif
18947
18948 int
18949 main ()
18950 {
18951 int result = 0;
18952 int bad_fd = INT_MAX;
18953 struct rlimit rlim;
18954 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
18955 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
18956 && rlim.rlim_cur != RLIM_INFINITY
18957 && rlim.rlim_cur != RLIM_SAVED_MAX
18958 && rlim.rlim_cur != RLIM_SAVED_CUR)
18959 bad_fd = rlim.rlim_cur;
18960 if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
18961 if (errno != EINVAL) result |= 2;
18962 if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
18963 if (errno != EINVAL) result |= 8;
18964 /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */
18965 {
18966 int fd;
18967 fd = open (".", O_RDONLY);
18968 if (fd == -1)
18969 result |= 16;
18970 else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1)
18971 result |= 32;
18972
18973 close (fd);
18974 }
18975 return result;
18976 ;
18977 return 0;
18978 }
18979 _ACEOF
18980 if ac_fn_c_try_run "$LINENO"; then :
18981 gl_cv_func_fcntl_f_dupfd_works=yes
18982 else
18983 gl_cv_func_fcntl_f_dupfd_works=no
18984 fi
18985 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18986 conftest.$ac_objext conftest.beam conftest.$ac_ext
18987 fi
18988
18989 fi
18990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
18991 $as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
18992 case $gl_cv_func_fcntl_f_dupfd_works in
18993 *yes) ;;
18994 *)
18995
18996
18997 if test $ac_cv_func_fcntl = no; then
18998 HAVE_FCNTL=0
18999 else
19000 REPLACE_FCNTL=1
19001 fi
19002
19003
19004 $as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
19005 ;;
19006 esac
19007
19008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
19009 $as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
19010 if ${gl_cv_func_fcntl_f_dupfd_cloexec+:} false; then :
19011 $as_echo_n "(cached) " >&6
19012 else
19013 if test "$cross_compiling" = yes; then :
19014 case "$host_os" in
19015 # Guess no on NetBSD.
19016 netbsd*) gl_cv_func_fcntl_f_dupfd_cloexec="guessing no" ;;
19017 *) gl_cv_func_fcntl_f_dupfd_cloexec="$gl_cross_guess_normal" ;;
19018 esac
19019
19020 else
19021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19022 /* end confdefs.h. */
19023 #include <fcntl.h>
19024 #include <unistd.h>
19025 int main (int argc, char *argv[])
19026 {
19027 if (argc == 1)
19028 /* parent process */
19029 {
19030 if (fcntl (1, F_DUPFD_CLOEXEC, 10) < 0)
19031 return 1;
19032 return execl ("./conftest", "./conftest", "child", NULL);
19033 }
19034 else
19035 /* child process */
19036 return (fcntl (10, F_GETFL) < 0 ? 0 : 42);
19037 }
19038
19039
19040 _ACEOF
19041 if ac_fn_c_try_run "$LINENO"; then :
19042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19043 /* end confdefs.h. */
19044
19045 #ifdef __linux__
19046 /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
19047 it to support the semantics on older kernels that failed with EINVAL. */
19048 choke me
19049 #endif
19050
19051 int
19052 main ()
19053 {
19054
19055 ;
19056 return 0;
19057 }
19058 _ACEOF
19059 if ac_fn_c_try_compile "$LINENO"; then :
19060 gl_cv_func_fcntl_f_dupfd_cloexec=yes
19061 else
19062 gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
19063 fi
19064 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19065
19066 else
19067 gl_cv_func_fcntl_f_dupfd_cloexec=no
19068 fi
19069 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19070 conftest.$ac_objext conftest.beam conftest.$ac_ext
19071 fi
19072
19073
19074 fi
19075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
19076 $as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
19077 case "$gl_cv_func_fcntl_f_dupfd_cloexec" in
19078 *yes) ;;
19079 *)
19080
19081
19082 if test $ac_cv_func_fcntl = no; then
19083 HAVE_FCNTL=0
19084 else
19085 REPLACE_FCNTL=1
19086 fi
19087
19088 ;;
19089 esac
19090 fi
19091
19092
19093
19094
19095 if test $ac_cv_func_fchdir = no; then
19096 HAVE_FCHDIR=0
19097 fi
19098
19099 if test $HAVE_FCHDIR = 0; then
19100
19101
19102
19103 if test $ac_cv_func_fcntl = no; then
19104 HAVE_FCNTL=0
19105 else
19106 REPLACE_FCNTL=1
19107 fi
19108
19109 fi
19110
19111
19112 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
19113
19114
19115
19116
19117
19118
19119
19120
19121 gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
19122
19123 fi
19124
19125
19126
19127
19128
19129 GNULIB_FCNTL=1
19130
19131
19132
19133
19134
19135 $as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
19136
19137
19138
19139
19140
19141
19142
19143
19144
19145
19146
19147
19148
19149
19150 if test $gl_cv_have_include_next = yes; then
19151 gl_cv_next_fcntl_h='<'fcntl.h'>'
19152 else
19153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
19154 $as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
19155 if ${gl_cv_next_fcntl_h+:} false; then :
19156 $as_echo_n "(cached) " >&6
19157 else
19158
19159
19160
19161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19162 /* end confdefs.h. */
19163 #include <fcntl.h>
19164 _ACEOF
19165 case "$host_os" in
19166 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19167 *) gl_absname_cpp="$ac_cpp" ;;
19168 esac
19169
19170 case "$host_os" in
19171 mingw*)
19172 gl_dirsep_regex='[/\\]'
19173 ;;
19174 *)
19175 gl_dirsep_regex='\/'
19176 ;;
19177 esac
19178 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19179 gl_header_literal_regex=`echo 'fcntl.h' \
19180 | sed -e "$gl_make_literal_regex_sed"`
19181 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19182 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19183 s|^/[^/]|//&|
19184 p
19185 q
19186 }'
19187
19188 gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19189 sed -n "$gl_absolute_header_sed"`
19190
19191 gl_header=$gl_cv_absolute_fcntl_h
19192 gl_cv_next_fcntl_h='"'$gl_header'"'
19193
19194
19195 fi
19196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
19197 $as_echo "$gl_cv_next_fcntl_h" >&6; }
19198 fi
19199 NEXT_FCNTL_H=$gl_cv_next_fcntl_h
19200
19201 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19202 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19203 gl_next_as_first_directive='<'fcntl.h'>'
19204 else
19205 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19206 gl_next_as_first_directive=$gl_cv_next_fcntl_h
19207 fi
19208 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
19209
19210
19211
19212
19213
19214
19215
19216
19217
19218
19219
19220
19221
19222
19223
19224 cat >>confdefs.h <<_ACEOF
19225 #define GNULIB_FD_SAFER_FLAG 1
19226 _ACEOF
19227
19228
19229
19230
19231
19232
19233
19234 ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
19235 #include <dirent.h>
19236
19237 "
19238 if test "x$ac_cv_have_decl_fdopendir" = xyes; then :
19239 ac_have_decl=1
19240 else
19241 ac_have_decl=0
19242 fi
19243
19244 cat >>confdefs.h <<_ACEOF
19245 #define HAVE_DECL_FDOPENDIR $ac_have_decl
19246 _ACEOF
19247 if test $ac_have_decl = 1; then :
19248
19249 else
19250 HAVE_DECL_FDOPENDIR=0
19251 fi
19252
19253
19254 if test $ac_cv_func_fdopendir = no; then
19255 HAVE_FDOPENDIR=0
19256 else
19257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
19258 $as_echo_n "checking whether fdopendir works... " >&6; }
19259 if ${gl_cv_func_fdopendir_works+:} false; then :
19260 $as_echo_n "(cached) " >&6
19261 else
19262 if test "$cross_compiling" = yes; then :
19263 case "$host_os" in
19264 # Guess yes on glibc systems.
19265 *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
19266 # Guess yes on musl systems.
19267 *-musl*) gl_cv_func_fdopendir_works="guessing yes" ;;
19268 # If we don't know, obey --enable-cross-guesses.
19269 *) gl_cv_func_fdopendir_works="$gl_cross_guess_normal" ;;
19270 esac
19271
19272 else
19273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19274 /* end confdefs.h. */
19275
19276 #include <dirent.h>
19277 #include <fcntl.h>
19278 #include <unistd.h>
19279
19280
19281 $gl_mda_defines
19282
19283 #if !HAVE_DECL_FDOPENDIR
19284 extern
19285 # ifdef __cplusplus
19286 "C"
19287 # endif
19288 DIR *fdopendir (int);
19289 #endif
19290
19291 int
19292 main ()
19293 {
19294 int result = 0;
19295 int fd = open ("conftest.c", O_RDONLY);
19296 if (fd < 0) result |= 1;
19297 if (fdopendir (fd)) result |= 2;
19298 if (close (fd)) result |= 4;
19299 return result;
19300
19301 ;
19302 return 0;
19303 }
19304 _ACEOF
19305 if ac_fn_c_try_run "$LINENO"; then :
19306 gl_cv_func_fdopendir_works=yes
19307 else
19308 gl_cv_func_fdopendir_works=no
19309 fi
19310 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19311 conftest.$ac_objext conftest.beam conftest.$ac_ext
19312 fi
19313
19314 fi
19315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
19316 $as_echo "$gl_cv_func_fdopendir_works" >&6; }
19317 case "$gl_cv_func_fdopendir_works" in
19318 *yes) ;;
19319 *)
19320 REPLACE_FDOPENDIR=1
19321 ;;
19322 esac
19323 fi
19324
19325 if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
19326
19327
19328
19329
19330
19331
19332
19333
19334 gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
19335
19336 fi
19337
19338
19339
19340
19341
19342 GNULIB_FDOPENDIR=1
19343
19344
19345
19346
19347
19348 $as_echo "#define GNULIB_TEST_FDOPENDIR 1" >>confdefs.h
19349
19350
19351
19352
19353
19354 cat >>confdefs.h <<_ACEOF
19355 #define GNULIB_FDOPENDIR 1
19356 _ACEOF
19357
19358
19359
19360
19361
19362
19363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
19364 $as_echo_n "checking for flexible array member... " >&6; }
19365 if ${ac_cv_c_flexmember+:} false; then :
19366 $as_echo_n "(cached) " >&6
19367 else
19368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19369 /* end confdefs.h. */
19370 #include <stdlib.h>
19371 #include <stdio.h>
19372 #include <stddef.h>
19373 struct m { struct m *next, **list; char name[]; };
19374 struct s { struct s *p; struct m *m; int n; double d[]; };
19375 int
19376 main ()
19377 {
19378 int m = getchar ();
19379 size_t nbytes = offsetof (struct s, d) + m * sizeof (double);
19380 nbytes += sizeof (struct s) - 1;
19381 nbytes -= nbytes % sizeof (struct s);
19382 struct s *p = malloc (nbytes);
19383 p->p = p;
19384 p->m = NULL;
19385 p->d[0] = 0.0;
19386 return p->d != (double *) NULL;
19387 ;
19388 return 0;
19389 }
19390 _ACEOF
19391 if ac_fn_c_try_compile "$LINENO"; then :
19392 ac_cv_c_flexmember=yes
19393 else
19394 ac_cv_c_flexmember=no
19395 fi
19396 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19397 fi
19398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
19399 $as_echo "$ac_cv_c_flexmember" >&6; }
19400 if test $ac_cv_c_flexmember = yes; then
19401
19402 $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
19403
19404 else
19405 $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
19406
19407 fi
19408
19409
19410
19411
19412 FLOAT_H=
19413 REPLACE_FLOAT_LDBL=0
19414 case "$host_os" in
19415 aix* | beos* | openbsd* | mirbsd* | irix*)
19416 FLOAT_H=float.h
19417 ;;
19418 freebsd* | dragonfly*)
19419 case "$host_cpu" in
19420 i[34567]86 )
19421 FLOAT_H=float.h
19422 ;;
19423 x86_64 )
19424 # On x86_64 systems, the C compiler may still be generating
19425 # 32-bit code.
19426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19427 /* end confdefs.h. */
19428 #if defined __LP64__ || defined __x86_64__ || defined __amd64__
19429 int ok;
19430 #else
19431 error fail
19432 #endif
19433
19434 _ACEOF
19435 if ac_fn_c_try_compile "$LINENO"; then :
19436
19437 else
19438 FLOAT_H=float.h
19439 fi
19440 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19441 ;;
19442 esac
19443 ;;
19444 linux*)
19445 case "$host_cpu" in
19446 powerpc*)
19447 FLOAT_H=float.h
19448 ;;
19449 esac
19450 ;;
19451 esac
19452 case "$host_os" in
19453 aix* | freebsd* | dragonfly* | linux*)
19454 if test -n "$FLOAT_H"; then
19455 REPLACE_FLOAT_LDBL=1
19456 fi
19457 ;;
19458 esac
19459
19460 REPLACE_ITOLD=0
19461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
19462 $as_echo_n "checking whether conversion from 'int' to 'long double' works... " >&6; }
19463 if ${gl_cv_func_itold_works+:} false; then :
19464 $as_echo_n "(cached) " >&6
19465 else
19466
19467 if test "$cross_compiling" = yes; then :
19468 case "$host" in
19469 sparc*-*-linux*)
19470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19471 /* end confdefs.h. */
19472 #if defined __LP64__ || defined __arch64__
19473 int ok;
19474 #else
19475 error fail
19476 #endif
19477
19478 _ACEOF
19479 if ac_fn_c_try_compile "$LINENO"; then :
19480 gl_cv_func_itold_works="guessing no"
19481 else
19482 gl_cv_func_itold_works="guessing yes"
19483 fi
19484 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19485 ;;
19486 # Guess yes on native Windows.
19487 mingw*) gl_cv_func_itold_works="guessing yes" ;;
19488 *) gl_cv_func_itold_works="guessing yes" ;;
19489 esac
19490
19491 else
19492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19493 /* end confdefs.h. */
19494
19495 int i = -1;
19496 volatile long double ld;
19497 int main ()
19498 {
19499 ld += i * 1.0L;
19500 if (ld > 0)
19501 return 1;
19502 return 0;
19503 }
19504 _ACEOF
19505 if ac_fn_c_try_run "$LINENO"; then :
19506 gl_cv_func_itold_works=yes
19507 else
19508 gl_cv_func_itold_works=no
19509 fi
19510 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19511 conftest.$ac_objext conftest.beam conftest.$ac_ext
19512 fi
19513
19514
19515 fi
19516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
19517 $as_echo "$gl_cv_func_itold_works" >&6; }
19518 case "$gl_cv_func_itold_works" in
19519 *no)
19520 REPLACE_ITOLD=1
19521 FLOAT_H=float.h
19522 ;;
19523 esac
19524
19525 if test -n "$FLOAT_H"; then
19526
19527
19528
19529
19530
19531
19532
19533
19534 if test $gl_cv_have_include_next = yes; then
19535 gl_cv_next_float_h='<'float.h'>'
19536 else
19537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
19538 $as_echo_n "checking absolute name of <float.h>... " >&6; }
19539 if ${gl_cv_next_float_h+:} false; then :
19540 $as_echo_n "(cached) " >&6
19541 else
19542
19543
19544
19545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19546 /* end confdefs.h. */
19547 #include <float.h>
19548 _ACEOF
19549 case "$host_os" in
19550 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19551 *) gl_absname_cpp="$ac_cpp" ;;
19552 esac
19553
19554 case "$host_os" in
19555 mingw*)
19556 gl_dirsep_regex='[/\\]'
19557 ;;
19558 *)
19559 gl_dirsep_regex='\/'
19560 ;;
19561 esac
19562 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19563 gl_header_literal_regex=`echo 'float.h' \
19564 | sed -e "$gl_make_literal_regex_sed"`
19565 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19566 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19567 s|^/[^/]|//&|
19568 p
19569 q
19570 }'
19571
19572 gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19573 sed -n "$gl_absolute_header_sed"`
19574
19575 gl_header=$gl_cv_absolute_float_h
19576 gl_cv_next_float_h='"'$gl_header'"'
19577
19578
19579 fi
19580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
19581 $as_echo "$gl_cv_next_float_h" >&6; }
19582 fi
19583 NEXT_FLOAT_H=$gl_cv_next_float_h
19584
19585 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19586 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19587 gl_next_as_first_directive='<'float.h'>'
19588 else
19589 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19590 gl_next_as_first_directive=$gl_cv_next_float_h
19591 fi
19592 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
19593
19594
19595
19596
19597 fi
19598
19599 if test -n "$FLOAT_H"; then
19600 GL_GENERATE_FLOAT_H_TRUE=
19601 GL_GENERATE_FLOAT_H_FALSE='#'
19602 else
19603 GL_GENERATE_FLOAT_H_TRUE='#'
19604 GL_GENERATE_FLOAT_H_FALSE=
19605 fi
19606
19607
19608
19609 if test $REPLACE_FLOAT_LDBL = 1; then
19610
19611
19612
19613
19614
19615
19616
19617
19618 gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
19619
19620 fi
19621 if test $REPLACE_ITOLD = 1; then
19622
19623
19624
19625
19626
19627
19628
19629
19630 gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
19631
19632 fi
19633
19634
19635
19636
19637 gl_fnmatch_required_lowercase=`
19638 echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]'
19639 `
19640
19641 if test $ac_cv_func_fnmatch = no; then
19642 HAVE_FNMATCH=0
19643 else
19644 gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}"
19645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5
19646 $as_echo_n "checking for working $gl_fnmatch_required fnmatch... " >&6; }
19647 if eval \${$gl_fnmatch_cache_var+:} false; then :
19648 $as_echo_n "(cached) " >&6
19649 else
19650 if test $gl_fnmatch_required = GNU; then
19651 gl_fnmatch_gnu_start=
19652 gl_fnmatch_gnu_end=
19653 else
19654 gl_fnmatch_gnu_start='#if 0'
19655 gl_fnmatch_gnu_end='#endif'
19656 fi
19657 if test "$cross_compiling" = yes; then :
19658 case "$host_os" in
19659 # Guess yes on musl systems.
19660 *-musl*) eval "$gl_fnmatch_cache_var=\"guessing yes\"" ;;
19661 # Guess no otherwise, even on glibc systems.
19662 *) eval "$gl_fnmatch_cache_var=\"guessing no\"" ;;
19663 esac
19664
19665 else
19666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19667 /* end confdefs.h. */
19668 #include <fnmatch.h>
19669 static int
19670 y (char const *pattern, char const *string, int flags)
19671 {
19672 return fnmatch (pattern, string, flags) == 0;
19673 }
19674 static int
19675 n (char const *pattern, char const *string, int flags)
19676 {
19677 return fnmatch (pattern, string, flags) == FNM_NOMATCH;
19678 }
19679
19680 int
19681 main ()
19682 {
19683 char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]";
19684 char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]";
19685 static char const A_1[] = { 'A' - 1, 0 };
19686 static char const A01[] = { 'A' + 1, 0 };
19687 static char const a_1[] = { 'a' - 1, 0 };
19688 static char const a01[] = { 'a' + 1, 0 };
19689 static char const bs_1[] = { '\\\\' - 1, 0 };
19690 static char const bs01[] = { '\\\\' + 1, 0 };
19691 int result = 0;
19692 if (!n ("a*", "", 0))
19693 return 1;
19694 if (!y ("a*", "abc", 0))
19695 return 1;
19696 if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */
19697 return 1;
19698 if (!n ("d*/*1", "d/s/1", FNM_PATHNAME))
19699 return 2;
19700 if (!y ("a\\\\bc", "abc", 0))
19701 return 3;
19702 if (!n ("a\\\\bc", "abc", FNM_NOESCAPE))
19703 return 3;
19704 if (!y ("*x", ".x", 0))
19705 return 4;
19706 if (!n ("*x", ".x", FNM_PERIOD))
19707 return 4;
19708 if (!y (Apat, "\\\\", 0))
19709 return 5;
19710 if (!y (Apat, "A", 0))
19711 return 5;
19712 if (!y (apat, "\\\\", 0))
19713 return 5;
19714 if (!y (apat, "a", 0))
19715 return 5;
19716 if (!(n (Apat, A_1, 0) == ('A' < '\\\\')))
19717 return 5;
19718 if (!(n (apat, a_1, 0) == ('a' < '\\\\')))
19719 return 5;
19720 if (!(y (Apat, A01, 0) == ('A' < '\\\\')))
19721 return 5;
19722 if (!(y (apat, a01, 0) == ('a' < '\\\\')))
19723 return 5;
19724 if (!(y (Apat, bs_1, 0) == ('A' < '\\\\')))
19725 return 5;
19726 if (!(y (apat, bs_1, 0) == ('a' < '\\\\')))
19727 return 5;
19728 if (!(n (Apat, bs01, 0) == ('A' < '\\\\')))
19729 return 5;
19730 if (!(n (apat, bs01, 0) == ('a' < '\\\\')))
19731 return 5;
19732 $gl_fnmatch_gnu_start
19733 if (!y ("xxXX", "xXxX", FNM_CASEFOLD))
19734 result |= 8;
19735 if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH))
19736 result |= 16;
19737 if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME))
19738 result |= 32;
19739 if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR))
19740 result |= 64;
19741 if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR))
19742 result |= 64;
19743 if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR))
19744 result |= 64;
19745 $gl_fnmatch_gnu_end
19746 return result;
19747
19748 ;
19749 return 0;
19750 }
19751 _ACEOF
19752 if ac_fn_c_try_run "$LINENO"; then :
19753 eval "$gl_fnmatch_cache_var=yes"
19754 else
19755 eval "$gl_fnmatch_cache_var=no"
19756 fi
19757 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19758 conftest.$ac_objext conftest.beam conftest.$ac_ext
19759 fi
19760
19761
19762 fi
19763 eval ac_res=\$$gl_fnmatch_cache_var
19764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19765 $as_echo "$ac_res" >&6; }
19766 eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\""
19767 case "$gl_fnmatch_result" in
19768 *yes) ;;
19769 *) REPLACE_FNMATCH=1 ;;
19770 esac
19771 fi
19772 if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
19773
19774
19775 FNMATCH_H='fnmatch.h'
19776 if test -n "$FNMATCH_H"; then
19777 GL_GENERATE_FNMATCH_H_TRUE=
19778 GL_GENERATE_FNMATCH_H_FALSE='#'
19779 else
19780 GL_GENERATE_FNMATCH_H_TRUE='#'
19781 GL_GENERATE_FNMATCH_H_FALSE=
19782 fi
19783
19784
19785 fi
19786
19787 if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
19788
19789
19790
19791
19792
19793
19794
19795
19796 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
19797
19798
19799
19800
19801
19802 fi
19803
19804
19805
19806
19807
19808 GNULIB_FNMATCH=1
19809
19810
19811
19812
19813
19814 $as_echo "#define GNULIB_TEST_FNMATCH 1" >>confdefs.h
19815
19816
19817
19818
19819
19820
19821
19822
19823 if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
19824
19825
19826
19827
19828
19829
19830
19831
19832 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
19833
19834
19835
19836
19837
19838 fi
19839
19840
19841 cat >>confdefs.h <<_ACEOF
19842 #define GNULIB_FNMATCH_GNU 1
19843 _ACEOF
19844
19845
19846
19847
19848
19849
19850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether free is known to preserve errno" >&5
19851 $as_echo_n "checking whether free is known to preserve errno... " >&6; }
19852 if ${gl_cv_func_free_preserves_errno+:} false; then :
19853 $as_echo_n "(cached) " >&6
19854 else
19855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19856 /* end confdefs.h. */
19857 #include <stdlib.h>
19858
19859 int
19860 main ()
19861 {
19862 #if 2 < __GLIBC__ + (33 <= __GLIBC_MINOR__)
19863 #elif defined __OpenBSD__
19864 #elif defined __sun
19865 #else
19866 #error "'free' is not known to preserve errno"
19867 #endif
19868
19869 ;
19870 return 0;
19871 }
19872 _ACEOF
19873 if ac_fn_c_try_compile "$LINENO"; then :
19874 gl_cv_func_free_preserves_errno=yes
19875 else
19876 gl_cv_func_free_preserves_errno=no
19877 fi
19878 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19879
19880 fi
19881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_free_preserves_errno" >&5
19882 $as_echo "$gl_cv_func_free_preserves_errno" >&6; }
19883
19884 case $gl_cv_func_free_preserves_errno in
19885 *yes) ;;
19886 *) REPLACE_FREE=1 ;;
19887 esac
19888
19889 if test $REPLACE_FREE = 1; then
19890
19891
19892
19893
19894
19895
19896
19897
19898 gl_LIBOBJS="$gl_LIBOBJS free.$ac_objext"
19899
19900 :
19901 fi
19902
19903
19904
19905
19906
19907 GNULIB_FREE_POSIX=1
19908
19909
19910
19911
19912
19913 $as_echo "#define GNULIB_TEST_FREE_POSIX 1" >>confdefs.h
19914
19915
19916
19917
19918 if test $gl_func_frexp != yes; then
19919
19920
19921
19922
19923
19924
19925
19926
19927 gl_LIBOBJS="$gl_LIBOBJS frexp.$ac_objext"
19928
19929 fi
19930
19931
19932
19933
19934
19935 GNULIB_FREXP=1
19936
19937
19938
19939
19940
19941 $as_echo "#define GNULIB_TEST_FREXP 1" >>confdefs.h
19942
19943
19944
19945
19946 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
19947
19948
19949
19950
19951
19952
19953
19954
19955 gl_LIBOBJS="$gl_LIBOBJS frexpl.$ac_objext"
19956
19957 fi
19958
19959
19960
19961
19962
19963 GNULIB_FREXPL=1
19964
19965
19966
19967
19968
19969 $as_echo "#define GNULIB_TEST_FREXPL 1" >>confdefs.h
19970
19971
19972
19973
19974
19975
19976
19977 case "$host_os" in
19978 mingw* | solaris*)
19979 REPLACE_FSTAT=1
19980 ;;
19981 esac
19982
19983
19984
19985
19986
19987 if test $ac_cv_func_fchdir = no; then
19988 HAVE_FCHDIR=0
19989 fi
19990
19991 if test $HAVE_FCHDIR = 0; then
19992 case "$gl_cv_func_open_directory_works" in
19993 *yes) ;;
19994 *)
19995 REPLACE_FSTAT=1
19996 ;;
19997 esac
19998 fi
19999
20000
20001 if test $REPLACE_FSTAT = 1; then
20002
20003
20004
20005
20006
20007
20008
20009
20010 gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
20011
20012 case "$host_os" in
20013 mingw*)
20014
20015
20016
20017
20018
20019
20020
20021
20022 gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
20023
20024 ;;
20025 esac
20026
20027
20028
20029 :
20030
20031 fi
20032
20033
20034
20035
20036
20037 GNULIB_FSTAT=1
20038
20039
20040
20041
20042
20043 $as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
20044
20045
20046
20047
20048
20049
20050
20051
20052
20053
20054 if test $ac_cv_func_fstatat = no; then
20055 HAVE_FSTATAT=0
20056 else
20057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
20058 $as_echo_n "checking whether fstatat (..., 0) works... " >&6; }
20059 if ${gl_cv_func_fstatat_zero_flag+:} false; then :
20060 $as_echo_n "(cached) " >&6
20061 else
20062 if test "$cross_compiling" = yes; then :
20063 case "$host_os" in
20064 aix*) gl_cv_func_fstatat_zero_flag="guessing no";;
20065 *) gl_cv_func_fstatat_zero_flag="guessing yes";;
20066 esac
20067
20068 else
20069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20070 /* end confdefs.h. */
20071
20072 #include <fcntl.h>
20073 #include <sys/stat.h>
20074 int
20075 main (void)
20076 {
20077 struct stat a;
20078 return fstatat (AT_FDCWD, ".", &a, 0) != 0;
20079 }
20080
20081 _ACEOF
20082 if ac_fn_c_try_run "$LINENO"; then :
20083 gl_cv_func_fstatat_zero_flag=yes
20084 else
20085 gl_cv_func_fstatat_zero_flag=no
20086 fi
20087 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20088 conftest.$ac_objext conftest.beam conftest.$ac_ext
20089 fi
20090
20091
20092 fi
20093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
20094 $as_echo "$gl_cv_func_fstatat_zero_flag" >&6; }
20095
20096 case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
20097 *yes+*yes) ;;
20098 *) REPLACE_FSTATAT=1 ;;
20099 esac
20100
20101 case $host_os in
20102 solaris*)
20103 REPLACE_FSTATAT=1 ;;
20104 esac
20105
20106 case $REPLACE_FSTATAT,$gl_cv_func_fstatat_zero_flag in
20107 1,*yes)
20108
20109 $as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
20110
20111 ;;
20112 esac
20113 fi
20114
20115 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
20116
20117
20118
20119
20120
20121
20122
20123
20124 gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
20125
20126 fi
20127
20128
20129
20130
20131
20132 GNULIB_FSTATAT=1
20133
20134
20135
20136
20137
20138 $as_echo "#define GNULIB_TEST_FSTATAT 1" >>confdefs.h
20139
20140
20141
20142
20143
20144
20145
20146
20147 gl_abort_bug=no
20148 case "$host_os" in
20149 mingw*)
20150 gl_cv_func_getcwd_path_max=yes
20151 ;;
20152 *)
20153
20154
20155
20156
20157
20158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd handles long file names properly" >&5
20159 $as_echo_n "checking whether getcwd handles long file names properly... " >&6; }
20160 if ${gl_cv_func_getcwd_path_max+:} false; then :
20161 $as_echo_n "(cached) " >&6
20162 else
20163 # Arrange for deletion of the temporary directory this test creates.
20164 ac_clean_files="$ac_clean_files confdir3"
20165 if test "$cross_compiling" = yes; then :
20166 # Cross-compilation guesses:
20167 case "$host_os" in
20168 aix*) # On AIX, it has the AIX bug.
20169 gl_cv_func_getcwd_path_max='guessing no, it has the AIX bug' ;;
20170 gnu*) # On Hurd, it is 'yes'.
20171 gl_cv_func_getcwd_path_max='guessing yes' ;;
20172 linux* | kfreebsd*)
20173 # On older Linux+glibc it's 'no, but it is partly working',
20174 # on newer Linux+glibc it's 'yes'.
20175 # On Linux+musl libc, it's 'no, but it is partly working'.
20176 # On kFreeBSD+glibc, it's 'no, but it is partly working'.
20177 gl_cv_func_getcwd_path_max='guessing no, but it is partly working' ;;
20178 *) # If we don't know, obey --enable-cross-guesses.
20179 gl_cv_func_getcwd_path_max="$gl_cross_guess_normal" ;;
20180 esac
20181
20182 else
20183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20184 /* end confdefs.h. */
20185
20186 #include <errno.h>
20187 #include <stdlib.h>
20188 #if HAVE_UNISTD_H
20189 # include <unistd.h>
20190 #else
20191 # include <direct.h>
20192 #endif
20193 #include <string.h>
20194 #include <limits.h>
20195 #include <sys/stat.h>
20196 #include <sys/types.h>
20197 #include <fcntl.h>
20198
20199
20200 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
20201 #if HAVE_UNISTD_H
20202 # include <unistd.h>
20203 #endif
20204 #include <limits.h>
20205 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
20206 # include <sys/param.h>
20207 #endif
20208 #if !defined PATH_MAX && defined MAXPATHLEN
20209 # define PATH_MAX MAXPATHLEN
20210 #endif
20211 #ifdef __hpux
20212 # undef PATH_MAX
20213 # define PATH_MAX 1024
20214 #endif
20215 #if defined _WIN32 && ! defined __CYGWIN__
20216 # undef PATH_MAX
20217 # define PATH_MAX 260
20218 #endif
20219
20220
20221 #ifndef AT_FDCWD
20222 # define AT_FDCWD 0
20223 #endif
20224 #ifdef ENAMETOOLONG
20225 # define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG)
20226 #else
20227 # define is_ENAMETOOLONG(x) 0
20228 #endif
20229
20230 /* Use the getcwd function, not any macro. */
20231 #undef getcwd
20232
20233
20234
20235 $gl_mda_defines
20236
20237
20238 #ifndef S_IRWXU
20239 # define S_IRWXU 0700
20240 #endif
20241
20242 /* The length of this name must be 8. */
20243 #define DIR_NAME "confdir3"
20244 #define DIR_NAME_LEN 8
20245 #define DIR_NAME_SIZE (DIR_NAME_LEN + 1)
20246
20247 /* The length of "../". */
20248 #define DOTDOTSLASH_LEN 3
20249
20250 /* Leftover bytes in the buffer, to work around library or OS bugs. */
20251 #define BUF_SLOP 20
20252
20253 int
20254 main ()
20255 {
20256 #ifndef PATH_MAX
20257 /* The Hurd doesn't define this, so getcwd can't exhibit the bug --
20258 at least not on a local file system. And if we were to start worrying
20259 about remote file systems, we'd have to enable the wrapper function
20260 all of the time, just to be safe. That's not worth the cost. */
20261 exit (0);
20262 #elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \
20263 - DIR_NAME_SIZE - BUF_SLOP) \
20264 <= PATH_MAX)
20265 /* FIXME: Assuming there's a system for which this is true,
20266 this should be done in a compile test. */
20267 exit (0);
20268 #else
20269 char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1)
20270 + DIR_NAME_SIZE + BUF_SLOP];
20271 char *cwd = getcwd (buf, PATH_MAX);
20272 size_t initial_cwd_len;
20273 size_t cwd_len;
20274 int fail = 0;
20275 size_t n_chdirs = 0;
20276
20277 if (cwd == NULL)
20278 exit (10);
20279
20280 cwd_len = initial_cwd_len = strlen (cwd);
20281
20282 while (1)
20283 {
20284 size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN);
20285 char *c = NULL;
20286
20287 cwd_len += DIR_NAME_SIZE;
20288 /* If mkdir or chdir fails, it could be that this system cannot create
20289 any file with an absolute name longer than PATH_MAX, such as cygwin.
20290 If so, leave fail as 0, because the current working directory can't
20291 be too long for getcwd if it can't even be created. On Linux with
20292 the 9p file system, mkdir fails with error EINVAL when cwd_len gets
20293 too long; ignore this failure because the getcwd() system call
20294 produces good results whereas the gnulib substitute calls getdents64
20295 which fails with error EPROTO.
20296 For other errors, be pessimistic and consider that as a failure,
20297 too. */
20298 if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0)
20299 {
20300 if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
20301 #ifdef __linux__
20302 if (! (errno == EINVAL))
20303 #endif
20304 fail = 20;
20305 break;
20306 }
20307
20308 if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE)
20309 {
20310 struct stat sb;
20311
20312 c = getcwd (buf, PATH_MAX);
20313 if (!c && errno == ENOENT)
20314 {
20315 fail = 11;
20316 break;
20317 }
20318 if (c)
20319 {
20320 fail = 31;
20321 break;
20322 }
20323 if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
20324 {
20325 fail = 21;
20326 break;
20327 }
20328
20329 /* Our replacement needs to be able to stat() long ../../paths,
20330 so generate a path larger than PATH_MAX to check,
20331 avoiding the replacement if we can't stat(). */
20332 c = getcwd (buf, cwd_len + 1);
20333 if (c && !AT_FDCWD && stat (c, &sb) != 0 && is_ENAMETOOLONG (errno))
20334 {
20335 fail = 32;
20336 break;
20337 }
20338 }
20339
20340 if (dotdot_max <= cwd_len - initial_cwd_len)
20341 {
20342 if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len)
20343 break;
20344 c = getcwd (buf, cwd_len + 1);
20345 if (!c)
20346 {
20347 if (! (errno == ERANGE || errno == ENOENT
20348 || is_ENAMETOOLONG (errno)))
20349 {
20350 fail = 22;
20351 break;
20352 }
20353 if (AT_FDCWD || errno == ERANGE || errno == ENOENT)
20354 {
20355 fail = 12;
20356 break;
20357 }
20358 }
20359 }
20360
20361 if (c && strlen (c) != cwd_len)
20362 {
20363 fail = 23;
20364 break;
20365 }
20366 ++n_chdirs;
20367 }
20368
20369 /* Leaving behind such a deep directory is not polite.
20370 So clean up here, right away, even though the driving
20371 shell script would also clean up. */
20372 {
20373 size_t i;
20374
20375 /* Try rmdir first, in case the chdir failed. */
20376 rmdir (DIR_NAME);
20377 for (i = 0; i <= n_chdirs; i++)
20378 {
20379 if (chdir ("..") < 0)
20380 break;
20381 if (rmdir (DIR_NAME) != 0)
20382 break;
20383 }
20384 }
20385
20386 exit (fail);
20387 #endif
20388 }
20389
20390 _ACEOF
20391 if ac_fn_c_try_run "$LINENO"; then :
20392 gl_cv_func_getcwd_path_max=yes
20393 else
20394 case $? in
20395 10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';;
20396 31) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
20397 32) gl_cv_func_getcwd_path_max='yes, but with shorter paths';;
20398 *) gl_cv_func_getcwd_path_max=no;;
20399 esac
20400 fi
20401 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20402 conftest.$ac_objext conftest.beam conftest.$ac_ext
20403 fi
20404
20405
20406 fi
20407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_path_max" >&5
20408 $as_echo "$gl_cv_func_getcwd_path_max" >&6; }
20409
20410 case "$gl_cv_func_getcwd_null" in
20411 *yes)
20412
20413
20414
20415
20416
20417
20418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
20419 $as_echo_n "checking for getpagesize... " >&6; }
20420 if ${gl_cv_func_getpagesize+:} false; then :
20421 $as_echo_n "(cached) " >&6
20422 else
20423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20424 /* end confdefs.h. */
20425 #include <unistd.h>
20426 int
20427 main ()
20428 {
20429 return getpagesize();
20430 ;
20431 return 0;
20432 }
20433
20434 _ACEOF
20435 if ac_fn_c_try_link "$LINENO"; then :
20436 gl_cv_func_getpagesize=yes
20437 else
20438 gl_cv_func_getpagesize=no
20439 fi
20440 rm -f core conftest.err conftest.$ac_objext \
20441 conftest$ac_exeext conftest.$ac_ext
20442
20443 fi
20444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getpagesize" >&5
20445 $as_echo "$gl_cv_func_getpagesize" >&6; }
20446
20447 if test $gl_cv_func_getpagesize = yes; then
20448
20449 cat >>confdefs.h <<_ACEOF
20450 #define HAVE_GETPAGESIZE 1
20451 _ACEOF
20452
20453 fi
20454
20455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd succeeds when 4k < cwd_length < 16k" >&5
20456 $as_echo_n "checking whether getcwd succeeds when 4k < cwd_length < 16k... " >&6; }
20457 if ${gl_cv_func_getcwd_succeeds_beyond_4k+:} false; then :
20458 $as_echo_n "(cached) " >&6
20459 else
20460 # Remove any remnants of a previous test.
20461 rm -rf confdir-14B---
20462 # Arrange for deletion of the temporary directory this test creates.
20463 ac_clean_files="$ac_clean_files confdir-14B---"
20464 if test "$cross_compiling" = yes; then :
20465 case "$host_os" in
20466 # Guess yes on musl systems.
20467 *-musl*) gl_cv_func_getcwd_succeeds_beyond_4k="guessing yes" ;;
20468 # Guess no otherwise, even on glibc systems.
20469 *) gl_cv_func_getcwd_succeeds_beyond_4k="guessing no"
20470 esac
20471
20472 else
20473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20474 /* end confdefs.h. */
20475
20476 #include <errno.h>
20477 #include <stdlib.h>
20478 #if HAVE_UNISTD_H
20479 # include <unistd.h>
20480 #else /* on Windows with MSVC */
20481 # include <direct.h>
20482 #endif
20483 #include <string.h>
20484 #include <sys/stat.h>
20485
20486
20487 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
20488 #if HAVE_UNISTD_H
20489 # include <unistd.h>
20490 #endif
20491 #include <limits.h>
20492 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
20493 # include <sys/param.h>
20494 #endif
20495 #if !defined PATH_MAX && defined MAXPATHLEN
20496 # define PATH_MAX MAXPATHLEN
20497 #endif
20498 #ifdef __hpux
20499 # undef PATH_MAX
20500 # define PATH_MAX 1024
20501 #endif
20502 #if defined _WIN32 && ! defined __CYGWIN__
20503 # undef PATH_MAX
20504 # define PATH_MAX 260
20505 #endif
20506
20507
20508
20509 $gl_mda_defines
20510
20511
20512 #ifndef S_IRWXU
20513 # define S_IRWXU 0700
20514 #endif
20515
20516 /* FIXME: skip the run-test altogether on systems without getpagesize. */
20517 #if ! HAVE_GETPAGESIZE
20518 # define getpagesize() 0
20519 #endif
20520
20521 /* This size is chosen to be larger than PATH_MAX (4k), yet smaller than
20522 the 16kB pagesize on ia64 linux. Those conditions make the code below
20523 trigger a bug in glibc's getcwd implementation before 2.4.90-10. */
20524 #define TARGET_LEN (5 * 1024)
20525
20526 int
20527 main ()
20528 {
20529 char *cwd;
20530 size_t initial_cwd_len;
20531 int fail = 0;
20532
20533 /* The bug is triggered when PATH_MAX < getpagesize (), so skip
20534 this relatively expensive and invasive test if that's not true. */
20535 #ifdef PATH_MAX
20536 int bug_possible = PATH_MAX < getpagesize ();
20537 #else
20538 int bug_possible = 0;
20539 #endif
20540 if (! bug_possible)
20541 return 0;
20542
20543 cwd = getcwd (NULL, 0);
20544 if (cwd == NULL)
20545 return 2;
20546
20547 initial_cwd_len = strlen (cwd);
20548 free (cwd);
20549
20550 if (1)
20551 {
20552 static char const dir_name[] = "confdir-14B---";
20553 size_t desired_depth = ((TARGET_LEN - 1 - initial_cwd_len)
20554 / sizeof dir_name);
20555 size_t d;
20556 for (d = 0; d < desired_depth; d++)
20557 {
20558 if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0)
20559 {
20560 if (! (errno == ERANGE || errno == ENAMETOOLONG
20561 || errno == ENOENT))
20562 fail = 3; /* Unable to construct deep hierarchy. */
20563 break;
20564 }
20565 }
20566
20567 /* If libc has the bug in question, this invocation of getcwd
20568 results in a failed assertion. */
20569 cwd = getcwd (NULL, 0);
20570 if (cwd == NULL)
20571 fail = 4; /* getcwd didn't assert, but it failed for a long name
20572 where the answer could have been learned. */
20573 free (cwd);
20574
20575 /* Call rmdir first, in case the above chdir failed. */
20576 rmdir (dir_name);
20577 while (0 < d--)
20578 {
20579 if (chdir ("..") < 0)
20580 {
20581 fail = 5;
20582 break;
20583 }
20584 rmdir (dir_name);
20585 }
20586 }
20587
20588 return fail;
20589 }
20590
20591 _ACEOF
20592 if ac_fn_c_try_run "$LINENO"; then :
20593 gl_cv_func_getcwd_succeeds_beyond_4k=yes
20594 else
20595 ret=$?
20596 if test $ret -ge 128 || test $ret = 4; then
20597 gl_cv_func_getcwd_succeeds_beyond_4k=no
20598 else
20599 gl_cv_func_getcwd_succeeds_beyond_4k=yes
20600 fi
20601
20602 fi
20603 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20604 conftest.$ac_objext conftest.beam conftest.$ac_ext
20605 fi
20606
20607
20608 fi
20609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_succeeds_beyond_4k" >&5
20610 $as_echo "$gl_cv_func_getcwd_succeeds_beyond_4k" >&6; }
20611 case "$gl_cv_func_getcwd_succeeds_beyond_4k" in
20612 *no)
20613 gl_abort_bug=yes
20614 ;;
20615 *)
20616
20617 ;;
20618 esac
20619
20620 ;;
20621 esac
20622 ;;
20623 esac
20624 case "$gl_cv_func_getcwd_path_max" in
20625 *"no" | *"no, it has the AIX bug") ;;
20626 *)
20627
20628 $as_echo "#define HAVE_MINIMALLY_WORKING_GETCWD 1" >>confdefs.h
20629
20630 ;;
20631 esac
20632 case "$gl_cv_func_getcwd_path_max" in
20633 *"no, but it is partly working")
20634
20635 $as_echo "#define HAVE_PARTLY_WORKING_GETCWD 1" >>confdefs.h
20636
20637 ;;
20638 *"yes, but with shorter paths")
20639
20640 $as_echo "#define HAVE_GETCWD_SHORTER 1" >>confdefs.h
20641
20642 ;;
20643 esac
20644
20645 if { case "$gl_cv_func_getcwd_null" in *yes) false;; *) true;; esac; } \
20646 || test $gl_cv_func_getcwd_posix_signature != yes \
20647 || { case "$gl_cv_func_getcwd_path_max" in *yes*) false;; *) true;; esac; } \
20648 || test $gl_abort_bug = yes; then
20649 REPLACE_GETCWD=1
20650 fi
20651
20652 if test $REPLACE_GETCWD = 1; then
20653
20654
20655
20656
20657
20658
20659
20660
20661 gl_LIBOBJS="$gl_LIBOBJS getcwd.$ac_objext"
20662
20663
20664
20665
20666 :
20667
20668 fi
20669
20670
20671 cat >>confdefs.h <<_ACEOF
20672 #define GNULIB_GETCWD 1
20673 _ACEOF
20674
20675
20676
20677
20678
20679
20680
20681 GNULIB_GETCWD=1
20682
20683
20684
20685
20686
20687 $as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
20688
20689
20690
20691
20692
20693
20694
20695
20696 case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
20697 *yes,yes) ;;
20698 *)
20699 REPLACE_GETCWD=1
20700 ;;
20701 esac
20702
20703 if test $REPLACE_GETCWD = 1; then
20704
20705
20706
20707
20708
20709
20710
20711
20712 gl_LIBOBJS="$gl_LIBOBJS getcwd-lgpl.$ac_objext"
20713
20714 fi
20715
20716
20717
20718
20719
20720 GNULIB_GETCWD=1
20721
20722
20723
20724
20725
20726 $as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
20727
20728
20729
20730
20731
20732
20733
20734
20735
20736
20737
20738 if test $ac_cv_func_getdelim = yes; then
20739 HAVE_GETDELIM=1
20740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getdelim function" >&5
20741 $as_echo_n "checking for working getdelim function... " >&6; }
20742 if ${gl_cv_func_working_getdelim+:} false; then :
20743 $as_echo_n "(cached) " >&6
20744 else
20745 echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
20746 if test "$cross_compiling" = yes; then :
20747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20748 /* end confdefs.h. */
20749
20750 #include <features.h>
20751 #ifdef __GNU_LIBRARY__
20752 #if (__GLIBC__ >= 2) && !defined __UCLIBC__
20753 Lucky GNU user
20754 #endif
20755 #endif
20756
20757 _ACEOF
20758 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20759 $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
20760 gl_cv_func_working_getdelim="guessing yes"
20761 else
20762 case "$host_os" in
20763 *-musl*) gl_cv_func_working_getdelim="guessing yes" ;;
20764 *) gl_cv_func_working_getdelim="$gl_cross_guess_normal" ;;
20765 esac
20766
20767 fi
20768 rm -f conftest*
20769
20770
20771 else
20772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20773 /* end confdefs.h. */
20774
20775 # include <stdio.h>
20776 # include <stdlib.h>
20777 # include <string.h>
20778 int main ()
20779 {
20780 FILE *in = fopen ("./conftest.data", "r");
20781 if (!in)
20782 return 1;
20783 {
20784 /* Test result for a NULL buffer and a zero size.
20785 Based on a test program from Karl Heuer. */
20786 char *line = NULL;
20787 size_t siz = 0;
20788 int len = getdelim (&line, &siz, '\n', in);
20789 if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
20790 { free (line); fclose (in); return 2; }
20791 free (line);
20792 }
20793 {
20794 /* Test result for a NULL buffer and a non-zero size.
20795 This crashes on FreeBSD 8.0. */
20796 char *line = NULL;
20797 size_t siz = (size_t)(~0) / 4;
20798 if (getdelim (&line, &siz, '\n', in) == -1)
20799 { fclose (in); return 3; }
20800 free (line);
20801 }
20802 fclose (in);
20803 return 0;
20804 }
20805
20806 _ACEOF
20807 if ac_fn_c_try_run "$LINENO"; then :
20808 gl_cv_func_working_getdelim=yes
20809 else
20810 gl_cv_func_working_getdelim=no
20811 fi
20812 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20813 conftest.$ac_objext conftest.beam conftest.$ac_ext
20814 fi
20815
20816
20817 fi
20818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_getdelim" >&5
20819 $as_echo "$gl_cv_func_working_getdelim" >&6; }
20820 case "$gl_cv_func_working_getdelim" in
20821 *yes) ;;
20822 *) REPLACE_GETDELIM=1 ;;
20823 esac
20824 else
20825 HAVE_GETDELIM=0
20826 fi
20827
20828 if test $ac_cv_have_decl_getdelim = no; then
20829 HAVE_DECL_GETDELIM=0
20830 fi
20831
20832 if test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1; then
20833
20834
20835
20836
20837
20838
20839
20840
20841 gl_LIBOBJS="$gl_LIBOBJS getdelim.$ac_objext"
20842
20843
20844 for ac_func in flockfile funlockfile
20845 do :
20846 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20847 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
20848 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
20849 cat >>confdefs.h <<_ACEOF
20850 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
20851 _ACEOF
20852
20853 fi
20854 done
20855
20856 ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
20857 if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
20858 ac_have_decl=1
20859 else
20860 ac_have_decl=0
20861 fi
20862
20863 cat >>confdefs.h <<_ACEOF
20864 #define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
20865 _ACEOF
20866
20867
20868 fi
20869
20870
20871
20872
20873
20874 GNULIB_GETDELIM=1
20875
20876
20877
20878
20879
20880 $as_echo "#define GNULIB_TEST_GETDELIM 1" >>confdefs.h
20881
20882
20883
20884
20885
20886
20887
20888
20889 if test $ac_cv_func_getdtablesize = yes &&
20890 test $ac_cv_have_decl_getdtablesize = yes; then
20891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
20892 $as_echo_n "checking whether getdtablesize works... " >&6; }
20893 if ${gl_cv_func_getdtablesize_works+:} false; then :
20894 $as_echo_n "(cached) " >&6
20895 else
20896 case "$host_os" in
20897 vms*) gl_cv_func_getdtablesize_works="no (limitation)" ;;
20898 *)
20899 if test "$cross_compiling" = yes; then :
20900 case "$host_os" in
20901 cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
20902 gl_cv_func_getdtablesize_works="guessing no" ;;
20903 *) gl_cv_func_getdtablesize_works="guessing yes" ;;
20904 esac
20905
20906 else
20907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20908 /* end confdefs.h. */
20909
20910 #include <unistd.h>
20911
20912
20913 $gl_mda_defines
20914
20915
20916 int
20917 main ()
20918 {
20919 int size = getdtablesize();
20920 if (dup2 (0, getdtablesize()) != -1)
20921 return 1;
20922 if (size != getdtablesize())
20923 return 2;
20924
20925 ;
20926 return 0;
20927 }
20928 _ACEOF
20929 if ac_fn_c_try_run "$LINENO"; then :
20930 gl_cv_func_getdtablesize_works=yes
20931 else
20932 gl_cv_func_getdtablesize_works=no
20933 fi
20934 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20935 conftest.$ac_objext conftest.beam conftest.$ac_ext
20936 fi
20937
20938 ;;
20939 esac
20940
20941 fi
20942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
20943 $as_echo "$gl_cv_func_getdtablesize_works" >&6; }
20944 case "$gl_cv_func_getdtablesize_works" in
20945 *yes | "no (limitation)") ;;
20946 *) REPLACE_GETDTABLESIZE=1 ;;
20947 esac
20948 else
20949 HAVE_GETDTABLESIZE=0
20950 fi
20951
20952 if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
20953
20954
20955
20956
20957
20958
20959
20960
20961 gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
20962
20963 :
20964 fi
20965
20966
20967
20968
20969
20970 GNULIB_GETDTABLESIZE=1
20971
20972
20973
20974
20975
20976 $as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
20977
20978
20979
20980
20981
20982
20983
20984
20985
20986
20987 gl_getline_needs_run_time_check=no
20988 ac_fn_c_check_func "$LINENO" "getline" "ac_cv_func_getline"
20989 if test "x$ac_cv_func_getline" = xyes; then :
20990 gl_getline_needs_run_time_check=yes
20991 else
20992 am_cv_func_working_getline=no
20993 fi
20994
20995 if test $gl_getline_needs_run_time_check = yes; then
20996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getline function" >&5
20997 $as_echo_n "checking for working getline function... " >&6; }
20998 if ${am_cv_func_working_getline+:} false; then :
20999 $as_echo_n "(cached) " >&6
21000 else
21001 echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
21002 if test "$cross_compiling" = yes; then :
21003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21004 /* end confdefs.h. */
21005
21006 #include <features.h>
21007 #ifdef __GNU_LIBRARY__
21008 #if (__GLIBC__ >= 2) && !defined __UCLIBC__
21009 Lucky GNU user
21010 #endif
21011 #endif
21012
21013 _ACEOF
21014 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21015 $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
21016 am_cv_func_working_getline="guessing yes"
21017 else
21018 case "$host_os" in
21019 *-musl*) am_cv_func_working_getline="guessing yes" ;;
21020 *) am_cv_func_working_getline="$gl_cross_guess_normal" ;;
21021 esac
21022
21023 fi
21024 rm -f conftest*
21025
21026
21027 else
21028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21029 /* end confdefs.h. */
21030
21031 # include <stdio.h>
21032 # include <stdlib.h>
21033 # include <string.h>
21034 int main ()
21035 {
21036 FILE *in = fopen ("./conftest.data", "r");
21037 if (!in)
21038 return 1;
21039 {
21040 /* Test result for a NULL buffer and a zero size.
21041 Based on a test program from Karl Heuer. */
21042 char *line = NULL;
21043 size_t siz = 0;
21044 int len = getline (&line, &siz, in);
21045 if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
21046 { free (line); fclose (in); return 2; }
21047 free (line);
21048 }
21049 {
21050 /* Test result for a NULL buffer and a non-zero size.
21051 This crashes on FreeBSD 8.0. */
21052 char *line = NULL;
21053 size_t siz = (size_t)(~0) / 4;
21054 if (getline (&line, &siz, in) == -1)
21055 { fclose (in); return 3; }
21056 free (line);
21057 }
21058 fclose (in);
21059 return 0;
21060 }
21061
21062 _ACEOF
21063 if ac_fn_c_try_run "$LINENO"; then :
21064 am_cv_func_working_getline=yes
21065 else
21066 am_cv_func_working_getline=no
21067 fi
21068 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21069 conftest.$ac_objext conftest.beam conftest.$ac_ext
21070 fi
21071
21072
21073 fi
21074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_working_getline" >&5
21075 $as_echo "$am_cv_func_working_getline" >&6; }
21076 fi
21077
21078 if test $ac_cv_have_decl_getline = no; then
21079 HAVE_DECL_GETLINE=0
21080 fi
21081
21082 case "$am_cv_func_working_getline" in
21083 *yes) ;;
21084 *)
21085 REPLACE_GETLINE=1
21086 ;;
21087 esac
21088
21089 if test $REPLACE_GETLINE = 1; then
21090
21091
21092
21093
21094
21095
21096
21097
21098 gl_LIBOBJS="$gl_LIBOBJS getline.$ac_objext"
21099
21100
21101 :
21102
21103 fi
21104
21105
21106
21107
21108
21109 GNULIB_GETLINE=1
21110
21111
21112
21113
21114
21115 $as_echo "#define GNULIB_TEST_GETLINE 1" >>confdefs.h
21116
21117
21118
21119
21120
21121
21122
21123
21124
21125 if test $ac_cv_have_decl_getlogin_r = no; then
21126 HAVE_DECL_GETLOGIN_R=0
21127 fi
21128
21129
21130 if test $ac_cv_func_getlogin_r = no; then
21131 HAVE_GETLOGIN_R=0
21132 else
21133 HAVE_GETLOGIN_R=1
21134
21135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getlogin_r works with small buffers" >&5
21136 $as_echo_n "checking whether getlogin_r works with small buffers... " >&6; }
21137 if ${gl_cv_func_getlogin_r_works+:} false; then :
21138 $as_echo_n "(cached) " >&6
21139 else
21140
21141 case "$host_os" in
21142 # Guess no on Mac OS X, OSF/1.
21143 darwin* | osf*) gl_cv_func_getlogin_r_works="guessing no" ;;
21144 # Guess yes otherwise.
21145 *) gl_cv_func_getlogin_r_works="guessing yes" ;;
21146 esac
21147 if test "$cross_compiling" = yes; then :
21148 :
21149 else
21150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21151 /* end confdefs.h. */
21152
21153 #include <stddef.h>
21154 #include <string.h>
21155 #include <unistd.h>
21156 #if !HAVE_DECL_GETLOGIN_R
21157 extern
21158 # ifdef __cplusplus
21159 "C"
21160 # endif
21161 int getlogin_r (char *, size_t);
21162 #endif
21163 int
21164 main (void)
21165 {
21166 int result = 0;
21167 char buf[100];
21168
21169 if (getlogin_r (buf, 0) == 0)
21170 result |= 1;
21171 if (getlogin_r (buf, 1) == 0)
21172 result |= 2;
21173 if (getlogin_r (buf, 100) == 0)
21174 {
21175 size_t n = strlen (buf);
21176 if (getlogin_r (buf, n) == 0)
21177 result |= 4;
21178 }
21179 return result;
21180 }
21181 _ACEOF
21182 if ac_fn_c_try_run "$LINENO"; then :
21183 gl_cv_func_getlogin_r_works=yes
21184 else
21185 gl_cv_func_getlogin_r_works=no
21186 fi
21187 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21188 conftest.$ac_objext conftest.beam conftest.$ac_ext
21189 fi
21190
21191
21192 fi
21193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getlogin_r_works" >&5
21194 $as_echo "$gl_cv_func_getlogin_r_works" >&6; }
21195 case "$gl_cv_func_getlogin_r_works" in
21196 *yes) ;;
21197 *) REPLACE_GETLOGIN_R=1 ;;
21198 esac
21199 fi
21200
21201 if test $HAVE_GETLOGIN_R = 0 || test $REPLACE_GETLOGIN_R = 1; then
21202
21203
21204
21205
21206
21207
21208
21209
21210 gl_LIBOBJS="$gl_LIBOBJS getlogin_r.$ac_objext"
21211
21212
21213
21214
21215 fi
21216
21217
21218
21219
21220
21221 GNULIB_GETLOGIN_R=1
21222
21223
21224
21225
21226
21227 $as_echo "#define GNULIB_TEST_GETLOGIN_R 1" >>confdefs.h
21228
21229
21230
21231
21232
21233
21234
21235 ac_found=0
21236 ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
21237 "
21238 if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
21239 ac_have_decl=1
21240 else
21241 ac_have_decl=0
21242 fi
21243
21244 cat >>confdefs.h <<_ACEOF
21245 #define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
21246 _ACEOF
21247 if test $ac_have_decl = 1; then :
21248 ac_found=1
21249 fi
21250
21251 ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
21252 "
21253 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
21254 ac_have_decl=1
21255 else
21256 ac_have_decl=0
21257 fi
21258
21259 cat >>confdefs.h <<_ACEOF
21260 #define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
21261 _ACEOF
21262 if test $ac_have_decl = 1; then :
21263 ac_found=1
21264 fi
21265
21266 ac_fn_c_check_decl "$LINENO" "__argv" "ac_cv_have_decl___argv" "#include <stdlib.h>
21267 "
21268 if test "x$ac_cv_have_decl___argv" = xyes; then :
21269 ac_have_decl=1
21270 else
21271 ac_have_decl=0
21272 fi
21273
21274 cat >>confdefs.h <<_ACEOF
21275 #define HAVE_DECL___ARGV $ac_have_decl
21276 _ACEOF
21277 if test $ac_have_decl = 1; then :
21278 ac_found=1
21279 fi
21280
21281
21282 # Incur the cost of this test only if none of the above worked.
21283 if test $ac_found = 0; then
21284 # On OpenBSD 5.1, using the global __progname variable appears to be
21285 # the only way to implement getprogname.
21286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __progname is defined in default libraries" >&5
21287 $as_echo_n "checking whether __progname is defined in default libraries... " >&6; }
21288 if ${gl_cv_var___progname+:} false; then :
21289 $as_echo_n "(cached) " >&6
21290 else
21291
21292 gl_cv_var___progname=
21293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21294 /* end confdefs.h. */
21295 extern char *__progname;
21296 int
21297 main ()
21298 {
21299 return *__progname;
21300
21301 ;
21302 return 0;
21303 }
21304 _ACEOF
21305 if ac_fn_c_try_link "$LINENO"; then :
21306 gl_cv_var___progname=yes
21307
21308 fi
21309 rm -f core conftest.err conftest.$ac_objext \
21310 conftest$ac_exeext conftest.$ac_ext
21311
21312
21313 fi
21314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var___progname" >&5
21315 $as_echo "$gl_cv_var___progname" >&6; }
21316 if test "$gl_cv_var___progname" = yes; then
21317
21318 $as_echo "#define HAVE_VAR___PROGNAME 1" >>confdefs.h
21319
21320 fi
21321 fi
21322
21323
21324
21325
21326
21327 if test "$ac_cv_func_getrandom" != yes; then
21328 HAVE_GETRANDOM=0
21329 else
21330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getrandom is compatible with its GNU+BSD signature" >&5
21331 $as_echo_n "checking whether getrandom is compatible with its GNU+BSD signature... " >&6; }
21332 if ${gl_cv_func_getrandom_ok+:} false; then :
21333 $as_echo_n "(cached) " >&6
21334 else
21335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21336 /* end confdefs.h. */
21337 /* Additional includes are needed before <sys/random.h> on uClibc
21338 and Mac OS X. */
21339 #include <sys/types.h>
21340 #include <stdlib.h>
21341 #include <sys/random.h>
21342 ssize_t getrandom (void *, size_t, unsigned int);
21343
21344 int
21345 main ()
21346 {
21347
21348 ;
21349 return 0;
21350 }
21351
21352 _ACEOF
21353 if ac_fn_c_try_compile "$LINENO"; then :
21354 gl_cv_func_getrandom_ok=yes
21355 else
21356 gl_cv_func_getrandom_ok=no
21357 fi
21358 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21359
21360 fi
21361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getrandom_ok" >&5
21362 $as_echo "$gl_cv_func_getrandom_ok" >&6; }
21363 if test $gl_cv_func_getrandom_ok = no; then
21364 REPLACE_GETRANDOM=1
21365 fi
21366 fi
21367
21368 case "$host_os" in
21369 mingw*)
21370 for ac_header in bcrypt.h
21371 do :
21372 ac_fn_c_check_header_compile "$LINENO" "bcrypt.h" "ac_cv_header_bcrypt_h" "#include <windows.h>
21373
21374 "
21375 if test "x$ac_cv_header_bcrypt_h" = xyes; then :
21376 cat >>confdefs.h <<_ACEOF
21377 #define HAVE_BCRYPT_H 1
21378 _ACEOF
21379
21380 fi
21381
21382 done
21383
21384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the bcrypt library is guaranteed to be present" >&5
21385 $as_echo_n "checking whether the bcrypt library is guaranteed to be present... " >&6; }
21386 if ${gl_cv_lib_assume_bcrypt+:} false; then :
21387 $as_echo_n "(cached) " >&6
21388 else
21389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21390 /* end confdefs.h. */
21391 #include <windows.h>
21392 int
21393 main ()
21394 {
21395 #if !(_WIN32_WINNT >= _WIN32_WINNT_WIN7)
21396 cannot assume it
21397 #endif
21398
21399 ;
21400 return 0;
21401 }
21402
21403 _ACEOF
21404 if ac_fn_c_try_compile "$LINENO"; then :
21405 gl_cv_lib_assume_bcrypt=yes
21406 else
21407 gl_cv_lib_assume_bcrypt=no
21408 fi
21409 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21410
21411 fi
21412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_assume_bcrypt" >&5
21413 $as_echo "$gl_cv_lib_assume_bcrypt" >&6; }
21414 if test $gl_cv_lib_assume_bcrypt = yes; then
21415
21416 $as_echo "#define HAVE_LIB_BCRYPT 1" >>confdefs.h
21417
21418 LIB_GETRANDOM='-lbcrypt'
21419 else
21420 LIB_GETRANDOM='-ladvapi32'
21421 fi
21422 ;;
21423 *)
21424 LIB_GETRANDOM= ;;
21425 esac
21426
21427
21428 if test $HAVE_GETRANDOM = 0 || test $REPLACE_GETRANDOM = 1; then
21429
21430
21431
21432
21433
21434
21435
21436
21437 gl_LIBOBJS="$gl_LIBOBJS getrandom.$ac_objext"
21438
21439 fi
21440
21441
21442
21443
21444
21445 GNULIB_GETRANDOM=1
21446
21447
21448
21449
21450
21451 $as_echo "#define GNULIB_TEST_GETRANDOM 1" >>confdefs.h
21452
21453
21454
21455
21456
21457
21458
21459
21460
21461
21462
21463
21464 gl_gettimeofday_timezone=void
21465 if test $ac_cv_func_gettimeofday != yes; then
21466 HAVE_GETTIMEOFDAY=0
21467 else
21468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
21469 $as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
21470 if ${gl_cv_func_gettimeofday_posix_signature+:} false; then :
21471 $as_echo_n "(cached) " >&6
21472 else
21473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21474 /* end confdefs.h. */
21475 #include <sys/time.h>
21476 struct timeval c;
21477 int gettimeofday (struct timeval *restrict, void *restrict);
21478
21479 int
21480 main ()
21481 {
21482 /* glibc uses struct timezone * rather than the POSIX void *
21483 if _GNU_SOURCE is defined. However, since the only portable
21484 use of gettimeofday uses NULL as the second parameter, and
21485 since the glibc definition is actually more typesafe, it is
21486 not worth wrapping this to get a compliant signature. */
21487 int (*f) (struct timeval *restrict, void *restrict)
21488 = gettimeofday;
21489 int x = f (&c, 0);
21490 return !(x | c.tv_sec | c.tv_usec);
21491
21492 ;
21493 return 0;
21494 }
21495 _ACEOF
21496 if ac_fn_c_try_compile "$LINENO"; then :
21497 gl_cv_func_gettimeofday_posix_signature=yes
21498 else
21499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21500 /* end confdefs.h. */
21501 #include <sys/time.h>
21502 int gettimeofday (struct timeval *restrict, struct timezone *restrict);
21503
21504 int
21505 main ()
21506 {
21507
21508 ;
21509 return 0;
21510 }
21511 _ACEOF
21512 if ac_fn_c_try_compile "$LINENO"; then :
21513 gl_cv_func_gettimeofday_posix_signature=almost
21514 else
21515 gl_cv_func_gettimeofday_posix_signature=no
21516 fi
21517 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21518 fi
21519 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21520 fi
21521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
21522 $as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
21523 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
21524 gl_gettimeofday_timezone='struct timezone'
21525 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
21526 REPLACE_GETTIMEOFDAY=1
21527 fi
21528 if test $REPLACE_STRUCT_TIMEVAL = 1; then
21529 REPLACE_GETTIMEOFDAY=1
21530 fi
21531 case "$host_os" in
21532 mingw*) REPLACE_GETTIMEOFDAY=1 ;;
21533 esac
21534 fi
21535
21536 cat >>confdefs.h <<_ACEOF
21537 #define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
21538 _ACEOF
21539
21540
21541 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
21542
21543
21544
21545
21546
21547
21548
21549
21550 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
21551
21552 :
21553 fi
21554
21555
21556
21557
21558
21559 GNULIB_GETTIMEOFDAY=1
21560
21561
21562
21563
21564
21565 $as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
21566
21567
21568
21569
21570
21571
21572
21573 if test $ac_cv_func_glob = no; then
21574 HAVE_GLOB=0
21575 else
21576
21577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU glob interface version 1 or 2" >&5
21578 $as_echo_n "checking for GNU glob interface version 1 or 2... " >&6; }
21579 if ${gl_cv_gnu_glob_interface_version_1_2+:} false; then :
21580 $as_echo_n "(cached) " >&6
21581 else
21582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21583 /* end confdefs.h. */
21584 #include <gnu-versions.h>
21585 char a[_GNU_GLOB_INTERFACE_VERSION == 1 || _GNU_GLOB_INTERFACE_VERSION == 2 ? 1 : -1];
21586 _ACEOF
21587 if ac_fn_c_try_compile "$LINENO"; then :
21588 gl_cv_gnu_glob_interface_version_1_2=yes
21589 else
21590 gl_cv_gnu_glob_interface_version_1_2=no
21591 fi
21592 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21593 fi
21594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_gnu_glob_interface_version_1_2" >&5
21595 $as_echo "$gl_cv_gnu_glob_interface_version_1_2" >&6; }
21596 if test "$gl_cv_gnu_glob_interface_version_1_2" = "no"; then
21597 REPLACE_GLOB=1
21598 fi
21599
21600 if test $REPLACE_GLOB = 0; then
21601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether glob lists broken symlinks" >&5
21602 $as_echo_n "checking whether glob lists broken symlinks... " >&6; }
21603 if ${gl_cv_glob_lists_symlinks+:} false; then :
21604 $as_echo_n "(cached) " >&6
21605 else
21606 if test $cross_compiling != yes; then
21607 if ln -s conf-doesntexist conf$$-globtest 2>/dev/null; then
21608 gl_cv_glob_lists_symlinks=maybe
21609 else
21610 # If we can't make a symlink, then we cannot test this issue. Be
21611 # pessimistic about this.
21612 gl_cv_glob_lists_symlinks=no
21613 fi
21614 if test $gl_cv_glob_lists_symlinks = maybe; then
21615 if test "$cross_compiling" = yes; then :
21616 :
21617
21618 else
21619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21620 /* end confdefs.h. */
21621 #include <stddef.h>
21622 #include <glob.h>
21623 int
21624 main ()
21625 {
21626 glob_t found;
21627 if (glob ("conf*-globtest", 0, NULL, &found) == GLOB_NOMATCH)
21628 return 1;
21629 globfree (&found);
21630
21631 ;
21632 return 0;
21633 }
21634 _ACEOF
21635 if ac_fn_c_try_run "$LINENO"; then :
21636 gl_cv_glob_lists_symlinks=yes
21637 else
21638 gl_cv_glob_lists_symlinks=no
21639 fi
21640 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21641 conftest.$ac_objext conftest.beam conftest.$ac_ext
21642 fi
21643
21644 fi
21645 rm -f conf$$-globtest
21646 else
21647 gl_cv_glob_lists_symlinks="$gl_cross_guess_normal"
21648 fi
21649
21650 fi
21651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_glob_lists_symlinks" >&5
21652 $as_echo "$gl_cv_glob_lists_symlinks" >&6; }
21653 case "$gl_cv_glob_lists_symlinks" in
21654 *yes) ;;
21655 *) REPLACE_GLOB=1 ;;
21656 esac
21657 fi
21658
21659 fi
21660
21661 if test $ac_cv_func_glob_pattern_p = no; then
21662 HAVE_GLOB_PATTERN_P=0
21663 else
21664 if test $REPLACE_GLOB = 1; then
21665 REPLACE_GLOB_PATTERN_P=1
21666 fi
21667 fi
21668
21669 if test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1; then
21670
21671
21672 GLOB_H='glob.h'
21673 if test -n "$GLOB_H"; then
21674 GL_GENERATE_GLOB_H_TRUE=
21675 GL_GENERATE_GLOB_H_FALSE='#'
21676 else
21677 GL_GENERATE_GLOB_H_TRUE='#'
21678 GL_GENERATE_GLOB_H_FALSE=
21679 fi
21680
21681
21682 fi
21683
21684 if test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1; then
21685
21686
21687
21688
21689
21690
21691
21692
21693 gl_LIBOBJS="$gl_LIBOBJS glob.$ac_objext"
21694
21695
21696
21697
21698
21699
21700
21701
21702
21703 gl_LIBOBJS="$gl_LIBOBJS globfree.$ac_objext"
21704
21705
21706
21707
21708
21709
21710 fi
21711 if test $HAVE_GLOB_PATTERN_P = 0 || test $REPLACE_GLOB_PATTERN_P = 1; then
21712
21713
21714
21715
21716
21717
21718
21719
21720 gl_LIBOBJS="$gl_LIBOBJS glob_pattern_p.$ac_objext"
21721
21722 fi
21723
21724
21725
21726
21727
21728 GNULIB_GLOB=1
21729
21730
21731
21732
21733
21734 $as_echo "#define GNULIB_TEST_GLOB 1" >>confdefs.h
21735
21736
21737
21738
21739
21740 LIB_HARD_LOCALE="$LIB_SETLOCALE_NULL"
21741
21742
21743
21744
21745
21746
21747
21748
21749 HAVE_INET_NTOP=1
21750 INET_NTOP_LIB=
21751
21752
21753
21754
21755 if test $ac_cv_header_sys_socket_h != yes; then
21756 for ac_header in winsock2.h
21757 do :
21758 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
21759 if test "x$ac_cv_header_winsock2_h" = xyes; then :
21760 cat >>confdefs.h <<_ACEOF
21761 #define HAVE_WINSOCK2_H 1
21762 _ACEOF
21763
21764 fi
21765
21766 done
21767
21768 fi
21769 if test "$ac_cv_header_winsock2_h" = yes; then
21770 HAVE_WINSOCK2_H=1
21771 UNISTD_H_HAVE_WINSOCK2_H=1
21772 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
21773 else
21774 HAVE_WINSOCK2_H=0
21775 fi
21776
21777
21778 if test $HAVE_WINSOCK2_H = 1; then
21779 REPLACE_INET_NTOP=1
21780 ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <ws2tcpip.h>
21781 "
21782 if test "x$ac_cv_have_decl_inet_ntop" = xyes; then :
21783 ac_have_decl=1
21784 else
21785 ac_have_decl=0
21786 fi
21787
21788 cat >>confdefs.h <<_ACEOF
21789 #define HAVE_DECL_INET_NTOP $ac_have_decl
21790 _ACEOF
21791
21792 if test $ac_cv_have_decl_inet_ntop = yes; then
21793 INET_NTOP_LIB="-lws2_32"
21794 else
21795 HAVE_DECL_INET_NTOP=0
21796 fi
21797 else
21798 gl_save_LIBS=$LIBS
21799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5
21800 $as_echo_n "checking for library containing inet_ntop... " >&6; }
21801 if ${ac_cv_search_inet_ntop+:} false; then :
21802 $as_echo_n "(cached) " >&6
21803 else
21804 ac_func_search_save_LIBS=$LIBS
21805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21806 /* end confdefs.h. */
21807
21808 /* Override any GCC internal prototype to avoid an error.
21809 Use char because int might match the return type of a GCC
21810 builtin and then its argument prototype would still apply. */
21811 #ifdef __cplusplus
21812 extern "C"
21813 #endif
21814 char inet_ntop ();
21815 int
21816 main ()
21817 {
21818 return inet_ntop ();
21819 ;
21820 return 0;
21821 }
21822 _ACEOF
21823 for ac_lib in '' nsl resolv network; do
21824 if test -z "$ac_lib"; then
21825 ac_res="none required"
21826 else
21827 ac_res=-l$ac_lib
21828 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
21829 fi
21830 if ac_fn_c_try_link "$LINENO"; then :
21831 ac_cv_search_inet_ntop=$ac_res
21832 fi
21833 rm -f core conftest.err conftest.$ac_objext \
21834 conftest$ac_exeext
21835 if ${ac_cv_search_inet_ntop+:} false; then :
21836 break
21837 fi
21838 done
21839 if ${ac_cv_search_inet_ntop+:} false; then :
21840
21841 else
21842 ac_cv_search_inet_ntop=no
21843 fi
21844 rm conftest.$ac_ext
21845 LIBS=$ac_func_search_save_LIBS
21846 fi
21847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5
21848 $as_echo "$ac_cv_search_inet_ntop" >&6; }
21849 ac_res=$ac_cv_search_inet_ntop
21850 if test "$ac_res" != no; then :
21851 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21852
21853 else
21854 for ac_func in inet_ntop
21855 do :
21856 ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
21857 if test "x$ac_cv_func_inet_ntop" = xyes; then :
21858 cat >>confdefs.h <<_ACEOF
21859 #define HAVE_INET_NTOP 1
21860 _ACEOF
21861
21862 fi
21863 done
21864
21865 if test $ac_cv_func_inet_ntop = no; then
21866 HAVE_INET_NTOP=0
21867 fi
21868
21869 fi
21870
21871 LIBS=$gl_save_LIBS
21872
21873 if test "$ac_cv_search_inet_ntop" != "no" \
21874 && test "$ac_cv_search_inet_ntop" != "none required"; then
21875 INET_NTOP_LIB="$ac_cv_search_inet_ntop"
21876 fi
21877
21878
21879 ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <arpa/inet.h>
21880 #if HAVE_NETDB_H
21881 # include <netdb.h>
21882 #endif
21883
21884 "
21885 if test "x$ac_cv_have_decl_inet_ntop" = xyes; then :
21886 ac_have_decl=1
21887 else
21888 ac_have_decl=0
21889 fi
21890
21891 cat >>confdefs.h <<_ACEOF
21892 #define HAVE_DECL_INET_NTOP $ac_have_decl
21893 _ACEOF
21894
21895 if test $ac_cv_have_decl_inet_ntop = no; then
21896 HAVE_DECL_INET_NTOP=0
21897 fi
21898 fi
21899
21900
21901 if test $HAVE_INET_NTOP = 0 || test $REPLACE_INET_NTOP = 1; then
21902
21903
21904
21905
21906
21907
21908
21909
21910 gl_LIBOBJS="$gl_LIBOBJS inet_ntop.$ac_objext"
21911
21912
21913
21914
21915 fi
21916
21917
21918
21919
21920
21921 GNULIB_INET_NTOP=1
21922
21923
21924
21925
21926
21927
21928
21929 PRIPTR_PREFIX=
21930 if test -n "$STDINT_H"; then
21931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21932 /* end confdefs.h. */
21933
21934 #ifdef _WIN64
21935 LLP64
21936 #endif
21937
21938 int
21939 main ()
21940 {
21941
21942 ;
21943 return 0;
21944 }
21945
21946 _ACEOF
21947 if ac_fn_c_try_compile "$LINENO"; then :
21948 PRIPTR_PREFIX='"l"'
21949 else
21950 PRIPTR_PREFIX='"ll"'
21951 fi
21952 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21953 else
21954 for glpfx in '' l ll I64; do
21955 case $glpfx in
21956 '') gltype1='int';;
21957 l) gltype1='long int';;
21958 ll) gltype1='long long int';;
21959 I64) gltype1='__int64';;
21960 esac
21961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21962 /* end confdefs.h. */
21963 #include <stdint.h>
21964 extern intptr_t foo;
21965 extern $gltype1 foo;
21966 int
21967 main ()
21968 {
21969
21970 ;
21971 return 0;
21972 }
21973 _ACEOF
21974 if ac_fn_c_try_compile "$LINENO"; then :
21975 PRIPTR_PREFIX='"'$glpfx'"'
21976 fi
21977 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21978 test -n "$PRIPTR_PREFIX" && break
21979 done
21980 fi
21981
21982
21983
21984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
21985 $as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
21986 if ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+:} false; then :
21987 $as_echo_n "(cached) " >&6
21988 else
21989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21990 /* end confdefs.h. */
21991 /* Work also in C++ mode. */
21992 #define __STDC_LIMIT_MACROS 1
21993
21994 /* Work if build is not clean. */
21995 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
21996
21997 #include <limits.h>
21998 #if HAVE_STDINT_H
21999 #include <stdint.h>
22000 #endif
22001
22002 #if defined INT32_MAX && defined INTMAX_MAX
22003 #define CONDITION (INT32_MAX < INTMAX_MAX)
22004 #else
22005 #define CONDITION (sizeof (int) < sizeof (long long int))
22006 #endif
22007 int test[CONDITION ? 1 : -1];
22008 int
22009 main ()
22010 {
22011
22012 ;
22013 return 0;
22014 }
22015 _ACEOF
22016 if ac_fn_c_try_compile "$LINENO"; then :
22017 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
22018 else
22019 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
22020 fi
22021 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22022 fi
22023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
22024 $as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
22025 if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
22026 INT32_MAX_LT_INTMAX_MAX=1;
22027 else
22028 INT32_MAX_LT_INTMAX_MAX=0;
22029 fi
22030
22031
22032 if test $APPLE_UNIVERSAL_BUILD = 0; then
22033
22034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
22035 $as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; }
22036 if ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+:} false; then :
22037 $as_echo_n "(cached) " >&6
22038 else
22039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22040 /* end confdefs.h. */
22041 /* Work also in C++ mode. */
22042 #define __STDC_LIMIT_MACROS 1
22043
22044 /* Work if build is not clean. */
22045 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
22046
22047 #include <limits.h>
22048 #if HAVE_STDINT_H
22049 #include <stdint.h>
22050 #endif
22051
22052 #if defined INT64_MAX
22053 #define CONDITION (INT64_MAX == LONG_MAX)
22054 #else
22055 #define CONDITION (sizeof (long long int) == sizeof (long int))
22056 #endif
22057 int test[CONDITION ? 1 : -1];
22058 int
22059 main ()
22060 {
22061
22062 ;
22063 return 0;
22064 }
22065 _ACEOF
22066 if ac_fn_c_try_compile "$LINENO"; then :
22067 gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
22068 else
22069 gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
22070 fi
22071 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22072 fi
22073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
22074 $as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
22075 if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
22076 INT64_MAX_EQ_LONG_MAX=1;
22077 else
22078 INT64_MAX_EQ_LONG_MAX=0;
22079 fi
22080
22081
22082 else
22083 INT64_MAX_EQ_LONG_MAX=-1
22084 fi
22085
22086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
22087 $as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
22088 if ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+:} false; then :
22089 $as_echo_n "(cached) " >&6
22090 else
22091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22092 /* end confdefs.h. */
22093 /* Work also in C++ mode. */
22094 #define __STDC_LIMIT_MACROS 1
22095
22096 /* Work if build is not clean. */
22097 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
22098
22099 #include <limits.h>
22100 #if HAVE_STDINT_H
22101 #include <stdint.h>
22102 #endif
22103
22104 #if defined UINT32_MAX && defined UINTMAX_MAX
22105 #define CONDITION (UINT32_MAX < UINTMAX_MAX)
22106 #else
22107 #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
22108 #endif
22109 int test[CONDITION ? 1 : -1];
22110 int
22111 main ()
22112 {
22113
22114 ;
22115 return 0;
22116 }
22117 _ACEOF
22118 if ac_fn_c_try_compile "$LINENO"; then :
22119 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
22120 else
22121 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
22122 fi
22123 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22124 fi
22125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
22126 $as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
22127 if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
22128 UINT32_MAX_LT_UINTMAX_MAX=1;
22129 else
22130 UINT32_MAX_LT_UINTMAX_MAX=0;
22131 fi
22132
22133
22134 if test $APPLE_UNIVERSAL_BUILD = 0; then
22135
22136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
22137 $as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
22138 if ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+:} false; then :
22139 $as_echo_n "(cached) " >&6
22140 else
22141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22142 /* end confdefs.h. */
22143 /* Work also in C++ mode. */
22144 #define __STDC_LIMIT_MACROS 1
22145
22146 /* Work if build is not clean. */
22147 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
22148
22149 #include <limits.h>
22150 #if HAVE_STDINT_H
22151 #include <stdint.h>
22152 #endif
22153
22154 #if defined UINT64_MAX
22155 #define CONDITION (UINT64_MAX == ULONG_MAX)
22156 #else
22157 #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
22158 #endif
22159 int test[CONDITION ? 1 : -1];
22160 int
22161 main ()
22162 {
22163
22164 ;
22165 return 0;
22166 }
22167 _ACEOF
22168 if ac_fn_c_try_compile "$LINENO"; then :
22169 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
22170 else
22171 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
22172 fi
22173 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22174 fi
22175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
22176 $as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
22177 if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
22178 UINT64_MAX_EQ_ULONG_MAX=1;
22179 else
22180 UINT64_MAX_EQ_ULONG_MAX=0;
22181 fi
22182
22183
22184 else
22185 UINT64_MAX_EQ_ULONG_MAX=-1
22186 fi
22187
22188
22189
22190
22191
22192
22193
22194
22195 if test $ac_cv_func_isblank = no; then
22196 HAVE_ISBLANK=0
22197 fi
22198
22199 if test $HAVE_ISBLANK = 0; then
22200
22201
22202
22203
22204
22205
22206
22207
22208 gl_LIBOBJS="$gl_LIBOBJS isblank.$ac_objext"
22209
22210 fi
22211
22212
22213 cat >>confdefs.h <<_ACEOF
22214 #define GNULIB_ISBLANK 1
22215 _ACEOF
22216
22217
22218
22219
22220
22221
22222
22223 GNULIB_ISBLANK=1
22224
22225
22226
22227
22228
22229
22230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
22231 $as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; }
22232 if ${gl_cv_func_isnand_no_libm+:} false; then :
22233 $as_echo_n "(cached) " >&6
22234 else
22235
22236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22237 /* end confdefs.h. */
22238 #include <math.h>
22239 #if (__GNUC__ >= 4) || (__clang_major__ >= 4)
22240 # undef isnand
22241 # define isnand(x) __builtin_isnan ((double)(x))
22242 #else
22243 # undef isnand
22244 # define isnand(x) isnan ((double)(x))
22245 #endif
22246 double x;
22247 int
22248 main ()
22249 {
22250 return isnand (x);
22251 ;
22252 return 0;
22253 }
22254 _ACEOF
22255 if ac_fn_c_try_link "$LINENO"; then :
22256 gl_cv_func_isnand_no_libm=yes
22257 else
22258 gl_cv_func_isnand_no_libm=no
22259 fi
22260 rm -f core conftest.err conftest.$ac_objext \
22261 conftest$ac_exeext conftest.$ac_ext
22262
22263 fi
22264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
22265 $as_echo "$gl_cv_func_isnand_no_libm" >&6; }
22266
22267 gl_func_isnand_no_libm=$gl_cv_func_isnand_no_libm
22268 if test $gl_cv_func_isnand_no_libm = yes; then
22269
22270 $as_echo "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h
22271
22272 fi
22273
22274 if test $gl_func_isnand_no_libm != yes; then
22275
22276
22277
22278
22279
22280
22281
22282
22283 gl_LIBOBJS="$gl_LIBOBJS isnand.$ac_objext"
22284
22285
22286
22287
22288 fi
22289
22290
22291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
22292 $as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; }
22293 if ${gl_cv_func_isnanl_no_libm+:} false; then :
22294 $as_echo_n "(cached) " >&6
22295 else
22296
22297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22298 /* end confdefs.h. */
22299 #include <math.h>
22300 #if (__GNUC__ >= 4) || (__clang_major__ >= 4)
22301 # undef isnanl
22302 # define isnanl(x) __builtin_isnan ((long double)(x))
22303 #elif defined isnan
22304 # undef isnanl
22305 # define isnanl(x) isnan ((long double)(x))
22306 #endif
22307 long double x;
22308 int
22309 main ()
22310 {
22311 return isnanl (x);
22312 ;
22313 return 0;
22314 }
22315 _ACEOF
22316 if ac_fn_c_try_link "$LINENO"; then :
22317 gl_cv_func_isnanl_no_libm=yes
22318 else
22319 gl_cv_func_isnanl_no_libm=no
22320 fi
22321 rm -f core conftest.err conftest.$ac_objext \
22322 conftest$ac_exeext conftest.$ac_ext
22323
22324 fi
22325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
22326 $as_echo "$gl_cv_func_isnanl_no_libm" >&6; }
22327
22328 gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm
22329 if test $gl_func_isnanl_no_libm = yes; then
22330
22331
22332
22333
22334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
22335 $as_echo_n "checking whether isnanl works... " >&6; }
22336 if ${gl_cv_func_isnanl_works+:} false; then :
22337 $as_echo_n "(cached) " >&6
22338 else
22339
22340 if test "$cross_compiling" = yes; then :
22341 case "$host_os" in
22342 mingw*) # Guess yes on mingw, no on MSVC.
22343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22344 /* end confdefs.h. */
22345
22346 #ifdef __MINGW32__
22347 Known
22348 #endif
22349
22350 _ACEOF
22351 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22352 $EGREP "Known" >/dev/null 2>&1; then :
22353 gl_cv_func_isnanl_works="guessing yes"
22354 else
22355 gl_cv_func_isnanl_works="guessing no"
22356 fi
22357 rm -f conftest*
22358
22359 ;;
22360 *) gl_cv_func_isnanl_works="guessing yes" ;;
22361 esac
22362
22363 else
22364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22365 /* end confdefs.h. */
22366
22367 #include <float.h>
22368 #include <limits.h>
22369 #include <math.h>
22370 #if (__GNUC__ >= 4) || (__clang_major__ >= 4)
22371 # undef isnanl
22372 # define isnanl(x) __builtin_isnan ((long double)(x))
22373 #elif defined isnan
22374 # undef isnanl
22375 # define isnanl(x) isnan ((long double)(x))
22376 #endif
22377 #define NWORDS \
22378 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
22379 typedef union { unsigned int word[NWORDS]; long double value; }
22380 memory_long_double;
22381 /* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
22382 runtime type conversion. */
22383 #ifdef __sgi
22384 static long double NaNl ()
22385 {
22386 double zero = 0.0;
22387 return zero / zero;
22388 }
22389 #else
22390 # define NaNl() (0.0L / 0.0L)
22391 #endif
22392 int main ()
22393 {
22394 int result = 0;
22395
22396 if (!isnanl (NaNl ()))
22397 result |= 1;
22398
22399 {
22400 memory_long_double m;
22401 unsigned int i;
22402
22403 /* The isnanl function should be immune against changes in the sign bit and
22404 in the mantissa bits. The xor operation twiddles a bit that can only be
22405 a sign bit or a mantissa bit (since the exponent never extends to
22406 bit 31). */
22407 m.value = NaNl ();
22408 m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
22409 for (i = 0; i < NWORDS; i++)
22410 m.word[i] |= 1;
22411 if (!isnanl (m.value))
22412 result |= 1;
22413 }
22414
22415 #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
22416 /* Representation of an 80-bit 'long double' as an initializer for a sequence
22417 of 'unsigned int' words. */
22418 # ifdef WORDS_BIGENDIAN
22419 # define LDBL80_WORDS(exponent,manthi,mantlo) \
22420 { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
22421 ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \
22422 (unsigned int) (mantlo) << 16 \
22423 }
22424 # else
22425 # define LDBL80_WORDS(exponent,manthi,mantlo) \
22426 { mantlo, manthi, exponent }
22427 # endif
22428 { /* Quiet NaN. */
22429 static memory_long_double x =
22430 { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
22431 if (!isnanl (x.value))
22432 result |= 2;
22433 }
22434 {
22435 /* Signalling NaN. */
22436 static memory_long_double x =
22437 { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
22438 if (!isnanl (x.value))
22439 result |= 2;
22440 }
22441 /* isnanl should return something even for noncanonical values. */
22442 { /* Pseudo-NaN. */
22443 static memory_long_double x =
22444 { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
22445 if (isnanl (x.value) && !isnanl (x.value))
22446 result |= 4;
22447 }
22448 { /* Pseudo-Infinity. */
22449 static memory_long_double x =
22450 { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
22451 if (isnanl (x.value) && !isnanl (x.value))
22452 result |= 8;
22453 }
22454 { /* Pseudo-Zero. */
22455 static memory_long_double x =
22456 { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
22457 if (isnanl (x.value) && !isnanl (x.value))
22458 result |= 16;
22459 }
22460 { /* Unnormalized number. */
22461 static memory_long_double x =
22462 { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
22463 if (isnanl (x.value) && !isnanl (x.value))
22464 result |= 32;
22465 }
22466 { /* Pseudo-Denormal. */
22467 static memory_long_double x =
22468 { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
22469 if (isnanl (x.value) && !isnanl (x.value))
22470 result |= 64;
22471 }
22472 #endif
22473
22474 return result;
22475 }
22476 _ACEOF
22477 if ac_fn_c_try_run "$LINENO"; then :
22478 gl_cv_func_isnanl_works=yes
22479 else
22480 gl_cv_func_isnanl_works=no
22481 fi
22482 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22483 conftest.$ac_objext conftest.beam conftest.$ac_ext
22484 fi
22485
22486
22487 fi
22488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
22489 $as_echo "$gl_cv_func_isnanl_works" >&6; }
22490
22491 case "$gl_cv_func_isnanl_works" in
22492 *yes) ;;
22493 *) gl_func_isnanl_no_libm=no ;;
22494 esac
22495 fi
22496 if test $gl_func_isnanl_no_libm = yes; then
22497
22498 $as_echo "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h
22499
22500 fi
22501
22502 if test $gl_func_isnanl_no_libm != yes; then
22503
22504
22505
22506
22507
22508
22509
22510
22511 gl_LIBOBJS="$gl_LIBOBJS isnanl.$ac_objext"
22512
22513
22514
22515
22516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
22517 $as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
22518 if ${gl_cv_cc_long_double_expbit0+:} false; then :
22519 $as_echo_n "(cached) " >&6
22520 else
22521
22522 if test "$cross_compiling" = yes; then :
22523
22524 gl_cv_cc_long_double_expbit0="unknown"
22525 case "$host_os" in
22526 mingw*) # On native Windows (little-endian), we know the result
22527 # in two cases: mingw, MSVC.
22528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22529 /* end confdefs.h. */
22530
22531 #ifdef __MINGW32__
22532 Known
22533 #endif
22534
22535 _ACEOF
22536 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22537 $EGREP "Known" >/dev/null 2>&1; then :
22538 gl_cv_cc_long_double_expbit0="word 2 bit 0"
22539 fi
22540 rm -f conftest*
22541
22542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22543 /* end confdefs.h. */
22544
22545 #ifdef _MSC_VER
22546 Known
22547 #endif
22548
22549 _ACEOF
22550 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22551 $EGREP "Known" >/dev/null 2>&1; then :
22552 gl_cv_cc_long_double_expbit0="word 1 bit 20"
22553 fi
22554 rm -f conftest*
22555
22556 ;;
22557 esac
22558
22559 else
22560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22561 /* end confdefs.h. */
22562
22563 #include <float.h>
22564 #include <stddef.h>
22565 #include <stdio.h>
22566 #include <string.h>
22567 #define NWORDS \
22568 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
22569 typedef union { long double value; unsigned int word[NWORDS]; }
22570 memory_long_double;
22571 static unsigned int ored_words[NWORDS];
22572 static unsigned int anded_words[NWORDS];
22573 static void add_to_ored_words (long double *x)
22574 {
22575 memory_long_double m;
22576 size_t i;
22577 /* Clear it first, in case
22578 sizeof (long double) < sizeof (memory_long_double). */
22579 memset (&m, 0, sizeof (memory_long_double));
22580 m.value = *x;
22581 for (i = 0; i < NWORDS; i++)
22582 {
22583 ored_words[i] |= m.word[i];
22584 anded_words[i] &= m.word[i];
22585 }
22586 }
22587 int main ()
22588 {
22589 static long double samples[5] = { 0.25L, 0.5L, 1.0L, 2.0L, 4.0L };
22590 size_t j;
22591 FILE *fp = fopen ("conftest.out", "w");
22592 if (fp == NULL)
22593 return 1;
22594 for (j = 0; j < NWORDS; j++)
22595 anded_words[j] = ~ (unsigned int) 0;
22596 for (j = 0; j < 5; j++)
22597 add_to_ored_words (&samples[j]);
22598 /* Remove bits that are common (e.g. if representation of the first mantissa
22599 bit is explicit). */
22600 for (j = 0; j < NWORDS; j++)
22601 ored_words[j] &= ~anded_words[j];
22602 /* Now find the nonzero word. */
22603 for (j = 0; j < NWORDS; j++)
22604 if (ored_words[j] != 0)
22605 break;
22606 if (j < NWORDS)
22607 {
22608 size_t i;
22609 for (i = j + 1; i < NWORDS; i++)
22610 if (ored_words[i] != 0)
22611 {
22612 fprintf (fp, "unknown");
22613 return (fclose (fp) != 0);
22614 }
22615 for (i = 0; ; i++)
22616 if ((ored_words[j] >> i) & 1)
22617 {
22618 fprintf (fp, "word %d bit %d", (int) j, (int) i);
22619 return (fclose (fp) != 0);
22620 }
22621 }
22622 fprintf (fp, "unknown");
22623 return (fclose (fp) != 0);
22624 }
22625
22626 _ACEOF
22627 if ac_fn_c_try_run "$LINENO"; then :
22628 gl_cv_cc_long_double_expbit0=`cat conftest.out`
22629 else
22630 gl_cv_cc_long_double_expbit0="unknown"
22631 fi
22632 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22633 conftest.$ac_objext conftest.beam conftest.$ac_ext
22634 fi
22635
22636 rm -f conftest.out
22637
22638 fi
22639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
22640 $as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
22641 case "$gl_cv_cc_long_double_expbit0" in
22642 word*bit*)
22643 word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
22644 bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
22645
22646 cat >>confdefs.h <<_ACEOF
22647 #define LDBL_EXPBIT0_WORD $word
22648 _ACEOF
22649
22650
22651 cat >>confdefs.h <<_ACEOF
22652 #define LDBL_EXPBIT0_BIT $bit
22653 _ACEOF
22654
22655 ;;
22656 esac
22657
22658
22659
22660 fi
22661
22662
22663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the __inline keyword" >&5
22664 $as_echo_n "checking whether the compiler supports the __inline keyword... " >&6; }
22665 if ${gl_cv_c___inline+:} false; then :
22666 $as_echo_n "(cached) " >&6
22667 else
22668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22669 /* end confdefs.h. */
22670 typedef int foo_t;
22671 static __inline foo_t foo (void) { return 0; }
22672 int
22673 main ()
22674 {
22675 return foo ();
22676 ;
22677 return 0;
22678 }
22679 _ACEOF
22680 if ac_fn_c_try_compile "$LINENO"; then :
22681 gl_cv_c___inline=yes
22682 else
22683 gl_cv_c___inline=no
22684 fi
22685 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22686 fi
22687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c___inline" >&5
22688 $as_echo "$gl_cv_c___inline" >&6; }
22689 if test $gl_cv_c___inline = yes; then
22690
22691 $as_echo "#define HAVE___INLINE 1" >>confdefs.h
22692
22693 fi
22694
22695
22696
22697
22698
22699 LOCALCHARSET_TESTS_ENVIRONMENT=
22700
22701
22702
22703
22704
22705
22706
22707
22708
22709
22710
22711 case "$host_os" in
22712 solaris*)
22713
22714 $as_echo "#define _LCONV_C99 1" >>confdefs.h
22715
22716 ;;
22717 esac
22718
22719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5
22720 $as_echo_n "checking whether locale.h conforms to POSIX:2001... " >&6; }
22721 if ${gl_cv_header_locale_h_posix2001+:} false; then :
22722 $as_echo_n "(cached) " >&6
22723 else
22724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22725 /* end confdefs.h. */
22726 #include <locale.h>
22727 int x = LC_MESSAGES;
22728 int y = sizeof (((struct lconv *) 0)->decimal_point);
22729 int
22730 main ()
22731 {
22732
22733 ;
22734 return 0;
22735 }
22736 _ACEOF
22737 if ac_fn_c_try_compile "$LINENO"; then :
22738 gl_cv_header_locale_h_posix2001=yes
22739 else
22740 gl_cv_header_locale_h_posix2001=no
22741 fi
22742 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22743 fi
22744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_h_posix2001" >&5
22745 $as_echo "$gl_cv_header_locale_h_posix2001" >&6; }
22746
22747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct lconv is properly defined" >&5
22748 $as_echo_n "checking whether struct lconv is properly defined... " >&6; }
22749 if ${gl_cv_sys_struct_lconv_ok+:} false; then :
22750 $as_echo_n "(cached) " >&6
22751 else
22752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22753 /* end confdefs.h. */
22754 #include <locale.h>
22755 struct lconv l;
22756 int x = sizeof (l.decimal_point);
22757 int y = sizeof (l.int_p_cs_precedes);
22758 int
22759 main ()
22760 {
22761
22762 ;
22763 return 0;
22764 }
22765 _ACEOF
22766 if ac_fn_c_try_compile "$LINENO"; then :
22767 gl_cv_sys_struct_lconv_ok=yes
22768 else
22769 gl_cv_sys_struct_lconv_ok=no
22770 fi
22771 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22772
22773 fi
22774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_lconv_ok" >&5
22775 $as_echo "$gl_cv_sys_struct_lconv_ok" >&6; }
22776 if test $gl_cv_sys_struct_lconv_ok = no; then
22777 case "$host_os" in
22778 mingw*)
22779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22780 /* end confdefs.h. */
22781
22782 #ifdef _MSC_VER
22783 Special
22784 #endif
22785
22786 _ACEOF
22787 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22788 $EGREP "Special" >/dev/null 2>&1; then :
22789
22790 else
22791 REPLACE_STRUCT_LCONV=1
22792 fi
22793 rm -f conftest*
22794
22795 ;;
22796 *) REPLACE_STRUCT_LCONV=1 ;;
22797 esac
22798 fi
22799
22800
22801
22802
22803
22804
22805
22806
22807
22808 if test $gl_cv_have_include_next = yes; then
22809 gl_cv_next_locale_h='<'locale.h'>'
22810 else
22811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <locale.h>" >&5
22812 $as_echo_n "checking absolute name of <locale.h>... " >&6; }
22813 if ${gl_cv_next_locale_h+:} false; then :
22814 $as_echo_n "(cached) " >&6
22815 else
22816
22817
22818
22819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22820 /* end confdefs.h. */
22821 #include <locale.h>
22822 _ACEOF
22823 case "$host_os" in
22824 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22825 *) gl_absname_cpp="$ac_cpp" ;;
22826 esac
22827
22828 case "$host_os" in
22829 mingw*)
22830 gl_dirsep_regex='[/\\]'
22831 ;;
22832 *)
22833 gl_dirsep_regex='\/'
22834 ;;
22835 esac
22836 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22837 gl_header_literal_regex=`echo 'locale.h' \
22838 | sed -e "$gl_make_literal_regex_sed"`
22839 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22840 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22841 s|^/[^/]|//&|
22842 p
22843 q
22844 }'
22845
22846 gl_cv_absolute_locale_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22847 sed -n "$gl_absolute_header_sed"`
22848
22849 gl_header=$gl_cv_absolute_locale_h
22850 gl_cv_next_locale_h='"'$gl_header'"'
22851
22852
22853 fi
22854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_locale_h" >&5
22855 $as_echo "$gl_cv_next_locale_h" >&6; }
22856 fi
22857 NEXT_LOCALE_H=$gl_cv_next_locale_h
22858
22859 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22860 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22861 gl_next_as_first_directive='<'locale.h'>'
22862 else
22863 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22864 gl_next_as_first_directive=$gl_cv_next_locale_h
22865 fi
22866 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H=$gl_next_as_first_directive
22867
22868
22869
22870
22871
22872
22873
22874
22875
22876
22877
22878 if test "$gl_threads_api" = posix; then
22879 # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
22880 # pthread_rwlock_* functions.
22881 has_rwlock=false
22882 ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
22883 "
22884 if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then :
22885 has_rwlock=true
22886
22887 $as_echo "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
22888
22889 fi
22890
22891 if $has_rwlock; then
22892
22893
22894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_rwlock_rdlock prefers a writer to a reader" >&5
22895 $as_echo_n "checking whether pthread_rwlock_rdlock prefers a writer to a reader... " >&6; }
22896 if ${gl_cv_pthread_rwlock_rdlock_prefer_writer+:} false; then :
22897 $as_echo_n "(cached) " >&6
22898 else
22899 save_LIBS="$LIBS"
22900 LIBS="$LIBS $LIBMULTITHREAD"
22901 if test "$cross_compiling" = yes; then :
22902 case "$host_os" in
22903 # Guess no on glibc systems.
22904 *-gnu* | gnu*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
22905 # Guess no on musl systems.
22906 *-musl*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
22907 # Guess no on bionic systems.
22908 *-android*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
22909 # Guess yes on native Windows with the mingw-w64 winpthreads library.
22910 # Guess no on native Windows with the gnulib windows-rwlock module.
22911 mingw*) if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
22912 gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing yes"
22913 else
22914 gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no"
22915 fi
22916 ;;
22917 # If we don't know, obey --enable-cross-guesses.
22918 *) gl_cv_pthread_rwlock_rdlock_prefer_writer="$gl_cross_guess_normal" ;;
22919 esac
22920
22921 else
22922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22923 /* end confdefs.h. */
22924
22925 #include <errno.h>
22926 #include <pthread.h>
22927 #include <stdlib.h>
22928 #include <unistd.h>
22929
22930 #define SUCCEED() exit (0)
22931 #define FAILURE() exit (1)
22932 #define UNEXPECTED(n) (exit (10 + (n)))
22933
22934 /* The main thread creates the waiting writer and the requesting reader threads
22935 in the default way; this guarantees that they have the same priority.
22936 We can reuse the main thread as first reader thread. */
22937
22938 static pthread_rwlock_t lock;
22939 static pthread_t reader1;
22940 static pthread_t writer;
22941 static pthread_t reader2;
22942 static pthread_t timer;
22943 /* Used to pass control from writer to reader2 and from reader2 to timer,
22944 as in a relay race.
22945 Passing control from one running thread to another running thread
22946 is most likely faster than to create the second thread. */
22947 static pthread_mutex_t baton;
22948
22949 static void *
22950 timer_func (void *ignored)
22951 {
22952 /* Step 13 (can be before or after step 12):
22953 The timer thread takes the baton, then waits a moment to make sure
22954 it can tell whether the second reader thread is blocked at step 12. */
22955 if (pthread_mutex_lock (&baton))
22956 UNEXPECTED (13);
22957 usleep (100000);
22958 /* By the time we get here, it's clear that the second reader thread is
22959 blocked at step 12. This is the desired behaviour. */
22960 SUCCEED ();
22961 }
22962
22963 static void *
22964 reader2_func (void *ignored)
22965 {
22966 int err;
22967
22968 /* Step 8 (can be before or after step 7):
22969 The second reader thread takes the baton, then waits a moment to make sure
22970 the writer thread has reached step 7. */
22971 if (pthread_mutex_lock (&baton))
22972 UNEXPECTED (8);
22973 usleep (100000);
22974 /* Step 9: The second reader thread requests the lock. */
22975 err = pthread_rwlock_tryrdlock (&lock);
22976 if (err == 0)
22977 FAILURE ();
22978 else if (err != EBUSY)
22979 UNEXPECTED (9);
22980 /* Step 10: Launch a timer, to test whether the next call blocks. */
22981 if (pthread_create (&timer, NULL, timer_func, NULL))
22982 UNEXPECTED (10);
22983 /* Step 11: Release the baton. */
22984 if (pthread_mutex_unlock (&baton))
22985 UNEXPECTED (11);
22986 /* Step 12: The second reader thread requests the lock. */
22987 err = pthread_rwlock_rdlock (&lock);
22988 if (err == 0)
22989 FAILURE ();
22990 else
22991 UNEXPECTED (12);
22992 }
22993
22994 static void *
22995 writer_func (void *ignored)
22996 {
22997 /* Step 4: Take the baton, so that the second reader thread does not go ahead
22998 too early. */
22999 if (pthread_mutex_lock (&baton))
23000 UNEXPECTED (4);
23001 /* Step 5: Create the second reader thread. */
23002 if (pthread_create (&reader2, NULL, reader2_func, NULL))
23003 UNEXPECTED (5);
23004 /* Step 6: Release the baton. */
23005 if (pthread_mutex_unlock (&baton))
23006 UNEXPECTED (6);
23007 /* Step 7: The writer thread requests the lock. */
23008 if (pthread_rwlock_wrlock (&lock))
23009 UNEXPECTED (7);
23010 return NULL;
23011 }
23012
23013 int
23014 main ()
23015 {
23016 reader1 = pthread_self ();
23017
23018 /* Step 1: The main thread initializes the lock and the baton. */
23019 if (pthread_rwlock_init (&lock, NULL))
23020 UNEXPECTED (1);
23021 if (pthread_mutex_init (&baton, NULL))
23022 UNEXPECTED (1);
23023 /* Step 2: The main thread acquires the lock as a reader. */
23024 if (pthread_rwlock_rdlock (&lock))
23025 UNEXPECTED (2);
23026 /* Step 3: Create the writer thread. */
23027 if (pthread_create (&writer, NULL, writer_func, NULL))
23028 UNEXPECTED (3);
23029 /* Job done. Go to sleep. */
23030 for (;;)
23031 {
23032 sleep (1);
23033 }
23034 }
23035
23036 _ACEOF
23037 if ac_fn_c_try_run "$LINENO"; then :
23038 gl_cv_pthread_rwlock_rdlock_prefer_writer=yes
23039 else
23040 gl_cv_pthread_rwlock_rdlock_prefer_writer=no
23041 fi
23042 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23043 conftest.$ac_objext conftest.beam conftest.$ac_ext
23044 fi
23045
23046 LIBS="$save_LIBS"
23047
23048 fi
23049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pthread_rwlock_rdlock_prefer_writer" >&5
23050 $as_echo "$gl_cv_pthread_rwlock_rdlock_prefer_writer" >&6; }
23051 case "$gl_cv_pthread_rwlock_rdlock_prefer_writer" in
23052 *yes)
23053
23054 $as_echo "#define HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER 1" >>confdefs.h
23055
23056 ;;
23057 esac
23058
23059 fi
23060 # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
23061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23062 /* end confdefs.h. */
23063
23064 #include <pthread.h>
23065 int
23066 main ()
23067 {
23068
23069 #if __FreeBSD__ == 4
23070 error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
23071 #elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \
23072 && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
23073 error "No, in Mac OS X < 10.7 recursive mutexes actually don't work."
23074 #else
23075 int x = (int)PTHREAD_MUTEX_RECURSIVE;
23076 return !x;
23077 #endif
23078
23079 ;
23080 return 0;
23081 }
23082 _ACEOF
23083 if ac_fn_c_try_compile "$LINENO"; then :
23084
23085 $as_echo "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h
23086
23087 fi
23088 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23089 fi
23090 :
23091
23092
23093
23094 cat >>confdefs.h <<_ACEOF
23095 #define GNULIB_LOCK 1
23096 _ACEOF
23097
23098
23099
23100
23101
23102
23103 if test $ac_cv_func_lstat = yes; then
23104
23105 case $host_os,$gl_cv_func_lstat_dereferences_slashed_symlink in
23106 solaris* | *no)
23107 REPLACE_LSTAT=1
23108 ;;
23109 esac
23110 else
23111 HAVE_LSTAT=0
23112 fi
23113
23114 if test $REPLACE_LSTAT = 1; then
23115
23116
23117
23118
23119
23120
23121
23122
23123 gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
23124
23125 :
23126 fi
23127
23128
23129
23130
23131
23132 GNULIB_LSTAT=1
23133
23134
23135
23136
23137
23138 $as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
23139
23140
23141
23142
23143
23144
23145 if test $gl_cv_func_malloc_posix = yes; then
23146
23147 $as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
23148
23149 else
23150 REPLACE_MALLOC=1
23151 fi
23152
23153 if test $REPLACE_MALLOC = 1; then
23154
23155
23156
23157
23158
23159
23160
23161
23162 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
23163
23164 fi
23165
23166
23167
23168
23169
23170 GNULIB_MALLOC_POSIX=1
23171
23172
23173
23174
23175
23176 $as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
23177
23178
23179
23180
23181
23182
23183
23184
23185
23186
23187
23188
23189
23190
23191
23192
23193
23194 if test $gl_cv_have_include_next = yes; then
23195 gl_cv_next_math_h='<'math.h'>'
23196 else
23197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
23198 $as_echo_n "checking absolute name of <math.h>... " >&6; }
23199 if ${gl_cv_next_math_h+:} false; then :
23200 $as_echo_n "(cached) " >&6
23201 else
23202
23203 if test $ac_cv_header_math_h = yes; then
23204
23205
23206
23207
23208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23209 /* end confdefs.h. */
23210 #include <math.h>
23211 _ACEOF
23212 case "$host_os" in
23213 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23214 *) gl_absname_cpp="$ac_cpp" ;;
23215 esac
23216
23217 case "$host_os" in
23218 mingw*)
23219 gl_dirsep_regex='[/\\]'
23220 ;;
23221 *)
23222 gl_dirsep_regex='\/'
23223 ;;
23224 esac
23225 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23226 gl_header_literal_regex=`echo 'math.h' \
23227 | sed -e "$gl_make_literal_regex_sed"`
23228 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23229 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23230 s|^/[^/]|//&|
23231 p
23232 q
23233 }'
23234
23235 gl_cv_absolute_math_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23236 sed -n "$gl_absolute_header_sed"`
23237
23238 gl_header=$gl_cv_absolute_math_h
23239 gl_cv_next_math_h='"'$gl_header'"'
23240 else
23241 gl_cv_next_math_h='<'math.h'>'
23242 fi
23243
23244
23245 fi
23246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
23247 $as_echo "$gl_cv_next_math_h" >&6; }
23248 fi
23249 NEXT_MATH_H=$gl_cv_next_math_h
23250
23251 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23252 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23253 gl_next_as_first_directive='<'math.h'>'
23254 else
23255 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23256 gl_next_as_first_directive=$gl_cv_next_math_h
23257 fi
23258 NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive
23259
23260
23261
23262
23263
23264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
23265 $as_echo_n "checking whether NAN macro works... " >&6; }
23266 if ${gl_cv_header_math_nan_works+:} false; then :
23267 $as_echo_n "(cached) " >&6
23268 else
23269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23270 /* end confdefs.h. */
23271 #include <math.h>
23272 int
23273 main ()
23274 {
23275 /* Solaris 10 has a broken definition of NAN. Other platforms
23276 fail to provide NAN, or provide it only in C99 mode; this
23277 test only needs to fail when NAN is provided but wrong. */
23278 float f = 1.0f;
23279 #ifdef NAN
23280 f = NAN;
23281 #endif
23282 return f == 0;
23283 ;
23284 return 0;
23285 }
23286 _ACEOF
23287 if ac_fn_c_try_compile "$LINENO"; then :
23288 gl_cv_header_math_nan_works=yes
23289 else
23290 gl_cv_header_math_nan_works=no
23291 fi
23292 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23293 fi
23294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5
23295 $as_echo "$gl_cv_header_math_nan_works" >&6; }
23296 if test $gl_cv_header_math_nan_works = no; then
23297 REPLACE_NAN=1
23298 fi
23299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
23300 $as_echo_n "checking whether HUGE_VAL works... " >&6; }
23301 if ${gl_cv_header_math_huge_val_works+:} false; then :
23302 $as_echo_n "(cached) " >&6
23303 else
23304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23305 /* end confdefs.h. */
23306 #include <math.h>
23307 int
23308 main ()
23309 {
23310 /* Solaris 10 has a broken definition of HUGE_VAL. */
23311 double d = HUGE_VAL;
23312 return d == 0;
23313 ;
23314 return 0;
23315 }
23316 _ACEOF
23317 if ac_fn_c_try_compile "$LINENO"; then :
23318 gl_cv_header_math_huge_val_works=yes
23319 else
23320 gl_cv_header_math_huge_val_works=no
23321 fi
23322 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23323 fi
23324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5
23325 $as_echo "$gl_cv_header_math_huge_val_works" >&6; }
23326 if test $gl_cv_header_math_huge_val_works = no; then
23327 REPLACE_HUGE_VAL=1
23328 fi
23329
23330
23331
23332
23333
23334
23335
23336
23337
23338
23339
23340
23341
23342
23343
23344
23345
23346
23347 if case "$host_os" in
23348 mingw*) true ;;
23349 *) test $ac_cv_func_mbsinit = yes ;;
23350 esac \
23351 && test $ac_cv_func_mbrtowc = yes; then
23352
23353
23354
23355
23356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
23357 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
23358 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
23359 $as_echo_n "(cached) " >&6
23360 else
23361
23362 case "$host_os" in
23363 # Guess no on AIX and OSF/1.
23364 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
23365 # Guess yes otherwise.
23366 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
23367 esac
23368 if test $LOCALE_JA != none; then
23369 if test "$cross_compiling" = yes; then :
23370 :
23371 else
23372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23373 /* end confdefs.h. */
23374
23375 #include <locale.h>
23376 #include <string.h>
23377 #include <wchar.h>
23378 int main ()
23379 {
23380 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
23381 {
23382 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
23383 mbstate_t state;
23384 wchar_t wc;
23385
23386 memset (&state, '\0', sizeof (mbstate_t));
23387 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
23388 if (mbsinit (&state))
23389 return 2;
23390 }
23391 return 0;
23392 }
23393 _ACEOF
23394 if ac_fn_c_try_run "$LINENO"; then :
23395 gl_cv_func_mbrtowc_incomplete_state=yes
23396 else
23397 gl_cv_func_mbrtowc_incomplete_state=no
23398 fi
23399 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23400 conftest.$ac_objext conftest.beam conftest.$ac_ext
23401 fi
23402
23403 else
23404 if test $LOCALE_FR_UTF8 != none; then
23405 if test "$cross_compiling" = yes; then :
23406 :
23407 else
23408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23409 /* end confdefs.h. */
23410
23411 #include <locale.h>
23412 #include <string.h>
23413 #include <wchar.h>
23414 int main ()
23415 {
23416 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
23417 {
23418 const char input[] = "B\303\274\303\237er"; /* "Büßer" */
23419 mbstate_t state;
23420 wchar_t wc;
23421
23422 memset (&state, '\0', sizeof (mbstate_t));
23423 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
23424 if (mbsinit (&state))
23425 return 2;
23426 }
23427 return 0;
23428 }
23429 _ACEOF
23430 if ac_fn_c_try_run "$LINENO"; then :
23431 gl_cv_func_mbrtowc_incomplete_state=yes
23432 else
23433 gl_cv_func_mbrtowc_incomplete_state=no
23434 fi
23435 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23436 conftest.$ac_objext conftest.beam conftest.$ac_ext
23437 fi
23438
23439 fi
23440 fi
23441
23442 fi
23443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
23444 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
23445
23446
23447
23448
23449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
23450 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
23451 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
23452 $as_echo_n "(cached) " >&6
23453 else
23454
23455 case "$host_os" in
23456 # Guess no on Solaris 8.
23457 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
23458 # Guess yes otherwise.
23459 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
23460 esac
23461 if test $LOCALE_ZH_CN != none; then
23462 if test "$cross_compiling" = yes; then :
23463 :
23464 else
23465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23466 /* end confdefs.h. */
23467
23468 #include <locale.h>
23469 #include <stdlib.h>
23470 #include <string.h>
23471 #include <wchar.h>
23472 int main ()
23473 {
23474 /* This fails on Solaris 8:
23475 mbrtowc returns 2, and sets wc to 0x00F0.
23476 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
23477 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
23478 {
23479 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
23480 mbstate_t state;
23481 wchar_t wc;
23482
23483 memset (&state, '\0', sizeof (mbstate_t));
23484 if (mbrtowc (&wc, input + 3, 6, &state) != 4
23485 && mbtowc (&wc, input + 3, 6) == 4)
23486 return 2;
23487 }
23488 return 0;
23489 }
23490 _ACEOF
23491 if ac_fn_c_try_run "$LINENO"; then :
23492 gl_cv_func_mbrtowc_sanitycheck=yes
23493 else
23494 gl_cv_func_mbrtowc_sanitycheck=no
23495 fi
23496 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23497 conftest.$ac_objext conftest.beam conftest.$ac_ext
23498 fi
23499
23500 fi
23501
23502 fi
23503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
23504 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
23505
23506 REPLACE_MBSTATE_T=0
23507 case "$gl_cv_func_mbrtowc_incomplete_state" in
23508 *yes) ;;
23509 *) REPLACE_MBSTATE_T=1 ;;
23510 esac
23511 case "$gl_cv_func_mbrtowc_sanitycheck" in
23512 *yes) ;;
23513 *) REPLACE_MBSTATE_T=1 ;;
23514 esac
23515 else
23516 REPLACE_MBSTATE_T=1
23517 fi
23518
23519
23520
23521 if test $ac_cv_func_mbrtowc = no; then
23522 HAVE_MBRTOWC=0
23523 ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
23524 #include <wchar.h>
23525
23526 "
23527 if test "x$ac_cv_have_decl_mbrtowc" = xyes; then :
23528 ac_have_decl=1
23529 else
23530 ac_have_decl=0
23531 fi
23532
23533 cat >>confdefs.h <<_ACEOF
23534 #define HAVE_DECL_MBRTOWC $ac_have_decl
23535 _ACEOF
23536
23537 if test $ac_cv_have_decl_mbrtowc = yes; then
23538 REPLACE_MBRTOWC=1
23539 fi
23540 else
23541 if test $REPLACE_MBSTATE_T = 1; then
23542 REPLACE_MBRTOWC=1
23543 else
23544
23545
23546
23547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
23548 $as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
23549 if ${gl_cv_func_mbrtowc_null_arg1+:} false; then :
23550 $as_echo_n "(cached) " >&6
23551 else
23552
23553 case "$host_os" in
23554 # Guess no on Solaris.
23555 solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
23556 # Guess yes otherwise.
23557 *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
23558 esac
23559 if test $LOCALE_FR_UTF8 != none; then
23560 if test "$cross_compiling" = yes; then :
23561 :
23562 else
23563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23564 /* end confdefs.h. */
23565
23566 #include <locale.h>
23567 #include <stdlib.h>
23568 #include <string.h>
23569 #include <wchar.h>
23570 int main ()
23571 {
23572 int result = 0;
23573
23574 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
23575 {
23576 char input[] = "\303\237er";
23577 mbstate_t state;
23578 wchar_t wc;
23579 size_t ret;
23580
23581 memset (&state, '\0', sizeof (mbstate_t));
23582 wc = (wchar_t) 0xBADFACE;
23583 ret = mbrtowc (&wc, input, 5, &state);
23584 if (ret != 2)
23585 result |= 1;
23586 if (!mbsinit (&state))
23587 result |= 2;
23588
23589 memset (&state, '\0', sizeof (mbstate_t));
23590 ret = mbrtowc (NULL, input, 5, &state);
23591 if (ret != 2) /* Solaris 7 fails here: ret is -1. */
23592 result |= 4;
23593 if (!mbsinit (&state))
23594 result |= 8;
23595 }
23596 return result;
23597 }
23598 _ACEOF
23599 if ac_fn_c_try_run "$LINENO"; then :
23600 gl_cv_func_mbrtowc_null_arg1=yes
23601 else
23602 gl_cv_func_mbrtowc_null_arg1=no
23603 fi
23604 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23605 conftest.$ac_objext conftest.beam conftest.$ac_ext
23606 fi
23607
23608 fi
23609
23610 fi
23611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
23612 $as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; }
23613
23614
23615
23616
23617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
23618 $as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
23619 if ${gl_cv_func_mbrtowc_null_arg2+:} false; then :
23620 $as_echo_n "(cached) " >&6
23621 else
23622
23623 case "$host_os" in
23624 # Guess no on OSF/1.
23625 osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
23626 # Guess yes otherwise.
23627 *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
23628 esac
23629 if test $LOCALE_FR_UTF8 != none; then
23630 if test "$cross_compiling" = yes; then :
23631 :
23632 else
23633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23634 /* end confdefs.h. */
23635
23636 #include <locale.h>
23637 #include <string.h>
23638 #include <wchar.h>
23639 int main ()
23640 {
23641 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
23642 {
23643 mbstate_t state;
23644 wchar_t wc;
23645 int ret;
23646
23647 memset (&state, '\0', sizeof (mbstate_t));
23648 wc = (wchar_t) 0xBADFACE;
23649 mbrtowc (&wc, NULL, 5, &state);
23650 /* Check that wc was not modified. */
23651 if (wc != (wchar_t) 0xBADFACE)
23652 return 2;
23653 }
23654 return 0;
23655 }
23656 _ACEOF
23657 if ac_fn_c_try_run "$LINENO"; then :
23658 gl_cv_func_mbrtowc_null_arg2=yes
23659 else
23660 gl_cv_func_mbrtowc_null_arg2=no
23661 fi
23662 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23663 conftest.$ac_objext conftest.beam conftest.$ac_ext
23664 fi
23665
23666 fi
23667
23668 fi
23669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
23670 $as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; }
23671
23672
23673
23674
23675
23676
23677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
23678 $as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
23679 if ${gl_cv_func_mbrtowc_retval+:} false; then :
23680 $as_echo_n "(cached) " >&6
23681 else
23682
23683 case "$host_os" in
23684 # Guess no on HP-UX, Solaris, native Windows.
23685 hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
23686 # Guess yes otherwise.
23687 *) gl_cv_func_mbrtowc_retval="guessing yes" ;;
23688 esac
23689 if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
23690 || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
23691 if test "$cross_compiling" = yes; then :
23692 :
23693 else
23694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23695 /* end confdefs.h. */
23696
23697 #include <locale.h>
23698 #include <string.h>
23699 #include <wchar.h>
23700 int main ()
23701 {
23702 int result = 0;
23703 int found_some_locale = 0;
23704 /* This fails on Solaris. */
23705 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
23706 {
23707 char input[] = "B\303\274\303\237er"; /* "Büßer" */
23708 mbstate_t state;
23709 wchar_t wc;
23710
23711 memset (&state, '\0', sizeof (mbstate_t));
23712 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
23713 {
23714 input[1] = '\0';
23715 if (mbrtowc (&wc, input + 2, 5, &state) != 1)
23716 result |= 1;
23717 }
23718 found_some_locale = 1;
23719 }
23720 /* This fails on HP-UX 11.11. */
23721 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
23722 {
23723 char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
23724 mbstate_t state;
23725 wchar_t wc;
23726
23727 memset (&state, '\0', sizeof (mbstate_t));
23728 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
23729 {
23730 input[1] = '\0';
23731 if (mbrtowc (&wc, input + 2, 5, &state) != 2)
23732 result |= 2;
23733 }
23734 found_some_locale = 1;
23735 }
23736 /* This fails on native Windows. */
23737 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
23738 {
23739 char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
23740 mbstate_t state;
23741 wchar_t wc;
23742
23743 memset (&state, '\0', sizeof (mbstate_t));
23744 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
23745 {
23746 input[3] = '\0';
23747 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
23748 result |= 4;
23749 }
23750 found_some_locale = 1;
23751 }
23752 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
23753 {
23754 char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
23755 mbstate_t state;
23756 wchar_t wc;
23757
23758 memset (&state, '\0', sizeof (mbstate_t));
23759 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
23760 {
23761 input[3] = '\0';
23762 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
23763 result |= 8;
23764 }
23765 found_some_locale = 1;
23766 }
23767 if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
23768 {
23769 char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
23770 mbstate_t state;
23771 wchar_t wc;
23772
23773 memset (&state, '\0', sizeof (mbstate_t));
23774 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
23775 {
23776 input[3] = '\0';
23777 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
23778 result |= 16;
23779 }
23780 found_some_locale = 1;
23781 }
23782 return (found_some_locale ? result : 77);
23783 }
23784 _ACEOF
23785 if ac_fn_c_try_run "$LINENO"; then :
23786 gl_cv_func_mbrtowc_retval=yes
23787 else
23788 if test $? != 77; then
23789 gl_cv_func_mbrtowc_retval=no
23790 fi
23791
23792 fi
23793 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23794 conftest.$ac_objext conftest.beam conftest.$ac_ext
23795 fi
23796
23797 fi
23798
23799 fi
23800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
23801 $as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
23802
23803
23804
23805
23806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
23807 $as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
23808 if ${gl_cv_func_mbrtowc_nul_retval+:} false; then :
23809 $as_echo_n "(cached) " >&6
23810 else
23811
23812 case "$host_os" in
23813 # Guess no on Solaris 8 and 9.
23814 solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
23815 # Guess yes otherwise.
23816 *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
23817 esac
23818 if test $LOCALE_ZH_CN != none; then
23819 if test "$cross_compiling" = yes; then :
23820 :
23821 else
23822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23823 /* end confdefs.h. */
23824
23825 #include <locale.h>
23826 #include <string.h>
23827 #include <wchar.h>
23828 int main ()
23829 {
23830 /* This fails on Solaris 8 and 9. */
23831 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
23832 {
23833 mbstate_t state;
23834 wchar_t wc;
23835
23836 memset (&state, '\0', sizeof (mbstate_t));
23837 if (mbrtowc (&wc, "", 1, &state) != 0)
23838 return 2;
23839 }
23840 return 0;
23841 }
23842 _ACEOF
23843 if ac_fn_c_try_run "$LINENO"; then :
23844 gl_cv_func_mbrtowc_nul_retval=yes
23845 else
23846 gl_cv_func_mbrtowc_nul_retval=no
23847 fi
23848 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23849 conftest.$ac_objext conftest.beam conftest.$ac_ext
23850 fi
23851
23852 fi
23853
23854 fi
23855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
23856 $as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
23857
23858
23859
23860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc stores incomplete characters" >&5
23861 $as_echo_n "checking whether mbrtowc stores incomplete characters... " >&6; }
23862 if ${gl_cv_func_mbrtowc_stores_incomplete+:} false; then :
23863 $as_echo_n "(cached) " >&6
23864 else
23865
23866 case "$host_os" in
23867 # Guess yes on native Windows.
23868 mingw*) gl_cv_func_mbrtowc_stores_incomplete="guessing yes" ;;
23869 *) gl_cv_func_mbrtowc_stores_incomplete="guessing no" ;;
23870 esac
23871 case "$host_os" in
23872 mingw*)
23873 if test "$cross_compiling" = yes; then :
23874 :
23875 else
23876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23877 /* end confdefs.h. */
23878
23879 #include <locale.h>
23880 #include <string.h>
23881 #include <wchar.h>
23882 int main ()
23883 {
23884 int result = 0;
23885 if (setlocale (LC_ALL, "French_France.65001") != NULL)
23886 {
23887 wchar_t wc = (wchar_t) 0xBADFACE;
23888 mbstate_t state;
23889
23890 memset (&state, '\0', sizeof (mbstate_t));
23891 if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2)
23892 && wc != (wchar_t) 0xBADFACE)
23893 result |= 1;
23894 }
23895 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
23896 {
23897 wchar_t wc = (wchar_t) 0xBADFACE;
23898 mbstate_t state;
23899
23900 memset (&state, '\0', sizeof (mbstate_t));
23901 if (mbrtowc (&wc, "\226", 1, &state) == (size_t)(-2)
23902 && wc != (wchar_t) 0xBADFACE)
23903 result |= 2;
23904 }
23905 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
23906 {
23907 wchar_t wc = (wchar_t) 0xBADFACE;
23908 mbstate_t state;
23909
23910 memset (&state, '\0', sizeof (mbstate_t));
23911 if (mbrtowc (&wc, "\245", 1, &state) == (size_t)(-2)
23912 && wc != (wchar_t) 0xBADFACE)
23913 result |= 4;
23914 }
23915 if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
23916 {
23917 wchar_t wc = (wchar_t) 0xBADFACE;
23918 mbstate_t state;
23919
23920 memset (&state, '\0', sizeof (mbstate_t));
23921 if (mbrtowc (&wc, "\261", 1, &state) == (size_t)(-2)
23922 && wc != (wchar_t) 0xBADFACE)
23923 result |= 8;
23924 }
23925 return result;
23926 }
23927 _ACEOF
23928 if ac_fn_c_try_run "$LINENO"; then :
23929 gl_cv_func_mbrtowc_stores_incomplete=no
23930 else
23931 gl_cv_func_mbrtowc_stores_incomplete=yes
23932 fi
23933 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23934 conftest.$ac_objext conftest.beam conftest.$ac_ext
23935 fi
23936
23937 ;;
23938 *)
23939
23940 if test $LOCALE_FR_UTF8 != none; then
23941 if test "$cross_compiling" = yes; then :
23942 :
23943 else
23944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23945 /* end confdefs.h. */
23946
23947 #include <locale.h>
23948 #include <string.h>
23949 #include <wchar.h>
23950 int main ()
23951 {
23952 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
23953 {
23954 wchar_t wc = (wchar_t) 0xBADFACE;
23955 mbstate_t state;
23956
23957 memset (&state, '\0', sizeof (mbstate_t));
23958 if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2)
23959 && wc != (wchar_t) 0xBADFACE)
23960 return 1;
23961 }
23962 return 0;
23963 }
23964 _ACEOF
23965 if ac_fn_c_try_run "$LINENO"; then :
23966 gl_cv_func_mbrtowc_stores_incomplete=no
23967 else
23968 gl_cv_func_mbrtowc_stores_incomplete=yes
23969 fi
23970 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23971 conftest.$ac_objext conftest.beam conftest.$ac_ext
23972 fi
23973
23974 fi
23975 ;;
23976 esac
23977
23978 fi
23979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_stores_incomplete" >&5
23980 $as_echo "$gl_cv_func_mbrtowc_stores_incomplete" >&6; }
23981
23982
23983
23984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5
23985 $as_echo_n "checking whether mbrtowc works on empty input... " >&6; }
23986 if ${gl_cv_func_mbrtowc_empty_input+:} false; then :
23987 $as_echo_n "(cached) " >&6
23988 else
23989
23990 case "$host_os" in
23991 # Guess no on AIX and glibc systems.
23992 aix* | *-gnu* | gnu*) gl_cv_func_mbrtowc_empty_input="guessing no" ;;
23993 # Guess yes on native Windows.
23994 mingw*) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
23995 *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
23996 esac
23997 if test "$cross_compiling" = yes; then :
23998 :
23999 else
24000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24001 /* end confdefs.h. */
24002
24003 #include <wchar.h>
24004 static wchar_t wc;
24005 static mbstate_t mbs;
24006 int
24007 main (void)
24008 {
24009 return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
24010 }
24011 _ACEOF
24012 if ac_fn_c_try_run "$LINENO"; then :
24013 gl_cv_func_mbrtowc_empty_input=yes
24014 else
24015 gl_cv_func_mbrtowc_empty_input=no
24016 fi
24017 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24018 conftest.$ac_objext conftest.beam conftest.$ac_ext
24019 fi
24020
24021
24022 fi
24023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5
24024 $as_echo "$gl_cv_func_mbrtowc_empty_input" >&6; }
24025
24026
24027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
24028 $as_echo_n "checking whether the C locale is free of encoding errors... " >&6; }
24029 if ${gl_cv_func_mbrtowc_C_locale_sans_EILSEQ+:} false; then :
24030 $as_echo_n "(cached) " >&6
24031 else
24032
24033 gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="$gl_cross_guess_normal"
24034
24035 if test "$cross_compiling" = yes; then :
24036 case "$host_os" in
24037 # Guess yes on native Windows.
24038 mingw*) gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="guessing yes" ;;
24039 esac
24040
24041 else
24042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24043 /* end confdefs.h. */
24044 #include <limits.h>
24045 #include <locale.h>
24046 #include <wchar.h>
24047
24048 int
24049 main ()
24050 {
24051
24052 int i;
24053 char *locale = setlocale (LC_ALL, "C");
24054 if (! locale)
24055 return 2;
24056 for (i = CHAR_MIN; i <= CHAR_MAX; i++)
24057 {
24058 char c = i;
24059 wchar_t wc;
24060 mbstate_t mbs = { 0, };
24061 size_t ss = mbrtowc (&wc, &c, 1, &mbs);
24062 if (1 < ss)
24063 return 3;
24064 }
24065 return 0;
24066
24067 ;
24068 return 0;
24069 }
24070 _ACEOF
24071 if ac_fn_c_try_run "$LINENO"; then :
24072 gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=yes
24073 else
24074 gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=no
24075 fi
24076 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24077 conftest.$ac_objext conftest.beam conftest.$ac_ext
24078 fi
24079
24080
24081 fi
24082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&5
24083 $as_echo "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&6; }
24084
24085 case "$gl_cv_func_mbrtowc_null_arg1" in
24086 *yes) ;;
24087 *)
24088 $as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
24089
24090 REPLACE_MBRTOWC=1
24091 ;;
24092 esac
24093 case "$gl_cv_func_mbrtowc_null_arg2" in
24094 *yes) ;;
24095 *)
24096 $as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
24097
24098 REPLACE_MBRTOWC=1
24099 ;;
24100 esac
24101 case "$gl_cv_func_mbrtowc_retval" in
24102 *yes) ;;
24103 *)
24104 $as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
24105
24106 REPLACE_MBRTOWC=1
24107 ;;
24108 esac
24109 case "$gl_cv_func_mbrtowc_nul_retval" in
24110 *yes) ;;
24111 *)
24112 $as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
24113
24114 REPLACE_MBRTOWC=1
24115 ;;
24116 esac
24117 case "$gl_cv_func_mbrtowc_stores_incomplete" in
24118 *no) ;;
24119 *)
24120 $as_echo "#define MBRTOWC_STORES_INCOMPLETE_BUG 1" >>confdefs.h
24121
24122 REPLACE_MBRTOWC=1
24123 ;;
24124 esac
24125 case "$gl_cv_func_mbrtowc_empty_input" in
24126 *yes) ;;
24127 *)
24128 $as_echo "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h
24129
24130 REPLACE_MBRTOWC=1
24131 ;;
24132 esac
24133 case "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" in
24134 *yes) ;;
24135 *)
24136 $as_echo "#define MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
24137
24138 REPLACE_MBRTOWC=1
24139 ;;
24140 esac
24141 fi
24142 fi
24143 if test $REPLACE_MBSTATE_T = 1; then
24144 case "$host_os" in
24145 mingw*) LIB_MBRTOWC= ;;
24146 *)
24147
24148
24149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
24150 $as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
24151 if ${gl_cv_have_weak+:} false; then :
24152 $as_echo_n "(cached) " >&6
24153 else
24154 gl_cv_have_weak=no
24155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24156 /* end confdefs.h. */
24157 extern void xyzzy ();
24158 #pragma weak xyzzy
24159 int
24160 main ()
24161 {
24162 xyzzy();
24163 ;
24164 return 0;
24165 }
24166 _ACEOF
24167 if ac_fn_c_try_link "$LINENO"; then :
24168 gl_cv_have_weak=maybe
24169 fi
24170 rm -f core conftest.err conftest.$ac_objext \
24171 conftest$ac_exeext conftest.$ac_ext
24172 if test $gl_cv_have_weak = maybe; then
24173 if test "$cross_compiling" = yes; then :
24174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24175 /* end confdefs.h. */
24176 #ifdef __ELF__
24177 Extensible Linking Format
24178 #endif
24179
24180 _ACEOF
24181 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24182 $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
24183 gl_cv_have_weak="guessing yes"
24184 else
24185 gl_cv_have_weak="guessing no"
24186 fi
24187 rm -f conftest*
24188
24189
24190 else
24191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24192 /* end confdefs.h. */
24193
24194 #include <stdio.h>
24195 #pragma weak fputs
24196 int main ()
24197 {
24198 return (fputs == NULL);
24199 }
24200 _ACEOF
24201 if ac_fn_c_try_run "$LINENO"; then :
24202 gl_cv_have_weak=yes
24203 else
24204 gl_cv_have_weak=no
24205 fi
24206 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24207 conftest.$ac_objext conftest.beam conftest.$ac_ext
24208 fi
24209
24210 fi
24211 case " $LDFLAGS " in
24212 *" -static "*) gl_cv_have_weak=no ;;
24213 esac
24214 case "$gl_cv_have_weak" in
24215 *yes)
24216 case "$host_os" in
24217 freebsd* | dragonfly*)
24218 : > conftest1.c
24219 $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
24220 cat <<EOF > conftest2.c
24221 #include <pthread.h>
24222 #pragma weak pthread_mutexattr_gettype
24223 int main ()
24224 {
24225 return (pthread_mutexattr_gettype != NULL);
24226 }
24227 EOF
24228 $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
24229 || gl_cv_have_weak=no
24230 rm -f conftest1.c libempty.so conftest2.c conftest
24231 ;;
24232 esac
24233 ;;
24234 esac
24235
24236 fi
24237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
24238 $as_echo "$gl_cv_have_weak" >&6; }
24239 case "$gl_cv_have_weak" in
24240 *yes)
24241
24242 $as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
24243
24244 ;;
24245 esac
24246
24247 case "$gl_cv_have_weak" in
24248 *yes) LIB_MBRTOWC= ;;
24249 *) LIB_MBRTOWC="$LIBPTHREAD" ;;
24250 esac
24251 ;;
24252 esac
24253 else
24254 LIB_MBRTOWC=
24255 fi
24256
24257
24258 if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
24259
24260
24261
24262
24263
24264
24265
24266
24267 gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
24268
24269 if test $REPLACE_MBSTATE_T = 1; then
24270
24271
24272
24273
24274
24275
24276
24277
24278 gl_LIBOBJS="$gl_LIBOBJS lc-charset-dispatch.$ac_objext"
24279
24280
24281
24282
24283
24284
24285
24286
24287
24288 gl_LIBOBJS="$gl_LIBOBJS mbtowc-lock.$ac_objext"
24289
24290
24291
24292
24293 CFLAG_VISIBILITY=
24294 HAVE_VISIBILITY=0
24295 if test -n "$GCC"; then
24296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
24297 $as_echo_n "checking whether the -Werror option is usable... " >&6; }
24298 if ${gl_cv_cc_vis_werror+:} false; then :
24299 $as_echo_n "(cached) " >&6
24300 else
24301 gl_save_CFLAGS="$CFLAGS"
24302 CFLAGS="$CFLAGS -Werror"
24303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24304 /* end confdefs.h. */
24305
24306 int
24307 main ()
24308 {
24309
24310 ;
24311 return 0;
24312 }
24313 _ACEOF
24314 if ac_fn_c_try_compile "$LINENO"; then :
24315 gl_cv_cc_vis_werror=yes
24316 else
24317 gl_cv_cc_vis_werror=no
24318 fi
24319 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24320 CFLAGS="$gl_save_CFLAGS"
24321
24322 fi
24323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
24324 $as_echo "$gl_cv_cc_vis_werror" >&6; }
24325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
24326 $as_echo_n "checking for simple visibility declarations... " >&6; }
24327 if ${gl_cv_cc_visibility+:} false; then :
24328 $as_echo_n "(cached) " >&6
24329 else
24330 gl_save_CFLAGS="$CFLAGS"
24331 CFLAGS="$CFLAGS -fvisibility=hidden"
24332 if test $gl_cv_cc_vis_werror = yes; then
24333 CFLAGS="$CFLAGS -Werror"
24334 fi
24335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24336 /* end confdefs.h. */
24337 extern __attribute__((__visibility__("hidden"))) int hiddenvar;
24338 extern __attribute__((__visibility__("default"))) int exportedvar;
24339 extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
24340 extern __attribute__((__visibility__("default"))) int exportedfunc (void);
24341 void dummyfunc (void) {}
24342
24343 int
24344 main ()
24345 {
24346
24347 ;
24348 return 0;
24349 }
24350 _ACEOF
24351 if ac_fn_c_try_compile "$LINENO"; then :
24352 gl_cv_cc_visibility=yes
24353 else
24354 gl_cv_cc_visibility=no
24355 fi
24356 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24357 CFLAGS="$gl_save_CFLAGS"
24358
24359 fi
24360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
24361 $as_echo "$gl_cv_cc_visibility" >&6; }
24362 if test $gl_cv_cc_visibility = yes; then
24363 CFLAG_VISIBILITY="-fvisibility=hidden"
24364 HAVE_VISIBILITY=1
24365 fi
24366 fi
24367
24368
24369
24370 cat >>confdefs.h <<_ACEOF
24371 #define HAVE_VISIBILITY $HAVE_VISIBILITY
24372 _ACEOF
24373
24374
24375
24376 fi
24377
24378
24379 :
24380
24381 fi
24382
24383
24384
24385
24386
24387 GNULIB_MBRTOWC=1
24388
24389
24390
24391
24392
24393 $as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
24394
24395
24396
24397
24398
24399
24400
24401
24402
24403
24404
24405
24406
24407
24408
24409 if case "$host_os" in
24410 mingw*) true ;;
24411 *) test $ac_cv_func_mbsinit = yes ;;
24412 esac \
24413 && test $ac_cv_func_mbrtowc = yes; then
24414
24415
24416
24417
24418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
24419 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
24420 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
24421 $as_echo_n "(cached) " >&6
24422 else
24423
24424 case "$host_os" in
24425 # Guess no on AIX and OSF/1.
24426 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
24427 # Guess yes otherwise.
24428 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
24429 esac
24430 if test $LOCALE_JA != none; then
24431 if test "$cross_compiling" = yes; then :
24432 :
24433 else
24434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24435 /* end confdefs.h. */
24436
24437 #include <locale.h>
24438 #include <string.h>
24439 #include <wchar.h>
24440 int main ()
24441 {
24442 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
24443 {
24444 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
24445 mbstate_t state;
24446 wchar_t wc;
24447
24448 memset (&state, '\0', sizeof (mbstate_t));
24449 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
24450 if (mbsinit (&state))
24451 return 2;
24452 }
24453 return 0;
24454 }
24455 _ACEOF
24456 if ac_fn_c_try_run "$LINENO"; then :
24457 gl_cv_func_mbrtowc_incomplete_state=yes
24458 else
24459 gl_cv_func_mbrtowc_incomplete_state=no
24460 fi
24461 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24462 conftest.$ac_objext conftest.beam conftest.$ac_ext
24463 fi
24464
24465 else
24466 if test $LOCALE_FR_UTF8 != none; then
24467 if test "$cross_compiling" = yes; then :
24468 :
24469 else
24470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24471 /* end confdefs.h. */
24472
24473 #include <locale.h>
24474 #include <string.h>
24475 #include <wchar.h>
24476 int main ()
24477 {
24478 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
24479 {
24480 const char input[] = "B\303\274\303\237er"; /* "Büßer" */
24481 mbstate_t state;
24482 wchar_t wc;
24483
24484 memset (&state, '\0', sizeof (mbstate_t));
24485 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
24486 if (mbsinit (&state))
24487 return 2;
24488 }
24489 return 0;
24490 }
24491 _ACEOF
24492 if ac_fn_c_try_run "$LINENO"; then :
24493 gl_cv_func_mbrtowc_incomplete_state=yes
24494 else
24495 gl_cv_func_mbrtowc_incomplete_state=no
24496 fi
24497 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24498 conftest.$ac_objext conftest.beam conftest.$ac_ext
24499 fi
24500
24501 fi
24502 fi
24503
24504 fi
24505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
24506 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
24507
24508
24509
24510
24511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
24512 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
24513 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
24514 $as_echo_n "(cached) " >&6
24515 else
24516
24517 case "$host_os" in
24518 # Guess no on Solaris 8.
24519 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
24520 # Guess yes otherwise.
24521 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
24522 esac
24523 if test $LOCALE_ZH_CN != none; then
24524 if test "$cross_compiling" = yes; then :
24525 :
24526 else
24527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24528 /* end confdefs.h. */
24529
24530 #include <locale.h>
24531 #include <stdlib.h>
24532 #include <string.h>
24533 #include <wchar.h>
24534 int main ()
24535 {
24536 /* This fails on Solaris 8:
24537 mbrtowc returns 2, and sets wc to 0x00F0.
24538 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
24539 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
24540 {
24541 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
24542 mbstate_t state;
24543 wchar_t wc;
24544
24545 memset (&state, '\0', sizeof (mbstate_t));
24546 if (mbrtowc (&wc, input + 3, 6, &state) != 4
24547 && mbtowc (&wc, input + 3, 6) == 4)
24548 return 2;
24549 }
24550 return 0;
24551 }
24552 _ACEOF
24553 if ac_fn_c_try_run "$LINENO"; then :
24554 gl_cv_func_mbrtowc_sanitycheck=yes
24555 else
24556 gl_cv_func_mbrtowc_sanitycheck=no
24557 fi
24558 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24559 conftest.$ac_objext conftest.beam conftest.$ac_ext
24560 fi
24561
24562 fi
24563
24564 fi
24565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
24566 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
24567
24568 REPLACE_MBSTATE_T=0
24569 case "$gl_cv_func_mbrtowc_incomplete_state" in
24570 *yes) ;;
24571 *) REPLACE_MBSTATE_T=1 ;;
24572 esac
24573 case "$gl_cv_func_mbrtowc_sanitycheck" in
24574 *yes) ;;
24575 *) REPLACE_MBSTATE_T=1 ;;
24576 esac
24577 else
24578 REPLACE_MBSTATE_T=1
24579 fi
24580
24581
24582
24583 if test $ac_cv_func_mbsinit = no; then
24584 HAVE_MBSINIT=0
24585 ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
24586 #include <wchar.h>
24587
24588 "
24589 if test "x$ac_cv_have_decl_mbsinit" = xyes; then :
24590 ac_have_decl=1
24591 else
24592 ac_have_decl=0
24593 fi
24594
24595 cat >>confdefs.h <<_ACEOF
24596 #define HAVE_DECL_MBSINIT $ac_have_decl
24597 _ACEOF
24598
24599 if test $ac_cv_have_decl_mbsinit = yes; then
24600 REPLACE_MBSINIT=1
24601 fi
24602 else
24603 if test $REPLACE_MBSTATE_T = 1; then
24604 REPLACE_MBSINIT=1
24605 else
24606 case "$host_os" in
24607 mingw*) REPLACE_MBSINIT=1 ;;
24608 esac
24609 fi
24610 fi
24611
24612 if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
24613
24614
24615
24616
24617
24618
24619
24620
24621 gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
24622
24623
24624 :
24625
24626 fi
24627
24628
24629
24630
24631
24632 GNULIB_MBSINIT=1
24633
24634
24635
24636
24637
24638 $as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
24639
24640
24641
24642
24643
24644
24645
24646
24647
24648
24649
24650
24651
24652
24653 if case "$host_os" in
24654 mingw*) true ;;
24655 *) test $ac_cv_func_mbsinit = yes ;;
24656 esac \
24657 && test $ac_cv_func_mbrtowc = yes; then
24658
24659
24660
24661
24662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
24663 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
24664 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
24665 $as_echo_n "(cached) " >&6
24666 else
24667
24668 case "$host_os" in
24669 # Guess no on AIX and OSF/1.
24670 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
24671 # Guess yes otherwise.
24672 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
24673 esac
24674 if test $LOCALE_JA != none; then
24675 if test "$cross_compiling" = yes; then :
24676 :
24677 else
24678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24679 /* end confdefs.h. */
24680
24681 #include <locale.h>
24682 #include <string.h>
24683 #include <wchar.h>
24684 int main ()
24685 {
24686 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
24687 {
24688 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
24689 mbstate_t state;
24690 wchar_t wc;
24691
24692 memset (&state, '\0', sizeof (mbstate_t));
24693 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
24694 if (mbsinit (&state))
24695 return 2;
24696 }
24697 return 0;
24698 }
24699 _ACEOF
24700 if ac_fn_c_try_run "$LINENO"; then :
24701 gl_cv_func_mbrtowc_incomplete_state=yes
24702 else
24703 gl_cv_func_mbrtowc_incomplete_state=no
24704 fi
24705 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24706 conftest.$ac_objext conftest.beam conftest.$ac_ext
24707 fi
24708
24709 else
24710 if test $LOCALE_FR_UTF8 != none; then
24711 if test "$cross_compiling" = yes; then :
24712 :
24713 else
24714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24715 /* end confdefs.h. */
24716
24717 #include <locale.h>
24718 #include <string.h>
24719 #include <wchar.h>
24720 int main ()
24721 {
24722 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
24723 {
24724 const char input[] = "B\303\274\303\237er"; /* "Büßer" */
24725 mbstate_t state;
24726 wchar_t wc;
24727
24728 memset (&state, '\0', sizeof (mbstate_t));
24729 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
24730 if (mbsinit (&state))
24731 return 2;
24732 }
24733 return 0;
24734 }
24735 _ACEOF
24736 if ac_fn_c_try_run "$LINENO"; then :
24737 gl_cv_func_mbrtowc_incomplete_state=yes
24738 else
24739 gl_cv_func_mbrtowc_incomplete_state=no
24740 fi
24741 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24742 conftest.$ac_objext conftest.beam conftest.$ac_ext
24743 fi
24744
24745 fi
24746 fi
24747
24748 fi
24749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
24750 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
24751
24752
24753
24754
24755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
24756 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
24757 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
24758 $as_echo_n "(cached) " >&6
24759 else
24760
24761 case "$host_os" in
24762 # Guess no on Solaris 8.
24763 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
24764 # Guess yes otherwise.
24765 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
24766 esac
24767 if test $LOCALE_ZH_CN != none; then
24768 if test "$cross_compiling" = yes; then :
24769 :
24770 else
24771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24772 /* end confdefs.h. */
24773
24774 #include <locale.h>
24775 #include <stdlib.h>
24776 #include <string.h>
24777 #include <wchar.h>
24778 int main ()
24779 {
24780 /* This fails on Solaris 8:
24781 mbrtowc returns 2, and sets wc to 0x00F0.
24782 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
24783 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
24784 {
24785 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
24786 mbstate_t state;
24787 wchar_t wc;
24788
24789 memset (&state, '\0', sizeof (mbstate_t));
24790 if (mbrtowc (&wc, input + 3, 6, &state) != 4
24791 && mbtowc (&wc, input + 3, 6) == 4)
24792 return 2;
24793 }
24794 return 0;
24795 }
24796 _ACEOF
24797 if ac_fn_c_try_run "$LINENO"; then :
24798 gl_cv_func_mbrtowc_sanitycheck=yes
24799 else
24800 gl_cv_func_mbrtowc_sanitycheck=no
24801 fi
24802 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24803 conftest.$ac_objext conftest.beam conftest.$ac_ext
24804 fi
24805
24806 fi
24807
24808 fi
24809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
24810 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
24811
24812 REPLACE_MBSTATE_T=0
24813 case "$gl_cv_func_mbrtowc_incomplete_state" in
24814 *yes) ;;
24815 *) REPLACE_MBSTATE_T=1 ;;
24816 esac
24817 case "$gl_cv_func_mbrtowc_sanitycheck" in
24818 *yes) ;;
24819 *) REPLACE_MBSTATE_T=1 ;;
24820 esac
24821 else
24822 REPLACE_MBSTATE_T=1
24823 fi
24824
24825
24826
24827 if test $ac_cv_func_mbsrtowcs = no; then
24828 HAVE_MBSRTOWCS=0
24829 ac_fn_c_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" "
24830 #include <wchar.h>
24831
24832 "
24833 if test "x$ac_cv_have_decl_mbsrtowcs" = xyes; then :
24834 ac_have_decl=1
24835 else
24836 ac_have_decl=0
24837 fi
24838
24839 cat >>confdefs.h <<_ACEOF
24840 #define HAVE_DECL_MBSRTOWCS $ac_have_decl
24841 _ACEOF
24842
24843 if test $ac_cv_have_decl_mbsrtowcs = yes; then
24844 REPLACE_MBSRTOWCS=1
24845 fi
24846 else
24847 if test $REPLACE_MBSTATE_T = 1; then
24848 REPLACE_MBSRTOWCS=1
24849 else
24850
24851
24852
24853
24854
24855
24856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5
24857 $as_echo_n "checking whether mbsrtowcs works... " >&6; }
24858 if ${gl_cv_func_mbsrtowcs_works+:} false; then :
24859 $as_echo_n "(cached) " >&6
24860 else
24861
24862 case "$host_os" in
24863 # Guess no on HP-UX, Solaris, mingw.
24864 hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;;
24865 # Guess yes otherwise.
24866 *) gl_cv_func_mbsrtowcs_works="guessing yes" ;;
24867 esac
24868 if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
24869 if test "$cross_compiling" = yes; then :
24870 :
24871 else
24872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24873 /* end confdefs.h. */
24874
24875 #include <locale.h>
24876 #include <string.h>
24877 #include <wchar.h>
24878 int main ()
24879 {
24880 int result = 0;
24881 /* Test whether the function supports a NULL destination argument.
24882 This fails on native Windows. */
24883 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
24884 {
24885 const char input[] = "\337er";
24886 const char *src = input;
24887 mbstate_t state;
24888
24889 memset (&state, '\0', sizeof (mbstate_t));
24890 if (mbsrtowcs (NULL, &src, 1, &state) != 3
24891 || src != input)
24892 result |= 1;
24893 }
24894 /* Test whether the function works when started with a conversion state
24895 in non-initial state. This fails on HP-UX 11.11 and Solaris 10. */
24896 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
24897 {
24898 const char input[] = "B\303\274\303\237er";
24899 mbstate_t state;
24900
24901 memset (&state, '\0', sizeof (mbstate_t));
24902 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
24903 if (!mbsinit (&state))
24904 {
24905 const char *src = input + 2;
24906 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
24907 result |= 2;
24908 }
24909 }
24910 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
24911 {
24912 const char input[] = "<\306\374\313\334\270\354>";
24913 mbstate_t state;
24914
24915 memset (&state, '\0', sizeof (mbstate_t));
24916 if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2))
24917 if (!mbsinit (&state))
24918 {
24919 const char *src = input + 4;
24920 if (mbsrtowcs (NULL, &src, 10, &state) != 3)
24921 result |= 4;
24922 }
24923 }
24924 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
24925 {
24926 const char input[] = "B\250\271\201\060\211\070er";
24927 mbstate_t state;
24928
24929 memset (&state, '\0', sizeof (mbstate_t));
24930 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
24931 if (!mbsinit (&state))
24932 {
24933 const char *src = input + 2;
24934 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
24935 result |= 8;
24936 }
24937 }
24938 return result;
24939 }
24940 _ACEOF
24941 if ac_fn_c_try_run "$LINENO"; then :
24942 gl_cv_func_mbsrtowcs_works=yes
24943 else
24944 gl_cv_func_mbsrtowcs_works=no
24945 fi
24946 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24947 conftest.$ac_objext conftest.beam conftest.$ac_ext
24948 fi
24949
24950 fi
24951
24952 fi
24953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5
24954 $as_echo "$gl_cv_func_mbsrtowcs_works" >&6; }
24955
24956 case "$gl_cv_func_mbsrtowcs_works" in
24957 *yes) ;;
24958 *) REPLACE_MBSRTOWCS=1 ;;
24959 esac
24960 fi
24961 fi
24962
24963 if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
24964
24965
24966
24967
24968
24969
24970
24971
24972 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs.$ac_objext"
24973
24974
24975
24976
24977
24978
24979
24980
24981
24982 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext"
24983
24984
24985 :
24986
24987 fi
24988
24989
24990
24991
24992
24993 GNULIB_MBSRTOWCS=1
24994
24995
24996
24997
24998
24999 $as_echo "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h
25000
25001
25002
25003
25004
25005
25006 for ac_func in mbtowc
25007 do :
25008 ac_fn_c_check_func "$LINENO" "mbtowc" "ac_cv_func_mbtowc"
25009 if test "x$ac_cv_func_mbtowc" = xyes; then :
25010 cat >>confdefs.h <<_ACEOF
25011 #define HAVE_MBTOWC 1
25012 _ACEOF
25013
25014 fi
25015 done
25016
25017 if test $ac_cv_func_mbtowc = no; then
25018 HAVE_MBTOWC=0
25019 else
25020 if false; then
25021 REPLACE_MBTOWC=1
25022 fi
25023 fi
25024
25025 if test $HAVE_MBTOWC = 0 || test $REPLACE_MBTOWC = 1; then
25026
25027
25028
25029
25030
25031
25032
25033
25034 gl_LIBOBJS="$gl_LIBOBJS mbtowc.$ac_objext"
25035
25036
25037 :
25038
25039 fi
25040
25041
25042
25043
25044
25045 GNULIB_MBTOWC=1
25046
25047
25048
25049
25050
25051 $as_echo "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h
25052
25053
25054
25055
25056 if test $REPLACE_MEMCHR = 1; then
25057
25058
25059
25060
25061
25062
25063
25064
25065 gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
25066
25067
25068 for ac_header in bp-sym.h
25069 do :
25070 ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
25071 if test "x$ac_cv_header_bp_sym_h" = xyes; then :
25072 cat >>confdefs.h <<_ACEOF
25073 #define HAVE_BP_SYM_H 1
25074 _ACEOF
25075
25076 fi
25077
25078 done
25079
25080
25081 fi
25082
25083
25084
25085
25086
25087 GNULIB_MEMCHR=1
25088
25089
25090
25091
25092
25093 $as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
25094
25095
25096
25097
25098
25099 if test $HAVE_DECL_MEMMEM = 1 && test $REPLACE_MEMMEM = 0; then
25100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works in linear time" >&5
25101 $as_echo_n "checking whether memmem works in linear time... " >&6; }
25102 if ${gl_cv_func_memmem_works_fast+:} false; then :
25103 $as_echo_n "(cached) " >&6
25104 else
25105 if test "$cross_compiling" = yes; then :
25106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25107 /* end confdefs.h. */
25108
25109 #include <features.h>
25110 #ifdef __GNU_LIBRARY__
25111 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2)) \
25112 && !defined __UCLIBC__
25113 Lucky user
25114 #endif
25115 #endif
25116 #ifdef __CYGWIN__
25117 #include <cygwin/version.h>
25118 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 0)
25119 Lucky user
25120 #endif
25121 #endif
25122
25123 _ACEOF
25124 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25125 $EGREP "Lucky user" >/dev/null 2>&1; then :
25126 gl_cv_func_memmem_works_fast="guessing yes"
25127 else
25128 gl_cv_func_memmem_works_fast="$gl_cross_guess_normal"
25129 fi
25130 rm -f conftest*
25131
25132
25133 else
25134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25135 /* end confdefs.h. */
25136
25137 #include <signal.h> /* for signal */
25138 #include <string.h> /* for memmem */
25139 #include <stdlib.h> /* for malloc */
25140 #include <unistd.h> /* for alarm */
25141 static void quit (int sig) { _exit (sig + 128); }
25142
25143 int
25144 main ()
25145 {
25146
25147 int result = 0;
25148 size_t m = 1000000;
25149 char *haystack = (char *) malloc (2 * m + 1);
25150 char *needle = (char *) malloc (m + 1);
25151 /* Failure to compile this test due to missing alarm is okay,
25152 since all such platforms (mingw) also lack memmem. */
25153 signal (SIGALRM, quit);
25154 alarm (5);
25155 /* Check for quadratic performance. */
25156 if (haystack && needle)
25157 {
25158 memset (haystack, 'A', 2 * m);
25159 haystack[2 * m] = 'B';
25160 memset (needle, 'A', m);
25161 needle[m] = 'B';
25162 if (!memmem (haystack, 2 * m + 1, needle, m + 1))
25163 result |= 1;
25164 }
25165 /* Free allocated memory, in case some sanitizer is watching. */
25166 free (haystack);
25167 free (needle);
25168 return result;
25169
25170 ;
25171 return 0;
25172 }
25173 _ACEOF
25174 if ac_fn_c_try_run "$LINENO"; then :
25175 gl_cv_func_memmem_works_fast=yes
25176 else
25177 gl_cv_func_memmem_works_fast=no
25178 fi
25179 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25180 conftest.$ac_objext conftest.beam conftest.$ac_ext
25181 fi
25182
25183
25184 fi
25185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_fast" >&5
25186 $as_echo "$gl_cv_func_memmem_works_fast" >&6; }
25187 case "$gl_cv_func_memmem_works_fast" in
25188 *yes) ;;
25189 *)
25190 REPLACE_MEMMEM=1
25191 ;;
25192 esac
25193 fi
25194
25195 if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
25196
25197
25198
25199
25200
25201
25202
25203
25204 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
25205
25206 fi
25207
25208
25209
25210
25211 for ac_func in memmem
25212 do :
25213 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
25214 if test "x$ac_cv_func_memmem" = xyes; then :
25215 cat >>confdefs.h <<_ACEOF
25216 #define HAVE_MEMMEM 1
25217 _ACEOF
25218
25219 fi
25220 done
25221
25222 if test $ac_cv_func_memmem = yes; then
25223 HAVE_MEMMEM=1
25224 else
25225 HAVE_MEMMEM=0
25226 fi
25227
25228 if test $ac_cv_have_decl_memmem = no; then
25229 HAVE_DECL_MEMMEM=0
25230 else
25231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
25232 $as_echo_n "checking whether memmem works... " >&6; }
25233 if ${gl_cv_func_memmem_works_always+:} false; then :
25234 $as_echo_n "(cached) " >&6
25235 else
25236 if test "$cross_compiling" = yes; then :
25237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25238 /* end confdefs.h. */
25239
25240 #ifdef __GNU_LIBRARY__
25241 #include <features.h>
25242 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
25243 || __GLIBC_MINOR__ > 12)) \
25244 || (__GLIBC__ > 2)) \
25245 || defined __UCLIBC__
25246 Lucky user
25247 #endif
25248 #elif defined __CYGWIN__
25249 #include <cygwin/version.h>
25250 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
25251 Lucky user
25252 #endif
25253 #else
25254 Lucky user
25255 #endif
25256
25257 _ACEOF
25258 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25259 $EGREP "Lucky user" >/dev/null 2>&1; then :
25260 gl_cv_func_memmem_works_always="guessing yes"
25261 else
25262 gl_cv_func_memmem_works_always="$gl_cross_guess_normal"
25263 fi
25264 rm -f conftest*
25265
25266
25267 else
25268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25269 /* end confdefs.h. */
25270
25271 #include <string.h> /* for memmem */
25272 #define P "_EF_BF_BD"
25273 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
25274 #define NEEDLE P P P P P
25275
25276 int
25277 main ()
25278 {
25279
25280 int result = 0;
25281 if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
25282 result |= 1;
25283 /* Check for empty needle behavior. */
25284 {
25285 const char *haystack = "AAA";
25286 if (memmem (haystack, 3, (const char *) 1, 0) != haystack)
25287 result |= 2;
25288 }
25289 return result;
25290
25291 ;
25292 return 0;
25293 }
25294 _ACEOF
25295 if ac_fn_c_try_run "$LINENO"; then :
25296 gl_cv_func_memmem_works_always=yes
25297 else
25298 gl_cv_func_memmem_works_always=no
25299 fi
25300 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25301 conftest.$ac_objext conftest.beam conftest.$ac_ext
25302 fi
25303
25304
25305 fi
25306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
25307 $as_echo "$gl_cv_func_memmem_works_always" >&6; }
25308 case "$gl_cv_func_memmem_works_always" in
25309 *yes) ;;
25310 *)
25311 REPLACE_MEMMEM=1
25312 ;;
25313 esac
25314 fi
25315 :
25316
25317 if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
25318
25319
25320
25321
25322
25323
25324
25325
25326 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
25327
25328 fi
25329
25330
25331
25332
25333
25334 GNULIB_MEMMEM=1
25335
25336
25337
25338
25339
25340 $as_echo "#define GNULIB_TEST_MEMMEM 1" >>confdefs.h
25341
25342
25343
25344
25345
25346
25347
25348
25349
25350 for ac_func in mempcpy
25351 do :
25352 ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
25353 if test "x$ac_cv_func_mempcpy" = xyes; then :
25354 cat >>confdefs.h <<_ACEOF
25355 #define HAVE_MEMPCPY 1
25356 _ACEOF
25357
25358 fi
25359 done
25360
25361 if test $ac_cv_func_mempcpy = no; then
25362 HAVE_MEMPCPY=0
25363 fi
25364
25365 if test $HAVE_MEMPCPY = 0; then
25366
25367
25368
25369
25370
25371
25372
25373
25374 gl_LIBOBJS="$gl_LIBOBJS mempcpy.$ac_objext"
25375
25376
25377 :
25378
25379 fi
25380
25381
25382
25383
25384
25385 GNULIB_MEMPCPY=1
25386
25387
25388
25389
25390
25391 $as_echo "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h
25392
25393
25394
25395
25396
25397
25398
25399
25400 if test $ac_cv_have_decl_memrchr = no; then
25401 HAVE_DECL_MEMRCHR=0
25402 fi
25403
25404 for ac_func in memrchr
25405 do :
25406 ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
25407 if test "x$ac_cv_func_memrchr" = xyes; then :
25408 cat >>confdefs.h <<_ACEOF
25409 #define HAVE_MEMRCHR 1
25410 _ACEOF
25411
25412 fi
25413 done
25414
25415
25416 if test $ac_cv_func_memrchr = no; then
25417
25418
25419
25420
25421
25422
25423
25424
25425 gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
25426
25427 :
25428 fi
25429
25430
25431
25432
25433
25434 GNULIB_MEMRCHR=1
25435
25436
25437
25438
25439
25440 $as_echo "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h
25441
25442
25443
25444
25445
25446
25447
25448
25449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing slash" >&5
25450 $as_echo_n "checking whether mkdir handles trailing slash... " >&6; }
25451 if ${gl_cv_func_mkdir_trailing_slash_works+:} false; then :
25452 $as_echo_n "(cached) " >&6
25453 else
25454 rm -rf conftest.dir
25455 if test "$cross_compiling" = yes; then :
25456 case "$host_os" in
25457 # Guess yes on Linux systems.
25458 linux-* | linux) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
25459 # Guess yes on glibc systems.
25460 *-gnu* | gnu*) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
25461 # Guess yes on MSVC, no on mingw.
25462 mingw*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25463 /* end confdefs.h. */
25464
25465 #ifdef _MSC_VER
25466 Known
25467 #endif
25468
25469 _ACEOF
25470 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25471 $EGREP "Known" >/dev/null 2>&1; then :
25472 gl_cv_func_mkdir_trailing_slash_works="guessing yes"
25473 else
25474 gl_cv_func_mkdir_trailing_slash_works="guessing no"
25475 fi
25476 rm -f conftest*
25477
25478 ;;
25479 # If we don't know, obey --enable-cross-guesses.
25480 *) gl_cv_func_mkdir_trailing_slash_works="$gl_cross_guess_normal" ;;
25481 esac
25482
25483 else
25484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25485 /* end confdefs.h. */
25486
25487 #include <sys/types.h>
25488 #include <sys/stat.h>
25489
25490
25491 $gl_mda_defines
25492
25493 int
25494 main ()
25495 {
25496 return mkdir ("conftest.dir/", 0700);
25497 ;
25498 return 0;
25499 }
25500 _ACEOF
25501 if ac_fn_c_try_run "$LINENO"; then :
25502 gl_cv_func_mkdir_trailing_slash_works=yes
25503 else
25504 gl_cv_func_mkdir_trailing_slash_works=no
25505 fi
25506 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25507 conftest.$ac_objext conftest.beam conftest.$ac_ext
25508 fi
25509
25510 rm -rf conftest.dir
25511
25512 fi
25513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_slash_works" >&5
25514 $as_echo "$gl_cv_func_mkdir_trailing_slash_works" >&6; }
25515 case "$gl_cv_func_mkdir_trailing_slash_works" in
25516 *yes) ;;
25517 *)
25518 REPLACE_MKDIR=1
25519 ;;
25520 esac
25521
25522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing dot" >&5
25523 $as_echo_n "checking whether mkdir handles trailing dot... " >&6; }
25524 if ${gl_cv_func_mkdir_trailing_dot_works+:} false; then :
25525 $as_echo_n "(cached) " >&6
25526 else
25527 rm -rf conftest.dir
25528 if test "$cross_compiling" = yes; then :
25529 case "$host_os" in
25530 # Guess yes on glibc systems.
25531 *-gnu* | gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
25532 # Guess yes on musl systems.
25533 *-musl*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
25534 # Guess no on native Windows.
25535 mingw*) gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
25536 # If we don't know, obey --enable-cross-guesses.
25537 *) gl_cv_func_mkdir_trailing_dot_works="$gl_cross_guess_normal" ;;
25538 esac
25539
25540 else
25541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25542 /* end confdefs.h. */
25543
25544 #include <sys/types.h>
25545 #include <sys/stat.h>
25546
25547
25548 $gl_mda_defines
25549
25550 int
25551 main ()
25552 {
25553 return !mkdir ("conftest.dir/./", 0700);
25554 ;
25555 return 0;
25556 }
25557 _ACEOF
25558 if ac_fn_c_try_run "$LINENO"; then :
25559 gl_cv_func_mkdir_trailing_dot_works=yes
25560 else
25561 gl_cv_func_mkdir_trailing_dot_works=no
25562 fi
25563 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25564 conftest.$ac_objext conftest.beam conftest.$ac_ext
25565 fi
25566
25567 rm -rf conftest.dir
25568
25569
25570 fi
25571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_dot_works" >&5
25572 $as_echo "$gl_cv_func_mkdir_trailing_dot_works" >&6; }
25573 case "$gl_cv_func_mkdir_trailing_dot_works" in
25574 *yes) ;;
25575 *)
25576 REPLACE_MKDIR=1
25577
25578 $as_echo "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h
25579
25580 ;;
25581 esac
25582
25583 if test $REPLACE_MKDIR = 1; then
25584
25585
25586
25587
25588
25589
25590
25591
25592 gl_LIBOBJS="$gl_LIBOBJS mkdir.$ac_objext"
25593
25594 fi
25595
25596
25597
25598
25599
25600 GNULIB_MKDIR=1
25601
25602
25603
25604
25605
25606 $as_echo "#define GNULIB_TEST_MKDIR 1" >>confdefs.h
25607
25608
25609
25610
25611
25612 for ac_func in mkdtemp
25613 do :
25614 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
25615 if test "x$ac_cv_func_mkdtemp" = xyes; then :
25616 cat >>confdefs.h <<_ACEOF
25617 #define HAVE_MKDTEMP 1
25618 _ACEOF
25619
25620 fi
25621 done
25622
25623 if test $ac_cv_func_mkdtemp = no; then
25624 HAVE_MKDTEMP=0
25625 fi
25626
25627 if test $HAVE_MKDTEMP = 0; then
25628
25629
25630
25631
25632
25633
25634
25635
25636 gl_LIBOBJS="$gl_LIBOBJS mkdtemp.$ac_objext"
25637
25638 :
25639
25640 fi
25641
25642
25643
25644
25645
25646 GNULIB_MKDTEMP=1
25647
25648
25649
25650
25651
25652 $as_echo "#define GNULIB_TEST_MKDTEMP 1" >>confdefs.h
25653
25654
25655
25656
25657
25658
25659
25660
25661
25662 if test $ac_cv_func_mkostemp != yes; then
25663 HAVE_MKOSTEMP=0
25664 fi
25665
25666 if test $HAVE_MKOSTEMP = 0; then
25667
25668
25669
25670
25671
25672
25673
25674
25675 gl_LIBOBJS="$gl_LIBOBJS mkostemp.$ac_objext"
25676
25677
25678
25679 fi
25680
25681
25682 cat >>confdefs.h <<_ACEOF
25683 #define GNULIB_MKOSTEMP 1
25684 _ACEOF
25685
25686
25687
25688
25689
25690
25691
25692 GNULIB_MKOSTEMP=1
25693
25694
25695
25696
25697
25698 $as_echo "#define GNULIB_TEST_MKOSTEMP 1" >>confdefs.h
25699
25700
25701
25702
25703 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
25704
25705
25706
25707
25708
25709
25710
25711
25712 gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
25713
25714 fi
25715
25716 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
25717
25718
25719
25720
25721
25722
25723
25724
25725 gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
25726
25727 fi
25728
25729
25730 cat >>confdefs.h <<_ACEOF
25731 #define GNULIB_MSVC_NOTHROW 1
25732 _ACEOF
25733
25734
25735
25736
25737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <netinet/in.h> is self-contained" >&5
25738 $as_echo_n "checking whether <netinet/in.h> is self-contained... " >&6; }
25739 if ${gl_cv_header_netinet_in_h_selfcontained+:} false; then :
25740 $as_echo_n "(cached) " >&6
25741 else
25742
25743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25744 /* end confdefs.h. */
25745 #include <netinet/in.h>
25746 int
25747 main ()
25748 {
25749
25750 ;
25751 return 0;
25752 }
25753 _ACEOF
25754 if ac_fn_c_try_compile "$LINENO"; then :
25755 gl_cv_header_netinet_in_h_selfcontained=yes
25756 else
25757 gl_cv_header_netinet_in_h_selfcontained=no
25758 fi
25759 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25760
25761 fi
25762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_netinet_in_h_selfcontained" >&5
25763 $as_echo "$gl_cv_header_netinet_in_h_selfcontained" >&6; }
25764 if test $gl_cv_header_netinet_in_h_selfcontained = yes; then
25765 NETINET_IN_H=''
25766 else
25767 NETINET_IN_H='netinet/in.h'
25768 for ac_header in netinet/in.h
25769 do :
25770 ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
25771 if test "x$ac_cv_header_netinet_in_h" = xyes; then :
25772 cat >>confdefs.h <<_ACEOF
25773 #define HAVE_NETINET_IN_H 1
25774 _ACEOF
25775
25776 fi
25777
25778 done
25779
25780
25781
25782
25783
25784
25785
25786
25787
25788
25789 if test $gl_cv_have_include_next = yes; then
25790 gl_cv_next_netinet_in_h='<'netinet/in.h'>'
25791 else
25792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <netinet/in.h>" >&5
25793 $as_echo_n "checking absolute name of <netinet/in.h>... " >&6; }
25794 if ${gl_cv_next_netinet_in_h+:} false; then :
25795 $as_echo_n "(cached) " >&6
25796 else
25797
25798 if test $ac_cv_header_netinet_in_h = yes; then
25799
25800
25801
25802
25803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25804 /* end confdefs.h. */
25805 #include <netinet/in.h>
25806 _ACEOF
25807 case "$host_os" in
25808 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25809 *) gl_absname_cpp="$ac_cpp" ;;
25810 esac
25811
25812 case "$host_os" in
25813 mingw*)
25814 gl_dirsep_regex='[/\\]'
25815 ;;
25816 *)
25817 gl_dirsep_regex='\/'
25818 ;;
25819 esac
25820 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25821 gl_header_literal_regex=`echo 'netinet/in.h' \
25822 | sed -e "$gl_make_literal_regex_sed"`
25823 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25824 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25825 s|^/[^/]|//&|
25826 p
25827 q
25828 }'
25829
25830 gl_cv_absolute_netinet_in_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25831 sed -n "$gl_absolute_header_sed"`
25832
25833 gl_header=$gl_cv_absolute_netinet_in_h
25834 gl_cv_next_netinet_in_h='"'$gl_header'"'
25835 else
25836 gl_cv_next_netinet_in_h='<'netinet/in.h'>'
25837 fi
25838
25839
25840 fi
25841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_netinet_in_h" >&5
25842 $as_echo "$gl_cv_next_netinet_in_h" >&6; }
25843 fi
25844 NEXT_NETINET_IN_H=$gl_cv_next_netinet_in_h
25845
25846 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25847 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25848 gl_next_as_first_directive='<'netinet/in.h'>'
25849 else
25850 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25851 gl_next_as_first_directive=$gl_cv_next_netinet_in_h
25852 fi
25853 NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H=$gl_next_as_first_directive
25854
25855
25856
25857
25858 if test $ac_cv_header_netinet_in_h = yes; then
25859 HAVE_NETINET_IN_H=1
25860 else
25861 HAVE_NETINET_IN_H=0
25862 fi
25863
25864 fi
25865
25866 if test -n "$NETINET_IN_H"; then
25867 GL_GENERATE_NETINET_IN_H_TRUE=
25868 GL_GENERATE_NETINET_IN_H_FALSE='#'
25869 else
25870 GL_GENERATE_NETINET_IN_H_TRUE='#'
25871 GL_GENERATE_NETINET_IN_H_FALSE=
25872 fi
25873
25874
25875
25876
25877
25878
25879 case "$host_os" in
25880 mingw* | pw*)
25881 REPLACE_OPEN=1
25882 ;;
25883 *)
25884
25885 if test "$gl_cv_macro_O_CLOEXEC" != yes; then
25886 REPLACE_OPEN=1
25887 fi
25888
25889
25890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
25891 $as_echo_n "checking whether open recognizes a trailing slash... " >&6; }
25892 if ${gl_cv_func_open_slash+:} false; then :
25893 $as_echo_n "(cached) " >&6
25894 else
25895 # Assume that if we have lstat, we can also check symlinks.
25896 if test $ac_cv_func_lstat = yes; then
25897 touch conftest.tmp
25898 ln -s conftest.tmp conftest.lnk
25899 fi
25900 if test "$cross_compiling" = yes; then :
25901
25902 case "$host_os" in
25903 freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
25904 gl_cv_func_open_slash="guessing no" ;;
25905 *)
25906 gl_cv_func_open_slash="guessing yes" ;;
25907 esac
25908
25909 else
25910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25911 /* end confdefs.h. */
25912
25913 #include <fcntl.h>
25914 #if HAVE_UNISTD_H
25915 # include <unistd.h>
25916 #endif
25917
25918
25919 $gl_mda_defines
25920
25921 int main ()
25922 {
25923 int result = 0;
25924 #if HAVE_LSTAT
25925 if (open ("conftest.lnk/", O_RDONLY) != -1)
25926 result |= 1;
25927 #endif
25928 if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
25929 result |= 2;
25930 return result;
25931 }
25932 _ACEOF
25933 if ac_fn_c_try_run "$LINENO"; then :
25934 gl_cv_func_open_slash=yes
25935 else
25936 gl_cv_func_open_slash=no
25937 fi
25938 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25939 conftest.$ac_objext conftest.beam conftest.$ac_ext
25940 fi
25941
25942 rm -f conftest.sl conftest.tmp conftest.lnk
25943
25944 fi
25945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
25946 $as_echo "$gl_cv_func_open_slash" >&6; }
25947 case "$gl_cv_func_open_slash" in
25948 *no)
25949
25950 $as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
25951
25952 ;;
25953 esac
25954
25955 case "$gl_cv_func_open_slash" in
25956 *no)
25957 REPLACE_OPEN=1
25958 ;;
25959 esac
25960 ;;
25961 esac
25962
25963 if test $REPLACE_OPEN = 0; then
25964
25965
25966
25967 if test $ac_cv_func_fchdir = no; then
25968 HAVE_FCHDIR=0
25969 fi
25970
25971 if test $HAVE_FCHDIR = 0; then
25972 REPLACE_OPEN=1
25973 fi
25974 fi
25975
25976
25977
25978 if test $REPLACE_OPEN = 1; then
25979
25980
25981
25982
25983
25984
25985
25986
25987 gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
25988
25989
25990
25991 :
25992
25993 fi
25994
25995
25996
25997
25998
25999 GNULIB_OPEN=1
26000
26001
26002
26003
26004
26005 $as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h
26006
26007
26008
26009
26010
26011
26012
26013
26014
26015 case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink+$gl_cv_macro_O_CLOEXEC in
26016 yes+*yes+yes)
26017 ;;
26018 yes+*)
26019 # Solaris 10 lacks O_CLOEXEC.
26020 # Solaris 9 has *at functions, but uniformly mishandles trailing
26021 # slash in all of them.
26022 REPLACE_OPENAT=1
26023 ;;
26024 *)
26025 HAVE_OPENAT=0
26026 ;;
26027 esac
26028
26029 if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then
26030
26031
26032
26033
26034
26035
26036
26037
26038 gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext"
26039
26040
26041
26042 :
26043
26044 fi
26045
26046
26047 cat >>confdefs.h <<_ACEOF
26048 #define GNULIB_OPENAT 1
26049 _ACEOF
26050
26051
26052
26053
26054
26055
26056 GNULIB_OPENAT=1
26057
26058
26059
26060
26061
26062 $as_echo "#define GNULIB_TEST_OPENAT 1" >>confdefs.h
26063
26064
26065
26066
26067
26068
26069 for ac_func in opendir
26070 do :
26071 ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
26072 if test "x$ac_cv_func_opendir" = xyes; then :
26073 cat >>confdefs.h <<_ACEOF
26074 #define HAVE_OPENDIR 1
26075 _ACEOF
26076
26077 fi
26078 done
26079
26080 if test $ac_cv_func_opendir = no; then
26081 HAVE_OPENDIR=0
26082 fi
26083
26084
26085
26086
26087 if test $ac_cv_func_fchdir = no; then
26088 HAVE_FCHDIR=0
26089 fi
26090
26091 if test $HAVE_FCHDIR = 0; then
26092 if test $HAVE_OPENDIR = 1; then
26093 REPLACE_OPENDIR=1
26094 fi
26095 fi
26096
26097 case $host_os,$HAVE_OPENDIR in
26098 os2*,1)
26099 REPLACE_OPENDIR=1;;
26100 esac
26101
26102 if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
26103
26104
26105
26106
26107
26108
26109
26110
26111 gl_LIBOBJS="$gl_LIBOBJS opendir.$ac_objext"
26112
26113 fi
26114
26115
26116
26117
26118
26119 GNULIB_OPENDIR=1
26120
26121
26122
26123
26124
26125 $as_echo "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
26126
26127
26128
26129
26130
26131
26132
26133
26134
26135
26136 if test $ac_cv_func_pipe != yes; then
26137 HAVE_PIPE=0
26138 fi
26139
26140 if test $HAVE_PIPE = 0; then
26141
26142
26143
26144
26145
26146
26147
26148
26149 gl_LIBOBJS="$gl_LIBOBJS pipe.$ac_objext"
26150
26151 fi
26152
26153
26154
26155
26156
26157 GNULIB_PIPE=1
26158
26159
26160
26161
26162
26163 $as_echo "#define GNULIB_TEST_PIPE 1" >>confdefs.h
26164
26165
26166
26167
26168
26169
26170
26171 for ac_func in rawmemchr
26172 do :
26173 ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
26174 if test "x$ac_cv_func_rawmemchr" = xyes; then :
26175 cat >>confdefs.h <<_ACEOF
26176 #define HAVE_RAWMEMCHR 1
26177 _ACEOF
26178
26179 fi
26180 done
26181
26182 if test $ac_cv_func_rawmemchr = no; then
26183 HAVE_RAWMEMCHR=0
26184 fi
26185
26186 if test $HAVE_RAWMEMCHR = 0; then
26187
26188
26189
26190
26191
26192
26193
26194
26195 gl_LIBOBJS="$gl_LIBOBJS rawmemchr.$ac_objext"
26196
26197 :
26198 fi
26199
26200
26201
26202
26203
26204 GNULIB_RAWMEMCHR=1
26205
26206
26207
26208
26209
26210 $as_echo "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
26211
26212
26213
26214
26215
26216
26217 for ac_func in readdir
26218 do :
26219 ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir"
26220 if test "x$ac_cv_func_readdir" = xyes; then :
26221 cat >>confdefs.h <<_ACEOF
26222 #define HAVE_READDIR 1
26223 _ACEOF
26224
26225 fi
26226 done
26227
26228 if test $ac_cv_func_readdir = no; then
26229 HAVE_READDIR=0
26230 fi
26231
26232 if test $HAVE_READDIR = 0; then
26233
26234
26235
26236
26237
26238
26239
26240
26241 gl_LIBOBJS="$gl_LIBOBJS readdir.$ac_objext"
26242
26243 fi
26244
26245
26246
26247
26248
26249 GNULIB_READDIR=1
26250
26251
26252
26253
26254
26255 $as_echo "#define GNULIB_TEST_READDIR 1" >>confdefs.h
26256
26257
26258
26259
26260
26261
26262 if test $ac_cv_func_readlink = no; then
26263 HAVE_READLINK=0
26264 else
26265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
26266 $as_echo_n "checking whether readlink signature is correct... " >&6; }
26267 if ${gl_cv_decl_readlink_works+:} false; then :
26268 $as_echo_n "(cached) " >&6
26269 else
26270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26271 /* end confdefs.h. */
26272 #include <unistd.h>
26273 /* Cause compilation failure if original declaration has wrong type. */
26274 ssize_t readlink (const char *, char *, size_t);
26275 int
26276 main ()
26277 {
26278
26279 ;
26280 return 0;
26281 }
26282 _ACEOF
26283 if ac_fn_c_try_compile "$LINENO"; then :
26284 gl_cv_decl_readlink_works=yes
26285 else
26286 gl_cv_decl_readlink_works=no
26287 fi
26288 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26289 fi
26290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
26291 $as_echo "$gl_cv_decl_readlink_works" >&6; }
26292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
26293 $as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
26294 if ${gl_cv_func_readlink_trailing_slash+:} false; then :
26295 $as_echo_n "(cached) " >&6
26296 else
26297 # We have readlink, so assume ln -s works.
26298 ln -s conftest.no-such conftest.link
26299 ln -s conftest.link conftest.lnk2
26300 if test "$cross_compiling" = yes; then :
26301 case "$host_os" in
26302 # Guess yes on Linux or glibc systems.
26303 linux-* | linux | *-gnu* | gnu*)
26304 gl_cv_func_readlink_trailing_slash="guessing yes" ;;
26305 # Guess no on AIX or HP-UX.
26306 aix* | hpux*)
26307 gl_cv_func_readlink_trailing_slash="guessing no" ;;
26308 # If we don't know, obey --enable-cross-guesses.
26309 *)
26310 gl_cv_func_readlink_trailing_slash="$gl_cross_guess_normal" ;;
26311 esac
26312
26313 else
26314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26315 /* end confdefs.h. */
26316 #include <unistd.h>
26317
26318 int
26319 main ()
26320 {
26321 char buf[20];
26322 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
26323 ;
26324 return 0;
26325 }
26326 _ACEOF
26327 if ac_fn_c_try_run "$LINENO"; then :
26328 gl_cv_func_readlink_trailing_slash=yes
26329 else
26330 gl_cv_func_readlink_trailing_slash=no
26331 fi
26332 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26333 conftest.$ac_objext conftest.beam conftest.$ac_ext
26334 fi
26335
26336 rm -f conftest.link conftest.lnk2
26337 fi
26338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_trailing_slash" >&5
26339 $as_echo "$gl_cv_func_readlink_trailing_slash" >&6; }
26340 case "$gl_cv_func_readlink_trailing_slash" in
26341 *yes)
26342 if test "$gl_cv_decl_readlink_works" != yes; then
26343 REPLACE_READLINK=1
26344 fi
26345 ;;
26346 *)
26347
26348 $as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
26349
26350 REPLACE_READLINK=1
26351 ;;
26352 esac
26353
26354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink truncates results correctly" >&5
26355 $as_echo_n "checking whether readlink truncates results correctly... " >&6; }
26356 if ${gl_cv_func_readlink_truncate+:} false; then :
26357 $as_echo_n "(cached) " >&6
26358 else
26359 # We have readlink, so assume ln -s works.
26360 ln -s ab conftest.link
26361 if test "$cross_compiling" = yes; then :
26362 case "$host_os" in
26363 # Guess yes on Linux or glibc systems.
26364 linux-* | linux | *-gnu* | gnu*)
26365 gl_cv_func_readlink_truncate="guessing yes" ;;
26366 # Guess no on AIX or HP-UX.
26367 aix* | hpux*)
26368 gl_cv_func_readlink_truncate="guessing no" ;;
26369 # If we don't know, obey --enable-cross-guesses.
26370 *)
26371 gl_cv_func_readlink_truncate="$gl_cross_guess_normal" ;;
26372 esac
26373
26374 else
26375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26376 /* end confdefs.h. */
26377 #include <unistd.h>
26378
26379 int
26380 main ()
26381 {
26382 char c;
26383 return readlink ("conftest.link", &c, 1) != 1;
26384 ;
26385 return 0;
26386 }
26387 _ACEOF
26388 if ac_fn_c_try_run "$LINENO"; then :
26389 gl_cv_func_readlink_truncate=yes
26390 else
26391 gl_cv_func_readlink_truncate=no
26392 fi
26393 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26394 conftest.$ac_objext conftest.beam conftest.$ac_ext
26395 fi
26396
26397 rm -f conftest.link conftest.lnk2
26398 fi
26399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_truncate" >&5
26400 $as_echo "$gl_cv_func_readlink_truncate" >&6; }
26401 case $gl_cv_func_readlink_truncate in
26402 *yes)
26403 if test "$gl_cv_decl_readlink_works" != yes; then
26404 REPLACE_READLINK=1
26405 fi
26406 ;;
26407 *)
26408
26409 $as_echo "#define READLINK_TRUNCATE_BUG 1" >>confdefs.h
26410
26411 REPLACE_READLINK=1
26412 ;;
26413 esac
26414 fi
26415
26416 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
26417
26418
26419
26420
26421
26422
26423
26424
26425 gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
26426
26427
26428 :
26429
26430 fi
26431
26432
26433
26434
26435
26436 GNULIB_READLINK=1
26437
26438
26439
26440
26441
26442 $as_echo "#define GNULIB_TEST_READLINK 1" >>confdefs.h
26443
26444
26445
26446
26447
26448
26449 if test $gl_cv_func_malloc_posix = yes; then
26450
26451 $as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h
26452
26453 else
26454 REPLACE_REALLOC=1
26455 fi
26456
26457 if test $REPLACE_REALLOC = 1; then
26458
26459
26460
26461
26462
26463
26464
26465
26466 gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
26467
26468 fi
26469
26470
26471
26472
26473
26474 GNULIB_REALLOC_POSIX=1
26475
26476
26477
26478
26479
26480 $as_echo "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
26481
26482
26483
26484
26485
26486
26487
26488
26489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on destination" >&5
26490 $as_echo_n "checking whether rename honors trailing slash on destination... " >&6; }
26491 if ${gl_cv_func_rename_slash_dst_works+:} false; then :
26492 $as_echo_n "(cached) " >&6
26493 else
26494 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
26495 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
26496 as_fn_error $? "cannot create temporary files" "$LINENO" 5
26497 # Assume that if we have lstat, we can also check symlinks.
26498 if test $ac_cv_func_lstat = yes; then
26499 ln -s conftest.f conftest.lnk
26500 fi
26501 if test "$cross_compiling" = yes; then :
26502 case "$host_os" in
26503 # Guess yes on Linux systems.
26504 linux-* | linux) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
26505 # Guess yes on glibc systems.
26506 *-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
26507 # Guess no on native Windows.
26508 mingw*) gl_cv_func_rename_slash_dst_works="guessing no" ;;
26509 # If we don't know, obey --enable-cross-guesses.
26510 *) gl_cv_func_rename_slash_dst_works="$gl_cross_guess_normal" ;;
26511 esac
26512
26513 else
26514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26515 /* end confdefs.h. */
26516
26517 # include <stdio.h>
26518 # include <stdlib.h>
26519
26520 int
26521 main ()
26522 {
26523 int result = 0;
26524 if (rename ("conftest.f1", "conftest.f2/") == 0)
26525 result |= 1;
26526 if (rename ("conftest.d1", "conftest.d2/") != 0)
26527 result |= 2;
26528 #if HAVE_LSTAT
26529 if (rename ("conftest.f", "conftest.lnk/") == 0)
26530 result |= 4;
26531 #endif
26532 return result;
26533
26534 ;
26535 return 0;
26536 }
26537 _ACEOF
26538 if ac_fn_c_try_run "$LINENO"; then :
26539 gl_cv_func_rename_slash_dst_works=yes
26540 else
26541 gl_cv_func_rename_slash_dst_works=no
26542 fi
26543 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26544 conftest.$ac_objext conftest.beam conftest.$ac_ext
26545 fi
26546
26547 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
26548
26549 fi
26550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_dst_works" >&5
26551 $as_echo "$gl_cv_func_rename_slash_dst_works" >&6; }
26552 case "$gl_cv_func_rename_slash_dst_works" in
26553 *yes) ;;
26554 *)
26555 REPLACE_RENAME=1
26556
26557 $as_echo "#define RENAME_TRAILING_SLASH_DEST_BUG 1" >>confdefs.h
26558
26559 ;;
26560 esac
26561
26562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on source" >&5
26563 $as_echo_n "checking whether rename honors trailing slash on source... " >&6; }
26564 if ${gl_cv_func_rename_slash_src_works+:} false; then :
26565 $as_echo_n "(cached) " >&6
26566 else
26567 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
26568 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
26569 as_fn_error $? "cannot create temporary files" "$LINENO" 5
26570 # Assume that if we have lstat, we can also check symlinks.
26571 if test $ac_cv_func_lstat = yes; then
26572 ln -s conftest.f conftest.lnk
26573 fi
26574 if test "$cross_compiling" = yes; then :
26575 case "$host_os" in
26576 # Guess yes on Linux systems.
26577 linux-* | linux) gl_cv_func_rename_slash_src_works="guessing yes" ;;
26578 # Guess yes on glibc systems.
26579 *-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
26580 # Guess yes on native Windows.
26581 mingw*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
26582 # If we don't know, obey --enable-cross-guesses.
26583 *) gl_cv_func_rename_slash_src_works="$gl_cross_guess_normal" ;;
26584 esac
26585
26586 else
26587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26588 /* end confdefs.h. */
26589
26590 # include <stdio.h>
26591 # include <stdlib.h>
26592
26593 int
26594 main ()
26595 {
26596 int result = 0;
26597 if (rename ("conftest.f1/", "conftest.d3") == 0)
26598 result |= 1;
26599 if (rename ("conftest.d1/", "conftest.d2") != 0)
26600 result |= 2;
26601 #if HAVE_LSTAT
26602 if (rename ("conftest.lnk/", "conftest.f") == 0)
26603 result |= 4;
26604 #endif
26605 return result;
26606
26607 ;
26608 return 0;
26609 }
26610 _ACEOF
26611 if ac_fn_c_try_run "$LINENO"; then :
26612 gl_cv_func_rename_slash_src_works=yes
26613 else
26614 gl_cv_func_rename_slash_src_works=no
26615 fi
26616 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26617 conftest.$ac_objext conftest.beam conftest.$ac_ext
26618 fi
26619
26620 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
26621
26622 fi
26623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_src_works" >&5
26624 $as_echo "$gl_cv_func_rename_slash_src_works" >&6; }
26625 case "$gl_cv_func_rename_slash_src_works" in
26626 *yes) ;;
26627 *)
26628 REPLACE_RENAME=1
26629
26630 $as_echo "#define RENAME_TRAILING_SLASH_SOURCE_BUG 1" >>confdefs.h
26631
26632 ;;
26633 esac
26634
26635
26636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5
26637 $as_echo_n "checking whether rename manages hard links correctly... " >&6; }
26638 if ${gl_cv_func_rename_link_works+:} false; then :
26639 $as_echo_n "(cached) " >&6
26640 else
26641 if test $ac_cv_func_link = yes; then
26642 if test $cross_compiling != yes; then
26643 rm -rf conftest.f conftest.f1 conftest.f2
26644 if touch conftest.f conftest.f2 && ln conftest.f conftest.f1 &&
26645 set x `ls -i conftest.f conftest.f1` && test "" = ""; then
26646 if test "$cross_compiling" = yes; then :
26647 :
26648
26649 else
26650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26651 /* end confdefs.h. */
26652
26653 # include <errno.h>
26654 # include <stdio.h>
26655 # include <stdlib.h>
26656 # include <unistd.h>
26657
26658
26659 $gl_mda_defines
26660
26661 int
26662 main ()
26663 {
26664 int result = 0;
26665 if (rename ("conftest.f", "conftest.f1"))
26666 result |= 1;
26667 if (unlink ("conftest.f1"))
26668 result |= 2;
26669
26670 /* Allow either the POSIX-required behavior, where the
26671 previous rename kept conftest.f, or the (better) NetBSD
26672 behavior, where it removed conftest.f. */
26673 if (rename ("conftest.f", "conftest.f") != 0
26674 && errno != ENOENT)
26675 result |= 4;
26676
26677 if (rename ("conftest.f1", "conftest.f1") == 0)
26678 result |= 8;
26679 if (rename ("conftest.f2", "conftest.f2") != 0)
26680 result |= 16;
26681 return result;
26682
26683 ;
26684 return 0;
26685 }
26686 _ACEOF
26687 if ac_fn_c_try_run "$LINENO"; then :
26688 gl_cv_func_rename_link_works=yes
26689 else
26690 gl_cv_func_rename_link_works=no
26691 fi
26692 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26693 conftest.$ac_objext conftest.beam conftest.$ac_ext
26694 fi
26695
26696 else
26697 gl_cv_func_rename_link_works="guessing no"
26698 fi
26699 rm -rf conftest.f conftest.f1 conftest.f2
26700 else
26701 case "$host_os" in
26702 # Guess yes on Linux systems.
26703 linux-* | linux) gl_cv_func_rename_link_works="guessing yes" ;;
26704 # Guess yes on glibc systems.
26705 *-gnu*) gl_cv_func_rename_link_works="guessing yes" ;;
26706 # Guess yes on native Windows.
26707 mingw*) gl_cv_func_rename_link_works="guessing yes" ;;
26708 # If we don't know, obey --enable-cross-guesses.
26709 *) gl_cv_func_rename_link_works="$gl_cross_guess_normal" ;;
26710 esac
26711 fi
26712 else
26713 gl_cv_func_rename_link_works=yes
26714 fi
26715
26716 fi
26717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_link_works" >&5
26718 $as_echo "$gl_cv_func_rename_link_works" >&6; }
26719 case "$gl_cv_func_rename_link_works" in
26720 *yes) ;;
26721 *)
26722 REPLACE_RENAME=1
26723
26724 $as_echo "#define RENAME_HARD_LINK_BUG 1" >>confdefs.h
26725
26726 ;;
26727 esac
26728
26729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages existing destinations correctly" >&5
26730 $as_echo_n "checking whether rename manages existing destinations correctly... " >&6; }
26731 if ${gl_cv_func_rename_dest_works+:} false; then :
26732 $as_echo_n "(cached) " >&6
26733 else
26734 rm -rf conftest.f conftest.d1 conftest.d2
26735 touch conftest.f && mkdir conftest.d1 conftest.d2 ||
26736 as_fn_error $? "cannot create temporary files" "$LINENO" 5
26737 if test "$cross_compiling" = yes; then :
26738 case "$host_os" in
26739 # Guess yes on Linux systems.
26740 linux-* | linux) gl_cv_func_rename_dest_works="guessing yes" ;;
26741 # Guess yes on glibc systems.
26742 *-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;;
26743 # Guess no on native Windows.
26744 mingw*) gl_cv_func_rename_dest_works="guessing no" ;;
26745 # If we don't know, obey --enable-cross-guesses.
26746 *) gl_cv_func_rename_dest_works="$gl_cross_guess_normal" ;;
26747 esac
26748
26749 else
26750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26751 /* end confdefs.h. */
26752
26753 # include <stdio.h>
26754 # include <stdlib.h>
26755
26756 int
26757 main ()
26758 {
26759 int result = 0;
26760 if (rename ("conftest.d1", "conftest.d2") != 0)
26761 result |= 1;
26762 if (rename ("conftest.d2", "conftest.f") == 0)
26763 result |= 2;
26764 return result;
26765
26766 ;
26767 return 0;
26768 }
26769 _ACEOF
26770 if ac_fn_c_try_run "$LINENO"; then :
26771 gl_cv_func_rename_dest_works=yes
26772 else
26773 gl_cv_func_rename_dest_works=no
26774 fi
26775 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26776 conftest.$ac_objext conftest.beam conftest.$ac_ext
26777 fi
26778
26779 rm -rf conftest.f conftest.d1 conftest.d2
26780
26781 fi
26782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_dest_works" >&5
26783 $as_echo "$gl_cv_func_rename_dest_works" >&6; }
26784 case "$gl_cv_func_rename_dest_works" in
26785 *yes) ;;
26786 *)
26787 REPLACE_RENAME=1
26788
26789 $as_echo "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h
26790
26791 ;;
26792 esac
26793
26794 if test $REPLACE_RENAME = 1; then
26795
26796
26797
26798
26799
26800
26801
26802
26803 gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext"
26804
26805 fi
26806
26807
26808
26809
26810
26811 GNULIB_RENAME=1
26812
26813
26814
26815
26816
26817 $as_echo "#define GNULIB_TEST_RENAME 1" >>confdefs.h
26818
26819
26820
26821
26822
26823
26824 for ac_func in rewinddir
26825 do :
26826 ac_fn_c_check_func "$LINENO" "rewinddir" "ac_cv_func_rewinddir"
26827 if test "x$ac_cv_func_rewinddir" = xyes; then :
26828 cat >>confdefs.h <<_ACEOF
26829 #define HAVE_REWINDDIR 1
26830 _ACEOF
26831
26832 fi
26833 done
26834
26835 if test $ac_cv_func_rewinddir = no; then
26836 HAVE_REWINDDIR=0
26837 fi
26838
26839 if test $HAVE_REWINDDIR = 0; then
26840
26841
26842
26843
26844
26845
26846
26847
26848 gl_LIBOBJS="$gl_LIBOBJS rewinddir.$ac_objext"
26849
26850 fi
26851
26852
26853
26854
26855
26856 GNULIB_REWINDDIR=1
26857
26858
26859
26860
26861
26862 $as_echo "#define GNULIB_TEST_REWINDDIR 1" >>confdefs.h
26863
26864
26865
26866
26867
26868
26869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
26870 $as_echo_n "checking whether rmdir works... " >&6; }
26871 if ${gl_cv_func_rmdir_works+:} false; then :
26872 $as_echo_n "(cached) " >&6
26873 else
26874 mkdir conftest.dir
26875 touch conftest.file
26876 if test "$cross_compiling" = yes; then :
26877 case "$host_os" in
26878 # Guess yes on Linux systems.
26879 linux-* | linux) gl_cv_func_rmdir_works="guessing yes" ;;
26880 # Guess yes on glibc systems.
26881 *-gnu* | gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
26882 # Guess no on native Windows.
26883 mingw*) gl_cv_func_rmdir_works="guessing no" ;;
26884 # If we don't know, obey --enable-cross-guesses.
26885 *) gl_cv_func_rmdir_works="$gl_cross_guess_normal" ;;
26886 esac
26887
26888 else
26889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26890 /* end confdefs.h. */
26891 #include <stdio.h>
26892 #include <errno.h>
26893 #if HAVE_UNISTD_H
26894 # include <unistd.h>
26895 #else /* on Windows with MSVC */
26896 # include <direct.h>
26897 #endif
26898
26899
26900 $gl_mda_defines
26901
26902 int
26903 main ()
26904 {
26905 int result = 0;
26906 if (!rmdir ("conftest.file/"))
26907 result |= 1;
26908 else if (errno != ENOTDIR)
26909 result |= 2;
26910 if (!rmdir ("conftest.dir/./"))
26911 result |= 4;
26912 return result;
26913
26914 ;
26915 return 0;
26916 }
26917 _ACEOF
26918 if ac_fn_c_try_run "$LINENO"; then :
26919 gl_cv_func_rmdir_works=yes
26920 else
26921 gl_cv_func_rmdir_works=no
26922 fi
26923 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26924 conftest.$ac_objext conftest.beam conftest.$ac_ext
26925 fi
26926
26927 rm -rf conftest.dir conftest.file
26928 fi
26929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
26930 $as_echo "$gl_cv_func_rmdir_works" >&6; }
26931 case "$gl_cv_func_rmdir_works" in
26932 *yes) ;;
26933 *)
26934 REPLACE_RMDIR=1
26935 ;;
26936 esac
26937
26938 if test $REPLACE_RMDIR = 1; then
26939
26940
26941
26942
26943
26944
26945
26946
26947 gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext"
26948
26949 fi
26950
26951
26952
26953
26954
26955 GNULIB_RMDIR=1
26956
26957
26958
26959
26960
26961 $as_echo "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
26962
26963
26964
26965
26966
26967
26968
26969
26970 if test $ac_cv_func_setenv = no; then
26971 HAVE_SETENV=0
26972 else
26973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
26974 $as_echo_n "checking whether setenv validates arguments... " >&6; }
26975 if ${gl_cv_func_setenv_works+:} false; then :
26976 $as_echo_n "(cached) " >&6
26977 else
26978 if test "$cross_compiling" = yes; then :
26979 case "$host_os" in
26980 # Guess yes on glibc systems.
26981 *-gnu* | gnu*) gl_cv_func_setenv_works="guessing yes" ;;
26982 # Guess yes on musl systems.
26983 *-musl*) gl_cv_func_setenv_works="guessing yes" ;;
26984 # If we don't know, obey --enable-cross-guesses.
26985 *) gl_cv_func_setenv_works="$gl_cross_guess_normal" ;;
26986 esac
26987
26988 else
26989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26990 /* end confdefs.h. */
26991
26992 #include <stdlib.h>
26993 #include <errno.h>
26994 #include <string.h>
26995
26996 int
26997 main ()
26998 {
26999
27000 int result = 0;
27001 {
27002 if (setenv ("", "", 0) != -1)
27003 result |= 1;
27004 else if (errno != EINVAL)
27005 result |= 2;
27006 }
27007 {
27008 if (setenv ("a", "=", 1) != 0)
27009 result |= 4;
27010 else if (strcmp (getenv ("a"), "=") != 0)
27011 result |= 8;
27012 }
27013 return result;
27014
27015 ;
27016 return 0;
27017 }
27018 _ACEOF
27019 if ac_fn_c_try_run "$LINENO"; then :
27020 gl_cv_func_setenv_works=yes
27021 else
27022 gl_cv_func_setenv_works=no
27023 fi
27024 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27025 conftest.$ac_objext conftest.beam conftest.$ac_ext
27026 fi
27027
27028 fi
27029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
27030 $as_echo "$gl_cv_func_setenv_works" >&6; }
27031 case "$gl_cv_func_setenv_works" in
27032 *yes) ;;
27033 *)
27034 REPLACE_SETENV=1
27035 ;;
27036 esac
27037 fi
27038
27039 if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
27040
27041
27042
27043
27044
27045
27046
27047
27048 gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext"
27049
27050 fi
27051
27052
27053
27054
27055
27056 GNULIB_SETENV=1
27057
27058
27059
27060
27061
27062 $as_echo "#define GNULIB_TEST_SETENV 1" >>confdefs.h
27063
27064
27065
27066
27067
27068
27069
27070
27071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (LC_ALL, NULL) is multithread-safe" >&5
27072 $as_echo_n "checking whether setlocale (LC_ALL, NULL) is multithread-safe... " >&6; }
27073 if ${gl_cv_func_setlocale_null_all_mtsafe+:} false; then :
27074 $as_echo_n "(cached) " >&6
27075 else
27076 case "$host_os" in
27077 # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin.
27078 *-musl* | darwin* | freebsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*)
27079 gl_cv_func_setlocale_null_all_mtsafe=no ;;
27080 # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows.
27081 *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*)
27082 gl_cv_func_setlocale_null_all_mtsafe=yes ;;
27083 # If we don't know, obey --enable-cross-guesses.
27084 *)
27085 gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;;
27086 esac
27087
27088 fi
27089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_all_mtsafe" >&5
27090 $as_echo "$gl_cv_func_setlocale_null_all_mtsafe" >&6; }
27091 case "$host_os" in
27092 mingw*) ;;
27093 *)
27094 if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
27095 gl_cv_func_setlocale_null_all_mtsafe="trivially yes"
27096 fi
27097 ;;
27098 esac
27099 case "$gl_cv_func_setlocale_null_all_mtsafe" in
27100 *yes) SETLOCALE_NULL_ALL_MTSAFE=1 ;;
27101 *) SETLOCALE_NULL_ALL_MTSAFE=0 ;;
27102 esac
27103
27104 cat >>confdefs.h <<_ACEOF
27105 #define SETLOCALE_NULL_ALL_MTSAFE $SETLOCALE_NULL_ALL_MTSAFE
27106 _ACEOF
27107
27108
27109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (category, NULL) is multithread-safe" >&5
27110 $as_echo_n "checking whether setlocale (category, NULL) is multithread-safe... " >&6; }
27111 if ${gl_cv_func_setlocale_null_one_mtsafe+:} false; then :
27112 $as_echo_n "(cached) " >&6
27113 else
27114 case "$host_os" in
27115 # Guess no on OpenBSD, AIX.
27116 openbsd* | aix*)
27117 gl_cv_func_setlocale_null_one_mtsafe=no ;;
27118 # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows.
27119 *-gnu* | gnu* | *-musl* | darwin* | freebsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
27120 gl_cv_func_setlocale_null_one_mtsafe=yes ;;
27121 # If we don't know, obey --enable-cross-guesses.
27122 *)
27123 gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;;
27124 esac
27125
27126 fi
27127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_one_mtsafe" >&5
27128 $as_echo "$gl_cv_func_setlocale_null_one_mtsafe" >&6; }
27129 case "$host_os" in
27130 mingw*) ;;
27131 *)
27132 if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
27133 gl_cv_func_setlocale_null_one_mtsafe="trivially yes"
27134 fi
27135 ;;
27136 esac
27137 case "$gl_cv_func_setlocale_null_one_mtsafe" in
27138 *yes) SETLOCALE_NULL_ONE_MTSAFE=1 ;;
27139 *) SETLOCALE_NULL_ONE_MTSAFE=0 ;;
27140 esac
27141
27142 cat >>confdefs.h <<_ACEOF
27143 #define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE
27144 _ACEOF
27145
27146
27147 if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
27148 case "$host_os" in
27149 mingw*) LIB_SETLOCALE_NULL= ;;
27150 *)
27151
27152
27153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
27154 $as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
27155 if ${gl_cv_have_weak+:} false; then :
27156 $as_echo_n "(cached) " >&6
27157 else
27158 gl_cv_have_weak=no
27159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27160 /* end confdefs.h. */
27161 extern void xyzzy ();
27162 #pragma weak xyzzy
27163 int
27164 main ()
27165 {
27166 xyzzy();
27167 ;
27168 return 0;
27169 }
27170 _ACEOF
27171 if ac_fn_c_try_link "$LINENO"; then :
27172 gl_cv_have_weak=maybe
27173 fi
27174 rm -f core conftest.err conftest.$ac_objext \
27175 conftest$ac_exeext conftest.$ac_ext
27176 if test $gl_cv_have_weak = maybe; then
27177 if test "$cross_compiling" = yes; then :
27178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27179 /* end confdefs.h. */
27180 #ifdef __ELF__
27181 Extensible Linking Format
27182 #endif
27183
27184 _ACEOF
27185 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27186 $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
27187 gl_cv_have_weak="guessing yes"
27188 else
27189 gl_cv_have_weak="guessing no"
27190 fi
27191 rm -f conftest*
27192
27193
27194 else
27195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27196 /* end confdefs.h. */
27197
27198 #include <stdio.h>
27199 #pragma weak fputs
27200 int main ()
27201 {
27202 return (fputs == NULL);
27203 }
27204 _ACEOF
27205 if ac_fn_c_try_run "$LINENO"; then :
27206 gl_cv_have_weak=yes
27207 else
27208 gl_cv_have_weak=no
27209 fi
27210 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27211 conftest.$ac_objext conftest.beam conftest.$ac_ext
27212 fi
27213
27214 fi
27215 case " $LDFLAGS " in
27216 *" -static "*) gl_cv_have_weak=no ;;
27217 esac
27218 case "$gl_cv_have_weak" in
27219 *yes)
27220 case "$host_os" in
27221 freebsd* | dragonfly*)
27222 : > conftest1.c
27223 $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
27224 cat <<EOF > conftest2.c
27225 #include <pthread.h>
27226 #pragma weak pthread_mutexattr_gettype
27227 int main ()
27228 {
27229 return (pthread_mutexattr_gettype != NULL);
27230 }
27231 EOF
27232 $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
27233 || gl_cv_have_weak=no
27234 rm -f conftest1.c libempty.so conftest2.c conftest
27235 ;;
27236 esac
27237 ;;
27238 esac
27239
27240 fi
27241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
27242 $as_echo "$gl_cv_have_weak" >&6; }
27243 case "$gl_cv_have_weak" in
27244 *yes)
27245
27246 $as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
27247
27248 ;;
27249 esac
27250
27251 case "$gl_cv_have_weak" in
27252 *yes) LIB_SETLOCALE_NULL= ;;
27253 *) LIB_SETLOCALE_NULL="$LIBPTHREAD" ;;
27254 esac
27255 ;;
27256 esac
27257 else
27258 LIB_SETLOCALE_NULL=
27259 fi
27260
27261
27262 if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
27263
27264
27265
27266
27267
27268
27269
27270
27271 gl_LIBOBJS="$gl_LIBOBJS setlocale-lock.$ac_objext"
27272
27273
27274
27275
27276 CFLAG_VISIBILITY=
27277 HAVE_VISIBILITY=0
27278 if test -n "$GCC"; then
27279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
27280 $as_echo_n "checking whether the -Werror option is usable... " >&6; }
27281 if ${gl_cv_cc_vis_werror+:} false; then :
27282 $as_echo_n "(cached) " >&6
27283 else
27284 gl_save_CFLAGS="$CFLAGS"
27285 CFLAGS="$CFLAGS -Werror"
27286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27287 /* end confdefs.h. */
27288
27289 int
27290 main ()
27291 {
27292
27293 ;
27294 return 0;
27295 }
27296 _ACEOF
27297 if ac_fn_c_try_compile "$LINENO"; then :
27298 gl_cv_cc_vis_werror=yes
27299 else
27300 gl_cv_cc_vis_werror=no
27301 fi
27302 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27303 CFLAGS="$gl_save_CFLAGS"
27304
27305 fi
27306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
27307 $as_echo "$gl_cv_cc_vis_werror" >&6; }
27308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
27309 $as_echo_n "checking for simple visibility declarations... " >&6; }
27310 if ${gl_cv_cc_visibility+:} false; then :
27311 $as_echo_n "(cached) " >&6
27312 else
27313 gl_save_CFLAGS="$CFLAGS"
27314 CFLAGS="$CFLAGS -fvisibility=hidden"
27315 if test $gl_cv_cc_vis_werror = yes; then
27316 CFLAGS="$CFLAGS -Werror"
27317 fi
27318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27319 /* end confdefs.h. */
27320 extern __attribute__((__visibility__("hidden"))) int hiddenvar;
27321 extern __attribute__((__visibility__("default"))) int exportedvar;
27322 extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
27323 extern __attribute__((__visibility__("default"))) int exportedfunc (void);
27324 void dummyfunc (void) {}
27325
27326 int
27327 main ()
27328 {
27329
27330 ;
27331 return 0;
27332 }
27333 _ACEOF
27334 if ac_fn_c_try_compile "$LINENO"; then :
27335 gl_cv_cc_visibility=yes
27336 else
27337 gl_cv_cc_visibility=no
27338 fi
27339 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27340 CFLAGS="$gl_save_CFLAGS"
27341
27342 fi
27343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
27344 $as_echo "$gl_cv_cc_visibility" >&6; }
27345 if test $gl_cv_cc_visibility = yes; then
27346 CFLAG_VISIBILITY="-fvisibility=hidden"
27347 HAVE_VISIBILITY=1
27348 fi
27349 fi
27350
27351
27352
27353 cat >>confdefs.h <<_ACEOF
27354 #define HAVE_VISIBILITY $HAVE_VISIBILITY
27355 _ACEOF
27356
27357
27358
27359 fi
27360
27361
27362
27363
27364
27365 GNULIB_SETLOCALE_NULL=1
27366
27367
27368
27369
27370
27371 $as_echo "#define GNULIB_TEST_SETLOCALE_NULL 1" >>confdefs.h
27372
27373
27374
27375
27376
27377
27378
27379
27380
27381
27382
27383
27384
27385
27386 if test $gl_cv_have_include_next = yes; then
27387 gl_cv_next_signal_h='<'signal.h'>'
27388 else
27389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
27390 $as_echo_n "checking absolute name of <signal.h>... " >&6; }
27391 if ${gl_cv_next_signal_h+:} false; then :
27392 $as_echo_n "(cached) " >&6
27393 else
27394
27395
27396
27397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27398 /* end confdefs.h. */
27399 #include <signal.h>
27400 _ACEOF
27401 case "$host_os" in
27402 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27403 *) gl_absname_cpp="$ac_cpp" ;;
27404 esac
27405
27406 case "$host_os" in
27407 mingw*)
27408 gl_dirsep_regex='[/\\]'
27409 ;;
27410 *)
27411 gl_dirsep_regex='\/'
27412 ;;
27413 esac
27414 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27415 gl_header_literal_regex=`echo 'signal.h' \
27416 | sed -e "$gl_make_literal_regex_sed"`
27417 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27418 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27419 s|^/[^/]|//&|
27420 p
27421 q
27422 }'
27423
27424 gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27425 sed -n "$gl_absolute_header_sed"`
27426
27427 gl_header=$gl_cv_absolute_signal_h
27428 gl_cv_next_signal_h='"'$gl_header'"'
27429
27430
27431 fi
27432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
27433 $as_echo "$gl_cv_next_signal_h" >&6; }
27434 fi
27435 NEXT_SIGNAL_H=$gl_cv_next_signal_h
27436
27437 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27438 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27439 gl_next_as_first_directive='<'signal.h'>'
27440 else
27441 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27442 gl_next_as_first_directive=$gl_cv_next_signal_h
27443 fi
27444 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
27445
27446
27447
27448
27449
27450 # AIX declares sig_atomic_t to already include volatile, and C89 compilers
27451 # then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
27452 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
27453 #include <signal.h>
27454
27455 "
27456 if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes; then :
27457
27458 else
27459 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
27460 fi
27461
27462
27463
27464
27465
27466
27467
27468 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
27469 #include <signal.h>
27470
27471 "
27472 if test "x$ac_cv_type_sighandler_t" = xyes; then :
27473
27474 else
27475 HAVE_SIGHANDLER_T=0
27476 fi
27477
27478
27479
27480
27481
27482
27483
27484
27485 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
27486 /* <sys/types.h> is not needed according to POSIX, but the
27487 <sys/socket.h> in i386-unknown-freebsd4.10 and
27488 powerpc-apple-darwin5.5 required it. */
27489 #include <sys/types.h>
27490 #if HAVE_SYS_SOCKET_H
27491 # include <sys/socket.h>
27492 #elif HAVE_WS2TCPIP_H
27493 # include <ws2tcpip.h>
27494 #endif
27495
27496 "
27497 if test "x$ac_cv_type_socklen_t" = xyes; then :
27498
27499 else
27500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
27501 $as_echo_n "checking for socklen_t equivalent... " >&6; }
27502 if ${gl_cv_socklen_t_equiv+:} false; then :
27503 $as_echo_n "(cached) " >&6
27504 else
27505 # Systems have either "struct sockaddr *" or
27506 # "void *" as the second argument to getpeername
27507 gl_cv_socklen_t_equiv=
27508 for arg2 in "struct sockaddr" void; do
27509 for t in int size_t "unsigned int" "long int" "unsigned long int"; do
27510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27511 /* end confdefs.h. */
27512 #include <sys/types.h>
27513 #include <sys/socket.h>
27514
27515 int getpeername (int, $arg2 *, $t *);
27516 int
27517 main ()
27518 {
27519 $t len;
27520 getpeername (0, 0, &len);
27521 ;
27522 return 0;
27523 }
27524 _ACEOF
27525 if ac_fn_c_try_compile "$LINENO"; then :
27526 gl_cv_socklen_t_equiv="$t"
27527 fi
27528 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27529 test "$gl_cv_socklen_t_equiv" != "" && break
27530 done
27531 test "$gl_cv_socklen_t_equiv" != "" && break
27532 done
27533 if test "$gl_cv_socklen_t_equiv" = ""; then
27534 as_fn_error $? "Cannot find a type to use in place of socklen_t" "$LINENO" 5
27535 fi
27536
27537 fi
27538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
27539 $as_echo "$gl_cv_socklen_t_equiv" >&6; }
27540
27541 cat >>confdefs.h <<_ACEOF
27542 #define socklen_t $gl_cv_socklen_t_equiv
27543 _ACEOF
27544
27545 fi
27546
27547
27548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
27549 $as_echo_n "checking for ssize_t... " >&6; }
27550 if ${gt_cv_ssize_t+:} false; then :
27551 $as_echo_n "(cached) " >&6
27552 else
27553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27554 /* end confdefs.h. */
27555 #include <sys/types.h>
27556 int
27557 main ()
27558 {
27559 int x = sizeof (ssize_t *) + sizeof (ssize_t);
27560 return !x;
27561 ;
27562 return 0;
27563 }
27564 _ACEOF
27565 if ac_fn_c_try_compile "$LINENO"; then :
27566 gt_cv_ssize_t=yes
27567 else
27568 gt_cv_ssize_t=no
27569 fi
27570 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27571 fi
27572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
27573 $as_echo "$gt_cv_ssize_t" >&6; }
27574 if test $gt_cv_ssize_t = no; then
27575
27576 $as_echo "#define ssize_t int" >>confdefs.h
27577
27578 fi
27579
27580
27581
27582
27583
27584 case "$host_os" in
27585 mingw*)
27586 ;;
27587 *)
27588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
27589 $as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
27590 if ${gl_cv_func_stat_file_slash+:} false; then :
27591 $as_echo_n "(cached) " >&6
27592 else
27593 touch conftest.tmp
27594 # Assume that if we have lstat, we can also check symlinks.
27595 if test $ac_cv_func_lstat = yes; then
27596 ln -s conftest.tmp conftest.lnk
27597 fi
27598 if test "$cross_compiling" = yes; then :
27599 case "$host_os" in
27600 # Guess yes on Linux systems.
27601 linux-* | linux) gl_cv_func_stat_file_slash="guessing yes" ;;
27602 # Guess yes on glibc systems.
27603 *-gnu* | gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
27604 # If we don't know, obey --enable-cross-guesses.
27605 *) gl_cv_func_stat_file_slash="$gl_cross_guess_normal" ;;
27606 esac
27607
27608 else
27609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27610 /* end confdefs.h. */
27611 #include <sys/stat.h>
27612
27613 int
27614 main ()
27615 {
27616 int result = 0;
27617 struct stat st;
27618 if (!stat ("conftest.tmp/", &st))
27619 result |= 1;
27620 #if HAVE_LSTAT
27621 if (!stat ("conftest.lnk/", &st))
27622 result |= 2;
27623 #endif
27624 return result;
27625
27626 ;
27627 return 0;
27628 }
27629 _ACEOF
27630 if ac_fn_c_try_run "$LINENO"; then :
27631 gl_cv_func_stat_file_slash=yes
27632 else
27633 gl_cv_func_stat_file_slash=no
27634 fi
27635 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27636 conftest.$ac_objext conftest.beam conftest.$ac_ext
27637 fi
27638
27639 rm -f conftest.tmp conftest.lnk
27640 fi
27641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
27642 $as_echo "$gl_cv_func_stat_file_slash" >&6; }
27643 case $gl_cv_func_stat_file_slash in
27644 *no)
27645 REPLACE_STAT=1
27646
27647 $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
27648 ;;
27649 esac
27650 case $host_os in
27651 solaris*)
27652 REPLACE_FSTAT=1 ;;
27653 esac
27654 ;;
27655 esac
27656
27657 if test $REPLACE_STAT = 1; then
27658
27659
27660
27661
27662
27663
27664
27665
27666 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
27667
27668 case "$host_os" in
27669 mingw*)
27670
27671
27672
27673
27674
27675
27676
27677
27678 gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
27679
27680 ;;
27681 esac
27682
27683
27684
27685 :
27686
27687 fi
27688
27689
27690
27691
27692
27693 GNULIB_STAT=1
27694
27695
27696
27697
27698
27699 $as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h
27700
27701
27702
27703
27704
27705
27706
27707 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>
27708 #include <sys/stat.h>
27709 "
27710 if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes; then :
27711
27712 cat >>confdefs.h <<_ACEOF
27713 #define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
27714 _ACEOF
27715
27716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
27717 $as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
27718 if ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+:} false; then :
27719 $as_echo_n "(cached) " >&6
27720 else
27721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27722 /* end confdefs.h. */
27723
27724 #include <sys/types.h>
27725 #include <sys/stat.h>
27726 #if HAVE_SYS_TIME_H
27727 # include <sys/time.h>
27728 #endif
27729 #include <time.h>
27730 struct timespec ts;
27731 struct stat st;
27732
27733 int
27734 main ()
27735 {
27736
27737 st.st_atim = ts;
27738
27739 ;
27740 return 0;
27741 }
27742 _ACEOF
27743 if ac_fn_c_try_compile "$LINENO"; then :
27744 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
27745 else
27746 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
27747 fi
27748 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27749 fi
27750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
27751 $as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
27752 if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
27753
27754 $as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
27755
27756 fi
27757 else
27758 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>
27759 #include <sys/stat.h>
27760 "
27761 if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes; then :
27762
27763 cat >>confdefs.h <<_ACEOF
27764 #define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
27765 _ACEOF
27766
27767
27768 else
27769 ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
27770 #include <sys/stat.h>
27771 "
27772 if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes; then :
27773
27774 cat >>confdefs.h <<_ACEOF
27775 #define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
27776 _ACEOF
27777
27778
27779 else
27780 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>
27781 #include <sys/stat.h>
27782 "
27783 if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes; then :
27784
27785 cat >>confdefs.h <<_ACEOF
27786 #define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
27787 _ACEOF
27788
27789
27790 fi
27791
27792 fi
27793
27794 fi
27795
27796 fi
27797
27798
27799
27800
27801
27802 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>
27803 #include <sys/stat.h>
27804 "
27805 if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes; then :
27806
27807 cat >>confdefs.h <<_ACEOF
27808 #define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
27809 _ACEOF
27810
27811
27812 else
27813 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
27814 #include <sys/stat.h>
27815 "
27816 if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes; then :
27817
27818 cat >>confdefs.h <<_ACEOF
27819 #define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
27820 _ACEOF
27821
27822
27823 else
27824 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>
27825 #include <sys/stat.h>
27826 "
27827 if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes; then :
27828
27829 cat >>confdefs.h <<_ACEOF
27830 #define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
27831 _ACEOF
27832
27833
27834 fi
27835
27836 fi
27837
27838 fi
27839
27840
27841
27842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
27843 $as_echo_n "checking for working stdalign.h... " >&6; }
27844 if ${gl_cv_header_working_stdalign_h+:} false; then :
27845 $as_echo_n "(cached) " >&6
27846 else
27847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27848 /* end confdefs.h. */
27849 #include <stdalign.h>
27850 #include <stddef.h>
27851
27852 /* Test that alignof yields a result consistent with offsetof.
27853 This catches GCC bug 52023
27854 <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
27855 #ifdef __cplusplus
27856 template <class t> struct alignof_helper { char a; t b; };
27857 # define ao(type) offsetof (alignof_helper<type>, b)
27858 #else
27859 # define ao(type) offsetof (struct { char a; type b; }, b)
27860 #endif
27861 char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
27862 char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
27863 char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
27864
27865 /* Test _Alignas only on platforms where gnulib can help. */
27866 #if \
27867 ((defined __cplusplus && 201103 <= __cplusplus) \
27868 || (defined __APPLE__ && defined __MACH__ \
27869 ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
27870 : __GNUC__) \
27871 || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \
27872 || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__ \
27873 || 1300 <= _MSC_VER)
27874 struct alignas_test { char c; char alignas (8) alignas_8; };
27875 char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
27876 ? 1 : -1];
27877 #endif
27878
27879 int
27880 main ()
27881 {
27882
27883 ;
27884 return 0;
27885 }
27886 _ACEOF
27887 if ac_fn_c_try_compile "$LINENO"; then :
27888 gl_cv_header_working_stdalign_h=yes
27889 else
27890 gl_cv_header_working_stdalign_h=no
27891 fi
27892 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27893 fi
27894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
27895 $as_echo "$gl_cv_header_working_stdalign_h" >&6; }
27896
27897 if test $gl_cv_header_working_stdalign_h = yes; then
27898 STDALIGN_H=''
27899 else
27900 STDALIGN_H='stdalign.h'
27901 fi
27902
27903
27904 if test -n "$STDALIGN_H"; then
27905 GL_GENERATE_STDALIGN_H_TRUE=
27906 GL_GENERATE_STDALIGN_H_FALSE='#'
27907 else
27908 GL_GENERATE_STDALIGN_H_TRUE='#'
27909 GL_GENERATE_STDALIGN_H_FALSE=
27910 fi
27911
27912
27913
27914
27915
27916
27917 if test "$ac_cv_header_stdbool_h" = yes; then
27918 case "$host_os" in
27919 solaris*)
27920 if test -z "$GCC"; then
27921 STDBOOL_H='stdbool.h'
27922 else
27923 STDBOOL_H=''
27924 fi
27925 ;;
27926 *)
27927 STDBOOL_H=''
27928 ;;
27929 esac
27930 else
27931 STDBOOL_H='stdbool.h'
27932 fi
27933
27934 if test -n "$STDBOOL_H"; then
27935 GL_GENERATE_STDBOOL_H_TRUE=
27936 GL_GENERATE_STDBOOL_H_FALSE='#'
27937 else
27938 GL_GENERATE_STDBOOL_H_TRUE='#'
27939 GL_GENERATE_STDBOOL_H_FALSE=
27940 fi
27941
27942
27943 if test "$ac_cv_type__Bool" = yes; then
27944 HAVE__BOOL=1
27945 else
27946 HAVE__BOOL=0
27947 fi
27948
27949
27950
27951
27952
27953
27954
27955
27956 STDDEF_H=
27957
27958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5
27959 $as_echo_n "checking for good max_align_t... " >&6; }
27960 if ${gl_cv_type_max_align_t+:} false; then :
27961 $as_echo_n "(cached) " >&6
27962 else
27963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27964 /* end confdefs.h. */
27965 #include <stddef.h>
27966 unsigned int s = sizeof (max_align_t);
27967 #if defined __GNUC__ || defined __clang__ || defined __IBM__ALIGNOF__
27968 int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
27969 int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1];
27970 #endif
27971 typedef struct { char a; max_align_t b; } max_helper;
27972 typedef struct { char a; long b; } long_helper;
27973 typedef struct { char a; double b; } double_helper;
27974 typedef struct { char a; long double b; } long_double_helper;
27975 int check3[2 * (offsetof (long_helper, b) <= offsetof (max_helper, b)) - 1];
27976 int check4[2 * (offsetof (double_helper, b) <= offsetof (max_helper, b)) - 1];
27977 int check5[2 * (offsetof (long_double_helper, b) <= offsetof (max_helper, b)) - 1];
27978
27979 int
27980 main ()
27981 {
27982
27983 ;
27984 return 0;
27985 }
27986 _ACEOF
27987 if ac_fn_c_try_compile "$LINENO"; then :
27988 gl_cv_type_max_align_t=yes
27989 else
27990 gl_cv_type_max_align_t=no
27991 fi
27992 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27993
27994 fi
27995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5
27996 $as_echo "$gl_cv_type_max_align_t" >&6; }
27997 if test $gl_cv_type_max_align_t = no; then
27998 HAVE_MAX_ALIGN_T=0
27999 STDDEF_H=stddef.h
28000 fi
28001
28002 if test $gt_cv_c_wchar_t = no; then
28003 HAVE_WCHAR_T=0
28004 STDDEF_H=stddef.h
28005 fi
28006
28007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
28008 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
28009 if ${gl_cv_decl_null_works+:} false; then :
28010 $as_echo_n "(cached) " >&6
28011 else
28012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28013 /* end confdefs.h. */
28014 #include <stddef.h>
28015 int test[2 * (sizeof NULL == sizeof (void *)) -1];
28016
28017 int
28018 main ()
28019 {
28020
28021 ;
28022 return 0;
28023 }
28024 _ACEOF
28025 if ac_fn_c_try_compile "$LINENO"; then :
28026 gl_cv_decl_null_works=yes
28027 else
28028 gl_cv_decl_null_works=no
28029 fi
28030 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28031 fi
28032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
28033 $as_echo "$gl_cv_decl_null_works" >&6; }
28034 if test $gl_cv_decl_null_works = no; then
28035 REPLACE_NULL=1
28036 STDDEF_H=stddef.h
28037 fi
28038
28039
28040 if test -n "$STDDEF_H"; then
28041 GL_GENERATE_STDDEF_H_TRUE=
28042 GL_GENERATE_STDDEF_H_FALSE='#'
28043 else
28044 GL_GENERATE_STDDEF_H_TRUE='#'
28045 GL_GENERATE_STDDEF_H_FALSE=
28046 fi
28047
28048 if test -n "$STDDEF_H"; then
28049
28050
28051
28052
28053
28054
28055
28056
28057 if test $gl_cv_have_include_next = yes; then
28058 gl_cv_next_stddef_h='<'stddef.h'>'
28059 else
28060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
28061 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
28062 if ${gl_cv_next_stddef_h+:} false; then :
28063 $as_echo_n "(cached) " >&6
28064 else
28065
28066
28067
28068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28069 /* end confdefs.h. */
28070 #include <stddef.h>
28071 _ACEOF
28072 case "$host_os" in
28073 aix*) gl_absname_cpp="$ac_cpp -C" ;;
28074 *) gl_absname_cpp="$ac_cpp" ;;
28075 esac
28076
28077 case "$host_os" in
28078 mingw*)
28079 gl_dirsep_regex='[/\\]'
28080 ;;
28081 *)
28082 gl_dirsep_regex='\/'
28083 ;;
28084 esac
28085 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28086 gl_header_literal_regex=`echo 'stddef.h' \
28087 | sed -e "$gl_make_literal_regex_sed"`
28088 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28089 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28090 s|^/[^/]|//&|
28091 p
28092 q
28093 }'
28094
28095 gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28096 sed -n "$gl_absolute_header_sed"`
28097
28098 gl_header=$gl_cv_absolute_stddef_h
28099 gl_cv_next_stddef_h='"'$gl_header'"'
28100
28101
28102 fi
28103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
28104 $as_echo "$gl_cv_next_stddef_h" >&6; }
28105 fi
28106 NEXT_STDDEF_H=$gl_cv_next_stddef_h
28107
28108 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28109 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28110 gl_next_as_first_directive='<'stddef.h'>'
28111 else
28112 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28113 gl_next_as_first_directive=$gl_cv_next_stddef_h
28114 fi
28115 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
28116
28117
28118
28119
28120 fi
28121
28122
28123
28124
28125 $as_echo "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
28126
28127
28128
28129
28130
28131
28132
28133
28134
28135
28136 if test $gl_cv_have_include_next = yes; then
28137 gl_cv_next_stdio_h='<'stdio.h'>'
28138 else
28139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
28140 $as_echo_n "checking absolute name of <stdio.h>... " >&6; }
28141 if ${gl_cv_next_stdio_h+:} false; then :
28142 $as_echo_n "(cached) " >&6
28143 else
28144
28145
28146
28147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28148 /* end confdefs.h. */
28149 #include <stdio.h>
28150 _ACEOF
28151 case "$host_os" in
28152 aix*) gl_absname_cpp="$ac_cpp -C" ;;
28153 *) gl_absname_cpp="$ac_cpp" ;;
28154 esac
28155
28156 case "$host_os" in
28157 mingw*)
28158 gl_dirsep_regex='[/\\]'
28159 ;;
28160 *)
28161 gl_dirsep_regex='\/'
28162 ;;
28163 esac
28164 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28165 gl_header_literal_regex=`echo 'stdio.h' \
28166 | sed -e "$gl_make_literal_regex_sed"`
28167 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28168 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28169 s|^/[^/]|//&|
28170 p
28171 q
28172 }'
28173
28174 gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28175 sed -n "$gl_absolute_header_sed"`
28176
28177 gl_header=$gl_cv_absolute_stdio_h
28178 gl_cv_next_stdio_h='"'$gl_header'"'
28179
28180
28181 fi
28182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
28183 $as_echo "$gl_cv_next_stdio_h" >&6; }
28184 fi
28185 NEXT_STDIO_H=$gl_cv_next_stdio_h
28186
28187 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28188 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28189 gl_next_as_first_directive='<'stdio.h'>'
28190 else
28191 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28192 gl_next_as_first_directive=$gl_cv_next_stdio_h
28193 fi
28194 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
28195
28196
28197
28198
28199
28200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
28201 $as_echo_n "checking which flavor of printf attribute matches inttypes macros... " >&6; }
28202 if ${gl_cv_func_printf_attribute_flavor+:} false; then :
28203 $as_echo_n "(cached) " >&6
28204 else
28205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28206 /* end confdefs.h. */
28207
28208 #define __STDC_FORMAT_MACROS 1
28209 #include <stdio.h>
28210 #include <inttypes.h>
28211 /* For non-mingw systems, compilation will trivially succeed.
28212 For mingw, compilation will succeed for older mingw (system
28213 printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
28214 #if (defined _WIN32 && ! defined __CYGWIN__) && \
28215 (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
28216 extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
28217 #endif
28218
28219 int
28220 main ()
28221 {
28222
28223 ;
28224 return 0;
28225 }
28226 _ACEOF
28227 if ac_fn_c_try_compile "$LINENO"; then :
28228 gl_cv_func_printf_attribute_flavor=system
28229 else
28230 gl_cv_func_printf_attribute_flavor=gnu
28231 fi
28232 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28233 fi
28234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
28235 $as_echo "$gl_cv_func_printf_attribute_flavor" >&6; }
28236 if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
28237
28238 $as_echo "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
28239
28240 fi
28241
28242 GNULIB_FSCANF=1
28243
28244
28245 cat >>confdefs.h <<_ACEOF
28246 #define GNULIB_FSCANF 1
28247 _ACEOF
28248
28249
28250 GNULIB_SCANF=1
28251
28252
28253 cat >>confdefs.h <<_ACEOF
28254 #define GNULIB_SCANF 1
28255 _ACEOF
28256
28257
28258 GNULIB_FGETC=1
28259 GNULIB_GETC=1
28260 GNULIB_GETCHAR=1
28261 GNULIB_FGETS=1
28262 GNULIB_FREAD=1
28263
28264
28265 GNULIB_FPRINTF=1
28266 GNULIB_PRINTF=1
28267 GNULIB_VFPRINTF=1
28268 GNULIB_VPRINTF=1
28269 GNULIB_FPUTC=1
28270 GNULIB_PUTC=1
28271 GNULIB_PUTCHAR=1
28272 GNULIB_FPUTS=1
28273 GNULIB_PUTS=1
28274 GNULIB_FWRITE=1
28275
28276
28277
28278
28279
28280
28281
28282
28283
28284
28285 if test $ac_cv_have_decl_fcloseall = no; then
28286 HAVE_DECL_FCLOSEALL=0
28287 fi
28288
28289
28290
28291
28292
28293
28294
28295
28296
28297
28298
28299 if test $gl_cv_have_include_next = yes; then
28300 gl_cv_next_stdlib_h='<'stdlib.h'>'
28301 else
28302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
28303 $as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
28304 if ${gl_cv_next_stdlib_h+:} false; then :
28305 $as_echo_n "(cached) " >&6
28306 else
28307
28308
28309
28310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28311 /* end confdefs.h. */
28312 #include <stdlib.h>
28313 _ACEOF
28314 case "$host_os" in
28315 aix*) gl_absname_cpp="$ac_cpp -C" ;;
28316 *) gl_absname_cpp="$ac_cpp" ;;
28317 esac
28318
28319 case "$host_os" in
28320 mingw*)
28321 gl_dirsep_regex='[/\\]'
28322 ;;
28323 *)
28324 gl_dirsep_regex='\/'
28325 ;;
28326 esac
28327 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28328 gl_header_literal_regex=`echo 'stdlib.h' \
28329 | sed -e "$gl_make_literal_regex_sed"`
28330 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28331 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28332 s|^/[^/]|//&|
28333 p
28334 q
28335 }'
28336
28337 gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28338 sed -n "$gl_absolute_header_sed"`
28339
28340 gl_header=$gl_cv_absolute_stdlib_h
28341 gl_cv_next_stdlib_h='"'$gl_header'"'
28342
28343
28344 fi
28345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
28346 $as_echo "$gl_cv_next_stdlib_h" >&6; }
28347 fi
28348 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
28349
28350 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28351 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28352 gl_next_as_first_directive='<'stdlib.h'>'
28353 else
28354 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28355 gl_next_as_first_directive=$gl_cv_next_stdlib_h
28356 fi
28357 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
28358
28359
28360
28361
28362
28363
28364
28365
28366
28367
28368
28369
28370 if test $ac_cv_have_decl_ecvt = no; then
28371 HAVE_DECL_ECVT=0
28372 fi
28373
28374 if test $ac_cv_have_decl_fcvt = no; then
28375 HAVE_DECL_FCVT=0
28376 fi
28377
28378 if test $ac_cv_have_decl_gcvt = no; then
28379 HAVE_DECL_GCVT=0
28380 fi
28381
28382
28383
28384
28385
28386 for ac_func in strchrnul
28387 do :
28388 ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
28389 if test "x$ac_cv_func_strchrnul" = xyes; then :
28390 cat >>confdefs.h <<_ACEOF
28391 #define HAVE_STRCHRNUL 1
28392 _ACEOF
28393
28394 fi
28395 done
28396
28397 if test $ac_cv_func_strchrnul = no; then
28398 HAVE_STRCHRNUL=0
28399 else
28400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5
28401 $as_echo_n "checking whether strchrnul works... " >&6; }
28402 if ${gl_cv_func_strchrnul_works+:} false; then :
28403 $as_echo_n "(cached) " >&6
28404 else
28405 if test "$cross_compiling" = yes; then :
28406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28407 /* end confdefs.h. */
28408
28409 #if defined __CYGWIN__
28410 #include <cygwin/version.h>
28411 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9)
28412 Lucky user
28413 #endif
28414 #else
28415 Lucky user
28416 #endif
28417
28418 _ACEOF
28419 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28420 $EGREP "Lucky user" >/dev/null 2>&1; then :
28421 gl_cv_func_strchrnul_works="guessing yes"
28422 else
28423 gl_cv_func_strchrnul_works="guessing no"
28424 fi
28425 rm -f conftest*
28426
28427
28428 else
28429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28430 /* end confdefs.h. */
28431
28432 #include <string.h> /* for strchrnul */
28433
28434 int
28435 main ()
28436 {
28437 const char *buf = "a";
28438 return strchrnul (buf, 'b') != buf + 1;
28439
28440 ;
28441 return 0;
28442 }
28443 _ACEOF
28444 if ac_fn_c_try_run "$LINENO"; then :
28445 gl_cv_func_strchrnul_works=yes
28446 else
28447 gl_cv_func_strchrnul_works=no
28448 fi
28449 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28450 conftest.$ac_objext conftest.beam conftest.$ac_ext
28451 fi
28452
28453
28454 fi
28455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strchrnul_works" >&5
28456 $as_echo "$gl_cv_func_strchrnul_works" >&6; }
28457 case "$gl_cv_func_strchrnul_works" in
28458 *yes) ;;
28459 *) REPLACE_STRCHRNUL=1 ;;
28460 esac
28461 fi
28462
28463 if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
28464
28465
28466
28467
28468
28469
28470
28471
28472 gl_LIBOBJS="$gl_LIBOBJS strchrnul.$ac_objext"
28473
28474 :
28475 fi
28476
28477
28478
28479
28480
28481 GNULIB_STRCHRNUL=1
28482
28483
28484
28485
28486
28487 $as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
28488
28489
28490
28491
28492
28493
28494 if test $gl_cv_func_malloc_posix != yes; then
28495 REPLACE_STRDUP=1
28496 fi
28497
28498 if test $ac_cv_have_decl_strdup = no; then
28499 HAVE_DECL_STRDUP=0
28500 fi
28501
28502 if test $REPLACE_STRDUP = 1; then
28503
28504
28505
28506
28507
28508
28509
28510
28511 gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext"
28512
28513 :
28514 fi
28515
28516
28517
28518
28519
28520 GNULIB_STRDUP=1
28521
28522
28523
28524
28525
28526 $as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
28527
28528
28529
28530
28531
28532
28533
28534
28535
28536
28537 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
28538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
28539 $as_echo_n "checking for working strerror function... " >&6; }
28540 if ${gl_cv_func_working_strerror+:} false; then :
28541 $as_echo_n "(cached) " >&6
28542 else
28543 if test "$cross_compiling" = yes; then :
28544 case "$host_os" in
28545 # Guess yes on glibc systems.
28546 *-gnu* | gnu*) gl_cv_func_working_strerror="guessing yes" ;;
28547 # Guess yes on musl systems.
28548 *-musl*) gl_cv_func_working_strerror="guessing yes" ;;
28549 # If we don't know, obey --enable-cross-guesses.
28550 *) gl_cv_func_working_strerror="$gl_cross_guess_normal" ;;
28551 esac
28552
28553 else
28554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28555 /* end confdefs.h. */
28556 #include <string.h>
28557
28558 int
28559 main ()
28560 {
28561 if (!*strerror (-2)) return 1;
28562 ;
28563 return 0;
28564 }
28565 _ACEOF
28566 if ac_fn_c_try_run "$LINENO"; then :
28567 gl_cv_func_working_strerror=yes
28568 else
28569 gl_cv_func_working_strerror=no
28570 fi
28571 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28572 conftest.$ac_objext conftest.beam conftest.$ac_ext
28573 fi
28574
28575
28576 fi
28577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
28578 $as_echo "$gl_cv_func_working_strerror" >&6; }
28579 case "$gl_cv_func_working_strerror" in
28580 *yes) ;;
28581 *)
28582 REPLACE_STRERROR=1
28583 ;;
28584 esac
28585
28586 case "$gl_cv_func_strerror_r_works" in
28587 *no) REPLACE_STRERROR=1 ;;
28588 esac
28589
28590 else
28591 REPLACE_STRERROR=1
28592 fi
28593
28594 if test $REPLACE_STRERROR = 1; then
28595
28596
28597
28598
28599
28600
28601
28602
28603 gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
28604
28605 fi
28606
28607
28608 cat >>confdefs.h <<_ACEOF
28609 #define GNULIB_STRERROR 1
28610 _ACEOF
28611
28612
28613
28614
28615
28616
28617
28618 GNULIB_STRERROR=1
28619
28620
28621
28622
28623
28624 $as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
28625
28626
28627
28628
28629
28630 if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
28631
28632
28633
28634
28635
28636
28637
28638
28639 gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
28640
28641
28642
28643
28644
28645 if test $ac_cv_header_sys_socket_h != yes; then
28646 for ac_header in winsock2.h
28647 do :
28648 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
28649 if test "x$ac_cv_header_winsock2_h" = xyes; then :
28650 cat >>confdefs.h <<_ACEOF
28651 #define HAVE_WINSOCK2_H 1
28652 _ACEOF
28653
28654 fi
28655
28656 done
28657
28658 fi
28659 if test "$ac_cv_header_winsock2_h" = yes; then
28660 HAVE_WINSOCK2_H=1
28661 UNISTD_H_HAVE_WINSOCK2_H=1
28662 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
28663 else
28664 HAVE_WINSOCK2_H=0
28665 fi
28666
28667
28668 fi
28669
28670
28671
28672
28673
28674
28675
28676 if test $ac_cv_have_decl_strerror_r = no; then
28677 HAVE_DECL_STRERROR_R=0
28678 fi
28679
28680 if test $ac_cv_func_strerror_r = yes; then
28681 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
28682 if test $gl_cv_func_strerror_r_posix_signature = yes; then
28683 case "$gl_cv_func_strerror_r_works" in
28684 *no) REPLACE_STRERROR_R=1 ;;
28685 esac
28686 else
28687 REPLACE_STRERROR_R=1
28688 fi
28689 else
28690 REPLACE_STRERROR_R=1
28691 fi
28692 fi
28693
28694 if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then
28695
28696
28697
28698
28699
28700
28701
28702
28703 gl_LIBOBJS="$gl_LIBOBJS strerror_r.$ac_objext"
28704
28705
28706
28707
28708
28709
28710 fi
28711
28712
28713
28714
28715
28716 GNULIB_STRERROR_R=1
28717
28718
28719
28720
28721
28722 $as_echo "#define GNULIB_TEST_STRERROR_R 1" >>confdefs.h
28723
28724
28725
28726
28727
28728 cat >>confdefs.h <<_ACEOF
28729 #define GNULIB_STRERROR_R_POSIX 1
28730 _ACEOF
28731
28732
28733
28734
28735
28736
28737
28738
28739
28740
28741
28742 if test $ac_cv_have_decl_strnlen = no; then
28743 HAVE_DECL_STRNLEN=0
28744 else
28745
28746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5
28747 $as_echo_n "checking for working strnlen... " >&6; }
28748 if ${ac_cv_func_strnlen_working+:} false; then :
28749 $as_echo_n "(cached) " >&6
28750 else
28751 if test "$cross_compiling" = yes; then :
28752 # Guess no on AIX systems, yes otherwise.
28753 case "$host_os" in
28754 aix*) ac_cv_func_strnlen_working=no;;
28755 *) ac_cv_func_strnlen_working=yes;;
28756 esac
28757 else
28758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28759 /* end confdefs.h. */
28760 $ac_includes_default
28761 int
28762 main ()
28763 {
28764
28765 #define S "foobar"
28766 #define S_LEN (sizeof S - 1)
28767
28768 /* At least one implementation is buggy: that of AIX 4.3 would
28769 give strnlen (S, 1) == 3. */
28770
28771 int i;
28772 for (i = 0; i < S_LEN + 1; ++i)
28773 {
28774 int expected = i <= S_LEN ? i : S_LEN;
28775 if (strnlen (S, i) != expected)
28776 return 1;
28777 }
28778 return 0;
28779
28780 ;
28781 return 0;
28782 }
28783 _ACEOF
28784 if ac_fn_c_try_run "$LINENO"; then :
28785 ac_cv_func_strnlen_working=yes
28786 else
28787 ac_cv_func_strnlen_working=no
28788 fi
28789 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28790 conftest.$ac_objext conftest.beam conftest.$ac_ext
28791 fi
28792
28793 fi
28794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5
28795 $as_echo "$ac_cv_func_strnlen_working" >&6; }
28796 test $ac_cv_func_strnlen_working = no && :
28797
28798
28799 if test $ac_cv_func_strnlen_working = no; then
28800 REPLACE_STRNLEN=1
28801 fi
28802 fi
28803
28804 if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
28805
28806
28807
28808
28809
28810
28811
28812
28813 gl_LIBOBJS="$gl_LIBOBJS strnlen.$ac_objext"
28814
28815 :
28816 fi
28817
28818
28819
28820
28821
28822 GNULIB_STRNLEN=1
28823
28824
28825
28826
28827
28828 $as_echo "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h
28829
28830
28831
28832
28833
28834 if test $REPLACE_STRSTR = 0; then
28835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works in linear time" >&5
28836 $as_echo_n "checking whether strstr works in linear time... " >&6; }
28837 if ${gl_cv_func_strstr_linear+:} false; then :
28838 $as_echo_n "(cached) " >&6
28839 else
28840 if test "$cross_compiling" = yes; then :
28841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28842 /* end confdefs.h. */
28843
28844 #include <features.h>
28845 #ifdef __GNU_LIBRARY__
28846 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
28847 && !(defined __i386__ || defined __x86_64__) \
28848 && !defined __UCLIBC__
28849 Lucky user
28850 #endif
28851 #endif
28852 #ifdef __CYGWIN__
28853 #include <cygwin/version.h>
28854 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
28855 Lucky user
28856 #endif
28857 #endif
28858
28859 _ACEOF
28860 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28861 $EGREP "Lucky user" >/dev/null 2>&1; then :
28862 gl_cv_func_strstr_linear="guessing yes"
28863 else
28864 gl_cv_func_strstr_linear="$gl_cross_guess_normal"
28865 fi
28866 rm -f conftest*
28867
28868
28869 else
28870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28871 /* end confdefs.h. */
28872
28873 #ifdef __MVS__
28874 /* z/OS does not deliver signals while strstr() is running (thanks to
28875 restrictions on its LE runtime), which prevents us from limiting the
28876 running time of this test. */
28877 # error "This test does not work properly on z/OS"
28878 #endif
28879 #include <signal.h> /* for signal */
28880 #include <string.h> /* for strstr */
28881 #include <stdlib.h> /* for malloc */
28882 #include <unistd.h> /* for alarm */
28883 static void quit (int sig) { _exit (sig + 128); }
28884
28885 int
28886 main ()
28887 {
28888
28889 int result = 0;
28890 size_t m = 1000000;
28891 char *haystack = (char *) malloc (2 * m + 2);
28892 char *needle = (char *) malloc (m + 2);
28893 /* Failure to compile this test due to missing alarm is okay,
28894 since all such platforms (mingw) also have quadratic strstr. */
28895 signal (SIGALRM, quit);
28896 alarm (5);
28897 /* Check for quadratic performance. */
28898 if (haystack && needle)
28899 {
28900 memset (haystack, 'A', 2 * m);
28901 haystack[2 * m] = 'B';
28902 haystack[2 * m + 1] = 0;
28903 memset (needle, 'A', m);
28904 needle[m] = 'B';
28905 needle[m + 1] = 0;
28906 if (!strstr (haystack, needle))
28907 result |= 1;
28908 }
28909 /* Free allocated memory, in case some sanitizer is watching. */
28910 free (haystack);
28911 free (needle);
28912 return result;
28913
28914 ;
28915 return 0;
28916 }
28917 _ACEOF
28918 if ac_fn_c_try_run "$LINENO"; then :
28919 gl_cv_func_strstr_linear=yes
28920 else
28921 gl_cv_func_strstr_linear=no
28922 fi
28923 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28924 conftest.$ac_objext conftest.beam conftest.$ac_ext
28925 fi
28926
28927
28928 fi
28929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_linear" >&5
28930 $as_echo "$gl_cv_func_strstr_linear" >&6; }
28931 case "$gl_cv_func_strstr_linear" in
28932 *yes) ;;
28933 *)
28934 REPLACE_STRSTR=1
28935 ;;
28936 esac
28937 fi
28938
28939 if test $REPLACE_STRSTR = 1; then
28940
28941
28942
28943
28944
28945
28946
28947
28948 gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
28949
28950 fi
28951
28952
28953
28954 if test $REPLACE_MEMCHR = 1; then
28955 REPLACE_STRSTR=1
28956 else
28957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
28958 $as_echo_n "checking whether strstr works... " >&6; }
28959 if ${gl_cv_func_strstr_works_always+:} false; then :
28960 $as_echo_n "(cached) " >&6
28961 else
28962 if test "$cross_compiling" = yes; then :
28963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28964 /* end confdefs.h. */
28965
28966 #ifdef __GNU_LIBRARY__
28967 #include <features.h>
28968 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
28969 || defined __UCLIBC__
28970 Lucky user
28971 #endif
28972 #elif defined __CYGWIN__
28973 #include <cygwin/version.h>
28974 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
28975 Lucky user
28976 #endif
28977 #else
28978 Lucky user
28979 #endif
28980
28981 _ACEOF
28982 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28983 $EGREP "Lucky user" >/dev/null 2>&1; then :
28984 gl_cv_func_strstr_works_always="guessing yes"
28985 else
28986 gl_cv_func_strstr_works_always="$gl_cross_guess_normal"
28987 fi
28988 rm -f conftest*
28989
28990
28991 else
28992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28993 /* end confdefs.h. */
28994
28995 #include <string.h> /* for strstr */
28996 #ifdef __GNU_LIBRARY__
28997 #include <features.h>
28998 #if __GLIBC__ == 2 && __GLIBC_MINOR__ == 28
28999 Unlucky user
29000 #endif
29001 #endif
29002 #define P "_EF_BF_BD"
29003 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
29004 #define NEEDLE P P P P P
29005
29006 int
29007 main ()
29008 {
29009 return !!strstr (HAYSTACK, NEEDLE);
29010
29011 ;
29012 return 0;
29013 }
29014 _ACEOF
29015 if ac_fn_c_try_run "$LINENO"; then :
29016 gl_cv_func_strstr_works_always=yes
29017 else
29018 gl_cv_func_strstr_works_always=no
29019 fi
29020 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29021 conftest.$ac_objext conftest.beam conftest.$ac_ext
29022 fi
29023
29024
29025 fi
29026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
29027 $as_echo "$gl_cv_func_strstr_works_always" >&6; }
29028 case "$gl_cv_func_strstr_works_always" in
29029 *yes) ;;
29030 *)
29031 REPLACE_STRSTR=1
29032 ;;
29033 esac
29034 fi
29035
29036 if test $REPLACE_STRSTR = 1; then
29037
29038
29039
29040
29041
29042
29043
29044
29045 gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
29046
29047 fi
29048
29049
29050
29051
29052
29053 GNULIB_STRSTR=1
29054
29055
29056
29057
29058
29059 $as_echo "#define GNULIB_TEST_STRSTR 1" >>confdefs.h
29060
29061
29062
29063
29064
29065
29066
29067 for ac_func in strtok_r
29068 do :
29069 ac_fn_c_check_func "$LINENO" "strtok_r" "ac_cv_func_strtok_r"
29070 if test "x$ac_cv_func_strtok_r" = xyes; then :
29071 cat >>confdefs.h <<_ACEOF
29072 #define HAVE_STRTOK_R 1
29073 _ACEOF
29074
29075 fi
29076 done
29077
29078 if test $ac_cv_func_strtok_r = yes; then
29079 HAVE_STRTOK_R=1
29080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtok_r works" >&5
29081 $as_echo_n "checking whether strtok_r works... " >&6; }
29082 if ${gl_cv_func_strtok_r_works+:} false; then :
29083 $as_echo_n "(cached) " >&6
29084 else
29085 if test "$cross_compiling" = yes; then :
29086 case "$host_os" in
29087 # Guess no on glibc systems.
29088 *-gnu* | gnu*) gl_cv_func_strtok_r_works="guessing no" ;;
29089 # Guess yes on native Windows.
29090 mingw*) gl_cv_func_strtok_r_works="guessing yes" ;;
29091 *) gl_cv_func_strtok_r_works="guessing yes" ;;
29092 esac
29093
29094 else
29095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29096 /* end confdefs.h. */
29097
29098 #ifndef __OPTIMIZE__
29099 # define __OPTIMIZE__ 1
29100 #endif
29101 #undef __OPTIMIZE_SIZE__
29102 #undef __NO_INLINE__
29103 #include <stdlib.h>
29104 #include <string.h>
29105
29106 int
29107 main ()
29108 {
29109 static const char dummy[] = "\177\01a";
29110 char delimiters[] = "xxxxxxxx";
29111 char *save_ptr = (char *) dummy;
29112 strtok_r (delimiters, "x", &save_ptr);
29113 strtok_r (NULL, "x", &save_ptr);
29114 return 0;
29115
29116 ;
29117 return 0;
29118 }
29119
29120 _ACEOF
29121 if ac_fn_c_try_run "$LINENO"; then :
29122 gl_cv_func_strtok_r_works=yes
29123 else
29124 gl_cv_func_strtok_r_works=no
29125 fi
29126 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29127 conftest.$ac_objext conftest.beam conftest.$ac_ext
29128 fi
29129
29130
29131 fi
29132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtok_r_works" >&5
29133 $as_echo "$gl_cv_func_strtok_r_works" >&6; }
29134 case "$gl_cv_func_strtok_r_works" in
29135 *no)
29136 UNDEFINE_STRTOK_R=1
29137 ;;
29138 esac
29139 else
29140 HAVE_STRTOK_R=0
29141 fi
29142
29143 if test $ac_cv_have_decl_strtok_r = no; then
29144 HAVE_DECL_STRTOK_R=0
29145 fi
29146
29147 if test $HAVE_STRTOK_R = 0 || test $REPLACE_STRTOK_R = 1; then
29148
29149
29150
29151
29152
29153
29154
29155
29156 gl_LIBOBJS="$gl_LIBOBJS strtok_r.$ac_objext"
29157
29158
29159 :
29160
29161 fi
29162
29163
29164
29165
29166
29167 GNULIB_STRTOK_R=1
29168
29169
29170
29171
29172
29173 $as_echo "#define GNULIB_TEST_STRTOK_R 1" >>confdefs.h
29174
29175
29176
29177
29178
29179
29180
29181
29182
29183
29184
29185
29186
29187
29188 if test $gl_cv_have_include_next = yes; then
29189 gl_cv_next_sys_random_h='<'sys/random.h'>'
29190 else
29191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/random.h>" >&5
29192 $as_echo_n "checking absolute name of <sys/random.h>... " >&6; }
29193 if ${gl_cv_next_sys_random_h+:} false; then :
29194 $as_echo_n "(cached) " >&6
29195 else
29196
29197 if test $ac_cv_header_sys_random_h = yes; then
29198
29199
29200
29201
29202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29203 /* end confdefs.h. */
29204 #include <sys/random.h>
29205 _ACEOF
29206 case "$host_os" in
29207 aix*) gl_absname_cpp="$ac_cpp -C" ;;
29208 *) gl_absname_cpp="$ac_cpp" ;;
29209 esac
29210
29211 case "$host_os" in
29212 mingw*)
29213 gl_dirsep_regex='[/\\]'
29214 ;;
29215 *)
29216 gl_dirsep_regex='\/'
29217 ;;
29218 esac
29219 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29220 gl_header_literal_regex=`echo 'sys/random.h' \
29221 | sed -e "$gl_make_literal_regex_sed"`
29222 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29223 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29224 s|^/[^/]|//&|
29225 p
29226 q
29227 }'
29228
29229 gl_cv_absolute_sys_random_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29230 sed -n "$gl_absolute_header_sed"`
29231
29232 gl_header=$gl_cv_absolute_sys_random_h
29233 gl_cv_next_sys_random_h='"'$gl_header'"'
29234 else
29235 gl_cv_next_sys_random_h='<'sys/random.h'>'
29236 fi
29237
29238
29239 fi
29240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_random_h" >&5
29241 $as_echo "$gl_cv_next_sys_random_h" >&6; }
29242 fi
29243 NEXT_SYS_RANDOM_H=$gl_cv_next_sys_random_h
29244
29245 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29246 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29247 gl_next_as_first_directive='<'sys/random.h'>'
29248 else
29249 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29250 gl_next_as_first_directive=$gl_cv_next_sys_random_h
29251 fi
29252 NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H=$gl_next_as_first_directive
29253
29254
29255
29256
29257 if test $ac_cv_header_sys_random_h = yes; then
29258 HAVE_SYS_RANDOM_H=1
29259 else
29260 HAVE_SYS_RANDOM_H=0
29261 fi
29262
29263
29264
29265 if test $ac_cv_header_sys_random_h = yes; then
29266 UNISTD_H_HAVE_SYS_RANDOM_H=1
29267 fi
29268
29269
29270
29271
29272
29273
29274
29275
29276
29277
29278
29279
29280
29281
29282
29283
29284
29285
29286
29287
29288
29289
29290 if test $gl_cv_have_include_next = yes; then
29291 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
29292 else
29293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
29294 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
29295 if ${gl_cv_next_sys_stat_h+:} false; then :
29296 $as_echo_n "(cached) " >&6
29297 else
29298
29299 if test $ac_cv_header_sys_stat_h = yes; then
29300
29301
29302
29303
29304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29305 /* end confdefs.h. */
29306 #include <sys/stat.h>
29307 _ACEOF
29308 case "$host_os" in
29309 aix*) gl_absname_cpp="$ac_cpp -C" ;;
29310 *) gl_absname_cpp="$ac_cpp" ;;
29311 esac
29312
29313 case "$host_os" in
29314 mingw*)
29315 gl_dirsep_regex='[/\\]'
29316 ;;
29317 *)
29318 gl_dirsep_regex='\/'
29319 ;;
29320 esac
29321 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29322 gl_header_literal_regex=`echo 'sys/stat.h' \
29323 | sed -e "$gl_make_literal_regex_sed"`
29324 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29325 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29326 s|^/[^/]|//&|
29327 p
29328 q
29329 }'
29330
29331 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29332 sed -n "$gl_absolute_header_sed"`
29333
29334 gl_header=$gl_cv_absolute_sys_stat_h
29335 gl_cv_next_sys_stat_h='"'$gl_header'"'
29336 else
29337 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
29338 fi
29339
29340
29341 fi
29342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
29343 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
29344 fi
29345 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
29346
29347 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29348 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29349 gl_next_as_first_directive='<'sys/stat.h'>'
29350 else
29351 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29352 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
29353 fi
29354 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
29355
29356
29357
29358
29359
29360
29361
29362
29363 WINDOWS_STAT_TIMESPEC=0
29364
29365
29366
29367
29368
29369
29370
29371
29372 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
29373 #include <sys/stat.h>
29374 "
29375 if test "x$ac_cv_type_nlink_t" = xyes; then :
29376
29377 else
29378
29379 $as_echo "#define nlink_t int" >>confdefs.h
29380
29381 fi
29382
29383
29384
29385
29386
29387
29388
29389
29390
29391
29392
29393
29394
29395
29396
29397
29398
29399
29400
29401
29402
29403
29404
29405
29406
29407
29408 if test $gl_cv_have_include_next = yes; then
29409 gl_cv_next_sys_uio_h='<'sys/uio.h'>'
29410 else
29411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/uio.h>" >&5
29412 $as_echo_n "checking absolute name of <sys/uio.h>... " >&6; }
29413 if ${gl_cv_next_sys_uio_h+:} false; then :
29414 $as_echo_n "(cached) " >&6
29415 else
29416
29417 if test $ac_cv_header_sys_uio_h = yes; then
29418
29419
29420
29421
29422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29423 /* end confdefs.h. */
29424 #include <sys/uio.h>
29425 _ACEOF
29426 case "$host_os" in
29427 aix*) gl_absname_cpp="$ac_cpp -C" ;;
29428 *) gl_absname_cpp="$ac_cpp" ;;
29429 esac
29430
29431 case "$host_os" in
29432 mingw*)
29433 gl_dirsep_regex='[/\\]'
29434 ;;
29435 *)
29436 gl_dirsep_regex='\/'
29437 ;;
29438 esac
29439 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29440 gl_header_literal_regex=`echo 'sys/uio.h' \
29441 | sed -e "$gl_make_literal_regex_sed"`
29442 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29443 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29444 s|^/[^/]|//&|
29445 p
29446 q
29447 }'
29448
29449 gl_cv_absolute_sys_uio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29450 sed -n "$gl_absolute_header_sed"`
29451
29452 gl_header=$gl_cv_absolute_sys_uio_h
29453 gl_cv_next_sys_uio_h='"'$gl_header'"'
29454 else
29455 gl_cv_next_sys_uio_h='<'sys/uio.h'>'
29456 fi
29457
29458
29459 fi
29460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_uio_h" >&5
29461 $as_echo "$gl_cv_next_sys_uio_h" >&6; }
29462 fi
29463 NEXT_SYS_UIO_H=$gl_cv_next_sys_uio_h
29464
29465 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29466 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29467 gl_next_as_first_directive='<'sys/uio.h'>'
29468 else
29469 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29470 gl_next_as_first_directive=$gl_cv_next_sys_uio_h
29471 fi
29472 NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H=$gl_next_as_first_directive
29473
29474
29475
29476
29477 if test $ac_cv_header_sys_uio_h = yes; then
29478 HAVE_SYS_UIO_H=1
29479 else
29480 HAVE_SYS_UIO_H=0
29481 fi
29482
29483
29484
29485
29486
29487 :
29488
29489
29490
29491
29492 cat >>confdefs.h <<_ACEOF
29493 #define GNULIB_TEMPNAME 1
29494 _ACEOF
29495
29496
29497
29498
29499
29500
29501
29502
29503
29504
29505
29506
29507 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,
29508 gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
29509 been included before. */
29510 #if defined __MINGW32__
29511 # include <unistd.h>
29512 #endif
29513 #include <time.h>
29514
29515 "
29516 if test "x$ac_cv_have_decl_localtime_r" = xyes; then :
29517 ac_have_decl=1
29518 else
29519 ac_have_decl=0
29520 fi
29521
29522 cat >>confdefs.h <<_ACEOF
29523 #define HAVE_DECL_LOCALTIME_R $ac_have_decl
29524 _ACEOF
29525
29526 if test $ac_cv_have_decl_localtime_r = no; then
29527 HAVE_DECL_LOCALTIME_R=0
29528 fi
29529
29530
29531 if test $ac_cv_func_localtime_r = yes; then
29532 HAVE_LOCALTIME_R=1
29533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
29534 $as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
29535 if ${gl_cv_time_r_posix+:} false; then :
29536 $as_echo_n "(cached) " >&6
29537 else
29538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29539 /* end confdefs.h. */
29540 /* mingw's <time.h> provides the functions asctime_r, ctime_r,
29541 gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
29542 been included before. */
29543 #if defined __MINGW32__
29544 # include <unistd.h>
29545 #endif
29546 #include <time.h>
29547
29548 int
29549 main ()
29550 {
29551 /* We don't need to append 'restrict's to the argument types,
29552 even though the POSIX signature has the 'restrict's,
29553 since C99 says they can't affect type compatibility. */
29554 struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
29555 if (ptr) return 0;
29556 /* Check the return type is a pointer.
29557 On HP-UX 10 it is 'int'. */
29558 *localtime_r (0, 0);
29559 ;
29560 return 0;
29561 }
29562
29563 _ACEOF
29564 if ac_fn_c_try_compile "$LINENO"; then :
29565 gl_cv_time_r_posix=yes
29566 else
29567 gl_cv_time_r_posix=no
29568 fi
29569 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29570
29571 fi
29572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
29573 $as_echo "$gl_cv_time_r_posix" >&6; }
29574 if test $gl_cv_time_r_posix = yes; then
29575 REPLACE_LOCALTIME_R=0
29576 else
29577 REPLACE_LOCALTIME_R=1
29578 fi
29579 else
29580 HAVE_LOCALTIME_R=0
29581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r exists as an inline function" >&5
29582 $as_echo_n "checking whether localtime_r exists as an inline function... " >&6; }
29583 if ${gl_cv_func_localtime_r_inline+:} false; then :
29584 $as_echo_n "(cached) " >&6
29585 else
29586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29587 /* end confdefs.h. */
29588 /* mingw's <time.h> provides the functions asctime_r, ctime_r,
29589 gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
29590 been included before. */
29591 #if defined __MINGW32__
29592 # include <unistd.h>
29593 #endif
29594 #include <time.h>
29595
29596 int
29597 main ()
29598 {
29599 time_t a;
29600 struct tm r;
29601 localtime_r (&a, &r);
29602
29603 ;
29604 return 0;
29605 }
29606
29607 _ACEOF
29608 if ac_fn_c_try_link "$LINENO"; then :
29609 gl_cv_func_localtime_r_inline=yes
29610 else
29611 gl_cv_func_localtime_r_inline=no
29612 fi
29613 rm -f core conftest.err conftest.$ac_objext \
29614 conftest$ac_exeext conftest.$ac_ext
29615
29616 fi
29617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_localtime_r_inline" >&5
29618 $as_echo "$gl_cv_func_localtime_r_inline" >&6; }
29619 if test $gl_cv_func_localtime_r_inline = yes; then
29620 REPLACE_LOCALTIME_R=1
29621 fi
29622 fi
29623
29624 if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
29625
29626
29627
29628
29629
29630
29631
29632
29633 gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext"
29634
29635
29636 :
29637
29638 fi
29639
29640
29641
29642
29643
29644 GNULIB_TIME_R=1
29645
29646
29647
29648
29649
29650 $as_echo "#define GNULIB_TEST_TIME_R 1" >>confdefs.h
29651
29652
29653
29654
29655
29656
29657
29658
29659
29660
29661
29662
29663
29664
29665
29666 if test $gl_cv_have_include_next = yes; then
29667 gl_cv_next_unistd_h='<'unistd.h'>'
29668 else
29669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
29670 $as_echo_n "checking absolute name of <unistd.h>... " >&6; }
29671 if ${gl_cv_next_unistd_h+:} false; then :
29672 $as_echo_n "(cached) " >&6
29673 else
29674
29675 if test $ac_cv_header_unistd_h = yes; then
29676
29677
29678
29679
29680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29681 /* end confdefs.h. */
29682 #include <unistd.h>
29683 _ACEOF
29684 case "$host_os" in
29685 aix*) gl_absname_cpp="$ac_cpp -C" ;;
29686 *) gl_absname_cpp="$ac_cpp" ;;
29687 esac
29688
29689 case "$host_os" in
29690 mingw*)
29691 gl_dirsep_regex='[/\\]'
29692 ;;
29693 *)
29694 gl_dirsep_regex='\/'
29695 ;;
29696 esac
29697 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29698 gl_header_literal_regex=`echo 'unistd.h' \
29699 | sed -e "$gl_make_literal_regex_sed"`
29700 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29701 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29702 s|^/[^/]|//&|
29703 p
29704 q
29705 }'
29706
29707 gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29708 sed -n "$gl_absolute_header_sed"`
29709
29710 gl_header=$gl_cv_absolute_unistd_h
29711 gl_cv_next_unistd_h='"'$gl_header'"'
29712 else
29713 gl_cv_next_unistd_h='<'unistd.h'>'
29714 fi
29715
29716
29717 fi
29718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
29719 $as_echo "$gl_cv_next_unistd_h" >&6; }
29720 fi
29721 NEXT_UNISTD_H=$gl_cv_next_unistd_h
29722
29723 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29724 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29725 gl_next_as_first_directive='<'unistd.h'>'
29726 else
29727 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29728 gl_next_as_first_directive=$gl_cv_next_unistd_h
29729 fi
29730 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
29731
29732
29733
29734
29735 if test $ac_cv_header_unistd_h = yes; then
29736 HAVE_UNISTD_H=1
29737 else
29738 HAVE_UNISTD_H=0
29739 fi
29740
29741
29742
29743
29744
29745
29746
29747
29748
29749
29750
29751
29752
29753 if test $ac_cv_have_decl_execvpe = no; then
29754 HAVE_DECL_EXECVPE=0
29755 fi
29756
29757
29758
29759
29760
29761
29762
29763 if test $ac_cv_have_decl_unsetenv = no; then
29764 HAVE_DECL_UNSETENV=0
29765 fi
29766 for ac_func in unsetenv
29767 do :
29768 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
29769 if test "x$ac_cv_func_unsetenv" = xyes; then :
29770 cat >>confdefs.h <<_ACEOF
29771 #define HAVE_UNSETENV 1
29772 _ACEOF
29773
29774 fi
29775 done
29776
29777 if test $ac_cv_func_unsetenv = no; then
29778 HAVE_UNSETENV=0
29779 else
29780 HAVE_UNSETENV=1
29781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
29782 $as_echo_n "checking for unsetenv() return type... " >&6; }
29783 if ${gt_cv_func_unsetenv_ret+:} false; then :
29784 $as_echo_n "(cached) " >&6
29785 else
29786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29787 /* end confdefs.h. */
29788
29789 #undef _BSD
29790 #define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
29791 #include <stdlib.h>
29792 extern
29793 #ifdef __cplusplus
29794 "C"
29795 #endif
29796 int unsetenv (const char *name);
29797
29798 int
29799 main ()
29800 {
29801
29802 ;
29803 return 0;
29804 }
29805 _ACEOF
29806 if ac_fn_c_try_compile "$LINENO"; then :
29807 gt_cv_func_unsetenv_ret='int'
29808 else
29809 gt_cv_func_unsetenv_ret='void'
29810 fi
29811 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29812 fi
29813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
29814 $as_echo "$gt_cv_func_unsetenv_ret" >&6; }
29815 if test $gt_cv_func_unsetenv_ret = 'void'; then
29816
29817 $as_echo "#define VOID_UNSETENV 1" >>confdefs.h
29818
29819 REPLACE_UNSETENV=1
29820 fi
29821
29822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
29823 $as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
29824 if ${gl_cv_func_unsetenv_works+:} false; then :
29825 $as_echo_n "(cached) " >&6
29826 else
29827 if test "$cross_compiling" = yes; then :
29828 case "$host_os" in
29829 # Guess yes on glibc systems.
29830 *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
29831 # If we don't know, obey --enable-cross-guesses.
29832 *) gl_cv_func_unsetenv_works="$gl_cross_guess_normal" ;;
29833 esac
29834
29835 else
29836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29837 /* end confdefs.h. */
29838
29839 #include <stdlib.h>
29840 #include <errno.h>
29841 extern char **environ;
29842
29843
29844 $gl_mda_defines
29845
29846 int
29847 main ()
29848 {
29849
29850 char entry1[] = "a=1";
29851 char entry2[] = "b=2";
29852 char *env[] = { entry1, entry2, NULL };
29853 if (putenv ((char *) "a=1")) return 1;
29854 if (putenv (entry2)) return 2;
29855 entry2[0] = 'a';
29856 unsetenv ("a");
29857 if (getenv ("a")) return 3;
29858 if (!unsetenv ("") || errno != EINVAL) return 4;
29859 entry2[0] = 'b';
29860 environ = env;
29861 if (!getenv ("a")) return 5;
29862 entry2[0] = 'a';
29863 unsetenv ("a");
29864 if (getenv ("a")) return 6;
29865
29866 ;
29867 return 0;
29868 }
29869 _ACEOF
29870 if ac_fn_c_try_run "$LINENO"; then :
29871 gl_cv_func_unsetenv_works=yes
29872 else
29873 gl_cv_func_unsetenv_works=no
29874 fi
29875 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29876 conftest.$ac_objext conftest.beam conftest.$ac_ext
29877 fi
29878
29879
29880 fi
29881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
29882 $as_echo "$gl_cv_func_unsetenv_works" >&6; }
29883 case "$gl_cv_func_unsetenv_works" in
29884 *yes) ;;
29885 *)
29886 REPLACE_UNSETENV=1
29887 ;;
29888 esac
29889 fi
29890
29891 if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
29892
29893
29894
29895
29896
29897
29898
29899
29900 gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
29901
29902
29903
29904
29905
29906 fi
29907
29908
29909
29910
29911
29912 GNULIB_UNSETENV=1
29913
29914
29915
29916
29917
29918 $as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
29919
29920
29921
29922
29923
29924
29925
29926
29927
29928
29929
29930
29931
29932
29933
29934 if test $gl_cv_have_include_next = yes; then
29935 gl_cv_next_wchar_h='<'wchar.h'>'
29936 else
29937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
29938 $as_echo_n "checking absolute name of <wchar.h>... " >&6; }
29939 if ${gl_cv_next_wchar_h+:} false; then :
29940 $as_echo_n "(cached) " >&6
29941 else
29942
29943 if test $ac_cv_header_wchar_h = yes; then
29944
29945
29946
29947
29948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29949 /* end confdefs.h. */
29950 #include <wchar.h>
29951 _ACEOF
29952 case "$host_os" in
29953 aix*) gl_absname_cpp="$ac_cpp -C" ;;
29954 *) gl_absname_cpp="$ac_cpp" ;;
29955 esac
29956
29957 case "$host_os" in
29958 mingw*)
29959 gl_dirsep_regex='[/\\]'
29960 ;;
29961 *)
29962 gl_dirsep_regex='\/'
29963 ;;
29964 esac
29965 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29966 gl_header_literal_regex=`echo 'wchar.h' \
29967 | sed -e "$gl_make_literal_regex_sed"`
29968 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29969 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29970 s|^/[^/]|//&|
29971 p
29972 q
29973 }'
29974
29975 gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29976 sed -n "$gl_absolute_header_sed"`
29977
29978 gl_header=$gl_cv_absolute_wchar_h
29979 gl_cv_next_wchar_h='"'$gl_header'"'
29980 else
29981 gl_cv_next_wchar_h='<'wchar.h'>'
29982 fi
29983
29984
29985 fi
29986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
29987 $as_echo "$gl_cv_next_wchar_h" >&6; }
29988 fi
29989 NEXT_WCHAR_H=$gl_cv_next_wchar_h
29990
29991 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29992 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29993 gl_next_as_first_directive='<'wchar.h'>'
29994 else
29995 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29996 gl_next_as_first_directive=$gl_cv_next_wchar_h
29997 fi
29998 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
29999
30000
30001
30002
30003 if test $ac_cv_header_wchar_h = yes; then
30004 HAVE_WCHAR_H=1
30005 else
30006 HAVE_WCHAR_H=0
30007 fi
30008
30009
30010
30011
30012
30013 if test $gt_cv_c_wint_t = yes; then
30014 HAVE_WINT_T=1
30015 else
30016 HAVE_WINT_T=0
30017 fi
30018
30019
30020
30021
30022
30023
30024
30025
30026
30027
30028 ac_fn_c_check_decl "$LINENO" "wcsdup" "ac_cv_have_decl_wcsdup" "
30029 #include <wchar.h>
30030
30031 "
30032 if test "x$ac_cv_have_decl_wcsdup" = xyes; then :
30033 ac_have_decl=1
30034 else
30035 ac_have_decl=0
30036 fi
30037
30038 cat >>confdefs.h <<_ACEOF
30039 #define HAVE_DECL_WCSDUP $ac_have_decl
30040 _ACEOF
30041
30042 if test $ac_cv_have_decl_wcsdup = no; then
30043 HAVE_DECL_WCSDUP=0
30044 fi
30045
30046
30047
30048
30049
30050
30051 if test $ac_cv_func_iswcntrl = yes; then
30052 HAVE_ISWCNTRL=1
30053 else
30054 HAVE_ISWCNTRL=0
30055 fi
30056
30057
30058
30059 if test $gt_cv_c_wint_t = yes; then
30060 HAVE_WINT_T=1
30061 else
30062 HAVE_WINT_T=0
30063 fi
30064
30065
30066
30067
30068
30069
30070
30071
30072
30073
30074
30075
30076
30077 if test $gl_cv_have_include_next = yes; then
30078 gl_cv_next_wctype_h='<'wctype.h'>'
30079 else
30080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
30081 $as_echo_n "checking absolute name of <wctype.h>... " >&6; }
30082 if ${gl_cv_next_wctype_h+:} false; then :
30083 $as_echo_n "(cached) " >&6
30084 else
30085
30086 if test $ac_cv_header_wctype_h = yes; then
30087
30088
30089
30090
30091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30092 /* end confdefs.h. */
30093 #include <wctype.h>
30094 _ACEOF
30095 case "$host_os" in
30096 aix*) gl_absname_cpp="$ac_cpp -C" ;;
30097 *) gl_absname_cpp="$ac_cpp" ;;
30098 esac
30099
30100 case "$host_os" in
30101 mingw*)
30102 gl_dirsep_regex='[/\\]'
30103 ;;
30104 *)
30105 gl_dirsep_regex='\/'
30106 ;;
30107 esac
30108 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
30109 gl_header_literal_regex=`echo 'wctype.h' \
30110 | sed -e "$gl_make_literal_regex_sed"`
30111 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
30112 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
30113 s|^/[^/]|//&|
30114 p
30115 q
30116 }'
30117
30118 gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
30119 sed -n "$gl_absolute_header_sed"`
30120
30121 gl_header=$gl_cv_absolute_wctype_h
30122 gl_cv_next_wctype_h='"'$gl_header'"'
30123 else
30124 gl_cv_next_wctype_h='<'wctype.h'>'
30125 fi
30126
30127
30128 fi
30129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
30130 $as_echo "$gl_cv_next_wctype_h" >&6; }
30131 fi
30132 NEXT_WCTYPE_H=$gl_cv_next_wctype_h
30133
30134 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
30135 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
30136 gl_next_as_first_directive='<'wctype.h'>'
30137 else
30138 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
30139 gl_next_as_first_directive=$gl_cv_next_wctype_h
30140 fi
30141 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
30142
30143
30144
30145
30146 if test $ac_cv_header_wctype_h = yes; then
30147 if test $ac_cv_func_iswcntrl = yes; then
30148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
30149 $as_echo_n "checking whether iswcntrl works... " >&6; }
30150 if ${gl_cv_func_iswcntrl_works+:} false; then :
30151 $as_echo_n "(cached) " >&6
30152 else
30153
30154 if test "$cross_compiling" = yes; then :
30155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30156 /* end confdefs.h. */
30157 #include <stdlib.h>
30158 #if __GNU_LIBRARY__ == 1
30159 Linux libc5 i18n is broken.
30160 #endif
30161 int
30162 main ()
30163 {
30164
30165 ;
30166 return 0;
30167 }
30168 _ACEOF
30169 if ac_fn_c_try_compile "$LINENO"; then :
30170 gl_cv_func_iswcntrl_works="guessing yes"
30171 else
30172 gl_cv_func_iswcntrl_works="guessing no"
30173 fi
30174 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30175
30176 else
30177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30178 /* end confdefs.h. */
30179
30180 #include <wchar.h>
30181 #include <wctype.h>
30182 int main () { return iswprint ('x') == 0; }
30183
30184 _ACEOF
30185 if ac_fn_c_try_run "$LINENO"; then :
30186 gl_cv_func_iswcntrl_works=yes
30187 else
30188 gl_cv_func_iswcntrl_works=no
30189 fi
30190 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30191 conftest.$ac_objext conftest.beam conftest.$ac_ext
30192 fi
30193
30194
30195 fi
30196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
30197 $as_echo "$gl_cv_func_iswcntrl_works" >&6; }
30198 fi
30199 HAVE_WCTYPE_H=1
30200 else
30201 HAVE_WCTYPE_H=0
30202 fi
30203
30204
30205 if test $GNULIB_OVERRIDES_WINT_T = 1; then
30206 REPLACE_ISWCNTRL=1
30207 else
30208 case "$gl_cv_func_iswcntrl_works" in
30209 *yes) REPLACE_ISWCNTRL=0 ;;
30210 *) REPLACE_ISWCNTRL=1 ;;
30211 esac
30212 fi
30213
30214
30215 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
30216 :
30217 fi
30218
30219 if test $REPLACE_ISWCNTRL = 1; then
30220 REPLACE_TOWLOWER=1
30221 else
30222 for ac_func in towlower
30223 do :
30224 ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
30225 if test "x$ac_cv_func_towlower" = xyes; then :
30226 cat >>confdefs.h <<_ACEOF
30227 #define HAVE_TOWLOWER 1
30228 _ACEOF
30229
30230 fi
30231 done
30232
30233 if test $ac_cv_func_towlower = yes; then
30234 REPLACE_TOWLOWER=0
30235 else
30236 ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "#include <wchar.h>
30237 #if HAVE_WCTYPE_H
30238 # include <wctype.h>
30239 #endif
30240
30241 "
30242 if test "x$ac_cv_have_decl_towlower" = xyes; then :
30243 ac_have_decl=1
30244 else
30245 ac_have_decl=0
30246 fi
30247
30248 cat >>confdefs.h <<_ACEOF
30249 #define HAVE_DECL_TOWLOWER $ac_have_decl
30250 _ACEOF
30251
30252 if test $ac_cv_have_decl_towlower = yes; then
30253 REPLACE_TOWLOWER=1
30254 else
30255 REPLACE_TOWLOWER=0
30256 fi
30257 fi
30258 fi
30259
30260
30261 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
30262 :
30263 fi
30264
30265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
30266 $as_echo_n "checking for wctype_t... " >&6; }
30267 if ${gl_cv_type_wctype_t+:} false; then :
30268 $as_echo_n "(cached) " >&6
30269 else
30270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30271 /* end confdefs.h. */
30272 #include <wchar.h>
30273 #if HAVE_WCTYPE_H
30274 # include <wctype.h>
30275 #endif
30276 wctype_t a;
30277
30278 int
30279 main ()
30280 {
30281
30282 ;
30283 return 0;
30284 }
30285 _ACEOF
30286 if ac_fn_c_try_compile "$LINENO"; then :
30287 gl_cv_type_wctype_t=yes
30288 else
30289 gl_cv_type_wctype_t=no
30290 fi
30291 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30292
30293 fi
30294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
30295 $as_echo "$gl_cv_type_wctype_t" >&6; }
30296 if test $gl_cv_type_wctype_t = no; then
30297 HAVE_WCTYPE_T=0
30298 fi
30299
30300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
30301 $as_echo_n "checking for wctrans_t... " >&6; }
30302 if ${gl_cv_type_wctrans_t+:} false; then :
30303 $as_echo_n "(cached) " >&6
30304 else
30305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30306 /* end confdefs.h. */
30307 #include <wchar.h>
30308 #include <wctype.h>
30309 wctrans_t a;
30310
30311 int
30312 main ()
30313 {
30314
30315 ;
30316 return 0;
30317 }
30318 _ACEOF
30319 if ac_fn_c_try_compile "$LINENO"; then :
30320 gl_cv_type_wctrans_t=yes
30321 else
30322 gl_cv_type_wctrans_t=no
30323 fi
30324 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30325
30326 fi
30327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
30328 $as_echo "$gl_cv_type_wctrans_t" >&6; }
30329 if test $gl_cv_type_wctrans_t = no; then
30330 HAVE_WCTRANS_T=0
30331 fi
30332
30333
30334
30335
30336
30337
30338 case "$host_os" in
30339 mingw*)
30340
30341
30342
30343
30344
30345
30346
30347
30348 gl_LIBOBJS="$gl_LIBOBJS windows-mutex.$ac_objext"
30349
30350 ;;
30351 esac
30352
30353 case "$host_os" in
30354 mingw*)
30355
30356
30357
30358
30359
30360
30361
30362
30363 gl_LIBOBJS="$gl_LIBOBJS windows-once.$ac_objext"
30364
30365 ;;
30366 esac
30367
30368 case "$host_os" in
30369 mingw*)
30370
30371
30372
30373
30374
30375
30376
30377
30378 gl_LIBOBJS="$gl_LIBOBJS windows-recmutex.$ac_objext"
30379
30380 ;;
30381 esac
30382
30383 case "$host_os" in
30384 mingw*)
30385
30386
30387
30388
30389
30390
30391
30392
30393 gl_LIBOBJS="$gl_LIBOBJS windows-rwlock.$ac_objext"
30394
30395 ;;
30396 esac
30397
30398
30399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wmemchr" >&5
30400 $as_echo_n "checking for wmemchr... " >&6; }
30401 if ${gl_cv_func_wmemchr+:} false; then :
30402 $as_echo_n "(cached) " >&6
30403 else
30404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30405 /* end confdefs.h. */
30406 #include <wchar.h>
30407
30408 int
30409 main ()
30410 {
30411 return ! wmemchr ((const wchar_t *) 0, (wchar_t) ' ', 0);
30412 ;
30413 return 0;
30414 }
30415
30416 _ACEOF
30417 if ac_fn_c_try_link "$LINENO"; then :
30418 gl_cv_func_wmemchr=yes
30419 else
30420 gl_cv_func_wmemchr=no
30421 fi
30422 rm -f core conftest.err conftest.$ac_objext \
30423 conftest$ac_exeext conftest.$ac_ext
30424
30425 fi
30426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wmemchr" >&5
30427 $as_echo "$gl_cv_func_wmemchr" >&6; }
30428 if test $gl_cv_func_wmemchr = no; then
30429 HAVE_WMEMCHR=0
30430 fi
30431
30432 if test $HAVE_WMEMCHR = 0; then
30433
30434
30435
30436
30437
30438
30439
30440
30441 gl_LIBOBJS="$gl_LIBOBJS wmemchr.$ac_objext"
30442
30443 fi
30444
30445
30446
30447
30448
30449 GNULIB_WMEMCHR=1
30450
30451
30452
30453
30454
30455 $as_echo "#define GNULIB_TEST_WMEMCHR 1" >>confdefs.h
30456
30457
30458
30459
30460
30461
30462
30463
30464
30465
30466
30467 if test $ac_cv_func_wmempcpy = no; then
30468 HAVE_WMEMPCPY=0
30469 fi
30470
30471 if test $HAVE_WMEMPCPY = 0; then
30472
30473
30474
30475
30476
30477
30478
30479
30480 gl_LIBOBJS="$gl_LIBOBJS wmempcpy.$ac_objext"
30481
30482 fi
30483
30484
30485
30486
30487
30488 GNULIB_WMEMPCPY=1
30489
30490
30491
30492
30493
30494 $as_echo "#define GNULIB_TEST_WMEMPCPY 1" >>confdefs.h
30495
30496
30497
30498 # End of code from modules
30499
30500
30501
30502
30503
30504
30505
30506
30507
30508 gltests_libdeps=
30509 gltests_ltlibdeps=
30510
30511
30512
30513
30514
30515
30516
30517
30518
30519
30520 gl_source_base='tests'
30521 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
30522
30523 gl_module_indicator_condition=$gltests_WITNESS
30524
30525
30526
30527
30528
30529
30530
30531
30532
30533 LIBGNU_LIBDEPS="$gl_libdeps"
30534
30535 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
30536
30537
30538
30539 am__api_version='1.15'
30540
30541 # Find a good install program. We prefer a C program (faster),
30542 # so one script is as good as another. But avoid the broken or
30543 # incompatible versions:
30544 # SysV /etc/install, /usr/sbin/install
30545 # SunOS /usr/etc/install
30546 # IRIX /sbin/install
30547 # AIX /bin/install
30548 # AmigaOS /C/install, which installs bootblocks on floppy discs
30549 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
30550 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
30551 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
30552 # OS/2's system install, which has a completely different semantic
30553 # ./install, which can be erroneously created by make from ./install.sh.
30554 # Reject install programs that cannot install multiple files.
30555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
30556 $as_echo_n "checking for a BSD-compatible install... " >&6; }
30557 if test -z "$INSTALL"; then
30558 if ${ac_cv_path_install+:} false; then :
30559 $as_echo_n "(cached) " >&6
30560 else
30561 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30562 for as_dir in $PATH
30563 do
30564 IFS=$as_save_IFS
30565 test -z "$as_dir" && as_dir=.
30566 # Account for people who put trailing slashes in PATH elements.
30567 case $as_dir/ in #((
30568 ./ | .// | /[cC]/* | \
30569 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
30570 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
30571 /usr/ucb/* ) ;;
30572 *)
30573 # OSF1 and SCO ODT 3.0 have their own names for install.
30574 # Don't use installbsd from OSF since it installs stuff as root
30575 # by default.
30576 for ac_prog in ginstall scoinst install; do
30577 for ac_exec_ext in '' $ac_executable_extensions; do
30578 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
30579 if test $ac_prog = install &&
30580 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
30581 # AIX install. It has an incompatible calling convention.
30582 :
30583 elif test $ac_prog = install &&
30584 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
30585 # program-specific install script used by HP pwplus--don't use.
30586 :
30587 else
30588 rm -rf conftest.one conftest.two conftest.dir
30589 echo one > conftest.one
30590 echo two > conftest.two
30591 mkdir conftest.dir
30592 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
30593 test -s conftest.one && test -s conftest.two &&
30594 test -s conftest.dir/conftest.one &&
30595 test -s conftest.dir/conftest.two
30596 then
30597 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
30598 break 3
30599 fi
30600 fi
30601 fi
30602 done
30603 done
30604 ;;
30605 esac
30606
30607 done
30608 IFS=$as_save_IFS
30609
30610 rm -rf conftest.one conftest.two conftest.dir
30611
30612 fi
30613 if test "${ac_cv_path_install+set}" = set; then
30614 INSTALL=$ac_cv_path_install
30615 else
30616 # As a last resort, use the slow shell script. Don't cache a
30617 # value for INSTALL within a source directory, because that will
30618 # break other packages using the cache if that directory is
30619 # removed, or if the value is a relative name.
30620 INSTALL=$ac_install_sh
30621 fi
30622 fi
30623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
30624 $as_echo "$INSTALL" >&6; }
30625
30626 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
30627 # It thinks the first close brace ends the variable substitution.
30628 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
30629
30630 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
30631
30632 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
30633
30634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
30635 $as_echo_n "checking whether build environment is sane... " >&6; }
30636 # Reject unsafe characters in $srcdir or the absolute working directory
30637 # name. Accept space and tab only in the latter.
30638 am_lf='
30639 '
30640 case `pwd` in
30641 *[\\\"\#\$\&\'\`$am_lf]*)
30642 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
30643 esac
30644 case $srcdir in
30645 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
30646 as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
30647 esac
30648
30649 # Do 'set' in a subshell so we don't clobber the current shell's
30650 # arguments. Must try -L first in case configure is actually a
30651 # symlink; some systems play weird games with the mod time of symlinks
30652 # (eg FreeBSD returns the mod time of the symlink's containing
30653 # directory).
30654 if (
30655 am_has_slept=no
30656 for am_try in 1 2; do
30657 echo "timestamp, slept: $am_has_slept" > conftest.file
30658 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
30659 if test "$*" = "X"; then
30660 # -L didn't work.
30661 set X `ls -t "$srcdir/configure" conftest.file`
30662 fi
30663 if test "$*" != "X $srcdir/configure conftest.file" \
30664 && test "$*" != "X conftest.file $srcdir/configure"; then
30665
30666 # If neither matched, then we have a broken ls. This can happen
30667 # if, for instance, CONFIG_SHELL is bash and it inherits a
30668 # broken ls alias from the environment. This has actually
30669 # happened. Such a system could not be considered "sane".
30670 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
30671 alias in your environment" "$LINENO" 5
30672 fi
30673 if test "$2" = conftest.file || test $am_try -eq 2; then
30674 break
30675 fi
30676 # Just in case.
30677 sleep 1
30678 am_has_slept=yes
30679 done
30680 test "$2" = conftest.file
30681 )
30682 then
30683 # Ok.
30684 :
30685 else
30686 as_fn_error $? "newly created file is older than distributed files!
30687 Check your system clock" "$LINENO" 5
30688 fi
30689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30690 $as_echo "yes" >&6; }
30691 # If we didn't sleep, we still need to ensure time stamps of config.status and
30692 # generated files are strictly newer.
30693 am_sleep_pid=
30694 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
30695 ( sleep 1 ) &
30696 am_sleep_pid=$!
30697 fi
30698
30699 rm -f conftest.file
30700
30701 test "$program_prefix" != NONE &&
30702 program_transform_name="s&^&$program_prefix&;$program_transform_name"
30703 # Use a double $ so make ignores it.
30704 test "$program_suffix" != NONE &&
30705 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
30706 # Double any \ or $.
30707 # By default was `s,x,x', remove it if useless.
30708 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
30709 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
30710
30711 # Expand $ac_aux_dir to an absolute path.
30712 am_aux_dir=`cd "$ac_aux_dir" && pwd`
30713
30714 if test x"${MISSING+set}" != xset; then
30715 case $am_aux_dir in
30716 *\ * | *\ *)
30717 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
30718 *)
30719 MISSING="\${SHELL} $am_aux_dir/missing" ;;
30720 esac
30721 fi
30722 # Use eval to expand $SHELL
30723 if eval "$MISSING --is-lightweight"; then
30724 am_missing_run="$MISSING "
30725 else
30726 am_missing_run=
30727 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
30728 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
30729 fi
30730
30731 if test x"${install_sh+set}" != xset; then
30732 case $am_aux_dir in
30733 *\ * | *\ *)
30734 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
30735 *)
30736 install_sh="\${SHELL} $am_aux_dir/install-sh"
30737 esac
30738 fi
30739
30740 # Installed binaries are usually stripped using 'strip' when the user
30741 # run "make install-strip". However 'strip' might not be the right
30742 # tool to use in cross-compilation environments, therefore Automake
30743 # will honor the 'STRIP' environment variable to overrule this program.
30744 if test "$cross_compiling" != no; then
30745 if test -n "$ac_tool_prefix"; then
30746 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
30747 set dummy ${ac_tool_prefix}strip; ac_word=$2
30748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30749 $as_echo_n "checking for $ac_word... " >&6; }
30750 if ${ac_cv_prog_STRIP+:} false; then :
30751 $as_echo_n "(cached) " >&6
30752 else
30753 if test -n "$STRIP"; then
30754 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
30755 else
30756 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30757 for as_dir in $PATH
30758 do
30759 IFS=$as_save_IFS
30760 test -z "$as_dir" && as_dir=.
30761 for ac_exec_ext in '' $ac_executable_extensions; do
30762 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30763 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
30764 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30765 break 2
30766 fi
30767 done
30768 done
30769 IFS=$as_save_IFS
30770
30771 fi
30772 fi
30773 STRIP=$ac_cv_prog_STRIP
30774 if test -n "$STRIP"; then
30775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
30776 $as_echo "$STRIP" >&6; }
30777 else
30778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30779 $as_echo "no" >&6; }
30780 fi
30781
30782
30783 fi
30784 if test -z "$ac_cv_prog_STRIP"; then
30785 ac_ct_STRIP=$STRIP
30786 # Extract the first word of "strip", so it can be a program name with args.
30787 set dummy strip; ac_word=$2
30788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30789 $as_echo_n "checking for $ac_word... " >&6; }
30790 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
30791 $as_echo_n "(cached) " >&6
30792 else
30793 if test -n "$ac_ct_STRIP"; then
30794 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
30795 else
30796 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30797 for as_dir in $PATH
30798 do
30799 IFS=$as_save_IFS
30800 test -z "$as_dir" && as_dir=.
30801 for ac_exec_ext in '' $ac_executable_extensions; do
30802 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30803 ac_cv_prog_ac_ct_STRIP="strip"
30804 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30805 break 2
30806 fi
30807 done
30808 done
30809 IFS=$as_save_IFS
30810
30811 fi
30812 fi
30813 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
30814 if test -n "$ac_ct_STRIP"; then
30815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
30816 $as_echo "$ac_ct_STRIP" >&6; }
30817 else
30818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30819 $as_echo "no" >&6; }
30820 fi
30821
30822 if test "x$ac_ct_STRIP" = x; then
30823 STRIP=":"
30824 else
30825 case $cross_compiling:$ac_tool_warned in
30826 yes:)
30827 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30828 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30829 ac_tool_warned=yes ;;
30830 esac
30831 STRIP=$ac_ct_STRIP
30832 fi
30833 else
30834 STRIP="$ac_cv_prog_STRIP"
30835 fi
30836
30837 fi
30838 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
30839
30840 for ac_prog in gawk mawk nawk awk
30841 do
30842 # Extract the first word of "$ac_prog", so it can be a program name with args.
30843 set dummy $ac_prog; ac_word=$2
30844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30845 $as_echo_n "checking for $ac_word... " >&6; }
30846 if ${ac_cv_prog_AWK+:} false; then :
30847 $as_echo_n "(cached) " >&6
30848 else
30849 if test -n "$AWK"; then
30850 ac_cv_prog_AWK="$AWK" # Let the user override the test.
30851 else
30852 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30853 for as_dir in $PATH
30854 do
30855 IFS=$as_save_IFS
30856 test -z "$as_dir" && as_dir=.
30857 for ac_exec_ext in '' $ac_executable_extensions; do
30858 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30859 ac_cv_prog_AWK="$ac_prog"
30860 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30861 break 2
30862 fi
30863 done
30864 done
30865 IFS=$as_save_IFS
30866
30867 fi
30868 fi
30869 AWK=$ac_cv_prog_AWK
30870 if test -n "$AWK"; then
30871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
30872 $as_echo "$AWK" >&6; }
30873 else
30874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30875 $as_echo "no" >&6; }
30876 fi
30877
30878
30879 test -n "$AWK" && break
30880 done
30881
30882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
30883 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
30884 set x ${MAKE-make}
30885 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
30886 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
30887 $as_echo_n "(cached) " >&6
30888 else
30889 cat >conftest.make <<\_ACEOF
30890 SHELL = /bin/sh
30891 all:
30892 @echo '@@@%%%=$(MAKE)=@@@%%%'
30893 _ACEOF
30894 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
30895 case `${MAKE-make} -f conftest.make 2>/dev/null` in
30896 *@@@%%%=?*=@@@%%%*)
30897 eval ac_cv_prog_make_${ac_make}_set=yes;;
30898 *)
30899 eval ac_cv_prog_make_${ac_make}_set=no;;
30900 esac
30901 rm -f conftest.make
30902 fi
30903 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
30904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30905 $as_echo "yes" >&6; }
30906 SET_MAKE=
30907 else
30908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30909 $as_echo "no" >&6; }
30910 SET_MAKE="MAKE=${MAKE-make}"
30911 fi
30912
30913 rm -rf .tst 2>/dev/null
30914 mkdir .tst 2>/dev/null
30915 if test -d .tst; then
30916 am__leading_dot=.
30917 else
30918 am__leading_dot=_
30919 fi
30920 rmdir .tst 2>/dev/null
30921
30922 DEPDIR="${am__leading_dot}deps"
30923
30924 ac_config_commands="$ac_config_commands depfiles"
30925
30926
30927 am_make=${MAKE-make}
30928 cat > confinc << 'END'
30929 am__doit:
30930 @echo this is the am__doit target
30931 .PHONY: am__doit
30932 END
30933 # If we don't find an include directive, just comment out the code.
30934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
30935 $as_echo_n "checking for style of include used by $am_make... " >&6; }
30936 am__include="#"
30937 am__quote=
30938 _am_result=none
30939 # First try GNU make style include.
30940 echo "include confinc" > confmf
30941 # Ignore all kinds of additional output from 'make'.
30942 case `$am_make -s -f confmf 2> /dev/null` in #(
30943 *the\ am__doit\ target*)
30944 am__include=include
30945 am__quote=
30946 _am_result=GNU
30947 ;;
30948 esac
30949 # Now try BSD make style include.
30950 if test "$am__include" = "#"; then
30951 echo '.include "confinc"' > confmf
30952 case `$am_make -s -f confmf 2> /dev/null` in #(
30953 *the\ am__doit\ target*)
30954 am__include=.include
30955 am__quote="\""
30956 _am_result=BSD
30957 ;;
30958 esac
30959 fi
30960
30961
30962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
30963 $as_echo "$_am_result" >&6; }
30964 rm -f confinc confmf
30965
30966 # Check whether --enable-dependency-tracking was given.
30967 if test "${enable_dependency_tracking+set}" = set; then :
30968 enableval=$enable_dependency_tracking;
30969 fi
30970
30971 if test "x$enable_dependency_tracking" != xno; then
30972 am_depcomp="$ac_aux_dir/depcomp"
30973 AMDEPBACKSLASH='\'
30974 am__nodep='_no'
30975 fi
30976 if test "x$enable_dependency_tracking" != xno; then
30977 AMDEP_TRUE=
30978 AMDEP_FALSE='#'
30979 else
30980 AMDEP_TRUE='#'
30981 AMDEP_FALSE=
30982 fi
30983
30984
30985 # Check whether --enable-silent-rules was given.
30986 if test "${enable_silent_rules+set}" = set; then :
30987 enableval=$enable_silent_rules;
30988 fi
30989
30990 case $enable_silent_rules in # (((
30991 yes) AM_DEFAULT_VERBOSITY=0;;
30992 no) AM_DEFAULT_VERBOSITY=1;;
30993 *) AM_DEFAULT_VERBOSITY=1;;
30994 esac
30995 am_make=${MAKE-make}
30996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
30997 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
30998 if ${am_cv_make_support_nested_variables+:} false; then :
30999 $as_echo_n "(cached) " >&6
31000 else
31001 if $as_echo 'TRUE=$(BAR$(V))
31002 BAR0=false
31003 BAR1=true
31004 V=1
31005 am__doit:
31006 @$(TRUE)
31007 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
31008 am_cv_make_support_nested_variables=yes
31009 else
31010 am_cv_make_support_nested_variables=no
31011 fi
31012 fi
31013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
31014 $as_echo "$am_cv_make_support_nested_variables" >&6; }
31015 if test $am_cv_make_support_nested_variables = yes; then
31016 AM_V='$(V)'
31017 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
31018 else
31019 AM_V=$AM_DEFAULT_VERBOSITY
31020 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
31021 fi
31022 AM_BACKSLASH='\'
31023
31024 if test "`cd $srcdir && pwd`" != "`pwd`"; then
31025 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
31026 # is not polluted with repeated "-I."
31027 am__isrc=' -I$(srcdir)'
31028 # test to see if srcdir already configured
31029 if test -f $srcdir/config.status; then
31030 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
31031 fi
31032 fi
31033
31034 # test whether we have cygpath
31035 if test -z "$CYGPATH_W"; then
31036 if (cygpath --version) >/dev/null 2>/dev/null; then
31037 CYGPATH_W='cygpath -w'
31038 else
31039 CYGPATH_W=echo
31040 fi
31041 fi
31042
31043
31044 # Define the identity of the package.
31045 PACKAGE='libgnu'
31046 VERSION='UNUSED-VERSION'
31047
31048
31049 # Some tools Automake needs.
31050
31051 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
31052
31053
31054 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
31055
31056
31057 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
31058
31059
31060 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
31061
31062
31063 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
31064
31065 # For better backward compatibility. To be removed once Automake 1.9.x
31066 # dies out for good. For more background, see:
31067 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
31068 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
31069 mkdir_p='$(MKDIR_P)'
31070
31071 # We need awk for the "check" target (and possibly the TAP driver). The
31072 # system "awk" is bad on some platforms.
31073 # Always define AMTAR for backward compatibility. Yes, it's still used
31074 # in the wild :-( We should find a proper way to deprecate it ...
31075 AMTAR='$${TAR-tar}'
31076
31077
31078 # We'll loop over all known methods to create a tar archive until one works.
31079 _am_tools='gnutar pax cpio none'
31080
31081 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
31082
31083
31084
31085
31086
31087 depcc="$CC" am_compiler_list=
31088
31089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
31090 $as_echo_n "checking dependency style of $depcc... " >&6; }
31091 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
31092 $as_echo_n "(cached) " >&6
31093 else
31094 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
31095 # We make a subdir and do the tests there. Otherwise we can end up
31096 # making bogus files that we don't know about and never remove. For
31097 # instance it was reported that on HP-UX the gcc test will end up
31098 # making a dummy file named 'D' -- because '-MD' means "put the output
31099 # in D".
31100 rm -rf conftest.dir
31101 mkdir conftest.dir
31102 # Copy depcomp to subdir because otherwise we won't find it if we're
31103 # using a relative directory.
31104 cp "$am_depcomp" conftest.dir
31105 cd conftest.dir
31106 # We will build objects and dependencies in a subdirectory because
31107 # it helps to detect inapplicable dependency modes. For instance
31108 # both Tru64's cc and ICC support -MD to output dependencies as a
31109 # side effect of compilation, but ICC will put the dependencies in
31110 # the current directory while Tru64 will put them in the object
31111 # directory.
31112 mkdir sub
31113
31114 am_cv_CC_dependencies_compiler_type=none
31115 if test "$am_compiler_list" = ""; then
31116 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
31117 fi
31118 am__universal=false
31119 case " $depcc " in #(
31120 *\ -arch\ *\ -arch\ *) am__universal=true ;;
31121 esac
31122
31123 for depmode in $am_compiler_list; do
31124 # Setup a source with many dependencies, because some compilers
31125 # like to wrap large dependency lists on column 80 (with \), and
31126 # we should not choose a depcomp mode which is confused by this.
31127 #
31128 # We need to recreate these files for each test, as the compiler may
31129 # overwrite some of them when testing with obscure command lines.
31130 # This happens at least with the AIX C compiler.
31131 : > sub/conftest.c
31132 for i in 1 2 3 4 5 6; do
31133 echo '#include "conftst'$i'.h"' >> sub/conftest.c
31134 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
31135 # Solaris 10 /bin/sh.
31136 echo '/* dummy */' > sub/conftst$i.h
31137 done
31138 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
31139
31140 # We check with '-c' and '-o' for the sake of the "dashmstdout"
31141 # mode. It turns out that the SunPro C++ compiler does not properly
31142 # handle '-M -o', and we need to detect this. Also, some Intel
31143 # versions had trouble with output in subdirs.
31144 am__obj=sub/conftest.${OBJEXT-o}
31145 am__minus_obj="-o $am__obj"
31146 case $depmode in
31147 gcc)
31148 # This depmode causes a compiler race in universal mode.
31149 test "$am__universal" = false || continue
31150 ;;
31151 nosideeffect)
31152 # After this tag, mechanisms are not by side-effect, so they'll
31153 # only be used when explicitly requested.
31154 if test "x$enable_dependency_tracking" = xyes; then
31155 continue
31156 else
31157 break
31158 fi
31159 ;;
31160 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
31161 # This compiler won't grok '-c -o', but also, the minuso test has
31162 # not run yet. These depmodes are late enough in the game, and
31163 # so weak that their functioning should not be impacted.
31164 am__obj=conftest.${OBJEXT-o}
31165 am__minus_obj=
31166 ;;
31167 none) break ;;
31168 esac
31169 if depmode=$depmode \
31170 source=sub/conftest.c object=$am__obj \
31171 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
31172 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
31173 >/dev/null 2>conftest.err &&
31174 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
31175 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
31176 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
31177 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
31178 # icc doesn't choke on unknown options, it will just issue warnings
31179 # or remarks (even with -Werror). So we grep stderr for any message
31180 # that says an option was ignored or not supported.
31181 # When given -MP, icc 7.0 and 7.1 complain thusly:
31182 # icc: Command line warning: ignoring option '-M'; no argument required
31183 # The diagnosis changed in icc 8.0:
31184 # icc: Command line remark: option '-MP' not supported
31185 if (grep 'ignoring option' conftest.err ||
31186 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
31187 am_cv_CC_dependencies_compiler_type=$depmode
31188 break
31189 fi
31190 fi
31191 done
31192
31193 cd ..
31194 rm -rf conftest.dir
31195 else
31196 am_cv_CC_dependencies_compiler_type=none
31197 fi
31198
31199 fi
31200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
31201 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
31202 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
31203
31204 if
31205 test "x$enable_dependency_tracking" != xno \
31206 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
31207 am__fastdepCC_TRUE=
31208 am__fastdepCC_FALSE='#'
31209 else
31210 am__fastdepCC_TRUE='#'
31211 am__fastdepCC_FALSE=
31212 fi
31213
31214
31215
31216 # POSIX will say in a future version that running "rm -f" with no argument
31217 # is OK; and we want to be able to make that assumption in our Makefile
31218 # recipes. So use an aggressive probe to check that the usage we want is
31219 # actually supported "in the wild" to an acceptable degree.
31220 # See automake bug#10828.
31221 # To make any issue more visible, cause the running configure to be aborted
31222 # by default if the 'rm' program in use doesn't match our expectations; the
31223 # user can still override this though.
31224 if rm -f && rm -fr && rm -rf; then : OK; else
31225 cat >&2 <<'END'
31226 Oops!
31227
31228 Your 'rm' program seems unable to run without file operands specified
31229 on the command line, even when the '-f' option is present. This is contrary
31230 to the behaviour of most rm programs out there, and not conforming with
31231 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
31232
31233 Please tell bug-automake@gnu.org about your system, including the value
31234 of your $PATH and any error possibly output before this message. This
31235 can help us improve future automake versions.
31236
31237 END
31238 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
31239 echo 'Configuration will proceed anyway, since you have set the' >&2
31240 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
31241 echo >&2
31242 else
31243 cat >&2 <<'END'
31244 Aborting the configuration process, to ensure you take notice of the issue.
31245
31246 You can download and install GNU coreutils to get an 'rm' implementation
31247 that behaves properly: <http://www.gnu.org/software/coreutils/>.
31248
31249 If you want to complete the configuration process using your problematic
31250 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
31251 to "yes", and re-run configure.
31252
31253 END
31254 as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
31255 fi
31256 fi
31257
31258
31259 # Check whether --enable-silent-rules was given.
31260 if test "${enable_silent_rules+set}" = set; then :
31261 enableval=$enable_silent_rules;
31262 fi
31263
31264 case $enable_silent_rules in # (((
31265 yes) AM_DEFAULT_VERBOSITY=0;;
31266 no) AM_DEFAULT_VERBOSITY=1;;
31267 *) AM_DEFAULT_VERBOSITY=0;;
31268 esac
31269 am_make=${MAKE-make}
31270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
31271 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
31272 if ${am_cv_make_support_nested_variables+:} false; then :
31273 $as_echo_n "(cached) " >&6
31274 else
31275 if $as_echo 'TRUE=$(BAR$(V))
31276 BAR0=false
31277 BAR1=true
31278 V=1
31279 am__doit:
31280 @$(TRUE)
31281 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
31282 am_cv_make_support_nested_variables=yes
31283 else
31284 am_cv_make_support_nested_variables=no
31285 fi
31286 fi
31287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
31288 $as_echo "$am_cv_make_support_nested_variables" >&6; }
31289 if test $am_cv_make_support_nested_variables = yes; then
31290 AM_V='$(V)'
31291 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
31292 else
31293 AM_V=$AM_DEFAULT_VERBOSITY
31294 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
31295 fi
31296 AM_BACKSLASH='\'
31297
31298
31299 # --------------------- #
31300 # Checks for programs. #
31301 # --------------------- #
31302
31303
31304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
31305 $as_echo_n "checking whether ln -s works... " >&6; }
31306 LN_S=$as_ln_s
31307 if test "$LN_S" = "ln -s"; then
31308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31309 $as_echo "yes" >&6; }
31310 else
31311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
31312 $as_echo "no, using $LN_S" >&6; }
31313 fi
31314
31315 if test -n "$ac_tool_prefix"; then
31316 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
31317 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
31318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31319 $as_echo_n "checking for $ac_word... " >&6; }
31320 if ${ac_cv_prog_RANLIB+:} false; then :
31321 $as_echo_n "(cached) " >&6
31322 else
31323 if test -n "$RANLIB"; then
31324 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
31325 else
31326 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31327 for as_dir in $PATH
31328 do
31329 IFS=$as_save_IFS
31330 test -z "$as_dir" && as_dir=.
31331 for ac_exec_ext in '' $ac_executable_extensions; do
31332 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31333 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
31334 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31335 break 2
31336 fi
31337 done
31338 done
31339 IFS=$as_save_IFS
31340
31341 fi
31342 fi
31343 RANLIB=$ac_cv_prog_RANLIB
31344 if test -n "$RANLIB"; then
31345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
31346 $as_echo "$RANLIB" >&6; }
31347 else
31348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31349 $as_echo "no" >&6; }
31350 fi
31351
31352
31353 fi
31354 if test -z "$ac_cv_prog_RANLIB"; then
31355 ac_ct_RANLIB=$RANLIB
31356 # Extract the first word of "ranlib", so it can be a program name with args.
31357 set dummy ranlib; ac_word=$2
31358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31359 $as_echo_n "checking for $ac_word... " >&6; }
31360 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
31361 $as_echo_n "(cached) " >&6
31362 else
31363 if test -n "$ac_ct_RANLIB"; then
31364 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
31365 else
31366 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31367 for as_dir in $PATH
31368 do
31369 IFS=$as_save_IFS
31370 test -z "$as_dir" && as_dir=.
31371 for ac_exec_ext in '' $ac_executable_extensions; do
31372 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31373 ac_cv_prog_ac_ct_RANLIB="ranlib"
31374 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31375 break 2
31376 fi
31377 done
31378 done
31379 IFS=$as_save_IFS
31380
31381 fi
31382 fi
31383 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
31384 if test -n "$ac_ct_RANLIB"; then
31385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
31386 $as_echo "$ac_ct_RANLIB" >&6; }
31387 else
31388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31389 $as_echo "no" >&6; }
31390 fi
31391
31392 if test "x$ac_ct_RANLIB" = x; then
31393 RANLIB=":"
31394 else
31395 case $cross_compiling:$ac_tool_warned in
31396 yes:)
31397 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31398 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31399 ac_tool_warned=yes ;;
31400 esac
31401 RANLIB=$ac_ct_RANLIB
31402 fi
31403 else
31404 RANLIB="$ac_cv_prog_RANLIB"
31405 fi
31406
31407
31408 if test -n "$ac_tool_prefix"; then
31409 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
31410 set dummy ${ac_tool_prefix}ar; ac_word=$2
31411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31412 $as_echo_n "checking for $ac_word... " >&6; }
31413 if ${ac_cv_prog_AR+:} false; then :
31414 $as_echo_n "(cached) " >&6
31415 else
31416 if test -n "$AR"; then
31417 ac_cv_prog_AR="$AR" # Let the user override the test.
31418 else
31419 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31420 for as_dir in $PATH
31421 do
31422 IFS=$as_save_IFS
31423 test -z "$as_dir" && as_dir=.
31424 for ac_exec_ext in '' $ac_executable_extensions; do
31425 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31426 ac_cv_prog_AR="${ac_tool_prefix}ar"
31427 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31428 break 2
31429 fi
31430 done
31431 done
31432 IFS=$as_save_IFS
31433
31434 fi
31435 fi
31436 AR=$ac_cv_prog_AR
31437 if test -n "$AR"; then
31438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
31439 $as_echo "$AR" >&6; }
31440 else
31441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31442 $as_echo "no" >&6; }
31443 fi
31444
31445
31446 fi
31447 if test -z "$ac_cv_prog_AR"; then
31448 ac_ct_AR=$AR
31449 # Extract the first word of "ar", so it can be a program name with args.
31450 set dummy ar; ac_word=$2
31451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31452 $as_echo_n "checking for $ac_word... " >&6; }
31453 if ${ac_cv_prog_ac_ct_AR+:} false; then :
31454 $as_echo_n "(cached) " >&6
31455 else
31456 if test -n "$ac_ct_AR"; then
31457 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
31458 else
31459 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31460 for as_dir in $PATH
31461 do
31462 IFS=$as_save_IFS
31463 test -z "$as_dir" && as_dir=.
31464 for ac_exec_ext in '' $ac_executable_extensions; do
31465 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31466 ac_cv_prog_ac_ct_AR="ar"
31467 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31468 break 2
31469 fi
31470 done
31471 done
31472 IFS=$as_save_IFS
31473
31474 fi
31475 fi
31476 ac_ct_AR=$ac_cv_prog_ac_ct_AR
31477 if test -n "$ac_ct_AR"; then
31478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
31479 $as_echo "$ac_ct_AR" >&6; }
31480 else
31481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31482 $as_echo "no" >&6; }
31483 fi
31484
31485 if test "x$ac_ct_AR" = x; then
31486 AR=""
31487 else
31488 case $cross_compiling:$ac_tool_warned in
31489 yes:)
31490 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31491 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31492 ac_tool_warned=yes ;;
31493 esac
31494 AR=$ac_ct_AR
31495 fi
31496 else
31497 AR="$ac_cv_prog_AR"
31498 fi
31499
31500
31501 # ---------------------- #
31502 # Checks for libraries. #
31503 # ---------------------- #
31504
31505 ac_config_files="$ac_config_files Makefile.gnulib.inc"
31506
31507
31508 ac_config_files="$ac_config_files Makefile import/Makefile"
31509
31510 ac_config_commands="$ac_config_commands default"
31511
31512 cat >confcache <<\_ACEOF
31513 # This file is a shell script that caches the results of configure
31514 # tests run on this system so they can be shared between configure
31515 # scripts and configure runs, see configure's option --config-cache.
31516 # It is not useful on other systems. If it contains results you don't
31517 # want to keep, you may remove or edit it.
31518 #
31519 # config.status only pays attention to the cache file if you give it
31520 # the --recheck option to rerun configure.
31521 #
31522 # `ac_cv_env_foo' variables (set or unset) will be overridden when
31523 # loading this file, other *unset* `ac_cv_foo' will be assigned the
31524 # following values.
31525
31526 _ACEOF
31527
31528 # The following way of writing the cache mishandles newlines in values,
31529 # but we know of no workaround that is simple, portable, and efficient.
31530 # So, we kill variables containing newlines.
31531 # Ultrix sh set writes to stderr and can't be redirected directly,
31532 # and sets the high bit in the cache file unless we assign to the vars.
31533 (
31534 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
31535 eval ac_val=\$$ac_var
31536 case $ac_val in #(
31537 *${as_nl}*)
31538 case $ac_var in #(
31539 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
31540 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
31541 esac
31542 case $ac_var in #(
31543 _ | IFS | as_nl) ;; #(
31544 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
31545 *) { eval $ac_var=; unset $ac_var;} ;;
31546 esac ;;
31547 esac
31548 done
31549
31550 (set) 2>&1 |
31551 case $as_nl`(ac_space=' '; set) 2>&1` in #(
31552 *${as_nl}ac_space=\ *)
31553 # `set' does not quote correctly, so add quotes: double-quote
31554 # substitution turns \\\\ into \\, and sed turns \\ into \.
31555 sed -n \
31556 "s/'/'\\\\''/g;
31557 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
31558 ;; #(
31559 *)
31560 # `set' quotes correctly as required by POSIX, so do not add quotes.
31561 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
31562 ;;
31563 esac |
31564 sort
31565 ) |
31566 sed '
31567 /^ac_cv_env_/b end
31568 t clear
31569 :clear
31570 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
31571 t end
31572 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
31573 :end' >>confcache
31574 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
31575 if test -w "$cache_file"; then
31576 if test "x$cache_file" != "x/dev/null"; then
31577 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
31578 $as_echo "$as_me: updating cache $cache_file" >&6;}
31579 if test ! -f "$cache_file" || test -h "$cache_file"; then
31580 cat confcache >"$cache_file"
31581 else
31582 case $cache_file in #(
31583 */* | ?:*)
31584 mv -f confcache "$cache_file"$$ &&
31585 mv -f "$cache_file"$$ "$cache_file" ;; #(
31586 *)
31587 mv -f confcache "$cache_file" ;;
31588 esac
31589 fi
31590 fi
31591 else
31592 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
31593 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
31594 fi
31595 fi
31596 rm -f confcache
31597
31598 test "x$prefix" = xNONE && prefix=$ac_default_prefix
31599 # Let make expand exec_prefix.
31600 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
31601
31602 DEFS=-DHAVE_CONFIG_H
31603
31604 ac_libobjs=
31605 ac_ltlibobjs=
31606 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
31607 # 1. Remove the extension, and $U if already installed.
31608 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
31609 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
31610 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
31611 # will be set to the directory where LIBOBJS objects are built.
31612 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
31613 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
31614 done
31615 LIBOBJS=$ac_libobjs
31616
31617 LTLIBOBJS=$ac_ltlibobjs
31618
31619
31620 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
31621 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
31622 Usually this means the macro was only invoked conditionally." "$LINENO" 5
31623 fi
31624 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
31625 as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
31626 Usually this means the macro was only invoked conditionally." "$LINENO" 5
31627 fi
31628 if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
31629 as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
31630 Usually this means the macro was only invoked conditionally." "$LINENO" 5
31631 fi
31632 if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
31633 as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
31634 Usually this means the macro was only invoked conditionally." "$LINENO" 5
31635 fi
31636 if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
31637 as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
31638 Usually this means the macro was only invoked conditionally." "$LINENO" 5
31639 fi
31640 if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
31641 as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
31642 Usually this means the macro was only invoked conditionally." "$LINENO" 5
31643 fi
31644 if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
31645 as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
31646 Usually this means the macro was only invoked conditionally." "$LINENO" 5
31647 fi
31648 if test -z "${GL_GENERATE_GLOB_H_TRUE}" && test -z "${GL_GENERATE_GLOB_H_FALSE}"; then
31649 as_fn_error $? "conditional \"GL_GENERATE_GLOB_H\" was never defined.
31650 Usually this means the macro was only invoked conditionally." "$LINENO" 5
31651 fi
31652 if test -z "${GL_GENERATE_GLOB_H_TRUE}" && test -z "${GL_GENERATE_GLOB_H_FALSE}"; then
31653 as_fn_error $? "conditional \"GL_GENERATE_GLOB_H\" was never defined.
31654 Usually this means the macro was only invoked conditionally." "$LINENO" 5
31655 fi
31656 if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
31657 as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
31658 Usually this means the macro was only invoked conditionally." "$LINENO" 5
31659 fi
31660 if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
31661 as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
31662 Usually this means the macro was only invoked conditionally." "$LINENO" 5
31663 fi
31664 if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
31665 as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
31666 Usually this means the macro was only invoked conditionally." "$LINENO" 5
31667 fi
31668
31669
31670 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
31671 as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
31672 Usually this means the macro was only invoked conditionally." "$LINENO" 5
31673 fi
31674 if test -z "${GL_GENERATE_NETINET_IN_H_TRUE}" && test -z "${GL_GENERATE_NETINET_IN_H_FALSE}"; then
31675 as_fn_error $? "conditional \"GL_GENERATE_NETINET_IN_H\" was never defined.
31676 Usually this means the macro was only invoked conditionally." "$LINENO" 5
31677 fi
31678 if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
31679 as_fn_error $? "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
31680 Usually this means the macro was only invoked conditionally." "$LINENO" 5
31681 fi
31682 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
31683 as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
31684 Usually this means the macro was only invoked conditionally." "$LINENO" 5
31685 fi
31686 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
31687 as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
31688 Usually this means the macro was only invoked conditionally." "$LINENO" 5
31689 fi
31690
31691 gl_libobjs=
31692 gl_ltlibobjs=
31693 if test -n "$gl_LIBOBJS"; then
31694 # Remove the extension.
31695 sed_drop_objext='s/\.o$//;s/\.obj$//'
31696 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
31697 gl_libobjs="$gl_libobjs $i.$ac_objext"
31698 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
31699 done
31700 fi
31701 gl_LIBOBJS=$gl_libobjs
31702
31703 gl_LTLIBOBJS=$gl_ltlibobjs
31704
31705
31706
31707 gltests_libobjs=
31708 gltests_ltlibobjs=
31709 if test -n "$gltests_LIBOBJS"; then
31710 # Remove the extension.
31711 sed_drop_objext='s/\.o$//;s/\.obj$//'
31712 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
31713 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
31714 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
31715 done
31716 fi
31717 gltests_LIBOBJS=$gltests_libobjs
31718
31719 gltests_LTLIBOBJS=$gltests_ltlibobjs
31720
31721
31722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
31723 $as_echo_n "checking that generated files are newer than configure... " >&6; }
31724 if test -n "$am_sleep_pid"; then
31725 # Hide warnings about reused PIDs.
31726 wait $am_sleep_pid 2>/dev/null
31727 fi
31728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
31729 $as_echo "done" >&6; }
31730 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
31731 as_fn_error $? "conditional \"AMDEP\" was never defined.
31732 Usually this means the macro was only invoked conditionally." "$LINENO" 5
31733 fi
31734 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
31735 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
31736 Usually this means the macro was only invoked conditionally." "$LINENO" 5
31737 fi
31738 if test -n "$EXEEXT"; then
31739 am__EXEEXT_TRUE=
31740 am__EXEEXT_FALSE='#'
31741 else
31742 am__EXEEXT_TRUE='#'
31743 am__EXEEXT_FALSE=
31744 fi
31745
31746
31747 : "${CONFIG_STATUS=./config.status}"
31748 ac_write_fail=0
31749 ac_clean_files_save=$ac_clean_files
31750 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
31751 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
31752 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
31753 as_write_fail=0
31754 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
31755 #! $SHELL
31756 # Generated by $as_me.
31757 # Run this file to recreate the current configuration.
31758 # Compiler output produced by configure, useful for debugging
31759 # configure, is in config.log if it exists.
31760
31761 debug=false
31762 ac_cs_recheck=false
31763 ac_cs_silent=false
31764
31765 SHELL=\${CONFIG_SHELL-$SHELL}
31766 export SHELL
31767 _ASEOF
31768 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
31769 ## -------------------- ##
31770 ## M4sh Initialization. ##
31771 ## -------------------- ##
31772
31773 # Be more Bourne compatible
31774 DUALCASE=1; export DUALCASE # for MKS sh
31775 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
31776 emulate sh
31777 NULLCMD=:
31778 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
31779 # is contrary to our usage. Disable this feature.
31780 alias -g '${1+"$@"}'='"$@"'
31781 setopt NO_GLOB_SUBST
31782 else
31783 case `(set -o) 2>/dev/null` in #(
31784 *posix*) :
31785 set -o posix ;; #(
31786 *) :
31787 ;;
31788 esac
31789 fi
31790
31791
31792 as_nl='
31793 '
31794 export as_nl
31795 # Printing a long string crashes Solaris 7 /usr/bin/printf.
31796 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
31797 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
31798 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
31799 # Prefer a ksh shell builtin over an external printf program on Solaris,
31800 # but without wasting forks for bash or zsh.
31801 if test -z "$BASH_VERSION$ZSH_VERSION" \
31802 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
31803 as_echo='print -r --'
31804 as_echo_n='print -rn --'
31805 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
31806 as_echo='printf %s\n'
31807 as_echo_n='printf %s'
31808 else
31809 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
31810 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
31811 as_echo_n='/usr/ucb/echo -n'
31812 else
31813 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
31814 as_echo_n_body='eval
31815 arg=$1;
31816 case $arg in #(
31817 *"$as_nl"*)
31818 expr "X$arg" : "X\\(.*\\)$as_nl";
31819 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
31820 esac;
31821 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
31822 '
31823 export as_echo_n_body
31824 as_echo_n='sh -c $as_echo_n_body as_echo'
31825 fi
31826 export as_echo_body
31827 as_echo='sh -c $as_echo_body as_echo'
31828 fi
31829
31830 # The user is always right.
31831 if test "${PATH_SEPARATOR+set}" != set; then
31832 PATH_SEPARATOR=:
31833 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
31834 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
31835 PATH_SEPARATOR=';'
31836 }
31837 fi
31838
31839
31840 # IFS
31841 # We need space, tab and new line, in precisely that order. Quoting is
31842 # there to prevent editors from complaining about space-tab.
31843 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
31844 # splitting by setting IFS to empty value.)
31845 IFS=" "" $as_nl"
31846
31847 # Find who we are. Look in the path if we contain no directory separator.
31848 as_myself=
31849 case $0 in #((
31850 *[\\/]* ) as_myself=$0 ;;
31851 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31852 for as_dir in $PATH
31853 do
31854 IFS=$as_save_IFS
31855 test -z "$as_dir" && as_dir=.
31856 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
31857 done
31858 IFS=$as_save_IFS
31859
31860 ;;
31861 esac
31862 # We did not find ourselves, most probably we were run as `sh COMMAND'
31863 # in which case we are not to be found in the path.
31864 if test "x$as_myself" = x; then
31865 as_myself=$0
31866 fi
31867 if test ! -f "$as_myself"; then
31868 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
31869 exit 1
31870 fi
31871
31872 # Unset variables that we do not need and which cause bugs (e.g. in
31873 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
31874 # suppresses any "Segmentation fault" message there. '((' could
31875 # trigger a bug in pdksh 5.2.14.
31876 for as_var in BASH_ENV ENV MAIL MAILPATH
31877 do eval test x\${$as_var+set} = xset \
31878 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
31879 done
31880 PS1='$ '
31881 PS2='> '
31882 PS4='+ '
31883
31884 # NLS nuisances.
31885 LC_ALL=C
31886 export LC_ALL
31887 LANGUAGE=C
31888 export LANGUAGE
31889
31890 # CDPATH.
31891 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
31892
31893
31894 # as_fn_error STATUS ERROR [LINENO LOG_FD]
31895 # ----------------------------------------
31896 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
31897 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
31898 # script with STATUS, using 1 if that was 0.
31899 as_fn_error ()
31900 {
31901 as_status=$1; test $as_status -eq 0 && as_status=1
31902 if test "$4"; then
31903 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
31904 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
31905 fi
31906 $as_echo "$as_me: error: $2" >&2
31907 as_fn_exit $as_status
31908 } # as_fn_error
31909
31910
31911 # as_fn_set_status STATUS
31912 # -----------------------
31913 # Set $? to STATUS, without forking.
31914 as_fn_set_status ()
31915 {
31916 return $1
31917 } # as_fn_set_status
31918
31919 # as_fn_exit STATUS
31920 # -----------------
31921 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
31922 as_fn_exit ()
31923 {
31924 set +e
31925 as_fn_set_status $1
31926 exit $1
31927 } # as_fn_exit
31928
31929 # as_fn_unset VAR
31930 # ---------------
31931 # Portably unset VAR.
31932 as_fn_unset ()
31933 {
31934 { eval $1=; unset $1;}
31935 }
31936 as_unset=as_fn_unset
31937 # as_fn_append VAR VALUE
31938 # ----------------------
31939 # Append the text in VALUE to the end of the definition contained in VAR. Take
31940 # advantage of any shell optimizations that allow amortized linear growth over
31941 # repeated appends, instead of the typical quadratic growth present in naive
31942 # implementations.
31943 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
31944 eval 'as_fn_append ()
31945 {
31946 eval $1+=\$2
31947 }'
31948 else
31949 as_fn_append ()
31950 {
31951 eval $1=\$$1\$2
31952 }
31953 fi # as_fn_append
31954
31955 # as_fn_arith ARG...
31956 # ------------------
31957 # Perform arithmetic evaluation on the ARGs, and store the result in the
31958 # global $as_val. Take advantage of shells that can avoid forks. The arguments
31959 # must be portable across $(()) and expr.
31960 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
31961 eval 'as_fn_arith ()
31962 {
31963 as_val=$(( $* ))
31964 }'
31965 else
31966 as_fn_arith ()
31967 {
31968 as_val=`expr "$@" || test $? -eq 1`
31969 }
31970 fi # as_fn_arith
31971
31972
31973 if expr a : '\(a\)' >/dev/null 2>&1 &&
31974 test "X`expr 00001 : '.*\(...\)'`" = X001; then
31975 as_expr=expr
31976 else
31977 as_expr=false
31978 fi
31979
31980 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
31981 as_basename=basename
31982 else
31983 as_basename=false
31984 fi
31985
31986 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
31987 as_dirname=dirname
31988 else
31989 as_dirname=false
31990 fi
31991
31992 as_me=`$as_basename -- "$0" ||
31993 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
31994 X"$0" : 'X\(//\)$' \| \
31995 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
31996 $as_echo X/"$0" |
31997 sed '/^.*\/\([^/][^/]*\)\/*$/{
31998 s//\1/
31999 q
32000 }
32001 /^X\/\(\/\/\)$/{
32002 s//\1/
32003 q
32004 }
32005 /^X\/\(\/\).*/{
32006 s//\1/
32007 q
32008 }
32009 s/.*/./; q'`
32010
32011 # Avoid depending upon Character Ranges.
32012 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
32013 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
32014 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
32015 as_cr_digits='0123456789'
32016 as_cr_alnum=$as_cr_Letters$as_cr_digits
32017
32018 ECHO_C= ECHO_N= ECHO_T=
32019 case `echo -n x` in #(((((
32020 -n*)
32021 case `echo 'xy\c'` in
32022 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
32023 xy) ECHO_C='\c';;
32024 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
32025 ECHO_T=' ';;
32026 esac;;
32027 *)
32028 ECHO_N='-n';;
32029 esac
32030
32031 rm -f conf$$ conf$$.exe conf$$.file
32032 if test -d conf$$.dir; then
32033 rm -f conf$$.dir/conf$$.file
32034 else
32035 rm -f conf$$.dir
32036 mkdir conf$$.dir 2>/dev/null
32037 fi
32038 if (echo >conf$$.file) 2>/dev/null; then
32039 if ln -s conf$$.file conf$$ 2>/dev/null; then
32040 as_ln_s='ln -s'
32041 # ... but there are two gotchas:
32042 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
32043 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
32044 # In both cases, we have to default to `cp -pR'.
32045 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
32046 as_ln_s='cp -pR'
32047 elif ln conf$$.file conf$$ 2>/dev/null; then
32048 as_ln_s=ln
32049 else
32050 as_ln_s='cp -pR'
32051 fi
32052 else
32053 as_ln_s='cp -pR'
32054 fi
32055 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
32056 rmdir conf$$.dir 2>/dev/null
32057
32058
32059 # as_fn_mkdir_p
32060 # -------------
32061 # Create "$as_dir" as a directory, including parents if necessary.
32062 as_fn_mkdir_p ()
32063 {
32064
32065 case $as_dir in #(
32066 -*) as_dir=./$as_dir;;
32067 esac
32068 test -d "$as_dir" || eval $as_mkdir_p || {
32069 as_dirs=
32070 while :; do
32071 case $as_dir in #(
32072 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
32073 *) as_qdir=$as_dir;;
32074 esac
32075 as_dirs="'$as_qdir' $as_dirs"
32076 as_dir=`$as_dirname -- "$as_dir" ||
32077 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32078 X"$as_dir" : 'X\(//\)[^/]' \| \
32079 X"$as_dir" : 'X\(//\)$' \| \
32080 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
32081 $as_echo X"$as_dir" |
32082 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32083 s//\1/
32084 q
32085 }
32086 /^X\(\/\/\)[^/].*/{
32087 s//\1/
32088 q
32089 }
32090 /^X\(\/\/\)$/{
32091 s//\1/
32092 q
32093 }
32094 /^X\(\/\).*/{
32095 s//\1/
32096 q
32097 }
32098 s/.*/./; q'`
32099 test -d "$as_dir" && break
32100 done
32101 test -z "$as_dirs" || eval "mkdir $as_dirs"
32102 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
32103
32104
32105 } # as_fn_mkdir_p
32106 if mkdir -p . 2>/dev/null; then
32107 as_mkdir_p='mkdir -p "$as_dir"'
32108 else
32109 test -d ./-p && rmdir ./-p
32110 as_mkdir_p=false
32111 fi
32112
32113
32114 # as_fn_executable_p FILE
32115 # -----------------------
32116 # Test if FILE is an executable regular file.
32117 as_fn_executable_p ()
32118 {
32119 test -f "$1" && test -x "$1"
32120 } # as_fn_executable_p
32121 as_test_x='test -x'
32122 as_executable_p=as_fn_executable_p
32123
32124 # Sed expression to map a string onto a valid CPP name.
32125 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
32126
32127 # Sed expression to map a string onto a valid variable name.
32128 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
32129
32130
32131 exec 6>&1
32132 ## ----------------------------------- ##
32133 ## Main body of $CONFIG_STATUS script. ##
32134 ## ----------------------------------- ##
32135 _ASEOF
32136 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
32137
32138 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32139 # Save the log message, to keep $0 and so on meaningful, and to
32140 # report actual input values of CONFIG_FILES etc. instead of their
32141 # values after options handling.
32142 ac_log="
32143 This file was extended by libgnu $as_me UNUSED-VERSION, which was
32144 generated by GNU Autoconf 2.69. Invocation command line was
32145
32146 CONFIG_FILES = $CONFIG_FILES
32147 CONFIG_HEADERS = $CONFIG_HEADERS
32148 CONFIG_LINKS = $CONFIG_LINKS
32149 CONFIG_COMMANDS = $CONFIG_COMMANDS
32150 $ $0 $@
32151
32152 on `(hostname || uname -n) 2>/dev/null | sed 1q`
32153 "
32154
32155 _ACEOF
32156
32157 case $ac_config_files in *"
32158 "*) set x $ac_config_files; shift; ac_config_files=$*;;
32159 esac
32160
32161 case $ac_config_headers in *"
32162 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
32163 esac
32164
32165
32166 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32167 # Files that config.status was made for.
32168 config_files="$ac_config_files"
32169 config_headers="$ac_config_headers"
32170 config_commands="$ac_config_commands"
32171
32172 _ACEOF
32173
32174 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32175 ac_cs_usage="\
32176 \`$as_me' instantiates files and other configuration actions
32177 from templates according to the current configuration. Unless the files
32178 and actions are specified as TAGs, all are instantiated by default.
32179
32180 Usage: $0 [OPTION]... [TAG]...
32181
32182 -h, --help print this help, then exit
32183 -V, --version print version number and configuration settings, then exit
32184 --config print configuration, then exit
32185 -q, --quiet, --silent
32186 do not print progress messages
32187 -d, --debug don't remove temporary files
32188 --recheck update $as_me by reconfiguring in the same conditions
32189 --file=FILE[:TEMPLATE]
32190 instantiate the configuration file FILE
32191 --header=FILE[:TEMPLATE]
32192 instantiate the configuration header FILE
32193
32194 Configuration files:
32195 $config_files
32196
32197 Configuration headers:
32198 $config_headers
32199
32200 Configuration commands:
32201 $config_commands
32202
32203 Report bugs to the package provider."
32204
32205 _ACEOF
32206 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32207 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
32208 ac_cs_version="\\
32209 libgnu config.status UNUSED-VERSION
32210 configured by $0, generated by GNU Autoconf 2.69,
32211 with options \\"\$ac_cs_config\\"
32212
32213 Copyright (C) 2012 Free Software Foundation, Inc.
32214 This config.status script is free software; the Free Software Foundation
32215 gives unlimited permission to copy, distribute and modify it."
32216
32217 ac_pwd='$ac_pwd'
32218 srcdir='$srcdir'
32219 INSTALL='$INSTALL'
32220 MKDIR_P='$MKDIR_P'
32221 AWK='$AWK'
32222 test -n "\$AWK" || AWK=awk
32223 _ACEOF
32224
32225 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32226 # The default lists apply if the user does not specify any file.
32227 ac_need_defaults=:
32228 while test $# != 0
32229 do
32230 case $1 in
32231 --*=?*)
32232 ac_option=`expr "X$1" : 'X\([^=]*\)='`
32233 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
32234 ac_shift=:
32235 ;;
32236 --*=)
32237 ac_option=`expr "X$1" : 'X\([^=]*\)='`
32238 ac_optarg=
32239 ac_shift=:
32240 ;;
32241 *)
32242 ac_option=$1
32243 ac_optarg=$2
32244 ac_shift=shift
32245 ;;
32246 esac
32247
32248 case $ac_option in
32249 # Handling of the options.
32250 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
32251 ac_cs_recheck=: ;;
32252 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
32253 $as_echo "$ac_cs_version"; exit ;;
32254 --config | --confi | --conf | --con | --co | --c )
32255 $as_echo "$ac_cs_config"; exit ;;
32256 --debug | --debu | --deb | --de | --d | -d )
32257 debug=: ;;
32258 --file | --fil | --fi | --f )
32259 $ac_shift
32260 case $ac_optarg in
32261 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32262 '') as_fn_error $? "missing file argument" ;;
32263 esac
32264 as_fn_append CONFIG_FILES " '$ac_optarg'"
32265 ac_need_defaults=false;;
32266 --header | --heade | --head | --hea )
32267 $ac_shift
32268 case $ac_optarg in
32269 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32270 esac
32271 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
32272 ac_need_defaults=false;;
32273 --he | --h)
32274 # Conflict between --help and --header
32275 as_fn_error $? "ambiguous option: \`$1'
32276 Try \`$0 --help' for more information.";;
32277 --help | --hel | -h )
32278 $as_echo "$ac_cs_usage"; exit ;;
32279 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
32280 | -silent | --silent | --silen | --sile | --sil | --si | --s)
32281 ac_cs_silent=: ;;
32282
32283 # This is an error.
32284 -*) as_fn_error $? "unrecognized option: \`$1'
32285 Try \`$0 --help' for more information." ;;
32286
32287 *) as_fn_append ac_config_targets " $1"
32288 ac_need_defaults=false ;;
32289
32290 esac
32291 shift
32292 done
32293
32294 ac_configure_extra_args=
32295
32296 if $ac_cs_silent; then
32297 exec 6>/dev/null
32298 ac_configure_extra_args="$ac_configure_extra_args --silent"
32299 fi
32300
32301 _ACEOF
32302 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32303 if \$ac_cs_recheck; then
32304 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
32305 shift
32306 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
32307 CONFIG_SHELL='$SHELL'
32308 export CONFIG_SHELL
32309 exec "\$@"
32310 fi
32311
32312 _ACEOF
32313 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32314 exec 5>>config.log
32315 {
32316 echo
32317 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
32318 ## Running $as_me. ##
32319 _ASBOX
32320 $as_echo "$ac_log"
32321 } >&5
32322
32323 _ACEOF
32324 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32325 #
32326 # INIT-COMMANDS
32327 #
32328 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
32329
32330 _ACEOF
32331
32332 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32333
32334 # Handling of arguments.
32335 for ac_config_target in $ac_config_targets
32336 do
32337 case $ac_config_target in
32338 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
32339 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
32340 "Makefile.gnulib.inc") CONFIG_FILES="$CONFIG_FILES Makefile.gnulib.inc" ;;
32341 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
32342 "import/Makefile") CONFIG_FILES="$CONFIG_FILES import/Makefile" ;;
32343 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
32344
32345 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
32346 esac
32347 done
32348
32349
32350 # If the user did not use the arguments to specify the items to instantiate,
32351 # then the envvar interface is used. Set only those that are not.
32352 # We use the long form for the default assignment because of an extremely
32353 # bizarre bug on SunOS 4.1.3.
32354 if $ac_need_defaults; then
32355 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
32356 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
32357 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
32358 fi
32359
32360 # Have a temporary directory for convenience. Make it in the build tree
32361 # simply because there is no reason against having it here, and in addition,
32362 # creating and moving files from /tmp can sometimes cause problems.
32363 # Hook for its removal unless debugging.
32364 # Note that there is a small window in which the directory will not be cleaned:
32365 # after its creation but before its name has been assigned to `$tmp'.
32366 $debug ||
32367 {
32368 tmp= ac_tmp=
32369 trap 'exit_status=$?
32370 : "${ac_tmp:=$tmp}"
32371 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
32372 ' 0
32373 trap 'as_fn_exit 1' 1 2 13 15
32374 }
32375 # Create a (secure) tmp directory for tmp files.
32376
32377 {
32378 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
32379 test -d "$tmp"
32380 } ||
32381 {
32382 tmp=./conf$$-$RANDOM
32383 (umask 077 && mkdir "$tmp")
32384 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
32385 ac_tmp=$tmp
32386
32387 # Set up the scripts for CONFIG_FILES section.
32388 # No need to generate them if there are no CONFIG_FILES.
32389 # This happens for instance with `./config.status config.h'.
32390 if test -n "$CONFIG_FILES"; then
32391
32392
32393 ac_cr=`echo X | tr X '\015'`
32394 # On cygwin, bash can eat \r inside `` if the user requested igncr.
32395 # But we know of no other shell where ac_cr would be empty at this
32396 # point, so we can use a bashism as a fallback.
32397 if test "x$ac_cr" = x; then
32398 eval ac_cr=\$\'\\r\'
32399 fi
32400 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
32401 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
32402 ac_cs_awk_cr='\\r'
32403 else
32404 ac_cs_awk_cr=$ac_cr
32405 fi
32406
32407 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
32408 _ACEOF
32409
32410
32411 {
32412 echo "cat >conf$$subs.awk <<_ACEOF" &&
32413 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
32414 echo "_ACEOF"
32415 } >conf$$subs.sh ||
32416 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32417 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
32418 ac_delim='%!_!# '
32419 for ac_last_try in false false false false false :; do
32420 . ./conf$$subs.sh ||
32421 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32422
32423 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
32424 if test $ac_delim_n = $ac_delim_num; then
32425 break
32426 elif $ac_last_try; then
32427 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32428 else
32429 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
32430 fi
32431 done
32432 rm -f conf$$subs.sh
32433
32434 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32435 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
32436 _ACEOF
32437 sed -n '
32438 h
32439 s/^/S["/; s/!.*/"]=/
32440 p
32441 g
32442 s/^[^!]*!//
32443 :repl
32444 t repl
32445 s/'"$ac_delim"'$//
32446 t delim
32447 :nl
32448 h
32449 s/\(.\{148\}\)..*/\1/
32450 t more1
32451 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
32452 p
32453 n
32454 b repl
32455 :more1
32456 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
32457 p
32458 g
32459 s/.\{148\}//
32460 t nl
32461 :delim
32462 h
32463 s/\(.\{148\}\)..*/\1/
32464 t more2
32465 s/["\\]/\\&/g; s/^/"/; s/$/"/
32466 p
32467 b
32468 :more2
32469 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
32470 p
32471 g
32472 s/.\{148\}//
32473 t delim
32474 ' <conf$$subs.awk | sed '
32475 /^[^""]/{
32476 N
32477 s/\n//
32478 }
32479 ' >>$CONFIG_STATUS || ac_write_fail=1
32480 rm -f conf$$subs.awk
32481 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32482 _ACAWK
32483 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
32484 for (key in S) S_is_set[key] = 1
32485 FS = "\a"
32486
32487 }
32488 {
32489 line = $ 0
32490 nfields = split(line, field, "@")
32491 substed = 0
32492 len = length(field[1])
32493 for (i = 2; i < nfields; i++) {
32494 key = field[i]
32495 keylen = length(key)
32496 if (S_is_set[key]) {
32497 value = S[key]
32498 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
32499 len += length(value) + length(field[++i])
32500 substed = 1
32501 } else
32502 len += 1 + keylen
32503 }
32504
32505 print line
32506 }
32507
32508 _ACAWK
32509 _ACEOF
32510 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32511 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
32512 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
32513 else
32514 cat
32515 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
32516 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
32517 _ACEOF
32518
32519 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
32520 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
32521 # trailing colons and then remove the whole line if VPATH becomes empty
32522 # (actually we leave an empty line to preserve line numbers).
32523 if test "x$srcdir" = x.; then
32524 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
32525 h
32526 s///
32527 s/^/:/
32528 s/[ ]*$/:/
32529 s/:\$(srcdir):/:/g
32530 s/:\${srcdir}:/:/g
32531 s/:@srcdir@:/:/g
32532 s/^:*//
32533 s/:*$//
32534 x
32535 s/\(=[ ]*\).*/\1/
32536 G
32537 s/\n//
32538 s/^[^=]*=[ ]*$//
32539 }'
32540 fi
32541
32542 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32543 fi # test -n "$CONFIG_FILES"
32544
32545 # Set up the scripts for CONFIG_HEADERS section.
32546 # No need to generate them if there are no CONFIG_HEADERS.
32547 # This happens for instance with `./config.status Makefile'.
32548 if test -n "$CONFIG_HEADERS"; then
32549 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
32550 BEGIN {
32551 _ACEOF
32552
32553 # Transform confdefs.h into an awk script `defines.awk', embedded as
32554 # here-document in config.status, that substitutes the proper values into
32555 # config.h.in to produce config.h.
32556
32557 # Create a delimiter string that does not exist in confdefs.h, to ease
32558 # handling of long lines.
32559 ac_delim='%!_!# '
32560 for ac_last_try in false false :; do
32561 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
32562 if test -z "$ac_tt"; then
32563 break
32564 elif $ac_last_try; then
32565 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
32566 else
32567 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
32568 fi
32569 done
32570
32571 # For the awk script, D is an array of macro values keyed by name,
32572 # likewise P contains macro parameters if any. Preserve backslash
32573 # newline sequences.
32574
32575 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
32576 sed -n '
32577 s/.\{148\}/&'"$ac_delim"'/g
32578 t rset
32579 :rset
32580 s/^[ ]*#[ ]*define[ ][ ]*/ /
32581 t def
32582 d
32583 :def
32584 s/\\$//
32585 t bsnl
32586 s/["\\]/\\&/g
32587 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
32588 D["\1"]=" \3"/p
32589 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
32590 d
32591 :bsnl
32592 s/["\\]/\\&/g
32593 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
32594 D["\1"]=" \3\\\\\\n"\\/p
32595 t cont
32596 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
32597 t cont
32598 d
32599 :cont
32600 n
32601 s/.\{148\}/&'"$ac_delim"'/g
32602 t clear
32603 :clear
32604 s/\\$//
32605 t bsnlc
32606 s/["\\]/\\&/g; s/^/"/; s/$/"/p
32607 d
32608 :bsnlc
32609 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
32610 b cont
32611 ' <confdefs.h | sed '
32612 s/'"$ac_delim"'/"\\\
32613 "/g' >>$CONFIG_STATUS || ac_write_fail=1
32614
32615 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32616 for (key in D) D_is_set[key] = 1
32617 FS = "\a"
32618 }
32619 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
32620 line = \$ 0
32621 split(line, arg, " ")
32622 if (arg[1] == "#") {
32623 defundef = arg[2]
32624 mac1 = arg[3]
32625 } else {
32626 defundef = substr(arg[1], 2)
32627 mac1 = arg[2]
32628 }
32629 split(mac1, mac2, "(") #)
32630 macro = mac2[1]
32631 prefix = substr(line, 1, index(line, defundef) - 1)
32632 if (D_is_set[macro]) {
32633 # Preserve the white space surrounding the "#".
32634 print prefix "define", macro P[macro] D[macro]
32635 next
32636 } else {
32637 # Replace #undef with comments. This is necessary, for example,
32638 # in the case of _POSIX_SOURCE, which is predefined and required
32639 # on some systems where configure will not decide to define it.
32640 if (defundef == "undef") {
32641 print "/*", prefix defundef, macro, "*/"
32642 next
32643 }
32644 }
32645 }
32646 { print }
32647 _ACAWK
32648 _ACEOF
32649 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32650 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
32651 fi # test -n "$CONFIG_HEADERS"
32652
32653
32654 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
32655 shift
32656 for ac_tag
32657 do
32658 case $ac_tag in
32659 :[FHLC]) ac_mode=$ac_tag; continue;;
32660 esac
32661 case $ac_mode$ac_tag in
32662 :[FHL]*:*);;
32663 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
32664 :[FH]-) ac_tag=-:-;;
32665 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
32666 esac
32667 ac_save_IFS=$IFS
32668 IFS=:
32669 set x $ac_tag
32670 IFS=$ac_save_IFS
32671 shift
32672 ac_file=$1
32673 shift
32674
32675 case $ac_mode in
32676 :L) ac_source=$1;;
32677 :[FH])
32678 ac_file_inputs=
32679 for ac_f
32680 do
32681 case $ac_f in
32682 -) ac_f="$ac_tmp/stdin";;
32683 *) # Look for the file first in the build tree, then in the source tree
32684 # (if the path is not absolute). The absolute path cannot be DOS-style,
32685 # because $ac_f cannot contain `:'.
32686 test -f "$ac_f" ||
32687 case $ac_f in
32688 [\\/$]*) false;;
32689 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
32690 esac ||
32691 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
32692 esac
32693 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
32694 as_fn_append ac_file_inputs " '$ac_f'"
32695 done
32696
32697 # Let's still pretend it is `configure' which instantiates (i.e., don't
32698 # use $as_me), people would be surprised to read:
32699 # /* config.h. Generated by config.status. */
32700 configure_input='Generated from '`
32701 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
32702 `' by configure.'
32703 if test x"$ac_file" != x-; then
32704 configure_input="$ac_file. $configure_input"
32705 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
32706 $as_echo "$as_me: creating $ac_file" >&6;}
32707 fi
32708 # Neutralize special characters interpreted by sed in replacement strings.
32709 case $configure_input in #(
32710 *\&* | *\|* | *\\* )
32711 ac_sed_conf_input=`$as_echo "$configure_input" |
32712 sed 's/[\\\\&|]/\\\\&/g'`;; #(
32713 *) ac_sed_conf_input=$configure_input;;
32714 esac
32715
32716 case $ac_tag in
32717 *:-:* | *:-) cat >"$ac_tmp/stdin" \
32718 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
32719 esac
32720 ;;
32721 esac
32722
32723 ac_dir=`$as_dirname -- "$ac_file" ||
32724 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32725 X"$ac_file" : 'X\(//\)[^/]' \| \
32726 X"$ac_file" : 'X\(//\)$' \| \
32727 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
32728 $as_echo X"$ac_file" |
32729 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32730 s//\1/
32731 q
32732 }
32733 /^X\(\/\/\)[^/].*/{
32734 s//\1/
32735 q
32736 }
32737 /^X\(\/\/\)$/{
32738 s//\1/
32739 q
32740 }
32741 /^X\(\/\).*/{
32742 s//\1/
32743 q
32744 }
32745 s/.*/./; q'`
32746 as_dir="$ac_dir"; as_fn_mkdir_p
32747 ac_builddir=.
32748
32749 case "$ac_dir" in
32750 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
32751 *)
32752 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
32753 # A ".." for each directory in $ac_dir_suffix.
32754 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
32755 case $ac_top_builddir_sub in
32756 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
32757 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
32758 esac ;;
32759 esac
32760 ac_abs_top_builddir=$ac_pwd
32761 ac_abs_builddir=$ac_pwd$ac_dir_suffix
32762 # for backward compatibility:
32763 ac_top_builddir=$ac_top_build_prefix
32764
32765 case $srcdir in
32766 .) # We are building in place.
32767 ac_srcdir=.
32768 ac_top_srcdir=$ac_top_builddir_sub
32769 ac_abs_top_srcdir=$ac_pwd ;;
32770 [\\/]* | ?:[\\/]* ) # Absolute name.
32771 ac_srcdir=$srcdir$ac_dir_suffix;
32772 ac_top_srcdir=$srcdir
32773 ac_abs_top_srcdir=$srcdir ;;
32774 *) # Relative name.
32775 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
32776 ac_top_srcdir=$ac_top_build_prefix$srcdir
32777 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
32778 esac
32779 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
32780
32781
32782 case $ac_mode in
32783 :F)
32784 #
32785 # CONFIG_FILE
32786 #
32787
32788 case $INSTALL in
32789 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
32790 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
32791 esac
32792 ac_MKDIR_P=$MKDIR_P
32793 case $MKDIR_P in
32794 [\\/$]* | ?:[\\/]* ) ;;
32795 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
32796 esac
32797 _ACEOF
32798
32799 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32800 # If the template does not know about datarootdir, expand it.
32801 # FIXME: This hack should be removed a few years after 2.60.
32802 ac_datarootdir_hack=; ac_datarootdir_seen=
32803 ac_sed_dataroot='
32804 /datarootdir/ {
32805 p
32806 q
32807 }
32808 /@datadir@/p
32809 /@docdir@/p
32810 /@infodir@/p
32811 /@localedir@/p
32812 /@mandir@/p'
32813 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
32814 *datarootdir*) ac_datarootdir_seen=yes;;
32815 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
32816 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
32817 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
32818 _ACEOF
32819 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32820 ac_datarootdir_hack='
32821 s&@datadir@&$datadir&g
32822 s&@docdir@&$docdir&g
32823 s&@infodir@&$infodir&g
32824 s&@localedir@&$localedir&g
32825 s&@mandir@&$mandir&g
32826 s&\\\${datarootdir}&$datarootdir&g' ;;
32827 esac
32828 _ACEOF
32829
32830 # Neutralize VPATH when `$srcdir' = `.'.
32831 # Shell code in configure.ac might set extrasub.
32832 # FIXME: do we really want to maintain this feature?
32833 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32834 ac_sed_extra="$ac_vpsub
32835 $extrasub
32836 _ACEOF
32837 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32838 :t
32839 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
32840 s|@configure_input@|$ac_sed_conf_input|;t t
32841 s&@top_builddir@&$ac_top_builddir_sub&;t t
32842 s&@top_build_prefix@&$ac_top_build_prefix&;t t
32843 s&@srcdir@&$ac_srcdir&;t t
32844 s&@abs_srcdir@&$ac_abs_srcdir&;t t
32845 s&@top_srcdir@&$ac_top_srcdir&;t t
32846 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
32847 s&@builddir@&$ac_builddir&;t t
32848 s&@abs_builddir@&$ac_abs_builddir&;t t
32849 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
32850 s&@INSTALL@&$ac_INSTALL&;t t
32851 s&@MKDIR_P@&$ac_MKDIR_P&;t t
32852 $ac_datarootdir_hack
32853 "
32854 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
32855 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32856
32857 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
32858 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
32859 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
32860 "$ac_tmp/out"`; test -z "$ac_out"; } &&
32861 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
32862 which seems to be undefined. Please make sure it is defined" >&5
32863 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
32864 which seems to be undefined. Please make sure it is defined" >&2;}
32865
32866 rm -f "$ac_tmp/stdin"
32867 case $ac_file in
32868 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
32869 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
32870 esac \
32871 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32872 ;;
32873 :H)
32874 #
32875 # CONFIG_HEADER
32876 #
32877 if test x"$ac_file" != x-; then
32878 {
32879 $as_echo "/* $configure_input */" \
32880 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
32881 } >"$ac_tmp/config.h" \
32882 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32883 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
32884 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
32885 $as_echo "$as_me: $ac_file is unchanged" >&6;}
32886 else
32887 rm -f "$ac_file"
32888 mv "$ac_tmp/config.h" "$ac_file" \
32889 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32890 fi
32891 else
32892 $as_echo "/* $configure_input */" \
32893 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
32894 || as_fn_error $? "could not create -" "$LINENO" 5
32895 fi
32896 # Compute "$ac_file"'s index in $config_headers.
32897 _am_arg="$ac_file"
32898 _am_stamp_count=1
32899 for _am_header in $config_headers :; do
32900 case $_am_header in
32901 $_am_arg | $_am_arg:* )
32902 break ;;
32903 * )
32904 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
32905 esac
32906 done
32907 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
32908 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32909 X"$_am_arg" : 'X\(//\)[^/]' \| \
32910 X"$_am_arg" : 'X\(//\)$' \| \
32911 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
32912 $as_echo X"$_am_arg" |
32913 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32914 s//\1/
32915 q
32916 }
32917 /^X\(\/\/\)[^/].*/{
32918 s//\1/
32919 q
32920 }
32921 /^X\(\/\/\)$/{
32922 s//\1/
32923 q
32924 }
32925 /^X\(\/\).*/{
32926 s//\1/
32927 q
32928 }
32929 s/.*/./; q'`/stamp-h$_am_stamp_count
32930 ;;
32931
32932 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
32933 $as_echo "$as_me: executing $ac_file commands" >&6;}
32934 ;;
32935 esac
32936
32937
32938 case $ac_file$ac_mode in
32939 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
32940 # Older Autoconf quotes --file arguments for eval, but not when files
32941 # are listed without --file. Let's play safe and only enable the eval
32942 # if we detect the quoting.
32943 case $CONFIG_FILES in
32944 *\'*) eval set x "$CONFIG_FILES" ;;
32945 *) set x $CONFIG_FILES ;;
32946 esac
32947 shift
32948 for mf
32949 do
32950 # Strip MF so we end up with the name of the file.
32951 mf=`echo "$mf" | sed -e 's/:.*$//'`
32952 # Check whether this is an Automake generated Makefile or not.
32953 # We used to match only the files named 'Makefile.in', but
32954 # some people rename them; so instead we look at the file content.
32955 # Grep'ing the first line is not enough: some people post-process
32956 # each Makefile.in and add a new line on top of each file to say so.
32957 # Grep'ing the whole file is not good either: AIX grep has a line
32958 # limit of 2048, but all sed's we know have understand at least 4000.
32959 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
32960 dirpart=`$as_dirname -- "$mf" ||
32961 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32962 X"$mf" : 'X\(//\)[^/]' \| \
32963 X"$mf" : 'X\(//\)$' \| \
32964 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
32965 $as_echo X"$mf" |
32966 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32967 s//\1/
32968 q
32969 }
32970 /^X\(\/\/\)[^/].*/{
32971 s//\1/
32972 q
32973 }
32974 /^X\(\/\/\)$/{
32975 s//\1/
32976 q
32977 }
32978 /^X\(\/\).*/{
32979 s//\1/
32980 q
32981 }
32982 s/.*/./; q'`
32983 else
32984 continue
32985 fi
32986 # Extract the definition of DEPDIR, am__include, and am__quote
32987 # from the Makefile without running 'make'.
32988 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
32989 test -z "$DEPDIR" && continue
32990 am__include=`sed -n 's/^am__include = //p' < "$mf"`
32991 test -z "$am__include" && continue
32992 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
32993 # Find all dependency output files, they are included files with
32994 # $(DEPDIR) in their names. We invoke sed twice because it is the
32995 # simplest approach to changing $(DEPDIR) to its actual value in the
32996 # expansion.
32997 for file in `sed -n "
32998 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
32999 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
33000 # Make sure the directory exists.
33001 test -f "$dirpart/$file" && continue
33002 fdir=`$as_dirname -- "$file" ||
33003 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
33004 X"$file" : 'X\(//\)[^/]' \| \
33005 X"$file" : 'X\(//\)$' \| \
33006 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
33007 $as_echo X"$file" |
33008 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
33009 s//\1/
33010 q
33011 }
33012 /^X\(\/\/\)[^/].*/{
33013 s//\1/
33014 q
33015 }
33016 /^X\(\/\/\)$/{
33017 s//\1/
33018 q
33019 }
33020 /^X\(\/\).*/{
33021 s//\1/
33022 q
33023 }
33024 s/.*/./; q'`
33025 as_dir=$dirpart/$fdir; as_fn_mkdir_p
33026 # echo "creating $dirpart/$file"
33027 echo '# dummy' > "$dirpart/$file"
33028 done
33029 done
33030 }
33031 ;;
33032 "default":C)
33033 case x$CONFIG_HEADERS in
33034 xconfig.h:config.in)
33035 echo > stamp-h ;;
33036 esac
33037 ;;
33038
33039 esac
33040 done # for ac_tag
33041
33042
33043 as_fn_exit 0
33044 _ACEOF
33045 ac_clean_files=$ac_clean_files_save
33046
33047 test $ac_write_fail = 0 ||
33048 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
33049
33050
33051 # configure is writing to config.log, and then calls config.status.
33052 # config.status does its own redirection, appending to config.log.
33053 # Unfortunately, on DOS this fails, as config.log is still kept open
33054 # by configure, so config.status won't be able to write to it; its
33055 # output is simply discarded. So we exec the FD to /dev/null,
33056 # effectively closing config.log, so it can be properly (re)opened and
33057 # appended to by config.status. When coming back to configure, we
33058 # need to make the FD available again.
33059 if test "$no_create" != yes; then
33060 ac_cs_success=:
33061 ac_config_status_args=
33062 test "$silent" = yes &&
33063 ac_config_status_args="$ac_config_status_args --quiet"
33064 exec 5>/dev/null
33065 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
33066 exec 5>>config.log
33067 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
33068 # would make configure fail if this is the last instruction.
33069 $ac_cs_success || as_fn_exit 1
33070 fi
33071 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
33072 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
33073 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
33074 fi
33075
33076
33077 exit 0
This page took 1.006574 seconds and 5 git commands to generate.