gnulib: import netdb
[deliverable/binutils-gdb.git] / gnulib / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for libgnu UNUSED-VERSION.
4 #
5 #
6 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
7 #
8 #
9 # This configure script is free software; the Free Software Foundation
10 # gives unlimited permission to copy, distribute and modify it.
11 ## -------------------- ##
12 ## M4sh Initialization. ##
13 ## -------------------- ##
14
15 # Be more Bourne compatible
16 DUALCASE=1; export DUALCASE # for MKS sh
17 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
18 emulate sh
19 NULLCMD=:
20 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
21 # is contrary to our usage. Disable this feature.
22 alias -g '${1+"$@"}'='"$@"'
23 setopt NO_GLOB_SUBST
24 else
25 case `(set -o) 2>/dev/null` in #(
26 *posix*) :
27 set -o posix ;; #(
28 *) :
29 ;;
30 esac
31 fi
32
33
34 as_nl='
35 '
36 export as_nl
37 # Printing a long string crashes Solaris 7 /usr/bin/printf.
38 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41 # Prefer a ksh shell builtin over an external printf program on Solaris,
42 # but without wasting forks for bash or zsh.
43 if test -z "$BASH_VERSION$ZSH_VERSION" \
44 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45 as_echo='print -r --'
46 as_echo_n='print -rn --'
47 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='printf %s\n'
49 as_echo_n='printf %s'
50 else
51 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53 as_echo_n='/usr/ucb/echo -n'
54 else
55 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56 as_echo_n_body='eval
57 arg=$1;
58 case $arg in #(
59 *"$as_nl"*)
60 expr "X$arg" : "X\\(.*\\)$as_nl";
61 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62 esac;
63 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64 '
65 export as_echo_n_body
66 as_echo_n='sh -c $as_echo_n_body as_echo'
67 fi
68 export as_echo_body
69 as_echo='sh -c $as_echo_body as_echo'
70 fi
71
72 # The user is always right.
73 if test "${PATH_SEPARATOR+set}" != set; then
74 PATH_SEPARATOR=:
75 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77 PATH_SEPARATOR=';'
78 }
79 fi
80
81
82 # IFS
83 # We need space, tab and new line, in precisely that order. Quoting is
84 # there to prevent editors from complaining about space-tab.
85 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
86 # splitting by setting IFS to empty value.)
87 IFS=" "" $as_nl"
88
89 # Find who we are. Look in the path if we contain no directory separator.
90 as_myself=
91 case $0 in #((
92 *[\\/]* ) as_myself=$0 ;;
93 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
94 for as_dir in $PATH
95 do
96 IFS=$as_save_IFS
97 test -z "$as_dir" && as_dir=.
98 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
99 done
100 IFS=$as_save_IFS
101
102 ;;
103 esac
104 # We did not find ourselves, most probably we were run as `sh COMMAND'
105 # in which case we are not to be found in the path.
106 if test "x$as_myself" = x; then
107 as_myself=$0
108 fi
109 if test ! -f "$as_myself"; then
110 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
111 exit 1
112 fi
113
114 # Unset variables that we do not need and which cause bugs (e.g. in
115 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
116 # suppresses any "Segmentation fault" message there. '((' could
117 # trigger a bug in pdksh 5.2.14.
118 for as_var in BASH_ENV ENV MAIL MAILPATH
119 do eval test x\${$as_var+set} = xset \
120 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
121 done
122 PS1='$ '
123 PS2='> '
124 PS4='+ '
125
126 # NLS nuisances.
127 LC_ALL=C
128 export LC_ALL
129 LANGUAGE=C
130 export LANGUAGE
131
132 # CDPATH.
133 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
134
135 # Use a proper internal environment variable to ensure we don't fall
136 # into an infinite loop, continuously re-executing ourselves.
137 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
138 _as_can_reexec=no; export _as_can_reexec;
139 # We cannot yet assume a decent shell, so we have to provide a
140 # neutralization value for shells without unset; and this also
141 # works around shells that cannot unset nonexistent variables.
142 # Preserve -v and -x to the replacement shell.
143 BASH_ENV=/dev/null
144 ENV=/dev/null
145 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
146 case $- in # ((((
147 *v*x* | *x*v* ) as_opts=-vx ;;
148 *v* ) as_opts=-v ;;
149 *x* ) as_opts=-x ;;
150 * ) as_opts= ;;
151 esac
152 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
153 # Admittedly, this is quite paranoid, since all the known shells bail
154 # out after a failed `exec'.
155 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
156 as_fn_exit 255
157 fi
158 # We don't want this to propagate to other subprocesses.
159 { _as_can_reexec=; unset _as_can_reexec;}
160 if test "x$CONFIG_SHELL" = x; then
161 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
162 emulate sh
163 NULLCMD=:
164 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
165 # is contrary to our usage. Disable this feature.
166 alias -g '\${1+\"\$@\"}'='\"\$@\"'
167 setopt NO_GLOB_SUBST
168 else
169 case \`(set -o) 2>/dev/null\` in #(
170 *posix*) :
171 set -o posix ;; #(
172 *) :
173 ;;
174 esac
175 fi
176 "
177 as_required="as_fn_return () { (exit \$1); }
178 as_fn_success () { as_fn_return 0; }
179 as_fn_failure () { as_fn_return 1; }
180 as_fn_ret_success () { return 0; }
181 as_fn_ret_failure () { return 1; }
182
183 exitcode=0
184 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
185 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
186 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
187 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
188 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
189
190 else
191 exitcode=1; echo positional parameters were not saved.
192 fi
193 test x\$exitcode = x0 || exit 1
194 test -x / || exit 1"
195 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
196 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
197 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
198 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
199 test \$(( 1 + 1 )) = 2 || exit 1"
200 if (eval "$as_required") 2>/dev/null; then :
201 as_have_required=yes
202 else
203 as_have_required=no
204 fi
205 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
206
207 else
208 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
209 as_found=false
210 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
211 do
212 IFS=$as_save_IFS
213 test -z "$as_dir" && as_dir=.
214 as_found=:
215 case $as_dir in #(
216 /*)
217 for as_base in sh bash ksh sh5; do
218 # Try only shells that exist, to save several forks.
219 as_shell=$as_dir/$as_base
220 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
221 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
222 CONFIG_SHELL=$as_shell as_have_required=yes
223 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 break 2
225 fi
226 fi
227 done;;
228 esac
229 as_found=false
230 done
231 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
232 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
233 CONFIG_SHELL=$SHELL as_have_required=yes
234 fi; }
235 IFS=$as_save_IFS
236
237
238 if test "x$CONFIG_SHELL" != x; then :
239 export CONFIG_SHELL
240 # We cannot yet assume a decent shell, so we have to provide a
241 # neutralization value for shells without unset; and this also
242 # works around shells that cannot unset nonexistent variables.
243 # Preserve -v and -x to the replacement shell.
244 BASH_ENV=/dev/null
245 ENV=/dev/null
246 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247 case $- in # ((((
248 *v*x* | *x*v* ) as_opts=-vx ;;
249 *v* ) as_opts=-v ;;
250 *x* ) as_opts=-x ;;
251 * ) as_opts= ;;
252 esac
253 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
254 # Admittedly, this is quite paranoid, since all the known shells bail
255 # out after a failed `exec'.
256 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
257 exit 255
258 fi
259
260 if test x$as_have_required = xno; then :
261 $as_echo "$0: This script requires a shell more modern than all"
262 $as_echo "$0: the shells that I found on your system."
263 if test x${ZSH_VERSION+set} = xset ; then
264 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
265 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
266 else
267 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
268 $0: including any error possibly output before this
269 $0: message. Then install a modern shell, or manually run
270 $0: the script under such a shell if you do have one."
271 fi
272 exit 1
273 fi
274 fi
275 fi
276 SHELL=${CONFIG_SHELL-/bin/sh}
277 export SHELL
278 # Unset more variables known to interfere with behavior of common tools.
279 CLICOLOR_FORCE= GREP_OPTIONS=
280 unset CLICOLOR_FORCE GREP_OPTIONS
281
282 ## --------------------- ##
283 ## M4sh Shell Functions. ##
284 ## --------------------- ##
285 # as_fn_unset VAR
286 # ---------------
287 # Portably unset VAR.
288 as_fn_unset ()
289 {
290 { eval $1=; unset $1;}
291 }
292 as_unset=as_fn_unset
293
294 # as_fn_set_status STATUS
295 # -----------------------
296 # Set $? to STATUS, without forking.
297 as_fn_set_status ()
298 {
299 return $1
300 } # as_fn_set_status
301
302 # as_fn_exit STATUS
303 # -----------------
304 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
305 as_fn_exit ()
306 {
307 set +e
308 as_fn_set_status $1
309 exit $1
310 } # as_fn_exit
311
312 # as_fn_mkdir_p
313 # -------------
314 # Create "$as_dir" as a directory, including parents if necessary.
315 as_fn_mkdir_p ()
316 {
317
318 case $as_dir in #(
319 -*) as_dir=./$as_dir;;
320 esac
321 test -d "$as_dir" || eval $as_mkdir_p || {
322 as_dirs=
323 while :; do
324 case $as_dir in #(
325 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
326 *) as_qdir=$as_dir;;
327 esac
328 as_dirs="'$as_qdir' $as_dirs"
329 as_dir=`$as_dirname -- "$as_dir" ||
330 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
331 X"$as_dir" : 'X\(//\)[^/]' \| \
332 X"$as_dir" : 'X\(//\)$' \| \
333 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
334 $as_echo X"$as_dir" |
335 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
336 s//\1/
337 q
338 }
339 /^X\(\/\/\)[^/].*/{
340 s//\1/
341 q
342 }
343 /^X\(\/\/\)$/{
344 s//\1/
345 q
346 }
347 /^X\(\/\).*/{
348 s//\1/
349 q
350 }
351 s/.*/./; q'`
352 test -d "$as_dir" && break
353 done
354 test -z "$as_dirs" || eval "mkdir $as_dirs"
355 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
356
357
358 } # as_fn_mkdir_p
359
360 # as_fn_executable_p FILE
361 # -----------------------
362 # Test if FILE is an executable regular file.
363 as_fn_executable_p ()
364 {
365 test -f "$1" && test -x "$1"
366 } # as_fn_executable_p
367 # as_fn_append VAR VALUE
368 # ----------------------
369 # Append the text in VALUE to the end of the definition contained in VAR. Take
370 # advantage of any shell optimizations that allow amortized linear growth over
371 # repeated appends, instead of the typical quadratic growth present in naive
372 # implementations.
373 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
374 eval 'as_fn_append ()
375 {
376 eval $1+=\$2
377 }'
378 else
379 as_fn_append ()
380 {
381 eval $1=\$$1\$2
382 }
383 fi # as_fn_append
384
385 # as_fn_arith ARG...
386 # ------------------
387 # Perform arithmetic evaluation on the ARGs, and store the result in the
388 # global $as_val. Take advantage of shells that can avoid forks. The arguments
389 # must be portable across $(()) and expr.
390 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
391 eval 'as_fn_arith ()
392 {
393 as_val=$(( $* ))
394 }'
395 else
396 as_fn_arith ()
397 {
398 as_val=`expr "$@" || test $? -eq 1`
399 }
400 fi # as_fn_arith
401
402
403 # as_fn_error STATUS ERROR [LINENO LOG_FD]
404 # ----------------------------------------
405 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
406 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
407 # script with STATUS, using 1 if that was 0.
408 as_fn_error ()
409 {
410 as_status=$1; test $as_status -eq 0 && as_status=1
411 if test "$4"; then
412 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
413 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
414 fi
415 $as_echo "$as_me: error: $2" >&2
416 as_fn_exit $as_status
417 } # as_fn_error
418
419 if expr a : '\(a\)' >/dev/null 2>&1 &&
420 test "X`expr 00001 : '.*\(...\)'`" = X001; then
421 as_expr=expr
422 else
423 as_expr=false
424 fi
425
426 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
427 as_basename=basename
428 else
429 as_basename=false
430 fi
431
432 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
433 as_dirname=dirname
434 else
435 as_dirname=false
436 fi
437
438 as_me=`$as_basename -- "$0" ||
439 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
440 X"$0" : 'X\(//\)$' \| \
441 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
442 $as_echo X/"$0" |
443 sed '/^.*\/\([^/][^/]*\)\/*$/{
444 s//\1/
445 q
446 }
447 /^X\/\(\/\/\)$/{
448 s//\1/
449 q
450 }
451 /^X\/\(\/\).*/{
452 s//\1/
453 q
454 }
455 s/.*/./; q'`
456
457 # Avoid depending upon Character Ranges.
458 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
459 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
460 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
461 as_cr_digits='0123456789'
462 as_cr_alnum=$as_cr_Letters$as_cr_digits
463
464
465 as_lineno_1=$LINENO as_lineno_1a=$LINENO
466 as_lineno_2=$LINENO as_lineno_2a=$LINENO
467 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
468 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
469 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
470 sed -n '
471 p
472 /[$]LINENO/=
473 ' <$as_myself |
474 sed '
475 s/[$]LINENO.*/&-/
476 t lineno
477 b
478 :lineno
479 N
480 :loop
481 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
482 t loop
483 s/-\n.*//
484 ' >$as_me.lineno &&
485 chmod +x "$as_me.lineno" ||
486 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
487
488 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
489 # already done that, so ensure we don't try to do so again and fall
490 # in an infinite loop. This has already happened in practice.
491 _as_can_reexec=no; export _as_can_reexec
492 # Don't try to exec as it changes $[0], causing all sort of problems
493 # (the dirname of $[0] is not the place where we might find the
494 # original and so on. Autoconf is especially sensitive to this).
495 . "./$as_me.lineno"
496 # Exit status is that of the last command.
497 exit
498 }
499
500 ECHO_C= ECHO_N= ECHO_T=
501 case `echo -n x` in #(((((
502 -n*)
503 case `echo 'xy\c'` in
504 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
505 xy) ECHO_C='\c';;
506 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
507 ECHO_T=' ';;
508 esac;;
509 *)
510 ECHO_N='-n';;
511 esac
512
513 rm -f conf$$ conf$$.exe conf$$.file
514 if test -d conf$$.dir; then
515 rm -f conf$$.dir/conf$$.file
516 else
517 rm -f conf$$.dir
518 mkdir conf$$.dir 2>/dev/null
519 fi
520 if (echo >conf$$.file) 2>/dev/null; then
521 if ln -s conf$$.file conf$$ 2>/dev/null; then
522 as_ln_s='ln -s'
523 # ... but there are two gotchas:
524 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
525 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
526 # In both cases, we have to default to `cp -pR'.
527 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
528 as_ln_s='cp -pR'
529 elif ln conf$$.file conf$$ 2>/dev/null; then
530 as_ln_s=ln
531 else
532 as_ln_s='cp -pR'
533 fi
534 else
535 as_ln_s='cp -pR'
536 fi
537 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538 rmdir conf$$.dir 2>/dev/null
539
540 if mkdir -p . 2>/dev/null; then
541 as_mkdir_p='mkdir -p "$as_dir"'
542 else
543 test -d ./-p && rmdir ./-p
544 as_mkdir_p=false
545 fi
546
547 as_test_x='test -x'
548 as_executable_p=as_fn_executable_p
549
550 # Sed expression to map a string onto a valid CPP name.
551 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
552
553 # Sed expression to map a string onto a valid variable name.
554 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
555
556
557 test -n "$DJDIR" || exec 7<&0 </dev/null
558 exec 6>&1
559
560 # Name of the host.
561 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
562 # so uname gets run too.
563 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
564
565 #
566 # Initializations.
567 #
568 ac_default_prefix=/usr/local
569 ac_clean_files=
570 ac_config_libobj_dir=.
571 LIBOBJS=
572 cross_compiling=no
573 subdirs=
574 MFLAGS=
575 MAKEFLAGS=
576
577 # Identity of this package.
578 PACKAGE_NAME='libgnu'
579 PACKAGE_TARNAME='libgnu'
580 PACKAGE_VERSION='UNUSED-VERSION'
581 PACKAGE_STRING='libgnu UNUSED-VERSION'
582 PACKAGE_BUGREPORT=''
583 PACKAGE_URL=''
584
585 ac_unique_file="import/memmem.c"
586 ac_header_list=
587 # Factoring default headers for most tests.
588 ac_includes_default="\
589 #include <stdio.h>
590 #ifdef HAVE_SYS_TYPES_H
591 # include <sys/types.h>
592 #endif
593 #ifdef HAVE_SYS_STAT_H
594 # include <sys/stat.h>
595 #endif
596 #ifdef STDC_HEADERS
597 # include <stdlib.h>
598 # include <stddef.h>
599 #else
600 # ifdef HAVE_STDLIB_H
601 # include <stdlib.h>
602 # endif
603 #endif
604 #ifdef HAVE_STRING_H
605 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
606 # include <memory.h>
607 # endif
608 # include <string.h>
609 #endif
610 #ifdef HAVE_STRINGS_H
611 # include <strings.h>
612 #endif
613 #ifdef HAVE_INTTYPES_H
614 # include <inttypes.h>
615 #endif
616 #ifdef HAVE_STDINT_H
617 # include <stdint.h>
618 #endif
619 #ifdef HAVE_UNISTD_H
620 # include <unistd.h>
621 #endif"
622
623 gl_use_threads_default=
624 gl_use_winpthreads_default=
625 ac_func_list=
626 gl_fnmatch_required=POSIX
627 ac_subst_vars='am__EXEEXT_FALSE
628 am__EXEEXT_TRUE
629 gltests_LTLIBOBJS
630 gltests_LIBOBJS
631 gl_LTLIBOBJS
632 gl_LIBOBJS
633 LTLIBOBJS
634 LIBOBJS
635 LN_S
636 AM_BACKSLASH
637 AM_DEFAULT_VERBOSITY
638 AM_DEFAULT_V
639 AM_V
640 am__fastdepCC_FALSE
641 am__fastdepCC_TRUE
642 CCDEPMODE
643 am__nodep
644 AMDEPBACKSLASH
645 AMDEP_FALSE
646 AMDEP_TRUE
647 am__quote
648 am__include
649 DEPDIR
650 am__untar
651 am__tar
652 AMTAR
653 am__leading_dot
654 SET_MAKE
655 AWK
656 mkdir_p
657 INSTALL_STRIP_PROGRAM
658 STRIP
659 install_sh
660 MAKEINFO
661 AUTOHEADER
662 AUTOMAKE
663 AUTOCONF
664 ACLOCAL
665 VERSION
666 PACKAGE
667 CYGPATH_W
668 am__isrc
669 INSTALL_DATA
670 INSTALL_SCRIPT
671 INSTALL_PROGRAM
672 LIBGNU_LTLIBDEPS
673 LIBGNU_LIBDEPS
674 gltests_WITNESS
675 REPLACE_TOWLOWER
676 REPLACE_ISWCNTRL
677 HAVE_WCTYPE_H
678 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
679 NEXT_WCTYPE_H
680 HAVE_ISWCNTRL
681 REPLACE_ISWXDIGIT
682 REPLACE_ISWDIGIT
683 REPLACE_ISWBLANK
684 HAVE_WCTRANS_T
685 HAVE_WCTYPE_T
686 HAVE_ISWBLANK
687 GNULIB_TOWCTRANS
688 GNULIB_WCTRANS
689 GNULIB_ISWCTYPE
690 GNULIB_WCTYPE
691 GNULIB_ISWXDIGIT
692 GNULIB_ISWDIGIT
693 GNULIB_ISWBLANK
694 HAVE_CRTDEFS_H
695 HAVE_WINT_T
696 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
697 NEXT_WCHAR_H
698 HAVE_UNISTD_H
699 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
700 NEXT_UNISTD_H
701 TIME_H_DEFINES_TIME_UTC
702 UNISTD_H_DEFINES_STRUCT_TIMESPEC
703 PTHREAD_H_DEFINES_STRUCT_TIMESPEC
704 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
705 TIME_H_DEFINES_STRUCT_TIMESPEC
706 NEXT_AS_FIRST_DIRECTIVE_TIME_H
707 NEXT_TIME_H
708 REPLACE_LOCALTIME
709 REPLACE_GMTIME
710 REPLACE_TZSET
711 REPLACE_TIMEGM
712 REPLACE_STRFTIME
713 REPLACE_NANOSLEEP
714 REPLACE_MKTIME
715 REPLACE_LOCALTIME_R
716 REPLACE_CTIME
717 HAVE_TIMEZONE_T
718 HAVE_TIMESPEC_GET
719 HAVE_TIMEGM
720 HAVE_STRPTIME
721 HAVE_NANOSLEEP
722 HAVE_DECL_LOCALTIME_R
723 GNULIB_MDA_TZSET
724 GNULIB_TZSET
725 GNULIB_TIME_RZ
726 GNULIB_TIME_R
727 GNULIB_TIMESPEC_GET
728 GNULIB_TIMEGM
729 GNULIB_STRPTIME
730 GNULIB_STRFTIME
731 GNULIB_NANOSLEEP
732 GNULIB_LOCALTIME
733 GNULIB_MKTIME
734 GNULIB_CTIME
735 HAVE_SYS_UIO_H
736 NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H
737 NEXT_SYS_UIO_H
738 WINDOWS_STAT_INODES
739 WINDOWS_64_BIT_OFF_T
740 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
741 NEXT_SYS_TYPES_H
742 HAVE_SYS_RANDOM_H
743 NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H
744 NEXT_SYS_RANDOM_H
745 HAVE_STRINGS_H
746 NEXT_AS_FIRST_DIRECTIVE_STRINGS_H
747 NEXT_STRINGS_H
748 NEXT_AS_FIRST_DIRECTIVE_STRING_H
749 NEXT_STRING_H
750 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
751 NEXT_STDLIB_H
752 NEXT_AS_FIRST_DIRECTIVE_STDIO_H
753 NEXT_STDIO_H
754 HAVE__BOOL
755 GL_GENERATE_STDBOOL_H_FALSE
756 GL_GENERATE_STDBOOL_H_TRUE
757 STDBOOL_H
758 GL_GENERATE_STDALIGN_H_FALSE
759 GL_GENERATE_STDALIGN_H_TRUE
760 STDALIGN_H
761 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
762 NEXT_SIGNAL_H
763 REPLACE_RAISE
764 REPLACE_PTHREAD_SIGMASK
765 HAVE_SIGHANDLER_T
766 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
767 HAVE_STRUCT_SIGACTION_SA_SIGACTION
768 HAVE_SIGACTION
769 HAVE_SIGINFO_T
770 HAVE_SIGSET_T
771 HAVE_RAISE
772 HAVE_PTHREAD_SIGMASK
773 HAVE_POSIX_SIGNALBLOCKING
774 GNULIB_SIGACTION
775 GNULIB_SIGPROCMASK
776 GNULIB_SIGNAL_H_SIGPIPE
777 GNULIB_RAISE
778 GNULIB_PTHREAD_SIGMASK
779 GL_GENERATE_NETINET_IN_H_FALSE
780 GL_GENERATE_NETINET_IN_H_TRUE
781 NETINET_IN_H
782 HAVE_NETINET_IN_H
783 NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H
784 NEXT_NETINET_IN_H
785 HAVE_NETDB_H
786 NEXT_AS_FIRST_DIRECTIVE_NETDB_H
787 NEXT_NETDB_H
788 REPLACE_GETADDRINFO
789 REPLACE_GAI_STRERROR
790 HAVE_DECL_GETNAMEINFO
791 HAVE_DECL_GETADDRINFO
792 HAVE_DECL_GAI_STRERROR
793 HAVE_DECL_FREEADDRINFO
794 HAVE_STRUCT_ADDRINFO
795 GNULIB_GETADDRINFO
796 UNDEFINE_STRTOK_R
797 REPLACE_STRSIGNAL
798 REPLACE_STRERRORNAME_NP
799 REPLACE_STRERROR_R
800 REPLACE_STRERROR
801 REPLACE_STRTOK_R
802 REPLACE_STRCASESTR
803 REPLACE_STRSTR
804 REPLACE_STRNLEN
805 REPLACE_STRNDUP
806 REPLACE_STRNCAT
807 REPLACE_STRDUP
808 REPLACE_STRCHRNUL
809 REPLACE_STPNCPY
810 REPLACE_MEMMEM
811 REPLACE_MEMCHR
812 REPLACE_FFSLL
813 HAVE_STRVERSCMP
814 HAVE_DECL_STRSIGNAL
815 HAVE_SIGDESCR_NP
816 HAVE_SIGABBREV_NP
817 HAVE_STRERRORNAME_NP
818 HAVE_DECL_STRERROR_R
819 HAVE_DECL_STRTOK_R
820 HAVE_STRCASESTR
821 HAVE_STRSEP
822 HAVE_STRPBRK
823 HAVE_DECL_STRNLEN
824 HAVE_DECL_STRNDUP
825 HAVE_DECL_STRDUP
826 HAVE_STRCHRNUL
827 HAVE_STPNCPY
828 HAVE_STPCPY
829 HAVE_RAWMEMCHR
830 HAVE_DECL_MEMRCHR
831 HAVE_MEMPCPY
832 HAVE_DECL_MEMMEM
833 HAVE_FFSLL
834 HAVE_FFSL
835 HAVE_EXPLICIT_BZERO
836 GNULIB_MDA_STRDUP
837 GNULIB_MDA_MEMCCPY
838 HAVE_MBSLEN
839 GNULIB_STRVERSCMP
840 GNULIB_STRSIGNAL
841 GNULIB_SIGDESCR_NP
842 GNULIB_SIGABBREV_NP
843 GNULIB_STRERRORNAME_NP
844 GNULIB_STRERROR_R
845 GNULIB_STRERROR
846 GNULIB_MBSTOK_R
847 GNULIB_MBSSEP
848 GNULIB_MBSSPN
849 GNULIB_MBSPBRK
850 GNULIB_MBSCSPN
851 GNULIB_MBSCASESTR
852 GNULIB_MBSPCASECMP
853 GNULIB_MBSNCASECMP
854 GNULIB_MBSCASECMP
855 GNULIB_MBSSTR
856 GNULIB_MBSRCHR
857 GNULIB_MBSCHR
858 GNULIB_MBSNLEN
859 GNULIB_MBSLEN
860 GNULIB_STRTOK_R
861 GNULIB_STRCASESTR
862 GNULIB_STRSTR
863 GNULIB_STRSEP
864 GNULIB_STRPBRK
865 GNULIB_STRNLEN
866 GNULIB_STRNDUP
867 GNULIB_STRNCAT
868 GNULIB_STRDUP
869 GNULIB_STRCHRNUL
870 GNULIB_STPNCPY
871 GNULIB_STPCPY
872 GNULIB_RAWMEMCHR
873 GNULIB_MEMRCHR
874 GNULIB_MEMPCPY
875 GNULIB_MEMMEM
876 GNULIB_MEMCHR
877 GNULIB_FFSLL
878 GNULIB_FFSL
879 GNULIB_EXPLICIT_BZERO
880 HAVE_VISIBILITY
881 CFLAG_VISIBILITY
882 LIB_MBRTOWC
883 LOCALE_ZH_CN
884 LOCALE_FR_UTF8
885 LOCALE_JA
886 NEXT_AS_FIRST_DIRECTIVE_MATH_H
887 NEXT_MATH_H
888 LTLIBMULTITHREAD
889 LIBMULTITHREAD
890 LTLIBTHREAD
891 LIBTHREAD
892 LIBSTDTHREAD
893 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H
894 NEXT_LOCALE_H
895 HAVE_XLOCALE_H
896 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
897 NEXT_STDDEF_H
898 GL_GENERATE_STDDEF_H_FALSE
899 GL_GENERATE_STDDEF_H_TRUE
900 STDDEF_H
901 HAVE_WCHAR_T
902 HAVE_MAX_ALIGN_T
903 REPLACE_NULL
904 REPLACE_STRUCT_LCONV
905 REPLACE_FREELOCALE
906 REPLACE_DUPLOCALE
907 REPLACE_NEWLOCALE
908 REPLACE_SETLOCALE
909 REPLACE_LOCALECONV
910 HAVE_FREELOCALE
911 HAVE_DUPLOCALE
912 HAVE_NEWLOCALE
913 GNULIB_LOCALENAME
914 GNULIB_DUPLOCALE
915 GNULIB_SETLOCALE_NULL
916 GNULIB_SETLOCALE
917 GNULIB_LOCALECONV
918 LOCALCHARSET_TESTS_ENVIRONMENT
919 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
920 NEXT_INTTYPES_H
921 UINT64_MAX_EQ_ULONG_MAX
922 UINT32_MAX_LT_UINTMAX_MAX
923 PRIPTR_PREFIX
924 INT64_MAX_EQ_LONG_MAX
925 INT32_MAX_LT_INTMAX_MAX
926 REPLACE_STRTOUMAX
927 REPLACE_STRTOIMAX
928 HAVE_IMAXDIV_T
929 HAVE_DECL_STRTOUMAX
930 HAVE_DECL_STRTOIMAX
931 HAVE_DECL_IMAXDIV
932 HAVE_DECL_IMAXABS
933 GNULIB_STRTOUMAX
934 GNULIB_STRTOIMAX
935 GNULIB_IMAXDIV
936 GNULIB_IMAXABS
937 GL_GENERATE_STDINT_H_FALSE
938 GL_GENERATE_STDINT_H_TRUE
939 STDINT_H
940 HAVE_SYS_INTTYPES_H
941 HAVE_SYS_BITYPES_H
942 HAVE_C99_STDINT_H
943 WINT_T_SUFFIX
944 WCHAR_T_SUFFIX
945 SIG_ATOMIC_T_SUFFIX
946 SIZE_T_SUFFIX
947 PTRDIFF_T_SUFFIX
948 HAVE_SIGNED_WINT_T
949 HAVE_SIGNED_WCHAR_T
950 HAVE_SIGNED_SIG_ATOMIC_T
951 BITSIZEOF_WINT_T
952 BITSIZEOF_WCHAR_T
953 BITSIZEOF_SIG_ATOMIC_T
954 BITSIZEOF_SIZE_T
955 BITSIZEOF_PTRDIFF_T
956 APPLE_UNIVERSAL_BUILD
957 HAVE_STDINT_H
958 NEXT_AS_FIRST_DIRECTIVE_STDINT_H
959 NEXT_STDINT_H
960 HAVE_SYS_TYPES_H
961 HAVE_INTTYPES_H
962 HAVE_WCHAR_H
963 GNULIB_OVERRIDES_WINT_T
964 GL_GENERATE_LIMITS_H_FALSE
965 GL_GENERATE_LIMITS_H_TRUE
966 LIMITS_H
967 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H
968 NEXT_LIMITS_H
969 HAVE_SYS_SOCKET_H
970 NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H
971 NEXT_SYS_SOCKET_H
972 HAVE_ACCEPT4
973 HAVE_SA_FAMILY_T
974 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY
975 HAVE_STRUCT_SOCKADDR_STORAGE
976 GNULIB_ACCEPT4
977 GNULIB_SHUTDOWN
978 GNULIB_SETSOCKOPT
979 GNULIB_SENDTO
980 GNULIB_RECVFROM
981 GNULIB_SEND
982 GNULIB_RECV
983 GNULIB_LISTEN
984 GNULIB_GETSOCKOPT
985 GNULIB_GETSOCKNAME
986 GNULIB_GETPEERNAME
987 GNULIB_BIND
988 GNULIB_ACCEPT
989 GNULIB_CONNECT
990 GNULIB_SOCKET
991 INET_NTOP_LIB
992 LIB_HARD_LOCALE
993 LIB_SETLOCALE_NULL
994 LIB_SCHED_YIELD
995 LIBPMULTITHREAD
996 LIBPTHREAD
997 GL_GENERATE_GLOB_H_FALSE
998 GL_GENERATE_GLOB_H_TRUE
999 GLOB_H
1000 HAVE_GLOB_H
1001 NEXT_AS_FIRST_DIRECTIVE_GLOB_H
1002 NEXT_GLOB_H
1003 REPLACE_GLOB_PATTERN_P
1004 REPLACE_GLOB
1005 HAVE_GLOB_PATTERN_P
1006 HAVE_GLOB
1007 GNULIB_GLOB
1008 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
1009 NEXT_SYS_TIME_H
1010 REPLACE_STRUCT_TIMEVAL
1011 REPLACE_GETTIMEOFDAY
1012 HAVE_SYS_TIME_H
1013 HAVE_STRUCT_TIMEVAL
1014 HAVE_GETTIMEOFDAY
1015 GNULIB_GETTIMEOFDAY
1016 LTLIBINTL
1017 LIBINTL
1018 LIB_GETRANDOM
1019 REPLACE_GETRANDOM
1020 HAVE_GETRANDOM
1021 GNULIB_GETRANDOM
1022 LIB_GETLOGIN
1023 REPLACE_VSPRINTF
1024 REPLACE_VSNPRINTF
1025 REPLACE_VPRINTF
1026 REPLACE_VFPRINTF
1027 REPLACE_VDPRINTF
1028 REPLACE_VASPRINTF
1029 REPLACE_TMPFILE
1030 REPLACE_STDIO_WRITE_FUNCS
1031 REPLACE_STDIO_READ_FUNCS
1032 REPLACE_SPRINTF
1033 REPLACE_SNPRINTF
1034 REPLACE_RENAMEAT
1035 REPLACE_RENAME
1036 REPLACE_REMOVE
1037 REPLACE_PRINTF
1038 REPLACE_POPEN
1039 REPLACE_PERROR
1040 REPLACE_OBSTACK_PRINTF
1041 REPLACE_GETLINE
1042 REPLACE_GETDELIM
1043 REPLACE_FTELLO
1044 REPLACE_FTELL
1045 REPLACE_FSEEKO
1046 REPLACE_FSEEK
1047 REPLACE_FREOPEN
1048 REPLACE_FPURGE
1049 REPLACE_FPRINTF
1050 REPLACE_FOPEN
1051 REPLACE_FFLUSH
1052 REPLACE_FDOPEN
1053 REPLACE_FCLOSE
1054 REPLACE_DPRINTF
1055 HAVE_VDPRINTF
1056 HAVE_VASPRINTF
1057 HAVE_RENAMEAT
1058 HAVE_POPEN
1059 HAVE_PCLOSE
1060 HAVE_FTELLO
1061 HAVE_FSEEKO
1062 HAVE_DPRINTF
1063 HAVE_DECL_VSNPRINTF
1064 HAVE_DECL_SNPRINTF
1065 HAVE_DECL_OBSTACK_PRINTF
1066 HAVE_DECL_GETLINE
1067 HAVE_DECL_GETDELIM
1068 HAVE_DECL_FTELLO
1069 HAVE_DECL_FSEEKO
1070 HAVE_DECL_FPURGE
1071 HAVE_DECL_FCLOSEALL
1072 GNULIB_MDA_TEMPNAM
1073 GNULIB_MDA_PUTW
1074 GNULIB_MDA_GETW
1075 GNULIB_MDA_FILENO
1076 GNULIB_MDA_FDOPEN
1077 GNULIB_MDA_FCLOSEALL
1078 GNULIB_VSPRINTF_POSIX
1079 GNULIB_VSNPRINTF
1080 GNULIB_VPRINTF_POSIX
1081 GNULIB_VPRINTF
1082 GNULIB_VFPRINTF_POSIX
1083 GNULIB_VFPRINTF
1084 GNULIB_VDPRINTF
1085 GNULIB_VSCANF
1086 GNULIB_VFSCANF
1087 GNULIB_VASPRINTF
1088 GNULIB_TMPFILE
1089 GNULIB_STDIO_H_SIGPIPE
1090 GNULIB_STDIO_H_NONBLOCKING
1091 GNULIB_SPRINTF_POSIX
1092 GNULIB_SNPRINTF
1093 GNULIB_SCANF
1094 GNULIB_RENAMEAT
1095 GNULIB_RENAME
1096 GNULIB_REMOVE
1097 GNULIB_PUTS
1098 GNULIB_PUTCHAR
1099 GNULIB_PUTC
1100 GNULIB_PRINTF_POSIX
1101 GNULIB_PRINTF
1102 GNULIB_POPEN
1103 GNULIB_PERROR
1104 GNULIB_PCLOSE
1105 GNULIB_OBSTACK_PRINTF_POSIX
1106 GNULIB_OBSTACK_PRINTF
1107 GNULIB_GETLINE
1108 GNULIB_GETDELIM
1109 GNULIB_GETCHAR
1110 GNULIB_GETC
1111 GNULIB_FWRITE
1112 GNULIB_FTELLO
1113 GNULIB_FTELL
1114 GNULIB_FSEEKO
1115 GNULIB_FSEEK
1116 GNULIB_FSCANF
1117 GNULIB_FREOPEN
1118 GNULIB_FREAD
1119 GNULIB_FPUTS
1120 GNULIB_FPUTC
1121 GNULIB_FPURGE
1122 GNULIB_FPRINTF_POSIX
1123 GNULIB_FPRINTF
1124 GNULIB_FOPEN
1125 GNULIB_FGETS
1126 GNULIB_FGETC
1127 GNULIB_FFLUSH
1128 GNULIB_FDOPEN
1129 GNULIB_FCLOSE
1130 GNULIB_DPRINTF
1131 WINDOWS_64_BIT_ST_SIZE
1132 WINDOWS_STAT_TIMESPEC
1133 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
1134 NEXT_SYS_STAT_H
1135 REPLACE_UTIMENSAT
1136 REPLACE_STAT
1137 REPLACE_MKNODAT
1138 REPLACE_MKNOD
1139 REPLACE_MKFIFOAT
1140 REPLACE_MKFIFO
1141 REPLACE_MKDIR
1142 REPLACE_LSTAT
1143 REPLACE_FUTIMENS
1144 REPLACE_FSTATAT
1145 REPLACE_FSTAT
1146 REPLACE_FCHMODAT
1147 HAVE_UTIMENSAT
1148 HAVE_MKNODAT
1149 HAVE_MKNOD
1150 HAVE_MKFIFOAT
1151 HAVE_MKFIFO
1152 HAVE_MKDIRAT
1153 HAVE_LSTAT
1154 HAVE_LCHMOD
1155 HAVE_GETUMASK
1156 HAVE_FUTIMENS
1157 HAVE_FSTATAT
1158 HAVE_FCHMODAT
1159 GNULIB_MDA_UMASK
1160 GNULIB_MDA_MKDIR
1161 GNULIB_MDA_CHMOD
1162 GNULIB_OVERRIDES_STRUCT_STAT
1163 GNULIB_UTIMENSAT
1164 GNULIB_STAT
1165 GNULIB_MKNODAT
1166 GNULIB_MKNOD
1167 GNULIB_MKFIFOAT
1168 GNULIB_MKFIFO
1169 GNULIB_MKDIRAT
1170 GNULIB_MKDIR
1171 GNULIB_LSTAT
1172 GNULIB_LCHMOD
1173 GNULIB_GETUMASK
1174 GNULIB_FUTIMENS
1175 GNULIB_FSTATAT
1176 GNULIB_FSTAT
1177 GNULIB_FCHMODAT
1178 FREXPL_LIBM
1179 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
1180 FREXP_LIBM
1181 REPLACE_TRUNCL
1182 REPLACE_TRUNCF
1183 REPLACE_TRUNC
1184 REPLACE_TANHF
1185 REPLACE_TANF
1186 REPLACE_SQRTL
1187 REPLACE_SQRTF
1188 REPLACE_SINHF
1189 REPLACE_SINF
1190 REPLACE_SIGNBIT_USING_BUILTINS
1191 REPLACE_SIGNBIT
1192 REPLACE_ROUNDL
1193 REPLACE_ROUNDF
1194 REPLACE_ROUND
1195 REPLACE_RINTL
1196 REPLACE_REMAINDERL
1197 REPLACE_REMAINDERF
1198 REPLACE_REMAINDER
1199 REPLACE_NAN
1200 REPLACE_MODFL
1201 REPLACE_MODFF
1202 REPLACE_MODF
1203 REPLACE_LOGBL
1204 REPLACE_LOGBF
1205 REPLACE_LOGB
1206 REPLACE_LOG2L
1207 REPLACE_LOG2F
1208 REPLACE_LOG2
1209 REPLACE_LOG1PL
1210 REPLACE_LOG1PF
1211 REPLACE_LOG1P
1212 REPLACE_LOG10L
1213 REPLACE_LOG10F
1214 REPLACE_LOG10
1215 REPLACE_LOGL
1216 REPLACE_LOGF
1217 REPLACE_LOG
1218 REPLACE_LDEXPL
1219 REPLACE_ISNAN
1220 REPLACE_ISINF
1221 REPLACE_ISFINITE
1222 REPLACE_ILOGBL
1223 REPLACE_ILOGBF
1224 REPLACE_ILOGB
1225 REPLACE_HYPOTL
1226 REPLACE_HYPOTF
1227 REPLACE_HYPOT
1228 REPLACE_HUGE_VAL
1229 REPLACE_FREXPL
1230 REPLACE_FREXP
1231 REPLACE_FREXPF
1232 REPLACE_FMODL
1233 REPLACE_FMODF
1234 REPLACE_FMOD
1235 REPLACE_FMAL
1236 REPLACE_FMAF
1237 REPLACE_FMA
1238 REPLACE_FLOORL
1239 REPLACE_FLOORF
1240 REPLACE_FLOOR
1241 REPLACE_FABSL
1242 REPLACE_EXP2L
1243 REPLACE_EXP2
1244 REPLACE_EXPM1L
1245 REPLACE_EXPM1F
1246 REPLACE_EXPM1
1247 REPLACE_EXPL
1248 REPLACE_EXPF
1249 REPLACE_COSHF
1250 REPLACE_COSF
1251 REPLACE_CEILL
1252 REPLACE_CEILF
1253 REPLACE_CEIL
1254 REPLACE_CBRTL
1255 REPLACE_CBRTF
1256 REPLACE_ATAN2F
1257 REPLACE_ATANF
1258 REPLACE_ASINF
1259 REPLACE_ACOSF
1260 HAVE_DECL_TRUNCL
1261 HAVE_DECL_TRUNCF
1262 HAVE_DECL_TRUNC
1263 HAVE_DECL_TANL
1264 HAVE_DECL_SQRTL
1265 HAVE_DECL_SINL
1266 HAVE_DECL_ROUNDL
1267 HAVE_DECL_ROUNDF
1268 HAVE_DECL_ROUND
1269 HAVE_DECL_RINTF
1270 HAVE_DECL_REMAINDERL
1271 HAVE_DECL_REMAINDER
1272 HAVE_DECL_LOGB
1273 HAVE_DECL_LOG2L
1274 HAVE_DECL_LOG2F
1275 HAVE_DECL_LOG2
1276 HAVE_DECL_LOG10L
1277 HAVE_DECL_LOGL
1278 HAVE_DECL_LDEXPL
1279 HAVE_DECL_FREXPL
1280 HAVE_DECL_FLOORL
1281 HAVE_DECL_FLOORF
1282 HAVE_DECL_EXPM1L
1283 HAVE_DECL_EXP2L
1284 HAVE_DECL_EXP2F
1285 HAVE_DECL_EXP2
1286 HAVE_DECL_EXPL
1287 HAVE_DECL_COSL
1288 HAVE_DECL_COPYSIGNF
1289 HAVE_DECL_CEILL
1290 HAVE_DECL_CEILF
1291 HAVE_DECL_CBRTL
1292 HAVE_DECL_CBRTF
1293 HAVE_DECL_ATANL
1294 HAVE_DECL_ASINL
1295 HAVE_DECL_ACOSL
1296 HAVE_TANHF
1297 HAVE_TANL
1298 HAVE_TANF
1299 HAVE_SQRTL
1300 HAVE_SQRTF
1301 HAVE_SINHF
1302 HAVE_SINL
1303 HAVE_SINF
1304 HAVE_RINTL
1305 HAVE_RINT
1306 HAVE_REMAINDERF
1307 HAVE_REMAINDER
1308 HAVE_POWF
1309 HAVE_MODFL
1310 HAVE_MODFF
1311 HAVE_LOGBL
1312 HAVE_LOGBF
1313 HAVE_LOG1PL
1314 HAVE_LOG1PF
1315 HAVE_LOG1P
1316 HAVE_LOG10L
1317 HAVE_LOG10F
1318 HAVE_LOGL
1319 HAVE_LOGF
1320 HAVE_LDEXPF
1321 HAVE_ISNANL
1322 HAVE_ISNAND
1323 HAVE_ISNANF
1324 HAVE_ILOGBL
1325 HAVE_ILOGBF
1326 HAVE_ILOGB
1327 HAVE_HYPOTL
1328 HAVE_HYPOTF
1329 HAVE_FREXPF
1330 HAVE_FMODL
1331 HAVE_FMODF
1332 HAVE_FMAL
1333 HAVE_FMAF
1334 HAVE_FMA
1335 HAVE_FABSL
1336 HAVE_FABSF
1337 HAVE_EXPM1F
1338 HAVE_EXPM1
1339 HAVE_EXPL
1340 HAVE_EXPF
1341 HAVE_COSHF
1342 HAVE_COSL
1343 HAVE_COSF
1344 HAVE_COPYSIGNL
1345 HAVE_COPYSIGN
1346 HAVE_CBRTL
1347 HAVE_CBRTF
1348 HAVE_CBRT
1349 HAVE_ATAN2F
1350 HAVE_ATANL
1351 HAVE_ATANF
1352 HAVE_ASINL
1353 HAVE_ASINF
1354 HAVE_ACOSL
1355 HAVE_ACOSF
1356 GNULIB_MDA_YN
1357 GNULIB_MDA_Y1
1358 GNULIB_MDA_Y0
1359 GNULIB_MDA_JN
1360 GNULIB_MDA_J1
1361 GNULIB_MDA_J0
1362 GNULIB_TRUNCL
1363 GNULIB_TRUNCF
1364 GNULIB_TRUNC
1365 GNULIB_TANHF
1366 GNULIB_TANL
1367 GNULIB_TANF
1368 GNULIB_SQRTL
1369 GNULIB_SQRTF
1370 GNULIB_SINHF
1371 GNULIB_SINL
1372 GNULIB_SINF
1373 GNULIB_SIGNBIT
1374 GNULIB_ROUNDL
1375 GNULIB_ROUNDF
1376 GNULIB_ROUND
1377 GNULIB_RINTL
1378 GNULIB_RINTF
1379 GNULIB_RINT
1380 GNULIB_REMAINDERL
1381 GNULIB_REMAINDERF
1382 GNULIB_REMAINDER
1383 GNULIB_POWF
1384 GNULIB_MODFL
1385 GNULIB_MODFF
1386 GNULIB_MODF
1387 GNULIB_LOGBL
1388 GNULIB_LOGBF
1389 GNULIB_LOGB
1390 GNULIB_LOG2L
1391 GNULIB_LOG2F
1392 GNULIB_LOG2
1393 GNULIB_LOG1PL
1394 GNULIB_LOG1PF
1395 GNULIB_LOG1P
1396 GNULIB_LOG10L
1397 GNULIB_LOG10F
1398 GNULIB_LOG10
1399 GNULIB_LOGL
1400 GNULIB_LOGF
1401 GNULIB_LOG
1402 GNULIB_LDEXPL
1403 GNULIB_LDEXPF
1404 GNULIB_ISNANL
1405 GNULIB_ISNAND
1406 GNULIB_ISNANF
1407 GNULIB_ISNAN
1408 GNULIB_ISINF
1409 GNULIB_ISFINITE
1410 GNULIB_ILOGBL
1411 GNULIB_ILOGBF
1412 GNULIB_ILOGB
1413 GNULIB_HYPOTL
1414 GNULIB_HYPOTF
1415 GNULIB_HYPOT
1416 GNULIB_FREXPL
1417 GNULIB_FREXP
1418 GNULIB_FREXPF
1419 GNULIB_FMODL
1420 GNULIB_FMODF
1421 GNULIB_FMOD
1422 GNULIB_FMAL
1423 GNULIB_FMAF
1424 GNULIB_FMA
1425 GNULIB_FLOORL
1426 GNULIB_FLOORF
1427 GNULIB_FLOOR
1428 GNULIB_FABSL
1429 GNULIB_FABSF
1430 GNULIB_EXPM1L
1431 GNULIB_EXPM1F
1432 GNULIB_EXPM1
1433 GNULIB_EXP2L
1434 GNULIB_EXP2F
1435 GNULIB_EXP2
1436 GNULIB_EXPL
1437 GNULIB_EXPF
1438 GNULIB_COSHF
1439 GNULIB_COSL
1440 GNULIB_COSF
1441 GNULIB_COPYSIGNL
1442 GNULIB_COPYSIGNF
1443 GNULIB_COPYSIGN
1444 GNULIB_CEILL
1445 GNULIB_CEILF
1446 GNULIB_CEIL
1447 GNULIB_CBRTL
1448 GNULIB_CBRTF
1449 GNULIB_CBRT
1450 GNULIB_ATAN2F
1451 GNULIB_ATANL
1452 GNULIB_ATANF
1453 GNULIB_ASINL
1454 GNULIB_ASINF
1455 GNULIB_ACOSL
1456 GNULIB_ACOSF
1457 GL_GENERATE_FNMATCH_H_FALSE
1458 GL_GENERATE_FNMATCH_H_TRUE
1459 FNMATCH_H
1460 HAVE_FNMATCH_H
1461 NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H
1462 NEXT_FNMATCH_H
1463 REPLACE_FNMATCH
1464 HAVE_FNMATCH
1465 GNULIB_FNMATCH
1466 REPLACE_ITOLD
1467 GL_GENERATE_FLOAT_H_FALSE
1468 GL_GENERATE_FLOAT_H_TRUE
1469 FLOAT_H
1470 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1471 NEXT_FLOAT_H
1472 HAVE_DECL_STRNCASECMP
1473 HAVE_STRCASECMP
1474 HAVE_FFS
1475 GNULIB_FFS
1476 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1477 NEXT_FCNTL_H
1478 REPLACE_OPENAT
1479 REPLACE_OPEN
1480 REPLACE_FCNTL
1481 REPLACE_CREAT
1482 HAVE_OPENAT
1483 HAVE_FCNTL
1484 GNULIB_MDA_OPEN
1485 GNULIB_MDA_CREAT
1486 GNULIB_OPENAT
1487 GNULIB_OPEN
1488 GNULIB_NONBLOCKING
1489 GNULIB_FCNTL
1490 GNULIB_CREAT
1491 EOVERFLOW_VALUE
1492 EOVERFLOW_HIDDEN
1493 ENOLINK_VALUE
1494 ENOLINK_HIDDEN
1495 EMULTIHOP_VALUE
1496 EMULTIHOP_HIDDEN
1497 GL_GENERATE_ERRNO_H_FALSE
1498 GL_GENERATE_ERRNO_H_TRUE
1499 ERRNO_H
1500 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1501 NEXT_ERRNO_H
1502 HAVE_DIRENT_H
1503 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1504 NEXT_DIRENT_H
1505 NEXT_AS_FIRST_DIRECTIVE_CTYPE_H
1506 NEXT_CTYPE_H
1507 HAVE_ISBLANK
1508 GNULIB_ISBLANK
1509 REPLACE_FDOPENDIR
1510 REPLACE_DIRFD
1511 REPLACE_CLOSEDIR
1512 REPLACE_OPENDIR
1513 HAVE_ALPHASORT
1514 HAVE_SCANDIR
1515 HAVE_FDOPENDIR
1516 HAVE_DECL_FDOPENDIR
1517 HAVE_DECL_DIRFD
1518 HAVE_CLOSEDIR
1519 HAVE_REWINDDIR
1520 HAVE_READDIR
1521 HAVE_OPENDIR
1522 GNULIB_ALPHASORT
1523 GNULIB_SCANDIR
1524 GNULIB_FDOPENDIR
1525 GNULIB_DIRFD
1526 GNULIB_CLOSEDIR
1527 GNULIB_REWINDDIR
1528 GNULIB_READDIR
1529 GNULIB_OPENDIR
1530 HAVE_WINSOCK2_H
1531 HAVE_MSVC_INVALID_PARAMETER_HANDLER
1532 LIB_CLOCK_GETTIME
1533 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1534 UNISTD_H_HAVE_WINSOCK2_H
1535 UNISTD_H_HAVE_SYS_RANDOM_H
1536 REPLACE_WRITE
1537 REPLACE_USLEEP
1538 REPLACE_UNLINKAT
1539 REPLACE_UNLINK
1540 REPLACE_TTYNAME_R
1541 REPLACE_TRUNCATE
1542 REPLACE_SYMLINKAT
1543 REPLACE_SYMLINK
1544 REPLACE_SLEEP
1545 REPLACE_RMDIR
1546 REPLACE_READLINKAT
1547 REPLACE_READLINK
1548 REPLACE_READ
1549 REPLACE_PWRITE
1550 REPLACE_PREAD
1551 REPLACE_LSEEK
1552 REPLACE_LINKAT
1553 REPLACE_LINK
1554 REPLACE_LCHOWN
1555 REPLACE_ISATTY
1556 REPLACE_GETPASS
1557 REPLACE_GETPAGESIZE
1558 REPLACE_GETGROUPS
1559 REPLACE_GETLOGIN_R
1560 REPLACE_GETDTABLESIZE
1561 REPLACE_GETDOMAINNAME
1562 REPLACE_GETCWD
1563 REPLACE_FTRUNCATE
1564 REPLACE_FCHOWNAT
1565 REPLACE_FACCESSAT
1566 REPLACE_EXECVPE
1567 REPLACE_EXECVP
1568 REPLACE_EXECVE
1569 REPLACE_EXECV
1570 REPLACE_EXECLP
1571 REPLACE_EXECLE
1572 REPLACE_EXECL
1573 REPLACE_DUP2
1574 REPLACE_DUP
1575 REPLACE_CLOSE
1576 REPLACE_CHOWN
1577 REPLACE_ACCESS
1578 HAVE_SYS_PARAM_H
1579 HAVE_OS_H
1580 HAVE_DECL_TTYNAME_R
1581 HAVE_DECL_TRUNCATE
1582 HAVE_DECL_SETHOSTNAME
1583 HAVE_DECL_GETUSERSHELL
1584 HAVE_DECL_GETPAGESIZE
1585 HAVE_DECL_GETLOGIN_R
1586 HAVE_DECL_GETLOGIN
1587 HAVE_DECL_GETDOMAINNAME
1588 HAVE_DECL_FDATASYNC
1589 HAVE_DECL_FCHDIR
1590 HAVE_DECL_EXECVPE
1591 HAVE_DECL_ENVIRON
1592 HAVE_USLEEP
1593 HAVE_UNLINKAT
1594 HAVE_SYMLINKAT
1595 HAVE_SYMLINK
1596 HAVE_SLEEP
1597 HAVE_SETHOSTNAME
1598 HAVE_READLINKAT
1599 HAVE_READLINK
1600 HAVE_PWRITE
1601 HAVE_PREAD
1602 HAVE_PIPE2
1603 HAVE_PIPE
1604 HAVE_LINKAT
1605 HAVE_LINK
1606 HAVE_LCHOWN
1607 HAVE_GROUP_MEMBER
1608 HAVE_GETPASS
1609 HAVE_GETPAGESIZE
1610 HAVE_GETLOGIN
1611 HAVE_GETHOSTNAME
1612 HAVE_GETGROUPS
1613 HAVE_GETENTROPY
1614 HAVE_GETDTABLESIZE
1615 HAVE_FTRUNCATE
1616 HAVE_FSYNC
1617 HAVE_FDATASYNC
1618 HAVE_FCHOWNAT
1619 HAVE_FCHDIR
1620 HAVE_FACCESSAT
1621 HAVE_EXECVPE
1622 HAVE_EUIDACCESS
1623 HAVE_DUP3
1624 HAVE_COPY_FILE_RANGE
1625 HAVE_CHOWN
1626 GNULIB_MDA_WRITE
1627 GNULIB_MDA_UNLINK
1628 GNULIB_MDA_SWAB
1629 GNULIB_MDA_RMDIR
1630 GNULIB_MDA_READ
1631 GNULIB_MDA_LSEEK
1632 GNULIB_MDA_ISATTY
1633 GNULIB_MDA_GETPID
1634 GNULIB_MDA_GETCWD
1635 GNULIB_MDA_EXECVPE
1636 GNULIB_MDA_EXECVP
1637 GNULIB_MDA_EXECVE
1638 GNULIB_MDA_EXECV
1639 GNULIB_MDA_EXECLP
1640 GNULIB_MDA_EXECLE
1641 GNULIB_MDA_EXECL
1642 GNULIB_MDA_DUP2
1643 GNULIB_MDA_DUP
1644 GNULIB_MDA_CLOSE
1645 GNULIB_MDA_CHDIR
1646 GNULIB_MDA_ACCESS
1647 GNULIB_WRITE
1648 GNULIB_USLEEP
1649 GNULIB_UNLINKAT
1650 GNULIB_UNLINK
1651 GNULIB_UNISTD_H_SIGPIPE
1652 GNULIB_UNISTD_H_NONBLOCKING
1653 GNULIB_TTYNAME_R
1654 GNULIB_TRUNCATE
1655 GNULIB_SYMLINKAT
1656 GNULIB_SYMLINK
1657 GNULIB_SLEEP
1658 GNULIB_SETHOSTNAME
1659 GNULIB_RMDIR
1660 GNULIB_READLINKAT
1661 GNULIB_READLINK
1662 GNULIB_READ
1663 GNULIB_PWRITE
1664 GNULIB_PREAD
1665 GNULIB_PIPE2
1666 GNULIB_PIPE
1667 GNULIB_LSEEK
1668 GNULIB_LINKAT
1669 GNULIB_LINK
1670 GNULIB_LCHOWN
1671 GNULIB_ISATTY
1672 GNULIB_GROUP_MEMBER
1673 GNULIB_GETUSERSHELL
1674 GNULIB_GETPASS
1675 GNULIB_GETPAGESIZE
1676 GNULIB_GETOPT_POSIX
1677 GNULIB_GETLOGIN_R
1678 GNULIB_GETLOGIN
1679 GNULIB_GETHOSTNAME
1680 GNULIB_GETGROUPS
1681 GNULIB_GETENTROPY
1682 GNULIB_GETDTABLESIZE
1683 GNULIB_GETDOMAINNAME
1684 GNULIB_GETCWD
1685 GNULIB_FTRUNCATE
1686 GNULIB_FSYNC
1687 GNULIB_FDATASYNC
1688 GNULIB_FCHOWNAT
1689 GNULIB_FCHDIR
1690 GNULIB_FACCESSAT
1691 GNULIB_EXECVPE
1692 GNULIB_EXECVP
1693 GNULIB_EXECVE
1694 GNULIB_EXECV
1695 GNULIB_EXECLP
1696 GNULIB_EXECLE
1697 GNULIB_EXECL
1698 GNULIB_EUIDACCESS
1699 GNULIB_ENVIRON
1700 GNULIB_DUP3
1701 GNULIB_DUP2
1702 GNULIB_DUP
1703 GNULIB_COPY_FILE_RANGE
1704 GNULIB_CLOSE
1705 GNULIB_CHOWN
1706 GNULIB_CHDIR
1707 GNULIB_ACCESS
1708 REPLACE_WCTOMB
1709 REPLACE_UNSETENV
1710 REPLACE_STRTOLD
1711 REPLACE_STRTOD
1712 REPLACE_SETSTATE
1713 REPLACE_SETENV
1714 REPLACE_REALPATH
1715 REPLACE_REALLOC
1716 REPLACE_RANDOM_R
1717 REPLACE_RANDOM
1718 REPLACE_QSORT_R
1719 REPLACE_PUTENV
1720 REPLACE_PTSNAME_R
1721 REPLACE_PTSNAME
1722 REPLACE_POSIX_MEMALIGN
1723 REPLACE_MKSTEMP
1724 REPLACE_MBTOWC
1725 REPLACE_MALLOC
1726 REPLACE_INITSTATE
1727 REPLACE_FREE
1728 REPLACE_CANONICALIZE_FILE_NAME
1729 REPLACE_CALLOC
1730 REPLACE_ALIGNED_ALLOC
1731 HAVE_DECL_UNSETENV
1732 HAVE_UNLOCKPT
1733 HAVE_SYS_LOADAVG_H
1734 HAVE_STRUCT_RANDOM_DATA
1735 HAVE_STRTOULL
1736 HAVE_STRTOLL
1737 HAVE_STRTOLD
1738 HAVE_STRTOD
1739 HAVE_DECL_SETSTATE
1740 HAVE_SETSTATE
1741 HAVE_DECL_SETENV
1742 HAVE_SETENV
1743 HAVE_SECURE_GETENV
1744 HAVE_RPMATCH
1745 HAVE_REALPATH
1746 HAVE_REALLOCARRAY
1747 HAVE_RANDOM_R
1748 HAVE_RANDOM_H
1749 HAVE_RANDOM
1750 HAVE_QSORT_R
1751 HAVE_PTSNAME_R
1752 HAVE_PTSNAME
1753 HAVE_POSIX_OPENPT
1754 HAVE_POSIX_MEMALIGN
1755 HAVE_MKSTEMPS
1756 HAVE_MKSTEMP
1757 HAVE_MKOSTEMPS
1758 HAVE_MKOSTEMP
1759 HAVE_MKDTEMP
1760 HAVE_MBTOWC
1761 HAVE_DECL_INITSTATE
1762 HAVE_INITSTATE
1763 HAVE_GRANTPT
1764 HAVE_GETSUBOPT
1765 HAVE_DECL_GETLOADAVG
1766 HAVE_DECL_GCVT
1767 HAVE_DECL_FCVT
1768 HAVE_DECL_ECVT
1769 HAVE_CANONICALIZE_FILE_NAME
1770 HAVE_ATOLL
1771 HAVE_ALIGNED_ALLOC
1772 HAVE__EXIT
1773 GNULIB_MDA_PUTENV
1774 GNULIB_MDA_MKTEMP
1775 GNULIB_MDA_GCVT
1776 GNULIB_MDA_FCVT
1777 GNULIB_MDA_ECVT
1778 GNULIB_WCTOMB
1779 GNULIB_UNSETENV
1780 GNULIB_UNLOCKPT
1781 GNULIB_SYSTEM_POSIX
1782 GNULIB_STRTOULL
1783 GNULIB_STRTOLL
1784 GNULIB_STRTOLD
1785 GNULIB_STRTOD
1786 GNULIB_SETENV
1787 GNULIB_SECURE_GETENV
1788 GNULIB_RPMATCH
1789 GNULIB_REALPATH
1790 GNULIB_REALLOC_POSIX
1791 GNULIB_REALLOCARRAY
1792 GNULIB_RANDOM_R
1793 GNULIB_RANDOM
1794 GNULIB_QSORT_R
1795 GNULIB_PUTENV
1796 GNULIB_PTSNAME_R
1797 GNULIB_PTSNAME
1798 GNULIB_POSIX_OPENPT
1799 GNULIB_POSIX_MEMALIGN
1800 GNULIB_MKSTEMPS
1801 GNULIB_MKSTEMP
1802 GNULIB_MKOSTEMPS
1803 GNULIB_MKOSTEMP
1804 GNULIB_MKDTEMP
1805 GNULIB_MBTOWC
1806 GNULIB_MALLOC_POSIX
1807 GNULIB_GRANTPT
1808 GNULIB_GETSUBOPT
1809 GNULIB_GETLOADAVG
1810 GNULIB_FREE_POSIX
1811 GNULIB_CANONICALIZE_FILE_NAME
1812 GNULIB_CALLOC_POSIX
1813 GNULIB_ATOLL
1814 GNULIB_ALIGNED_ALLOC
1815 GNULIB__EXIT
1816 LOCALE_FR
1817 REPLACE_WCSTOK
1818 REPLACE_WCSFTIME
1819 REPLACE_WCSWIDTH
1820 REPLACE_WCWIDTH
1821 REPLACE_WCSNRTOMBS
1822 REPLACE_WCSRTOMBS
1823 REPLACE_WCRTOMB
1824 REPLACE_MBSNRTOWCS
1825 REPLACE_MBSRTOWCS
1826 REPLACE_MBRLEN
1827 REPLACE_MBRTOWC
1828 REPLACE_MBSINIT
1829 REPLACE_WCTOB
1830 REPLACE_BTOWC
1831 REPLACE_MBSTATE_T
1832 HAVE_DECL_WCWIDTH
1833 HAVE_DECL_WCSDUP
1834 HAVE_DECL_WCTOB
1835 HAVE_WCSFTIME
1836 HAVE_WCSWIDTH
1837 HAVE_WCSTOK
1838 HAVE_WCSSTR
1839 HAVE_WCSPBRK
1840 HAVE_WCSSPN
1841 HAVE_WCSCSPN
1842 HAVE_WCSRCHR
1843 HAVE_WCSCHR
1844 HAVE_WCSDUP
1845 HAVE_WCSXFRM
1846 HAVE_WCSCOLL
1847 HAVE_WCSNCASECMP
1848 HAVE_WCSCASECMP
1849 HAVE_WCSNCMP
1850 HAVE_WCSCMP
1851 HAVE_WCSNCAT
1852 HAVE_WCSCAT
1853 HAVE_WCPNCPY
1854 HAVE_WCSNCPY
1855 HAVE_WCPCPY
1856 HAVE_WCSCPY
1857 HAVE_WCSNLEN
1858 HAVE_WCSLEN
1859 HAVE_WMEMSET
1860 HAVE_WMEMPCPY
1861 HAVE_WMEMMOVE
1862 HAVE_WMEMCPY
1863 HAVE_WMEMCMP
1864 HAVE_WMEMCHR
1865 HAVE_WCSNRTOMBS
1866 HAVE_WCSRTOMBS
1867 HAVE_WCRTOMB
1868 HAVE_MBSNRTOWCS
1869 HAVE_MBSRTOWCS
1870 HAVE_MBRLEN
1871 HAVE_MBRTOWC
1872 HAVE_MBSINIT
1873 HAVE_BTOWC
1874 GNULIB_MDA_WCSDUP
1875 GNULIB_WCSFTIME
1876 GNULIB_WCSWIDTH
1877 GNULIB_WCSTOK
1878 GNULIB_WCSSTR
1879 GNULIB_WCSPBRK
1880 GNULIB_WCSSPN
1881 GNULIB_WCSCSPN
1882 GNULIB_WCSRCHR
1883 GNULIB_WCSCHR
1884 GNULIB_WCSDUP
1885 GNULIB_WCSXFRM
1886 GNULIB_WCSCOLL
1887 GNULIB_WCSNCASECMP
1888 GNULIB_WCSCASECMP
1889 GNULIB_WCSNCMP
1890 GNULIB_WCSCMP
1891 GNULIB_WCSNCAT
1892 GNULIB_WCSCAT
1893 GNULIB_WCPNCPY
1894 GNULIB_WCSNCPY
1895 GNULIB_WCPCPY
1896 GNULIB_WCSCPY
1897 GNULIB_WCSNLEN
1898 GNULIB_WCSLEN
1899 GNULIB_WMEMSET
1900 GNULIB_WMEMPCPY
1901 GNULIB_WMEMMOVE
1902 GNULIB_WMEMCPY
1903 GNULIB_WMEMCMP
1904 GNULIB_WMEMCHR
1905 GNULIB_WCWIDTH
1906 GNULIB_WCSNRTOMBS
1907 GNULIB_WCSRTOMBS
1908 GNULIB_WCRTOMB
1909 GNULIB_MBSNRTOWCS
1910 GNULIB_MBSRTOWCS
1911 GNULIB_MBRLEN
1912 GNULIB_MBRTOWC
1913 GNULIB_MBSINIT
1914 GNULIB_WCTOB
1915 GNULIB_BTOWC
1916 MKDIR_P
1917 HAVE_WS2TCPIP_H
1918 HAVE_FEATURES_H
1919 NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H
1920 NEXT_ARPA_INET_H
1921 PRAGMA_COLUMNS
1922 PRAGMA_SYSTEM_HEADER
1923 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1924 INCLUDE_NEXT
1925 HAVE_ARPA_INET_H
1926 REPLACE_INET_PTON
1927 REPLACE_INET_NTOP
1928 HAVE_DECL_INET_PTON
1929 HAVE_DECL_INET_NTOP
1930 GNULIB_INET_PTON
1931 GNULIB_INET_NTOP
1932 HAVE_ALLOCA_H
1933 GL_GENERATE_ALLOCA_H_FALSE
1934 GL_GENERATE_ALLOCA_H_TRUE
1935 ALLOCA_H
1936 ALLOCA
1937 GL_COND_LIBTOOL_FALSE
1938 GL_COND_LIBTOOL_TRUE
1939 RANLIB
1940 ARFLAGS
1941 AR
1942 LARGEFILE_CPPFLAGS
1943 target_os
1944 target_vendor
1945 target_cpu
1946 target
1947 host_os
1948 host_vendor
1949 host_cpu
1950 host
1951 build_os
1952 build_vendor
1953 build_cpu
1954 build
1955 EGREP
1956 GREP
1957 CPP
1958 OBJEXT
1959 EXEEXT
1960 ac_ct_CC
1961 CPPFLAGS
1962 LDFLAGS
1963 CFLAGS
1964 CC
1965 MAINT
1966 MAINTAINER_MODE_FALSE
1967 MAINTAINER_MODE_TRUE
1968 target_alias
1969 host_alias
1970 build_alias
1971 LIBS
1972 ECHO_T
1973 ECHO_N
1974 ECHO_C
1975 DEFS
1976 mandir
1977 localedir
1978 libdir
1979 psdir
1980 pdfdir
1981 dvidir
1982 htmldir
1983 infodir
1984 docdir
1985 oldincludedir
1986 includedir
1987 localstatedir
1988 sharedstatedir
1989 sysconfdir
1990 datadir
1991 datarootdir
1992 libexecdir
1993 sbindir
1994 bindir
1995 program_transform_name
1996 prefix
1997 exec_prefix
1998 PACKAGE_URL
1999 PACKAGE_BUGREPORT
2000 PACKAGE_STRING
2001 PACKAGE_VERSION
2002 PACKAGE_TARNAME
2003 PACKAGE_NAME
2004 PATH_SEPARATOR
2005 SHELL'
2006 ac_subst_files=''
2007 ac_user_opts='
2008 enable_option_checking
2009 enable_maintainer_mode
2010 enable_plugins
2011 enable_largefile
2012 enable_threads
2013 enable_cross_guesses
2014 enable_dependency_tracking
2015 enable_silent_rules
2016 '
2017 ac_precious_vars='build_alias
2018 host_alias
2019 target_alias
2020 CC
2021 CFLAGS
2022 LDFLAGS
2023 LIBS
2024 CPPFLAGS
2025 CPP'
2026
2027
2028 # Initialize some variables set by options.
2029 ac_init_help=
2030 ac_init_version=false
2031 ac_unrecognized_opts=
2032 ac_unrecognized_sep=
2033 # The variables have the same names as the options, with
2034 # dashes changed to underlines.
2035 cache_file=/dev/null
2036 exec_prefix=NONE
2037 no_create=
2038 no_recursion=
2039 prefix=NONE
2040 program_prefix=NONE
2041 program_suffix=NONE
2042 program_transform_name=s,x,x,
2043 silent=
2044 site=
2045 srcdir=
2046 verbose=
2047 x_includes=NONE
2048 x_libraries=NONE
2049
2050 # Installation directory options.
2051 # These are left unexpanded so users can "make install exec_prefix=/foo"
2052 # and all the variables that are supposed to be based on exec_prefix
2053 # by default will actually change.
2054 # Use braces instead of parens because sh, perl, etc. also accept them.
2055 # (The list follows the same order as the GNU Coding Standards.)
2056 bindir='${exec_prefix}/bin'
2057 sbindir='${exec_prefix}/sbin'
2058 libexecdir='${exec_prefix}/libexec'
2059 datarootdir='${prefix}/share'
2060 datadir='${datarootdir}'
2061 sysconfdir='${prefix}/etc'
2062 sharedstatedir='${prefix}/com'
2063 localstatedir='${prefix}/var'
2064 includedir='${prefix}/include'
2065 oldincludedir='/usr/include'
2066 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
2067 infodir='${datarootdir}/info'
2068 htmldir='${docdir}'
2069 dvidir='${docdir}'
2070 pdfdir='${docdir}'
2071 psdir='${docdir}'
2072 libdir='${exec_prefix}/lib'
2073 localedir='${datarootdir}/locale'
2074 mandir='${datarootdir}/man'
2075
2076 ac_prev=
2077 ac_dashdash=
2078 for ac_option
2079 do
2080 # If the previous option needs an argument, assign it.
2081 if test -n "$ac_prev"; then
2082 eval $ac_prev=\$ac_option
2083 ac_prev=
2084 continue
2085 fi
2086
2087 case $ac_option in
2088 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
2089 *=) ac_optarg= ;;
2090 *) ac_optarg=yes ;;
2091 esac
2092
2093 # Accept the important Cygnus configure options, so we can diagnose typos.
2094
2095 case $ac_dashdash$ac_option in
2096 --)
2097 ac_dashdash=yes ;;
2098
2099 -bindir | --bindir | --bindi | --bind | --bin | --bi)
2100 ac_prev=bindir ;;
2101 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
2102 bindir=$ac_optarg ;;
2103
2104 -build | --build | --buil | --bui | --bu)
2105 ac_prev=build_alias ;;
2106 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
2107 build_alias=$ac_optarg ;;
2108
2109 -cache-file | --cache-file | --cache-fil | --cache-fi \
2110 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
2111 ac_prev=cache_file ;;
2112 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
2113 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
2114 cache_file=$ac_optarg ;;
2115
2116 --config-cache | -C)
2117 cache_file=config.cache ;;
2118
2119 -datadir | --datadir | --datadi | --datad)
2120 ac_prev=datadir ;;
2121 -datadir=* | --datadir=* | --datadi=* | --datad=*)
2122 datadir=$ac_optarg ;;
2123
2124 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
2125 | --dataroo | --dataro | --datar)
2126 ac_prev=datarootdir ;;
2127 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
2128 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
2129 datarootdir=$ac_optarg ;;
2130
2131 -disable-* | --disable-*)
2132 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
2133 # Reject names that are not valid shell variable names.
2134 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2135 as_fn_error $? "invalid feature name: $ac_useropt"
2136 ac_useropt_orig=$ac_useropt
2137 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2138 case $ac_user_opts in
2139 *"
2140 "enable_$ac_useropt"
2141 "*) ;;
2142 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
2143 ac_unrecognized_sep=', ';;
2144 esac
2145 eval enable_$ac_useropt=no ;;
2146
2147 -docdir | --docdir | --docdi | --doc | --do)
2148 ac_prev=docdir ;;
2149 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
2150 docdir=$ac_optarg ;;
2151
2152 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
2153 ac_prev=dvidir ;;
2154 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
2155 dvidir=$ac_optarg ;;
2156
2157 -enable-* | --enable-*)
2158 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
2159 # Reject names that are not valid shell variable names.
2160 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2161 as_fn_error $? "invalid feature name: $ac_useropt"
2162 ac_useropt_orig=$ac_useropt
2163 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2164 case $ac_user_opts in
2165 *"
2166 "enable_$ac_useropt"
2167 "*) ;;
2168 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
2169 ac_unrecognized_sep=', ';;
2170 esac
2171 eval enable_$ac_useropt=\$ac_optarg ;;
2172
2173 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
2174 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
2175 | --exec | --exe | --ex)
2176 ac_prev=exec_prefix ;;
2177 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
2178 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
2179 | --exec=* | --exe=* | --ex=*)
2180 exec_prefix=$ac_optarg ;;
2181
2182 -gas | --gas | --ga | --g)
2183 # Obsolete; use --with-gas.
2184 with_gas=yes ;;
2185
2186 -help | --help | --hel | --he | -h)
2187 ac_init_help=long ;;
2188 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
2189 ac_init_help=recursive ;;
2190 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
2191 ac_init_help=short ;;
2192
2193 -host | --host | --hos | --ho)
2194 ac_prev=host_alias ;;
2195 -host=* | --host=* | --hos=* | --ho=*)
2196 host_alias=$ac_optarg ;;
2197
2198 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
2199 ac_prev=htmldir ;;
2200 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
2201 | --ht=*)
2202 htmldir=$ac_optarg ;;
2203
2204 -includedir | --includedir | --includedi | --included | --include \
2205 | --includ | --inclu | --incl | --inc)
2206 ac_prev=includedir ;;
2207 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
2208 | --includ=* | --inclu=* | --incl=* | --inc=*)
2209 includedir=$ac_optarg ;;
2210
2211 -infodir | --infodir | --infodi | --infod | --info | --inf)
2212 ac_prev=infodir ;;
2213 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
2214 infodir=$ac_optarg ;;
2215
2216 -libdir | --libdir | --libdi | --libd)
2217 ac_prev=libdir ;;
2218 -libdir=* | --libdir=* | --libdi=* | --libd=*)
2219 libdir=$ac_optarg ;;
2220
2221 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
2222 | --libexe | --libex | --libe)
2223 ac_prev=libexecdir ;;
2224 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
2225 | --libexe=* | --libex=* | --libe=*)
2226 libexecdir=$ac_optarg ;;
2227
2228 -localedir | --localedir | --localedi | --localed | --locale)
2229 ac_prev=localedir ;;
2230 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
2231 localedir=$ac_optarg ;;
2232
2233 -localstatedir | --localstatedir | --localstatedi | --localstated \
2234 | --localstate | --localstat | --localsta | --localst | --locals)
2235 ac_prev=localstatedir ;;
2236 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
2237 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
2238 localstatedir=$ac_optarg ;;
2239
2240 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
2241 ac_prev=mandir ;;
2242 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
2243 mandir=$ac_optarg ;;
2244
2245 -nfp | --nfp | --nf)
2246 # Obsolete; use --without-fp.
2247 with_fp=no ;;
2248
2249 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
2250 | --no-cr | --no-c | -n)
2251 no_create=yes ;;
2252
2253 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
2254 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
2255 no_recursion=yes ;;
2256
2257 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
2258 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
2259 | --oldin | --oldi | --old | --ol | --o)
2260 ac_prev=oldincludedir ;;
2261 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
2262 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
2263 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
2264 oldincludedir=$ac_optarg ;;
2265
2266 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
2267 ac_prev=prefix ;;
2268 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
2269 prefix=$ac_optarg ;;
2270
2271 -program-prefix | --program-prefix | --program-prefi | --program-pref \
2272 | --program-pre | --program-pr | --program-p)
2273 ac_prev=program_prefix ;;
2274 -program-prefix=* | --program-prefix=* | --program-prefi=* \
2275 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
2276 program_prefix=$ac_optarg ;;
2277
2278 -program-suffix | --program-suffix | --program-suffi | --program-suff \
2279 | --program-suf | --program-su | --program-s)
2280 ac_prev=program_suffix ;;
2281 -program-suffix=* | --program-suffix=* | --program-suffi=* \
2282 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
2283 program_suffix=$ac_optarg ;;
2284
2285 -program-transform-name | --program-transform-name \
2286 | --program-transform-nam | --program-transform-na \
2287 | --program-transform-n | --program-transform- \
2288 | --program-transform | --program-transfor \
2289 | --program-transfo | --program-transf \
2290 | --program-trans | --program-tran \
2291 | --progr-tra | --program-tr | --program-t)
2292 ac_prev=program_transform_name ;;
2293 -program-transform-name=* | --program-transform-name=* \
2294 | --program-transform-nam=* | --program-transform-na=* \
2295 | --program-transform-n=* | --program-transform-=* \
2296 | --program-transform=* | --program-transfor=* \
2297 | --program-transfo=* | --program-transf=* \
2298 | --program-trans=* | --program-tran=* \
2299 | --progr-tra=* | --program-tr=* | --program-t=*)
2300 program_transform_name=$ac_optarg ;;
2301
2302 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
2303 ac_prev=pdfdir ;;
2304 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
2305 pdfdir=$ac_optarg ;;
2306
2307 -psdir | --psdir | --psdi | --psd | --ps)
2308 ac_prev=psdir ;;
2309 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
2310 psdir=$ac_optarg ;;
2311
2312 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2313 | -silent | --silent | --silen | --sile | --sil)
2314 silent=yes ;;
2315
2316 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
2317 ac_prev=sbindir ;;
2318 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
2319 | --sbi=* | --sb=*)
2320 sbindir=$ac_optarg ;;
2321
2322 -sharedstatedir | --sharedstatedir | --sharedstatedi \
2323 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
2324 | --sharedst | --shareds | --shared | --share | --shar \
2325 | --sha | --sh)
2326 ac_prev=sharedstatedir ;;
2327 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
2328 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
2329 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
2330 | --sha=* | --sh=*)
2331 sharedstatedir=$ac_optarg ;;
2332
2333 -site | --site | --sit)
2334 ac_prev=site ;;
2335 -site=* | --site=* | --sit=*)
2336 site=$ac_optarg ;;
2337
2338 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2339 ac_prev=srcdir ;;
2340 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2341 srcdir=$ac_optarg ;;
2342
2343 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
2344 | --syscon | --sysco | --sysc | --sys | --sy)
2345 ac_prev=sysconfdir ;;
2346 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
2347 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
2348 sysconfdir=$ac_optarg ;;
2349
2350 -target | --target | --targe | --targ | --tar | --ta | --t)
2351 ac_prev=target_alias ;;
2352 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
2353 target_alias=$ac_optarg ;;
2354
2355 -v | -verbose | --verbose | --verbos | --verbo | --verb)
2356 verbose=yes ;;
2357
2358 -version | --version | --versio | --versi | --vers | -V)
2359 ac_init_version=: ;;
2360
2361 -with-* | --with-*)
2362 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
2363 # Reject names that are not valid shell variable names.
2364 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2365 as_fn_error $? "invalid package name: $ac_useropt"
2366 ac_useropt_orig=$ac_useropt
2367 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2368 case $ac_user_opts in
2369 *"
2370 "with_$ac_useropt"
2371 "*) ;;
2372 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
2373 ac_unrecognized_sep=', ';;
2374 esac
2375 eval with_$ac_useropt=\$ac_optarg ;;
2376
2377 -without-* | --without-*)
2378 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
2379 # Reject names that are not valid shell variable names.
2380 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2381 as_fn_error $? "invalid package name: $ac_useropt"
2382 ac_useropt_orig=$ac_useropt
2383 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2384 case $ac_user_opts in
2385 *"
2386 "with_$ac_useropt"
2387 "*) ;;
2388 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
2389 ac_unrecognized_sep=', ';;
2390 esac
2391 eval with_$ac_useropt=no ;;
2392
2393 --x)
2394 # Obsolete; use --with-x.
2395 with_x=yes ;;
2396
2397 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
2398 | --x-incl | --x-inc | --x-in | --x-i)
2399 ac_prev=x_includes ;;
2400 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
2401 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
2402 x_includes=$ac_optarg ;;
2403
2404 -x-libraries | --x-libraries | --x-librarie | --x-librari \
2405 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
2406 ac_prev=x_libraries ;;
2407 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
2408 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
2409 x_libraries=$ac_optarg ;;
2410
2411 -*) as_fn_error $? "unrecognized option: \`$ac_option'
2412 Try \`$0 --help' for more information"
2413 ;;
2414
2415 *=*)
2416 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
2417 # Reject names that are not valid shell variable names.
2418 case $ac_envvar in #(
2419 '' | [0-9]* | *[!_$as_cr_alnum]* )
2420 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
2421 esac
2422 eval $ac_envvar=\$ac_optarg
2423 export $ac_envvar ;;
2424
2425 *)
2426 # FIXME: should be removed in autoconf 3.0.
2427 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
2428 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
2429 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
2430 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
2431 ;;
2432
2433 esac
2434 done
2435
2436 if test -n "$ac_prev"; then
2437 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
2438 as_fn_error $? "missing argument to $ac_option"
2439 fi
2440
2441 if test -n "$ac_unrecognized_opts"; then
2442 case $enable_option_checking in
2443 no) ;;
2444 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
2445 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2446 esac
2447 fi
2448
2449 # Check all directory arguments for consistency.
2450 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
2451 datadir sysconfdir sharedstatedir localstatedir includedir \
2452 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2453 libdir localedir mandir
2454 do
2455 eval ac_val=\$$ac_var
2456 # Remove trailing slashes.
2457 case $ac_val in
2458 */ )
2459 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2460 eval $ac_var=\$ac_val;;
2461 esac
2462 # Be sure to have absolute directory names.
2463 case $ac_val in
2464 [\\/$]* | ?:[\\/]* ) continue;;
2465 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2466 esac
2467 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
2468 done
2469
2470 # There might be people who depend on the old broken behavior: `$host'
2471 # used to hold the argument of --host etc.
2472 # FIXME: To remove some day.
2473 build=$build_alias
2474 host=$host_alias
2475 target=$target_alias
2476
2477 # FIXME: To remove some day.
2478 if test "x$host_alias" != x; then
2479 if test "x$build_alias" = x; then
2480 cross_compiling=maybe
2481 elif test "x$build_alias" != "x$host_alias"; then
2482 cross_compiling=yes
2483 fi
2484 fi
2485
2486 ac_tool_prefix=
2487 test -n "$host_alias" && ac_tool_prefix=$host_alias-
2488
2489 test "$silent" = yes && exec 6>/dev/null
2490
2491
2492 ac_pwd=`pwd` && test -n "$ac_pwd" &&
2493 ac_ls_di=`ls -di .` &&
2494 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2495 as_fn_error $? "working directory cannot be determined"
2496 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2497 as_fn_error $? "pwd does not report name of working directory"
2498
2499
2500 # Find the source files, if location was not specified.
2501 if test -z "$srcdir"; then
2502 ac_srcdir_defaulted=yes
2503 # Try the directory containing this script, then the parent directory.
2504 ac_confdir=`$as_dirname -- "$as_myself" ||
2505 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2506 X"$as_myself" : 'X\(//\)[^/]' \| \
2507 X"$as_myself" : 'X\(//\)$' \| \
2508 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2509 $as_echo X"$as_myself" |
2510 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2511 s//\1/
2512 q
2513 }
2514 /^X\(\/\/\)[^/].*/{
2515 s//\1/
2516 q
2517 }
2518 /^X\(\/\/\)$/{
2519 s//\1/
2520 q
2521 }
2522 /^X\(\/\).*/{
2523 s//\1/
2524 q
2525 }
2526 s/.*/./; q'`
2527 srcdir=$ac_confdir
2528 if test ! -r "$srcdir/$ac_unique_file"; then
2529 srcdir=..
2530 fi
2531 else
2532 ac_srcdir_defaulted=no
2533 fi
2534 if test ! -r "$srcdir/$ac_unique_file"; then
2535 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2536 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
2537 fi
2538 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2539 ac_abs_confdir=`(
2540 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
2541 pwd)`
2542 # When building in place, set srcdir=.
2543 if test "$ac_abs_confdir" = "$ac_pwd"; then
2544 srcdir=.
2545 fi
2546 # Remove unnecessary trailing slashes from srcdir.
2547 # Double slashes in file names in object file debugging info
2548 # mess up M-x gdb in Emacs.
2549 case $srcdir in
2550 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2551 esac
2552 for ac_var in $ac_precious_vars; do
2553 eval ac_env_${ac_var}_set=\${${ac_var}+set}
2554 eval ac_env_${ac_var}_value=\$${ac_var}
2555 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2556 eval ac_cv_env_${ac_var}_value=\$${ac_var}
2557 done
2558
2559 #
2560 # Report the --help message.
2561 #
2562 if test "$ac_init_help" = "long"; then
2563 # Omit some internal or obsolete options to make the list less imposing.
2564 # This message is too long to be a string in the A/UX 3.1 sh.
2565 cat <<_ACEOF
2566 \`configure' configures libgnu UNUSED-VERSION to adapt to many kinds of systems.
2567
2568 Usage: $0 [OPTION]... [VAR=VALUE]...
2569
2570 To assign environment variables (e.g., CC, CFLAGS...), specify them as
2571 VAR=VALUE. See below for descriptions of some of the useful variables.
2572
2573 Defaults for the options are specified in brackets.
2574
2575 Configuration:
2576 -h, --help display this help and exit
2577 --help=short display options specific to this package
2578 --help=recursive display the short help of all the included packages
2579 -V, --version display version information and exit
2580 -q, --quiet, --silent do not print \`checking ...' messages
2581 --cache-file=FILE cache test results in FILE [disabled]
2582 -C, --config-cache alias for \`--cache-file=config.cache'
2583 -n, --no-create do not create output files
2584 --srcdir=DIR find the sources in DIR [configure dir or \`..']
2585
2586 Installation directories:
2587 --prefix=PREFIX install architecture-independent files in PREFIX
2588 [$ac_default_prefix]
2589 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
2590 [PREFIX]
2591
2592 By default, \`make install' will install all the files in
2593 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
2594 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2595 for instance \`--prefix=\$HOME'.
2596
2597 For better control, use the options below.
2598
2599 Fine tuning of the installation directories:
2600 --bindir=DIR user executables [EPREFIX/bin]
2601 --sbindir=DIR system admin executables [EPREFIX/sbin]
2602 --libexecdir=DIR program executables [EPREFIX/libexec]
2603 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
2604 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
2605 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
2606 --libdir=DIR object code libraries [EPREFIX/lib]
2607 --includedir=DIR C header files [PREFIX/include]
2608 --oldincludedir=DIR C header files for non-gcc [/usr/include]
2609 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
2610 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
2611 --infodir=DIR info documentation [DATAROOTDIR/info]
2612 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
2613 --mandir=DIR man documentation [DATAROOTDIR/man]
2614 --docdir=DIR documentation root [DATAROOTDIR/doc/libgnu]
2615 --htmldir=DIR html documentation [DOCDIR]
2616 --dvidir=DIR dvi documentation [DOCDIR]
2617 --pdfdir=DIR pdf documentation [DOCDIR]
2618 --psdir=DIR ps documentation [DOCDIR]
2619 _ACEOF
2620
2621 cat <<\_ACEOF
2622
2623 Program names:
2624 --program-prefix=PREFIX prepend PREFIX to installed program names
2625 --program-suffix=SUFFIX append SUFFIX to installed program names
2626 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
2627
2628 System types:
2629 --build=BUILD configure for building on BUILD [guessed]
2630 --host=HOST cross-compile to build programs to run on HOST [BUILD]
2631 --target=TARGET configure for building compilers for TARGET [HOST]
2632 _ACEOF
2633 fi
2634
2635 if test -n "$ac_init_help"; then
2636 case $ac_init_help in
2637 short | recursive ) echo "Configuration of libgnu UNUSED-VERSION:";;
2638 esac
2639 cat <<\_ACEOF
2640
2641 Optional Features:
2642 --disable-option-checking ignore unrecognized --enable/--with options
2643 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
2644 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
2645 --enable-maintainer-mode
2646 enable make rules and dependencies not useful (and
2647 sometimes confusing) to the casual installer
2648 --enable-plugins Enable support for plugins
2649 --disable-largefile omit support for large files
2650 --enable-threads={isoc|posix|isoc+posix|windows}
2651 specify multithreading API
2652 --disable-threads build without multithread safety
2653 --enable-cross-guesses={conservative|risky}
2654 specify policy for cross-compilation guesses
2655 --enable-dependency-tracking
2656 do not reject slow dependency extractors
2657 --disable-dependency-tracking
2658 speeds up one-time build
2659 --enable-silent-rules less verbose build output (undo: "make V=1")
2660 --disable-silent-rules verbose build output (undo: "make V=0")
2661
2662 Some influential environment variables:
2663 CC C compiler command
2664 CFLAGS C compiler flags
2665 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2666 nonstandard directory <lib dir>
2667 LIBS libraries to pass to the linker, e.g. -l<library>
2668 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2669 you have headers in a nonstandard directory <include dir>
2670 CPP C preprocessor
2671
2672 Use these variables to override the choices made by `configure' or to help
2673 it to find libraries and programs with nonstandard names/locations.
2674
2675 Report bugs to the package provider.
2676 _ACEOF
2677 ac_status=$?
2678 fi
2679
2680 if test "$ac_init_help" = "recursive"; then
2681 # If there are subdirs, report their specific --help.
2682 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2683 test -d "$ac_dir" ||
2684 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2685 continue
2686 ac_builddir=.
2687
2688 case "$ac_dir" in
2689 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2690 *)
2691 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2692 # A ".." for each directory in $ac_dir_suffix.
2693 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2694 case $ac_top_builddir_sub in
2695 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2696 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2697 esac ;;
2698 esac
2699 ac_abs_top_builddir=$ac_pwd
2700 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2701 # for backward compatibility:
2702 ac_top_builddir=$ac_top_build_prefix
2703
2704 case $srcdir in
2705 .) # We are building in place.
2706 ac_srcdir=.
2707 ac_top_srcdir=$ac_top_builddir_sub
2708 ac_abs_top_srcdir=$ac_pwd ;;
2709 [\\/]* | ?:[\\/]* ) # Absolute name.
2710 ac_srcdir=$srcdir$ac_dir_suffix;
2711 ac_top_srcdir=$srcdir
2712 ac_abs_top_srcdir=$srcdir ;;
2713 *) # Relative name.
2714 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2715 ac_top_srcdir=$ac_top_build_prefix$srcdir
2716 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2717 esac
2718 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2719
2720 cd "$ac_dir" || { ac_status=$?; continue; }
2721 # Check for guested configure.
2722 if test -f "$ac_srcdir/configure.gnu"; then
2723 echo &&
2724 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2725 elif test -f "$ac_srcdir/configure"; then
2726 echo &&
2727 $SHELL "$ac_srcdir/configure" --help=recursive
2728 else
2729 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2730 fi || ac_status=$?
2731 cd "$ac_pwd" || { ac_status=$?; break; }
2732 done
2733 fi
2734
2735 test -n "$ac_init_help" && exit $ac_status
2736 if $ac_init_version; then
2737 cat <<\_ACEOF
2738 libgnu configure UNUSED-VERSION
2739 generated by GNU Autoconf 2.69
2740
2741 Copyright (C) 2012 Free Software Foundation, Inc.
2742 This configure script is free software; the Free Software Foundation
2743 gives unlimited permission to copy, distribute and modify it.
2744 _ACEOF
2745 exit
2746 fi
2747
2748 ## ------------------------ ##
2749 ## Autoconf initialization. ##
2750 ## ------------------------ ##
2751
2752 # ac_fn_c_try_compile LINENO
2753 # --------------------------
2754 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2755 ac_fn_c_try_compile ()
2756 {
2757 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2758 rm -f conftest.$ac_objext
2759 if { { ac_try="$ac_compile"
2760 case "(($ac_try" in
2761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2762 *) ac_try_echo=$ac_try;;
2763 esac
2764 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2765 $as_echo "$ac_try_echo"; } >&5
2766 (eval "$ac_compile") 2>conftest.err
2767 ac_status=$?
2768 if test -s conftest.err; then
2769 grep -v '^ *+' conftest.err >conftest.er1
2770 cat conftest.er1 >&5
2771 mv -f conftest.er1 conftest.err
2772 fi
2773 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2774 test $ac_status = 0; } && {
2775 test -z "$ac_c_werror_flag" ||
2776 test ! -s conftest.err
2777 } && test -s conftest.$ac_objext; then :
2778 ac_retval=0
2779 else
2780 $as_echo "$as_me: failed program was:" >&5
2781 sed 's/^/| /' conftest.$ac_ext >&5
2782
2783 ac_retval=1
2784 fi
2785 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2786 as_fn_set_status $ac_retval
2787
2788 } # ac_fn_c_try_compile
2789
2790 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2791 # -------------------------------------------------------
2792 # Tests whether HEADER exists and can be compiled using the include files in
2793 # INCLUDES, setting the cache variable VAR accordingly.
2794 ac_fn_c_check_header_compile ()
2795 {
2796 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2798 $as_echo_n "checking for $2... " >&6; }
2799 if eval \${$3+:} false; then :
2800 $as_echo_n "(cached) " >&6
2801 else
2802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2803 /* end confdefs.h. */
2804 $4
2805 #include <$2>
2806 _ACEOF
2807 if ac_fn_c_try_compile "$LINENO"; then :
2808 eval "$3=yes"
2809 else
2810 eval "$3=no"
2811 fi
2812 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2813 fi
2814 eval ac_res=\$$3
2815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2816 $as_echo "$ac_res" >&6; }
2817 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2818
2819 } # ac_fn_c_check_header_compile
2820
2821 # ac_fn_c_try_cpp LINENO
2822 # ----------------------
2823 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2824 ac_fn_c_try_cpp ()
2825 {
2826 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2827 if { { ac_try="$ac_cpp conftest.$ac_ext"
2828 case "(($ac_try" in
2829 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2830 *) ac_try_echo=$ac_try;;
2831 esac
2832 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2833 $as_echo "$ac_try_echo"; } >&5
2834 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2835 ac_status=$?
2836 if test -s conftest.err; then
2837 grep -v '^ *+' conftest.err >conftest.er1
2838 cat conftest.er1 >&5
2839 mv -f conftest.er1 conftest.err
2840 fi
2841 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2842 test $ac_status = 0; } > conftest.i && {
2843 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2844 test ! -s conftest.err
2845 }; then :
2846 ac_retval=0
2847 else
2848 $as_echo "$as_me: failed program was:" >&5
2849 sed 's/^/| /' conftest.$ac_ext >&5
2850
2851 ac_retval=1
2852 fi
2853 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2854 as_fn_set_status $ac_retval
2855
2856 } # ac_fn_c_try_cpp
2857
2858 # ac_fn_c_try_run LINENO
2859 # ----------------------
2860 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2861 # that executables *can* be run.
2862 ac_fn_c_try_run ()
2863 {
2864 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2865 if { { ac_try="$ac_link"
2866 case "(($ac_try" in
2867 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2868 *) ac_try_echo=$ac_try;;
2869 esac
2870 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2871 $as_echo "$ac_try_echo"; } >&5
2872 (eval "$ac_link") 2>&5
2873 ac_status=$?
2874 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2875 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2876 { { case "(($ac_try" in
2877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2878 *) ac_try_echo=$ac_try;;
2879 esac
2880 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2881 $as_echo "$ac_try_echo"; } >&5
2882 (eval "$ac_try") 2>&5
2883 ac_status=$?
2884 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2885 test $ac_status = 0; }; }; then :
2886 ac_retval=0
2887 else
2888 $as_echo "$as_me: program exited with status $ac_status" >&5
2889 $as_echo "$as_me: failed program was:" >&5
2890 sed 's/^/| /' conftest.$ac_ext >&5
2891
2892 ac_retval=$ac_status
2893 fi
2894 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2895 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2896 as_fn_set_status $ac_retval
2897
2898 } # ac_fn_c_try_run
2899
2900 # ac_fn_c_try_link LINENO
2901 # -----------------------
2902 # Try to link conftest.$ac_ext, and return whether this succeeded.
2903 ac_fn_c_try_link ()
2904 {
2905 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2906 rm -f conftest.$ac_objext conftest$ac_exeext
2907 if { { ac_try="$ac_link"
2908 case "(($ac_try" in
2909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2910 *) ac_try_echo=$ac_try;;
2911 esac
2912 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2913 $as_echo "$ac_try_echo"; } >&5
2914 (eval "$ac_link") 2>conftest.err
2915 ac_status=$?
2916 if test -s conftest.err; then
2917 grep -v '^ *+' conftest.err >conftest.er1
2918 cat conftest.er1 >&5
2919 mv -f conftest.er1 conftest.err
2920 fi
2921 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2922 test $ac_status = 0; } && {
2923 test -z "$ac_c_werror_flag" ||
2924 test ! -s conftest.err
2925 } && test -s conftest$ac_exeext && {
2926 test "$cross_compiling" = yes ||
2927 test -x conftest$ac_exeext
2928 }; then :
2929 ac_retval=0
2930 else
2931 $as_echo "$as_me: failed program was:" >&5
2932 sed 's/^/| /' conftest.$ac_ext >&5
2933
2934 ac_retval=1
2935 fi
2936 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2937 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2938 # interfere with the next link command; also delete a directory that is
2939 # left behind by Apple's compiler. We do this before executing the actions.
2940 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2941 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2942 as_fn_set_status $ac_retval
2943
2944 } # ac_fn_c_try_link
2945
2946 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2947 # -------------------------------------------
2948 # Tests whether TYPE exists after having included INCLUDES, setting cache
2949 # variable VAR accordingly.
2950 ac_fn_c_check_type ()
2951 {
2952 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2954 $as_echo_n "checking for $2... " >&6; }
2955 if eval \${$3+:} false; then :
2956 $as_echo_n "(cached) " >&6
2957 else
2958 eval "$3=no"
2959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2960 /* end confdefs.h. */
2961 $4
2962 int
2963 main ()
2964 {
2965 if (sizeof ($2))
2966 return 0;
2967 ;
2968 return 0;
2969 }
2970 _ACEOF
2971 if ac_fn_c_try_compile "$LINENO"; then :
2972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2973 /* end confdefs.h. */
2974 $4
2975 int
2976 main ()
2977 {
2978 if (sizeof (($2)))
2979 return 0;
2980 ;
2981 return 0;
2982 }
2983 _ACEOF
2984 if ac_fn_c_try_compile "$LINENO"; then :
2985
2986 else
2987 eval "$3=yes"
2988 fi
2989 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2990 fi
2991 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2992 fi
2993 eval ac_res=\$$3
2994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2995 $as_echo "$ac_res" >&6; }
2996 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2997
2998 } # ac_fn_c_check_type
2999
3000 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
3001 # -------------------------------------------------------
3002 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
3003 # the include files in INCLUDES and setting the cache variable VAR
3004 # accordingly.
3005 ac_fn_c_check_header_mongrel ()
3006 {
3007 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3008 if eval \${$3+:} false; then :
3009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3010 $as_echo_n "checking for $2... " >&6; }
3011 if eval \${$3+:} false; then :
3012 $as_echo_n "(cached) " >&6
3013 fi
3014 eval ac_res=\$$3
3015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3016 $as_echo "$ac_res" >&6; }
3017 else
3018 # Is the header compilable?
3019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
3020 $as_echo_n "checking $2 usability... " >&6; }
3021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3022 /* end confdefs.h. */
3023 $4
3024 #include <$2>
3025 _ACEOF
3026 if ac_fn_c_try_compile "$LINENO"; then :
3027 ac_header_compiler=yes
3028 else
3029 ac_header_compiler=no
3030 fi
3031 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
3033 $as_echo "$ac_header_compiler" >&6; }
3034
3035 # Is the header present?
3036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
3037 $as_echo_n "checking $2 presence... " >&6; }
3038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3039 /* end confdefs.h. */
3040 #include <$2>
3041 _ACEOF
3042 if ac_fn_c_try_cpp "$LINENO"; then :
3043 ac_header_preproc=yes
3044 else
3045 ac_header_preproc=no
3046 fi
3047 rm -f conftest.err conftest.i conftest.$ac_ext
3048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
3049 $as_echo "$ac_header_preproc" >&6; }
3050
3051 # So? What about this header?
3052 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
3053 yes:no: )
3054 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
3055 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
3056 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
3057 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
3058 ;;
3059 no:yes:* )
3060 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
3061 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
3062 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
3063 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
3064 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
3065 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
3066 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
3067 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
3068 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
3069 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
3070 ;;
3071 esac
3072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3073 $as_echo_n "checking for $2... " >&6; }
3074 if eval \${$3+:} false; then :
3075 $as_echo_n "(cached) " >&6
3076 else
3077 eval "$3=\$ac_header_compiler"
3078 fi
3079 eval ac_res=\$$3
3080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3081 $as_echo "$ac_res" >&6; }
3082 fi
3083 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3084
3085 } # ac_fn_c_check_header_mongrel
3086
3087 # ac_fn_c_check_func LINENO FUNC VAR
3088 # ----------------------------------
3089 # Tests whether FUNC exists, setting the cache variable VAR accordingly
3090 ac_fn_c_check_func ()
3091 {
3092 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3094 $as_echo_n "checking for $2... " >&6; }
3095 if eval \${$3+:} false; then :
3096 $as_echo_n "(cached) " >&6
3097 else
3098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3099 /* end confdefs.h. */
3100 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
3101 For example, HP-UX 11i <limits.h> declares gettimeofday. */
3102 #define $2 innocuous_$2
3103
3104 /* System header to define __stub macros and hopefully few prototypes,
3105 which can conflict with char $2 (); below.
3106 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3107 <limits.h> exists even on freestanding compilers. */
3108
3109 #ifdef __STDC__
3110 # include <limits.h>
3111 #else
3112 # include <assert.h>
3113 #endif
3114
3115 #undef $2
3116
3117 /* Override any GCC internal prototype to avoid an error.
3118 Use char because int might match the return type of a GCC
3119 builtin and then its argument prototype would still apply. */
3120 #ifdef __cplusplus
3121 extern "C"
3122 #endif
3123 char $2 ();
3124 /* The GNU C library defines this for functions which it implements
3125 to always fail with ENOSYS. Some functions are actually named
3126 something starting with __ and the normal name is an alias. */
3127 #if defined __stub_$2 || defined __stub___$2
3128 choke me
3129 #endif
3130
3131 int
3132 main ()
3133 {
3134 return $2 ();
3135 ;
3136 return 0;
3137 }
3138 _ACEOF
3139 if ac_fn_c_try_link "$LINENO"; then :
3140 eval "$3=yes"
3141 else
3142 eval "$3=no"
3143 fi
3144 rm -f core conftest.err conftest.$ac_objext \
3145 conftest$ac_exeext conftest.$ac_ext
3146 fi
3147 eval ac_res=\$$3
3148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3149 $as_echo "$ac_res" >&6; }
3150 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3151
3152 } # ac_fn_c_check_func
3153
3154 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
3155 # ---------------------------------------------
3156 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
3157 # accordingly.
3158 ac_fn_c_check_decl ()
3159 {
3160 ac_save_ac_compile="$ac_compile"
3161 if test -n "$ac_compile_for_check_decl"; then
3162 ac_compile="$ac_compile_for_check_decl"
3163 fi
3164 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3165 as_decl_name=`echo $2|sed 's/ *(.*//'`
3166 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
3167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
3168 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
3169 if eval \${$3+:} false; then :
3170 $as_echo_n "(cached) " >&6
3171 else
3172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3173 /* end confdefs.h. */
3174 $4
3175 int
3176 main ()
3177 {
3178 #ifndef $as_decl_name
3179 #ifdef __cplusplus
3180 (void) $as_decl_use;
3181 #else
3182 (void) $as_decl_name;
3183 #endif
3184 #endif
3185
3186 ;
3187 return 0;
3188 }
3189 _ACEOF
3190 if ac_fn_c_try_compile "$LINENO"; then :
3191 eval "$3=yes"
3192 else
3193 eval "$3=no"
3194 fi
3195 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3196 fi
3197 eval ac_res=\$$3
3198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3199 $as_echo "$ac_res" >&6; }
3200 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3201 ac_compile="$ac_save_ac_compile"
3202
3203 } # ac_fn_c_check_decl
3204
3205 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
3206 # --------------------------------------------
3207 # Tries to find the compile-time value of EXPR in a program that includes
3208 # INCLUDES, setting VAR accordingly. Returns whether the value could be
3209 # computed
3210 ac_fn_c_compute_int ()
3211 {
3212 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3213 if test "$cross_compiling" = yes; then
3214 # Depending upon the size, compute the lo and hi bounds.
3215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3216 /* end confdefs.h. */
3217 $4
3218 int
3219 main ()
3220 {
3221 static int test_array [1 - 2 * !(($2) >= 0)];
3222 test_array [0] = 0;
3223 return test_array [0];
3224
3225 ;
3226 return 0;
3227 }
3228 _ACEOF
3229 if ac_fn_c_try_compile "$LINENO"; then :
3230 ac_lo=0 ac_mid=0
3231 while :; do
3232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3233 /* end confdefs.h. */
3234 $4
3235 int
3236 main ()
3237 {
3238 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3239 test_array [0] = 0;
3240 return test_array [0];
3241
3242 ;
3243 return 0;
3244 }
3245 _ACEOF
3246 if ac_fn_c_try_compile "$LINENO"; then :
3247 ac_hi=$ac_mid; break
3248 else
3249 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
3250 if test $ac_lo -le $ac_mid; then
3251 ac_lo= ac_hi=
3252 break
3253 fi
3254 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
3255 fi
3256 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3257 done
3258 else
3259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3260 /* end confdefs.h. */
3261 $4
3262 int
3263 main ()
3264 {
3265 static int test_array [1 - 2 * !(($2) < 0)];
3266 test_array [0] = 0;
3267 return test_array [0];
3268
3269 ;
3270 return 0;
3271 }
3272 _ACEOF
3273 if ac_fn_c_try_compile "$LINENO"; then :
3274 ac_hi=-1 ac_mid=-1
3275 while :; do
3276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3277 /* end confdefs.h. */
3278 $4
3279 int
3280 main ()
3281 {
3282 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
3283 test_array [0] = 0;
3284 return test_array [0];
3285
3286 ;
3287 return 0;
3288 }
3289 _ACEOF
3290 if ac_fn_c_try_compile "$LINENO"; then :
3291 ac_lo=$ac_mid; break
3292 else
3293 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
3294 if test $ac_mid -le $ac_hi; then
3295 ac_lo= ac_hi=
3296 break
3297 fi
3298 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
3299 fi
3300 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3301 done
3302 else
3303 ac_lo= ac_hi=
3304 fi
3305 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3306 fi
3307 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3308 # Binary search between lo and hi bounds.
3309 while test "x$ac_lo" != "x$ac_hi"; do
3310 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
3311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3312 /* end confdefs.h. */
3313 $4
3314 int
3315 main ()
3316 {
3317 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3318 test_array [0] = 0;
3319 return test_array [0];
3320
3321 ;
3322 return 0;
3323 }
3324 _ACEOF
3325 if ac_fn_c_try_compile "$LINENO"; then :
3326 ac_hi=$ac_mid
3327 else
3328 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
3329 fi
3330 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3331 done
3332 case $ac_lo in #((
3333 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
3334 '') ac_retval=1 ;;
3335 esac
3336 else
3337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3338 /* end confdefs.h. */
3339 $4
3340 static long int longval () { return $2; }
3341 static unsigned long int ulongval () { return $2; }
3342 #include <stdio.h>
3343 #include <stdlib.h>
3344 int
3345 main ()
3346 {
3347
3348 FILE *f = fopen ("conftest.val", "w");
3349 if (! f)
3350 return 1;
3351 if (($2) < 0)
3352 {
3353 long int i = longval ();
3354 if (i != ($2))
3355 return 1;
3356 fprintf (f, "%ld", i);
3357 }
3358 else
3359 {
3360 unsigned long int i = ulongval ();
3361 if (i != ($2))
3362 return 1;
3363 fprintf (f, "%lu", i);
3364 }
3365 /* Do not output a trailing newline, as this causes \r\n confusion
3366 on some platforms. */
3367 return ferror (f) || fclose (f) != 0;
3368
3369 ;
3370 return 0;
3371 }
3372 _ACEOF
3373 if ac_fn_c_try_run "$LINENO"; then :
3374 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
3375 else
3376 ac_retval=1
3377 fi
3378 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3379 conftest.$ac_objext conftest.beam conftest.$ac_ext
3380 rm -f conftest.val
3381
3382 fi
3383 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3384 as_fn_set_status $ac_retval
3385
3386 } # ac_fn_c_compute_int
3387
3388 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
3389 # ----------------------------------------------------
3390 # Tries to find if the field MEMBER exists in type AGGR, after including
3391 # INCLUDES, setting cache variable VAR accordingly.
3392 ac_fn_c_check_member ()
3393 {
3394 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
3396 $as_echo_n "checking for $2.$3... " >&6; }
3397 if eval \${$4+:} false; then :
3398 $as_echo_n "(cached) " >&6
3399 else
3400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3401 /* end confdefs.h. */
3402 $5
3403 int
3404 main ()
3405 {
3406 static $2 ac_aggr;
3407 if (ac_aggr.$3)
3408 return 0;
3409 ;
3410 return 0;
3411 }
3412 _ACEOF
3413 if ac_fn_c_try_compile "$LINENO"; then :
3414 eval "$4=yes"
3415 else
3416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3417 /* end confdefs.h. */
3418 $5
3419 int
3420 main ()
3421 {
3422 static $2 ac_aggr;
3423 if (sizeof ac_aggr.$3)
3424 return 0;
3425 ;
3426 return 0;
3427 }
3428 _ACEOF
3429 if ac_fn_c_try_compile "$LINENO"; then :
3430 eval "$4=yes"
3431 else
3432 eval "$4=no"
3433 fi
3434 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3435 fi
3436 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3437 fi
3438 eval ac_res=\$$4
3439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3440 $as_echo "$ac_res" >&6; }
3441 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3442
3443 } # ac_fn_c_check_member
3444 cat >config.log <<_ACEOF
3445 This file contains any messages produced by compilers while
3446 running configure, to aid debugging if configure makes a mistake.
3447
3448 It was created by libgnu $as_me UNUSED-VERSION, which was
3449 generated by GNU Autoconf 2.69. Invocation command line was
3450
3451 $ $0 $@
3452
3453 _ACEOF
3454 exec 5>>config.log
3455 {
3456 cat <<_ASUNAME
3457 ## --------- ##
3458 ## Platform. ##
3459 ## --------- ##
3460
3461 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3462 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3463 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3464 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3465 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3466
3467 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3468 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
3469
3470 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
3471 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
3472 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3473 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
3474 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
3475 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
3476 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
3477
3478 _ASUNAME
3479
3480 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3481 for as_dir in $PATH
3482 do
3483 IFS=$as_save_IFS
3484 test -z "$as_dir" && as_dir=.
3485 $as_echo "PATH: $as_dir"
3486 done
3487 IFS=$as_save_IFS
3488
3489 } >&5
3490
3491 cat >&5 <<_ACEOF
3492
3493
3494 ## ----------- ##
3495 ## Core tests. ##
3496 ## ----------- ##
3497
3498 _ACEOF
3499
3500
3501 # Keep a trace of the command line.
3502 # Strip out --no-create and --no-recursion so they do not pile up.
3503 # Strip out --silent because we don't want to record it for future runs.
3504 # Also quote any args containing shell meta-characters.
3505 # Make two passes to allow for proper duplicate-argument suppression.
3506 ac_configure_args=
3507 ac_configure_args0=
3508 ac_configure_args1=
3509 ac_must_keep_next=false
3510 for ac_pass in 1 2
3511 do
3512 for ac_arg
3513 do
3514 case $ac_arg in
3515 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3516 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3517 | -silent | --silent | --silen | --sile | --sil)
3518 continue ;;
3519 *\'*)
3520 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3521 esac
3522 case $ac_pass in
3523 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3524 2)
3525 as_fn_append ac_configure_args1 " '$ac_arg'"
3526 if test $ac_must_keep_next = true; then
3527 ac_must_keep_next=false # Got value, back to normal.
3528 else
3529 case $ac_arg in
3530 *=* | --config-cache | -C | -disable-* | --disable-* \
3531 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3532 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3533 | -with-* | --with-* | -without-* | --without-* | --x)
3534 case "$ac_configure_args0 " in
3535 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3536 esac
3537 ;;
3538 -* ) ac_must_keep_next=true ;;
3539 esac
3540 fi
3541 as_fn_append ac_configure_args " '$ac_arg'"
3542 ;;
3543 esac
3544 done
3545 done
3546 { ac_configure_args0=; unset ac_configure_args0;}
3547 { ac_configure_args1=; unset ac_configure_args1;}
3548
3549 # When interrupted or exit'd, cleanup temporary files, and complete
3550 # config.log. We remove comments because anyway the quotes in there
3551 # would cause problems or look ugly.
3552 # WARNING: Use '\'' to represent an apostrophe within the trap.
3553 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3554 trap 'exit_status=$?
3555 # Save into config.log some information that might help in debugging.
3556 {
3557 echo
3558
3559 $as_echo "## ---------------- ##
3560 ## Cache variables. ##
3561 ## ---------------- ##"
3562 echo
3563 # The following way of writing the cache mishandles newlines in values,
3564 (
3565 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3566 eval ac_val=\$$ac_var
3567 case $ac_val in #(
3568 *${as_nl}*)
3569 case $ac_var in #(
3570 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3571 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3572 esac
3573 case $ac_var in #(
3574 _ | IFS | as_nl) ;; #(
3575 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3576 *) { eval $ac_var=; unset $ac_var;} ;;
3577 esac ;;
3578 esac
3579 done
3580 (set) 2>&1 |
3581 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3582 *${as_nl}ac_space=\ *)
3583 sed -n \
3584 "s/'\''/'\''\\\\'\'''\''/g;
3585 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3586 ;; #(
3587 *)
3588 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3589 ;;
3590 esac |
3591 sort
3592 )
3593 echo
3594
3595 $as_echo "## ----------------- ##
3596 ## Output variables. ##
3597 ## ----------------- ##"
3598 echo
3599 for ac_var in $ac_subst_vars
3600 do
3601 eval ac_val=\$$ac_var
3602 case $ac_val in
3603 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3604 esac
3605 $as_echo "$ac_var='\''$ac_val'\''"
3606 done | sort
3607 echo
3608
3609 if test -n "$ac_subst_files"; then
3610 $as_echo "## ------------------- ##
3611 ## File substitutions. ##
3612 ## ------------------- ##"
3613 echo
3614 for ac_var in $ac_subst_files
3615 do
3616 eval ac_val=\$$ac_var
3617 case $ac_val in
3618 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3619 esac
3620 $as_echo "$ac_var='\''$ac_val'\''"
3621 done | sort
3622 echo
3623 fi
3624
3625 if test -s confdefs.h; then
3626 $as_echo "## ----------- ##
3627 ## confdefs.h. ##
3628 ## ----------- ##"
3629 echo
3630 cat confdefs.h
3631 echo
3632 fi
3633 test "$ac_signal" != 0 &&
3634 $as_echo "$as_me: caught signal $ac_signal"
3635 $as_echo "$as_me: exit $exit_status"
3636 } >&5
3637 rm -f core *.core core.conftest.* &&
3638 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3639 exit $exit_status
3640 ' 0
3641 for ac_signal in 1 2 13 15; do
3642 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3643 done
3644 ac_signal=0
3645
3646 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3647 rm -f -r conftest* confdefs.h
3648
3649 $as_echo "/* confdefs.h */" > confdefs.h
3650
3651 # Predefined preprocessor variables.
3652
3653 cat >>confdefs.h <<_ACEOF
3654 #define PACKAGE_NAME "$PACKAGE_NAME"
3655 _ACEOF
3656
3657 cat >>confdefs.h <<_ACEOF
3658 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3659 _ACEOF
3660
3661 cat >>confdefs.h <<_ACEOF
3662 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3663 _ACEOF
3664
3665 cat >>confdefs.h <<_ACEOF
3666 #define PACKAGE_STRING "$PACKAGE_STRING"
3667 _ACEOF
3668
3669 cat >>confdefs.h <<_ACEOF
3670 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3671 _ACEOF
3672
3673 cat >>confdefs.h <<_ACEOF
3674 #define PACKAGE_URL "$PACKAGE_URL"
3675 _ACEOF
3676
3677
3678 # Let the site file select an alternate cache file if it wants to.
3679 # Prefer an explicitly selected file to automatically selected ones.
3680 ac_site_file1=NONE
3681 ac_site_file2=NONE
3682 if test -n "$CONFIG_SITE"; then
3683 # We do not want a PATH search for config.site.
3684 case $CONFIG_SITE in #((
3685 -*) ac_site_file1=./$CONFIG_SITE;;
3686 */*) ac_site_file1=$CONFIG_SITE;;
3687 *) ac_site_file1=./$CONFIG_SITE;;
3688 esac
3689 elif test "x$prefix" != xNONE; then
3690 ac_site_file1=$prefix/share/config.site
3691 ac_site_file2=$prefix/etc/config.site
3692 else
3693 ac_site_file1=$ac_default_prefix/share/config.site
3694 ac_site_file2=$ac_default_prefix/etc/config.site
3695 fi
3696 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3697 do
3698 test "x$ac_site_file" = xNONE && continue
3699 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3700 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3701 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3702 sed 's/^/| /' "$ac_site_file" >&5
3703 . "$ac_site_file" \
3704 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3705 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3706 as_fn_error $? "failed to load site script $ac_site_file
3707 See \`config.log' for more details" "$LINENO" 5; }
3708 fi
3709 done
3710
3711 if test -r "$cache_file"; then
3712 # Some versions of bash will fail to source /dev/null (special files
3713 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
3714 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3715 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3716 $as_echo "$as_me: loading cache $cache_file" >&6;}
3717 case $cache_file in
3718 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3719 *) . "./$cache_file";;
3720 esac
3721 fi
3722 else
3723 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3724 $as_echo "$as_me: creating cache $cache_file" >&6;}
3725 >$cache_file
3726 fi
3727
3728 as_fn_append ac_header_list " wchar.h"
3729 as_fn_append ac_header_list " minix/config.h"
3730 as_fn_append ac_header_list " arpa/inet.h"
3731 as_fn_append ac_header_list " features.h"
3732 as_fn_append ac_header_list " sys/socket.h"
3733 as_fn_append ac_func_list " btowc"
3734 as_fn_append ac_func_list " canonicalize_file_name"
3735 as_fn_append ac_func_list " faccessat"
3736 as_fn_append ac_func_list " realpath"
3737 as_fn_append ac_header_list " sys/param.h"
3738 as_fn_append ac_header_list " unistd.h"
3739 as_fn_append ac_func_list " chown"
3740 as_fn_append ac_func_list " fchown"
3741 as_fn_append ac_func_list " _set_invalid_parameter_handler"
3742 as_fn_append ac_func_list " fchdir"
3743 as_fn_append ac_header_list " dirent.h"
3744 as_fn_append ac_func_list " fcntl"
3745 as_fn_append ac_func_list " symlink"
3746 as_fn_append ac_func_list " fdopendir"
3747 as_fn_append ac_func_list " mempcpy"
3748 as_fn_append ac_header_list " fnmatch.h"
3749 as_fn_append ac_func_list " fnmatch"
3750 as_fn_append ac_func_list " mbsrtowcs"
3751 gl_fnmatch_required=GNU
3752 as_fn_append ac_header_list " sys/stat.h"
3753 as_fn_append ac_func_list " fstatat"
3754 as_fn_append ac_func_list " getdelim"
3755 as_fn_append ac_func_list " getdtablesize"
3756 as_fn_append ac_func_list " getlogin_r"
3757 as_fn_append ac_func_list " getprogname"
3758 as_fn_append ac_func_list " getexecname"
3759 as_fn_append ac_func_list " getrandom"
3760 as_fn_append ac_header_list " sys/time.h"
3761 as_fn_append ac_func_list " gettimeofday"
3762 as_fn_append ac_header_list " glob.h"
3763 as_fn_append ac_func_list " glob"
3764 as_fn_append ac_func_list " glob_pattern_p"
3765 as_fn_append ac_func_list " getpwnam_r"
3766 as_fn_append ac_header_list " threads.h"
3767 as_fn_append ac_header_list " netdb.h"
3768 as_fn_append ac_header_list " netinet/in.h"
3769 as_fn_append ac_header_list " limits.h"
3770 as_fn_append ac_header_list " inttypes.h"
3771 as_fn_append ac_header_list " sys/types.h"
3772 as_fn_append ac_header_list " stdint.h"
3773 as_fn_append ac_func_list " isblank"
3774 as_fn_append ac_header_list " xlocale.h"
3775 as_fn_append ac_func_list " lstat"
3776 as_fn_append ac_header_list " math.h"
3777 as_fn_append ac_func_list " mbsinit"
3778 as_fn_append ac_func_list " mbrtowc"
3779 as_fn_append ac_header_list " sys/mman.h"
3780 as_fn_append ac_func_list " mprotect"
3781 as_fn_append ac_func_list " mkostemp"
3782 as_fn_append ac_func_list " openat"
3783 as_fn_append ac_func_list " pipe"
3784 as_fn_append ac_func_list " readlink"
3785 as_fn_append ac_func_list " link"
3786 as_fn_append ac_func_list " setenv"
3787 as_fn_append ac_func_list " strerror_r"
3788 as_fn_append ac_func_list " __xpg_strerror_r"
3789 as_fn_append ac_func_list " catgets"
3790 as_fn_append ac_func_list " snprintf"
3791 as_fn_append ac_header_list " strings.h"
3792 as_fn_append ac_header_list " sys/random.h"
3793 as_fn_append ac_header_list " sys/uio.h"
3794 as_fn_append ac_func_list " localtime_r"
3795 as_fn_append ac_header_list " crtdefs.h"
3796 as_fn_append ac_func_list " iswcntrl"
3797 as_fn_append ac_header_list " wctype.h"
3798 as_fn_append ac_func_list " wmempcpy"
3799 # Check that the precious variables saved in the cache have kept the same
3800 # value.
3801 ac_cache_corrupted=false
3802 for ac_var in $ac_precious_vars; do
3803 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3804 eval ac_new_set=\$ac_env_${ac_var}_set
3805 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3806 eval ac_new_val=\$ac_env_${ac_var}_value
3807 case $ac_old_set,$ac_new_set in
3808 set,)
3809 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3810 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3811 ac_cache_corrupted=: ;;
3812 ,set)
3813 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3814 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3815 ac_cache_corrupted=: ;;
3816 ,);;
3817 *)
3818 if test "x$ac_old_val" != "x$ac_new_val"; then
3819 # differences in whitespace do not lead to failure.
3820 ac_old_val_w=`echo x $ac_old_val`
3821 ac_new_val_w=`echo x $ac_new_val`
3822 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3823 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3824 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3825 ac_cache_corrupted=:
3826 else
3827 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3828 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3829 eval $ac_var=\$ac_old_val
3830 fi
3831 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3832 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3833 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3834 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
3835 fi;;
3836 esac
3837 # Pass precious variables to config.status.
3838 if test "$ac_new_set" = set; then
3839 case $ac_new_val in
3840 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3841 *) ac_arg=$ac_var=$ac_new_val ;;
3842 esac
3843 case " $ac_configure_args " in
3844 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3845 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3846 esac
3847 fi
3848 done
3849 if $ac_cache_corrupted; then
3850 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3851 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3852 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3853 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3854 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3855 fi
3856 ## -------------------- ##
3857 ## Main body of script. ##
3858 ## -------------------- ##
3859
3860 ac_ext=c
3861 ac_cpp='$CPP $CPPFLAGS'
3862 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3863 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3864 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3865
3866
3867
3868
3869
3870
3871 ac_config_headers="$ac_config_headers config.h:config.in"
3872
3873
3874
3875
3876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
3877 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
3878 # Check whether --enable-maintainer-mode was given.
3879 if test "${enable_maintainer_mode+set}" = set; then :
3880 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
3881 else
3882 USE_MAINTAINER_MODE=no
3883 fi
3884
3885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
3886 $as_echo "$USE_MAINTAINER_MODE" >&6; }
3887 if test $USE_MAINTAINER_MODE = yes; then
3888 MAINTAINER_MODE_TRUE=
3889 MAINTAINER_MODE_FALSE='#'
3890 else
3891 MAINTAINER_MODE_TRUE='#'
3892 MAINTAINER_MODE_FALSE=
3893 fi
3894
3895 MAINT=$MAINTAINER_MODE_TRUE
3896
3897
3898
3899 ac_ext=c
3900 ac_cpp='$CPP $CPPFLAGS'
3901 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3902 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3903 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3904 if test -n "$ac_tool_prefix"; then
3905 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3906 set dummy ${ac_tool_prefix}gcc; ac_word=$2
3907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3908 $as_echo_n "checking for $ac_word... " >&6; }
3909 if ${ac_cv_prog_CC+:} false; then :
3910 $as_echo_n "(cached) " >&6
3911 else
3912 if test -n "$CC"; then
3913 ac_cv_prog_CC="$CC" # Let the user override the test.
3914 else
3915 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3916 for as_dir in $PATH
3917 do
3918 IFS=$as_save_IFS
3919 test -z "$as_dir" && as_dir=.
3920 for ac_exec_ext in '' $ac_executable_extensions; do
3921 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3922 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3923 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3924 break 2
3925 fi
3926 done
3927 done
3928 IFS=$as_save_IFS
3929
3930 fi
3931 fi
3932 CC=$ac_cv_prog_CC
3933 if test -n "$CC"; then
3934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3935 $as_echo "$CC" >&6; }
3936 else
3937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3938 $as_echo "no" >&6; }
3939 fi
3940
3941
3942 fi
3943 if test -z "$ac_cv_prog_CC"; then
3944 ac_ct_CC=$CC
3945 # Extract the first word of "gcc", so it can be a program name with args.
3946 set dummy gcc; ac_word=$2
3947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3948 $as_echo_n "checking for $ac_word... " >&6; }
3949 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3950 $as_echo_n "(cached) " >&6
3951 else
3952 if test -n "$ac_ct_CC"; then
3953 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3954 else
3955 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3956 for as_dir in $PATH
3957 do
3958 IFS=$as_save_IFS
3959 test -z "$as_dir" && as_dir=.
3960 for ac_exec_ext in '' $ac_executable_extensions; do
3961 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3962 ac_cv_prog_ac_ct_CC="gcc"
3963 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3964 break 2
3965 fi
3966 done
3967 done
3968 IFS=$as_save_IFS
3969
3970 fi
3971 fi
3972 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3973 if test -n "$ac_ct_CC"; then
3974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3975 $as_echo "$ac_ct_CC" >&6; }
3976 else
3977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3978 $as_echo "no" >&6; }
3979 fi
3980
3981 if test "x$ac_ct_CC" = x; then
3982 CC=""
3983 else
3984 case $cross_compiling:$ac_tool_warned in
3985 yes:)
3986 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3987 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3988 ac_tool_warned=yes ;;
3989 esac
3990 CC=$ac_ct_CC
3991 fi
3992 else
3993 CC="$ac_cv_prog_CC"
3994 fi
3995
3996 if test -z "$CC"; then
3997 if test -n "$ac_tool_prefix"; then
3998 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3999 set dummy ${ac_tool_prefix}cc; ac_word=$2
4000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4001 $as_echo_n "checking for $ac_word... " >&6; }
4002 if ${ac_cv_prog_CC+:} false; then :
4003 $as_echo_n "(cached) " >&6
4004 else
4005 if test -n "$CC"; then
4006 ac_cv_prog_CC="$CC" # Let the user override the test.
4007 else
4008 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4009 for as_dir in $PATH
4010 do
4011 IFS=$as_save_IFS
4012 test -z "$as_dir" && as_dir=.
4013 for ac_exec_ext in '' $ac_executable_extensions; do
4014 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4015 ac_cv_prog_CC="${ac_tool_prefix}cc"
4016 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4017 break 2
4018 fi
4019 done
4020 done
4021 IFS=$as_save_IFS
4022
4023 fi
4024 fi
4025 CC=$ac_cv_prog_CC
4026 if test -n "$CC"; then
4027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4028 $as_echo "$CC" >&6; }
4029 else
4030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4031 $as_echo "no" >&6; }
4032 fi
4033
4034
4035 fi
4036 fi
4037 if test -z "$CC"; then
4038 # Extract the first word of "cc", so it can be a program name with args.
4039 set dummy cc; ac_word=$2
4040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4041 $as_echo_n "checking for $ac_word... " >&6; }
4042 if ${ac_cv_prog_CC+:} false; then :
4043 $as_echo_n "(cached) " >&6
4044 else
4045 if test -n "$CC"; then
4046 ac_cv_prog_CC="$CC" # Let the user override the test.
4047 else
4048 ac_prog_rejected=no
4049 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4050 for as_dir in $PATH
4051 do
4052 IFS=$as_save_IFS
4053 test -z "$as_dir" && as_dir=.
4054 for ac_exec_ext in '' $ac_executable_extensions; do
4055 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4056 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4057 ac_prog_rejected=yes
4058 continue
4059 fi
4060 ac_cv_prog_CC="cc"
4061 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4062 break 2
4063 fi
4064 done
4065 done
4066 IFS=$as_save_IFS
4067
4068 if test $ac_prog_rejected = yes; then
4069 # We found a bogon in the path, so make sure we never use it.
4070 set dummy $ac_cv_prog_CC
4071 shift
4072 if test $# != 0; then
4073 # We chose a different compiler from the bogus one.
4074 # However, it has the same basename, so the bogon will be chosen
4075 # first if we set CC to just the basename; use the full file name.
4076 shift
4077 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4078 fi
4079 fi
4080 fi
4081 fi
4082 CC=$ac_cv_prog_CC
4083 if test -n "$CC"; then
4084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4085 $as_echo "$CC" >&6; }
4086 else
4087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4088 $as_echo "no" >&6; }
4089 fi
4090
4091
4092 fi
4093 if test -z "$CC"; then
4094 if test -n "$ac_tool_prefix"; then
4095 for ac_prog in cl.exe
4096 do
4097 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4098 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4100 $as_echo_n "checking for $ac_word... " >&6; }
4101 if ${ac_cv_prog_CC+:} false; then :
4102 $as_echo_n "(cached) " >&6
4103 else
4104 if test -n "$CC"; then
4105 ac_cv_prog_CC="$CC" # Let the user override the test.
4106 else
4107 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4108 for as_dir in $PATH
4109 do
4110 IFS=$as_save_IFS
4111 test -z "$as_dir" && as_dir=.
4112 for ac_exec_ext in '' $ac_executable_extensions; do
4113 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4114 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4115 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4116 break 2
4117 fi
4118 done
4119 done
4120 IFS=$as_save_IFS
4121
4122 fi
4123 fi
4124 CC=$ac_cv_prog_CC
4125 if test -n "$CC"; then
4126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4127 $as_echo "$CC" >&6; }
4128 else
4129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4130 $as_echo "no" >&6; }
4131 fi
4132
4133
4134 test -n "$CC" && break
4135 done
4136 fi
4137 if test -z "$CC"; then
4138 ac_ct_CC=$CC
4139 for ac_prog in cl.exe
4140 do
4141 # Extract the first word of "$ac_prog", so it can be a program name with args.
4142 set dummy $ac_prog; ac_word=$2
4143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4144 $as_echo_n "checking for $ac_word... " >&6; }
4145 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4146 $as_echo_n "(cached) " >&6
4147 else
4148 if test -n "$ac_ct_CC"; then
4149 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4150 else
4151 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4152 for as_dir in $PATH
4153 do
4154 IFS=$as_save_IFS
4155 test -z "$as_dir" && as_dir=.
4156 for ac_exec_ext in '' $ac_executable_extensions; do
4157 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4158 ac_cv_prog_ac_ct_CC="$ac_prog"
4159 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4160 break 2
4161 fi
4162 done
4163 done
4164 IFS=$as_save_IFS
4165
4166 fi
4167 fi
4168 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4169 if test -n "$ac_ct_CC"; then
4170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4171 $as_echo "$ac_ct_CC" >&6; }
4172 else
4173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4174 $as_echo "no" >&6; }
4175 fi
4176
4177
4178 test -n "$ac_ct_CC" && break
4179 done
4180
4181 if test "x$ac_ct_CC" = x; then
4182 CC=""
4183 else
4184 case $cross_compiling:$ac_tool_warned in
4185 yes:)
4186 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4187 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4188 ac_tool_warned=yes ;;
4189 esac
4190 CC=$ac_ct_CC
4191 fi
4192 fi
4193
4194 fi
4195 if test -z "$CC"; then
4196 if test -n "$ac_tool_prefix"; then
4197 # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
4198 set dummy ${ac_tool_prefix}clang; ac_word=$2
4199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4200 $as_echo_n "checking for $ac_word... " >&6; }
4201 if ${ac_cv_prog_CC+:} false; then :
4202 $as_echo_n "(cached) " >&6
4203 else
4204 if test -n "$CC"; then
4205 ac_cv_prog_CC="$CC" # Let the user override the test.
4206 else
4207 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4208 for as_dir in $PATH
4209 do
4210 IFS=$as_save_IFS
4211 test -z "$as_dir" && as_dir=.
4212 for ac_exec_ext in '' $ac_executable_extensions; do
4213 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4214 ac_cv_prog_CC="${ac_tool_prefix}clang"
4215 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4216 break 2
4217 fi
4218 done
4219 done
4220 IFS=$as_save_IFS
4221
4222 fi
4223 fi
4224 CC=$ac_cv_prog_CC
4225 if test -n "$CC"; then
4226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4227 $as_echo "$CC" >&6; }
4228 else
4229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4230 $as_echo "no" >&6; }
4231 fi
4232
4233
4234 fi
4235 if test -z "$ac_cv_prog_CC"; then
4236 ac_ct_CC=$CC
4237 # Extract the first word of "clang", so it can be a program name with args.
4238 set dummy clang; ac_word=$2
4239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4240 $as_echo_n "checking for $ac_word... " >&6; }
4241 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4242 $as_echo_n "(cached) " >&6
4243 else
4244 if test -n "$ac_ct_CC"; then
4245 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4246 else
4247 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4248 for as_dir in $PATH
4249 do
4250 IFS=$as_save_IFS
4251 test -z "$as_dir" && as_dir=.
4252 for ac_exec_ext in '' $ac_executable_extensions; do
4253 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4254 ac_cv_prog_ac_ct_CC="clang"
4255 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4256 break 2
4257 fi
4258 done
4259 done
4260 IFS=$as_save_IFS
4261
4262 fi
4263 fi
4264 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4265 if test -n "$ac_ct_CC"; then
4266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4267 $as_echo "$ac_ct_CC" >&6; }
4268 else
4269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4270 $as_echo "no" >&6; }
4271 fi
4272
4273 if test "x$ac_ct_CC" = x; then
4274 CC=""
4275 else
4276 case $cross_compiling:$ac_tool_warned in
4277 yes:)
4278 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4279 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4280 ac_tool_warned=yes ;;
4281 esac
4282 CC=$ac_ct_CC
4283 fi
4284 else
4285 CC="$ac_cv_prog_CC"
4286 fi
4287
4288 fi
4289
4290
4291 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4292 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4293 as_fn_error $? "no acceptable C compiler found in \$PATH
4294 See \`config.log' for more details" "$LINENO" 5; }
4295
4296 # Provide some information about the compiler.
4297 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4298 set X $ac_compile
4299 ac_compiler=$2
4300 for ac_option in --version -v -V -qversion -version; do
4301 { { ac_try="$ac_compiler $ac_option >&5"
4302 case "(($ac_try" in
4303 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4304 *) ac_try_echo=$ac_try;;
4305 esac
4306 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4307 $as_echo "$ac_try_echo"; } >&5
4308 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4309 ac_status=$?
4310 if test -s conftest.err; then
4311 sed '10a\
4312 ... rest of stderr output deleted ...
4313 10q' conftest.err >conftest.er1
4314 cat conftest.er1 >&5
4315 fi
4316 rm -f conftest.er1 conftest.err
4317 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4318 test $ac_status = 0; }
4319 done
4320
4321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4322 /* end confdefs.h. */
4323
4324 int
4325 main ()
4326 {
4327
4328 ;
4329 return 0;
4330 }
4331 _ACEOF
4332 ac_clean_files_save=$ac_clean_files
4333 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4334 # Try to create an executable without -o first, disregard a.out.
4335 # It will help us diagnose broken compilers, and finding out an intuition
4336 # of exeext.
4337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4338 $as_echo_n "checking whether the C compiler works... " >&6; }
4339 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4340
4341 # The possible output files:
4342 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4343
4344 ac_rmfiles=
4345 for ac_file in $ac_files
4346 do
4347 case $ac_file in
4348 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4349 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4350 esac
4351 done
4352 rm -f $ac_rmfiles
4353
4354 if { { ac_try="$ac_link_default"
4355 case "(($ac_try" in
4356 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4357 *) ac_try_echo=$ac_try;;
4358 esac
4359 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4360 $as_echo "$ac_try_echo"; } >&5
4361 (eval "$ac_link_default") 2>&5
4362 ac_status=$?
4363 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4364 test $ac_status = 0; }; then :
4365 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4366 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4367 # in a Makefile. We should not override ac_cv_exeext if it was cached,
4368 # so that the user can short-circuit this test for compilers unknown to
4369 # Autoconf.
4370 for ac_file in $ac_files ''
4371 do
4372 test -f "$ac_file" || continue
4373 case $ac_file in
4374 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4375 ;;
4376 [ab].out )
4377 # We found the default executable, but exeext='' is most
4378 # certainly right.
4379 break;;
4380 *.* )
4381 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4382 then :; else
4383 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4384 fi
4385 # We set ac_cv_exeext here because the later test for it is not
4386 # safe: cross compilers may not add the suffix if given an `-o'
4387 # argument, so we may need to know it at that point already.
4388 # Even if this section looks crufty: it has the advantage of
4389 # actually working.
4390 break;;
4391 * )
4392 break;;
4393 esac
4394 done
4395 test "$ac_cv_exeext" = no && ac_cv_exeext=
4396
4397 else
4398 ac_file=''
4399 fi
4400 if test -z "$ac_file"; then :
4401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4402 $as_echo "no" >&6; }
4403 $as_echo "$as_me: failed program was:" >&5
4404 sed 's/^/| /' conftest.$ac_ext >&5
4405
4406 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4407 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4408 as_fn_error 77 "C compiler cannot create executables
4409 See \`config.log' for more details" "$LINENO" 5; }
4410 else
4411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4412 $as_echo "yes" >&6; }
4413 fi
4414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4415 $as_echo_n "checking for C compiler default output file name... " >&6; }
4416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4417 $as_echo "$ac_file" >&6; }
4418 ac_exeext=$ac_cv_exeext
4419
4420 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4421 ac_clean_files=$ac_clean_files_save
4422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4423 $as_echo_n "checking for suffix of executables... " >&6; }
4424 if { { ac_try="$ac_link"
4425 case "(($ac_try" in
4426 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4427 *) ac_try_echo=$ac_try;;
4428 esac
4429 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4430 $as_echo "$ac_try_echo"; } >&5
4431 (eval "$ac_link") 2>&5
4432 ac_status=$?
4433 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4434 test $ac_status = 0; }; then :
4435 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4436 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4437 # work properly (i.e., refer to `conftest.exe'), while it won't with
4438 # `rm'.
4439 for ac_file in conftest.exe conftest conftest.*; do
4440 test -f "$ac_file" || continue
4441 case $ac_file in
4442 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4443 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4444 break;;
4445 * ) break;;
4446 esac
4447 done
4448 else
4449 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4450 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4451 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4452 See \`config.log' for more details" "$LINENO" 5; }
4453 fi
4454 rm -f conftest conftest$ac_cv_exeext
4455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4456 $as_echo "$ac_cv_exeext" >&6; }
4457
4458 rm -f conftest.$ac_ext
4459 EXEEXT=$ac_cv_exeext
4460 ac_exeext=$EXEEXT
4461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4462 /* end confdefs.h. */
4463 #include <stdio.h>
4464 int
4465 main ()
4466 {
4467 FILE *f = fopen ("conftest.out", "w");
4468 return ferror (f) || fclose (f) != 0;
4469
4470 ;
4471 return 0;
4472 }
4473 _ACEOF
4474 ac_clean_files="$ac_clean_files conftest.out"
4475 # Check that the compiler produces executables we can run. If not, either
4476 # the compiler is broken, or we cross compile.
4477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4478 $as_echo_n "checking whether we are cross compiling... " >&6; }
4479 if test "$cross_compiling" != yes; then
4480 { { ac_try="$ac_link"
4481 case "(($ac_try" in
4482 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4483 *) ac_try_echo=$ac_try;;
4484 esac
4485 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4486 $as_echo "$ac_try_echo"; } >&5
4487 (eval "$ac_link") 2>&5
4488 ac_status=$?
4489 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4490 test $ac_status = 0; }
4491 if { ac_try='./conftest$ac_cv_exeext'
4492 { { case "(($ac_try" in
4493 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4494 *) ac_try_echo=$ac_try;;
4495 esac
4496 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4497 $as_echo "$ac_try_echo"; } >&5
4498 (eval "$ac_try") 2>&5
4499 ac_status=$?
4500 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4501 test $ac_status = 0; }; }; then
4502 cross_compiling=no
4503 else
4504 if test "$cross_compiling" = maybe; then
4505 cross_compiling=yes
4506 else
4507 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4508 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4509 as_fn_error $? "cannot run C compiled programs.
4510 If you meant to cross compile, use \`--host'.
4511 See \`config.log' for more details" "$LINENO" 5; }
4512 fi
4513 fi
4514 fi
4515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4516 $as_echo "$cross_compiling" >&6; }
4517
4518 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4519 ac_clean_files=$ac_clean_files_save
4520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4521 $as_echo_n "checking for suffix of object files... " >&6; }
4522 if ${ac_cv_objext+:} false; then :
4523 $as_echo_n "(cached) " >&6
4524 else
4525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4526 /* end confdefs.h. */
4527
4528 int
4529 main ()
4530 {
4531
4532 ;
4533 return 0;
4534 }
4535 _ACEOF
4536 rm -f conftest.o conftest.obj
4537 if { { ac_try="$ac_compile"
4538 case "(($ac_try" in
4539 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4540 *) ac_try_echo=$ac_try;;
4541 esac
4542 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4543 $as_echo "$ac_try_echo"; } >&5
4544 (eval "$ac_compile") 2>&5
4545 ac_status=$?
4546 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4547 test $ac_status = 0; }; then :
4548 for ac_file in conftest.o conftest.obj conftest.*; do
4549 test -f "$ac_file" || continue;
4550 case $ac_file in
4551 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4552 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4553 break;;
4554 esac
4555 done
4556 else
4557 $as_echo "$as_me: failed program was:" >&5
4558 sed 's/^/| /' conftest.$ac_ext >&5
4559
4560 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4561 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4562 as_fn_error $? "cannot compute suffix of object files: cannot compile
4563 See \`config.log' for more details" "$LINENO" 5; }
4564 fi
4565 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4566 fi
4567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4568 $as_echo "$ac_cv_objext" >&6; }
4569 OBJEXT=$ac_cv_objext
4570 ac_objext=$OBJEXT
4571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4572 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4573 if ${ac_cv_c_compiler_gnu+:} false; then :
4574 $as_echo_n "(cached) " >&6
4575 else
4576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4577 /* end confdefs.h. */
4578
4579 int
4580 main ()
4581 {
4582 #ifndef __GNUC__
4583 choke me
4584 #endif
4585
4586 ;
4587 return 0;
4588 }
4589 _ACEOF
4590 if ac_fn_c_try_compile "$LINENO"; then :
4591 ac_compiler_gnu=yes
4592 else
4593 ac_compiler_gnu=no
4594 fi
4595 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4596 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4597
4598 fi
4599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4600 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4601 if test $ac_compiler_gnu = yes; then
4602 GCC=yes
4603 else
4604 GCC=
4605 fi
4606 ac_test_CFLAGS=${CFLAGS+set}
4607 ac_save_CFLAGS=$CFLAGS
4608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4609 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4610 if ${ac_cv_prog_cc_g+:} false; then :
4611 $as_echo_n "(cached) " >&6
4612 else
4613 ac_save_c_werror_flag=$ac_c_werror_flag
4614 ac_c_werror_flag=yes
4615 ac_cv_prog_cc_g=no
4616 CFLAGS="-g"
4617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4618 /* end confdefs.h. */
4619
4620 int
4621 main ()
4622 {
4623
4624 ;
4625 return 0;
4626 }
4627 _ACEOF
4628 if ac_fn_c_try_compile "$LINENO"; then :
4629 ac_cv_prog_cc_g=yes
4630 else
4631 CFLAGS=""
4632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4633 /* end confdefs.h. */
4634
4635 int
4636 main ()
4637 {
4638
4639 ;
4640 return 0;
4641 }
4642 _ACEOF
4643 if ac_fn_c_try_compile "$LINENO"; then :
4644
4645 else
4646 ac_c_werror_flag=$ac_save_c_werror_flag
4647 CFLAGS="-g"
4648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4649 /* end confdefs.h. */
4650
4651 int
4652 main ()
4653 {
4654
4655 ;
4656 return 0;
4657 }
4658 _ACEOF
4659 if ac_fn_c_try_compile "$LINENO"; then :
4660 ac_cv_prog_cc_g=yes
4661 fi
4662 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4663 fi
4664 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4665 fi
4666 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4667 ac_c_werror_flag=$ac_save_c_werror_flag
4668 fi
4669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4670 $as_echo "$ac_cv_prog_cc_g" >&6; }
4671 if test "$ac_test_CFLAGS" = set; then
4672 CFLAGS=$ac_save_CFLAGS
4673 elif test $ac_cv_prog_cc_g = yes; then
4674 if test "$GCC" = yes; then
4675 CFLAGS="-g -O2"
4676 else
4677 CFLAGS="-g"
4678 fi
4679 else
4680 if test "$GCC" = yes; then
4681 CFLAGS="-O2"
4682 else
4683 CFLAGS=
4684 fi
4685 fi
4686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
4687 $as_echo_n "checking for $CC option to enable C11 features... " >&6; }
4688 if ${ac_cv_prog_cc_c11+:} false; then :
4689 $as_echo_n "(cached) " >&6
4690 else
4691 ac_cv_prog_cc_c11=no
4692 ac_save_CC=$CC
4693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4694 /* end confdefs.h. */
4695 #include <stdarg.h>
4696 #include <stdbool.h>
4697 #include <stddef.h>
4698 #include <stdlib.h>
4699 #include <wchar.h>
4700 #include <stdio.h>
4701
4702 // Check varargs macros. These examples are taken from C99 6.10.3.5.
4703 #define debug(...) fprintf (stderr, __VA_ARGS__)
4704 #define showlist(...) puts (#__VA_ARGS__)
4705 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4706 static void
4707 test_varargs_macros (void)
4708 {
4709 int x = 1234;
4710 int y = 5678;
4711 debug ("Flag");
4712 debug ("X = %d\n", x);
4713 showlist (The first, second, and third items.);
4714 report (x>y, "x is %d but y is %d", x, y);
4715 }
4716
4717 // Check long long types.
4718 #define BIG64 18446744073709551615ull
4719 #define BIG32 4294967295ul
4720 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4721 #if !BIG_OK
4722 your preprocessor is broken;
4723 #endif
4724 #if BIG_OK
4725 #else
4726 your preprocessor is broken;
4727 #endif
4728 static long long int bignum = -9223372036854775807LL;
4729 static unsigned long long int ubignum = BIG64;
4730
4731 struct incomplete_array
4732 {
4733 int datasize;
4734 double data[];
4735 };
4736
4737 struct named_init {
4738 int number;
4739 const wchar_t *name;
4740 double average;
4741 };
4742
4743 typedef const char *ccp;
4744
4745 static inline int
4746 test_restrict (ccp restrict text)
4747 {
4748 // See if C++-style comments work.
4749 // Iterate through items via the restricted pointer.
4750 // Also check for declarations in for loops.
4751 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4752 continue;
4753 return 0;
4754 }
4755
4756 // Check varargs and va_copy.
4757 static bool
4758 test_varargs (const char *format, ...)
4759 {
4760 va_list args;
4761 va_start (args, format);
4762 va_list args_copy;
4763 va_copy (args_copy, args);
4764
4765 const char *str = "";
4766 int number = 0;
4767 float fnumber = 0;
4768
4769 while (*format)
4770 {
4771 switch (*format++)
4772 {
4773 case 's': // string
4774 str = va_arg (args_copy, const char *);
4775 break;
4776 case 'd': // int
4777 number = va_arg (args_copy, int);
4778 break;
4779 case 'f': // float
4780 fnumber = va_arg (args_copy, double);
4781 break;
4782 default:
4783 break;
4784 }
4785 }
4786 va_end (args_copy);
4787 va_end (args);
4788
4789 return *str && number && fnumber;
4790 }
4791 // Check _Alignas.
4792 char _Alignas (double) aligned_as_double;
4793 char _Alignas (0) no_special_alignment;
4794 extern char aligned_as_int;
4795 char _Alignas (0) _Alignas (int) aligned_as_int;
4796
4797 // Check _Alignof.
4798 enum
4799 {
4800 int_alignment = _Alignof (int),
4801 int_array_alignment = _Alignof (int[100]),
4802 char_alignment = _Alignof (char)
4803 };
4804 _Static_assert (0 < -_Alignof (int), "_Alignof is signed");
4805
4806 // Check _Noreturn.
4807 int _Noreturn does_not_return (void) { for (;;) continue; }
4808
4809 // Check _Static_assert.
4810 struct test_static_assert
4811 {
4812 int x;
4813 _Static_assert (sizeof (int) <= sizeof (long int),
4814 "_Static_assert does not work in struct");
4815 long int y;
4816 };
4817
4818 // Check UTF-8 literals.
4819 #define u8 syntax error!
4820 char const utf8_literal[] = u8"happens to be ASCII" "another string";
4821
4822 // Check duplicate typedefs.
4823 typedef long *long_ptr;
4824 typedef long int *long_ptr;
4825 typedef long_ptr long_ptr;
4826
4827 // Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
4828 struct anonymous
4829 {
4830 union {
4831 struct { int i; int j; };
4832 struct { int k; long int l; } w;
4833 };
4834 int m;
4835 } v1;
4836
4837 int
4838 main ()
4839 {
4840
4841 // Check bool.
4842 _Bool success = false;
4843
4844 // Check restrict.
4845 if (test_restrict ("String literal") == 0)
4846 success = true;
4847 char *restrict newvar = "Another string";
4848
4849 // Check varargs.
4850 success &= test_varargs ("s, d' f .", "string", 65, 34.234);
4851 test_varargs_macros ();
4852
4853 // Check flexible array members.
4854 struct incomplete_array *ia =
4855 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4856 ia->datasize = 10;
4857 for (int i = 0; i < ia->datasize; ++i)
4858 ia->data[i] = i * 1.234;
4859
4860 // Check named initializers.
4861 struct named_init ni = {
4862 .number = 34,
4863 .name = L"Test wide string",
4864 .average = 543.34343,
4865 };
4866
4867 ni.number = 58;
4868
4869 int dynamic_array[ni.number];
4870 dynamic_array[ni.number - 1] = 543;
4871
4872 // work around unused variable warnings
4873 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
4874 || dynamic_array[ni.number - 1] != 543);
4875
4876 v1.i = 2;
4877 v1.w.k = 5;
4878 _Static_assert ((offsetof (struct anonymous, i)
4879 == offsetof (struct anonymous, w.k)),
4880 "Anonymous union alignment botch");
4881
4882 ;
4883 return 0;
4884 }
4885 _ACEOF
4886 for ac_arg in '' -std=gnu11
4887 do
4888 CC="$ac_save_CC $ac_arg"
4889 if ac_fn_c_try_compile "$LINENO"; then :
4890 ac_cv_prog_cc_c11=$ac_arg
4891 fi
4892 rm -f core conftest.err conftest.$ac_objext
4893 test "x$ac_cv_prog_cc_c11" != "xno" && break
4894 done
4895 rm -f conftest.$ac_ext
4896 CC=$ac_save_CC
4897
4898 fi
4899 # AC_CACHE_VAL
4900 ac_prog_cc_stdc_options=
4901 case "x$ac_cv_prog_cc_c11" in
4902 x)
4903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4904 $as_echo "none needed" >&6; } ;;
4905 xno)
4906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4907 $as_echo "unsupported" >&6; } ;;
4908 *)
4909 ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c11"
4910 CC=$CC$ac_prog_cc_stdc_options
4911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
4912 $as_echo "$ac_cv_prog_cc_c11" >&6; } ;;
4913 esac
4914 if test "x$ac_cv_prog_cc_c11" != xno; then :
4915 ac_prog_cc_stdc=c11
4916 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
4917 else
4918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
4919 $as_echo_n "checking for $CC option to enable C99 features... " >&6; }
4920 if ${ac_cv_prog_cc_c99+:} false; then :
4921 $as_echo_n "(cached) " >&6
4922 else
4923 ac_cv_prog_cc_c99=no
4924 ac_save_CC=$CC
4925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4926 /* end confdefs.h. */
4927 #include <stdarg.h>
4928 #include <stdbool.h>
4929 #include <stddef.h>
4930 #include <stdlib.h>
4931 #include <wchar.h>
4932 #include <stdio.h>
4933
4934 // Check varargs macros. These examples are taken from C99 6.10.3.5.
4935 #define debug(...) fprintf (stderr, __VA_ARGS__)
4936 #define showlist(...) puts (#__VA_ARGS__)
4937 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4938 static void
4939 test_varargs_macros (void)
4940 {
4941 int x = 1234;
4942 int y = 5678;
4943 debug ("Flag");
4944 debug ("X = %d\n", x);
4945 showlist (The first, second, and third items.);
4946 report (x>y, "x is %d but y is %d", x, y);
4947 }
4948
4949 // Check long long types.
4950 #define BIG64 18446744073709551615ull
4951 #define BIG32 4294967295ul
4952 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4953 #if !BIG_OK
4954 your preprocessor is broken;
4955 #endif
4956 #if BIG_OK
4957 #else
4958 your preprocessor is broken;
4959 #endif
4960 static long long int bignum = -9223372036854775807LL;
4961 static unsigned long long int ubignum = BIG64;
4962
4963 struct incomplete_array
4964 {
4965 int datasize;
4966 double data[];
4967 };
4968
4969 struct named_init {
4970 int number;
4971 const wchar_t *name;
4972 double average;
4973 };
4974
4975 typedef const char *ccp;
4976
4977 static inline int
4978 test_restrict (ccp restrict text)
4979 {
4980 // See if C++-style comments work.
4981 // Iterate through items via the restricted pointer.
4982 // Also check for declarations in for loops.
4983 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4984 continue;
4985 return 0;
4986 }
4987
4988 // Check varargs and va_copy.
4989 static bool
4990 test_varargs (const char *format, ...)
4991 {
4992 va_list args;
4993 va_start (args, format);
4994 va_list args_copy;
4995 va_copy (args_copy, args);
4996
4997 const char *str = "";
4998 int number = 0;
4999 float fnumber = 0;
5000
5001 while (*format)
5002 {
5003 switch (*format++)
5004 {
5005 case 's': // string
5006 str = va_arg (args_copy, const char *);
5007 break;
5008 case 'd': // int
5009 number = va_arg (args_copy, int);
5010 break;
5011 case 'f': // float
5012 fnumber = va_arg (args_copy, double);
5013 break;
5014 default:
5015 break;
5016 }
5017 }
5018 va_end (args_copy);
5019 va_end (args);
5020
5021 return *str && number && fnumber;
5022 }
5023 int
5024 main ()
5025 {
5026
5027 // Check bool.
5028 _Bool success = false;
5029
5030 // Check restrict.
5031 if (test_restrict ("String literal") == 0)
5032 success = true;
5033 char *restrict newvar = "Another string";
5034
5035 // Check varargs.
5036 success &= test_varargs ("s, d' f .", "string", 65, 34.234);
5037 test_varargs_macros ();
5038
5039 // Check flexible array members.
5040 struct incomplete_array *ia =
5041 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
5042 ia->datasize = 10;
5043 for (int i = 0; i < ia->datasize; ++i)
5044 ia->data[i] = i * 1.234;
5045
5046 // Check named initializers.
5047 struct named_init ni = {
5048 .number = 34,
5049 .name = L"Test wide string",
5050 .average = 543.34343,
5051 };
5052
5053 ni.number = 58;
5054
5055 int dynamic_array[ni.number];
5056 dynamic_array[ni.number - 1] = 543;
5057
5058 // work around unused variable warnings
5059 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
5060 || dynamic_array[ni.number - 1] != 543);
5061
5062 ;
5063 return 0;
5064 }
5065 _ACEOF
5066 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc1x -qlanglvl=extc99
5067 do
5068 CC="$ac_save_CC $ac_arg"
5069 if ac_fn_c_try_compile "$LINENO"; then :
5070 ac_cv_prog_cc_c99=$ac_arg
5071 fi
5072 rm -f core conftest.err conftest.$ac_objext
5073 test "x$ac_cv_prog_cc_c99" != "xno" && break
5074 done
5075 rm -f conftest.$ac_ext
5076 CC=$ac_save_CC
5077
5078 fi
5079 # AC_CACHE_VAL
5080 ac_prog_cc_stdc_options=
5081 case "x$ac_cv_prog_cc_c99" in
5082 x)
5083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5084 $as_echo "none needed" >&6; } ;;
5085 xno)
5086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5087 $as_echo "unsupported" >&6; } ;;
5088 *)
5089 ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c99"
5090 CC=$CC$ac_prog_cc_stdc_options
5091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
5092 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
5093 esac
5094 if test "x$ac_cv_prog_cc_c99" != xno; then :
5095 ac_prog_cc_stdc=c99
5096 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
5097 else
5098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
5099 $as_echo_n "checking for $CC option to enable C89 features... " >&6; }
5100 if ${ac_cv_prog_cc_c89+:} false; then :
5101 $as_echo_n "(cached) " >&6
5102 else
5103 ac_cv_prog_cc_c89=no
5104 ac_save_CC=$CC
5105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5106 /* end confdefs.h. */
5107 #include <stdarg.h>
5108 #include <stdio.h>
5109 struct stat;
5110 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
5111 struct buf { int x; };
5112 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5113 static char *e (p, i)
5114 char **p;
5115 int i;
5116 {
5117 return p[i];
5118 }
5119 static char *f (char * (*g) (char **, int), char **p, ...)
5120 {
5121 char *s;
5122 va_list v;
5123 va_start (v,p);
5124 s = g (p, va_arg (v,int));
5125 va_end (v);
5126 return s;
5127 }
5128
5129 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
5130 function prototypes and stuff, but not '\xHH' hex character constants.
5131 These don't provoke an error unfortunately, instead are silently treated
5132 as 'x'. The following induces an error, until -std is added to get
5133 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
5134 array size at least. It's necessary to write '\x00'==0 to get something
5135 that's true only with -std. */
5136 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5137
5138 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5139 inside strings and character constants. */
5140 #define FOO(x) 'x'
5141 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5142
5143 int test (int i, double x);
5144 struct s1 {int (*f) (int a);};
5145 struct s2 {int (*f) (double a);};
5146 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5147 int argc;
5148 char **argv;
5149 int
5150 main ()
5151 {
5152 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5153 ;
5154 return 0;
5155 }
5156 _ACEOF
5157 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5158 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5159 do
5160 CC="$ac_save_CC $ac_arg"
5161 if ac_fn_c_try_compile "$LINENO"; then :
5162 ac_cv_prog_cc_c89=$ac_arg
5163 fi
5164 rm -f core conftest.err conftest.$ac_objext
5165 test "x$ac_cv_prog_cc_c89" != "xno" && break
5166 done
5167 rm -f conftest.$ac_ext
5168 CC=$ac_save_CC
5169
5170 fi
5171 # AC_CACHE_VAL
5172 ac_prog_cc_stdc_options=
5173 case "x$ac_cv_prog_cc_c89" in
5174 x)
5175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5176 $as_echo "none needed" >&6; } ;;
5177 xno)
5178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5179 $as_echo "unsupported" >&6; } ;;
5180 *)
5181 ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c89"
5182 CC=$CC$ac_prog_cc_stdc_options
5183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5184 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5185 esac
5186 if test "x$ac_cv_prog_cc_c89" != xno; then :
5187 ac_prog_cc_stdc=c89
5188 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
5189 else
5190 ac_prog_cc_stdc=no
5191 ac_cv_prog_cc_stdc=no
5192 fi
5193
5194 fi
5195
5196 fi
5197
5198 ac_ext=c
5199 ac_cpp='$CPP $CPPFLAGS'
5200 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5201 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5202 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5203
5204
5205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler is clang" >&5
5206 $as_echo_n "checking whether the compiler is clang... " >&6; }
5207 if ${gl_cv_compiler_clang+:} false; then :
5208 $as_echo_n "(cached) " >&6
5209 else
5210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5211 /* end confdefs.h. */
5212
5213 #ifdef __clang__
5214 barfbarf
5215 #endif
5216
5217 int
5218 main ()
5219 {
5220
5221 ;
5222 return 0;
5223 }
5224
5225 _ACEOF
5226 if ac_fn_c_try_compile "$LINENO"; then :
5227 gl_cv_compiler_clang=no
5228 else
5229 gl_cv_compiler_clang=yes
5230 fi
5231 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5232
5233 fi
5234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_clang" >&5
5235 $as_echo "$gl_cv_compiler_clang" >&6; }
5236
5237
5238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler option needed when checking for declarations" >&5
5239 $as_echo_n "checking for compiler option needed when checking for declarations... " >&6; }
5240 if ${gl_cv_compiler_check_decl_option+:} false; then :
5241 $as_echo_n "(cached) " >&6
5242 else
5243 if test $gl_cv_compiler_clang = yes; then
5244 save_ac_compile="$ac_compile"
5245 ac_compile="$ac_compile -Werror=implicit-function-declaration"
5246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5247 /* end confdefs.h. */
5248
5249 int
5250 main ()
5251 {
5252
5253 ;
5254 return 0;
5255 }
5256 _ACEOF
5257 if ac_fn_c_try_compile "$LINENO"; then :
5258 gl_cv_compiler_check_decl_option='-Werror=implicit-function-declaration'
5259 else
5260 gl_cv_compiler_check_decl_option=none
5261 fi
5262 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5263 ac_compile="$save_ac_compile"
5264 else
5265 gl_cv_compiler_check_decl_option=none
5266 fi
5267
5268 fi
5269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_check_decl_option" >&5
5270 $as_echo "$gl_cv_compiler_check_decl_option" >&6; }
5271 if test "x$gl_cv_compiler_check_decl_option" != xnone; then
5272 ac_compile_for_check_decl="$ac_compile $gl_cv_compiler_check_decl_option"
5273 else
5274 ac_compile_for_check_decl="$ac_compile"
5275 fi
5276
5277
5278
5279
5280 ac_ext=c
5281 ac_cpp='$CPP $CPPFLAGS'
5282 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5283 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5284 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5286 $as_echo_n "checking how to run the C preprocessor... " >&6; }
5287 # On Suns, sometimes $CPP names a directory.
5288 if test -n "$CPP" && test -d "$CPP"; then
5289 CPP=
5290 fi
5291 if test -z "$CPP"; then
5292 if ${ac_cv_prog_CPP+:} false; then :
5293 $as_echo_n "(cached) " >&6
5294 else
5295 # Double quotes because CPP needs to be expanded
5296 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5297 do
5298 ac_preproc_ok=false
5299 for ac_c_preproc_warn_flag in '' yes
5300 do
5301 # Use a header file that comes with gcc, so configuring glibc
5302 # with a fresh cross-compiler works.
5303 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5304 # <limits.h> exists even on freestanding compilers.
5305 # On the NeXT, cc -E runs the code through the compiler's parser,
5306 # not just through cpp. "Syntax error" is here to catch this case.
5307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5308 /* end confdefs.h. */
5309 #ifdef __STDC__
5310 # include <limits.h>
5311 #else
5312 # include <assert.h>
5313 #endif
5314 Syntax error
5315 _ACEOF
5316 if ac_fn_c_try_cpp "$LINENO"; then :
5317
5318 else
5319 # Broken: fails on valid input.
5320 continue
5321 fi
5322 rm -f conftest.err conftest.i conftest.$ac_ext
5323
5324 # OK, works on sane cases. Now check whether nonexistent headers
5325 # can be detected and how.
5326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5327 /* end confdefs.h. */
5328 #include <ac_nonexistent.h>
5329 _ACEOF
5330 if ac_fn_c_try_cpp "$LINENO"; then :
5331 # Broken: success on invalid input.
5332 continue
5333 else
5334 # Passes both tests.
5335 ac_preproc_ok=:
5336 break
5337 fi
5338 rm -f conftest.err conftest.i conftest.$ac_ext
5339
5340 done
5341 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5342 rm -f conftest.i conftest.err conftest.$ac_ext
5343 if $ac_preproc_ok; then :
5344 break
5345 fi
5346
5347 done
5348 ac_cv_prog_CPP=$CPP
5349
5350 fi
5351 CPP=$ac_cv_prog_CPP
5352 else
5353 ac_cv_prog_CPP=$CPP
5354 fi
5355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5356 $as_echo "$CPP" >&6; }
5357 ac_preproc_ok=false
5358 for ac_c_preproc_warn_flag in '' yes
5359 do
5360 # Use a header file that comes with gcc, so configuring glibc
5361 # with a fresh cross-compiler works.
5362 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5363 # <limits.h> exists even on freestanding compilers.
5364 # On the NeXT, cc -E runs the code through the compiler's parser,
5365 # not just through cpp. "Syntax error" is here to catch this case.
5366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5367 /* end confdefs.h. */
5368 #ifdef __STDC__
5369 # include <limits.h>
5370 #else
5371 # include <assert.h>
5372 #endif
5373 Syntax error
5374 _ACEOF
5375 if ac_fn_c_try_cpp "$LINENO"; then :
5376
5377 else
5378 # Broken: fails on valid input.
5379 continue
5380 fi
5381 rm -f conftest.err conftest.i conftest.$ac_ext
5382
5383 # OK, works on sane cases. Now check whether nonexistent headers
5384 # can be detected and how.
5385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5386 /* end confdefs.h. */
5387 #include <ac_nonexistent.h>
5388 _ACEOF
5389 if ac_fn_c_try_cpp "$LINENO"; then :
5390 # Broken: success on invalid input.
5391 continue
5392 else
5393 # Passes both tests.
5394 ac_preproc_ok=:
5395 break
5396 fi
5397 rm -f conftest.err conftest.i conftest.$ac_ext
5398
5399 done
5400 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5401 rm -f conftest.i conftest.err conftest.$ac_ext
5402 if $ac_preproc_ok; then :
5403
5404 else
5405 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5406 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5407 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5408 See \`config.log' for more details" "$LINENO" 5; }
5409 fi
5410
5411 ac_ext=c
5412 ac_cpp='$CPP $CPPFLAGS'
5413 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5414 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5415 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5416
5417
5418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5419 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5420 if ${ac_cv_path_GREP+:} false; then :
5421 $as_echo_n "(cached) " >&6
5422 else
5423 if test -z "$GREP"; then
5424 ac_path_GREP_found=false
5425 # Loop through the user's path and test for each of PROGNAME-LIST
5426 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5427 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5428 do
5429 IFS=$as_save_IFS
5430 test -z "$as_dir" && as_dir=.
5431 for ac_prog in grep ggrep; do
5432 for ac_exec_ext in '' $ac_executable_extensions; do
5433 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5434 as_fn_executable_p "$ac_path_GREP" || continue
5435 # Check for GNU ac_path_GREP and select it if it is found.
5436 # Check for GNU $ac_path_GREP
5437 case `"$ac_path_GREP" --version 2>&1` in
5438 *GNU*)
5439 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5440 *)
5441 ac_count=0
5442 $as_echo_n 0123456789 >"conftest.in"
5443 while :
5444 do
5445 cat "conftest.in" "conftest.in" >"conftest.tmp"
5446 mv "conftest.tmp" "conftest.in"
5447 cp "conftest.in" "conftest.nl"
5448 $as_echo 'GREP' >> "conftest.nl"
5449 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5450 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5451 as_fn_arith $ac_count + 1 && ac_count=$as_val
5452 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5453 # Best one so far, save it but keep looking for a better one
5454 ac_cv_path_GREP="$ac_path_GREP"
5455 ac_path_GREP_max=$ac_count
5456 fi
5457 # 10*(2^10) chars as input seems more than enough
5458 test $ac_count -gt 10 && break
5459 done
5460 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5461 esac
5462
5463 $ac_path_GREP_found && break 3
5464 done
5465 done
5466 done
5467 IFS=$as_save_IFS
5468 if test -z "$ac_cv_path_GREP"; then
5469 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5470 fi
5471 else
5472 ac_cv_path_GREP=$GREP
5473 fi
5474
5475 fi
5476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5477 $as_echo "$ac_cv_path_GREP" >&6; }
5478 GREP="$ac_cv_path_GREP"
5479
5480
5481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5482 $as_echo_n "checking for egrep... " >&6; }
5483 if ${ac_cv_path_EGREP+:} false; then :
5484 $as_echo_n "(cached) " >&6
5485 else
5486 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5487 then ac_cv_path_EGREP="$GREP -E"
5488 else
5489 if test -z "$EGREP"; then
5490 ac_path_EGREP_found=false
5491 # Loop through the user's path and test for each of PROGNAME-LIST
5492 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5493 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5494 do
5495 IFS=$as_save_IFS
5496 test -z "$as_dir" && as_dir=.
5497 for ac_prog in egrep; do
5498 for ac_exec_ext in '' $ac_executable_extensions; do
5499 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5500 as_fn_executable_p "$ac_path_EGREP" || continue
5501 # Check for GNU ac_path_EGREP and select it if it is found.
5502 # Check for GNU $ac_path_EGREP
5503 case `"$ac_path_EGREP" --version 2>&1` in
5504 *GNU*)
5505 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5506 *)
5507 ac_count=0
5508 $as_echo_n 0123456789 >"conftest.in"
5509 while :
5510 do
5511 cat "conftest.in" "conftest.in" >"conftest.tmp"
5512 mv "conftest.tmp" "conftest.in"
5513 cp "conftest.in" "conftest.nl"
5514 $as_echo 'EGREP' >> "conftest.nl"
5515 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5516 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5517 as_fn_arith $ac_count + 1 && ac_count=$as_val
5518 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5519 # Best one so far, save it but keep looking for a better one
5520 ac_cv_path_EGREP="$ac_path_EGREP"
5521 ac_path_EGREP_max=$ac_count
5522 fi
5523 # 10*(2^10) chars as input seems more than enough
5524 test $ac_count -gt 10 && break
5525 done
5526 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5527 esac
5528
5529 $ac_path_EGREP_found && break 3
5530 done
5531 done
5532 done
5533 IFS=$as_save_IFS
5534 if test -z "$ac_cv_path_EGREP"; then
5535 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5536 fi
5537 else
5538 ac_cv_path_EGREP=$EGREP
5539 fi
5540
5541 fi
5542 fi
5543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5544 $as_echo "$ac_cv_path_EGREP" >&6; }
5545 EGREP="$ac_cv_path_EGREP"
5546
5547
5548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5549 $as_echo_n "checking for ANSI C header files... " >&6; }
5550 if ${ac_cv_header_stdc+:} false; then :
5551 $as_echo_n "(cached) " >&6
5552 else
5553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5554 /* end confdefs.h. */
5555 #include <stdlib.h>
5556 #include <stdarg.h>
5557 #include <string.h>
5558 #include <float.h>
5559
5560 int
5561 main ()
5562 {
5563
5564 ;
5565 return 0;
5566 }
5567 _ACEOF
5568 if ac_fn_c_try_compile "$LINENO"; then :
5569 ac_cv_header_stdc=yes
5570 else
5571 ac_cv_header_stdc=no
5572 fi
5573 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5574
5575 if test $ac_cv_header_stdc = yes; then
5576 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5578 /* end confdefs.h. */
5579 #include <string.h>
5580
5581 _ACEOF
5582 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5583 $EGREP "memchr" >/dev/null 2>&1; then :
5584
5585 else
5586 ac_cv_header_stdc=no
5587 fi
5588 rm -f conftest*
5589
5590 fi
5591
5592 if test $ac_cv_header_stdc = yes; then
5593 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5595 /* end confdefs.h. */
5596 #include <stdlib.h>
5597
5598 _ACEOF
5599 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5600 $EGREP "free" >/dev/null 2>&1; then :
5601
5602 else
5603 ac_cv_header_stdc=no
5604 fi
5605 rm -f conftest*
5606
5607 fi
5608
5609 if test $ac_cv_header_stdc = yes; then
5610 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5611 if test "$cross_compiling" = yes; then :
5612 :
5613 else
5614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5615 /* end confdefs.h. */
5616 #include <ctype.h>
5617 #include <stdlib.h>
5618 #if ((' ' & 0x0FF) == 0x020)
5619 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5620 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5621 #else
5622 # define ISLOWER(c) \
5623 (('a' <= (c) && (c) <= 'i') \
5624 || ('j' <= (c) && (c) <= 'r') \
5625 || ('s' <= (c) && (c) <= 'z'))
5626 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5627 #endif
5628
5629 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5630 int
5631 main ()
5632 {
5633 int i;
5634 for (i = 0; i < 256; i++)
5635 if (XOR (islower (i), ISLOWER (i))
5636 || toupper (i) != TOUPPER (i))
5637 return 2;
5638 return 0;
5639 }
5640 _ACEOF
5641 if ac_fn_c_try_run "$LINENO"; then :
5642
5643 else
5644 ac_cv_header_stdc=no
5645 fi
5646 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5647 conftest.$ac_objext conftest.beam conftest.$ac_ext
5648 fi
5649
5650 fi
5651 fi
5652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5653 $as_echo "$ac_cv_header_stdc" >&6; }
5654 if test $ac_cv_header_stdc = yes; then
5655
5656 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
5657
5658 fi
5659
5660 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
5661 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5662 inttypes.h stdint.h unistd.h
5663 do :
5664 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5665 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5666 "
5667 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5668 cat >>confdefs.h <<_ACEOF
5669 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5670 _ACEOF
5671
5672 fi
5673
5674 done
5675
5676
5677
5678
5679
5680 for ac_header in $ac_header_list
5681 do :
5682 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5683 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5684 "
5685 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5686 cat >>confdefs.h <<_ACEOF
5687 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5688 _ACEOF
5689
5690 fi
5691
5692 done
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5703 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
5704 if ${ac_cv_safe_to_define___extensions__+:} false; then :
5705 $as_echo_n "(cached) " >&6
5706 else
5707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5708 /* end confdefs.h. */
5709
5710 # define __EXTENSIONS__ 1
5711 $ac_includes_default
5712 int
5713 main ()
5714 {
5715
5716 ;
5717 return 0;
5718 }
5719 _ACEOF
5720 if ac_fn_c_try_compile "$LINENO"; then :
5721 ac_cv_safe_to_define___extensions__=yes
5722 else
5723 ac_cv_safe_to_define___extensions__=no
5724 fi
5725 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5726 fi
5727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5728 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5729
5730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
5731 $as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; }
5732 if ${ac_cv_should_define__xopen_source+:} false; then :
5733 $as_echo_n "(cached) " >&6
5734 else
5735 ac_cv_should_define__xopen_source=no
5736 if test $ac_cv_header_wchar_h = yes; then :
5737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5738 /* end confdefs.h. */
5739
5740 #include <wchar.h>
5741 mbstate_t x;
5742 int
5743 main ()
5744 {
5745
5746 ;
5747 return 0;
5748 }
5749 _ACEOF
5750 if ac_fn_c_try_compile "$LINENO"; then :
5751
5752 else
5753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5754 /* end confdefs.h. */
5755
5756 #define _XOPEN_SOURCE 500
5757 #include <wchar.h>
5758 mbstate_t x;
5759 int
5760 main ()
5761 {
5762
5763 ;
5764 return 0;
5765 }
5766 _ACEOF
5767 if ac_fn_c_try_compile "$LINENO"; then :
5768 ac_cv_should_define__xopen_source=yes
5769 fi
5770 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5771 fi
5772 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5773 fi
5774 fi
5775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
5776 $as_echo "$ac_cv_should_define__xopen_source" >&6; }
5777
5778 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5779
5780 $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
5781
5782 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5783
5784 $as_echo "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h
5785
5786 $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
5787
5788 $as_echo "#define _OPENBSD_SOURCE 1" >>confdefs.h
5789
5790 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5791
5792 $as_echo "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
5793
5794 $as_echo "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
5795
5796 $as_echo "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
5797
5798 $as_echo "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
5799
5800 $as_echo "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
5801
5802 $as_echo "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
5803
5804 $as_echo "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
5805
5806 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5807
5808 if test $ac_cv_header_minix_config_h = yes; then :
5809 MINIX=yes
5810 $as_echo "#define _MINIX 1" >>confdefs.h
5811
5812 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5813
5814 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5815
5816 else
5817 MINIX=
5818 fi
5819 if test $ac_cv_safe_to_define___extensions__ = yes; then :
5820 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5821
5822 fi
5823 if test $ac_cv_should_define__xopen_source = yes; then :
5824 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
5825
5826 fi
5827
5828 # Needs to run before gl_EARLY so it can override AC_SYS_LARGEFILE included
5829 # there.
5830 ac_aux_dir=
5831 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
5832 if test -f "$ac_dir/install-sh"; then
5833 ac_aux_dir=$ac_dir
5834 ac_install_sh="$ac_aux_dir/install-sh -c"
5835 break
5836 elif test -f "$ac_dir/install.sh"; then
5837 ac_aux_dir=$ac_dir
5838 ac_install_sh="$ac_aux_dir/install.sh -c"
5839 break
5840 elif test -f "$ac_dir/shtool"; then
5841 ac_aux_dir=$ac_dir
5842 ac_install_sh="$ac_aux_dir/shtool install -c"
5843 break
5844 fi
5845 done
5846 if test -z "$ac_aux_dir"; then
5847 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
5848 fi
5849
5850 # These three variables are undocumented and unsupported,
5851 # and are intended to be withdrawn in a future Autoconf release.
5852 # They can cause serious problems if a builder's source tree is in a directory
5853 # whose full name contains unusual characters.
5854 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5855 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5856 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5857
5858
5859 # Make sure we can run config.sub.
5860 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
5861 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
5862
5863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
5864 $as_echo_n "checking build system type... " >&6; }
5865 if ${ac_cv_build+:} false; then :
5866 $as_echo_n "(cached) " >&6
5867 else
5868 ac_build_alias=$build_alias
5869 test "x$ac_build_alias" = x &&
5870 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
5871 test "x$ac_build_alias" = x &&
5872 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
5873 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
5874 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
5875
5876 fi
5877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
5878 $as_echo "$ac_cv_build" >&6; }
5879 case $ac_cv_build in
5880 *-*-*) ;;
5881 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
5882 esac
5883 build=$ac_cv_build
5884 ac_save_IFS=$IFS; IFS='-'
5885 set x $ac_cv_build
5886 shift
5887 build_cpu=$1
5888 build_vendor=$2
5889 shift; shift
5890 # Remember, the first character of IFS is used to create $*,
5891 # except with old shells:
5892 build_os=$*
5893 IFS=$ac_save_IFS
5894 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
5895
5896
5897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
5898 $as_echo_n "checking host system type... " >&6; }
5899 if ${ac_cv_host+:} false; then :
5900 $as_echo_n "(cached) " >&6
5901 else
5902 if test "x$host_alias" = x; then
5903 ac_cv_host=$ac_cv_build
5904 else
5905 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
5906 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
5907 fi
5908
5909 fi
5910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
5911 $as_echo "$ac_cv_host" >&6; }
5912 case $ac_cv_host in
5913 *-*-*) ;;
5914 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
5915 esac
5916 host=$ac_cv_host
5917 ac_save_IFS=$IFS; IFS='-'
5918 set x $ac_cv_host
5919 shift
5920 host_cpu=$1
5921 host_vendor=$2
5922 shift; shift
5923 # Remember, the first character of IFS is used to create $*,
5924 # except with old shells:
5925 host_os=$*
5926 IFS=$ac_save_IFS
5927 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
5928
5929
5930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
5931 $as_echo_n "checking target system type... " >&6; }
5932 if ${ac_cv_target+:} false; then :
5933 $as_echo_n "(cached) " >&6
5934 else
5935 if test "x$target_alias" = x; then
5936 ac_cv_target=$ac_cv_host
5937 else
5938 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
5939 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
5940 fi
5941
5942 fi
5943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
5944 $as_echo "$ac_cv_target" >&6; }
5945 case $ac_cv_target in
5946 *-*-*) ;;
5947 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
5948 esac
5949 target=$ac_cv_target
5950 ac_save_IFS=$IFS; IFS='-'
5951 set x $ac_cv_target
5952 shift
5953 target_cpu=$1
5954 target_vendor=$2
5955 shift; shift
5956 # Remember, the first character of IFS is used to create $*,
5957 # except with old shells:
5958 target_os=$*
5959 IFS=$ac_save_IFS
5960 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
5961
5962
5963 # The aliases save the names the user supplied, while $host etc.
5964 # will get canonicalized.
5965 test -n "$target_alias" &&
5966 test "$program_prefix$program_suffix$program_transform_name" = \
5967 NONENONEs,x,x, &&
5968 program_prefix=${target_alias}-
5969
5970 # The tests for host and target for $enable_largefile require
5971 # canonical names.
5972
5973
5974
5975 # As the $enable_largefile decision depends on --enable-plugins we must set it
5976 # even in directories otherwise not depending on the $plugins option.
5977
5978
5979 maybe_plugins=no
5980 for ac_header in dlfcn.h
5981 do :
5982 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
5983 "
5984 if test "x$ac_cv_header_dlfcn_h" = xyes; then :
5985 cat >>confdefs.h <<_ACEOF
5986 #define HAVE_DLFCN_H 1
5987 _ACEOF
5988 maybe_plugins=yes
5989 fi
5990
5991 done
5992
5993 for ac_header in windows.h
5994 do :
5995 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
5996 "
5997 if test "x$ac_cv_header_windows_h" = xyes; then :
5998 cat >>confdefs.h <<_ACEOF
5999 #define HAVE_WINDOWS_H 1
6000 _ACEOF
6001 maybe_plugins=yes
6002 fi
6003
6004 done
6005
6006
6007 # Check whether --enable-plugins was given.
6008 if test "${enable_plugins+set}" = set; then :
6009 enableval=$enable_plugins; case "${enableval}" in
6010 no) plugins=no ;;
6011 *) plugins=yes
6012 if test "$maybe_plugins" != "yes" ; then
6013 as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
6014 fi ;;
6015 esac
6016 else
6017 plugins=$maybe_plugins
6018
6019 fi
6020
6021 if test "$plugins" = "yes"; then
6022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
6023 $as_echo_n "checking for library containing dlsym... " >&6; }
6024 if ${ac_cv_search_dlsym+:} false; then :
6025 $as_echo_n "(cached) " >&6
6026 else
6027 ac_func_search_save_LIBS=$LIBS
6028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6029 /* end confdefs.h. */
6030
6031 /* Override any GCC internal prototype to avoid an error.
6032 Use char because int might match the return type of a GCC
6033 builtin and then its argument prototype would still apply. */
6034 #ifdef __cplusplus
6035 extern "C"
6036 #endif
6037 char dlsym ();
6038 int
6039 main ()
6040 {
6041 return dlsym ();
6042 ;
6043 return 0;
6044 }
6045 _ACEOF
6046 for ac_lib in '' dl; do
6047 if test -z "$ac_lib"; then
6048 ac_res="none required"
6049 else
6050 ac_res=-l$ac_lib
6051 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
6052 fi
6053 if ac_fn_c_try_link "$LINENO"; then :
6054 ac_cv_search_dlsym=$ac_res
6055 fi
6056 rm -f core conftest.err conftest.$ac_objext \
6057 conftest$ac_exeext
6058 if ${ac_cv_search_dlsym+:} false; then :
6059 break
6060 fi
6061 done
6062 if ${ac_cv_search_dlsym+:} false; then :
6063
6064 else
6065 ac_cv_search_dlsym=no
6066 fi
6067 rm conftest.$ac_ext
6068 LIBS=$ac_func_search_save_LIBS
6069 fi
6070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
6071 $as_echo "$ac_cv_search_dlsym" >&6; }
6072 ac_res=$ac_cv_search_dlsym
6073 if test "$ac_res" != no; then :
6074 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6075
6076 fi
6077
6078 fi
6079
6080
6081 case "${host}" in
6082 sparc-*-solaris*|i?86-*-solaris*)
6083 # On native 32-bit Solaris/SPARC and x86, large-file and procfs support
6084 # were mutually exclusive until Solaris 11.3. Without procfs support,
6085 # the bfd/ elf module cannot provide certain routines such as
6086 # elfcore_write_prpsinfo or elfcore_write_prstatus. So unless the user
6087 # explicitly requested large-file support through the
6088 # --enable-largefile switch, disable large-file support in favor of
6089 # procfs support.
6090 #
6091 # Check if <sys/procfs.h> is incompatible with large-file support.
6092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6093 /* end confdefs.h. */
6094 #define _FILE_OFFSET_BITS 64
6095 #define _STRUCTURED_PROC 1
6096 #include <sys/procfs.h>
6097 int
6098 main ()
6099 {
6100
6101 ;
6102 return 0;
6103 }
6104 _ACEOF
6105 if ac_fn_c_try_compile "$LINENO"; then :
6106 acx_cv_procfs_lfs=yes
6107 else
6108 acx_cv_procfs_lfs=no
6109 fi
6110 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6111 #
6112 # Forcefully disable large-file support only if necessary, gdb is in
6113 # tree and enabled.
6114 if test "${target}" = "${host}" -a "$acx_cv_procfs_lfs" = no \
6115 -a -d $srcdir/../gdb -a "$enable_gdb" != no; then
6116 : ${enable_largefile="no"}
6117 if test "$plugins" = yes; then
6118 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
6119 plugin support disabled; require large-file support which is incompatible with GDB." >&5
6120 $as_echo "$as_me: WARNING:
6121 plugin support disabled; require large-file support which is incompatible with GDB." >&2;}
6122 plugins=no
6123 fi
6124 fi
6125 #
6126 # Explicitly undef _FILE_OFFSET_BITS if enable_largefile=no for the
6127 # benefit of g++ 9+ which predefines it on Solaris.
6128 if test "$enable_largefile" = no; then
6129 LARGEFILE_CPPFLAGS="-U_FILE_OFFSET_BITS"
6130
6131 fi
6132 ;;
6133 esac
6134
6135 # Check whether --enable-largefile was given.
6136 if test "${enable_largefile+set}" = set; then :
6137 enableval=$enable_largefile;
6138 fi
6139
6140 if test "$enable_largefile" != no; then
6141
6142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
6143 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
6144 if ${ac_cv_sys_largefile_CC+:} false; then :
6145 $as_echo_n "(cached) " >&6
6146 else
6147 ac_cv_sys_largefile_CC=no
6148 if test "$GCC" != yes; then
6149 ac_save_CC=$CC
6150 while :; do
6151 # IRIX 6.2 and later do not support large files by default,
6152 # so use the C compiler's -n32 option if that helps.
6153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6154 /* end confdefs.h. */
6155 #include <sys/types.h>
6156 /* Check that off_t can represent 2**63 - 1 correctly.
6157 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6158 since some C++ compilers masquerading as C compilers
6159 incorrectly reject 9223372036854775807. */
6160 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
6161 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6162 && LARGE_OFF_T % 2147483647 == 1)
6163 ? 1 : -1];
6164 int
6165 main ()
6166 {
6167
6168 ;
6169 return 0;
6170 }
6171 _ACEOF
6172 if ac_fn_c_try_compile "$LINENO"; then :
6173 break
6174 fi
6175 rm -f core conftest.err conftest.$ac_objext
6176 CC="$CC -n32"
6177 if ac_fn_c_try_compile "$LINENO"; then :
6178 ac_cv_sys_largefile_CC=' -n32'; break
6179 fi
6180 rm -f core conftest.err conftest.$ac_objext
6181 break
6182 done
6183 CC=$ac_save_CC
6184 rm -f conftest.$ac_ext
6185 fi
6186 fi
6187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
6188 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
6189 if test "$ac_cv_sys_largefile_CC" != no; then
6190 CC=$CC$ac_cv_sys_largefile_CC
6191 fi
6192
6193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
6194 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
6195 if ${ac_cv_sys_file_offset_bits+:} false; then :
6196 $as_echo_n "(cached) " >&6
6197 else
6198 while :; do
6199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6200 /* end confdefs.h. */
6201 #include <sys/types.h>
6202 /* Check that off_t can represent 2**63 - 1 correctly.
6203 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6204 since some C++ compilers masquerading as C compilers
6205 incorrectly reject 9223372036854775807. */
6206 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
6207 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6208 && LARGE_OFF_T % 2147483647 == 1)
6209 ? 1 : -1];
6210 int
6211 main ()
6212 {
6213
6214 ;
6215 return 0;
6216 }
6217 _ACEOF
6218 if ac_fn_c_try_compile "$LINENO"; then :
6219 ac_cv_sys_file_offset_bits=no; break
6220 fi
6221 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6223 /* end confdefs.h. */
6224 #define _FILE_OFFSET_BITS 64
6225 #include <sys/types.h>
6226 /* Check that off_t can represent 2**63 - 1 correctly.
6227 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6228 since some C++ compilers masquerading as C compilers
6229 incorrectly reject 9223372036854775807. */
6230 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
6231 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6232 && LARGE_OFF_T % 2147483647 == 1)
6233 ? 1 : -1];
6234 int
6235 main ()
6236 {
6237
6238 ;
6239 return 0;
6240 }
6241 _ACEOF
6242 if ac_fn_c_try_compile "$LINENO"; then :
6243 ac_cv_sys_file_offset_bits=64; break
6244 fi
6245 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6246 ac_cv_sys_file_offset_bits=unknown
6247 break
6248 done
6249 fi
6250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
6251 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
6252 case $ac_cv_sys_file_offset_bits in #(
6253 no | unknown) ;;
6254 *)
6255 cat >>confdefs.h <<_ACEOF
6256 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
6257 _ACEOF
6258 ;;
6259 esac
6260 rm -rf conftest*
6261 if test $ac_cv_sys_file_offset_bits = unknown; then
6262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
6263 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
6264 if ${ac_cv_sys_large_files+:} false; then :
6265 $as_echo_n "(cached) " >&6
6266 else
6267 while :; do
6268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6269 /* end confdefs.h. */
6270 #include <sys/types.h>
6271 /* Check that off_t can represent 2**63 - 1 correctly.
6272 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6273 since some C++ compilers masquerading as C compilers
6274 incorrectly reject 9223372036854775807. */
6275 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
6276 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6277 && LARGE_OFF_T % 2147483647 == 1)
6278 ? 1 : -1];
6279 int
6280 main ()
6281 {
6282
6283 ;
6284 return 0;
6285 }
6286 _ACEOF
6287 if ac_fn_c_try_compile "$LINENO"; then :
6288 ac_cv_sys_large_files=no; break
6289 fi
6290 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6292 /* end confdefs.h. */
6293 #define _LARGE_FILES 1
6294 #include <sys/types.h>
6295 /* Check that off_t can represent 2**63 - 1 correctly.
6296 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6297 since some C++ compilers masquerading as C compilers
6298 incorrectly reject 9223372036854775807. */
6299 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
6300 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6301 && LARGE_OFF_T % 2147483647 == 1)
6302 ? 1 : -1];
6303 int
6304 main ()
6305 {
6306
6307 ;
6308 return 0;
6309 }
6310 _ACEOF
6311 if ac_fn_c_try_compile "$LINENO"; then :
6312 ac_cv_sys_large_files=1; break
6313 fi
6314 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6315 ac_cv_sys_large_files=unknown
6316 break
6317 done
6318 fi
6319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
6320 $as_echo "$ac_cv_sys_large_files" >&6; }
6321 case $ac_cv_sys_large_files in #(
6322 no | unknown) ;;
6323 *)
6324 cat >>confdefs.h <<_ACEOF
6325 #define _LARGE_FILES $ac_cv_sys_large_files
6326 _ACEOF
6327 ;;
6328 esac
6329 rm -rf conftest*
6330 fi
6331 fi
6332
6333
6334
6335
6336
6337
6338 case "$host_os" in
6339 openbsd*)
6340
6341 $as_echo "#define _ISOC11_SOURCE 1" >>confdefs.h
6342
6343 ;;
6344 esac
6345
6346
6347
6348
6349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
6350 $as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
6351 if ${gl_cv_c_amsterdam_compiler+:} false; then :
6352 $as_echo_n "(cached) " >&6
6353 else
6354
6355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6356 /* end confdefs.h. */
6357
6358 #ifdef __ACK__
6359 Amsterdam
6360 #endif
6361
6362 _ACEOF
6363 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6364 $EGREP "Amsterdam" >/dev/null 2>&1; then :
6365 gl_cv_c_amsterdam_compiler=yes
6366 else
6367 gl_cv_c_amsterdam_compiler=no
6368 fi
6369 rm -f conftest*
6370
6371
6372 fi
6373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
6374 $as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
6375
6376 if test $gl_cv_c_amsterdam_compiler = yes; then
6377 if test -z "$AR"; then
6378 AR='cc -c.a'
6379 fi
6380 if test -z "$ARFLAGS"; then
6381 ARFLAGS='-o'
6382 fi
6383 else
6384 :
6385 fi
6386
6387 if test -n "$ac_tool_prefix"; then
6388 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6389 set dummy ${ac_tool_prefix}ar; ac_word=$2
6390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6391 $as_echo_n "checking for $ac_word... " >&6; }
6392 if ${ac_cv_prog_AR+:} false; then :
6393 $as_echo_n "(cached) " >&6
6394 else
6395 if test -n "$AR"; then
6396 ac_cv_prog_AR="$AR" # Let the user override the test.
6397 else
6398 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6399 for as_dir in $PATH
6400 do
6401 IFS=$as_save_IFS
6402 test -z "$as_dir" && as_dir=.
6403 for ac_exec_ext in '' $ac_executable_extensions; do
6404 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6405 ac_cv_prog_AR="${ac_tool_prefix}ar"
6406 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6407 break 2
6408 fi
6409 done
6410 done
6411 IFS=$as_save_IFS
6412
6413 fi
6414 fi
6415 AR=$ac_cv_prog_AR
6416 if test -n "$AR"; then
6417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6418 $as_echo "$AR" >&6; }
6419 else
6420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6421 $as_echo "no" >&6; }
6422 fi
6423
6424
6425 fi
6426 if test -z "$ac_cv_prog_AR"; then
6427 ac_ct_AR=$AR
6428 # Extract the first word of "ar", so it can be a program name with args.
6429 set dummy ar; ac_word=$2
6430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6431 $as_echo_n "checking for $ac_word... " >&6; }
6432 if ${ac_cv_prog_ac_ct_AR+:} false; then :
6433 $as_echo_n "(cached) " >&6
6434 else
6435 if test -n "$ac_ct_AR"; then
6436 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6437 else
6438 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6439 for as_dir in $PATH
6440 do
6441 IFS=$as_save_IFS
6442 test -z "$as_dir" && as_dir=.
6443 for ac_exec_ext in '' $ac_executable_extensions; do
6444 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6445 ac_cv_prog_ac_ct_AR="ar"
6446 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6447 break 2
6448 fi
6449 done
6450 done
6451 IFS=$as_save_IFS
6452
6453 fi
6454 fi
6455 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6456 if test -n "$ac_ct_AR"; then
6457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6458 $as_echo "$ac_ct_AR" >&6; }
6459 else
6460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6461 $as_echo "no" >&6; }
6462 fi
6463
6464 if test "x$ac_ct_AR" = x; then
6465 AR="ar"
6466 else
6467 case $cross_compiling:$ac_tool_warned in
6468 yes:)
6469 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6470 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6471 ac_tool_warned=yes ;;
6472 esac
6473 AR=$ac_ct_AR
6474 fi
6475 else
6476 AR="$ac_cv_prog_AR"
6477 fi
6478
6479 if test -z "$ARFLAGS"; then
6480 ARFLAGS='cr'
6481 fi
6482
6483
6484
6485 if test -z "$RANLIB"; then
6486 if test $gl_cv_c_amsterdam_compiler = yes; then
6487 RANLIB=':'
6488 else
6489 if test -n "$ac_tool_prefix"; then
6490 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6491 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6493 $as_echo_n "checking for $ac_word... " >&6; }
6494 if ${ac_cv_prog_RANLIB+:} false; then :
6495 $as_echo_n "(cached) " >&6
6496 else
6497 if test -n "$RANLIB"; then
6498 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6499 else
6500 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6501 for as_dir in $PATH
6502 do
6503 IFS=$as_save_IFS
6504 test -z "$as_dir" && as_dir=.
6505 for ac_exec_ext in '' $ac_executable_extensions; do
6506 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6507 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6508 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6509 break 2
6510 fi
6511 done
6512 done
6513 IFS=$as_save_IFS
6514
6515 fi
6516 fi
6517 RANLIB=$ac_cv_prog_RANLIB
6518 if test -n "$RANLIB"; then
6519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6520 $as_echo "$RANLIB" >&6; }
6521 else
6522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6523 $as_echo "no" >&6; }
6524 fi
6525
6526
6527 fi
6528 if test -z "$ac_cv_prog_RANLIB"; then
6529 ac_ct_RANLIB=$RANLIB
6530 # Extract the first word of "ranlib", so it can be a program name with args.
6531 set dummy ranlib; ac_word=$2
6532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6533 $as_echo_n "checking for $ac_word... " >&6; }
6534 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
6535 $as_echo_n "(cached) " >&6
6536 else
6537 if test -n "$ac_ct_RANLIB"; then
6538 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6539 else
6540 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6541 for as_dir in $PATH
6542 do
6543 IFS=$as_save_IFS
6544 test -z "$as_dir" && as_dir=.
6545 for ac_exec_ext in '' $ac_executable_extensions; do
6546 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6547 ac_cv_prog_ac_ct_RANLIB="ranlib"
6548 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6549 break 2
6550 fi
6551 done
6552 done
6553 IFS=$as_save_IFS
6554
6555 fi
6556 fi
6557 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6558 if test -n "$ac_ct_RANLIB"; then
6559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6560 $as_echo "$ac_ct_RANLIB" >&6; }
6561 else
6562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6563 $as_echo "no" >&6; }
6564 fi
6565
6566 if test "x$ac_ct_RANLIB" = x; then
6567 RANLIB=":"
6568 else
6569 case $cross_compiling:$ac_tool_warned in
6570 yes:)
6571 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6572 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6573 ac_tool_warned=yes ;;
6574 esac
6575 RANLIB=$ac_ct_RANLIB
6576 fi
6577 else
6578 RANLIB="$ac_cv_prog_RANLIB"
6579 fi
6580
6581 fi
6582 fi
6583
6584
6585
6586
6587
6588
6589 # IEEE behaviour is the default on all CPUs except Alpha and SH
6590 # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
6591 # and the GCC 4.1.2 manual).
6592 case "$host_cpu" in
6593 alpha*)
6594 # On Alpha systems, a compiler option provides the behaviour.
6595 # See the ieee(3) manual page, also available at
6596 # <https://backdrift.org/man/tru64/man3/ieee.3.html>
6597 if test -n "$GCC"; then
6598 # GCC has the option -mieee.
6599 # For full IEEE compliance (rarely needed), use option -mieee-with-inexact.
6600 CPPFLAGS="$CPPFLAGS -mieee"
6601 else
6602 # Compaq (ex-DEC) C has the option -ieee, equivalent to -ieee_with_no_inexact.
6603 # For full IEEE compliance (rarely needed), use option -ieee_with_inexact.
6604 CPPFLAGS="$CPPFLAGS -ieee"
6605 fi
6606 ;;
6607 sh*)
6608 if test -n "$GCC"; then
6609 # GCC has the option -mieee.
6610 CPPFLAGS="$CPPFLAGS -mieee"
6611 fi
6612 ;;
6613 esac
6614
6615
6616
6617
6618
6619
6620
6621 # Check whether --enable-threads was given.
6622 if test "${enable_threads+set}" = set; then :
6623 enableval=$enable_threads; gl_use_threads=$enableval
6624 else
6625 if test -n "$gl_use_threads_default"; then
6626 gl_use_threads="$gl_use_threads_default"
6627 else
6628 case "$host_os" in
6629 osf*) gl_use_threads=no ;;
6630 cygwin*)
6631 case `uname -r` in
6632 1.[0-5].*) gl_use_threads=no ;;
6633 *) gl_use_threads=yes ;;
6634 esac
6635 ;;
6636 mingw*)
6637 case "$gl_use_winpthreads_default" in
6638 yes) gl_use_threads=posix ;;
6639 no) gl_use_threads=windows ;;
6640 *) gl_use_threads=yes ;;
6641 esac
6642 ;;
6643 *) gl_use_threads=yes ;;
6644 esac
6645 fi
6646
6647 fi
6648
6649 if test "$gl_use_threads" = yes \
6650 || test "$gl_use_threads" = isoc \
6651 || test "$gl_use_threads" = posix \
6652 || test "$gl_use_threads" = isoc+posix; then
6653 # For using <threads.h> or <pthread.h>:
6654
6655
6656 if test -z "$gl_anythreadlib_early_done"; then
6657 case "$host_os" in
6658 osf*)
6659 # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
6660 # groks <pthread.h>. cc also understands the flag -pthread, but
6661 # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
6662 # 2. putting a flag into CPPFLAGS that has an effect on the linker
6663 # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
6664 # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
6665 CPPFLAGS="$CPPFLAGS -D_REENTRANT"
6666 ;;
6667 esac
6668 # Some systems optimize for single-threaded programs by default, and
6669 # need special flags to disable these optimizations. For example, the
6670 # definition of 'errno' in <errno.h>.
6671 case "$host_os" in
6672 aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
6673 solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
6674 esac
6675 gl_anythreadlib_early_done=done
6676 fi
6677
6678 fi
6679
6680
6681
6682 # Pre-early section.
6683
6684
6685
6686
6687 # Code from module absolute-header:
6688 # Code from module alloca:
6689 # Code from module alloca-opt:
6690 # Code from module arpa_inet:
6691 # Code from module assure:
6692 # Code from module at-internal:
6693 # Code from module attribute:
6694 # Code from module basename-lgpl:
6695 # Code from module btowc:
6696 # Code from module builtin-expect:
6697 # Code from module c99:
6698 # Code from module canonicalize-lgpl:
6699 # Code from module chdir:
6700 # Code from module chdir-long:
6701 # Code from module chown:
6702 # Code from module clock-time:
6703 # Code from module cloexec:
6704 # Code from module close:
6705 # Code from module closedir:
6706 # Code from module count-one-bits:
6707 # Code from module ctype:
6708 # Code from module d-ino:
6709 # Code from module d-type:
6710 # Code from module dirent:
6711 # Code from module dirfd:
6712 # Code from module dirname-lgpl:
6713 # Code from module double-slash-root:
6714 # Code from module dup:
6715 # Code from module dup2:
6716 # Code from module eloop-threshold:
6717 # Code from module environ:
6718 # Code from module errno:
6719 # Code from module error:
6720 # Code from module exitfail:
6721 # Code from module extensions:
6722 # Code from module extern-inline:
6723 # Code from module fchdir:
6724 # Code from module fcntl:
6725 # Code from module fcntl-h:
6726 # Code from module fd-hook:
6727 # Code from module fd-safer-flag:
6728 # Code from module fdopendir:
6729 # Code from module ffs:
6730 # Code from module filename:
6731 # Code from module filenamecat-lgpl:
6732 # Code from module flexmember:
6733 # Code from module float:
6734 # Code from module fnmatch:
6735 # Code from module fnmatch-gnu:
6736 # Code from module fnmatch-h:
6737 # Code from module fpieee:
6738
6739 # Code from module fpucw:
6740 # Code from module free-posix:
6741 # Code from module frexp:
6742 # Code from module frexpl:
6743 # Code from module fstat:
6744 # Code from module fstatat:
6745 # Code from module gendocs:
6746 # Code from module getcwd:
6747 # Code from module getcwd-lgpl:
6748 # Code from module getdelim:
6749 # Code from module getdtablesize:
6750 # Code from module getline:
6751 # Code from module getlogin_r:
6752 # Code from module getprogname:
6753 # Code from module getrandom:
6754 # Code from module gettext-h:
6755 # Code from module gettimeofday:
6756 # Code from module gitlog-to-changelog:
6757 # Code from module glob:
6758 # Code from module glob-h:
6759 # Code from module hard-locale:
6760 # Code from module idx:
6761 # Code from module include_next:
6762 # Code from module inet_ntop:
6763 # Code from module intprops:
6764 # Code from module inttypes:
6765 # Code from module inttypes-incomplete:
6766 # Code from module isblank:
6767 # Code from module isnand-nolibm:
6768 # Code from module isnanl-nolibm:
6769 # Code from module largefile:
6770
6771 # Code from module libc-config:
6772 # Code from module limits-h:
6773 # Code from module localcharset:
6774 # Code from module locale:
6775 # Code from module lock:
6776 # Code from module lstat:
6777 # Code from module malloc-posix:
6778 # Code from module malloca:
6779 # Code from module math:
6780 # Code from module mbrtowc:
6781 # Code from module mbsinit:
6782 # Code from module mbsrtowcs:
6783 # Code from module mbtowc:
6784 # Code from module memchr:
6785 # Code from module memmem:
6786 # Code from module memmem-simple:
6787 # Code from module mempcpy:
6788 # Code from module memrchr:
6789 # Code from module minmax:
6790 # Code from module mkdir:
6791 # Code from module mkdtemp:
6792 # Code from module mkostemp:
6793 # Code from module msvc-inval:
6794 # Code from module msvc-nothrow:
6795 # Code from module multiarch:
6796 # Code from module netdb:
6797 # Code from module netinet_in:
6798 # Code from module nocrash:
6799 # Code from module open:
6800 # Code from module openat:
6801 # Code from module openat-die:
6802 # Code from module openat-h:
6803 # Code from module opendir:
6804 # Code from module pathmax:
6805 # Code from module pipe-posix:
6806 # Code from module rawmemchr:
6807 # Code from module readdir:
6808 # Code from module readlink:
6809 # Code from module realloc-posix:
6810 # Code from module rename:
6811 # Code from module rewinddir:
6812 # Code from module rmdir:
6813 # Code from module same-inode:
6814 # Code from module save-cwd:
6815 # Code from module scratch_buffer:
6816 # Code from module setenv:
6817 # Code from module setlocale-null:
6818 # Code from module signal-h:
6819 # Code from module snippet/_Noreturn:
6820 # Code from module snippet/arg-nonnull:
6821 # Code from module snippet/c++defs:
6822 # Code from module snippet/warn-on-use:
6823 # Code from module socklen:
6824 # Code from module ssize_t:
6825 # Code from module stat:
6826 # Code from module stat-time:
6827 # Code from module std-gnu11:
6828 # Code from module stdalign:
6829 # Code from module stdbool:
6830 # Code from module stddef:
6831 # Code from module stdint:
6832 # Code from module stdio:
6833 # Code from module stdlib:
6834 # Code from module strchrnul:
6835 # Code from module strdup-posix:
6836 # Code from module streq:
6837 # Code from module strerror:
6838 # Code from module strerror-override:
6839 # Code from module strerror_r-posix:
6840 # Code from module string:
6841 # Code from module strings:
6842 # Code from module strnlen:
6843 # Code from module strnlen1:
6844 # Code from module strstr:
6845 # Code from module strstr-simple:
6846 # Code from module strtok_r:
6847 # Code from module sys_random:
6848 # Code from module sys_socket:
6849 # Code from module sys_stat:
6850 # Code from module sys_time:
6851 # Code from module sys_types:
6852 # Code from module sys_uio:
6853 # Code from module tempname:
6854 # Code from module threadlib:
6855
6856
6857
6858 # Code from module time:
6859 # Code from module time_r:
6860 # Code from module unistd:
6861 # Code from module unistd-safer:
6862 # Code from module unsetenv:
6863 # Code from module update-copyright:
6864 # Code from module verify:
6865 # Code from module wchar:
6866 # Code from module wctype-h:
6867 # Code from module windows-mutex:
6868 # Code from module windows-once:
6869 # Code from module windows-recmutex:
6870 # Code from module windows-rwlock:
6871 # Code from module wmemchr:
6872 # Code from module wmempcpy:
6873 # Code from module xalloc-oversized:
6874
6875
6876 am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
6877
6878
6879 ac_aux_dir=
6880 for ac_dir in .. "$srcdir"/..; do
6881 if test -f "$ac_dir/install-sh"; then
6882 ac_aux_dir=$ac_dir
6883 ac_install_sh="$ac_aux_dir/install-sh -c"
6884 break
6885 elif test -f "$ac_dir/install.sh"; then
6886 ac_aux_dir=$ac_dir
6887 ac_install_sh="$ac_aux_dir/install.sh -c"
6888 break
6889 elif test -f "$ac_dir/shtool"; then
6890 ac_aux_dir=$ac_dir
6891 ac_install_sh="$ac_aux_dir/shtool install -c"
6892 break
6893 fi
6894 done
6895 if test -z "$ac_aux_dir"; then
6896 as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
6897 fi
6898
6899 # These three variables are undocumented and unsupported,
6900 # and are intended to be withdrawn in a future Autoconf release.
6901 # They can cause serious problems if a builder's source tree is in a directory
6902 # whose full name contains unusual characters.
6903 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
6904 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
6905 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918 # Check whether --enable-cross-guesses was given.
6919 if test "${enable_cross_guesses+set}" = set; then :
6920 enableval=$enable_cross_guesses; if test "x$enableval" != xconservative && test "x$enableval" != xrisky; then
6921 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: invalid argument supplied to --enable-cross-guesses" >&5
6922 $as_echo "$as_me: WARNING: invalid argument supplied to --enable-cross-guesses" >&2;}
6923 enableval=conservative
6924 fi
6925 gl_cross_guesses="$enableval"
6926 else
6927 gl_cross_guesses=conservative
6928 fi
6929
6930 if test $gl_cross_guesses = risky; then
6931 gl_cross_guess_normal="guessing yes"
6932 gl_cross_guess_inverted="guessing no"
6933 else
6934 gl_cross_guess_normal="guessing no"
6935 gl_cross_guess_inverted="guessing yes"
6936 fi
6937 LIBC_FATAL_STDERR_=1
6938 export LIBC_FATAL_STDERR_
6939
6940
6941 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
6942 if test "x$ac_cv_type_size_t" = xyes; then :
6943
6944 else
6945
6946 cat >>confdefs.h <<_ACEOF
6947 #define size_t unsigned int
6948 _ACEOF
6949
6950 fi
6951
6952 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6953 # for constant arguments. Useless!
6954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
6955 $as_echo_n "checking for working alloca.h... " >&6; }
6956 if ${ac_cv_working_alloca_h+:} false; then :
6957 $as_echo_n "(cached) " >&6
6958 else
6959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6960 /* end confdefs.h. */
6961 #include <alloca.h>
6962 int
6963 main ()
6964 {
6965 char *p = (char *) alloca (2 * sizeof (int));
6966 if (p) return 0;
6967 ;
6968 return 0;
6969 }
6970 _ACEOF
6971 if ac_fn_c_try_link "$LINENO"; then :
6972 ac_cv_working_alloca_h=yes
6973 else
6974 ac_cv_working_alloca_h=no
6975 fi
6976 rm -f core conftest.err conftest.$ac_objext \
6977 conftest$ac_exeext conftest.$ac_ext
6978 fi
6979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
6980 $as_echo "$ac_cv_working_alloca_h" >&6; }
6981 if test $ac_cv_working_alloca_h = yes; then
6982
6983 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
6984
6985 fi
6986
6987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
6988 $as_echo_n "checking for alloca... " >&6; }
6989 if ${ac_cv_func_alloca_works+:} false; then :
6990 $as_echo_n "(cached) " >&6
6991 else
6992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6993 /* end confdefs.h. */
6994 #ifdef __GNUC__
6995 # define alloca __builtin_alloca
6996 #else
6997 # ifdef _MSC_VER
6998 # include <malloc.h>
6999 # define alloca _alloca
7000 # else
7001 # ifdef HAVE_ALLOCA_H
7002 # include <alloca.h>
7003 # else
7004 # ifdef _AIX
7005 #pragma alloca
7006 # else
7007 # ifndef alloca /* predefined by HP cc +Olibcalls */
7008 void *alloca (size_t);
7009 # endif
7010 # endif
7011 # endif
7012 # endif
7013 #endif
7014
7015 int
7016 main ()
7017 {
7018 char *p = (char *) alloca (1);
7019 if (p) return 0;
7020 ;
7021 return 0;
7022 }
7023 _ACEOF
7024 if ac_fn_c_try_link "$LINENO"; then :
7025 ac_cv_func_alloca_works=yes
7026 else
7027 ac_cv_func_alloca_works=no
7028 fi
7029 rm -f core conftest.err conftest.$ac_objext \
7030 conftest$ac_exeext conftest.$ac_ext
7031 fi
7032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
7033 $as_echo "$ac_cv_func_alloca_works" >&6; }
7034
7035 if test $ac_cv_func_alloca_works = yes; then
7036
7037 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
7038
7039 else
7040 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
7041 # that cause trouble. Some versions do not even contain alloca or
7042 # contain a buggy version. If you still want to use their alloca,
7043 # use ar to extract alloca.o from them instead of compiling alloca.c.
7044
7045
7046
7047
7048
7049 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
7050
7051 $as_echo "#define C_ALLOCA 1" >>confdefs.h
7052
7053
7054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
7055 $as_echo_n "checking stack direction for C alloca... " >&6; }
7056 if ${ac_cv_c_stack_direction+:} false; then :
7057 $as_echo_n "(cached) " >&6
7058 else
7059 if test "$cross_compiling" = yes; then :
7060 ac_cv_c_stack_direction=0
7061 else
7062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7063 /* end confdefs.h. */
7064 $ac_includes_default
7065 int
7066 find_stack_direction (int *addr, int depth)
7067 {
7068 int dir, dummy = 0;
7069 if (! addr)
7070 addr = &dummy;
7071 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
7072 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
7073 return dir + dummy;
7074 }
7075
7076 int
7077 main (int argc, char **argv)
7078 {
7079 return find_stack_direction (0, argc + !argv + 20) < 0;
7080 }
7081 _ACEOF
7082 if ac_fn_c_try_run "$LINENO"; then :
7083 ac_cv_c_stack_direction=1
7084 else
7085 ac_cv_c_stack_direction=-1
7086 fi
7087 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7088 conftest.$ac_objext conftest.beam conftest.$ac_ext
7089 fi
7090
7091 fi
7092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
7093 $as_echo "$ac_cv_c_stack_direction" >&6; }
7094 cat >>confdefs.h <<_ACEOF
7095 #define STACK_DIRECTION $ac_cv_c_stack_direction
7096 _ACEOF
7097
7098
7099 fi
7100
7101
7102 GNULIB_INET_NTOP=0;
7103 GNULIB_INET_PTON=0;
7104 HAVE_DECL_INET_NTOP=1;
7105 HAVE_DECL_INET_PTON=1;
7106 REPLACE_INET_NTOP=0;
7107 REPLACE_INET_PTON=0;
7108
7109
7110
7111
7112
7113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
7114 $as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
7115 if ${gl_cv_have_include_next+:} false; then :
7116 $as_echo_n "(cached) " >&6
7117 else
7118 rm -rf conftestd1a conftestd1b conftestd2
7119 mkdir conftestd1a conftestd1b conftestd2
7120 cat <<EOF > conftestd1a/conftest.h
7121 #define DEFINED_IN_CONFTESTD1
7122 #include_next <conftest.h>
7123 #ifdef DEFINED_IN_CONFTESTD2
7124 int foo;
7125 #else
7126 #error "include_next doesn't work"
7127 #endif
7128 EOF
7129 cat <<EOF > conftestd1b/conftest.h
7130 #define DEFINED_IN_CONFTESTD1
7131 #include <stdio.h>
7132 #include_next <conftest.h>
7133 #ifdef DEFINED_IN_CONFTESTD2
7134 int foo;
7135 #else
7136 #error "include_next doesn't work"
7137 #endif
7138 EOF
7139 cat <<EOF > conftestd2/conftest.h
7140 #ifndef DEFINED_IN_CONFTESTD1
7141 #error "include_next test doesn't work"
7142 #endif
7143 #define DEFINED_IN_CONFTESTD2
7144 EOF
7145 gl_save_CPPFLAGS="$CPPFLAGS"
7146 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
7147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7148 /* end confdefs.h. */
7149 #include <conftest.h>
7150 _ACEOF
7151 if ac_fn_c_try_compile "$LINENO"; then :
7152 gl_cv_have_include_next=yes
7153 else
7154 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
7155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7156 /* end confdefs.h. */
7157 #include <conftest.h>
7158 _ACEOF
7159 if ac_fn_c_try_compile "$LINENO"; then :
7160 gl_cv_have_include_next=buggy
7161 else
7162 gl_cv_have_include_next=no
7163 fi
7164 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7165
7166 fi
7167 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7168 CPPFLAGS="$gl_save_CPPFLAGS"
7169 rm -rf conftestd1a conftestd1b conftestd2
7170
7171 fi
7172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
7173 $as_echo "$gl_cv_have_include_next" >&6; }
7174 PRAGMA_SYSTEM_HEADER=
7175 if test $gl_cv_have_include_next = yes; then
7176 INCLUDE_NEXT=include_next
7177 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
7178 if test -n "$GCC"; then
7179 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
7180 fi
7181 else
7182 if test $gl_cv_have_include_next = buggy; then
7183 INCLUDE_NEXT=include
7184 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
7185 else
7186 INCLUDE_NEXT=include
7187 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
7188 fi
7189 fi
7190
7191
7192
7193
7194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether source code line length is unlimited" >&5
7195 $as_echo_n "checking whether source code line length is unlimited... " >&6; }
7196 if ${gl_cv_source_line_length_unlimited+:} false; then :
7197 $as_echo_n "(cached) " >&6
7198 else
7199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7200 /* end confdefs.h. */
7201
7202 #ifdef __TANDEM
7203 choke me
7204 #endif
7205
7206 _ACEOF
7207 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7208 $EGREP "choke me" >/dev/null 2>&1; then :
7209 gl_cv_source_line_length_unlimited=no
7210 else
7211 gl_cv_source_line_length_unlimited=yes
7212 fi
7213 rm -f conftest*
7214
7215
7216 fi
7217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_source_line_length_unlimited" >&5
7218 $as_echo "$gl_cv_source_line_length_unlimited" >&6; }
7219 if test $gl_cv_source_line_length_unlimited = no; then
7220 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
7221 else
7222 PRAGMA_COLUMNS=
7223 fi
7224
7225
7226
7227
7228
7229
7230 if test $ac_cv_header_features_h = yes; then
7231 HAVE_FEATURES_H=1
7232 else
7233 HAVE_FEATURES_H=0
7234 fi
7235
7236
7237
7238
7239
7240 if test $ac_cv_header_sys_socket_h = no; then
7241 for ac_header in ws2tcpip.h
7242 do :
7243 ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
7244 if test "x$ac_cv_header_ws2tcpip_h" = xyes; then :
7245 cat >>confdefs.h <<_ACEOF
7246 #define HAVE_WS2TCPIP_H 1
7247 _ACEOF
7248
7249 fi
7250
7251 done
7252
7253 fi
7254
7255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
7256 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
7257 if test -z "$MKDIR_P"; then
7258 if ${ac_cv_path_mkdir+:} false; then :
7259 $as_echo_n "(cached) " >&6
7260 else
7261 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7262 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
7263 do
7264 IFS=$as_save_IFS
7265 test -z "$as_dir" && as_dir=.
7266 for ac_prog in mkdir gmkdir; do
7267 for ac_exec_ext in '' $ac_executable_extensions; do
7268 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
7269 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
7270 'mkdir (GNU coreutils) '* | \
7271 'mkdir (coreutils) '* | \
7272 'mkdir (fileutils) '4.1*)
7273 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
7274 break 3;;
7275 esac
7276 done
7277 done
7278 done
7279 IFS=$as_save_IFS
7280
7281 fi
7282
7283 test -d ./--version && rmdir ./--version
7284 if test "${ac_cv_path_mkdir+set}" = set; then
7285 MKDIR_P="$ac_cv_path_mkdir -p"
7286 else
7287 # As a last resort, use the slow shell script. Don't cache a
7288 # value for MKDIR_P within a source directory, because that will
7289 # break other packages using the cache if that directory is
7290 # removed, or if the value is a relative name.
7291 MKDIR_P="$ac_install_sh -d"
7292 fi
7293 fi
7294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
7295 $as_echo "$MKDIR_P" >&6; }
7296
7297
7298 GNULIB_BTOWC=0;
7299 GNULIB_WCTOB=0;
7300 GNULIB_MBSINIT=0;
7301 GNULIB_MBRTOWC=0;
7302 GNULIB_MBRLEN=0;
7303 GNULIB_MBSRTOWCS=0;
7304 GNULIB_MBSNRTOWCS=0;
7305 GNULIB_WCRTOMB=0;
7306 GNULIB_WCSRTOMBS=0;
7307 GNULIB_WCSNRTOMBS=0;
7308 GNULIB_WCWIDTH=0;
7309 GNULIB_WMEMCHR=0;
7310 GNULIB_WMEMCMP=0;
7311 GNULIB_WMEMCPY=0;
7312 GNULIB_WMEMMOVE=0;
7313 GNULIB_WMEMPCPY=0;
7314 GNULIB_WMEMSET=0;
7315 GNULIB_WCSLEN=0;
7316 GNULIB_WCSNLEN=0;
7317 GNULIB_WCSCPY=0;
7318 GNULIB_WCPCPY=0;
7319 GNULIB_WCSNCPY=0;
7320 GNULIB_WCPNCPY=0;
7321 GNULIB_WCSCAT=0;
7322 GNULIB_WCSNCAT=0;
7323 GNULIB_WCSCMP=0;
7324 GNULIB_WCSNCMP=0;
7325 GNULIB_WCSCASECMP=0;
7326 GNULIB_WCSNCASECMP=0;
7327 GNULIB_WCSCOLL=0;
7328 GNULIB_WCSXFRM=0;
7329 GNULIB_WCSDUP=0;
7330 GNULIB_WCSCHR=0;
7331 GNULIB_WCSRCHR=0;
7332 GNULIB_WCSCSPN=0;
7333 GNULIB_WCSSPN=0;
7334 GNULIB_WCSPBRK=0;
7335 GNULIB_WCSSTR=0;
7336 GNULIB_WCSTOK=0;
7337 GNULIB_WCSWIDTH=0;
7338 GNULIB_WCSFTIME=0;
7339 GNULIB_MDA_WCSDUP=1;
7340 HAVE_BTOWC=1;
7341 HAVE_MBSINIT=1;
7342 HAVE_MBRTOWC=1;
7343 HAVE_MBRLEN=1;
7344 HAVE_MBSRTOWCS=1;
7345 HAVE_MBSNRTOWCS=1;
7346 HAVE_WCRTOMB=1;
7347 HAVE_WCSRTOMBS=1;
7348 HAVE_WCSNRTOMBS=1;
7349 HAVE_WMEMCHR=1;
7350 HAVE_WMEMCMP=1;
7351 HAVE_WMEMCPY=1;
7352 HAVE_WMEMMOVE=1;
7353 HAVE_WMEMPCPY=1;
7354 HAVE_WMEMSET=1;
7355 HAVE_WCSLEN=1;
7356 HAVE_WCSNLEN=1;
7357 HAVE_WCSCPY=1;
7358 HAVE_WCPCPY=1;
7359 HAVE_WCSNCPY=1;
7360 HAVE_WCPNCPY=1;
7361 HAVE_WCSCAT=1;
7362 HAVE_WCSNCAT=1;
7363 HAVE_WCSCMP=1;
7364 HAVE_WCSNCMP=1;
7365 HAVE_WCSCASECMP=1;
7366 HAVE_WCSNCASECMP=1;
7367 HAVE_WCSCOLL=1;
7368 HAVE_WCSXFRM=1;
7369 HAVE_WCSDUP=1;
7370 HAVE_WCSCHR=1;
7371 HAVE_WCSRCHR=1;
7372 HAVE_WCSCSPN=1;
7373 HAVE_WCSSPN=1;
7374 HAVE_WCSPBRK=1;
7375 HAVE_WCSSTR=1;
7376 HAVE_WCSTOK=1;
7377 HAVE_WCSWIDTH=1;
7378 HAVE_WCSFTIME=1;
7379 HAVE_DECL_WCTOB=1;
7380 HAVE_DECL_WCSDUP=1;
7381 HAVE_DECL_WCWIDTH=1;
7382 REPLACE_MBSTATE_T=0;
7383 REPLACE_BTOWC=0;
7384 REPLACE_WCTOB=0;
7385 REPLACE_MBSINIT=0;
7386 REPLACE_MBRTOWC=0;
7387 REPLACE_MBRLEN=0;
7388 REPLACE_MBSRTOWCS=0;
7389 REPLACE_MBSNRTOWCS=0;
7390 REPLACE_WCRTOMB=0;
7391 REPLACE_WCSRTOMBS=0;
7392 REPLACE_WCSNRTOMBS=0;
7393 REPLACE_WCWIDTH=0;
7394 REPLACE_WCSWIDTH=0;
7395 REPLACE_WCSFTIME=0;
7396 REPLACE_WCSTOK=0;
7397
7398
7399
7400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
7401 $as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
7402 if ${gl_cv_header_wchar_h_correct_inline+:} false; then :
7403 $as_echo_n "(cached) " >&6
7404 else
7405 gl_cv_header_wchar_h_correct_inline=yes
7406 case "$host_os" in
7407 *-gnu* | gnu*)
7408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7409 /* end confdefs.h. */
7410
7411
7412 #define wcstod renamed_wcstod
7413 #include <wchar.h>
7414 extern int zero (void);
7415 int main () { return zero(); }
7416
7417 _ACEOF
7418 save_ac_compile="$ac_compile"
7419 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
7420 if echo '#include "conftest.c"' >conftest1.c \
7421 && { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7422 (eval $ac_compile) 2>&5
7423 ac_status=$?
7424 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7425 test $ac_status = 0; }; then
7426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7427 /* end confdefs.h. */
7428
7429
7430 #define wcstod renamed_wcstod
7431 #include <wchar.h>
7432 int zero (void) { return 0; }
7433
7434 _ACEOF
7435 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
7436 if echo '#include "conftest.c"' >conftest2.c \
7437 && { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7438 (eval $ac_compile) 2>&5
7439 ac_status=$?
7440 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7441 test $ac_status = 0; }; then
7442 if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
7443 :
7444 else
7445 gl_cv_header_wchar_h_correct_inline=no
7446 fi
7447 fi
7448 fi
7449 ac_compile="$save_ac_compile"
7450 rm -f conftest12.c conftest12.$ac_objext conftest$ac_exeext
7451 ;;
7452 esac
7453
7454 fi
7455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
7456 $as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
7457 if test $gl_cv_header_wchar_h_correct_inline = no; then
7458 as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
7459 This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
7460 C99 mode. You have four options:
7461 - Add the flag -fgnu89-inline to CC and reconfigure, or
7462 - Fix your include files, using parts of
7463 <https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
7464 - Use a gcc version older than 4.3, or
7465 - Don't use the flags -std=c99 or -std=gnu99.
7466 Configuration aborted." "$LINENO" 5
7467 fi
7468
7469
7470
7471
7472 for ac_func in $ac_func_list
7473 do :
7474 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7475 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7476 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7477 cat >>confdefs.h <<_ACEOF
7478 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7479 _ACEOF
7480
7481 fi
7482 done
7483
7484
7485
7486
7487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
7488 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
7489 if ${am_cv_langinfo_codeset+:} false; then :
7490 $as_echo_n "(cached) " >&6
7491 else
7492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7493 /* end confdefs.h. */
7494 #include <langinfo.h>
7495 int
7496 main ()
7497 {
7498 char* cs = nl_langinfo(CODESET); return !cs;
7499 ;
7500 return 0;
7501 }
7502 _ACEOF
7503 if ac_fn_c_try_link "$LINENO"; then :
7504 am_cv_langinfo_codeset=yes
7505 else
7506 am_cv_langinfo_codeset=no
7507 fi
7508 rm -f core conftest.err conftest.$ac_objext \
7509 conftest$ac_exeext conftest.$ac_ext
7510
7511 fi
7512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
7513 $as_echo "$am_cv_langinfo_codeset" >&6; }
7514 if test $am_cv_langinfo_codeset = yes; then
7515
7516 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
7517
7518 fi
7519
7520
7521
7522
7523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
7524 $as_echo_n "checking for a traditional french locale... " >&6; }
7525 if ${gt_cv_locale_fr+:} false; then :
7526 $as_echo_n "(cached) " >&6
7527 else
7528
7529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7530 /* end confdefs.h. */
7531
7532 #include <locale.h>
7533 #include <time.h>
7534 #if HAVE_LANGINFO_CODESET
7535 # include <langinfo.h>
7536 #endif
7537 #include <stdlib.h>
7538 #include <string.h>
7539 struct tm t;
7540 char buf[16];
7541 int main () {
7542 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
7543 imitates locale dependent behaviour by looking at the environment
7544 variables, and all locales use the UTF-8 encoding. */
7545 #if defined __BEOS__ || defined __HAIKU__
7546 return 1;
7547 #else
7548 /* Check whether the given locale name is recognized by the system. */
7549 # if defined _WIN32 && !defined __CYGWIN__
7550 /* On native Windows, setlocale(category, "") looks at the system settings,
7551 not at the environment variables. Also, when an encoding suffix such
7552 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
7553 category of the locale to "C". */
7554 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
7555 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
7556 return 1;
7557 # else
7558 if (setlocale (LC_ALL, "") == NULL) return 1;
7559 # endif
7560 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
7561 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
7562 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
7563 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
7564 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
7565 some unit tests fail.
7566 On MirBSD 10, when an unsupported locale is specified, setlocale()
7567 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
7568 # if HAVE_LANGINFO_CODESET
7569 {
7570 const char *cs = nl_langinfo (CODESET);
7571 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
7572 || strcmp (cs, "UTF-8") == 0)
7573 return 1;
7574 }
7575 # endif
7576 # ifdef __CYGWIN__
7577 /* On Cygwin, avoid locale names without encoding suffix, because the
7578 locale_charset() function relies on the encoding suffix. Note that
7579 LC_ALL is set on the command line. */
7580 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
7581 # endif
7582 /* Check whether in the abbreviation of the second month, the second
7583 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
7584 one byte long. This excludes the UTF-8 encoding. */
7585 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
7586 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
7587 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
7588 /* Check whether the decimal separator is a comma.
7589 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
7590 are nl_langinfo(RADIXCHAR) are both ".". */
7591 if (localeconv () ->decimal_point[0] != ',') return 1;
7592 # endif
7593 return 0;
7594 #endif
7595 }
7596
7597 _ACEOF
7598 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
7599 (eval $ac_link) 2>&5
7600 ac_status=$?
7601 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7602 test $ac_status = 0; } && test -s conftest$ac_exeext; then
7603 case "$host_os" in
7604 # Handle native Windows specially, because there setlocale() interprets
7605 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
7606 # "fr" or "fra" as "French" or "French_France.1252",
7607 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
7608 # "ja" as "Japanese" or "Japanese_Japan.932",
7609 # and similar.
7610 mingw*)
7611 # Test for the native Windows locale name.
7612 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7613 gt_cv_locale_fr=French_France.1252
7614 else
7615 # None found.
7616 gt_cv_locale_fr=none
7617 fi
7618 ;;
7619 *)
7620 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
7621 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
7622 # configure script would override the LC_ALL setting. Likewise for
7623 # LC_CTYPE, which is also set at the beginning of the configure script.
7624 # Test for the usual locale name.
7625 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7626 gt_cv_locale_fr=fr_FR
7627 else
7628 # Test for the locale name with explicit encoding suffix.
7629 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7630 gt_cv_locale_fr=fr_FR.ISO-8859-1
7631 else
7632 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
7633 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7634 gt_cv_locale_fr=fr_FR.ISO8859-1
7635 else
7636 # Test for the HP-UX locale name.
7637 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7638 gt_cv_locale_fr=fr_FR.iso88591
7639 else
7640 # Test for the Solaris 7 locale name.
7641 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7642 gt_cv_locale_fr=fr
7643 else
7644 # None found.
7645 gt_cv_locale_fr=none
7646 fi
7647 fi
7648 fi
7649 fi
7650 fi
7651 ;;
7652 esac
7653 fi
7654 rm -fr conftest*
7655
7656 fi
7657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
7658 $as_echo "$gt_cv_locale_fr" >&6; }
7659 LOCALE_FR=$gt_cv_locale_fr
7660
7661
7662
7663 GNULIB__EXIT=0;
7664 GNULIB_ALIGNED_ALLOC=0;
7665 GNULIB_ATOLL=0;
7666 GNULIB_CALLOC_POSIX=0;
7667 GNULIB_CANONICALIZE_FILE_NAME=0;
7668 GNULIB_FREE_POSIX=0;
7669 GNULIB_GETLOADAVG=0;
7670 GNULIB_GETSUBOPT=0;
7671 GNULIB_GRANTPT=0;
7672 GNULIB_MALLOC_POSIX=0;
7673 GNULIB_MBTOWC=0;
7674 GNULIB_MKDTEMP=0;
7675 GNULIB_MKOSTEMP=0;
7676 GNULIB_MKOSTEMPS=0;
7677 GNULIB_MKSTEMP=0;
7678 GNULIB_MKSTEMPS=0;
7679 GNULIB_POSIX_MEMALIGN=0;
7680 GNULIB_POSIX_OPENPT=0;
7681 GNULIB_PTSNAME=0;
7682 GNULIB_PTSNAME_R=0;
7683 GNULIB_PUTENV=0;
7684 GNULIB_QSORT_R=0;
7685 GNULIB_RANDOM=0;
7686 GNULIB_RANDOM_R=0;
7687 GNULIB_REALLOCARRAY=0;
7688 GNULIB_REALLOC_POSIX=0;
7689 GNULIB_REALPATH=0;
7690 GNULIB_RPMATCH=0;
7691 GNULIB_SECURE_GETENV=0;
7692 GNULIB_SETENV=0;
7693 GNULIB_STRTOD=0;
7694 GNULIB_STRTOLD=0;
7695 GNULIB_STRTOLL=0;
7696 GNULIB_STRTOULL=0;
7697 GNULIB_SYSTEM_POSIX=0;
7698 GNULIB_UNLOCKPT=0;
7699 GNULIB_UNSETENV=0;
7700 GNULIB_WCTOMB=0;
7701 GNULIB_MDA_ECVT=1;
7702 GNULIB_MDA_FCVT=1;
7703 GNULIB_MDA_GCVT=1;
7704 GNULIB_MDA_MKTEMP=1;
7705 GNULIB_MDA_PUTENV=1;
7706 HAVE__EXIT=1;
7707 HAVE_ALIGNED_ALLOC=1;
7708 HAVE_ATOLL=1;
7709 HAVE_CANONICALIZE_FILE_NAME=1;
7710 HAVE_DECL_ECVT=1;
7711 HAVE_DECL_FCVT=1;
7712 HAVE_DECL_GCVT=1;
7713 HAVE_DECL_GETLOADAVG=1;
7714 HAVE_GETSUBOPT=1;
7715 HAVE_GRANTPT=1;
7716 HAVE_INITSTATE=1;
7717 HAVE_DECL_INITSTATE=1;
7718 HAVE_MBTOWC=1;
7719 HAVE_MKDTEMP=1;
7720 HAVE_MKOSTEMP=1;
7721 HAVE_MKOSTEMPS=1;
7722 HAVE_MKSTEMP=1;
7723 HAVE_MKSTEMPS=1;
7724 HAVE_POSIX_MEMALIGN=1;
7725 HAVE_POSIX_OPENPT=1;
7726 HAVE_PTSNAME=1;
7727 HAVE_PTSNAME_R=1;
7728 HAVE_QSORT_R=1;
7729 HAVE_RANDOM=1;
7730 HAVE_RANDOM_H=1;
7731 HAVE_RANDOM_R=1;
7732 HAVE_REALLOCARRAY=1;
7733 HAVE_REALPATH=1;
7734 HAVE_RPMATCH=1;
7735 HAVE_SECURE_GETENV=1;
7736 HAVE_SETENV=1;
7737 HAVE_DECL_SETENV=1;
7738 HAVE_SETSTATE=1;
7739 HAVE_DECL_SETSTATE=1;
7740 HAVE_STRTOD=1;
7741 HAVE_STRTOLD=1;
7742 HAVE_STRTOLL=1;
7743 HAVE_STRTOULL=1;
7744 HAVE_STRUCT_RANDOM_DATA=1;
7745 HAVE_SYS_LOADAVG_H=0;
7746 HAVE_UNLOCKPT=1;
7747 HAVE_DECL_UNSETENV=1;
7748 REPLACE_ALIGNED_ALLOC=0;
7749 REPLACE_CALLOC=0;
7750 REPLACE_CANONICALIZE_FILE_NAME=0;
7751 REPLACE_FREE=0;
7752 REPLACE_INITSTATE=0;
7753 REPLACE_MALLOC=0;
7754 REPLACE_MBTOWC=0;
7755 REPLACE_MKSTEMP=0;
7756 REPLACE_POSIX_MEMALIGN=0;
7757 REPLACE_PTSNAME=0;
7758 REPLACE_PTSNAME_R=0;
7759 REPLACE_PUTENV=0;
7760 REPLACE_QSORT_R=0;
7761 REPLACE_RANDOM=0;
7762 REPLACE_RANDOM_R=0;
7763 REPLACE_REALLOC=0;
7764 REPLACE_REALPATH=0;
7765 REPLACE_SETENV=0;
7766 REPLACE_SETSTATE=0;
7767 REPLACE_STRTOD=0;
7768 REPLACE_STRTOLD=0;
7769 REPLACE_UNSETENV=0;
7770 REPLACE_WCTOMB=0;
7771
7772
7773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
7774 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
7775 if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
7776 $as_echo_n "(cached) " >&6
7777 else
7778 rm -f conftest.sym conftest.file
7779 echo >conftest.file
7780 if test "$cross_compiling" = yes; then :
7781 case "$host_os" in
7782 linux-* | linux)
7783 # Guess yes on Linux systems.
7784 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
7785 *-gnu* | gnu*)
7786 # Guess yes on glibc systems.
7787 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
7788 mingw*)
7789 # Guess no on native Windows.
7790 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
7791 *)
7792 # If we don't know, obey --enable-cross-guesses.
7793 gl_cv_func_lstat_dereferences_slashed_symlink="$gl_cross_guess_normal" ;;
7794 esac
7795
7796 else
7797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7798 /* end confdefs.h. */
7799 $ac_includes_default
7800 int
7801 main ()
7802 {
7803 struct stat sbuf;
7804 if (symlink ("conftest.file", "conftest.sym") != 0)
7805 return 1;
7806 /* Linux will dereference the symlink and fail, as required by
7807 POSIX. That is better in the sense that it means we will not
7808 have to compile and use the lstat wrapper. */
7809 return lstat ("conftest.sym/", &sbuf) == 0;
7810
7811 ;
7812 return 0;
7813 }
7814 _ACEOF
7815 if ac_fn_c_try_run "$LINENO"; then :
7816 gl_cv_func_lstat_dereferences_slashed_symlink=yes
7817 else
7818 gl_cv_func_lstat_dereferences_slashed_symlink=no
7819 fi
7820 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7821 conftest.$ac_objext conftest.beam conftest.$ac_ext
7822 fi
7823
7824 rm -f conftest.sym conftest.file
7825
7826 fi
7827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
7828 $as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
7829 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
7830 *yes)
7831
7832 cat >>confdefs.h <<_ACEOF
7833 #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
7834 _ACEOF
7835
7836 ;;
7837 esac
7838
7839
7840
7841
7842
7843
7844
7845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
7846 $as_echo_n "checking whether // is distinct from /... " >&6; }
7847 if ${gl_cv_double_slash_root+:} false; then :
7848 $as_echo_n "(cached) " >&6
7849 else
7850 if test x"$cross_compiling" = xyes ; then
7851 # When cross-compiling, there is no way to tell whether // is special
7852 # short of a list of hosts. However, the only known hosts to date
7853 # that have a distinct // are Apollo DomainOS (too old to port to),
7854 # Cygwin, and z/OS. If anyone knows of another system for which // has
7855 # special semantics and is distinct from /, please report it to
7856 # <bug-gnulib@gnu.org>.
7857 case $host in
7858 *-cygwin | i370-ibm-openedition)
7859 gl_cv_double_slash_root=yes ;;
7860 *)
7861 # Be optimistic and assume that / and // are the same when we
7862 # don't know.
7863 gl_cv_double_slash_root='unknown, assuming no' ;;
7864 esac
7865 else
7866 set x `ls -di / // 2>/dev/null`
7867 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
7868 gl_cv_double_slash_root=no
7869 else
7870 gl_cv_double_slash_root=yes
7871 fi
7872 fi
7873 fi
7874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
7875 $as_echo "$gl_cv_double_slash_root" >&6; }
7876 if test "$gl_cv_double_slash_root" = yes; then
7877
7878 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
7879
7880 fi
7881
7882
7883
7884
7885
7886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
7887 $as_echo_n "checking whether realpath works... " >&6; }
7888 if ${gl_cv_func_realpath_works+:} false; then :
7889 $as_echo_n "(cached) " >&6
7890 else
7891
7892 rm -rf conftest.a conftest.d
7893 touch conftest.a
7894 mkdir conftest.d
7895 if test "$cross_compiling" = yes; then :
7896 case "$host_os" in
7897 # Guess yes on glibc systems.
7898 *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
7899 # Guess yes on musl systems.
7900 *-musl*) gl_cv_func_realpath_works="guessing yes" ;;
7901 # Guess no on native Windows.
7902 mingw*) gl_cv_func_realpath_works="guessing no" ;;
7903 # If we don't know, obey --enable-cross-guesses.
7904 *) gl_cv_func_realpath_works="$gl_cross_guess_normal" ;;
7905 esac
7906
7907 else
7908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7909 /* end confdefs.h. */
7910
7911
7912
7913 #include <stdlib.h>
7914 #if defined __MACH__ && defined __APPLE__
7915 /* Avoid a crash on Mac OS X. */
7916 #include <mach/mach.h>
7917 #include <mach/mach_error.h>
7918 #include <mach/thread_status.h>
7919 #include <mach/exception.h>
7920 #include <mach/task.h>
7921 #include <pthread.h>
7922 /* The exception port on which our thread listens. */
7923 static mach_port_t our_exception_port;
7924 /* The main function of the thread listening for exceptions of type
7925 EXC_BAD_ACCESS. */
7926 static void *
7927 mach_exception_thread (void *arg)
7928 {
7929 /* Buffer for a message to be received. */
7930 struct {
7931 mach_msg_header_t head;
7932 mach_msg_body_t msgh_body;
7933 char data[1024];
7934 } msg;
7935 mach_msg_return_t retval;
7936 /* Wait for a message on the exception port. */
7937 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
7938 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
7939 if (retval != MACH_MSG_SUCCESS)
7940 abort ();
7941 exit (1);
7942 }
7943 static void
7944 nocrash_init (void)
7945 {
7946 mach_port_t self = mach_task_self ();
7947 /* Allocate a port on which the thread shall listen for exceptions. */
7948 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
7949 == KERN_SUCCESS) {
7950 /* See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
7951 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
7952 MACH_MSG_TYPE_MAKE_SEND)
7953 == KERN_SUCCESS) {
7954 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
7955 for us. */
7956 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
7957 /* Create the thread listening on the exception port. */
7958 pthread_attr_t attr;
7959 pthread_t thread;
7960 if (pthread_attr_init (&attr) == 0
7961 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
7962 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
7963 pthread_attr_destroy (&attr);
7964 /* Replace the exception port info for these exceptions with our own.
7965 Note that we replace the exception port for the entire task, not only
7966 for a particular thread. This has the effect that when our exception
7967 port gets the message, the thread specific exception port has already
7968 been asked, and we don't need to bother about it.
7969 See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
7970 task_set_exception_ports (self, mask, our_exception_port,
7971 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
7972 }
7973 }
7974 }
7975 }
7976 #elif defined _WIN32 && ! defined __CYGWIN__
7977 /* Avoid a crash on native Windows. */
7978 #define WIN32_LEAN_AND_MEAN
7979 #include <windows.h>
7980 #include <winerror.h>
7981 static LONG WINAPI
7982 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
7983 {
7984 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
7985 {
7986 case EXCEPTION_ACCESS_VIOLATION:
7987 case EXCEPTION_IN_PAGE_ERROR:
7988 case EXCEPTION_STACK_OVERFLOW:
7989 case EXCEPTION_GUARD_PAGE:
7990 case EXCEPTION_PRIV_INSTRUCTION:
7991 case EXCEPTION_ILLEGAL_INSTRUCTION:
7992 case EXCEPTION_DATATYPE_MISALIGNMENT:
7993 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
7994 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
7995 exit (1);
7996 }
7997 return EXCEPTION_CONTINUE_SEARCH;
7998 }
7999 static void
8000 nocrash_init (void)
8001 {
8002 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
8003 }
8004 #else
8005 /* Avoid a crash on POSIX systems. */
8006 #include <signal.h>
8007 #include <unistd.h>
8008 /* A POSIX signal handler. */
8009 static void
8010 exception_handler (int sig)
8011 {
8012 _exit (1);
8013 }
8014 static void
8015 nocrash_init (void)
8016 {
8017 #ifdef SIGSEGV
8018 signal (SIGSEGV, exception_handler);
8019 #endif
8020 #ifdef SIGBUS
8021 signal (SIGBUS, exception_handler);
8022 #endif
8023 }
8024 #endif
8025
8026 #include <stdlib.h>
8027 #include <string.h>
8028
8029 int
8030 main ()
8031 {
8032
8033 int result = 0;
8034 {
8035 char *name = realpath ("conftest.a", NULL);
8036 if (!(name && *name == '/'))
8037 result |= 1;
8038 free (name);
8039 }
8040 {
8041 char *name = realpath ("conftest.b/../conftest.a", NULL);
8042 if (name != NULL)
8043 result |= 2;
8044 free (name);
8045 }
8046 {
8047 char *name = realpath ("conftest.a/", NULL);
8048 if (name != NULL)
8049 result |= 4;
8050 free (name);
8051 }
8052 {
8053 char *name1 = realpath (".", NULL);
8054 char *name2 = realpath ("conftest.d//./..", NULL);
8055 if (! name1 || ! name2 || strcmp (name1, name2))
8056 result |= 8;
8057 free (name1);
8058 free (name2);
8059 }
8060 return result;
8061
8062 ;
8063 return 0;
8064 }
8065
8066 _ACEOF
8067 if ac_fn_c_try_run "$LINENO"; then :
8068 gl_cv_func_realpath_works=yes
8069 else
8070 gl_cv_func_realpath_works=no
8071 fi
8072 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8073 conftest.$ac_objext conftest.beam conftest.$ac_ext
8074 fi
8075
8076 rm -rf conftest.a conftest.d
8077
8078 fi
8079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
8080 $as_echo "$gl_cv_func_realpath_works" >&6; }
8081 case "$gl_cv_func_realpath_works" in
8082 *yes)
8083
8084 $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
8085
8086 ;;
8087 esac
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097 case "$host_os" in
8098 mingw*) ;;
8099 *) for ac_func in getcwd
8100 do :
8101 ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
8102 if test "x$ac_cv_func_getcwd" = xyes; then :
8103 cat >>confdefs.h <<_ACEOF
8104 #define HAVE_GETCWD 1
8105 _ACEOF
8106
8107 fi
8108 done
8109 ;;
8110 esac
8111
8112
8113
8114
8115
8116
8117 GNULIB_ACCESS=0;
8118 GNULIB_CHDIR=0;
8119 GNULIB_CHOWN=0;
8120 GNULIB_CLOSE=0;
8121 GNULIB_COPY_FILE_RANGE=0;
8122 GNULIB_DUP=0;
8123 GNULIB_DUP2=0;
8124 GNULIB_DUP3=0;
8125 GNULIB_ENVIRON=0;
8126 GNULIB_EUIDACCESS=0;
8127 GNULIB_EXECL=0;
8128 GNULIB_EXECLE=0;
8129 GNULIB_EXECLP=0;
8130 GNULIB_EXECV=0;
8131 GNULIB_EXECVE=0;
8132 GNULIB_EXECVP=0;
8133 GNULIB_EXECVPE=0;
8134 GNULIB_FACCESSAT=0;
8135 GNULIB_FCHDIR=0;
8136 GNULIB_FCHOWNAT=0;
8137 GNULIB_FDATASYNC=0;
8138 GNULIB_FSYNC=0;
8139 GNULIB_FTRUNCATE=0;
8140 GNULIB_GETCWD=0;
8141 GNULIB_GETDOMAINNAME=0;
8142 GNULIB_GETDTABLESIZE=0;
8143 GNULIB_GETENTROPY=0;
8144 GNULIB_GETGROUPS=0;
8145 GNULIB_GETHOSTNAME=0;
8146 GNULIB_GETLOGIN=0;
8147 GNULIB_GETLOGIN_R=0;
8148 GNULIB_GETOPT_POSIX=0;
8149 GNULIB_GETPAGESIZE=0;
8150 GNULIB_GETPASS=0;
8151 GNULIB_GETUSERSHELL=0;
8152 GNULIB_GROUP_MEMBER=0;
8153 GNULIB_ISATTY=0;
8154 GNULIB_LCHOWN=0;
8155 GNULIB_LINK=0;
8156 GNULIB_LINKAT=0;
8157 GNULIB_LSEEK=0;
8158 GNULIB_PIPE=0;
8159 GNULIB_PIPE2=0;
8160 GNULIB_PREAD=0;
8161 GNULIB_PWRITE=0;
8162 GNULIB_READ=0;
8163 GNULIB_READLINK=0;
8164 GNULIB_READLINKAT=0;
8165 GNULIB_RMDIR=0;
8166 GNULIB_SETHOSTNAME=0;
8167 GNULIB_SLEEP=0;
8168 GNULIB_SYMLINK=0;
8169 GNULIB_SYMLINKAT=0;
8170 GNULIB_TRUNCATE=0;
8171 GNULIB_TTYNAME_R=0;
8172 GNULIB_UNISTD_H_NONBLOCKING=0;
8173 GNULIB_UNISTD_H_SIGPIPE=0;
8174 GNULIB_UNLINK=0;
8175 GNULIB_UNLINKAT=0;
8176 GNULIB_USLEEP=0;
8177 GNULIB_WRITE=0;
8178 GNULIB_MDA_ACCESS=1;
8179 GNULIB_MDA_CHDIR=1;
8180 GNULIB_MDA_CLOSE=1;
8181 GNULIB_MDA_DUP=1;
8182 GNULIB_MDA_DUP2=1;
8183 GNULIB_MDA_EXECL=1;
8184 GNULIB_MDA_EXECLE=1;
8185 GNULIB_MDA_EXECLP=1;
8186 GNULIB_MDA_EXECV=1;
8187 GNULIB_MDA_EXECVE=1;
8188 GNULIB_MDA_EXECVP=1;
8189 GNULIB_MDA_EXECVPE=1;
8190 GNULIB_MDA_GETCWD=1;
8191 GNULIB_MDA_GETPID=1;
8192 GNULIB_MDA_ISATTY=1;
8193 GNULIB_MDA_LSEEK=1;
8194 GNULIB_MDA_READ=1;
8195 GNULIB_MDA_RMDIR=1;
8196 GNULIB_MDA_SWAB=1;
8197 GNULIB_MDA_UNLINK=1;
8198 GNULIB_MDA_WRITE=1;
8199 HAVE_CHOWN=1;
8200 HAVE_COPY_FILE_RANGE=1;
8201 HAVE_DUP3=1;
8202 HAVE_EUIDACCESS=1;
8203 HAVE_EXECVPE=1;
8204 HAVE_FACCESSAT=1;
8205 HAVE_FCHDIR=1;
8206 HAVE_FCHOWNAT=1;
8207 HAVE_FDATASYNC=1;
8208 HAVE_FSYNC=1;
8209 HAVE_FTRUNCATE=1;
8210 HAVE_GETDTABLESIZE=1;
8211 HAVE_GETENTROPY=1;
8212 HAVE_GETGROUPS=1;
8213 HAVE_GETHOSTNAME=1;
8214 HAVE_GETLOGIN=1;
8215 HAVE_GETPAGESIZE=1;
8216 HAVE_GETPASS=1;
8217 HAVE_GROUP_MEMBER=1;
8218 HAVE_LCHOWN=1;
8219 HAVE_LINK=1;
8220 HAVE_LINKAT=1;
8221 HAVE_PIPE=1;
8222 HAVE_PIPE2=1;
8223 HAVE_PREAD=1;
8224 HAVE_PWRITE=1;
8225 HAVE_READLINK=1;
8226 HAVE_READLINKAT=1;
8227 HAVE_SETHOSTNAME=1;
8228 HAVE_SLEEP=1;
8229 HAVE_SYMLINK=1;
8230 HAVE_SYMLINKAT=1;
8231 HAVE_UNLINKAT=1;
8232 HAVE_USLEEP=1;
8233 HAVE_DECL_ENVIRON=1;
8234 HAVE_DECL_EXECVPE=1;
8235 HAVE_DECL_FCHDIR=1;
8236 HAVE_DECL_FDATASYNC=1;
8237 HAVE_DECL_GETDOMAINNAME=1;
8238 HAVE_DECL_GETLOGIN=1;
8239 HAVE_DECL_GETLOGIN_R=1;
8240 HAVE_DECL_GETPAGESIZE=1;
8241 HAVE_DECL_GETUSERSHELL=1;
8242 HAVE_DECL_SETHOSTNAME=1;
8243 HAVE_DECL_TRUNCATE=1;
8244 HAVE_DECL_TTYNAME_R=1;
8245 HAVE_OS_H=0;
8246 HAVE_SYS_PARAM_H=0;
8247 REPLACE_ACCESS=0;
8248 REPLACE_CHOWN=0;
8249 REPLACE_CLOSE=0;
8250 REPLACE_DUP=0;
8251 REPLACE_DUP2=0;
8252 REPLACE_EXECL=0;
8253 REPLACE_EXECLE=0;
8254 REPLACE_EXECLP=0;
8255 REPLACE_EXECV=0;
8256 REPLACE_EXECVE=0;
8257 REPLACE_EXECVP=0;
8258 REPLACE_EXECVPE=0;
8259 REPLACE_FACCESSAT=0;
8260 REPLACE_FCHOWNAT=0;
8261 REPLACE_FTRUNCATE=0;
8262 REPLACE_GETCWD=0;
8263 REPLACE_GETDOMAINNAME=0;
8264 REPLACE_GETDTABLESIZE=0;
8265 REPLACE_GETLOGIN_R=0;
8266 REPLACE_GETGROUPS=0;
8267 REPLACE_GETPAGESIZE=0;
8268 REPLACE_GETPASS=0;
8269 REPLACE_ISATTY=0;
8270 REPLACE_LCHOWN=0;
8271 REPLACE_LINK=0;
8272 REPLACE_LINKAT=0;
8273 REPLACE_LSEEK=0;
8274 REPLACE_PREAD=0;
8275 REPLACE_PWRITE=0;
8276 REPLACE_READ=0;
8277 REPLACE_READLINK=0;
8278 REPLACE_READLINKAT=0;
8279 REPLACE_RMDIR=0;
8280 REPLACE_SLEEP=0;
8281 REPLACE_SYMLINK=0;
8282 REPLACE_SYMLINKAT=0;
8283 REPLACE_TRUNCATE=0;
8284 REPLACE_TTYNAME_R=0;
8285 REPLACE_UNLINK=0;
8286 REPLACE_UNLINKAT=0;
8287 REPLACE_USLEEP=0;
8288 REPLACE_WRITE=0;
8289 UNISTD_H_HAVE_SYS_RANDOM_H=0;
8290 UNISTD_H_HAVE_WINSOCK2_H=0;
8291 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
8292
8293
8294
8295
8296
8297
8298
8299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8300 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
8301 if ${ac_cv_type_uid_t+:} false; then :
8302 $as_echo_n "(cached) " >&6
8303 else
8304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8305 /* end confdefs.h. */
8306 #include <sys/types.h>
8307
8308 _ACEOF
8309 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8310 $EGREP "uid_t" >/dev/null 2>&1; then :
8311 ac_cv_type_uid_t=yes
8312 else
8313 ac_cv_type_uid_t=no
8314 fi
8315 rm -f conftest*
8316
8317 fi
8318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8319 $as_echo "$ac_cv_type_uid_t" >&6; }
8320 if test $ac_cv_type_uid_t = no; then
8321
8322 $as_echo "#define uid_t int" >>confdefs.h
8323
8324
8325 $as_echo "#define gid_t int" >>confdefs.h
8326
8327 fi
8328
8329 gl_mda_defines='
8330 #if defined _WIN32 && !defined __CYGWIN__
8331 #define access _access
8332 #define chdir _chdir
8333 #define chmod _chmod
8334 #define close _close
8335 #define creat _creat
8336 #define dup _dup
8337 #define dup2 _dup2
8338 #define ecvt _ecvt
8339 #define execl _execl
8340 #define execle _execle
8341 #define execlp _execlp
8342 #define execv _execv
8343 #define execve _execve
8344 #define execvp _execvp
8345 #define execvpe _execvpe
8346 #define fcloseall _fcloseall
8347 #define fcvt _fcvt
8348 #define fdopen _fdopen
8349 #define fileno _fileno
8350 #define gcvt _gcvt
8351 #define getcwd _getcwd
8352 #define getpid _getpid
8353 #define getw _getw
8354 #define isatty _isatty
8355 #define j0 _j0
8356 #define j1 _j1
8357 #define jn _jn
8358 #define lfind _lfind
8359 #define lsearch _lsearch
8360 #define lseek _lseek
8361 #define memccpy _memccpy
8362 #define mkdir _mkdir
8363 #define mktemp _mktemp
8364 #define open _open
8365 #define putenv _putenv
8366 #define putw _putw
8367 #define read _read
8368 #define rmdir _rmdir
8369 #define strdup _strdup
8370 #define swab _swab
8371 #define tempnam _tempnam
8372 #define tzset _tzset
8373 #define umask _umask
8374 #define unlink _unlink
8375 #define utime _utime
8376 #define wcsdup _wcsdup
8377 #define write _write
8378 #define y0 _y0
8379 #define y1 _y1
8380 #define yn _yn
8381 #endif
8382 '
8383
8384
8385 for ac_header in unistd.h
8386 do :
8387 ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
8388 if test "x$ac_cv_header_unistd_h" = xyes; then :
8389 cat >>confdefs.h <<_ACEOF
8390 #define HAVE_UNISTD_H 1
8391 _ACEOF
8392
8393 fi
8394
8395 done
8396
8397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5
8398 $as_echo_n "checking for working chown... " >&6; }
8399 if ${ac_cv_func_chown_works+:} false; then :
8400 $as_echo_n "(cached) " >&6
8401 else
8402 if test "$cross_compiling" = yes; then :
8403 case "$host_os" in # ((
8404 # Guess yes on Linux systems.
8405 linux-* | linux) ac_cv_func_chown_works="guessing yes" ;;
8406 # Guess yes on glibc systems.
8407 *-gnu* | gnu*) ac_cv_func_chown_works="guessing yes" ;;
8408 # Guess no on native Windows.
8409 mingw*) ac_cv_func_chown_works="guessing no" ;;
8410 # If we don't know, obey --enable-cross-guesses.
8411 *) ac_cv_func_chown_works="$gl_cross_guess_normal" ;;
8412 esac
8413
8414 else
8415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8416 /* end confdefs.h. */
8417 $ac_includes_default
8418 #include <fcntl.h>
8419
8420
8421 $gl_mda_defines
8422
8423 int
8424 main ()
8425 {
8426
8427 char *f = "conftest.chown";
8428 struct stat before, after;
8429
8430 if (creat (f, 0600) < 0)
8431 return 1;
8432 if (stat (f, &before) < 0)
8433 return 1;
8434 if (chown (f, (uid_t) -1, (gid_t) -1) == -1)
8435 return 1;
8436 if (stat (f, &after) < 0)
8437 return 1;
8438 return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid);
8439
8440 ;
8441 return 0;
8442 }
8443
8444 _ACEOF
8445 if ac_fn_c_try_run "$LINENO"; then :
8446 ac_cv_func_chown_works=yes
8447 else
8448 ac_cv_func_chown_works=no
8449 fi
8450 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8451 conftest.$ac_objext conftest.beam conftest.$ac_ext
8452 fi
8453
8454 rm -f conftest.chown
8455
8456 fi
8457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5
8458 $as_echo "$ac_cv_func_chown_works" >&6; }
8459 case "$ac_cv_func_chown_works" in
8460 *yes)
8461
8462 $as_echo "#define HAVE_CHOWN 1" >>confdefs.h
8463
8464 ;;
8465 esac
8466
8467
8468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown dereferences symlinks" >&5
8469 $as_echo_n "checking whether chown dereferences symlinks... " >&6; }
8470 if ${gl_cv_func_chown_follows_symlink+:} false; then :
8471 $as_echo_n "(cached) " >&6
8472 else
8473
8474 if test "$cross_compiling" = yes; then :
8475 gl_cv_func_chown_follows_symlink="guessing yes"
8476
8477 else
8478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8479 /* end confdefs.h. */
8480
8481 #include <unistd.h>
8482 #include <stdlib.h>
8483 #include <errno.h>
8484
8485
8486 $gl_mda_defines
8487
8488 int
8489 main ()
8490 {
8491 int result = 0;
8492 char const *dangling_symlink = "conftest.dangle";
8493
8494 unlink (dangling_symlink);
8495 if (symlink ("conftest.no-such", dangling_symlink))
8496 abort ();
8497
8498 /* Exit successfully on a conforming system,
8499 i.e., where chown must fail with ENOENT. */
8500 if (chown (dangling_symlink, getuid (), getgid ()) == 0)
8501 result |= 1;
8502 if (errno != ENOENT)
8503 result |= 2;
8504 return result;
8505 }
8506
8507 _ACEOF
8508 if ac_fn_c_try_run "$LINENO"; then :
8509 gl_cv_func_chown_follows_symlink=yes
8510 else
8511 gl_cv_func_chown_follows_symlink=no
8512 fi
8513 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8514 conftest.$ac_objext conftest.beam conftest.$ac_ext
8515 fi
8516
8517
8518
8519 fi
8520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_follows_symlink" >&5
8521 $as_echo "$gl_cv_func_chown_follows_symlink" >&6; }
8522
8523 case "$gl_cv_func_chown_follows_symlink" in
8524 *yes) ;;
8525 *)
8526
8527 $as_echo "#define CHOWN_MODIFIES_SYMLINK 1" >>confdefs.h
8528
8529 ;;
8530 esac
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543 if test $ac_cv_func_chown = no; then
8544 HAVE_CHOWN=0
8545 else
8546 case "$gl_cv_func_chown_follows_symlink" in
8547 *yes) ;;
8548 *) REPLACE_CHOWN=1 ;;
8549 esac
8550
8551 case "$ac_cv_func_chown_works" in
8552 *no)
8553
8554 $as_echo "#define CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE 1" >>confdefs.h
8555
8556 REPLACE_CHOWN=1
8557 ;;
8558 esac
8559
8560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown honors trailing slash" >&5
8561 $as_echo_n "checking whether chown honors trailing slash... " >&6; }
8562 if ${gl_cv_func_chown_slash_works+:} false; then :
8563 $as_echo_n "(cached) " >&6
8564 else
8565 touch conftest.file && rm -f conftest.link
8566 if test "$cross_compiling" = yes; then :
8567 case "$host_os" in
8568 # Guess yes on glibc systems.
8569 *-gnu*) gl_cv_func_chown_slash_works="guessing yes" ;;
8570 # Guess yes on musl systems.
8571 *-musl*) gl_cv_func_chown_slash_works="guessing yes" ;;
8572 # If we don't know, obey --enable-cross-guesses.
8573 *) gl_cv_func_chown_slash_works="$gl_cross_guess_normal" ;;
8574 esac
8575
8576 else
8577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8578 /* end confdefs.h. */
8579
8580 #include <unistd.h>
8581 #include <stdlib.h>
8582 #include <errno.h>
8583
8584
8585 $gl_mda_defines
8586
8587 int
8588 main ()
8589 {
8590 if (symlink ("conftest.file", "conftest.link")) return 1;
8591 if (chown ("conftest.link/", getuid (), getgid ()) == 0) return 2;
8592
8593 ;
8594 return 0;
8595 }
8596 _ACEOF
8597 if ac_fn_c_try_run "$LINENO"; then :
8598 gl_cv_func_chown_slash_works=yes
8599 else
8600 gl_cv_func_chown_slash_works=no
8601 fi
8602 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8603 conftest.$ac_objext conftest.beam conftest.$ac_ext
8604 fi
8605
8606 rm -f conftest.link conftest.file
8607 fi
8608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_slash_works" >&5
8609 $as_echo "$gl_cv_func_chown_slash_works" >&6; }
8610 case "$gl_cv_func_chown_slash_works" in
8611 *yes) ;;
8612 *)
8613
8614 $as_echo "#define CHOWN_TRAILING_SLASH_BUG 1" >>confdefs.h
8615
8616 REPLACE_CHOWN=1
8617 ;;
8618 esac
8619
8620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown always updates ctime" >&5
8621 $as_echo_n "checking whether chown always updates ctime... " >&6; }
8622 if ${gl_cv_func_chown_ctime_works+:} false; then :
8623 $as_echo_n "(cached) " >&6
8624 else
8625 if test "$cross_compiling" = yes; then :
8626 case "$host_os" in
8627 # Guess yes on glibc systems.
8628 *-gnu*) gl_cv_func_chown_ctime_works="guessing yes" ;;
8629 # Guess yes on musl systems.
8630 *-musl*) gl_cv_func_chown_ctime_works="guessing yes" ;;
8631 # If we don't know, obey --enable-cross-guesses.
8632 *) gl_cv_func_chown_ctime_works="$gl_cross_guess_normal" ;;
8633 esac
8634
8635 else
8636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8637 /* end confdefs.h. */
8638
8639 #include <unistd.h>
8640 #include <stdlib.h>
8641 #include <errno.h>
8642 #include <fcntl.h>
8643 #include <sys/stat.h>
8644
8645
8646 $gl_mda_defines
8647
8648 int
8649 main ()
8650 {
8651 struct stat st1, st2;
8652 if (close (creat ("conftest.file", 0600))) return 1;
8653 if (stat ("conftest.file", &st1)) return 2;
8654 sleep (1);
8655 if (chown ("conftest.file", st1.st_uid, st1.st_gid)) return 3;
8656 if (stat ("conftest.file", &st2)) return 4;
8657 if (st2.st_ctime <= st1.st_ctime) return 5;
8658
8659 ;
8660 return 0;
8661 }
8662 _ACEOF
8663 if ac_fn_c_try_run "$LINENO"; then :
8664 gl_cv_func_chown_ctime_works=yes
8665 else
8666 gl_cv_func_chown_ctime_works=no
8667 fi
8668 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8669 conftest.$ac_objext conftest.beam conftest.$ac_ext
8670 fi
8671
8672 rm -f conftest.file
8673 fi
8674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_ctime_works" >&5
8675 $as_echo "$gl_cv_func_chown_ctime_works" >&6; }
8676 case "$gl_cv_func_chown_ctime_works" in
8677 *yes) ;;
8678 *)
8679
8680 $as_echo "#define CHOWN_CHANGE_TIME_BUG 1" >>confdefs.h
8681
8682 REPLACE_CHOWN=1
8683 ;;
8684 esac
8685 fi
8686
8687
8688
8689
8690
8691 if test $ac_cv_func__set_invalid_parameter_handler = yes; then
8692 HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
8693
8694 $as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
8695
8696 else
8697 HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
8698 fi
8699
8700
8701
8702
8703
8704 GNULIB_OPENDIR=0;
8705 GNULIB_READDIR=0;
8706 GNULIB_REWINDDIR=0;
8707 GNULIB_CLOSEDIR=0;
8708 GNULIB_DIRFD=0;
8709 GNULIB_FDOPENDIR=0;
8710 GNULIB_SCANDIR=0;
8711 GNULIB_ALPHASORT=0;
8712 HAVE_OPENDIR=1;
8713 HAVE_READDIR=1;
8714 HAVE_REWINDDIR=1;
8715 HAVE_CLOSEDIR=1;
8716 HAVE_DECL_DIRFD=1;
8717 HAVE_DECL_FDOPENDIR=1;
8718 HAVE_FDOPENDIR=1;
8719 HAVE_SCANDIR=1;
8720 HAVE_ALPHASORT=1;
8721 REPLACE_OPENDIR=0;
8722 REPLACE_CLOSEDIR=0;
8723 REPLACE_DIRFD=0;
8724 REPLACE_FDOPENDIR=0;
8725
8726
8727 GNULIB_ISBLANK=0;
8728 HAVE_ISBLANK=1;
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
8740 $as_echo_n "checking if environ is properly declared... " >&6; }
8741 if ${gt_cv_var_environ_declaration+:} false; then :
8742 $as_echo_n "(cached) " >&6
8743 else
8744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8745 /* end confdefs.h. */
8746 #if HAVE_UNISTD_H
8747 #include <unistd.h>
8748 #endif
8749 /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
8750 #include <stdlib.h>
8751
8752 extern struct { int foo; } environ;
8753 int
8754 main ()
8755 {
8756 environ.foo = 1;
8757 ;
8758 return 0;
8759 }
8760 _ACEOF
8761 if ac_fn_c_try_compile "$LINENO"; then :
8762 gt_cv_var_environ_declaration=no
8763 else
8764 gt_cv_var_environ_declaration=yes
8765 fi
8766 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8767 fi
8768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
8769 $as_echo "$gt_cv_var_environ_declaration" >&6; }
8770 if test $gt_cv_var_environ_declaration = yes; then
8771
8772 $as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
8773
8774 fi
8775
8776
8777 if test $gt_cv_var_environ_declaration != yes; then
8778 HAVE_DECL_ENVIRON=0
8779 fi
8780
8781
8782
8783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
8784 $as_echo_n "checking for complete errno.h... " >&6; }
8785 if ${gl_cv_header_errno_h_complete+:} false; then :
8786 $as_echo_n "(cached) " >&6
8787 else
8788
8789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8790 /* end confdefs.h. */
8791
8792 #include <errno.h>
8793 #if !defined ETXTBSY
8794 booboo
8795 #endif
8796 #if !defined ENOMSG
8797 booboo
8798 #endif
8799 #if !defined EIDRM
8800 booboo
8801 #endif
8802 #if !defined ENOLINK
8803 booboo
8804 #endif
8805 #if !defined EPROTO
8806 booboo
8807 #endif
8808 #if !defined EMULTIHOP
8809 booboo
8810 #endif
8811 #if !defined EBADMSG
8812 booboo
8813 #endif
8814 #if !defined EOVERFLOW
8815 booboo
8816 #endif
8817 #if !defined ENOTSUP
8818 booboo
8819 #endif
8820 #if !defined ENETRESET
8821 booboo
8822 #endif
8823 #if !defined ECONNABORTED
8824 booboo
8825 #endif
8826 #if !defined ESTALE
8827 booboo
8828 #endif
8829 #if !defined EDQUOT
8830 booboo
8831 #endif
8832 #if !defined ECANCELED
8833 booboo
8834 #endif
8835 #if !defined EOWNERDEAD
8836 booboo
8837 #endif
8838 #if !defined ENOTRECOVERABLE
8839 booboo
8840 #endif
8841 #if !defined EILSEQ
8842 booboo
8843 #endif
8844
8845 _ACEOF
8846 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8847 $EGREP "booboo" >/dev/null 2>&1; then :
8848 gl_cv_header_errno_h_complete=no
8849 else
8850 gl_cv_header_errno_h_complete=yes
8851 fi
8852 rm -f conftest*
8853
8854
8855 fi
8856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
8857 $as_echo "$gl_cv_header_errno_h_complete" >&6; }
8858 if test $gl_cv_header_errno_h_complete = yes; then
8859 ERRNO_H=''
8860 else
8861
8862
8863
8864
8865
8866
8867
8868
8869 if test $gl_cv_have_include_next = yes; then
8870 gl_cv_next_errno_h='<'errno.h'>'
8871 else
8872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
8873 $as_echo_n "checking absolute name of <errno.h>... " >&6; }
8874 if ${gl_cv_next_errno_h+:} false; then :
8875 $as_echo_n "(cached) " >&6
8876 else
8877
8878
8879
8880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8881 /* end confdefs.h. */
8882 #include <errno.h>
8883 _ACEOF
8884 case "$host_os" in
8885 aix*) gl_absname_cpp="$ac_cpp -C" ;;
8886 *) gl_absname_cpp="$ac_cpp" ;;
8887 esac
8888
8889 case "$host_os" in
8890 mingw*)
8891 gl_dirsep_regex='[/\\]'
8892 ;;
8893 *)
8894 gl_dirsep_regex='\/'
8895 ;;
8896 esac
8897 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
8898 gl_header_literal_regex=`echo 'errno.h' \
8899 | sed -e "$gl_make_literal_regex_sed"`
8900 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
8901 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
8902 s|^/[^/]|//&|
8903 p
8904 q
8905 }'
8906
8907 gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
8908 sed -n "$gl_absolute_header_sed"`
8909
8910 gl_header=$gl_cv_absolute_errno_h
8911 gl_cv_next_errno_h='"'$gl_header'"'
8912
8913
8914 fi
8915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
8916 $as_echo "$gl_cv_next_errno_h" >&6; }
8917 fi
8918 NEXT_ERRNO_H=$gl_cv_next_errno_h
8919
8920 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
8921 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
8922 gl_next_as_first_directive='<'errno.h'>'
8923 else
8924 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
8925 gl_next_as_first_directive=$gl_cv_next_errno_h
8926 fi
8927 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
8928
8929
8930
8931
8932 ERRNO_H='errno.h'
8933 fi
8934
8935 if test -n "$ERRNO_H"; then
8936 GL_GENERATE_ERRNO_H_TRUE=
8937 GL_GENERATE_ERRNO_H_FALSE='#'
8938 else
8939 GL_GENERATE_ERRNO_H_TRUE='#'
8940 GL_GENERATE_ERRNO_H_FALSE=
8941 fi
8942
8943
8944 if test -n "$ERRNO_H"; then
8945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
8946 $as_echo_n "checking for EMULTIHOP value... " >&6; }
8947 if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then :
8948 $as_echo_n "(cached) " >&6
8949 else
8950
8951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8952 /* end confdefs.h. */
8953
8954 #include <errno.h>
8955 #ifdef EMULTIHOP
8956 yes
8957 #endif
8958
8959 _ACEOF
8960 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8961 $EGREP "yes" >/dev/null 2>&1; then :
8962 gl_cv_header_errno_h_EMULTIHOP=yes
8963 else
8964 gl_cv_header_errno_h_EMULTIHOP=no
8965 fi
8966 rm -f conftest*
8967
8968 if test $gl_cv_header_errno_h_EMULTIHOP = no; then
8969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8970 /* end confdefs.h. */
8971
8972 #define _XOPEN_SOURCE_EXTENDED 1
8973 #include <errno.h>
8974 #ifdef EMULTIHOP
8975 yes
8976 #endif
8977
8978 _ACEOF
8979 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8980 $EGREP "yes" >/dev/null 2>&1; then :
8981 gl_cv_header_errno_h_EMULTIHOP=hidden
8982 fi
8983 rm -f conftest*
8984
8985 if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
8986 if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
8987 #define _XOPEN_SOURCE_EXTENDED 1
8988 #include <errno.h>
8989 /* The following two lines are a workaround against an autoconf-2.52 bug. */
8990 #include <stdio.h>
8991 #include <stdlib.h>
8992 "; then :
8993
8994 fi
8995
8996 fi
8997 fi
8998
8999 fi
9000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
9001 $as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
9002 case $gl_cv_header_errno_h_EMULTIHOP in
9003 yes | no)
9004 EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
9005 ;;
9006 *)
9007 EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
9008 ;;
9009 esac
9010
9011
9012 fi
9013
9014
9015 if test -n "$ERRNO_H"; then
9016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
9017 $as_echo_n "checking for ENOLINK value... " >&6; }
9018 if ${gl_cv_header_errno_h_ENOLINK+:} false; then :
9019 $as_echo_n "(cached) " >&6
9020 else
9021
9022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9023 /* end confdefs.h. */
9024
9025 #include <errno.h>
9026 #ifdef ENOLINK
9027 yes
9028 #endif
9029
9030 _ACEOF
9031 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9032 $EGREP "yes" >/dev/null 2>&1; then :
9033 gl_cv_header_errno_h_ENOLINK=yes
9034 else
9035 gl_cv_header_errno_h_ENOLINK=no
9036 fi
9037 rm -f conftest*
9038
9039 if test $gl_cv_header_errno_h_ENOLINK = no; then
9040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9041 /* end confdefs.h. */
9042
9043 #define _XOPEN_SOURCE_EXTENDED 1
9044 #include <errno.h>
9045 #ifdef ENOLINK
9046 yes
9047 #endif
9048
9049 _ACEOF
9050 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9051 $EGREP "yes" >/dev/null 2>&1; then :
9052 gl_cv_header_errno_h_ENOLINK=hidden
9053 fi
9054 rm -f conftest*
9055
9056 if test $gl_cv_header_errno_h_ENOLINK = hidden; then
9057 if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
9058 #define _XOPEN_SOURCE_EXTENDED 1
9059 #include <errno.h>
9060 /* The following two lines are a workaround against an autoconf-2.52 bug. */
9061 #include <stdio.h>
9062 #include <stdlib.h>
9063 "; then :
9064
9065 fi
9066
9067 fi
9068 fi
9069
9070 fi
9071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
9072 $as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
9073 case $gl_cv_header_errno_h_ENOLINK in
9074 yes | no)
9075 ENOLINK_HIDDEN=0; ENOLINK_VALUE=
9076 ;;
9077 *)
9078 ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
9079 ;;
9080 esac
9081
9082
9083 fi
9084
9085
9086 if test -n "$ERRNO_H"; then
9087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
9088 $as_echo_n "checking for EOVERFLOW value... " >&6; }
9089 if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then :
9090 $as_echo_n "(cached) " >&6
9091 else
9092
9093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9094 /* end confdefs.h. */
9095
9096 #include <errno.h>
9097 #ifdef EOVERFLOW
9098 yes
9099 #endif
9100
9101 _ACEOF
9102 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9103 $EGREP "yes" >/dev/null 2>&1; then :
9104 gl_cv_header_errno_h_EOVERFLOW=yes
9105 else
9106 gl_cv_header_errno_h_EOVERFLOW=no
9107 fi
9108 rm -f conftest*
9109
9110 if test $gl_cv_header_errno_h_EOVERFLOW = no; then
9111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9112 /* end confdefs.h. */
9113
9114 #define _XOPEN_SOURCE_EXTENDED 1
9115 #include <errno.h>
9116 #ifdef EOVERFLOW
9117 yes
9118 #endif
9119
9120 _ACEOF
9121 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9122 $EGREP "yes" >/dev/null 2>&1; then :
9123 gl_cv_header_errno_h_EOVERFLOW=hidden
9124 fi
9125 rm -f conftest*
9126
9127 if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
9128 if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
9129 #define _XOPEN_SOURCE_EXTENDED 1
9130 #include <errno.h>
9131 /* The following two lines are a workaround against an autoconf-2.52 bug. */
9132 #include <stdio.h>
9133 #include <stdlib.h>
9134 "; then :
9135
9136 fi
9137
9138 fi
9139 fi
9140
9141 fi
9142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
9143 $as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
9144 case $gl_cv_header_errno_h_EOVERFLOW in
9145 yes | no)
9146 EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
9147 ;;
9148 *)
9149 EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
9150 ;;
9151 esac
9152
9153
9154 fi
9155
9156
9157 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
9158 if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
9159 ac_have_decl=1
9160 else
9161 ac_have_decl=0
9162 fi
9163
9164 cat >>confdefs.h <<_ACEOF
9165 #define HAVE_DECL_STRERROR_R $ac_have_decl
9166 _ACEOF
9167
9168 for ac_func in strerror_r
9169 do :
9170 ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
9171 if test "x$ac_cv_func_strerror_r" = xyes; then :
9172 cat >>confdefs.h <<_ACEOF
9173 #define HAVE_STRERROR_R 1
9174 _ACEOF
9175
9176 fi
9177 done
9178
9179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
9180 $as_echo_n "checking whether strerror_r returns char *... " >&6; }
9181 if ${ac_cv_func_strerror_r_char_p+:} false; then :
9182 $as_echo_n "(cached) " >&6
9183 else
9184
9185 ac_cv_func_strerror_r_char_p=no
9186 if test $ac_cv_have_decl_strerror_r = yes; then
9187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9188 /* end confdefs.h. */
9189 $ac_includes_default
9190 int
9191 main ()
9192 {
9193
9194 char buf[100];
9195 char x = *strerror_r (0, buf, sizeof buf);
9196 char *p = strerror_r (0, buf, sizeof buf);
9197 return !p || x;
9198
9199 ;
9200 return 0;
9201 }
9202 _ACEOF
9203 if ac_fn_c_try_compile "$LINENO"; then :
9204 ac_cv_func_strerror_r_char_p=yes
9205 fi
9206 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9207 else
9208 # strerror_r is not declared. Choose between
9209 # systems that have relatively inaccessible declarations for the
9210 # function. BeOS and DEC UNIX 4.0 fall in this category, but the
9211 # former has a strerror_r that returns char*, while the latter
9212 # has a strerror_r that returns `int'.
9213 # This test should segfault on the DEC system.
9214 if test "$cross_compiling" = yes; then :
9215 :
9216 else
9217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9218 /* end confdefs.h. */
9219 $ac_includes_default
9220 extern char *strerror_r ();
9221 int
9222 main ()
9223 {
9224 char buf[100];
9225 char x = *strerror_r (0, buf, sizeof buf);
9226 return ! isalpha (x);
9227 ;
9228 return 0;
9229 }
9230 _ACEOF
9231 if ac_fn_c_try_run "$LINENO"; then :
9232 ac_cv_func_strerror_r_char_p=yes
9233 fi
9234 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9235 conftest.$ac_objext conftest.beam conftest.$ac_ext
9236 fi
9237
9238 fi
9239
9240 fi
9241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
9242 $as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
9243 if test $ac_cv_func_strerror_r_char_p = yes; then
9244
9245 $as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
9246
9247 fi
9248
9249
9250
9251
9252 ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default"
9253 if test "x$ac_cv_have_decl_fchdir" = xyes; then :
9254 ac_have_decl=1
9255 else
9256 ac_have_decl=0
9257 fi
9258
9259 cat >>confdefs.h <<_ACEOF
9260 #define HAVE_DECL_FCHDIR $ac_have_decl
9261 _ACEOF
9262
9263
9264 GNULIB_CREAT=0;
9265 GNULIB_FCNTL=0;
9266 GNULIB_NONBLOCKING=0;
9267 GNULIB_OPEN=0;
9268 GNULIB_OPENAT=0;
9269 GNULIB_MDA_CREAT=1;
9270 GNULIB_MDA_OPEN=1;
9271 HAVE_FCNTL=1;
9272 HAVE_OPENAT=1;
9273 REPLACE_CREAT=0;
9274 REPLACE_FCNTL=0;
9275 REPLACE_OPEN=0;
9276 REPLACE_OPENAT=0;
9277
9278
9279
9280
9281
9282
9283
9284
9285
9286
9287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
9288 $as_echo_n "checking for working fcntl.h... " >&6; }
9289 if ${gl_cv_header_working_fcntl_h+:} false; then :
9290 $as_echo_n "(cached) " >&6
9291 else
9292 if test "$cross_compiling" = yes; then :
9293 case "$host_os" in
9294 # Guess 'no' on native Windows.
9295 mingw*) gl_cv_header_working_fcntl_h='no' ;;
9296 *) gl_cv_header_working_fcntl_h=cross-compiling ;;
9297 esac
9298
9299 else
9300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9301 /* end confdefs.h. */
9302 #include <sys/types.h>
9303 #include <sys/stat.h>
9304 #if HAVE_UNISTD_H
9305 # include <unistd.h>
9306 #else /* on Windows with MSVC */
9307 # include <io.h>
9308 # include <stdlib.h>
9309 # defined sleep(n) _sleep ((n) * 1000)
9310 #endif
9311 #include <fcntl.h>
9312
9313
9314 $gl_mda_defines
9315
9316 #ifndef O_NOATIME
9317 #define O_NOATIME 0
9318 #endif
9319 #ifndef O_NOFOLLOW
9320 #define O_NOFOLLOW 0
9321 #endif
9322 static int const constants[] =
9323 {
9324 O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
9325 O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
9326 };
9327
9328 int
9329 main ()
9330 {
9331
9332 int result = !constants;
9333 #if HAVE_SYMLINK
9334 {
9335 static char const sym[] = "conftest.sym";
9336 if (symlink ("/dev/null", sym) != 0)
9337 result |= 2;
9338 else
9339 {
9340 int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
9341 if (fd >= 0)
9342 {
9343 close (fd);
9344 result |= 4;
9345 }
9346 }
9347 if (unlink (sym) != 0 || symlink (".", sym) != 0)
9348 result |= 2;
9349 else
9350 {
9351 int fd = open (sym, O_RDONLY | O_NOFOLLOW);
9352 if (fd >= 0)
9353 {
9354 close (fd);
9355 result |= 4;
9356 }
9357 }
9358 unlink (sym);
9359 }
9360 #endif
9361 {
9362 static char const file[] = "confdefs.h";
9363 int fd = open (file, O_RDONLY | O_NOATIME);
9364 if (fd < 0)
9365 result |= 8;
9366 else
9367 {
9368 struct stat st0;
9369 if (fstat (fd, &st0) != 0)
9370 result |= 16;
9371 else
9372 {
9373 char c;
9374 sleep (1);
9375 if (read (fd, &c, 1) != 1)
9376 result |= 24;
9377 else
9378 {
9379 if (close (fd) != 0)
9380 result |= 32;
9381 else
9382 {
9383 struct stat st1;
9384 if (stat (file, &st1) != 0)
9385 result |= 40;
9386 else
9387 if (st0.st_atime != st1.st_atime)
9388 result |= 64;
9389 }
9390 }
9391 }
9392 }
9393 }
9394 return result;
9395 ;
9396 return 0;
9397 }
9398 _ACEOF
9399 if ac_fn_c_try_run "$LINENO"; then :
9400 gl_cv_header_working_fcntl_h=yes
9401 else
9402 case $? in #(
9403 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
9404 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
9405 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
9406 *) gl_cv_header_working_fcntl_h='no';;
9407 esac
9408 fi
9409 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9410 conftest.$ac_objext conftest.beam conftest.$ac_ext
9411 fi
9412
9413
9414 fi
9415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
9416 $as_echo "$gl_cv_header_working_fcntl_h" >&6; }
9417
9418 case $gl_cv_header_working_fcntl_h in #(
9419 *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
9420 *) ac_val=1;;
9421 esac
9422
9423 cat >>confdefs.h <<_ACEOF
9424 #define HAVE_WORKING_O_NOATIME $ac_val
9425 _ACEOF
9426
9427
9428 case $gl_cv_header_working_fcntl_h in #(
9429 *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
9430 *) ac_val=1;;
9431 esac
9432
9433 cat >>confdefs.h <<_ACEOF
9434 #define HAVE_WORKING_O_NOFOLLOW $ac_val
9435 _ACEOF
9436
9437
9438
9439 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
9440 "
9441 if test "x$ac_cv_type_pid_t" = xyes; then :
9442
9443 else
9444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9445 /* end confdefs.h. */
9446
9447 #if defined _WIN64 && !defined __CYGWIN__
9448 LLP64
9449 #endif
9450
9451 int
9452 main ()
9453 {
9454
9455 ;
9456 return 0;
9457 }
9458
9459 _ACEOF
9460 if ac_fn_c_try_compile "$LINENO"; then :
9461 gl_pid_type='int'
9462 else
9463 gl_pid_type='__int64'
9464 fi
9465 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9466
9467 cat >>confdefs.h <<_ACEOF
9468 #define pid_t $gl_pid_type
9469 _ACEOF
9470
9471
9472 fi
9473
9474
9475 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
9476 if test "x$ac_cv_type_mode_t" = xyes; then :
9477
9478 else
9479
9480 cat >>confdefs.h <<_ACEOF
9481 #define mode_t int
9482 _ACEOF
9483
9484 fi
9485
9486
9487
9488
9489 GNULIB_FFS=0;
9490 HAVE_FFS=1;
9491 HAVE_STRCASECMP=1;
9492 HAVE_DECL_STRNCASECMP=1;
9493
9494
9495
9496
9497 GNULIB_FNMATCH=0;
9498 HAVE_FNMATCH=1;
9499 REPLACE_FNMATCH=0;
9500
9501
9502
9503
9504
9505
9506
9507
9508
9509
9510
9511
9512
9513
9514
9515
9516 if test $gl_cv_have_include_next = yes; then
9517 gl_cv_next_fnmatch_h='<'fnmatch.h'>'
9518 else
9519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fnmatch.h>" >&5
9520 $as_echo_n "checking absolute name of <fnmatch.h>... " >&6; }
9521 if ${gl_cv_next_fnmatch_h+:} false; then :
9522 $as_echo_n "(cached) " >&6
9523 else
9524
9525 if test $ac_cv_header_fnmatch_h = yes; then
9526
9527
9528
9529
9530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9531 /* end confdefs.h. */
9532 #include <fnmatch.h>
9533 _ACEOF
9534 case "$host_os" in
9535 aix*) gl_absname_cpp="$ac_cpp -C" ;;
9536 *) gl_absname_cpp="$ac_cpp" ;;
9537 esac
9538
9539 case "$host_os" in
9540 mingw*)
9541 gl_dirsep_regex='[/\\]'
9542 ;;
9543 *)
9544 gl_dirsep_regex='\/'
9545 ;;
9546 esac
9547 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
9548 gl_header_literal_regex=`echo 'fnmatch.h' \
9549 | sed -e "$gl_make_literal_regex_sed"`
9550 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
9551 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
9552 s|^/[^/]|//&|
9553 p
9554 q
9555 }'
9556
9557 gl_cv_absolute_fnmatch_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
9558 sed -n "$gl_absolute_header_sed"`
9559
9560 gl_header=$gl_cv_absolute_fnmatch_h
9561 gl_cv_next_fnmatch_h='"'$gl_header'"'
9562 else
9563 gl_cv_next_fnmatch_h='<'fnmatch.h'>'
9564 fi
9565
9566
9567 fi
9568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fnmatch_h" >&5
9569 $as_echo "$gl_cv_next_fnmatch_h" >&6; }
9570 fi
9571 NEXT_FNMATCH_H=$gl_cv_next_fnmatch_h
9572
9573 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
9574 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
9575 gl_next_as_first_directive='<'fnmatch.h'>'
9576 else
9577 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
9578 gl_next_as_first_directive=$gl_cv_next_fnmatch_h
9579 fi
9580 NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H=$gl_next_as_first_directive
9581
9582
9583
9584
9585
9586
9587
9588 if test $ac_cv_header_fnmatch_h = yes; then
9589 HAVE_FNMATCH_H=1
9590 else
9591 HAVE_FNMATCH_H=0
9592 fi
9593
9594
9595 FNMATCH_H=''
9596 if false; then
9597 FNMATCH_H=fnmatch.h
9598 else
9599 if test $ac_cv_header_fnmatch_h != yes; then
9600 FNMATCH_H=fnmatch.h
9601 fi
9602 fi
9603
9604
9605 if test -n "$FNMATCH_H"; then
9606 GL_GENERATE_FNMATCH_H_TRUE=
9607 GL_GENERATE_FNMATCH_H_FALSE='#'
9608 else
9609 GL_GENERATE_FNMATCH_H_TRUE='#'
9610 GL_GENERATE_FNMATCH_H_FALSE=
9611 fi
9612
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
9623 $as_echo_n "checking for mbstate_t... " >&6; }
9624 if ${ac_cv_type_mbstate_t+:} false; then :
9625 $as_echo_n "(cached) " >&6
9626 else
9627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9628 /* end confdefs.h. */
9629 $ac_includes_default
9630 #include <wchar.h>
9631 int
9632 main ()
9633 {
9634 mbstate_t x; return sizeof x;
9635 ;
9636 return 0;
9637 }
9638 _ACEOF
9639 if ac_fn_c_try_compile "$LINENO"; then :
9640 ac_cv_type_mbstate_t=yes
9641 else
9642 ac_cv_type_mbstate_t=no
9643 fi
9644 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9645 fi
9646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
9647 $as_echo "$ac_cv_type_mbstate_t" >&6; }
9648 if test $ac_cv_type_mbstate_t = yes; then
9649
9650 $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
9651
9652 else
9653
9654 $as_echo "#define mbstate_t int" >>confdefs.h
9655
9656 fi
9657
9658
9659
9660
9661 GNULIB_ACOSF=0;
9662 GNULIB_ACOSL=0;
9663 GNULIB_ASINF=0;
9664 GNULIB_ASINL=0;
9665 GNULIB_ATANF=0;
9666 GNULIB_ATANL=0;
9667 GNULIB_ATAN2F=0;
9668 GNULIB_CBRT=0;
9669 GNULIB_CBRTF=0;
9670 GNULIB_CBRTL=0;
9671 GNULIB_CEIL=0;
9672 GNULIB_CEILF=0;
9673 GNULIB_CEILL=0;
9674 GNULIB_COPYSIGN=0;
9675 GNULIB_COPYSIGNF=0;
9676 GNULIB_COPYSIGNL=0;
9677 GNULIB_COSF=0;
9678 GNULIB_COSL=0;
9679 GNULIB_COSHF=0;
9680 GNULIB_EXPF=0;
9681 GNULIB_EXPL=0;
9682 GNULIB_EXP2=0;
9683 GNULIB_EXP2F=0;
9684 GNULIB_EXP2L=0;
9685 GNULIB_EXPM1=0;
9686 GNULIB_EXPM1F=0;
9687 GNULIB_EXPM1L=0;
9688 GNULIB_FABSF=0;
9689 GNULIB_FABSL=0;
9690 GNULIB_FLOOR=0;
9691 GNULIB_FLOORF=0;
9692 GNULIB_FLOORL=0;
9693 GNULIB_FMA=0;
9694 GNULIB_FMAF=0;
9695 GNULIB_FMAL=0;
9696 GNULIB_FMOD=0;
9697 GNULIB_FMODF=0;
9698 GNULIB_FMODL=0;
9699 GNULIB_FREXPF=0;
9700 GNULIB_FREXP=0;
9701 GNULIB_FREXPL=0;
9702 GNULIB_HYPOT=0;
9703 GNULIB_HYPOTF=0;
9704 GNULIB_HYPOTL=0;
9705 GNULIB_ILOGB=0;
9706 GNULIB_ILOGBF=0;
9707 GNULIB_ILOGBL=0;
9708 GNULIB_ISFINITE=0;
9709 GNULIB_ISINF=0;
9710 GNULIB_ISNAN=0;
9711 GNULIB_ISNANF=0;
9712 GNULIB_ISNAND=0;
9713 GNULIB_ISNANL=0;
9714 GNULIB_LDEXPF=0;
9715 GNULIB_LDEXPL=0;
9716 GNULIB_LOG=0;
9717 GNULIB_LOGF=0;
9718 GNULIB_LOGL=0;
9719 GNULIB_LOG10=0;
9720 GNULIB_LOG10F=0;
9721 GNULIB_LOG10L=0;
9722 GNULIB_LOG1P=0;
9723 GNULIB_LOG1PF=0;
9724 GNULIB_LOG1PL=0;
9725 GNULIB_LOG2=0;
9726 GNULIB_LOG2F=0;
9727 GNULIB_LOG2L=0;
9728 GNULIB_LOGB=0;
9729 GNULIB_LOGBF=0;
9730 GNULIB_LOGBL=0;
9731 GNULIB_MODF=0;
9732 GNULIB_MODFF=0;
9733 GNULIB_MODFL=0;
9734 GNULIB_POWF=0;
9735 GNULIB_REMAINDER=0;
9736 GNULIB_REMAINDERF=0;
9737 GNULIB_REMAINDERL=0;
9738 GNULIB_RINT=0;
9739 GNULIB_RINTF=0;
9740 GNULIB_RINTL=0;
9741 GNULIB_ROUND=0;
9742 GNULIB_ROUNDF=0;
9743 GNULIB_ROUNDL=0;
9744 GNULIB_SIGNBIT=0;
9745 GNULIB_SINF=0;
9746 GNULIB_SINL=0;
9747 GNULIB_SINHF=0;
9748 GNULIB_SQRTF=0;
9749 GNULIB_SQRTL=0;
9750 GNULIB_TANF=0;
9751 GNULIB_TANL=0;
9752 GNULIB_TANHF=0;
9753 GNULIB_TRUNC=0;
9754 GNULIB_TRUNCF=0;
9755 GNULIB_TRUNCL=0;
9756 GNULIB_MDA_J0=1;
9757 GNULIB_MDA_J1=1;
9758 GNULIB_MDA_JN=1;
9759 GNULIB_MDA_Y0=1;
9760 GNULIB_MDA_Y1=1;
9761 GNULIB_MDA_YN=1;
9762 HAVE_ACOSF=1;
9763 HAVE_ACOSL=1;
9764 HAVE_ASINF=1;
9765 HAVE_ASINL=1;
9766 HAVE_ATANF=1;
9767 HAVE_ATANL=1;
9768 HAVE_ATAN2F=1;
9769 HAVE_CBRT=1;
9770 HAVE_CBRTF=1;
9771 HAVE_CBRTL=1;
9772 HAVE_COPYSIGN=1;
9773 HAVE_COPYSIGNL=1;
9774 HAVE_COSF=1;
9775 HAVE_COSL=1;
9776 HAVE_COSHF=1;
9777 HAVE_EXPF=1;
9778 HAVE_EXPL=1;
9779 HAVE_EXPM1=1;
9780 HAVE_EXPM1F=1;
9781 HAVE_FABSF=1;
9782 HAVE_FABSL=1;
9783 HAVE_FMA=1;
9784 HAVE_FMAF=1;
9785 HAVE_FMAL=1;
9786 HAVE_FMODF=1;
9787 HAVE_FMODL=1;
9788 HAVE_FREXPF=1;
9789 HAVE_HYPOTF=1;
9790 HAVE_HYPOTL=1;
9791 HAVE_ILOGB=1;
9792 HAVE_ILOGBF=1;
9793 HAVE_ILOGBL=1;
9794 HAVE_ISNANF=1;
9795 HAVE_ISNAND=1;
9796 HAVE_ISNANL=1;
9797 HAVE_LDEXPF=1;
9798 HAVE_LOGF=1;
9799 HAVE_LOGL=1;
9800 HAVE_LOG10F=1;
9801 HAVE_LOG10L=1;
9802 HAVE_LOG1P=1;
9803 HAVE_LOG1PF=1;
9804 HAVE_LOG1PL=1;
9805 HAVE_LOGBF=1;
9806 HAVE_LOGBL=1;
9807 HAVE_MODFF=1;
9808 HAVE_MODFL=1;
9809 HAVE_POWF=1;
9810 HAVE_REMAINDER=1;
9811 HAVE_REMAINDERF=1;
9812 HAVE_RINT=1;
9813 HAVE_RINTL=1;
9814 HAVE_SINF=1;
9815 HAVE_SINL=1;
9816 HAVE_SINHF=1;
9817 HAVE_SQRTF=1;
9818 HAVE_SQRTL=1;
9819 HAVE_TANF=1;
9820 HAVE_TANL=1;
9821 HAVE_TANHF=1;
9822 HAVE_DECL_ACOSL=1;
9823 HAVE_DECL_ASINL=1;
9824 HAVE_DECL_ATANL=1;
9825 HAVE_DECL_CBRTF=1;
9826 HAVE_DECL_CBRTL=1;
9827 HAVE_DECL_CEILF=1;
9828 HAVE_DECL_CEILL=1;
9829 HAVE_DECL_COPYSIGNF=1;
9830 HAVE_DECL_COSL=1;
9831 HAVE_DECL_EXPL=1;
9832 HAVE_DECL_EXP2=1;
9833 HAVE_DECL_EXP2F=1;
9834 HAVE_DECL_EXP2L=1;
9835 HAVE_DECL_EXPM1L=1;
9836 HAVE_DECL_FLOORF=1;
9837 HAVE_DECL_FLOORL=1;
9838 HAVE_DECL_FREXPL=1;
9839 HAVE_DECL_LDEXPL=1;
9840 HAVE_DECL_LOGL=1;
9841 HAVE_DECL_LOG10L=1;
9842 HAVE_DECL_LOG2=1;
9843 HAVE_DECL_LOG2F=1;
9844 HAVE_DECL_LOG2L=1;
9845 HAVE_DECL_LOGB=1;
9846 HAVE_DECL_REMAINDER=1;
9847 HAVE_DECL_REMAINDERL=1;
9848 HAVE_DECL_RINTF=1;
9849 HAVE_DECL_ROUND=1;
9850 HAVE_DECL_ROUNDF=1;
9851 HAVE_DECL_ROUNDL=1;
9852 HAVE_DECL_SINL=1;
9853 HAVE_DECL_SQRTL=1;
9854 HAVE_DECL_TANL=1;
9855 HAVE_DECL_TRUNC=1;
9856 HAVE_DECL_TRUNCF=1;
9857 HAVE_DECL_TRUNCL=1;
9858 REPLACE_ACOSF=0;
9859 REPLACE_ASINF=0;
9860 REPLACE_ATANF=0;
9861 REPLACE_ATAN2F=0;
9862 REPLACE_CBRTF=0;
9863 REPLACE_CBRTL=0;
9864 REPLACE_CEIL=0;
9865 REPLACE_CEILF=0;
9866 REPLACE_CEILL=0;
9867 REPLACE_COSF=0;
9868 REPLACE_COSHF=0;
9869 REPLACE_EXPF=0;
9870 REPLACE_EXPL=0;
9871 REPLACE_EXPM1=0;
9872 REPLACE_EXPM1F=0;
9873 REPLACE_EXPM1L=0;
9874 REPLACE_EXP2=0;
9875 REPLACE_EXP2L=0;
9876 REPLACE_FABSL=0;
9877 REPLACE_FLOOR=0;
9878 REPLACE_FLOORF=0;
9879 REPLACE_FLOORL=0;
9880 REPLACE_FMA=0;
9881 REPLACE_FMAF=0;
9882 REPLACE_FMAL=0;
9883 REPLACE_FMOD=0;
9884 REPLACE_FMODF=0;
9885 REPLACE_FMODL=0;
9886 REPLACE_FREXPF=0;
9887 REPLACE_FREXP=0;
9888 REPLACE_FREXPL=0;
9889 REPLACE_HUGE_VAL=0;
9890 REPLACE_HYPOT=0;
9891 REPLACE_HYPOTF=0;
9892 REPLACE_HYPOTL=0;
9893 REPLACE_ILOGB=0;
9894 REPLACE_ILOGBF=0;
9895 REPLACE_ILOGBL=0;
9896 REPLACE_ISFINITE=0;
9897 REPLACE_ISINF=0;
9898 REPLACE_ISNAN=0;
9899 REPLACE_LDEXPL=0;
9900 REPLACE_LOG=0;
9901 REPLACE_LOGF=0;
9902 REPLACE_LOGL=0;
9903 REPLACE_LOG10=0;
9904 REPLACE_LOG10F=0;
9905 REPLACE_LOG10L=0;
9906 REPLACE_LOG1P=0;
9907 REPLACE_LOG1PF=0;
9908 REPLACE_LOG1PL=0;
9909 REPLACE_LOG2=0;
9910 REPLACE_LOG2F=0;
9911 REPLACE_LOG2L=0;
9912 REPLACE_LOGB=0;
9913 REPLACE_LOGBF=0;
9914 REPLACE_LOGBL=0;
9915 REPLACE_MODF=0;
9916 REPLACE_MODFF=0;
9917 REPLACE_MODFL=0;
9918 REPLACE_NAN=0;
9919 REPLACE_REMAINDER=0;
9920 REPLACE_REMAINDERF=0;
9921 REPLACE_REMAINDERL=0;
9922 REPLACE_RINTL=0;
9923 REPLACE_ROUND=0;
9924 REPLACE_ROUNDF=0;
9925 REPLACE_ROUNDL=0;
9926 REPLACE_SIGNBIT=0;
9927 REPLACE_SIGNBIT_USING_BUILTINS=0;
9928 REPLACE_SINF=0;
9929 REPLACE_SINHF=0;
9930 REPLACE_SQRTF=0;
9931 REPLACE_SQRTL=0;
9932 REPLACE_TANF=0;
9933 REPLACE_TANHF=0;
9934 REPLACE_TRUNC=0;
9935 REPLACE_TRUNCF=0;
9936 REPLACE_TRUNCL=0;
9937
9938
9939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5
9940 $as_echo_n "checking whether frexp() can be used without linking with libm... " >&6; }
9941 if ${gl_cv_func_frexp_no_libm+:} false; then :
9942 $as_echo_n "(cached) " >&6
9943 else
9944
9945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9946 /* end confdefs.h. */
9947 #include <math.h>
9948 double x;
9949 int
9950 main ()
9951 {
9952 int e; return frexp (x, &e) > 0;
9953 ;
9954 return 0;
9955 }
9956 _ACEOF
9957 if ac_fn_c_try_link "$LINENO"; then :
9958 gl_cv_func_frexp_no_libm=yes
9959 else
9960 gl_cv_func_frexp_no_libm=no
9961 fi
9962 rm -f core conftest.err conftest.$ac_objext \
9963 conftest$ac_exeext conftest.$ac_ext
9964
9965 fi
9966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
9967 $as_echo "$gl_cv_func_frexp_no_libm" >&6; }
9968
9969 ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
9970 if test "x$ac_cv_have_decl_alarm" = xyes; then :
9971 ac_have_decl=1
9972 else
9973 ac_have_decl=0
9974 fi
9975
9976 cat >>confdefs.h <<_ACEOF
9977 #define HAVE_DECL_ALARM $ac_have_decl
9978 _ACEOF
9979
9980
9981
9982
9983 FREXP_LIBM=
9984 if test $gl_cv_func_frexp_no_libm = no; then
9985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used with libm" >&5
9986 $as_echo_n "checking whether frexp() can be used with libm... " >&6; }
9987 if ${gl_cv_func_frexp_in_libm+:} false; then :
9988 $as_echo_n "(cached) " >&6
9989 else
9990
9991 save_LIBS="$LIBS"
9992 LIBS="$LIBS -lm"
9993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9994 /* end confdefs.h. */
9995 #include <math.h>
9996 double x;
9997 int
9998 main ()
9999 {
10000 int e; return frexp (x, &e) > 0;
10001 ;
10002 return 0;
10003 }
10004 _ACEOF
10005 if ac_fn_c_try_link "$LINENO"; then :
10006 gl_cv_func_frexp_in_libm=yes
10007 else
10008 gl_cv_func_frexp_in_libm=no
10009 fi
10010 rm -f core conftest.err conftest.$ac_objext \
10011 conftest$ac_exeext conftest.$ac_ext
10012 LIBS="$save_LIBS"
10013
10014 fi
10015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_in_libm" >&5
10016 $as_echo "$gl_cv_func_frexp_in_libm" >&6; }
10017 if test $gl_cv_func_frexp_in_libm = yes; then
10018 FREXP_LIBM=-lm
10019 fi
10020 fi
10021 if test $gl_cv_func_frexp_no_libm = yes \
10022 || test $gl_cv_func_frexp_in_libm = yes; then
10023 save_LIBS="$LIBS"
10024 LIBS="$LIBS $FREXP_LIBM"
10025
10026
10027
10028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
10029 $as_echo_n "checking whether frexp works... " >&6; }
10030 if ${gl_cv_func_frexp_works+:} false; then :
10031 $as_echo_n "(cached) " >&6
10032 else
10033
10034 if test "$cross_compiling" = yes; then :
10035 case "$host_os" in
10036 netbsd* | irix*) gl_cv_func_frexp_works="guessing no" ;;
10037 mingw*) # Guess yes with MSVC, no with mingw.
10038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10039 /* end confdefs.h. */
10040
10041 #ifdef _MSC_VER
10042 Good
10043 #endif
10044
10045 _ACEOF
10046 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10047 $EGREP "Good" >/dev/null 2>&1; then :
10048 gl_cv_func_frexp_works="guessing yes"
10049 else
10050 gl_cv_func_frexp_works="guessing no"
10051 fi
10052 rm -f conftest*
10053
10054 ;;
10055 *) gl_cv_func_frexp_works="guessing yes" ;;
10056 esac
10057
10058 else
10059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10060 /* end confdefs.h. */
10061
10062 #include <float.h>
10063 #include <math.h>
10064 #include <string.h>
10065 #if HAVE_DECL_ALARM
10066 # include <signal.h>
10067 # include <unistd.h>
10068 #endif
10069 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
10070 ICC 10.0 has a bug when optimizing the expression -zero.
10071 The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
10072 to PowerPC on Mac OS X 10.5. */
10073 #if defined __hpux || defined __sgi || defined __ICC
10074 static double
10075 compute_minus_zero (void)
10076 {
10077 return -DBL_MIN * DBL_MIN;
10078 }
10079 # define minus_zero compute_minus_zero ()
10080 #else
10081 double minus_zero = -0.0;
10082 #endif
10083 int main()
10084 {
10085 int result = 0;
10086 int i;
10087 volatile double x;
10088 double zero = 0.0;
10089 #if HAVE_DECL_ALARM
10090 /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
10091 number. Let the test fail in this case. */
10092 signal (SIGALRM, SIG_DFL);
10093 alarm (5);
10094 #endif
10095 /* Test on denormalized numbers. */
10096 for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
10097 ;
10098 if (x > 0.0)
10099 {
10100 int exp;
10101 double y = frexp (x, &exp);
10102 /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
10103 On NetBSD: y = 0.75. Correct: y = 0.5. */
10104 if (y != 0.5)
10105 result |= 1;
10106 }
10107 /* Test on infinite numbers. */
10108 x = 1.0 / zero;
10109 {
10110 int exp;
10111 double y = frexp (x, &exp);
10112 if (y != x)
10113 result |= 2;
10114 }
10115 /* Test on negative zero. */
10116 x = minus_zero;
10117 {
10118 int exp;
10119 double y = frexp (x, &exp);
10120 if (memcmp (&y, &x, sizeof x))
10121 result |= 4;
10122 }
10123 return result;
10124 }
10125 _ACEOF
10126 if ac_fn_c_try_run "$LINENO"; then :
10127 gl_cv_func_frexp_works=yes
10128 else
10129 gl_cv_func_frexp_works=no
10130 fi
10131 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10132 conftest.$ac_objext conftest.beam conftest.$ac_ext
10133 fi
10134
10135
10136 fi
10137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
10138 $as_echo "$gl_cv_func_frexp_works" >&6; }
10139
10140 LIBS="$save_LIBS"
10141 case "$gl_cv_func_frexp_works" in
10142 *yes) gl_func_frexp=yes ;;
10143 *) gl_func_frexp=no; REPLACE_FREXP=1; FREXP_LIBM= ;;
10144 esac
10145 else
10146 gl_func_frexp=no
10147 fi
10148 if test $gl_func_frexp = yes; then
10149
10150 $as_echo "#define HAVE_FREXP 1" >>confdefs.h
10151
10152 fi
10153
10154
10155
10156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5
10157 $as_echo_n "checking whether long double and double are the same... " >&6; }
10158 if ${gl_cv_long_double_equals_double+:} false; then :
10159 $as_echo_n "(cached) " >&6
10160 else
10161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10162 /* end confdefs.h. */
10163 #include <float.h>
10164 int
10165 main ()
10166 {
10167 typedef int check[sizeof (long double) == sizeof (double)
10168 && LDBL_MANT_DIG == DBL_MANT_DIG
10169 && LDBL_MAX_EXP == DBL_MAX_EXP
10170 && LDBL_MIN_EXP == DBL_MIN_EXP
10171 ? 1 : -1];
10172
10173 ;
10174 return 0;
10175 }
10176 _ACEOF
10177 if ac_fn_c_try_compile "$LINENO"; then :
10178 gl_cv_long_double_equals_double=yes
10179 else
10180 gl_cv_long_double_equals_double=no
10181 fi
10182 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10183
10184 fi
10185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_long_double_equals_double" >&5
10186 $as_echo "$gl_cv_long_double_equals_double" >&6; }
10187 if test $gl_cv_long_double_equals_double = yes; then
10188
10189 $as_echo "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h
10190
10191 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1
10192 else
10193 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0
10194 fi
10195
10196
10197
10198
10199
10200
10201
10202
10203 ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
10204 "
10205 if test "x$ac_cv_have_decl_frexpl" = xyes; then :
10206
10207 else
10208 HAVE_DECL_FREXPL=0
10209 fi
10210
10211
10212 FREXPL_LIBM=
10213 if test $HAVE_DECL_FREXPL = 1; then
10214
10215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
10216 $as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; }
10217 if ${gl_cv_func_frexpl_no_libm+:} false; then :
10218 $as_echo_n "(cached) " >&6
10219 else
10220
10221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10222 /* end confdefs.h. */
10223 #include <math.h>
10224 long double x;
10225 int
10226 main ()
10227 {
10228 int e; return frexpl (x, &e) > 0;
10229 ;
10230 return 0;
10231 }
10232 _ACEOF
10233 if ac_fn_c_try_link "$LINENO"; then :
10234 gl_cv_func_frexpl_no_libm=yes
10235 else
10236 gl_cv_func_frexpl_no_libm=no
10237 fi
10238 rm -f core conftest.err conftest.$ac_objext \
10239 conftest$ac_exeext conftest.$ac_ext
10240
10241 fi
10242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
10243 $as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
10244
10245 if test $gl_cv_func_frexpl_no_libm = no; then
10246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used with libm" >&5
10247 $as_echo_n "checking whether frexpl() can be used with libm... " >&6; }
10248 if ${gl_cv_func_frexpl_in_libm+:} false; then :
10249 $as_echo_n "(cached) " >&6
10250 else
10251
10252 save_LIBS="$LIBS"
10253 LIBS="$LIBS -lm"
10254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10255 /* end confdefs.h. */
10256 #include <math.h>
10257 long double x;
10258 int
10259 main ()
10260 {
10261 int e; return frexpl (x, &e) > 0;
10262 ;
10263 return 0;
10264 }
10265 _ACEOF
10266 if ac_fn_c_try_link "$LINENO"; then :
10267 gl_cv_func_frexpl_in_libm=yes
10268 else
10269 gl_cv_func_frexpl_in_libm=no
10270 fi
10271 rm -f core conftest.err conftest.$ac_objext \
10272 conftest$ac_exeext conftest.$ac_ext
10273 LIBS="$save_LIBS"
10274
10275 fi
10276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_in_libm" >&5
10277 $as_echo "$gl_cv_func_frexpl_in_libm" >&6; }
10278 if test $gl_cv_func_frexpl_in_libm = yes; then
10279 FREXPL_LIBM=-lm
10280 fi
10281 fi
10282 if test $gl_cv_func_frexpl_no_libm = yes \
10283 || test $gl_cv_func_frexpl_in_libm = yes; then
10284 save_LIBS="$LIBS"
10285 LIBS="$LIBS $FREXPL_LIBM"
10286
10287
10288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
10289 $as_echo_n "checking whether frexpl works... " >&6; }
10290 if ${gl_cv_func_frexpl_works+:} false; then :
10291 $as_echo_n "(cached) " >&6
10292 else
10293
10294 if test "$cross_compiling" = yes; then :
10295
10296 case "$host_os" in
10297 aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
10298 gl_cv_func_frexpl_works="guessing no";;
10299 *) gl_cv_func_frexpl_works="guessing yes";;
10300 esac
10301
10302 else
10303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10304 /* end confdefs.h. */
10305
10306 #include <float.h>
10307 #include <math.h>
10308 /* Override the values of <float.h>, like done in float.in.h. */
10309 #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
10310 # undef LDBL_MIN_EXP
10311 # define LDBL_MIN_EXP (-16381)
10312 #endif
10313 #if defined __i386__ && (defined __FreeBSD__ || defined __DragonFly__)
10314 # undef LDBL_MIN_EXP
10315 # define LDBL_MIN_EXP (-16381)
10316 #endif
10317 #if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
10318 # undef LDBL_MIN_EXP
10319 # define LDBL_MIN_EXP DBL_MIN_EXP
10320 #endif
10321 #if defined __sgi && (LDBL_MANT_DIG >= 106)
10322 # if defined __GNUC__
10323 # undef LDBL_MIN_EXP
10324 # define LDBL_MIN_EXP DBL_MIN_EXP
10325 # endif
10326 #endif
10327 extern
10328 #ifdef __cplusplus
10329 "C"
10330 #endif
10331 long double frexpl (long double, int *);
10332 long double zero = 0.0L;
10333 int main()
10334 {
10335 int result = 0;
10336 volatile long double x;
10337 /* Test on finite numbers that fails on AIX 5.1. */
10338 x = 16.0L;
10339 {
10340 int exp = -9999;
10341 frexpl (x, &exp);
10342 if (exp != 5)
10343 result |= 1;
10344 }
10345 /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
10346 function returns an invalid (incorrectly normalized) value: it returns
10347 y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
10348 but the correct result is
10349 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */
10350 x = 1.01L;
10351 {
10352 int exp = -9999;
10353 long double y = frexpl (x, &exp);
10354 if (!(exp == 1 && y == 0.505L))
10355 result |= 2;
10356 }
10357 /* Test on large finite numbers. This fails on BeOS at i = 16322, while
10358 LDBL_MAX_EXP = 16384.
10359 In the loop end test, we test x against Infinity, rather than comparing
10360 i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */
10361 {
10362 int i;
10363 for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
10364 {
10365 int exp = -9999;
10366 frexpl (x, &exp);
10367 if (exp != i)
10368 {
10369 result |= 4;
10370 break;
10371 }
10372 }
10373 }
10374 /* Test on denormalized numbers. */
10375 {
10376 int i;
10377 for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
10378 ;
10379 if (x > 0.0L)
10380 {
10381 int exp;
10382 long double y = frexpl (x, &exp);
10383 /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
10384 exp = -16382, y = 0.5. On Mac OS X 10.5: exp = -16384, y = 0.5. */
10385 if (exp != LDBL_MIN_EXP - 1)
10386 result |= 8;
10387 }
10388 }
10389 /* Test on infinite numbers. */
10390 /* The Microsoft MSVC 14 compiler chokes on the expression 1.0 / 0.0. */
10391 x = 1.0L / zero;
10392 {
10393 int exp;
10394 long double y = frexpl (x, &exp);
10395 if (y != x)
10396 result |= 16;
10397 }
10398 return result;
10399 }
10400 _ACEOF
10401 if ac_fn_c_try_run "$LINENO"; then :
10402 gl_cv_func_frexpl_works=yes
10403 else
10404 gl_cv_func_frexpl_works=no
10405 fi
10406 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10407 conftest.$ac_objext conftest.beam conftest.$ac_ext
10408 fi
10409
10410
10411 fi
10412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
10413 $as_echo "$gl_cv_func_frexpl_works" >&6; }
10414
10415 LIBS="$save_LIBS"
10416 case "$gl_cv_func_frexpl_works" in
10417 *yes) gl_func_frexpl=yes ;;
10418 *) gl_func_frexpl=no; REPLACE_FREXPL=1 ;;
10419 esac
10420 else
10421 gl_func_frexpl=no
10422 fi
10423 if test $gl_func_frexpl = yes; then
10424
10425 $as_echo "#define HAVE_FREXPL 1" >>confdefs.h
10426
10427 fi
10428 fi
10429 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
10430 if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then
10431
10432 FREXPL_LIBM="$FREXP_LIBM"
10433 else
10434 FREXPL_LIBM=
10435 fi
10436 fi
10437
10438
10439
10440 GNULIB_FCHMODAT=0;
10441 GNULIB_FSTAT=0;
10442 GNULIB_FSTATAT=0;
10443 GNULIB_FUTIMENS=0;
10444 GNULIB_GETUMASK=0;
10445 GNULIB_LCHMOD=0;
10446 GNULIB_LSTAT=0;
10447 GNULIB_MKDIR=0;
10448 GNULIB_MKDIRAT=0;
10449 GNULIB_MKFIFO=0;
10450 GNULIB_MKFIFOAT=0;
10451 GNULIB_MKNOD=0;
10452 GNULIB_MKNODAT=0;
10453 GNULIB_STAT=0;
10454 GNULIB_UTIMENSAT=0;
10455 GNULIB_OVERRIDES_STRUCT_STAT=0;
10456 GNULIB_MDA_CHMOD=1;
10457 GNULIB_MDA_MKDIR=1;
10458 GNULIB_MDA_UMASK=1;
10459 HAVE_FCHMODAT=1;
10460 HAVE_FSTATAT=1;
10461 HAVE_FUTIMENS=1;
10462 HAVE_GETUMASK=1;
10463 HAVE_LCHMOD=1;
10464 HAVE_LSTAT=1;
10465 HAVE_MKDIRAT=1;
10466 HAVE_MKFIFO=1;
10467 HAVE_MKFIFOAT=1;
10468 HAVE_MKNOD=1;
10469 HAVE_MKNODAT=1;
10470 HAVE_UTIMENSAT=1;
10471 REPLACE_FCHMODAT=0;
10472 REPLACE_FSTAT=0;
10473 REPLACE_FSTATAT=0;
10474 REPLACE_FUTIMENS=0;
10475 REPLACE_LSTAT=0;
10476 REPLACE_MKDIR=0;
10477 REPLACE_MKFIFO=0;
10478 REPLACE_MKFIFOAT=0;
10479 REPLACE_MKNOD=0;
10480 REPLACE_MKNODAT=0;
10481 REPLACE_STAT=0;
10482 REPLACE_UTIMENSAT=0;
10483
10484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
10485 $as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
10486 if ${ac_cv_header_stat_broken+:} false; then :
10487 $as_echo_n "(cached) " >&6
10488 else
10489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10490 /* end confdefs.h. */
10491 #include <sys/types.h>
10492 #include <sys/stat.h>
10493
10494 #if defined S_ISBLK && defined S_IFDIR
10495 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
10496 #endif
10497
10498 #if defined S_ISBLK && defined S_IFCHR
10499 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
10500 #endif
10501
10502 #if defined S_ISLNK && defined S_IFREG
10503 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
10504 #endif
10505
10506 #if defined S_ISSOCK && defined S_IFREG
10507 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
10508 #endif
10509
10510 _ACEOF
10511 if ac_fn_c_try_compile "$LINENO"; then :
10512 ac_cv_header_stat_broken=no
10513 else
10514 ac_cv_header_stat_broken=yes
10515 fi
10516 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10517 fi
10518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
10519 $as_echo "$ac_cv_header_stat_broken" >&6; }
10520 if test $ac_cv_header_stat_broken = yes; then
10521
10522 $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
10523
10524 fi
10525
10526
10527
10528
10529
10530 case "$host_os" in
10531 mingw*)
10532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
10533 $as_echo_n "checking for 64-bit off_t... " >&6; }
10534 if ${gl_cv_type_off_t_64+:} false; then :
10535 $as_echo_n "(cached) " >&6
10536 else
10537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10538 /* end confdefs.h. */
10539 #include <sys/types.h>
10540 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
10541
10542 int
10543 main ()
10544 {
10545
10546 ;
10547 return 0;
10548 }
10549 _ACEOF
10550 if ac_fn_c_try_compile "$LINENO"; then :
10551 gl_cv_type_off_t_64=yes
10552 else
10553 gl_cv_type_off_t_64=no
10554 fi
10555 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10556
10557 fi
10558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
10559 $as_echo "$gl_cv_type_off_t_64" >&6; }
10560 if test $gl_cv_type_off_t_64 = no; then
10561 WINDOWS_64_BIT_OFF_T=1
10562 else
10563 WINDOWS_64_BIT_OFF_T=0
10564 fi
10565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit st_size" >&5
10566 $as_echo_n "checking for 64-bit st_size... " >&6; }
10567 if ${gl_cv_member_st_size_64+:} false; then :
10568 $as_echo_n "(cached) " >&6
10569 else
10570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10571 /* end confdefs.h. */
10572 #include <sys/types.h>
10573 struct stat buf;
10574 int verify_st_size_size[sizeof (buf.st_size) >= 8 ? 1 : -1];
10575
10576 int
10577 main ()
10578 {
10579
10580 ;
10581 return 0;
10582 }
10583 _ACEOF
10584 if ac_fn_c_try_compile "$LINENO"; then :
10585 gl_cv_member_st_size_64=yes
10586 else
10587 gl_cv_member_st_size_64=no
10588 fi
10589 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10590
10591 fi
10592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_member_st_size_64" >&5
10593 $as_echo "$gl_cv_member_st_size_64" >&6; }
10594 if test $gl_cv_member_st_size_64 = no; then
10595 WINDOWS_64_BIT_ST_SIZE=1
10596 else
10597 WINDOWS_64_BIT_ST_SIZE=0
10598 fi
10599 ;;
10600 *)
10601 WINDOWS_64_BIT_OFF_T=0
10602 WINDOWS_64_BIT_ST_SIZE=0
10603 ;;
10604 esac
10605
10606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
10607 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
10608 if ${ac_cv_c_restrict+:} false; then :
10609 $as_echo_n "(cached) " >&6
10610 else
10611 ac_cv_c_restrict=no
10612 # Put '__restrict__' first, to avoid problems with glibc and non-GCC; see:
10613 # https://lists.gnu.org/archive/html/bug-autoconf/2016-02/msg00006.html
10614 # Put 'restrict' last, because C++ lacks it.
10615 for ac_kw in __restrict__ __restrict _Restrict restrict; do
10616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10617 /* end confdefs.h. */
10618 typedef int *int_ptr;
10619 int foo (int_ptr $ac_kw ip) { return ip[0]; }
10620 int bar (int [$ac_kw]); /* Catch GCC bug 14050. */
10621 int bar (int ip[$ac_kw]) { return ip[0]; }
10622
10623 int
10624 main ()
10625 {
10626 int s[1];
10627 int *$ac_kw t = s;
10628 t[0] = 0;
10629 return foo (t) + bar (t);
10630
10631 ;
10632 return 0;
10633 }
10634 _ACEOF
10635 if ac_fn_c_try_compile "$LINENO"; then :
10636 ac_cv_c_restrict=$ac_kw
10637 fi
10638 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10639 test "$ac_cv_c_restrict" != no && break
10640 done
10641
10642 fi
10643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
10644 $as_echo "$ac_cv_c_restrict" >&6; }
10645
10646 case $ac_cv_c_restrict in
10647 restrict) ;;
10648 no) $as_echo "#define restrict /**/" >>confdefs.h
10649 ;;
10650 *) cat >>confdefs.h <<_ACEOF
10651 #define restrict $ac_cv_c_restrict
10652 _ACEOF
10653 ;;
10654 esac
10655
10656
10657
10658
10659
10660
10661
10662
10663
10664
10665
10666
10667
10668
10669
10670 if test $gl_cv_have_include_next = yes; then
10671 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
10672 else
10673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
10674 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
10675 if ${gl_cv_next_sys_stat_h+:} false; then :
10676 $as_echo_n "(cached) " >&6
10677 else
10678
10679 if test $ac_cv_header_sys_stat_h = yes; then
10680
10681
10682
10683
10684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10685 /* end confdefs.h. */
10686 #include <sys/stat.h>
10687 _ACEOF
10688 case "$host_os" in
10689 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10690 *) gl_absname_cpp="$ac_cpp" ;;
10691 esac
10692
10693 case "$host_os" in
10694 mingw*)
10695 gl_dirsep_regex='[/\\]'
10696 ;;
10697 *)
10698 gl_dirsep_regex='\/'
10699 ;;
10700 esac
10701 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10702 gl_header_literal_regex=`echo 'sys/stat.h' \
10703 | sed -e "$gl_make_literal_regex_sed"`
10704 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10705 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10706 s|^/[^/]|//&|
10707 p
10708 q
10709 }'
10710
10711 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10712 sed -n "$gl_absolute_header_sed"`
10713
10714 gl_header=$gl_cv_absolute_sys_stat_h
10715 gl_cv_next_sys_stat_h='"'$gl_header'"'
10716 else
10717 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
10718 fi
10719
10720
10721 fi
10722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
10723 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
10724 fi
10725 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
10726
10727 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10728 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10729 gl_next_as_first_directive='<'sys/stat.h'>'
10730 else
10731 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10732 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
10733 fi
10734 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
10735
10736
10737
10738
10739
10740
10741
10742
10743 WINDOWS_STAT_TIMESPEC=0
10744
10745
10746
10747
10748
10749
10750
10751
10752 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
10753 #include <sys/stat.h>
10754 "
10755 if test "x$ac_cv_type_nlink_t" = xyes; then :
10756
10757 else
10758
10759 $as_echo "#define nlink_t int" >>confdefs.h
10760
10761 fi
10762
10763
10764
10765
10766
10767
10768
10769
10770
10771
10772 case "$host_os" in
10773 mingw*)
10774 for ac_header in sdkddkver.h
10775 do :
10776 ac_fn_c_check_header_mongrel "$LINENO" "sdkddkver.h" "ac_cv_header_sdkddkver_h" "$ac_includes_default"
10777 if test "x$ac_cv_header_sdkddkver_h" = xyes; then :
10778 cat >>confdefs.h <<_ACEOF
10779 #define HAVE_SDKDDKVER_H 1
10780 _ACEOF
10781
10782 fi
10783
10784 done
10785
10786 ;;
10787 esac
10788
10789
10790
10791
10792
10793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
10794 $as_echo_n "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
10795 if ${gl_cv_func_getcwd_null+:} false; then :
10796 $as_echo_n "(cached) " >&6
10797 else
10798 if test "$cross_compiling" = yes; then :
10799 case "$host_os" in
10800 # Guess yes on glibc systems.
10801 *-gnu* | gnu*) gl_cv_func_getcwd_null="guessing yes";;
10802 # Guess yes on musl systems.
10803 *-musl*) gl_cv_func_getcwd_null="guessing yes";;
10804 # Guess yes on Cygwin.
10805 cygwin*) gl_cv_func_getcwd_null="guessing yes";;
10806 # If we don't know, obey --enable-cross-guesses.
10807 *) gl_cv_func_getcwd_null="$gl_cross_guess_normal";;
10808 esac
10809
10810 else
10811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10812 /* end confdefs.h. */
10813
10814 # include <stdlib.h>
10815 # if HAVE_UNISTD_H
10816 # include <unistd.h>
10817 # else /* on Windows with MSVC */
10818 # include <direct.h>
10819 # endif
10820
10821
10822 $gl_mda_defines
10823
10824 # ifndef getcwd
10825 char *getcwd ();
10826 # endif
10827
10828 int
10829 main ()
10830 {
10831
10832 #if defined _WIN32 && ! defined __CYGWIN__
10833 /* mingw cwd does not start with '/', but _getcwd does allocate.
10834 However, mingw fails to honor non-zero size. */
10835 #else
10836 if (chdir ("/") != 0)
10837 return 1;
10838 else
10839 {
10840 char *f = getcwd (NULL, 0);
10841 if (! f)
10842 return 2;
10843 if (f[0] != '/')
10844 { free (f); return 3; }
10845 if (f[1] != '\0')
10846 { free (f); return 4; }
10847 free (f);
10848 return 0;
10849 }
10850 #endif
10851
10852 ;
10853 return 0;
10854 }
10855 _ACEOF
10856 if ac_fn_c_try_run "$LINENO"; then :
10857 gl_cv_func_getcwd_null=yes
10858 else
10859 gl_cv_func_getcwd_null=no
10860 fi
10861 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10862 conftest.$ac_objext conftest.beam conftest.$ac_ext
10863 fi
10864
10865 fi
10866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
10867 $as_echo "$gl_cv_func_getcwd_null" >&6; }
10868
10869
10870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
10871 $as_echo_n "checking for getcwd with POSIX signature... " >&6; }
10872 if ${gl_cv_func_getcwd_posix_signature+:} false; then :
10873 $as_echo_n "(cached) " >&6
10874 else
10875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10876 /* end confdefs.h. */
10877 #include <unistd.h>
10878
10879
10880 $gl_mda_defines
10881
10882 int
10883 main ()
10884 {
10885 extern
10886 #ifdef __cplusplus
10887 "C"
10888 #endif
10889 char *getcwd (char *, size_t);
10890
10891 ;
10892 return 0;
10893 }
10894
10895 _ACEOF
10896 if ac_fn_c_try_compile "$LINENO"; then :
10897 gl_cv_func_getcwd_posix_signature=yes
10898 else
10899 gl_cv_func_getcwd_posix_signature=no
10900 fi
10901 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10902
10903 fi
10904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
10905 $as_echo "$gl_cv_func_getcwd_posix_signature" >&6; }
10906
10907 ac_fn_c_check_decl "$LINENO" "getcwd" "ac_cv_have_decl_getcwd" "$ac_includes_default"
10908 if test "x$ac_cv_have_decl_getcwd" = xyes; then :
10909 ac_have_decl=1
10910 else
10911 ac_have_decl=0
10912 fi
10913
10914 cat >>confdefs.h <<_ACEOF
10915 #define HAVE_DECL_GETCWD $ac_have_decl
10916 _ACEOF
10917
10918
10919 GNULIB_DPRINTF=0;
10920 GNULIB_FCLOSE=0;
10921 GNULIB_FDOPEN=0;
10922 GNULIB_FFLUSH=0;
10923 GNULIB_FGETC=0;
10924 GNULIB_FGETS=0;
10925 GNULIB_FOPEN=0;
10926 GNULIB_FPRINTF=0;
10927 GNULIB_FPRINTF_POSIX=0;
10928 GNULIB_FPURGE=0;
10929 GNULIB_FPUTC=0;
10930 GNULIB_FPUTS=0;
10931 GNULIB_FREAD=0;
10932 GNULIB_FREOPEN=0;
10933 GNULIB_FSCANF=0;
10934 GNULIB_FSEEK=0;
10935 GNULIB_FSEEKO=0;
10936 GNULIB_FTELL=0;
10937 GNULIB_FTELLO=0;
10938 GNULIB_FWRITE=0;
10939 GNULIB_GETC=0;
10940 GNULIB_GETCHAR=0;
10941 GNULIB_GETDELIM=0;
10942 GNULIB_GETLINE=0;
10943 GNULIB_OBSTACK_PRINTF=0;
10944 GNULIB_OBSTACK_PRINTF_POSIX=0;
10945 GNULIB_PCLOSE=0;
10946 GNULIB_PERROR=0;
10947 GNULIB_POPEN=0;
10948 GNULIB_PRINTF=0;
10949 GNULIB_PRINTF_POSIX=0;
10950 GNULIB_PUTC=0;
10951 GNULIB_PUTCHAR=0;
10952 GNULIB_PUTS=0;
10953 GNULIB_REMOVE=0;
10954 GNULIB_RENAME=0;
10955 GNULIB_RENAMEAT=0;
10956 GNULIB_SCANF=0;
10957 GNULIB_SNPRINTF=0;
10958 GNULIB_SPRINTF_POSIX=0;
10959 GNULIB_STDIO_H_NONBLOCKING=0;
10960 GNULIB_STDIO_H_SIGPIPE=0;
10961 GNULIB_TMPFILE=0;
10962 GNULIB_VASPRINTF=0;
10963 GNULIB_VFSCANF=0;
10964 GNULIB_VSCANF=0;
10965 GNULIB_VDPRINTF=0;
10966 GNULIB_VFPRINTF=0;
10967 GNULIB_VFPRINTF_POSIX=0;
10968 GNULIB_VPRINTF=0;
10969 GNULIB_VPRINTF_POSIX=0;
10970 GNULIB_VSNPRINTF=0;
10971 GNULIB_VSPRINTF_POSIX=0;
10972 GNULIB_MDA_FCLOSEALL=1;
10973 GNULIB_MDA_FDOPEN=1;
10974 GNULIB_MDA_FILENO=1;
10975 GNULIB_MDA_GETW=1;
10976 GNULIB_MDA_PUTW=1;
10977 GNULIB_MDA_TEMPNAM=1;
10978 HAVE_DECL_FCLOSEALL=1;
10979 HAVE_DECL_FPURGE=1;
10980 HAVE_DECL_FSEEKO=1;
10981 HAVE_DECL_FTELLO=1;
10982 HAVE_DECL_GETDELIM=1;
10983 HAVE_DECL_GETLINE=1;
10984 HAVE_DECL_OBSTACK_PRINTF=1;
10985 HAVE_DECL_SNPRINTF=1;
10986 HAVE_DECL_VSNPRINTF=1;
10987 HAVE_DPRINTF=1;
10988 HAVE_FSEEKO=1;
10989 HAVE_FTELLO=1;
10990 HAVE_PCLOSE=1;
10991 HAVE_POPEN=1;
10992 HAVE_RENAMEAT=1;
10993 HAVE_VASPRINTF=1;
10994 HAVE_VDPRINTF=1;
10995 REPLACE_DPRINTF=0;
10996 REPLACE_FCLOSE=0;
10997 REPLACE_FDOPEN=0;
10998 REPLACE_FFLUSH=0;
10999 REPLACE_FOPEN=0;
11000 REPLACE_FPRINTF=0;
11001 REPLACE_FPURGE=0;
11002 REPLACE_FREOPEN=0;
11003 REPLACE_FSEEK=0;
11004 REPLACE_FSEEKO=0;
11005 REPLACE_FTELL=0;
11006 REPLACE_FTELLO=0;
11007 REPLACE_GETDELIM=0;
11008 REPLACE_GETLINE=0;
11009 REPLACE_OBSTACK_PRINTF=0;
11010 REPLACE_PERROR=0;
11011 REPLACE_POPEN=0;
11012 REPLACE_PRINTF=0;
11013 REPLACE_REMOVE=0;
11014 REPLACE_RENAME=0;
11015 REPLACE_RENAMEAT=0;
11016 REPLACE_SNPRINTF=0;
11017 REPLACE_SPRINTF=0;
11018 REPLACE_STDIO_READ_FUNCS=0;
11019 REPLACE_STDIO_WRITE_FUNCS=0;
11020 REPLACE_TMPFILE=0;
11021 REPLACE_VASPRINTF=0;
11022 REPLACE_VDPRINTF=0;
11023 REPLACE_VFPRINTF=0;
11024 REPLACE_VPRINTF=0;
11025 REPLACE_VSNPRINTF=0;
11026 REPLACE_VSPRINTF=0;
11027
11028 ac_fn_c_check_decl "$LINENO" "getdelim" "ac_cv_have_decl_getdelim" "$ac_includes_default"
11029 if test "x$ac_cv_have_decl_getdelim" = xyes; then :
11030 ac_have_decl=1
11031 else
11032 ac_have_decl=0
11033 fi
11034
11035 cat >>confdefs.h <<_ACEOF
11036 #define HAVE_DECL_GETDELIM $ac_have_decl
11037 _ACEOF
11038
11039
11040
11041
11042
11043 ac_fn_c_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default"
11044 if test "x$ac_cv_have_decl_getdtablesize" = xyes; then :
11045 ac_have_decl=1
11046 else
11047 ac_have_decl=0
11048 fi
11049
11050 cat >>confdefs.h <<_ACEOF
11051 #define HAVE_DECL_GETDTABLESIZE $ac_have_decl
11052 _ACEOF
11053
11054 ac_fn_c_check_decl "$LINENO" "getline" "ac_cv_have_decl_getline" "$ac_includes_default"
11055 if test "x$ac_cv_have_decl_getline" = xyes; then :
11056 ac_have_decl=1
11057 else
11058 ac_have_decl=0
11059 fi
11060
11061 cat >>confdefs.h <<_ACEOF
11062 #define HAVE_DECL_GETLINE $ac_have_decl
11063 _ACEOF
11064
11065 ac_fn_c_check_decl "$LINENO" "getlogin_r" "ac_cv_have_decl_getlogin_r" "$ac_includes_default"
11066 if test "x$ac_cv_have_decl_getlogin_r" = xyes; then :
11067 ac_have_decl=1
11068 else
11069 ac_have_decl=0
11070 fi
11071
11072 cat >>confdefs.h <<_ACEOF
11073 #define HAVE_DECL_GETLOGIN_R $ac_have_decl
11074 _ACEOF
11075
11076
11077
11078 ac_fn_c_check_decl "$LINENO" "getlogin" "ac_cv_have_decl_getlogin" "$ac_includes_default"
11079 if test "x$ac_cv_have_decl_getlogin" = xyes; then :
11080 ac_have_decl=1
11081 else
11082 ac_have_decl=0
11083 fi
11084
11085 cat >>confdefs.h <<_ACEOF
11086 #define HAVE_DECL_GETLOGIN $ac_have_decl
11087 _ACEOF
11088
11089
11090
11091 case $host_os in
11092 mingw*)
11093 LIB_GETLOGIN='-ladvapi32' ;;
11094 *)
11095 LIB_GETLOGIN= ;;
11096 esac
11097
11098
11099
11100
11101
11102
11103
11104 GNULIB_GETRANDOM=0;
11105 HAVE_GETRANDOM=1;
11106 REPLACE_GETRANDOM=0;
11107
11108
11109
11110
11111 GNULIB_GETTIMEOFDAY=0;
11112 HAVE_GETTIMEOFDAY=1;
11113 HAVE_STRUCT_TIMEVAL=1;
11114 HAVE_SYS_TIME_H=1;
11115 REPLACE_GETTIMEOFDAY=0;
11116 REPLACE_STRUCT_TIMEVAL=0;
11117
11118
11119
11120
11121
11122
11123
11124
11125
11126
11127
11128
11129
11130
11131
11132
11133 if test $gl_cv_have_include_next = yes; then
11134 gl_cv_next_sys_time_h='<'sys/time.h'>'
11135 else
11136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
11137 $as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
11138 if ${gl_cv_next_sys_time_h+:} false; then :
11139 $as_echo_n "(cached) " >&6
11140 else
11141
11142 if test $ac_cv_header_sys_time_h = yes; then
11143
11144
11145
11146
11147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11148 /* end confdefs.h. */
11149 #include <sys/time.h>
11150 _ACEOF
11151 case "$host_os" in
11152 aix*) gl_absname_cpp="$ac_cpp -C" ;;
11153 *) gl_absname_cpp="$ac_cpp" ;;
11154 esac
11155
11156 case "$host_os" in
11157 mingw*)
11158 gl_dirsep_regex='[/\\]'
11159 ;;
11160 *)
11161 gl_dirsep_regex='\/'
11162 ;;
11163 esac
11164 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11165 gl_header_literal_regex=`echo 'sys/time.h' \
11166 | sed -e "$gl_make_literal_regex_sed"`
11167 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11168 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11169 s|^/[^/]|//&|
11170 p
11171 q
11172 }'
11173
11174 gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11175 sed -n "$gl_absolute_header_sed"`
11176
11177 gl_header=$gl_cv_absolute_sys_time_h
11178 gl_cv_next_sys_time_h='"'$gl_header'"'
11179 else
11180 gl_cv_next_sys_time_h='<'sys/time.h'>'
11181 fi
11182
11183
11184 fi
11185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
11186 $as_echo "$gl_cv_next_sys_time_h" >&6; }
11187 fi
11188 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
11189
11190 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11191 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11192 gl_next_as_first_directive='<'sys/time.h'>'
11193 else
11194 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11195 gl_next_as_first_directive=$gl_cv_next_sys_time_h
11196 fi
11197 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
11198
11199
11200
11201
11202
11203 if test $ac_cv_header_sys_time_h != yes; then
11204 HAVE_SYS_TIME_H=0
11205 fi
11206
11207
11208
11209
11210
11211 if test $ac_cv_header_sys_socket_h != yes; then
11212 for ac_header in winsock2.h
11213 do :
11214 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
11215 if test "x$ac_cv_header_winsock2_h" = xyes; then :
11216 cat >>confdefs.h <<_ACEOF
11217 #define HAVE_WINSOCK2_H 1
11218 _ACEOF
11219
11220 fi
11221
11222 done
11223
11224 fi
11225 if test "$ac_cv_header_winsock2_h" = yes; then
11226 HAVE_WINSOCK2_H=1
11227 UNISTD_H_HAVE_WINSOCK2_H=1
11228 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
11229 else
11230 HAVE_WINSOCK2_H=0
11231 fi
11232
11233
11234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
11235 $as_echo_n "checking for struct timeval... " >&6; }
11236 if ${gl_cv_sys_struct_timeval+:} false; then :
11237 $as_echo_n "(cached) " >&6
11238 else
11239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11240 /* end confdefs.h. */
11241 #if HAVE_SYS_TIME_H
11242 #include <sys/time.h>
11243 #endif
11244 #include <time.h>
11245 #if HAVE_WINSOCK2_H
11246 # include <winsock2.h>
11247 #endif
11248
11249 int
11250 main ()
11251 {
11252 static struct timeval x; x.tv_sec = x.tv_usec;
11253 ;
11254 return 0;
11255 }
11256 _ACEOF
11257 if ac_fn_c_try_compile "$LINENO"; then :
11258 gl_cv_sys_struct_timeval=yes
11259 else
11260 gl_cv_sys_struct_timeval=no
11261 fi
11262 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11263
11264 fi
11265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
11266 $as_echo "$gl_cv_sys_struct_timeval" >&6; }
11267 if test $gl_cv_sys_struct_timeval != yes; then
11268 HAVE_STRUCT_TIMEVAL=0
11269 else
11270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
11271 $as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
11272 if ${gl_cv_sys_struct_timeval_tv_sec+:} false; then :
11273 $as_echo_n "(cached) " >&6
11274 else
11275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11276 /* end confdefs.h. */
11277 #if HAVE_SYS_TIME_H
11278 #include <sys/time.h>
11279 #endif
11280 #include <time.h>
11281 #if HAVE_WINSOCK2_H
11282 # include <winsock2.h>
11283 #endif
11284
11285 int
11286 main ()
11287 {
11288 static struct timeval x;
11289 typedef int verify_tv_sec_type[
11290 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
11291 ];
11292
11293 ;
11294 return 0;
11295 }
11296 _ACEOF
11297 if ac_fn_c_try_compile "$LINENO"; then :
11298 gl_cv_sys_struct_timeval_tv_sec=yes
11299 else
11300 gl_cv_sys_struct_timeval_tv_sec=no
11301 fi
11302 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11303
11304 fi
11305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
11306 $as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
11307 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
11308 REPLACE_STRUCT_TIMEVAL=1
11309 fi
11310 fi
11311
11312
11313
11314
11315
11316
11317
11318
11319
11320
11321
11322 GNULIB_GLOB=0;
11323 HAVE_GLOB=1;
11324 HAVE_GLOB_PATTERN_P=1;
11325 REPLACE_GLOB=0;
11326 REPLACE_GLOB_PATTERN_P=0;
11327
11328
11329
11330
11331
11332
11333
11334
11335
11336
11337
11338
11339
11340
11341
11342
11343
11344 if test $gl_cv_have_include_next = yes; then
11345 gl_cv_next_glob_h='<'glob.h'>'
11346 else
11347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <glob.h>" >&5
11348 $as_echo_n "checking absolute name of <glob.h>... " >&6; }
11349 if ${gl_cv_next_glob_h+:} false; then :
11350 $as_echo_n "(cached) " >&6
11351 else
11352
11353 if test $ac_cv_header_glob_h = yes; then
11354
11355
11356
11357
11358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11359 /* end confdefs.h. */
11360 #include <glob.h>
11361 _ACEOF
11362 case "$host_os" in
11363 aix*) gl_absname_cpp="$ac_cpp -C" ;;
11364 *) gl_absname_cpp="$ac_cpp" ;;
11365 esac
11366
11367 case "$host_os" in
11368 mingw*)
11369 gl_dirsep_regex='[/\\]'
11370 ;;
11371 *)
11372 gl_dirsep_regex='\/'
11373 ;;
11374 esac
11375 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11376 gl_header_literal_regex=`echo 'glob.h' \
11377 | sed -e "$gl_make_literal_regex_sed"`
11378 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11379 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11380 s|^/[^/]|//&|
11381 p
11382 q
11383 }'
11384
11385 gl_cv_absolute_glob_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11386 sed -n "$gl_absolute_header_sed"`
11387
11388 gl_header=$gl_cv_absolute_glob_h
11389 gl_cv_next_glob_h='"'$gl_header'"'
11390 else
11391 gl_cv_next_glob_h='<'glob.h'>'
11392 fi
11393
11394
11395 fi
11396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_glob_h" >&5
11397 $as_echo "$gl_cv_next_glob_h" >&6; }
11398 fi
11399 NEXT_GLOB_H=$gl_cv_next_glob_h
11400
11401 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11402 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11403 gl_next_as_first_directive='<'glob.h'>'
11404 else
11405 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11406 gl_next_as_first_directive=$gl_cv_next_glob_h
11407 fi
11408 NEXT_AS_FIRST_DIRECTIVE_GLOB_H=$gl_next_as_first_directive
11409
11410
11411
11412
11413
11414 if test $ac_cv_header_glob_h = yes; then
11415 HAVE_GLOB_H=1
11416 else
11417 HAVE_GLOB_H=0
11418 fi
11419
11420
11421 GLOB_H=''
11422 if false; then
11423 GLOB_H=glob.h
11424 else
11425 if test $ac_cv_header_glob_h != yes; then
11426 GLOB_H=glob.h
11427 fi
11428 fi
11429
11430
11431 if test -n "$GLOB_H"; then
11432 GL_GENERATE_GLOB_H_TRUE=
11433 GL_GENERATE_GLOB_H_FALSE='#'
11434 else
11435 GL_GENERATE_GLOB_H_TRUE='#'
11436 GL_GENERATE_GLOB_H_FALSE=
11437 fi
11438
11439
11440
11441
11442
11443
11444
11445
11446
11447
11448
11449
11450
11451
11452
11453
11454 if test -z "$gl_pthreadlib_body_done"; then
11455 gl_pthread_api=no
11456 LIBPTHREAD=
11457 LIBPMULTITHREAD=
11458 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
11459 # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
11460 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
11461 if test "x$ac_cv_header_pthread_h" = xyes; then :
11462 gl_have_pthread_h=yes
11463 else
11464 gl_have_pthread_h=no
11465 fi
11466
11467
11468 if test "$gl_have_pthread_h" = yes; then
11469 # Other possible tests:
11470 # -lpthreads (FSU threads, PCthreads)
11471 # -lgthreads
11472 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
11473 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
11474 # the second one only in libpthread, and lock.c needs it.
11475 #
11476 # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
11477 # needs -pthread for some reason. See:
11478 # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
11479 save_LIBS=$LIBS
11480 for gl_pthread in '' '-pthread'; do
11481 LIBS="$LIBS $gl_pthread"
11482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11483 /* end confdefs.h. */
11484 #include <pthread.h>
11485 pthread_mutex_t m;
11486 pthread_mutexattr_t ma;
11487
11488 int
11489 main ()
11490 {
11491 pthread_mutex_lock (&m);
11492 pthread_mutexattr_init (&ma);
11493 ;
11494 return 0;
11495 }
11496 _ACEOF
11497 if ac_fn_c_try_link "$LINENO"; then :
11498 gl_pthread_api=yes
11499 LIBPTHREAD=$gl_pthread
11500 LIBPMULTITHREAD=$gl_pthread
11501 fi
11502 rm -f core conftest.err conftest.$ac_objext \
11503 conftest$ac_exeext conftest.$ac_ext
11504 LIBS=$save_LIBS
11505 test $gl_pthread_api = yes && break
11506 done
11507
11508 # Test for libpthread by looking for pthread_kill. (Not pthread_self,
11509 # since it is defined as a macro on OSF/1.)
11510 if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
11511 # The program links fine without libpthread. But it may actually
11512 # need to link with libpthread in order to create multiple threads.
11513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
11514 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
11515 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
11516 $as_echo_n "(cached) " >&6
11517 else
11518 ac_check_lib_save_LIBS=$LIBS
11519 LIBS="-lpthread $LIBS"
11520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11521 /* end confdefs.h. */
11522
11523 /* Override any GCC internal prototype to avoid an error.
11524 Use char because int might match the return type of a GCC
11525 builtin and then its argument prototype would still apply. */
11526 #ifdef __cplusplus
11527 extern "C"
11528 #endif
11529 char pthread_kill ();
11530 int
11531 main ()
11532 {
11533 return pthread_kill ();
11534 ;
11535 return 0;
11536 }
11537 _ACEOF
11538 if ac_fn_c_try_link "$LINENO"; then :
11539 ac_cv_lib_pthread_pthread_kill=yes
11540 else
11541 ac_cv_lib_pthread_pthread_kill=no
11542 fi
11543 rm -f core conftest.err conftest.$ac_objext \
11544 conftest$ac_exeext conftest.$ac_ext
11545 LIBS=$ac_check_lib_save_LIBS
11546 fi
11547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
11548 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
11549 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
11550 LIBPMULTITHREAD=-lpthread
11551 # On Solaris and HP-UX, most pthread functions exist also in libc.
11552 # Therefore pthread_in_use() needs to actually try to create a
11553 # thread: pthread_create from libc will fail, whereas
11554 # pthread_create will actually create a thread.
11555 # On Solaris 10 or newer, this test is no longer needed, because
11556 # libc contains the fully functional pthread functions.
11557 case "$host_os" in
11558 solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
11559
11560 $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
11561
11562 esac
11563
11564 fi
11565
11566 elif test $gl_pthread_api != yes; then
11567 # Some library is needed. Try libpthread and libc_r.
11568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
11569 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
11570 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
11571 $as_echo_n "(cached) " >&6
11572 else
11573 ac_check_lib_save_LIBS=$LIBS
11574 LIBS="-lpthread $LIBS"
11575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11576 /* end confdefs.h. */
11577
11578 /* Override any GCC internal prototype to avoid an error.
11579 Use char because int might match the return type of a GCC
11580 builtin and then its argument prototype would still apply. */
11581 #ifdef __cplusplus
11582 extern "C"
11583 #endif
11584 char pthread_kill ();
11585 int
11586 main ()
11587 {
11588 return pthread_kill ();
11589 ;
11590 return 0;
11591 }
11592 _ACEOF
11593 if ac_fn_c_try_link "$LINENO"; then :
11594 ac_cv_lib_pthread_pthread_kill=yes
11595 else
11596 ac_cv_lib_pthread_pthread_kill=no
11597 fi
11598 rm -f core conftest.err conftest.$ac_objext \
11599 conftest$ac_exeext conftest.$ac_ext
11600 LIBS=$ac_check_lib_save_LIBS
11601 fi
11602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
11603 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
11604 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
11605 gl_pthread_api=yes
11606 LIBPTHREAD=-lpthread
11607 LIBPMULTITHREAD=-lpthread
11608 fi
11609
11610 if test $gl_pthread_api != yes; then
11611 # For FreeBSD 4.
11612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
11613 $as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
11614 if ${ac_cv_lib_c_r_pthread_kill+:} false; then :
11615 $as_echo_n "(cached) " >&6
11616 else
11617 ac_check_lib_save_LIBS=$LIBS
11618 LIBS="-lc_r $LIBS"
11619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11620 /* end confdefs.h. */
11621
11622 /* Override any GCC internal prototype to avoid an error.
11623 Use char because int might match the return type of a GCC
11624 builtin and then its argument prototype would still apply. */
11625 #ifdef __cplusplus
11626 extern "C"
11627 #endif
11628 char pthread_kill ();
11629 int
11630 main ()
11631 {
11632 return pthread_kill ();
11633 ;
11634 return 0;
11635 }
11636 _ACEOF
11637 if ac_fn_c_try_link "$LINENO"; then :
11638 ac_cv_lib_c_r_pthread_kill=yes
11639 else
11640 ac_cv_lib_c_r_pthread_kill=no
11641 fi
11642 rm -f core conftest.err conftest.$ac_objext \
11643 conftest$ac_exeext conftest.$ac_ext
11644 LIBS=$ac_check_lib_save_LIBS
11645 fi
11646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
11647 $as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
11648 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then :
11649 gl_pthread_api=yes
11650 LIBPTHREAD=-lc_r
11651 LIBPMULTITHREAD=-lc_r
11652 fi
11653
11654 fi
11655 fi
11656 fi
11657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
11658 $as_echo_n "checking whether POSIX threads API is available... " >&6; }
11659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
11660 $as_echo "$gl_pthread_api" >&6; }
11661
11662
11663 if test $gl_pthread_api = yes; then
11664
11665 $as_echo "#define HAVE_PTHREAD_API 1" >>confdefs.h
11666
11667 fi
11668
11669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11670 /* end confdefs.h. */
11671 #include <sched.h>
11672 int
11673 main ()
11674 {
11675 sched_yield ();
11676 ;
11677 return 0;
11678 }
11679 _ACEOF
11680 if ac_fn_c_try_link "$LINENO"; then :
11681 LIB_SCHED_YIELD=
11682
11683 else
11684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
11685 $as_echo_n "checking for sched_yield in -lrt... " >&6; }
11686 if ${ac_cv_lib_rt_sched_yield+:} false; then :
11687 $as_echo_n "(cached) " >&6
11688 else
11689 ac_check_lib_save_LIBS=$LIBS
11690 LIBS="-lrt $LIBS"
11691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11692 /* end confdefs.h. */
11693
11694 /* Override any GCC internal prototype to avoid an error.
11695 Use char because int might match the return type of a GCC
11696 builtin and then its argument prototype would still apply. */
11697 #ifdef __cplusplus
11698 extern "C"
11699 #endif
11700 char sched_yield ();
11701 int
11702 main ()
11703 {
11704 return sched_yield ();
11705 ;
11706 return 0;
11707 }
11708 _ACEOF
11709 if ac_fn_c_try_link "$LINENO"; then :
11710 ac_cv_lib_rt_sched_yield=yes
11711 else
11712 ac_cv_lib_rt_sched_yield=no
11713 fi
11714 rm -f core conftest.err conftest.$ac_objext \
11715 conftest$ac_exeext conftest.$ac_ext
11716 LIBS=$ac_check_lib_save_LIBS
11717 fi
11718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
11719 $as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
11720 if test "x$ac_cv_lib_rt_sched_yield" = xyes; then :
11721 LIB_SCHED_YIELD=-lrt
11722 else
11723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
11724 $as_echo_n "checking for sched_yield in -lposix4... " >&6; }
11725 if ${ac_cv_lib_posix4_sched_yield+:} false; then :
11726 $as_echo_n "(cached) " >&6
11727 else
11728 ac_check_lib_save_LIBS=$LIBS
11729 LIBS="-lposix4 $LIBS"
11730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11731 /* end confdefs.h. */
11732
11733 /* Override any GCC internal prototype to avoid an error.
11734 Use char because int might match the return type of a GCC
11735 builtin and then its argument prototype would still apply. */
11736 #ifdef __cplusplus
11737 extern "C"
11738 #endif
11739 char sched_yield ();
11740 int
11741 main ()
11742 {
11743 return sched_yield ();
11744 ;
11745 return 0;
11746 }
11747 _ACEOF
11748 if ac_fn_c_try_link "$LINENO"; then :
11749 ac_cv_lib_posix4_sched_yield=yes
11750 else
11751 ac_cv_lib_posix4_sched_yield=no
11752 fi
11753 rm -f core conftest.err conftest.$ac_objext \
11754 conftest$ac_exeext conftest.$ac_ext
11755 LIBS=$ac_check_lib_save_LIBS
11756 fi
11757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
11758 $as_echo "$ac_cv_lib_posix4_sched_yield" >&6; }
11759 if test "x$ac_cv_lib_posix4_sched_yield" = xyes; then :
11760 LIB_SCHED_YIELD=-lposix4
11761 fi
11762
11763 fi
11764
11765
11766 fi
11767 rm -f core conftest.err conftest.$ac_objext \
11768 conftest$ac_exeext conftest.$ac_ext
11769
11770
11771 gl_pthreadlib_body_done=done
11772 fi
11773
11774
11775
11776
11777
11778
11779
11780
11781
11782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (LC_ALL, NULL) is multithread-safe" >&5
11783 $as_echo_n "checking whether setlocale (LC_ALL, NULL) is multithread-safe... " >&6; }
11784 if ${gl_cv_func_setlocale_null_all_mtsafe+:} false; then :
11785 $as_echo_n "(cached) " >&6
11786 else
11787 case "$host_os" in
11788 # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin.
11789 *-musl* | darwin* | freebsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*)
11790 gl_cv_func_setlocale_null_all_mtsafe=no ;;
11791 # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows.
11792 *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*)
11793 gl_cv_func_setlocale_null_all_mtsafe=yes ;;
11794 # If we don't know, obey --enable-cross-guesses.
11795 *)
11796 gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;;
11797 esac
11798
11799 fi
11800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_all_mtsafe" >&5
11801 $as_echo "$gl_cv_func_setlocale_null_all_mtsafe" >&6; }
11802 case "$host_os" in
11803 mingw*) ;;
11804 *)
11805 if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
11806 gl_cv_func_setlocale_null_all_mtsafe="trivially yes"
11807 fi
11808 ;;
11809 esac
11810 case "$gl_cv_func_setlocale_null_all_mtsafe" in
11811 *yes) SETLOCALE_NULL_ALL_MTSAFE=1 ;;
11812 *) SETLOCALE_NULL_ALL_MTSAFE=0 ;;
11813 esac
11814
11815 cat >>confdefs.h <<_ACEOF
11816 #define SETLOCALE_NULL_ALL_MTSAFE $SETLOCALE_NULL_ALL_MTSAFE
11817 _ACEOF
11818
11819
11820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (category, NULL) is multithread-safe" >&5
11821 $as_echo_n "checking whether setlocale (category, NULL) is multithread-safe... " >&6; }
11822 if ${gl_cv_func_setlocale_null_one_mtsafe+:} false; then :
11823 $as_echo_n "(cached) " >&6
11824 else
11825 case "$host_os" in
11826 # Guess no on OpenBSD, AIX.
11827 openbsd* | aix*)
11828 gl_cv_func_setlocale_null_one_mtsafe=no ;;
11829 # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows.
11830 *-gnu* | gnu* | *-musl* | darwin* | freebsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
11831 gl_cv_func_setlocale_null_one_mtsafe=yes ;;
11832 # If we don't know, obey --enable-cross-guesses.
11833 *)
11834 gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;;
11835 esac
11836
11837 fi
11838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_one_mtsafe" >&5
11839 $as_echo "$gl_cv_func_setlocale_null_one_mtsafe" >&6; }
11840 case "$host_os" in
11841 mingw*) ;;
11842 *)
11843 if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
11844 gl_cv_func_setlocale_null_one_mtsafe="trivially yes"
11845 fi
11846 ;;
11847 esac
11848 case "$gl_cv_func_setlocale_null_one_mtsafe" in
11849 *yes) SETLOCALE_NULL_ONE_MTSAFE=1 ;;
11850 *) SETLOCALE_NULL_ONE_MTSAFE=0 ;;
11851 esac
11852
11853 cat >>confdefs.h <<_ACEOF
11854 #define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE
11855 _ACEOF
11856
11857
11858 if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
11859 case "$host_os" in
11860 mingw*) LIB_SETLOCALE_NULL= ;;
11861 *)
11862
11863
11864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
11865 $as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
11866 if ${gl_cv_have_weak+:} false; then :
11867 $as_echo_n "(cached) " >&6
11868 else
11869 gl_cv_have_weak=no
11870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11871 /* end confdefs.h. */
11872 extern void xyzzy ();
11873 #pragma weak xyzzy
11874 int
11875 main ()
11876 {
11877 xyzzy();
11878 ;
11879 return 0;
11880 }
11881 _ACEOF
11882 if ac_fn_c_try_link "$LINENO"; then :
11883 gl_cv_have_weak=maybe
11884 fi
11885 rm -f core conftest.err conftest.$ac_objext \
11886 conftest$ac_exeext conftest.$ac_ext
11887 if test $gl_cv_have_weak = maybe; then
11888 if test "$cross_compiling" = yes; then :
11889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11890 /* end confdefs.h. */
11891 #ifdef __ELF__
11892 Extensible Linking Format
11893 #endif
11894
11895 _ACEOF
11896 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11897 $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
11898 gl_cv_have_weak="guessing yes"
11899 else
11900 gl_cv_have_weak="guessing no"
11901 fi
11902 rm -f conftest*
11903
11904
11905 else
11906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11907 /* end confdefs.h. */
11908
11909 #include <stdio.h>
11910 #pragma weak fputs
11911 int main ()
11912 {
11913 return (fputs == NULL);
11914 }
11915 _ACEOF
11916 if ac_fn_c_try_run "$LINENO"; then :
11917 gl_cv_have_weak=yes
11918 else
11919 gl_cv_have_weak=no
11920 fi
11921 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11922 conftest.$ac_objext conftest.beam conftest.$ac_ext
11923 fi
11924
11925 fi
11926 case " $LDFLAGS " in
11927 *" -static "*) gl_cv_have_weak=no ;;
11928 esac
11929 case "$gl_cv_have_weak" in
11930 *yes)
11931 case "$host_os" in
11932 freebsd* | dragonfly*)
11933 : > conftest1.c
11934 $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
11935 cat <<EOF > conftest2.c
11936 #include <pthread.h>
11937 #pragma weak pthread_mutexattr_gettype
11938 int main ()
11939 {
11940 return (pthread_mutexattr_gettype != NULL);
11941 }
11942 EOF
11943 $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
11944 || gl_cv_have_weak=no
11945 rm -f conftest1.c libempty.so conftest2.c conftest
11946 ;;
11947 esac
11948 ;;
11949 esac
11950
11951 fi
11952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
11953 $as_echo "$gl_cv_have_weak" >&6; }
11954 case "$gl_cv_have_weak" in
11955 *yes)
11956
11957 $as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
11958
11959 ;;
11960 esac
11961
11962 case "$gl_cv_have_weak" in
11963 *yes) LIB_SETLOCALE_NULL= ;;
11964 *) LIB_SETLOCALE_NULL="$LIBPTHREAD" ;;
11965 esac
11966 ;;
11967 esac
11968 else
11969 LIB_SETLOCALE_NULL=
11970 fi
11971
11972
11973
11974
11975
11976 GNULIB_SOCKET=0;
11977 GNULIB_CONNECT=0;
11978 GNULIB_ACCEPT=0;
11979 GNULIB_BIND=0;
11980 GNULIB_GETPEERNAME=0;
11981 GNULIB_GETSOCKNAME=0;
11982 GNULIB_GETSOCKOPT=0;
11983 GNULIB_LISTEN=0;
11984 GNULIB_RECV=0;
11985 GNULIB_SEND=0;
11986 GNULIB_RECVFROM=0;
11987 GNULIB_SENDTO=0;
11988 GNULIB_SETSOCKOPT=0;
11989 GNULIB_SHUTDOWN=0;
11990 GNULIB_ACCEPT4=0;
11991 HAVE_STRUCT_SOCKADDR_STORAGE=1;
11992 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1;
11993
11994 HAVE_SA_FAMILY_T=1;
11995 HAVE_ACCEPT4=1;
11996
11997
11998
11999
12000
12001 case "$host_os" in
12002 osf*)
12003
12004 $as_echo "#define _POSIX_PII_SOCKET 1" >>confdefs.h
12005
12006 ;;
12007 esac
12008
12009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> is self-contained" >&5
12010 $as_echo_n "checking whether <sys/socket.h> is self-contained... " >&6; }
12011 if ${gl_cv_header_sys_socket_h_selfcontained+:} false; then :
12012 $as_echo_n "(cached) " >&6
12013 else
12014
12015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12016 /* end confdefs.h. */
12017 #include <sys/socket.h>
12018 int
12019 main ()
12020 {
12021
12022 ;
12023 return 0;
12024 }
12025 _ACEOF
12026 if ac_fn_c_try_compile "$LINENO"; then :
12027 gl_cv_header_sys_socket_h_selfcontained=yes
12028 else
12029 gl_cv_header_sys_socket_h_selfcontained=no
12030 fi
12031 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12032
12033 fi
12034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_selfcontained" >&5
12035 $as_echo "$gl_cv_header_sys_socket_h_selfcontained" >&6; }
12036 if test $gl_cv_header_sys_socket_h_selfcontained = yes; then
12037 for ac_func in shutdown
12038 do :
12039 ac_fn_c_check_func "$LINENO" "shutdown" "ac_cv_func_shutdown"
12040 if test "x$ac_cv_func_shutdown" = xyes; then :
12041 cat >>confdefs.h <<_ACEOF
12042 #define HAVE_SHUTDOWN 1
12043 _ACEOF
12044
12045 fi
12046 done
12047
12048 if test $ac_cv_func_shutdown = yes; then
12049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> defines the SHUT_* macros" >&5
12050 $as_echo_n "checking whether <sys/socket.h> defines the SHUT_* macros... " >&6; }
12051 if ${gl_cv_header_sys_socket_h_shut+:} false; then :
12052 $as_echo_n "(cached) " >&6
12053 else
12054
12055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12056 /* end confdefs.h. */
12057 #include <sys/socket.h>
12058 int
12059 main ()
12060 {
12061 int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };
12062 ;
12063 return 0;
12064 }
12065 _ACEOF
12066 if ac_fn_c_try_compile "$LINENO"; then :
12067 gl_cv_header_sys_socket_h_shut=yes
12068 else
12069 gl_cv_header_sys_socket_h_shut=no
12070 fi
12071 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12072
12073 fi
12074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_shut" >&5
12075 $as_echo "$gl_cv_header_sys_socket_h_shut" >&6; }
12076 if test $gl_cv_header_sys_socket_h_shut = no; then
12077 SYS_SOCKET_H='sys/socket.h'
12078 fi
12079 fi
12080 fi
12081 # We need to check for ws2tcpip.h now.
12082
12083
12084
12085
12086
12087
12088
12089
12090
12091
12092
12093 if test $gl_cv_have_include_next = yes; then
12094 gl_cv_next_sys_socket_h='<'sys/socket.h'>'
12095 else
12096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/socket.h>" >&5
12097 $as_echo_n "checking absolute name of <sys/socket.h>... " >&6; }
12098 if ${gl_cv_next_sys_socket_h+:} false; then :
12099 $as_echo_n "(cached) " >&6
12100 else
12101
12102 if test $ac_cv_header_sys_socket_h = yes; then
12103
12104
12105
12106
12107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12108 /* end confdefs.h. */
12109 #include <sys/socket.h>
12110 _ACEOF
12111 case "$host_os" in
12112 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12113 *) gl_absname_cpp="$ac_cpp" ;;
12114 esac
12115
12116 case "$host_os" in
12117 mingw*)
12118 gl_dirsep_regex='[/\\]'
12119 ;;
12120 *)
12121 gl_dirsep_regex='\/'
12122 ;;
12123 esac
12124 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12125 gl_header_literal_regex=`echo 'sys/socket.h' \
12126 | sed -e "$gl_make_literal_regex_sed"`
12127 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12128 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12129 s|^/[^/]|//&|
12130 p
12131 q
12132 }'
12133
12134 gl_cv_absolute_sys_socket_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12135 sed -n "$gl_absolute_header_sed"`
12136
12137 gl_header=$gl_cv_absolute_sys_socket_h
12138 gl_cv_next_sys_socket_h='"'$gl_header'"'
12139 else
12140 gl_cv_next_sys_socket_h='<'sys/socket.h'>'
12141 fi
12142
12143
12144 fi
12145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_socket_h" >&5
12146 $as_echo "$gl_cv_next_sys_socket_h" >&6; }
12147 fi
12148 NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_h
12149
12150 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12151 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12152 gl_next_as_first_directive='<'sys/socket.h'>'
12153 else
12154 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12155 gl_next_as_first_directive=$gl_cv_next_sys_socket_h
12156 fi
12157 NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H=$gl_next_as_first_directive
12158
12159
12160
12161
12162 if test $ac_cv_header_sys_socket_h = yes; then
12163 HAVE_SYS_SOCKET_H=1
12164 else
12165 HAVE_SYS_SOCKET_H=0
12166 fi
12167
12168
12169
12170 if test $ac_cv_header_sys_socket_h = yes; then
12171 HAVE_WS2TCPIP_H=0
12172 else
12173 if test $ac_cv_header_ws2tcpip_h = yes; then
12174 HAVE_WS2TCPIP_H=1
12175 else
12176 HAVE_WS2TCPIP_H=0
12177 fi
12178 fi
12179
12180
12181
12182 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "
12183 /* sys/types.h is not needed according to POSIX, but the
12184 sys/socket.h in i386-unknown-freebsd4.10 and
12185 powerpc-apple-darwin5.5 required it. */
12186 #include <sys/types.h>
12187 #ifdef HAVE_SYS_SOCKET_H
12188 #include <sys/socket.h>
12189 #endif
12190 #ifdef HAVE_WS2TCPIP_H
12191 #include <ws2tcpip.h>
12192 #endif
12193
12194 "
12195 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
12196
12197 cat >>confdefs.h <<_ACEOF
12198 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
12199 _ACEOF
12200
12201
12202 fi
12203 ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" "
12204 /* sys/types.h is not needed according to POSIX, but the
12205 sys/socket.h in i386-unknown-freebsd4.10 and
12206 powerpc-apple-darwin5.5 required it. */
12207 #include <sys/types.h>
12208 #ifdef HAVE_SYS_SOCKET_H
12209 #include <sys/socket.h>
12210 #endif
12211 #ifdef HAVE_WS2TCPIP_H
12212 #include <ws2tcpip.h>
12213 #endif
12214
12215 "
12216 if test "x$ac_cv_type_sa_family_t" = xyes; then :
12217
12218 cat >>confdefs.h <<_ACEOF
12219 #define HAVE_SA_FAMILY_T 1
12220 _ACEOF
12221
12222
12223 fi
12224
12225 if test $ac_cv_type_struct_sockaddr_storage = no; then
12226 HAVE_STRUCT_SOCKADDR_STORAGE=0
12227 fi
12228 if test $ac_cv_type_sa_family_t = no; then
12229 HAVE_SA_FAMILY_T=0
12230 fi
12231 if test $ac_cv_type_struct_sockaddr_storage != no; then
12232 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
12233 #ifdef HAVE_SYS_SOCKET_H
12234 #include <sys/socket.h>
12235 #endif
12236 #ifdef HAVE_WS2TCPIP_H
12237 #include <ws2tcpip.h>
12238 #endif
12239
12240 "
12241 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
12242
12243 cat >>confdefs.h <<_ACEOF
12244 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
12245 _ACEOF
12246
12247
12248 else
12249 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0
12250 fi
12251
12252 fi
12253 if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \
12254 || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then
12255 SYS_SOCKET_H='sys/socket.h'
12256 fi
12257
12258
12259
12260
12261 if test $ac_cv_header_sys_socket_h != yes; then
12262 for ac_header in winsock2.h
12263 do :
12264 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
12265 if test "x$ac_cv_header_winsock2_h" = xyes; then :
12266 cat >>confdefs.h <<_ACEOF
12267 #define HAVE_WINSOCK2_H 1
12268 _ACEOF
12269
12270 fi
12271
12272 done
12273
12274 fi
12275 if test "$ac_cv_header_winsock2_h" = yes; then
12276 HAVE_WINSOCK2_H=1
12277 UNISTD_H_HAVE_WINSOCK2_H=1
12278 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
12279 else
12280 HAVE_WINSOCK2_H=0
12281 fi
12282
12283
12284
12285
12286
12287
12288
12289
12290
12291
12292
12293
12294
12295
12296
12297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv4 sockets" >&5
12298 $as_echo_n "checking for IPv4 sockets... " >&6; }
12299 if ${gl_cv_socket_ipv4+:} false; then :
12300 $as_echo_n "(cached) " >&6
12301 else
12302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12303 /* end confdefs.h. */
12304 #include <sys/types.h>
12305 #ifdef HAVE_SYS_SOCKET_H
12306 #include <sys/socket.h>
12307 #endif
12308 #ifdef HAVE_NETINET_IN_H
12309 #include <netinet/in.h>
12310 #endif
12311 #ifdef HAVE_WINSOCK2_H
12312 #include <winsock2.h>
12313 #endif
12314 int
12315 main ()
12316 {
12317 int x = AF_INET; struct in_addr y; struct sockaddr_in z;
12318 if (&x && &y && &z) return 0;
12319 ;
12320 return 0;
12321 }
12322 _ACEOF
12323 if ac_fn_c_try_compile "$LINENO"; then :
12324 gl_cv_socket_ipv4=yes
12325 else
12326 gl_cv_socket_ipv4=no
12327 fi
12328 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12329 fi
12330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv4" >&5
12331 $as_echo "$gl_cv_socket_ipv4" >&6; }
12332 if test $gl_cv_socket_ipv4 = yes; then
12333
12334 $as_echo "#define HAVE_IPV4 1" >>confdefs.h
12335
12336 fi
12337
12338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv6 sockets" >&5
12339 $as_echo_n "checking for IPv6 sockets... " >&6; }
12340 if ${gl_cv_socket_ipv6+:} false; then :
12341 $as_echo_n "(cached) " >&6
12342 else
12343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12344 /* end confdefs.h. */
12345 #include <sys/types.h>
12346 #ifdef HAVE_SYS_SOCKET_H
12347 #include <sys/socket.h>
12348 #endif
12349 #ifdef HAVE_NETINET_IN_H
12350 #include <netinet/in.h>
12351 #endif
12352 #ifdef HAVE_WINSOCK2_H
12353 #include <winsock2.h>
12354 #endif
12355 #ifdef HAVE_WS2TCPIP_H
12356 #include <ws2tcpip.h>
12357 #endif
12358 int
12359 main ()
12360 {
12361 int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z;
12362 if (&x && &y && &z) return 0;
12363 ;
12364 return 0;
12365 }
12366 _ACEOF
12367 if ac_fn_c_try_compile "$LINENO"; then :
12368 gl_cv_socket_ipv6=yes
12369 else
12370 gl_cv_socket_ipv6=no
12371 fi
12372 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12373 fi
12374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv6" >&5
12375 $as_echo "$gl_cv_socket_ipv6" >&6; }
12376 if test $gl_cv_socket_ipv6 = yes; then
12377
12378 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
12379
12380 fi
12381
12382
12383
12384
12385
12386
12387
12388
12389
12390
12391
12392
12393
12394 if test $gl_cv_have_include_next = yes; then
12395 gl_cv_next_limits_h='<'limits.h'>'
12396 else
12397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5
12398 $as_echo_n "checking absolute name of <limits.h>... " >&6; }
12399 if ${gl_cv_next_limits_h+:} false; then :
12400 $as_echo_n "(cached) " >&6
12401 else
12402
12403 if test $ac_cv_header_limits_h = yes; then
12404
12405
12406
12407
12408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12409 /* end confdefs.h. */
12410 #include <limits.h>
12411 _ACEOF
12412 case "$host_os" in
12413 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12414 *) gl_absname_cpp="$ac_cpp" ;;
12415 esac
12416
12417 case "$host_os" in
12418 mingw*)
12419 gl_dirsep_regex='[/\\]'
12420 ;;
12421 *)
12422 gl_dirsep_regex='\/'
12423 ;;
12424 esac
12425 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12426 gl_header_literal_regex=`echo 'limits.h' \
12427 | sed -e "$gl_make_literal_regex_sed"`
12428 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12429 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12430 s|^/[^/]|//&|
12431 p
12432 q
12433 }'
12434
12435 gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12436 sed -n "$gl_absolute_header_sed"`
12437
12438 gl_header=$gl_cv_absolute_limits_h
12439 gl_cv_next_limits_h='"'$gl_header'"'
12440 else
12441 gl_cv_next_limits_h='<'limits.h'>'
12442 fi
12443
12444
12445 fi
12446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
12447 $as_echo "$gl_cv_next_limits_h" >&6; }
12448 fi
12449 NEXT_LIMITS_H=$gl_cv_next_limits_h
12450
12451 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12452 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12453 gl_next_as_first_directive='<'limits.h'>'
12454 else
12455 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12456 gl_next_as_first_directive=$gl_cv_next_limits_h
12457 fi
12458 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive
12459
12460
12461
12462
12463
12464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc." >&5
12465 $as_echo_n "checking whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc.... " >&6; }
12466 if ${gl_cv_header_limits_width+:} false; then :
12467 $as_echo_n "(cached) " >&6
12468 else
12469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12470 /* end confdefs.h. */
12471 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
12472 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
12473 #endif
12474 #include <limits.h>
12475 long long llm = LLONG_MAX;
12476 int wb = WORD_BIT;
12477 int ullw = ULLONG_WIDTH;
12478
12479 int
12480 main ()
12481 {
12482
12483 ;
12484 return 0;
12485 }
12486 _ACEOF
12487 if ac_fn_c_try_compile "$LINENO"; then :
12488 gl_cv_header_limits_width=yes
12489 else
12490 gl_cv_header_limits_width=no
12491 fi
12492 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12493 fi
12494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5
12495 $as_echo "$gl_cv_header_limits_width" >&6; }
12496 if test "$gl_cv_header_limits_width" = yes; then
12497 LIMITS_H=
12498 else
12499 LIMITS_H=limits.h
12500 fi
12501
12502 if test -n "$LIMITS_H"; then
12503 GL_GENERATE_LIMITS_H_TRUE=
12504 GL_GENERATE_LIMITS_H_FALSE='#'
12505 else
12506 GL_GENERATE_LIMITS_H_TRUE='#'
12507 GL_GENERATE_LIMITS_H_FALSE=
12508 fi
12509
12510
12511
12512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
12513 $as_echo_n "checking for wint_t... " >&6; }
12514 if ${gt_cv_c_wint_t+:} false; then :
12515 $as_echo_n "(cached) " >&6
12516 else
12517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12518 /* end confdefs.h. */
12519 #include <wchar.h>
12520 wint_t foo = (wchar_t)'\0';
12521 int
12522 main ()
12523 {
12524
12525 ;
12526 return 0;
12527 }
12528 _ACEOF
12529 if ac_fn_c_try_compile "$LINENO"; then :
12530 gt_cv_c_wint_t=yes
12531 else
12532 gt_cv_c_wint_t=no
12533 fi
12534 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12535 fi
12536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
12537 $as_echo "$gt_cv_c_wint_t" >&6; }
12538 if test $gt_cv_c_wint_t = yes; then
12539
12540 $as_echo "#define HAVE_WINT_T 1" >>confdefs.h
12541
12542
12543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wint_t is large enough" >&5
12544 $as_echo_n "checking whether wint_t is large enough... " >&6; }
12545 if ${gl_cv_type_wint_t_large_enough+:} false; then :
12546 $as_echo_n "(cached) " >&6
12547 else
12548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12549 /* end confdefs.h. */
12550 #include <wchar.h>
12551 int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1];
12552
12553 int
12554 main ()
12555 {
12556
12557 ;
12558 return 0;
12559 }
12560 _ACEOF
12561 if ac_fn_c_try_compile "$LINENO"; then :
12562 gl_cv_type_wint_t_large_enough=yes
12563 else
12564 gl_cv_type_wint_t_large_enough=no
12565 fi
12566 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12567 fi
12568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wint_t_large_enough" >&5
12569 $as_echo "$gl_cv_type_wint_t_large_enough" >&6; }
12570 if test $gl_cv_type_wint_t_large_enough = no; then
12571 GNULIB_OVERRIDES_WINT_T=1
12572 else
12573 GNULIB_OVERRIDES_WINT_T=0
12574 fi
12575 else
12576 GNULIB_OVERRIDES_WINT_T=0
12577 fi
12578
12579
12580
12581
12582
12583
12584
12585
12586
12587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler produces multi-arch binaries" >&5
12588 $as_echo_n "checking whether the compiler produces multi-arch binaries... " >&6; }
12589 if ${gl_cv_c_multiarch+:} false; then :
12590 $as_echo_n "(cached) " >&6
12591 else
12592 gl_cv_c_multiarch=no
12593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12594 /* end confdefs.h. */
12595 #ifndef __APPLE_CC__
12596 not a universal capable compiler
12597 #endif
12598 typedef int dummy;
12599
12600 _ACEOF
12601 if ac_fn_c_try_compile "$LINENO"; then :
12602
12603 arch=
12604 prev=
12605 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
12606 if test -n "$prev"; then
12607 case $word in
12608 i?86 | x86_64 | ppc | ppc64 | arm | arm64)
12609 if test -z "$arch" || test "$arch" = "$word"; then
12610 arch="$word"
12611 else
12612 gl_cv_c_multiarch=yes
12613 fi
12614 ;;
12615 esac
12616 prev=
12617 else
12618 if test "x$word" = "x-arch"; then
12619 prev=arch
12620 fi
12621 fi
12622 done
12623
12624 fi
12625 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12626
12627 fi
12628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_multiarch" >&5
12629 $as_echo "$gl_cv_c_multiarch" >&6; }
12630 if test $gl_cv_c_multiarch = yes; then
12631 APPLE_UNIVERSAL_BUILD=1
12632 else
12633 APPLE_UNIVERSAL_BUILD=0
12634 fi
12635
12636
12637
12638
12639
12640
12641
12642
12643 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
12644
12645
12646 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
12647
12648
12649
12650 if test $ac_cv_header_wchar_h = yes; then
12651 HAVE_WCHAR_H=1
12652 else
12653 HAVE_WCHAR_H=0
12654 fi
12655
12656
12657
12658 if test $ac_cv_header_inttypes_h = yes; then
12659 HAVE_INTTYPES_H=1
12660 else
12661 HAVE_INTTYPES_H=0
12662 fi
12663
12664
12665
12666 if test $ac_cv_header_sys_types_h = yes; then
12667 HAVE_SYS_TYPES_H=1
12668 else
12669 HAVE_SYS_TYPES_H=0
12670 fi
12671
12672
12673
12674
12675
12676
12677
12678
12679
12680
12681
12682 if test $gl_cv_have_include_next = yes; then
12683 gl_cv_next_stdint_h='<'stdint.h'>'
12684 else
12685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
12686 $as_echo_n "checking absolute name of <stdint.h>... " >&6; }
12687 if ${gl_cv_next_stdint_h+:} false; then :
12688 $as_echo_n "(cached) " >&6
12689 else
12690
12691 if test $ac_cv_header_stdint_h = yes; then
12692
12693
12694
12695
12696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12697 /* end confdefs.h. */
12698 #include <stdint.h>
12699 _ACEOF
12700 case "$host_os" in
12701 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12702 *) gl_absname_cpp="$ac_cpp" ;;
12703 esac
12704
12705 case "$host_os" in
12706 mingw*)
12707 gl_dirsep_regex='[/\\]'
12708 ;;
12709 *)
12710 gl_dirsep_regex='\/'
12711 ;;
12712 esac
12713 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12714 gl_header_literal_regex=`echo 'stdint.h' \
12715 | sed -e "$gl_make_literal_regex_sed"`
12716 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12717 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12718 s|^/[^/]|//&|
12719 p
12720 q
12721 }'
12722
12723 gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12724 sed -n "$gl_absolute_header_sed"`
12725
12726 gl_header=$gl_cv_absolute_stdint_h
12727 gl_cv_next_stdint_h='"'$gl_header'"'
12728 else
12729 gl_cv_next_stdint_h='<'stdint.h'>'
12730 fi
12731
12732
12733 fi
12734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
12735 $as_echo "$gl_cv_next_stdint_h" >&6; }
12736 fi
12737 NEXT_STDINT_H=$gl_cv_next_stdint_h
12738
12739 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12740 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12741 gl_next_as_first_directive='<'stdint.h'>'
12742 else
12743 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12744 gl_next_as_first_directive=$gl_cv_next_stdint_h
12745 fi
12746 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
12747
12748
12749
12750
12751 if test $ac_cv_header_stdint_h = yes; then
12752 HAVE_STDINT_H=1
12753 else
12754 HAVE_STDINT_H=0
12755 fi
12756
12757
12758 if test $ac_cv_header_stdint_h = yes; then
12759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
12760 $as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
12761 if ${gl_cv_header_working_stdint_h+:} false; then :
12762 $as_echo_n "(cached) " >&6
12763 else
12764 gl_cv_header_working_stdint_h=no
12765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12766 /* end confdefs.h. */
12767
12768
12769 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
12770 #define __STDC_CONSTANT_MACROS 1
12771 #define __STDC_LIMIT_MACROS 1
12772 #include <stdint.h>
12773 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
12774 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
12775 #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
12776 #endif
12777
12778
12779 #include <stddef.h>
12780 #include <signal.h>
12781 #if HAVE_WCHAR_H
12782 # include <wchar.h>
12783 #endif
12784
12785
12786 #ifdef INT8_MAX
12787 int8_t a1 = INT8_MAX;
12788 int8_t a1min = INT8_MIN;
12789 #endif
12790 #ifdef INT16_MAX
12791 int16_t a2 = INT16_MAX;
12792 int16_t a2min = INT16_MIN;
12793 #endif
12794 #ifdef INT32_MAX
12795 int32_t a3 = INT32_MAX;
12796 int32_t a3min = INT32_MIN;
12797 #endif
12798 #ifdef INT64_MAX
12799 int64_t a4 = INT64_MAX;
12800 int64_t a4min = INT64_MIN;
12801 #endif
12802 #ifdef UINT8_MAX
12803 uint8_t b1 = UINT8_MAX;
12804 #else
12805 typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
12806 #endif
12807 #ifdef UINT16_MAX
12808 uint16_t b2 = UINT16_MAX;
12809 #endif
12810 #ifdef UINT32_MAX
12811 uint32_t b3 = UINT32_MAX;
12812 #endif
12813 #ifdef UINT64_MAX
12814 uint64_t b4 = UINT64_MAX;
12815 #endif
12816 int_least8_t c1 = INT8_C (0x7f);
12817 int_least8_t c1max = INT_LEAST8_MAX;
12818 int_least8_t c1min = INT_LEAST8_MIN;
12819 int_least16_t c2 = INT16_C (0x7fff);
12820 int_least16_t c2max = INT_LEAST16_MAX;
12821 int_least16_t c2min = INT_LEAST16_MIN;
12822 int_least32_t c3 = INT32_C (0x7fffffff);
12823 int_least32_t c3max = INT_LEAST32_MAX;
12824 int_least32_t c3min = INT_LEAST32_MIN;
12825 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
12826 int_least64_t c4max = INT_LEAST64_MAX;
12827 int_least64_t c4min = INT_LEAST64_MIN;
12828 uint_least8_t d1 = UINT8_C (0xff);
12829 uint_least8_t d1max = UINT_LEAST8_MAX;
12830 uint_least16_t d2 = UINT16_C (0xffff);
12831 uint_least16_t d2max = UINT_LEAST16_MAX;
12832 uint_least32_t d3 = UINT32_C (0xffffffff);
12833 uint_least32_t d3max = UINT_LEAST32_MAX;
12834 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
12835 uint_least64_t d4max = UINT_LEAST64_MAX;
12836 int_fast8_t e1 = INT_FAST8_MAX;
12837 int_fast8_t e1min = INT_FAST8_MIN;
12838 int_fast16_t e2 = INT_FAST16_MAX;
12839 int_fast16_t e2min = INT_FAST16_MIN;
12840 int_fast32_t e3 = INT_FAST32_MAX;
12841 int_fast32_t e3min = INT_FAST32_MIN;
12842 int_fast64_t e4 = INT_FAST64_MAX;
12843 int_fast64_t e4min = INT_FAST64_MIN;
12844 uint_fast8_t f1 = UINT_FAST8_MAX;
12845 uint_fast16_t f2 = UINT_FAST16_MAX;
12846 uint_fast32_t f3 = UINT_FAST32_MAX;
12847 uint_fast64_t f4 = UINT_FAST64_MAX;
12848 #ifdef INTPTR_MAX
12849 intptr_t g = INTPTR_MAX;
12850 intptr_t gmin = INTPTR_MIN;
12851 #endif
12852 #ifdef UINTPTR_MAX
12853 uintptr_t h = UINTPTR_MAX;
12854 #endif
12855 intmax_t i = INTMAX_MAX;
12856 uintmax_t j = UINTMAX_MAX;
12857
12858 /* Check that SIZE_MAX has the correct type, if possible. */
12859 #if 201112 <= __STDC_VERSION__
12860 int k = _Generic (SIZE_MAX, size_t: 0);
12861 #elif (2 <= __GNUC__ || 4 <= __clang_major__ || defined __IBM__TYPEOF__ \
12862 || (0x5110 <= __SUNPRO_C && !__STDC__))
12863 extern size_t k;
12864 extern __typeof__ (SIZE_MAX) k;
12865 #endif
12866
12867 #include <limits.h> /* for CHAR_BIT */
12868 #define TYPE_MINIMUM(t) \
12869 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
12870 #define TYPE_MAXIMUM(t) \
12871 ((t) ((t) 0 < (t) -1 \
12872 ? (t) -1 \
12873 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
12874 struct s {
12875 int check_PTRDIFF:
12876 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
12877 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
12878 ? 1 : -1;
12879 /* Detect bug in FreeBSD 6.0 / ia64. */
12880 int check_SIG_ATOMIC:
12881 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
12882 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
12883 ? 1 : -1;
12884 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
12885 int check_WCHAR:
12886 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
12887 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
12888 ? 1 : -1;
12889 /* Detect bug in mingw. */
12890 int check_WINT:
12891 WINT_MIN == TYPE_MINIMUM (wint_t)
12892 && WINT_MAX == TYPE_MAXIMUM (wint_t)
12893 ? 1 : -1;
12894
12895 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
12896 int check_UINT8_C:
12897 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
12898 int check_UINT16_C:
12899 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
12900
12901 /* Detect bugs in OpenBSD 3.9 stdint.h. */
12902 #ifdef UINT8_MAX
12903 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
12904 #endif
12905 #ifdef UINT16_MAX
12906 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
12907 #endif
12908 #ifdef UINT32_MAX
12909 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
12910 #endif
12911 #ifdef UINT64_MAX
12912 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
12913 #endif
12914 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
12915 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
12916 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
12917 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
12918 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
12919 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
12920 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
12921 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
12922 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
12923 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
12924 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
12925 };
12926
12927 int
12928 main ()
12929 {
12930
12931 ;
12932 return 0;
12933 }
12934 _ACEOF
12935 if ac_fn_c_try_compile "$LINENO"; then :
12936 if test "$cross_compiling" = yes; then :
12937 case "$host_os" in
12938 # Guess yes on native Windows.
12939 mingw*) gl_cv_header_working_stdint_h="guessing yes" ;;
12940 # In general, assume it works.
12941 *) gl_cv_header_working_stdint_h="guessing yes" ;;
12942 esac
12943
12944 else
12945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12946 /* end confdefs.h. */
12947
12948
12949 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
12950 #define __STDC_CONSTANT_MACROS 1
12951 #define __STDC_LIMIT_MACROS 1
12952 #include <stdint.h>
12953
12954
12955 #include <stddef.h>
12956 #include <signal.h>
12957 #if HAVE_WCHAR_H
12958 # include <wchar.h>
12959 #endif
12960
12961
12962 #include <stdio.h>
12963 #include <string.h>
12964 #define MVAL(macro) MVAL1(macro)
12965 #define MVAL1(expression) #expression
12966 static const char *macro_values[] =
12967 {
12968 #ifdef INT8_MAX
12969 MVAL (INT8_MAX),
12970 #endif
12971 #ifdef INT16_MAX
12972 MVAL (INT16_MAX),
12973 #endif
12974 #ifdef INT32_MAX
12975 MVAL (INT32_MAX),
12976 #endif
12977 #ifdef INT64_MAX
12978 MVAL (INT64_MAX),
12979 #endif
12980 #ifdef UINT8_MAX
12981 MVAL (UINT8_MAX),
12982 #endif
12983 #ifdef UINT16_MAX
12984 MVAL (UINT16_MAX),
12985 #endif
12986 #ifdef UINT32_MAX
12987 MVAL (UINT32_MAX),
12988 #endif
12989 #ifdef UINT64_MAX
12990 MVAL (UINT64_MAX),
12991 #endif
12992 NULL
12993 };
12994
12995 int
12996 main ()
12997 {
12998
12999 const char **mv;
13000 for (mv = macro_values; *mv != NULL; mv++)
13001 {
13002 const char *value = *mv;
13003 /* Test whether it looks like a cast expression. */
13004 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
13005 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
13006 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
13007 || strncmp (value, "((int)"/*)*/, 6) == 0
13008 || strncmp (value, "((signed short)"/*)*/, 15) == 0
13009 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
13010 return mv - macro_values + 1;
13011 }
13012 return 0;
13013
13014 ;
13015 return 0;
13016 }
13017 _ACEOF
13018 if ac_fn_c_try_run "$LINENO"; then :
13019 gl_cv_header_working_stdint_h=yes
13020 fi
13021 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13022 conftest.$ac_objext conftest.beam conftest.$ac_ext
13023 fi
13024
13025
13026 fi
13027 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13028
13029 fi
13030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
13031 $as_echo "$gl_cv_header_working_stdint_h" >&6; }
13032 fi
13033
13034 HAVE_C99_STDINT_H=0
13035 HAVE_SYS_BITYPES_H=0
13036 HAVE_SYS_INTTYPES_H=0
13037 STDINT_H=stdint.h
13038 case "$gl_cv_header_working_stdint_h" in
13039 *yes)
13040 HAVE_C99_STDINT_H=1
13041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h works without ISO C predefines" >&5
13042 $as_echo_n "checking whether stdint.h works without ISO C predefines... " >&6; }
13043 if ${gl_cv_header_stdint_without_STDC_macros+:} false; then :
13044 $as_echo_n "(cached) " >&6
13045 else
13046 gl_cv_header_stdint_without_STDC_macros=no
13047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13048 /* end confdefs.h. */
13049
13050
13051 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
13052 #include <stdint.h>
13053
13054
13055 #include <stddef.h>
13056 #include <signal.h>
13057 #if HAVE_WCHAR_H
13058 # include <wchar.h>
13059 #endif
13060
13061
13062 intmax_t im = INTMAX_MAX;
13063 int32_t i32 = INT32_C (0x7fffffff);
13064
13065 int
13066 main ()
13067 {
13068
13069 ;
13070 return 0;
13071 }
13072 _ACEOF
13073 if ac_fn_c_try_compile "$LINENO"; then :
13074 gl_cv_header_stdint_without_STDC_macros=yes
13075 fi
13076 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13077
13078 fi
13079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_without_STDC_macros" >&5
13080 $as_echo "$gl_cv_header_stdint_without_STDC_macros" >&6; }
13081
13082 if test $gl_cv_header_stdint_without_STDC_macros = no; then
13083
13084 $as_echo "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
13085
13086
13087 $as_echo "#define __STDC_LIMIT_MACROS 1" >>confdefs.h
13088
13089 fi
13090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5
13091 $as_echo_n "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; }
13092 if ${gl_cv_header_stdint_width+:} false; then :
13093 $as_echo_n "(cached) " >&6
13094 else
13095 gl_cv_header_stdint_width=no
13096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13097 /* end confdefs.h. */
13098
13099 /* Work if build is not clean. */
13100 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
13101 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
13102 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
13103 #endif
13104 #include <stdint.h>
13105
13106 #include <stddef.h>
13107 #include <signal.h>
13108 #if HAVE_WCHAR_H
13109 # include <wchar.h>
13110 #endif
13111
13112 int iw = UINTMAX_WIDTH;
13113
13114 int
13115 main ()
13116 {
13117
13118 ;
13119 return 0;
13120 }
13121 _ACEOF
13122 if ac_fn_c_try_compile "$LINENO"; then :
13123 gl_cv_header_stdint_width=yes
13124 fi
13125 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13126 fi
13127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5
13128 $as_echo "$gl_cv_header_stdint_width" >&6; }
13129 if test "$gl_cv_header_stdint_width" = yes; then
13130 STDINT_H=
13131 fi
13132 ;;
13133 *)
13134 for ac_header in sys/inttypes.h sys/bitypes.h
13135 do :
13136 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13137 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13138 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13139 cat >>confdefs.h <<_ACEOF
13140 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13141 _ACEOF
13142
13143 fi
13144
13145 done
13146
13147 if test $ac_cv_header_sys_inttypes_h = yes; then
13148 HAVE_SYS_INTTYPES_H=1
13149 fi
13150 if test $ac_cv_header_sys_bitypes_h = yes; then
13151 HAVE_SYS_BITYPES_H=1
13152 fi
13153
13154
13155 if test $APPLE_UNIVERSAL_BUILD = 0; then
13156
13157
13158 for gltype in ptrdiff_t size_t ; do
13159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
13160 $as_echo_n "checking for bit size of $gltype... " >&6; }
13161 if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
13162 $as_echo_n "(cached) " >&6
13163 else
13164 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
13165 #include <stddef.h>
13166 #include <signal.h>
13167 #if HAVE_WCHAR_H
13168 # include <wchar.h>
13169 #endif
13170
13171 #include <limits.h>"; then :
13172
13173 else
13174 result=unknown
13175 fi
13176
13177 eval gl_cv_bitsizeof_${gltype}=\$result
13178
13179 fi
13180 eval ac_res=\$gl_cv_bitsizeof_${gltype}
13181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13182 $as_echo "$ac_res" >&6; }
13183 eval result=\$gl_cv_bitsizeof_${gltype}
13184 if test $result = unknown; then
13185 result=0
13186 fi
13187 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
13188 cat >>confdefs.h <<_ACEOF
13189 #define BITSIZEOF_${GLTYPE} $result
13190 _ACEOF
13191
13192 eval BITSIZEOF_${GLTYPE}=\$result
13193 done
13194
13195
13196 fi
13197
13198
13199 for gltype in sig_atomic_t wchar_t wint_t ; do
13200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
13201 $as_echo_n "checking for bit size of $gltype... " >&6; }
13202 if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
13203 $as_echo_n "(cached) " >&6
13204 else
13205 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
13206 #include <stddef.h>
13207 #include <signal.h>
13208 #if HAVE_WCHAR_H
13209 # include <wchar.h>
13210 #endif
13211
13212 #include <limits.h>"; then :
13213
13214 else
13215 result=unknown
13216 fi
13217
13218 eval gl_cv_bitsizeof_${gltype}=\$result
13219
13220 fi
13221 eval ac_res=\$gl_cv_bitsizeof_${gltype}
13222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13223 $as_echo "$ac_res" >&6; }
13224 eval result=\$gl_cv_bitsizeof_${gltype}
13225 if test $result = unknown; then
13226 result=0
13227 fi
13228 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
13229 cat >>confdefs.h <<_ACEOF
13230 #define BITSIZEOF_${GLTYPE} $result
13231 _ACEOF
13232
13233 eval BITSIZEOF_${GLTYPE}=\$result
13234 done
13235
13236
13237
13238
13239 for gltype in sig_atomic_t wchar_t wint_t ; do
13240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
13241 $as_echo_n "checking whether $gltype is signed... " >&6; }
13242 if eval \${gl_cv_type_${gltype}_signed+:} false; then :
13243 $as_echo_n "(cached) " >&6
13244 else
13245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13246 /* end confdefs.h. */
13247
13248 #include <stddef.h>
13249 #include <signal.h>
13250 #if HAVE_WCHAR_H
13251 # include <wchar.h>
13252 #endif
13253
13254 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
13255 int
13256 main ()
13257 {
13258
13259 ;
13260 return 0;
13261 }
13262 _ACEOF
13263 if ac_fn_c_try_compile "$LINENO"; then :
13264 result=yes
13265 else
13266 result=no
13267 fi
13268 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13269 eval gl_cv_type_${gltype}_signed=\$result
13270
13271 fi
13272 eval ac_res=\$gl_cv_type_${gltype}_signed
13273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13274 $as_echo "$ac_res" >&6; }
13275 eval result=\$gl_cv_type_${gltype}_signed
13276 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
13277 if test "$result" = yes; then
13278 cat >>confdefs.h <<_ACEOF
13279 #define HAVE_SIGNED_${GLTYPE} 1
13280 _ACEOF
13281
13282 eval HAVE_SIGNED_${GLTYPE}=1
13283 else
13284 eval HAVE_SIGNED_${GLTYPE}=0
13285 fi
13286 done
13287
13288
13289 gl_cv_type_ptrdiff_t_signed=yes
13290 gl_cv_type_size_t_signed=no
13291 if test $APPLE_UNIVERSAL_BUILD = 0; then
13292
13293
13294 for gltype in ptrdiff_t size_t ; do
13295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
13296 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
13297 if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
13298 $as_echo_n "(cached) " >&6
13299 else
13300 eval gl_cv_type_${gltype}_suffix=no
13301 eval result=\$gl_cv_type_${gltype}_signed
13302 if test "$result" = yes; then
13303 glsufu=
13304 else
13305 glsufu=u
13306 fi
13307 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
13308 case $glsuf in
13309 '') gltype1='int';;
13310 l) gltype1='long int';;
13311 ll) gltype1='long long int';;
13312 i64) gltype1='__int64';;
13313 u) gltype1='unsigned int';;
13314 ul) gltype1='unsigned long int';;
13315 ull) gltype1='unsigned long long int';;
13316 ui64)gltype1='unsigned __int64';;
13317 esac
13318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13319 /* end confdefs.h. */
13320
13321 #include <stddef.h>
13322 #include <signal.h>
13323 #if HAVE_WCHAR_H
13324 # include <wchar.h>
13325 #endif
13326
13327 extern $gltype foo;
13328 extern $gltype1 foo;
13329 int
13330 main ()
13331 {
13332
13333 ;
13334 return 0;
13335 }
13336 _ACEOF
13337 if ac_fn_c_try_compile "$LINENO"; then :
13338 eval gl_cv_type_${gltype}_suffix=\$glsuf
13339 fi
13340 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13341 eval result=\$gl_cv_type_${gltype}_suffix
13342 test "$result" != no && break
13343 done
13344 fi
13345 eval ac_res=\$gl_cv_type_${gltype}_suffix
13346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13347 $as_echo "$ac_res" >&6; }
13348 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
13349 eval result=\$gl_cv_type_${gltype}_suffix
13350 test "$result" = no && result=
13351 eval ${GLTYPE}_SUFFIX=\$result
13352 cat >>confdefs.h <<_ACEOF
13353 #define ${GLTYPE}_SUFFIX $result
13354 _ACEOF
13355
13356 done
13357
13358
13359 fi
13360
13361
13362 for gltype in sig_atomic_t wchar_t wint_t ; do
13363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
13364 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
13365 if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
13366 $as_echo_n "(cached) " >&6
13367 else
13368 eval gl_cv_type_${gltype}_suffix=no
13369 eval result=\$gl_cv_type_${gltype}_signed
13370 if test "$result" = yes; then
13371 glsufu=
13372 else
13373 glsufu=u
13374 fi
13375 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
13376 case $glsuf in
13377 '') gltype1='int';;
13378 l) gltype1='long int';;
13379 ll) gltype1='long long int';;
13380 i64) gltype1='__int64';;
13381 u) gltype1='unsigned int';;
13382 ul) gltype1='unsigned long int';;
13383 ull) gltype1='unsigned long long int';;
13384 ui64)gltype1='unsigned __int64';;
13385 esac
13386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13387 /* end confdefs.h. */
13388
13389 #include <stddef.h>
13390 #include <signal.h>
13391 #if HAVE_WCHAR_H
13392 # include <wchar.h>
13393 #endif
13394
13395 extern $gltype foo;
13396 extern $gltype1 foo;
13397 int
13398 main ()
13399 {
13400
13401 ;
13402 return 0;
13403 }
13404 _ACEOF
13405 if ac_fn_c_try_compile "$LINENO"; then :
13406 eval gl_cv_type_${gltype}_suffix=\$glsuf
13407 fi
13408 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13409 eval result=\$gl_cv_type_${gltype}_suffix
13410 test "$result" != no && break
13411 done
13412 fi
13413 eval ac_res=\$gl_cv_type_${gltype}_suffix
13414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13415 $as_echo "$ac_res" >&6; }
13416 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
13417 eval result=\$gl_cv_type_${gltype}_suffix
13418 test "$result" = no && result=
13419 eval ${GLTYPE}_SUFFIX=\$result
13420 cat >>confdefs.h <<_ACEOF
13421 #define ${GLTYPE}_SUFFIX $result
13422 _ACEOF
13423
13424 done
13425
13426
13427
13428 if test $GNULIB_OVERRIDES_WINT_T = 1; then
13429 BITSIZEOF_WINT_T=32
13430 fi
13431
13432 ;;
13433 esac
13434
13435
13436
13437 LIMITS_H='limits.h'
13438 if test -n "$LIMITS_H"; then
13439 GL_GENERATE_LIMITS_H_TRUE=
13440 GL_GENERATE_LIMITS_H_FALSE='#'
13441 else
13442 GL_GENERATE_LIMITS_H_TRUE='#'
13443 GL_GENERATE_LIMITS_H_FALSE=
13444 fi
13445
13446
13447
13448
13449
13450
13451
13452 if test -n "$STDINT_H"; then
13453 GL_GENERATE_STDINT_H_TRUE=
13454 GL_GENERATE_STDINT_H_FALSE='#'
13455 else
13456 GL_GENERATE_STDINT_H_TRUE='#'
13457 GL_GENERATE_STDINT_H_FALSE=
13458 fi
13459
13460
13461
13462 GNULIB_IMAXABS=0;
13463 GNULIB_IMAXDIV=0;
13464 GNULIB_STRTOIMAX=0;
13465 GNULIB_STRTOUMAX=0;
13466 HAVE_DECL_IMAXABS=1;
13467 HAVE_DECL_IMAXDIV=1;
13468 HAVE_DECL_STRTOIMAX=1;
13469 HAVE_DECL_STRTOUMAX=1;
13470 HAVE_IMAXDIV_T=1;
13471 REPLACE_STRTOIMAX=0;
13472 REPLACE_STRTOUMAX=0;
13473 INT32_MAX_LT_INTMAX_MAX=1;
13474 INT64_MAX_EQ_LONG_MAX='defined _LP64';
13475 PRIPTR_PREFIX=__PRIPTR_PREFIX;
13476 UINT32_MAX_LT_UINTMAX_MAX=1;
13477 UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
13478
13479
13480
13481
13482
13483
13484
13485
13486
13487
13488
13489
13490
13491
13492
13493 if test $gl_cv_have_include_next = yes; then
13494 gl_cv_next_inttypes_h='<'inttypes.h'>'
13495 else
13496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
13497 $as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
13498 if ${gl_cv_next_inttypes_h+:} false; then :
13499 $as_echo_n "(cached) " >&6
13500 else
13501
13502 if test $ac_cv_header_inttypes_h = yes; then
13503
13504
13505
13506
13507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13508 /* end confdefs.h. */
13509 #include <inttypes.h>
13510 _ACEOF
13511 case "$host_os" in
13512 aix*) gl_absname_cpp="$ac_cpp -C" ;;
13513 *) gl_absname_cpp="$ac_cpp" ;;
13514 esac
13515
13516 case "$host_os" in
13517 mingw*)
13518 gl_dirsep_regex='[/\\]'
13519 ;;
13520 *)
13521 gl_dirsep_regex='\/'
13522 ;;
13523 esac
13524 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13525 gl_header_literal_regex=`echo 'inttypes.h' \
13526 | sed -e "$gl_make_literal_regex_sed"`
13527 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13528 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13529 s|^/[^/]|//&|
13530 p
13531 q
13532 }'
13533
13534 gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13535 sed -n "$gl_absolute_header_sed"`
13536
13537 gl_header=$gl_cv_absolute_inttypes_h
13538 gl_cv_next_inttypes_h='"'$gl_header'"'
13539 else
13540 gl_cv_next_inttypes_h='<'inttypes.h'>'
13541 fi
13542
13543
13544 fi
13545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
13546 $as_echo "$gl_cv_next_inttypes_h" >&6; }
13547 fi
13548 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
13549
13550 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13551 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13552 gl_next_as_first_directive='<'inttypes.h'>'
13553 else
13554 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13555 gl_next_as_first_directive=$gl_cv_next_inttypes_h
13556 fi
13557 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
13558
13559
13560
13561
13562
13563
13564
13565
13566
13567
13568
13569
13570
13571
13572
13573
13574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
13575 $as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
13576 if ${gl_cv_cc_double_expbit0+:} false; then :
13577 $as_echo_n "(cached) " >&6
13578 else
13579
13580 if test "$cross_compiling" = yes; then :
13581
13582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13583 /* end confdefs.h. */
13584
13585 #if defined arm || defined __arm || defined __arm__
13586 mixed_endianness
13587 #endif
13588
13589 _ACEOF
13590 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13591 $EGREP "mixed_endianness" >/dev/null 2>&1; then :
13592 gl_cv_cc_double_expbit0="unknown"
13593 else
13594
13595 :
13596 if ${ac_cv_c_bigendian+:} false; then :
13597 $as_echo_n "(cached) " >&6
13598 else
13599 ac_cv_c_bigendian=unknown
13600 # See if we're dealing with a universal compiler.
13601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13602 /* end confdefs.h. */
13603 #ifndef __APPLE_CC__
13604 not a universal capable compiler
13605 #endif
13606 typedef int dummy;
13607
13608 _ACEOF
13609 if ac_fn_c_try_compile "$LINENO"; then :
13610
13611 # Check for potential -arch flags. It is not universal unless
13612 # there are at least two -arch flags with different values.
13613 ac_arch=
13614 ac_prev=
13615 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13616 if test -n "$ac_prev"; then
13617 case $ac_word in
13618 i?86 | x86_64 | ppc | ppc64)
13619 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13620 ac_arch=$ac_word
13621 else
13622 ac_cv_c_bigendian=universal
13623 break
13624 fi
13625 ;;
13626 esac
13627 ac_prev=
13628 elif test "x$ac_word" = "x-arch"; then
13629 ac_prev=arch
13630 fi
13631 done
13632 fi
13633 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13634 if test $ac_cv_c_bigendian = unknown; then
13635 # See if sys/param.h defines the BYTE_ORDER macro.
13636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13637 /* end confdefs.h. */
13638 #include <sys/types.h>
13639 #include <sys/param.h>
13640
13641 int
13642 main ()
13643 {
13644 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13645 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13646 && LITTLE_ENDIAN)
13647 bogus endian macros
13648 #endif
13649
13650 ;
13651 return 0;
13652 }
13653 _ACEOF
13654 if ac_fn_c_try_compile "$LINENO"; then :
13655 # It does; now see whether it defined to BIG_ENDIAN or not.
13656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13657 /* end confdefs.h. */
13658 #include <sys/types.h>
13659 #include <sys/param.h>
13660
13661 int
13662 main ()
13663 {
13664 #if BYTE_ORDER != BIG_ENDIAN
13665 not big endian
13666 #endif
13667
13668 ;
13669 return 0;
13670 }
13671 _ACEOF
13672 if ac_fn_c_try_compile "$LINENO"; then :
13673 ac_cv_c_bigendian=yes
13674 else
13675 ac_cv_c_bigendian=no
13676 fi
13677 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13678 fi
13679 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13680 fi
13681 if test $ac_cv_c_bigendian = unknown; then
13682 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13684 /* end confdefs.h. */
13685 #include <limits.h>
13686
13687 int
13688 main ()
13689 {
13690 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13691 bogus endian macros
13692 #endif
13693
13694 ;
13695 return 0;
13696 }
13697 _ACEOF
13698 if ac_fn_c_try_compile "$LINENO"; then :
13699 # It does; now see whether it defined to _BIG_ENDIAN or not.
13700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13701 /* end confdefs.h. */
13702 #include <limits.h>
13703
13704 int
13705 main ()
13706 {
13707 #ifndef _BIG_ENDIAN
13708 not big endian
13709 #endif
13710
13711 ;
13712 return 0;
13713 }
13714 _ACEOF
13715 if ac_fn_c_try_compile "$LINENO"; then :
13716 ac_cv_c_bigendian=yes
13717 else
13718 ac_cv_c_bigendian=no
13719 fi
13720 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13721 fi
13722 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13723 fi
13724 if test $ac_cv_c_bigendian = unknown; then
13725 # Compile a test program.
13726 if test "$cross_compiling" = yes; then :
13727 # Try to guess by grepping values from an object file.
13728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13729 /* end confdefs.h. */
13730 short int ascii_mm[] =
13731 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13732 short int ascii_ii[] =
13733 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13734 int use_ascii (int i) {
13735 return ascii_mm[i] + ascii_ii[i];
13736 }
13737 short int ebcdic_ii[] =
13738 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13739 short int ebcdic_mm[] =
13740 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13741 int use_ebcdic (int i) {
13742 return ebcdic_mm[i] + ebcdic_ii[i];
13743 }
13744 extern int foo;
13745
13746 int
13747 main ()
13748 {
13749 return use_ascii (foo) == use_ebcdic (foo);
13750 ;
13751 return 0;
13752 }
13753 _ACEOF
13754 if ac_fn_c_try_compile "$LINENO"; then :
13755 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13756 ac_cv_c_bigendian=yes
13757 fi
13758 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13759 if test "$ac_cv_c_bigendian" = unknown; then
13760 ac_cv_c_bigendian=no
13761 else
13762 # finding both strings is unlikely to happen, but who knows?
13763 ac_cv_c_bigendian=unknown
13764 fi
13765 fi
13766 fi
13767 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13768 else
13769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13770 /* end confdefs.h. */
13771 $ac_includes_default
13772 int
13773 main ()
13774 {
13775
13776 /* Are we little or big endian? From Harbison&Steele. */
13777 union
13778 {
13779 long int l;
13780 char c[sizeof (long int)];
13781 } u;
13782 u.l = 1;
13783 return u.c[sizeof (long int) - 1] == 1;
13784
13785 ;
13786 return 0;
13787 }
13788 _ACEOF
13789 if ac_fn_c_try_run "$LINENO"; then :
13790 ac_cv_c_bigendian=no
13791 else
13792 ac_cv_c_bigendian=yes
13793 fi
13794 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13795 conftest.$ac_objext conftest.beam conftest.$ac_ext
13796 fi
13797
13798 fi
13799 fi
13800 :
13801 case $ac_cv_c_bigendian in #(
13802 yes)
13803 gl_cv_cc_double_expbit0="word 0 bit 20";; #(
13804 no)
13805 gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
13806 universal)
13807
13808 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
13809
13810 ;; #(
13811 *)
13812 gl_cv_cc_double_expbit0="unknown" ;;
13813 esac
13814
13815
13816 fi
13817 rm -f conftest*
13818
13819
13820 else
13821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13822 /* end confdefs.h. */
13823
13824 #include <float.h>
13825 #include <stddef.h>
13826 #include <stdio.h>
13827 #include <string.h>
13828 #define NWORDS \
13829 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
13830 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
13831 static unsigned int ored_words[NWORDS];
13832 static unsigned int anded_words[NWORDS];
13833 static void add_to_ored_words (double x)
13834 {
13835 memory_double m;
13836 size_t i;
13837 /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
13838 memset (&m, 0, sizeof (memory_double));
13839 m.value = x;
13840 for (i = 0; i < NWORDS; i++)
13841 {
13842 ored_words[i] |= m.word[i];
13843 anded_words[i] &= m.word[i];
13844 }
13845 }
13846 int main ()
13847 {
13848 size_t j;
13849 FILE *fp = fopen ("conftest.out", "w");
13850 if (fp == NULL)
13851 return 1;
13852 for (j = 0; j < NWORDS; j++)
13853 anded_words[j] = ~ (unsigned int) 0;
13854 add_to_ored_words (0.25);
13855 add_to_ored_words (0.5);
13856 add_to_ored_words (1.0);
13857 add_to_ored_words (2.0);
13858 add_to_ored_words (4.0);
13859 /* Remove bits that are common (e.g. if representation of the first mantissa
13860 bit is explicit). */
13861 for (j = 0; j < NWORDS; j++)
13862 ored_words[j] &= ~anded_words[j];
13863 /* Now find the nonzero word. */
13864 for (j = 0; j < NWORDS; j++)
13865 if (ored_words[j] != 0)
13866 break;
13867 if (j < NWORDS)
13868 {
13869 size_t i;
13870 for (i = j + 1; i < NWORDS; i++)
13871 if (ored_words[i] != 0)
13872 {
13873 fprintf (fp, "unknown");
13874 return (fclose (fp) != 0);
13875 }
13876 for (i = 0; ; i++)
13877 if ((ored_words[j] >> i) & 1)
13878 {
13879 fprintf (fp, "word %d bit %d", (int) j, (int) i);
13880 return (fclose (fp) != 0);
13881 }
13882 }
13883 fprintf (fp, "unknown");
13884 return (fclose (fp) != 0);
13885 }
13886
13887 _ACEOF
13888 if ac_fn_c_try_run "$LINENO"; then :
13889 gl_cv_cc_double_expbit0=`cat conftest.out`
13890 else
13891 gl_cv_cc_double_expbit0="unknown"
13892 fi
13893 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13894 conftest.$ac_objext conftest.beam conftest.$ac_ext
13895 fi
13896
13897 rm -f conftest.out
13898
13899 fi
13900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
13901 $as_echo "$gl_cv_cc_double_expbit0" >&6; }
13902 case "$gl_cv_cc_double_expbit0" in
13903 word*bit*)
13904 word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
13905 bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
13906
13907 cat >>confdefs.h <<_ACEOF
13908 #define DBL_EXPBIT0_WORD $word
13909 _ACEOF
13910
13911
13912 cat >>confdefs.h <<_ACEOF
13913 #define DBL_EXPBIT0_BIT $bit
13914 _ACEOF
13915
13916 ;;
13917 esac
13918
13919
13920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13921 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
13922 if ${ac_cv_c_bigendian+:} false; then :
13923 $as_echo_n "(cached) " >&6
13924 else
13925 ac_cv_c_bigendian=unknown
13926 # See if we're dealing with a universal compiler.
13927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13928 /* end confdefs.h. */
13929 #ifndef __APPLE_CC__
13930 not a universal capable compiler
13931 #endif
13932 typedef int dummy;
13933
13934 _ACEOF
13935 if ac_fn_c_try_compile "$LINENO"; then :
13936
13937 # Check for potential -arch flags. It is not universal unless
13938 # there are at least two -arch flags with different values.
13939 ac_arch=
13940 ac_prev=
13941 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13942 if test -n "$ac_prev"; then
13943 case $ac_word in
13944 i?86 | x86_64 | ppc | ppc64)
13945 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13946 ac_arch=$ac_word
13947 else
13948 ac_cv_c_bigendian=universal
13949 break
13950 fi
13951 ;;
13952 esac
13953 ac_prev=
13954 elif test "x$ac_word" = "x-arch"; then
13955 ac_prev=arch
13956 fi
13957 done
13958 fi
13959 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13960 if test $ac_cv_c_bigendian = unknown; then
13961 # See if sys/param.h defines the BYTE_ORDER macro.
13962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13963 /* end confdefs.h. */
13964 #include <sys/types.h>
13965 #include <sys/param.h>
13966
13967 int
13968 main ()
13969 {
13970 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13971 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13972 && LITTLE_ENDIAN)
13973 bogus endian macros
13974 #endif
13975
13976 ;
13977 return 0;
13978 }
13979 _ACEOF
13980 if ac_fn_c_try_compile "$LINENO"; then :
13981 # It does; now see whether it defined to BIG_ENDIAN or not.
13982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13983 /* end confdefs.h. */
13984 #include <sys/types.h>
13985 #include <sys/param.h>
13986
13987 int
13988 main ()
13989 {
13990 #if BYTE_ORDER != BIG_ENDIAN
13991 not big endian
13992 #endif
13993
13994 ;
13995 return 0;
13996 }
13997 _ACEOF
13998 if ac_fn_c_try_compile "$LINENO"; then :
13999 ac_cv_c_bigendian=yes
14000 else
14001 ac_cv_c_bigendian=no
14002 fi
14003 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14004 fi
14005 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14006 fi
14007 if test $ac_cv_c_bigendian = unknown; then
14008 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14010 /* end confdefs.h. */
14011 #include <limits.h>
14012
14013 int
14014 main ()
14015 {
14016 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14017 bogus endian macros
14018 #endif
14019
14020 ;
14021 return 0;
14022 }
14023 _ACEOF
14024 if ac_fn_c_try_compile "$LINENO"; then :
14025 # It does; now see whether it defined to _BIG_ENDIAN or not.
14026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14027 /* end confdefs.h. */
14028 #include <limits.h>
14029
14030 int
14031 main ()
14032 {
14033 #ifndef _BIG_ENDIAN
14034 not big endian
14035 #endif
14036
14037 ;
14038 return 0;
14039 }
14040 _ACEOF
14041 if ac_fn_c_try_compile "$LINENO"; then :
14042 ac_cv_c_bigendian=yes
14043 else
14044 ac_cv_c_bigendian=no
14045 fi
14046 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14047 fi
14048 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14049 fi
14050 if test $ac_cv_c_bigendian = unknown; then
14051 # Compile a test program.
14052 if test "$cross_compiling" = yes; then :
14053 # Try to guess by grepping values from an object file.
14054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14055 /* end confdefs.h. */
14056 short int ascii_mm[] =
14057 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14058 short int ascii_ii[] =
14059 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14060 int use_ascii (int i) {
14061 return ascii_mm[i] + ascii_ii[i];
14062 }
14063 short int ebcdic_ii[] =
14064 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14065 short int ebcdic_mm[] =
14066 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14067 int use_ebcdic (int i) {
14068 return ebcdic_mm[i] + ebcdic_ii[i];
14069 }
14070 extern int foo;
14071
14072 int
14073 main ()
14074 {
14075 return use_ascii (foo) == use_ebcdic (foo);
14076 ;
14077 return 0;
14078 }
14079 _ACEOF
14080 if ac_fn_c_try_compile "$LINENO"; then :
14081 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14082 ac_cv_c_bigendian=yes
14083 fi
14084 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14085 if test "$ac_cv_c_bigendian" = unknown; then
14086 ac_cv_c_bigendian=no
14087 else
14088 # finding both strings is unlikely to happen, but who knows?
14089 ac_cv_c_bigendian=unknown
14090 fi
14091 fi
14092 fi
14093 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14094 else
14095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14096 /* end confdefs.h. */
14097 $ac_includes_default
14098 int
14099 main ()
14100 {
14101
14102 /* Are we little or big endian? From Harbison&Steele. */
14103 union
14104 {
14105 long int l;
14106 char c[sizeof (long int)];
14107 } u;
14108 u.l = 1;
14109 return u.c[sizeof (long int) - 1] == 1;
14110
14111 ;
14112 return 0;
14113 }
14114 _ACEOF
14115 if ac_fn_c_try_run "$LINENO"; then :
14116 ac_cv_c_bigendian=no
14117 else
14118 ac_cv_c_bigendian=yes
14119 fi
14120 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14121 conftest.$ac_objext conftest.beam conftest.$ac_ext
14122 fi
14123
14124 fi
14125 fi
14126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14127 $as_echo "$ac_cv_c_bigendian" >&6; }
14128 case $ac_cv_c_bigendian in #(
14129 yes)
14130 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14131 ;; #(
14132 no)
14133 ;; #(
14134 universal)
14135
14136 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
14137
14138 ;; #(
14139 *)
14140 as_fn_error $? "unknown endianness
14141 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
14142 esac
14143
14144
14145
14146 GNULIB_LOCALECONV=0;
14147 GNULIB_SETLOCALE=0;
14148 GNULIB_SETLOCALE_NULL=0;
14149 GNULIB_DUPLOCALE=0;
14150 GNULIB_LOCALENAME=0;
14151 HAVE_NEWLOCALE=1;
14152 HAVE_DUPLOCALE=1;
14153 HAVE_FREELOCALE=1;
14154 REPLACE_LOCALECONV=0;
14155 REPLACE_SETLOCALE=0;
14156 REPLACE_NEWLOCALE=0;
14157 REPLACE_DUPLOCALE=0;
14158 REPLACE_FREELOCALE=0;
14159 REPLACE_STRUCT_LCONV=0;
14160
14161
14162 REPLACE_NULL=0;
14163 HAVE_MAX_ALIGN_T=1;
14164 HAVE_WCHAR_T=1;
14165
14166
14167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
14168 $as_echo_n "checking for wchar_t... " >&6; }
14169 if ${gt_cv_c_wchar_t+:} false; then :
14170 $as_echo_n "(cached) " >&6
14171 else
14172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14173 /* end confdefs.h. */
14174 #include <stddef.h>
14175 wchar_t foo = (wchar_t)'\0';
14176 int
14177 main ()
14178 {
14179
14180 ;
14181 return 0;
14182 }
14183 _ACEOF
14184 if ac_fn_c_try_compile "$LINENO"; then :
14185 gt_cv_c_wchar_t=yes
14186 else
14187 gt_cv_c_wchar_t=no
14188 fi
14189 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14190 fi
14191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
14192 $as_echo "$gt_cv_c_wchar_t" >&6; }
14193 if test $gt_cv_c_wchar_t = yes; then
14194
14195 $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
14196
14197 fi
14198
14199
14200
14201
14202
14203
14204
14205 STDDEF_H=
14206
14207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5
14208 $as_echo_n "checking for good max_align_t... " >&6; }
14209 if ${gl_cv_type_max_align_t+:} false; then :
14210 $as_echo_n "(cached) " >&6
14211 else
14212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14213 /* end confdefs.h. */
14214 #include <stddef.h>
14215 unsigned int s = sizeof (max_align_t);
14216 #if defined __GNUC__ || defined __clang__ || defined __IBM__ALIGNOF__
14217 int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
14218 int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1];
14219 #endif
14220 typedef struct { char a; max_align_t b; } max_helper;
14221 typedef struct { char a; long b; } long_helper;
14222 typedef struct { char a; double b; } double_helper;
14223 typedef struct { char a; long double b; } long_double_helper;
14224 int check3[2 * (offsetof (long_helper, b) <= offsetof (max_helper, b)) - 1];
14225 int check4[2 * (offsetof (double_helper, b) <= offsetof (max_helper, b)) - 1];
14226 int check5[2 * (offsetof (long_double_helper, b) <= offsetof (max_helper, b)) - 1];
14227
14228 int
14229 main ()
14230 {
14231
14232 ;
14233 return 0;
14234 }
14235 _ACEOF
14236 if ac_fn_c_try_compile "$LINENO"; then :
14237 gl_cv_type_max_align_t=yes
14238 else
14239 gl_cv_type_max_align_t=no
14240 fi
14241 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14242
14243 fi
14244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5
14245 $as_echo "$gl_cv_type_max_align_t" >&6; }
14246 if test $gl_cv_type_max_align_t = no; then
14247 HAVE_MAX_ALIGN_T=0
14248 STDDEF_H=stddef.h
14249 fi
14250
14251 if test $gt_cv_c_wchar_t = no; then
14252 HAVE_WCHAR_T=0
14253 STDDEF_H=stddef.h
14254 fi
14255
14256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
14257 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
14258 if ${gl_cv_decl_null_works+:} false; then :
14259 $as_echo_n "(cached) " >&6
14260 else
14261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14262 /* end confdefs.h. */
14263 #include <stddef.h>
14264 int test[2 * (sizeof NULL == sizeof (void *)) -1];
14265
14266 int
14267 main ()
14268 {
14269
14270 ;
14271 return 0;
14272 }
14273 _ACEOF
14274 if ac_fn_c_try_compile "$LINENO"; then :
14275 gl_cv_decl_null_works=yes
14276 else
14277 gl_cv_decl_null_works=no
14278 fi
14279 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14280 fi
14281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
14282 $as_echo "$gl_cv_decl_null_works" >&6; }
14283 if test $gl_cv_decl_null_works = no; then
14284 REPLACE_NULL=1
14285 STDDEF_H=stddef.h
14286 fi
14287
14288
14289 if test -n "$STDDEF_H"; then
14290 GL_GENERATE_STDDEF_H_TRUE=
14291 GL_GENERATE_STDDEF_H_FALSE='#'
14292 else
14293 GL_GENERATE_STDDEF_H_TRUE='#'
14294 GL_GENERATE_STDDEF_H_FALSE=
14295 fi
14296
14297 if test -n "$STDDEF_H"; then
14298
14299
14300
14301
14302
14303
14304
14305
14306 if test $gl_cv_have_include_next = yes; then
14307 gl_cv_next_stddef_h='<'stddef.h'>'
14308 else
14309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
14310 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
14311 if ${gl_cv_next_stddef_h+:} false; then :
14312 $as_echo_n "(cached) " >&6
14313 else
14314
14315
14316
14317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14318 /* end confdefs.h. */
14319 #include <stddef.h>
14320 _ACEOF
14321 case "$host_os" in
14322 aix*) gl_absname_cpp="$ac_cpp -C" ;;
14323 *) gl_absname_cpp="$ac_cpp" ;;
14324 esac
14325
14326 case "$host_os" in
14327 mingw*)
14328 gl_dirsep_regex='[/\\]'
14329 ;;
14330 *)
14331 gl_dirsep_regex='\/'
14332 ;;
14333 esac
14334 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
14335 gl_header_literal_regex=`echo 'stddef.h' \
14336 | sed -e "$gl_make_literal_regex_sed"`
14337 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14338 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14339 s|^/[^/]|//&|
14340 p
14341 q
14342 }'
14343
14344 gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14345 sed -n "$gl_absolute_header_sed"`
14346
14347 gl_header=$gl_cv_absolute_stddef_h
14348 gl_cv_next_stddef_h='"'$gl_header'"'
14349
14350
14351 fi
14352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
14353 $as_echo "$gl_cv_next_stddef_h" >&6; }
14354 fi
14355 NEXT_STDDEF_H=$gl_cv_next_stddef_h
14356
14357 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14358 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14359 gl_next_as_first_directive='<'stddef.h'>'
14360 else
14361 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14362 gl_next_as_first_directive=$gl_cv_next_stddef_h
14363 fi
14364 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
14365
14366
14367
14368
14369 fi
14370
14371
14372
14373
14374
14375
14376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5
14377 $as_echo_n "checking whether locale.h defines locale_t... " >&6; }
14378 if ${gl_cv_header_locale_has_locale_t+:} false; then :
14379 $as_echo_n "(cached) " >&6
14380 else
14381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14382 /* end confdefs.h. */
14383 #include <locale.h>
14384 locale_t x;
14385 int
14386 main ()
14387 {
14388
14389 ;
14390 return 0;
14391 }
14392 _ACEOF
14393 if ac_fn_c_try_compile "$LINENO"; then :
14394 gl_cv_header_locale_has_locale_t=yes
14395 else
14396 gl_cv_header_locale_has_locale_t=no
14397 fi
14398 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14399
14400 fi
14401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_has_locale_t" >&5
14402 $as_echo "$gl_cv_header_locale_has_locale_t" >&6; }
14403
14404
14405 if test $ac_cv_header_xlocale_h = yes; then
14406 HAVE_XLOCALE_H=1
14407 if test $gl_cv_header_locale_has_locale_t = yes; then
14408 gl_cv_header_locale_h_needs_xlocale_h=no
14409 else
14410 gl_cv_header_locale_h_needs_xlocale_h=yes
14411 fi
14412 HAVE_LOCALE_T=1
14413 else
14414 HAVE_XLOCALE_H=0
14415 gl_cv_header_locale_h_needs_xlocale_h=no
14416 if test $gl_cv_header_locale_has_locale_t = yes; then
14417 HAVE_LOCALE_T=1
14418 else
14419 HAVE_LOCALE_T=0
14420 fi
14421 fi
14422
14423
14424
14425
14426 gl_threads_api=none
14427 LIBTHREAD=
14428 LTLIBTHREAD=
14429 LIBMULTITHREAD=
14430 LTLIBMULTITHREAD=
14431 if test "$gl_use_threads" != no; then
14432
14433
14434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
14435 $as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
14436 if ${gl_cv_have_weak+:} false; then :
14437 $as_echo_n "(cached) " >&6
14438 else
14439 gl_cv_have_weak=no
14440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14441 /* end confdefs.h. */
14442 extern void xyzzy ();
14443 #pragma weak xyzzy
14444 int
14445 main ()
14446 {
14447 xyzzy();
14448 ;
14449 return 0;
14450 }
14451 _ACEOF
14452 if ac_fn_c_try_link "$LINENO"; then :
14453 gl_cv_have_weak=maybe
14454 fi
14455 rm -f core conftest.err conftest.$ac_objext \
14456 conftest$ac_exeext conftest.$ac_ext
14457 if test $gl_cv_have_weak = maybe; then
14458 if test "$cross_compiling" = yes; then :
14459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14460 /* end confdefs.h. */
14461 #ifdef __ELF__
14462 Extensible Linking Format
14463 #endif
14464
14465 _ACEOF
14466 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14467 $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
14468 gl_cv_have_weak="guessing yes"
14469 else
14470 gl_cv_have_weak="guessing no"
14471 fi
14472 rm -f conftest*
14473
14474
14475 else
14476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14477 /* end confdefs.h. */
14478
14479 #include <stdio.h>
14480 #pragma weak fputs
14481 int main ()
14482 {
14483 return (fputs == NULL);
14484 }
14485 _ACEOF
14486 if ac_fn_c_try_run "$LINENO"; then :
14487 gl_cv_have_weak=yes
14488 else
14489 gl_cv_have_weak=no
14490 fi
14491 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14492 conftest.$ac_objext conftest.beam conftest.$ac_ext
14493 fi
14494
14495 fi
14496 case " $LDFLAGS " in
14497 *" -static "*) gl_cv_have_weak=no ;;
14498 esac
14499 case "$gl_cv_have_weak" in
14500 *yes)
14501 case "$host_os" in
14502 freebsd* | dragonfly*)
14503 : > conftest1.c
14504 $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
14505 cat <<EOF > conftest2.c
14506 #include <pthread.h>
14507 #pragma weak pthread_mutexattr_gettype
14508 int main ()
14509 {
14510 return (pthread_mutexattr_gettype != NULL);
14511 }
14512 EOF
14513 $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
14514 || gl_cv_have_weak=no
14515 rm -f conftest1.c libempty.so conftest2.c conftest
14516 ;;
14517 esac
14518 ;;
14519 esac
14520
14521 fi
14522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
14523 $as_echo "$gl_cv_have_weak" >&6; }
14524 case "$gl_cv_have_weak" in
14525 *yes)
14526
14527 $as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
14528
14529 ;;
14530 esac
14531
14532 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
14533
14534 :
14535 fi
14536 if test "$gl_use_threads" = isoc || test "$gl_use_threads" = isoc+posix; then
14537
14538 gl_have_isoc_threads="$ac_cv_header_threads_h"
14539 fi
14540 if test "$gl_use_threads" = yes \
14541 || test "$gl_use_threads" = posix \
14542 || test "$gl_use_threads" = isoc+posix; then
14543
14544
14545 if test -z "$gl_pthreadlib_body_done"; then
14546 gl_pthread_api=no
14547 LIBPTHREAD=
14548 LIBPMULTITHREAD=
14549 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
14550 # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
14551 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
14552 if test "x$ac_cv_header_pthread_h" = xyes; then :
14553 gl_have_pthread_h=yes
14554 else
14555 gl_have_pthread_h=no
14556 fi
14557
14558
14559 if test "$gl_have_pthread_h" = yes; then
14560 # Other possible tests:
14561 # -lpthreads (FSU threads, PCthreads)
14562 # -lgthreads
14563 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
14564 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
14565 # the second one only in libpthread, and lock.c needs it.
14566 #
14567 # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
14568 # needs -pthread for some reason. See:
14569 # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
14570 save_LIBS=$LIBS
14571 for gl_pthread in '' '-pthread'; do
14572 LIBS="$LIBS $gl_pthread"
14573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14574 /* end confdefs.h. */
14575 #include <pthread.h>
14576 pthread_mutex_t m;
14577 pthread_mutexattr_t ma;
14578
14579 int
14580 main ()
14581 {
14582 pthread_mutex_lock (&m);
14583 pthread_mutexattr_init (&ma);
14584 ;
14585 return 0;
14586 }
14587 _ACEOF
14588 if ac_fn_c_try_link "$LINENO"; then :
14589 gl_pthread_api=yes
14590 LIBPTHREAD=$gl_pthread
14591 LIBPMULTITHREAD=$gl_pthread
14592 fi
14593 rm -f core conftest.err conftest.$ac_objext \
14594 conftest$ac_exeext conftest.$ac_ext
14595 LIBS=$save_LIBS
14596 test $gl_pthread_api = yes && break
14597 done
14598
14599 # Test for libpthread by looking for pthread_kill. (Not pthread_self,
14600 # since it is defined as a macro on OSF/1.)
14601 if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
14602 # The program links fine without libpthread. But it may actually
14603 # need to link with libpthread in order to create multiple threads.
14604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
14605 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
14606 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
14607 $as_echo_n "(cached) " >&6
14608 else
14609 ac_check_lib_save_LIBS=$LIBS
14610 LIBS="-lpthread $LIBS"
14611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14612 /* end confdefs.h. */
14613
14614 /* Override any GCC internal prototype to avoid an error.
14615 Use char because int might match the return type of a GCC
14616 builtin and then its argument prototype would still apply. */
14617 #ifdef __cplusplus
14618 extern "C"
14619 #endif
14620 char pthread_kill ();
14621 int
14622 main ()
14623 {
14624 return pthread_kill ();
14625 ;
14626 return 0;
14627 }
14628 _ACEOF
14629 if ac_fn_c_try_link "$LINENO"; then :
14630 ac_cv_lib_pthread_pthread_kill=yes
14631 else
14632 ac_cv_lib_pthread_pthread_kill=no
14633 fi
14634 rm -f core conftest.err conftest.$ac_objext \
14635 conftest$ac_exeext conftest.$ac_ext
14636 LIBS=$ac_check_lib_save_LIBS
14637 fi
14638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
14639 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
14640 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
14641 LIBPMULTITHREAD=-lpthread
14642 # On Solaris and HP-UX, most pthread functions exist also in libc.
14643 # Therefore pthread_in_use() needs to actually try to create a
14644 # thread: pthread_create from libc will fail, whereas
14645 # pthread_create will actually create a thread.
14646 # On Solaris 10 or newer, this test is no longer needed, because
14647 # libc contains the fully functional pthread functions.
14648 case "$host_os" in
14649 solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
14650
14651 $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
14652
14653 esac
14654
14655 fi
14656
14657 elif test $gl_pthread_api != yes; then
14658 # Some library is needed. Try libpthread and libc_r.
14659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
14660 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
14661 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
14662 $as_echo_n "(cached) " >&6
14663 else
14664 ac_check_lib_save_LIBS=$LIBS
14665 LIBS="-lpthread $LIBS"
14666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14667 /* end confdefs.h. */
14668
14669 /* Override any GCC internal prototype to avoid an error.
14670 Use char because int might match the return type of a GCC
14671 builtin and then its argument prototype would still apply. */
14672 #ifdef __cplusplus
14673 extern "C"
14674 #endif
14675 char pthread_kill ();
14676 int
14677 main ()
14678 {
14679 return pthread_kill ();
14680 ;
14681 return 0;
14682 }
14683 _ACEOF
14684 if ac_fn_c_try_link "$LINENO"; then :
14685 ac_cv_lib_pthread_pthread_kill=yes
14686 else
14687 ac_cv_lib_pthread_pthread_kill=no
14688 fi
14689 rm -f core conftest.err conftest.$ac_objext \
14690 conftest$ac_exeext conftest.$ac_ext
14691 LIBS=$ac_check_lib_save_LIBS
14692 fi
14693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
14694 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
14695 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
14696 gl_pthread_api=yes
14697 LIBPTHREAD=-lpthread
14698 LIBPMULTITHREAD=-lpthread
14699 fi
14700
14701 if test $gl_pthread_api != yes; then
14702 # For FreeBSD 4.
14703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
14704 $as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
14705 if ${ac_cv_lib_c_r_pthread_kill+:} false; then :
14706 $as_echo_n "(cached) " >&6
14707 else
14708 ac_check_lib_save_LIBS=$LIBS
14709 LIBS="-lc_r $LIBS"
14710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14711 /* end confdefs.h. */
14712
14713 /* Override any GCC internal prototype to avoid an error.
14714 Use char because int might match the return type of a GCC
14715 builtin and then its argument prototype would still apply. */
14716 #ifdef __cplusplus
14717 extern "C"
14718 #endif
14719 char pthread_kill ();
14720 int
14721 main ()
14722 {
14723 return pthread_kill ();
14724 ;
14725 return 0;
14726 }
14727 _ACEOF
14728 if ac_fn_c_try_link "$LINENO"; then :
14729 ac_cv_lib_c_r_pthread_kill=yes
14730 else
14731 ac_cv_lib_c_r_pthread_kill=no
14732 fi
14733 rm -f core conftest.err conftest.$ac_objext \
14734 conftest$ac_exeext conftest.$ac_ext
14735 LIBS=$ac_check_lib_save_LIBS
14736 fi
14737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
14738 $as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
14739 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then :
14740 gl_pthread_api=yes
14741 LIBPTHREAD=-lc_r
14742 LIBPMULTITHREAD=-lc_r
14743 fi
14744
14745 fi
14746 fi
14747 fi
14748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
14749 $as_echo_n "checking whether POSIX threads API is available... " >&6; }
14750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
14751 $as_echo "$gl_pthread_api" >&6; }
14752
14753
14754 if test $gl_pthread_api = yes; then
14755
14756 $as_echo "#define HAVE_PTHREAD_API 1" >>confdefs.h
14757
14758 fi
14759
14760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14761 /* end confdefs.h. */
14762 #include <sched.h>
14763 int
14764 main ()
14765 {
14766 sched_yield ();
14767 ;
14768 return 0;
14769 }
14770 _ACEOF
14771 if ac_fn_c_try_link "$LINENO"; then :
14772 LIB_SCHED_YIELD=
14773
14774 else
14775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
14776 $as_echo_n "checking for sched_yield in -lrt... " >&6; }
14777 if ${ac_cv_lib_rt_sched_yield+:} false; then :
14778 $as_echo_n "(cached) " >&6
14779 else
14780 ac_check_lib_save_LIBS=$LIBS
14781 LIBS="-lrt $LIBS"
14782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14783 /* end confdefs.h. */
14784
14785 /* Override any GCC internal prototype to avoid an error.
14786 Use char because int might match the return type of a GCC
14787 builtin and then its argument prototype would still apply. */
14788 #ifdef __cplusplus
14789 extern "C"
14790 #endif
14791 char sched_yield ();
14792 int
14793 main ()
14794 {
14795 return sched_yield ();
14796 ;
14797 return 0;
14798 }
14799 _ACEOF
14800 if ac_fn_c_try_link "$LINENO"; then :
14801 ac_cv_lib_rt_sched_yield=yes
14802 else
14803 ac_cv_lib_rt_sched_yield=no
14804 fi
14805 rm -f core conftest.err conftest.$ac_objext \
14806 conftest$ac_exeext conftest.$ac_ext
14807 LIBS=$ac_check_lib_save_LIBS
14808 fi
14809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
14810 $as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
14811 if test "x$ac_cv_lib_rt_sched_yield" = xyes; then :
14812 LIB_SCHED_YIELD=-lrt
14813 else
14814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
14815 $as_echo_n "checking for sched_yield in -lposix4... " >&6; }
14816 if ${ac_cv_lib_posix4_sched_yield+:} false; then :
14817 $as_echo_n "(cached) " >&6
14818 else
14819 ac_check_lib_save_LIBS=$LIBS
14820 LIBS="-lposix4 $LIBS"
14821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14822 /* end confdefs.h. */
14823
14824 /* Override any GCC internal prototype to avoid an error.
14825 Use char because int might match the return type of a GCC
14826 builtin and then its argument prototype would still apply. */
14827 #ifdef __cplusplus
14828 extern "C"
14829 #endif
14830 char sched_yield ();
14831 int
14832 main ()
14833 {
14834 return sched_yield ();
14835 ;
14836 return 0;
14837 }
14838 _ACEOF
14839 if ac_fn_c_try_link "$LINENO"; then :
14840 ac_cv_lib_posix4_sched_yield=yes
14841 else
14842 ac_cv_lib_posix4_sched_yield=no
14843 fi
14844 rm -f core conftest.err conftest.$ac_objext \
14845 conftest$ac_exeext conftest.$ac_ext
14846 LIBS=$ac_check_lib_save_LIBS
14847 fi
14848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
14849 $as_echo "$ac_cv_lib_posix4_sched_yield" >&6; }
14850 if test "x$ac_cv_lib_posix4_sched_yield" = xyes; then :
14851 LIB_SCHED_YIELD=-lposix4
14852 fi
14853
14854 fi
14855
14856
14857 fi
14858 rm -f core conftest.err conftest.$ac_objext \
14859 conftest$ac_exeext conftest.$ac_ext
14860
14861
14862 gl_pthreadlib_body_done=done
14863 fi
14864
14865 LIBTHREAD=$LIBPTHREAD LTLIBTHREAD=$LIBPTHREAD
14866 LIBMULTITHREAD=$LIBPMULTITHREAD LTLIBMULTITHREAD=$LIBPMULTITHREAD
14867 if test $gl_pthread_api = yes; then
14868 if test "$gl_use_threads" = isoc+posix && test "$gl_have_isoc_threads" = yes; then
14869 gl_threads_api='isoc+posix'
14870
14871 $as_echo "#define USE_ISOC_AND_POSIX_THREADS 1" >>confdefs.h
14872
14873 LIBTHREAD= LTLIBTHREAD=
14874 else
14875 gl_threads_api=posix
14876
14877 $as_echo "#define USE_POSIX_THREADS 1" >>confdefs.h
14878
14879 if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
14880 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
14881
14882 $as_echo "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h
14883
14884 LIBTHREAD= LTLIBTHREAD=
14885 else
14886 case "$host_os" in
14887 freebsd* | dragonfly*)
14888 if test "x$LIBTHREAD" != "x$LIBMULTITHREAD"; then
14889
14890 $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
14891
14892 fi
14893 ;;
14894 esac
14895 fi
14896 fi
14897 fi
14898 fi
14899 fi
14900 if test $gl_threads_api = none; then
14901 if test "$gl_use_threads" = isoc && test "$gl_have_isoc_threads" = yes; then
14902
14903
14904
14905 if test -z "$gl_stdthreadlib_body_done"; then
14906
14907
14908 case "$host_os" in
14909 mingw*)
14910 LIBSTDTHREAD=
14911 ;;
14912 *)
14913
14914
14915 if test -z "$gl_pthreadlib_body_done"; then
14916 gl_pthread_api=no
14917 LIBPTHREAD=
14918 LIBPMULTITHREAD=
14919 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
14920 # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
14921 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
14922 if test "x$ac_cv_header_pthread_h" = xyes; then :
14923 gl_have_pthread_h=yes
14924 else
14925 gl_have_pthread_h=no
14926 fi
14927
14928
14929 if test "$gl_have_pthread_h" = yes; then
14930 # Other possible tests:
14931 # -lpthreads (FSU threads, PCthreads)
14932 # -lgthreads
14933 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
14934 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
14935 # the second one only in libpthread, and lock.c needs it.
14936 #
14937 # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
14938 # needs -pthread for some reason. See:
14939 # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
14940 save_LIBS=$LIBS
14941 for gl_pthread in '' '-pthread'; do
14942 LIBS="$LIBS $gl_pthread"
14943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14944 /* end confdefs.h. */
14945 #include <pthread.h>
14946 pthread_mutex_t m;
14947 pthread_mutexattr_t ma;
14948
14949 int
14950 main ()
14951 {
14952 pthread_mutex_lock (&m);
14953 pthread_mutexattr_init (&ma);
14954 ;
14955 return 0;
14956 }
14957 _ACEOF
14958 if ac_fn_c_try_link "$LINENO"; then :
14959 gl_pthread_api=yes
14960 LIBPTHREAD=$gl_pthread
14961 LIBPMULTITHREAD=$gl_pthread
14962 fi
14963 rm -f core conftest.err conftest.$ac_objext \
14964 conftest$ac_exeext conftest.$ac_ext
14965 LIBS=$save_LIBS
14966 test $gl_pthread_api = yes && break
14967 done
14968
14969 # Test for libpthread by looking for pthread_kill. (Not pthread_self,
14970 # since it is defined as a macro on OSF/1.)
14971 if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
14972 # The program links fine without libpthread. But it may actually
14973 # need to link with libpthread in order to create multiple threads.
14974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
14975 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
14976 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
14977 $as_echo_n "(cached) " >&6
14978 else
14979 ac_check_lib_save_LIBS=$LIBS
14980 LIBS="-lpthread $LIBS"
14981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14982 /* end confdefs.h. */
14983
14984 /* Override any GCC internal prototype to avoid an error.
14985 Use char because int might match the return type of a GCC
14986 builtin and then its argument prototype would still apply. */
14987 #ifdef __cplusplus
14988 extern "C"
14989 #endif
14990 char pthread_kill ();
14991 int
14992 main ()
14993 {
14994 return pthread_kill ();
14995 ;
14996 return 0;
14997 }
14998 _ACEOF
14999 if ac_fn_c_try_link "$LINENO"; then :
15000 ac_cv_lib_pthread_pthread_kill=yes
15001 else
15002 ac_cv_lib_pthread_pthread_kill=no
15003 fi
15004 rm -f core conftest.err conftest.$ac_objext \
15005 conftest$ac_exeext conftest.$ac_ext
15006 LIBS=$ac_check_lib_save_LIBS
15007 fi
15008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
15009 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
15010 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
15011 LIBPMULTITHREAD=-lpthread
15012 # On Solaris and HP-UX, most pthread functions exist also in libc.
15013 # Therefore pthread_in_use() needs to actually try to create a
15014 # thread: pthread_create from libc will fail, whereas
15015 # pthread_create will actually create a thread.
15016 # On Solaris 10 or newer, this test is no longer needed, because
15017 # libc contains the fully functional pthread functions.
15018 case "$host_os" in
15019 solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
15020
15021 $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
15022
15023 esac
15024
15025 fi
15026
15027 elif test $gl_pthread_api != yes; then
15028 # Some library is needed. Try libpthread and libc_r.
15029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
15030 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
15031 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
15032 $as_echo_n "(cached) " >&6
15033 else
15034 ac_check_lib_save_LIBS=$LIBS
15035 LIBS="-lpthread $LIBS"
15036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15037 /* end confdefs.h. */
15038
15039 /* Override any GCC internal prototype to avoid an error.
15040 Use char because int might match the return type of a GCC
15041 builtin and then its argument prototype would still apply. */
15042 #ifdef __cplusplus
15043 extern "C"
15044 #endif
15045 char pthread_kill ();
15046 int
15047 main ()
15048 {
15049 return pthread_kill ();
15050 ;
15051 return 0;
15052 }
15053 _ACEOF
15054 if ac_fn_c_try_link "$LINENO"; then :
15055 ac_cv_lib_pthread_pthread_kill=yes
15056 else
15057 ac_cv_lib_pthread_pthread_kill=no
15058 fi
15059 rm -f core conftest.err conftest.$ac_objext \
15060 conftest$ac_exeext conftest.$ac_ext
15061 LIBS=$ac_check_lib_save_LIBS
15062 fi
15063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
15064 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
15065 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
15066 gl_pthread_api=yes
15067 LIBPTHREAD=-lpthread
15068 LIBPMULTITHREAD=-lpthread
15069 fi
15070
15071 if test $gl_pthread_api != yes; then
15072 # For FreeBSD 4.
15073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
15074 $as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
15075 if ${ac_cv_lib_c_r_pthread_kill+:} false; then :
15076 $as_echo_n "(cached) " >&6
15077 else
15078 ac_check_lib_save_LIBS=$LIBS
15079 LIBS="-lc_r $LIBS"
15080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15081 /* end confdefs.h. */
15082
15083 /* Override any GCC internal prototype to avoid an error.
15084 Use char because int might match the return type of a GCC
15085 builtin and then its argument prototype would still apply. */
15086 #ifdef __cplusplus
15087 extern "C"
15088 #endif
15089 char pthread_kill ();
15090 int
15091 main ()
15092 {
15093 return pthread_kill ();
15094 ;
15095 return 0;
15096 }
15097 _ACEOF
15098 if ac_fn_c_try_link "$LINENO"; then :
15099 ac_cv_lib_c_r_pthread_kill=yes
15100 else
15101 ac_cv_lib_c_r_pthread_kill=no
15102 fi
15103 rm -f core conftest.err conftest.$ac_objext \
15104 conftest$ac_exeext conftest.$ac_ext
15105 LIBS=$ac_check_lib_save_LIBS
15106 fi
15107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
15108 $as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
15109 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then :
15110 gl_pthread_api=yes
15111 LIBPTHREAD=-lc_r
15112 LIBPMULTITHREAD=-lc_r
15113 fi
15114
15115 fi
15116 fi
15117 fi
15118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
15119 $as_echo_n "checking whether POSIX threads API is available... " >&6; }
15120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
15121 $as_echo "$gl_pthread_api" >&6; }
15122
15123
15124 if test $gl_pthread_api = yes; then
15125
15126 $as_echo "#define HAVE_PTHREAD_API 1" >>confdefs.h
15127
15128 fi
15129
15130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15131 /* end confdefs.h. */
15132 #include <sched.h>
15133 int
15134 main ()
15135 {
15136 sched_yield ();
15137 ;
15138 return 0;
15139 }
15140 _ACEOF
15141 if ac_fn_c_try_link "$LINENO"; then :
15142 LIB_SCHED_YIELD=
15143
15144 else
15145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
15146 $as_echo_n "checking for sched_yield in -lrt... " >&6; }
15147 if ${ac_cv_lib_rt_sched_yield+:} false; then :
15148 $as_echo_n "(cached) " >&6
15149 else
15150 ac_check_lib_save_LIBS=$LIBS
15151 LIBS="-lrt $LIBS"
15152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15153 /* end confdefs.h. */
15154
15155 /* Override any GCC internal prototype to avoid an error.
15156 Use char because int might match the return type of a GCC
15157 builtin and then its argument prototype would still apply. */
15158 #ifdef __cplusplus
15159 extern "C"
15160 #endif
15161 char sched_yield ();
15162 int
15163 main ()
15164 {
15165 return sched_yield ();
15166 ;
15167 return 0;
15168 }
15169 _ACEOF
15170 if ac_fn_c_try_link "$LINENO"; then :
15171 ac_cv_lib_rt_sched_yield=yes
15172 else
15173 ac_cv_lib_rt_sched_yield=no
15174 fi
15175 rm -f core conftest.err conftest.$ac_objext \
15176 conftest$ac_exeext conftest.$ac_ext
15177 LIBS=$ac_check_lib_save_LIBS
15178 fi
15179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
15180 $as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
15181 if test "x$ac_cv_lib_rt_sched_yield" = xyes; then :
15182 LIB_SCHED_YIELD=-lrt
15183 else
15184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
15185 $as_echo_n "checking for sched_yield in -lposix4... " >&6; }
15186 if ${ac_cv_lib_posix4_sched_yield+:} false; then :
15187 $as_echo_n "(cached) " >&6
15188 else
15189 ac_check_lib_save_LIBS=$LIBS
15190 LIBS="-lposix4 $LIBS"
15191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15192 /* end confdefs.h. */
15193
15194 /* Override any GCC internal prototype to avoid an error.
15195 Use char because int might match the return type of a GCC
15196 builtin and then its argument prototype would still apply. */
15197 #ifdef __cplusplus
15198 extern "C"
15199 #endif
15200 char sched_yield ();
15201 int
15202 main ()
15203 {
15204 return sched_yield ();
15205 ;
15206 return 0;
15207 }
15208 _ACEOF
15209 if ac_fn_c_try_link "$LINENO"; then :
15210 ac_cv_lib_posix4_sched_yield=yes
15211 else
15212 ac_cv_lib_posix4_sched_yield=no
15213 fi
15214 rm -f core conftest.err conftest.$ac_objext \
15215 conftest$ac_exeext conftest.$ac_ext
15216 LIBS=$ac_check_lib_save_LIBS
15217 fi
15218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
15219 $as_echo "$ac_cv_lib_posix4_sched_yield" >&6; }
15220 if test "x$ac_cv_lib_posix4_sched_yield" = xyes; then :
15221 LIB_SCHED_YIELD=-lposix4
15222 fi
15223
15224 fi
15225
15226
15227 fi
15228 rm -f core conftest.err conftest.$ac_objext \
15229 conftest$ac_exeext conftest.$ac_ext
15230
15231
15232 gl_pthreadlib_body_done=done
15233 fi
15234
15235 if test $ac_cv_header_threads_h = yes; then
15236 for ac_func in thrd_create
15237 do :
15238 ac_fn_c_check_func "$LINENO" "thrd_create" "ac_cv_func_thrd_create"
15239 if test "x$ac_cv_func_thrd_create" = xyes; then :
15240 cat >>confdefs.h <<_ACEOF
15241 #define HAVE_THRD_CREATE 1
15242 _ACEOF
15243
15244 fi
15245 done
15246
15247 if test $ac_cv_func_thrd_create = yes; then
15248 LIBSTDTHREAD=
15249 else
15250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thrd_create in -lstdthreads" >&5
15251 $as_echo_n "checking for thrd_create in -lstdthreads... " >&6; }
15252 if ${ac_cv_lib_stdthreads_thrd_create+:} false; then :
15253 $as_echo_n "(cached) " >&6
15254 else
15255 ac_check_lib_save_LIBS=$LIBS
15256 LIBS="-lstdthreads $LIBS"
15257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15258 /* end confdefs.h. */
15259
15260 /* Override any GCC internal prototype to avoid an error.
15261 Use char because int might match the return type of a GCC
15262 builtin and then its argument prototype would still apply. */
15263 #ifdef __cplusplus
15264 extern "C"
15265 #endif
15266 char thrd_create ();
15267 int
15268 main ()
15269 {
15270 return thrd_create ();
15271 ;
15272 return 0;
15273 }
15274 _ACEOF
15275 if ac_fn_c_try_link "$LINENO"; then :
15276 ac_cv_lib_stdthreads_thrd_create=yes
15277 else
15278 ac_cv_lib_stdthreads_thrd_create=no
15279 fi
15280 rm -f core conftest.err conftest.$ac_objext \
15281 conftest$ac_exeext conftest.$ac_ext
15282 LIBS=$ac_check_lib_save_LIBS
15283 fi
15284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_stdthreads_thrd_create" >&5
15285 $as_echo "$ac_cv_lib_stdthreads_thrd_create" >&6; }
15286 if test "x$ac_cv_lib_stdthreads_thrd_create" = xyes; then :
15287
15288 LIBSTDTHREAD='-lstdthreads -lpthread'
15289
15290 else
15291
15292 LIBSTDTHREAD="$LIBPMULTITHREAD"
15293
15294 fi
15295
15296 fi
15297 else
15298 LIBSTDTHREAD="$LIBPMULTITHREAD $LIB_SCHED_YIELD"
15299 fi
15300 ;;
15301 esac
15302
15303
15304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ISO C threads API is available" >&5
15305 $as_echo_n "checking whether ISO C threads API is available... " >&6; }
15306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_threads_h" >&5
15307 $as_echo "$ac_cv_header_threads_h" >&6; }
15308 gl_stdthreadlib_body_done=done
15309 fi
15310
15311 LIBTHREAD=$LIBSTDTHREAD LTLIBTHREAD=$LIBSTDTHREAD
15312 LIBMULTITHREAD=$LIBSTDTHREAD LTLIBMULTITHREAD=$LIBSTDTHREAD
15313 gl_threads_api=isoc
15314
15315 $as_echo "#define USE_ISOC_THREADS 1" >>confdefs.h
15316
15317 fi
15318 fi
15319 if test $gl_threads_api = none; then
15320 case "$gl_use_threads" in
15321 yes | windows | win32) # The 'win32' is for backward compatibility.
15322 if { case "$host_os" in
15323 mingw*) true;;
15324 *) false;;
15325 esac
15326 }; then
15327 gl_threads_api=windows
15328
15329 $as_echo "#define USE_WINDOWS_THREADS 1" >>confdefs.h
15330
15331 fi
15332 ;;
15333 esac
15334 fi
15335 fi
15336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5
15337 $as_echo_n "checking for multithread API to use... " >&6; }
15338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5
15339 $as_echo "$gl_threads_api" >&6; }
15340
15341
15342
15343
15344
15345
15346
15347
15348
15349
15350
15351
15352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
15353 $as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
15354 if ${gl_cv_func_malloc_posix+:} false; then :
15355 $as_echo_n "(cached) " >&6
15356 else
15357
15358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15359 /* end confdefs.h. */
15360
15361 int
15362 main ()
15363 {
15364 #if defined _WIN32 && ! defined __CYGWIN__
15365 choke me
15366 #endif
15367
15368 ;
15369 return 0;
15370 }
15371 _ACEOF
15372 if ac_fn_c_try_compile "$LINENO"; then :
15373 gl_cv_func_malloc_posix=yes
15374 else
15375 gl_cv_func_malloc_posix=no
15376 fi
15377 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15378
15379 fi
15380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
15381 $as_echo "$gl_cv_func_malloc_posix" >&6; }
15382
15383
15384
15385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
15386 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
15387 if ${ac_cv_func_malloc_0_nonnull+:} false; then :
15388 $as_echo_n "(cached) " >&6
15389 else
15390 if test "$cross_compiling" = yes; then :
15391 case "$host_os" in
15392 # Guess yes on platforms where we know the result.
15393 *-gnu* | gnu* | *-musl* | freebsd* | netbsd* | openbsd* \
15394 | hpux* | solaris* | cygwin* | mingw*)
15395 ac_cv_func_malloc_0_nonnull="guessing yes" ;;
15396 # If we don't know, obey --enable-cross-guesses.
15397 *) ac_cv_func_malloc_0_nonnull="$gl_cross_guess_normal" ;;
15398 esac
15399
15400 else
15401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15402 /* end confdefs.h. */
15403 #include <stdlib.h>
15404
15405 int
15406 main ()
15407 {
15408 char *p = malloc (0);
15409 int result = !p;
15410 free (p);
15411 return result;
15412 ;
15413 return 0;
15414 }
15415
15416 _ACEOF
15417 if ac_fn_c_try_run "$LINENO"; then :
15418 ac_cv_func_malloc_0_nonnull=yes
15419 else
15420 ac_cv_func_malloc_0_nonnull=no
15421 fi
15422 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15423 conftest.$ac_objext conftest.beam conftest.$ac_ext
15424 fi
15425
15426
15427 fi
15428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
15429 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
15430 case "$ac_cv_func_malloc_0_nonnull" in
15431 *yes)
15432 gl_cv_func_malloc_0_nonnull=1
15433 ;;
15434 *)
15435 gl_cv_func_malloc_0_nonnull=0
15436 ;;
15437 esac
15438
15439
15440 cat >>confdefs.h <<_ACEOF
15441 #define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
15442 _ACEOF
15443
15444
15445
15446
15447
15448
15449
15450
15451
15452
15453
15454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
15455 $as_echo_n "checking for a traditional japanese locale... " >&6; }
15456 if ${gt_cv_locale_ja+:} false; then :
15457 $as_echo_n "(cached) " >&6
15458 else
15459
15460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15461 /* end confdefs.h. */
15462
15463 #include <locale.h>
15464 #include <time.h>
15465 #if HAVE_LANGINFO_CODESET
15466 # include <langinfo.h>
15467 #endif
15468 #include <stdlib.h>
15469 #include <string.h>
15470 struct tm t;
15471 char buf[16];
15472 int main ()
15473 {
15474 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
15475 imitates locale dependent behaviour by looking at the environment
15476 variables, and all locales use the UTF-8 encoding. */
15477 #if defined __BEOS__ || defined __HAIKU__
15478 return 1;
15479 #else
15480 /* Check whether the given locale name is recognized by the system. */
15481 # if defined _WIN32 && !defined __CYGWIN__
15482 /* On native Windows, setlocale(category, "") looks at the system settings,
15483 not at the environment variables. Also, when an encoding suffix such
15484 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
15485 category of the locale to "C". */
15486 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
15487 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
15488 return 1;
15489 # else
15490 if (setlocale (LC_ALL, "") == NULL) return 1;
15491 # endif
15492 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
15493 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
15494 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
15495 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
15496 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
15497 some unit tests fail.
15498 On MirBSD 10, when an unsupported locale is specified, setlocale()
15499 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
15500 # if HAVE_LANGINFO_CODESET
15501 {
15502 const char *cs = nl_langinfo (CODESET);
15503 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
15504 || strcmp (cs, "UTF-8") == 0)
15505 return 1;
15506 }
15507 # endif
15508 # ifdef __CYGWIN__
15509 /* On Cygwin, avoid locale names without encoding suffix, because the
15510 locale_charset() function relies on the encoding suffix. Note that
15511 LC_ALL is set on the command line. */
15512 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
15513 # endif
15514 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
15515 on Cygwin 1.5.x. */
15516 if (MB_CUR_MAX == 1)
15517 return 1;
15518 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
15519 This excludes the UTF-8 encoding (except on MirBSD). */
15520 {
15521 const char *p;
15522 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
15523 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
15524 for (p = buf; *p != '\0'; p++)
15525 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
15526 return 1;
15527 }
15528 return 0;
15529 #endif
15530 }
15531
15532 _ACEOF
15533 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
15534 (eval $ac_link) 2>&5
15535 ac_status=$?
15536 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15537 test $ac_status = 0; } && test -s conftest$ac_exeext; then
15538 case "$host_os" in
15539 # Handle native Windows specially, because there setlocale() interprets
15540 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
15541 # "fr" or "fra" as "French" or "French_France.1252",
15542 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
15543 # "ja" as "Japanese" or "Japanese_Japan.932",
15544 # and similar.
15545 mingw*)
15546 # Note that on native Windows, the Japanese locale is
15547 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
15548 # cannot use it here.
15549 gt_cv_locale_ja=none
15550 ;;
15551 *)
15552 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
15553 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
15554 # configure script would override the LC_ALL setting. Likewise for
15555 # LC_CTYPE, which is also set at the beginning of the configure script.
15556 # Test for the AIX locale name.
15557 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15558 gt_cv_locale_ja=ja_JP
15559 else
15560 # Test for the locale name with explicit encoding suffix.
15561 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15562 gt_cv_locale_ja=ja_JP.EUC-JP
15563 else
15564 # Test for the HP-UX, OSF/1, NetBSD locale name.
15565 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15566 gt_cv_locale_ja=ja_JP.eucJP
15567 else
15568 # Test for the IRIX, FreeBSD locale name.
15569 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15570 gt_cv_locale_ja=ja_JP.EUC
15571 else
15572 # Test for the Solaris 7 locale name.
15573 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15574 gt_cv_locale_ja=ja
15575 else
15576 # Special test for NetBSD 1.6.
15577 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
15578 gt_cv_locale_ja=ja_JP.eucJP
15579 else
15580 # None found.
15581 gt_cv_locale_ja=none
15582 fi
15583 fi
15584 fi
15585 fi
15586 fi
15587 fi
15588 ;;
15589 esac
15590 fi
15591 rm -fr conftest*
15592
15593 fi
15594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
15595 $as_echo "$gt_cv_locale_ja" >&6; }
15596 LOCALE_JA=$gt_cv_locale_ja
15597
15598
15599
15600
15601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
15602 $as_echo_n "checking for a french Unicode locale... " >&6; }
15603 if ${gt_cv_locale_fr_utf8+:} false; then :
15604 $as_echo_n "(cached) " >&6
15605 else
15606
15607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15608 /* end confdefs.h. */
15609
15610 #include <locale.h>
15611 #include <time.h>
15612 #if HAVE_LANGINFO_CODESET
15613 # include <langinfo.h>
15614 #endif
15615 #include <stdlib.h>
15616 #include <string.h>
15617 struct tm t;
15618 char buf[16];
15619 int main () {
15620 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
15621 imitates locale dependent behaviour by looking at the environment
15622 variables, and all locales use the UTF-8 encoding. */
15623 #if !(defined __BEOS__ || defined __HAIKU__)
15624 /* Check whether the given locale name is recognized by the system. */
15625 # if defined _WIN32 && !defined __CYGWIN__
15626 /* On native Windows, setlocale(category, "") looks at the system settings,
15627 not at the environment variables. Also, when an encoding suffix such
15628 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
15629 category of the locale to "C". */
15630 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
15631 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
15632 return 1;
15633 # else
15634 if (setlocale (LC_ALL, "") == NULL) return 1;
15635 # endif
15636 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
15637 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
15638 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
15639 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
15640 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
15641 some unit tests fail. */
15642 # if HAVE_LANGINFO_CODESET
15643 {
15644 const char *cs = nl_langinfo (CODESET);
15645 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
15646 return 1;
15647 }
15648 # endif
15649 # ifdef __CYGWIN__
15650 /* On Cygwin, avoid locale names without encoding suffix, because the
15651 locale_charset() function relies on the encoding suffix. Note that
15652 LC_ALL is set on the command line. */
15653 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
15654 # endif
15655 /* Check whether in the abbreviation of the second month, the second
15656 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
15657 two bytes long, with UTF-8 encoding. */
15658 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
15659 if (strftime (buf, sizeof (buf), "%b", &t) < 4
15660 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
15661 return 1;
15662 #endif
15663 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
15664 /* Check whether the decimal separator is a comma.
15665 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
15666 are nl_langinfo(RADIXCHAR) are both ".". */
15667 if (localeconv () ->decimal_point[0] != ',') return 1;
15668 #endif
15669 return 0;
15670 }
15671
15672 _ACEOF
15673 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
15674 (eval $ac_link) 2>&5
15675 ac_status=$?
15676 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15677 test $ac_status = 0; } && test -s conftest$ac_exeext; then
15678 case "$host_os" in
15679 # Handle native Windows specially, because there setlocale() interprets
15680 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
15681 # "fr" or "fra" as "French" or "French_France.1252",
15682 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
15683 # "ja" as "Japanese" or "Japanese_Japan.932",
15684 # and similar.
15685 mingw*)
15686 # Test for the hypothetical native Windows locale name.
15687 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15688 gt_cv_locale_fr_utf8=French_France.65001
15689 else
15690 # None found.
15691 gt_cv_locale_fr_utf8=none
15692 fi
15693 ;;
15694 *)
15695 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
15696 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
15697 # configure script would override the LC_ALL setting. Likewise for
15698 # LC_CTYPE, which is also set at the beginning of the configure script.
15699 # Test for the usual locale name.
15700 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15701 gt_cv_locale_fr_utf8=fr_FR
15702 else
15703 # Test for the locale name with explicit encoding suffix.
15704 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15705 gt_cv_locale_fr_utf8=fr_FR.UTF-8
15706 else
15707 # Test for the Solaris 7 locale name.
15708 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15709 gt_cv_locale_fr_utf8=fr.UTF-8
15710 else
15711 # None found.
15712 gt_cv_locale_fr_utf8=none
15713 fi
15714 fi
15715 fi
15716 ;;
15717 esac
15718 fi
15719 rm -fr conftest*
15720
15721 fi
15722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
15723 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
15724 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
15725
15726
15727
15728
15729
15730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
15731 $as_echo_n "checking for a transitional chinese locale... " >&6; }
15732 if ${gt_cv_locale_zh_CN+:} false; then :
15733 $as_echo_n "(cached) " >&6
15734 else
15735
15736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15737 /* end confdefs.h. */
15738
15739 #include <locale.h>
15740 #include <stdlib.h>
15741 #include <time.h>
15742 #if HAVE_LANGINFO_CODESET
15743 # include <langinfo.h>
15744 #endif
15745 #include <stdlib.h>
15746 #include <string.h>
15747 struct tm t;
15748 char buf[16];
15749 int main ()
15750 {
15751 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
15752 imitates locale dependent behaviour by looking at the environment
15753 variables, and all locales use the UTF-8 encoding. */
15754 #if defined __BEOS__ || defined __HAIKU__
15755 return 1;
15756 #else
15757 /* Check whether the given locale name is recognized by the system. */
15758 # if defined _WIN32 && !defined __CYGWIN__
15759 /* On native Windows, setlocale(category, "") looks at the system settings,
15760 not at the environment variables. Also, when an encoding suffix such
15761 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
15762 category of the locale to "C". */
15763 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
15764 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
15765 return 1;
15766 # else
15767 if (setlocale (LC_ALL, "") == NULL) return 1;
15768 # endif
15769 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
15770 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
15771 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
15772 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
15773 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
15774 some unit tests fail.
15775 On MirBSD 10, when an unsupported locale is specified, setlocale()
15776 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
15777 # if HAVE_LANGINFO_CODESET
15778 {
15779 const char *cs = nl_langinfo (CODESET);
15780 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
15781 || strcmp (cs, "UTF-8") == 0)
15782 return 1;
15783 }
15784 # endif
15785 # ifdef __CYGWIN__
15786 /* On Cygwin, avoid locale names without encoding suffix, because the
15787 locale_charset() function relies on the encoding suffix. Note that
15788 LC_ALL is set on the command line. */
15789 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
15790 # endif
15791 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
15792 This excludes the UTF-8 encoding (except on MirBSD). */
15793 {
15794 const char *p;
15795 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
15796 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
15797 for (p = buf; *p != '\0'; p++)
15798 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
15799 return 1;
15800 }
15801 /* Check whether a typical GB18030 multibyte sequence is recognized as a
15802 single wide character. This excludes the GB2312 and GBK encodings. */
15803 if (mblen ("\203\062\332\066", 5) != 4)
15804 return 1;
15805 return 0;
15806 #endif
15807 }
15808
15809 _ACEOF
15810 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
15811 (eval $ac_link) 2>&5
15812 ac_status=$?
15813 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15814 test $ac_status = 0; } && test -s conftest$ac_exeext; then
15815 case "$host_os" in
15816 # Handle native Windows specially, because there setlocale() interprets
15817 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
15818 # "fr" or "fra" as "French" or "French_France.1252",
15819 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
15820 # "ja" as "Japanese" or "Japanese_Japan.932",
15821 # and similar.
15822 mingw*)
15823 # Test for the hypothetical native Windows locale name.
15824 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15825 gt_cv_locale_zh_CN=Chinese_China.54936
15826 else
15827 # None found.
15828 gt_cv_locale_zh_CN=none
15829 fi
15830 ;;
15831 solaris2.8)
15832 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
15833 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
15834 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
15835 gt_cv_locale_zh_CN=none
15836 ;;
15837 *)
15838 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
15839 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
15840 # configure script would override the LC_ALL setting. Likewise for
15841 # LC_CTYPE, which is also set at the beginning of the configure script.
15842 # Test for the locale name without encoding suffix.
15843 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15844 gt_cv_locale_zh_CN=zh_CN
15845 else
15846 # Test for the locale name with explicit encoding suffix.
15847 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15848 gt_cv_locale_zh_CN=zh_CN.GB18030
15849 else
15850 # None found.
15851 gt_cv_locale_zh_CN=none
15852 fi
15853 fi
15854 ;;
15855 esac
15856 else
15857 # If there was a link error, due to mblen(), the system is so old that
15858 # it certainly doesn't have a chinese locale.
15859 gt_cv_locale_zh_CN=none
15860 fi
15861 rm -fr conftest*
15862
15863 fi
15864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
15865 $as_echo "$gt_cv_locale_zh_CN" >&6; }
15866 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
15867
15868
15869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
15870 $as_echo_n "checking for inline... " >&6; }
15871 if ${ac_cv_c_inline+:} false; then :
15872 $as_echo_n "(cached) " >&6
15873 else
15874 ac_cv_c_inline=no
15875 for ac_kw in inline __inline__ __inline; do
15876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15877 /* end confdefs.h. */
15878 #ifndef __cplusplus
15879 typedef int foo_t;
15880 static $ac_kw foo_t static_foo () {return 0; }
15881 $ac_kw foo_t foo () {return 0; }
15882 #endif
15883
15884 _ACEOF
15885 if ac_fn_c_try_compile "$LINENO"; then :
15886 ac_cv_c_inline=$ac_kw
15887 fi
15888 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15889 test "$ac_cv_c_inline" != no && break
15890 done
15891
15892 fi
15893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
15894 $as_echo "$ac_cv_c_inline" >&6; }
15895
15896 case $ac_cv_c_inline in
15897 inline | yes) ;;
15898 *)
15899 case $ac_cv_c_inline in
15900 no) ac_val=;;
15901 *) ac_val=$ac_cv_c_inline;;
15902 esac
15903 cat >>confdefs.h <<_ACEOF
15904 #ifndef __cplusplus
15905 #define inline $ac_val
15906 #endif
15907 _ACEOF
15908 ;;
15909 esac
15910
15911
15912
15913
15914
15915
15916 GNULIB_EXPLICIT_BZERO=0;
15917 GNULIB_FFSL=0;
15918 GNULIB_FFSLL=0;
15919 GNULIB_MEMCHR=0;
15920 GNULIB_MEMMEM=0;
15921 GNULIB_MEMPCPY=0;
15922 GNULIB_MEMRCHR=0;
15923 GNULIB_RAWMEMCHR=0;
15924 GNULIB_STPCPY=0;
15925 GNULIB_STPNCPY=0;
15926 GNULIB_STRCHRNUL=0;
15927 GNULIB_STRDUP=0;
15928 GNULIB_STRNCAT=0;
15929 GNULIB_STRNDUP=0;
15930 GNULIB_STRNLEN=0;
15931 GNULIB_STRPBRK=0;
15932 GNULIB_STRSEP=0;
15933 GNULIB_STRSTR=0;
15934 GNULIB_STRCASESTR=0;
15935 GNULIB_STRTOK_R=0;
15936 GNULIB_MBSLEN=0;
15937 GNULIB_MBSNLEN=0;
15938 GNULIB_MBSCHR=0;
15939 GNULIB_MBSRCHR=0;
15940 GNULIB_MBSSTR=0;
15941 GNULIB_MBSCASECMP=0;
15942 GNULIB_MBSNCASECMP=0;
15943 GNULIB_MBSPCASECMP=0;
15944 GNULIB_MBSCASESTR=0;
15945 GNULIB_MBSCSPN=0;
15946 GNULIB_MBSPBRK=0;
15947 GNULIB_MBSSPN=0;
15948 GNULIB_MBSSEP=0;
15949 GNULIB_MBSTOK_R=0;
15950 GNULIB_STRERROR=0;
15951 GNULIB_STRERROR_R=0;
15952 GNULIB_STRERRORNAME_NP=0;
15953 GNULIB_SIGABBREV_NP=0;
15954 GNULIB_SIGDESCR_NP=0;
15955 GNULIB_STRSIGNAL=0;
15956 GNULIB_STRVERSCMP=0;
15957 HAVE_MBSLEN=0;
15958 GNULIB_MDA_MEMCCPY=1;
15959 GNULIB_MDA_STRDUP=1;
15960 HAVE_EXPLICIT_BZERO=1;
15961 HAVE_FFSL=1;
15962 HAVE_FFSLL=1;
15963 HAVE_DECL_MEMMEM=1;
15964 HAVE_MEMPCPY=1;
15965 HAVE_DECL_MEMRCHR=1;
15966 HAVE_RAWMEMCHR=1;
15967 HAVE_STPCPY=1;
15968 HAVE_STPNCPY=1;
15969 HAVE_STRCHRNUL=1;
15970 HAVE_DECL_STRDUP=1;
15971 HAVE_DECL_STRNDUP=1;
15972 HAVE_DECL_STRNLEN=1;
15973 HAVE_STRPBRK=1;
15974 HAVE_STRSEP=1;
15975 HAVE_STRCASESTR=1;
15976 HAVE_DECL_STRTOK_R=1;
15977 HAVE_DECL_STRERROR_R=1;
15978 HAVE_STRERRORNAME_NP=1;
15979 HAVE_SIGABBREV_NP=1;
15980 HAVE_SIGDESCR_NP=1;
15981 HAVE_DECL_STRSIGNAL=1;
15982 HAVE_STRVERSCMP=1;
15983 REPLACE_FFSLL=0;
15984 REPLACE_MEMCHR=0;
15985 REPLACE_MEMMEM=0;
15986 REPLACE_STPNCPY=0;
15987 REPLACE_STRCHRNUL=0;
15988 REPLACE_STRDUP=0;
15989 REPLACE_STRNCAT=0;
15990 REPLACE_STRNDUP=0;
15991 REPLACE_STRNLEN=0;
15992 REPLACE_STRSTR=0;
15993 REPLACE_STRCASESTR=0;
15994 REPLACE_STRTOK_R=0;
15995 REPLACE_STRERROR=0;
15996 REPLACE_STRERROR_R=0;
15997 REPLACE_STRERRORNAME_NP=0;
15998 REPLACE_STRSIGNAL=0;
15999 UNDEFINE_STRTOK_R=0;
16000
16001
16002
16003
16004
16005
16006 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
16007 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
16008 # irrelevant for anonymous mappings.
16009 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
16010 if test "x$ac_cv_func_mmap" = xyes; then :
16011 gl_have_mmap=yes
16012 else
16013 gl_have_mmap=no
16014 fi
16015
16016
16017 # Try to allow MAP_ANONYMOUS.
16018 gl_have_mmap_anonymous=no
16019 if test $gl_have_mmap = yes; then
16020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
16021 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
16022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16023 /* end confdefs.h. */
16024
16025 #include <sys/mman.h>
16026 #ifdef MAP_ANONYMOUS
16027 I cannot identify this map
16028 #endif
16029
16030 _ACEOF
16031 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16032 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
16033 gl_have_mmap_anonymous=yes
16034 fi
16035 rm -f conftest*
16036
16037 if test $gl_have_mmap_anonymous != yes; then
16038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16039 /* end confdefs.h. */
16040
16041 #include <sys/mman.h>
16042 #ifdef MAP_ANON
16043 I cannot identify this map
16044 #endif
16045
16046 _ACEOF
16047 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16048 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
16049
16050 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
16051
16052 gl_have_mmap_anonymous=yes
16053 fi
16054 rm -f conftest*
16055
16056 fi
16057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
16058 $as_echo "$gl_have_mmap_anonymous" >&6; }
16059 if test $gl_have_mmap_anonymous = yes; then
16060
16061 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
16062
16063 fi
16064 fi
16065
16066
16067
16068
16069
16070 # Detect platform-specific bugs in some versions of glibc:
16071 # memchr should not dereference anything with length 0
16072 # https://bugzilla.redhat.com/show_bug.cgi?id=499689
16073 # memchr should not dereference overestimated length after a match
16074 # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
16075 # https://sourceware.org/bugzilla/show_bug.cgi?id=10162
16076 # memchr should cast the second argument to 'unsigned char'.
16077 # This bug exists in Android 4.3.
16078 # Assume that memchr works on platforms that lack mprotect.
16079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
16080 $as_echo_n "checking whether memchr works... " >&6; }
16081 if ${gl_cv_func_memchr_works+:} false; then :
16082 $as_echo_n "(cached) " >&6
16083 else
16084 if test "$cross_compiling" = yes; then :
16085 case "$host_os" in
16086 # Guess no on Android.
16087 linux*-android*) gl_cv_func_memchr_works="guessing no" ;;
16088 # Guess yes on native Windows.
16089 mingw*) gl_cv_func_memchr_works="guessing yes" ;;
16090 # If we don't know, obey --enable-cross-guesses.
16091 *) gl_cv_func_memchr_works="$gl_cross_guess_normal" ;;
16092 esac
16093
16094 else
16095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16096 /* end confdefs.h. */
16097
16098 #include <string.h>
16099 #if HAVE_SYS_MMAN_H
16100 # include <fcntl.h>
16101 # include <unistd.h>
16102 # include <sys/types.h>
16103 # include <sys/mman.h>
16104 # ifndef MAP_FILE
16105 # define MAP_FILE 0
16106 # endif
16107 #endif
16108
16109 int
16110 main ()
16111 {
16112
16113 int result = 0;
16114 char *fence = NULL;
16115 #if HAVE_SYS_MMAN_H && HAVE_MPROTECT
16116 # if HAVE_MAP_ANONYMOUS
16117 const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
16118 const int fd = -1;
16119 # else /* !HAVE_MAP_ANONYMOUS */
16120 const int flags = MAP_FILE | MAP_PRIVATE;
16121 int fd = open ("/dev/zero", O_RDONLY, 0666);
16122 if (fd >= 0)
16123 # endif
16124 {
16125 int pagesize = getpagesize ();
16126 char *two_pages =
16127 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
16128 flags, fd, 0);
16129 if (two_pages != (char *)(-1)
16130 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
16131 fence = two_pages + pagesize;
16132 }
16133 #endif
16134 if (fence)
16135 {
16136 /* Test against bugs on glibc systems. */
16137 if (memchr (fence, 0, 0))
16138 result |= 1;
16139 strcpy (fence - 9, "12345678");
16140 if (memchr (fence - 9, 0, 79) != fence - 1)
16141 result |= 2;
16142 if (memchr (fence - 1, 0, 3) != fence - 1)
16143 result |= 4;
16144 /* Test against bug on AIX 7.2. */
16145 if (memchr (fence - 4, '6', 16) != fence - 4)
16146 result |= 8;
16147 }
16148 /* Test against bug on Android 4.3. */
16149 {
16150 char input[3];
16151 input[0] = 'a';
16152 input[1] = 'b';
16153 input[2] = 'c';
16154 if (memchr (input, 0x789abc00 | 'b', 3) != input + 1)
16155 result |= 16;
16156 }
16157 return result;
16158
16159 ;
16160 return 0;
16161 }
16162 _ACEOF
16163 if ac_fn_c_try_run "$LINENO"; then :
16164 gl_cv_func_memchr_works=yes
16165 else
16166 gl_cv_func_memchr_works=no
16167 fi
16168 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16169 conftest.$ac_objext conftest.beam conftest.$ac_ext
16170 fi
16171
16172
16173 fi
16174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
16175 $as_echo "$gl_cv_func_memchr_works" >&6; }
16176 case "$gl_cv_func_memchr_works" in
16177 *yes) ;;
16178 *) REPLACE_MEMCHR=1 ;;
16179 esac
16180
16181 ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default"
16182 if test "x$ac_cv_have_decl_memmem" = xyes; then :
16183 ac_have_decl=1
16184 else
16185 ac_have_decl=0
16186 fi
16187
16188 cat >>confdefs.h <<_ACEOF
16189 #define HAVE_DECL_MEMMEM $ac_have_decl
16190 _ACEOF
16191
16192
16193
16194
16195
16196 for ac_func in memmem
16197 do :
16198 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
16199 if test "x$ac_cv_func_memmem" = xyes; then :
16200 cat >>confdefs.h <<_ACEOF
16201 #define HAVE_MEMMEM 1
16202 _ACEOF
16203
16204 fi
16205 done
16206
16207 if test $ac_cv_func_memmem = yes; then
16208 HAVE_MEMMEM=1
16209 else
16210 HAVE_MEMMEM=0
16211 fi
16212
16213 if test $ac_cv_have_decl_memmem = no; then
16214 HAVE_DECL_MEMMEM=0
16215 else
16216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
16217 $as_echo_n "checking whether memmem works... " >&6; }
16218 if ${gl_cv_func_memmem_works_always+:} false; then :
16219 $as_echo_n "(cached) " >&6
16220 else
16221 if test "$cross_compiling" = yes; then :
16222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16223 /* end confdefs.h. */
16224
16225 #ifdef __GNU_LIBRARY__
16226 #include <features.h>
16227 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
16228 || __GLIBC_MINOR__ > 12)) \
16229 || (__GLIBC__ > 2)) \
16230 || defined __UCLIBC__
16231 Lucky user
16232 #endif
16233 #elif defined __CYGWIN__
16234 #include <cygwin/version.h>
16235 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
16236 Lucky user
16237 #endif
16238 #else
16239 Lucky user
16240 #endif
16241
16242 _ACEOF
16243 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16244 $EGREP "Lucky user" >/dev/null 2>&1; then :
16245 gl_cv_func_memmem_works_always="guessing yes"
16246 else
16247 gl_cv_func_memmem_works_always="$gl_cross_guess_normal"
16248 fi
16249 rm -f conftest*
16250
16251
16252 else
16253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16254 /* end confdefs.h. */
16255
16256 #include <string.h> /* for memmem */
16257 #define P "_EF_BF_BD"
16258 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
16259 #define NEEDLE P P P P P
16260
16261 int
16262 main ()
16263 {
16264
16265 int result = 0;
16266 if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
16267 result |= 1;
16268 /* Check for empty needle behavior. */
16269 {
16270 const char *haystack = "AAA";
16271 if (memmem (haystack, 3, (const char *) 1, 0) != haystack)
16272 result |= 2;
16273 }
16274 return result;
16275
16276 ;
16277 return 0;
16278 }
16279 _ACEOF
16280 if ac_fn_c_try_run "$LINENO"; then :
16281 gl_cv_func_memmem_works_always=yes
16282 else
16283 gl_cv_func_memmem_works_always=no
16284 fi
16285 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16286 conftest.$ac_objext conftest.beam conftest.$ac_ext
16287 fi
16288
16289
16290 fi
16291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
16292 $as_echo "$gl_cv_func_memmem_works_always" >&6; }
16293 case "$gl_cv_func_memmem_works_always" in
16294 *yes) ;;
16295 *)
16296 REPLACE_MEMMEM=1
16297 ;;
16298 esac
16299 fi
16300 :
16301
16302 ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
16303 if test "x$ac_cv_have_decl_memrchr" = xyes; then :
16304 ac_have_decl=1
16305 else
16306 ac_have_decl=0
16307 fi
16308
16309 cat >>confdefs.h <<_ACEOF
16310 #define HAVE_DECL_MEMRCHR $ac_have_decl
16311 _ACEOF
16312
16313
16314
16315
16316
16317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <limits.h> defines MIN and MAX" >&5
16318 $as_echo_n "checking whether <limits.h> defines MIN and MAX... " >&6; }
16319 if ${gl_cv_minmax_in_limits_h+:} false; then :
16320 $as_echo_n "(cached) " >&6
16321 else
16322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16323 /* end confdefs.h. */
16324 #include <limits.h>
16325 int x = MIN (42, 17);
16326 int
16327 main ()
16328 {
16329
16330 ;
16331 return 0;
16332 }
16333 _ACEOF
16334 if ac_fn_c_try_compile "$LINENO"; then :
16335 gl_cv_minmax_in_limits_h=yes
16336 else
16337 gl_cv_minmax_in_limits_h=no
16338 fi
16339 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16340 fi
16341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_limits_h" >&5
16342 $as_echo "$gl_cv_minmax_in_limits_h" >&6; }
16343 if test $gl_cv_minmax_in_limits_h = yes; then
16344
16345 $as_echo "#define HAVE_MINMAX_IN_LIMITS_H 1" >>confdefs.h
16346
16347 fi
16348
16349
16350
16351
16352
16353
16354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/param.h> defines MIN and MAX" >&5
16355 $as_echo_n "checking whether <sys/param.h> defines MIN and MAX... " >&6; }
16356 if ${gl_cv_minmax_in_sys_param_h+:} false; then :
16357 $as_echo_n "(cached) " >&6
16358 else
16359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16360 /* end confdefs.h. */
16361 #include <sys/param.h>
16362 int x = MIN (42, 17);
16363 int
16364 main ()
16365 {
16366
16367 ;
16368 return 0;
16369 }
16370 _ACEOF
16371 if ac_fn_c_try_compile "$LINENO"; then :
16372 gl_cv_minmax_in_sys_param_h=yes
16373 else
16374 gl_cv_minmax_in_sys_param_h=no
16375 fi
16376 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16377 fi
16378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_sys_param_h" >&5
16379 $as_echo "$gl_cv_minmax_in_sys_param_h" >&6; }
16380 if test $gl_cv_minmax_in_sys_param_h = yes; then
16381
16382 $as_echo "#define HAVE_MINMAX_IN_SYS_PARAM_H 1" >>confdefs.h
16383
16384 fi
16385
16386
16387
16388
16389
16390
16391
16392
16393
16394
16395 GNULIB_GETADDRINFO=0;
16396 HAVE_STRUCT_ADDRINFO=1;
16397 HAVE_DECL_FREEADDRINFO=1;
16398 HAVE_DECL_GAI_STRERROR=1;
16399 HAVE_DECL_GETADDRINFO=1;
16400 HAVE_DECL_GETNAMEINFO=1;
16401 REPLACE_GAI_STRERROR=0;
16402 REPLACE_GETADDRINFO=0;
16403
16404
16405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for O_CLOEXEC" >&5
16406 $as_echo_n "checking for O_CLOEXEC... " >&6; }
16407 if ${gl_cv_macro_O_CLOEXEC+:} false; then :
16408 $as_echo_n "(cached) " >&6
16409 else
16410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16411 /* end confdefs.h. */
16412 #include <fcntl.h>
16413 #ifndef O_CLOEXEC
16414 choke me;
16415 #endif
16416
16417 int
16418 main ()
16419 {
16420 return O_CLOEXEC;
16421 ;
16422 return 0;
16423 }
16424 _ACEOF
16425 if ac_fn_c_try_compile "$LINENO"; then :
16426 gl_cv_macro_O_CLOEXEC=yes
16427 else
16428 gl_cv_macro_O_CLOEXEC=no
16429 fi
16430 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16431 fi
16432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_macro_O_CLOEXEC" >&5
16433 $as_echo "$gl_cv_macro_O_CLOEXEC" >&6; }
16434
16435
16436
16437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
16438 $as_echo_n "checking for promoted mode_t type... " >&6; }
16439 if ${gl_cv_promoted_mode_t+:} false; then :
16440 $as_echo_n "(cached) " >&6
16441 else
16442
16443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16444 /* end confdefs.h. */
16445 #include <sys/types.h>
16446 int
16447 main ()
16448 {
16449 typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
16450 ;
16451 return 0;
16452 }
16453 _ACEOF
16454 if ac_fn_c_try_compile "$LINENO"; then :
16455 gl_cv_promoted_mode_t='int'
16456 else
16457 gl_cv_promoted_mode_t='mode_t'
16458 fi
16459 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16460
16461 fi
16462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
16463 $as_echo "$gl_cv_promoted_mode_t" >&6; }
16464
16465 cat >>confdefs.h <<_ACEOF
16466 #define PROMOTED_MODE_T $gl_cv_promoted_mode_t
16467 _ACEOF
16468
16469
16470
16471
16472
16473
16474
16475
16476
16477
16478 ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default"
16479 if test "x$ac_cv_have_decl_setenv" = xyes; then :
16480 ac_have_decl=1
16481 else
16482 ac_have_decl=0
16483 fi
16484
16485 cat >>confdefs.h <<_ACEOF
16486 #define HAVE_DECL_SETENV $ac_have_decl
16487 _ACEOF
16488
16489
16490
16491
16492
16493
16494 if test $ac_cv_have_decl_setenv = no; then
16495 HAVE_DECL_SETENV=0
16496 fi
16497
16498
16499
16500
16501
16502 for ac_header in search.h
16503 do :
16504 ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
16505 if test "x$ac_cv_header_search_h" = xyes; then :
16506 cat >>confdefs.h <<_ACEOF
16507 #define HAVE_SEARCH_H 1
16508 _ACEOF
16509
16510 fi
16511
16512 done
16513
16514 for ac_func in tsearch
16515 do :
16516 ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
16517 if test "x$ac_cv_func_tsearch" = xyes; then :
16518 cat >>confdefs.h <<_ACEOF
16519 #define HAVE_TSEARCH 1
16520 _ACEOF
16521
16522 fi
16523 done
16524
16525
16526
16527
16528 GNULIB_PTHREAD_SIGMASK=0;
16529 GNULIB_RAISE=0;
16530 GNULIB_SIGNAL_H_SIGPIPE=0;
16531 GNULIB_SIGPROCMASK=0;
16532 GNULIB_SIGACTION=0;
16533 HAVE_POSIX_SIGNALBLOCKING=1;
16534 HAVE_PTHREAD_SIGMASK=1;
16535 HAVE_RAISE=1;
16536 HAVE_SIGSET_T=1;
16537 HAVE_SIGINFO_T=1;
16538 HAVE_SIGACTION=1;
16539 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
16540
16541 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
16542
16543 HAVE_SIGHANDLER_T=1;
16544 REPLACE_PTHREAD_SIGMASK=0;
16545 REPLACE_RAISE=0;
16546
16547
16548 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
16549 #include <signal.h>
16550 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
16551 #include <sys/types.h>
16552
16553 "
16554 if test "x$ac_cv_type_sigset_t" = xyes; then :
16555
16556 cat >>confdefs.h <<_ACEOF
16557 #define HAVE_SIGSET_T 1
16558 _ACEOF
16559
16560 gl_cv_type_sigset_t=yes
16561 else
16562 gl_cv_type_sigset_t=no
16563 fi
16564
16565 if test $gl_cv_type_sigset_t != yes; then
16566 HAVE_SIGSET_T=0
16567 fi
16568
16569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
16570 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
16571 if ${ac_cv_header_stdbool_h+:} false; then :
16572 $as_echo_n "(cached) " >&6
16573 else
16574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16575 /* end confdefs.h. */
16576
16577 #include <stdbool.h>
16578
16579 #ifdef __cplusplus
16580 typedef bool Bool;
16581 #else
16582 typedef _Bool Bool;
16583 #ifndef bool
16584 "error: bool is not defined"
16585 #endif
16586 #ifndef false
16587 "error: false is not defined"
16588 #endif
16589 #if false
16590 "error: false is not 0"
16591 #endif
16592 #ifndef true
16593 "error: true is not defined"
16594 #endif
16595 #if true != 1
16596 "error: true is not 1"
16597 #endif
16598 #endif
16599
16600 #ifndef __bool_true_false_are_defined
16601 "error: __bool_true_false_are_defined is not defined"
16602 #endif
16603
16604 struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
16605
16606 char a[true == 1 ? 1 : -1];
16607 char b[false == 0 ? 1 : -1];
16608 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
16609 char d[(bool) 0.5 == true ? 1 : -1];
16610 /* See body of main program for 'e'. */
16611 char f[(Bool) 0.0 == false ? 1 : -1];
16612 char g[true];
16613 char h[sizeof (Bool)];
16614 char i[sizeof s.t];
16615 enum { j = false, k = true, l = false * true, m = true * 256 };
16616 /* The following fails for
16617 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
16618 Bool n[m];
16619 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
16620 char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
16621 /* Catch a bug in an HP-UX C compiler. See
16622 https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
16623 https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html
16624 */
16625 Bool q = true;
16626 Bool *pq = &q;
16627 bool *qq = &q;
16628
16629 int
16630 main ()
16631 {
16632
16633 bool e = &s;
16634 *pq |= q; *pq |= ! q;
16635 *qq |= q; *qq |= ! q;
16636 /* Refer to every declared value, to avoid compiler optimizations. */
16637 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
16638 + !m + !n + !o + !p + !q + !pq + !qq);
16639
16640 ;
16641 return 0;
16642 }
16643 _ACEOF
16644 if ac_fn_c_try_compile "$LINENO"; then :
16645 ac_cv_header_stdbool_h=yes
16646 else
16647 ac_cv_header_stdbool_h=no
16648 fi
16649 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16650 fi
16651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
16652 $as_echo "$ac_cv_header_stdbool_h" >&6; }
16653 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
16654 if test "x$ac_cv_type__Bool" = xyes; then :
16655
16656 cat >>confdefs.h <<_ACEOF
16657 #define HAVE__BOOL 1
16658 _ACEOF
16659
16660
16661 fi
16662
16663
16664 ac_fn_c_check_decl "$LINENO" "fcloseall" "ac_cv_have_decl_fcloseall" "$ac_includes_default"
16665 if test "x$ac_cv_have_decl_fcloseall" = xyes; then :
16666 ac_have_decl=1
16667 else
16668 ac_have_decl=0
16669 fi
16670
16671 cat >>confdefs.h <<_ACEOF
16672 #define HAVE_DECL_FCLOSEALL $ac_have_decl
16673 _ACEOF
16674
16675 ac_fn_c_check_decl "$LINENO" "ecvt" "ac_cv_have_decl_ecvt" "$ac_includes_default"
16676 if test "x$ac_cv_have_decl_ecvt" = xyes; then :
16677 ac_have_decl=1
16678 else
16679 ac_have_decl=0
16680 fi
16681
16682 cat >>confdefs.h <<_ACEOF
16683 #define HAVE_DECL_ECVT $ac_have_decl
16684 _ACEOF
16685
16686 ac_fn_c_check_decl "$LINENO" "fcvt" "ac_cv_have_decl_fcvt" "$ac_includes_default"
16687 if test "x$ac_cv_have_decl_fcvt" = xyes; then :
16688 ac_have_decl=1
16689 else
16690 ac_have_decl=0
16691 fi
16692
16693 cat >>confdefs.h <<_ACEOF
16694 #define HAVE_DECL_FCVT $ac_have_decl
16695 _ACEOF
16696
16697 ac_fn_c_check_decl "$LINENO" "gcvt" "ac_cv_have_decl_gcvt" "$ac_includes_default"
16698 if test "x$ac_cv_have_decl_gcvt" = xyes; then :
16699 ac_have_decl=1
16700 else
16701 ac_have_decl=0
16702 fi
16703
16704 cat >>confdefs.h <<_ACEOF
16705 #define HAVE_DECL_GCVT $ac_have_decl
16706 _ACEOF
16707
16708 ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
16709 if test "x$ac_cv_have_decl_strdup" = xyes; then :
16710 ac_have_decl=1
16711 else
16712 ac_have_decl=0
16713 fi
16714
16715 cat >>confdefs.h <<_ACEOF
16716 #define HAVE_DECL_STRDUP $ac_have_decl
16717 _ACEOF
16718
16719
16720 REPLACE_STRERROR_0=0
16721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
16722 $as_echo_n "checking whether strerror(0) succeeds... " >&6; }
16723 if ${gl_cv_func_strerror_0_works+:} false; then :
16724 $as_echo_n "(cached) " >&6
16725 else
16726 if test "$cross_compiling" = yes; then :
16727 case "$host_os" in
16728 # Guess yes on glibc systems.
16729 *-gnu* | gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
16730 # Guess yes on musl systems.
16731 *-musl*) gl_cv_func_strerror_0_works="guessing yes" ;;
16732 # Guess yes on native Windows.
16733 mingw*) gl_cv_func_strerror_0_works="guessing yes" ;;
16734 # If we don't know, obey --enable-cross-guesses.
16735 *) gl_cv_func_strerror_0_works="$gl_cross_guess_normal" ;;
16736 esac
16737
16738 else
16739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16740 /* end confdefs.h. */
16741 #include <string.h>
16742 #include <errno.h>
16743
16744 int
16745 main ()
16746 {
16747 int result = 0;
16748 char *str;
16749 errno = 0;
16750 str = strerror (0);
16751 if (!*str) result |= 1;
16752 if (errno) result |= 2;
16753 if (strstr (str, "nknown") || strstr (str, "ndefined"))
16754 result |= 4;
16755 return result;
16756 ;
16757 return 0;
16758 }
16759 _ACEOF
16760 if ac_fn_c_try_run "$LINENO"; then :
16761 gl_cv_func_strerror_0_works=yes
16762 else
16763 gl_cv_func_strerror_0_works=no
16764 fi
16765 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16766 conftest.$ac_objext conftest.beam conftest.$ac_ext
16767 fi
16768
16769
16770 fi
16771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
16772 $as_echo "$gl_cv_func_strerror_0_works" >&6; }
16773 case "$gl_cv_func_strerror_0_works" in
16774 *yes) ;;
16775 *)
16776 REPLACE_STRERROR_0=1
16777
16778 $as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h
16779
16780 ;;
16781 esac
16782
16783
16784
16785
16786
16787
16788
16789
16790
16791
16792 if test $ac_cv_func_strerror_r = yes; then
16793 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
16794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strerror_r with POSIX signature" >&5
16795 $as_echo_n "checking for strerror_r with POSIX signature... " >&6; }
16796 if ${gl_cv_func_strerror_r_posix_signature+:} false; then :
16797 $as_echo_n "(cached) " >&6
16798 else
16799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16800 /* end confdefs.h. */
16801 #include <string.h>
16802 int strerror_r (int, char *, size_t);
16803
16804 int
16805 main ()
16806 {
16807
16808 ;
16809 return 0;
16810 }
16811 _ACEOF
16812 if ac_fn_c_try_compile "$LINENO"; then :
16813 gl_cv_func_strerror_r_posix_signature=yes
16814 else
16815 gl_cv_func_strerror_r_posix_signature=no
16816 fi
16817 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16818
16819 fi
16820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_posix_signature" >&5
16821 $as_echo "$gl_cv_func_strerror_r_posix_signature" >&6; }
16822 if test $gl_cv_func_strerror_r_posix_signature = yes; then
16823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r works" >&5
16824 $as_echo_n "checking whether strerror_r works... " >&6; }
16825 if ${gl_cv_func_strerror_r_works+:} false; then :
16826 $as_echo_n "(cached) " >&6
16827 else
16828 if test "$cross_compiling" = yes; then :
16829
16830 case "$host_os" in
16831 # Guess no on AIX.
16832 aix*) gl_cv_func_strerror_r_works="guessing no";;
16833 # Guess no on HP-UX.
16834 hpux*) gl_cv_func_strerror_r_works="guessing no";;
16835 # Guess no on BSD variants.
16836 *bsd*) gl_cv_func_strerror_r_works="guessing no";;
16837 # Guess yes otherwise.
16838 *) gl_cv_func_strerror_r_works="guessing yes";;
16839 esac
16840
16841 else
16842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16843 /* end confdefs.h. */
16844 #include <errno.h>
16845 #include <string.h>
16846
16847 int
16848 main ()
16849 {
16850 int result = 0;
16851 char buf[79];
16852 if (strerror_r (EACCES, buf, 0) < 0)
16853 result |= 1;
16854 errno = 0;
16855 if (strerror_r (EACCES, buf, sizeof buf) != 0)
16856 result |= 2;
16857 strcpy (buf, "Unknown");
16858 if (strerror_r (0, buf, sizeof buf) != 0)
16859 result |= 4;
16860 if (errno)
16861 result |= 8;
16862 if (strstr (buf, "nknown") || strstr (buf, "ndefined"))
16863 result |= 0x10;
16864 errno = 0;
16865 *buf = 0;
16866 if (strerror_r (-3, buf, sizeof buf) < 0)
16867 result |= 0x20;
16868 if (errno)
16869 result |= 0x40;
16870 if (!*buf)
16871 result |= 0x80;
16872 return result;
16873
16874 ;
16875 return 0;
16876 }
16877 _ACEOF
16878 if ac_fn_c_try_run "$LINENO"; then :
16879 gl_cv_func_strerror_r_works=yes
16880 else
16881 gl_cv_func_strerror_r_works=no
16882 fi
16883 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16884 conftest.$ac_objext conftest.beam conftest.$ac_ext
16885 fi
16886
16887
16888 fi
16889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
16890 $as_echo "$gl_cv_func_strerror_r_works" >&6; }
16891 else
16892
16893 if test $ac_cv_func___xpg_strerror_r = yes; then
16894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __xpg_strerror_r works" >&5
16895 $as_echo_n "checking whether __xpg_strerror_r works... " >&6; }
16896 if ${gl_cv_func_strerror_r_works+:} false; then :
16897 $as_echo_n "(cached) " >&6
16898 else
16899 if test "$cross_compiling" = yes; then :
16900 gl_cv_func_strerror_r_works="$gl_cross_guess_normal"
16901
16902 else
16903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16904 /* end confdefs.h. */
16905 #include <errno.h>
16906 #include <string.h>
16907 extern
16908 #ifdef __cplusplus
16909 "C"
16910 #endif
16911 int __xpg_strerror_r(int, char *, size_t);
16912
16913 int
16914 main ()
16915 {
16916 int result = 0;
16917 char buf[256] = "^";
16918 char copy[256];
16919 char *str = strerror (-1);
16920 strcpy (copy, str);
16921 if (__xpg_strerror_r (-2, buf, 1) == 0)
16922 result |= 1;
16923 if (*buf)
16924 result |= 2;
16925 __xpg_strerror_r (-2, buf, 256);
16926 if (strcmp (str, copy))
16927 result |= 4;
16928 return result;
16929
16930 ;
16931 return 0;
16932 }
16933 _ACEOF
16934 if ac_fn_c_try_run "$LINENO"; then :
16935 gl_cv_func_strerror_r_works=yes
16936 else
16937 gl_cv_func_strerror_r_works=no
16938 fi
16939 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16940 conftest.$ac_objext conftest.beam conftest.$ac_ext
16941 fi
16942
16943
16944 fi
16945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
16946 $as_echo "$gl_cv_func_strerror_r_works" >&6; }
16947 fi
16948 fi
16949 fi
16950 fi
16951
16952 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
16953 if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
16954 ac_have_decl=1
16955 else
16956 ac_have_decl=0
16957 fi
16958
16959 cat >>confdefs.h <<_ACEOF
16960 #define HAVE_DECL_STRERROR_R $ac_have_decl
16961 _ACEOF
16962
16963
16964
16965
16966
16967
16968
16969
16970
16971
16972
16973
16974
16975
16976
16977 if test $gl_cv_have_include_next = yes; then
16978 gl_cv_next_string_h='<'string.h'>'
16979 else
16980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
16981 $as_echo_n "checking absolute name of <string.h>... " >&6; }
16982 if ${gl_cv_next_string_h+:} false; then :
16983 $as_echo_n "(cached) " >&6
16984 else
16985
16986
16987
16988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16989 /* end confdefs.h. */
16990 #include <string.h>
16991 _ACEOF
16992 case "$host_os" in
16993 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16994 *) gl_absname_cpp="$ac_cpp" ;;
16995 esac
16996
16997 case "$host_os" in
16998 mingw*)
16999 gl_dirsep_regex='[/\\]'
17000 ;;
17001 *)
17002 gl_dirsep_regex='\/'
17003 ;;
17004 esac
17005 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17006 gl_header_literal_regex=`echo 'string.h' \
17007 | sed -e "$gl_make_literal_regex_sed"`
17008 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17009 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17010 s|^/[^/]|//&|
17011 p
17012 q
17013 }'
17014
17015 gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17016 sed -n "$gl_absolute_header_sed"`
17017
17018 gl_header=$gl_cv_absolute_string_h
17019 gl_cv_next_string_h='"'$gl_header'"'
17020
17021
17022 fi
17023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
17024 $as_echo "$gl_cv_next_string_h" >&6; }
17025 fi
17026 NEXT_STRING_H=$gl_cv_next_string_h
17027
17028 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17029 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17030 gl_next_as_first_directive='<'string.h'>'
17031 else
17032 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17033 gl_next_as_first_directive=$gl_cv_next_string_h
17034 fi
17035 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
17036
17037
17038
17039
17040
17041
17042
17043
17044
17045
17046
17047
17048
17049
17050
17051
17052
17053
17054
17055
17056
17057
17058
17059
17060
17061 if test $gl_cv_have_include_next = yes; then
17062 gl_cv_next_strings_h='<'strings.h'>'
17063 else
17064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <strings.h>" >&5
17065 $as_echo_n "checking absolute name of <strings.h>... " >&6; }
17066 if ${gl_cv_next_strings_h+:} false; then :
17067 $as_echo_n "(cached) " >&6
17068 else
17069
17070 if test $ac_cv_header_strings_h = yes; then
17071
17072
17073
17074
17075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17076 /* end confdefs.h. */
17077 #include <strings.h>
17078 _ACEOF
17079 case "$host_os" in
17080 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17081 *) gl_absname_cpp="$ac_cpp" ;;
17082 esac
17083
17084 case "$host_os" in
17085 mingw*)
17086 gl_dirsep_regex='[/\\]'
17087 ;;
17088 *)
17089 gl_dirsep_regex='\/'
17090 ;;
17091 esac
17092 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17093 gl_header_literal_regex=`echo 'strings.h' \
17094 | sed -e "$gl_make_literal_regex_sed"`
17095 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17096 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17097 s|^/[^/]|//&|
17098 p
17099 q
17100 }'
17101
17102 gl_cv_absolute_strings_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17103 sed -n "$gl_absolute_header_sed"`
17104
17105 gl_header=$gl_cv_absolute_strings_h
17106 gl_cv_next_strings_h='"'$gl_header'"'
17107 else
17108 gl_cv_next_strings_h='<'strings.h'>'
17109 fi
17110
17111
17112 fi
17113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_strings_h" >&5
17114 $as_echo "$gl_cv_next_strings_h" >&6; }
17115 fi
17116 NEXT_STRINGS_H=$gl_cv_next_strings_h
17117
17118 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17119 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17120 gl_next_as_first_directive='<'strings.h'>'
17121 else
17122 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17123 gl_next_as_first_directive=$gl_cv_next_strings_h
17124 fi
17125 NEXT_AS_FIRST_DIRECTIVE_STRINGS_H=$gl_next_as_first_directive
17126
17127
17128
17129
17130 if test $ac_cv_header_strings_h = yes; then
17131 HAVE_STRINGS_H=1
17132 else
17133 HAVE_STRINGS_H=0
17134 fi
17135
17136
17137
17138
17139
17140
17141 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
17142 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
17143 ac_have_decl=1
17144 else
17145 ac_have_decl=0
17146 fi
17147
17148 cat >>confdefs.h <<_ACEOF
17149 #define HAVE_DECL_STRNLEN $ac_have_decl
17150 _ACEOF
17151
17152
17153
17154
17155 if test $REPLACE_MEMCHR = 1; then
17156 REPLACE_STRSTR=1
17157 else
17158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
17159 $as_echo_n "checking whether strstr works... " >&6; }
17160 if ${gl_cv_func_strstr_works_always+:} false; then :
17161 $as_echo_n "(cached) " >&6
17162 else
17163 if test "$cross_compiling" = yes; then :
17164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17165 /* end confdefs.h. */
17166
17167 #ifdef __GNU_LIBRARY__
17168 #include <features.h>
17169 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
17170 || defined __UCLIBC__
17171 Lucky user
17172 #endif
17173 #elif defined __CYGWIN__
17174 #include <cygwin/version.h>
17175 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
17176 Lucky user
17177 #endif
17178 #else
17179 Lucky user
17180 #endif
17181
17182 _ACEOF
17183 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17184 $EGREP "Lucky user" >/dev/null 2>&1; then :
17185 gl_cv_func_strstr_works_always="guessing yes"
17186 else
17187 gl_cv_func_strstr_works_always="$gl_cross_guess_normal"
17188 fi
17189 rm -f conftest*
17190
17191
17192 else
17193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17194 /* end confdefs.h. */
17195
17196 #include <string.h> /* for strstr */
17197 #ifdef __GNU_LIBRARY__
17198 #include <features.h>
17199 #if __GLIBC__ == 2 && __GLIBC_MINOR__ == 28
17200 Unlucky user
17201 #endif
17202 #endif
17203 #define P "_EF_BF_BD"
17204 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
17205 #define NEEDLE P P P P P
17206
17207 int
17208 main ()
17209 {
17210 return !!strstr (HAYSTACK, NEEDLE);
17211
17212 ;
17213 return 0;
17214 }
17215 _ACEOF
17216 if ac_fn_c_try_run "$LINENO"; then :
17217 gl_cv_func_strstr_works_always=yes
17218 else
17219 gl_cv_func_strstr_works_always=no
17220 fi
17221 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17222 conftest.$ac_objext conftest.beam conftest.$ac_ext
17223 fi
17224
17225
17226 fi
17227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
17228 $as_echo "$gl_cv_func_strstr_works_always" >&6; }
17229 case "$gl_cv_func_strstr_works_always" in
17230 *yes) ;;
17231 *)
17232 REPLACE_STRSTR=1
17233 ;;
17234 esac
17235 fi
17236
17237 ac_fn_c_check_decl "$LINENO" "strtok_r" "ac_cv_have_decl_strtok_r" "$ac_includes_default"
17238 if test "x$ac_cv_have_decl_strtok_r" = xyes; then :
17239 ac_have_decl=1
17240 else
17241 ac_have_decl=0
17242 fi
17243
17244 cat >>confdefs.h <<_ACEOF
17245 #define HAVE_DECL_STRTOK_R $ac_have_decl
17246 _ACEOF
17247
17248
17249
17250
17251
17252
17253
17254
17255
17256
17257
17258
17259
17260 $as_echo "#define _USE_STD_STAT 1" >>confdefs.h
17261
17262
17263
17264
17265
17266
17267
17268
17269
17270
17271
17272 if test $gl_cv_have_include_next = yes; then
17273 gl_cv_next_sys_types_h='<'sys/types.h'>'
17274 else
17275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
17276 $as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
17277 if ${gl_cv_next_sys_types_h+:} false; then :
17278 $as_echo_n "(cached) " >&6
17279 else
17280
17281
17282
17283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17284 /* end confdefs.h. */
17285 #include <sys/types.h>
17286 _ACEOF
17287 case "$host_os" in
17288 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17289 *) gl_absname_cpp="$ac_cpp" ;;
17290 esac
17291
17292 case "$host_os" in
17293 mingw*)
17294 gl_dirsep_regex='[/\\]'
17295 ;;
17296 *)
17297 gl_dirsep_regex='\/'
17298 ;;
17299 esac
17300 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17301 gl_header_literal_regex=`echo 'sys/types.h' \
17302 | sed -e "$gl_make_literal_regex_sed"`
17303 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17304 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17305 s|^/[^/]|//&|
17306 p
17307 q
17308 }'
17309
17310 gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17311 sed -n "$gl_absolute_header_sed"`
17312
17313 gl_header=$gl_cv_absolute_sys_types_h
17314 gl_cv_next_sys_types_h='"'$gl_header'"'
17315
17316
17317 fi
17318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
17319 $as_echo "$gl_cv_next_sys_types_h" >&6; }
17320 fi
17321 NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
17322
17323 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17324 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17325 gl_next_as_first_directive='<'sys/types.h'>'
17326 else
17327 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17328 gl_next_as_first_directive=$gl_cv_next_sys_types_h
17329 fi
17330 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
17331
17332
17333
17334
17335
17336
17337
17338
17339
17340
17341
17342
17343 WINDOWS_STAT_INODES=0
17344
17345
17346
17347
17348
17349
17350
17351
17352 GNULIB_CTIME=0;
17353 GNULIB_MKTIME=0;
17354 GNULIB_LOCALTIME=0;
17355 GNULIB_NANOSLEEP=0;
17356 GNULIB_STRFTIME=0;
17357 GNULIB_STRPTIME=0;
17358 GNULIB_TIMEGM=0;
17359 GNULIB_TIMESPEC_GET=0;
17360 GNULIB_TIME_R=0;
17361 GNULIB_TIME_RZ=0;
17362 GNULIB_TZSET=0;
17363 GNULIB_MDA_TZSET=1;
17364 HAVE_DECL_LOCALTIME_R=1;
17365 HAVE_NANOSLEEP=1;
17366 HAVE_STRPTIME=1;
17367 HAVE_TIMEGM=1;
17368 HAVE_TIMESPEC_GET=1;
17369 HAVE_TIMEZONE_T=0;
17370 REPLACE_CTIME=GNULIB_PORTCHECK;
17371 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
17372 REPLACE_MKTIME=GNULIB_PORTCHECK;
17373 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
17374 REPLACE_STRFTIME=GNULIB_PORTCHECK;
17375 REPLACE_TIMEGM=GNULIB_PORTCHECK;
17376 REPLACE_TZSET=GNULIB_PORTCHECK;
17377
17378 : ${GNULIB_GETTIMEOFDAY=0};
17379 REPLACE_GMTIME=0;
17380 REPLACE_LOCALTIME=0;
17381
17382
17383
17384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
17385 $as_echo_n "checking for struct timespec in <time.h>... " >&6; }
17386 if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then :
17387 $as_echo_n "(cached) " >&6
17388 else
17389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17390 /* end confdefs.h. */
17391 #include <time.h>
17392
17393 int
17394 main ()
17395 {
17396 static struct timespec x; x.tv_sec = x.tv_nsec;
17397 ;
17398 return 0;
17399 }
17400 _ACEOF
17401 if ac_fn_c_try_compile "$LINENO"; then :
17402 gl_cv_sys_struct_timespec_in_time_h=yes
17403 else
17404 gl_cv_sys_struct_timespec_in_time_h=no
17405 fi
17406 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17407 fi
17408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
17409 $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
17410
17411 TIME_H_DEFINES_STRUCT_TIMESPEC=0
17412 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
17413 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
17414 UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
17415 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
17416 TIME_H_DEFINES_STRUCT_TIMESPEC=1
17417 else
17418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
17419 $as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
17420 if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then :
17421 $as_echo_n "(cached) " >&6
17422 else
17423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17424 /* end confdefs.h. */
17425 #include <sys/time.h>
17426
17427 int
17428 main ()
17429 {
17430 static struct timespec x; x.tv_sec = x.tv_nsec;
17431 ;
17432 return 0;
17433 }
17434 _ACEOF
17435 if ac_fn_c_try_compile "$LINENO"; then :
17436 gl_cv_sys_struct_timespec_in_sys_time_h=yes
17437 else
17438 gl_cv_sys_struct_timespec_in_sys_time_h=no
17439 fi
17440 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17441 fi
17442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
17443 $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
17444 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
17445 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
17446 else
17447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
17448 $as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
17449 if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then :
17450 $as_echo_n "(cached) " >&6
17451 else
17452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17453 /* end confdefs.h. */
17454 #include <pthread.h>
17455
17456 int
17457 main ()
17458 {
17459 static struct timespec x; x.tv_sec = x.tv_nsec;
17460 ;
17461 return 0;
17462 }
17463 _ACEOF
17464 if ac_fn_c_try_compile "$LINENO"; then :
17465 gl_cv_sys_struct_timespec_in_pthread_h=yes
17466 else
17467 gl_cv_sys_struct_timespec_in_pthread_h=no
17468 fi
17469 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17470 fi
17471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
17472 $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
17473 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
17474 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
17475 else
17476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
17477 $as_echo_n "checking for struct timespec in <unistd.h>... " >&6; }
17478 if ${gl_cv_sys_struct_timespec_in_unistd_h+:} false; then :
17479 $as_echo_n "(cached) " >&6
17480 else
17481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17482 /* end confdefs.h. */
17483 #include <unistd.h>
17484
17485 int
17486 main ()
17487 {
17488 static struct timespec x; x.tv_sec = x.tv_nsec;
17489 ;
17490 return 0;
17491 }
17492 _ACEOF
17493 if ac_fn_c_try_compile "$LINENO"; then :
17494 gl_cv_sys_struct_timespec_in_unistd_h=yes
17495 else
17496 gl_cv_sys_struct_timespec_in_unistd_h=no
17497 fi
17498 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17499 fi
17500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5
17501 $as_echo "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
17502 if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
17503 UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
17504 fi
17505 fi
17506 fi
17507 fi
17508
17509
17510
17511
17512
17513
17514
17515
17516
17517
17518
17519
17520
17521
17522
17523
17524 if test $gl_cv_have_include_next = yes; then
17525 gl_cv_next_time_h='<'time.h'>'
17526 else
17527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
17528 $as_echo_n "checking absolute name of <time.h>... " >&6; }
17529 if ${gl_cv_next_time_h+:} false; then :
17530 $as_echo_n "(cached) " >&6
17531 else
17532
17533
17534
17535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17536 /* end confdefs.h. */
17537 #include <time.h>
17538 _ACEOF
17539 case "$host_os" in
17540 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17541 *) gl_absname_cpp="$ac_cpp" ;;
17542 esac
17543
17544 case "$host_os" in
17545 mingw*)
17546 gl_dirsep_regex='[/\\]'
17547 ;;
17548 *)
17549 gl_dirsep_regex='\/'
17550 ;;
17551 esac
17552 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17553 gl_header_literal_regex=`echo 'time.h' \
17554 | sed -e "$gl_make_literal_regex_sed"`
17555 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17556 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17557 s|^/[^/]|//&|
17558 p
17559 q
17560 }'
17561
17562 gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17563 sed -n "$gl_absolute_header_sed"`
17564
17565 gl_header=$gl_cv_absolute_time_h
17566 gl_cv_next_time_h='"'$gl_header'"'
17567
17568
17569 fi
17570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
17571 $as_echo "$gl_cv_next_time_h" >&6; }
17572 fi
17573 NEXT_TIME_H=$gl_cv_next_time_h
17574
17575 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17576 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17577 gl_next_as_first_directive='<'time.h'>'
17578 else
17579 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17580 gl_next_as_first_directive=$gl_cv_next_time_h
17581 fi
17582 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
17583
17584
17585
17586
17587
17588
17589
17590
17591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME_UTC in <time.h>" >&5
17592 $as_echo_n "checking for TIME_UTC in <time.h>... " >&6; }
17593 if ${gl_cv_time_h_has_TIME_UTC+:} false; then :
17594 $as_echo_n "(cached) " >&6
17595 else
17596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17597 /* end confdefs.h. */
17598 #include <time.h>
17599
17600 int
17601 main ()
17602 {
17603 static int x = TIME_UTC; x++;
17604 ;
17605 return 0;
17606 }
17607 _ACEOF
17608 if ac_fn_c_try_compile "$LINENO"; then :
17609 gl_cv_time_h_has_TIME_UTC=yes
17610 else
17611 gl_cv_time_h_has_TIME_UTC=no
17612 fi
17613 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17614 fi
17615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_h_has_TIME_UTC" >&5
17616 $as_echo "$gl_cv_time_h_has_TIME_UTC" >&6; }
17617 if test $gl_cv_time_h_has_TIME_UTC = yes; then
17618 TIME_H_DEFINES_TIME_UTC=1
17619 else
17620 TIME_H_DEFINES_TIME_UTC=0
17621 fi
17622
17623
17624
17625
17626 ac_fn_c_check_decl "$LINENO" "execvpe" "ac_cv_have_decl_execvpe" "$ac_includes_default"
17627 if test "x$ac_cv_have_decl_execvpe" = xyes; then :
17628 ac_have_decl=1
17629 else
17630 ac_have_decl=0
17631 fi
17632
17633 cat >>confdefs.h <<_ACEOF
17634 #define HAVE_DECL_EXECVPE $ac_have_decl
17635 _ACEOF
17636
17637 ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
17638 if test "x$ac_cv_have_decl_unsetenv" = xyes; then :
17639 ac_have_decl=1
17640 else
17641 ac_have_decl=0
17642 fi
17643
17644 cat >>confdefs.h <<_ACEOF
17645 #define HAVE_DECL_UNSETENV $ac_have_decl
17646 _ACEOF
17647
17648
17649
17650
17651
17652 if test $ac_cv_header_crtdefs_h = yes; then
17653 HAVE_CRTDEFS_H=1
17654 else
17655 HAVE_CRTDEFS_H=0
17656 fi
17657
17658
17659
17660 GNULIB_ISWBLANK=0;
17661 GNULIB_ISWDIGIT=0;
17662 GNULIB_ISWXDIGIT=0;
17663 GNULIB_WCTYPE=0;
17664 GNULIB_ISWCTYPE=0;
17665 GNULIB_WCTRANS=0;
17666 GNULIB_TOWCTRANS=0;
17667 HAVE_ISWBLANK=1;
17668 HAVE_WCTYPE_T=1;
17669 HAVE_WCTRANS_T=1;
17670 REPLACE_ISWBLANK=0;
17671 REPLACE_ISWDIGIT=0;
17672 REPLACE_ISWXDIGIT=0;
17673
17674
17675
17676
17677
17678
17679
17680
17681 if false; then
17682 GL_COND_LIBTOOL_TRUE=
17683 GL_COND_LIBTOOL_FALSE='#'
17684 else
17685 GL_COND_LIBTOOL_TRUE='#'
17686 GL_COND_LIBTOOL_FALSE=
17687 fi
17688
17689 gl_cond_libtool=false
17690 gl_libdeps=
17691 gl_ltlibdeps=
17692 gl_m4_base='import/m4'
17693
17694
17695
17696
17697
17698
17699
17700
17701
17702
17703 gl_source_base='import'
17704
17705
17706 if test $ac_cv_func_alloca_works = no; then
17707 :
17708 fi
17709
17710 # Define an additional variable used in the Makefile substitution.
17711 if test $ac_cv_working_alloca_h = yes; then
17712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
17713 $as_echo_n "checking for alloca as a compiler built-in... " >&6; }
17714 if ${gl_cv_rpl_alloca+:} false; then :
17715 $as_echo_n "(cached) " >&6
17716 else
17717
17718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17719 /* end confdefs.h. */
17720
17721 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
17722 Need own alloca
17723 #endif
17724
17725 _ACEOF
17726 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17727 $EGREP "Need own alloca" >/dev/null 2>&1; then :
17728 gl_cv_rpl_alloca=yes
17729 else
17730 gl_cv_rpl_alloca=no
17731 fi
17732 rm -f conftest*
17733
17734
17735 fi
17736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
17737 $as_echo "$gl_cv_rpl_alloca" >&6; }
17738 if test $gl_cv_rpl_alloca = yes; then
17739
17740 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
17741
17742 ALLOCA_H=alloca.h
17743 else
17744 ALLOCA_H=
17745 fi
17746 else
17747 ALLOCA_H=alloca.h
17748 fi
17749
17750 if test -n "$ALLOCA_H"; then
17751 GL_GENERATE_ALLOCA_H_TRUE=
17752 GL_GENERATE_ALLOCA_H_FALSE='#'
17753 else
17754 GL_GENERATE_ALLOCA_H_TRUE='#'
17755 GL_GENERATE_ALLOCA_H_FALSE=
17756 fi
17757
17758
17759 if test $ac_cv_working_alloca_h = yes; then
17760 HAVE_ALLOCA_H=1
17761 else
17762 HAVE_ALLOCA_H=0
17763 fi
17764
17765
17766
17767
17768
17769
17770 if test $ac_cv_header_arpa_inet_h = yes; then
17771 HAVE_ARPA_INET_H=1
17772 else
17773 HAVE_ARPA_INET_H=0
17774 fi
17775
17776
17777
17778
17779
17780
17781
17782
17783
17784
17785 if test $gl_cv_have_include_next = yes; then
17786 gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
17787 else
17788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <arpa/inet.h>" >&5
17789 $as_echo_n "checking absolute name of <arpa/inet.h>... " >&6; }
17790 if ${gl_cv_next_arpa_inet_h+:} false; then :
17791 $as_echo_n "(cached) " >&6
17792 else
17793
17794 if test $ac_cv_header_arpa_inet_h = yes; then
17795
17796
17797
17798
17799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17800 /* end confdefs.h. */
17801 #include <arpa/inet.h>
17802 _ACEOF
17803 case "$host_os" in
17804 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17805 *) gl_absname_cpp="$ac_cpp" ;;
17806 esac
17807
17808 case "$host_os" in
17809 mingw*)
17810 gl_dirsep_regex='[/\\]'
17811 ;;
17812 *)
17813 gl_dirsep_regex='\/'
17814 ;;
17815 esac
17816 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17817 gl_header_literal_regex=`echo 'arpa/inet.h' \
17818 | sed -e "$gl_make_literal_regex_sed"`
17819 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17820 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17821 s|^/[^/]|//&|
17822 p
17823 q
17824 }'
17825
17826 gl_cv_absolute_arpa_inet_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17827 sed -n "$gl_absolute_header_sed"`
17828
17829 gl_header=$gl_cv_absolute_arpa_inet_h
17830 gl_cv_next_arpa_inet_h='"'$gl_header'"'
17831 else
17832 gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
17833 fi
17834
17835
17836 fi
17837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_arpa_inet_h" >&5
17838 $as_echo "$gl_cv_next_arpa_inet_h" >&6; }
17839 fi
17840 NEXT_ARPA_INET_H=$gl_cv_next_arpa_inet_h
17841
17842 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17843 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17844 gl_next_as_first_directive='<'arpa/inet.h'>'
17845 else
17846 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17847 gl_next_as_first_directive=$gl_cv_next_arpa_inet_h
17848 fi
17849 NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H=$gl_next_as_first_directive
17850
17851
17852
17853
17854
17855
17856
17857
17858
17859 if test $ac_cv_header_sys_socket_h = yes; then
17860 HAVE_WS2TCPIP_H=0
17861 else
17862 if test $ac_cv_header_ws2tcpip_h = yes; then
17863 HAVE_WS2TCPIP_H=1
17864 else
17865 HAVE_WS2TCPIP_H=0
17866 fi
17867 fi
17868
17869
17870
17871
17872
17873
17874
17875
17876
17877
17878
17879
17880
17881
17882
17883 if test $ac_cv_func_btowc = no; then
17884 HAVE_BTOWC=0
17885 else
17886
17887
17888
17889
17890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(0) is correct" >&5
17891 $as_echo_n "checking whether btowc(0) is correct... " >&6; }
17892 if ${gl_cv_func_btowc_nul+:} false; then :
17893 $as_echo_n "(cached) " >&6
17894 else
17895
17896 if test "$cross_compiling" = yes; then :
17897
17898 case "$host_os" in
17899 # Guess no on Cygwin.
17900 cygwin*) gl_cv_func_btowc_nul="guessing no" ;;
17901 # Guess yes on native Windows.
17902 mingw*) gl_cv_func_btowc_nul="guessing yes" ;;
17903 # Guess yes otherwise.
17904 *) gl_cv_func_btowc_nul="guessing yes" ;;
17905 esac
17906
17907 else
17908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17909 /* end confdefs.h. */
17910
17911 #include <wchar.h>
17912 int main ()
17913 {
17914 if (btowc ('\0') != 0)
17915 return 1;
17916 return 0;
17917 }
17918 _ACEOF
17919 if ac_fn_c_try_run "$LINENO"; then :
17920 gl_cv_func_btowc_nul=yes
17921 else
17922 gl_cv_func_btowc_nul=no
17923 fi
17924 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17925 conftest.$ac_objext conftest.beam conftest.$ac_ext
17926 fi
17927
17928
17929 fi
17930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_nul" >&5
17931 $as_echo "$gl_cv_func_btowc_nul" >&6; }
17932
17933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(EOF) is correct" >&5
17934 $as_echo_n "checking whether btowc(EOF) is correct... " >&6; }
17935 if ${gl_cv_func_btowc_eof+:} false; then :
17936 $as_echo_n "(cached) " >&6
17937 else
17938
17939 case "$host_os" in
17940 # Guess no on IRIX.
17941 irix*) gl_cv_func_btowc_eof="guessing no" ;;
17942 # Guess yes on native Windows.
17943 mingw*) gl_cv_func_btowc_eof="guessing yes" ;;
17944 # Guess yes otherwise.
17945 *) gl_cv_func_btowc_eof="guessing yes" ;;
17946 esac
17947 if test $LOCALE_FR != none; then
17948 if test "$cross_compiling" = yes; then :
17949 :
17950 else
17951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17952 /* end confdefs.h. */
17953
17954 #include <locale.h>
17955 #include <stdio.h>
17956 #include <wchar.h>
17957 int main ()
17958 {
17959 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
17960 {
17961 if (btowc (EOF) != WEOF)
17962 return 1;
17963 }
17964 return 0;
17965 }
17966 _ACEOF
17967 if ac_fn_c_try_run "$LINENO"; then :
17968 gl_cv_func_btowc_eof=yes
17969 else
17970 gl_cv_func_btowc_eof=no
17971 fi
17972 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17973 conftest.$ac_objext conftest.beam conftest.$ac_ext
17974 fi
17975
17976 fi
17977
17978 fi
17979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5
17980 $as_echo "$gl_cv_func_btowc_eof" >&6; }
17981
17982 case "$gl_cv_func_btowc_nul" in
17983 *yes) ;;
17984 *) REPLACE_BTOWC=1 ;;
17985 esac
17986 case "$gl_cv_func_btowc_eof" in
17987 *yes) ;;
17988 *) REPLACE_BTOWC=1 ;;
17989 esac
17990 fi
17991
17992 if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
17993
17994
17995
17996
17997
17998
17999
18000
18001 gl_LIBOBJS="$gl_LIBOBJS btowc.$ac_objext"
18002
18003
18004 :
18005
18006 fi
18007
18008
18009
18010
18011
18012 GNULIB_BTOWC=1
18013
18014
18015
18016
18017
18018 $as_echo "#define GNULIB_TEST_BTOWC 1" >>confdefs.h
18019
18020
18021
18022
18023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_expect" >&5
18024 $as_echo_n "checking for __builtin_expect... " >&6; }
18025 if ${gl_cv___builtin_expect+:} false; then :
18026 $as_echo_n "(cached) " >&6
18027 else
18028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18029 /* end confdefs.h. */
18030
18031 int
18032 main (int argc, char **argv)
18033 {
18034 argc = __builtin_expect (argc, 100);
18035 return argv[argc != 100][0];
18036 }
18037 _ACEOF
18038 if ac_fn_c_try_link "$LINENO"; then :
18039 gl_cv___builtin_expect=yes
18040 else
18041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18042 /* end confdefs.h. */
18043
18044 #include <builtins.h>
18045 int
18046 main (int argc, char **argv)
18047 {
18048 argc = __builtin_expect (argc, 100);
18049 return argv[argc != 100][0];
18050 }
18051 _ACEOF
18052 if ac_fn_c_try_link "$LINENO"; then :
18053 gl_cv___builtin_expect="in <builtins.h>"
18054 else
18055 gl_cv___builtin_expect=no
18056 fi
18057 rm -f core conftest.err conftest.$ac_objext \
18058 conftest$ac_exeext conftest.$ac_ext
18059 fi
18060 rm -f core conftest.err conftest.$ac_objext \
18061 conftest$ac_exeext conftest.$ac_ext
18062 fi
18063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv___builtin_expect" >&5
18064 $as_echo "$gl_cv___builtin_expect" >&6; }
18065 if test "$gl_cv___builtin_expect" = yes; then
18066 $as_echo "#define HAVE___BUILTIN_EXPECT 1" >>confdefs.h
18067
18068 elif test "$gl_cv___builtin_expect" = "in <builtins.h>"; then
18069 $as_echo "#define HAVE___BUILTIN_EXPECT 2" >>confdefs.h
18070
18071 fi
18072
18073
18074
18075
18076
18077 if test $ac_cv_func_canonicalize_file_name = no; then
18078 HAVE_CANONICALIZE_FILE_NAME=0
18079 if test $ac_cv_func_realpath = no; then
18080 HAVE_REALPATH=0
18081 else
18082 case "$gl_cv_func_realpath_works" in
18083 *yes) ;;
18084 *) REPLACE_REALPATH=1 ;;
18085 esac
18086 fi
18087 else
18088 case "$gl_cv_func_realpath_works" in
18089 *yes)
18090 ;;
18091 *)
18092 REPLACE_CANONICALIZE_FILE_NAME=1
18093 REPLACE_REALPATH=1
18094 ;;
18095 esac
18096 fi
18097
18098 if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
18099
18100
18101
18102
18103
18104
18105
18106
18107 gl_LIBOBJS="$gl_LIBOBJS canonicalize-lgpl.$ac_objext"
18108
18109 fi
18110
18111
18112 cat >>confdefs.h <<_ACEOF
18113 #define GNULIB_CANONICALIZE_LGPL 1
18114 _ACEOF
18115
18116
18117
18118
18119
18120
18121
18122 GNULIB_CANONICALIZE_FILE_NAME=1
18123
18124
18125
18126
18127
18128 $as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
18129
18130
18131
18132
18133
18134
18135
18136
18137 GNULIB_REALPATH=1
18138
18139
18140
18141
18142
18143 $as_echo "#define GNULIB_TEST_REALPATH 1" >>confdefs.h
18144
18145
18146
18147
18148
18149
18150
18151
18152 GNULIB_CHDIR=1
18153
18154
18155
18156
18157
18158 $as_echo "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
18159
18160
18161
18162
18163
18164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this system supports file names of any length" >&5
18165 $as_echo_n "checking whether this system supports file names of any length... " >&6; }
18166 if ${gl_cv_have_unlimited_file_name_length+:} false; then :
18167 $as_echo_n "(cached) " >&6
18168 else
18169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18170 /* end confdefs.h. */
18171
18172 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
18173 #if HAVE_UNISTD_H
18174 # include <unistd.h>
18175 #endif
18176 #include <limits.h>
18177 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
18178 # include <sys/param.h>
18179 #endif
18180 #if !defined PATH_MAX && defined MAXPATHLEN
18181 # define PATH_MAX MAXPATHLEN
18182 #endif
18183 #ifdef __hpux
18184 # undef PATH_MAX
18185 # define PATH_MAX 1024
18186 #endif
18187 #if defined _WIN32 && ! defined __CYGWIN__
18188 # undef PATH_MAX
18189 # define PATH_MAX 260
18190 #endif
18191
18192 #ifdef PATH_MAX
18193 have_arbitrary_file_name_length_limit
18194 #endif
18195 _ACEOF
18196 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18197 $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1; then :
18198 gl_cv_have_unlimited_file_name_length=no
18199 else
18200 gl_cv_have_unlimited_file_name_length=yes
18201 fi
18202 rm -f conftest*
18203
18204 fi
18205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_unlimited_file_name_length" >&5
18206 $as_echo "$gl_cv_have_unlimited_file_name_length" >&6; }
18207
18208 if test $gl_cv_have_unlimited_file_name_length = no; then
18209
18210
18211
18212
18213
18214
18215
18216
18217 gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext"
18218
18219 :
18220 fi
18221
18222 if test $HAVE_CHOWN = 0 || test $REPLACE_CHOWN = 1; then
18223
18224
18225
18226
18227
18228
18229
18230
18231 gl_LIBOBJS="$gl_LIBOBJS chown.$ac_objext"
18232
18233 fi
18234 if test $REPLACE_CHOWN = 1 && test $ac_cv_func_fchown = no; then
18235
18236
18237
18238
18239
18240
18241
18242
18243 gl_LIBOBJS="$gl_LIBOBJS fchown-stub.$ac_objext"
18244
18245 fi
18246
18247
18248
18249
18250
18251 GNULIB_CHOWN=1
18252
18253
18254
18255
18256
18257 $as_echo "#define GNULIB_TEST_CHOWN 1" >>confdefs.h
18258
18259
18260
18261
18262
18263
18264 # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
18265 # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
18266
18267 # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all*
18268 # programs in the package would end up linked with that potentially-shared
18269 # library, inducing unnecessary run-time overhead.
18270 LIB_CLOCK_GETTIME=
18271
18272 gl_saved_libs=$LIBS
18273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
18274 $as_echo_n "checking for library containing clock_gettime... " >&6; }
18275 if ${ac_cv_search_clock_gettime+:} false; then :
18276 $as_echo_n "(cached) " >&6
18277 else
18278 ac_func_search_save_LIBS=$LIBS
18279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18280 /* end confdefs.h. */
18281
18282 /* Override any GCC internal prototype to avoid an error.
18283 Use char because int might match the return type of a GCC
18284 builtin and then its argument prototype would still apply. */
18285 #ifdef __cplusplus
18286 extern "C"
18287 #endif
18288 char clock_gettime ();
18289 int
18290 main ()
18291 {
18292 return clock_gettime ();
18293 ;
18294 return 0;
18295 }
18296 _ACEOF
18297 for ac_lib in '' rt posix4; do
18298 if test -z "$ac_lib"; then
18299 ac_res="none required"
18300 else
18301 ac_res=-l$ac_lib
18302 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18303 fi
18304 if ac_fn_c_try_link "$LINENO"; then :
18305 ac_cv_search_clock_gettime=$ac_res
18306 fi
18307 rm -f core conftest.err conftest.$ac_objext \
18308 conftest$ac_exeext
18309 if ${ac_cv_search_clock_gettime+:} false; then :
18310 break
18311 fi
18312 done
18313 if ${ac_cv_search_clock_gettime+:} false; then :
18314
18315 else
18316 ac_cv_search_clock_gettime=no
18317 fi
18318 rm conftest.$ac_ext
18319 LIBS=$ac_func_search_save_LIBS
18320 fi
18321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
18322 $as_echo "$ac_cv_search_clock_gettime" >&6; }
18323 ac_res=$ac_cv_search_clock_gettime
18324 if test "$ac_res" != no; then :
18325 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18326 test "$ac_cv_search_clock_gettime" = "none required" ||
18327 LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
18328 fi
18329
18330 for ac_func in clock_gettime clock_settime
18331 do :
18332 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18333 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
18334 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
18335 cat >>confdefs.h <<_ACEOF
18336 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
18337 _ACEOF
18338
18339 fi
18340 done
18341
18342 LIBS=$gl_saved_libs
18343
18344
18345
18346 $as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
18347
18348
18349
18350
18351
18352
18353 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
18354 REPLACE_CLOSE=1
18355 fi
18356
18357
18358
18359
18360
18361
18362 if test $ac_cv_header_sys_socket_h != yes; then
18363 for ac_header in winsock2.h
18364 do :
18365 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
18366 if test "x$ac_cv_header_winsock2_h" = xyes; then :
18367 cat >>confdefs.h <<_ACEOF
18368 #define HAVE_WINSOCK2_H 1
18369 _ACEOF
18370
18371 fi
18372
18373 done
18374
18375 fi
18376 if test "$ac_cv_header_winsock2_h" = yes; then
18377 HAVE_WINSOCK2_H=1
18378 UNISTD_H_HAVE_WINSOCK2_H=1
18379 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
18380 else
18381 HAVE_WINSOCK2_H=0
18382 fi
18383
18384
18385 if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
18386 REPLACE_CLOSE=1
18387 fi
18388
18389
18390 if test $REPLACE_CLOSE = 0; then
18391
18392
18393
18394 if test $ac_cv_func_fchdir = no; then
18395 HAVE_FCHDIR=0
18396 fi
18397
18398 if test $HAVE_FCHDIR = 0; then
18399 REPLACE_CLOSE=1
18400 fi
18401 fi
18402
18403
18404 if test $REPLACE_CLOSE = 1; then
18405
18406
18407
18408
18409
18410
18411
18412
18413 gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
18414
18415 fi
18416
18417
18418
18419
18420
18421 GNULIB_CLOSE=1
18422
18423
18424
18425
18426
18427 $as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
18428
18429
18430
18431
18432
18433
18434 for ac_func in closedir
18435 do :
18436 ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir"
18437 if test "x$ac_cv_func_closedir" = xyes; then :
18438 cat >>confdefs.h <<_ACEOF
18439 #define HAVE_CLOSEDIR 1
18440 _ACEOF
18441
18442 fi
18443 done
18444
18445 if test $ac_cv_func_closedir = no; then
18446 HAVE_CLOSEDIR=0
18447 fi
18448
18449
18450
18451
18452 if test $ac_cv_func_fchdir = no; then
18453 HAVE_FCHDIR=0
18454 fi
18455
18456 if test $HAVE_FCHDIR = 0; then
18457 if test $HAVE_CLOSEDIR = 1; then
18458 REPLACE_CLOSEDIR=1
18459 fi
18460 fi
18461
18462 case $host_os,$HAVE_CLOSEDIR in
18463 os2*,1)
18464 REPLACE_CLOSEDIR=1;;
18465 esac
18466
18467 if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
18468
18469
18470
18471
18472
18473
18474
18475
18476 gl_LIBOBJS="$gl_LIBOBJS closedir.$ac_objext"
18477
18478 fi
18479
18480
18481
18482
18483
18484 GNULIB_CLOSEDIR=1
18485
18486
18487
18488
18489
18490 $as_echo "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
18491
18492
18493
18494
18495
18496
18497
18498
18499
18500
18501
18502
18503
18504
18505 if test $gl_cv_have_include_next = yes; then
18506 gl_cv_next_ctype_h='<'ctype.h'>'
18507 else
18508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <ctype.h>" >&5
18509 $as_echo_n "checking absolute name of <ctype.h>... " >&6; }
18510 if ${gl_cv_next_ctype_h+:} false; then :
18511 $as_echo_n "(cached) " >&6
18512 else
18513
18514
18515
18516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18517 /* end confdefs.h. */
18518 #include <ctype.h>
18519 _ACEOF
18520 case "$host_os" in
18521 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18522 *) gl_absname_cpp="$ac_cpp" ;;
18523 esac
18524
18525 case "$host_os" in
18526 mingw*)
18527 gl_dirsep_regex='[/\\]'
18528 ;;
18529 *)
18530 gl_dirsep_regex='\/'
18531 ;;
18532 esac
18533 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18534 gl_header_literal_regex=`echo 'ctype.h' \
18535 | sed -e "$gl_make_literal_regex_sed"`
18536 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18537 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18538 s|^/[^/]|//&|
18539 p
18540 q
18541 }'
18542
18543 gl_cv_absolute_ctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18544 sed -n "$gl_absolute_header_sed"`
18545
18546 gl_header=$gl_cv_absolute_ctype_h
18547 gl_cv_next_ctype_h='"'$gl_header'"'
18548
18549
18550 fi
18551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_ctype_h" >&5
18552 $as_echo "$gl_cv_next_ctype_h" >&6; }
18553 fi
18554 NEXT_CTYPE_H=$gl_cv_next_ctype_h
18555
18556 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18557 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18558 gl_next_as_first_directive='<'ctype.h'>'
18559 else
18560 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18561 gl_next_as_first_directive=$gl_cv_next_ctype_h
18562 fi
18563 NEXT_AS_FIRST_DIRECTIVE_CTYPE_H=$gl_next_as_first_directive
18564
18565
18566
18567
18568
18569
18570
18571
18572
18573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
18574 $as_echo_n "checking for d_ino member in directory struct... " >&6; }
18575 if ${gl_cv_struct_dirent_d_ino+:} false; then :
18576 $as_echo_n "(cached) " >&6
18577 else
18578 if test "$cross_compiling" = yes; then :
18579 case "$host_os" in
18580 # Guess yes on glibc systems with Linux kernel.
18581 linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
18582 # Guess yes on musl systems with Linux kernel.
18583 linux*-musl*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
18584 # Guess no on native Windows.
18585 mingw*) gl_cv_struct_dirent_d_ino="guessing no" ;;
18586 # If we don't know, obey --enable-cross-guesses.
18587 *) gl_cv_struct_dirent_d_ino="$gl_cross_guess_normal" ;;
18588 esac
18589
18590 else
18591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18592 /* end confdefs.h. */
18593 #include <sys/types.h>
18594 #include <sys/stat.h>
18595 #include <dirent.h>
18596
18597 int
18598 main ()
18599 {
18600 DIR *dp = opendir (".");
18601 struct dirent *e;
18602 struct stat st;
18603 if (! dp)
18604 return 1;
18605 e = readdir (dp);
18606 if (! e)
18607 { closedir (dp); return 2; }
18608 if (lstat (e->d_name, &st) != 0)
18609 { closedir (dp); return 3; }
18610 if (e->d_ino != st.st_ino)
18611 { closedir (dp); return 4; }
18612 closedir (dp);
18613 return 0;
18614
18615 ;
18616 return 0;
18617 }
18618 _ACEOF
18619 if ac_fn_c_try_run "$LINENO"; then :
18620 gl_cv_struct_dirent_d_ino=yes
18621 else
18622 gl_cv_struct_dirent_d_ino=no
18623 fi
18624 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18625 conftest.$ac_objext conftest.beam conftest.$ac_ext
18626 fi
18627
18628 fi
18629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5
18630 $as_echo "$gl_cv_struct_dirent_d_ino" >&6; }
18631 case "$gl_cv_struct_dirent_d_ino" in
18632 *yes)
18633
18634 $as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h
18635
18636 ;;
18637 esac
18638
18639
18640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_type member in directory struct" >&5
18641 $as_echo_n "checking for d_type member in directory struct... " >&6; }
18642 if ${gl_cv_struct_dirent_d_type+:} false; then :
18643 $as_echo_n "(cached) " >&6
18644 else
18645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18646 /* end confdefs.h. */
18647
18648 #include <sys/types.h>
18649 #include <dirent.h>
18650
18651 int
18652 main ()
18653 {
18654 struct dirent dp; dp.d_type = 0;
18655 ;
18656 return 0;
18657 }
18658 _ACEOF
18659 if ac_fn_c_try_link "$LINENO"; then :
18660 gl_cv_struct_dirent_d_type=yes
18661 else
18662 gl_cv_struct_dirent_d_type=no
18663 fi
18664 rm -f core conftest.err conftest.$ac_objext \
18665 conftest$ac_exeext conftest.$ac_ext
18666
18667
18668 fi
18669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_type" >&5
18670 $as_echo "$gl_cv_struct_dirent_d_type" >&6; }
18671 if test $gl_cv_struct_dirent_d_type = yes; then
18672
18673 $as_echo "#define HAVE_STRUCT_DIRENT_D_TYPE 1" >>confdefs.h
18674
18675 fi
18676
18677
18678
18679
18680
18681
18682
18683
18684
18685
18686
18687
18688
18689
18690 if test $gl_cv_have_include_next = yes; then
18691 gl_cv_next_dirent_h='<'dirent.h'>'
18692 else
18693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
18694 $as_echo_n "checking absolute name of <dirent.h>... " >&6; }
18695 if ${gl_cv_next_dirent_h+:} false; then :
18696 $as_echo_n "(cached) " >&6
18697 else
18698
18699 if test $ac_cv_header_dirent_h = yes; then
18700
18701
18702
18703
18704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18705 /* end confdefs.h. */
18706 #include <dirent.h>
18707 _ACEOF
18708 case "$host_os" in
18709 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18710 *) gl_absname_cpp="$ac_cpp" ;;
18711 esac
18712
18713 case "$host_os" in
18714 mingw*)
18715 gl_dirsep_regex='[/\\]'
18716 ;;
18717 *)
18718 gl_dirsep_regex='\/'
18719 ;;
18720 esac
18721 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18722 gl_header_literal_regex=`echo 'dirent.h' \
18723 | sed -e "$gl_make_literal_regex_sed"`
18724 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18725 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18726 s|^/[^/]|//&|
18727 p
18728 q
18729 }'
18730
18731 gl_cv_absolute_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18732 sed -n "$gl_absolute_header_sed"`
18733
18734 gl_header=$gl_cv_absolute_dirent_h
18735 gl_cv_next_dirent_h='"'$gl_header'"'
18736 else
18737 gl_cv_next_dirent_h='<'dirent.h'>'
18738 fi
18739
18740
18741 fi
18742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
18743 $as_echo "$gl_cv_next_dirent_h" >&6; }
18744 fi
18745 NEXT_DIRENT_H=$gl_cv_next_dirent_h
18746
18747 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18748 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18749 gl_next_as_first_directive='<'dirent.h'>'
18750 else
18751 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18752 gl_next_as_first_directive=$gl_cv_next_dirent_h
18753 fi
18754 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
18755
18756
18757
18758
18759 if test $ac_cv_header_dirent_h = yes; then
18760 HAVE_DIRENT_H=1
18761 else
18762 HAVE_DIRENT_H=0
18763 fi
18764
18765
18766
18767
18768
18769
18770
18771
18772
18773
18774
18775 for ac_func in dirfd
18776 do :
18777 ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
18778 if test "x$ac_cv_func_dirfd" = xyes; then :
18779 cat >>confdefs.h <<_ACEOF
18780 #define HAVE_DIRFD 1
18781 _ACEOF
18782
18783 fi
18784 done
18785
18786 ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
18787 #include <dirent.h>
18788 "
18789 if test "x$ac_cv_have_decl_dirfd" = xyes; then :
18790 ac_have_decl=1
18791 else
18792 ac_have_decl=0
18793 fi
18794
18795 cat >>confdefs.h <<_ACEOF
18796 #define HAVE_DECL_DIRFD $ac_have_decl
18797 _ACEOF
18798
18799 if test $ac_cv_have_decl_dirfd = no; then
18800 HAVE_DECL_DIRFD=0
18801 fi
18802
18803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
18804 $as_echo_n "checking whether dirfd is a macro... " >&6; }
18805 if ${gl_cv_func_dirfd_macro+:} false; then :
18806 $as_echo_n "(cached) " >&6
18807 else
18808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18809 /* end confdefs.h. */
18810
18811 #include <sys/types.h>
18812 #include <dirent.h>
18813 #ifdef dirfd
18814 dirent_header_defines_dirfd
18815 #endif
18816 _ACEOF
18817 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18818 $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1; then :
18819 gl_cv_func_dirfd_macro=yes
18820 else
18821 gl_cv_func_dirfd_macro=no
18822 fi
18823 rm -f conftest*
18824
18825 fi
18826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
18827 $as_echo "$gl_cv_func_dirfd_macro" >&6; }
18828
18829 # Use the replacement if we have no function or macro with that name,
18830 # or if OS/2 kLIBC whose dirfd() does not work.
18831 # Replace only if the system declares dirfd already.
18832 case $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro,$host_os,$ac_cv_have_decl_dirfd in
18833 no,no,*,yes | *,*,os2*,yes)
18834 REPLACE_DIRFD=1
18835
18836 $as_echo "#define REPLACE_DIRFD 1" >>confdefs.h
18837 ;;
18838 esac
18839
18840 if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \
18841 || test $REPLACE_DIRFD = 1; then
18842
18843
18844
18845
18846
18847
18848
18849
18850 gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext"
18851
18852
18853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
18854 $as_echo_n "checking how to get the file descriptor associated with an open DIR*... " >&6; }
18855 if ${gl_cv_sys_dir_fd_member_name+:} false; then :
18856 $as_echo_n "(cached) " >&6
18857 else
18858
18859 dirfd_save_CFLAGS=$CFLAGS
18860 for ac_expr in d_fd dd_fd; do
18861
18862 CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
18863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18864 /* end confdefs.h. */
18865
18866 #include <sys/types.h>
18867 #include <dirent.h>
18868 int
18869 main ()
18870 {
18871 DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
18872 ;
18873 return 0;
18874 }
18875 _ACEOF
18876 if ac_fn_c_try_compile "$LINENO"; then :
18877 dir_fd_found=yes
18878
18879 fi
18880 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18881 CFLAGS=$dirfd_save_CFLAGS
18882 test "$dir_fd_found" = yes && break
18883 done
18884 test "$dir_fd_found" = yes || ac_expr=no_such_member
18885
18886 gl_cv_sys_dir_fd_member_name=$ac_expr
18887
18888
18889 fi
18890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
18891 $as_echo "$gl_cv_sys_dir_fd_member_name" >&6; }
18892 if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
18893
18894 cat >>confdefs.h <<_ACEOF
18895 #define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name
18896 _ACEOF
18897
18898 fi
18899
18900
18901 fi
18902
18903
18904
18905
18906
18907 GNULIB_DIRFD=1
18908
18909
18910
18911
18912
18913 $as_echo "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
18914
18915
18916
18917
18918
18919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
18920 $as_echo_n "checking whether // is distinct from /... " >&6; }
18921 if ${gl_cv_double_slash_root+:} false; then :
18922 $as_echo_n "(cached) " >&6
18923 else
18924 if test x"$cross_compiling" = xyes ; then
18925 # When cross-compiling, there is no way to tell whether // is special
18926 # short of a list of hosts. However, the only known hosts to date
18927 # that have a distinct // are Apollo DomainOS (too old to port to),
18928 # Cygwin, and z/OS. If anyone knows of another system for which // has
18929 # special semantics and is distinct from /, please report it to
18930 # <bug-gnulib@gnu.org>.
18931 case $host in
18932 *-cygwin | i370-ibm-openedition)
18933 gl_cv_double_slash_root=yes ;;
18934 *)
18935 # Be optimistic and assume that / and // are the same when we
18936 # don't know.
18937 gl_cv_double_slash_root='unknown, assuming no' ;;
18938 esac
18939 else
18940 set x `ls -di / // 2>/dev/null`
18941 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
18942 gl_cv_double_slash_root=no
18943 else
18944 gl_cv_double_slash_root=yes
18945 fi
18946 fi
18947 fi
18948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
18949 $as_echo "$gl_cv_double_slash_root" >&6; }
18950 if test "$gl_cv_double_slash_root" = yes; then
18951
18952 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
18953
18954 fi
18955
18956
18957
18958
18959
18960 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
18961 REPLACE_DUP=1
18962 fi
18963
18964
18965
18966
18967
18968 if test $ac_cv_func_fchdir = no; then
18969 HAVE_FCHDIR=0
18970 fi
18971
18972 if test $HAVE_FCHDIR = 0; then
18973 REPLACE_DUP=1
18974 fi
18975
18976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup works" >&5
18977 $as_echo_n "checking whether dup works... " >&6; }
18978 if ${gl_cv_func_dup_works+:} false; then :
18979 $as_echo_n "(cached) " >&6
18980 else
18981 if test "$cross_compiling" = yes; then :
18982 case "$host_os" in
18983 # Guess no on native Windows.
18984 mingw*) gl_cv_func_dup_works="guessing no" ;;
18985 *) gl_cv_func_dup_works="guessing yes" ;;
18986 esac
18987
18988 else
18989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18990 /* end confdefs.h. */
18991 #include <unistd.h>
18992 #include <fcntl.h>
18993 #include <errno.h>
18994
18995
18996 $gl_mda_defines
18997
18998 int
18999 main ()
19000 {
19001 /* On OS/2 kLIBC, dup does not work on a directory fd. */
19002 int fd = open (".", O_RDONLY);
19003 return fd < 0 ? 1 : dup (fd) < 0 ? 2 : 0;
19004
19005 ;
19006 return 0;
19007 }
19008
19009 _ACEOF
19010 if ac_fn_c_try_run "$LINENO"; then :
19011 gl_cv_func_dup_works=yes
19012 else
19013 gl_cv_func_dup_works=no
19014 fi
19015 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19016 conftest.$ac_objext conftest.beam conftest.$ac_ext
19017 fi
19018
19019
19020 fi
19021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup_works" >&5
19022 $as_echo "$gl_cv_func_dup_works" >&6; }
19023 case "$gl_cv_func_dup_works" in
19024 *yes) ;;
19025 *)
19026 REPLACE_DUP=1
19027 ;;
19028 esac
19029
19030 if test $REPLACE_DUP = 1; then
19031
19032
19033
19034
19035
19036
19037
19038
19039 gl_LIBOBJS="$gl_LIBOBJS dup.$ac_objext"
19040
19041 :
19042 fi
19043
19044
19045
19046
19047
19048 GNULIB_DUP=1
19049
19050
19051
19052
19053
19054 $as_echo "#define GNULIB_TEST_DUP 1" >>confdefs.h
19055
19056
19057
19058
19059
19060
19061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
19062 $as_echo_n "checking whether dup2 works... " >&6; }
19063 if ${gl_cv_func_dup2_works+:} false; then :
19064 $as_echo_n "(cached) " >&6
19065 else
19066 if test "$cross_compiling" = yes; then :
19067 case "$host_os" in
19068 mingw*) # on this platform, dup2 always returns 0 for success
19069 gl_cv_func_dup2_works="guessing no" ;;
19070 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
19071 gl_cv_func_dup2_works="guessing no" ;;
19072 aix* | freebsd*)
19073 # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
19074 # not EBADF.
19075 gl_cv_func_dup2_works="guessing no" ;;
19076 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
19077 gl_cv_func_dup2_works="guessing no" ;;
19078 *-android*) # implemented using dup3(), which fails if oldfd == newfd
19079 gl_cv_func_dup2_works="guessing no" ;;
19080 os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
19081 gl_cv_func_dup2_works="guessing no" ;;
19082 *) gl_cv_func_dup2_works="guessing yes" ;;
19083 esac
19084 else
19085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19086 /* end confdefs.h. */
19087
19088 #include <errno.h>
19089 #include <fcntl.h>
19090 #include <limits.h>
19091 #include <sys/resource.h>
19092 #include <unistd.h>
19093
19094
19095 $gl_mda_defines
19096
19097 #ifndef RLIM_SAVED_CUR
19098 # define RLIM_SAVED_CUR RLIM_INFINITY
19099 #endif
19100 #ifndef RLIM_SAVED_MAX
19101 # define RLIM_SAVED_MAX RLIM_INFINITY
19102 #endif
19103
19104 int
19105 main ()
19106 {
19107 int result = 0;
19108 int bad_fd = INT_MAX;
19109 struct rlimit rlim;
19110 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
19111 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
19112 && rlim.rlim_cur != RLIM_INFINITY
19113 && rlim.rlim_cur != RLIM_SAVED_MAX
19114 && rlim.rlim_cur != RLIM_SAVED_CUR)
19115 bad_fd = rlim.rlim_cur;
19116 #ifdef FD_CLOEXEC
19117 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
19118 result |= 1;
19119 #endif
19120 if (dup2 (1, 1) != 1)
19121 result |= 2;
19122 #ifdef FD_CLOEXEC
19123 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
19124 result |= 4;
19125 #endif
19126 close (0);
19127 if (dup2 (0, 0) != -1)
19128 result |= 8;
19129 /* Many gnulib modules require POSIX conformance of EBADF. */
19130 if (dup2 (2, bad_fd) == -1 && errno != EBADF)
19131 result |= 16;
19132 /* Flush out some cygwin core dumps. */
19133 if (dup2 (2, -1) != -1 || errno != EBADF)
19134 result |= 32;
19135 dup2 (2, 255);
19136 dup2 (2, 256);
19137 /* On OS/2 kLIBC, dup2() does not work on a directory fd. */
19138 {
19139 int fd = open (".", O_RDONLY);
19140 if (fd == -1)
19141 result |= 64;
19142 else if (dup2 (fd, fd + 1) == -1)
19143 result |= 128;
19144 close (fd);
19145 }
19146 return result;
19147 ;
19148 return 0;
19149 }
19150
19151 _ACEOF
19152 if ac_fn_c_try_run "$LINENO"; then :
19153 gl_cv_func_dup2_works=yes
19154 else
19155 gl_cv_func_dup2_works=no
19156 fi
19157 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19158 conftest.$ac_objext conftest.beam conftest.$ac_ext
19159 fi
19160
19161
19162 fi
19163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
19164 $as_echo "$gl_cv_func_dup2_works" >&6; }
19165 case "$gl_cv_func_dup2_works" in
19166 *yes) ;;
19167 *)
19168 REPLACE_DUP2=1
19169 for ac_func in setdtablesize
19170 do :
19171 ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
19172 if test "x$ac_cv_func_setdtablesize" = xyes; then :
19173 cat >>confdefs.h <<_ACEOF
19174 #define HAVE_SETDTABLESIZE 1
19175 _ACEOF
19176
19177 fi
19178 done
19179
19180 ;;
19181 esac
19182
19183
19184
19185
19186 if test $ac_cv_func_fchdir = no; then
19187 HAVE_FCHDIR=0
19188 fi
19189
19190 if test $HAVE_FCHDIR = 0; then
19191 REPLACE_DUP2=1
19192 fi
19193
19194
19195 if test $REPLACE_DUP2 = 1; then
19196
19197
19198
19199
19200
19201
19202
19203
19204 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
19205
19206
19207 fi
19208
19209
19210
19211
19212
19213 GNULIB_DUP2=1
19214
19215
19216
19217
19218
19219 $as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h
19220
19221
19222
19223
19224
19225
19226
19227
19228
19229 GNULIB_ENVIRON=1
19230
19231
19232
19233
19234
19235 $as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
19236
19237
19238
19239
19240
19241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
19242 $as_echo_n "checking for error_at_line... " >&6; }
19243 if ${ac_cv_lib_error_at_line+:} false; then :
19244 $as_echo_n "(cached) " >&6
19245 else
19246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19247 /* end confdefs.h. */
19248 #include <error.h>
19249 int
19250 main ()
19251 {
19252 error_at_line (0, 0, "", 0, "an error occurred");
19253 ;
19254 return 0;
19255 }
19256 _ACEOF
19257 if ac_fn_c_try_link "$LINENO"; then :
19258 ac_cv_lib_error_at_line=yes
19259 else
19260 ac_cv_lib_error_at_line=no
19261 fi
19262 rm -f core conftest.err conftest.$ac_objext \
19263 conftest$ac_exeext conftest.$ac_ext
19264 fi
19265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
19266 $as_echo "$ac_cv_lib_error_at_line" >&6; }
19267
19268 if test $ac_cv_lib_error_at_line = no; then
19269
19270
19271
19272
19273
19274
19275
19276
19277 gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
19278
19279
19280
19281 :
19282
19283 fi
19284
19285
19286
19287
19288
19289
19290
19291 if test $ac_cv_have_decl_fchdir = no; then
19292 HAVE_DECL_FCHDIR=0
19293 fi
19294
19295
19296 if test $HAVE_FCHDIR = 0; then
19297
19298
19299
19300
19301
19302
19303
19304
19305 gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext"
19306
19307 :
19308
19309 $as_echo "#define REPLACE_FCHDIR 1" >>confdefs.h
19310
19311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5
19312 $as_echo_n "checking whether open can visit directories... " >&6; }
19313 if ${gl_cv_func_open_directory_works+:} false; then :
19314 $as_echo_n "(cached) " >&6
19315 else
19316 if test "$cross_compiling" = yes; then :
19317 case "$host_os" in
19318 # Guess yes on Linux systems.
19319 linux-* | linux) gl_cv_func_open_directory_works="guessing yes" ;;
19320 # Guess yes on glibc systems.
19321 *-gnu* | gnu*) gl_cv_func_open_directory_works="guessing yes" ;;
19322 # Guess no on native Windows.
19323 mingw*) gl_cv_func_open_directory_works="guessing no" ;;
19324 # If we don't know, obey --enable-cross-guesses.
19325 *) gl_cv_func_open_directory_works="$gl_cross_guess_normal" ;;
19326 esac
19327
19328 else
19329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19330 /* end confdefs.h. */
19331 #include <fcntl.h>
19332
19333
19334 $gl_mda_defines
19335
19336 int
19337 main ()
19338 {
19339 return open(".", O_RDONLY) < 0;
19340 ;
19341 return 0;
19342 }
19343 _ACEOF
19344 if ac_fn_c_try_run "$LINENO"; then :
19345 gl_cv_func_open_directory_works=yes
19346 else
19347 gl_cv_func_open_directory_works=no
19348 fi
19349 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19350 conftest.$ac_objext conftest.beam conftest.$ac_ext
19351 fi
19352
19353 fi
19354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5
19355 $as_echo "$gl_cv_func_open_directory_works" >&6; }
19356 case "$gl_cv_func_open_directory_works" in
19357 *yes) ;;
19358 *)
19359
19360 $as_echo "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h
19361
19362 ;;
19363 esac
19364 fi
19365
19366
19367
19368
19369
19370
19371 GNULIB_FCHDIR=1
19372
19373
19374
19375
19376
19377 $as_echo "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h
19378
19379
19380
19381
19382
19383
19384
19385
19386 if test $ac_cv_func_fcntl = no; then
19387
19388
19389
19390 if test $ac_cv_func_fcntl = no; then
19391 HAVE_FCNTL=0
19392 else
19393 REPLACE_FCNTL=1
19394 fi
19395
19396 else
19397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
19398 $as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
19399 if ${gl_cv_func_fcntl_f_dupfd_works+:} false; then :
19400 $as_echo_n "(cached) " >&6
19401 else
19402 if test "$cross_compiling" = yes; then :
19403 case $host_os in
19404 aix* | cygwin* | haiku*)
19405 gl_cv_func_fcntl_f_dupfd_works="guessing no" ;;
19406 *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;;
19407 esac
19408 else
19409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19410 /* end confdefs.h. */
19411 #include <errno.h>
19412 #include <fcntl.h>
19413 #include <limits.h>
19414 #include <sys/resource.h>
19415 #include <unistd.h>
19416
19417
19418 $gl_mda_defines
19419
19420 #ifndef RLIM_SAVED_CUR
19421 # define RLIM_SAVED_CUR RLIM_INFINITY
19422 #endif
19423 #ifndef RLIM_SAVED_MAX
19424 # define RLIM_SAVED_MAX RLIM_INFINITY
19425 #endif
19426
19427 int
19428 main ()
19429 {
19430 int result = 0;
19431 int bad_fd = INT_MAX;
19432 struct rlimit rlim;
19433 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
19434 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
19435 && rlim.rlim_cur != RLIM_INFINITY
19436 && rlim.rlim_cur != RLIM_SAVED_MAX
19437 && rlim.rlim_cur != RLIM_SAVED_CUR)
19438 bad_fd = rlim.rlim_cur;
19439 if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
19440 if (errno != EINVAL) result |= 2;
19441 if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
19442 if (errno != EINVAL) result |= 8;
19443 /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */
19444 {
19445 int fd;
19446 fd = open (".", O_RDONLY);
19447 if (fd == -1)
19448 result |= 16;
19449 else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1)
19450 result |= 32;
19451
19452 close (fd);
19453 }
19454 return result;
19455 ;
19456 return 0;
19457 }
19458 _ACEOF
19459 if ac_fn_c_try_run "$LINENO"; then :
19460 gl_cv_func_fcntl_f_dupfd_works=yes
19461 else
19462 gl_cv_func_fcntl_f_dupfd_works=no
19463 fi
19464 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19465 conftest.$ac_objext conftest.beam conftest.$ac_ext
19466 fi
19467
19468 fi
19469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
19470 $as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
19471 case $gl_cv_func_fcntl_f_dupfd_works in
19472 *yes) ;;
19473 *)
19474
19475
19476 if test $ac_cv_func_fcntl = no; then
19477 HAVE_FCNTL=0
19478 else
19479 REPLACE_FCNTL=1
19480 fi
19481
19482
19483 $as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
19484 ;;
19485 esac
19486
19487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
19488 $as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
19489 if ${gl_cv_func_fcntl_f_dupfd_cloexec+:} false; then :
19490 $as_echo_n "(cached) " >&6
19491 else
19492 if test "$cross_compiling" = yes; then :
19493 case "$host_os" in
19494 # Guess no on NetBSD.
19495 netbsd*) gl_cv_func_fcntl_f_dupfd_cloexec="guessing no" ;;
19496 *) gl_cv_func_fcntl_f_dupfd_cloexec="$gl_cross_guess_normal" ;;
19497 esac
19498
19499 else
19500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19501 /* end confdefs.h. */
19502 #include <fcntl.h>
19503 #include <unistd.h>
19504 int main (int argc, char *argv[])
19505 {
19506 if (argc == 1)
19507 /* parent process */
19508 {
19509 if (fcntl (1, F_DUPFD_CLOEXEC, 10) < 0)
19510 return 1;
19511 return execl ("./conftest", "./conftest", "child", NULL);
19512 }
19513 else
19514 /* child process */
19515 return (fcntl (10, F_GETFL) < 0 ? 0 : 42);
19516 }
19517
19518
19519 _ACEOF
19520 if ac_fn_c_try_run "$LINENO"; then :
19521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19522 /* end confdefs.h. */
19523
19524 #ifdef __linux__
19525 /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
19526 it to support the semantics on older kernels that failed with EINVAL. */
19527 choke me
19528 #endif
19529
19530 int
19531 main ()
19532 {
19533
19534 ;
19535 return 0;
19536 }
19537 _ACEOF
19538 if ac_fn_c_try_compile "$LINENO"; then :
19539 gl_cv_func_fcntl_f_dupfd_cloexec=yes
19540 else
19541 gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
19542 fi
19543 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19544
19545 else
19546 gl_cv_func_fcntl_f_dupfd_cloexec=no
19547 fi
19548 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19549 conftest.$ac_objext conftest.beam conftest.$ac_ext
19550 fi
19551
19552
19553 fi
19554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
19555 $as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
19556 case "$gl_cv_func_fcntl_f_dupfd_cloexec" in
19557 *yes) ;;
19558 *)
19559
19560
19561 if test $ac_cv_func_fcntl = no; then
19562 HAVE_FCNTL=0
19563 else
19564 REPLACE_FCNTL=1
19565 fi
19566
19567 ;;
19568 esac
19569 fi
19570
19571
19572
19573
19574 if test $ac_cv_func_fchdir = no; then
19575 HAVE_FCHDIR=0
19576 fi
19577
19578 if test $HAVE_FCHDIR = 0; then
19579
19580
19581
19582 if test $ac_cv_func_fcntl = no; then
19583 HAVE_FCNTL=0
19584 else
19585 REPLACE_FCNTL=1
19586 fi
19587
19588 fi
19589
19590
19591 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
19592
19593
19594
19595
19596
19597
19598
19599
19600 gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
19601
19602 fi
19603
19604
19605
19606
19607
19608 GNULIB_FCNTL=1
19609
19610
19611
19612
19613
19614 $as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
19615
19616
19617
19618
19619
19620
19621
19622
19623
19624
19625
19626
19627
19628
19629 if test $gl_cv_have_include_next = yes; then
19630 gl_cv_next_fcntl_h='<'fcntl.h'>'
19631 else
19632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
19633 $as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
19634 if ${gl_cv_next_fcntl_h+:} false; then :
19635 $as_echo_n "(cached) " >&6
19636 else
19637
19638
19639
19640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19641 /* end confdefs.h. */
19642 #include <fcntl.h>
19643 _ACEOF
19644 case "$host_os" in
19645 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19646 *) gl_absname_cpp="$ac_cpp" ;;
19647 esac
19648
19649 case "$host_os" in
19650 mingw*)
19651 gl_dirsep_regex='[/\\]'
19652 ;;
19653 *)
19654 gl_dirsep_regex='\/'
19655 ;;
19656 esac
19657 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19658 gl_header_literal_regex=`echo 'fcntl.h' \
19659 | sed -e "$gl_make_literal_regex_sed"`
19660 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19661 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19662 s|^/[^/]|//&|
19663 p
19664 q
19665 }'
19666
19667 gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19668 sed -n "$gl_absolute_header_sed"`
19669
19670 gl_header=$gl_cv_absolute_fcntl_h
19671 gl_cv_next_fcntl_h='"'$gl_header'"'
19672
19673
19674 fi
19675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
19676 $as_echo "$gl_cv_next_fcntl_h" >&6; }
19677 fi
19678 NEXT_FCNTL_H=$gl_cv_next_fcntl_h
19679
19680 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19681 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19682 gl_next_as_first_directive='<'fcntl.h'>'
19683 else
19684 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19685 gl_next_as_first_directive=$gl_cv_next_fcntl_h
19686 fi
19687 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
19688
19689
19690
19691
19692
19693
19694
19695
19696
19697
19698
19699
19700
19701
19702
19703 cat >>confdefs.h <<_ACEOF
19704 #define GNULIB_FD_SAFER_FLAG 1
19705 _ACEOF
19706
19707
19708
19709
19710
19711
19712
19713 ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
19714 #include <dirent.h>
19715
19716 "
19717 if test "x$ac_cv_have_decl_fdopendir" = xyes; then :
19718 ac_have_decl=1
19719 else
19720 ac_have_decl=0
19721 fi
19722
19723 cat >>confdefs.h <<_ACEOF
19724 #define HAVE_DECL_FDOPENDIR $ac_have_decl
19725 _ACEOF
19726 if test $ac_have_decl = 1; then :
19727
19728 else
19729 HAVE_DECL_FDOPENDIR=0
19730 fi
19731
19732
19733 if test $ac_cv_func_fdopendir = no; then
19734 HAVE_FDOPENDIR=0
19735 else
19736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
19737 $as_echo_n "checking whether fdopendir works... " >&6; }
19738 if ${gl_cv_func_fdopendir_works+:} false; then :
19739 $as_echo_n "(cached) " >&6
19740 else
19741 if test "$cross_compiling" = yes; then :
19742 case "$host_os" in
19743 # Guess yes on glibc systems.
19744 *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
19745 # Guess yes on musl systems.
19746 *-musl*) gl_cv_func_fdopendir_works="guessing yes" ;;
19747 # If we don't know, obey --enable-cross-guesses.
19748 *) gl_cv_func_fdopendir_works="$gl_cross_guess_normal" ;;
19749 esac
19750
19751 else
19752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19753 /* end confdefs.h. */
19754
19755 #include <dirent.h>
19756 #include <fcntl.h>
19757 #include <unistd.h>
19758
19759
19760 $gl_mda_defines
19761
19762 #if !HAVE_DECL_FDOPENDIR
19763 extern
19764 # ifdef __cplusplus
19765 "C"
19766 # endif
19767 DIR *fdopendir (int);
19768 #endif
19769
19770 int
19771 main ()
19772 {
19773 int result = 0;
19774 int fd = open ("conftest.c", O_RDONLY);
19775 if (fd < 0) result |= 1;
19776 if (fdopendir (fd)) result |= 2;
19777 if (close (fd)) result |= 4;
19778 return result;
19779
19780 ;
19781 return 0;
19782 }
19783 _ACEOF
19784 if ac_fn_c_try_run "$LINENO"; then :
19785 gl_cv_func_fdopendir_works=yes
19786 else
19787 gl_cv_func_fdopendir_works=no
19788 fi
19789 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19790 conftest.$ac_objext conftest.beam conftest.$ac_ext
19791 fi
19792
19793 fi
19794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
19795 $as_echo "$gl_cv_func_fdopendir_works" >&6; }
19796 case "$gl_cv_func_fdopendir_works" in
19797 *yes) ;;
19798 *)
19799 REPLACE_FDOPENDIR=1
19800 ;;
19801 esac
19802 fi
19803
19804 if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
19805
19806
19807
19808
19809
19810
19811
19812
19813 gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
19814
19815 fi
19816
19817
19818
19819
19820
19821 GNULIB_FDOPENDIR=1
19822
19823
19824
19825
19826
19827 $as_echo "#define GNULIB_TEST_FDOPENDIR 1" >>confdefs.h
19828
19829
19830
19831
19832
19833 cat >>confdefs.h <<_ACEOF
19834 #define GNULIB_FDOPENDIR 1
19835 _ACEOF
19836
19837
19838
19839
19840
19841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ffs" >&5
19842 $as_echo_n "checking for ffs... " >&6; }
19843 if ${gl_cv_func_ffs+:} false; then :
19844 $as_echo_n "(cached) " >&6
19845 else
19846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19847 /* end confdefs.h. */
19848 #include <strings.h>
19849 int x;
19850
19851 int
19852 main ()
19853 {
19854 int (*func) (int) = ffs;
19855 return func (x);
19856
19857 ;
19858 return 0;
19859 }
19860
19861 _ACEOF
19862 if ac_fn_c_try_link "$LINENO"; then :
19863 gl_cv_func_ffs=yes
19864 else
19865 gl_cv_func_ffs=no
19866 fi
19867 rm -f core conftest.err conftest.$ac_objext \
19868 conftest$ac_exeext conftest.$ac_ext
19869
19870 fi
19871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ffs" >&5
19872 $as_echo "$gl_cv_func_ffs" >&6; }
19873 if test $gl_cv_func_ffs = no; then
19874 HAVE_FFS=0
19875 fi
19876
19877 if test $HAVE_FFS = 0; then
19878
19879
19880
19881
19882
19883
19884
19885
19886 gl_LIBOBJS="$gl_LIBOBJS ffs.$ac_objext"
19887
19888 fi
19889
19890
19891
19892
19893
19894 GNULIB_FFS=1
19895
19896
19897
19898
19899
19900
19901
19902
19903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
19904 $as_echo_n "checking for flexible array member... " >&6; }
19905 if ${ac_cv_c_flexmember+:} false; then :
19906 $as_echo_n "(cached) " >&6
19907 else
19908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19909 /* end confdefs.h. */
19910 #include <stdlib.h>
19911 #include <stdio.h>
19912 #include <stddef.h>
19913 struct m { struct m *next, **list; char name[]; };
19914 struct s { struct s *p; struct m *m; int n; double d[]; };
19915 int
19916 main ()
19917 {
19918 int m = getchar ();
19919 size_t nbytes = offsetof (struct s, d) + m * sizeof (double);
19920 nbytes += sizeof (struct s) - 1;
19921 nbytes -= nbytes % sizeof (struct s);
19922 struct s *p = malloc (nbytes);
19923 p->p = p;
19924 p->m = NULL;
19925 p->d[0] = 0.0;
19926 return p->d != (double *) NULL;
19927 ;
19928 return 0;
19929 }
19930 _ACEOF
19931 if ac_fn_c_try_compile "$LINENO"; then :
19932 ac_cv_c_flexmember=yes
19933 else
19934 ac_cv_c_flexmember=no
19935 fi
19936 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19937 fi
19938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
19939 $as_echo "$ac_cv_c_flexmember" >&6; }
19940 if test $ac_cv_c_flexmember = yes; then
19941
19942 $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
19943
19944 else
19945 $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
19946
19947 fi
19948
19949
19950
19951
19952 FLOAT_H=
19953 REPLACE_FLOAT_LDBL=0
19954 case "$host_os" in
19955 aix* | beos* | openbsd* | mirbsd* | irix*)
19956 FLOAT_H=float.h
19957 ;;
19958 freebsd* | dragonfly*)
19959 case "$host_cpu" in
19960 i[34567]86 )
19961 FLOAT_H=float.h
19962 ;;
19963 x86_64 )
19964 # On x86_64 systems, the C compiler may still be generating
19965 # 32-bit code.
19966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19967 /* end confdefs.h. */
19968 #if defined __LP64__ || defined __x86_64__ || defined __amd64__
19969 int ok;
19970 #else
19971 error fail
19972 #endif
19973
19974 _ACEOF
19975 if ac_fn_c_try_compile "$LINENO"; then :
19976
19977 else
19978 FLOAT_H=float.h
19979 fi
19980 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19981 ;;
19982 esac
19983 ;;
19984 linux*)
19985 case "$host_cpu" in
19986 powerpc*)
19987 FLOAT_H=float.h
19988 ;;
19989 esac
19990 ;;
19991 esac
19992 case "$host_os" in
19993 aix* | freebsd* | dragonfly* | linux*)
19994 if test -n "$FLOAT_H"; then
19995 REPLACE_FLOAT_LDBL=1
19996 fi
19997 ;;
19998 esac
19999
20000 REPLACE_ITOLD=0
20001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
20002 $as_echo_n "checking whether conversion from 'int' to 'long double' works... " >&6; }
20003 if ${gl_cv_func_itold_works+:} false; then :
20004 $as_echo_n "(cached) " >&6
20005 else
20006
20007 if test "$cross_compiling" = yes; then :
20008 case "$host" in
20009 sparc*-*-linux*)
20010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20011 /* end confdefs.h. */
20012 #if defined __LP64__ || defined __arch64__
20013 int ok;
20014 #else
20015 error fail
20016 #endif
20017
20018 _ACEOF
20019 if ac_fn_c_try_compile "$LINENO"; then :
20020 gl_cv_func_itold_works="guessing no"
20021 else
20022 gl_cv_func_itold_works="guessing yes"
20023 fi
20024 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20025 ;;
20026 # Guess yes on native Windows.
20027 mingw*) gl_cv_func_itold_works="guessing yes" ;;
20028 *) gl_cv_func_itold_works="guessing yes" ;;
20029 esac
20030
20031 else
20032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20033 /* end confdefs.h. */
20034
20035 int i = -1;
20036 volatile long double ld;
20037 int main ()
20038 {
20039 ld += i * 1.0L;
20040 if (ld > 0)
20041 return 1;
20042 return 0;
20043 }
20044 _ACEOF
20045 if ac_fn_c_try_run "$LINENO"; then :
20046 gl_cv_func_itold_works=yes
20047 else
20048 gl_cv_func_itold_works=no
20049 fi
20050 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20051 conftest.$ac_objext conftest.beam conftest.$ac_ext
20052 fi
20053
20054
20055 fi
20056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
20057 $as_echo "$gl_cv_func_itold_works" >&6; }
20058 case "$gl_cv_func_itold_works" in
20059 *no)
20060 REPLACE_ITOLD=1
20061 FLOAT_H=float.h
20062 ;;
20063 esac
20064
20065 if test -n "$FLOAT_H"; then
20066
20067
20068
20069
20070
20071
20072
20073
20074 if test $gl_cv_have_include_next = yes; then
20075 gl_cv_next_float_h='<'float.h'>'
20076 else
20077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
20078 $as_echo_n "checking absolute name of <float.h>... " >&6; }
20079 if ${gl_cv_next_float_h+:} false; then :
20080 $as_echo_n "(cached) " >&6
20081 else
20082
20083
20084
20085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20086 /* end confdefs.h. */
20087 #include <float.h>
20088 _ACEOF
20089 case "$host_os" in
20090 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20091 *) gl_absname_cpp="$ac_cpp" ;;
20092 esac
20093
20094 case "$host_os" in
20095 mingw*)
20096 gl_dirsep_regex='[/\\]'
20097 ;;
20098 *)
20099 gl_dirsep_regex='\/'
20100 ;;
20101 esac
20102 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20103 gl_header_literal_regex=`echo 'float.h' \
20104 | sed -e "$gl_make_literal_regex_sed"`
20105 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20106 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20107 s|^/[^/]|//&|
20108 p
20109 q
20110 }'
20111
20112 gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20113 sed -n "$gl_absolute_header_sed"`
20114
20115 gl_header=$gl_cv_absolute_float_h
20116 gl_cv_next_float_h='"'$gl_header'"'
20117
20118
20119 fi
20120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
20121 $as_echo "$gl_cv_next_float_h" >&6; }
20122 fi
20123 NEXT_FLOAT_H=$gl_cv_next_float_h
20124
20125 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20126 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20127 gl_next_as_first_directive='<'float.h'>'
20128 else
20129 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20130 gl_next_as_first_directive=$gl_cv_next_float_h
20131 fi
20132 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
20133
20134
20135
20136
20137 fi
20138
20139 if test -n "$FLOAT_H"; then
20140 GL_GENERATE_FLOAT_H_TRUE=
20141 GL_GENERATE_FLOAT_H_FALSE='#'
20142 else
20143 GL_GENERATE_FLOAT_H_TRUE='#'
20144 GL_GENERATE_FLOAT_H_FALSE=
20145 fi
20146
20147
20148
20149 if test $REPLACE_FLOAT_LDBL = 1; then
20150
20151
20152
20153
20154
20155
20156
20157
20158 gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
20159
20160 fi
20161 if test $REPLACE_ITOLD = 1; then
20162
20163
20164
20165
20166
20167
20168
20169
20170 gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
20171
20172 fi
20173
20174
20175
20176
20177 gl_fnmatch_required_lowercase=`
20178 echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]'
20179 `
20180
20181 if test $ac_cv_func_fnmatch = no; then
20182 HAVE_FNMATCH=0
20183 else
20184 gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}"
20185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5
20186 $as_echo_n "checking for working $gl_fnmatch_required fnmatch... " >&6; }
20187 if eval \${$gl_fnmatch_cache_var+:} false; then :
20188 $as_echo_n "(cached) " >&6
20189 else
20190 if test $gl_fnmatch_required = GNU; then
20191 gl_fnmatch_gnu_start=
20192 gl_fnmatch_gnu_end=
20193 else
20194 gl_fnmatch_gnu_start='#if 0'
20195 gl_fnmatch_gnu_end='#endif'
20196 fi
20197 if test "$cross_compiling" = yes; then :
20198 case "$host_os" in
20199 # Guess yes on musl systems.
20200 *-musl*) eval "$gl_fnmatch_cache_var=\"guessing yes\"" ;;
20201 # Guess no otherwise, even on glibc systems.
20202 *) eval "$gl_fnmatch_cache_var=\"guessing no\"" ;;
20203 esac
20204
20205 else
20206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20207 /* end confdefs.h. */
20208 #include <fnmatch.h>
20209 static int
20210 y (char const *pattern, char const *string, int flags)
20211 {
20212 return fnmatch (pattern, string, flags) == 0;
20213 }
20214 static int
20215 n (char const *pattern, char const *string, int flags)
20216 {
20217 return fnmatch (pattern, string, flags) == FNM_NOMATCH;
20218 }
20219
20220 int
20221 main ()
20222 {
20223 char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]";
20224 char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]";
20225 static char const A_1[] = { 'A' - 1, 0 };
20226 static char const A01[] = { 'A' + 1, 0 };
20227 static char const a_1[] = { 'a' - 1, 0 };
20228 static char const a01[] = { 'a' + 1, 0 };
20229 static char const bs_1[] = { '\\\\' - 1, 0 };
20230 static char const bs01[] = { '\\\\' + 1, 0 };
20231 int result = 0;
20232 if (!n ("a*", "", 0))
20233 return 1;
20234 if (!y ("a*", "abc", 0))
20235 return 1;
20236 if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */
20237 return 1;
20238 if (!n ("d*/*1", "d/s/1", FNM_PATHNAME))
20239 return 2;
20240 if (!y ("a\\\\bc", "abc", 0))
20241 return 3;
20242 if (!n ("a\\\\bc", "abc", FNM_NOESCAPE))
20243 return 3;
20244 if (!y ("*x", ".x", 0))
20245 return 4;
20246 if (!n ("*x", ".x", FNM_PERIOD))
20247 return 4;
20248 if (!y (Apat, "\\\\", 0))
20249 return 5;
20250 if (!y (Apat, "A", 0))
20251 return 5;
20252 if (!y (apat, "\\\\", 0))
20253 return 5;
20254 if (!y (apat, "a", 0))
20255 return 5;
20256 if (!(n (Apat, A_1, 0) == ('A' < '\\\\')))
20257 return 5;
20258 if (!(n (apat, a_1, 0) == ('a' < '\\\\')))
20259 return 5;
20260 if (!(y (Apat, A01, 0) == ('A' < '\\\\')))
20261 return 5;
20262 if (!(y (apat, a01, 0) == ('a' < '\\\\')))
20263 return 5;
20264 if (!(y (Apat, bs_1, 0) == ('A' < '\\\\')))
20265 return 5;
20266 if (!(y (apat, bs_1, 0) == ('a' < '\\\\')))
20267 return 5;
20268 if (!(n (Apat, bs01, 0) == ('A' < '\\\\')))
20269 return 5;
20270 if (!(n (apat, bs01, 0) == ('a' < '\\\\')))
20271 return 5;
20272 $gl_fnmatch_gnu_start
20273 if (!y ("xxXX", "xXxX", FNM_CASEFOLD))
20274 result |= 8;
20275 if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH))
20276 result |= 16;
20277 if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME))
20278 result |= 32;
20279 if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR))
20280 result |= 64;
20281 if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR))
20282 result |= 64;
20283 if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR))
20284 result |= 64;
20285 $gl_fnmatch_gnu_end
20286 return result;
20287
20288 ;
20289 return 0;
20290 }
20291 _ACEOF
20292 if ac_fn_c_try_run "$LINENO"; then :
20293 eval "$gl_fnmatch_cache_var=yes"
20294 else
20295 eval "$gl_fnmatch_cache_var=no"
20296 fi
20297 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20298 conftest.$ac_objext conftest.beam conftest.$ac_ext
20299 fi
20300
20301
20302 fi
20303 eval ac_res=\$$gl_fnmatch_cache_var
20304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20305 $as_echo "$ac_res" >&6; }
20306 eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\""
20307 case "$gl_fnmatch_result" in
20308 *yes) ;;
20309 *) REPLACE_FNMATCH=1 ;;
20310 esac
20311 fi
20312 if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
20313
20314
20315 FNMATCH_H='fnmatch.h'
20316 if test -n "$FNMATCH_H"; then
20317 GL_GENERATE_FNMATCH_H_TRUE=
20318 GL_GENERATE_FNMATCH_H_FALSE='#'
20319 else
20320 GL_GENERATE_FNMATCH_H_TRUE='#'
20321 GL_GENERATE_FNMATCH_H_FALSE=
20322 fi
20323
20324
20325 fi
20326
20327 if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
20328
20329
20330
20331
20332
20333
20334
20335
20336 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
20337
20338
20339
20340
20341
20342 fi
20343
20344
20345
20346
20347
20348 GNULIB_FNMATCH=1
20349
20350
20351
20352
20353
20354 $as_echo "#define GNULIB_TEST_FNMATCH 1" >>confdefs.h
20355
20356
20357
20358
20359
20360
20361
20362
20363 if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
20364
20365
20366
20367
20368
20369
20370
20371
20372 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
20373
20374
20375
20376
20377
20378 fi
20379
20380
20381 cat >>confdefs.h <<_ACEOF
20382 #define GNULIB_FNMATCH_GNU 1
20383 _ACEOF
20384
20385
20386
20387
20388
20389
20390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether free is known to preserve errno" >&5
20391 $as_echo_n "checking whether free is known to preserve errno... " >&6; }
20392 if ${gl_cv_func_free_preserves_errno+:} false; then :
20393 $as_echo_n "(cached) " >&6
20394 else
20395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20396 /* end confdefs.h. */
20397 #include <stdlib.h>
20398
20399 int
20400 main ()
20401 {
20402 #if 2 < __GLIBC__ + (33 <= __GLIBC_MINOR__)
20403 #elif defined __OpenBSD__
20404 #elif defined __sun
20405 #else
20406 #error "'free' is not known to preserve errno"
20407 #endif
20408
20409 ;
20410 return 0;
20411 }
20412 _ACEOF
20413 if ac_fn_c_try_compile "$LINENO"; then :
20414 gl_cv_func_free_preserves_errno=yes
20415 else
20416 gl_cv_func_free_preserves_errno=no
20417 fi
20418 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20419
20420 fi
20421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_free_preserves_errno" >&5
20422 $as_echo "$gl_cv_func_free_preserves_errno" >&6; }
20423
20424 case $gl_cv_func_free_preserves_errno in
20425 *yes) ;;
20426 *) REPLACE_FREE=1 ;;
20427 esac
20428
20429 if test $REPLACE_FREE = 1; then
20430
20431
20432
20433
20434
20435
20436
20437
20438 gl_LIBOBJS="$gl_LIBOBJS free.$ac_objext"
20439
20440 :
20441 fi
20442
20443
20444
20445
20446
20447 GNULIB_FREE_POSIX=1
20448
20449
20450
20451
20452
20453 $as_echo "#define GNULIB_TEST_FREE_POSIX 1" >>confdefs.h
20454
20455
20456
20457
20458 if test $gl_func_frexp != yes; then
20459
20460
20461
20462
20463
20464
20465
20466
20467 gl_LIBOBJS="$gl_LIBOBJS frexp.$ac_objext"
20468
20469 fi
20470
20471
20472
20473
20474
20475 GNULIB_FREXP=1
20476
20477
20478
20479
20480
20481 $as_echo "#define GNULIB_TEST_FREXP 1" >>confdefs.h
20482
20483
20484
20485
20486 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
20487
20488
20489
20490
20491
20492
20493
20494
20495 gl_LIBOBJS="$gl_LIBOBJS frexpl.$ac_objext"
20496
20497 fi
20498
20499
20500
20501
20502
20503 GNULIB_FREXPL=1
20504
20505
20506
20507
20508
20509 $as_echo "#define GNULIB_TEST_FREXPL 1" >>confdefs.h
20510
20511
20512
20513
20514
20515
20516
20517 case "$host_os" in
20518 mingw* | solaris*)
20519 REPLACE_FSTAT=1
20520 ;;
20521 esac
20522
20523
20524
20525
20526
20527 if test $ac_cv_func_fchdir = no; then
20528 HAVE_FCHDIR=0
20529 fi
20530
20531 if test $HAVE_FCHDIR = 0; then
20532 case "$gl_cv_func_open_directory_works" in
20533 *yes) ;;
20534 *)
20535 REPLACE_FSTAT=1
20536 ;;
20537 esac
20538 fi
20539
20540
20541 if test $REPLACE_FSTAT = 1; then
20542
20543
20544
20545
20546
20547
20548
20549
20550 gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
20551
20552 case "$host_os" in
20553 mingw*)
20554
20555
20556
20557
20558
20559
20560
20561
20562 gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
20563
20564 ;;
20565 esac
20566
20567
20568
20569 :
20570
20571 fi
20572
20573
20574
20575
20576
20577 GNULIB_FSTAT=1
20578
20579
20580
20581
20582
20583 $as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
20584
20585
20586
20587
20588
20589
20590
20591
20592
20593
20594 if test $ac_cv_func_fstatat = no; then
20595 HAVE_FSTATAT=0
20596 else
20597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
20598 $as_echo_n "checking whether fstatat (..., 0) works... " >&6; }
20599 if ${gl_cv_func_fstatat_zero_flag+:} false; then :
20600 $as_echo_n "(cached) " >&6
20601 else
20602 if test "$cross_compiling" = yes; then :
20603 case "$host_os" in
20604 aix*) gl_cv_func_fstatat_zero_flag="guessing no";;
20605 *) gl_cv_func_fstatat_zero_flag="guessing yes";;
20606 esac
20607
20608 else
20609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20610 /* end confdefs.h. */
20611
20612 #include <fcntl.h>
20613 #include <sys/stat.h>
20614 int
20615 main (void)
20616 {
20617 struct stat a;
20618 return fstatat (AT_FDCWD, ".", &a, 0) != 0;
20619 }
20620
20621 _ACEOF
20622 if ac_fn_c_try_run "$LINENO"; then :
20623 gl_cv_func_fstatat_zero_flag=yes
20624 else
20625 gl_cv_func_fstatat_zero_flag=no
20626 fi
20627 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20628 conftest.$ac_objext conftest.beam conftest.$ac_ext
20629 fi
20630
20631
20632 fi
20633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
20634 $as_echo "$gl_cv_func_fstatat_zero_flag" >&6; }
20635
20636 case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
20637 *yes+*yes) ;;
20638 *) REPLACE_FSTATAT=1 ;;
20639 esac
20640
20641 case $host_os in
20642 solaris*)
20643 REPLACE_FSTATAT=1 ;;
20644 esac
20645
20646 case $REPLACE_FSTATAT,$gl_cv_func_fstatat_zero_flag in
20647 1,*yes)
20648
20649 $as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
20650
20651 ;;
20652 esac
20653 fi
20654
20655 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
20656
20657
20658
20659
20660
20661
20662
20663
20664 gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
20665
20666 fi
20667
20668
20669
20670
20671
20672 GNULIB_FSTATAT=1
20673
20674
20675
20676
20677
20678 $as_echo "#define GNULIB_TEST_FSTATAT 1" >>confdefs.h
20679
20680
20681
20682
20683
20684
20685
20686
20687 gl_abort_bug=no
20688 case "$host_os" in
20689 mingw*)
20690 gl_cv_func_getcwd_path_max=yes
20691 ;;
20692 *)
20693
20694
20695
20696
20697
20698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd handles long file names properly" >&5
20699 $as_echo_n "checking whether getcwd handles long file names properly... " >&6; }
20700 if ${gl_cv_func_getcwd_path_max+:} false; then :
20701 $as_echo_n "(cached) " >&6
20702 else
20703 # Arrange for deletion of the temporary directory this test creates.
20704 ac_clean_files="$ac_clean_files confdir3"
20705 if test "$cross_compiling" = yes; then :
20706 # Cross-compilation guesses:
20707 case "$host_os" in
20708 aix*) # On AIX, it has the AIX bug.
20709 gl_cv_func_getcwd_path_max='guessing no, it has the AIX bug' ;;
20710 gnu*) # On Hurd, it is 'yes'.
20711 gl_cv_func_getcwd_path_max='guessing yes' ;;
20712 linux* | kfreebsd*)
20713 # On older Linux+glibc it's 'no, but it is partly working',
20714 # on newer Linux+glibc it's 'yes'.
20715 # On Linux+musl libc, it's 'no, but it is partly working'.
20716 # On kFreeBSD+glibc, it's 'no, but it is partly working'.
20717 gl_cv_func_getcwd_path_max='guessing no, but it is partly working' ;;
20718 *) # If we don't know, obey --enable-cross-guesses.
20719 gl_cv_func_getcwd_path_max="$gl_cross_guess_normal" ;;
20720 esac
20721
20722 else
20723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20724 /* end confdefs.h. */
20725
20726 #include <errno.h>
20727 #include <stdlib.h>
20728 #if HAVE_UNISTD_H
20729 # include <unistd.h>
20730 #else
20731 # include <direct.h>
20732 #endif
20733 #include <string.h>
20734 #include <limits.h>
20735 #include <sys/stat.h>
20736 #include <sys/types.h>
20737 #include <fcntl.h>
20738
20739
20740 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
20741 #if HAVE_UNISTD_H
20742 # include <unistd.h>
20743 #endif
20744 #include <limits.h>
20745 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
20746 # include <sys/param.h>
20747 #endif
20748 #if !defined PATH_MAX && defined MAXPATHLEN
20749 # define PATH_MAX MAXPATHLEN
20750 #endif
20751 #ifdef __hpux
20752 # undef PATH_MAX
20753 # define PATH_MAX 1024
20754 #endif
20755 #if defined _WIN32 && ! defined __CYGWIN__
20756 # undef PATH_MAX
20757 # define PATH_MAX 260
20758 #endif
20759
20760
20761 #ifndef AT_FDCWD
20762 # define AT_FDCWD 0
20763 #endif
20764 #ifdef ENAMETOOLONG
20765 # define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG)
20766 #else
20767 # define is_ENAMETOOLONG(x) 0
20768 #endif
20769
20770 /* Use the getcwd function, not any macro. */
20771 #undef getcwd
20772
20773
20774
20775 $gl_mda_defines
20776
20777
20778 #ifndef S_IRWXU
20779 # define S_IRWXU 0700
20780 #endif
20781
20782 /* The length of this name must be 8. */
20783 #define DIR_NAME "confdir3"
20784 #define DIR_NAME_LEN 8
20785 #define DIR_NAME_SIZE (DIR_NAME_LEN + 1)
20786
20787 /* The length of "../". */
20788 #define DOTDOTSLASH_LEN 3
20789
20790 /* Leftover bytes in the buffer, to work around library or OS bugs. */
20791 #define BUF_SLOP 20
20792
20793 int
20794 main ()
20795 {
20796 #ifndef PATH_MAX
20797 /* The Hurd doesn't define this, so getcwd can't exhibit the bug --
20798 at least not on a local file system. And if we were to start worrying
20799 about remote file systems, we'd have to enable the wrapper function
20800 all of the time, just to be safe. That's not worth the cost. */
20801 exit (0);
20802 #elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \
20803 - DIR_NAME_SIZE - BUF_SLOP) \
20804 <= PATH_MAX)
20805 /* FIXME: Assuming there's a system for which this is true,
20806 this should be done in a compile test. */
20807 exit (0);
20808 #else
20809 char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1)
20810 + DIR_NAME_SIZE + BUF_SLOP];
20811 char *cwd = getcwd (buf, PATH_MAX);
20812 size_t initial_cwd_len;
20813 size_t cwd_len;
20814 int fail = 0;
20815 size_t n_chdirs = 0;
20816
20817 if (cwd == NULL)
20818 exit (10);
20819
20820 cwd_len = initial_cwd_len = strlen (cwd);
20821
20822 while (1)
20823 {
20824 size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN);
20825 char *c = NULL;
20826
20827 cwd_len += DIR_NAME_SIZE;
20828 /* If mkdir or chdir fails, it could be that this system cannot create
20829 any file with an absolute name longer than PATH_MAX, such as cygwin.
20830 If so, leave fail as 0, because the current working directory can't
20831 be too long for getcwd if it can't even be created. On Linux with
20832 the 9p file system, mkdir fails with error EINVAL when cwd_len gets
20833 too long; ignore this failure because the getcwd() system call
20834 produces good results whereas the gnulib substitute calls getdents64
20835 which fails with error EPROTO.
20836 For other errors, be pessimistic and consider that as a failure,
20837 too. */
20838 if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0)
20839 {
20840 if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
20841 #ifdef __linux__
20842 if (! (errno == EINVAL))
20843 #endif
20844 fail = 20;
20845 break;
20846 }
20847
20848 if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE)
20849 {
20850 struct stat sb;
20851
20852 c = getcwd (buf, PATH_MAX);
20853 if (!c && errno == ENOENT)
20854 {
20855 fail = 11;
20856 break;
20857 }
20858 if (c)
20859 {
20860 fail = 31;
20861 break;
20862 }
20863 if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
20864 {
20865 fail = 21;
20866 break;
20867 }
20868
20869 /* Our replacement needs to be able to stat() long ../../paths,
20870 so generate a path larger than PATH_MAX to check,
20871 avoiding the replacement if we can't stat(). */
20872 c = getcwd (buf, cwd_len + 1);
20873 if (c && !AT_FDCWD && stat (c, &sb) != 0 && is_ENAMETOOLONG (errno))
20874 {
20875 fail = 32;
20876 break;
20877 }
20878 }
20879
20880 if (dotdot_max <= cwd_len - initial_cwd_len)
20881 {
20882 if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len)
20883 break;
20884 c = getcwd (buf, cwd_len + 1);
20885 if (!c)
20886 {
20887 if (! (errno == ERANGE || errno == ENOENT
20888 || is_ENAMETOOLONG (errno)))
20889 {
20890 fail = 22;
20891 break;
20892 }
20893 if (AT_FDCWD || errno == ERANGE || errno == ENOENT)
20894 {
20895 fail = 12;
20896 break;
20897 }
20898 }
20899 }
20900
20901 if (c && strlen (c) != cwd_len)
20902 {
20903 fail = 23;
20904 break;
20905 }
20906 ++n_chdirs;
20907 }
20908
20909 /* Leaving behind such a deep directory is not polite.
20910 So clean up here, right away, even though the driving
20911 shell script would also clean up. */
20912 {
20913 size_t i;
20914
20915 /* Try rmdir first, in case the chdir failed. */
20916 rmdir (DIR_NAME);
20917 for (i = 0; i <= n_chdirs; i++)
20918 {
20919 if (chdir ("..") < 0)
20920 break;
20921 if (rmdir (DIR_NAME) != 0)
20922 break;
20923 }
20924 }
20925
20926 exit (fail);
20927 #endif
20928 }
20929
20930 _ACEOF
20931 if ac_fn_c_try_run "$LINENO"; then :
20932 gl_cv_func_getcwd_path_max=yes
20933 else
20934 case $? in
20935 10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';;
20936 31) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
20937 32) gl_cv_func_getcwd_path_max='yes, but with shorter paths';;
20938 *) gl_cv_func_getcwd_path_max=no;;
20939 esac
20940 fi
20941 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20942 conftest.$ac_objext conftest.beam conftest.$ac_ext
20943 fi
20944
20945
20946 fi
20947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_path_max" >&5
20948 $as_echo "$gl_cv_func_getcwd_path_max" >&6; }
20949
20950 case "$gl_cv_func_getcwd_null" in
20951 *yes)
20952
20953
20954
20955
20956
20957
20958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
20959 $as_echo_n "checking for getpagesize... " >&6; }
20960 if ${gl_cv_func_getpagesize+:} false; then :
20961 $as_echo_n "(cached) " >&6
20962 else
20963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20964 /* end confdefs.h. */
20965 #include <unistd.h>
20966 int
20967 main ()
20968 {
20969 return getpagesize();
20970 ;
20971 return 0;
20972 }
20973
20974 _ACEOF
20975 if ac_fn_c_try_link "$LINENO"; then :
20976 gl_cv_func_getpagesize=yes
20977 else
20978 gl_cv_func_getpagesize=no
20979 fi
20980 rm -f core conftest.err conftest.$ac_objext \
20981 conftest$ac_exeext conftest.$ac_ext
20982
20983 fi
20984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getpagesize" >&5
20985 $as_echo "$gl_cv_func_getpagesize" >&6; }
20986
20987 if test $gl_cv_func_getpagesize = yes; then
20988
20989 cat >>confdefs.h <<_ACEOF
20990 #define HAVE_GETPAGESIZE 1
20991 _ACEOF
20992
20993 fi
20994
20995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd succeeds when 4k < cwd_length < 16k" >&5
20996 $as_echo_n "checking whether getcwd succeeds when 4k < cwd_length < 16k... " >&6; }
20997 if ${gl_cv_func_getcwd_succeeds_beyond_4k+:} false; then :
20998 $as_echo_n "(cached) " >&6
20999 else
21000 # Remove any remnants of a previous test.
21001 rm -rf confdir-14B---
21002 # Arrange for deletion of the temporary directory this test creates.
21003 ac_clean_files="$ac_clean_files confdir-14B---"
21004 if test "$cross_compiling" = yes; then :
21005 case "$host_os" in
21006 # Guess yes on musl systems.
21007 *-musl*) gl_cv_func_getcwd_succeeds_beyond_4k="guessing yes" ;;
21008 # Guess no otherwise, even on glibc systems.
21009 *) gl_cv_func_getcwd_succeeds_beyond_4k="guessing no"
21010 esac
21011
21012 else
21013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21014 /* end confdefs.h. */
21015
21016 #include <errno.h>
21017 #include <stdlib.h>
21018 #if HAVE_UNISTD_H
21019 # include <unistd.h>
21020 #else /* on Windows with MSVC */
21021 # include <direct.h>
21022 #endif
21023 #include <string.h>
21024 #include <sys/stat.h>
21025
21026
21027 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
21028 #if HAVE_UNISTD_H
21029 # include <unistd.h>
21030 #endif
21031 #include <limits.h>
21032 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
21033 # include <sys/param.h>
21034 #endif
21035 #if !defined PATH_MAX && defined MAXPATHLEN
21036 # define PATH_MAX MAXPATHLEN
21037 #endif
21038 #ifdef __hpux
21039 # undef PATH_MAX
21040 # define PATH_MAX 1024
21041 #endif
21042 #if defined _WIN32 && ! defined __CYGWIN__
21043 # undef PATH_MAX
21044 # define PATH_MAX 260
21045 #endif
21046
21047
21048
21049 $gl_mda_defines
21050
21051
21052 #ifndef S_IRWXU
21053 # define S_IRWXU 0700
21054 #endif
21055
21056 /* FIXME: skip the run-test altogether on systems without getpagesize. */
21057 #if ! HAVE_GETPAGESIZE
21058 # define getpagesize() 0
21059 #endif
21060
21061 /* This size is chosen to be larger than PATH_MAX (4k), yet smaller than
21062 the 16kB pagesize on ia64 linux. Those conditions make the code below
21063 trigger a bug in glibc's getcwd implementation before 2.4.90-10. */
21064 #define TARGET_LEN (5 * 1024)
21065
21066 int
21067 main ()
21068 {
21069 char *cwd;
21070 size_t initial_cwd_len;
21071 int fail = 0;
21072
21073 /* The bug is triggered when PATH_MAX < getpagesize (), so skip
21074 this relatively expensive and invasive test if that's not true. */
21075 #ifdef PATH_MAX
21076 int bug_possible = PATH_MAX < getpagesize ();
21077 #else
21078 int bug_possible = 0;
21079 #endif
21080 if (! bug_possible)
21081 return 0;
21082
21083 cwd = getcwd (NULL, 0);
21084 if (cwd == NULL)
21085 return 2;
21086
21087 initial_cwd_len = strlen (cwd);
21088 free (cwd);
21089
21090 if (1)
21091 {
21092 static char const dir_name[] = "confdir-14B---";
21093 size_t desired_depth = ((TARGET_LEN - 1 - initial_cwd_len)
21094 / sizeof dir_name);
21095 size_t d;
21096 for (d = 0; d < desired_depth; d++)
21097 {
21098 if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0)
21099 {
21100 if (! (errno == ERANGE || errno == ENAMETOOLONG
21101 || errno == ENOENT))
21102 fail = 3; /* Unable to construct deep hierarchy. */
21103 break;
21104 }
21105 }
21106
21107 /* If libc has the bug in question, this invocation of getcwd
21108 results in a failed assertion. */
21109 cwd = getcwd (NULL, 0);
21110 if (cwd == NULL)
21111 fail = 4; /* getcwd didn't assert, but it failed for a long name
21112 where the answer could have been learned. */
21113 free (cwd);
21114
21115 /* Call rmdir first, in case the above chdir failed. */
21116 rmdir (dir_name);
21117 while (0 < d--)
21118 {
21119 if (chdir ("..") < 0)
21120 {
21121 fail = 5;
21122 break;
21123 }
21124 rmdir (dir_name);
21125 }
21126 }
21127
21128 return fail;
21129 }
21130
21131 _ACEOF
21132 if ac_fn_c_try_run "$LINENO"; then :
21133 gl_cv_func_getcwd_succeeds_beyond_4k=yes
21134 else
21135 ret=$?
21136 if test $ret -ge 128 || test $ret = 4; then
21137 gl_cv_func_getcwd_succeeds_beyond_4k=no
21138 else
21139 gl_cv_func_getcwd_succeeds_beyond_4k=yes
21140 fi
21141
21142 fi
21143 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21144 conftest.$ac_objext conftest.beam conftest.$ac_ext
21145 fi
21146
21147
21148 fi
21149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_succeeds_beyond_4k" >&5
21150 $as_echo "$gl_cv_func_getcwd_succeeds_beyond_4k" >&6; }
21151 case "$gl_cv_func_getcwd_succeeds_beyond_4k" in
21152 *no)
21153 gl_abort_bug=yes
21154 ;;
21155 *)
21156
21157 ;;
21158 esac
21159
21160 ;;
21161 esac
21162 ;;
21163 esac
21164 case "$gl_cv_func_getcwd_path_max" in
21165 *"no" | *"no, it has the AIX bug") ;;
21166 *)
21167
21168 $as_echo "#define HAVE_MINIMALLY_WORKING_GETCWD 1" >>confdefs.h
21169
21170 ;;
21171 esac
21172 case "$gl_cv_func_getcwd_path_max" in
21173 *"no, but it is partly working")
21174
21175 $as_echo "#define HAVE_PARTLY_WORKING_GETCWD 1" >>confdefs.h
21176
21177 ;;
21178 *"yes, but with shorter paths")
21179
21180 $as_echo "#define HAVE_GETCWD_SHORTER 1" >>confdefs.h
21181
21182 ;;
21183 esac
21184
21185 if { case "$gl_cv_func_getcwd_null" in *yes) false;; *) true;; esac; } \
21186 || test $gl_cv_func_getcwd_posix_signature != yes \
21187 || { case "$gl_cv_func_getcwd_path_max" in *yes*) false;; *) true;; esac; } \
21188 || test $gl_abort_bug = yes; then
21189 REPLACE_GETCWD=1
21190 fi
21191
21192 if test $REPLACE_GETCWD = 1; then
21193
21194
21195
21196
21197
21198
21199
21200
21201 gl_LIBOBJS="$gl_LIBOBJS getcwd.$ac_objext"
21202
21203
21204
21205
21206 :
21207
21208 fi
21209
21210
21211 cat >>confdefs.h <<_ACEOF
21212 #define GNULIB_GETCWD 1
21213 _ACEOF
21214
21215
21216
21217
21218
21219
21220
21221 GNULIB_GETCWD=1
21222
21223
21224
21225
21226
21227 $as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
21228
21229
21230
21231
21232
21233
21234
21235
21236 case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
21237 *yes,yes) ;;
21238 *)
21239 REPLACE_GETCWD=1
21240 ;;
21241 esac
21242
21243 if test $REPLACE_GETCWD = 1; then
21244
21245
21246
21247
21248
21249
21250
21251
21252 gl_LIBOBJS="$gl_LIBOBJS getcwd-lgpl.$ac_objext"
21253
21254 fi
21255
21256
21257
21258
21259
21260 GNULIB_GETCWD=1
21261
21262
21263
21264
21265
21266 $as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
21267
21268
21269
21270
21271
21272
21273
21274
21275
21276
21277
21278 if test $ac_cv_func_getdelim = yes; then
21279 HAVE_GETDELIM=1
21280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getdelim function" >&5
21281 $as_echo_n "checking for working getdelim function... " >&6; }
21282 if ${gl_cv_func_working_getdelim+:} false; then :
21283 $as_echo_n "(cached) " >&6
21284 else
21285 echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
21286 if test "$cross_compiling" = yes; then :
21287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21288 /* end confdefs.h. */
21289
21290 #include <features.h>
21291 #ifdef __GNU_LIBRARY__
21292 #if (__GLIBC__ >= 2) && !defined __UCLIBC__
21293 Lucky GNU user
21294 #endif
21295 #endif
21296
21297 _ACEOF
21298 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21299 $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
21300 gl_cv_func_working_getdelim="guessing yes"
21301 else
21302 case "$host_os" in
21303 *-musl*) gl_cv_func_working_getdelim="guessing yes" ;;
21304 *) gl_cv_func_working_getdelim="$gl_cross_guess_normal" ;;
21305 esac
21306
21307 fi
21308 rm -f conftest*
21309
21310
21311 else
21312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21313 /* end confdefs.h. */
21314
21315 # include <stdio.h>
21316 # include <stdlib.h>
21317 # include <string.h>
21318 int main ()
21319 {
21320 FILE *in = fopen ("./conftest.data", "r");
21321 if (!in)
21322 return 1;
21323 {
21324 /* Test result for a NULL buffer and a zero size.
21325 Based on a test program from Karl Heuer. */
21326 char *line = NULL;
21327 size_t siz = 0;
21328 int len = getdelim (&line, &siz, '\n', in);
21329 if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
21330 { free (line); fclose (in); return 2; }
21331 free (line);
21332 }
21333 {
21334 /* Test result for a NULL buffer and a non-zero size.
21335 This crashes on FreeBSD 8.0. */
21336 char *line = NULL;
21337 size_t siz = (size_t)(~0) / 4;
21338 if (getdelim (&line, &siz, '\n', in) == -1)
21339 { fclose (in); return 3; }
21340 free (line);
21341 }
21342 fclose (in);
21343 return 0;
21344 }
21345
21346 _ACEOF
21347 if ac_fn_c_try_run "$LINENO"; then :
21348 gl_cv_func_working_getdelim=yes
21349 else
21350 gl_cv_func_working_getdelim=no
21351 fi
21352 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21353 conftest.$ac_objext conftest.beam conftest.$ac_ext
21354 fi
21355
21356
21357 fi
21358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_getdelim" >&5
21359 $as_echo "$gl_cv_func_working_getdelim" >&6; }
21360 case "$gl_cv_func_working_getdelim" in
21361 *yes) ;;
21362 *) REPLACE_GETDELIM=1 ;;
21363 esac
21364 else
21365 HAVE_GETDELIM=0
21366 fi
21367
21368 if test $ac_cv_have_decl_getdelim = no; then
21369 HAVE_DECL_GETDELIM=0
21370 fi
21371
21372 if test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1; then
21373
21374
21375
21376
21377
21378
21379
21380
21381 gl_LIBOBJS="$gl_LIBOBJS getdelim.$ac_objext"
21382
21383
21384 for ac_func in flockfile funlockfile
21385 do :
21386 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
21387 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
21388 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
21389 cat >>confdefs.h <<_ACEOF
21390 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
21391 _ACEOF
21392
21393 fi
21394 done
21395
21396 ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
21397 if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
21398 ac_have_decl=1
21399 else
21400 ac_have_decl=0
21401 fi
21402
21403 cat >>confdefs.h <<_ACEOF
21404 #define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
21405 _ACEOF
21406
21407
21408 fi
21409
21410
21411
21412
21413
21414 GNULIB_GETDELIM=1
21415
21416
21417
21418
21419
21420 $as_echo "#define GNULIB_TEST_GETDELIM 1" >>confdefs.h
21421
21422
21423
21424
21425
21426
21427
21428
21429 if test $ac_cv_func_getdtablesize = yes &&
21430 test $ac_cv_have_decl_getdtablesize = yes; then
21431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
21432 $as_echo_n "checking whether getdtablesize works... " >&6; }
21433 if ${gl_cv_func_getdtablesize_works+:} false; then :
21434 $as_echo_n "(cached) " >&6
21435 else
21436 case "$host_os" in
21437 vms*) gl_cv_func_getdtablesize_works="no (limitation)" ;;
21438 *)
21439 if test "$cross_compiling" = yes; then :
21440 case "$host_os" in
21441 cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
21442 gl_cv_func_getdtablesize_works="guessing no" ;;
21443 *) gl_cv_func_getdtablesize_works="guessing yes" ;;
21444 esac
21445
21446 else
21447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21448 /* end confdefs.h. */
21449
21450 #include <unistd.h>
21451
21452
21453 $gl_mda_defines
21454
21455
21456 int
21457 main ()
21458 {
21459 int size = getdtablesize();
21460 if (dup2 (0, getdtablesize()) != -1)
21461 return 1;
21462 if (size != getdtablesize())
21463 return 2;
21464
21465 ;
21466 return 0;
21467 }
21468 _ACEOF
21469 if ac_fn_c_try_run "$LINENO"; then :
21470 gl_cv_func_getdtablesize_works=yes
21471 else
21472 gl_cv_func_getdtablesize_works=no
21473 fi
21474 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21475 conftest.$ac_objext conftest.beam conftest.$ac_ext
21476 fi
21477
21478 ;;
21479 esac
21480
21481 fi
21482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
21483 $as_echo "$gl_cv_func_getdtablesize_works" >&6; }
21484 case "$gl_cv_func_getdtablesize_works" in
21485 *yes | "no (limitation)") ;;
21486 *) REPLACE_GETDTABLESIZE=1 ;;
21487 esac
21488 else
21489 HAVE_GETDTABLESIZE=0
21490 fi
21491
21492 if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
21493
21494
21495
21496
21497
21498
21499
21500
21501 gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
21502
21503 :
21504 fi
21505
21506
21507
21508
21509
21510 GNULIB_GETDTABLESIZE=1
21511
21512
21513
21514
21515
21516 $as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
21517
21518
21519
21520
21521
21522
21523
21524
21525
21526
21527 gl_getline_needs_run_time_check=no
21528 ac_fn_c_check_func "$LINENO" "getline" "ac_cv_func_getline"
21529 if test "x$ac_cv_func_getline" = xyes; then :
21530 gl_getline_needs_run_time_check=yes
21531 else
21532 am_cv_func_working_getline=no
21533 fi
21534
21535 if test $gl_getline_needs_run_time_check = yes; then
21536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getline function" >&5
21537 $as_echo_n "checking for working getline function... " >&6; }
21538 if ${am_cv_func_working_getline+:} false; then :
21539 $as_echo_n "(cached) " >&6
21540 else
21541 echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
21542 if test "$cross_compiling" = yes; then :
21543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21544 /* end confdefs.h. */
21545
21546 #include <features.h>
21547 #ifdef __GNU_LIBRARY__
21548 #if (__GLIBC__ >= 2) && !defined __UCLIBC__
21549 Lucky GNU user
21550 #endif
21551 #endif
21552
21553 _ACEOF
21554 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21555 $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
21556 am_cv_func_working_getline="guessing yes"
21557 else
21558 case "$host_os" in
21559 *-musl*) am_cv_func_working_getline="guessing yes" ;;
21560 *) am_cv_func_working_getline="$gl_cross_guess_normal" ;;
21561 esac
21562
21563 fi
21564 rm -f conftest*
21565
21566
21567 else
21568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21569 /* end confdefs.h. */
21570
21571 # include <stdio.h>
21572 # include <stdlib.h>
21573 # include <string.h>
21574 int main ()
21575 {
21576 FILE *in = fopen ("./conftest.data", "r");
21577 if (!in)
21578 return 1;
21579 {
21580 /* Test result for a NULL buffer and a zero size.
21581 Based on a test program from Karl Heuer. */
21582 char *line = NULL;
21583 size_t siz = 0;
21584 int len = getline (&line, &siz, in);
21585 if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
21586 { free (line); fclose (in); return 2; }
21587 free (line);
21588 }
21589 {
21590 /* Test result for a NULL buffer and a non-zero size.
21591 This crashes on FreeBSD 8.0. */
21592 char *line = NULL;
21593 size_t siz = (size_t)(~0) / 4;
21594 if (getline (&line, &siz, in) == -1)
21595 { fclose (in); return 3; }
21596 free (line);
21597 }
21598 fclose (in);
21599 return 0;
21600 }
21601
21602 _ACEOF
21603 if ac_fn_c_try_run "$LINENO"; then :
21604 am_cv_func_working_getline=yes
21605 else
21606 am_cv_func_working_getline=no
21607 fi
21608 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21609 conftest.$ac_objext conftest.beam conftest.$ac_ext
21610 fi
21611
21612
21613 fi
21614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_working_getline" >&5
21615 $as_echo "$am_cv_func_working_getline" >&6; }
21616 fi
21617
21618 if test $ac_cv_have_decl_getline = no; then
21619 HAVE_DECL_GETLINE=0
21620 fi
21621
21622 case "$am_cv_func_working_getline" in
21623 *yes) ;;
21624 *)
21625 REPLACE_GETLINE=1
21626 ;;
21627 esac
21628
21629 if test $REPLACE_GETLINE = 1; then
21630
21631
21632
21633
21634
21635
21636
21637
21638 gl_LIBOBJS="$gl_LIBOBJS getline.$ac_objext"
21639
21640
21641 :
21642
21643 fi
21644
21645
21646
21647
21648
21649 GNULIB_GETLINE=1
21650
21651
21652
21653
21654
21655 $as_echo "#define GNULIB_TEST_GETLINE 1" >>confdefs.h
21656
21657
21658
21659
21660
21661
21662
21663
21664
21665 if test $ac_cv_have_decl_getlogin_r = no; then
21666 HAVE_DECL_GETLOGIN_R=0
21667 fi
21668
21669
21670 if test $ac_cv_func_getlogin_r = no; then
21671 HAVE_GETLOGIN_R=0
21672 else
21673 HAVE_GETLOGIN_R=1
21674
21675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getlogin_r works with small buffers" >&5
21676 $as_echo_n "checking whether getlogin_r works with small buffers... " >&6; }
21677 if ${gl_cv_func_getlogin_r_works+:} false; then :
21678 $as_echo_n "(cached) " >&6
21679 else
21680
21681 case "$host_os" in
21682 # Guess no on Mac OS X, OSF/1.
21683 darwin* | osf*) gl_cv_func_getlogin_r_works="guessing no" ;;
21684 # Guess yes otherwise.
21685 *) gl_cv_func_getlogin_r_works="guessing yes" ;;
21686 esac
21687 if test "$cross_compiling" = yes; then :
21688 :
21689 else
21690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21691 /* end confdefs.h. */
21692
21693 #include <stddef.h>
21694 #include <string.h>
21695 #include <unistd.h>
21696 #if !HAVE_DECL_GETLOGIN_R
21697 extern
21698 # ifdef __cplusplus
21699 "C"
21700 # endif
21701 int getlogin_r (char *, size_t);
21702 #endif
21703 int
21704 main (void)
21705 {
21706 int result = 0;
21707 char buf[100];
21708
21709 if (getlogin_r (buf, 0) == 0)
21710 result |= 1;
21711 if (getlogin_r (buf, 1) == 0)
21712 result |= 2;
21713 if (getlogin_r (buf, 100) == 0)
21714 {
21715 size_t n = strlen (buf);
21716 if (getlogin_r (buf, n) == 0)
21717 result |= 4;
21718 }
21719 return result;
21720 }
21721 _ACEOF
21722 if ac_fn_c_try_run "$LINENO"; then :
21723 gl_cv_func_getlogin_r_works=yes
21724 else
21725 gl_cv_func_getlogin_r_works=no
21726 fi
21727 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21728 conftest.$ac_objext conftest.beam conftest.$ac_ext
21729 fi
21730
21731
21732 fi
21733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getlogin_r_works" >&5
21734 $as_echo "$gl_cv_func_getlogin_r_works" >&6; }
21735 case "$gl_cv_func_getlogin_r_works" in
21736 *yes) ;;
21737 *) REPLACE_GETLOGIN_R=1 ;;
21738 esac
21739 fi
21740
21741 if test $HAVE_GETLOGIN_R = 0 || test $REPLACE_GETLOGIN_R = 1; then
21742
21743
21744
21745
21746
21747
21748
21749
21750 gl_LIBOBJS="$gl_LIBOBJS getlogin_r.$ac_objext"
21751
21752
21753
21754
21755 fi
21756
21757
21758
21759
21760
21761 GNULIB_GETLOGIN_R=1
21762
21763
21764
21765
21766
21767 $as_echo "#define GNULIB_TEST_GETLOGIN_R 1" >>confdefs.h
21768
21769
21770
21771
21772
21773
21774
21775 ac_found=0
21776 ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
21777 "
21778 if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
21779 ac_have_decl=1
21780 else
21781 ac_have_decl=0
21782 fi
21783
21784 cat >>confdefs.h <<_ACEOF
21785 #define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
21786 _ACEOF
21787 if test $ac_have_decl = 1; then :
21788 ac_found=1
21789 fi
21790
21791 ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
21792 "
21793 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
21794 ac_have_decl=1
21795 else
21796 ac_have_decl=0
21797 fi
21798
21799 cat >>confdefs.h <<_ACEOF
21800 #define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
21801 _ACEOF
21802 if test $ac_have_decl = 1; then :
21803 ac_found=1
21804 fi
21805
21806 ac_fn_c_check_decl "$LINENO" "__argv" "ac_cv_have_decl___argv" "#include <stdlib.h>
21807 "
21808 if test "x$ac_cv_have_decl___argv" = xyes; then :
21809 ac_have_decl=1
21810 else
21811 ac_have_decl=0
21812 fi
21813
21814 cat >>confdefs.h <<_ACEOF
21815 #define HAVE_DECL___ARGV $ac_have_decl
21816 _ACEOF
21817 if test $ac_have_decl = 1; then :
21818 ac_found=1
21819 fi
21820
21821
21822 # Incur the cost of this test only if none of the above worked.
21823 if test $ac_found = 0; then
21824 # On OpenBSD 5.1, using the global __progname variable appears to be
21825 # the only way to implement getprogname.
21826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __progname is defined in default libraries" >&5
21827 $as_echo_n "checking whether __progname is defined in default libraries... " >&6; }
21828 if ${gl_cv_var___progname+:} false; then :
21829 $as_echo_n "(cached) " >&6
21830 else
21831
21832 gl_cv_var___progname=
21833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21834 /* end confdefs.h. */
21835 extern char *__progname;
21836 int
21837 main ()
21838 {
21839 return *__progname;
21840
21841 ;
21842 return 0;
21843 }
21844 _ACEOF
21845 if ac_fn_c_try_link "$LINENO"; then :
21846 gl_cv_var___progname=yes
21847
21848 fi
21849 rm -f core conftest.err conftest.$ac_objext \
21850 conftest$ac_exeext conftest.$ac_ext
21851
21852
21853 fi
21854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var___progname" >&5
21855 $as_echo "$gl_cv_var___progname" >&6; }
21856 if test "$gl_cv_var___progname" = yes; then
21857
21858 $as_echo "#define HAVE_VAR___PROGNAME 1" >>confdefs.h
21859
21860 fi
21861 fi
21862
21863
21864
21865
21866
21867 if test "$ac_cv_func_getrandom" != yes; then
21868 HAVE_GETRANDOM=0
21869 else
21870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getrandom is compatible with its GNU+BSD signature" >&5
21871 $as_echo_n "checking whether getrandom is compatible with its GNU+BSD signature... " >&6; }
21872 if ${gl_cv_func_getrandom_ok+:} false; then :
21873 $as_echo_n "(cached) " >&6
21874 else
21875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21876 /* end confdefs.h. */
21877 /* Additional includes are needed before <sys/random.h> on uClibc
21878 and Mac OS X. */
21879 #include <sys/types.h>
21880 #include <stdlib.h>
21881 #include <sys/random.h>
21882 ssize_t getrandom (void *, size_t, unsigned int);
21883
21884 int
21885 main ()
21886 {
21887
21888 ;
21889 return 0;
21890 }
21891
21892 _ACEOF
21893 if ac_fn_c_try_compile "$LINENO"; then :
21894 gl_cv_func_getrandom_ok=yes
21895 else
21896 gl_cv_func_getrandom_ok=no
21897 fi
21898 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21899
21900 fi
21901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getrandom_ok" >&5
21902 $as_echo "$gl_cv_func_getrandom_ok" >&6; }
21903 if test $gl_cv_func_getrandom_ok = no; then
21904 REPLACE_GETRANDOM=1
21905 fi
21906 fi
21907
21908 case "$host_os" in
21909 mingw*)
21910 for ac_header in bcrypt.h
21911 do :
21912 ac_fn_c_check_header_compile "$LINENO" "bcrypt.h" "ac_cv_header_bcrypt_h" "#include <windows.h>
21913
21914 "
21915 if test "x$ac_cv_header_bcrypt_h" = xyes; then :
21916 cat >>confdefs.h <<_ACEOF
21917 #define HAVE_BCRYPT_H 1
21918 _ACEOF
21919
21920 fi
21921
21922 done
21923
21924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the bcrypt library is guaranteed to be present" >&5
21925 $as_echo_n "checking whether the bcrypt library is guaranteed to be present... " >&6; }
21926 if ${gl_cv_lib_assume_bcrypt+:} false; then :
21927 $as_echo_n "(cached) " >&6
21928 else
21929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21930 /* end confdefs.h. */
21931 #include <windows.h>
21932 int
21933 main ()
21934 {
21935 #if !(_WIN32_WINNT >= _WIN32_WINNT_WIN7)
21936 cannot assume it
21937 #endif
21938
21939 ;
21940 return 0;
21941 }
21942
21943 _ACEOF
21944 if ac_fn_c_try_compile "$LINENO"; then :
21945 gl_cv_lib_assume_bcrypt=yes
21946 else
21947 gl_cv_lib_assume_bcrypt=no
21948 fi
21949 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21950
21951 fi
21952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_assume_bcrypt" >&5
21953 $as_echo "$gl_cv_lib_assume_bcrypt" >&6; }
21954 if test $gl_cv_lib_assume_bcrypt = yes; then
21955
21956 $as_echo "#define HAVE_LIB_BCRYPT 1" >>confdefs.h
21957
21958 LIB_GETRANDOM='-lbcrypt'
21959 else
21960 LIB_GETRANDOM='-ladvapi32'
21961 fi
21962 ;;
21963 *)
21964 LIB_GETRANDOM= ;;
21965 esac
21966
21967
21968 if test $HAVE_GETRANDOM = 0 || test $REPLACE_GETRANDOM = 1; then
21969
21970
21971
21972
21973
21974
21975
21976
21977 gl_LIBOBJS="$gl_LIBOBJS getrandom.$ac_objext"
21978
21979 fi
21980
21981
21982
21983
21984
21985 GNULIB_GETRANDOM=1
21986
21987
21988
21989
21990
21991 $as_echo "#define GNULIB_TEST_GETRANDOM 1" >>confdefs.h
21992
21993
21994
21995
21996
21997
21998
21999
22000
22001
22002
22003
22004 gl_gettimeofday_timezone=void
22005 if test $ac_cv_func_gettimeofday != yes; then
22006 HAVE_GETTIMEOFDAY=0
22007 else
22008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
22009 $as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
22010 if ${gl_cv_func_gettimeofday_posix_signature+:} false; then :
22011 $as_echo_n "(cached) " >&6
22012 else
22013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22014 /* end confdefs.h. */
22015 #include <sys/time.h>
22016 struct timeval c;
22017 int gettimeofday (struct timeval *restrict, void *restrict);
22018
22019 int
22020 main ()
22021 {
22022 /* glibc uses struct timezone * rather than the POSIX void *
22023 if _GNU_SOURCE is defined. However, since the only portable
22024 use of gettimeofday uses NULL as the second parameter, and
22025 since the glibc definition is actually more typesafe, it is
22026 not worth wrapping this to get a compliant signature. */
22027 int (*f) (struct timeval *restrict, void *restrict)
22028 = gettimeofday;
22029 int x = f (&c, 0);
22030 return !(x | c.tv_sec | c.tv_usec);
22031
22032 ;
22033 return 0;
22034 }
22035 _ACEOF
22036 if ac_fn_c_try_compile "$LINENO"; then :
22037 gl_cv_func_gettimeofday_posix_signature=yes
22038 else
22039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22040 /* end confdefs.h. */
22041 #include <sys/time.h>
22042 int gettimeofday (struct timeval *restrict, struct timezone *restrict);
22043
22044 int
22045 main ()
22046 {
22047
22048 ;
22049 return 0;
22050 }
22051 _ACEOF
22052 if ac_fn_c_try_compile "$LINENO"; then :
22053 gl_cv_func_gettimeofday_posix_signature=almost
22054 else
22055 gl_cv_func_gettimeofday_posix_signature=no
22056 fi
22057 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22058 fi
22059 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22060 fi
22061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
22062 $as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
22063 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
22064 gl_gettimeofday_timezone='struct timezone'
22065 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
22066 REPLACE_GETTIMEOFDAY=1
22067 fi
22068 if test $REPLACE_STRUCT_TIMEVAL = 1; then
22069 REPLACE_GETTIMEOFDAY=1
22070 fi
22071 case "$host_os" in
22072 mingw*) REPLACE_GETTIMEOFDAY=1 ;;
22073 esac
22074 fi
22075
22076 cat >>confdefs.h <<_ACEOF
22077 #define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
22078 _ACEOF
22079
22080
22081 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
22082
22083
22084
22085
22086
22087
22088
22089
22090 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
22091
22092 :
22093 fi
22094
22095
22096
22097
22098
22099 GNULIB_GETTIMEOFDAY=1
22100
22101
22102
22103
22104
22105 $as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
22106
22107
22108
22109
22110
22111
22112
22113 if test $ac_cv_func_glob = no; then
22114 HAVE_GLOB=0
22115 else
22116
22117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU glob interface version 1 or 2" >&5
22118 $as_echo_n "checking for GNU glob interface version 1 or 2... " >&6; }
22119 if ${gl_cv_gnu_glob_interface_version_1_2+:} false; then :
22120 $as_echo_n "(cached) " >&6
22121 else
22122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22123 /* end confdefs.h. */
22124 #include <gnu-versions.h>
22125 char a[_GNU_GLOB_INTERFACE_VERSION == 1 || _GNU_GLOB_INTERFACE_VERSION == 2 ? 1 : -1];
22126 _ACEOF
22127 if ac_fn_c_try_compile "$LINENO"; then :
22128 gl_cv_gnu_glob_interface_version_1_2=yes
22129 else
22130 gl_cv_gnu_glob_interface_version_1_2=no
22131 fi
22132 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22133 fi
22134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_gnu_glob_interface_version_1_2" >&5
22135 $as_echo "$gl_cv_gnu_glob_interface_version_1_2" >&6; }
22136 if test "$gl_cv_gnu_glob_interface_version_1_2" = "no"; then
22137 REPLACE_GLOB=1
22138 fi
22139
22140 if test $REPLACE_GLOB = 0; then
22141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether glob lists broken symlinks" >&5
22142 $as_echo_n "checking whether glob lists broken symlinks... " >&6; }
22143 if ${gl_cv_glob_lists_symlinks+:} false; then :
22144 $as_echo_n "(cached) " >&6
22145 else
22146 if test $cross_compiling != yes; then
22147 if ln -s conf-doesntexist conf$$-globtest 2>/dev/null; then
22148 gl_cv_glob_lists_symlinks=maybe
22149 else
22150 # If we can't make a symlink, then we cannot test this issue. Be
22151 # pessimistic about this.
22152 gl_cv_glob_lists_symlinks=no
22153 fi
22154 if test $gl_cv_glob_lists_symlinks = maybe; then
22155 if test "$cross_compiling" = yes; then :
22156 :
22157
22158 else
22159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22160 /* end confdefs.h. */
22161 #include <stddef.h>
22162 #include <glob.h>
22163 int
22164 main ()
22165 {
22166 glob_t found;
22167 if (glob ("conf*-globtest", 0, NULL, &found) == GLOB_NOMATCH)
22168 return 1;
22169 globfree (&found);
22170
22171 ;
22172 return 0;
22173 }
22174 _ACEOF
22175 if ac_fn_c_try_run "$LINENO"; then :
22176 gl_cv_glob_lists_symlinks=yes
22177 else
22178 gl_cv_glob_lists_symlinks=no
22179 fi
22180 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22181 conftest.$ac_objext conftest.beam conftest.$ac_ext
22182 fi
22183
22184 fi
22185 rm -f conf$$-globtest
22186 else
22187 gl_cv_glob_lists_symlinks="$gl_cross_guess_normal"
22188 fi
22189
22190 fi
22191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_glob_lists_symlinks" >&5
22192 $as_echo "$gl_cv_glob_lists_symlinks" >&6; }
22193 case "$gl_cv_glob_lists_symlinks" in
22194 *yes) ;;
22195 *) REPLACE_GLOB=1 ;;
22196 esac
22197 fi
22198
22199 fi
22200
22201 if test $ac_cv_func_glob_pattern_p = no; then
22202 HAVE_GLOB_PATTERN_P=0
22203 else
22204 if test $REPLACE_GLOB = 1; then
22205 REPLACE_GLOB_PATTERN_P=1
22206 fi
22207 fi
22208
22209 if test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1; then
22210
22211
22212 GLOB_H='glob.h'
22213 if test -n "$GLOB_H"; then
22214 GL_GENERATE_GLOB_H_TRUE=
22215 GL_GENERATE_GLOB_H_FALSE='#'
22216 else
22217 GL_GENERATE_GLOB_H_TRUE='#'
22218 GL_GENERATE_GLOB_H_FALSE=
22219 fi
22220
22221
22222 fi
22223
22224 if test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1; then
22225
22226
22227
22228
22229
22230
22231
22232
22233 gl_LIBOBJS="$gl_LIBOBJS glob.$ac_objext"
22234
22235
22236
22237
22238
22239
22240
22241
22242
22243 gl_LIBOBJS="$gl_LIBOBJS globfree.$ac_objext"
22244
22245
22246
22247
22248
22249
22250 fi
22251 if test $HAVE_GLOB_PATTERN_P = 0 || test $REPLACE_GLOB_PATTERN_P = 1; then
22252
22253
22254
22255
22256
22257
22258
22259
22260 gl_LIBOBJS="$gl_LIBOBJS glob_pattern_p.$ac_objext"
22261
22262 fi
22263
22264
22265
22266
22267
22268 GNULIB_GLOB=1
22269
22270
22271
22272
22273
22274 $as_echo "#define GNULIB_TEST_GLOB 1" >>confdefs.h
22275
22276
22277
22278
22279
22280 LIB_HARD_LOCALE="$LIB_SETLOCALE_NULL"
22281
22282
22283
22284
22285
22286
22287
22288
22289 HAVE_INET_NTOP=1
22290 INET_NTOP_LIB=
22291
22292
22293
22294
22295 if test $ac_cv_header_sys_socket_h != yes; then
22296 for ac_header in winsock2.h
22297 do :
22298 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
22299 if test "x$ac_cv_header_winsock2_h" = xyes; then :
22300 cat >>confdefs.h <<_ACEOF
22301 #define HAVE_WINSOCK2_H 1
22302 _ACEOF
22303
22304 fi
22305
22306 done
22307
22308 fi
22309 if test "$ac_cv_header_winsock2_h" = yes; then
22310 HAVE_WINSOCK2_H=1
22311 UNISTD_H_HAVE_WINSOCK2_H=1
22312 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
22313 else
22314 HAVE_WINSOCK2_H=0
22315 fi
22316
22317
22318 if test $HAVE_WINSOCK2_H = 1; then
22319 REPLACE_INET_NTOP=1
22320 ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <ws2tcpip.h>
22321 "
22322 if test "x$ac_cv_have_decl_inet_ntop" = xyes; then :
22323 ac_have_decl=1
22324 else
22325 ac_have_decl=0
22326 fi
22327
22328 cat >>confdefs.h <<_ACEOF
22329 #define HAVE_DECL_INET_NTOP $ac_have_decl
22330 _ACEOF
22331
22332 if test $ac_cv_have_decl_inet_ntop = yes; then
22333 INET_NTOP_LIB="-lws2_32"
22334 else
22335 HAVE_DECL_INET_NTOP=0
22336 fi
22337 else
22338 gl_save_LIBS=$LIBS
22339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5
22340 $as_echo_n "checking for library containing inet_ntop... " >&6; }
22341 if ${ac_cv_search_inet_ntop+:} false; then :
22342 $as_echo_n "(cached) " >&6
22343 else
22344 ac_func_search_save_LIBS=$LIBS
22345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22346 /* end confdefs.h. */
22347
22348 /* Override any GCC internal prototype to avoid an error.
22349 Use char because int might match the return type of a GCC
22350 builtin and then its argument prototype would still apply. */
22351 #ifdef __cplusplus
22352 extern "C"
22353 #endif
22354 char inet_ntop ();
22355 int
22356 main ()
22357 {
22358 return inet_ntop ();
22359 ;
22360 return 0;
22361 }
22362 _ACEOF
22363 for ac_lib in '' nsl resolv network; do
22364 if test -z "$ac_lib"; then
22365 ac_res="none required"
22366 else
22367 ac_res=-l$ac_lib
22368 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
22369 fi
22370 if ac_fn_c_try_link "$LINENO"; then :
22371 ac_cv_search_inet_ntop=$ac_res
22372 fi
22373 rm -f core conftest.err conftest.$ac_objext \
22374 conftest$ac_exeext
22375 if ${ac_cv_search_inet_ntop+:} false; then :
22376 break
22377 fi
22378 done
22379 if ${ac_cv_search_inet_ntop+:} false; then :
22380
22381 else
22382 ac_cv_search_inet_ntop=no
22383 fi
22384 rm conftest.$ac_ext
22385 LIBS=$ac_func_search_save_LIBS
22386 fi
22387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5
22388 $as_echo "$ac_cv_search_inet_ntop" >&6; }
22389 ac_res=$ac_cv_search_inet_ntop
22390 if test "$ac_res" != no; then :
22391 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
22392
22393 else
22394 for ac_func in inet_ntop
22395 do :
22396 ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
22397 if test "x$ac_cv_func_inet_ntop" = xyes; then :
22398 cat >>confdefs.h <<_ACEOF
22399 #define HAVE_INET_NTOP 1
22400 _ACEOF
22401
22402 fi
22403 done
22404
22405 if test $ac_cv_func_inet_ntop = no; then
22406 HAVE_INET_NTOP=0
22407 fi
22408
22409 fi
22410
22411 LIBS=$gl_save_LIBS
22412
22413 if test "$ac_cv_search_inet_ntop" != "no" \
22414 && test "$ac_cv_search_inet_ntop" != "none required"; then
22415 INET_NTOP_LIB="$ac_cv_search_inet_ntop"
22416 fi
22417
22418
22419 ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <arpa/inet.h>
22420 #if HAVE_NETDB_H
22421 # include <netdb.h>
22422 #endif
22423
22424 "
22425 if test "x$ac_cv_have_decl_inet_ntop" = xyes; then :
22426 ac_have_decl=1
22427 else
22428 ac_have_decl=0
22429 fi
22430
22431 cat >>confdefs.h <<_ACEOF
22432 #define HAVE_DECL_INET_NTOP $ac_have_decl
22433 _ACEOF
22434
22435 if test $ac_cv_have_decl_inet_ntop = no; then
22436 HAVE_DECL_INET_NTOP=0
22437 fi
22438 fi
22439
22440
22441 if test $HAVE_INET_NTOP = 0 || test $REPLACE_INET_NTOP = 1; then
22442
22443
22444
22445
22446
22447
22448
22449
22450 gl_LIBOBJS="$gl_LIBOBJS inet_ntop.$ac_objext"
22451
22452
22453
22454
22455 fi
22456
22457
22458
22459
22460
22461 GNULIB_INET_NTOP=1
22462
22463
22464
22465
22466
22467
22468
22469 PRIPTR_PREFIX=
22470 if test -n "$STDINT_H"; then
22471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22472 /* end confdefs.h. */
22473
22474 #ifdef _WIN64
22475 LLP64
22476 #endif
22477
22478 int
22479 main ()
22480 {
22481
22482 ;
22483 return 0;
22484 }
22485
22486 _ACEOF
22487 if ac_fn_c_try_compile "$LINENO"; then :
22488 PRIPTR_PREFIX='"l"'
22489 else
22490 PRIPTR_PREFIX='"ll"'
22491 fi
22492 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22493 else
22494 for glpfx in '' l ll I64; do
22495 case $glpfx in
22496 '') gltype1='int';;
22497 l) gltype1='long int';;
22498 ll) gltype1='long long int';;
22499 I64) gltype1='__int64';;
22500 esac
22501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22502 /* end confdefs.h. */
22503 #include <stdint.h>
22504 extern intptr_t foo;
22505 extern $gltype1 foo;
22506 int
22507 main ()
22508 {
22509
22510 ;
22511 return 0;
22512 }
22513 _ACEOF
22514 if ac_fn_c_try_compile "$LINENO"; then :
22515 PRIPTR_PREFIX='"'$glpfx'"'
22516 fi
22517 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22518 test -n "$PRIPTR_PREFIX" && break
22519 done
22520 fi
22521
22522
22523
22524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
22525 $as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
22526 if ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+:} false; then :
22527 $as_echo_n "(cached) " >&6
22528 else
22529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22530 /* end confdefs.h. */
22531 /* Work also in C++ mode. */
22532 #define __STDC_LIMIT_MACROS 1
22533
22534 /* Work if build is not clean. */
22535 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
22536
22537 #include <limits.h>
22538 #if HAVE_STDINT_H
22539 #include <stdint.h>
22540 #endif
22541
22542 #if defined INT32_MAX && defined INTMAX_MAX
22543 #define CONDITION (INT32_MAX < INTMAX_MAX)
22544 #else
22545 #define CONDITION (sizeof (int) < sizeof (long long int))
22546 #endif
22547 int test[CONDITION ? 1 : -1];
22548 int
22549 main ()
22550 {
22551
22552 ;
22553 return 0;
22554 }
22555 _ACEOF
22556 if ac_fn_c_try_compile "$LINENO"; then :
22557 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
22558 else
22559 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
22560 fi
22561 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22562 fi
22563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
22564 $as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
22565 if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
22566 INT32_MAX_LT_INTMAX_MAX=1;
22567 else
22568 INT32_MAX_LT_INTMAX_MAX=0;
22569 fi
22570
22571
22572 if test $APPLE_UNIVERSAL_BUILD = 0; then
22573
22574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
22575 $as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; }
22576 if ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+:} false; then :
22577 $as_echo_n "(cached) " >&6
22578 else
22579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22580 /* end confdefs.h. */
22581 /* Work also in C++ mode. */
22582 #define __STDC_LIMIT_MACROS 1
22583
22584 /* Work if build is not clean. */
22585 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
22586
22587 #include <limits.h>
22588 #if HAVE_STDINT_H
22589 #include <stdint.h>
22590 #endif
22591
22592 #if defined INT64_MAX
22593 #define CONDITION (INT64_MAX == LONG_MAX)
22594 #else
22595 #define CONDITION (sizeof (long long int) == sizeof (long int))
22596 #endif
22597 int test[CONDITION ? 1 : -1];
22598 int
22599 main ()
22600 {
22601
22602 ;
22603 return 0;
22604 }
22605 _ACEOF
22606 if ac_fn_c_try_compile "$LINENO"; then :
22607 gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
22608 else
22609 gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
22610 fi
22611 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22612 fi
22613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
22614 $as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
22615 if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
22616 INT64_MAX_EQ_LONG_MAX=1;
22617 else
22618 INT64_MAX_EQ_LONG_MAX=0;
22619 fi
22620
22621
22622 else
22623 INT64_MAX_EQ_LONG_MAX=-1
22624 fi
22625
22626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
22627 $as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
22628 if ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+:} false; then :
22629 $as_echo_n "(cached) " >&6
22630 else
22631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22632 /* end confdefs.h. */
22633 /* Work also in C++ mode. */
22634 #define __STDC_LIMIT_MACROS 1
22635
22636 /* Work if build is not clean. */
22637 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
22638
22639 #include <limits.h>
22640 #if HAVE_STDINT_H
22641 #include <stdint.h>
22642 #endif
22643
22644 #if defined UINT32_MAX && defined UINTMAX_MAX
22645 #define CONDITION (UINT32_MAX < UINTMAX_MAX)
22646 #else
22647 #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
22648 #endif
22649 int test[CONDITION ? 1 : -1];
22650 int
22651 main ()
22652 {
22653
22654 ;
22655 return 0;
22656 }
22657 _ACEOF
22658 if ac_fn_c_try_compile "$LINENO"; then :
22659 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
22660 else
22661 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
22662 fi
22663 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22664 fi
22665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
22666 $as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
22667 if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
22668 UINT32_MAX_LT_UINTMAX_MAX=1;
22669 else
22670 UINT32_MAX_LT_UINTMAX_MAX=0;
22671 fi
22672
22673
22674 if test $APPLE_UNIVERSAL_BUILD = 0; then
22675
22676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
22677 $as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
22678 if ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+:} false; then :
22679 $as_echo_n "(cached) " >&6
22680 else
22681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22682 /* end confdefs.h. */
22683 /* Work also in C++ mode. */
22684 #define __STDC_LIMIT_MACROS 1
22685
22686 /* Work if build is not clean. */
22687 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
22688
22689 #include <limits.h>
22690 #if HAVE_STDINT_H
22691 #include <stdint.h>
22692 #endif
22693
22694 #if defined UINT64_MAX
22695 #define CONDITION (UINT64_MAX == ULONG_MAX)
22696 #else
22697 #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
22698 #endif
22699 int test[CONDITION ? 1 : -1];
22700 int
22701 main ()
22702 {
22703
22704 ;
22705 return 0;
22706 }
22707 _ACEOF
22708 if ac_fn_c_try_compile "$LINENO"; then :
22709 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
22710 else
22711 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
22712 fi
22713 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22714 fi
22715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
22716 $as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
22717 if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
22718 UINT64_MAX_EQ_ULONG_MAX=1;
22719 else
22720 UINT64_MAX_EQ_ULONG_MAX=0;
22721 fi
22722
22723
22724 else
22725 UINT64_MAX_EQ_ULONG_MAX=-1
22726 fi
22727
22728
22729
22730
22731
22732
22733
22734
22735 if test $ac_cv_func_isblank = no; then
22736 HAVE_ISBLANK=0
22737 fi
22738
22739 if test $HAVE_ISBLANK = 0; then
22740
22741
22742
22743
22744
22745
22746
22747
22748 gl_LIBOBJS="$gl_LIBOBJS isblank.$ac_objext"
22749
22750 fi
22751
22752
22753 cat >>confdefs.h <<_ACEOF
22754 #define GNULIB_ISBLANK 1
22755 _ACEOF
22756
22757
22758
22759
22760
22761
22762
22763 GNULIB_ISBLANK=1
22764
22765
22766
22767
22768
22769
22770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
22771 $as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; }
22772 if ${gl_cv_func_isnand_no_libm+:} false; then :
22773 $as_echo_n "(cached) " >&6
22774 else
22775
22776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22777 /* end confdefs.h. */
22778 #include <math.h>
22779 #if (__GNUC__ >= 4) || (__clang_major__ >= 4)
22780 # undef isnand
22781 # define isnand(x) __builtin_isnan ((double)(x))
22782 #else
22783 # undef isnand
22784 # define isnand(x) isnan ((double)(x))
22785 #endif
22786 double x;
22787 int
22788 main ()
22789 {
22790 return isnand (x);
22791 ;
22792 return 0;
22793 }
22794 _ACEOF
22795 if ac_fn_c_try_link "$LINENO"; then :
22796 gl_cv_func_isnand_no_libm=yes
22797 else
22798 gl_cv_func_isnand_no_libm=no
22799 fi
22800 rm -f core conftest.err conftest.$ac_objext \
22801 conftest$ac_exeext conftest.$ac_ext
22802
22803 fi
22804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
22805 $as_echo "$gl_cv_func_isnand_no_libm" >&6; }
22806
22807 gl_func_isnand_no_libm=$gl_cv_func_isnand_no_libm
22808 if test $gl_cv_func_isnand_no_libm = yes; then
22809
22810 $as_echo "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h
22811
22812 fi
22813
22814 if test $gl_func_isnand_no_libm != yes; then
22815
22816
22817
22818
22819
22820
22821
22822
22823 gl_LIBOBJS="$gl_LIBOBJS isnand.$ac_objext"
22824
22825
22826
22827
22828 fi
22829
22830
22831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
22832 $as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; }
22833 if ${gl_cv_func_isnanl_no_libm+:} false; then :
22834 $as_echo_n "(cached) " >&6
22835 else
22836
22837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22838 /* end confdefs.h. */
22839 #include <math.h>
22840 #if (__GNUC__ >= 4) || (__clang_major__ >= 4)
22841 # undef isnanl
22842 # define isnanl(x) __builtin_isnan ((long double)(x))
22843 #elif defined isnan
22844 # undef isnanl
22845 # define isnanl(x) isnan ((long double)(x))
22846 #endif
22847 long double x;
22848 int
22849 main ()
22850 {
22851 return isnanl (x);
22852 ;
22853 return 0;
22854 }
22855 _ACEOF
22856 if ac_fn_c_try_link "$LINENO"; then :
22857 gl_cv_func_isnanl_no_libm=yes
22858 else
22859 gl_cv_func_isnanl_no_libm=no
22860 fi
22861 rm -f core conftest.err conftest.$ac_objext \
22862 conftest$ac_exeext conftest.$ac_ext
22863
22864 fi
22865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
22866 $as_echo "$gl_cv_func_isnanl_no_libm" >&6; }
22867
22868 gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm
22869 if test $gl_func_isnanl_no_libm = yes; then
22870
22871
22872
22873
22874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
22875 $as_echo_n "checking whether isnanl works... " >&6; }
22876 if ${gl_cv_func_isnanl_works+:} false; then :
22877 $as_echo_n "(cached) " >&6
22878 else
22879
22880 if test "$cross_compiling" = yes; then :
22881 case "$host_os" in
22882 mingw*) # Guess yes on mingw, no on MSVC.
22883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22884 /* end confdefs.h. */
22885
22886 #ifdef __MINGW32__
22887 Known
22888 #endif
22889
22890 _ACEOF
22891 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22892 $EGREP "Known" >/dev/null 2>&1; then :
22893 gl_cv_func_isnanl_works="guessing yes"
22894 else
22895 gl_cv_func_isnanl_works="guessing no"
22896 fi
22897 rm -f conftest*
22898
22899 ;;
22900 *) gl_cv_func_isnanl_works="guessing yes" ;;
22901 esac
22902
22903 else
22904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22905 /* end confdefs.h. */
22906
22907 #include <float.h>
22908 #include <limits.h>
22909 #include <math.h>
22910 #if (__GNUC__ >= 4) || (__clang_major__ >= 4)
22911 # undef isnanl
22912 # define isnanl(x) __builtin_isnan ((long double)(x))
22913 #elif defined isnan
22914 # undef isnanl
22915 # define isnanl(x) isnan ((long double)(x))
22916 #endif
22917 #define NWORDS \
22918 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
22919 typedef union { unsigned int word[NWORDS]; long double value; }
22920 memory_long_double;
22921 /* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
22922 runtime type conversion. */
22923 #ifdef __sgi
22924 static long double NaNl ()
22925 {
22926 double zero = 0.0;
22927 return zero / zero;
22928 }
22929 #else
22930 # define NaNl() (0.0L / 0.0L)
22931 #endif
22932 int main ()
22933 {
22934 int result = 0;
22935
22936 if (!isnanl (NaNl ()))
22937 result |= 1;
22938
22939 {
22940 memory_long_double m;
22941 unsigned int i;
22942
22943 /* The isnanl function should be immune against changes in the sign bit and
22944 in the mantissa bits. The xor operation twiddles a bit that can only be
22945 a sign bit or a mantissa bit (since the exponent never extends to
22946 bit 31). */
22947 m.value = NaNl ();
22948 m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
22949 for (i = 0; i < NWORDS; i++)
22950 m.word[i] |= 1;
22951 if (!isnanl (m.value))
22952 result |= 1;
22953 }
22954
22955 #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
22956 /* Representation of an 80-bit 'long double' as an initializer for a sequence
22957 of 'unsigned int' words. */
22958 # ifdef WORDS_BIGENDIAN
22959 # define LDBL80_WORDS(exponent,manthi,mantlo) \
22960 { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
22961 ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \
22962 (unsigned int) (mantlo) << 16 \
22963 }
22964 # else
22965 # define LDBL80_WORDS(exponent,manthi,mantlo) \
22966 { mantlo, manthi, exponent }
22967 # endif
22968 { /* Quiet NaN. */
22969 static memory_long_double x =
22970 { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
22971 if (!isnanl (x.value))
22972 result |= 2;
22973 }
22974 {
22975 /* Signalling NaN. */
22976 static memory_long_double x =
22977 { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
22978 if (!isnanl (x.value))
22979 result |= 2;
22980 }
22981 /* isnanl should return something even for noncanonical values. */
22982 { /* Pseudo-NaN. */
22983 static memory_long_double x =
22984 { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
22985 if (isnanl (x.value) && !isnanl (x.value))
22986 result |= 4;
22987 }
22988 { /* Pseudo-Infinity. */
22989 static memory_long_double x =
22990 { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
22991 if (isnanl (x.value) && !isnanl (x.value))
22992 result |= 8;
22993 }
22994 { /* Pseudo-Zero. */
22995 static memory_long_double x =
22996 { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
22997 if (isnanl (x.value) && !isnanl (x.value))
22998 result |= 16;
22999 }
23000 { /* Unnormalized number. */
23001 static memory_long_double x =
23002 { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
23003 if (isnanl (x.value) && !isnanl (x.value))
23004 result |= 32;
23005 }
23006 { /* Pseudo-Denormal. */
23007 static memory_long_double x =
23008 { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
23009 if (isnanl (x.value) && !isnanl (x.value))
23010 result |= 64;
23011 }
23012 #endif
23013
23014 return result;
23015 }
23016 _ACEOF
23017 if ac_fn_c_try_run "$LINENO"; then :
23018 gl_cv_func_isnanl_works=yes
23019 else
23020 gl_cv_func_isnanl_works=no
23021 fi
23022 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23023 conftest.$ac_objext conftest.beam conftest.$ac_ext
23024 fi
23025
23026
23027 fi
23028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
23029 $as_echo "$gl_cv_func_isnanl_works" >&6; }
23030
23031 case "$gl_cv_func_isnanl_works" in
23032 *yes) ;;
23033 *) gl_func_isnanl_no_libm=no ;;
23034 esac
23035 fi
23036 if test $gl_func_isnanl_no_libm = yes; then
23037
23038 $as_echo "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h
23039
23040 fi
23041
23042 if test $gl_func_isnanl_no_libm != yes; then
23043
23044
23045
23046
23047
23048
23049
23050
23051 gl_LIBOBJS="$gl_LIBOBJS isnanl.$ac_objext"
23052
23053
23054
23055
23056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
23057 $as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
23058 if ${gl_cv_cc_long_double_expbit0+:} false; then :
23059 $as_echo_n "(cached) " >&6
23060 else
23061
23062 if test "$cross_compiling" = yes; then :
23063
23064 gl_cv_cc_long_double_expbit0="unknown"
23065 case "$host_os" in
23066 mingw*) # On native Windows (little-endian), we know the result
23067 # in two cases: mingw, MSVC.
23068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23069 /* end confdefs.h. */
23070
23071 #ifdef __MINGW32__
23072 Known
23073 #endif
23074
23075 _ACEOF
23076 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23077 $EGREP "Known" >/dev/null 2>&1; then :
23078 gl_cv_cc_long_double_expbit0="word 2 bit 0"
23079 fi
23080 rm -f conftest*
23081
23082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23083 /* end confdefs.h. */
23084
23085 #ifdef _MSC_VER
23086 Known
23087 #endif
23088
23089 _ACEOF
23090 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23091 $EGREP "Known" >/dev/null 2>&1; then :
23092 gl_cv_cc_long_double_expbit0="word 1 bit 20"
23093 fi
23094 rm -f conftest*
23095
23096 ;;
23097 esac
23098
23099 else
23100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23101 /* end confdefs.h. */
23102
23103 #include <float.h>
23104 #include <stddef.h>
23105 #include <stdio.h>
23106 #include <string.h>
23107 #define NWORDS \
23108 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
23109 typedef union { long double value; unsigned int word[NWORDS]; }
23110 memory_long_double;
23111 static unsigned int ored_words[NWORDS];
23112 static unsigned int anded_words[NWORDS];
23113 static void add_to_ored_words (long double *x)
23114 {
23115 memory_long_double m;
23116 size_t i;
23117 /* Clear it first, in case
23118 sizeof (long double) < sizeof (memory_long_double). */
23119 memset (&m, 0, sizeof (memory_long_double));
23120 m.value = *x;
23121 for (i = 0; i < NWORDS; i++)
23122 {
23123 ored_words[i] |= m.word[i];
23124 anded_words[i] &= m.word[i];
23125 }
23126 }
23127 int main ()
23128 {
23129 static long double samples[5] = { 0.25L, 0.5L, 1.0L, 2.0L, 4.0L };
23130 size_t j;
23131 FILE *fp = fopen ("conftest.out", "w");
23132 if (fp == NULL)
23133 return 1;
23134 for (j = 0; j < NWORDS; j++)
23135 anded_words[j] = ~ (unsigned int) 0;
23136 for (j = 0; j < 5; j++)
23137 add_to_ored_words (&samples[j]);
23138 /* Remove bits that are common (e.g. if representation of the first mantissa
23139 bit is explicit). */
23140 for (j = 0; j < NWORDS; j++)
23141 ored_words[j] &= ~anded_words[j];
23142 /* Now find the nonzero word. */
23143 for (j = 0; j < NWORDS; j++)
23144 if (ored_words[j] != 0)
23145 break;
23146 if (j < NWORDS)
23147 {
23148 size_t i;
23149 for (i = j + 1; i < NWORDS; i++)
23150 if (ored_words[i] != 0)
23151 {
23152 fprintf (fp, "unknown");
23153 return (fclose (fp) != 0);
23154 }
23155 for (i = 0; ; i++)
23156 if ((ored_words[j] >> i) & 1)
23157 {
23158 fprintf (fp, "word %d bit %d", (int) j, (int) i);
23159 return (fclose (fp) != 0);
23160 }
23161 }
23162 fprintf (fp, "unknown");
23163 return (fclose (fp) != 0);
23164 }
23165
23166 _ACEOF
23167 if ac_fn_c_try_run "$LINENO"; then :
23168 gl_cv_cc_long_double_expbit0=`cat conftest.out`
23169 else
23170 gl_cv_cc_long_double_expbit0="unknown"
23171 fi
23172 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23173 conftest.$ac_objext conftest.beam conftest.$ac_ext
23174 fi
23175
23176 rm -f conftest.out
23177
23178 fi
23179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
23180 $as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
23181 case "$gl_cv_cc_long_double_expbit0" in
23182 word*bit*)
23183 word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
23184 bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
23185
23186 cat >>confdefs.h <<_ACEOF
23187 #define LDBL_EXPBIT0_WORD $word
23188 _ACEOF
23189
23190
23191 cat >>confdefs.h <<_ACEOF
23192 #define LDBL_EXPBIT0_BIT $bit
23193 _ACEOF
23194
23195 ;;
23196 esac
23197
23198
23199
23200 fi
23201
23202
23203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the __inline keyword" >&5
23204 $as_echo_n "checking whether the compiler supports the __inline keyword... " >&6; }
23205 if ${gl_cv_c___inline+:} false; then :
23206 $as_echo_n "(cached) " >&6
23207 else
23208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23209 /* end confdefs.h. */
23210 typedef int foo_t;
23211 static __inline foo_t foo (void) { return 0; }
23212 int
23213 main ()
23214 {
23215 return foo ();
23216 ;
23217 return 0;
23218 }
23219 _ACEOF
23220 if ac_fn_c_try_compile "$LINENO"; then :
23221 gl_cv_c___inline=yes
23222 else
23223 gl_cv_c___inline=no
23224 fi
23225 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23226 fi
23227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c___inline" >&5
23228 $as_echo "$gl_cv_c___inline" >&6; }
23229 if test $gl_cv_c___inline = yes; then
23230
23231 $as_echo "#define HAVE___INLINE 1" >>confdefs.h
23232
23233 fi
23234
23235
23236
23237
23238
23239 LOCALCHARSET_TESTS_ENVIRONMENT=
23240
23241
23242
23243
23244
23245
23246
23247
23248
23249
23250
23251 case "$host_os" in
23252 solaris*)
23253
23254 $as_echo "#define _LCONV_C99 1" >>confdefs.h
23255
23256 ;;
23257 esac
23258
23259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5
23260 $as_echo_n "checking whether locale.h conforms to POSIX:2001... " >&6; }
23261 if ${gl_cv_header_locale_h_posix2001+:} false; then :
23262 $as_echo_n "(cached) " >&6
23263 else
23264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23265 /* end confdefs.h. */
23266 #include <locale.h>
23267 int x = LC_MESSAGES;
23268 int y = sizeof (((struct lconv *) 0)->decimal_point);
23269 int
23270 main ()
23271 {
23272
23273 ;
23274 return 0;
23275 }
23276 _ACEOF
23277 if ac_fn_c_try_compile "$LINENO"; then :
23278 gl_cv_header_locale_h_posix2001=yes
23279 else
23280 gl_cv_header_locale_h_posix2001=no
23281 fi
23282 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23283 fi
23284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_h_posix2001" >&5
23285 $as_echo "$gl_cv_header_locale_h_posix2001" >&6; }
23286
23287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct lconv is properly defined" >&5
23288 $as_echo_n "checking whether struct lconv is properly defined... " >&6; }
23289 if ${gl_cv_sys_struct_lconv_ok+:} false; then :
23290 $as_echo_n "(cached) " >&6
23291 else
23292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23293 /* end confdefs.h. */
23294 #include <locale.h>
23295 struct lconv l;
23296 int x = sizeof (l.decimal_point);
23297 int y = sizeof (l.int_p_cs_precedes);
23298 int
23299 main ()
23300 {
23301
23302 ;
23303 return 0;
23304 }
23305 _ACEOF
23306 if ac_fn_c_try_compile "$LINENO"; then :
23307 gl_cv_sys_struct_lconv_ok=yes
23308 else
23309 gl_cv_sys_struct_lconv_ok=no
23310 fi
23311 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23312
23313 fi
23314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_lconv_ok" >&5
23315 $as_echo "$gl_cv_sys_struct_lconv_ok" >&6; }
23316 if test $gl_cv_sys_struct_lconv_ok = no; then
23317 case "$host_os" in
23318 mingw*)
23319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23320 /* end confdefs.h. */
23321
23322 #ifdef _MSC_VER
23323 Special
23324 #endif
23325
23326 _ACEOF
23327 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23328 $EGREP "Special" >/dev/null 2>&1; then :
23329
23330 else
23331 REPLACE_STRUCT_LCONV=1
23332 fi
23333 rm -f conftest*
23334
23335 ;;
23336 *) REPLACE_STRUCT_LCONV=1 ;;
23337 esac
23338 fi
23339
23340
23341
23342
23343
23344
23345
23346
23347
23348 if test $gl_cv_have_include_next = yes; then
23349 gl_cv_next_locale_h='<'locale.h'>'
23350 else
23351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <locale.h>" >&5
23352 $as_echo_n "checking absolute name of <locale.h>... " >&6; }
23353 if ${gl_cv_next_locale_h+:} false; then :
23354 $as_echo_n "(cached) " >&6
23355 else
23356
23357
23358
23359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23360 /* end confdefs.h. */
23361 #include <locale.h>
23362 _ACEOF
23363 case "$host_os" in
23364 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23365 *) gl_absname_cpp="$ac_cpp" ;;
23366 esac
23367
23368 case "$host_os" in
23369 mingw*)
23370 gl_dirsep_regex='[/\\]'
23371 ;;
23372 *)
23373 gl_dirsep_regex='\/'
23374 ;;
23375 esac
23376 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23377 gl_header_literal_regex=`echo 'locale.h' \
23378 | sed -e "$gl_make_literal_regex_sed"`
23379 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23380 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23381 s|^/[^/]|//&|
23382 p
23383 q
23384 }'
23385
23386 gl_cv_absolute_locale_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23387 sed -n "$gl_absolute_header_sed"`
23388
23389 gl_header=$gl_cv_absolute_locale_h
23390 gl_cv_next_locale_h='"'$gl_header'"'
23391
23392
23393 fi
23394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_locale_h" >&5
23395 $as_echo "$gl_cv_next_locale_h" >&6; }
23396 fi
23397 NEXT_LOCALE_H=$gl_cv_next_locale_h
23398
23399 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23400 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23401 gl_next_as_first_directive='<'locale.h'>'
23402 else
23403 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23404 gl_next_as_first_directive=$gl_cv_next_locale_h
23405 fi
23406 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H=$gl_next_as_first_directive
23407
23408
23409
23410
23411
23412
23413
23414
23415
23416
23417
23418 if test "$gl_threads_api" = posix; then
23419 # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
23420 # pthread_rwlock_* functions.
23421 has_rwlock=false
23422 ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
23423 "
23424 if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then :
23425 has_rwlock=true
23426
23427 $as_echo "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
23428
23429 fi
23430
23431 if $has_rwlock; then
23432
23433
23434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_rwlock_rdlock prefers a writer to a reader" >&5
23435 $as_echo_n "checking whether pthread_rwlock_rdlock prefers a writer to a reader... " >&6; }
23436 if ${gl_cv_pthread_rwlock_rdlock_prefer_writer+:} false; then :
23437 $as_echo_n "(cached) " >&6
23438 else
23439 save_LIBS="$LIBS"
23440 LIBS="$LIBS $LIBMULTITHREAD"
23441 if test "$cross_compiling" = yes; then :
23442 case "$host_os" in
23443 # Guess no on glibc systems.
23444 *-gnu* | gnu*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
23445 # Guess no on musl systems.
23446 *-musl*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
23447 # Guess no on bionic systems.
23448 *-android*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
23449 # Guess yes on native Windows with the mingw-w64 winpthreads library.
23450 # Guess no on native Windows with the gnulib windows-rwlock module.
23451 mingw*) if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
23452 gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing yes"
23453 else
23454 gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no"
23455 fi
23456 ;;
23457 # If we don't know, obey --enable-cross-guesses.
23458 *) gl_cv_pthread_rwlock_rdlock_prefer_writer="$gl_cross_guess_normal" ;;
23459 esac
23460
23461 else
23462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23463 /* end confdefs.h. */
23464
23465 #include <errno.h>
23466 #include <pthread.h>
23467 #include <stdlib.h>
23468 #include <unistd.h>
23469
23470 #define SUCCEED() exit (0)
23471 #define FAILURE() exit (1)
23472 #define UNEXPECTED(n) (exit (10 + (n)))
23473
23474 /* The main thread creates the waiting writer and the requesting reader threads
23475 in the default way; this guarantees that they have the same priority.
23476 We can reuse the main thread as first reader thread. */
23477
23478 static pthread_rwlock_t lock;
23479 static pthread_t reader1;
23480 static pthread_t writer;
23481 static pthread_t reader2;
23482 static pthread_t timer;
23483 /* Used to pass control from writer to reader2 and from reader2 to timer,
23484 as in a relay race.
23485 Passing control from one running thread to another running thread
23486 is most likely faster than to create the second thread. */
23487 static pthread_mutex_t baton;
23488
23489 static void *
23490 timer_func (void *ignored)
23491 {
23492 /* Step 13 (can be before or after step 12):
23493 The timer thread takes the baton, then waits a moment to make sure
23494 it can tell whether the second reader thread is blocked at step 12. */
23495 if (pthread_mutex_lock (&baton))
23496 UNEXPECTED (13);
23497 usleep (100000);
23498 /* By the time we get here, it's clear that the second reader thread is
23499 blocked at step 12. This is the desired behaviour. */
23500 SUCCEED ();
23501 }
23502
23503 static void *
23504 reader2_func (void *ignored)
23505 {
23506 int err;
23507
23508 /* Step 8 (can be before or after step 7):
23509 The second reader thread takes the baton, then waits a moment to make sure
23510 the writer thread has reached step 7. */
23511 if (pthread_mutex_lock (&baton))
23512 UNEXPECTED (8);
23513 usleep (100000);
23514 /* Step 9: The second reader thread requests the lock. */
23515 err = pthread_rwlock_tryrdlock (&lock);
23516 if (err == 0)
23517 FAILURE ();
23518 else if (err != EBUSY)
23519 UNEXPECTED (9);
23520 /* Step 10: Launch a timer, to test whether the next call blocks. */
23521 if (pthread_create (&timer, NULL, timer_func, NULL))
23522 UNEXPECTED (10);
23523 /* Step 11: Release the baton. */
23524 if (pthread_mutex_unlock (&baton))
23525 UNEXPECTED (11);
23526 /* Step 12: The second reader thread requests the lock. */
23527 err = pthread_rwlock_rdlock (&lock);
23528 if (err == 0)
23529 FAILURE ();
23530 else
23531 UNEXPECTED (12);
23532 }
23533
23534 static void *
23535 writer_func (void *ignored)
23536 {
23537 /* Step 4: Take the baton, so that the second reader thread does not go ahead
23538 too early. */
23539 if (pthread_mutex_lock (&baton))
23540 UNEXPECTED (4);
23541 /* Step 5: Create the second reader thread. */
23542 if (pthread_create (&reader2, NULL, reader2_func, NULL))
23543 UNEXPECTED (5);
23544 /* Step 6: Release the baton. */
23545 if (pthread_mutex_unlock (&baton))
23546 UNEXPECTED (6);
23547 /* Step 7: The writer thread requests the lock. */
23548 if (pthread_rwlock_wrlock (&lock))
23549 UNEXPECTED (7);
23550 return NULL;
23551 }
23552
23553 int
23554 main ()
23555 {
23556 reader1 = pthread_self ();
23557
23558 /* Step 1: The main thread initializes the lock and the baton. */
23559 if (pthread_rwlock_init (&lock, NULL))
23560 UNEXPECTED (1);
23561 if (pthread_mutex_init (&baton, NULL))
23562 UNEXPECTED (1);
23563 /* Step 2: The main thread acquires the lock as a reader. */
23564 if (pthread_rwlock_rdlock (&lock))
23565 UNEXPECTED (2);
23566 /* Step 3: Create the writer thread. */
23567 if (pthread_create (&writer, NULL, writer_func, NULL))
23568 UNEXPECTED (3);
23569 /* Job done. Go to sleep. */
23570 for (;;)
23571 {
23572 sleep (1);
23573 }
23574 }
23575
23576 _ACEOF
23577 if ac_fn_c_try_run "$LINENO"; then :
23578 gl_cv_pthread_rwlock_rdlock_prefer_writer=yes
23579 else
23580 gl_cv_pthread_rwlock_rdlock_prefer_writer=no
23581 fi
23582 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23583 conftest.$ac_objext conftest.beam conftest.$ac_ext
23584 fi
23585
23586 LIBS="$save_LIBS"
23587
23588 fi
23589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pthread_rwlock_rdlock_prefer_writer" >&5
23590 $as_echo "$gl_cv_pthread_rwlock_rdlock_prefer_writer" >&6; }
23591 case "$gl_cv_pthread_rwlock_rdlock_prefer_writer" in
23592 *yes)
23593
23594 $as_echo "#define HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER 1" >>confdefs.h
23595
23596 ;;
23597 esac
23598
23599 fi
23600 # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
23601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23602 /* end confdefs.h. */
23603
23604 #include <pthread.h>
23605 int
23606 main ()
23607 {
23608
23609 #if __FreeBSD__ == 4
23610 error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
23611 #elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \
23612 && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
23613 error "No, in Mac OS X < 10.7 recursive mutexes actually don't work."
23614 #else
23615 int x = (int)PTHREAD_MUTEX_RECURSIVE;
23616 return !x;
23617 #endif
23618
23619 ;
23620 return 0;
23621 }
23622 _ACEOF
23623 if ac_fn_c_try_compile "$LINENO"; then :
23624
23625 $as_echo "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h
23626
23627 fi
23628 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23629 fi
23630 :
23631
23632
23633
23634 cat >>confdefs.h <<_ACEOF
23635 #define GNULIB_LOCK 1
23636 _ACEOF
23637
23638
23639
23640
23641
23642
23643 if test $ac_cv_func_lstat = yes; then
23644
23645 case $host_os,$gl_cv_func_lstat_dereferences_slashed_symlink in
23646 solaris* | *no)
23647 REPLACE_LSTAT=1
23648 ;;
23649 esac
23650 else
23651 HAVE_LSTAT=0
23652 fi
23653
23654 if test $REPLACE_LSTAT = 1; then
23655
23656
23657
23658
23659
23660
23661
23662
23663 gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
23664
23665 :
23666 fi
23667
23668
23669
23670
23671
23672 GNULIB_LSTAT=1
23673
23674
23675
23676
23677
23678 $as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
23679
23680
23681
23682
23683
23684
23685 if test $gl_cv_func_malloc_posix = yes; then
23686
23687 $as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
23688
23689 else
23690 REPLACE_MALLOC=1
23691 fi
23692
23693 if test $REPLACE_MALLOC = 1; then
23694
23695
23696
23697
23698
23699
23700
23701
23702 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
23703
23704 fi
23705
23706
23707
23708
23709
23710 GNULIB_MALLOC_POSIX=1
23711
23712
23713
23714
23715
23716 $as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
23717
23718
23719
23720
23721
23722
23723
23724
23725
23726
23727
23728
23729
23730
23731
23732
23733
23734 if test $gl_cv_have_include_next = yes; then
23735 gl_cv_next_math_h='<'math.h'>'
23736 else
23737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
23738 $as_echo_n "checking absolute name of <math.h>... " >&6; }
23739 if ${gl_cv_next_math_h+:} false; then :
23740 $as_echo_n "(cached) " >&6
23741 else
23742
23743 if test $ac_cv_header_math_h = yes; then
23744
23745
23746
23747
23748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23749 /* end confdefs.h. */
23750 #include <math.h>
23751 _ACEOF
23752 case "$host_os" in
23753 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23754 *) gl_absname_cpp="$ac_cpp" ;;
23755 esac
23756
23757 case "$host_os" in
23758 mingw*)
23759 gl_dirsep_regex='[/\\]'
23760 ;;
23761 *)
23762 gl_dirsep_regex='\/'
23763 ;;
23764 esac
23765 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23766 gl_header_literal_regex=`echo 'math.h' \
23767 | sed -e "$gl_make_literal_regex_sed"`
23768 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23769 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23770 s|^/[^/]|//&|
23771 p
23772 q
23773 }'
23774
23775 gl_cv_absolute_math_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23776 sed -n "$gl_absolute_header_sed"`
23777
23778 gl_header=$gl_cv_absolute_math_h
23779 gl_cv_next_math_h='"'$gl_header'"'
23780 else
23781 gl_cv_next_math_h='<'math.h'>'
23782 fi
23783
23784
23785 fi
23786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
23787 $as_echo "$gl_cv_next_math_h" >&6; }
23788 fi
23789 NEXT_MATH_H=$gl_cv_next_math_h
23790
23791 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23792 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23793 gl_next_as_first_directive='<'math.h'>'
23794 else
23795 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23796 gl_next_as_first_directive=$gl_cv_next_math_h
23797 fi
23798 NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive
23799
23800
23801
23802
23803
23804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
23805 $as_echo_n "checking whether NAN macro works... " >&6; }
23806 if ${gl_cv_header_math_nan_works+:} false; then :
23807 $as_echo_n "(cached) " >&6
23808 else
23809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23810 /* end confdefs.h. */
23811 #include <math.h>
23812 int
23813 main ()
23814 {
23815 /* Solaris 10 has a broken definition of NAN. Other platforms
23816 fail to provide NAN, or provide it only in C99 mode; this
23817 test only needs to fail when NAN is provided but wrong. */
23818 float f = 1.0f;
23819 #ifdef NAN
23820 f = NAN;
23821 #endif
23822 return f == 0;
23823 ;
23824 return 0;
23825 }
23826 _ACEOF
23827 if ac_fn_c_try_compile "$LINENO"; then :
23828 gl_cv_header_math_nan_works=yes
23829 else
23830 gl_cv_header_math_nan_works=no
23831 fi
23832 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23833 fi
23834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5
23835 $as_echo "$gl_cv_header_math_nan_works" >&6; }
23836 if test $gl_cv_header_math_nan_works = no; then
23837 REPLACE_NAN=1
23838 fi
23839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
23840 $as_echo_n "checking whether HUGE_VAL works... " >&6; }
23841 if ${gl_cv_header_math_huge_val_works+:} false; then :
23842 $as_echo_n "(cached) " >&6
23843 else
23844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23845 /* end confdefs.h. */
23846 #include <math.h>
23847 int
23848 main ()
23849 {
23850 /* Solaris 10 has a broken definition of HUGE_VAL. */
23851 double d = HUGE_VAL;
23852 return d == 0;
23853 ;
23854 return 0;
23855 }
23856 _ACEOF
23857 if ac_fn_c_try_compile "$LINENO"; then :
23858 gl_cv_header_math_huge_val_works=yes
23859 else
23860 gl_cv_header_math_huge_val_works=no
23861 fi
23862 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23863 fi
23864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5
23865 $as_echo "$gl_cv_header_math_huge_val_works" >&6; }
23866 if test $gl_cv_header_math_huge_val_works = no; then
23867 REPLACE_HUGE_VAL=1
23868 fi
23869
23870
23871
23872
23873
23874
23875
23876
23877
23878
23879
23880
23881
23882
23883
23884
23885
23886
23887 if case "$host_os" in
23888 mingw*) true ;;
23889 *) test $ac_cv_func_mbsinit = yes ;;
23890 esac \
23891 && test $ac_cv_func_mbrtowc = yes; then
23892
23893
23894
23895
23896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
23897 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
23898 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
23899 $as_echo_n "(cached) " >&6
23900 else
23901
23902 case "$host_os" in
23903 # Guess no on AIX and OSF/1.
23904 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
23905 # Guess yes otherwise.
23906 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
23907 esac
23908 if test $LOCALE_JA != none; then
23909 if test "$cross_compiling" = yes; then :
23910 :
23911 else
23912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23913 /* end confdefs.h. */
23914
23915 #include <locale.h>
23916 #include <string.h>
23917 #include <wchar.h>
23918 int main ()
23919 {
23920 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
23921 {
23922 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
23923 mbstate_t state;
23924 wchar_t wc;
23925
23926 memset (&state, '\0', sizeof (mbstate_t));
23927 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
23928 if (mbsinit (&state))
23929 return 2;
23930 }
23931 return 0;
23932 }
23933 _ACEOF
23934 if ac_fn_c_try_run "$LINENO"; then :
23935 gl_cv_func_mbrtowc_incomplete_state=yes
23936 else
23937 gl_cv_func_mbrtowc_incomplete_state=no
23938 fi
23939 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23940 conftest.$ac_objext conftest.beam conftest.$ac_ext
23941 fi
23942
23943 else
23944 if test $LOCALE_FR_UTF8 != none; then
23945 if test "$cross_compiling" = yes; then :
23946 :
23947 else
23948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23949 /* end confdefs.h. */
23950
23951 #include <locale.h>
23952 #include <string.h>
23953 #include <wchar.h>
23954 int main ()
23955 {
23956 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
23957 {
23958 const char input[] = "B\303\274\303\237er"; /* "Büßer" */
23959 mbstate_t state;
23960 wchar_t wc;
23961
23962 memset (&state, '\0', sizeof (mbstate_t));
23963 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
23964 if (mbsinit (&state))
23965 return 2;
23966 }
23967 return 0;
23968 }
23969 _ACEOF
23970 if ac_fn_c_try_run "$LINENO"; then :
23971 gl_cv_func_mbrtowc_incomplete_state=yes
23972 else
23973 gl_cv_func_mbrtowc_incomplete_state=no
23974 fi
23975 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23976 conftest.$ac_objext conftest.beam conftest.$ac_ext
23977 fi
23978
23979 fi
23980 fi
23981
23982 fi
23983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
23984 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
23985
23986
23987
23988
23989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
23990 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
23991 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
23992 $as_echo_n "(cached) " >&6
23993 else
23994
23995 case "$host_os" in
23996 # Guess no on Solaris 8.
23997 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
23998 # Guess yes otherwise.
23999 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
24000 esac
24001 if test $LOCALE_ZH_CN != none; then
24002 if test "$cross_compiling" = yes; then :
24003 :
24004 else
24005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24006 /* end confdefs.h. */
24007
24008 #include <locale.h>
24009 #include <stdlib.h>
24010 #include <string.h>
24011 #include <wchar.h>
24012 int main ()
24013 {
24014 /* This fails on Solaris 8:
24015 mbrtowc returns 2, and sets wc to 0x00F0.
24016 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
24017 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
24018 {
24019 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
24020 mbstate_t state;
24021 wchar_t wc;
24022
24023 memset (&state, '\0', sizeof (mbstate_t));
24024 if (mbrtowc (&wc, input + 3, 6, &state) != 4
24025 && mbtowc (&wc, input + 3, 6) == 4)
24026 return 2;
24027 }
24028 return 0;
24029 }
24030 _ACEOF
24031 if ac_fn_c_try_run "$LINENO"; then :
24032 gl_cv_func_mbrtowc_sanitycheck=yes
24033 else
24034 gl_cv_func_mbrtowc_sanitycheck=no
24035 fi
24036 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24037 conftest.$ac_objext conftest.beam conftest.$ac_ext
24038 fi
24039
24040 fi
24041
24042 fi
24043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
24044 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
24045
24046 REPLACE_MBSTATE_T=0
24047 case "$gl_cv_func_mbrtowc_incomplete_state" in
24048 *yes) ;;
24049 *) REPLACE_MBSTATE_T=1 ;;
24050 esac
24051 case "$gl_cv_func_mbrtowc_sanitycheck" in
24052 *yes) ;;
24053 *) REPLACE_MBSTATE_T=1 ;;
24054 esac
24055 else
24056 REPLACE_MBSTATE_T=1
24057 fi
24058
24059
24060
24061 if test $ac_cv_func_mbrtowc = no; then
24062 HAVE_MBRTOWC=0
24063 ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
24064 #include <wchar.h>
24065
24066 "
24067 if test "x$ac_cv_have_decl_mbrtowc" = xyes; then :
24068 ac_have_decl=1
24069 else
24070 ac_have_decl=0
24071 fi
24072
24073 cat >>confdefs.h <<_ACEOF
24074 #define HAVE_DECL_MBRTOWC $ac_have_decl
24075 _ACEOF
24076
24077 if test $ac_cv_have_decl_mbrtowc = yes; then
24078 REPLACE_MBRTOWC=1
24079 fi
24080 else
24081 if test $REPLACE_MBSTATE_T = 1; then
24082 REPLACE_MBRTOWC=1
24083 else
24084
24085
24086
24087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
24088 $as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
24089 if ${gl_cv_func_mbrtowc_null_arg1+:} false; then :
24090 $as_echo_n "(cached) " >&6
24091 else
24092
24093 case "$host_os" in
24094 # Guess no on Solaris.
24095 solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
24096 # Guess yes otherwise.
24097 *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
24098 esac
24099 if test $LOCALE_FR_UTF8 != none; then
24100 if test "$cross_compiling" = yes; then :
24101 :
24102 else
24103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24104 /* end confdefs.h. */
24105
24106 #include <locale.h>
24107 #include <stdlib.h>
24108 #include <string.h>
24109 #include <wchar.h>
24110 int main ()
24111 {
24112 int result = 0;
24113
24114 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
24115 {
24116 char input[] = "\303\237er";
24117 mbstate_t state;
24118 wchar_t wc;
24119 size_t ret;
24120
24121 memset (&state, '\0', sizeof (mbstate_t));
24122 wc = (wchar_t) 0xBADFACE;
24123 ret = mbrtowc (&wc, input, 5, &state);
24124 if (ret != 2)
24125 result |= 1;
24126 if (!mbsinit (&state))
24127 result |= 2;
24128
24129 memset (&state, '\0', sizeof (mbstate_t));
24130 ret = mbrtowc (NULL, input, 5, &state);
24131 if (ret != 2) /* Solaris 7 fails here: ret is -1. */
24132 result |= 4;
24133 if (!mbsinit (&state))
24134 result |= 8;
24135 }
24136 return result;
24137 }
24138 _ACEOF
24139 if ac_fn_c_try_run "$LINENO"; then :
24140 gl_cv_func_mbrtowc_null_arg1=yes
24141 else
24142 gl_cv_func_mbrtowc_null_arg1=no
24143 fi
24144 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24145 conftest.$ac_objext conftest.beam conftest.$ac_ext
24146 fi
24147
24148 fi
24149
24150 fi
24151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
24152 $as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; }
24153
24154
24155
24156
24157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
24158 $as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
24159 if ${gl_cv_func_mbrtowc_null_arg2+:} false; then :
24160 $as_echo_n "(cached) " >&6
24161 else
24162
24163 case "$host_os" in
24164 # Guess no on OSF/1.
24165 osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
24166 # Guess yes otherwise.
24167 *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
24168 esac
24169 if test $LOCALE_FR_UTF8 != none; then
24170 if test "$cross_compiling" = yes; then :
24171 :
24172 else
24173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24174 /* end confdefs.h. */
24175
24176 #include <locale.h>
24177 #include <string.h>
24178 #include <wchar.h>
24179 int main ()
24180 {
24181 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
24182 {
24183 mbstate_t state;
24184 wchar_t wc;
24185 int ret;
24186
24187 memset (&state, '\0', sizeof (mbstate_t));
24188 wc = (wchar_t) 0xBADFACE;
24189 mbrtowc (&wc, NULL, 5, &state);
24190 /* Check that wc was not modified. */
24191 if (wc != (wchar_t) 0xBADFACE)
24192 return 2;
24193 }
24194 return 0;
24195 }
24196 _ACEOF
24197 if ac_fn_c_try_run "$LINENO"; then :
24198 gl_cv_func_mbrtowc_null_arg2=yes
24199 else
24200 gl_cv_func_mbrtowc_null_arg2=no
24201 fi
24202 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24203 conftest.$ac_objext conftest.beam conftest.$ac_ext
24204 fi
24205
24206 fi
24207
24208 fi
24209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
24210 $as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; }
24211
24212
24213
24214
24215
24216
24217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
24218 $as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
24219 if ${gl_cv_func_mbrtowc_retval+:} false; then :
24220 $as_echo_n "(cached) " >&6
24221 else
24222
24223 case "$host_os" in
24224 # Guess no on HP-UX, Solaris, native Windows.
24225 hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
24226 # Guess yes otherwise.
24227 *) gl_cv_func_mbrtowc_retval="guessing yes" ;;
24228 esac
24229 if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
24230 || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
24231 if test "$cross_compiling" = yes; then :
24232 :
24233 else
24234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24235 /* end confdefs.h. */
24236
24237 #include <locale.h>
24238 #include <string.h>
24239 #include <wchar.h>
24240 int main ()
24241 {
24242 int result = 0;
24243 int found_some_locale = 0;
24244 /* This fails on Solaris. */
24245 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
24246 {
24247 char input[] = "B\303\274\303\237er"; /* "Büßer" */
24248 mbstate_t state;
24249 wchar_t wc;
24250
24251 memset (&state, '\0', sizeof (mbstate_t));
24252 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
24253 {
24254 input[1] = '\0';
24255 if (mbrtowc (&wc, input + 2, 5, &state) != 1)
24256 result |= 1;
24257 }
24258 found_some_locale = 1;
24259 }
24260 /* This fails on HP-UX 11.11. */
24261 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
24262 {
24263 char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
24264 mbstate_t state;
24265 wchar_t wc;
24266
24267 memset (&state, '\0', sizeof (mbstate_t));
24268 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
24269 {
24270 input[1] = '\0';
24271 if (mbrtowc (&wc, input + 2, 5, &state) != 2)
24272 result |= 2;
24273 }
24274 found_some_locale = 1;
24275 }
24276 /* This fails on native Windows. */
24277 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
24278 {
24279 char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
24280 mbstate_t state;
24281 wchar_t wc;
24282
24283 memset (&state, '\0', sizeof (mbstate_t));
24284 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
24285 {
24286 input[3] = '\0';
24287 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
24288 result |= 4;
24289 }
24290 found_some_locale = 1;
24291 }
24292 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
24293 {
24294 char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
24295 mbstate_t state;
24296 wchar_t wc;
24297
24298 memset (&state, '\0', sizeof (mbstate_t));
24299 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
24300 {
24301 input[3] = '\0';
24302 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
24303 result |= 8;
24304 }
24305 found_some_locale = 1;
24306 }
24307 if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
24308 {
24309 char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
24310 mbstate_t state;
24311 wchar_t wc;
24312
24313 memset (&state, '\0', sizeof (mbstate_t));
24314 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
24315 {
24316 input[3] = '\0';
24317 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
24318 result |= 16;
24319 }
24320 found_some_locale = 1;
24321 }
24322 return (found_some_locale ? result : 77);
24323 }
24324 _ACEOF
24325 if ac_fn_c_try_run "$LINENO"; then :
24326 gl_cv_func_mbrtowc_retval=yes
24327 else
24328 if test $? != 77; then
24329 gl_cv_func_mbrtowc_retval=no
24330 fi
24331
24332 fi
24333 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24334 conftest.$ac_objext conftest.beam conftest.$ac_ext
24335 fi
24336
24337 fi
24338
24339 fi
24340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
24341 $as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
24342
24343
24344
24345
24346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
24347 $as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
24348 if ${gl_cv_func_mbrtowc_nul_retval+:} false; then :
24349 $as_echo_n "(cached) " >&6
24350 else
24351
24352 case "$host_os" in
24353 # Guess no on Solaris 8 and 9.
24354 solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
24355 # Guess yes otherwise.
24356 *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
24357 esac
24358 if test $LOCALE_ZH_CN != none; then
24359 if test "$cross_compiling" = yes; then :
24360 :
24361 else
24362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24363 /* end confdefs.h. */
24364
24365 #include <locale.h>
24366 #include <string.h>
24367 #include <wchar.h>
24368 int main ()
24369 {
24370 /* This fails on Solaris 8 and 9. */
24371 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
24372 {
24373 mbstate_t state;
24374 wchar_t wc;
24375
24376 memset (&state, '\0', sizeof (mbstate_t));
24377 if (mbrtowc (&wc, "", 1, &state) != 0)
24378 return 2;
24379 }
24380 return 0;
24381 }
24382 _ACEOF
24383 if ac_fn_c_try_run "$LINENO"; then :
24384 gl_cv_func_mbrtowc_nul_retval=yes
24385 else
24386 gl_cv_func_mbrtowc_nul_retval=no
24387 fi
24388 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24389 conftest.$ac_objext conftest.beam conftest.$ac_ext
24390 fi
24391
24392 fi
24393
24394 fi
24395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
24396 $as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
24397
24398
24399
24400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc stores incomplete characters" >&5
24401 $as_echo_n "checking whether mbrtowc stores incomplete characters... " >&6; }
24402 if ${gl_cv_func_mbrtowc_stores_incomplete+:} false; then :
24403 $as_echo_n "(cached) " >&6
24404 else
24405
24406 case "$host_os" in
24407 # Guess yes on native Windows.
24408 mingw*) gl_cv_func_mbrtowc_stores_incomplete="guessing yes" ;;
24409 *) gl_cv_func_mbrtowc_stores_incomplete="guessing no" ;;
24410 esac
24411 case "$host_os" in
24412 mingw*)
24413 if test "$cross_compiling" = yes; then :
24414 :
24415 else
24416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24417 /* end confdefs.h. */
24418
24419 #include <locale.h>
24420 #include <string.h>
24421 #include <wchar.h>
24422 int main ()
24423 {
24424 int result = 0;
24425 if (setlocale (LC_ALL, "French_France.65001") != NULL)
24426 {
24427 wchar_t wc = (wchar_t) 0xBADFACE;
24428 mbstate_t state;
24429
24430 memset (&state, '\0', sizeof (mbstate_t));
24431 if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2)
24432 && wc != (wchar_t) 0xBADFACE)
24433 result |= 1;
24434 }
24435 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
24436 {
24437 wchar_t wc = (wchar_t) 0xBADFACE;
24438 mbstate_t state;
24439
24440 memset (&state, '\0', sizeof (mbstate_t));
24441 if (mbrtowc (&wc, "\226", 1, &state) == (size_t)(-2)
24442 && wc != (wchar_t) 0xBADFACE)
24443 result |= 2;
24444 }
24445 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
24446 {
24447 wchar_t wc = (wchar_t) 0xBADFACE;
24448 mbstate_t state;
24449
24450 memset (&state, '\0', sizeof (mbstate_t));
24451 if (mbrtowc (&wc, "\245", 1, &state) == (size_t)(-2)
24452 && wc != (wchar_t) 0xBADFACE)
24453 result |= 4;
24454 }
24455 if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
24456 {
24457 wchar_t wc = (wchar_t) 0xBADFACE;
24458 mbstate_t state;
24459
24460 memset (&state, '\0', sizeof (mbstate_t));
24461 if (mbrtowc (&wc, "\261", 1, &state) == (size_t)(-2)
24462 && wc != (wchar_t) 0xBADFACE)
24463 result |= 8;
24464 }
24465 return result;
24466 }
24467 _ACEOF
24468 if ac_fn_c_try_run "$LINENO"; then :
24469 gl_cv_func_mbrtowc_stores_incomplete=no
24470 else
24471 gl_cv_func_mbrtowc_stores_incomplete=yes
24472 fi
24473 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24474 conftest.$ac_objext conftest.beam conftest.$ac_ext
24475 fi
24476
24477 ;;
24478 *)
24479
24480 if test $LOCALE_FR_UTF8 != none; then
24481 if test "$cross_compiling" = yes; then :
24482 :
24483 else
24484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24485 /* end confdefs.h. */
24486
24487 #include <locale.h>
24488 #include <string.h>
24489 #include <wchar.h>
24490 int main ()
24491 {
24492 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
24493 {
24494 wchar_t wc = (wchar_t) 0xBADFACE;
24495 mbstate_t state;
24496
24497 memset (&state, '\0', sizeof (mbstate_t));
24498 if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2)
24499 && wc != (wchar_t) 0xBADFACE)
24500 return 1;
24501 }
24502 return 0;
24503 }
24504 _ACEOF
24505 if ac_fn_c_try_run "$LINENO"; then :
24506 gl_cv_func_mbrtowc_stores_incomplete=no
24507 else
24508 gl_cv_func_mbrtowc_stores_incomplete=yes
24509 fi
24510 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24511 conftest.$ac_objext conftest.beam conftest.$ac_ext
24512 fi
24513
24514 fi
24515 ;;
24516 esac
24517
24518 fi
24519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_stores_incomplete" >&5
24520 $as_echo "$gl_cv_func_mbrtowc_stores_incomplete" >&6; }
24521
24522
24523
24524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5
24525 $as_echo_n "checking whether mbrtowc works on empty input... " >&6; }
24526 if ${gl_cv_func_mbrtowc_empty_input+:} false; then :
24527 $as_echo_n "(cached) " >&6
24528 else
24529
24530 case "$host_os" in
24531 # Guess no on AIX and glibc systems.
24532 aix* | *-gnu* | gnu*) gl_cv_func_mbrtowc_empty_input="guessing no" ;;
24533 # Guess yes on native Windows.
24534 mingw*) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
24535 *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
24536 esac
24537 if test "$cross_compiling" = yes; then :
24538 :
24539 else
24540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24541 /* end confdefs.h. */
24542
24543 #include <wchar.h>
24544 static wchar_t wc;
24545 static mbstate_t mbs;
24546 int
24547 main (void)
24548 {
24549 return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
24550 }
24551 _ACEOF
24552 if ac_fn_c_try_run "$LINENO"; then :
24553 gl_cv_func_mbrtowc_empty_input=yes
24554 else
24555 gl_cv_func_mbrtowc_empty_input=no
24556 fi
24557 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24558 conftest.$ac_objext conftest.beam conftest.$ac_ext
24559 fi
24560
24561
24562 fi
24563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5
24564 $as_echo "$gl_cv_func_mbrtowc_empty_input" >&6; }
24565
24566
24567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
24568 $as_echo_n "checking whether the C locale is free of encoding errors... " >&6; }
24569 if ${gl_cv_func_mbrtowc_C_locale_sans_EILSEQ+:} false; then :
24570 $as_echo_n "(cached) " >&6
24571 else
24572
24573 gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="$gl_cross_guess_normal"
24574
24575 if test "$cross_compiling" = yes; then :
24576 case "$host_os" in
24577 # Guess yes on native Windows.
24578 mingw*) gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="guessing yes" ;;
24579 esac
24580
24581 else
24582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24583 /* end confdefs.h. */
24584 #include <limits.h>
24585 #include <locale.h>
24586 #include <wchar.h>
24587
24588 int
24589 main ()
24590 {
24591
24592 int i;
24593 char *locale = setlocale (LC_ALL, "C");
24594 if (! locale)
24595 return 2;
24596 for (i = CHAR_MIN; i <= CHAR_MAX; i++)
24597 {
24598 char c = i;
24599 wchar_t wc;
24600 mbstate_t mbs = { 0, };
24601 size_t ss = mbrtowc (&wc, &c, 1, &mbs);
24602 if (1 < ss)
24603 return 3;
24604 }
24605 return 0;
24606
24607 ;
24608 return 0;
24609 }
24610 _ACEOF
24611 if ac_fn_c_try_run "$LINENO"; then :
24612 gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=yes
24613 else
24614 gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=no
24615 fi
24616 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24617 conftest.$ac_objext conftest.beam conftest.$ac_ext
24618 fi
24619
24620
24621 fi
24622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&5
24623 $as_echo "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&6; }
24624
24625 case "$gl_cv_func_mbrtowc_null_arg1" in
24626 *yes) ;;
24627 *)
24628 $as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
24629
24630 REPLACE_MBRTOWC=1
24631 ;;
24632 esac
24633 case "$gl_cv_func_mbrtowc_null_arg2" in
24634 *yes) ;;
24635 *)
24636 $as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
24637
24638 REPLACE_MBRTOWC=1
24639 ;;
24640 esac
24641 case "$gl_cv_func_mbrtowc_retval" in
24642 *yes) ;;
24643 *)
24644 $as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
24645
24646 REPLACE_MBRTOWC=1
24647 ;;
24648 esac
24649 case "$gl_cv_func_mbrtowc_nul_retval" in
24650 *yes) ;;
24651 *)
24652 $as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
24653
24654 REPLACE_MBRTOWC=1
24655 ;;
24656 esac
24657 case "$gl_cv_func_mbrtowc_stores_incomplete" in
24658 *no) ;;
24659 *)
24660 $as_echo "#define MBRTOWC_STORES_INCOMPLETE_BUG 1" >>confdefs.h
24661
24662 REPLACE_MBRTOWC=1
24663 ;;
24664 esac
24665 case "$gl_cv_func_mbrtowc_empty_input" in
24666 *yes) ;;
24667 *)
24668 $as_echo "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h
24669
24670 REPLACE_MBRTOWC=1
24671 ;;
24672 esac
24673 case "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" in
24674 *yes) ;;
24675 *)
24676 $as_echo "#define MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
24677
24678 REPLACE_MBRTOWC=1
24679 ;;
24680 esac
24681 fi
24682 fi
24683 if test $REPLACE_MBSTATE_T = 1; then
24684 case "$host_os" in
24685 mingw*) LIB_MBRTOWC= ;;
24686 *)
24687
24688
24689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
24690 $as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
24691 if ${gl_cv_have_weak+:} false; then :
24692 $as_echo_n "(cached) " >&6
24693 else
24694 gl_cv_have_weak=no
24695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24696 /* end confdefs.h. */
24697 extern void xyzzy ();
24698 #pragma weak xyzzy
24699 int
24700 main ()
24701 {
24702 xyzzy();
24703 ;
24704 return 0;
24705 }
24706 _ACEOF
24707 if ac_fn_c_try_link "$LINENO"; then :
24708 gl_cv_have_weak=maybe
24709 fi
24710 rm -f core conftest.err conftest.$ac_objext \
24711 conftest$ac_exeext conftest.$ac_ext
24712 if test $gl_cv_have_weak = maybe; then
24713 if test "$cross_compiling" = yes; then :
24714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24715 /* end confdefs.h. */
24716 #ifdef __ELF__
24717 Extensible Linking Format
24718 #endif
24719
24720 _ACEOF
24721 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24722 $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
24723 gl_cv_have_weak="guessing yes"
24724 else
24725 gl_cv_have_weak="guessing no"
24726 fi
24727 rm -f conftest*
24728
24729
24730 else
24731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24732 /* end confdefs.h. */
24733
24734 #include <stdio.h>
24735 #pragma weak fputs
24736 int main ()
24737 {
24738 return (fputs == NULL);
24739 }
24740 _ACEOF
24741 if ac_fn_c_try_run "$LINENO"; then :
24742 gl_cv_have_weak=yes
24743 else
24744 gl_cv_have_weak=no
24745 fi
24746 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24747 conftest.$ac_objext conftest.beam conftest.$ac_ext
24748 fi
24749
24750 fi
24751 case " $LDFLAGS " in
24752 *" -static "*) gl_cv_have_weak=no ;;
24753 esac
24754 case "$gl_cv_have_weak" in
24755 *yes)
24756 case "$host_os" in
24757 freebsd* | dragonfly*)
24758 : > conftest1.c
24759 $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
24760 cat <<EOF > conftest2.c
24761 #include <pthread.h>
24762 #pragma weak pthread_mutexattr_gettype
24763 int main ()
24764 {
24765 return (pthread_mutexattr_gettype != NULL);
24766 }
24767 EOF
24768 $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
24769 || gl_cv_have_weak=no
24770 rm -f conftest1.c libempty.so conftest2.c conftest
24771 ;;
24772 esac
24773 ;;
24774 esac
24775
24776 fi
24777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
24778 $as_echo "$gl_cv_have_weak" >&6; }
24779 case "$gl_cv_have_weak" in
24780 *yes)
24781
24782 $as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
24783
24784 ;;
24785 esac
24786
24787 case "$gl_cv_have_weak" in
24788 *yes) LIB_MBRTOWC= ;;
24789 *) LIB_MBRTOWC="$LIBPTHREAD" ;;
24790 esac
24791 ;;
24792 esac
24793 else
24794 LIB_MBRTOWC=
24795 fi
24796
24797
24798 if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
24799
24800
24801
24802
24803
24804
24805
24806
24807 gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
24808
24809 if test $REPLACE_MBSTATE_T = 1; then
24810
24811
24812
24813
24814
24815
24816
24817
24818 gl_LIBOBJS="$gl_LIBOBJS lc-charset-dispatch.$ac_objext"
24819
24820
24821
24822
24823
24824
24825
24826
24827
24828 gl_LIBOBJS="$gl_LIBOBJS mbtowc-lock.$ac_objext"
24829
24830
24831
24832
24833 CFLAG_VISIBILITY=
24834 HAVE_VISIBILITY=0
24835 if test -n "$GCC"; then
24836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
24837 $as_echo_n "checking whether the -Werror option is usable... " >&6; }
24838 if ${gl_cv_cc_vis_werror+:} false; then :
24839 $as_echo_n "(cached) " >&6
24840 else
24841 gl_save_CFLAGS="$CFLAGS"
24842 CFLAGS="$CFLAGS -Werror"
24843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24844 /* end confdefs.h. */
24845
24846 int
24847 main ()
24848 {
24849
24850 ;
24851 return 0;
24852 }
24853 _ACEOF
24854 if ac_fn_c_try_compile "$LINENO"; then :
24855 gl_cv_cc_vis_werror=yes
24856 else
24857 gl_cv_cc_vis_werror=no
24858 fi
24859 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24860 CFLAGS="$gl_save_CFLAGS"
24861
24862 fi
24863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
24864 $as_echo "$gl_cv_cc_vis_werror" >&6; }
24865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
24866 $as_echo_n "checking for simple visibility declarations... " >&6; }
24867 if ${gl_cv_cc_visibility+:} false; then :
24868 $as_echo_n "(cached) " >&6
24869 else
24870 gl_save_CFLAGS="$CFLAGS"
24871 CFLAGS="$CFLAGS -fvisibility=hidden"
24872 if test $gl_cv_cc_vis_werror = yes; then
24873 CFLAGS="$CFLAGS -Werror"
24874 fi
24875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24876 /* end confdefs.h. */
24877 extern __attribute__((__visibility__("hidden"))) int hiddenvar;
24878 extern __attribute__((__visibility__("default"))) int exportedvar;
24879 extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
24880 extern __attribute__((__visibility__("default"))) int exportedfunc (void);
24881 void dummyfunc (void) {}
24882
24883 int
24884 main ()
24885 {
24886
24887 ;
24888 return 0;
24889 }
24890 _ACEOF
24891 if ac_fn_c_try_compile "$LINENO"; then :
24892 gl_cv_cc_visibility=yes
24893 else
24894 gl_cv_cc_visibility=no
24895 fi
24896 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24897 CFLAGS="$gl_save_CFLAGS"
24898
24899 fi
24900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
24901 $as_echo "$gl_cv_cc_visibility" >&6; }
24902 if test $gl_cv_cc_visibility = yes; then
24903 CFLAG_VISIBILITY="-fvisibility=hidden"
24904 HAVE_VISIBILITY=1
24905 fi
24906 fi
24907
24908
24909
24910 cat >>confdefs.h <<_ACEOF
24911 #define HAVE_VISIBILITY $HAVE_VISIBILITY
24912 _ACEOF
24913
24914
24915
24916 fi
24917
24918
24919 :
24920
24921 fi
24922
24923
24924
24925
24926
24927 GNULIB_MBRTOWC=1
24928
24929
24930
24931
24932
24933 $as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
24934
24935
24936
24937
24938
24939
24940
24941
24942
24943
24944
24945
24946
24947
24948
24949 if case "$host_os" in
24950 mingw*) true ;;
24951 *) test $ac_cv_func_mbsinit = yes ;;
24952 esac \
24953 && test $ac_cv_func_mbrtowc = yes; then
24954
24955
24956
24957
24958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
24959 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
24960 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
24961 $as_echo_n "(cached) " >&6
24962 else
24963
24964 case "$host_os" in
24965 # Guess no on AIX and OSF/1.
24966 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
24967 # Guess yes otherwise.
24968 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
24969 esac
24970 if test $LOCALE_JA != none; then
24971 if test "$cross_compiling" = yes; then :
24972 :
24973 else
24974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24975 /* end confdefs.h. */
24976
24977 #include <locale.h>
24978 #include <string.h>
24979 #include <wchar.h>
24980 int main ()
24981 {
24982 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
24983 {
24984 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
24985 mbstate_t state;
24986 wchar_t wc;
24987
24988 memset (&state, '\0', sizeof (mbstate_t));
24989 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
24990 if (mbsinit (&state))
24991 return 2;
24992 }
24993 return 0;
24994 }
24995 _ACEOF
24996 if ac_fn_c_try_run "$LINENO"; then :
24997 gl_cv_func_mbrtowc_incomplete_state=yes
24998 else
24999 gl_cv_func_mbrtowc_incomplete_state=no
25000 fi
25001 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25002 conftest.$ac_objext conftest.beam conftest.$ac_ext
25003 fi
25004
25005 else
25006 if test $LOCALE_FR_UTF8 != none; then
25007 if test "$cross_compiling" = yes; then :
25008 :
25009 else
25010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25011 /* end confdefs.h. */
25012
25013 #include <locale.h>
25014 #include <string.h>
25015 #include <wchar.h>
25016 int main ()
25017 {
25018 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
25019 {
25020 const char input[] = "B\303\274\303\237er"; /* "Büßer" */
25021 mbstate_t state;
25022 wchar_t wc;
25023
25024 memset (&state, '\0', sizeof (mbstate_t));
25025 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
25026 if (mbsinit (&state))
25027 return 2;
25028 }
25029 return 0;
25030 }
25031 _ACEOF
25032 if ac_fn_c_try_run "$LINENO"; then :
25033 gl_cv_func_mbrtowc_incomplete_state=yes
25034 else
25035 gl_cv_func_mbrtowc_incomplete_state=no
25036 fi
25037 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25038 conftest.$ac_objext conftest.beam conftest.$ac_ext
25039 fi
25040
25041 fi
25042 fi
25043
25044 fi
25045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
25046 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
25047
25048
25049
25050
25051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
25052 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
25053 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
25054 $as_echo_n "(cached) " >&6
25055 else
25056
25057 case "$host_os" in
25058 # Guess no on Solaris 8.
25059 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
25060 # Guess yes otherwise.
25061 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
25062 esac
25063 if test $LOCALE_ZH_CN != none; then
25064 if test "$cross_compiling" = yes; then :
25065 :
25066 else
25067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25068 /* end confdefs.h. */
25069
25070 #include <locale.h>
25071 #include <stdlib.h>
25072 #include <string.h>
25073 #include <wchar.h>
25074 int main ()
25075 {
25076 /* This fails on Solaris 8:
25077 mbrtowc returns 2, and sets wc to 0x00F0.
25078 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
25079 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
25080 {
25081 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
25082 mbstate_t state;
25083 wchar_t wc;
25084
25085 memset (&state, '\0', sizeof (mbstate_t));
25086 if (mbrtowc (&wc, input + 3, 6, &state) != 4
25087 && mbtowc (&wc, input + 3, 6) == 4)
25088 return 2;
25089 }
25090 return 0;
25091 }
25092 _ACEOF
25093 if ac_fn_c_try_run "$LINENO"; then :
25094 gl_cv_func_mbrtowc_sanitycheck=yes
25095 else
25096 gl_cv_func_mbrtowc_sanitycheck=no
25097 fi
25098 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25099 conftest.$ac_objext conftest.beam conftest.$ac_ext
25100 fi
25101
25102 fi
25103
25104 fi
25105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
25106 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
25107
25108 REPLACE_MBSTATE_T=0
25109 case "$gl_cv_func_mbrtowc_incomplete_state" in
25110 *yes) ;;
25111 *) REPLACE_MBSTATE_T=1 ;;
25112 esac
25113 case "$gl_cv_func_mbrtowc_sanitycheck" in
25114 *yes) ;;
25115 *) REPLACE_MBSTATE_T=1 ;;
25116 esac
25117 else
25118 REPLACE_MBSTATE_T=1
25119 fi
25120
25121
25122
25123 if test $ac_cv_func_mbsinit = no; then
25124 HAVE_MBSINIT=0
25125 ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
25126 #include <wchar.h>
25127
25128 "
25129 if test "x$ac_cv_have_decl_mbsinit" = xyes; then :
25130 ac_have_decl=1
25131 else
25132 ac_have_decl=0
25133 fi
25134
25135 cat >>confdefs.h <<_ACEOF
25136 #define HAVE_DECL_MBSINIT $ac_have_decl
25137 _ACEOF
25138
25139 if test $ac_cv_have_decl_mbsinit = yes; then
25140 REPLACE_MBSINIT=1
25141 fi
25142 else
25143 if test $REPLACE_MBSTATE_T = 1; then
25144 REPLACE_MBSINIT=1
25145 else
25146 case "$host_os" in
25147 mingw*) REPLACE_MBSINIT=1 ;;
25148 esac
25149 fi
25150 fi
25151
25152 if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
25153
25154
25155
25156
25157
25158
25159
25160
25161 gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
25162
25163
25164 :
25165
25166 fi
25167
25168
25169
25170
25171
25172 GNULIB_MBSINIT=1
25173
25174
25175
25176
25177
25178 $as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
25179
25180
25181
25182
25183
25184
25185
25186
25187
25188
25189
25190
25191
25192
25193 if case "$host_os" in
25194 mingw*) true ;;
25195 *) test $ac_cv_func_mbsinit = yes ;;
25196 esac \
25197 && test $ac_cv_func_mbrtowc = yes; then
25198
25199
25200
25201
25202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
25203 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
25204 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
25205 $as_echo_n "(cached) " >&6
25206 else
25207
25208 case "$host_os" in
25209 # Guess no on AIX and OSF/1.
25210 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
25211 # Guess yes otherwise.
25212 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
25213 esac
25214 if test $LOCALE_JA != none; then
25215 if test "$cross_compiling" = yes; then :
25216 :
25217 else
25218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25219 /* end confdefs.h. */
25220
25221 #include <locale.h>
25222 #include <string.h>
25223 #include <wchar.h>
25224 int main ()
25225 {
25226 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
25227 {
25228 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
25229 mbstate_t state;
25230 wchar_t wc;
25231
25232 memset (&state, '\0', sizeof (mbstate_t));
25233 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
25234 if (mbsinit (&state))
25235 return 2;
25236 }
25237 return 0;
25238 }
25239 _ACEOF
25240 if ac_fn_c_try_run "$LINENO"; then :
25241 gl_cv_func_mbrtowc_incomplete_state=yes
25242 else
25243 gl_cv_func_mbrtowc_incomplete_state=no
25244 fi
25245 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25246 conftest.$ac_objext conftest.beam conftest.$ac_ext
25247 fi
25248
25249 else
25250 if test $LOCALE_FR_UTF8 != none; then
25251 if test "$cross_compiling" = yes; then :
25252 :
25253 else
25254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25255 /* end confdefs.h. */
25256
25257 #include <locale.h>
25258 #include <string.h>
25259 #include <wchar.h>
25260 int main ()
25261 {
25262 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
25263 {
25264 const char input[] = "B\303\274\303\237er"; /* "Büßer" */
25265 mbstate_t state;
25266 wchar_t wc;
25267
25268 memset (&state, '\0', sizeof (mbstate_t));
25269 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
25270 if (mbsinit (&state))
25271 return 2;
25272 }
25273 return 0;
25274 }
25275 _ACEOF
25276 if ac_fn_c_try_run "$LINENO"; then :
25277 gl_cv_func_mbrtowc_incomplete_state=yes
25278 else
25279 gl_cv_func_mbrtowc_incomplete_state=no
25280 fi
25281 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25282 conftest.$ac_objext conftest.beam conftest.$ac_ext
25283 fi
25284
25285 fi
25286 fi
25287
25288 fi
25289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
25290 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
25291
25292
25293
25294
25295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
25296 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
25297 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
25298 $as_echo_n "(cached) " >&6
25299 else
25300
25301 case "$host_os" in
25302 # Guess no on Solaris 8.
25303 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
25304 # Guess yes otherwise.
25305 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
25306 esac
25307 if test $LOCALE_ZH_CN != none; then
25308 if test "$cross_compiling" = yes; then :
25309 :
25310 else
25311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25312 /* end confdefs.h. */
25313
25314 #include <locale.h>
25315 #include <stdlib.h>
25316 #include <string.h>
25317 #include <wchar.h>
25318 int main ()
25319 {
25320 /* This fails on Solaris 8:
25321 mbrtowc returns 2, and sets wc to 0x00F0.
25322 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
25323 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
25324 {
25325 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
25326 mbstate_t state;
25327 wchar_t wc;
25328
25329 memset (&state, '\0', sizeof (mbstate_t));
25330 if (mbrtowc (&wc, input + 3, 6, &state) != 4
25331 && mbtowc (&wc, input + 3, 6) == 4)
25332 return 2;
25333 }
25334 return 0;
25335 }
25336 _ACEOF
25337 if ac_fn_c_try_run "$LINENO"; then :
25338 gl_cv_func_mbrtowc_sanitycheck=yes
25339 else
25340 gl_cv_func_mbrtowc_sanitycheck=no
25341 fi
25342 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25343 conftest.$ac_objext conftest.beam conftest.$ac_ext
25344 fi
25345
25346 fi
25347
25348 fi
25349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
25350 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
25351
25352 REPLACE_MBSTATE_T=0
25353 case "$gl_cv_func_mbrtowc_incomplete_state" in
25354 *yes) ;;
25355 *) REPLACE_MBSTATE_T=1 ;;
25356 esac
25357 case "$gl_cv_func_mbrtowc_sanitycheck" in
25358 *yes) ;;
25359 *) REPLACE_MBSTATE_T=1 ;;
25360 esac
25361 else
25362 REPLACE_MBSTATE_T=1
25363 fi
25364
25365
25366
25367 if test $ac_cv_func_mbsrtowcs = no; then
25368 HAVE_MBSRTOWCS=0
25369 ac_fn_c_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" "
25370 #include <wchar.h>
25371
25372 "
25373 if test "x$ac_cv_have_decl_mbsrtowcs" = xyes; then :
25374 ac_have_decl=1
25375 else
25376 ac_have_decl=0
25377 fi
25378
25379 cat >>confdefs.h <<_ACEOF
25380 #define HAVE_DECL_MBSRTOWCS $ac_have_decl
25381 _ACEOF
25382
25383 if test $ac_cv_have_decl_mbsrtowcs = yes; then
25384 REPLACE_MBSRTOWCS=1
25385 fi
25386 else
25387 if test $REPLACE_MBSTATE_T = 1; then
25388 REPLACE_MBSRTOWCS=1
25389 else
25390
25391
25392
25393
25394
25395
25396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5
25397 $as_echo_n "checking whether mbsrtowcs works... " >&6; }
25398 if ${gl_cv_func_mbsrtowcs_works+:} false; then :
25399 $as_echo_n "(cached) " >&6
25400 else
25401
25402 case "$host_os" in
25403 # Guess no on HP-UX, Solaris, mingw.
25404 hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;;
25405 # Guess yes otherwise.
25406 *) gl_cv_func_mbsrtowcs_works="guessing yes" ;;
25407 esac
25408 if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
25409 if test "$cross_compiling" = yes; then :
25410 :
25411 else
25412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25413 /* end confdefs.h. */
25414
25415 #include <locale.h>
25416 #include <string.h>
25417 #include <wchar.h>
25418 int main ()
25419 {
25420 int result = 0;
25421 /* Test whether the function supports a NULL destination argument.
25422 This fails on native Windows. */
25423 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
25424 {
25425 const char input[] = "\337er";
25426 const char *src = input;
25427 mbstate_t state;
25428
25429 memset (&state, '\0', sizeof (mbstate_t));
25430 if (mbsrtowcs (NULL, &src, 1, &state) != 3
25431 || src != input)
25432 result |= 1;
25433 }
25434 /* Test whether the function works when started with a conversion state
25435 in non-initial state. This fails on HP-UX 11.11 and Solaris 10. */
25436 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
25437 {
25438 const char input[] = "B\303\274\303\237er";
25439 mbstate_t state;
25440
25441 memset (&state, '\0', sizeof (mbstate_t));
25442 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
25443 if (!mbsinit (&state))
25444 {
25445 const char *src = input + 2;
25446 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
25447 result |= 2;
25448 }
25449 }
25450 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
25451 {
25452 const char input[] = "<\306\374\313\334\270\354>";
25453 mbstate_t state;
25454
25455 memset (&state, '\0', sizeof (mbstate_t));
25456 if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2))
25457 if (!mbsinit (&state))
25458 {
25459 const char *src = input + 4;
25460 if (mbsrtowcs (NULL, &src, 10, &state) != 3)
25461 result |= 4;
25462 }
25463 }
25464 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
25465 {
25466 const char input[] = "B\250\271\201\060\211\070er";
25467 mbstate_t state;
25468
25469 memset (&state, '\0', sizeof (mbstate_t));
25470 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
25471 if (!mbsinit (&state))
25472 {
25473 const char *src = input + 2;
25474 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
25475 result |= 8;
25476 }
25477 }
25478 return result;
25479 }
25480 _ACEOF
25481 if ac_fn_c_try_run "$LINENO"; then :
25482 gl_cv_func_mbsrtowcs_works=yes
25483 else
25484 gl_cv_func_mbsrtowcs_works=no
25485 fi
25486 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25487 conftest.$ac_objext conftest.beam conftest.$ac_ext
25488 fi
25489
25490 fi
25491
25492 fi
25493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5
25494 $as_echo "$gl_cv_func_mbsrtowcs_works" >&6; }
25495
25496 case "$gl_cv_func_mbsrtowcs_works" in
25497 *yes) ;;
25498 *) REPLACE_MBSRTOWCS=1 ;;
25499 esac
25500 fi
25501 fi
25502
25503 if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
25504
25505
25506
25507
25508
25509
25510
25511
25512 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs.$ac_objext"
25513
25514
25515
25516
25517
25518
25519
25520
25521
25522 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext"
25523
25524
25525 :
25526
25527 fi
25528
25529
25530
25531
25532
25533 GNULIB_MBSRTOWCS=1
25534
25535
25536
25537
25538
25539 $as_echo "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h
25540
25541
25542
25543
25544
25545
25546 for ac_func in mbtowc
25547 do :
25548 ac_fn_c_check_func "$LINENO" "mbtowc" "ac_cv_func_mbtowc"
25549 if test "x$ac_cv_func_mbtowc" = xyes; then :
25550 cat >>confdefs.h <<_ACEOF
25551 #define HAVE_MBTOWC 1
25552 _ACEOF
25553
25554 fi
25555 done
25556
25557 if test $ac_cv_func_mbtowc = no; then
25558 HAVE_MBTOWC=0
25559 else
25560 if false; then
25561 REPLACE_MBTOWC=1
25562 fi
25563 fi
25564
25565 if test $HAVE_MBTOWC = 0 || test $REPLACE_MBTOWC = 1; then
25566
25567
25568
25569
25570
25571
25572
25573
25574 gl_LIBOBJS="$gl_LIBOBJS mbtowc.$ac_objext"
25575
25576
25577 :
25578
25579 fi
25580
25581
25582
25583
25584
25585 GNULIB_MBTOWC=1
25586
25587
25588
25589
25590
25591 $as_echo "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h
25592
25593
25594
25595
25596 if test $REPLACE_MEMCHR = 1; then
25597
25598
25599
25600
25601
25602
25603
25604
25605 gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
25606
25607
25608 for ac_header in bp-sym.h
25609 do :
25610 ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
25611 if test "x$ac_cv_header_bp_sym_h" = xyes; then :
25612 cat >>confdefs.h <<_ACEOF
25613 #define HAVE_BP_SYM_H 1
25614 _ACEOF
25615
25616 fi
25617
25618 done
25619
25620
25621 fi
25622
25623
25624
25625
25626
25627 GNULIB_MEMCHR=1
25628
25629
25630
25631
25632
25633 $as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
25634
25635
25636
25637
25638
25639 if test $HAVE_DECL_MEMMEM = 1 && test $REPLACE_MEMMEM = 0; then
25640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works in linear time" >&5
25641 $as_echo_n "checking whether memmem works in linear time... " >&6; }
25642 if ${gl_cv_func_memmem_works_fast+:} false; then :
25643 $as_echo_n "(cached) " >&6
25644 else
25645 if test "$cross_compiling" = yes; then :
25646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25647 /* end confdefs.h. */
25648
25649 #include <features.h>
25650 #ifdef __GNU_LIBRARY__
25651 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2)) \
25652 && !defined __UCLIBC__
25653 Lucky user
25654 #endif
25655 #endif
25656 #ifdef __CYGWIN__
25657 #include <cygwin/version.h>
25658 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 0)
25659 Lucky user
25660 #endif
25661 #endif
25662
25663 _ACEOF
25664 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25665 $EGREP "Lucky user" >/dev/null 2>&1; then :
25666 gl_cv_func_memmem_works_fast="guessing yes"
25667 else
25668 gl_cv_func_memmem_works_fast="$gl_cross_guess_normal"
25669 fi
25670 rm -f conftest*
25671
25672
25673 else
25674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25675 /* end confdefs.h. */
25676
25677 #include <signal.h> /* for signal */
25678 #include <string.h> /* for memmem */
25679 #include <stdlib.h> /* for malloc */
25680 #include <unistd.h> /* for alarm */
25681 static void quit (int sig) { _exit (sig + 128); }
25682
25683 int
25684 main ()
25685 {
25686
25687 int result = 0;
25688 size_t m = 1000000;
25689 char *haystack = (char *) malloc (2 * m + 1);
25690 char *needle = (char *) malloc (m + 1);
25691 /* Failure to compile this test due to missing alarm is okay,
25692 since all such platforms (mingw) also lack memmem. */
25693 signal (SIGALRM, quit);
25694 alarm (5);
25695 /* Check for quadratic performance. */
25696 if (haystack && needle)
25697 {
25698 memset (haystack, 'A', 2 * m);
25699 haystack[2 * m] = 'B';
25700 memset (needle, 'A', m);
25701 needle[m] = 'B';
25702 if (!memmem (haystack, 2 * m + 1, needle, m + 1))
25703 result |= 1;
25704 }
25705 /* Free allocated memory, in case some sanitizer is watching. */
25706 free (haystack);
25707 free (needle);
25708 return result;
25709
25710 ;
25711 return 0;
25712 }
25713 _ACEOF
25714 if ac_fn_c_try_run "$LINENO"; then :
25715 gl_cv_func_memmem_works_fast=yes
25716 else
25717 gl_cv_func_memmem_works_fast=no
25718 fi
25719 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25720 conftest.$ac_objext conftest.beam conftest.$ac_ext
25721 fi
25722
25723
25724 fi
25725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_fast" >&5
25726 $as_echo "$gl_cv_func_memmem_works_fast" >&6; }
25727 case "$gl_cv_func_memmem_works_fast" in
25728 *yes) ;;
25729 *)
25730 REPLACE_MEMMEM=1
25731 ;;
25732 esac
25733 fi
25734
25735 if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
25736
25737
25738
25739
25740
25741
25742
25743
25744 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
25745
25746 fi
25747
25748
25749
25750
25751 for ac_func in memmem
25752 do :
25753 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
25754 if test "x$ac_cv_func_memmem" = xyes; then :
25755 cat >>confdefs.h <<_ACEOF
25756 #define HAVE_MEMMEM 1
25757 _ACEOF
25758
25759 fi
25760 done
25761
25762 if test $ac_cv_func_memmem = yes; then
25763 HAVE_MEMMEM=1
25764 else
25765 HAVE_MEMMEM=0
25766 fi
25767
25768 if test $ac_cv_have_decl_memmem = no; then
25769 HAVE_DECL_MEMMEM=0
25770 else
25771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
25772 $as_echo_n "checking whether memmem works... " >&6; }
25773 if ${gl_cv_func_memmem_works_always+:} false; then :
25774 $as_echo_n "(cached) " >&6
25775 else
25776 if test "$cross_compiling" = yes; then :
25777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25778 /* end confdefs.h. */
25779
25780 #ifdef __GNU_LIBRARY__
25781 #include <features.h>
25782 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
25783 || __GLIBC_MINOR__ > 12)) \
25784 || (__GLIBC__ > 2)) \
25785 || defined __UCLIBC__
25786 Lucky user
25787 #endif
25788 #elif defined __CYGWIN__
25789 #include <cygwin/version.h>
25790 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
25791 Lucky user
25792 #endif
25793 #else
25794 Lucky user
25795 #endif
25796
25797 _ACEOF
25798 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25799 $EGREP "Lucky user" >/dev/null 2>&1; then :
25800 gl_cv_func_memmem_works_always="guessing yes"
25801 else
25802 gl_cv_func_memmem_works_always="$gl_cross_guess_normal"
25803 fi
25804 rm -f conftest*
25805
25806
25807 else
25808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25809 /* end confdefs.h. */
25810
25811 #include <string.h> /* for memmem */
25812 #define P "_EF_BF_BD"
25813 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
25814 #define NEEDLE P P P P P
25815
25816 int
25817 main ()
25818 {
25819
25820 int result = 0;
25821 if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
25822 result |= 1;
25823 /* Check for empty needle behavior. */
25824 {
25825 const char *haystack = "AAA";
25826 if (memmem (haystack, 3, (const char *) 1, 0) != haystack)
25827 result |= 2;
25828 }
25829 return result;
25830
25831 ;
25832 return 0;
25833 }
25834 _ACEOF
25835 if ac_fn_c_try_run "$LINENO"; then :
25836 gl_cv_func_memmem_works_always=yes
25837 else
25838 gl_cv_func_memmem_works_always=no
25839 fi
25840 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25841 conftest.$ac_objext conftest.beam conftest.$ac_ext
25842 fi
25843
25844
25845 fi
25846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
25847 $as_echo "$gl_cv_func_memmem_works_always" >&6; }
25848 case "$gl_cv_func_memmem_works_always" in
25849 *yes) ;;
25850 *)
25851 REPLACE_MEMMEM=1
25852 ;;
25853 esac
25854 fi
25855 :
25856
25857 if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
25858
25859
25860
25861
25862
25863
25864
25865
25866 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
25867
25868 fi
25869
25870
25871
25872
25873
25874 GNULIB_MEMMEM=1
25875
25876
25877
25878
25879
25880 $as_echo "#define GNULIB_TEST_MEMMEM 1" >>confdefs.h
25881
25882
25883
25884
25885
25886
25887
25888
25889
25890 for ac_func in mempcpy
25891 do :
25892 ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
25893 if test "x$ac_cv_func_mempcpy" = xyes; then :
25894 cat >>confdefs.h <<_ACEOF
25895 #define HAVE_MEMPCPY 1
25896 _ACEOF
25897
25898 fi
25899 done
25900
25901 if test $ac_cv_func_mempcpy = no; then
25902 HAVE_MEMPCPY=0
25903 fi
25904
25905 if test $HAVE_MEMPCPY = 0; then
25906
25907
25908
25909
25910
25911
25912
25913
25914 gl_LIBOBJS="$gl_LIBOBJS mempcpy.$ac_objext"
25915
25916
25917 :
25918
25919 fi
25920
25921
25922
25923
25924
25925 GNULIB_MEMPCPY=1
25926
25927
25928
25929
25930
25931 $as_echo "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h
25932
25933
25934
25935
25936
25937
25938
25939
25940 if test $ac_cv_have_decl_memrchr = no; then
25941 HAVE_DECL_MEMRCHR=0
25942 fi
25943
25944 for ac_func in memrchr
25945 do :
25946 ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
25947 if test "x$ac_cv_func_memrchr" = xyes; then :
25948 cat >>confdefs.h <<_ACEOF
25949 #define HAVE_MEMRCHR 1
25950 _ACEOF
25951
25952 fi
25953 done
25954
25955
25956 if test $ac_cv_func_memrchr = no; then
25957
25958
25959
25960
25961
25962
25963
25964
25965 gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
25966
25967 :
25968 fi
25969
25970
25971
25972
25973
25974 GNULIB_MEMRCHR=1
25975
25976
25977
25978
25979
25980 $as_echo "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h
25981
25982
25983
25984
25985
25986
25987
25988
25989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing slash" >&5
25990 $as_echo_n "checking whether mkdir handles trailing slash... " >&6; }
25991 if ${gl_cv_func_mkdir_trailing_slash_works+:} false; then :
25992 $as_echo_n "(cached) " >&6
25993 else
25994 rm -rf conftest.dir
25995 if test "$cross_compiling" = yes; then :
25996 case "$host_os" in
25997 # Guess yes on Linux systems.
25998 linux-* | linux) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
25999 # Guess yes on glibc systems.
26000 *-gnu* | gnu*) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
26001 # Guess yes on MSVC, no on mingw.
26002 mingw*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26003 /* end confdefs.h. */
26004
26005 #ifdef _MSC_VER
26006 Known
26007 #endif
26008
26009 _ACEOF
26010 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26011 $EGREP "Known" >/dev/null 2>&1; then :
26012 gl_cv_func_mkdir_trailing_slash_works="guessing yes"
26013 else
26014 gl_cv_func_mkdir_trailing_slash_works="guessing no"
26015 fi
26016 rm -f conftest*
26017
26018 ;;
26019 # If we don't know, obey --enable-cross-guesses.
26020 *) gl_cv_func_mkdir_trailing_slash_works="$gl_cross_guess_normal" ;;
26021 esac
26022
26023 else
26024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26025 /* end confdefs.h. */
26026
26027 #include <sys/types.h>
26028 #include <sys/stat.h>
26029
26030
26031 $gl_mda_defines
26032
26033 int
26034 main ()
26035 {
26036 return mkdir ("conftest.dir/", 0700);
26037 ;
26038 return 0;
26039 }
26040 _ACEOF
26041 if ac_fn_c_try_run "$LINENO"; then :
26042 gl_cv_func_mkdir_trailing_slash_works=yes
26043 else
26044 gl_cv_func_mkdir_trailing_slash_works=no
26045 fi
26046 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26047 conftest.$ac_objext conftest.beam conftest.$ac_ext
26048 fi
26049
26050 rm -rf conftest.dir
26051
26052 fi
26053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_slash_works" >&5
26054 $as_echo "$gl_cv_func_mkdir_trailing_slash_works" >&6; }
26055 case "$gl_cv_func_mkdir_trailing_slash_works" in
26056 *yes) ;;
26057 *)
26058 REPLACE_MKDIR=1
26059 ;;
26060 esac
26061
26062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing dot" >&5
26063 $as_echo_n "checking whether mkdir handles trailing dot... " >&6; }
26064 if ${gl_cv_func_mkdir_trailing_dot_works+:} false; then :
26065 $as_echo_n "(cached) " >&6
26066 else
26067 rm -rf conftest.dir
26068 if test "$cross_compiling" = yes; then :
26069 case "$host_os" in
26070 # Guess yes on glibc systems.
26071 *-gnu* | gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
26072 # Guess yes on musl systems.
26073 *-musl*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
26074 # Guess no on native Windows.
26075 mingw*) gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
26076 # If we don't know, obey --enable-cross-guesses.
26077 *) gl_cv_func_mkdir_trailing_dot_works="$gl_cross_guess_normal" ;;
26078 esac
26079
26080 else
26081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26082 /* end confdefs.h. */
26083
26084 #include <sys/types.h>
26085 #include <sys/stat.h>
26086
26087
26088 $gl_mda_defines
26089
26090 int
26091 main ()
26092 {
26093 return !mkdir ("conftest.dir/./", 0700);
26094 ;
26095 return 0;
26096 }
26097 _ACEOF
26098 if ac_fn_c_try_run "$LINENO"; then :
26099 gl_cv_func_mkdir_trailing_dot_works=yes
26100 else
26101 gl_cv_func_mkdir_trailing_dot_works=no
26102 fi
26103 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26104 conftest.$ac_objext conftest.beam conftest.$ac_ext
26105 fi
26106
26107 rm -rf conftest.dir
26108
26109
26110 fi
26111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_dot_works" >&5
26112 $as_echo "$gl_cv_func_mkdir_trailing_dot_works" >&6; }
26113 case "$gl_cv_func_mkdir_trailing_dot_works" in
26114 *yes) ;;
26115 *)
26116 REPLACE_MKDIR=1
26117
26118 $as_echo "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h
26119
26120 ;;
26121 esac
26122
26123 if test $REPLACE_MKDIR = 1; then
26124
26125
26126
26127
26128
26129
26130
26131
26132 gl_LIBOBJS="$gl_LIBOBJS mkdir.$ac_objext"
26133
26134 fi
26135
26136
26137
26138
26139
26140 GNULIB_MKDIR=1
26141
26142
26143
26144
26145
26146 $as_echo "#define GNULIB_TEST_MKDIR 1" >>confdefs.h
26147
26148
26149
26150
26151
26152 for ac_func in mkdtemp
26153 do :
26154 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
26155 if test "x$ac_cv_func_mkdtemp" = xyes; then :
26156 cat >>confdefs.h <<_ACEOF
26157 #define HAVE_MKDTEMP 1
26158 _ACEOF
26159
26160 fi
26161 done
26162
26163 if test $ac_cv_func_mkdtemp = no; then
26164 HAVE_MKDTEMP=0
26165 fi
26166
26167 if test $HAVE_MKDTEMP = 0; then
26168
26169
26170
26171
26172
26173
26174
26175
26176 gl_LIBOBJS="$gl_LIBOBJS mkdtemp.$ac_objext"
26177
26178 :
26179
26180 fi
26181
26182
26183
26184
26185
26186 GNULIB_MKDTEMP=1
26187
26188
26189
26190
26191
26192 $as_echo "#define GNULIB_TEST_MKDTEMP 1" >>confdefs.h
26193
26194
26195
26196
26197
26198
26199
26200
26201
26202 if test $ac_cv_func_mkostemp != yes; then
26203 HAVE_MKOSTEMP=0
26204 fi
26205
26206 if test $HAVE_MKOSTEMP = 0; then
26207
26208
26209
26210
26211
26212
26213
26214
26215 gl_LIBOBJS="$gl_LIBOBJS mkostemp.$ac_objext"
26216
26217
26218
26219 fi
26220
26221
26222 cat >>confdefs.h <<_ACEOF
26223 #define GNULIB_MKOSTEMP 1
26224 _ACEOF
26225
26226
26227
26228
26229
26230
26231
26232 GNULIB_MKOSTEMP=1
26233
26234
26235
26236
26237
26238 $as_echo "#define GNULIB_TEST_MKOSTEMP 1" >>confdefs.h
26239
26240
26241
26242
26243 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
26244
26245
26246
26247
26248
26249
26250
26251
26252 gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
26253
26254 fi
26255
26256 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
26257
26258
26259
26260
26261
26262
26263
26264
26265 gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
26266
26267 fi
26268
26269
26270 cat >>confdefs.h <<_ACEOF
26271 #define GNULIB_MSVC_NOTHROW 1
26272 _ACEOF
26273
26274
26275
26276
26277
26278
26279
26280
26281
26282
26283
26284
26285
26286
26287 if test $gl_cv_have_include_next = yes; then
26288 gl_cv_next_netdb_h='<'netdb.h'>'
26289 else
26290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <netdb.h>" >&5
26291 $as_echo_n "checking absolute name of <netdb.h>... " >&6; }
26292 if ${gl_cv_next_netdb_h+:} false; then :
26293 $as_echo_n "(cached) " >&6
26294 else
26295
26296 if test $ac_cv_header_netdb_h = yes; then
26297
26298
26299
26300
26301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26302 /* end confdefs.h. */
26303 #include <netdb.h>
26304 _ACEOF
26305 case "$host_os" in
26306 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26307 *) gl_absname_cpp="$ac_cpp" ;;
26308 esac
26309
26310 case "$host_os" in
26311 mingw*)
26312 gl_dirsep_regex='[/\\]'
26313 ;;
26314 *)
26315 gl_dirsep_regex='\/'
26316 ;;
26317 esac
26318 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26319 gl_header_literal_regex=`echo 'netdb.h' \
26320 | sed -e "$gl_make_literal_regex_sed"`
26321 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26322 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26323 s|^/[^/]|//&|
26324 p
26325 q
26326 }'
26327
26328 gl_cv_absolute_netdb_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26329 sed -n "$gl_absolute_header_sed"`
26330
26331 gl_header=$gl_cv_absolute_netdb_h
26332 gl_cv_next_netdb_h='"'$gl_header'"'
26333 else
26334 gl_cv_next_netdb_h='<'netdb.h'>'
26335 fi
26336
26337
26338 fi
26339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_netdb_h" >&5
26340 $as_echo "$gl_cv_next_netdb_h" >&6; }
26341 fi
26342 NEXT_NETDB_H=$gl_cv_next_netdb_h
26343
26344 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26345 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26346 gl_next_as_first_directive='<'netdb.h'>'
26347 else
26348 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26349 gl_next_as_first_directive=$gl_cv_next_netdb_h
26350 fi
26351 NEXT_AS_FIRST_DIRECTIVE_NETDB_H=$gl_next_as_first_directive
26352
26353
26354
26355
26356 if test $ac_cv_header_netdb_h = yes; then
26357 HAVE_NETDB_H=1
26358 else
26359 HAVE_NETDB_H=0
26360 fi
26361
26362
26363
26364
26365
26366
26367
26368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <netinet/in.h> is self-contained" >&5
26369 $as_echo_n "checking whether <netinet/in.h> is self-contained... " >&6; }
26370 if ${gl_cv_header_netinet_in_h_selfcontained+:} false; then :
26371 $as_echo_n "(cached) " >&6
26372 else
26373
26374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26375 /* end confdefs.h. */
26376 #include <netinet/in.h>
26377 int
26378 main ()
26379 {
26380
26381 ;
26382 return 0;
26383 }
26384 _ACEOF
26385 if ac_fn_c_try_compile "$LINENO"; then :
26386 gl_cv_header_netinet_in_h_selfcontained=yes
26387 else
26388 gl_cv_header_netinet_in_h_selfcontained=no
26389 fi
26390 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26391
26392 fi
26393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_netinet_in_h_selfcontained" >&5
26394 $as_echo "$gl_cv_header_netinet_in_h_selfcontained" >&6; }
26395 if test $gl_cv_header_netinet_in_h_selfcontained = yes; then
26396 NETINET_IN_H=''
26397 else
26398 NETINET_IN_H='netinet/in.h'
26399 for ac_header in netinet/in.h
26400 do :
26401 ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
26402 if test "x$ac_cv_header_netinet_in_h" = xyes; then :
26403 cat >>confdefs.h <<_ACEOF
26404 #define HAVE_NETINET_IN_H 1
26405 _ACEOF
26406
26407 fi
26408
26409 done
26410
26411
26412
26413
26414
26415
26416
26417
26418
26419
26420 if test $gl_cv_have_include_next = yes; then
26421 gl_cv_next_netinet_in_h='<'netinet/in.h'>'
26422 else
26423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <netinet/in.h>" >&5
26424 $as_echo_n "checking absolute name of <netinet/in.h>... " >&6; }
26425 if ${gl_cv_next_netinet_in_h+:} false; then :
26426 $as_echo_n "(cached) " >&6
26427 else
26428
26429 if test $ac_cv_header_netinet_in_h = yes; then
26430
26431
26432
26433
26434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26435 /* end confdefs.h. */
26436 #include <netinet/in.h>
26437 _ACEOF
26438 case "$host_os" in
26439 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26440 *) gl_absname_cpp="$ac_cpp" ;;
26441 esac
26442
26443 case "$host_os" in
26444 mingw*)
26445 gl_dirsep_regex='[/\\]'
26446 ;;
26447 *)
26448 gl_dirsep_regex='\/'
26449 ;;
26450 esac
26451 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26452 gl_header_literal_regex=`echo 'netinet/in.h' \
26453 | sed -e "$gl_make_literal_regex_sed"`
26454 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26455 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26456 s|^/[^/]|//&|
26457 p
26458 q
26459 }'
26460
26461 gl_cv_absolute_netinet_in_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26462 sed -n "$gl_absolute_header_sed"`
26463
26464 gl_header=$gl_cv_absolute_netinet_in_h
26465 gl_cv_next_netinet_in_h='"'$gl_header'"'
26466 else
26467 gl_cv_next_netinet_in_h='<'netinet/in.h'>'
26468 fi
26469
26470
26471 fi
26472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_netinet_in_h" >&5
26473 $as_echo "$gl_cv_next_netinet_in_h" >&6; }
26474 fi
26475 NEXT_NETINET_IN_H=$gl_cv_next_netinet_in_h
26476
26477 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26478 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26479 gl_next_as_first_directive='<'netinet/in.h'>'
26480 else
26481 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26482 gl_next_as_first_directive=$gl_cv_next_netinet_in_h
26483 fi
26484 NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H=$gl_next_as_first_directive
26485
26486
26487
26488
26489 if test $ac_cv_header_netinet_in_h = yes; then
26490 HAVE_NETINET_IN_H=1
26491 else
26492 HAVE_NETINET_IN_H=0
26493 fi
26494
26495 fi
26496
26497 if test -n "$NETINET_IN_H"; then
26498 GL_GENERATE_NETINET_IN_H_TRUE=
26499 GL_GENERATE_NETINET_IN_H_FALSE='#'
26500 else
26501 GL_GENERATE_NETINET_IN_H_TRUE='#'
26502 GL_GENERATE_NETINET_IN_H_FALSE=
26503 fi
26504
26505
26506
26507
26508
26509
26510 case "$host_os" in
26511 mingw* | pw*)
26512 REPLACE_OPEN=1
26513 ;;
26514 *)
26515
26516 if test "$gl_cv_macro_O_CLOEXEC" != yes; then
26517 REPLACE_OPEN=1
26518 fi
26519
26520
26521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
26522 $as_echo_n "checking whether open recognizes a trailing slash... " >&6; }
26523 if ${gl_cv_func_open_slash+:} false; then :
26524 $as_echo_n "(cached) " >&6
26525 else
26526 # Assume that if we have lstat, we can also check symlinks.
26527 if test $ac_cv_func_lstat = yes; then
26528 touch conftest.tmp
26529 ln -s conftest.tmp conftest.lnk
26530 fi
26531 if test "$cross_compiling" = yes; then :
26532
26533 case "$host_os" in
26534 freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
26535 gl_cv_func_open_slash="guessing no" ;;
26536 *)
26537 gl_cv_func_open_slash="guessing yes" ;;
26538 esac
26539
26540 else
26541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26542 /* end confdefs.h. */
26543
26544 #include <fcntl.h>
26545 #if HAVE_UNISTD_H
26546 # include <unistd.h>
26547 #endif
26548
26549
26550 $gl_mda_defines
26551
26552 int main ()
26553 {
26554 int result = 0;
26555 #if HAVE_LSTAT
26556 if (open ("conftest.lnk/", O_RDONLY) != -1)
26557 result |= 1;
26558 #endif
26559 if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
26560 result |= 2;
26561 return result;
26562 }
26563 _ACEOF
26564 if ac_fn_c_try_run "$LINENO"; then :
26565 gl_cv_func_open_slash=yes
26566 else
26567 gl_cv_func_open_slash=no
26568 fi
26569 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26570 conftest.$ac_objext conftest.beam conftest.$ac_ext
26571 fi
26572
26573 rm -f conftest.sl conftest.tmp conftest.lnk
26574
26575 fi
26576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
26577 $as_echo "$gl_cv_func_open_slash" >&6; }
26578 case "$gl_cv_func_open_slash" in
26579 *no)
26580
26581 $as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
26582
26583 ;;
26584 esac
26585
26586 case "$gl_cv_func_open_slash" in
26587 *no)
26588 REPLACE_OPEN=1
26589 ;;
26590 esac
26591 ;;
26592 esac
26593
26594 if test $REPLACE_OPEN = 0; then
26595
26596
26597
26598 if test $ac_cv_func_fchdir = no; then
26599 HAVE_FCHDIR=0
26600 fi
26601
26602 if test $HAVE_FCHDIR = 0; then
26603 REPLACE_OPEN=1
26604 fi
26605 fi
26606
26607
26608
26609 if test $REPLACE_OPEN = 1; then
26610
26611
26612
26613
26614
26615
26616
26617
26618 gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
26619
26620
26621
26622 :
26623
26624 fi
26625
26626
26627
26628
26629
26630 GNULIB_OPEN=1
26631
26632
26633
26634
26635
26636 $as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h
26637
26638
26639
26640
26641
26642
26643
26644
26645
26646 case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink+$gl_cv_macro_O_CLOEXEC in
26647 yes+*yes+yes)
26648 ;;
26649 yes+*)
26650 # Solaris 10 lacks O_CLOEXEC.
26651 # Solaris 9 has *at functions, but uniformly mishandles trailing
26652 # slash in all of them.
26653 REPLACE_OPENAT=1
26654 ;;
26655 *)
26656 HAVE_OPENAT=0
26657 ;;
26658 esac
26659
26660 if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then
26661
26662
26663
26664
26665
26666
26667
26668
26669 gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext"
26670
26671
26672
26673 :
26674
26675 fi
26676
26677
26678 cat >>confdefs.h <<_ACEOF
26679 #define GNULIB_OPENAT 1
26680 _ACEOF
26681
26682
26683
26684
26685
26686
26687 GNULIB_OPENAT=1
26688
26689
26690
26691
26692
26693 $as_echo "#define GNULIB_TEST_OPENAT 1" >>confdefs.h
26694
26695
26696
26697
26698
26699
26700 for ac_func in opendir
26701 do :
26702 ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
26703 if test "x$ac_cv_func_opendir" = xyes; then :
26704 cat >>confdefs.h <<_ACEOF
26705 #define HAVE_OPENDIR 1
26706 _ACEOF
26707
26708 fi
26709 done
26710
26711 if test $ac_cv_func_opendir = no; then
26712 HAVE_OPENDIR=0
26713 fi
26714
26715
26716
26717
26718 if test $ac_cv_func_fchdir = no; then
26719 HAVE_FCHDIR=0
26720 fi
26721
26722 if test $HAVE_FCHDIR = 0; then
26723 if test $HAVE_OPENDIR = 1; then
26724 REPLACE_OPENDIR=1
26725 fi
26726 fi
26727
26728 case $host_os,$HAVE_OPENDIR in
26729 os2*,1)
26730 REPLACE_OPENDIR=1;;
26731 esac
26732
26733 if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
26734
26735
26736
26737
26738
26739
26740
26741
26742 gl_LIBOBJS="$gl_LIBOBJS opendir.$ac_objext"
26743
26744 fi
26745
26746
26747
26748
26749
26750 GNULIB_OPENDIR=1
26751
26752
26753
26754
26755
26756 $as_echo "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
26757
26758
26759
26760
26761
26762
26763
26764
26765
26766
26767 if test $ac_cv_func_pipe != yes; then
26768 HAVE_PIPE=0
26769 fi
26770
26771 if test $HAVE_PIPE = 0; then
26772
26773
26774
26775
26776
26777
26778
26779
26780 gl_LIBOBJS="$gl_LIBOBJS pipe.$ac_objext"
26781
26782 fi
26783
26784
26785
26786
26787
26788 GNULIB_PIPE=1
26789
26790
26791
26792
26793
26794 $as_echo "#define GNULIB_TEST_PIPE 1" >>confdefs.h
26795
26796
26797
26798
26799
26800
26801
26802 for ac_func in rawmemchr
26803 do :
26804 ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
26805 if test "x$ac_cv_func_rawmemchr" = xyes; then :
26806 cat >>confdefs.h <<_ACEOF
26807 #define HAVE_RAWMEMCHR 1
26808 _ACEOF
26809
26810 fi
26811 done
26812
26813 if test $ac_cv_func_rawmemchr = no; then
26814 HAVE_RAWMEMCHR=0
26815 fi
26816
26817 if test $HAVE_RAWMEMCHR = 0; then
26818
26819
26820
26821
26822
26823
26824
26825
26826 gl_LIBOBJS="$gl_LIBOBJS rawmemchr.$ac_objext"
26827
26828 :
26829 fi
26830
26831
26832
26833
26834
26835 GNULIB_RAWMEMCHR=1
26836
26837
26838
26839
26840
26841 $as_echo "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
26842
26843
26844
26845
26846
26847
26848 for ac_func in readdir
26849 do :
26850 ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir"
26851 if test "x$ac_cv_func_readdir" = xyes; then :
26852 cat >>confdefs.h <<_ACEOF
26853 #define HAVE_READDIR 1
26854 _ACEOF
26855
26856 fi
26857 done
26858
26859 if test $ac_cv_func_readdir = no; then
26860 HAVE_READDIR=0
26861 fi
26862
26863 if test $HAVE_READDIR = 0; then
26864
26865
26866
26867
26868
26869
26870
26871
26872 gl_LIBOBJS="$gl_LIBOBJS readdir.$ac_objext"
26873
26874 fi
26875
26876
26877
26878
26879
26880 GNULIB_READDIR=1
26881
26882
26883
26884
26885
26886 $as_echo "#define GNULIB_TEST_READDIR 1" >>confdefs.h
26887
26888
26889
26890
26891
26892
26893 if test $ac_cv_func_readlink = no; then
26894 HAVE_READLINK=0
26895 else
26896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
26897 $as_echo_n "checking whether readlink signature is correct... " >&6; }
26898 if ${gl_cv_decl_readlink_works+:} false; then :
26899 $as_echo_n "(cached) " >&6
26900 else
26901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26902 /* end confdefs.h. */
26903 #include <unistd.h>
26904 /* Cause compilation failure if original declaration has wrong type. */
26905 ssize_t readlink (const char *, char *, size_t);
26906 int
26907 main ()
26908 {
26909
26910 ;
26911 return 0;
26912 }
26913 _ACEOF
26914 if ac_fn_c_try_compile "$LINENO"; then :
26915 gl_cv_decl_readlink_works=yes
26916 else
26917 gl_cv_decl_readlink_works=no
26918 fi
26919 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26920 fi
26921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
26922 $as_echo "$gl_cv_decl_readlink_works" >&6; }
26923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
26924 $as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
26925 if ${gl_cv_func_readlink_trailing_slash+:} false; then :
26926 $as_echo_n "(cached) " >&6
26927 else
26928 # We have readlink, so assume ln -s works.
26929 ln -s conftest.no-such conftest.link
26930 ln -s conftest.link conftest.lnk2
26931 if test "$cross_compiling" = yes; then :
26932 case "$host_os" in
26933 # Guess yes on Linux or glibc systems.
26934 linux-* | linux | *-gnu* | gnu*)
26935 gl_cv_func_readlink_trailing_slash="guessing yes" ;;
26936 # Guess no on AIX or HP-UX.
26937 aix* | hpux*)
26938 gl_cv_func_readlink_trailing_slash="guessing no" ;;
26939 # If we don't know, obey --enable-cross-guesses.
26940 *)
26941 gl_cv_func_readlink_trailing_slash="$gl_cross_guess_normal" ;;
26942 esac
26943
26944 else
26945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26946 /* end confdefs.h. */
26947 #include <unistd.h>
26948
26949 int
26950 main ()
26951 {
26952 char buf[20];
26953 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
26954 ;
26955 return 0;
26956 }
26957 _ACEOF
26958 if ac_fn_c_try_run "$LINENO"; then :
26959 gl_cv_func_readlink_trailing_slash=yes
26960 else
26961 gl_cv_func_readlink_trailing_slash=no
26962 fi
26963 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26964 conftest.$ac_objext conftest.beam conftest.$ac_ext
26965 fi
26966
26967 rm -f conftest.link conftest.lnk2
26968 fi
26969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_trailing_slash" >&5
26970 $as_echo "$gl_cv_func_readlink_trailing_slash" >&6; }
26971 case "$gl_cv_func_readlink_trailing_slash" in
26972 *yes)
26973 if test "$gl_cv_decl_readlink_works" != yes; then
26974 REPLACE_READLINK=1
26975 fi
26976 ;;
26977 *)
26978
26979 $as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
26980
26981 REPLACE_READLINK=1
26982 ;;
26983 esac
26984
26985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink truncates results correctly" >&5
26986 $as_echo_n "checking whether readlink truncates results correctly... " >&6; }
26987 if ${gl_cv_func_readlink_truncate+:} false; then :
26988 $as_echo_n "(cached) " >&6
26989 else
26990 # We have readlink, so assume ln -s works.
26991 ln -s ab conftest.link
26992 if test "$cross_compiling" = yes; then :
26993 case "$host_os" in
26994 # Guess yes on Linux or glibc systems.
26995 linux-* | linux | *-gnu* | gnu*)
26996 gl_cv_func_readlink_truncate="guessing yes" ;;
26997 # Guess no on AIX or HP-UX.
26998 aix* | hpux*)
26999 gl_cv_func_readlink_truncate="guessing no" ;;
27000 # If we don't know, obey --enable-cross-guesses.
27001 *)
27002 gl_cv_func_readlink_truncate="$gl_cross_guess_normal" ;;
27003 esac
27004
27005 else
27006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27007 /* end confdefs.h. */
27008 #include <unistd.h>
27009
27010 int
27011 main ()
27012 {
27013 char c;
27014 return readlink ("conftest.link", &c, 1) != 1;
27015 ;
27016 return 0;
27017 }
27018 _ACEOF
27019 if ac_fn_c_try_run "$LINENO"; then :
27020 gl_cv_func_readlink_truncate=yes
27021 else
27022 gl_cv_func_readlink_truncate=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 rm -f conftest.link conftest.lnk2
27029 fi
27030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_truncate" >&5
27031 $as_echo "$gl_cv_func_readlink_truncate" >&6; }
27032 case $gl_cv_func_readlink_truncate in
27033 *yes)
27034 if test "$gl_cv_decl_readlink_works" != yes; then
27035 REPLACE_READLINK=1
27036 fi
27037 ;;
27038 *)
27039
27040 $as_echo "#define READLINK_TRUNCATE_BUG 1" >>confdefs.h
27041
27042 REPLACE_READLINK=1
27043 ;;
27044 esac
27045 fi
27046
27047 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
27048
27049
27050
27051
27052
27053
27054
27055
27056 gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
27057
27058
27059 :
27060
27061 fi
27062
27063
27064
27065
27066
27067 GNULIB_READLINK=1
27068
27069
27070
27071
27072
27073 $as_echo "#define GNULIB_TEST_READLINK 1" >>confdefs.h
27074
27075
27076
27077
27078
27079
27080 if test $gl_cv_func_malloc_posix = yes; then
27081
27082 $as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h
27083
27084 else
27085 REPLACE_REALLOC=1
27086 fi
27087
27088 if test $REPLACE_REALLOC = 1; then
27089
27090
27091
27092
27093
27094
27095
27096
27097 gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
27098
27099 fi
27100
27101
27102
27103
27104
27105 GNULIB_REALLOC_POSIX=1
27106
27107
27108
27109
27110
27111 $as_echo "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
27112
27113
27114
27115
27116
27117
27118
27119
27120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on destination" >&5
27121 $as_echo_n "checking whether rename honors trailing slash on destination... " >&6; }
27122 if ${gl_cv_func_rename_slash_dst_works+:} false; then :
27123 $as_echo_n "(cached) " >&6
27124 else
27125 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
27126 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
27127 as_fn_error $? "cannot create temporary files" "$LINENO" 5
27128 # Assume that if we have lstat, we can also check symlinks.
27129 if test $ac_cv_func_lstat = yes; then
27130 ln -s conftest.f conftest.lnk
27131 fi
27132 if test "$cross_compiling" = yes; then :
27133 case "$host_os" in
27134 # Guess yes on Linux systems.
27135 linux-* | linux) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
27136 # Guess yes on glibc systems.
27137 *-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
27138 # Guess no on native Windows.
27139 mingw*) gl_cv_func_rename_slash_dst_works="guessing no" ;;
27140 # If we don't know, obey --enable-cross-guesses.
27141 *) gl_cv_func_rename_slash_dst_works="$gl_cross_guess_normal" ;;
27142 esac
27143
27144 else
27145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27146 /* end confdefs.h. */
27147
27148 # include <stdio.h>
27149 # include <stdlib.h>
27150
27151 int
27152 main ()
27153 {
27154 int result = 0;
27155 if (rename ("conftest.f1", "conftest.f2/") == 0)
27156 result |= 1;
27157 if (rename ("conftest.d1", "conftest.d2/") != 0)
27158 result |= 2;
27159 #if HAVE_LSTAT
27160 if (rename ("conftest.f", "conftest.lnk/") == 0)
27161 result |= 4;
27162 #endif
27163 return result;
27164
27165 ;
27166 return 0;
27167 }
27168 _ACEOF
27169 if ac_fn_c_try_run "$LINENO"; then :
27170 gl_cv_func_rename_slash_dst_works=yes
27171 else
27172 gl_cv_func_rename_slash_dst_works=no
27173 fi
27174 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27175 conftest.$ac_objext conftest.beam conftest.$ac_ext
27176 fi
27177
27178 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
27179
27180 fi
27181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_dst_works" >&5
27182 $as_echo "$gl_cv_func_rename_slash_dst_works" >&6; }
27183 case "$gl_cv_func_rename_slash_dst_works" in
27184 *yes) ;;
27185 *)
27186 REPLACE_RENAME=1
27187
27188 $as_echo "#define RENAME_TRAILING_SLASH_DEST_BUG 1" >>confdefs.h
27189
27190 ;;
27191 esac
27192
27193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on source" >&5
27194 $as_echo_n "checking whether rename honors trailing slash on source... " >&6; }
27195 if ${gl_cv_func_rename_slash_src_works+:} false; then :
27196 $as_echo_n "(cached) " >&6
27197 else
27198 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
27199 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
27200 as_fn_error $? "cannot create temporary files" "$LINENO" 5
27201 # Assume that if we have lstat, we can also check symlinks.
27202 if test $ac_cv_func_lstat = yes; then
27203 ln -s conftest.f conftest.lnk
27204 fi
27205 if test "$cross_compiling" = yes; then :
27206 case "$host_os" in
27207 # Guess yes on Linux systems.
27208 linux-* | linux) gl_cv_func_rename_slash_src_works="guessing yes" ;;
27209 # Guess yes on glibc systems.
27210 *-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
27211 # Guess yes on native Windows.
27212 mingw*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
27213 # If we don't know, obey --enable-cross-guesses.
27214 *) gl_cv_func_rename_slash_src_works="$gl_cross_guess_normal" ;;
27215 esac
27216
27217 else
27218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27219 /* end confdefs.h. */
27220
27221 # include <stdio.h>
27222 # include <stdlib.h>
27223
27224 int
27225 main ()
27226 {
27227 int result = 0;
27228 if (rename ("conftest.f1/", "conftest.d3") == 0)
27229 result |= 1;
27230 if (rename ("conftest.d1/", "conftest.d2") != 0)
27231 result |= 2;
27232 #if HAVE_LSTAT
27233 if (rename ("conftest.lnk/", "conftest.f") == 0)
27234 result |= 4;
27235 #endif
27236 return result;
27237
27238 ;
27239 return 0;
27240 }
27241 _ACEOF
27242 if ac_fn_c_try_run "$LINENO"; then :
27243 gl_cv_func_rename_slash_src_works=yes
27244 else
27245 gl_cv_func_rename_slash_src_works=no
27246 fi
27247 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27248 conftest.$ac_objext conftest.beam conftest.$ac_ext
27249 fi
27250
27251 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
27252
27253 fi
27254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_src_works" >&5
27255 $as_echo "$gl_cv_func_rename_slash_src_works" >&6; }
27256 case "$gl_cv_func_rename_slash_src_works" in
27257 *yes) ;;
27258 *)
27259 REPLACE_RENAME=1
27260
27261 $as_echo "#define RENAME_TRAILING_SLASH_SOURCE_BUG 1" >>confdefs.h
27262
27263 ;;
27264 esac
27265
27266
27267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5
27268 $as_echo_n "checking whether rename manages hard links correctly... " >&6; }
27269 if ${gl_cv_func_rename_link_works+:} false; then :
27270 $as_echo_n "(cached) " >&6
27271 else
27272 if test $ac_cv_func_link = yes; then
27273 if test $cross_compiling != yes; then
27274 rm -rf conftest.f conftest.f1 conftest.f2
27275 if touch conftest.f conftest.f2 && ln conftest.f conftest.f1 &&
27276 set x `ls -i conftest.f conftest.f1` && test "" = ""; then
27277 if test "$cross_compiling" = yes; then :
27278 :
27279
27280 else
27281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27282 /* end confdefs.h. */
27283
27284 # include <errno.h>
27285 # include <stdio.h>
27286 # include <stdlib.h>
27287 # include <unistd.h>
27288
27289
27290 $gl_mda_defines
27291
27292 int
27293 main ()
27294 {
27295 int result = 0;
27296 if (rename ("conftest.f", "conftest.f1"))
27297 result |= 1;
27298 if (unlink ("conftest.f1"))
27299 result |= 2;
27300
27301 /* Allow either the POSIX-required behavior, where the
27302 previous rename kept conftest.f, or the (better) NetBSD
27303 behavior, where it removed conftest.f. */
27304 if (rename ("conftest.f", "conftest.f") != 0
27305 && errno != ENOENT)
27306 result |= 4;
27307
27308 if (rename ("conftest.f1", "conftest.f1") == 0)
27309 result |= 8;
27310 if (rename ("conftest.f2", "conftest.f2") != 0)
27311 result |= 16;
27312 return result;
27313
27314 ;
27315 return 0;
27316 }
27317 _ACEOF
27318 if ac_fn_c_try_run "$LINENO"; then :
27319 gl_cv_func_rename_link_works=yes
27320 else
27321 gl_cv_func_rename_link_works=no
27322 fi
27323 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27324 conftest.$ac_objext conftest.beam conftest.$ac_ext
27325 fi
27326
27327 else
27328 gl_cv_func_rename_link_works="guessing no"
27329 fi
27330 rm -rf conftest.f conftest.f1 conftest.f2
27331 else
27332 case "$host_os" in
27333 # Guess yes on Linux systems.
27334 linux-* | linux) gl_cv_func_rename_link_works="guessing yes" ;;
27335 # Guess yes on glibc systems.
27336 *-gnu*) gl_cv_func_rename_link_works="guessing yes" ;;
27337 # Guess yes on native Windows.
27338 mingw*) gl_cv_func_rename_link_works="guessing yes" ;;
27339 # If we don't know, obey --enable-cross-guesses.
27340 *) gl_cv_func_rename_link_works="$gl_cross_guess_normal" ;;
27341 esac
27342 fi
27343 else
27344 gl_cv_func_rename_link_works=yes
27345 fi
27346
27347 fi
27348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_link_works" >&5
27349 $as_echo "$gl_cv_func_rename_link_works" >&6; }
27350 case "$gl_cv_func_rename_link_works" in
27351 *yes) ;;
27352 *)
27353 REPLACE_RENAME=1
27354
27355 $as_echo "#define RENAME_HARD_LINK_BUG 1" >>confdefs.h
27356
27357 ;;
27358 esac
27359
27360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages existing destinations correctly" >&5
27361 $as_echo_n "checking whether rename manages existing destinations correctly... " >&6; }
27362 if ${gl_cv_func_rename_dest_works+:} false; then :
27363 $as_echo_n "(cached) " >&6
27364 else
27365 rm -rf conftest.f conftest.d1 conftest.d2
27366 touch conftest.f && mkdir conftest.d1 conftest.d2 ||
27367 as_fn_error $? "cannot create temporary files" "$LINENO" 5
27368 if test "$cross_compiling" = yes; then :
27369 case "$host_os" in
27370 # Guess yes on Linux systems.
27371 linux-* | linux) gl_cv_func_rename_dest_works="guessing yes" ;;
27372 # Guess yes on glibc systems.
27373 *-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;;
27374 # Guess no on native Windows.
27375 mingw*) gl_cv_func_rename_dest_works="guessing no" ;;
27376 # If we don't know, obey --enable-cross-guesses.
27377 *) gl_cv_func_rename_dest_works="$gl_cross_guess_normal" ;;
27378 esac
27379
27380 else
27381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27382 /* end confdefs.h. */
27383
27384 # include <stdio.h>
27385 # include <stdlib.h>
27386
27387 int
27388 main ()
27389 {
27390 int result = 0;
27391 if (rename ("conftest.d1", "conftest.d2") != 0)
27392 result |= 1;
27393 if (rename ("conftest.d2", "conftest.f") == 0)
27394 result |= 2;
27395 return result;
27396
27397 ;
27398 return 0;
27399 }
27400 _ACEOF
27401 if ac_fn_c_try_run "$LINENO"; then :
27402 gl_cv_func_rename_dest_works=yes
27403 else
27404 gl_cv_func_rename_dest_works=no
27405 fi
27406 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27407 conftest.$ac_objext conftest.beam conftest.$ac_ext
27408 fi
27409
27410 rm -rf conftest.f conftest.d1 conftest.d2
27411
27412 fi
27413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_dest_works" >&5
27414 $as_echo "$gl_cv_func_rename_dest_works" >&6; }
27415 case "$gl_cv_func_rename_dest_works" in
27416 *yes) ;;
27417 *)
27418 REPLACE_RENAME=1
27419
27420 $as_echo "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h
27421
27422 ;;
27423 esac
27424
27425 if test $REPLACE_RENAME = 1; then
27426
27427
27428
27429
27430
27431
27432
27433
27434 gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext"
27435
27436 fi
27437
27438
27439
27440
27441
27442 GNULIB_RENAME=1
27443
27444
27445
27446
27447
27448 $as_echo "#define GNULIB_TEST_RENAME 1" >>confdefs.h
27449
27450
27451
27452
27453
27454
27455 for ac_func in rewinddir
27456 do :
27457 ac_fn_c_check_func "$LINENO" "rewinddir" "ac_cv_func_rewinddir"
27458 if test "x$ac_cv_func_rewinddir" = xyes; then :
27459 cat >>confdefs.h <<_ACEOF
27460 #define HAVE_REWINDDIR 1
27461 _ACEOF
27462
27463 fi
27464 done
27465
27466 if test $ac_cv_func_rewinddir = no; then
27467 HAVE_REWINDDIR=0
27468 fi
27469
27470 if test $HAVE_REWINDDIR = 0; then
27471
27472
27473
27474
27475
27476
27477
27478
27479 gl_LIBOBJS="$gl_LIBOBJS rewinddir.$ac_objext"
27480
27481 fi
27482
27483
27484
27485
27486
27487 GNULIB_REWINDDIR=1
27488
27489
27490
27491
27492
27493 $as_echo "#define GNULIB_TEST_REWINDDIR 1" >>confdefs.h
27494
27495
27496
27497
27498
27499
27500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
27501 $as_echo_n "checking whether rmdir works... " >&6; }
27502 if ${gl_cv_func_rmdir_works+:} false; then :
27503 $as_echo_n "(cached) " >&6
27504 else
27505 mkdir conftest.dir
27506 touch conftest.file
27507 if test "$cross_compiling" = yes; then :
27508 case "$host_os" in
27509 # Guess yes on Linux systems.
27510 linux-* | linux) gl_cv_func_rmdir_works="guessing yes" ;;
27511 # Guess yes on glibc systems.
27512 *-gnu* | gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
27513 # Guess no on native Windows.
27514 mingw*) gl_cv_func_rmdir_works="guessing no" ;;
27515 # If we don't know, obey --enable-cross-guesses.
27516 *) gl_cv_func_rmdir_works="$gl_cross_guess_normal" ;;
27517 esac
27518
27519 else
27520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27521 /* end confdefs.h. */
27522 #include <stdio.h>
27523 #include <errno.h>
27524 #if HAVE_UNISTD_H
27525 # include <unistd.h>
27526 #else /* on Windows with MSVC */
27527 # include <direct.h>
27528 #endif
27529
27530
27531 $gl_mda_defines
27532
27533 int
27534 main ()
27535 {
27536 int result = 0;
27537 if (!rmdir ("conftest.file/"))
27538 result |= 1;
27539 else if (errno != ENOTDIR)
27540 result |= 2;
27541 if (!rmdir ("conftest.dir/./"))
27542 result |= 4;
27543 return result;
27544
27545 ;
27546 return 0;
27547 }
27548 _ACEOF
27549 if ac_fn_c_try_run "$LINENO"; then :
27550 gl_cv_func_rmdir_works=yes
27551 else
27552 gl_cv_func_rmdir_works=no
27553 fi
27554 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27555 conftest.$ac_objext conftest.beam conftest.$ac_ext
27556 fi
27557
27558 rm -rf conftest.dir conftest.file
27559 fi
27560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
27561 $as_echo "$gl_cv_func_rmdir_works" >&6; }
27562 case "$gl_cv_func_rmdir_works" in
27563 *yes) ;;
27564 *)
27565 REPLACE_RMDIR=1
27566 ;;
27567 esac
27568
27569 if test $REPLACE_RMDIR = 1; then
27570
27571
27572
27573
27574
27575
27576
27577
27578 gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext"
27579
27580 fi
27581
27582
27583
27584
27585
27586 GNULIB_RMDIR=1
27587
27588
27589
27590
27591
27592 $as_echo "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
27593
27594
27595
27596
27597
27598
27599
27600
27601 if test $ac_cv_func_setenv = no; then
27602 HAVE_SETENV=0
27603 else
27604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
27605 $as_echo_n "checking whether setenv validates arguments... " >&6; }
27606 if ${gl_cv_func_setenv_works+:} false; then :
27607 $as_echo_n "(cached) " >&6
27608 else
27609 if test "$cross_compiling" = yes; then :
27610 case "$host_os" in
27611 # Guess yes on glibc systems.
27612 *-gnu* | gnu*) gl_cv_func_setenv_works="guessing yes" ;;
27613 # Guess yes on musl systems.
27614 *-musl*) gl_cv_func_setenv_works="guessing yes" ;;
27615 # If we don't know, obey --enable-cross-guesses.
27616 *) gl_cv_func_setenv_works="$gl_cross_guess_normal" ;;
27617 esac
27618
27619 else
27620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27621 /* end confdefs.h. */
27622
27623 #include <stdlib.h>
27624 #include <errno.h>
27625 #include <string.h>
27626
27627 int
27628 main ()
27629 {
27630
27631 int result = 0;
27632 {
27633 if (setenv ("", "", 0) != -1)
27634 result |= 1;
27635 else if (errno != EINVAL)
27636 result |= 2;
27637 }
27638 {
27639 if (setenv ("a", "=", 1) != 0)
27640 result |= 4;
27641 else if (strcmp (getenv ("a"), "=") != 0)
27642 result |= 8;
27643 }
27644 return result;
27645
27646 ;
27647 return 0;
27648 }
27649 _ACEOF
27650 if ac_fn_c_try_run "$LINENO"; then :
27651 gl_cv_func_setenv_works=yes
27652 else
27653 gl_cv_func_setenv_works=no
27654 fi
27655 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27656 conftest.$ac_objext conftest.beam conftest.$ac_ext
27657 fi
27658
27659 fi
27660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
27661 $as_echo "$gl_cv_func_setenv_works" >&6; }
27662 case "$gl_cv_func_setenv_works" in
27663 *yes) ;;
27664 *)
27665 REPLACE_SETENV=1
27666 ;;
27667 esac
27668 fi
27669
27670 if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
27671
27672
27673
27674
27675
27676
27677
27678
27679 gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext"
27680
27681 fi
27682
27683
27684
27685
27686
27687 GNULIB_SETENV=1
27688
27689
27690
27691
27692
27693 $as_echo "#define GNULIB_TEST_SETENV 1" >>confdefs.h
27694
27695
27696
27697
27698
27699
27700
27701
27702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (LC_ALL, NULL) is multithread-safe" >&5
27703 $as_echo_n "checking whether setlocale (LC_ALL, NULL) is multithread-safe... " >&6; }
27704 if ${gl_cv_func_setlocale_null_all_mtsafe+:} false; then :
27705 $as_echo_n "(cached) " >&6
27706 else
27707 case "$host_os" in
27708 # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin.
27709 *-musl* | darwin* | freebsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*)
27710 gl_cv_func_setlocale_null_all_mtsafe=no ;;
27711 # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows.
27712 *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*)
27713 gl_cv_func_setlocale_null_all_mtsafe=yes ;;
27714 # If we don't know, obey --enable-cross-guesses.
27715 *)
27716 gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;;
27717 esac
27718
27719 fi
27720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_all_mtsafe" >&5
27721 $as_echo "$gl_cv_func_setlocale_null_all_mtsafe" >&6; }
27722 case "$host_os" in
27723 mingw*) ;;
27724 *)
27725 if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
27726 gl_cv_func_setlocale_null_all_mtsafe="trivially yes"
27727 fi
27728 ;;
27729 esac
27730 case "$gl_cv_func_setlocale_null_all_mtsafe" in
27731 *yes) SETLOCALE_NULL_ALL_MTSAFE=1 ;;
27732 *) SETLOCALE_NULL_ALL_MTSAFE=0 ;;
27733 esac
27734
27735 cat >>confdefs.h <<_ACEOF
27736 #define SETLOCALE_NULL_ALL_MTSAFE $SETLOCALE_NULL_ALL_MTSAFE
27737 _ACEOF
27738
27739
27740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (category, NULL) is multithread-safe" >&5
27741 $as_echo_n "checking whether setlocale (category, NULL) is multithread-safe... " >&6; }
27742 if ${gl_cv_func_setlocale_null_one_mtsafe+:} false; then :
27743 $as_echo_n "(cached) " >&6
27744 else
27745 case "$host_os" in
27746 # Guess no on OpenBSD, AIX.
27747 openbsd* | aix*)
27748 gl_cv_func_setlocale_null_one_mtsafe=no ;;
27749 # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows.
27750 *-gnu* | gnu* | *-musl* | darwin* | freebsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
27751 gl_cv_func_setlocale_null_one_mtsafe=yes ;;
27752 # If we don't know, obey --enable-cross-guesses.
27753 *)
27754 gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;;
27755 esac
27756
27757 fi
27758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_one_mtsafe" >&5
27759 $as_echo "$gl_cv_func_setlocale_null_one_mtsafe" >&6; }
27760 case "$host_os" in
27761 mingw*) ;;
27762 *)
27763 if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
27764 gl_cv_func_setlocale_null_one_mtsafe="trivially yes"
27765 fi
27766 ;;
27767 esac
27768 case "$gl_cv_func_setlocale_null_one_mtsafe" in
27769 *yes) SETLOCALE_NULL_ONE_MTSAFE=1 ;;
27770 *) SETLOCALE_NULL_ONE_MTSAFE=0 ;;
27771 esac
27772
27773 cat >>confdefs.h <<_ACEOF
27774 #define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE
27775 _ACEOF
27776
27777
27778 if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
27779 case "$host_os" in
27780 mingw*) LIB_SETLOCALE_NULL= ;;
27781 *)
27782
27783
27784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
27785 $as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
27786 if ${gl_cv_have_weak+:} false; then :
27787 $as_echo_n "(cached) " >&6
27788 else
27789 gl_cv_have_weak=no
27790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27791 /* end confdefs.h. */
27792 extern void xyzzy ();
27793 #pragma weak xyzzy
27794 int
27795 main ()
27796 {
27797 xyzzy();
27798 ;
27799 return 0;
27800 }
27801 _ACEOF
27802 if ac_fn_c_try_link "$LINENO"; then :
27803 gl_cv_have_weak=maybe
27804 fi
27805 rm -f core conftest.err conftest.$ac_objext \
27806 conftest$ac_exeext conftest.$ac_ext
27807 if test $gl_cv_have_weak = maybe; then
27808 if test "$cross_compiling" = yes; then :
27809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27810 /* end confdefs.h. */
27811 #ifdef __ELF__
27812 Extensible Linking Format
27813 #endif
27814
27815 _ACEOF
27816 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27817 $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
27818 gl_cv_have_weak="guessing yes"
27819 else
27820 gl_cv_have_weak="guessing no"
27821 fi
27822 rm -f conftest*
27823
27824
27825 else
27826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27827 /* end confdefs.h. */
27828
27829 #include <stdio.h>
27830 #pragma weak fputs
27831 int main ()
27832 {
27833 return (fputs == NULL);
27834 }
27835 _ACEOF
27836 if ac_fn_c_try_run "$LINENO"; then :
27837 gl_cv_have_weak=yes
27838 else
27839 gl_cv_have_weak=no
27840 fi
27841 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27842 conftest.$ac_objext conftest.beam conftest.$ac_ext
27843 fi
27844
27845 fi
27846 case " $LDFLAGS " in
27847 *" -static "*) gl_cv_have_weak=no ;;
27848 esac
27849 case "$gl_cv_have_weak" in
27850 *yes)
27851 case "$host_os" in
27852 freebsd* | dragonfly*)
27853 : > conftest1.c
27854 $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
27855 cat <<EOF > conftest2.c
27856 #include <pthread.h>
27857 #pragma weak pthread_mutexattr_gettype
27858 int main ()
27859 {
27860 return (pthread_mutexattr_gettype != NULL);
27861 }
27862 EOF
27863 $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
27864 || gl_cv_have_weak=no
27865 rm -f conftest1.c libempty.so conftest2.c conftest
27866 ;;
27867 esac
27868 ;;
27869 esac
27870
27871 fi
27872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
27873 $as_echo "$gl_cv_have_weak" >&6; }
27874 case "$gl_cv_have_weak" in
27875 *yes)
27876
27877 $as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
27878
27879 ;;
27880 esac
27881
27882 case "$gl_cv_have_weak" in
27883 *yes) LIB_SETLOCALE_NULL= ;;
27884 *) LIB_SETLOCALE_NULL="$LIBPTHREAD" ;;
27885 esac
27886 ;;
27887 esac
27888 else
27889 LIB_SETLOCALE_NULL=
27890 fi
27891
27892
27893 if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
27894
27895
27896
27897
27898
27899
27900
27901
27902 gl_LIBOBJS="$gl_LIBOBJS setlocale-lock.$ac_objext"
27903
27904
27905
27906
27907 CFLAG_VISIBILITY=
27908 HAVE_VISIBILITY=0
27909 if test -n "$GCC"; then
27910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
27911 $as_echo_n "checking whether the -Werror option is usable... " >&6; }
27912 if ${gl_cv_cc_vis_werror+:} false; then :
27913 $as_echo_n "(cached) " >&6
27914 else
27915 gl_save_CFLAGS="$CFLAGS"
27916 CFLAGS="$CFLAGS -Werror"
27917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27918 /* end confdefs.h. */
27919
27920 int
27921 main ()
27922 {
27923
27924 ;
27925 return 0;
27926 }
27927 _ACEOF
27928 if ac_fn_c_try_compile "$LINENO"; then :
27929 gl_cv_cc_vis_werror=yes
27930 else
27931 gl_cv_cc_vis_werror=no
27932 fi
27933 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27934 CFLAGS="$gl_save_CFLAGS"
27935
27936 fi
27937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
27938 $as_echo "$gl_cv_cc_vis_werror" >&6; }
27939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
27940 $as_echo_n "checking for simple visibility declarations... " >&6; }
27941 if ${gl_cv_cc_visibility+:} false; then :
27942 $as_echo_n "(cached) " >&6
27943 else
27944 gl_save_CFLAGS="$CFLAGS"
27945 CFLAGS="$CFLAGS -fvisibility=hidden"
27946 if test $gl_cv_cc_vis_werror = yes; then
27947 CFLAGS="$CFLAGS -Werror"
27948 fi
27949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27950 /* end confdefs.h. */
27951 extern __attribute__((__visibility__("hidden"))) int hiddenvar;
27952 extern __attribute__((__visibility__("default"))) int exportedvar;
27953 extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
27954 extern __attribute__((__visibility__("default"))) int exportedfunc (void);
27955 void dummyfunc (void) {}
27956
27957 int
27958 main ()
27959 {
27960
27961 ;
27962 return 0;
27963 }
27964 _ACEOF
27965 if ac_fn_c_try_compile "$LINENO"; then :
27966 gl_cv_cc_visibility=yes
27967 else
27968 gl_cv_cc_visibility=no
27969 fi
27970 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27971 CFLAGS="$gl_save_CFLAGS"
27972
27973 fi
27974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
27975 $as_echo "$gl_cv_cc_visibility" >&6; }
27976 if test $gl_cv_cc_visibility = yes; then
27977 CFLAG_VISIBILITY="-fvisibility=hidden"
27978 HAVE_VISIBILITY=1
27979 fi
27980 fi
27981
27982
27983
27984 cat >>confdefs.h <<_ACEOF
27985 #define HAVE_VISIBILITY $HAVE_VISIBILITY
27986 _ACEOF
27987
27988
27989
27990 fi
27991
27992
27993
27994
27995
27996 GNULIB_SETLOCALE_NULL=1
27997
27998
27999
28000
28001
28002 $as_echo "#define GNULIB_TEST_SETLOCALE_NULL 1" >>confdefs.h
28003
28004
28005
28006
28007
28008
28009
28010
28011
28012
28013
28014
28015
28016
28017 if test $gl_cv_have_include_next = yes; then
28018 gl_cv_next_signal_h='<'signal.h'>'
28019 else
28020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
28021 $as_echo_n "checking absolute name of <signal.h>... " >&6; }
28022 if ${gl_cv_next_signal_h+:} false; then :
28023 $as_echo_n "(cached) " >&6
28024 else
28025
28026
28027
28028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28029 /* end confdefs.h. */
28030 #include <signal.h>
28031 _ACEOF
28032 case "$host_os" in
28033 aix*) gl_absname_cpp="$ac_cpp -C" ;;
28034 *) gl_absname_cpp="$ac_cpp" ;;
28035 esac
28036
28037 case "$host_os" in
28038 mingw*)
28039 gl_dirsep_regex='[/\\]'
28040 ;;
28041 *)
28042 gl_dirsep_regex='\/'
28043 ;;
28044 esac
28045 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28046 gl_header_literal_regex=`echo 'signal.h' \
28047 | sed -e "$gl_make_literal_regex_sed"`
28048 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28049 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28050 s|^/[^/]|//&|
28051 p
28052 q
28053 }'
28054
28055 gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28056 sed -n "$gl_absolute_header_sed"`
28057
28058 gl_header=$gl_cv_absolute_signal_h
28059 gl_cv_next_signal_h='"'$gl_header'"'
28060
28061
28062 fi
28063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
28064 $as_echo "$gl_cv_next_signal_h" >&6; }
28065 fi
28066 NEXT_SIGNAL_H=$gl_cv_next_signal_h
28067
28068 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28069 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28070 gl_next_as_first_directive='<'signal.h'>'
28071 else
28072 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28073 gl_next_as_first_directive=$gl_cv_next_signal_h
28074 fi
28075 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
28076
28077
28078
28079
28080
28081 # AIX declares sig_atomic_t to already include volatile, and C89 compilers
28082 # then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
28083 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
28084 #include <signal.h>
28085
28086 "
28087 if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes; then :
28088
28089 else
28090 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
28091 fi
28092
28093
28094
28095
28096
28097
28098
28099 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
28100 #include <signal.h>
28101
28102 "
28103 if test "x$ac_cv_type_sighandler_t" = xyes; then :
28104
28105 else
28106 HAVE_SIGHANDLER_T=0
28107 fi
28108
28109
28110
28111
28112
28113
28114
28115
28116 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
28117 /* <sys/types.h> is not needed according to POSIX, but the
28118 <sys/socket.h> in i386-unknown-freebsd4.10 and
28119 powerpc-apple-darwin5.5 required it. */
28120 #include <sys/types.h>
28121 #if HAVE_SYS_SOCKET_H
28122 # include <sys/socket.h>
28123 #elif HAVE_WS2TCPIP_H
28124 # include <ws2tcpip.h>
28125 #endif
28126
28127 "
28128 if test "x$ac_cv_type_socklen_t" = xyes; then :
28129
28130 else
28131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
28132 $as_echo_n "checking for socklen_t equivalent... " >&6; }
28133 if ${gl_cv_socklen_t_equiv+:} false; then :
28134 $as_echo_n "(cached) " >&6
28135 else
28136 # Systems have either "struct sockaddr *" or
28137 # "void *" as the second argument to getpeername
28138 gl_cv_socklen_t_equiv=
28139 for arg2 in "struct sockaddr" void; do
28140 for t in int size_t "unsigned int" "long int" "unsigned long int"; do
28141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28142 /* end confdefs.h. */
28143 #include <sys/types.h>
28144 #include <sys/socket.h>
28145
28146 int getpeername (int, $arg2 *, $t *);
28147 int
28148 main ()
28149 {
28150 $t len;
28151 getpeername (0, 0, &len);
28152 ;
28153 return 0;
28154 }
28155 _ACEOF
28156 if ac_fn_c_try_compile "$LINENO"; then :
28157 gl_cv_socklen_t_equiv="$t"
28158 fi
28159 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28160 test "$gl_cv_socklen_t_equiv" != "" && break
28161 done
28162 test "$gl_cv_socklen_t_equiv" != "" && break
28163 done
28164 if test "$gl_cv_socklen_t_equiv" = ""; then
28165 as_fn_error $? "Cannot find a type to use in place of socklen_t" "$LINENO" 5
28166 fi
28167
28168 fi
28169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
28170 $as_echo "$gl_cv_socklen_t_equiv" >&6; }
28171
28172 cat >>confdefs.h <<_ACEOF
28173 #define socklen_t $gl_cv_socklen_t_equiv
28174 _ACEOF
28175
28176 fi
28177
28178
28179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
28180 $as_echo_n "checking for ssize_t... " >&6; }
28181 if ${gt_cv_ssize_t+:} false; then :
28182 $as_echo_n "(cached) " >&6
28183 else
28184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28185 /* end confdefs.h. */
28186 #include <sys/types.h>
28187 int
28188 main ()
28189 {
28190 int x = sizeof (ssize_t *) + sizeof (ssize_t);
28191 return !x;
28192 ;
28193 return 0;
28194 }
28195 _ACEOF
28196 if ac_fn_c_try_compile "$LINENO"; then :
28197 gt_cv_ssize_t=yes
28198 else
28199 gt_cv_ssize_t=no
28200 fi
28201 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28202 fi
28203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
28204 $as_echo "$gt_cv_ssize_t" >&6; }
28205 if test $gt_cv_ssize_t = no; then
28206
28207 $as_echo "#define ssize_t int" >>confdefs.h
28208
28209 fi
28210
28211
28212
28213
28214
28215 case "$host_os" in
28216 mingw*)
28217 ;;
28218 *)
28219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
28220 $as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
28221 if ${gl_cv_func_stat_file_slash+:} false; then :
28222 $as_echo_n "(cached) " >&6
28223 else
28224 touch conftest.tmp
28225 # Assume that if we have lstat, we can also check symlinks.
28226 if test $ac_cv_func_lstat = yes; then
28227 ln -s conftest.tmp conftest.lnk
28228 fi
28229 if test "$cross_compiling" = yes; then :
28230 case "$host_os" in
28231 # Guess yes on Linux systems.
28232 linux-* | linux) gl_cv_func_stat_file_slash="guessing yes" ;;
28233 # Guess yes on glibc systems.
28234 *-gnu* | gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
28235 # If we don't know, obey --enable-cross-guesses.
28236 *) gl_cv_func_stat_file_slash="$gl_cross_guess_normal" ;;
28237 esac
28238
28239 else
28240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28241 /* end confdefs.h. */
28242 #include <sys/stat.h>
28243
28244 int
28245 main ()
28246 {
28247 int result = 0;
28248 struct stat st;
28249 if (!stat ("conftest.tmp/", &st))
28250 result |= 1;
28251 #if HAVE_LSTAT
28252 if (!stat ("conftest.lnk/", &st))
28253 result |= 2;
28254 #endif
28255 return result;
28256
28257 ;
28258 return 0;
28259 }
28260 _ACEOF
28261 if ac_fn_c_try_run "$LINENO"; then :
28262 gl_cv_func_stat_file_slash=yes
28263 else
28264 gl_cv_func_stat_file_slash=no
28265 fi
28266 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28267 conftest.$ac_objext conftest.beam conftest.$ac_ext
28268 fi
28269
28270 rm -f conftest.tmp conftest.lnk
28271 fi
28272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
28273 $as_echo "$gl_cv_func_stat_file_slash" >&6; }
28274 case $gl_cv_func_stat_file_slash in
28275 *no)
28276 REPLACE_STAT=1
28277
28278 $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
28279 ;;
28280 esac
28281 case $host_os in
28282 solaris*)
28283 REPLACE_FSTAT=1 ;;
28284 esac
28285 ;;
28286 esac
28287
28288 if test $REPLACE_STAT = 1; then
28289
28290
28291
28292
28293
28294
28295
28296
28297 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
28298
28299 case "$host_os" in
28300 mingw*)
28301
28302
28303
28304
28305
28306
28307
28308
28309 gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
28310
28311 ;;
28312 esac
28313
28314
28315
28316 :
28317
28318 fi
28319
28320
28321
28322
28323
28324 GNULIB_STAT=1
28325
28326
28327
28328
28329
28330 $as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h
28331
28332
28333
28334
28335
28336
28337
28338 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>
28339 #include <sys/stat.h>
28340 "
28341 if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes; then :
28342
28343 cat >>confdefs.h <<_ACEOF
28344 #define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
28345 _ACEOF
28346
28347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
28348 $as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
28349 if ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+:} false; then :
28350 $as_echo_n "(cached) " >&6
28351 else
28352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28353 /* end confdefs.h. */
28354
28355 #include <sys/types.h>
28356 #include <sys/stat.h>
28357 #if HAVE_SYS_TIME_H
28358 # include <sys/time.h>
28359 #endif
28360 #include <time.h>
28361 struct timespec ts;
28362 struct stat st;
28363
28364 int
28365 main ()
28366 {
28367
28368 st.st_atim = ts;
28369
28370 ;
28371 return 0;
28372 }
28373 _ACEOF
28374 if ac_fn_c_try_compile "$LINENO"; then :
28375 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
28376 else
28377 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
28378 fi
28379 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28380 fi
28381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
28382 $as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
28383 if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
28384
28385 $as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
28386
28387 fi
28388 else
28389 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>
28390 #include <sys/stat.h>
28391 "
28392 if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes; then :
28393
28394 cat >>confdefs.h <<_ACEOF
28395 #define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
28396 _ACEOF
28397
28398
28399 else
28400 ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
28401 #include <sys/stat.h>
28402 "
28403 if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes; then :
28404
28405 cat >>confdefs.h <<_ACEOF
28406 #define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
28407 _ACEOF
28408
28409
28410 else
28411 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>
28412 #include <sys/stat.h>
28413 "
28414 if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes; then :
28415
28416 cat >>confdefs.h <<_ACEOF
28417 #define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
28418 _ACEOF
28419
28420
28421 fi
28422
28423 fi
28424
28425 fi
28426
28427 fi
28428
28429
28430
28431
28432
28433 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>
28434 #include <sys/stat.h>
28435 "
28436 if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes; then :
28437
28438 cat >>confdefs.h <<_ACEOF
28439 #define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
28440 _ACEOF
28441
28442
28443 else
28444 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
28445 #include <sys/stat.h>
28446 "
28447 if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes; then :
28448
28449 cat >>confdefs.h <<_ACEOF
28450 #define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
28451 _ACEOF
28452
28453
28454 else
28455 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>
28456 #include <sys/stat.h>
28457 "
28458 if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes; then :
28459
28460 cat >>confdefs.h <<_ACEOF
28461 #define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
28462 _ACEOF
28463
28464
28465 fi
28466
28467 fi
28468
28469 fi
28470
28471
28472
28473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
28474 $as_echo_n "checking for working stdalign.h... " >&6; }
28475 if ${gl_cv_header_working_stdalign_h+:} false; then :
28476 $as_echo_n "(cached) " >&6
28477 else
28478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28479 /* end confdefs.h. */
28480 #include <stdalign.h>
28481 #include <stddef.h>
28482
28483 /* Test that alignof yields a result consistent with offsetof.
28484 This catches GCC bug 52023
28485 <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
28486 #ifdef __cplusplus
28487 template <class t> struct alignof_helper { char a; t b; };
28488 # define ao(type) offsetof (alignof_helper<type>, b)
28489 #else
28490 # define ao(type) offsetof (struct { char a; type b; }, b)
28491 #endif
28492 char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
28493 char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
28494 char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
28495
28496 /* Test _Alignas only on platforms where gnulib can help. */
28497 #if \
28498 ((defined __cplusplus && 201103 <= __cplusplus) \
28499 || (defined __APPLE__ && defined __MACH__ \
28500 ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
28501 : __GNUC__) \
28502 || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \
28503 || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__ \
28504 || 1300 <= _MSC_VER)
28505 struct alignas_test { char c; char alignas (8) alignas_8; };
28506 char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
28507 ? 1 : -1];
28508 #endif
28509
28510 int
28511 main ()
28512 {
28513
28514 ;
28515 return 0;
28516 }
28517 _ACEOF
28518 if ac_fn_c_try_compile "$LINENO"; then :
28519 gl_cv_header_working_stdalign_h=yes
28520 else
28521 gl_cv_header_working_stdalign_h=no
28522 fi
28523 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28524 fi
28525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
28526 $as_echo "$gl_cv_header_working_stdalign_h" >&6; }
28527
28528 if test $gl_cv_header_working_stdalign_h = yes; then
28529 STDALIGN_H=''
28530 else
28531 STDALIGN_H='stdalign.h'
28532 fi
28533
28534
28535 if test -n "$STDALIGN_H"; then
28536 GL_GENERATE_STDALIGN_H_TRUE=
28537 GL_GENERATE_STDALIGN_H_FALSE='#'
28538 else
28539 GL_GENERATE_STDALIGN_H_TRUE='#'
28540 GL_GENERATE_STDALIGN_H_FALSE=
28541 fi
28542
28543
28544
28545
28546
28547
28548 if test "$ac_cv_header_stdbool_h" = yes; then
28549 case "$host_os" in
28550 solaris*)
28551 if test -z "$GCC"; then
28552 STDBOOL_H='stdbool.h'
28553 else
28554 STDBOOL_H=''
28555 fi
28556 ;;
28557 *)
28558 STDBOOL_H=''
28559 ;;
28560 esac
28561 else
28562 STDBOOL_H='stdbool.h'
28563 fi
28564
28565 if test -n "$STDBOOL_H"; then
28566 GL_GENERATE_STDBOOL_H_TRUE=
28567 GL_GENERATE_STDBOOL_H_FALSE='#'
28568 else
28569 GL_GENERATE_STDBOOL_H_TRUE='#'
28570 GL_GENERATE_STDBOOL_H_FALSE=
28571 fi
28572
28573
28574 if test "$ac_cv_type__Bool" = yes; then
28575 HAVE__BOOL=1
28576 else
28577 HAVE__BOOL=0
28578 fi
28579
28580
28581
28582
28583
28584
28585
28586
28587 STDDEF_H=
28588
28589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5
28590 $as_echo_n "checking for good max_align_t... " >&6; }
28591 if ${gl_cv_type_max_align_t+:} false; then :
28592 $as_echo_n "(cached) " >&6
28593 else
28594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28595 /* end confdefs.h. */
28596 #include <stddef.h>
28597 unsigned int s = sizeof (max_align_t);
28598 #if defined __GNUC__ || defined __clang__ || defined __IBM__ALIGNOF__
28599 int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
28600 int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1];
28601 #endif
28602 typedef struct { char a; max_align_t b; } max_helper;
28603 typedef struct { char a; long b; } long_helper;
28604 typedef struct { char a; double b; } double_helper;
28605 typedef struct { char a; long double b; } long_double_helper;
28606 int check3[2 * (offsetof (long_helper, b) <= offsetof (max_helper, b)) - 1];
28607 int check4[2 * (offsetof (double_helper, b) <= offsetof (max_helper, b)) - 1];
28608 int check5[2 * (offsetof (long_double_helper, b) <= offsetof (max_helper, b)) - 1];
28609
28610 int
28611 main ()
28612 {
28613
28614 ;
28615 return 0;
28616 }
28617 _ACEOF
28618 if ac_fn_c_try_compile "$LINENO"; then :
28619 gl_cv_type_max_align_t=yes
28620 else
28621 gl_cv_type_max_align_t=no
28622 fi
28623 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28624
28625 fi
28626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5
28627 $as_echo "$gl_cv_type_max_align_t" >&6; }
28628 if test $gl_cv_type_max_align_t = no; then
28629 HAVE_MAX_ALIGN_T=0
28630 STDDEF_H=stddef.h
28631 fi
28632
28633 if test $gt_cv_c_wchar_t = no; then
28634 HAVE_WCHAR_T=0
28635 STDDEF_H=stddef.h
28636 fi
28637
28638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
28639 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
28640 if ${gl_cv_decl_null_works+:} false; then :
28641 $as_echo_n "(cached) " >&6
28642 else
28643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28644 /* end confdefs.h. */
28645 #include <stddef.h>
28646 int test[2 * (sizeof NULL == sizeof (void *)) -1];
28647
28648 int
28649 main ()
28650 {
28651
28652 ;
28653 return 0;
28654 }
28655 _ACEOF
28656 if ac_fn_c_try_compile "$LINENO"; then :
28657 gl_cv_decl_null_works=yes
28658 else
28659 gl_cv_decl_null_works=no
28660 fi
28661 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28662 fi
28663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
28664 $as_echo "$gl_cv_decl_null_works" >&6; }
28665 if test $gl_cv_decl_null_works = no; then
28666 REPLACE_NULL=1
28667 STDDEF_H=stddef.h
28668 fi
28669
28670
28671 if test -n "$STDDEF_H"; then
28672 GL_GENERATE_STDDEF_H_TRUE=
28673 GL_GENERATE_STDDEF_H_FALSE='#'
28674 else
28675 GL_GENERATE_STDDEF_H_TRUE='#'
28676 GL_GENERATE_STDDEF_H_FALSE=
28677 fi
28678
28679 if test -n "$STDDEF_H"; then
28680
28681
28682
28683
28684
28685
28686
28687
28688 if test $gl_cv_have_include_next = yes; then
28689 gl_cv_next_stddef_h='<'stddef.h'>'
28690 else
28691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
28692 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
28693 if ${gl_cv_next_stddef_h+:} false; then :
28694 $as_echo_n "(cached) " >&6
28695 else
28696
28697
28698
28699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28700 /* end confdefs.h. */
28701 #include <stddef.h>
28702 _ACEOF
28703 case "$host_os" in
28704 aix*) gl_absname_cpp="$ac_cpp -C" ;;
28705 *) gl_absname_cpp="$ac_cpp" ;;
28706 esac
28707
28708 case "$host_os" in
28709 mingw*)
28710 gl_dirsep_regex='[/\\]'
28711 ;;
28712 *)
28713 gl_dirsep_regex='\/'
28714 ;;
28715 esac
28716 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28717 gl_header_literal_regex=`echo 'stddef.h' \
28718 | sed -e "$gl_make_literal_regex_sed"`
28719 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28720 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28721 s|^/[^/]|//&|
28722 p
28723 q
28724 }'
28725
28726 gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28727 sed -n "$gl_absolute_header_sed"`
28728
28729 gl_header=$gl_cv_absolute_stddef_h
28730 gl_cv_next_stddef_h='"'$gl_header'"'
28731
28732
28733 fi
28734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
28735 $as_echo "$gl_cv_next_stddef_h" >&6; }
28736 fi
28737 NEXT_STDDEF_H=$gl_cv_next_stddef_h
28738
28739 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28740 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28741 gl_next_as_first_directive='<'stddef.h'>'
28742 else
28743 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28744 gl_next_as_first_directive=$gl_cv_next_stddef_h
28745 fi
28746 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
28747
28748
28749
28750
28751 fi
28752
28753
28754
28755
28756 $as_echo "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
28757
28758
28759
28760
28761
28762
28763
28764
28765
28766
28767 if test $gl_cv_have_include_next = yes; then
28768 gl_cv_next_stdio_h='<'stdio.h'>'
28769 else
28770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
28771 $as_echo_n "checking absolute name of <stdio.h>... " >&6; }
28772 if ${gl_cv_next_stdio_h+:} false; then :
28773 $as_echo_n "(cached) " >&6
28774 else
28775
28776
28777
28778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28779 /* end confdefs.h. */
28780 #include <stdio.h>
28781 _ACEOF
28782 case "$host_os" in
28783 aix*) gl_absname_cpp="$ac_cpp -C" ;;
28784 *) gl_absname_cpp="$ac_cpp" ;;
28785 esac
28786
28787 case "$host_os" in
28788 mingw*)
28789 gl_dirsep_regex='[/\\]'
28790 ;;
28791 *)
28792 gl_dirsep_regex='\/'
28793 ;;
28794 esac
28795 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28796 gl_header_literal_regex=`echo 'stdio.h' \
28797 | sed -e "$gl_make_literal_regex_sed"`
28798 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28799 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28800 s|^/[^/]|//&|
28801 p
28802 q
28803 }'
28804
28805 gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28806 sed -n "$gl_absolute_header_sed"`
28807
28808 gl_header=$gl_cv_absolute_stdio_h
28809 gl_cv_next_stdio_h='"'$gl_header'"'
28810
28811
28812 fi
28813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
28814 $as_echo "$gl_cv_next_stdio_h" >&6; }
28815 fi
28816 NEXT_STDIO_H=$gl_cv_next_stdio_h
28817
28818 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28819 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28820 gl_next_as_first_directive='<'stdio.h'>'
28821 else
28822 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28823 gl_next_as_first_directive=$gl_cv_next_stdio_h
28824 fi
28825 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
28826
28827
28828
28829
28830
28831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
28832 $as_echo_n "checking which flavor of printf attribute matches inttypes macros... " >&6; }
28833 if ${gl_cv_func_printf_attribute_flavor+:} false; then :
28834 $as_echo_n "(cached) " >&6
28835 else
28836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28837 /* end confdefs.h. */
28838
28839 #define __STDC_FORMAT_MACROS 1
28840 #include <stdio.h>
28841 #include <inttypes.h>
28842 /* For non-mingw systems, compilation will trivially succeed.
28843 For mingw, compilation will succeed for older mingw (system
28844 printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
28845 #if (defined _WIN32 && ! defined __CYGWIN__) && \
28846 (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
28847 extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
28848 #endif
28849
28850 int
28851 main ()
28852 {
28853
28854 ;
28855 return 0;
28856 }
28857 _ACEOF
28858 if ac_fn_c_try_compile "$LINENO"; then :
28859 gl_cv_func_printf_attribute_flavor=system
28860 else
28861 gl_cv_func_printf_attribute_flavor=gnu
28862 fi
28863 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28864 fi
28865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
28866 $as_echo "$gl_cv_func_printf_attribute_flavor" >&6; }
28867 if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
28868
28869 $as_echo "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
28870
28871 fi
28872
28873 GNULIB_FSCANF=1
28874
28875
28876 cat >>confdefs.h <<_ACEOF
28877 #define GNULIB_FSCANF 1
28878 _ACEOF
28879
28880
28881 GNULIB_SCANF=1
28882
28883
28884 cat >>confdefs.h <<_ACEOF
28885 #define GNULIB_SCANF 1
28886 _ACEOF
28887
28888
28889 GNULIB_FGETC=1
28890 GNULIB_GETC=1
28891 GNULIB_GETCHAR=1
28892 GNULIB_FGETS=1
28893 GNULIB_FREAD=1
28894
28895
28896 GNULIB_FPRINTF=1
28897 GNULIB_PRINTF=1
28898 GNULIB_VFPRINTF=1
28899 GNULIB_VPRINTF=1
28900 GNULIB_FPUTC=1
28901 GNULIB_PUTC=1
28902 GNULIB_PUTCHAR=1
28903 GNULIB_FPUTS=1
28904 GNULIB_PUTS=1
28905 GNULIB_FWRITE=1
28906
28907
28908
28909
28910
28911
28912
28913
28914
28915
28916 if test $ac_cv_have_decl_fcloseall = no; then
28917 HAVE_DECL_FCLOSEALL=0
28918 fi
28919
28920
28921
28922
28923
28924
28925
28926
28927
28928
28929
28930 if test $gl_cv_have_include_next = yes; then
28931 gl_cv_next_stdlib_h='<'stdlib.h'>'
28932 else
28933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
28934 $as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
28935 if ${gl_cv_next_stdlib_h+:} false; then :
28936 $as_echo_n "(cached) " >&6
28937 else
28938
28939
28940
28941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28942 /* end confdefs.h. */
28943 #include <stdlib.h>
28944 _ACEOF
28945 case "$host_os" in
28946 aix*) gl_absname_cpp="$ac_cpp -C" ;;
28947 *) gl_absname_cpp="$ac_cpp" ;;
28948 esac
28949
28950 case "$host_os" in
28951 mingw*)
28952 gl_dirsep_regex='[/\\]'
28953 ;;
28954 *)
28955 gl_dirsep_regex='\/'
28956 ;;
28957 esac
28958 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28959 gl_header_literal_regex=`echo 'stdlib.h' \
28960 | sed -e "$gl_make_literal_regex_sed"`
28961 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28962 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28963 s|^/[^/]|//&|
28964 p
28965 q
28966 }'
28967
28968 gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28969 sed -n "$gl_absolute_header_sed"`
28970
28971 gl_header=$gl_cv_absolute_stdlib_h
28972 gl_cv_next_stdlib_h='"'$gl_header'"'
28973
28974
28975 fi
28976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
28977 $as_echo "$gl_cv_next_stdlib_h" >&6; }
28978 fi
28979 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
28980
28981 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28982 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28983 gl_next_as_first_directive='<'stdlib.h'>'
28984 else
28985 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28986 gl_next_as_first_directive=$gl_cv_next_stdlib_h
28987 fi
28988 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
28989
28990
28991
28992
28993
28994
28995
28996
28997
28998
28999
29000
29001 if test $ac_cv_have_decl_ecvt = no; then
29002 HAVE_DECL_ECVT=0
29003 fi
29004
29005 if test $ac_cv_have_decl_fcvt = no; then
29006 HAVE_DECL_FCVT=0
29007 fi
29008
29009 if test $ac_cv_have_decl_gcvt = no; then
29010 HAVE_DECL_GCVT=0
29011 fi
29012
29013
29014
29015
29016
29017 for ac_func in strchrnul
29018 do :
29019 ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
29020 if test "x$ac_cv_func_strchrnul" = xyes; then :
29021 cat >>confdefs.h <<_ACEOF
29022 #define HAVE_STRCHRNUL 1
29023 _ACEOF
29024
29025 fi
29026 done
29027
29028 if test $ac_cv_func_strchrnul = no; then
29029 HAVE_STRCHRNUL=0
29030 else
29031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5
29032 $as_echo_n "checking whether strchrnul works... " >&6; }
29033 if ${gl_cv_func_strchrnul_works+:} false; then :
29034 $as_echo_n "(cached) " >&6
29035 else
29036 if test "$cross_compiling" = yes; then :
29037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29038 /* end confdefs.h. */
29039
29040 #if defined __CYGWIN__
29041 #include <cygwin/version.h>
29042 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9)
29043 Lucky user
29044 #endif
29045 #else
29046 Lucky user
29047 #endif
29048
29049 _ACEOF
29050 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
29051 $EGREP "Lucky user" >/dev/null 2>&1; then :
29052 gl_cv_func_strchrnul_works="guessing yes"
29053 else
29054 gl_cv_func_strchrnul_works="guessing no"
29055 fi
29056 rm -f conftest*
29057
29058
29059 else
29060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29061 /* end confdefs.h. */
29062
29063 #include <string.h> /* for strchrnul */
29064
29065 int
29066 main ()
29067 {
29068 const char *buf = "a";
29069 return strchrnul (buf, 'b') != buf + 1;
29070
29071 ;
29072 return 0;
29073 }
29074 _ACEOF
29075 if ac_fn_c_try_run "$LINENO"; then :
29076 gl_cv_func_strchrnul_works=yes
29077 else
29078 gl_cv_func_strchrnul_works=no
29079 fi
29080 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29081 conftest.$ac_objext conftest.beam conftest.$ac_ext
29082 fi
29083
29084
29085 fi
29086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strchrnul_works" >&5
29087 $as_echo "$gl_cv_func_strchrnul_works" >&6; }
29088 case "$gl_cv_func_strchrnul_works" in
29089 *yes) ;;
29090 *) REPLACE_STRCHRNUL=1 ;;
29091 esac
29092 fi
29093
29094 if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
29095
29096
29097
29098
29099
29100
29101
29102
29103 gl_LIBOBJS="$gl_LIBOBJS strchrnul.$ac_objext"
29104
29105 :
29106 fi
29107
29108
29109
29110
29111
29112 GNULIB_STRCHRNUL=1
29113
29114
29115
29116
29117
29118 $as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
29119
29120
29121
29122
29123
29124
29125 if test $gl_cv_func_malloc_posix != yes; then
29126 REPLACE_STRDUP=1
29127 fi
29128
29129 if test $ac_cv_have_decl_strdup = no; then
29130 HAVE_DECL_STRDUP=0
29131 fi
29132
29133 if test $REPLACE_STRDUP = 1; then
29134
29135
29136
29137
29138
29139
29140
29141
29142 gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext"
29143
29144 :
29145 fi
29146
29147
29148
29149
29150
29151 GNULIB_STRDUP=1
29152
29153
29154
29155
29156
29157 $as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
29158
29159
29160
29161
29162
29163
29164
29165
29166
29167
29168 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
29169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
29170 $as_echo_n "checking for working strerror function... " >&6; }
29171 if ${gl_cv_func_working_strerror+:} false; then :
29172 $as_echo_n "(cached) " >&6
29173 else
29174 if test "$cross_compiling" = yes; then :
29175 case "$host_os" in
29176 # Guess yes on glibc systems.
29177 *-gnu* | gnu*) gl_cv_func_working_strerror="guessing yes" ;;
29178 # Guess yes on musl systems.
29179 *-musl*) gl_cv_func_working_strerror="guessing yes" ;;
29180 # If we don't know, obey --enable-cross-guesses.
29181 *) gl_cv_func_working_strerror="$gl_cross_guess_normal" ;;
29182 esac
29183
29184 else
29185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29186 /* end confdefs.h. */
29187 #include <string.h>
29188
29189 int
29190 main ()
29191 {
29192 if (!*strerror (-2)) return 1;
29193 ;
29194 return 0;
29195 }
29196 _ACEOF
29197 if ac_fn_c_try_run "$LINENO"; then :
29198 gl_cv_func_working_strerror=yes
29199 else
29200 gl_cv_func_working_strerror=no
29201 fi
29202 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29203 conftest.$ac_objext conftest.beam conftest.$ac_ext
29204 fi
29205
29206
29207 fi
29208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
29209 $as_echo "$gl_cv_func_working_strerror" >&6; }
29210 case "$gl_cv_func_working_strerror" in
29211 *yes) ;;
29212 *)
29213 REPLACE_STRERROR=1
29214 ;;
29215 esac
29216
29217 case "$gl_cv_func_strerror_r_works" in
29218 *no) REPLACE_STRERROR=1 ;;
29219 esac
29220
29221 else
29222 REPLACE_STRERROR=1
29223 fi
29224
29225 if test $REPLACE_STRERROR = 1; then
29226
29227
29228
29229
29230
29231
29232
29233
29234 gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
29235
29236 fi
29237
29238
29239 cat >>confdefs.h <<_ACEOF
29240 #define GNULIB_STRERROR 1
29241 _ACEOF
29242
29243
29244
29245
29246
29247
29248
29249 GNULIB_STRERROR=1
29250
29251
29252
29253
29254
29255 $as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
29256
29257
29258
29259
29260
29261 if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
29262
29263
29264
29265
29266
29267
29268
29269
29270 gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
29271
29272
29273
29274
29275
29276 if test $ac_cv_header_sys_socket_h != yes; then
29277 for ac_header in winsock2.h
29278 do :
29279 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
29280 if test "x$ac_cv_header_winsock2_h" = xyes; then :
29281 cat >>confdefs.h <<_ACEOF
29282 #define HAVE_WINSOCK2_H 1
29283 _ACEOF
29284
29285 fi
29286
29287 done
29288
29289 fi
29290 if test "$ac_cv_header_winsock2_h" = yes; then
29291 HAVE_WINSOCK2_H=1
29292 UNISTD_H_HAVE_WINSOCK2_H=1
29293 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
29294 else
29295 HAVE_WINSOCK2_H=0
29296 fi
29297
29298
29299 fi
29300
29301
29302
29303
29304
29305
29306
29307 if test $ac_cv_have_decl_strerror_r = no; then
29308 HAVE_DECL_STRERROR_R=0
29309 fi
29310
29311 if test $ac_cv_func_strerror_r = yes; then
29312 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
29313 if test $gl_cv_func_strerror_r_posix_signature = yes; then
29314 case "$gl_cv_func_strerror_r_works" in
29315 *no) REPLACE_STRERROR_R=1 ;;
29316 esac
29317 else
29318 REPLACE_STRERROR_R=1
29319 fi
29320 else
29321 REPLACE_STRERROR_R=1
29322 fi
29323 fi
29324
29325 if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then
29326
29327
29328
29329
29330
29331
29332
29333
29334 gl_LIBOBJS="$gl_LIBOBJS strerror_r.$ac_objext"
29335
29336
29337
29338
29339
29340
29341 fi
29342
29343
29344
29345
29346
29347 GNULIB_STRERROR_R=1
29348
29349
29350
29351
29352
29353 $as_echo "#define GNULIB_TEST_STRERROR_R 1" >>confdefs.h
29354
29355
29356
29357
29358
29359 cat >>confdefs.h <<_ACEOF
29360 #define GNULIB_STRERROR_R_POSIX 1
29361 _ACEOF
29362
29363
29364
29365
29366
29367
29368
29369
29370
29371
29372
29373
29374
29375
29376 if test $ac_cv_have_decl_strnlen = no; then
29377 HAVE_DECL_STRNLEN=0
29378 else
29379
29380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5
29381 $as_echo_n "checking for working strnlen... " >&6; }
29382 if ${ac_cv_func_strnlen_working+:} false; then :
29383 $as_echo_n "(cached) " >&6
29384 else
29385 if test "$cross_compiling" = yes; then :
29386 # Guess no on AIX systems, yes otherwise.
29387 case "$host_os" in
29388 aix*) ac_cv_func_strnlen_working=no;;
29389 *) ac_cv_func_strnlen_working=yes;;
29390 esac
29391 else
29392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29393 /* end confdefs.h. */
29394 $ac_includes_default
29395 int
29396 main ()
29397 {
29398
29399 #define S "foobar"
29400 #define S_LEN (sizeof S - 1)
29401
29402 /* At least one implementation is buggy: that of AIX 4.3 would
29403 give strnlen (S, 1) == 3. */
29404
29405 int i;
29406 for (i = 0; i < S_LEN + 1; ++i)
29407 {
29408 int expected = i <= S_LEN ? i : S_LEN;
29409 if (strnlen (S, i) != expected)
29410 return 1;
29411 }
29412 return 0;
29413
29414 ;
29415 return 0;
29416 }
29417 _ACEOF
29418 if ac_fn_c_try_run "$LINENO"; then :
29419 ac_cv_func_strnlen_working=yes
29420 else
29421 ac_cv_func_strnlen_working=no
29422 fi
29423 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29424 conftest.$ac_objext conftest.beam conftest.$ac_ext
29425 fi
29426
29427 fi
29428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5
29429 $as_echo "$ac_cv_func_strnlen_working" >&6; }
29430 test $ac_cv_func_strnlen_working = no && :
29431
29432
29433 if test $ac_cv_func_strnlen_working = no; then
29434 REPLACE_STRNLEN=1
29435 fi
29436 fi
29437
29438 if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
29439
29440
29441
29442
29443
29444
29445
29446
29447 gl_LIBOBJS="$gl_LIBOBJS strnlen.$ac_objext"
29448
29449 :
29450 fi
29451
29452
29453
29454
29455
29456 GNULIB_STRNLEN=1
29457
29458
29459
29460
29461
29462 $as_echo "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h
29463
29464
29465
29466
29467
29468 if test $REPLACE_STRSTR = 0; then
29469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works in linear time" >&5
29470 $as_echo_n "checking whether strstr works in linear time... " >&6; }
29471 if ${gl_cv_func_strstr_linear+:} false; then :
29472 $as_echo_n "(cached) " >&6
29473 else
29474 if test "$cross_compiling" = yes; then :
29475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29476 /* end confdefs.h. */
29477
29478 #include <features.h>
29479 #ifdef __GNU_LIBRARY__
29480 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
29481 && !(defined __i386__ || defined __x86_64__) \
29482 && !defined __UCLIBC__
29483 Lucky user
29484 #endif
29485 #endif
29486 #ifdef __CYGWIN__
29487 #include <cygwin/version.h>
29488 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
29489 Lucky user
29490 #endif
29491 #endif
29492
29493 _ACEOF
29494 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
29495 $EGREP "Lucky user" >/dev/null 2>&1; then :
29496 gl_cv_func_strstr_linear="guessing yes"
29497 else
29498 gl_cv_func_strstr_linear="$gl_cross_guess_normal"
29499 fi
29500 rm -f conftest*
29501
29502
29503 else
29504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29505 /* end confdefs.h. */
29506
29507 #ifdef __MVS__
29508 /* z/OS does not deliver signals while strstr() is running (thanks to
29509 restrictions on its LE runtime), which prevents us from limiting the
29510 running time of this test. */
29511 # error "This test does not work properly on z/OS"
29512 #endif
29513 #include <signal.h> /* for signal */
29514 #include <string.h> /* for strstr */
29515 #include <stdlib.h> /* for malloc */
29516 #include <unistd.h> /* for alarm */
29517 static void quit (int sig) { _exit (sig + 128); }
29518
29519 int
29520 main ()
29521 {
29522
29523 int result = 0;
29524 size_t m = 1000000;
29525 char *haystack = (char *) malloc (2 * m + 2);
29526 char *needle = (char *) malloc (m + 2);
29527 /* Failure to compile this test due to missing alarm is okay,
29528 since all such platforms (mingw) also have quadratic strstr. */
29529 signal (SIGALRM, quit);
29530 alarm (5);
29531 /* Check for quadratic performance. */
29532 if (haystack && needle)
29533 {
29534 memset (haystack, 'A', 2 * m);
29535 haystack[2 * m] = 'B';
29536 haystack[2 * m + 1] = 0;
29537 memset (needle, 'A', m);
29538 needle[m] = 'B';
29539 needle[m + 1] = 0;
29540 if (!strstr (haystack, needle))
29541 result |= 1;
29542 }
29543 /* Free allocated memory, in case some sanitizer is watching. */
29544 free (haystack);
29545 free (needle);
29546 return result;
29547
29548 ;
29549 return 0;
29550 }
29551 _ACEOF
29552 if ac_fn_c_try_run "$LINENO"; then :
29553 gl_cv_func_strstr_linear=yes
29554 else
29555 gl_cv_func_strstr_linear=no
29556 fi
29557 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29558 conftest.$ac_objext conftest.beam conftest.$ac_ext
29559 fi
29560
29561
29562 fi
29563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_linear" >&5
29564 $as_echo "$gl_cv_func_strstr_linear" >&6; }
29565 case "$gl_cv_func_strstr_linear" in
29566 *yes) ;;
29567 *)
29568 REPLACE_STRSTR=1
29569 ;;
29570 esac
29571 fi
29572
29573 if test $REPLACE_STRSTR = 1; then
29574
29575
29576
29577
29578
29579
29580
29581
29582 gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
29583
29584 fi
29585
29586
29587
29588 if test $REPLACE_MEMCHR = 1; then
29589 REPLACE_STRSTR=1
29590 else
29591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
29592 $as_echo_n "checking whether strstr works... " >&6; }
29593 if ${gl_cv_func_strstr_works_always+:} false; then :
29594 $as_echo_n "(cached) " >&6
29595 else
29596 if test "$cross_compiling" = yes; then :
29597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29598 /* end confdefs.h. */
29599
29600 #ifdef __GNU_LIBRARY__
29601 #include <features.h>
29602 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
29603 || defined __UCLIBC__
29604 Lucky user
29605 #endif
29606 #elif defined __CYGWIN__
29607 #include <cygwin/version.h>
29608 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
29609 Lucky user
29610 #endif
29611 #else
29612 Lucky user
29613 #endif
29614
29615 _ACEOF
29616 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
29617 $EGREP "Lucky user" >/dev/null 2>&1; then :
29618 gl_cv_func_strstr_works_always="guessing yes"
29619 else
29620 gl_cv_func_strstr_works_always="$gl_cross_guess_normal"
29621 fi
29622 rm -f conftest*
29623
29624
29625 else
29626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29627 /* end confdefs.h. */
29628
29629 #include <string.h> /* for strstr */
29630 #ifdef __GNU_LIBRARY__
29631 #include <features.h>
29632 #if __GLIBC__ == 2 && __GLIBC_MINOR__ == 28
29633 Unlucky user
29634 #endif
29635 #endif
29636 #define P "_EF_BF_BD"
29637 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
29638 #define NEEDLE P P P P P
29639
29640 int
29641 main ()
29642 {
29643 return !!strstr (HAYSTACK, NEEDLE);
29644
29645 ;
29646 return 0;
29647 }
29648 _ACEOF
29649 if ac_fn_c_try_run "$LINENO"; then :
29650 gl_cv_func_strstr_works_always=yes
29651 else
29652 gl_cv_func_strstr_works_always=no
29653 fi
29654 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29655 conftest.$ac_objext conftest.beam conftest.$ac_ext
29656 fi
29657
29658
29659 fi
29660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
29661 $as_echo "$gl_cv_func_strstr_works_always" >&6; }
29662 case "$gl_cv_func_strstr_works_always" in
29663 *yes) ;;
29664 *)
29665 REPLACE_STRSTR=1
29666 ;;
29667 esac
29668 fi
29669
29670 if test $REPLACE_STRSTR = 1; then
29671
29672
29673
29674
29675
29676
29677
29678
29679 gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
29680
29681 fi
29682
29683
29684
29685
29686
29687 GNULIB_STRSTR=1
29688
29689
29690
29691
29692
29693 $as_echo "#define GNULIB_TEST_STRSTR 1" >>confdefs.h
29694
29695
29696
29697
29698
29699
29700
29701 for ac_func in strtok_r
29702 do :
29703 ac_fn_c_check_func "$LINENO" "strtok_r" "ac_cv_func_strtok_r"
29704 if test "x$ac_cv_func_strtok_r" = xyes; then :
29705 cat >>confdefs.h <<_ACEOF
29706 #define HAVE_STRTOK_R 1
29707 _ACEOF
29708
29709 fi
29710 done
29711
29712 if test $ac_cv_func_strtok_r = yes; then
29713 HAVE_STRTOK_R=1
29714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtok_r works" >&5
29715 $as_echo_n "checking whether strtok_r works... " >&6; }
29716 if ${gl_cv_func_strtok_r_works+:} false; then :
29717 $as_echo_n "(cached) " >&6
29718 else
29719 if test "$cross_compiling" = yes; then :
29720 case "$host_os" in
29721 # Guess no on glibc systems.
29722 *-gnu* | gnu*) gl_cv_func_strtok_r_works="guessing no" ;;
29723 # Guess yes on native Windows.
29724 mingw*) gl_cv_func_strtok_r_works="guessing yes" ;;
29725 *) gl_cv_func_strtok_r_works="guessing yes" ;;
29726 esac
29727
29728 else
29729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29730 /* end confdefs.h. */
29731
29732 #ifndef __OPTIMIZE__
29733 # define __OPTIMIZE__ 1
29734 #endif
29735 #undef __OPTIMIZE_SIZE__
29736 #undef __NO_INLINE__
29737 #include <stdlib.h>
29738 #include <string.h>
29739
29740 int
29741 main ()
29742 {
29743 static const char dummy[] = "\177\01a";
29744 char delimiters[] = "xxxxxxxx";
29745 char *save_ptr = (char *) dummy;
29746 strtok_r (delimiters, "x", &save_ptr);
29747 strtok_r (NULL, "x", &save_ptr);
29748 return 0;
29749
29750 ;
29751 return 0;
29752 }
29753
29754 _ACEOF
29755 if ac_fn_c_try_run "$LINENO"; then :
29756 gl_cv_func_strtok_r_works=yes
29757 else
29758 gl_cv_func_strtok_r_works=no
29759 fi
29760 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29761 conftest.$ac_objext conftest.beam conftest.$ac_ext
29762 fi
29763
29764
29765 fi
29766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtok_r_works" >&5
29767 $as_echo "$gl_cv_func_strtok_r_works" >&6; }
29768 case "$gl_cv_func_strtok_r_works" in
29769 *no)
29770 UNDEFINE_STRTOK_R=1
29771 ;;
29772 esac
29773 else
29774 HAVE_STRTOK_R=0
29775 fi
29776
29777 if test $ac_cv_have_decl_strtok_r = no; then
29778 HAVE_DECL_STRTOK_R=0
29779 fi
29780
29781 if test $HAVE_STRTOK_R = 0 || test $REPLACE_STRTOK_R = 1; then
29782
29783
29784
29785
29786
29787
29788
29789
29790 gl_LIBOBJS="$gl_LIBOBJS strtok_r.$ac_objext"
29791
29792
29793 :
29794
29795 fi
29796
29797
29798
29799
29800
29801 GNULIB_STRTOK_R=1
29802
29803
29804
29805
29806
29807 $as_echo "#define GNULIB_TEST_STRTOK_R 1" >>confdefs.h
29808
29809
29810
29811
29812
29813
29814
29815
29816
29817
29818
29819
29820
29821
29822 if test $gl_cv_have_include_next = yes; then
29823 gl_cv_next_sys_random_h='<'sys/random.h'>'
29824 else
29825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/random.h>" >&5
29826 $as_echo_n "checking absolute name of <sys/random.h>... " >&6; }
29827 if ${gl_cv_next_sys_random_h+:} false; then :
29828 $as_echo_n "(cached) " >&6
29829 else
29830
29831 if test $ac_cv_header_sys_random_h = yes; then
29832
29833
29834
29835
29836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29837 /* end confdefs.h. */
29838 #include <sys/random.h>
29839 _ACEOF
29840 case "$host_os" in
29841 aix*) gl_absname_cpp="$ac_cpp -C" ;;
29842 *) gl_absname_cpp="$ac_cpp" ;;
29843 esac
29844
29845 case "$host_os" in
29846 mingw*)
29847 gl_dirsep_regex='[/\\]'
29848 ;;
29849 *)
29850 gl_dirsep_regex='\/'
29851 ;;
29852 esac
29853 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29854 gl_header_literal_regex=`echo 'sys/random.h' \
29855 | sed -e "$gl_make_literal_regex_sed"`
29856 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29857 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29858 s|^/[^/]|//&|
29859 p
29860 q
29861 }'
29862
29863 gl_cv_absolute_sys_random_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29864 sed -n "$gl_absolute_header_sed"`
29865
29866 gl_header=$gl_cv_absolute_sys_random_h
29867 gl_cv_next_sys_random_h='"'$gl_header'"'
29868 else
29869 gl_cv_next_sys_random_h='<'sys/random.h'>'
29870 fi
29871
29872
29873 fi
29874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_random_h" >&5
29875 $as_echo "$gl_cv_next_sys_random_h" >&6; }
29876 fi
29877 NEXT_SYS_RANDOM_H=$gl_cv_next_sys_random_h
29878
29879 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29880 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29881 gl_next_as_first_directive='<'sys/random.h'>'
29882 else
29883 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29884 gl_next_as_first_directive=$gl_cv_next_sys_random_h
29885 fi
29886 NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H=$gl_next_as_first_directive
29887
29888
29889
29890
29891 if test $ac_cv_header_sys_random_h = yes; then
29892 HAVE_SYS_RANDOM_H=1
29893 else
29894 HAVE_SYS_RANDOM_H=0
29895 fi
29896
29897
29898
29899 if test $ac_cv_header_sys_random_h = yes; then
29900 UNISTD_H_HAVE_SYS_RANDOM_H=1
29901 fi
29902
29903
29904
29905
29906
29907
29908
29909
29910
29911
29912
29913
29914
29915
29916
29917
29918
29919
29920
29921
29922
29923
29924 if test $gl_cv_have_include_next = yes; then
29925 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
29926 else
29927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
29928 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
29929 if ${gl_cv_next_sys_stat_h+:} false; then :
29930 $as_echo_n "(cached) " >&6
29931 else
29932
29933 if test $ac_cv_header_sys_stat_h = yes; then
29934
29935
29936
29937
29938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29939 /* end confdefs.h. */
29940 #include <sys/stat.h>
29941 _ACEOF
29942 case "$host_os" in
29943 aix*) gl_absname_cpp="$ac_cpp -C" ;;
29944 *) gl_absname_cpp="$ac_cpp" ;;
29945 esac
29946
29947 case "$host_os" in
29948 mingw*)
29949 gl_dirsep_regex='[/\\]'
29950 ;;
29951 *)
29952 gl_dirsep_regex='\/'
29953 ;;
29954 esac
29955 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29956 gl_header_literal_regex=`echo 'sys/stat.h' \
29957 | sed -e "$gl_make_literal_regex_sed"`
29958 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29959 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29960 s|^/[^/]|//&|
29961 p
29962 q
29963 }'
29964
29965 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29966 sed -n "$gl_absolute_header_sed"`
29967
29968 gl_header=$gl_cv_absolute_sys_stat_h
29969 gl_cv_next_sys_stat_h='"'$gl_header'"'
29970 else
29971 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
29972 fi
29973
29974
29975 fi
29976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
29977 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
29978 fi
29979 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
29980
29981 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29982 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29983 gl_next_as_first_directive='<'sys/stat.h'>'
29984 else
29985 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29986 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
29987 fi
29988 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
29989
29990
29991
29992
29993
29994
29995
29996
29997 WINDOWS_STAT_TIMESPEC=0
29998
29999
30000
30001
30002
30003
30004
30005
30006 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
30007 #include <sys/stat.h>
30008 "
30009 if test "x$ac_cv_type_nlink_t" = xyes; then :
30010
30011 else
30012
30013 $as_echo "#define nlink_t int" >>confdefs.h
30014
30015 fi
30016
30017
30018
30019
30020
30021
30022
30023
30024
30025
30026
30027
30028
30029
30030
30031
30032
30033
30034
30035
30036
30037
30038
30039
30040
30041
30042 if test $gl_cv_have_include_next = yes; then
30043 gl_cv_next_sys_uio_h='<'sys/uio.h'>'
30044 else
30045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/uio.h>" >&5
30046 $as_echo_n "checking absolute name of <sys/uio.h>... " >&6; }
30047 if ${gl_cv_next_sys_uio_h+:} false; then :
30048 $as_echo_n "(cached) " >&6
30049 else
30050
30051 if test $ac_cv_header_sys_uio_h = yes; then
30052
30053
30054
30055
30056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30057 /* end confdefs.h. */
30058 #include <sys/uio.h>
30059 _ACEOF
30060 case "$host_os" in
30061 aix*) gl_absname_cpp="$ac_cpp -C" ;;
30062 *) gl_absname_cpp="$ac_cpp" ;;
30063 esac
30064
30065 case "$host_os" in
30066 mingw*)
30067 gl_dirsep_regex='[/\\]'
30068 ;;
30069 *)
30070 gl_dirsep_regex='\/'
30071 ;;
30072 esac
30073 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
30074 gl_header_literal_regex=`echo 'sys/uio.h' \
30075 | sed -e "$gl_make_literal_regex_sed"`
30076 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
30077 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
30078 s|^/[^/]|//&|
30079 p
30080 q
30081 }'
30082
30083 gl_cv_absolute_sys_uio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
30084 sed -n "$gl_absolute_header_sed"`
30085
30086 gl_header=$gl_cv_absolute_sys_uio_h
30087 gl_cv_next_sys_uio_h='"'$gl_header'"'
30088 else
30089 gl_cv_next_sys_uio_h='<'sys/uio.h'>'
30090 fi
30091
30092
30093 fi
30094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_uio_h" >&5
30095 $as_echo "$gl_cv_next_sys_uio_h" >&6; }
30096 fi
30097 NEXT_SYS_UIO_H=$gl_cv_next_sys_uio_h
30098
30099 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
30100 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
30101 gl_next_as_first_directive='<'sys/uio.h'>'
30102 else
30103 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
30104 gl_next_as_first_directive=$gl_cv_next_sys_uio_h
30105 fi
30106 NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H=$gl_next_as_first_directive
30107
30108
30109
30110
30111 if test $ac_cv_header_sys_uio_h = yes; then
30112 HAVE_SYS_UIO_H=1
30113 else
30114 HAVE_SYS_UIO_H=0
30115 fi
30116
30117
30118
30119
30120
30121 :
30122
30123
30124
30125
30126 cat >>confdefs.h <<_ACEOF
30127 #define GNULIB_TEMPNAME 1
30128 _ACEOF
30129
30130
30131
30132
30133
30134
30135
30136
30137
30138
30139
30140
30141 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,
30142 gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
30143 been included before. */
30144 #if defined __MINGW32__
30145 # include <unistd.h>
30146 #endif
30147 #include <time.h>
30148
30149 "
30150 if test "x$ac_cv_have_decl_localtime_r" = xyes; then :
30151 ac_have_decl=1
30152 else
30153 ac_have_decl=0
30154 fi
30155
30156 cat >>confdefs.h <<_ACEOF
30157 #define HAVE_DECL_LOCALTIME_R $ac_have_decl
30158 _ACEOF
30159
30160 if test $ac_cv_have_decl_localtime_r = no; then
30161 HAVE_DECL_LOCALTIME_R=0
30162 fi
30163
30164
30165 if test $ac_cv_func_localtime_r = yes; then
30166 HAVE_LOCALTIME_R=1
30167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
30168 $as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
30169 if ${gl_cv_time_r_posix+:} false; then :
30170 $as_echo_n "(cached) " >&6
30171 else
30172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30173 /* end confdefs.h. */
30174 /* mingw's <time.h> provides the functions asctime_r, ctime_r,
30175 gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
30176 been included before. */
30177 #if defined __MINGW32__
30178 # include <unistd.h>
30179 #endif
30180 #include <time.h>
30181
30182 int
30183 main ()
30184 {
30185 /* We don't need to append 'restrict's to the argument types,
30186 even though the POSIX signature has the 'restrict's,
30187 since C99 says they can't affect type compatibility. */
30188 struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
30189 if (ptr) return 0;
30190 /* Check the return type is a pointer.
30191 On HP-UX 10 it is 'int'. */
30192 *localtime_r (0, 0);
30193 ;
30194 return 0;
30195 }
30196
30197 _ACEOF
30198 if ac_fn_c_try_compile "$LINENO"; then :
30199 gl_cv_time_r_posix=yes
30200 else
30201 gl_cv_time_r_posix=no
30202 fi
30203 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30204
30205 fi
30206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
30207 $as_echo "$gl_cv_time_r_posix" >&6; }
30208 if test $gl_cv_time_r_posix = yes; then
30209 REPLACE_LOCALTIME_R=0
30210 else
30211 REPLACE_LOCALTIME_R=1
30212 fi
30213 else
30214 HAVE_LOCALTIME_R=0
30215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r exists as an inline function" >&5
30216 $as_echo_n "checking whether localtime_r exists as an inline function... " >&6; }
30217 if ${gl_cv_func_localtime_r_inline+:} false; then :
30218 $as_echo_n "(cached) " >&6
30219 else
30220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30221 /* end confdefs.h. */
30222 /* mingw's <time.h> provides the functions asctime_r, ctime_r,
30223 gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
30224 been included before. */
30225 #if defined __MINGW32__
30226 # include <unistd.h>
30227 #endif
30228 #include <time.h>
30229
30230 int
30231 main ()
30232 {
30233 time_t a;
30234 struct tm r;
30235 localtime_r (&a, &r);
30236
30237 ;
30238 return 0;
30239 }
30240
30241 _ACEOF
30242 if ac_fn_c_try_link "$LINENO"; then :
30243 gl_cv_func_localtime_r_inline=yes
30244 else
30245 gl_cv_func_localtime_r_inline=no
30246 fi
30247 rm -f core conftest.err conftest.$ac_objext \
30248 conftest$ac_exeext conftest.$ac_ext
30249
30250 fi
30251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_localtime_r_inline" >&5
30252 $as_echo "$gl_cv_func_localtime_r_inline" >&6; }
30253 if test $gl_cv_func_localtime_r_inline = yes; then
30254 REPLACE_LOCALTIME_R=1
30255 fi
30256 fi
30257
30258 if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
30259
30260
30261
30262
30263
30264
30265
30266
30267 gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext"
30268
30269
30270 :
30271
30272 fi
30273
30274
30275
30276
30277
30278 GNULIB_TIME_R=1
30279
30280
30281
30282
30283
30284 $as_echo "#define GNULIB_TEST_TIME_R 1" >>confdefs.h
30285
30286
30287
30288
30289
30290
30291
30292
30293
30294
30295
30296
30297
30298
30299
30300 if test $gl_cv_have_include_next = yes; then
30301 gl_cv_next_unistd_h='<'unistd.h'>'
30302 else
30303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
30304 $as_echo_n "checking absolute name of <unistd.h>... " >&6; }
30305 if ${gl_cv_next_unistd_h+:} false; then :
30306 $as_echo_n "(cached) " >&6
30307 else
30308
30309 if test $ac_cv_header_unistd_h = yes; then
30310
30311
30312
30313
30314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30315 /* end confdefs.h. */
30316 #include <unistd.h>
30317 _ACEOF
30318 case "$host_os" in
30319 aix*) gl_absname_cpp="$ac_cpp -C" ;;
30320 *) gl_absname_cpp="$ac_cpp" ;;
30321 esac
30322
30323 case "$host_os" in
30324 mingw*)
30325 gl_dirsep_regex='[/\\]'
30326 ;;
30327 *)
30328 gl_dirsep_regex='\/'
30329 ;;
30330 esac
30331 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
30332 gl_header_literal_regex=`echo 'unistd.h' \
30333 | sed -e "$gl_make_literal_regex_sed"`
30334 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
30335 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
30336 s|^/[^/]|//&|
30337 p
30338 q
30339 }'
30340
30341 gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
30342 sed -n "$gl_absolute_header_sed"`
30343
30344 gl_header=$gl_cv_absolute_unistd_h
30345 gl_cv_next_unistd_h='"'$gl_header'"'
30346 else
30347 gl_cv_next_unistd_h='<'unistd.h'>'
30348 fi
30349
30350
30351 fi
30352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
30353 $as_echo "$gl_cv_next_unistd_h" >&6; }
30354 fi
30355 NEXT_UNISTD_H=$gl_cv_next_unistd_h
30356
30357 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
30358 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
30359 gl_next_as_first_directive='<'unistd.h'>'
30360 else
30361 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
30362 gl_next_as_first_directive=$gl_cv_next_unistd_h
30363 fi
30364 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
30365
30366
30367
30368
30369 if test $ac_cv_header_unistd_h = yes; then
30370 HAVE_UNISTD_H=1
30371 else
30372 HAVE_UNISTD_H=0
30373 fi
30374
30375
30376
30377
30378
30379
30380
30381
30382
30383
30384
30385
30386
30387 if test $ac_cv_have_decl_execvpe = no; then
30388 HAVE_DECL_EXECVPE=0
30389 fi
30390
30391
30392
30393
30394
30395
30396
30397 if test $ac_cv_have_decl_unsetenv = no; then
30398 HAVE_DECL_UNSETENV=0
30399 fi
30400 for ac_func in unsetenv
30401 do :
30402 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
30403 if test "x$ac_cv_func_unsetenv" = xyes; then :
30404 cat >>confdefs.h <<_ACEOF
30405 #define HAVE_UNSETENV 1
30406 _ACEOF
30407
30408 fi
30409 done
30410
30411 if test $ac_cv_func_unsetenv = no; then
30412 HAVE_UNSETENV=0
30413 else
30414 HAVE_UNSETENV=1
30415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
30416 $as_echo_n "checking for unsetenv() return type... " >&6; }
30417 if ${gt_cv_func_unsetenv_ret+:} false; then :
30418 $as_echo_n "(cached) " >&6
30419 else
30420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30421 /* end confdefs.h. */
30422
30423 #undef _BSD
30424 #define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
30425 #include <stdlib.h>
30426 extern
30427 #ifdef __cplusplus
30428 "C"
30429 #endif
30430 int unsetenv (const char *name);
30431
30432 int
30433 main ()
30434 {
30435
30436 ;
30437 return 0;
30438 }
30439 _ACEOF
30440 if ac_fn_c_try_compile "$LINENO"; then :
30441 gt_cv_func_unsetenv_ret='int'
30442 else
30443 gt_cv_func_unsetenv_ret='void'
30444 fi
30445 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30446 fi
30447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
30448 $as_echo "$gt_cv_func_unsetenv_ret" >&6; }
30449 if test $gt_cv_func_unsetenv_ret = 'void'; then
30450
30451 $as_echo "#define VOID_UNSETENV 1" >>confdefs.h
30452
30453 REPLACE_UNSETENV=1
30454 fi
30455
30456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
30457 $as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
30458 if ${gl_cv_func_unsetenv_works+:} false; then :
30459 $as_echo_n "(cached) " >&6
30460 else
30461 if test "$cross_compiling" = yes; then :
30462 case "$host_os" in
30463 # Guess yes on glibc systems.
30464 *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
30465 # If we don't know, obey --enable-cross-guesses.
30466 *) gl_cv_func_unsetenv_works="$gl_cross_guess_normal" ;;
30467 esac
30468
30469 else
30470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30471 /* end confdefs.h. */
30472
30473 #include <stdlib.h>
30474 #include <errno.h>
30475 extern char **environ;
30476
30477
30478 $gl_mda_defines
30479
30480 int
30481 main ()
30482 {
30483
30484 char entry1[] = "a=1";
30485 char entry2[] = "b=2";
30486 char *env[] = { entry1, entry2, NULL };
30487 if (putenv ((char *) "a=1")) return 1;
30488 if (putenv (entry2)) return 2;
30489 entry2[0] = 'a';
30490 unsetenv ("a");
30491 if (getenv ("a")) return 3;
30492 if (!unsetenv ("") || errno != EINVAL) return 4;
30493 entry2[0] = 'b';
30494 environ = env;
30495 if (!getenv ("a")) return 5;
30496 entry2[0] = 'a';
30497 unsetenv ("a");
30498 if (getenv ("a")) return 6;
30499
30500 ;
30501 return 0;
30502 }
30503 _ACEOF
30504 if ac_fn_c_try_run "$LINENO"; then :
30505 gl_cv_func_unsetenv_works=yes
30506 else
30507 gl_cv_func_unsetenv_works=no
30508 fi
30509 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30510 conftest.$ac_objext conftest.beam conftest.$ac_ext
30511 fi
30512
30513
30514 fi
30515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
30516 $as_echo "$gl_cv_func_unsetenv_works" >&6; }
30517 case "$gl_cv_func_unsetenv_works" in
30518 *yes) ;;
30519 *)
30520 REPLACE_UNSETENV=1
30521 ;;
30522 esac
30523 fi
30524
30525 if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
30526
30527
30528
30529
30530
30531
30532
30533
30534 gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
30535
30536
30537
30538
30539
30540 fi
30541
30542
30543
30544
30545
30546 GNULIB_UNSETENV=1
30547
30548
30549
30550
30551
30552 $as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
30553
30554
30555
30556
30557
30558
30559
30560
30561
30562
30563
30564
30565
30566
30567
30568 if test $gl_cv_have_include_next = yes; then
30569 gl_cv_next_wchar_h='<'wchar.h'>'
30570 else
30571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
30572 $as_echo_n "checking absolute name of <wchar.h>... " >&6; }
30573 if ${gl_cv_next_wchar_h+:} false; then :
30574 $as_echo_n "(cached) " >&6
30575 else
30576
30577 if test $ac_cv_header_wchar_h = yes; then
30578
30579
30580
30581
30582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30583 /* end confdefs.h. */
30584 #include <wchar.h>
30585 _ACEOF
30586 case "$host_os" in
30587 aix*) gl_absname_cpp="$ac_cpp -C" ;;
30588 *) gl_absname_cpp="$ac_cpp" ;;
30589 esac
30590
30591 case "$host_os" in
30592 mingw*)
30593 gl_dirsep_regex='[/\\]'
30594 ;;
30595 *)
30596 gl_dirsep_regex='\/'
30597 ;;
30598 esac
30599 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
30600 gl_header_literal_regex=`echo 'wchar.h' \
30601 | sed -e "$gl_make_literal_regex_sed"`
30602 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
30603 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
30604 s|^/[^/]|//&|
30605 p
30606 q
30607 }'
30608
30609 gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
30610 sed -n "$gl_absolute_header_sed"`
30611
30612 gl_header=$gl_cv_absolute_wchar_h
30613 gl_cv_next_wchar_h='"'$gl_header'"'
30614 else
30615 gl_cv_next_wchar_h='<'wchar.h'>'
30616 fi
30617
30618
30619 fi
30620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
30621 $as_echo "$gl_cv_next_wchar_h" >&6; }
30622 fi
30623 NEXT_WCHAR_H=$gl_cv_next_wchar_h
30624
30625 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
30626 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
30627 gl_next_as_first_directive='<'wchar.h'>'
30628 else
30629 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
30630 gl_next_as_first_directive=$gl_cv_next_wchar_h
30631 fi
30632 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
30633
30634
30635
30636
30637 if test $ac_cv_header_wchar_h = yes; then
30638 HAVE_WCHAR_H=1
30639 else
30640 HAVE_WCHAR_H=0
30641 fi
30642
30643
30644
30645
30646
30647 if test $gt_cv_c_wint_t = yes; then
30648 HAVE_WINT_T=1
30649 else
30650 HAVE_WINT_T=0
30651 fi
30652
30653
30654
30655
30656
30657
30658
30659
30660
30661
30662 ac_fn_c_check_decl "$LINENO" "wcsdup" "ac_cv_have_decl_wcsdup" "
30663 #include <wchar.h>
30664
30665 "
30666 if test "x$ac_cv_have_decl_wcsdup" = xyes; then :
30667 ac_have_decl=1
30668 else
30669 ac_have_decl=0
30670 fi
30671
30672 cat >>confdefs.h <<_ACEOF
30673 #define HAVE_DECL_WCSDUP $ac_have_decl
30674 _ACEOF
30675
30676 if test $ac_cv_have_decl_wcsdup = no; then
30677 HAVE_DECL_WCSDUP=0
30678 fi
30679
30680
30681
30682
30683
30684
30685 if test $ac_cv_func_iswcntrl = yes; then
30686 HAVE_ISWCNTRL=1
30687 else
30688 HAVE_ISWCNTRL=0
30689 fi
30690
30691
30692
30693 if test $gt_cv_c_wint_t = yes; then
30694 HAVE_WINT_T=1
30695 else
30696 HAVE_WINT_T=0
30697 fi
30698
30699
30700
30701
30702
30703
30704
30705
30706
30707
30708
30709
30710
30711 if test $gl_cv_have_include_next = yes; then
30712 gl_cv_next_wctype_h='<'wctype.h'>'
30713 else
30714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
30715 $as_echo_n "checking absolute name of <wctype.h>... " >&6; }
30716 if ${gl_cv_next_wctype_h+:} false; then :
30717 $as_echo_n "(cached) " >&6
30718 else
30719
30720 if test $ac_cv_header_wctype_h = yes; then
30721
30722
30723
30724
30725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30726 /* end confdefs.h. */
30727 #include <wctype.h>
30728 _ACEOF
30729 case "$host_os" in
30730 aix*) gl_absname_cpp="$ac_cpp -C" ;;
30731 *) gl_absname_cpp="$ac_cpp" ;;
30732 esac
30733
30734 case "$host_os" in
30735 mingw*)
30736 gl_dirsep_regex='[/\\]'
30737 ;;
30738 *)
30739 gl_dirsep_regex='\/'
30740 ;;
30741 esac
30742 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
30743 gl_header_literal_regex=`echo 'wctype.h' \
30744 | sed -e "$gl_make_literal_regex_sed"`
30745 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
30746 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
30747 s|^/[^/]|//&|
30748 p
30749 q
30750 }'
30751
30752 gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
30753 sed -n "$gl_absolute_header_sed"`
30754
30755 gl_header=$gl_cv_absolute_wctype_h
30756 gl_cv_next_wctype_h='"'$gl_header'"'
30757 else
30758 gl_cv_next_wctype_h='<'wctype.h'>'
30759 fi
30760
30761
30762 fi
30763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
30764 $as_echo "$gl_cv_next_wctype_h" >&6; }
30765 fi
30766 NEXT_WCTYPE_H=$gl_cv_next_wctype_h
30767
30768 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
30769 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
30770 gl_next_as_first_directive='<'wctype.h'>'
30771 else
30772 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
30773 gl_next_as_first_directive=$gl_cv_next_wctype_h
30774 fi
30775 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
30776
30777
30778
30779
30780 if test $ac_cv_header_wctype_h = yes; then
30781 if test $ac_cv_func_iswcntrl = yes; then
30782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
30783 $as_echo_n "checking whether iswcntrl works... " >&6; }
30784 if ${gl_cv_func_iswcntrl_works+:} false; then :
30785 $as_echo_n "(cached) " >&6
30786 else
30787
30788 if test "$cross_compiling" = yes; then :
30789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30790 /* end confdefs.h. */
30791 #include <stdlib.h>
30792 #if __GNU_LIBRARY__ == 1
30793 Linux libc5 i18n is broken.
30794 #endif
30795 int
30796 main ()
30797 {
30798
30799 ;
30800 return 0;
30801 }
30802 _ACEOF
30803 if ac_fn_c_try_compile "$LINENO"; then :
30804 gl_cv_func_iswcntrl_works="guessing yes"
30805 else
30806 gl_cv_func_iswcntrl_works="guessing no"
30807 fi
30808 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30809
30810 else
30811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30812 /* end confdefs.h. */
30813
30814 #include <wchar.h>
30815 #include <wctype.h>
30816 int main () { return iswprint ('x') == 0; }
30817
30818 _ACEOF
30819 if ac_fn_c_try_run "$LINENO"; then :
30820 gl_cv_func_iswcntrl_works=yes
30821 else
30822 gl_cv_func_iswcntrl_works=no
30823 fi
30824 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30825 conftest.$ac_objext conftest.beam conftest.$ac_ext
30826 fi
30827
30828
30829 fi
30830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
30831 $as_echo "$gl_cv_func_iswcntrl_works" >&6; }
30832 fi
30833 HAVE_WCTYPE_H=1
30834 else
30835 HAVE_WCTYPE_H=0
30836 fi
30837
30838
30839 if test $GNULIB_OVERRIDES_WINT_T = 1; then
30840 REPLACE_ISWCNTRL=1
30841 else
30842 case "$gl_cv_func_iswcntrl_works" in
30843 *yes) REPLACE_ISWCNTRL=0 ;;
30844 *) REPLACE_ISWCNTRL=1 ;;
30845 esac
30846 fi
30847
30848
30849 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
30850 :
30851 fi
30852
30853 if test $REPLACE_ISWCNTRL = 1; then
30854 REPLACE_TOWLOWER=1
30855 else
30856 for ac_func in towlower
30857 do :
30858 ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
30859 if test "x$ac_cv_func_towlower" = xyes; then :
30860 cat >>confdefs.h <<_ACEOF
30861 #define HAVE_TOWLOWER 1
30862 _ACEOF
30863
30864 fi
30865 done
30866
30867 if test $ac_cv_func_towlower = yes; then
30868 REPLACE_TOWLOWER=0
30869 else
30870 ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "#include <wchar.h>
30871 #if HAVE_WCTYPE_H
30872 # include <wctype.h>
30873 #endif
30874
30875 "
30876 if test "x$ac_cv_have_decl_towlower" = xyes; then :
30877 ac_have_decl=1
30878 else
30879 ac_have_decl=0
30880 fi
30881
30882 cat >>confdefs.h <<_ACEOF
30883 #define HAVE_DECL_TOWLOWER $ac_have_decl
30884 _ACEOF
30885
30886 if test $ac_cv_have_decl_towlower = yes; then
30887 REPLACE_TOWLOWER=1
30888 else
30889 REPLACE_TOWLOWER=0
30890 fi
30891 fi
30892 fi
30893
30894
30895 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
30896 :
30897 fi
30898
30899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
30900 $as_echo_n "checking for wctype_t... " >&6; }
30901 if ${gl_cv_type_wctype_t+:} false; then :
30902 $as_echo_n "(cached) " >&6
30903 else
30904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30905 /* end confdefs.h. */
30906 #include <wchar.h>
30907 #if HAVE_WCTYPE_H
30908 # include <wctype.h>
30909 #endif
30910 wctype_t a;
30911
30912 int
30913 main ()
30914 {
30915
30916 ;
30917 return 0;
30918 }
30919 _ACEOF
30920 if ac_fn_c_try_compile "$LINENO"; then :
30921 gl_cv_type_wctype_t=yes
30922 else
30923 gl_cv_type_wctype_t=no
30924 fi
30925 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30926
30927 fi
30928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
30929 $as_echo "$gl_cv_type_wctype_t" >&6; }
30930 if test $gl_cv_type_wctype_t = no; then
30931 HAVE_WCTYPE_T=0
30932 fi
30933
30934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
30935 $as_echo_n "checking for wctrans_t... " >&6; }
30936 if ${gl_cv_type_wctrans_t+:} false; then :
30937 $as_echo_n "(cached) " >&6
30938 else
30939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30940 /* end confdefs.h. */
30941 #include <wchar.h>
30942 #include <wctype.h>
30943 wctrans_t a;
30944
30945 int
30946 main ()
30947 {
30948
30949 ;
30950 return 0;
30951 }
30952 _ACEOF
30953 if ac_fn_c_try_compile "$LINENO"; then :
30954 gl_cv_type_wctrans_t=yes
30955 else
30956 gl_cv_type_wctrans_t=no
30957 fi
30958 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30959
30960 fi
30961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
30962 $as_echo "$gl_cv_type_wctrans_t" >&6; }
30963 if test $gl_cv_type_wctrans_t = no; then
30964 HAVE_WCTRANS_T=0
30965 fi
30966
30967
30968
30969
30970
30971
30972 case "$host_os" in
30973 mingw*)
30974
30975
30976
30977
30978
30979
30980
30981
30982 gl_LIBOBJS="$gl_LIBOBJS windows-mutex.$ac_objext"
30983
30984 ;;
30985 esac
30986
30987 case "$host_os" in
30988 mingw*)
30989
30990
30991
30992
30993
30994
30995
30996
30997 gl_LIBOBJS="$gl_LIBOBJS windows-once.$ac_objext"
30998
30999 ;;
31000 esac
31001
31002 case "$host_os" in
31003 mingw*)
31004
31005
31006
31007
31008
31009
31010
31011
31012 gl_LIBOBJS="$gl_LIBOBJS windows-recmutex.$ac_objext"
31013
31014 ;;
31015 esac
31016
31017 case "$host_os" in
31018 mingw*)
31019
31020
31021
31022
31023
31024
31025
31026
31027 gl_LIBOBJS="$gl_LIBOBJS windows-rwlock.$ac_objext"
31028
31029 ;;
31030 esac
31031
31032
31033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wmemchr" >&5
31034 $as_echo_n "checking for wmemchr... " >&6; }
31035 if ${gl_cv_func_wmemchr+:} false; then :
31036 $as_echo_n "(cached) " >&6
31037 else
31038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31039 /* end confdefs.h. */
31040 #include <wchar.h>
31041
31042 int
31043 main ()
31044 {
31045 return ! wmemchr ((const wchar_t *) 0, (wchar_t) ' ', 0);
31046 ;
31047 return 0;
31048 }
31049
31050 _ACEOF
31051 if ac_fn_c_try_link "$LINENO"; then :
31052 gl_cv_func_wmemchr=yes
31053 else
31054 gl_cv_func_wmemchr=no
31055 fi
31056 rm -f core conftest.err conftest.$ac_objext \
31057 conftest$ac_exeext conftest.$ac_ext
31058
31059 fi
31060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wmemchr" >&5
31061 $as_echo "$gl_cv_func_wmemchr" >&6; }
31062 if test $gl_cv_func_wmemchr = no; then
31063 HAVE_WMEMCHR=0
31064 fi
31065
31066 if test $HAVE_WMEMCHR = 0; then
31067
31068
31069
31070
31071
31072
31073
31074
31075 gl_LIBOBJS="$gl_LIBOBJS wmemchr.$ac_objext"
31076
31077 fi
31078
31079
31080
31081
31082
31083 GNULIB_WMEMCHR=1
31084
31085
31086
31087
31088
31089 $as_echo "#define GNULIB_TEST_WMEMCHR 1" >>confdefs.h
31090
31091
31092
31093
31094
31095
31096
31097
31098
31099
31100
31101 if test $ac_cv_func_wmempcpy = no; then
31102 HAVE_WMEMPCPY=0
31103 fi
31104
31105 if test $HAVE_WMEMPCPY = 0; then
31106
31107
31108
31109
31110
31111
31112
31113
31114 gl_LIBOBJS="$gl_LIBOBJS wmempcpy.$ac_objext"
31115
31116 fi
31117
31118
31119
31120
31121
31122 GNULIB_WMEMPCPY=1
31123
31124
31125
31126
31127
31128 $as_echo "#define GNULIB_TEST_WMEMPCPY 1" >>confdefs.h
31129
31130
31131
31132 # End of code from modules
31133
31134
31135
31136
31137
31138
31139
31140
31141
31142 gltests_libdeps=
31143 gltests_ltlibdeps=
31144
31145
31146
31147
31148
31149
31150
31151
31152
31153
31154 gl_source_base='tests'
31155 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
31156
31157 gl_module_indicator_condition=$gltests_WITNESS
31158
31159
31160
31161
31162
31163
31164
31165
31166
31167 LIBGNU_LIBDEPS="$gl_libdeps"
31168
31169 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
31170
31171
31172
31173 am__api_version='1.15'
31174
31175 # Find a good install program. We prefer a C program (faster),
31176 # so one script is as good as another. But avoid the broken or
31177 # incompatible versions:
31178 # SysV /etc/install, /usr/sbin/install
31179 # SunOS /usr/etc/install
31180 # IRIX /sbin/install
31181 # AIX /bin/install
31182 # AmigaOS /C/install, which installs bootblocks on floppy discs
31183 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
31184 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
31185 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
31186 # OS/2's system install, which has a completely different semantic
31187 # ./install, which can be erroneously created by make from ./install.sh.
31188 # Reject install programs that cannot install multiple files.
31189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
31190 $as_echo_n "checking for a BSD-compatible install... " >&6; }
31191 if test -z "$INSTALL"; then
31192 if ${ac_cv_path_install+:} false; then :
31193 $as_echo_n "(cached) " >&6
31194 else
31195 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31196 for as_dir in $PATH
31197 do
31198 IFS=$as_save_IFS
31199 test -z "$as_dir" && as_dir=.
31200 # Account for people who put trailing slashes in PATH elements.
31201 case $as_dir/ in #((
31202 ./ | .// | /[cC]/* | \
31203 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
31204 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
31205 /usr/ucb/* ) ;;
31206 *)
31207 # OSF1 and SCO ODT 3.0 have their own names for install.
31208 # Don't use installbsd from OSF since it installs stuff as root
31209 # by default.
31210 for ac_prog in ginstall scoinst install; do
31211 for ac_exec_ext in '' $ac_executable_extensions; do
31212 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
31213 if test $ac_prog = install &&
31214 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
31215 # AIX install. It has an incompatible calling convention.
31216 :
31217 elif test $ac_prog = install &&
31218 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
31219 # program-specific install script used by HP pwplus--don't use.
31220 :
31221 else
31222 rm -rf conftest.one conftest.two conftest.dir
31223 echo one > conftest.one
31224 echo two > conftest.two
31225 mkdir conftest.dir
31226 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
31227 test -s conftest.one && test -s conftest.two &&
31228 test -s conftest.dir/conftest.one &&
31229 test -s conftest.dir/conftest.two
31230 then
31231 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
31232 break 3
31233 fi
31234 fi
31235 fi
31236 done
31237 done
31238 ;;
31239 esac
31240
31241 done
31242 IFS=$as_save_IFS
31243
31244 rm -rf conftest.one conftest.two conftest.dir
31245
31246 fi
31247 if test "${ac_cv_path_install+set}" = set; then
31248 INSTALL=$ac_cv_path_install
31249 else
31250 # As a last resort, use the slow shell script. Don't cache a
31251 # value for INSTALL within a source directory, because that will
31252 # break other packages using the cache if that directory is
31253 # removed, or if the value is a relative name.
31254 INSTALL=$ac_install_sh
31255 fi
31256 fi
31257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
31258 $as_echo "$INSTALL" >&6; }
31259
31260 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
31261 # It thinks the first close brace ends the variable substitution.
31262 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
31263
31264 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
31265
31266 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
31267
31268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
31269 $as_echo_n "checking whether build environment is sane... " >&6; }
31270 # Reject unsafe characters in $srcdir or the absolute working directory
31271 # name. Accept space and tab only in the latter.
31272 am_lf='
31273 '
31274 case `pwd` in
31275 *[\\\"\#\$\&\'\`$am_lf]*)
31276 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
31277 esac
31278 case $srcdir in
31279 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
31280 as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
31281 esac
31282
31283 # Do 'set' in a subshell so we don't clobber the current shell's
31284 # arguments. Must try -L first in case configure is actually a
31285 # symlink; some systems play weird games with the mod time of symlinks
31286 # (eg FreeBSD returns the mod time of the symlink's containing
31287 # directory).
31288 if (
31289 am_has_slept=no
31290 for am_try in 1 2; do
31291 echo "timestamp, slept: $am_has_slept" > conftest.file
31292 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
31293 if test "$*" = "X"; then
31294 # -L didn't work.
31295 set X `ls -t "$srcdir/configure" conftest.file`
31296 fi
31297 if test "$*" != "X $srcdir/configure conftest.file" \
31298 && test "$*" != "X conftest.file $srcdir/configure"; then
31299
31300 # If neither matched, then we have a broken ls. This can happen
31301 # if, for instance, CONFIG_SHELL is bash and it inherits a
31302 # broken ls alias from the environment. This has actually
31303 # happened. Such a system could not be considered "sane".
31304 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
31305 alias in your environment" "$LINENO" 5
31306 fi
31307 if test "$2" = conftest.file || test $am_try -eq 2; then
31308 break
31309 fi
31310 # Just in case.
31311 sleep 1
31312 am_has_slept=yes
31313 done
31314 test "$2" = conftest.file
31315 )
31316 then
31317 # Ok.
31318 :
31319 else
31320 as_fn_error $? "newly created file is older than distributed files!
31321 Check your system clock" "$LINENO" 5
31322 fi
31323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31324 $as_echo "yes" >&6; }
31325 # If we didn't sleep, we still need to ensure time stamps of config.status and
31326 # generated files are strictly newer.
31327 am_sleep_pid=
31328 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
31329 ( sleep 1 ) &
31330 am_sleep_pid=$!
31331 fi
31332
31333 rm -f conftest.file
31334
31335 test "$program_prefix" != NONE &&
31336 program_transform_name="s&^&$program_prefix&;$program_transform_name"
31337 # Use a double $ so make ignores it.
31338 test "$program_suffix" != NONE &&
31339 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
31340 # Double any \ or $.
31341 # By default was `s,x,x', remove it if useless.
31342 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
31343 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
31344
31345 # Expand $ac_aux_dir to an absolute path.
31346 am_aux_dir=`cd "$ac_aux_dir" && pwd`
31347
31348 if test x"${MISSING+set}" != xset; then
31349 case $am_aux_dir in
31350 *\ * | *\ *)
31351 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
31352 *)
31353 MISSING="\${SHELL} $am_aux_dir/missing" ;;
31354 esac
31355 fi
31356 # Use eval to expand $SHELL
31357 if eval "$MISSING --is-lightweight"; then
31358 am_missing_run="$MISSING "
31359 else
31360 am_missing_run=
31361 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
31362 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
31363 fi
31364
31365 if test x"${install_sh+set}" != xset; then
31366 case $am_aux_dir in
31367 *\ * | *\ *)
31368 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
31369 *)
31370 install_sh="\${SHELL} $am_aux_dir/install-sh"
31371 esac
31372 fi
31373
31374 # Installed binaries are usually stripped using 'strip' when the user
31375 # run "make install-strip". However 'strip' might not be the right
31376 # tool to use in cross-compilation environments, therefore Automake
31377 # will honor the 'STRIP' environment variable to overrule this program.
31378 if test "$cross_compiling" != no; then
31379 if test -n "$ac_tool_prefix"; then
31380 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
31381 set dummy ${ac_tool_prefix}strip; ac_word=$2
31382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31383 $as_echo_n "checking for $ac_word... " >&6; }
31384 if ${ac_cv_prog_STRIP+:} false; then :
31385 $as_echo_n "(cached) " >&6
31386 else
31387 if test -n "$STRIP"; then
31388 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
31389 else
31390 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31391 for as_dir in $PATH
31392 do
31393 IFS=$as_save_IFS
31394 test -z "$as_dir" && as_dir=.
31395 for ac_exec_ext in '' $ac_executable_extensions; do
31396 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31397 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
31398 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31399 break 2
31400 fi
31401 done
31402 done
31403 IFS=$as_save_IFS
31404
31405 fi
31406 fi
31407 STRIP=$ac_cv_prog_STRIP
31408 if test -n "$STRIP"; then
31409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
31410 $as_echo "$STRIP" >&6; }
31411 else
31412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31413 $as_echo "no" >&6; }
31414 fi
31415
31416
31417 fi
31418 if test -z "$ac_cv_prog_STRIP"; then
31419 ac_ct_STRIP=$STRIP
31420 # Extract the first word of "strip", so it can be a program name with args.
31421 set dummy strip; ac_word=$2
31422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31423 $as_echo_n "checking for $ac_word... " >&6; }
31424 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
31425 $as_echo_n "(cached) " >&6
31426 else
31427 if test -n "$ac_ct_STRIP"; then
31428 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
31429 else
31430 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31431 for as_dir in $PATH
31432 do
31433 IFS=$as_save_IFS
31434 test -z "$as_dir" && as_dir=.
31435 for ac_exec_ext in '' $ac_executable_extensions; do
31436 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31437 ac_cv_prog_ac_ct_STRIP="strip"
31438 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31439 break 2
31440 fi
31441 done
31442 done
31443 IFS=$as_save_IFS
31444
31445 fi
31446 fi
31447 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
31448 if test -n "$ac_ct_STRIP"; then
31449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
31450 $as_echo "$ac_ct_STRIP" >&6; }
31451 else
31452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31453 $as_echo "no" >&6; }
31454 fi
31455
31456 if test "x$ac_ct_STRIP" = x; then
31457 STRIP=":"
31458 else
31459 case $cross_compiling:$ac_tool_warned in
31460 yes:)
31461 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31462 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31463 ac_tool_warned=yes ;;
31464 esac
31465 STRIP=$ac_ct_STRIP
31466 fi
31467 else
31468 STRIP="$ac_cv_prog_STRIP"
31469 fi
31470
31471 fi
31472 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
31473
31474 for ac_prog in gawk mawk nawk awk
31475 do
31476 # Extract the first word of "$ac_prog", so it can be a program name with args.
31477 set dummy $ac_prog; ac_word=$2
31478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31479 $as_echo_n "checking for $ac_word... " >&6; }
31480 if ${ac_cv_prog_AWK+:} false; then :
31481 $as_echo_n "(cached) " >&6
31482 else
31483 if test -n "$AWK"; then
31484 ac_cv_prog_AWK="$AWK" # Let the user override the test.
31485 else
31486 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31487 for as_dir in $PATH
31488 do
31489 IFS=$as_save_IFS
31490 test -z "$as_dir" && as_dir=.
31491 for ac_exec_ext in '' $ac_executable_extensions; do
31492 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31493 ac_cv_prog_AWK="$ac_prog"
31494 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31495 break 2
31496 fi
31497 done
31498 done
31499 IFS=$as_save_IFS
31500
31501 fi
31502 fi
31503 AWK=$ac_cv_prog_AWK
31504 if test -n "$AWK"; then
31505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
31506 $as_echo "$AWK" >&6; }
31507 else
31508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31509 $as_echo "no" >&6; }
31510 fi
31511
31512
31513 test -n "$AWK" && break
31514 done
31515
31516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
31517 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
31518 set x ${MAKE-make}
31519 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
31520 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
31521 $as_echo_n "(cached) " >&6
31522 else
31523 cat >conftest.make <<\_ACEOF
31524 SHELL = /bin/sh
31525 all:
31526 @echo '@@@%%%=$(MAKE)=@@@%%%'
31527 _ACEOF
31528 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
31529 case `${MAKE-make} -f conftest.make 2>/dev/null` in
31530 *@@@%%%=?*=@@@%%%*)
31531 eval ac_cv_prog_make_${ac_make}_set=yes;;
31532 *)
31533 eval ac_cv_prog_make_${ac_make}_set=no;;
31534 esac
31535 rm -f conftest.make
31536 fi
31537 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
31538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31539 $as_echo "yes" >&6; }
31540 SET_MAKE=
31541 else
31542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31543 $as_echo "no" >&6; }
31544 SET_MAKE="MAKE=${MAKE-make}"
31545 fi
31546
31547 rm -rf .tst 2>/dev/null
31548 mkdir .tst 2>/dev/null
31549 if test -d .tst; then
31550 am__leading_dot=.
31551 else
31552 am__leading_dot=_
31553 fi
31554 rmdir .tst 2>/dev/null
31555
31556 DEPDIR="${am__leading_dot}deps"
31557
31558 ac_config_commands="$ac_config_commands depfiles"
31559
31560
31561 am_make=${MAKE-make}
31562 cat > confinc << 'END'
31563 am__doit:
31564 @echo this is the am__doit target
31565 .PHONY: am__doit
31566 END
31567 # If we don't find an include directive, just comment out the code.
31568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
31569 $as_echo_n "checking for style of include used by $am_make... " >&6; }
31570 am__include="#"
31571 am__quote=
31572 _am_result=none
31573 # First try GNU make style include.
31574 echo "include confinc" > confmf
31575 # Ignore all kinds of additional output from 'make'.
31576 case `$am_make -s -f confmf 2> /dev/null` in #(
31577 *the\ am__doit\ target*)
31578 am__include=include
31579 am__quote=
31580 _am_result=GNU
31581 ;;
31582 esac
31583 # Now try BSD make style include.
31584 if test "$am__include" = "#"; then
31585 echo '.include "confinc"' > confmf
31586 case `$am_make -s -f confmf 2> /dev/null` in #(
31587 *the\ am__doit\ target*)
31588 am__include=.include
31589 am__quote="\""
31590 _am_result=BSD
31591 ;;
31592 esac
31593 fi
31594
31595
31596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
31597 $as_echo "$_am_result" >&6; }
31598 rm -f confinc confmf
31599
31600 # Check whether --enable-dependency-tracking was given.
31601 if test "${enable_dependency_tracking+set}" = set; then :
31602 enableval=$enable_dependency_tracking;
31603 fi
31604
31605 if test "x$enable_dependency_tracking" != xno; then
31606 am_depcomp="$ac_aux_dir/depcomp"
31607 AMDEPBACKSLASH='\'
31608 am__nodep='_no'
31609 fi
31610 if test "x$enable_dependency_tracking" != xno; then
31611 AMDEP_TRUE=
31612 AMDEP_FALSE='#'
31613 else
31614 AMDEP_TRUE='#'
31615 AMDEP_FALSE=
31616 fi
31617
31618
31619 # Check whether --enable-silent-rules was given.
31620 if test "${enable_silent_rules+set}" = set; then :
31621 enableval=$enable_silent_rules;
31622 fi
31623
31624 case $enable_silent_rules in # (((
31625 yes) AM_DEFAULT_VERBOSITY=0;;
31626 no) AM_DEFAULT_VERBOSITY=1;;
31627 *) AM_DEFAULT_VERBOSITY=1;;
31628 esac
31629 am_make=${MAKE-make}
31630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
31631 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
31632 if ${am_cv_make_support_nested_variables+:} false; then :
31633 $as_echo_n "(cached) " >&6
31634 else
31635 if $as_echo 'TRUE=$(BAR$(V))
31636 BAR0=false
31637 BAR1=true
31638 V=1
31639 am__doit:
31640 @$(TRUE)
31641 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
31642 am_cv_make_support_nested_variables=yes
31643 else
31644 am_cv_make_support_nested_variables=no
31645 fi
31646 fi
31647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
31648 $as_echo "$am_cv_make_support_nested_variables" >&6; }
31649 if test $am_cv_make_support_nested_variables = yes; then
31650 AM_V='$(V)'
31651 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
31652 else
31653 AM_V=$AM_DEFAULT_VERBOSITY
31654 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
31655 fi
31656 AM_BACKSLASH='\'
31657
31658 if test "`cd $srcdir && pwd`" != "`pwd`"; then
31659 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
31660 # is not polluted with repeated "-I."
31661 am__isrc=' -I$(srcdir)'
31662 # test to see if srcdir already configured
31663 if test -f $srcdir/config.status; then
31664 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
31665 fi
31666 fi
31667
31668 # test whether we have cygpath
31669 if test -z "$CYGPATH_W"; then
31670 if (cygpath --version) >/dev/null 2>/dev/null; then
31671 CYGPATH_W='cygpath -w'
31672 else
31673 CYGPATH_W=echo
31674 fi
31675 fi
31676
31677
31678 # Define the identity of the package.
31679 PACKAGE='libgnu'
31680 VERSION='UNUSED-VERSION'
31681
31682
31683 # Some tools Automake needs.
31684
31685 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
31686
31687
31688 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
31689
31690
31691 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
31692
31693
31694 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
31695
31696
31697 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
31698
31699 # For better backward compatibility. To be removed once Automake 1.9.x
31700 # dies out for good. For more background, see:
31701 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
31702 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
31703 mkdir_p='$(MKDIR_P)'
31704
31705 # We need awk for the "check" target (and possibly the TAP driver). The
31706 # system "awk" is bad on some platforms.
31707 # Always define AMTAR for backward compatibility. Yes, it's still used
31708 # in the wild :-( We should find a proper way to deprecate it ...
31709 AMTAR='$${TAR-tar}'
31710
31711
31712 # We'll loop over all known methods to create a tar archive until one works.
31713 _am_tools='gnutar pax cpio none'
31714
31715 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
31716
31717
31718
31719
31720
31721 depcc="$CC" am_compiler_list=
31722
31723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
31724 $as_echo_n "checking dependency style of $depcc... " >&6; }
31725 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
31726 $as_echo_n "(cached) " >&6
31727 else
31728 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
31729 # We make a subdir and do the tests there. Otherwise we can end up
31730 # making bogus files that we don't know about and never remove. For
31731 # instance it was reported that on HP-UX the gcc test will end up
31732 # making a dummy file named 'D' -- because '-MD' means "put the output
31733 # in D".
31734 rm -rf conftest.dir
31735 mkdir conftest.dir
31736 # Copy depcomp to subdir because otherwise we won't find it if we're
31737 # using a relative directory.
31738 cp "$am_depcomp" conftest.dir
31739 cd conftest.dir
31740 # We will build objects and dependencies in a subdirectory because
31741 # it helps to detect inapplicable dependency modes. For instance
31742 # both Tru64's cc and ICC support -MD to output dependencies as a
31743 # side effect of compilation, but ICC will put the dependencies in
31744 # the current directory while Tru64 will put them in the object
31745 # directory.
31746 mkdir sub
31747
31748 am_cv_CC_dependencies_compiler_type=none
31749 if test "$am_compiler_list" = ""; then
31750 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
31751 fi
31752 am__universal=false
31753 case " $depcc " in #(
31754 *\ -arch\ *\ -arch\ *) am__universal=true ;;
31755 esac
31756
31757 for depmode in $am_compiler_list; do
31758 # Setup a source with many dependencies, because some compilers
31759 # like to wrap large dependency lists on column 80 (with \), and
31760 # we should not choose a depcomp mode which is confused by this.
31761 #
31762 # We need to recreate these files for each test, as the compiler may
31763 # overwrite some of them when testing with obscure command lines.
31764 # This happens at least with the AIX C compiler.
31765 : > sub/conftest.c
31766 for i in 1 2 3 4 5 6; do
31767 echo '#include "conftst'$i'.h"' >> sub/conftest.c
31768 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
31769 # Solaris 10 /bin/sh.
31770 echo '/* dummy */' > sub/conftst$i.h
31771 done
31772 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
31773
31774 # We check with '-c' and '-o' for the sake of the "dashmstdout"
31775 # mode. It turns out that the SunPro C++ compiler does not properly
31776 # handle '-M -o', and we need to detect this. Also, some Intel
31777 # versions had trouble with output in subdirs.
31778 am__obj=sub/conftest.${OBJEXT-o}
31779 am__minus_obj="-o $am__obj"
31780 case $depmode in
31781 gcc)
31782 # This depmode causes a compiler race in universal mode.
31783 test "$am__universal" = false || continue
31784 ;;
31785 nosideeffect)
31786 # After this tag, mechanisms are not by side-effect, so they'll
31787 # only be used when explicitly requested.
31788 if test "x$enable_dependency_tracking" = xyes; then
31789 continue
31790 else
31791 break
31792 fi
31793 ;;
31794 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
31795 # This compiler won't grok '-c -o', but also, the minuso test has
31796 # not run yet. These depmodes are late enough in the game, and
31797 # so weak that their functioning should not be impacted.
31798 am__obj=conftest.${OBJEXT-o}
31799 am__minus_obj=
31800 ;;
31801 none) break ;;
31802 esac
31803 if depmode=$depmode \
31804 source=sub/conftest.c object=$am__obj \
31805 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
31806 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
31807 >/dev/null 2>conftest.err &&
31808 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
31809 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
31810 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
31811 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
31812 # icc doesn't choke on unknown options, it will just issue warnings
31813 # or remarks (even with -Werror). So we grep stderr for any message
31814 # that says an option was ignored or not supported.
31815 # When given -MP, icc 7.0 and 7.1 complain thusly:
31816 # icc: Command line warning: ignoring option '-M'; no argument required
31817 # The diagnosis changed in icc 8.0:
31818 # icc: Command line remark: option '-MP' not supported
31819 if (grep 'ignoring option' conftest.err ||
31820 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
31821 am_cv_CC_dependencies_compiler_type=$depmode
31822 break
31823 fi
31824 fi
31825 done
31826
31827 cd ..
31828 rm -rf conftest.dir
31829 else
31830 am_cv_CC_dependencies_compiler_type=none
31831 fi
31832
31833 fi
31834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
31835 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
31836 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
31837
31838 if
31839 test "x$enable_dependency_tracking" != xno \
31840 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
31841 am__fastdepCC_TRUE=
31842 am__fastdepCC_FALSE='#'
31843 else
31844 am__fastdepCC_TRUE='#'
31845 am__fastdepCC_FALSE=
31846 fi
31847
31848
31849
31850 # POSIX will say in a future version that running "rm -f" with no argument
31851 # is OK; and we want to be able to make that assumption in our Makefile
31852 # recipes. So use an aggressive probe to check that the usage we want is
31853 # actually supported "in the wild" to an acceptable degree.
31854 # See automake bug#10828.
31855 # To make any issue more visible, cause the running configure to be aborted
31856 # by default if the 'rm' program in use doesn't match our expectations; the
31857 # user can still override this though.
31858 if rm -f && rm -fr && rm -rf; then : OK; else
31859 cat >&2 <<'END'
31860 Oops!
31861
31862 Your 'rm' program seems unable to run without file operands specified
31863 on the command line, even when the '-f' option is present. This is contrary
31864 to the behaviour of most rm programs out there, and not conforming with
31865 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
31866
31867 Please tell bug-automake@gnu.org about your system, including the value
31868 of your $PATH and any error possibly output before this message. This
31869 can help us improve future automake versions.
31870
31871 END
31872 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
31873 echo 'Configuration will proceed anyway, since you have set the' >&2
31874 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
31875 echo >&2
31876 else
31877 cat >&2 <<'END'
31878 Aborting the configuration process, to ensure you take notice of the issue.
31879
31880 You can download and install GNU coreutils to get an 'rm' implementation
31881 that behaves properly: <http://www.gnu.org/software/coreutils/>.
31882
31883 If you want to complete the configuration process using your problematic
31884 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
31885 to "yes", and re-run configure.
31886
31887 END
31888 as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
31889 fi
31890 fi
31891
31892
31893 # Check whether --enable-silent-rules was given.
31894 if test "${enable_silent_rules+set}" = set; then :
31895 enableval=$enable_silent_rules;
31896 fi
31897
31898 case $enable_silent_rules in # (((
31899 yes) AM_DEFAULT_VERBOSITY=0;;
31900 no) AM_DEFAULT_VERBOSITY=1;;
31901 *) AM_DEFAULT_VERBOSITY=0;;
31902 esac
31903 am_make=${MAKE-make}
31904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
31905 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
31906 if ${am_cv_make_support_nested_variables+:} false; then :
31907 $as_echo_n "(cached) " >&6
31908 else
31909 if $as_echo 'TRUE=$(BAR$(V))
31910 BAR0=false
31911 BAR1=true
31912 V=1
31913 am__doit:
31914 @$(TRUE)
31915 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
31916 am_cv_make_support_nested_variables=yes
31917 else
31918 am_cv_make_support_nested_variables=no
31919 fi
31920 fi
31921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
31922 $as_echo "$am_cv_make_support_nested_variables" >&6; }
31923 if test $am_cv_make_support_nested_variables = yes; then
31924 AM_V='$(V)'
31925 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
31926 else
31927 AM_V=$AM_DEFAULT_VERBOSITY
31928 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
31929 fi
31930 AM_BACKSLASH='\'
31931
31932
31933 # --------------------- #
31934 # Checks for programs. #
31935 # --------------------- #
31936
31937
31938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
31939 $as_echo_n "checking whether ln -s works... " >&6; }
31940 LN_S=$as_ln_s
31941 if test "$LN_S" = "ln -s"; then
31942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31943 $as_echo "yes" >&6; }
31944 else
31945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
31946 $as_echo "no, using $LN_S" >&6; }
31947 fi
31948
31949 if test -n "$ac_tool_prefix"; then
31950 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
31951 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
31952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31953 $as_echo_n "checking for $ac_word... " >&6; }
31954 if ${ac_cv_prog_RANLIB+:} false; then :
31955 $as_echo_n "(cached) " >&6
31956 else
31957 if test -n "$RANLIB"; then
31958 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
31959 else
31960 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31961 for as_dir in $PATH
31962 do
31963 IFS=$as_save_IFS
31964 test -z "$as_dir" && as_dir=.
31965 for ac_exec_ext in '' $ac_executable_extensions; do
31966 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31967 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
31968 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31969 break 2
31970 fi
31971 done
31972 done
31973 IFS=$as_save_IFS
31974
31975 fi
31976 fi
31977 RANLIB=$ac_cv_prog_RANLIB
31978 if test -n "$RANLIB"; then
31979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
31980 $as_echo "$RANLIB" >&6; }
31981 else
31982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31983 $as_echo "no" >&6; }
31984 fi
31985
31986
31987 fi
31988 if test -z "$ac_cv_prog_RANLIB"; then
31989 ac_ct_RANLIB=$RANLIB
31990 # Extract the first word of "ranlib", so it can be a program name with args.
31991 set dummy ranlib; ac_word=$2
31992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31993 $as_echo_n "checking for $ac_word... " >&6; }
31994 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
31995 $as_echo_n "(cached) " >&6
31996 else
31997 if test -n "$ac_ct_RANLIB"; then
31998 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
31999 else
32000 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32001 for as_dir in $PATH
32002 do
32003 IFS=$as_save_IFS
32004 test -z "$as_dir" && as_dir=.
32005 for ac_exec_ext in '' $ac_executable_extensions; do
32006 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32007 ac_cv_prog_ac_ct_RANLIB="ranlib"
32008 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32009 break 2
32010 fi
32011 done
32012 done
32013 IFS=$as_save_IFS
32014
32015 fi
32016 fi
32017 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
32018 if test -n "$ac_ct_RANLIB"; then
32019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
32020 $as_echo "$ac_ct_RANLIB" >&6; }
32021 else
32022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32023 $as_echo "no" >&6; }
32024 fi
32025
32026 if test "x$ac_ct_RANLIB" = x; then
32027 RANLIB=":"
32028 else
32029 case $cross_compiling:$ac_tool_warned in
32030 yes:)
32031 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32032 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32033 ac_tool_warned=yes ;;
32034 esac
32035 RANLIB=$ac_ct_RANLIB
32036 fi
32037 else
32038 RANLIB="$ac_cv_prog_RANLIB"
32039 fi
32040
32041
32042 if test -n "$ac_tool_prefix"; then
32043 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
32044 set dummy ${ac_tool_prefix}ar; ac_word=$2
32045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32046 $as_echo_n "checking for $ac_word... " >&6; }
32047 if ${ac_cv_prog_AR+:} false; then :
32048 $as_echo_n "(cached) " >&6
32049 else
32050 if test -n "$AR"; then
32051 ac_cv_prog_AR="$AR" # Let the user override the test.
32052 else
32053 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32054 for as_dir in $PATH
32055 do
32056 IFS=$as_save_IFS
32057 test -z "$as_dir" && as_dir=.
32058 for ac_exec_ext in '' $ac_executable_extensions; do
32059 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32060 ac_cv_prog_AR="${ac_tool_prefix}ar"
32061 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32062 break 2
32063 fi
32064 done
32065 done
32066 IFS=$as_save_IFS
32067
32068 fi
32069 fi
32070 AR=$ac_cv_prog_AR
32071 if test -n "$AR"; then
32072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32073 $as_echo "$AR" >&6; }
32074 else
32075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32076 $as_echo "no" >&6; }
32077 fi
32078
32079
32080 fi
32081 if test -z "$ac_cv_prog_AR"; then
32082 ac_ct_AR=$AR
32083 # Extract the first word of "ar", so it can be a program name with args.
32084 set dummy ar; ac_word=$2
32085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32086 $as_echo_n "checking for $ac_word... " >&6; }
32087 if ${ac_cv_prog_ac_ct_AR+:} false; then :
32088 $as_echo_n "(cached) " >&6
32089 else
32090 if test -n "$ac_ct_AR"; then
32091 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32092 else
32093 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32094 for as_dir in $PATH
32095 do
32096 IFS=$as_save_IFS
32097 test -z "$as_dir" && as_dir=.
32098 for ac_exec_ext in '' $ac_executable_extensions; do
32099 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32100 ac_cv_prog_ac_ct_AR="ar"
32101 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32102 break 2
32103 fi
32104 done
32105 done
32106 IFS=$as_save_IFS
32107
32108 fi
32109 fi
32110 ac_ct_AR=$ac_cv_prog_ac_ct_AR
32111 if test -n "$ac_ct_AR"; then
32112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32113 $as_echo "$ac_ct_AR" >&6; }
32114 else
32115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32116 $as_echo "no" >&6; }
32117 fi
32118
32119 if test "x$ac_ct_AR" = x; then
32120 AR=""
32121 else
32122 case $cross_compiling:$ac_tool_warned in
32123 yes:)
32124 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32125 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32126 ac_tool_warned=yes ;;
32127 esac
32128 AR=$ac_ct_AR
32129 fi
32130 else
32131 AR="$ac_cv_prog_AR"
32132 fi
32133
32134
32135 # ---------------------- #
32136 # Checks for libraries. #
32137 # ---------------------- #
32138
32139 ac_config_files="$ac_config_files Makefile.gnulib.inc"
32140
32141
32142 ac_config_files="$ac_config_files Makefile import/Makefile"
32143
32144 ac_config_commands="$ac_config_commands default"
32145
32146 cat >confcache <<\_ACEOF
32147 # This file is a shell script that caches the results of configure
32148 # tests run on this system so they can be shared between configure
32149 # scripts and configure runs, see configure's option --config-cache.
32150 # It is not useful on other systems. If it contains results you don't
32151 # want to keep, you may remove or edit it.
32152 #
32153 # config.status only pays attention to the cache file if you give it
32154 # the --recheck option to rerun configure.
32155 #
32156 # `ac_cv_env_foo' variables (set or unset) will be overridden when
32157 # loading this file, other *unset* `ac_cv_foo' will be assigned the
32158 # following values.
32159
32160 _ACEOF
32161
32162 # The following way of writing the cache mishandles newlines in values,
32163 # but we know of no workaround that is simple, portable, and efficient.
32164 # So, we kill variables containing newlines.
32165 # Ultrix sh set writes to stderr and can't be redirected directly,
32166 # and sets the high bit in the cache file unless we assign to the vars.
32167 (
32168 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
32169 eval ac_val=\$$ac_var
32170 case $ac_val in #(
32171 *${as_nl}*)
32172 case $ac_var in #(
32173 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
32174 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
32175 esac
32176 case $ac_var in #(
32177 _ | IFS | as_nl) ;; #(
32178 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
32179 *) { eval $ac_var=; unset $ac_var;} ;;
32180 esac ;;
32181 esac
32182 done
32183
32184 (set) 2>&1 |
32185 case $as_nl`(ac_space=' '; set) 2>&1` in #(
32186 *${as_nl}ac_space=\ *)
32187 # `set' does not quote correctly, so add quotes: double-quote
32188 # substitution turns \\\\ into \\, and sed turns \\ into \.
32189 sed -n \
32190 "s/'/'\\\\''/g;
32191 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
32192 ;; #(
32193 *)
32194 # `set' quotes correctly as required by POSIX, so do not add quotes.
32195 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
32196 ;;
32197 esac |
32198 sort
32199 ) |
32200 sed '
32201 /^ac_cv_env_/b end
32202 t clear
32203 :clear
32204 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
32205 t end
32206 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
32207 :end' >>confcache
32208 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
32209 if test -w "$cache_file"; then
32210 if test "x$cache_file" != "x/dev/null"; then
32211 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
32212 $as_echo "$as_me: updating cache $cache_file" >&6;}
32213 if test ! -f "$cache_file" || test -h "$cache_file"; then
32214 cat confcache >"$cache_file"
32215 else
32216 case $cache_file in #(
32217 */* | ?:*)
32218 mv -f confcache "$cache_file"$$ &&
32219 mv -f "$cache_file"$$ "$cache_file" ;; #(
32220 *)
32221 mv -f confcache "$cache_file" ;;
32222 esac
32223 fi
32224 fi
32225 else
32226 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
32227 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
32228 fi
32229 fi
32230 rm -f confcache
32231
32232 test "x$prefix" = xNONE && prefix=$ac_default_prefix
32233 # Let make expand exec_prefix.
32234 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
32235
32236 DEFS=-DHAVE_CONFIG_H
32237
32238 ac_libobjs=
32239 ac_ltlibobjs=
32240 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
32241 # 1. Remove the extension, and $U if already installed.
32242 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
32243 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
32244 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
32245 # will be set to the directory where LIBOBJS objects are built.
32246 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
32247 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
32248 done
32249 LIBOBJS=$ac_libobjs
32250
32251 LTLIBOBJS=$ac_ltlibobjs
32252
32253
32254 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
32255 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
32256 Usually this means the macro was only invoked conditionally." "$LINENO" 5
32257 fi
32258 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
32259 as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
32260 Usually this means the macro was only invoked conditionally." "$LINENO" 5
32261 fi
32262 if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
32263 as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
32264 Usually this means the macro was only invoked conditionally." "$LINENO" 5
32265 fi
32266 if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
32267 as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
32268 Usually this means the macro was only invoked conditionally." "$LINENO" 5
32269 fi
32270 if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
32271 as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
32272 Usually this means the macro was only invoked conditionally." "$LINENO" 5
32273 fi
32274 if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
32275 as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
32276 Usually this means the macro was only invoked conditionally." "$LINENO" 5
32277 fi
32278 if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
32279 as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
32280 Usually this means the macro was only invoked conditionally." "$LINENO" 5
32281 fi
32282 if test -z "${GL_GENERATE_GLOB_H_TRUE}" && test -z "${GL_GENERATE_GLOB_H_FALSE}"; then
32283 as_fn_error $? "conditional \"GL_GENERATE_GLOB_H\" was never defined.
32284 Usually this means the macro was only invoked conditionally." "$LINENO" 5
32285 fi
32286 if test -z "${GL_GENERATE_GLOB_H_TRUE}" && test -z "${GL_GENERATE_GLOB_H_FALSE}"; then
32287 as_fn_error $? "conditional \"GL_GENERATE_GLOB_H\" was never defined.
32288 Usually this means the macro was only invoked conditionally." "$LINENO" 5
32289 fi
32290 if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
32291 as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
32292 Usually this means the macro was only invoked conditionally." "$LINENO" 5
32293 fi
32294 if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
32295 as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
32296 Usually this means the macro was only invoked conditionally." "$LINENO" 5
32297 fi
32298 if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
32299 as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
32300 Usually this means the macro was only invoked conditionally." "$LINENO" 5
32301 fi
32302
32303
32304 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
32305 as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
32306 Usually this means the macro was only invoked conditionally." "$LINENO" 5
32307 fi
32308 if test -z "${GL_GENERATE_NETINET_IN_H_TRUE}" && test -z "${GL_GENERATE_NETINET_IN_H_FALSE}"; then
32309 as_fn_error $? "conditional \"GL_GENERATE_NETINET_IN_H\" was never defined.
32310 Usually this means the macro was only invoked conditionally." "$LINENO" 5
32311 fi
32312 if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
32313 as_fn_error $? "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
32314 Usually this means the macro was only invoked conditionally." "$LINENO" 5
32315 fi
32316 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
32317 as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
32318 Usually this means the macro was only invoked conditionally." "$LINENO" 5
32319 fi
32320 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
32321 as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
32322 Usually this means the macro was only invoked conditionally." "$LINENO" 5
32323 fi
32324
32325 gl_libobjs=
32326 gl_ltlibobjs=
32327 if test -n "$gl_LIBOBJS"; then
32328 # Remove the extension.
32329 sed_drop_objext='s/\.o$//;s/\.obj$//'
32330 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
32331 gl_libobjs="$gl_libobjs $i.$ac_objext"
32332 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
32333 done
32334 fi
32335 gl_LIBOBJS=$gl_libobjs
32336
32337 gl_LTLIBOBJS=$gl_ltlibobjs
32338
32339
32340
32341 gltests_libobjs=
32342 gltests_ltlibobjs=
32343 if test -n "$gltests_LIBOBJS"; then
32344 # Remove the extension.
32345 sed_drop_objext='s/\.o$//;s/\.obj$//'
32346 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
32347 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
32348 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
32349 done
32350 fi
32351 gltests_LIBOBJS=$gltests_libobjs
32352
32353 gltests_LTLIBOBJS=$gltests_ltlibobjs
32354
32355
32356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
32357 $as_echo_n "checking that generated files are newer than configure... " >&6; }
32358 if test -n "$am_sleep_pid"; then
32359 # Hide warnings about reused PIDs.
32360 wait $am_sleep_pid 2>/dev/null
32361 fi
32362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
32363 $as_echo "done" >&6; }
32364 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
32365 as_fn_error $? "conditional \"AMDEP\" was never defined.
32366 Usually this means the macro was only invoked conditionally." "$LINENO" 5
32367 fi
32368 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
32369 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
32370 Usually this means the macro was only invoked conditionally." "$LINENO" 5
32371 fi
32372 if test -n "$EXEEXT"; then
32373 am__EXEEXT_TRUE=
32374 am__EXEEXT_FALSE='#'
32375 else
32376 am__EXEEXT_TRUE='#'
32377 am__EXEEXT_FALSE=
32378 fi
32379
32380
32381 : "${CONFIG_STATUS=./config.status}"
32382 ac_write_fail=0
32383 ac_clean_files_save=$ac_clean_files
32384 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
32385 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
32386 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
32387 as_write_fail=0
32388 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
32389 #! $SHELL
32390 # Generated by $as_me.
32391 # Run this file to recreate the current configuration.
32392 # Compiler output produced by configure, useful for debugging
32393 # configure, is in config.log if it exists.
32394
32395 debug=false
32396 ac_cs_recheck=false
32397 ac_cs_silent=false
32398
32399 SHELL=\${CONFIG_SHELL-$SHELL}
32400 export SHELL
32401 _ASEOF
32402 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
32403 ## -------------------- ##
32404 ## M4sh Initialization. ##
32405 ## -------------------- ##
32406
32407 # Be more Bourne compatible
32408 DUALCASE=1; export DUALCASE # for MKS sh
32409 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
32410 emulate sh
32411 NULLCMD=:
32412 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
32413 # is contrary to our usage. Disable this feature.
32414 alias -g '${1+"$@"}'='"$@"'
32415 setopt NO_GLOB_SUBST
32416 else
32417 case `(set -o) 2>/dev/null` in #(
32418 *posix*) :
32419 set -o posix ;; #(
32420 *) :
32421 ;;
32422 esac
32423 fi
32424
32425
32426 as_nl='
32427 '
32428 export as_nl
32429 # Printing a long string crashes Solaris 7 /usr/bin/printf.
32430 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
32431 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
32432 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
32433 # Prefer a ksh shell builtin over an external printf program on Solaris,
32434 # but without wasting forks for bash or zsh.
32435 if test -z "$BASH_VERSION$ZSH_VERSION" \
32436 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
32437 as_echo='print -r --'
32438 as_echo_n='print -rn --'
32439 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
32440 as_echo='printf %s\n'
32441 as_echo_n='printf %s'
32442 else
32443 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
32444 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
32445 as_echo_n='/usr/ucb/echo -n'
32446 else
32447 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
32448 as_echo_n_body='eval
32449 arg=$1;
32450 case $arg in #(
32451 *"$as_nl"*)
32452 expr "X$arg" : "X\\(.*\\)$as_nl";
32453 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
32454 esac;
32455 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
32456 '
32457 export as_echo_n_body
32458 as_echo_n='sh -c $as_echo_n_body as_echo'
32459 fi
32460 export as_echo_body
32461 as_echo='sh -c $as_echo_body as_echo'
32462 fi
32463
32464 # The user is always right.
32465 if test "${PATH_SEPARATOR+set}" != set; then
32466 PATH_SEPARATOR=:
32467 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
32468 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
32469 PATH_SEPARATOR=';'
32470 }
32471 fi
32472
32473
32474 # IFS
32475 # We need space, tab and new line, in precisely that order. Quoting is
32476 # there to prevent editors from complaining about space-tab.
32477 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
32478 # splitting by setting IFS to empty value.)
32479 IFS=" "" $as_nl"
32480
32481 # Find who we are. Look in the path if we contain no directory separator.
32482 as_myself=
32483 case $0 in #((
32484 *[\\/]* ) as_myself=$0 ;;
32485 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32486 for as_dir in $PATH
32487 do
32488 IFS=$as_save_IFS
32489 test -z "$as_dir" && as_dir=.
32490 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
32491 done
32492 IFS=$as_save_IFS
32493
32494 ;;
32495 esac
32496 # We did not find ourselves, most probably we were run as `sh COMMAND'
32497 # in which case we are not to be found in the path.
32498 if test "x$as_myself" = x; then
32499 as_myself=$0
32500 fi
32501 if test ! -f "$as_myself"; then
32502 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
32503 exit 1
32504 fi
32505
32506 # Unset variables that we do not need and which cause bugs (e.g. in
32507 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
32508 # suppresses any "Segmentation fault" message there. '((' could
32509 # trigger a bug in pdksh 5.2.14.
32510 for as_var in BASH_ENV ENV MAIL MAILPATH
32511 do eval test x\${$as_var+set} = xset \
32512 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
32513 done
32514 PS1='$ '
32515 PS2='> '
32516 PS4='+ '
32517
32518 # NLS nuisances.
32519 LC_ALL=C
32520 export LC_ALL
32521 LANGUAGE=C
32522 export LANGUAGE
32523
32524 # CDPATH.
32525 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
32526
32527
32528 # as_fn_error STATUS ERROR [LINENO LOG_FD]
32529 # ----------------------------------------
32530 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
32531 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
32532 # script with STATUS, using 1 if that was 0.
32533 as_fn_error ()
32534 {
32535 as_status=$1; test $as_status -eq 0 && as_status=1
32536 if test "$4"; then
32537 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
32538 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
32539 fi
32540 $as_echo "$as_me: error: $2" >&2
32541 as_fn_exit $as_status
32542 } # as_fn_error
32543
32544
32545 # as_fn_set_status STATUS
32546 # -----------------------
32547 # Set $? to STATUS, without forking.
32548 as_fn_set_status ()
32549 {
32550 return $1
32551 } # as_fn_set_status
32552
32553 # as_fn_exit STATUS
32554 # -----------------
32555 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
32556 as_fn_exit ()
32557 {
32558 set +e
32559 as_fn_set_status $1
32560 exit $1
32561 } # as_fn_exit
32562
32563 # as_fn_unset VAR
32564 # ---------------
32565 # Portably unset VAR.
32566 as_fn_unset ()
32567 {
32568 { eval $1=; unset $1;}
32569 }
32570 as_unset=as_fn_unset
32571 # as_fn_append VAR VALUE
32572 # ----------------------
32573 # Append the text in VALUE to the end of the definition contained in VAR. Take
32574 # advantage of any shell optimizations that allow amortized linear growth over
32575 # repeated appends, instead of the typical quadratic growth present in naive
32576 # implementations.
32577 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
32578 eval 'as_fn_append ()
32579 {
32580 eval $1+=\$2
32581 }'
32582 else
32583 as_fn_append ()
32584 {
32585 eval $1=\$$1\$2
32586 }
32587 fi # as_fn_append
32588
32589 # as_fn_arith ARG...
32590 # ------------------
32591 # Perform arithmetic evaluation on the ARGs, and store the result in the
32592 # global $as_val. Take advantage of shells that can avoid forks. The arguments
32593 # must be portable across $(()) and expr.
32594 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
32595 eval 'as_fn_arith ()
32596 {
32597 as_val=$(( $* ))
32598 }'
32599 else
32600 as_fn_arith ()
32601 {
32602 as_val=`expr "$@" || test $? -eq 1`
32603 }
32604 fi # as_fn_arith
32605
32606
32607 if expr a : '\(a\)' >/dev/null 2>&1 &&
32608 test "X`expr 00001 : '.*\(...\)'`" = X001; then
32609 as_expr=expr
32610 else
32611 as_expr=false
32612 fi
32613
32614 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
32615 as_basename=basename
32616 else
32617 as_basename=false
32618 fi
32619
32620 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
32621 as_dirname=dirname
32622 else
32623 as_dirname=false
32624 fi
32625
32626 as_me=`$as_basename -- "$0" ||
32627 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
32628 X"$0" : 'X\(//\)$' \| \
32629 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
32630 $as_echo X/"$0" |
32631 sed '/^.*\/\([^/][^/]*\)\/*$/{
32632 s//\1/
32633 q
32634 }
32635 /^X\/\(\/\/\)$/{
32636 s//\1/
32637 q
32638 }
32639 /^X\/\(\/\).*/{
32640 s//\1/
32641 q
32642 }
32643 s/.*/./; q'`
32644
32645 # Avoid depending upon Character Ranges.
32646 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
32647 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
32648 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
32649 as_cr_digits='0123456789'
32650 as_cr_alnum=$as_cr_Letters$as_cr_digits
32651
32652 ECHO_C= ECHO_N= ECHO_T=
32653 case `echo -n x` in #(((((
32654 -n*)
32655 case `echo 'xy\c'` in
32656 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
32657 xy) ECHO_C='\c';;
32658 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
32659 ECHO_T=' ';;
32660 esac;;
32661 *)
32662 ECHO_N='-n';;
32663 esac
32664
32665 rm -f conf$$ conf$$.exe conf$$.file
32666 if test -d conf$$.dir; then
32667 rm -f conf$$.dir/conf$$.file
32668 else
32669 rm -f conf$$.dir
32670 mkdir conf$$.dir 2>/dev/null
32671 fi
32672 if (echo >conf$$.file) 2>/dev/null; then
32673 if ln -s conf$$.file conf$$ 2>/dev/null; then
32674 as_ln_s='ln -s'
32675 # ... but there are two gotchas:
32676 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
32677 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
32678 # In both cases, we have to default to `cp -pR'.
32679 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
32680 as_ln_s='cp -pR'
32681 elif ln conf$$.file conf$$ 2>/dev/null; then
32682 as_ln_s=ln
32683 else
32684 as_ln_s='cp -pR'
32685 fi
32686 else
32687 as_ln_s='cp -pR'
32688 fi
32689 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
32690 rmdir conf$$.dir 2>/dev/null
32691
32692
32693 # as_fn_mkdir_p
32694 # -------------
32695 # Create "$as_dir" as a directory, including parents if necessary.
32696 as_fn_mkdir_p ()
32697 {
32698
32699 case $as_dir in #(
32700 -*) as_dir=./$as_dir;;
32701 esac
32702 test -d "$as_dir" || eval $as_mkdir_p || {
32703 as_dirs=
32704 while :; do
32705 case $as_dir in #(
32706 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
32707 *) as_qdir=$as_dir;;
32708 esac
32709 as_dirs="'$as_qdir' $as_dirs"
32710 as_dir=`$as_dirname -- "$as_dir" ||
32711 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32712 X"$as_dir" : 'X\(//\)[^/]' \| \
32713 X"$as_dir" : 'X\(//\)$' \| \
32714 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
32715 $as_echo X"$as_dir" |
32716 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32717 s//\1/
32718 q
32719 }
32720 /^X\(\/\/\)[^/].*/{
32721 s//\1/
32722 q
32723 }
32724 /^X\(\/\/\)$/{
32725 s//\1/
32726 q
32727 }
32728 /^X\(\/\).*/{
32729 s//\1/
32730 q
32731 }
32732 s/.*/./; q'`
32733 test -d "$as_dir" && break
32734 done
32735 test -z "$as_dirs" || eval "mkdir $as_dirs"
32736 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
32737
32738
32739 } # as_fn_mkdir_p
32740 if mkdir -p . 2>/dev/null; then
32741 as_mkdir_p='mkdir -p "$as_dir"'
32742 else
32743 test -d ./-p && rmdir ./-p
32744 as_mkdir_p=false
32745 fi
32746
32747
32748 # as_fn_executable_p FILE
32749 # -----------------------
32750 # Test if FILE is an executable regular file.
32751 as_fn_executable_p ()
32752 {
32753 test -f "$1" && test -x "$1"
32754 } # as_fn_executable_p
32755 as_test_x='test -x'
32756 as_executable_p=as_fn_executable_p
32757
32758 # Sed expression to map a string onto a valid CPP name.
32759 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
32760
32761 # Sed expression to map a string onto a valid variable name.
32762 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
32763
32764
32765 exec 6>&1
32766 ## ----------------------------------- ##
32767 ## Main body of $CONFIG_STATUS script. ##
32768 ## ----------------------------------- ##
32769 _ASEOF
32770 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
32771
32772 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32773 # Save the log message, to keep $0 and so on meaningful, and to
32774 # report actual input values of CONFIG_FILES etc. instead of their
32775 # values after options handling.
32776 ac_log="
32777 This file was extended by libgnu $as_me UNUSED-VERSION, which was
32778 generated by GNU Autoconf 2.69. Invocation command line was
32779
32780 CONFIG_FILES = $CONFIG_FILES
32781 CONFIG_HEADERS = $CONFIG_HEADERS
32782 CONFIG_LINKS = $CONFIG_LINKS
32783 CONFIG_COMMANDS = $CONFIG_COMMANDS
32784 $ $0 $@
32785
32786 on `(hostname || uname -n) 2>/dev/null | sed 1q`
32787 "
32788
32789 _ACEOF
32790
32791 case $ac_config_files in *"
32792 "*) set x $ac_config_files; shift; ac_config_files=$*;;
32793 esac
32794
32795 case $ac_config_headers in *"
32796 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
32797 esac
32798
32799
32800 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32801 # Files that config.status was made for.
32802 config_files="$ac_config_files"
32803 config_headers="$ac_config_headers"
32804 config_commands="$ac_config_commands"
32805
32806 _ACEOF
32807
32808 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32809 ac_cs_usage="\
32810 \`$as_me' instantiates files and other configuration actions
32811 from templates according to the current configuration. Unless the files
32812 and actions are specified as TAGs, all are instantiated by default.
32813
32814 Usage: $0 [OPTION]... [TAG]...
32815
32816 -h, --help print this help, then exit
32817 -V, --version print version number and configuration settings, then exit
32818 --config print configuration, then exit
32819 -q, --quiet, --silent
32820 do not print progress messages
32821 -d, --debug don't remove temporary files
32822 --recheck update $as_me by reconfiguring in the same conditions
32823 --file=FILE[:TEMPLATE]
32824 instantiate the configuration file FILE
32825 --header=FILE[:TEMPLATE]
32826 instantiate the configuration header FILE
32827
32828 Configuration files:
32829 $config_files
32830
32831 Configuration headers:
32832 $config_headers
32833
32834 Configuration commands:
32835 $config_commands
32836
32837 Report bugs to the package provider."
32838
32839 _ACEOF
32840 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32841 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
32842 ac_cs_version="\\
32843 libgnu config.status UNUSED-VERSION
32844 configured by $0, generated by GNU Autoconf 2.69,
32845 with options \\"\$ac_cs_config\\"
32846
32847 Copyright (C) 2012 Free Software Foundation, Inc.
32848 This config.status script is free software; the Free Software Foundation
32849 gives unlimited permission to copy, distribute and modify it."
32850
32851 ac_pwd='$ac_pwd'
32852 srcdir='$srcdir'
32853 INSTALL='$INSTALL'
32854 MKDIR_P='$MKDIR_P'
32855 AWK='$AWK'
32856 test -n "\$AWK" || AWK=awk
32857 _ACEOF
32858
32859 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32860 # The default lists apply if the user does not specify any file.
32861 ac_need_defaults=:
32862 while test $# != 0
32863 do
32864 case $1 in
32865 --*=?*)
32866 ac_option=`expr "X$1" : 'X\([^=]*\)='`
32867 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
32868 ac_shift=:
32869 ;;
32870 --*=)
32871 ac_option=`expr "X$1" : 'X\([^=]*\)='`
32872 ac_optarg=
32873 ac_shift=:
32874 ;;
32875 *)
32876 ac_option=$1
32877 ac_optarg=$2
32878 ac_shift=shift
32879 ;;
32880 esac
32881
32882 case $ac_option in
32883 # Handling of the options.
32884 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
32885 ac_cs_recheck=: ;;
32886 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
32887 $as_echo "$ac_cs_version"; exit ;;
32888 --config | --confi | --conf | --con | --co | --c )
32889 $as_echo "$ac_cs_config"; exit ;;
32890 --debug | --debu | --deb | --de | --d | -d )
32891 debug=: ;;
32892 --file | --fil | --fi | --f )
32893 $ac_shift
32894 case $ac_optarg in
32895 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32896 '') as_fn_error $? "missing file argument" ;;
32897 esac
32898 as_fn_append CONFIG_FILES " '$ac_optarg'"
32899 ac_need_defaults=false;;
32900 --header | --heade | --head | --hea )
32901 $ac_shift
32902 case $ac_optarg in
32903 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32904 esac
32905 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
32906 ac_need_defaults=false;;
32907 --he | --h)
32908 # Conflict between --help and --header
32909 as_fn_error $? "ambiguous option: \`$1'
32910 Try \`$0 --help' for more information.";;
32911 --help | --hel | -h )
32912 $as_echo "$ac_cs_usage"; exit ;;
32913 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
32914 | -silent | --silent | --silen | --sile | --sil | --si | --s)
32915 ac_cs_silent=: ;;
32916
32917 # This is an error.
32918 -*) as_fn_error $? "unrecognized option: \`$1'
32919 Try \`$0 --help' for more information." ;;
32920
32921 *) as_fn_append ac_config_targets " $1"
32922 ac_need_defaults=false ;;
32923
32924 esac
32925 shift
32926 done
32927
32928 ac_configure_extra_args=
32929
32930 if $ac_cs_silent; then
32931 exec 6>/dev/null
32932 ac_configure_extra_args="$ac_configure_extra_args --silent"
32933 fi
32934
32935 _ACEOF
32936 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32937 if \$ac_cs_recheck; then
32938 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
32939 shift
32940 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
32941 CONFIG_SHELL='$SHELL'
32942 export CONFIG_SHELL
32943 exec "\$@"
32944 fi
32945
32946 _ACEOF
32947 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32948 exec 5>>config.log
32949 {
32950 echo
32951 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
32952 ## Running $as_me. ##
32953 _ASBOX
32954 $as_echo "$ac_log"
32955 } >&5
32956
32957 _ACEOF
32958 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32959 #
32960 # INIT-COMMANDS
32961 #
32962 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
32963
32964 _ACEOF
32965
32966 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32967
32968 # Handling of arguments.
32969 for ac_config_target in $ac_config_targets
32970 do
32971 case $ac_config_target in
32972 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
32973 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
32974 "Makefile.gnulib.inc") CONFIG_FILES="$CONFIG_FILES Makefile.gnulib.inc" ;;
32975 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
32976 "import/Makefile") CONFIG_FILES="$CONFIG_FILES import/Makefile" ;;
32977 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
32978
32979 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
32980 esac
32981 done
32982
32983
32984 # If the user did not use the arguments to specify the items to instantiate,
32985 # then the envvar interface is used. Set only those that are not.
32986 # We use the long form for the default assignment because of an extremely
32987 # bizarre bug on SunOS 4.1.3.
32988 if $ac_need_defaults; then
32989 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
32990 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
32991 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
32992 fi
32993
32994 # Have a temporary directory for convenience. Make it in the build tree
32995 # simply because there is no reason against having it here, and in addition,
32996 # creating and moving files from /tmp can sometimes cause problems.
32997 # Hook for its removal unless debugging.
32998 # Note that there is a small window in which the directory will not be cleaned:
32999 # after its creation but before its name has been assigned to `$tmp'.
33000 $debug ||
33001 {
33002 tmp= ac_tmp=
33003 trap 'exit_status=$?
33004 : "${ac_tmp:=$tmp}"
33005 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
33006 ' 0
33007 trap 'as_fn_exit 1' 1 2 13 15
33008 }
33009 # Create a (secure) tmp directory for tmp files.
33010
33011 {
33012 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
33013 test -d "$tmp"
33014 } ||
33015 {
33016 tmp=./conf$$-$RANDOM
33017 (umask 077 && mkdir "$tmp")
33018 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
33019 ac_tmp=$tmp
33020
33021 # Set up the scripts for CONFIG_FILES section.
33022 # No need to generate them if there are no CONFIG_FILES.
33023 # This happens for instance with `./config.status config.h'.
33024 if test -n "$CONFIG_FILES"; then
33025
33026
33027 ac_cr=`echo X | tr X '\015'`
33028 # On cygwin, bash can eat \r inside `` if the user requested igncr.
33029 # But we know of no other shell where ac_cr would be empty at this
33030 # point, so we can use a bashism as a fallback.
33031 if test "x$ac_cr" = x; then
33032 eval ac_cr=\$\'\\r\'
33033 fi
33034 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
33035 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
33036 ac_cs_awk_cr='\\r'
33037 else
33038 ac_cs_awk_cr=$ac_cr
33039 fi
33040
33041 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
33042 _ACEOF
33043
33044
33045 {
33046 echo "cat >conf$$subs.awk <<_ACEOF" &&
33047 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
33048 echo "_ACEOF"
33049 } >conf$$subs.sh ||
33050 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
33051 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
33052 ac_delim='%!_!# '
33053 for ac_last_try in false false false false false :; do
33054 . ./conf$$subs.sh ||
33055 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
33056
33057 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
33058 if test $ac_delim_n = $ac_delim_num; then
33059 break
33060 elif $ac_last_try; then
33061 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
33062 else
33063 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
33064 fi
33065 done
33066 rm -f conf$$subs.sh
33067
33068 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33069 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
33070 _ACEOF
33071 sed -n '
33072 h
33073 s/^/S["/; s/!.*/"]=/
33074 p
33075 g
33076 s/^[^!]*!//
33077 :repl
33078 t repl
33079 s/'"$ac_delim"'$//
33080 t delim
33081 :nl
33082 h
33083 s/\(.\{148\}\)..*/\1/
33084 t more1
33085 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
33086 p
33087 n
33088 b repl
33089 :more1
33090 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
33091 p
33092 g
33093 s/.\{148\}//
33094 t nl
33095 :delim
33096 h
33097 s/\(.\{148\}\)..*/\1/
33098 t more2
33099 s/["\\]/\\&/g; s/^/"/; s/$/"/
33100 p
33101 b
33102 :more2
33103 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
33104 p
33105 g
33106 s/.\{148\}//
33107 t delim
33108 ' <conf$$subs.awk | sed '
33109 /^[^""]/{
33110 N
33111 s/\n//
33112 }
33113 ' >>$CONFIG_STATUS || ac_write_fail=1
33114 rm -f conf$$subs.awk
33115 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33116 _ACAWK
33117 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
33118 for (key in S) S_is_set[key] = 1
33119 FS = "\a"
33120
33121 }
33122 {
33123 line = $ 0
33124 nfields = split(line, field, "@")
33125 substed = 0
33126 len = length(field[1])
33127 for (i = 2; i < nfields; i++) {
33128 key = field[i]
33129 keylen = length(key)
33130 if (S_is_set[key]) {
33131 value = S[key]
33132 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
33133 len += length(value) + length(field[++i])
33134 substed = 1
33135 } else
33136 len += 1 + keylen
33137 }
33138
33139 print line
33140 }
33141
33142 _ACAWK
33143 _ACEOF
33144 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33145 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
33146 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
33147 else
33148 cat
33149 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
33150 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
33151 _ACEOF
33152
33153 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
33154 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
33155 # trailing colons and then remove the whole line if VPATH becomes empty
33156 # (actually we leave an empty line to preserve line numbers).
33157 if test "x$srcdir" = x.; then
33158 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
33159 h
33160 s///
33161 s/^/:/
33162 s/[ ]*$/:/
33163 s/:\$(srcdir):/:/g
33164 s/:\${srcdir}:/:/g
33165 s/:@srcdir@:/:/g
33166 s/^:*//
33167 s/:*$//
33168 x
33169 s/\(=[ ]*\).*/\1/
33170 G
33171 s/\n//
33172 s/^[^=]*=[ ]*$//
33173 }'
33174 fi
33175
33176 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33177 fi # test -n "$CONFIG_FILES"
33178
33179 # Set up the scripts for CONFIG_HEADERS section.
33180 # No need to generate them if there are no CONFIG_HEADERS.
33181 # This happens for instance with `./config.status Makefile'.
33182 if test -n "$CONFIG_HEADERS"; then
33183 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
33184 BEGIN {
33185 _ACEOF
33186
33187 # Transform confdefs.h into an awk script `defines.awk', embedded as
33188 # here-document in config.status, that substitutes the proper values into
33189 # config.h.in to produce config.h.
33190
33191 # Create a delimiter string that does not exist in confdefs.h, to ease
33192 # handling of long lines.
33193 ac_delim='%!_!# '
33194 for ac_last_try in false false :; do
33195 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
33196 if test -z "$ac_tt"; then
33197 break
33198 elif $ac_last_try; then
33199 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
33200 else
33201 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
33202 fi
33203 done
33204
33205 # For the awk script, D is an array of macro values keyed by name,
33206 # likewise P contains macro parameters if any. Preserve backslash
33207 # newline sequences.
33208
33209 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
33210 sed -n '
33211 s/.\{148\}/&'"$ac_delim"'/g
33212 t rset
33213 :rset
33214 s/^[ ]*#[ ]*define[ ][ ]*/ /
33215 t def
33216 d
33217 :def
33218 s/\\$//
33219 t bsnl
33220 s/["\\]/\\&/g
33221 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
33222 D["\1"]=" \3"/p
33223 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
33224 d
33225 :bsnl
33226 s/["\\]/\\&/g
33227 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
33228 D["\1"]=" \3\\\\\\n"\\/p
33229 t cont
33230 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
33231 t cont
33232 d
33233 :cont
33234 n
33235 s/.\{148\}/&'"$ac_delim"'/g
33236 t clear
33237 :clear
33238 s/\\$//
33239 t bsnlc
33240 s/["\\]/\\&/g; s/^/"/; s/$/"/p
33241 d
33242 :bsnlc
33243 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
33244 b cont
33245 ' <confdefs.h | sed '
33246 s/'"$ac_delim"'/"\\\
33247 "/g' >>$CONFIG_STATUS || ac_write_fail=1
33248
33249 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33250 for (key in D) D_is_set[key] = 1
33251 FS = "\a"
33252 }
33253 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
33254 line = \$ 0
33255 split(line, arg, " ")
33256 if (arg[1] == "#") {
33257 defundef = arg[2]
33258 mac1 = arg[3]
33259 } else {
33260 defundef = substr(arg[1], 2)
33261 mac1 = arg[2]
33262 }
33263 split(mac1, mac2, "(") #)
33264 macro = mac2[1]
33265 prefix = substr(line, 1, index(line, defundef) - 1)
33266 if (D_is_set[macro]) {
33267 # Preserve the white space surrounding the "#".
33268 print prefix "define", macro P[macro] D[macro]
33269 next
33270 } else {
33271 # Replace #undef with comments. This is necessary, for example,
33272 # in the case of _POSIX_SOURCE, which is predefined and required
33273 # on some systems where configure will not decide to define it.
33274 if (defundef == "undef") {
33275 print "/*", prefix defundef, macro, "*/"
33276 next
33277 }
33278 }
33279 }
33280 { print }
33281 _ACAWK
33282 _ACEOF
33283 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33284 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
33285 fi # test -n "$CONFIG_HEADERS"
33286
33287
33288 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
33289 shift
33290 for ac_tag
33291 do
33292 case $ac_tag in
33293 :[FHLC]) ac_mode=$ac_tag; continue;;
33294 esac
33295 case $ac_mode$ac_tag in
33296 :[FHL]*:*);;
33297 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
33298 :[FH]-) ac_tag=-:-;;
33299 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
33300 esac
33301 ac_save_IFS=$IFS
33302 IFS=:
33303 set x $ac_tag
33304 IFS=$ac_save_IFS
33305 shift
33306 ac_file=$1
33307 shift
33308
33309 case $ac_mode in
33310 :L) ac_source=$1;;
33311 :[FH])
33312 ac_file_inputs=
33313 for ac_f
33314 do
33315 case $ac_f in
33316 -) ac_f="$ac_tmp/stdin";;
33317 *) # Look for the file first in the build tree, then in the source tree
33318 # (if the path is not absolute). The absolute path cannot be DOS-style,
33319 # because $ac_f cannot contain `:'.
33320 test -f "$ac_f" ||
33321 case $ac_f in
33322 [\\/$]*) false;;
33323 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
33324 esac ||
33325 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
33326 esac
33327 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
33328 as_fn_append ac_file_inputs " '$ac_f'"
33329 done
33330
33331 # Let's still pretend it is `configure' which instantiates (i.e., don't
33332 # use $as_me), people would be surprised to read:
33333 # /* config.h. Generated by config.status. */
33334 configure_input='Generated from '`
33335 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
33336 `' by configure.'
33337 if test x"$ac_file" != x-; then
33338 configure_input="$ac_file. $configure_input"
33339 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
33340 $as_echo "$as_me: creating $ac_file" >&6;}
33341 fi
33342 # Neutralize special characters interpreted by sed in replacement strings.
33343 case $configure_input in #(
33344 *\&* | *\|* | *\\* )
33345 ac_sed_conf_input=`$as_echo "$configure_input" |
33346 sed 's/[\\\\&|]/\\\\&/g'`;; #(
33347 *) ac_sed_conf_input=$configure_input;;
33348 esac
33349
33350 case $ac_tag in
33351 *:-:* | *:-) cat >"$ac_tmp/stdin" \
33352 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
33353 esac
33354 ;;
33355 esac
33356
33357 ac_dir=`$as_dirname -- "$ac_file" ||
33358 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
33359 X"$ac_file" : 'X\(//\)[^/]' \| \
33360 X"$ac_file" : 'X\(//\)$' \| \
33361 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
33362 $as_echo X"$ac_file" |
33363 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
33364 s//\1/
33365 q
33366 }
33367 /^X\(\/\/\)[^/].*/{
33368 s//\1/
33369 q
33370 }
33371 /^X\(\/\/\)$/{
33372 s//\1/
33373 q
33374 }
33375 /^X\(\/\).*/{
33376 s//\1/
33377 q
33378 }
33379 s/.*/./; q'`
33380 as_dir="$ac_dir"; as_fn_mkdir_p
33381 ac_builddir=.
33382
33383 case "$ac_dir" in
33384 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
33385 *)
33386 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
33387 # A ".." for each directory in $ac_dir_suffix.
33388 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
33389 case $ac_top_builddir_sub in
33390 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
33391 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
33392 esac ;;
33393 esac
33394 ac_abs_top_builddir=$ac_pwd
33395 ac_abs_builddir=$ac_pwd$ac_dir_suffix
33396 # for backward compatibility:
33397 ac_top_builddir=$ac_top_build_prefix
33398
33399 case $srcdir in
33400 .) # We are building in place.
33401 ac_srcdir=.
33402 ac_top_srcdir=$ac_top_builddir_sub
33403 ac_abs_top_srcdir=$ac_pwd ;;
33404 [\\/]* | ?:[\\/]* ) # Absolute name.
33405 ac_srcdir=$srcdir$ac_dir_suffix;
33406 ac_top_srcdir=$srcdir
33407 ac_abs_top_srcdir=$srcdir ;;
33408 *) # Relative name.
33409 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
33410 ac_top_srcdir=$ac_top_build_prefix$srcdir
33411 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
33412 esac
33413 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
33414
33415
33416 case $ac_mode in
33417 :F)
33418 #
33419 # CONFIG_FILE
33420 #
33421
33422 case $INSTALL in
33423 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
33424 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
33425 esac
33426 ac_MKDIR_P=$MKDIR_P
33427 case $MKDIR_P in
33428 [\\/$]* | ?:[\\/]* ) ;;
33429 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
33430 esac
33431 _ACEOF
33432
33433 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33434 # If the template does not know about datarootdir, expand it.
33435 # FIXME: This hack should be removed a few years after 2.60.
33436 ac_datarootdir_hack=; ac_datarootdir_seen=
33437 ac_sed_dataroot='
33438 /datarootdir/ {
33439 p
33440 q
33441 }
33442 /@datadir@/p
33443 /@docdir@/p
33444 /@infodir@/p
33445 /@localedir@/p
33446 /@mandir@/p'
33447 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
33448 *datarootdir*) ac_datarootdir_seen=yes;;
33449 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
33450 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
33451 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
33452 _ACEOF
33453 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33454 ac_datarootdir_hack='
33455 s&@datadir@&$datadir&g
33456 s&@docdir@&$docdir&g
33457 s&@infodir@&$infodir&g
33458 s&@localedir@&$localedir&g
33459 s&@mandir@&$mandir&g
33460 s&\\\${datarootdir}&$datarootdir&g' ;;
33461 esac
33462 _ACEOF
33463
33464 # Neutralize VPATH when `$srcdir' = `.'.
33465 # Shell code in configure.ac might set extrasub.
33466 # FIXME: do we really want to maintain this feature?
33467 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33468 ac_sed_extra="$ac_vpsub
33469 $extrasub
33470 _ACEOF
33471 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33472 :t
33473 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
33474 s|@configure_input@|$ac_sed_conf_input|;t t
33475 s&@top_builddir@&$ac_top_builddir_sub&;t t
33476 s&@top_build_prefix@&$ac_top_build_prefix&;t t
33477 s&@srcdir@&$ac_srcdir&;t t
33478 s&@abs_srcdir@&$ac_abs_srcdir&;t t
33479 s&@top_srcdir@&$ac_top_srcdir&;t t
33480 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
33481 s&@builddir@&$ac_builddir&;t t
33482 s&@abs_builddir@&$ac_abs_builddir&;t t
33483 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
33484 s&@INSTALL@&$ac_INSTALL&;t t
33485 s&@MKDIR_P@&$ac_MKDIR_P&;t t
33486 $ac_datarootdir_hack
33487 "
33488 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
33489 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33490
33491 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
33492 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
33493 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
33494 "$ac_tmp/out"`; test -z "$ac_out"; } &&
33495 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
33496 which seems to be undefined. Please make sure it is defined" >&5
33497 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
33498 which seems to be undefined. Please make sure it is defined" >&2;}
33499
33500 rm -f "$ac_tmp/stdin"
33501 case $ac_file in
33502 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
33503 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
33504 esac \
33505 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33506 ;;
33507 :H)
33508 #
33509 # CONFIG_HEADER
33510 #
33511 if test x"$ac_file" != x-; then
33512 {
33513 $as_echo "/* $configure_input */" \
33514 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
33515 } >"$ac_tmp/config.h" \
33516 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33517 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
33518 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
33519 $as_echo "$as_me: $ac_file is unchanged" >&6;}
33520 else
33521 rm -f "$ac_file"
33522 mv "$ac_tmp/config.h" "$ac_file" \
33523 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33524 fi
33525 else
33526 $as_echo "/* $configure_input */" \
33527 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
33528 || as_fn_error $? "could not create -" "$LINENO" 5
33529 fi
33530 # Compute "$ac_file"'s index in $config_headers.
33531 _am_arg="$ac_file"
33532 _am_stamp_count=1
33533 for _am_header in $config_headers :; do
33534 case $_am_header in
33535 $_am_arg | $_am_arg:* )
33536 break ;;
33537 * )
33538 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
33539 esac
33540 done
33541 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
33542 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
33543 X"$_am_arg" : 'X\(//\)[^/]' \| \
33544 X"$_am_arg" : 'X\(//\)$' \| \
33545 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
33546 $as_echo X"$_am_arg" |
33547 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
33548 s//\1/
33549 q
33550 }
33551 /^X\(\/\/\)[^/].*/{
33552 s//\1/
33553 q
33554 }
33555 /^X\(\/\/\)$/{
33556 s//\1/
33557 q
33558 }
33559 /^X\(\/\).*/{
33560 s//\1/
33561 q
33562 }
33563 s/.*/./; q'`/stamp-h$_am_stamp_count
33564 ;;
33565
33566 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
33567 $as_echo "$as_me: executing $ac_file commands" >&6;}
33568 ;;
33569 esac
33570
33571
33572 case $ac_file$ac_mode in
33573 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
33574 # Older Autoconf quotes --file arguments for eval, but not when files
33575 # are listed without --file. Let's play safe and only enable the eval
33576 # if we detect the quoting.
33577 case $CONFIG_FILES in
33578 *\'*) eval set x "$CONFIG_FILES" ;;
33579 *) set x $CONFIG_FILES ;;
33580 esac
33581 shift
33582 for mf
33583 do
33584 # Strip MF so we end up with the name of the file.
33585 mf=`echo "$mf" | sed -e 's/:.*$//'`
33586 # Check whether this is an Automake generated Makefile or not.
33587 # We used to match only the files named 'Makefile.in', but
33588 # some people rename them; so instead we look at the file content.
33589 # Grep'ing the first line is not enough: some people post-process
33590 # each Makefile.in and add a new line on top of each file to say so.
33591 # Grep'ing the whole file is not good either: AIX grep has a line
33592 # limit of 2048, but all sed's we know have understand at least 4000.
33593 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
33594 dirpart=`$as_dirname -- "$mf" ||
33595 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
33596 X"$mf" : 'X\(//\)[^/]' \| \
33597 X"$mf" : 'X\(//\)$' \| \
33598 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
33599 $as_echo X"$mf" |
33600 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
33601 s//\1/
33602 q
33603 }
33604 /^X\(\/\/\)[^/].*/{
33605 s//\1/
33606 q
33607 }
33608 /^X\(\/\/\)$/{
33609 s//\1/
33610 q
33611 }
33612 /^X\(\/\).*/{
33613 s//\1/
33614 q
33615 }
33616 s/.*/./; q'`
33617 else
33618 continue
33619 fi
33620 # Extract the definition of DEPDIR, am__include, and am__quote
33621 # from the Makefile without running 'make'.
33622 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
33623 test -z "$DEPDIR" && continue
33624 am__include=`sed -n 's/^am__include = //p' < "$mf"`
33625 test -z "$am__include" && continue
33626 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
33627 # Find all dependency output files, they are included files with
33628 # $(DEPDIR) in their names. We invoke sed twice because it is the
33629 # simplest approach to changing $(DEPDIR) to its actual value in the
33630 # expansion.
33631 for file in `sed -n "
33632 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
33633 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
33634 # Make sure the directory exists.
33635 test -f "$dirpart/$file" && continue
33636 fdir=`$as_dirname -- "$file" ||
33637 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
33638 X"$file" : 'X\(//\)[^/]' \| \
33639 X"$file" : 'X\(//\)$' \| \
33640 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
33641 $as_echo X"$file" |
33642 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
33643 s//\1/
33644 q
33645 }
33646 /^X\(\/\/\)[^/].*/{
33647 s//\1/
33648 q
33649 }
33650 /^X\(\/\/\)$/{
33651 s//\1/
33652 q
33653 }
33654 /^X\(\/\).*/{
33655 s//\1/
33656 q
33657 }
33658 s/.*/./; q'`
33659 as_dir=$dirpart/$fdir; as_fn_mkdir_p
33660 # echo "creating $dirpart/$file"
33661 echo '# dummy' > "$dirpart/$file"
33662 done
33663 done
33664 }
33665 ;;
33666 "default":C)
33667 case x$CONFIG_HEADERS in
33668 xconfig.h:config.in)
33669 echo > stamp-h ;;
33670 esac
33671 ;;
33672
33673 esac
33674 done # for ac_tag
33675
33676
33677 as_fn_exit 0
33678 _ACEOF
33679 ac_clean_files=$ac_clean_files_save
33680
33681 test $ac_write_fail = 0 ||
33682 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
33683
33684
33685 # configure is writing to config.log, and then calls config.status.
33686 # config.status does its own redirection, appending to config.log.
33687 # Unfortunately, on DOS this fails, as config.log is still kept open
33688 # by configure, so config.status won't be able to write to it; its
33689 # output is simply discarded. So we exec the FD to /dev/null,
33690 # effectively closing config.log, so it can be properly (re)opened and
33691 # appended to by config.status. When coming back to configure, we
33692 # need to make the FD available again.
33693 if test "$no_create" != yes; then
33694 ac_cs_success=:
33695 ac_config_status_args=
33696 test "$silent" = yes &&
33697 ac_config_status_args="$ac_config_status_args --quiet"
33698 exec 5>/dev/null
33699 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
33700 exec 5>>config.log
33701 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
33702 # would make configure fail if this is the last instruction.
33703 $ac_cs_success || as_fn_exit 1
33704 fi
33705 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
33706 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
33707 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
33708 fi
33709
33710
33711 exit 0
This page took 0.768128 seconds and 4 git commands to generate.