gdb/MAINTAINERS: add Luis Machado as global maintainer
[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_config_libobj_dir=import
626 ac_func_list=
627 gl_fnmatch_required=POSIX
628 ac_subst_vars='am__EXEEXT_FALSE
629 am__EXEEXT_TRUE
630 gltests_LIBOBJDEPS
631 gltests_LTLIBOBJS
632 gltests_LIBOBJS
633 gl_LIBOBJDEPS
634 gl_LTLIBOBJS
635 gl_LIBOBJS
636 LTLIBOBJS
637 LIBOBJS
638 LN_S
639 AM_BACKSLASH
640 AM_DEFAULT_VERBOSITY
641 AM_DEFAULT_V
642 AM_V
643 am__fastdepCC_FALSE
644 am__fastdepCC_TRUE
645 CCDEPMODE
646 am__nodep
647 AMDEPBACKSLASH
648 AMDEP_FALSE
649 AMDEP_TRUE
650 am__quote
651 am__include
652 DEPDIR
653 am__untar
654 am__tar
655 AMTAR
656 am__leading_dot
657 SET_MAKE
658 AWK
659 mkdir_p
660 INSTALL_STRIP_PROGRAM
661 STRIP
662 install_sh
663 MAKEINFO
664 AUTOHEADER
665 AUTOMAKE
666 AUTOCONF
667 ACLOCAL
668 VERSION
669 PACKAGE
670 CYGPATH_W
671 am__isrc
672 INSTALL_DATA
673 INSTALL_SCRIPT
674 INSTALL_PROGRAM
675 LIBGNU_LTLIBDEPS
676 LIBGNU_LIBDEPS
677 GL_CFLAG_GNULIB_WARNINGS
678 GL_CFLAG_ALLOW_WARNINGS
679 gltests_WITNESS
680 GL_COND_OBJ_WMEMPCPY_FALSE
681 GL_COND_OBJ_WMEMPCPY_TRUE
682 GL_COND_OBJ_WMEMCHR_FALSE
683 GL_COND_OBJ_WMEMCHR_TRUE
684 GL_COND_OBJ_WINDOWS_RWLOCK_FALSE
685 GL_COND_OBJ_WINDOWS_RWLOCK_TRUE
686 GL_COND_OBJ_WINDOWS_RECMUTEX_FALSE
687 GL_COND_OBJ_WINDOWS_RECMUTEX_TRUE
688 GL_COND_OBJ_WINDOWS_ONCE_FALSE
689 GL_COND_OBJ_WINDOWS_ONCE_TRUE
690 GL_COND_OBJ_WINDOWS_MUTEX_FALSE
691 GL_COND_OBJ_WINDOWS_MUTEX_TRUE
692 GL_GNULIB_TOWCTRANS
693 GL_GNULIB_WCTRANS
694 GL_GNULIB_ISWCTYPE
695 GL_GNULIB_WCTYPE
696 GL_GNULIB_ISWXDIGIT
697 GL_GNULIB_ISWDIGIT
698 GL_GNULIB_ISWBLANK
699 REPLACE_TOWLOWER
700 REPLACE_ISWCNTRL
701 HAVE_WCTYPE_H
702 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
703 NEXT_WCTYPE_H
704 HAVE_ISWCNTRL
705 REPLACE_ISWXDIGIT
706 REPLACE_ISWDIGIT
707 REPLACE_ISWBLANK
708 HAVE_WCTRANS_T
709 HAVE_WCTYPE_T
710 HAVE_ISWBLANK
711 HAVE_CRTDEFS_H
712 HAVE_WINT_T
713 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
714 NEXT_WCHAR_H
715 GL_COND_OBJ_UNSETENV_FALSE
716 GL_COND_OBJ_UNSETENV_TRUE
717 HAVE_UNISTD_H
718 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
719 NEXT_UNISTD_H
720 GL_COND_OBJ_TIME_R_FALSE
721 GL_COND_OBJ_TIME_R_TRUE
722 GL_GNULIB_MDA_TZSET
723 GL_GNULIB_TZSET
724 GL_GNULIB_TIME_RZ
725 GL_GNULIB_TIME_R
726 GL_GNULIB_TIMESPEC_GETRES
727 GL_GNULIB_TIMESPEC_GET
728 GL_GNULIB_TIMEGM
729 GL_GNULIB_STRPTIME
730 GL_GNULIB_STRFTIME
731 GL_GNULIB_NANOSLEEP
732 GL_GNULIB_LOCALTIME
733 GL_GNULIB_MKTIME
734 GL_GNULIB_CTIME
735 TIME_H_DEFINES_TIME_UTC
736 UNISTD_H_DEFINES_STRUCT_TIMESPEC
737 PTHREAD_H_DEFINES_STRUCT_TIMESPEC
738 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
739 TIME_H_DEFINES_STRUCT_TIMESPEC
740 NEXT_AS_FIRST_DIRECTIVE_TIME_H
741 NEXT_TIME_H
742 REPLACE_LOCALTIME
743 REPLACE_GMTIME
744 GNULIB_GETTIMEOFDAY
745 REPLACE_TZSET
746 REPLACE_TIMEGM
747 REPLACE_STRFTIME
748 REPLACE_NANOSLEEP
749 REPLACE_MKTIME
750 REPLACE_LOCALTIME_R
751 REPLACE_CTIME
752 HAVE_TIMEZONE_T
753 HAVE_TIMESPEC_GETRES
754 HAVE_TIMESPEC_GET
755 HAVE_TIMEGM
756 HAVE_STRPTIME
757 HAVE_NANOSLEEP
758 HAVE_DECL_LOCALTIME_R
759 GL_GNULIB_WAITPID
760 NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H
761 NEXT_SYS_WAIT_H
762 HAVE_SYS_UIO_H
763 NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H
764 NEXT_SYS_UIO_H
765 WINDOWS_STAT_INODES
766 WINDOWS_64_BIT_OFF_T
767 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
768 NEXT_SYS_TYPES_H
769 HAVE_SYS_RANDOM_H
770 NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H
771 NEXT_SYS_RANDOM_H
772 GL_COND_OBJ_STRTOK_R_FALSE
773 GL_COND_OBJ_STRTOK_R_TRUE
774 GL_COND_OBJ_STRNLEN_FALSE
775 GL_COND_OBJ_STRNLEN_TRUE
776 HAVE_STRINGS_H
777 NEXT_AS_FIRST_DIRECTIVE_STRINGS_H
778 NEXT_STRINGS_H
779 NEXT_AS_FIRST_DIRECTIVE_STRING_H
780 NEXT_STRING_H
781 GL_COND_OBJ_STRERROR_OVERRIDE_FALSE
782 GL_COND_OBJ_STRERROR_OVERRIDE_TRUE
783 GL_COND_OBJ_STRERROR_FALSE
784 GL_COND_OBJ_STRERROR_TRUE
785 GL_COND_OBJ_STRDUP_FALSE
786 GL_COND_OBJ_STRDUP_TRUE
787 GL_COND_OBJ_STRCHRNUL_FALSE
788 GL_COND_OBJ_STRCHRNUL_TRUE
789 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
790 NEXT_STDLIB_H
791 GL_COND_OBJ_STDIO_WRITE_FALSE
792 GL_COND_OBJ_STDIO_WRITE_TRUE
793 GL_COND_OBJ_STDIO_READ_FALSE
794 GL_COND_OBJ_STDIO_READ_TRUE
795 NEXT_AS_FIRST_DIRECTIVE_STDIO_H
796 NEXT_STDIO_H
797 GL_GENERATE_STDINT_H_FALSE
798 GL_GENERATE_STDINT_H_TRUE
799 STDINT_H
800 GL_GENERATE_STDDEF_H_FALSE
801 GL_GENERATE_STDDEF_H_TRUE
802 STDDEF_H
803 GL_GENERATE_STDBOOL_H_FALSE
804 GL_GENERATE_STDBOOL_H_TRUE
805 STDBOOL_H
806 HAVE__BOOL
807 GL_GENERATE_STDALIGN_H_FALSE
808 GL_GENERATE_STDALIGN_H_TRUE
809 STDALIGN_H
810 GL_COND_OBJ_STAT_FALSE
811 GL_COND_OBJ_STAT_TRUE
812 GL_COND_OBJ_SOCKET_FALSE
813 GL_COND_OBJ_SOCKET_TRUE
814 GL_GNULIB_SIGACTION
815 GL_GNULIB_SIGPROCMASK
816 GL_GNULIB_SIGNAL_H_SIGPIPE
817 GL_GNULIB_RAISE
818 GL_GNULIB_PTHREAD_SIGMASK
819 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
820 NEXT_SIGNAL_H
821 REPLACE_RAISE
822 REPLACE_PTHREAD_SIGMASK
823 HAVE_SIGHANDLER_T
824 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
825 HAVE_STRUCT_SIGACTION_SA_SIGACTION
826 HAVE_SIGACTION
827 HAVE_SIGINFO_T
828 HAVE_SIGSET_T
829 HAVE_RAISE
830 HAVE_PTHREAD_SIGMASK
831 HAVE_POSIX_SIGNALBLOCKING
832 GL_COND_OBJ_SETSOCKOPT_FALSE
833 GL_COND_OBJ_SETSOCKOPT_TRUE
834 GL_COND_OBJ_SETLOCALE_LOCK_FALSE
835 GL_COND_OBJ_SETLOCALE_LOCK_TRUE
836 GL_COND_OBJ_SETENV_FALSE
837 GL_COND_OBJ_SETENV_TRUE
838 GL_GNULIB_SELECT
839 GL_GNULIB_PSELECT
840 GL_COND_OBJ_SELECT_FALSE
841 GL_COND_OBJ_SELECT_TRUE
842 LIB_SELECT
843 LIBSOCKET
844 HAVE_SYS_SELECT_H
845 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H
846 NEXT_SYS_SELECT_H
847 REPLACE_SELECT
848 REPLACE_PSELECT
849 HAVE_PSELECT
850 GL_COND_OBJ_RMDIR_FALSE
851 GL_COND_OBJ_RMDIR_TRUE
852 GL_COND_OBJ_REWINDDIR_FALSE
853 GL_COND_OBJ_REWINDDIR_TRUE
854 GL_COND_OBJ_RENAME_FALSE
855 GL_COND_OBJ_RENAME_TRUE
856 GL_COND_OBJ_READLINK_FALSE
857 GL_COND_OBJ_READLINK_TRUE
858 GL_COND_OBJ_READDIR_FALSE
859 GL_COND_OBJ_READDIR_TRUE
860 GL_COND_OBJ_RAWMEMCHR_FALSE
861 GL_COND_OBJ_RAWMEMCHR_TRUE
862 GL_COND_OBJ_PIPE_FALSE
863 GL_COND_OBJ_PIPE_TRUE
864 GL_COND_OBJ_OPENDIR_FALSE
865 GL_COND_OBJ_OPENDIR_TRUE
866 GL_COND_OBJ_OPENAT_FALSE
867 GL_COND_OBJ_OPENAT_TRUE
868 GL_COND_OBJ_OPEN_FALSE
869 GL_COND_OBJ_OPEN_TRUE
870 GL_GENERATE_NETINET_IN_H_FALSE
871 GL_GENERATE_NETINET_IN_H_TRUE
872 NETINET_IN_H
873 HAVE_NETINET_IN_H
874 NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H
875 NEXT_NETINET_IN_H
876 GL_GNULIB_GETADDRINFO
877 HAVE_NETDB_H
878 NEXT_AS_FIRST_DIRECTIVE_NETDB_H
879 NEXT_NETDB_H
880 REPLACE_GETADDRINFO
881 REPLACE_GAI_STRERROR
882 HAVE_DECL_GETNAMEINFO
883 HAVE_DECL_GETADDRINFO
884 HAVE_DECL_GAI_STRERROR
885 HAVE_DECL_FREEADDRINFO
886 HAVE_STRUCT_ADDRINFO
887 GL_COND_OBJ_MSVC_NOTHROW_FALSE
888 GL_COND_OBJ_MSVC_NOTHROW_TRUE
889 GL_COND_OBJ_MSVC_INVAL_FALSE
890 GL_COND_OBJ_MSVC_INVAL_TRUE
891 GL_COND_OBJ_MKOSTEMP_FALSE
892 GL_COND_OBJ_MKOSTEMP_TRUE
893 GL_COND_OBJ_MKDTEMP_FALSE
894 GL_COND_OBJ_MKDTEMP_TRUE
895 GL_COND_OBJ_MKDIR_FALSE
896 GL_COND_OBJ_MKDIR_TRUE
897 GL_COND_OBJ_MEMRCHR_FALSE
898 GL_COND_OBJ_MEMRCHR_TRUE
899 GL_COND_OBJ_MEMPCPY_FALSE
900 GL_COND_OBJ_MEMPCPY_TRUE
901 GL_GNULIB_MDA_STRDUP
902 GL_GNULIB_MDA_MEMCCPY
903 GL_GNULIB_STRVERSCMP
904 GL_GNULIB_STRSIGNAL
905 GL_GNULIB_SIGDESCR_NP
906 GL_GNULIB_SIGABBREV_NP
907 GL_GNULIB_STRERRORNAME_NP
908 GL_GNULIB_STRERROR_R
909 GL_GNULIB_STRERROR
910 GL_GNULIB_MBSTOK_R
911 GL_GNULIB_MBSSEP
912 GL_GNULIB_MBSSPN
913 GL_GNULIB_MBSPBRK
914 GL_GNULIB_MBSCSPN
915 GL_GNULIB_MBSCASESTR
916 GL_GNULIB_MBSPCASECMP
917 GL_GNULIB_MBSNCASECMP
918 GL_GNULIB_MBSCASECMP
919 GL_GNULIB_MBSSTR
920 GL_GNULIB_MBSRCHR
921 GL_GNULIB_MBSCHR
922 GL_GNULIB_MBSNLEN
923 GL_GNULIB_MBSLEN
924 GL_GNULIB_STRTOK_R
925 GL_GNULIB_STRCASESTR
926 GL_GNULIB_STRSTR
927 GL_GNULIB_STRSEP
928 GL_GNULIB_STRPBRK
929 GL_GNULIB_STRNLEN
930 GL_GNULIB_STRNDUP
931 GL_GNULIB_STRNCAT
932 GL_GNULIB_STRDUP
933 GL_GNULIB_STRCHRNUL
934 GL_GNULIB_STPNCPY
935 GL_GNULIB_STPCPY
936 GL_GNULIB_RAWMEMCHR
937 GL_GNULIB_MEMRCHR
938 GL_GNULIB_MEMPCPY
939 GL_GNULIB_MEMMEM
940 GL_GNULIB_MEMCHR
941 GL_GNULIB_FFSLL
942 GL_GNULIB_FFSL
943 GL_GNULIB_EXPLICIT_BZERO
944 GL_COND_OBJ_MEMCHR_FALSE
945 GL_COND_OBJ_MEMCHR_TRUE
946 UNDEFINE_STRTOK_R
947 REPLACE_STRSIGNAL
948 REPLACE_STRERRORNAME_NP
949 REPLACE_STRERROR_R
950 REPLACE_STRERROR
951 REPLACE_STRTOK_R
952 REPLACE_STRCASESTR
953 REPLACE_STRSTR
954 REPLACE_STRNLEN
955 REPLACE_STRNDUP
956 REPLACE_STRNCAT
957 REPLACE_STRDUP
958 REPLACE_STRCHRNUL
959 REPLACE_STPNCPY
960 REPLACE_MEMMEM
961 REPLACE_MEMCHR
962 REPLACE_FFSLL
963 HAVE_STRVERSCMP
964 HAVE_DECL_STRSIGNAL
965 HAVE_SIGDESCR_NP
966 HAVE_SIGABBREV_NP
967 HAVE_STRERRORNAME_NP
968 HAVE_DECL_STRERROR_R
969 HAVE_DECL_STRTOK_R
970 HAVE_STRCASESTR
971 HAVE_STRSEP
972 HAVE_STRPBRK
973 HAVE_DECL_STRNLEN
974 HAVE_DECL_STRNDUP
975 HAVE_DECL_STRDUP
976 HAVE_STRCHRNUL
977 HAVE_STPNCPY
978 HAVE_STPCPY
979 HAVE_RAWMEMCHR
980 HAVE_DECL_MEMRCHR
981 HAVE_MEMPCPY
982 HAVE_DECL_MEMMEM
983 HAVE_FFSLL
984 HAVE_FFSL
985 HAVE_EXPLICIT_BZERO
986 HAVE_MBSLEN
987 GL_COND_OBJ_MBTOWC_FALSE
988 GL_COND_OBJ_MBTOWC_TRUE
989 GL_COND_OBJ_MBSRTOWCS_FALSE
990 GL_COND_OBJ_MBSRTOWCS_TRUE
991 GL_COND_OBJ_MBSINIT_FALSE
992 GL_COND_OBJ_MBSINIT_TRUE
993 HAVE_VISIBILITY
994 CFLAG_VISIBILITY
995 GL_COND_OBJ_MBRTOWC_FALSE
996 GL_COND_OBJ_MBRTOWC_TRUE
997 LIB_MBRTOWC
998 LOCALE_ZH_CN
999 LOCALE_FR_UTF8
1000 LOCALE_JA
1001 NEXT_AS_FIRST_DIRECTIVE_MATH_H
1002 NEXT_MATH_H
1003 GL_COND_OBJ_LSTAT_FALSE
1004 GL_COND_OBJ_LSTAT_TRUE
1005 LTLIBMULTITHREAD
1006 LIBMULTITHREAD
1007 LTLIBTHREAD
1008 LIBTHREAD
1009 LIBSTDTHREAD
1010 GL_GNULIB_LOCALENAME
1011 GL_GNULIB_DUPLOCALE
1012 GL_GNULIB_SETLOCALE_NULL
1013 GL_GNULIB_SETLOCALE
1014 GL_GNULIB_LOCALECONV
1015 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H
1016 NEXT_LOCALE_H
1017 HAVE_XLOCALE_H
1018 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
1019 NEXT_STDDEF_H
1020 HAVE_WCHAR_T
1021 HAVE_MAX_ALIGN_T
1022 REPLACE_NULL
1023 LOCALENAME_ENHANCE_LOCALE_FUNCS
1024 REPLACE_STRUCT_LCONV
1025 REPLACE_FREELOCALE
1026 REPLACE_DUPLOCALE
1027 REPLACE_NEWLOCALE
1028 REPLACE_SETLOCALE
1029 REPLACE_LOCALECONV
1030 HAVE_FREELOCALE
1031 HAVE_DUPLOCALE
1032 HAVE_NEWLOCALE
1033 LOCALCHARSET_TESTS_ENVIRONMENT
1034 GL_COND_OBJ_LISTEN_FALSE
1035 GL_COND_OBJ_LISTEN_TRUE
1036 GL_GENERATE_LIMITS_H_FALSE
1037 GL_GENERATE_LIMITS_H_TRUE
1038 LIMITS_H
1039 GL_COND_OBJ_ISBLANK_FALSE
1040 GL_COND_OBJ_ISBLANK_TRUE
1041 GL_GNULIB_STRTOUMAX
1042 GL_GNULIB_STRTOIMAX
1043 GL_GNULIB_IMAXDIV
1044 GL_GNULIB_IMAXABS
1045 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
1046 NEXT_INTTYPES_H
1047 UINT64_MAX_EQ_ULONG_MAX
1048 UINT32_MAX_LT_UINTMAX_MAX
1049 PRIPTR_PREFIX
1050 INT64_MAX_EQ_LONG_MAX
1051 INT32_MAX_LT_INTMAX_MAX
1052 REPLACE_STRTOUMAX
1053 REPLACE_STRTOIMAX
1054 HAVE_IMAXDIV_T
1055 HAVE_DECL_STRTOUMAX
1056 HAVE_DECL_STRTOIMAX
1057 HAVE_DECL_IMAXDIV
1058 HAVE_DECL_IMAXABS
1059 HAVE_SYS_INTTYPES_H
1060 HAVE_SYS_BITYPES_H
1061 HAVE_C99_STDINT_H
1062 WINT_T_SUFFIX
1063 WCHAR_T_SUFFIX
1064 SIG_ATOMIC_T_SUFFIX
1065 SIZE_T_SUFFIX
1066 PTRDIFF_T_SUFFIX
1067 HAVE_SIGNED_WINT_T
1068 HAVE_SIGNED_WCHAR_T
1069 HAVE_SIGNED_SIG_ATOMIC_T
1070 BITSIZEOF_WINT_T
1071 BITSIZEOF_WCHAR_T
1072 BITSIZEOF_SIG_ATOMIC_T
1073 BITSIZEOF_SIZE_T
1074 BITSIZEOF_PTRDIFF_T
1075 APPLE_UNIVERSAL_BUILD
1076 HAVE_STDINT_H
1077 NEXT_AS_FIRST_DIRECTIVE_STDINT_H
1078 NEXT_STDINT_H
1079 HAVE_SYS_TYPES_H
1080 HAVE_INTTYPES_H
1081 HAVE_WCHAR_H
1082 GNULIBHEADERS_OVERRIDE_WINT_T
1083 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H
1084 NEXT_LIMITS_H
1085 GL_COND_OBJ_INET_NTOP_FALSE
1086 GL_COND_OBJ_INET_NTOP_TRUE
1087 INET_NTOP_LIB
1088 LIB_HARD_LOCALE
1089 LIB_SETLOCALE_NULL
1090 LIB_SCHED_YIELD
1091 LIBPMULTITHREAD
1092 LIBPTHREAD
1093 GL_COND_OBJ_GLOB_PATTERN_P_FALSE
1094 GL_COND_OBJ_GLOB_PATTERN_P_TRUE
1095 GL_COND_OBJ_GLOB_FALSE
1096 GL_COND_OBJ_GLOB_TRUE
1097 GL_GENERATE_GLOB_H_FALSE
1098 GL_GENERATE_GLOB_H_TRUE
1099 GLOB_H
1100 GL_GNULIB_GLOB
1101 HAVE_GLOB_H
1102 NEXT_AS_FIRST_DIRECTIVE_GLOB_H
1103 NEXT_GLOB_H
1104 REPLACE_GLOB_PATTERN_P
1105 REPLACE_GLOB
1106 HAVE_GLOB_PATTERN_P
1107 HAVE_GLOB
1108 GL_GNULIB_GETTIMEOFDAY
1109 GL_COND_OBJ_GETTIMEOFDAY_FALSE
1110 GL_COND_OBJ_GETTIMEOFDAY_TRUE
1111 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
1112 NEXT_SYS_TIME_H
1113 REPLACE_STRUCT_TIMEVAL
1114 REPLACE_GETTIMEOFDAY
1115 HAVE_SYS_TIME_H
1116 HAVE_STRUCT_TIMEVAL
1117 HAVE_GETTIMEOFDAY
1118 LTLIBINTL
1119 LIBINTL
1120 GL_GNULIB_GETRANDOM
1121 GL_COND_OBJ_GETRANDOM_FALSE
1122 GL_COND_OBJ_GETRANDOM_TRUE
1123 LIB_GETRANDOM
1124 REPLACE_GETRANDOM
1125 HAVE_GETRANDOM
1126 LIB_GETLOGIN
1127 GL_COND_OBJ_GETLOGIN_R_FALSE
1128 GL_COND_OBJ_GETLOGIN_R_TRUE
1129 GL_COND_OBJ_GETLINE_FALSE
1130 GL_COND_OBJ_GETLINE_TRUE
1131 GL_COND_OBJ_GETDTABLESIZE_FALSE
1132 GL_COND_OBJ_GETDTABLESIZE_TRUE
1133 GL_GNULIB_MDA_TEMPNAM
1134 GL_GNULIB_MDA_PUTW
1135 GL_GNULIB_MDA_GETW
1136 GL_GNULIB_MDA_FILENO
1137 GL_GNULIB_MDA_FDOPEN
1138 GL_GNULIB_MDA_FCLOSEALL
1139 GL_GNULIB_VSPRINTF_POSIX
1140 GL_GNULIB_VSNPRINTF
1141 GL_GNULIB_VPRINTF_POSIX
1142 GL_GNULIB_VPRINTF
1143 GL_GNULIB_VFPRINTF_POSIX
1144 GL_GNULIB_VFPRINTF
1145 GL_GNULIB_VDPRINTF
1146 GL_GNULIB_VSCANF
1147 GL_GNULIB_VFSCANF
1148 GL_GNULIB_VASPRINTF
1149 GL_GNULIB_TMPFILE
1150 GL_GNULIB_STDIO_H_SIGPIPE
1151 GL_GNULIB_STDIO_H_NONBLOCKING
1152 GL_GNULIB_SPRINTF_POSIX
1153 GL_GNULIB_SNPRINTF
1154 GL_GNULIB_SCANF
1155 GL_GNULIB_RENAMEAT
1156 GL_GNULIB_RENAME
1157 GL_GNULIB_REMOVE
1158 GL_GNULIB_PUTS
1159 GL_GNULIB_PUTCHAR
1160 GL_GNULIB_PUTC
1161 GL_GNULIB_PRINTF_POSIX
1162 GL_GNULIB_PRINTF
1163 GL_GNULIB_POPEN
1164 GL_GNULIB_PERROR
1165 GL_GNULIB_PCLOSE
1166 GL_GNULIB_OBSTACK_PRINTF_POSIX
1167 GL_GNULIB_OBSTACK_PRINTF
1168 GL_GNULIB_GETLINE
1169 GL_GNULIB_GETDELIM
1170 GL_GNULIB_GETCHAR
1171 GL_GNULIB_GETC
1172 GL_GNULIB_FWRITE
1173 GL_GNULIB_FTELLO
1174 GL_GNULIB_FTELL
1175 GL_GNULIB_FSEEKO
1176 GL_GNULIB_FSEEK
1177 GL_GNULIB_FSCANF
1178 GL_GNULIB_FREOPEN
1179 GL_GNULIB_FREAD
1180 GL_GNULIB_FPUTS
1181 GL_GNULIB_FPUTC
1182 GL_GNULIB_FPURGE
1183 GL_GNULIB_FPRINTF_POSIX
1184 GL_GNULIB_FPRINTF
1185 GL_GNULIB_FOPEN_GNU
1186 GL_GNULIB_FOPEN
1187 GL_GNULIB_FGETS
1188 GL_GNULIB_FGETC
1189 GL_GNULIB_FFLUSH
1190 GL_GNULIB_FDOPEN
1191 GL_GNULIB_FCLOSE
1192 GL_GNULIB_DPRINTF
1193 GL_COND_OBJ_GETDELIM_FALSE
1194 GL_COND_OBJ_GETDELIM_TRUE
1195 REPLACE_VSPRINTF
1196 REPLACE_VSNPRINTF
1197 REPLACE_VPRINTF
1198 REPLACE_VFPRINTF
1199 REPLACE_VDPRINTF
1200 REPLACE_VASPRINTF
1201 REPLACE_TMPFILE
1202 REPLACE_STDIO_WRITE_FUNCS
1203 REPLACE_STDIO_READ_FUNCS
1204 REPLACE_SPRINTF
1205 REPLACE_SNPRINTF
1206 REPLACE_RENAMEAT
1207 REPLACE_RENAME
1208 REPLACE_REMOVE
1209 REPLACE_PRINTF
1210 REPLACE_POPEN
1211 REPLACE_PERROR
1212 REPLACE_OBSTACK_PRINTF
1213 REPLACE_GETLINE
1214 REPLACE_GETDELIM
1215 REPLACE_FTELLO
1216 REPLACE_FTELL
1217 REPLACE_FSEEKO
1218 REPLACE_FSEEK
1219 REPLACE_FREOPEN
1220 REPLACE_FPURGE
1221 REPLACE_FPRINTF
1222 REPLACE_FOPEN_FOR_FOPEN_GNU
1223 REPLACE_FOPEN
1224 REPLACE_FFLUSH
1225 REPLACE_FDOPEN
1226 REPLACE_FCLOSE
1227 REPLACE_DPRINTF
1228 HAVE_VDPRINTF
1229 HAVE_VASPRINTF
1230 HAVE_RENAMEAT
1231 HAVE_POPEN
1232 HAVE_PCLOSE
1233 HAVE_FTELLO
1234 HAVE_FSEEKO
1235 HAVE_DPRINTF
1236 HAVE_DECL_VSNPRINTF
1237 HAVE_DECL_SNPRINTF
1238 HAVE_DECL_OBSTACK_PRINTF
1239 HAVE_DECL_GETLINE
1240 HAVE_DECL_GETDELIM
1241 HAVE_DECL_FTELLO
1242 HAVE_DECL_FSEEKO
1243 HAVE_DECL_FPURGE
1244 HAVE_DECL_FCLOSEALL
1245 GL_COND_OBJ_GETCWD_LGPL_FALSE
1246 GL_COND_OBJ_GETCWD_LGPL_TRUE
1247 GL_COND_OBJ_GETCWD_FALSE
1248 GL_COND_OBJ_GETCWD_TRUE
1249 GL_COND_OBJ_FSTATAT_FALSE
1250 GL_COND_OBJ_FSTATAT_TRUE
1251 GL_GNULIB_MDA_UMASK
1252 GL_GNULIB_MDA_MKDIR
1253 GL_GNULIB_MDA_CHMOD
1254 GL_GNULIB_OVERRIDES_STRUCT_STAT
1255 GL_GNULIB_UTIMENSAT
1256 GL_GNULIB_STAT
1257 GL_GNULIB_MKNODAT
1258 GL_GNULIB_MKNOD
1259 GL_GNULIB_MKFIFOAT
1260 GL_GNULIB_MKFIFO
1261 GL_GNULIB_MKDIRAT
1262 GL_GNULIB_MKDIR
1263 GL_GNULIB_LSTAT
1264 GL_GNULIB_LCHMOD
1265 GL_GNULIB_GETUMASK
1266 GL_GNULIB_FUTIMENS
1267 GL_GNULIB_FSTATAT
1268 GL_GNULIB_FSTAT
1269 GL_GNULIB_FCHMODAT
1270 WINDOWS_64_BIT_ST_SIZE
1271 WINDOWS_STAT_TIMESPEC
1272 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
1273 NEXT_SYS_STAT_H
1274 GL_COND_OBJ_FSTAT_FALSE
1275 GL_COND_OBJ_FSTAT_TRUE
1276 REPLACE_UTIMENSAT
1277 REPLACE_STAT
1278 REPLACE_MKNODAT
1279 REPLACE_MKNOD
1280 REPLACE_MKFIFOAT
1281 REPLACE_MKFIFO
1282 REPLACE_MKDIR
1283 REPLACE_LSTAT
1284 REPLACE_FUTIMENS
1285 REPLACE_FSTATAT
1286 REPLACE_FSTAT
1287 REPLACE_FCHMODAT
1288 HAVE_UTIMENSAT
1289 HAVE_MKNODAT
1290 HAVE_MKNOD
1291 HAVE_MKFIFOAT
1292 HAVE_MKFIFO
1293 HAVE_MKDIRAT
1294 HAVE_LSTAT
1295 HAVE_LCHMOD
1296 HAVE_GETUMASK
1297 HAVE_FUTIMENS
1298 HAVE_FSTATAT
1299 HAVE_FCHMODAT
1300 FREXPL_LIBM
1301 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
1302 GL_GNULIB_MDA_YN
1303 GL_GNULIB_MDA_Y1
1304 GL_GNULIB_MDA_Y0
1305 GL_GNULIB_MDA_JN
1306 GL_GNULIB_MDA_J1
1307 GL_GNULIB_MDA_J0
1308 GL_GNULIB_TRUNCL
1309 GL_GNULIB_TRUNCF
1310 GL_GNULIB_TRUNC
1311 GL_GNULIB_TANHF
1312 GL_GNULIB_TANL
1313 GL_GNULIB_TANF
1314 GL_GNULIB_SQRTL
1315 GL_GNULIB_SQRTF
1316 GL_GNULIB_SINHF
1317 GL_GNULIB_SINL
1318 GL_GNULIB_SINF
1319 GL_GNULIB_SIGNBIT
1320 GL_GNULIB_ROUNDL
1321 GL_GNULIB_ROUNDF
1322 GL_GNULIB_ROUND
1323 GL_GNULIB_RINTL
1324 GL_GNULIB_RINTF
1325 GL_GNULIB_RINT
1326 GL_GNULIB_REMAINDERL
1327 GL_GNULIB_REMAINDERF
1328 GL_GNULIB_REMAINDER
1329 GL_GNULIB_POWF
1330 GL_GNULIB_MODFL
1331 GL_GNULIB_MODFF
1332 GL_GNULIB_MODF
1333 GL_GNULIB_LOGBL
1334 GL_GNULIB_LOGBF
1335 GL_GNULIB_LOGB
1336 GL_GNULIB_LOG2L
1337 GL_GNULIB_LOG2F
1338 GL_GNULIB_LOG2
1339 GL_GNULIB_LOG1PL
1340 GL_GNULIB_LOG1PF
1341 GL_GNULIB_LOG1P
1342 GL_GNULIB_LOG10L
1343 GL_GNULIB_LOG10F
1344 GL_GNULIB_LOG10
1345 GL_GNULIB_LOGL
1346 GL_GNULIB_LOGF
1347 GL_GNULIB_LOG
1348 GL_GNULIB_LDEXPL
1349 GL_GNULIB_LDEXPF
1350 GL_GNULIB_ISNANL
1351 GL_GNULIB_ISNAND
1352 GL_GNULIB_ISNANF
1353 GL_GNULIB_ISNAN
1354 GL_GNULIB_ISINF
1355 GL_GNULIB_ISFINITE
1356 GL_GNULIB_ILOGBL
1357 GL_GNULIB_ILOGBF
1358 GL_GNULIB_ILOGB
1359 GL_GNULIB_HYPOTL
1360 GL_GNULIB_HYPOTF
1361 GL_GNULIB_HYPOT
1362 GL_GNULIB_FREXPL
1363 GL_GNULIB_FREXP
1364 GL_GNULIB_FREXPF
1365 GL_GNULIB_FMODL
1366 GL_GNULIB_FMODF
1367 GL_GNULIB_FMOD
1368 GL_GNULIB_FMAL
1369 GL_GNULIB_FMAF
1370 GL_GNULIB_FMA
1371 GL_GNULIB_FLOORL
1372 GL_GNULIB_FLOORF
1373 GL_GNULIB_FLOOR
1374 GL_GNULIB_FABSL
1375 GL_GNULIB_FABSF
1376 GL_GNULIB_EXPM1L
1377 GL_GNULIB_EXPM1F
1378 GL_GNULIB_EXPM1
1379 GL_GNULIB_EXP2L
1380 GL_GNULIB_EXP2F
1381 GL_GNULIB_EXP2
1382 GL_GNULIB_EXPL
1383 GL_GNULIB_EXPF
1384 GL_GNULIB_COSHF
1385 GL_GNULIB_COSL
1386 GL_GNULIB_COSF
1387 GL_GNULIB_COPYSIGNL
1388 GL_GNULIB_COPYSIGNF
1389 GL_GNULIB_COPYSIGN
1390 GL_GNULIB_CEILL
1391 GL_GNULIB_CEILF
1392 GL_GNULIB_CEIL
1393 GL_GNULIB_CBRTL
1394 GL_GNULIB_CBRTF
1395 GL_GNULIB_CBRT
1396 GL_GNULIB_ATAN2F
1397 GL_GNULIB_ATANL
1398 GL_GNULIB_ATANF
1399 GL_GNULIB_ASINL
1400 GL_GNULIB_ASINF
1401 GL_GNULIB_ACOSL
1402 GL_GNULIB_ACOSF
1403 FREXP_LIBM
1404 REPLACE_TRUNCL
1405 REPLACE_TRUNCF
1406 REPLACE_TRUNC
1407 REPLACE_TANHF
1408 REPLACE_TANF
1409 REPLACE_SQRTL
1410 REPLACE_SQRTF
1411 REPLACE_SINHF
1412 REPLACE_SINF
1413 REPLACE_SIGNBIT_USING_BUILTINS
1414 REPLACE_SIGNBIT
1415 REPLACE_ROUNDL
1416 REPLACE_ROUNDF
1417 REPLACE_ROUND
1418 REPLACE_RINTL
1419 REPLACE_REMAINDERL
1420 REPLACE_REMAINDERF
1421 REPLACE_REMAINDER
1422 REPLACE_NAN
1423 REPLACE_MODFL
1424 REPLACE_MODFF
1425 REPLACE_MODF
1426 REPLACE_LOGBL
1427 REPLACE_LOGBF
1428 REPLACE_LOGB
1429 REPLACE_LOG2L
1430 REPLACE_LOG2F
1431 REPLACE_LOG2
1432 REPLACE_LOG1PL
1433 REPLACE_LOG1PF
1434 REPLACE_LOG1P
1435 REPLACE_LOG10L
1436 REPLACE_LOG10F
1437 REPLACE_LOG10
1438 REPLACE_LOGL
1439 REPLACE_LOGF
1440 REPLACE_LOG
1441 REPLACE_LDEXPL
1442 REPLACE_ISNAN
1443 REPLACE_ISINF
1444 REPLACE_ISFINITE
1445 REPLACE_ILOGBL
1446 REPLACE_ILOGBF
1447 REPLACE_ILOGB
1448 REPLACE_HYPOTL
1449 REPLACE_HYPOTF
1450 REPLACE_HYPOT
1451 REPLACE_HUGE_VAL
1452 REPLACE_FREXPL
1453 REPLACE_FREXP
1454 REPLACE_FREXPF
1455 REPLACE_FMODL
1456 REPLACE_FMODF
1457 REPLACE_FMOD
1458 REPLACE_FMAL
1459 REPLACE_FMAF
1460 REPLACE_FMA
1461 REPLACE_FLOORL
1462 REPLACE_FLOORF
1463 REPLACE_FLOOR
1464 REPLACE_FABSL
1465 REPLACE_EXP2L
1466 REPLACE_EXP2
1467 REPLACE_EXPM1L
1468 REPLACE_EXPM1F
1469 REPLACE_EXPM1
1470 REPLACE_EXPL
1471 REPLACE_EXPF
1472 REPLACE_COSHF
1473 REPLACE_COSF
1474 REPLACE_CEILL
1475 REPLACE_CEILF
1476 REPLACE_CEIL
1477 REPLACE_CBRTL
1478 REPLACE_CBRTF
1479 REPLACE_ATAN2F
1480 REPLACE_ATANF
1481 REPLACE_ASINF
1482 REPLACE_ACOSF
1483 HAVE_DECL_TRUNCL
1484 HAVE_DECL_TRUNCF
1485 HAVE_DECL_TRUNC
1486 HAVE_DECL_TANL
1487 HAVE_DECL_SQRTL
1488 HAVE_DECL_SINL
1489 HAVE_DECL_ROUNDL
1490 HAVE_DECL_ROUNDF
1491 HAVE_DECL_ROUND
1492 HAVE_DECL_RINTF
1493 HAVE_DECL_REMAINDERL
1494 HAVE_DECL_REMAINDER
1495 HAVE_DECL_LOGB
1496 HAVE_DECL_LOG2L
1497 HAVE_DECL_LOG2F
1498 HAVE_DECL_LOG2
1499 HAVE_DECL_LOG10L
1500 HAVE_DECL_LOGL
1501 HAVE_DECL_LDEXPL
1502 HAVE_DECL_FREXPL
1503 HAVE_DECL_FLOORL
1504 HAVE_DECL_FLOORF
1505 HAVE_DECL_EXPM1L
1506 HAVE_DECL_EXP2L
1507 HAVE_DECL_EXP2F
1508 HAVE_DECL_EXP2
1509 HAVE_DECL_EXPL
1510 HAVE_DECL_COSL
1511 HAVE_DECL_COPYSIGNF
1512 HAVE_DECL_CEILL
1513 HAVE_DECL_CEILF
1514 HAVE_DECL_CBRTL
1515 HAVE_DECL_CBRTF
1516 HAVE_DECL_ATANL
1517 HAVE_DECL_ASINL
1518 HAVE_DECL_ACOSL
1519 HAVE_TANHF
1520 HAVE_TANL
1521 HAVE_TANF
1522 HAVE_SQRTL
1523 HAVE_SQRTF
1524 HAVE_SINHF
1525 HAVE_SINL
1526 HAVE_SINF
1527 HAVE_RINTL
1528 HAVE_RINT
1529 HAVE_REMAINDERF
1530 HAVE_REMAINDER
1531 HAVE_POWF
1532 HAVE_MODFL
1533 HAVE_MODFF
1534 HAVE_LOGBL
1535 HAVE_LOGBF
1536 HAVE_LOG1PL
1537 HAVE_LOG1PF
1538 HAVE_LOG1P
1539 HAVE_LOG10L
1540 HAVE_LOG10F
1541 HAVE_LOGL
1542 HAVE_LOGF
1543 HAVE_LDEXPF
1544 HAVE_ISNANL
1545 HAVE_ISNAND
1546 HAVE_ISNANF
1547 HAVE_ILOGBL
1548 HAVE_ILOGBF
1549 HAVE_ILOGB
1550 HAVE_HYPOTL
1551 HAVE_HYPOTF
1552 HAVE_FREXPF
1553 HAVE_FMODL
1554 HAVE_FMODF
1555 HAVE_FMAL
1556 HAVE_FMAF
1557 HAVE_FMA
1558 HAVE_FABSL
1559 HAVE_FABSF
1560 HAVE_EXPM1F
1561 HAVE_EXPM1
1562 HAVE_EXPL
1563 HAVE_EXPF
1564 HAVE_COSHF
1565 HAVE_COSL
1566 HAVE_COSF
1567 HAVE_COPYSIGNL
1568 HAVE_COPYSIGN
1569 HAVE_CBRTL
1570 HAVE_CBRTF
1571 HAVE_CBRT
1572 HAVE_ATAN2F
1573 HAVE_ATANL
1574 HAVE_ATANF
1575 HAVE_ASINL
1576 HAVE_ASINF
1577 HAVE_ACOSL
1578 HAVE_ACOSF
1579 GL_COND_OBJ_FREE_FALSE
1580 GL_COND_OBJ_FREE_TRUE
1581 GL_GENERATE_FNMATCH_H_FALSE
1582 GL_GENERATE_FNMATCH_H_TRUE
1583 FNMATCH_H
1584 GL_GNULIB_FNMATCH
1585 HAVE_FNMATCH_H
1586 NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H
1587 NEXT_FNMATCH_H
1588 REPLACE_FNMATCH
1589 HAVE_FNMATCH
1590 GL_COND_OBJ_ITOLD_FALSE
1591 GL_COND_OBJ_ITOLD_TRUE
1592 GL_COND_OBJ_FLOAT_FALSE
1593 GL_COND_OBJ_FLOAT_TRUE
1594 GL_GENERATE_FLOAT_H_FALSE
1595 GL_GENERATE_FLOAT_H_TRUE
1596 FLOAT_H
1597 REPLACE_ITOLD
1598 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1599 NEXT_FLOAT_H
1600 GL_GNULIB_FFS
1601 GL_COND_OBJ_FFS_FALSE
1602 GL_COND_OBJ_FFS_TRUE
1603 HAVE_DECL_STRNCASECMP
1604 HAVE_STRCASECMP
1605 HAVE_FFS
1606 GL_COND_OBJ_FDOPENDIR_FALSE
1607 GL_COND_OBJ_FDOPENDIR_TRUE
1608 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1609 NEXT_FCNTL_H
1610 GL_GNULIB_MDA_OPEN
1611 GL_GNULIB_MDA_CREAT
1612 GL_GNULIB_OPENAT
1613 GL_GNULIB_OPEN
1614 GL_GNULIB_NONBLOCKING
1615 GL_GNULIB_FCNTL
1616 GL_GNULIB_CREAT
1617 GL_COND_OBJ_FCNTL_FALSE
1618 GL_COND_OBJ_FCNTL_TRUE
1619 REPLACE_OPENAT
1620 REPLACE_OPEN
1621 REPLACE_FCNTL
1622 REPLACE_CREAT
1623 HAVE_OPENAT
1624 HAVE_FCNTL
1625 GL_COND_OBJ_FCHDIR_FALSE
1626 GL_COND_OBJ_FCHDIR_TRUE
1627 GL_COND_OBJ_ERROR_FALSE
1628 GL_COND_OBJ_ERROR_TRUE
1629 GL_GENERATE_ERRNO_H_FALSE
1630 GL_GENERATE_ERRNO_H_TRUE
1631 ERRNO_H
1632 EOVERFLOW_VALUE
1633 EOVERFLOW_HIDDEN
1634 ENOLINK_VALUE
1635 ENOLINK_HIDDEN
1636 EMULTIHOP_VALUE
1637 EMULTIHOP_HIDDEN
1638 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1639 NEXT_ERRNO_H
1640 GL_COND_OBJ_DUP2_FALSE
1641 GL_COND_OBJ_DUP2_TRUE
1642 GL_COND_OBJ_DUP_FALSE
1643 GL_COND_OBJ_DUP_TRUE
1644 GL_COND_OBJ_DIRFD_FALSE
1645 GL_COND_OBJ_DIRFD_TRUE
1646 HAVE_DIRENT_H
1647 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1648 NEXT_DIRENT_H
1649 GL_GNULIB_ISBLANK
1650 NEXT_AS_FIRST_DIRECTIVE_CTYPE_H
1651 NEXT_CTYPE_H
1652 HAVE_ISBLANK
1653 GL_COND_OBJ_CONNECT_FALSE
1654 GL_COND_OBJ_CONNECT_TRUE
1655 GL_GNULIB_ALPHASORT
1656 GL_GNULIB_SCANDIR
1657 GL_GNULIB_FDOPENDIR
1658 GL_GNULIB_DIRFD
1659 GL_GNULIB_CLOSEDIR
1660 GL_GNULIB_REWINDDIR
1661 GL_GNULIB_READDIR
1662 GL_GNULIB_OPENDIR
1663 GL_COND_OBJ_CLOSEDIR_FALSE
1664 GL_COND_OBJ_CLOSEDIR_TRUE
1665 REPLACE_FDOPENDIR
1666 REPLACE_DIRFD
1667 REPLACE_CLOSEDIR
1668 REPLACE_OPENDIR
1669 HAVE_ALPHASORT
1670 HAVE_SCANDIR
1671 HAVE_FDOPENDIR
1672 HAVE_DECL_FDOPENDIR
1673 HAVE_DECL_DIRFD
1674 HAVE_CLOSEDIR
1675 HAVE_REWINDDIR
1676 HAVE_READDIR
1677 HAVE_OPENDIR
1678 GL_COND_OBJ_CLOSE_FALSE
1679 GL_COND_OBJ_CLOSE_TRUE
1680 HAVE_MSVC_INVALID_PARAMETER_HANDLER
1681 LIB_CLOCK_GETTIME
1682 GL_COND_OBJ_FCHOWN_STUB_FALSE
1683 GL_COND_OBJ_FCHOWN_STUB_TRUE
1684 GL_COND_OBJ_CHOWN_FALSE
1685 GL_COND_OBJ_CHOWN_TRUE
1686 GL_COND_OBJ_CHDIR_LONG_FALSE
1687 GL_COND_OBJ_CHDIR_LONG_TRUE
1688 GL_GNULIB_MDA_WRITE
1689 GL_GNULIB_MDA_UNLINK
1690 GL_GNULIB_MDA_SWAB
1691 GL_GNULIB_MDA_RMDIR
1692 GL_GNULIB_MDA_READ
1693 GL_GNULIB_MDA_LSEEK
1694 GL_GNULIB_MDA_ISATTY
1695 GL_GNULIB_MDA_GETPID
1696 GL_GNULIB_MDA_GETCWD
1697 GL_GNULIB_MDA_EXECVPE
1698 GL_GNULIB_MDA_EXECVP
1699 GL_GNULIB_MDA_EXECVE
1700 GL_GNULIB_MDA_EXECV
1701 GL_GNULIB_MDA_EXECLP
1702 GL_GNULIB_MDA_EXECLE
1703 GL_GNULIB_MDA_EXECL
1704 GL_GNULIB_MDA_DUP2
1705 GL_GNULIB_MDA_DUP
1706 GL_GNULIB_MDA_CLOSE
1707 GL_GNULIB_MDA_CHDIR
1708 GL_GNULIB_MDA_ACCESS
1709 GL_GNULIB_WRITE
1710 GL_GNULIB_USLEEP
1711 GL_GNULIB_UNLINKAT
1712 GL_GNULIB_UNLINK
1713 GL_GNULIB_UNISTD_H_SIGPIPE
1714 GL_GNULIB_UNISTD_H_NONBLOCKING
1715 GL_GNULIB_UNISTD_H_GETOPT
1716 GL_GNULIB_TTYNAME_R
1717 GL_GNULIB_TRUNCATE
1718 GL_GNULIB_SYMLINKAT
1719 GL_GNULIB_SYMLINK
1720 GL_GNULIB_SLEEP
1721 GL_GNULIB_SETHOSTNAME
1722 GL_GNULIB_RMDIR
1723 GL_GNULIB_READLINKAT
1724 GL_GNULIB_READLINK
1725 GL_GNULIB_READ
1726 GL_GNULIB_PWRITE
1727 GL_GNULIB_PREAD
1728 GL_GNULIB_PIPE2
1729 GL_GNULIB_PIPE
1730 GL_GNULIB_LSEEK
1731 GL_GNULIB_LINKAT
1732 GL_GNULIB_LINK
1733 GL_GNULIB_LCHOWN
1734 GL_GNULIB_ISATTY
1735 GL_GNULIB_GROUP_MEMBER
1736 GL_GNULIB_GETUSERSHELL
1737 GL_GNULIB_GETPASS_GNU
1738 GL_GNULIB_GETPASS
1739 GL_GNULIB_GETPAGESIZE
1740 GL_GNULIB_GETOPT_POSIX
1741 GL_GNULIB_GETLOGIN_R
1742 GL_GNULIB_GETLOGIN
1743 GL_GNULIB_GETHOSTNAME
1744 GL_GNULIB_GETGROUPS
1745 GL_GNULIB_GETENTROPY
1746 GL_GNULIB_GETDTABLESIZE
1747 GL_GNULIB_GETDOMAINNAME
1748 GL_GNULIB_GETCWD
1749 GL_GNULIB_FTRUNCATE
1750 GL_GNULIB_FSYNC
1751 GL_GNULIB_FDATASYNC
1752 GL_GNULIB_FCHOWNAT
1753 GL_GNULIB_FCHDIR
1754 GL_GNULIB_FACCESSAT
1755 GL_GNULIB_EXECVPE
1756 GL_GNULIB_EXECVP
1757 GL_GNULIB_EXECVE
1758 GL_GNULIB_EXECV
1759 GL_GNULIB_EXECLP
1760 GL_GNULIB_EXECLE
1761 GL_GNULIB_EXECL
1762 GL_GNULIB_EUIDACCESS
1763 GL_GNULIB_ENVIRON
1764 GL_GNULIB_DUP3
1765 GL_GNULIB_DUP2
1766 GL_GNULIB_DUP
1767 GL_GNULIB_COPY_FILE_RANGE
1768 GL_GNULIB_CLOSE
1769 GL_GNULIB_CHOWN
1770 GL_GNULIB_CHDIR
1771 GL_GNULIB_ACCESS
1772 GL_COND_OBJ_CANONICALIZE_LGPL_FALSE
1773 GL_COND_OBJ_CANONICALIZE_LGPL_TRUE
1774 REPLACE_WCTOMB
1775 REPLACE_UNSETENV
1776 REPLACE_STRTOULL
1777 REPLACE_STRTOUL
1778 REPLACE_STRTOLL
1779 REPLACE_STRTOLD
1780 REPLACE_STRTOL
1781 REPLACE_STRTOD
1782 REPLACE_SETSTATE
1783 REPLACE_SETENV
1784 REPLACE_REALPATH
1785 REPLACE_REALLOCARRAY
1786 REPLACE_REALLOC_FOR_REALLOC_POSIX
1787 REPLACE_REALLOC_FOR_REALLOC_GNU
1788 REPLACE_RANDOM_R
1789 REPLACE_RANDOM
1790 REPLACE_QSORT_R
1791 REPLACE_PUTENV
1792 REPLACE_PTSNAME_R
1793 REPLACE_PTSNAME
1794 REPLACE_POSIX_MEMALIGN
1795 REPLACE_MKSTEMP
1796 REPLACE_MBTOWC
1797 REPLACE_MALLOC_FOR_MALLOC_POSIX
1798 REPLACE_MALLOC_FOR_MALLOC_GNU
1799 REPLACE_INITSTATE
1800 REPLACE_FREE
1801 REPLACE_CANONICALIZE_FILE_NAME
1802 REPLACE_CALLOC_FOR_CALLOC_POSIX
1803 REPLACE_CALLOC_FOR_CALLOC_GNU
1804 REPLACE_ALIGNED_ALLOC
1805 HAVE_DECL_UNSETENV
1806 HAVE_UNLOCKPT
1807 HAVE_SYS_LOADAVG_H
1808 HAVE_STRUCT_RANDOM_DATA
1809 HAVE_STRTOULL
1810 HAVE_STRTOUL
1811 HAVE_STRTOLL
1812 HAVE_STRTOLD
1813 HAVE_STRTOL
1814 HAVE_STRTOD
1815 HAVE_DECL_SETSTATE
1816 HAVE_SETSTATE
1817 HAVE_DECL_SETENV
1818 HAVE_SETENV
1819 HAVE_SECURE_GETENV
1820 HAVE_RPMATCH
1821 HAVE_REALPATH
1822 HAVE_REALLOCARRAY
1823 HAVE_RANDOM_R
1824 HAVE_RANDOM_H
1825 HAVE_RANDOM
1826 HAVE_QSORT_R
1827 HAVE_PTSNAME_R
1828 HAVE_PTSNAME
1829 HAVE_POSIX_OPENPT
1830 HAVE_POSIX_MEMALIGN
1831 HAVE_MKSTEMPS
1832 HAVE_MKSTEMP
1833 HAVE_MKOSTEMPS
1834 HAVE_MKOSTEMP
1835 HAVE_MKDTEMP
1836 HAVE_MBTOWC
1837 HAVE_DECL_INITSTATE
1838 HAVE_INITSTATE
1839 HAVE_GRANTPT
1840 HAVE_GETSUBOPT
1841 HAVE_DECL_GETLOADAVG
1842 HAVE_DECL_GCVT
1843 HAVE_DECL_FCVT
1844 HAVE_DECL_ECVT
1845 HAVE_CANONICALIZE_FILE_NAME
1846 HAVE_ATOLL
1847 HAVE_ALIGNED_ALLOC
1848 HAVE__EXIT
1849 GL_GNULIB_MDA_PUTENV
1850 GL_GNULIB_MDA_MKTEMP
1851 GL_GNULIB_MDA_GCVT
1852 GL_GNULIB_MDA_FCVT
1853 GL_GNULIB_MDA_ECVT
1854 GL_GNULIB_WCTOMB
1855 GL_GNULIB_UNSETENV
1856 GL_GNULIB_UNLOCKPT
1857 GL_GNULIB_SYSTEM_POSIX
1858 GL_GNULIB_STRTOULL
1859 GL_GNULIB_STRTOUL
1860 GL_GNULIB_STRTOLL
1861 GL_GNULIB_STRTOLD
1862 GL_GNULIB_STRTOL
1863 GL_GNULIB_STRTOD
1864 GL_GNULIB_SETENV
1865 GL_GNULIB_SECURE_GETENV
1866 GL_GNULIB_RPMATCH
1867 GL_GNULIB_REALPATH
1868 GL_GNULIB_REALLOC_POSIX
1869 GL_GNULIB_REALLOC_GNU
1870 GL_GNULIB_REALLOCARRAY
1871 GL_GNULIB_RANDOM_R
1872 GL_GNULIB_RANDOM
1873 GL_GNULIB_QSORT_R
1874 GL_GNULIB_PUTENV
1875 GL_GNULIB_PTSNAME_R
1876 GL_GNULIB_PTSNAME
1877 GL_GNULIB_POSIX_OPENPT
1878 GL_GNULIB_POSIX_MEMALIGN
1879 GL_GNULIB_MKSTEMPS
1880 GL_GNULIB_MKSTEMP
1881 GL_GNULIB_MKOSTEMPS
1882 GL_GNULIB_MKOSTEMP
1883 GL_GNULIB_MKDTEMP
1884 GL_GNULIB_MBTOWC
1885 GL_GNULIB_MALLOC_POSIX
1886 GL_GNULIB_MALLOC_GNU
1887 GL_GNULIB_GRANTPT
1888 GL_GNULIB_GETSUBOPT
1889 GL_GNULIB_GETLOADAVG
1890 GL_GNULIB_FREE_POSIX
1891 GL_GNULIB_CANONICALIZE_FILE_NAME
1892 GL_GNULIB_CALLOC_POSIX
1893 GL_GNULIB_CALLOC_GNU
1894 GL_GNULIB_ATOLL
1895 GL_GNULIB_ALIGNED_ALLOC
1896 GL_GNULIB__EXIT
1897 GL_GNULIB_MDA_WCSDUP
1898 GL_GNULIB_WCSFTIME
1899 GL_GNULIB_WCSWIDTH
1900 GL_GNULIB_WCSTOK
1901 GL_GNULIB_WCSSTR
1902 GL_GNULIB_WCSPBRK
1903 GL_GNULIB_WCSSPN
1904 GL_GNULIB_WCSCSPN
1905 GL_GNULIB_WCSRCHR
1906 GL_GNULIB_WCSCHR
1907 GL_GNULIB_WCSDUP
1908 GL_GNULIB_WCSXFRM
1909 GL_GNULIB_WCSCOLL
1910 GL_GNULIB_WCSNCASECMP
1911 GL_GNULIB_WCSCASECMP
1912 GL_GNULIB_WCSNCMP
1913 GL_GNULIB_WCSCMP
1914 GL_GNULIB_WCSNCAT
1915 GL_GNULIB_WCSCAT
1916 GL_GNULIB_WCPNCPY
1917 GL_GNULIB_WCSNCPY
1918 GL_GNULIB_WCPCPY
1919 GL_GNULIB_WCSCPY
1920 GL_GNULIB_WCSNLEN
1921 GL_GNULIB_WCSLEN
1922 GL_GNULIB_WMEMSET
1923 GL_GNULIB_WMEMPCPY
1924 GL_GNULIB_WMEMMOVE
1925 GL_GNULIB_WMEMCPY
1926 GL_GNULIB_WMEMCMP
1927 GL_GNULIB_WMEMCHR
1928 GL_GNULIB_WCWIDTH
1929 GL_GNULIB_WCSNRTOMBS
1930 GL_GNULIB_WCSRTOMBS
1931 GL_GNULIB_WCRTOMB
1932 GL_GNULIB_MBSNRTOWCS
1933 GL_GNULIB_MBSRTOWCS
1934 GL_GNULIB_MBRLEN
1935 GL_GNULIB_MBRTOWC
1936 GL_GNULIB_MBSINIT
1937 GL_GNULIB_WCTOB
1938 GL_GNULIB_BTOWC
1939 GL_COND_OBJ_BTOWC_FALSE
1940 GL_COND_OBJ_BTOWC_TRUE
1941 LOCALE_FR
1942 REPLACE_WCSTOK
1943 REPLACE_WCSFTIME
1944 REPLACE_WCSWIDTH
1945 REPLACE_WCWIDTH
1946 REPLACE_WCSNRTOMBS
1947 REPLACE_WCSRTOMBS
1948 REPLACE_WCRTOMB
1949 REPLACE_MBSNRTOWCS
1950 REPLACE_MBSRTOWCS
1951 REPLACE_MBRLEN
1952 REPLACE_MBRTOWC
1953 REPLACE_MBSINIT
1954 REPLACE_WCTOB
1955 REPLACE_BTOWC
1956 REPLACE_MBSTATE_T
1957 HAVE_DECL_WCWIDTH
1958 HAVE_DECL_WCSDUP
1959 HAVE_DECL_WCTOB
1960 HAVE_WCSFTIME
1961 HAVE_WCSWIDTH
1962 HAVE_WCSTOK
1963 HAVE_WCSSTR
1964 HAVE_WCSPBRK
1965 HAVE_WCSSPN
1966 HAVE_WCSCSPN
1967 HAVE_WCSRCHR
1968 HAVE_WCSCHR
1969 HAVE_WCSDUP
1970 HAVE_WCSXFRM
1971 HAVE_WCSCOLL
1972 HAVE_WCSNCASECMP
1973 HAVE_WCSCASECMP
1974 HAVE_WCSNCMP
1975 HAVE_WCSCMP
1976 HAVE_WCSNCAT
1977 HAVE_WCSCAT
1978 HAVE_WCPNCPY
1979 HAVE_WCSNCPY
1980 HAVE_WCPCPY
1981 HAVE_WCSCPY
1982 HAVE_WCSNLEN
1983 HAVE_WCSLEN
1984 HAVE_WMEMSET
1985 HAVE_WMEMPCPY
1986 HAVE_WMEMMOVE
1987 HAVE_WMEMCPY
1988 HAVE_WMEMCMP
1989 HAVE_WMEMCHR
1990 HAVE_WCSNRTOMBS
1991 HAVE_WCSRTOMBS
1992 HAVE_WCRTOMB
1993 HAVE_MBSNRTOWCS
1994 HAVE_MBSRTOWCS
1995 HAVE_MBRLEN
1996 HAVE_MBRTOWC
1997 HAVE_MBSINIT
1998 HAVE_BTOWC
1999 GL_COND_OBJ_BIND_FALSE
2000 GL_COND_OBJ_BIND_TRUE
2001 GL_GNULIB_INET_PTON
2002 GL_GNULIB_INET_NTOP
2003 HAVE_FEATURES_H
2004 NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H
2005 NEXT_ARPA_INET_H
2006 HAVE_ARPA_INET_H
2007 REPLACE_INET_PTON
2008 REPLACE_INET_NTOP
2009 HAVE_DECL_INET_PTON
2010 HAVE_DECL_INET_NTOP
2011 MKDIR_P
2012 GL_GENERATE_ALLOCA_H_FALSE
2013 GL_GENERATE_ALLOCA_H_TRUE
2014 ALLOCA_H
2015 HAVE_ALLOCA_H
2016 ALLOCA
2017 GL_GNULIB_ACCEPT4
2018 GL_GNULIB_SHUTDOWN
2019 GL_GNULIB_SETSOCKOPT
2020 GL_GNULIB_SENDTO
2021 GL_GNULIB_RECVFROM
2022 GL_GNULIB_SEND
2023 GL_GNULIB_RECV
2024 GL_GNULIB_LISTEN
2025 GL_GNULIB_GETSOCKOPT
2026 GL_GNULIB_GETSOCKNAME
2027 GL_GNULIB_GETPEERNAME
2028 GL_GNULIB_BIND
2029 GL_GNULIB_ACCEPT
2030 GL_GNULIB_CONNECT
2031 GL_GNULIB_SOCKET
2032 GL_COND_OBJ_ACCEPT_FALSE
2033 GL_COND_OBJ_ACCEPT_TRUE
2034 HAVE_WINSOCK2_H
2035 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
2036 UNISTD_H_HAVE_WINSOCK2_H
2037 UNISTD_H_HAVE_SYS_RANDOM_H
2038 REPLACE_WRITE
2039 REPLACE_USLEEP
2040 REPLACE_UNLINKAT
2041 REPLACE_UNLINK
2042 REPLACE_TTYNAME_R
2043 REPLACE_TRUNCATE
2044 REPLACE_SYMLINKAT
2045 REPLACE_SYMLINK
2046 REPLACE_SLEEP
2047 REPLACE_RMDIR
2048 REPLACE_READLINKAT
2049 REPLACE_READLINK
2050 REPLACE_READ
2051 REPLACE_PWRITE
2052 REPLACE_PREAD
2053 REPLACE_LSEEK
2054 REPLACE_LINKAT
2055 REPLACE_LINK
2056 REPLACE_LCHOWN
2057 REPLACE_ISATTY
2058 REPLACE_GETPASS_FOR_GETPASS_GNU
2059 REPLACE_GETPASS
2060 REPLACE_GETPAGESIZE
2061 REPLACE_GETGROUPS
2062 REPLACE_GETLOGIN_R
2063 REPLACE_GETDTABLESIZE
2064 REPLACE_GETDOMAINNAME
2065 REPLACE_GETCWD
2066 REPLACE_FTRUNCATE
2067 REPLACE_FCHOWNAT
2068 REPLACE_FACCESSAT
2069 REPLACE_EXECVPE
2070 REPLACE_EXECVP
2071 REPLACE_EXECVE
2072 REPLACE_EXECV
2073 REPLACE_EXECLP
2074 REPLACE_EXECLE
2075 REPLACE_EXECL
2076 REPLACE_DUP2
2077 REPLACE_DUP
2078 REPLACE_COPY_FILE_RANGE
2079 REPLACE_CLOSE
2080 REPLACE_CHOWN
2081 REPLACE_ACCESS
2082 HAVE_SYS_PARAM_H
2083 HAVE_OS_H
2084 HAVE_DECL_TTYNAME_R
2085 HAVE_DECL_TRUNCATE
2086 HAVE_DECL_SETHOSTNAME
2087 HAVE_DECL_GETUSERSHELL
2088 HAVE_DECL_GETPAGESIZE
2089 HAVE_DECL_GETLOGIN_R
2090 HAVE_DECL_GETLOGIN
2091 HAVE_DECL_GETDOMAINNAME
2092 HAVE_DECL_FDATASYNC
2093 HAVE_DECL_FCHDIR
2094 HAVE_DECL_EXECVPE
2095 HAVE_DECL_ENVIRON
2096 HAVE_USLEEP
2097 HAVE_UNLINKAT
2098 HAVE_SYMLINKAT
2099 HAVE_SYMLINK
2100 HAVE_SLEEP
2101 HAVE_SETHOSTNAME
2102 HAVE_READLINKAT
2103 HAVE_READLINK
2104 HAVE_PWRITE
2105 HAVE_PREAD
2106 HAVE_PIPE2
2107 HAVE_PIPE
2108 HAVE_LINKAT
2109 HAVE_LINK
2110 HAVE_LCHOWN
2111 HAVE_GROUP_MEMBER
2112 HAVE_GETPASS
2113 HAVE_GETPAGESIZE
2114 HAVE_GETLOGIN
2115 HAVE_GETHOSTNAME
2116 HAVE_GETGROUPS
2117 HAVE_GETENTROPY
2118 HAVE_GETDTABLESIZE
2119 HAVE_FTRUNCATE
2120 HAVE_FSYNC
2121 HAVE_FDATASYNC
2122 HAVE_FCHOWNAT
2123 HAVE_FCHDIR
2124 HAVE_FACCESSAT
2125 HAVE_EXECVPE
2126 HAVE_EUIDACCESS
2127 HAVE_DUP3
2128 HAVE_COPY_FILE_RANGE
2129 HAVE_CHOWN
2130 HAVE_WS2TCPIP_H
2131 HAVE_SYS_SOCKET_H
2132 NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H
2133 NEXT_SYS_SOCKET_H
2134 PRAGMA_COLUMNS
2135 PRAGMA_SYSTEM_HEADER
2136 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
2137 INCLUDE_NEXT
2138 HAVE_ACCEPT4
2139 HAVE_SA_FAMILY_T
2140 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY
2141 HAVE_STRUCT_SOCKADDR_STORAGE
2142 GL_COND_LIBTOOL_FALSE
2143 GL_COND_LIBTOOL_TRUE
2144 RANLIB
2145 ARFLAGS
2146 AR
2147 LARGEFILE_CPPFLAGS
2148 target_os
2149 target_vendor
2150 target_cpu
2151 target
2152 host_os
2153 host_vendor
2154 host_cpu
2155 host
2156 build_os
2157 build_vendor
2158 build_cpu
2159 build
2160 EGREP
2161 GREP
2162 CPP
2163 OBJEXT
2164 EXEEXT
2165 ac_ct_CC
2166 CPPFLAGS
2167 LDFLAGS
2168 CFLAGS
2169 CC
2170 MAINT
2171 MAINTAINER_MODE_FALSE
2172 MAINTAINER_MODE_TRUE
2173 target_alias
2174 host_alias
2175 build_alias
2176 LIBS
2177 ECHO_T
2178 ECHO_N
2179 ECHO_C
2180 DEFS
2181 mandir
2182 localedir
2183 libdir
2184 psdir
2185 pdfdir
2186 dvidir
2187 htmldir
2188 infodir
2189 docdir
2190 oldincludedir
2191 includedir
2192 localstatedir
2193 sharedstatedir
2194 sysconfdir
2195 datadir
2196 datarootdir
2197 libexecdir
2198 sbindir
2199 bindir
2200 program_transform_name
2201 prefix
2202 exec_prefix
2203 PACKAGE_URL
2204 PACKAGE_BUGREPORT
2205 PACKAGE_STRING
2206 PACKAGE_VERSION
2207 PACKAGE_TARNAME
2208 PACKAGE_NAME
2209 PATH_SEPARATOR
2210 SHELL'
2211 ac_subst_files=''
2212 ac_user_opts='
2213 enable_option_checking
2214 enable_maintainer_mode
2215 enable_plugins
2216 enable_largefile
2217 enable_year2038
2218 enable_threads
2219 enable_cross_guesses
2220 enable_dependency_tracking
2221 enable_silent_rules
2222 '
2223 ac_precious_vars='build_alias
2224 host_alias
2225 target_alias
2226 CC
2227 CFLAGS
2228 LDFLAGS
2229 LIBS
2230 CPPFLAGS
2231 CPP'
2232
2233
2234 # Initialize some variables set by options.
2235 ac_init_help=
2236 ac_init_version=false
2237 ac_unrecognized_opts=
2238 ac_unrecognized_sep=
2239 # The variables have the same names as the options, with
2240 # dashes changed to underlines.
2241 cache_file=/dev/null
2242 exec_prefix=NONE
2243 no_create=
2244 no_recursion=
2245 prefix=NONE
2246 program_prefix=NONE
2247 program_suffix=NONE
2248 program_transform_name=s,x,x,
2249 silent=
2250 site=
2251 srcdir=
2252 verbose=
2253 x_includes=NONE
2254 x_libraries=NONE
2255
2256 # Installation directory options.
2257 # These are left unexpanded so users can "make install exec_prefix=/foo"
2258 # and all the variables that are supposed to be based on exec_prefix
2259 # by default will actually change.
2260 # Use braces instead of parens because sh, perl, etc. also accept them.
2261 # (The list follows the same order as the GNU Coding Standards.)
2262 bindir='${exec_prefix}/bin'
2263 sbindir='${exec_prefix}/sbin'
2264 libexecdir='${exec_prefix}/libexec'
2265 datarootdir='${prefix}/share'
2266 datadir='${datarootdir}'
2267 sysconfdir='${prefix}/etc'
2268 sharedstatedir='${prefix}/com'
2269 localstatedir='${prefix}/var'
2270 includedir='${prefix}/include'
2271 oldincludedir='/usr/include'
2272 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
2273 infodir='${datarootdir}/info'
2274 htmldir='${docdir}'
2275 dvidir='${docdir}'
2276 pdfdir='${docdir}'
2277 psdir='${docdir}'
2278 libdir='${exec_prefix}/lib'
2279 localedir='${datarootdir}/locale'
2280 mandir='${datarootdir}/man'
2281
2282 ac_prev=
2283 ac_dashdash=
2284 for ac_option
2285 do
2286 # If the previous option needs an argument, assign it.
2287 if test -n "$ac_prev"; then
2288 eval $ac_prev=\$ac_option
2289 ac_prev=
2290 continue
2291 fi
2292
2293 case $ac_option in
2294 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
2295 *=) ac_optarg= ;;
2296 *) ac_optarg=yes ;;
2297 esac
2298
2299 # Accept the important Cygnus configure options, so we can diagnose typos.
2300
2301 case $ac_dashdash$ac_option in
2302 --)
2303 ac_dashdash=yes ;;
2304
2305 -bindir | --bindir | --bindi | --bind | --bin | --bi)
2306 ac_prev=bindir ;;
2307 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
2308 bindir=$ac_optarg ;;
2309
2310 -build | --build | --buil | --bui | --bu)
2311 ac_prev=build_alias ;;
2312 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
2313 build_alias=$ac_optarg ;;
2314
2315 -cache-file | --cache-file | --cache-fil | --cache-fi \
2316 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
2317 ac_prev=cache_file ;;
2318 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
2319 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
2320 cache_file=$ac_optarg ;;
2321
2322 --config-cache | -C)
2323 cache_file=config.cache ;;
2324
2325 -datadir | --datadir | --datadi | --datad)
2326 ac_prev=datadir ;;
2327 -datadir=* | --datadir=* | --datadi=* | --datad=*)
2328 datadir=$ac_optarg ;;
2329
2330 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
2331 | --dataroo | --dataro | --datar)
2332 ac_prev=datarootdir ;;
2333 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
2334 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
2335 datarootdir=$ac_optarg ;;
2336
2337 -disable-* | --disable-*)
2338 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
2339 # Reject names that are not valid shell variable names.
2340 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2341 as_fn_error $? "invalid feature name: $ac_useropt"
2342 ac_useropt_orig=$ac_useropt
2343 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2344 case $ac_user_opts in
2345 *"
2346 "enable_$ac_useropt"
2347 "*) ;;
2348 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
2349 ac_unrecognized_sep=', ';;
2350 esac
2351 eval enable_$ac_useropt=no ;;
2352
2353 -docdir | --docdir | --docdi | --doc | --do)
2354 ac_prev=docdir ;;
2355 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
2356 docdir=$ac_optarg ;;
2357
2358 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
2359 ac_prev=dvidir ;;
2360 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
2361 dvidir=$ac_optarg ;;
2362
2363 -enable-* | --enable-*)
2364 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
2365 # Reject names that are not valid shell variable names.
2366 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2367 as_fn_error $? "invalid feature name: $ac_useropt"
2368 ac_useropt_orig=$ac_useropt
2369 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2370 case $ac_user_opts in
2371 *"
2372 "enable_$ac_useropt"
2373 "*) ;;
2374 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
2375 ac_unrecognized_sep=', ';;
2376 esac
2377 eval enable_$ac_useropt=\$ac_optarg ;;
2378
2379 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
2380 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
2381 | --exec | --exe | --ex)
2382 ac_prev=exec_prefix ;;
2383 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
2384 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
2385 | --exec=* | --exe=* | --ex=*)
2386 exec_prefix=$ac_optarg ;;
2387
2388 -gas | --gas | --ga | --g)
2389 # Obsolete; use --with-gas.
2390 with_gas=yes ;;
2391
2392 -help | --help | --hel | --he | -h)
2393 ac_init_help=long ;;
2394 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
2395 ac_init_help=recursive ;;
2396 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
2397 ac_init_help=short ;;
2398
2399 -host | --host | --hos | --ho)
2400 ac_prev=host_alias ;;
2401 -host=* | --host=* | --hos=* | --ho=*)
2402 host_alias=$ac_optarg ;;
2403
2404 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
2405 ac_prev=htmldir ;;
2406 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
2407 | --ht=*)
2408 htmldir=$ac_optarg ;;
2409
2410 -includedir | --includedir | --includedi | --included | --include \
2411 | --includ | --inclu | --incl | --inc)
2412 ac_prev=includedir ;;
2413 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
2414 | --includ=* | --inclu=* | --incl=* | --inc=*)
2415 includedir=$ac_optarg ;;
2416
2417 -infodir | --infodir | --infodi | --infod | --info | --inf)
2418 ac_prev=infodir ;;
2419 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
2420 infodir=$ac_optarg ;;
2421
2422 -libdir | --libdir | --libdi | --libd)
2423 ac_prev=libdir ;;
2424 -libdir=* | --libdir=* | --libdi=* | --libd=*)
2425 libdir=$ac_optarg ;;
2426
2427 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
2428 | --libexe | --libex | --libe)
2429 ac_prev=libexecdir ;;
2430 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
2431 | --libexe=* | --libex=* | --libe=*)
2432 libexecdir=$ac_optarg ;;
2433
2434 -localedir | --localedir | --localedi | --localed | --locale)
2435 ac_prev=localedir ;;
2436 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
2437 localedir=$ac_optarg ;;
2438
2439 -localstatedir | --localstatedir | --localstatedi | --localstated \
2440 | --localstate | --localstat | --localsta | --localst | --locals)
2441 ac_prev=localstatedir ;;
2442 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
2443 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
2444 localstatedir=$ac_optarg ;;
2445
2446 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
2447 ac_prev=mandir ;;
2448 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
2449 mandir=$ac_optarg ;;
2450
2451 -nfp | --nfp | --nf)
2452 # Obsolete; use --without-fp.
2453 with_fp=no ;;
2454
2455 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
2456 | --no-cr | --no-c | -n)
2457 no_create=yes ;;
2458
2459 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
2460 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
2461 no_recursion=yes ;;
2462
2463 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
2464 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
2465 | --oldin | --oldi | --old | --ol | --o)
2466 ac_prev=oldincludedir ;;
2467 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
2468 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
2469 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
2470 oldincludedir=$ac_optarg ;;
2471
2472 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
2473 ac_prev=prefix ;;
2474 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
2475 prefix=$ac_optarg ;;
2476
2477 -program-prefix | --program-prefix | --program-prefi | --program-pref \
2478 | --program-pre | --program-pr | --program-p)
2479 ac_prev=program_prefix ;;
2480 -program-prefix=* | --program-prefix=* | --program-prefi=* \
2481 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
2482 program_prefix=$ac_optarg ;;
2483
2484 -program-suffix | --program-suffix | --program-suffi | --program-suff \
2485 | --program-suf | --program-su | --program-s)
2486 ac_prev=program_suffix ;;
2487 -program-suffix=* | --program-suffix=* | --program-suffi=* \
2488 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
2489 program_suffix=$ac_optarg ;;
2490
2491 -program-transform-name | --program-transform-name \
2492 | --program-transform-nam | --program-transform-na \
2493 | --program-transform-n | --program-transform- \
2494 | --program-transform | --program-transfor \
2495 | --program-transfo | --program-transf \
2496 | --program-trans | --program-tran \
2497 | --progr-tra | --program-tr | --program-t)
2498 ac_prev=program_transform_name ;;
2499 -program-transform-name=* | --program-transform-name=* \
2500 | --program-transform-nam=* | --program-transform-na=* \
2501 | --program-transform-n=* | --program-transform-=* \
2502 | --program-transform=* | --program-transfor=* \
2503 | --program-transfo=* | --program-transf=* \
2504 | --program-trans=* | --program-tran=* \
2505 | --progr-tra=* | --program-tr=* | --program-t=*)
2506 program_transform_name=$ac_optarg ;;
2507
2508 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
2509 ac_prev=pdfdir ;;
2510 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
2511 pdfdir=$ac_optarg ;;
2512
2513 -psdir | --psdir | --psdi | --psd | --ps)
2514 ac_prev=psdir ;;
2515 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
2516 psdir=$ac_optarg ;;
2517
2518 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2519 | -silent | --silent | --silen | --sile | --sil)
2520 silent=yes ;;
2521
2522 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
2523 ac_prev=sbindir ;;
2524 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
2525 | --sbi=* | --sb=*)
2526 sbindir=$ac_optarg ;;
2527
2528 -sharedstatedir | --sharedstatedir | --sharedstatedi \
2529 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
2530 | --sharedst | --shareds | --shared | --share | --shar \
2531 | --sha | --sh)
2532 ac_prev=sharedstatedir ;;
2533 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
2534 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
2535 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
2536 | --sha=* | --sh=*)
2537 sharedstatedir=$ac_optarg ;;
2538
2539 -site | --site | --sit)
2540 ac_prev=site ;;
2541 -site=* | --site=* | --sit=*)
2542 site=$ac_optarg ;;
2543
2544 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2545 ac_prev=srcdir ;;
2546 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2547 srcdir=$ac_optarg ;;
2548
2549 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
2550 | --syscon | --sysco | --sysc | --sys | --sy)
2551 ac_prev=sysconfdir ;;
2552 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
2553 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
2554 sysconfdir=$ac_optarg ;;
2555
2556 -target | --target | --targe | --targ | --tar | --ta | --t)
2557 ac_prev=target_alias ;;
2558 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
2559 target_alias=$ac_optarg ;;
2560
2561 -v | -verbose | --verbose | --verbos | --verbo | --verb)
2562 verbose=yes ;;
2563
2564 -version | --version | --versio | --versi | --vers | -V)
2565 ac_init_version=: ;;
2566
2567 -with-* | --with-*)
2568 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
2569 # Reject names that are not valid shell variable names.
2570 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2571 as_fn_error $? "invalid package name: $ac_useropt"
2572 ac_useropt_orig=$ac_useropt
2573 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2574 case $ac_user_opts in
2575 *"
2576 "with_$ac_useropt"
2577 "*) ;;
2578 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
2579 ac_unrecognized_sep=', ';;
2580 esac
2581 eval with_$ac_useropt=\$ac_optarg ;;
2582
2583 -without-* | --without-*)
2584 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
2585 # Reject names that are not valid shell variable names.
2586 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2587 as_fn_error $? "invalid package name: $ac_useropt"
2588 ac_useropt_orig=$ac_useropt
2589 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2590 case $ac_user_opts in
2591 *"
2592 "with_$ac_useropt"
2593 "*) ;;
2594 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
2595 ac_unrecognized_sep=', ';;
2596 esac
2597 eval with_$ac_useropt=no ;;
2598
2599 --x)
2600 # Obsolete; use --with-x.
2601 with_x=yes ;;
2602
2603 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
2604 | --x-incl | --x-inc | --x-in | --x-i)
2605 ac_prev=x_includes ;;
2606 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
2607 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
2608 x_includes=$ac_optarg ;;
2609
2610 -x-libraries | --x-libraries | --x-librarie | --x-librari \
2611 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
2612 ac_prev=x_libraries ;;
2613 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
2614 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
2615 x_libraries=$ac_optarg ;;
2616
2617 -*) as_fn_error $? "unrecognized option: \`$ac_option'
2618 Try \`$0 --help' for more information"
2619 ;;
2620
2621 *=*)
2622 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
2623 # Reject names that are not valid shell variable names.
2624 case $ac_envvar in #(
2625 '' | [0-9]* | *[!_$as_cr_alnum]* )
2626 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
2627 esac
2628 eval $ac_envvar=\$ac_optarg
2629 export $ac_envvar ;;
2630
2631 *)
2632 # FIXME: should be removed in autoconf 3.0.
2633 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
2634 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
2635 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
2636 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
2637 ;;
2638
2639 esac
2640 done
2641
2642 if test -n "$ac_prev"; then
2643 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
2644 as_fn_error $? "missing argument to $ac_option"
2645 fi
2646
2647 if test -n "$ac_unrecognized_opts"; then
2648 case $enable_option_checking in
2649 no) ;;
2650 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
2651 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2652 esac
2653 fi
2654
2655 # Check all directory arguments for consistency.
2656 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
2657 datadir sysconfdir sharedstatedir localstatedir includedir \
2658 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2659 libdir localedir mandir
2660 do
2661 eval ac_val=\$$ac_var
2662 # Remove trailing slashes.
2663 case $ac_val in
2664 */ )
2665 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2666 eval $ac_var=\$ac_val;;
2667 esac
2668 # Be sure to have absolute directory names.
2669 case $ac_val in
2670 [\\/$]* | ?:[\\/]* ) continue;;
2671 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2672 esac
2673 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
2674 done
2675
2676 # There might be people who depend on the old broken behavior: `$host'
2677 # used to hold the argument of --host etc.
2678 # FIXME: To remove some day.
2679 build=$build_alias
2680 host=$host_alias
2681 target=$target_alias
2682
2683 # FIXME: To remove some day.
2684 if test "x$host_alias" != x; then
2685 if test "x$build_alias" = x; then
2686 cross_compiling=maybe
2687 elif test "x$build_alias" != "x$host_alias"; then
2688 cross_compiling=yes
2689 fi
2690 fi
2691
2692 ac_tool_prefix=
2693 test -n "$host_alias" && ac_tool_prefix=$host_alias-
2694
2695 test "$silent" = yes && exec 6>/dev/null
2696
2697
2698 ac_pwd=`pwd` && test -n "$ac_pwd" &&
2699 ac_ls_di=`ls -di .` &&
2700 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2701 as_fn_error $? "working directory cannot be determined"
2702 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2703 as_fn_error $? "pwd does not report name of working directory"
2704
2705
2706 # Find the source files, if location was not specified.
2707 if test -z "$srcdir"; then
2708 ac_srcdir_defaulted=yes
2709 # Try the directory containing this script, then the parent directory.
2710 ac_confdir=`$as_dirname -- "$as_myself" ||
2711 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2712 X"$as_myself" : 'X\(//\)[^/]' \| \
2713 X"$as_myself" : 'X\(//\)$' \| \
2714 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2715 $as_echo X"$as_myself" |
2716 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2717 s//\1/
2718 q
2719 }
2720 /^X\(\/\/\)[^/].*/{
2721 s//\1/
2722 q
2723 }
2724 /^X\(\/\/\)$/{
2725 s//\1/
2726 q
2727 }
2728 /^X\(\/\).*/{
2729 s//\1/
2730 q
2731 }
2732 s/.*/./; q'`
2733 srcdir=$ac_confdir
2734 if test ! -r "$srcdir/$ac_unique_file"; then
2735 srcdir=..
2736 fi
2737 else
2738 ac_srcdir_defaulted=no
2739 fi
2740 if test ! -r "$srcdir/$ac_unique_file"; then
2741 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2742 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
2743 fi
2744 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2745 ac_abs_confdir=`(
2746 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
2747 pwd)`
2748 # When building in place, set srcdir=.
2749 if test "$ac_abs_confdir" = "$ac_pwd"; then
2750 srcdir=.
2751 fi
2752 # Remove unnecessary trailing slashes from srcdir.
2753 # Double slashes in file names in object file debugging info
2754 # mess up M-x gdb in Emacs.
2755 case $srcdir in
2756 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2757 esac
2758 for ac_var in $ac_precious_vars; do
2759 eval ac_env_${ac_var}_set=\${${ac_var}+set}
2760 eval ac_env_${ac_var}_value=\$${ac_var}
2761 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2762 eval ac_cv_env_${ac_var}_value=\$${ac_var}
2763 done
2764
2765 #
2766 # Report the --help message.
2767 #
2768 if test "$ac_init_help" = "long"; then
2769 # Omit some internal or obsolete options to make the list less imposing.
2770 # This message is too long to be a string in the A/UX 3.1 sh.
2771 cat <<_ACEOF
2772 \`configure' configures libgnu UNUSED-VERSION to adapt to many kinds of systems.
2773
2774 Usage: $0 [OPTION]... [VAR=VALUE]...
2775
2776 To assign environment variables (e.g., CC, CFLAGS...), specify them as
2777 VAR=VALUE. See below for descriptions of some of the useful variables.
2778
2779 Defaults for the options are specified in brackets.
2780
2781 Configuration:
2782 -h, --help display this help and exit
2783 --help=short display options specific to this package
2784 --help=recursive display the short help of all the included packages
2785 -V, --version display version information and exit
2786 -q, --quiet, --silent do not print \`checking ...' messages
2787 --cache-file=FILE cache test results in FILE [disabled]
2788 -C, --config-cache alias for \`--cache-file=config.cache'
2789 -n, --no-create do not create output files
2790 --srcdir=DIR find the sources in DIR [configure dir or \`..']
2791
2792 Installation directories:
2793 --prefix=PREFIX install architecture-independent files in PREFIX
2794 [$ac_default_prefix]
2795 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
2796 [PREFIX]
2797
2798 By default, \`make install' will install all the files in
2799 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
2800 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2801 for instance \`--prefix=\$HOME'.
2802
2803 For better control, use the options below.
2804
2805 Fine tuning of the installation directories:
2806 --bindir=DIR user executables [EPREFIX/bin]
2807 --sbindir=DIR system admin executables [EPREFIX/sbin]
2808 --libexecdir=DIR program executables [EPREFIX/libexec]
2809 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
2810 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
2811 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
2812 --libdir=DIR object code libraries [EPREFIX/lib]
2813 --includedir=DIR C header files [PREFIX/include]
2814 --oldincludedir=DIR C header files for non-gcc [/usr/include]
2815 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
2816 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
2817 --infodir=DIR info documentation [DATAROOTDIR/info]
2818 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
2819 --mandir=DIR man documentation [DATAROOTDIR/man]
2820 --docdir=DIR documentation root [DATAROOTDIR/doc/libgnu]
2821 --htmldir=DIR html documentation [DOCDIR]
2822 --dvidir=DIR dvi documentation [DOCDIR]
2823 --pdfdir=DIR pdf documentation [DOCDIR]
2824 --psdir=DIR ps documentation [DOCDIR]
2825 _ACEOF
2826
2827 cat <<\_ACEOF
2828
2829 Program names:
2830 --program-prefix=PREFIX prepend PREFIX to installed program names
2831 --program-suffix=SUFFIX append SUFFIX to installed program names
2832 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
2833
2834 System types:
2835 --build=BUILD configure for building on BUILD [guessed]
2836 --host=HOST cross-compile to build programs to run on HOST [BUILD]
2837 --target=TARGET configure for building compilers for TARGET [HOST]
2838 _ACEOF
2839 fi
2840
2841 if test -n "$ac_init_help"; then
2842 case $ac_init_help in
2843 short | recursive ) echo "Configuration of libgnu UNUSED-VERSION:";;
2844 esac
2845 cat <<\_ACEOF
2846
2847 Optional Features:
2848 --disable-option-checking ignore unrecognized --enable/--with options
2849 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
2850 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
2851 --enable-maintainer-mode
2852 enable make rules and dependencies not useful (and
2853 sometimes confusing) to the casual installer
2854 --enable-plugins Enable support for plugins
2855 --disable-largefile omit support for large files
2856 --disable-year2038 omit support for timestamps past the year 2038
2857 --enable-threads={isoc|posix|isoc+posix|windows}
2858 specify multithreading API
2859 --disable-threads build without multithread safety
2860 --enable-cross-guesses={conservative|risky}
2861 specify policy for cross-compilation guesses
2862 --enable-dependency-tracking
2863 do not reject slow dependency extractors
2864 --disable-dependency-tracking
2865 speeds up one-time build
2866 --enable-silent-rules less verbose build output (undo: "make V=1")
2867 --disable-silent-rules verbose build output (undo: "make V=0")
2868
2869 Some influential environment variables:
2870 CC C compiler command
2871 CFLAGS C compiler flags
2872 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2873 nonstandard directory <lib dir>
2874 LIBS libraries to pass to the linker, e.g. -l<library>
2875 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2876 you have headers in a nonstandard directory <include dir>
2877 CPP C preprocessor
2878
2879 Use these variables to override the choices made by `configure' or to help
2880 it to find libraries and programs with nonstandard names/locations.
2881
2882 Report bugs to the package provider.
2883 _ACEOF
2884 ac_status=$?
2885 fi
2886
2887 if test "$ac_init_help" = "recursive"; then
2888 # If there are subdirs, report their specific --help.
2889 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2890 test -d "$ac_dir" ||
2891 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2892 continue
2893 ac_builddir=.
2894
2895 case "$ac_dir" in
2896 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2897 *)
2898 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2899 # A ".." for each directory in $ac_dir_suffix.
2900 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2901 case $ac_top_builddir_sub in
2902 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2903 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2904 esac ;;
2905 esac
2906 ac_abs_top_builddir=$ac_pwd
2907 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2908 # for backward compatibility:
2909 ac_top_builddir=$ac_top_build_prefix
2910
2911 case $srcdir in
2912 .) # We are building in place.
2913 ac_srcdir=.
2914 ac_top_srcdir=$ac_top_builddir_sub
2915 ac_abs_top_srcdir=$ac_pwd ;;
2916 [\\/]* | ?:[\\/]* ) # Absolute name.
2917 ac_srcdir=$srcdir$ac_dir_suffix;
2918 ac_top_srcdir=$srcdir
2919 ac_abs_top_srcdir=$srcdir ;;
2920 *) # Relative name.
2921 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2922 ac_top_srcdir=$ac_top_build_prefix$srcdir
2923 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2924 esac
2925 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2926
2927 cd "$ac_dir" || { ac_status=$?; continue; }
2928 # Check for guested configure.
2929 if test -f "$ac_srcdir/configure.gnu"; then
2930 echo &&
2931 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2932 elif test -f "$ac_srcdir/configure"; then
2933 echo &&
2934 $SHELL "$ac_srcdir/configure" --help=recursive
2935 else
2936 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2937 fi || ac_status=$?
2938 cd "$ac_pwd" || { ac_status=$?; break; }
2939 done
2940 fi
2941
2942 test -n "$ac_init_help" && exit $ac_status
2943 if $ac_init_version; then
2944 cat <<\_ACEOF
2945 libgnu configure UNUSED-VERSION
2946 generated by GNU Autoconf 2.69
2947
2948 Copyright (C) 2012 Free Software Foundation, Inc.
2949 This configure script is free software; the Free Software Foundation
2950 gives unlimited permission to copy, distribute and modify it.
2951 _ACEOF
2952 exit
2953 fi
2954
2955 ## ------------------------ ##
2956 ## Autoconf initialization. ##
2957 ## ------------------------ ##
2958
2959 # ac_fn_c_try_compile LINENO
2960 # --------------------------
2961 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2962 ac_fn_c_try_compile ()
2963 {
2964 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2965 rm -f conftest.$ac_objext
2966 if { { ac_try="$ac_compile"
2967 case "(($ac_try" in
2968 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2969 *) ac_try_echo=$ac_try;;
2970 esac
2971 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2972 $as_echo "$ac_try_echo"; } >&5
2973 (eval "$ac_compile") 2>conftest.err
2974 ac_status=$?
2975 if test -s conftest.err; then
2976 grep -v '^ *+' conftest.err >conftest.er1
2977 cat conftest.er1 >&5
2978 mv -f conftest.er1 conftest.err
2979 fi
2980 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2981 test $ac_status = 0; } && {
2982 test -z "$ac_c_werror_flag" ||
2983 test ! -s conftest.err
2984 } && test -s conftest.$ac_objext; then :
2985 ac_retval=0
2986 else
2987 $as_echo "$as_me: failed program was:" >&5
2988 sed 's/^/| /' conftest.$ac_ext >&5
2989
2990 ac_retval=1
2991 fi
2992 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2993 as_fn_set_status $ac_retval
2994
2995 } # ac_fn_c_try_compile
2996
2997 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2998 # -------------------------------------------------------
2999 # Tests whether HEADER exists and can be compiled using the include files in
3000 # INCLUDES, setting the cache variable VAR accordingly.
3001 ac_fn_c_check_header_compile ()
3002 {
3003 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3005 $as_echo_n "checking for $2... " >&6; }
3006 if eval \${$3+:} false; then :
3007 $as_echo_n "(cached) " >&6
3008 else
3009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3010 /* end confdefs.h. */
3011 $4
3012 #include <$2>
3013 _ACEOF
3014 if ac_fn_c_try_compile "$LINENO"; then :
3015 eval "$3=yes"
3016 else
3017 eval "$3=no"
3018 fi
3019 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3020 fi
3021 eval ac_res=\$$3
3022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3023 $as_echo "$ac_res" >&6; }
3024 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3025
3026 } # ac_fn_c_check_header_compile
3027
3028 # ac_fn_c_try_cpp LINENO
3029 # ----------------------
3030 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
3031 ac_fn_c_try_cpp ()
3032 {
3033 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3034 if { { ac_try="$ac_cpp conftest.$ac_ext"
3035 case "(($ac_try" in
3036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3037 *) ac_try_echo=$ac_try;;
3038 esac
3039 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3040 $as_echo "$ac_try_echo"; } >&5
3041 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
3042 ac_status=$?
3043 if test -s conftest.err; then
3044 grep -v '^ *+' conftest.err >conftest.er1
3045 cat conftest.er1 >&5
3046 mv -f conftest.er1 conftest.err
3047 fi
3048 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3049 test $ac_status = 0; } > conftest.i && {
3050 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3051 test ! -s conftest.err
3052 }; then :
3053 ac_retval=0
3054 else
3055 $as_echo "$as_me: failed program was:" >&5
3056 sed 's/^/| /' conftest.$ac_ext >&5
3057
3058 ac_retval=1
3059 fi
3060 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3061 as_fn_set_status $ac_retval
3062
3063 } # ac_fn_c_try_cpp
3064
3065 # ac_fn_c_try_run LINENO
3066 # ----------------------
3067 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
3068 # that executables *can* be run.
3069 ac_fn_c_try_run ()
3070 {
3071 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3072 if { { ac_try="$ac_link"
3073 case "(($ac_try" in
3074 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3075 *) ac_try_echo=$ac_try;;
3076 esac
3077 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3078 $as_echo "$ac_try_echo"; } >&5
3079 (eval "$ac_link") 2>&5
3080 ac_status=$?
3081 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3082 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
3083 { { case "(($ac_try" in
3084 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3085 *) ac_try_echo=$ac_try;;
3086 esac
3087 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3088 $as_echo "$ac_try_echo"; } >&5
3089 (eval "$ac_try") 2>&5
3090 ac_status=$?
3091 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3092 test $ac_status = 0; }; }; then :
3093 ac_retval=0
3094 else
3095 $as_echo "$as_me: program exited with status $ac_status" >&5
3096 $as_echo "$as_me: failed program was:" >&5
3097 sed 's/^/| /' conftest.$ac_ext >&5
3098
3099 ac_retval=$ac_status
3100 fi
3101 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
3102 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3103 as_fn_set_status $ac_retval
3104
3105 } # ac_fn_c_try_run
3106
3107 # ac_fn_c_try_link LINENO
3108 # -----------------------
3109 # Try to link conftest.$ac_ext, and return whether this succeeded.
3110 ac_fn_c_try_link ()
3111 {
3112 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3113 rm -f conftest.$ac_objext conftest$ac_exeext
3114 if { { ac_try="$ac_link"
3115 case "(($ac_try" in
3116 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3117 *) ac_try_echo=$ac_try;;
3118 esac
3119 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3120 $as_echo "$ac_try_echo"; } >&5
3121 (eval "$ac_link") 2>conftest.err
3122 ac_status=$?
3123 if test -s conftest.err; then
3124 grep -v '^ *+' conftest.err >conftest.er1
3125 cat conftest.er1 >&5
3126 mv -f conftest.er1 conftest.err
3127 fi
3128 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3129 test $ac_status = 0; } && {
3130 test -z "$ac_c_werror_flag" ||
3131 test ! -s conftest.err
3132 } && test -s conftest$ac_exeext && {
3133 test "$cross_compiling" = yes ||
3134 test -x conftest$ac_exeext
3135 }; then :
3136 ac_retval=0
3137 else
3138 $as_echo "$as_me: failed program was:" >&5
3139 sed 's/^/| /' conftest.$ac_ext >&5
3140
3141 ac_retval=1
3142 fi
3143 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
3144 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
3145 # interfere with the next link command; also delete a directory that is
3146 # left behind by Apple's compiler. We do this before executing the actions.
3147 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
3148 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3149 as_fn_set_status $ac_retval
3150
3151 } # ac_fn_c_try_link
3152
3153 # ac_fn_c_check_func LINENO FUNC VAR
3154 # ----------------------------------
3155 # Tests whether FUNC exists, setting the cache variable VAR accordingly
3156 ac_fn_c_check_func ()
3157 {
3158 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3160 $as_echo_n "checking for $2... " >&6; }
3161 if eval \${$3+:} false; then :
3162 $as_echo_n "(cached) " >&6
3163 else
3164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3165 /* end confdefs.h. */
3166 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
3167 For example, HP-UX 11i <limits.h> declares gettimeofday. */
3168 #define $2 innocuous_$2
3169
3170 /* System header to define __stub macros and hopefully few prototypes,
3171 which can conflict with char $2 (); below.
3172 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3173 <limits.h> exists even on freestanding compilers. */
3174
3175 #ifdef __STDC__
3176 # include <limits.h>
3177 #else
3178 # include <assert.h>
3179 #endif
3180
3181 #undef $2
3182
3183 /* Override any GCC internal prototype to avoid an error.
3184 Use char because int might match the return type of a GCC
3185 builtin and then its argument prototype would still apply. */
3186 #ifdef __cplusplus
3187 extern "C"
3188 #endif
3189 char $2 ();
3190 /* The GNU C library defines this for functions which it implements
3191 to always fail with ENOSYS. Some functions are actually named
3192 something starting with __ and the normal name is an alias. */
3193 #if defined __stub_$2 || defined __stub___$2
3194 choke me
3195 #endif
3196
3197 int
3198 main ()
3199 {
3200 return $2 ();
3201 ;
3202 return 0;
3203 }
3204 _ACEOF
3205 if ac_fn_c_try_link "$LINENO"; then :
3206 eval "$3=yes"
3207 else
3208 eval "$3=no"
3209 fi
3210 rm -f core conftest.err conftest.$ac_objext \
3211 conftest$ac_exeext conftest.$ac_ext
3212 fi
3213 eval ac_res=\$$3
3214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3215 $as_echo "$ac_res" >&6; }
3216 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3217
3218 } # ac_fn_c_check_func
3219
3220 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
3221 # -------------------------------------------------------
3222 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
3223 # the include files in INCLUDES and setting the cache variable VAR
3224 # accordingly.
3225 ac_fn_c_check_header_mongrel ()
3226 {
3227 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3228 if eval \${$3+:} false; then :
3229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3230 $as_echo_n "checking for $2... " >&6; }
3231 if eval \${$3+:} false; then :
3232 $as_echo_n "(cached) " >&6
3233 fi
3234 eval ac_res=\$$3
3235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3236 $as_echo "$ac_res" >&6; }
3237 else
3238 # Is the header compilable?
3239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
3240 $as_echo_n "checking $2 usability... " >&6; }
3241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3242 /* end confdefs.h. */
3243 $4
3244 #include <$2>
3245 _ACEOF
3246 if ac_fn_c_try_compile "$LINENO"; then :
3247 ac_header_compiler=yes
3248 else
3249 ac_header_compiler=no
3250 fi
3251 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
3253 $as_echo "$ac_header_compiler" >&6; }
3254
3255 # Is the header present?
3256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
3257 $as_echo_n "checking $2 presence... " >&6; }
3258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3259 /* end confdefs.h. */
3260 #include <$2>
3261 _ACEOF
3262 if ac_fn_c_try_cpp "$LINENO"; then :
3263 ac_header_preproc=yes
3264 else
3265 ac_header_preproc=no
3266 fi
3267 rm -f conftest.err conftest.i conftest.$ac_ext
3268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
3269 $as_echo "$ac_header_preproc" >&6; }
3270
3271 # So? What about this header?
3272 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
3273 yes:no: )
3274 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
3275 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
3276 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
3277 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
3278 ;;
3279 no:yes:* )
3280 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
3281 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
3282 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
3283 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
3284 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
3285 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
3286 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
3287 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
3288 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
3289 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
3290 ;;
3291 esac
3292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3293 $as_echo_n "checking for $2... " >&6; }
3294 if eval \${$3+:} false; then :
3295 $as_echo_n "(cached) " >&6
3296 else
3297 eval "$3=\$ac_header_compiler"
3298 fi
3299 eval ac_res=\$$3
3300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3301 $as_echo "$ac_res" >&6; }
3302 fi
3303 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3304
3305 } # ac_fn_c_check_header_mongrel
3306
3307 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
3308 # -------------------------------------------
3309 # Tests whether TYPE exists after having included INCLUDES, setting cache
3310 # variable VAR accordingly.
3311 ac_fn_c_check_type ()
3312 {
3313 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3315 $as_echo_n "checking for $2... " >&6; }
3316 if eval \${$3+:} false; then :
3317 $as_echo_n "(cached) " >&6
3318 else
3319 eval "$3=no"
3320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3321 /* end confdefs.h. */
3322 $4
3323 int
3324 main ()
3325 {
3326 if (sizeof ($2))
3327 return 0;
3328 ;
3329 return 0;
3330 }
3331 _ACEOF
3332 if ac_fn_c_try_compile "$LINENO"; then :
3333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3334 /* end confdefs.h. */
3335 $4
3336 int
3337 main ()
3338 {
3339 if (sizeof (($2)))
3340 return 0;
3341 ;
3342 return 0;
3343 }
3344 _ACEOF
3345 if ac_fn_c_try_compile "$LINENO"; then :
3346
3347 else
3348 eval "$3=yes"
3349 fi
3350 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3351 fi
3352 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3353 fi
3354 eval ac_res=\$$3
3355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3356 $as_echo "$ac_res" >&6; }
3357 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3358
3359 } # ac_fn_c_check_type
3360
3361 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
3362 # ----------------------------------------------------
3363 # Tries to find if the field MEMBER exists in type AGGR, after including
3364 # INCLUDES, setting cache variable VAR accordingly.
3365 ac_fn_c_check_member ()
3366 {
3367 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
3369 $as_echo_n "checking for $2.$3... " >&6; }
3370 if eval \${$4+:} false; then :
3371 $as_echo_n "(cached) " >&6
3372 else
3373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3374 /* end confdefs.h. */
3375 $5
3376 int
3377 main ()
3378 {
3379 static $2 ac_aggr;
3380 if (ac_aggr.$3)
3381 return 0;
3382 ;
3383 return 0;
3384 }
3385 _ACEOF
3386 if ac_fn_c_try_compile "$LINENO"; then :
3387 eval "$4=yes"
3388 else
3389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3390 /* end confdefs.h. */
3391 $5
3392 int
3393 main ()
3394 {
3395 static $2 ac_aggr;
3396 if (sizeof ac_aggr.$3)
3397 return 0;
3398 ;
3399 return 0;
3400 }
3401 _ACEOF
3402 if ac_fn_c_try_compile "$LINENO"; then :
3403 eval "$4=yes"
3404 else
3405 eval "$4=no"
3406 fi
3407 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3408 fi
3409 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3410 fi
3411 eval ac_res=\$$4
3412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3413 $as_echo "$ac_res" >&6; }
3414 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3415
3416 } # ac_fn_c_check_member
3417
3418 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
3419 # ---------------------------------------------
3420 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
3421 # accordingly.
3422 ac_fn_c_check_decl ()
3423 {
3424 ac_save_ac_compile="$ac_compile"
3425 if test -n "$ac_compile_for_check_decl"; then
3426 ac_compile="$ac_compile_for_check_decl"
3427 fi
3428 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3429 as_decl_name=`echo $2|sed 's/ *(.*//'`
3430 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
3431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
3432 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
3433 if eval \${$3+:} false; then :
3434 $as_echo_n "(cached) " >&6
3435 else
3436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3437 /* end confdefs.h. */
3438 $4
3439 int
3440 main ()
3441 {
3442 #ifndef $as_decl_name
3443 #ifdef __cplusplus
3444 (void) $as_decl_use;
3445 #else
3446 (void) $as_decl_name;
3447 #endif
3448 #endif
3449
3450 ;
3451 return 0;
3452 }
3453 _ACEOF
3454 if ac_fn_c_try_compile "$LINENO"; then :
3455 eval "$3=yes"
3456 else
3457 eval "$3=no"
3458 fi
3459 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3460 fi
3461 eval ac_res=\$$3
3462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3463 $as_echo "$ac_res" >&6; }
3464 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3465 ac_compile="$ac_save_ac_compile"
3466
3467 } # ac_fn_c_check_decl
3468
3469 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
3470 # --------------------------------------------
3471 # Tries to find the compile-time value of EXPR in a program that includes
3472 # INCLUDES, setting VAR accordingly. Returns whether the value could be
3473 # computed
3474 ac_fn_c_compute_int ()
3475 {
3476 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3477 if test "$cross_compiling" = yes; then
3478 # Depending upon the size, compute the lo and hi bounds.
3479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3480 /* end confdefs.h. */
3481 $4
3482 int
3483 main ()
3484 {
3485 static int test_array [1 - 2 * !(($2) >= 0)];
3486 test_array [0] = 0;
3487 return test_array [0];
3488
3489 ;
3490 return 0;
3491 }
3492 _ACEOF
3493 if ac_fn_c_try_compile "$LINENO"; then :
3494 ac_lo=0 ac_mid=0
3495 while :; do
3496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3497 /* end confdefs.h. */
3498 $4
3499 int
3500 main ()
3501 {
3502 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3503 test_array [0] = 0;
3504 return test_array [0];
3505
3506 ;
3507 return 0;
3508 }
3509 _ACEOF
3510 if ac_fn_c_try_compile "$LINENO"; then :
3511 ac_hi=$ac_mid; break
3512 else
3513 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
3514 if test $ac_lo -le $ac_mid; then
3515 ac_lo= ac_hi=
3516 break
3517 fi
3518 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
3519 fi
3520 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3521 done
3522 else
3523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3524 /* end confdefs.h. */
3525 $4
3526 int
3527 main ()
3528 {
3529 static int test_array [1 - 2 * !(($2) < 0)];
3530 test_array [0] = 0;
3531 return test_array [0];
3532
3533 ;
3534 return 0;
3535 }
3536 _ACEOF
3537 if ac_fn_c_try_compile "$LINENO"; then :
3538 ac_hi=-1 ac_mid=-1
3539 while :; do
3540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3541 /* end confdefs.h. */
3542 $4
3543 int
3544 main ()
3545 {
3546 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
3547 test_array [0] = 0;
3548 return test_array [0];
3549
3550 ;
3551 return 0;
3552 }
3553 _ACEOF
3554 if ac_fn_c_try_compile "$LINENO"; then :
3555 ac_lo=$ac_mid; break
3556 else
3557 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
3558 if test $ac_mid -le $ac_hi; then
3559 ac_lo= ac_hi=
3560 break
3561 fi
3562 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
3563 fi
3564 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3565 done
3566 else
3567 ac_lo= ac_hi=
3568 fi
3569 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3570 fi
3571 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3572 # Binary search between lo and hi bounds.
3573 while test "x$ac_lo" != "x$ac_hi"; do
3574 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
3575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3576 /* end confdefs.h. */
3577 $4
3578 int
3579 main ()
3580 {
3581 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3582 test_array [0] = 0;
3583 return test_array [0];
3584
3585 ;
3586 return 0;
3587 }
3588 _ACEOF
3589 if ac_fn_c_try_compile "$LINENO"; then :
3590 ac_hi=$ac_mid
3591 else
3592 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
3593 fi
3594 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3595 done
3596 case $ac_lo in #((
3597 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
3598 '') ac_retval=1 ;;
3599 esac
3600 else
3601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3602 /* end confdefs.h. */
3603 $4
3604 static long int longval () { return $2; }
3605 static unsigned long int ulongval () { return $2; }
3606 #include <stdio.h>
3607 #include <stdlib.h>
3608 int
3609 main ()
3610 {
3611
3612 FILE *f = fopen ("conftest.val", "w");
3613 if (! f)
3614 return 1;
3615 if (($2) < 0)
3616 {
3617 long int i = longval ();
3618 if (i != ($2))
3619 return 1;
3620 fprintf (f, "%ld", i);
3621 }
3622 else
3623 {
3624 unsigned long int i = ulongval ();
3625 if (i != ($2))
3626 return 1;
3627 fprintf (f, "%lu", i);
3628 }
3629 /* Do not output a trailing newline, as this causes \r\n confusion
3630 on some platforms. */
3631 return ferror (f) || fclose (f) != 0;
3632
3633 ;
3634 return 0;
3635 }
3636 _ACEOF
3637 if ac_fn_c_try_run "$LINENO"; then :
3638 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
3639 else
3640 ac_retval=1
3641 fi
3642 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3643 conftest.$ac_objext conftest.beam conftest.$ac_ext
3644 rm -f conftest.val
3645
3646 fi
3647 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3648 as_fn_set_status $ac_retval
3649
3650 } # ac_fn_c_compute_int
3651 cat >config.log <<_ACEOF
3652 This file contains any messages produced by compilers while
3653 running configure, to aid debugging if configure makes a mistake.
3654
3655 It was created by libgnu $as_me UNUSED-VERSION, which was
3656 generated by GNU Autoconf 2.69. Invocation command line was
3657
3658 $ $0 $@
3659
3660 _ACEOF
3661 exec 5>>config.log
3662 {
3663 cat <<_ASUNAME
3664 ## --------- ##
3665 ## Platform. ##
3666 ## --------- ##
3667
3668 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3669 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3670 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3671 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3672 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3673
3674 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3675 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
3676
3677 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
3678 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
3679 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3680 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
3681 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
3682 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
3683 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
3684
3685 _ASUNAME
3686
3687 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3688 for as_dir in $PATH
3689 do
3690 IFS=$as_save_IFS
3691 test -z "$as_dir" && as_dir=.
3692 $as_echo "PATH: $as_dir"
3693 done
3694 IFS=$as_save_IFS
3695
3696 } >&5
3697
3698 cat >&5 <<_ACEOF
3699
3700
3701 ## ----------- ##
3702 ## Core tests. ##
3703 ## ----------- ##
3704
3705 _ACEOF
3706
3707
3708 # Keep a trace of the command line.
3709 # Strip out --no-create and --no-recursion so they do not pile up.
3710 # Strip out --silent because we don't want to record it for future runs.
3711 # Also quote any args containing shell meta-characters.
3712 # Make two passes to allow for proper duplicate-argument suppression.
3713 ac_configure_args=
3714 ac_configure_args0=
3715 ac_configure_args1=
3716 ac_must_keep_next=false
3717 for ac_pass in 1 2
3718 do
3719 for ac_arg
3720 do
3721 case $ac_arg in
3722 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3723 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3724 | -silent | --silent | --silen | --sile | --sil)
3725 continue ;;
3726 *\'*)
3727 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3728 esac
3729 case $ac_pass in
3730 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3731 2)
3732 as_fn_append ac_configure_args1 " '$ac_arg'"
3733 if test $ac_must_keep_next = true; then
3734 ac_must_keep_next=false # Got value, back to normal.
3735 else
3736 case $ac_arg in
3737 *=* | --config-cache | -C | -disable-* | --disable-* \
3738 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3739 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3740 | -with-* | --with-* | -without-* | --without-* | --x)
3741 case "$ac_configure_args0 " in
3742 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3743 esac
3744 ;;
3745 -* ) ac_must_keep_next=true ;;
3746 esac
3747 fi
3748 as_fn_append ac_configure_args " '$ac_arg'"
3749 ;;
3750 esac
3751 done
3752 done
3753 { ac_configure_args0=; unset ac_configure_args0;}
3754 { ac_configure_args1=; unset ac_configure_args1;}
3755
3756 # When interrupted or exit'd, cleanup temporary files, and complete
3757 # config.log. We remove comments because anyway the quotes in there
3758 # would cause problems or look ugly.
3759 # WARNING: Use '\'' to represent an apostrophe within the trap.
3760 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3761 trap 'exit_status=$?
3762 # Save into config.log some information that might help in debugging.
3763 {
3764 echo
3765
3766 $as_echo "## ---------------- ##
3767 ## Cache variables. ##
3768 ## ---------------- ##"
3769 echo
3770 # The following way of writing the cache mishandles newlines in values,
3771 (
3772 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3773 eval ac_val=\$$ac_var
3774 case $ac_val in #(
3775 *${as_nl}*)
3776 case $ac_var in #(
3777 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3778 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3779 esac
3780 case $ac_var in #(
3781 _ | IFS | as_nl) ;; #(
3782 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3783 *) { eval $ac_var=; unset $ac_var;} ;;
3784 esac ;;
3785 esac
3786 done
3787 (set) 2>&1 |
3788 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3789 *${as_nl}ac_space=\ *)
3790 sed -n \
3791 "s/'\''/'\''\\\\'\'''\''/g;
3792 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3793 ;; #(
3794 *)
3795 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3796 ;;
3797 esac |
3798 sort
3799 )
3800 echo
3801
3802 $as_echo "## ----------------- ##
3803 ## Output variables. ##
3804 ## ----------------- ##"
3805 echo
3806 for ac_var in $ac_subst_vars
3807 do
3808 eval ac_val=\$$ac_var
3809 case $ac_val in
3810 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3811 esac
3812 $as_echo "$ac_var='\''$ac_val'\''"
3813 done | sort
3814 echo
3815
3816 if test -n "$ac_subst_files"; then
3817 $as_echo "## ------------------- ##
3818 ## File substitutions. ##
3819 ## ------------------- ##"
3820 echo
3821 for ac_var in $ac_subst_files
3822 do
3823 eval ac_val=\$$ac_var
3824 case $ac_val in
3825 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3826 esac
3827 $as_echo "$ac_var='\''$ac_val'\''"
3828 done | sort
3829 echo
3830 fi
3831
3832 if test -s confdefs.h; then
3833 $as_echo "## ----------- ##
3834 ## confdefs.h. ##
3835 ## ----------- ##"
3836 echo
3837 cat confdefs.h
3838 echo
3839 fi
3840 test "$ac_signal" != 0 &&
3841 $as_echo "$as_me: caught signal $ac_signal"
3842 $as_echo "$as_me: exit $exit_status"
3843 } >&5
3844 rm -f core *.core core.conftest.* &&
3845 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3846 exit $exit_status
3847 ' 0
3848 for ac_signal in 1 2 13 15; do
3849 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3850 done
3851 ac_signal=0
3852
3853 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3854 rm -f -r conftest* confdefs.h
3855
3856 $as_echo "/* confdefs.h */" > confdefs.h
3857
3858 # Predefined preprocessor variables.
3859
3860 cat >>confdefs.h <<_ACEOF
3861 #define PACKAGE_NAME "$PACKAGE_NAME"
3862 _ACEOF
3863
3864 cat >>confdefs.h <<_ACEOF
3865 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3866 _ACEOF
3867
3868 cat >>confdefs.h <<_ACEOF
3869 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3870 _ACEOF
3871
3872 cat >>confdefs.h <<_ACEOF
3873 #define PACKAGE_STRING "$PACKAGE_STRING"
3874 _ACEOF
3875
3876 cat >>confdefs.h <<_ACEOF
3877 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3878 _ACEOF
3879
3880 cat >>confdefs.h <<_ACEOF
3881 #define PACKAGE_URL "$PACKAGE_URL"
3882 _ACEOF
3883
3884
3885 # Let the site file select an alternate cache file if it wants to.
3886 # Prefer an explicitly selected file to automatically selected ones.
3887 ac_site_file1=NONE
3888 ac_site_file2=NONE
3889 if test -n "$CONFIG_SITE"; then
3890 # We do not want a PATH search for config.site.
3891 case $CONFIG_SITE in #((
3892 -*) ac_site_file1=./$CONFIG_SITE;;
3893 */*) ac_site_file1=$CONFIG_SITE;;
3894 *) ac_site_file1=./$CONFIG_SITE;;
3895 esac
3896 elif test "x$prefix" != xNONE; then
3897 ac_site_file1=$prefix/share/config.site
3898 ac_site_file2=$prefix/etc/config.site
3899 else
3900 ac_site_file1=$ac_default_prefix/share/config.site
3901 ac_site_file2=$ac_default_prefix/etc/config.site
3902 fi
3903 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3904 do
3905 test "x$ac_site_file" = xNONE && continue
3906 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3907 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3908 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3909 sed 's/^/| /' "$ac_site_file" >&5
3910 . "$ac_site_file" \
3911 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3912 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3913 as_fn_error $? "failed to load site script $ac_site_file
3914 See \`config.log' for more details" "$LINENO" 5; }
3915 fi
3916 done
3917
3918 if test -r "$cache_file"; then
3919 # Some versions of bash will fail to source /dev/null (special files
3920 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
3921 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3922 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3923 $as_echo "$as_me: loading cache $cache_file" >&6;}
3924 case $cache_file in
3925 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3926 *) . "./$cache_file";;
3927 esac
3928 fi
3929 else
3930 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3931 $as_echo "$as_me: creating cache $cache_file" >&6;}
3932 >$cache_file
3933 fi
3934
3935 as_fn_append ac_header_list " wchar.h"
3936 as_fn_append ac_header_list " minix/config.h"
3937 as_fn_append ac_header_list " sys/socket.h"
3938 as_fn_append ac_header_list " arpa/inet.h"
3939 as_fn_append ac_header_list " features.h"
3940 as_fn_append ac_func_list " btowc"
3941 as_fn_append ac_func_list " canonicalize_file_name"
3942 as_fn_append ac_func_list " faccessat"
3943 as_fn_append ac_func_list " realpath"
3944 as_fn_append ac_func_list " lstat"
3945 as_fn_append ac_header_list " sys/param.h"
3946 as_fn_append ac_header_list " unistd.h"
3947 as_fn_append ac_func_list " chown"
3948 as_fn_append ac_func_list " fchown"
3949 as_fn_append ac_func_list " _set_invalid_parameter_handler"
3950 as_fn_append ac_func_list " fchdir"
3951 as_fn_append ac_header_list " dirent.h"
3952 as_fn_append ac_func_list " fcntl"
3953 as_fn_append ac_func_list " symlink"
3954 as_fn_append ac_func_list " fdopendir"
3955 as_fn_append ac_func_list " mempcpy"
3956 as_fn_append ac_header_list " fnmatch.h"
3957 as_fn_append ac_func_list " fnmatch"
3958 as_fn_append ac_func_list " mbsrtowcs"
3959 gl_fnmatch_required=GNU
3960 as_fn_append ac_header_list " sys/stat.h"
3961 as_fn_append ac_func_list " fstatat"
3962 as_fn_append ac_func_list " getdelim"
3963 as_fn_append ac_func_list " getdtablesize"
3964 as_fn_append ac_func_list " getlogin_r"
3965 as_fn_append ac_func_list " getprogname"
3966 as_fn_append ac_func_list " getexecname"
3967 as_fn_append ac_func_list " getrandom"
3968 as_fn_append ac_header_list " sys/time.h"
3969 as_fn_append ac_func_list " gettimeofday"
3970 as_fn_append ac_header_list " glob.h"
3971 as_fn_append ac_func_list " glob"
3972 as_fn_append ac_func_list " glob_pattern_p"
3973 as_fn_append ac_func_list " getpwnam_r"
3974 as_fn_append ac_header_list " threads.h"
3975 as_fn_append ac_header_list " netdb.h"
3976 as_fn_append ac_header_list " netinet/in.h"
3977 as_fn_append ac_header_list " limits.h"
3978 as_fn_append ac_header_list " inttypes.h"
3979 as_fn_append ac_header_list " sys/types.h"
3980 as_fn_append ac_header_list " stdint.h"
3981 as_fn_append ac_func_list " isblank"
3982 as_fn_append ac_header_list " xlocale.h"
3983 as_fn_append ac_header_list " math.h"
3984 as_fn_append ac_func_list " mbsinit"
3985 as_fn_append ac_func_list " mbrtowc"
3986 as_fn_append ac_header_list " sys/mman.h"
3987 as_fn_append ac_func_list " mprotect"
3988 as_fn_append ac_func_list " mkostemp"
3989 as_fn_append ac_func_list " openat"
3990 as_fn_append ac_func_list " pipe"
3991 as_fn_append ac_func_list " readlink"
3992 as_fn_append ac_func_list " link"
3993 as_fn_append ac_header_list " sys/select.h"
3994 as_fn_append ac_func_list " setenv"
3995 as_fn_append ac_func_list " strerror_r"
3996 as_fn_append ac_func_list " __xpg_strerror_r"
3997 as_fn_append ac_func_list " catgets"
3998 as_fn_append ac_func_list " snprintf"
3999 as_fn_append ac_header_list " strings.h"
4000 as_fn_append ac_header_list " sys/random.h"
4001 as_fn_append ac_header_list " sys/uio.h"
4002 as_fn_append ac_header_list " sys/wait.h"
4003 as_fn_append ac_func_list " localtime_r"
4004 as_fn_append ac_header_list " crtdefs.h"
4005 as_fn_append ac_func_list " iswcntrl"
4006 as_fn_append ac_header_list " wctype.h"
4007 as_fn_append ac_func_list " wmempcpy"
4008 # Check that the precious variables saved in the cache have kept the same
4009 # value.
4010 ac_cache_corrupted=false
4011 for ac_var in $ac_precious_vars; do
4012 eval ac_old_set=\$ac_cv_env_${ac_var}_set
4013 eval ac_new_set=\$ac_env_${ac_var}_set
4014 eval ac_old_val=\$ac_cv_env_${ac_var}_value
4015 eval ac_new_val=\$ac_env_${ac_var}_value
4016 case $ac_old_set,$ac_new_set in
4017 set,)
4018 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
4019 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
4020 ac_cache_corrupted=: ;;
4021 ,set)
4022 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
4023 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
4024 ac_cache_corrupted=: ;;
4025 ,);;
4026 *)
4027 if test "x$ac_old_val" != "x$ac_new_val"; then
4028 # differences in whitespace do not lead to failure.
4029 ac_old_val_w=`echo x $ac_old_val`
4030 ac_new_val_w=`echo x $ac_new_val`
4031 if test "$ac_old_val_w" != "$ac_new_val_w"; then
4032 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
4033 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
4034 ac_cache_corrupted=:
4035 else
4036 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
4037 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
4038 eval $ac_var=\$ac_old_val
4039 fi
4040 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
4041 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
4042 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
4043 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
4044 fi;;
4045 esac
4046 # Pass precious variables to config.status.
4047 if test "$ac_new_set" = set; then
4048 case $ac_new_val in
4049 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
4050 *) ac_arg=$ac_var=$ac_new_val ;;
4051 esac
4052 case " $ac_configure_args " in
4053 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
4054 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
4055 esac
4056 fi
4057 done
4058 if $ac_cache_corrupted; then
4059 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4060 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4061 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
4062 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
4063 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
4064 fi
4065 ## -------------------- ##
4066 ## Main body of script. ##
4067 ## -------------------- ##
4068
4069 ac_ext=c
4070 ac_cpp='$CPP $CPPFLAGS'
4071 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4072 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4073 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4074
4075
4076
4077
4078
4079
4080 ac_config_headers="$ac_config_headers config.h:config.in"
4081
4082
4083
4084
4085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
4086 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
4087 # Check whether --enable-maintainer-mode was given.
4088 if test "${enable_maintainer_mode+set}" = set; then :
4089 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
4090 else
4091 USE_MAINTAINER_MODE=no
4092 fi
4093
4094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
4095 $as_echo "$USE_MAINTAINER_MODE" >&6; }
4096 if test $USE_MAINTAINER_MODE = yes; then
4097 MAINTAINER_MODE_TRUE=
4098 MAINTAINER_MODE_FALSE='#'
4099 else
4100 MAINTAINER_MODE_TRUE='#'
4101 MAINTAINER_MODE_FALSE=
4102 fi
4103
4104 MAINT=$MAINTAINER_MODE_TRUE
4105
4106
4107
4108 ac_ext=c
4109 ac_cpp='$CPP $CPPFLAGS'
4110 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4111 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4112 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4113 if test -n "$ac_tool_prefix"; then
4114 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4115 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4117 $as_echo_n "checking for $ac_word... " >&6; }
4118 if ${ac_cv_prog_CC+:} false; then :
4119 $as_echo_n "(cached) " >&6
4120 else
4121 if test -n "$CC"; then
4122 ac_cv_prog_CC="$CC" # Let the user override the test.
4123 else
4124 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4125 for as_dir in $PATH
4126 do
4127 IFS=$as_save_IFS
4128 test -z "$as_dir" && as_dir=.
4129 for ac_exec_ext in '' $ac_executable_extensions; do
4130 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4131 ac_cv_prog_CC="${ac_tool_prefix}gcc"
4132 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4133 break 2
4134 fi
4135 done
4136 done
4137 IFS=$as_save_IFS
4138
4139 fi
4140 fi
4141 CC=$ac_cv_prog_CC
4142 if test -n "$CC"; then
4143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4144 $as_echo "$CC" >&6; }
4145 else
4146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4147 $as_echo "no" >&6; }
4148 fi
4149
4150
4151 fi
4152 if test -z "$ac_cv_prog_CC"; then
4153 ac_ct_CC=$CC
4154 # Extract the first word of "gcc", so it can be a program name with args.
4155 set dummy gcc; ac_word=$2
4156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4157 $as_echo_n "checking for $ac_word... " >&6; }
4158 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4159 $as_echo_n "(cached) " >&6
4160 else
4161 if test -n "$ac_ct_CC"; then
4162 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4163 else
4164 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4165 for as_dir in $PATH
4166 do
4167 IFS=$as_save_IFS
4168 test -z "$as_dir" && as_dir=.
4169 for ac_exec_ext in '' $ac_executable_extensions; do
4170 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4171 ac_cv_prog_ac_ct_CC="gcc"
4172 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4173 break 2
4174 fi
4175 done
4176 done
4177 IFS=$as_save_IFS
4178
4179 fi
4180 fi
4181 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4182 if test -n "$ac_ct_CC"; then
4183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4184 $as_echo "$ac_ct_CC" >&6; }
4185 else
4186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4187 $as_echo "no" >&6; }
4188 fi
4189
4190 if test "x$ac_ct_CC" = x; then
4191 CC=""
4192 else
4193 case $cross_compiling:$ac_tool_warned in
4194 yes:)
4195 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4196 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4197 ac_tool_warned=yes ;;
4198 esac
4199 CC=$ac_ct_CC
4200 fi
4201 else
4202 CC="$ac_cv_prog_CC"
4203 fi
4204
4205 if test -z "$CC"; then
4206 if test -n "$ac_tool_prefix"; then
4207 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4208 set dummy ${ac_tool_prefix}cc; ac_word=$2
4209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4210 $as_echo_n "checking for $ac_word... " >&6; }
4211 if ${ac_cv_prog_CC+:} false; then :
4212 $as_echo_n "(cached) " >&6
4213 else
4214 if test -n "$CC"; then
4215 ac_cv_prog_CC="$CC" # Let the user override the test.
4216 else
4217 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4218 for as_dir in $PATH
4219 do
4220 IFS=$as_save_IFS
4221 test -z "$as_dir" && as_dir=.
4222 for ac_exec_ext in '' $ac_executable_extensions; do
4223 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4224 ac_cv_prog_CC="${ac_tool_prefix}cc"
4225 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4226 break 2
4227 fi
4228 done
4229 done
4230 IFS=$as_save_IFS
4231
4232 fi
4233 fi
4234 CC=$ac_cv_prog_CC
4235 if test -n "$CC"; then
4236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4237 $as_echo "$CC" >&6; }
4238 else
4239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4240 $as_echo "no" >&6; }
4241 fi
4242
4243
4244 fi
4245 fi
4246 if test -z "$CC"; then
4247 # Extract the first word of "cc", so it can be a program name with args.
4248 set dummy cc; ac_word=$2
4249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4250 $as_echo_n "checking for $ac_word... " >&6; }
4251 if ${ac_cv_prog_CC+:} false; then :
4252 $as_echo_n "(cached) " >&6
4253 else
4254 if test -n "$CC"; then
4255 ac_cv_prog_CC="$CC" # Let the user override the test.
4256 else
4257 ac_prog_rejected=no
4258 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4259 for as_dir in $PATH
4260 do
4261 IFS=$as_save_IFS
4262 test -z "$as_dir" && as_dir=.
4263 for ac_exec_ext in '' $ac_executable_extensions; do
4264 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4265 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4266 ac_prog_rejected=yes
4267 continue
4268 fi
4269 ac_cv_prog_CC="cc"
4270 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4271 break 2
4272 fi
4273 done
4274 done
4275 IFS=$as_save_IFS
4276
4277 if test $ac_prog_rejected = yes; then
4278 # We found a bogon in the path, so make sure we never use it.
4279 set dummy $ac_cv_prog_CC
4280 shift
4281 if test $# != 0; then
4282 # We chose a different compiler from the bogus one.
4283 # However, it has the same basename, so the bogon will be chosen
4284 # first if we set CC to just the basename; use the full file name.
4285 shift
4286 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4287 fi
4288 fi
4289 fi
4290 fi
4291 CC=$ac_cv_prog_CC
4292 if test -n "$CC"; then
4293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4294 $as_echo "$CC" >&6; }
4295 else
4296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4297 $as_echo "no" >&6; }
4298 fi
4299
4300
4301 fi
4302 if test -z "$CC"; then
4303 if test -n "$ac_tool_prefix"; then
4304 for ac_prog in cl.exe
4305 do
4306 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4307 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4309 $as_echo_n "checking for $ac_word... " >&6; }
4310 if ${ac_cv_prog_CC+:} false; then :
4311 $as_echo_n "(cached) " >&6
4312 else
4313 if test -n "$CC"; then
4314 ac_cv_prog_CC="$CC" # Let the user override the test.
4315 else
4316 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4317 for as_dir in $PATH
4318 do
4319 IFS=$as_save_IFS
4320 test -z "$as_dir" && as_dir=.
4321 for ac_exec_ext in '' $ac_executable_extensions; do
4322 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4323 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4324 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4325 break 2
4326 fi
4327 done
4328 done
4329 IFS=$as_save_IFS
4330
4331 fi
4332 fi
4333 CC=$ac_cv_prog_CC
4334 if test -n "$CC"; then
4335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4336 $as_echo "$CC" >&6; }
4337 else
4338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4339 $as_echo "no" >&6; }
4340 fi
4341
4342
4343 test -n "$CC" && break
4344 done
4345 fi
4346 if test -z "$CC"; then
4347 ac_ct_CC=$CC
4348 for ac_prog in cl.exe
4349 do
4350 # Extract the first word of "$ac_prog", so it can be a program name with args.
4351 set dummy $ac_prog; ac_word=$2
4352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4353 $as_echo_n "checking for $ac_word... " >&6; }
4354 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4355 $as_echo_n "(cached) " >&6
4356 else
4357 if test -n "$ac_ct_CC"; then
4358 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4359 else
4360 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4361 for as_dir in $PATH
4362 do
4363 IFS=$as_save_IFS
4364 test -z "$as_dir" && as_dir=.
4365 for ac_exec_ext in '' $ac_executable_extensions; do
4366 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4367 ac_cv_prog_ac_ct_CC="$ac_prog"
4368 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4369 break 2
4370 fi
4371 done
4372 done
4373 IFS=$as_save_IFS
4374
4375 fi
4376 fi
4377 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4378 if test -n "$ac_ct_CC"; then
4379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4380 $as_echo "$ac_ct_CC" >&6; }
4381 else
4382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4383 $as_echo "no" >&6; }
4384 fi
4385
4386
4387 test -n "$ac_ct_CC" && break
4388 done
4389
4390 if test "x$ac_ct_CC" = x; then
4391 CC=""
4392 else
4393 case $cross_compiling:$ac_tool_warned in
4394 yes:)
4395 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4396 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4397 ac_tool_warned=yes ;;
4398 esac
4399 CC=$ac_ct_CC
4400 fi
4401 fi
4402
4403 fi
4404 if test -z "$CC"; then
4405 if test -n "$ac_tool_prefix"; then
4406 # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
4407 set dummy ${ac_tool_prefix}clang; ac_word=$2
4408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4409 $as_echo_n "checking for $ac_word... " >&6; }
4410 if ${ac_cv_prog_CC+:} false; then :
4411 $as_echo_n "(cached) " >&6
4412 else
4413 if test -n "$CC"; then
4414 ac_cv_prog_CC="$CC" # Let the user override the test.
4415 else
4416 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4417 for as_dir in $PATH
4418 do
4419 IFS=$as_save_IFS
4420 test -z "$as_dir" && as_dir=.
4421 for ac_exec_ext in '' $ac_executable_extensions; do
4422 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4423 ac_cv_prog_CC="${ac_tool_prefix}clang"
4424 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4425 break 2
4426 fi
4427 done
4428 done
4429 IFS=$as_save_IFS
4430
4431 fi
4432 fi
4433 CC=$ac_cv_prog_CC
4434 if test -n "$CC"; then
4435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4436 $as_echo "$CC" >&6; }
4437 else
4438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4439 $as_echo "no" >&6; }
4440 fi
4441
4442
4443 fi
4444 if test -z "$ac_cv_prog_CC"; then
4445 ac_ct_CC=$CC
4446 # Extract the first word of "clang", so it can be a program name with args.
4447 set dummy clang; ac_word=$2
4448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4449 $as_echo_n "checking for $ac_word... " >&6; }
4450 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4451 $as_echo_n "(cached) " >&6
4452 else
4453 if test -n "$ac_ct_CC"; then
4454 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4455 else
4456 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4457 for as_dir in $PATH
4458 do
4459 IFS=$as_save_IFS
4460 test -z "$as_dir" && as_dir=.
4461 for ac_exec_ext in '' $ac_executable_extensions; do
4462 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4463 ac_cv_prog_ac_ct_CC="clang"
4464 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4465 break 2
4466 fi
4467 done
4468 done
4469 IFS=$as_save_IFS
4470
4471 fi
4472 fi
4473 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4474 if test -n "$ac_ct_CC"; then
4475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4476 $as_echo "$ac_ct_CC" >&6; }
4477 else
4478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4479 $as_echo "no" >&6; }
4480 fi
4481
4482 if test "x$ac_ct_CC" = x; then
4483 CC=""
4484 else
4485 case $cross_compiling:$ac_tool_warned in
4486 yes:)
4487 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4488 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4489 ac_tool_warned=yes ;;
4490 esac
4491 CC=$ac_ct_CC
4492 fi
4493 else
4494 CC="$ac_cv_prog_CC"
4495 fi
4496
4497 fi
4498
4499
4500 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4501 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4502 as_fn_error $? "no acceptable C compiler found in \$PATH
4503 See \`config.log' for more details" "$LINENO" 5; }
4504
4505 # Provide some information about the compiler.
4506 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4507 set X $ac_compile
4508 ac_compiler=$2
4509 for ac_option in --version -v -V -qversion -version; do
4510 { { ac_try="$ac_compiler $ac_option >&5"
4511 case "(($ac_try" in
4512 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4513 *) ac_try_echo=$ac_try;;
4514 esac
4515 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4516 $as_echo "$ac_try_echo"; } >&5
4517 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4518 ac_status=$?
4519 if test -s conftest.err; then
4520 sed '10a\
4521 ... rest of stderr output deleted ...
4522 10q' conftest.err >conftest.er1
4523 cat conftest.er1 >&5
4524 fi
4525 rm -f conftest.er1 conftest.err
4526 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4527 test $ac_status = 0; }
4528 done
4529
4530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4531 /* end confdefs.h. */
4532
4533 int
4534 main ()
4535 {
4536
4537 ;
4538 return 0;
4539 }
4540 _ACEOF
4541 ac_clean_files_save=$ac_clean_files
4542 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4543 # Try to create an executable without -o first, disregard a.out.
4544 # It will help us diagnose broken compilers, and finding out an intuition
4545 # of exeext.
4546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4547 $as_echo_n "checking whether the C compiler works... " >&6; }
4548 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4549
4550 # The possible output files:
4551 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4552
4553 ac_rmfiles=
4554 for ac_file in $ac_files
4555 do
4556 case $ac_file in
4557 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4558 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4559 esac
4560 done
4561 rm -f $ac_rmfiles
4562
4563 if { { ac_try="$ac_link_default"
4564 case "(($ac_try" in
4565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4566 *) ac_try_echo=$ac_try;;
4567 esac
4568 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4569 $as_echo "$ac_try_echo"; } >&5
4570 (eval "$ac_link_default") 2>&5
4571 ac_status=$?
4572 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4573 test $ac_status = 0; }; then :
4574 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4575 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4576 # in a Makefile. We should not override ac_cv_exeext if it was cached,
4577 # so that the user can short-circuit this test for compilers unknown to
4578 # Autoconf.
4579 for ac_file in $ac_files ''
4580 do
4581 test -f "$ac_file" || continue
4582 case $ac_file in
4583 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4584 ;;
4585 [ab].out )
4586 # We found the default executable, but exeext='' is most
4587 # certainly right.
4588 break;;
4589 *.* )
4590 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4591 then :; else
4592 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4593 fi
4594 # We set ac_cv_exeext here because the later test for it is not
4595 # safe: cross compilers may not add the suffix if given an `-o'
4596 # argument, so we may need to know it at that point already.
4597 # Even if this section looks crufty: it has the advantage of
4598 # actually working.
4599 break;;
4600 * )
4601 break;;
4602 esac
4603 done
4604 test "$ac_cv_exeext" = no && ac_cv_exeext=
4605
4606 else
4607 ac_file=''
4608 fi
4609 if test -z "$ac_file"; then :
4610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4611 $as_echo "no" >&6; }
4612 $as_echo "$as_me: failed program was:" >&5
4613 sed 's/^/| /' conftest.$ac_ext >&5
4614
4615 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4616 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4617 as_fn_error 77 "C compiler cannot create executables
4618 See \`config.log' for more details" "$LINENO" 5; }
4619 else
4620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4621 $as_echo "yes" >&6; }
4622 fi
4623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4624 $as_echo_n "checking for C compiler default output file name... " >&6; }
4625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4626 $as_echo "$ac_file" >&6; }
4627 ac_exeext=$ac_cv_exeext
4628
4629 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4630 ac_clean_files=$ac_clean_files_save
4631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4632 $as_echo_n "checking for suffix of executables... " >&6; }
4633 if { { ac_try="$ac_link"
4634 case "(($ac_try" in
4635 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4636 *) ac_try_echo=$ac_try;;
4637 esac
4638 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4639 $as_echo "$ac_try_echo"; } >&5
4640 (eval "$ac_link") 2>&5
4641 ac_status=$?
4642 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4643 test $ac_status = 0; }; then :
4644 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4645 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4646 # work properly (i.e., refer to `conftest.exe'), while it won't with
4647 # `rm'.
4648 for ac_file in conftest.exe conftest conftest.*; do
4649 test -f "$ac_file" || continue
4650 case $ac_file in
4651 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4652 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4653 break;;
4654 * ) break;;
4655 esac
4656 done
4657 else
4658 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4659 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4660 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4661 See \`config.log' for more details" "$LINENO" 5; }
4662 fi
4663 rm -f conftest conftest$ac_cv_exeext
4664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4665 $as_echo "$ac_cv_exeext" >&6; }
4666
4667 rm -f conftest.$ac_ext
4668 EXEEXT=$ac_cv_exeext
4669 ac_exeext=$EXEEXT
4670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4671 /* end confdefs.h. */
4672 #include <stdio.h>
4673 int
4674 main ()
4675 {
4676 FILE *f = fopen ("conftest.out", "w");
4677 return ferror (f) || fclose (f) != 0;
4678
4679 ;
4680 return 0;
4681 }
4682 _ACEOF
4683 ac_clean_files="$ac_clean_files conftest.out"
4684 # Check that the compiler produces executables we can run. If not, either
4685 # the compiler is broken, or we cross compile.
4686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4687 $as_echo_n "checking whether we are cross compiling... " >&6; }
4688 if test "$cross_compiling" != yes; then
4689 { { ac_try="$ac_link"
4690 case "(($ac_try" in
4691 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4692 *) ac_try_echo=$ac_try;;
4693 esac
4694 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4695 $as_echo "$ac_try_echo"; } >&5
4696 (eval "$ac_link") 2>&5
4697 ac_status=$?
4698 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4699 test $ac_status = 0; }
4700 if { ac_try='./conftest$ac_cv_exeext'
4701 { { case "(($ac_try" in
4702 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4703 *) ac_try_echo=$ac_try;;
4704 esac
4705 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4706 $as_echo "$ac_try_echo"; } >&5
4707 (eval "$ac_try") 2>&5
4708 ac_status=$?
4709 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4710 test $ac_status = 0; }; }; then
4711 cross_compiling=no
4712 else
4713 if test "$cross_compiling" = maybe; then
4714 cross_compiling=yes
4715 else
4716 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4717 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4718 as_fn_error $? "cannot run C compiled programs.
4719 If you meant to cross compile, use \`--host'.
4720 See \`config.log' for more details" "$LINENO" 5; }
4721 fi
4722 fi
4723 fi
4724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4725 $as_echo "$cross_compiling" >&6; }
4726
4727 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4728 ac_clean_files=$ac_clean_files_save
4729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4730 $as_echo_n "checking for suffix of object files... " >&6; }
4731 if ${ac_cv_objext+:} false; then :
4732 $as_echo_n "(cached) " >&6
4733 else
4734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4735 /* end confdefs.h. */
4736
4737 int
4738 main ()
4739 {
4740
4741 ;
4742 return 0;
4743 }
4744 _ACEOF
4745 rm -f conftest.o conftest.obj
4746 if { { ac_try="$ac_compile"
4747 case "(($ac_try" in
4748 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4749 *) ac_try_echo=$ac_try;;
4750 esac
4751 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4752 $as_echo "$ac_try_echo"; } >&5
4753 (eval "$ac_compile") 2>&5
4754 ac_status=$?
4755 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4756 test $ac_status = 0; }; then :
4757 for ac_file in conftest.o conftest.obj conftest.*; do
4758 test -f "$ac_file" || continue;
4759 case $ac_file in
4760 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4761 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4762 break;;
4763 esac
4764 done
4765 else
4766 $as_echo "$as_me: failed program was:" >&5
4767 sed 's/^/| /' conftest.$ac_ext >&5
4768
4769 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4770 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4771 as_fn_error $? "cannot compute suffix of object files: cannot compile
4772 See \`config.log' for more details" "$LINENO" 5; }
4773 fi
4774 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4775 fi
4776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4777 $as_echo "$ac_cv_objext" >&6; }
4778 OBJEXT=$ac_cv_objext
4779 ac_objext=$OBJEXT
4780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4781 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4782 if ${ac_cv_c_compiler_gnu+:} false; then :
4783 $as_echo_n "(cached) " >&6
4784 else
4785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4786 /* end confdefs.h. */
4787
4788 int
4789 main ()
4790 {
4791 #ifndef __GNUC__
4792 choke me
4793 #endif
4794
4795 ;
4796 return 0;
4797 }
4798 _ACEOF
4799 if ac_fn_c_try_compile "$LINENO"; then :
4800 ac_compiler_gnu=yes
4801 else
4802 ac_compiler_gnu=no
4803 fi
4804 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4805 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4806
4807 fi
4808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4809 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4810 if test $ac_compiler_gnu = yes; then
4811 GCC=yes
4812 else
4813 GCC=
4814 fi
4815 ac_test_CFLAGS=${CFLAGS+set}
4816 ac_save_CFLAGS=$CFLAGS
4817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4818 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4819 if ${ac_cv_prog_cc_g+:} false; then :
4820 $as_echo_n "(cached) " >&6
4821 else
4822 ac_save_c_werror_flag=$ac_c_werror_flag
4823 ac_c_werror_flag=yes
4824 ac_cv_prog_cc_g=no
4825 CFLAGS="-g"
4826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4827 /* end confdefs.h. */
4828
4829 int
4830 main ()
4831 {
4832
4833 ;
4834 return 0;
4835 }
4836 _ACEOF
4837 if ac_fn_c_try_compile "$LINENO"; then :
4838 ac_cv_prog_cc_g=yes
4839 else
4840 CFLAGS=""
4841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4842 /* end confdefs.h. */
4843
4844 int
4845 main ()
4846 {
4847
4848 ;
4849 return 0;
4850 }
4851 _ACEOF
4852 if ac_fn_c_try_compile "$LINENO"; then :
4853
4854 else
4855 ac_c_werror_flag=$ac_save_c_werror_flag
4856 CFLAGS="-g"
4857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4858 /* end confdefs.h. */
4859
4860 int
4861 main ()
4862 {
4863
4864 ;
4865 return 0;
4866 }
4867 _ACEOF
4868 if ac_fn_c_try_compile "$LINENO"; then :
4869 ac_cv_prog_cc_g=yes
4870 fi
4871 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4872 fi
4873 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4874 fi
4875 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4876 ac_c_werror_flag=$ac_save_c_werror_flag
4877 fi
4878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4879 $as_echo "$ac_cv_prog_cc_g" >&6; }
4880 if test "$ac_test_CFLAGS" = set; then
4881 CFLAGS=$ac_save_CFLAGS
4882 elif test $ac_cv_prog_cc_g = yes; then
4883 if test "$GCC" = yes; then
4884 CFLAGS="-g -O2"
4885 else
4886 CFLAGS="-g"
4887 fi
4888 else
4889 if test "$GCC" = yes; then
4890 CFLAGS="-O2"
4891 else
4892 CFLAGS=
4893 fi
4894 fi
4895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
4896 $as_echo_n "checking for $CC option to enable C11 features... " >&6; }
4897 if ${ac_cv_prog_cc_c11+:} false; then :
4898 $as_echo_n "(cached) " >&6
4899 else
4900 ac_cv_prog_cc_c11=no
4901 ac_save_CC=$CC
4902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4903 /* end confdefs.h. */
4904 #include <stdarg.h>
4905 #include <stdbool.h>
4906 #include <stddef.h>
4907 #include <stdlib.h>
4908 #include <wchar.h>
4909 #include <stdio.h>
4910
4911 // Check varargs macros. These examples are taken from C99 6.10.3.5.
4912 #define debug(...) fprintf (stderr, __VA_ARGS__)
4913 #define showlist(...) puts (#__VA_ARGS__)
4914 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4915 static void
4916 test_varargs_macros (void)
4917 {
4918 int x = 1234;
4919 int y = 5678;
4920 debug ("Flag");
4921 debug ("X = %d\n", x);
4922 showlist (The first, second, and third items.);
4923 report (x>y, "x is %d but y is %d", x, y);
4924 }
4925
4926 // Check long long types.
4927 #define BIG64 18446744073709551615ull
4928 #define BIG32 4294967295ul
4929 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4930 #if !BIG_OK
4931 your preprocessor is broken;
4932 #endif
4933 #if BIG_OK
4934 #else
4935 your preprocessor is broken;
4936 #endif
4937 static long long int bignum = -9223372036854775807LL;
4938 static unsigned long long int ubignum = BIG64;
4939
4940 struct incomplete_array
4941 {
4942 int datasize;
4943 double data[];
4944 };
4945
4946 struct named_init {
4947 int number;
4948 const wchar_t *name;
4949 double average;
4950 };
4951
4952 typedef const char *ccp;
4953
4954 static inline int
4955 test_restrict (ccp restrict text)
4956 {
4957 // See if C++-style comments work.
4958 // Iterate through items via the restricted pointer.
4959 // Also check for declarations in for loops.
4960 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4961 continue;
4962 return 0;
4963 }
4964
4965 // Check varargs and va_copy.
4966 static bool
4967 test_varargs (const char *format, ...)
4968 {
4969 va_list args;
4970 va_start (args, format);
4971 va_list args_copy;
4972 va_copy (args_copy, args);
4973
4974 const char *str = "";
4975 int number = 0;
4976 float fnumber = 0;
4977
4978 while (*format)
4979 {
4980 switch (*format++)
4981 {
4982 case 's': // string
4983 str = va_arg (args_copy, const char *);
4984 break;
4985 case 'd': // int
4986 number = va_arg (args_copy, int);
4987 break;
4988 case 'f': // float
4989 fnumber = va_arg (args_copy, double);
4990 break;
4991 default:
4992 break;
4993 }
4994 }
4995 va_end (args_copy);
4996 va_end (args);
4997
4998 return *str && number && fnumber;
4999 }
5000 // Check _Alignas.
5001 char _Alignas (double) aligned_as_double;
5002 char _Alignas (0) no_special_alignment;
5003 extern char aligned_as_int;
5004 char _Alignas (0) _Alignas (int) aligned_as_int;
5005
5006 // Check _Alignof.
5007 enum
5008 {
5009 int_alignment = _Alignof (int),
5010 int_array_alignment = _Alignof (int[100]),
5011 char_alignment = _Alignof (char)
5012 };
5013 _Static_assert (0 < -_Alignof (int), "_Alignof is signed");
5014
5015 // Check _Noreturn.
5016 int _Noreturn does_not_return (void) { for (;;) continue; }
5017
5018 // Check _Static_assert.
5019 struct test_static_assert
5020 {
5021 int x;
5022 _Static_assert (sizeof (int) <= sizeof (long int),
5023 "_Static_assert does not work in struct");
5024 long int y;
5025 };
5026
5027 // Check UTF-8 literals.
5028 #define u8 syntax error!
5029 char const utf8_literal[] = u8"happens to be ASCII" "another string";
5030
5031 // Check duplicate typedefs.
5032 typedef long *long_ptr;
5033 typedef long int *long_ptr;
5034 typedef long_ptr long_ptr;
5035
5036 // Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
5037 struct anonymous
5038 {
5039 union {
5040 struct { int i; int j; };
5041 struct { int k; long int l; } w;
5042 };
5043 int m;
5044 } v1;
5045
5046 int
5047 main ()
5048 {
5049
5050 // Check bool.
5051 _Bool success = false;
5052
5053 // Check restrict.
5054 if (test_restrict ("String literal") == 0)
5055 success = true;
5056 char *restrict newvar = "Another string";
5057
5058 // Check varargs.
5059 success &= test_varargs ("s, d' f .", "string", 65, 34.234);
5060 test_varargs_macros ();
5061
5062 // Check flexible array members.
5063 struct incomplete_array *ia =
5064 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
5065 ia->datasize = 10;
5066 for (int i = 0; i < ia->datasize; ++i)
5067 ia->data[i] = i * 1.234;
5068
5069 // Check named initializers.
5070 struct named_init ni = {
5071 .number = 34,
5072 .name = L"Test wide string",
5073 .average = 543.34343,
5074 };
5075
5076 ni.number = 58;
5077
5078 int dynamic_array[ni.number];
5079 dynamic_array[ni.number - 1] = 543;
5080
5081 // work around unused variable warnings
5082 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
5083 || dynamic_array[ni.number - 1] != 543);
5084
5085 v1.i = 2;
5086 v1.w.k = 5;
5087 _Static_assert ((offsetof (struct anonymous, i)
5088 == offsetof (struct anonymous, w.k)),
5089 "Anonymous union alignment botch");
5090
5091 ;
5092 return 0;
5093 }
5094 _ACEOF
5095 for ac_arg in '' -std=gnu11
5096 do
5097 CC="$ac_save_CC $ac_arg"
5098 if ac_fn_c_try_compile "$LINENO"; then :
5099 ac_cv_prog_cc_c11=$ac_arg
5100 fi
5101 rm -f core conftest.err conftest.$ac_objext
5102 test "x$ac_cv_prog_cc_c11" != "xno" && break
5103 done
5104 rm -f conftest.$ac_ext
5105 CC=$ac_save_CC
5106
5107 fi
5108 # AC_CACHE_VAL
5109 ac_prog_cc_stdc_options=
5110 case "x$ac_cv_prog_cc_c11" in
5111 x)
5112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5113 $as_echo "none needed" >&6; } ;;
5114 xno)
5115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5116 $as_echo "unsupported" >&6; } ;;
5117 *)
5118 ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c11"
5119 CC=$CC$ac_prog_cc_stdc_options
5120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
5121 $as_echo "$ac_cv_prog_cc_c11" >&6; } ;;
5122 esac
5123 if test "x$ac_cv_prog_cc_c11" != xno; then :
5124 ac_prog_cc_stdc=c11
5125 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
5126 else
5127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
5128 $as_echo_n "checking for $CC option to enable C99 features... " >&6; }
5129 if ${ac_cv_prog_cc_c99+:} false; then :
5130 $as_echo_n "(cached) " >&6
5131 else
5132 ac_cv_prog_cc_c99=no
5133 ac_save_CC=$CC
5134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5135 /* end confdefs.h. */
5136 #include <stdarg.h>
5137 #include <stdbool.h>
5138 #include <stddef.h>
5139 #include <stdlib.h>
5140 #include <wchar.h>
5141 #include <stdio.h>
5142
5143 // Check varargs macros. These examples are taken from C99 6.10.3.5.
5144 #define debug(...) fprintf (stderr, __VA_ARGS__)
5145 #define showlist(...) puts (#__VA_ARGS__)
5146 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
5147 static void
5148 test_varargs_macros (void)
5149 {
5150 int x = 1234;
5151 int y = 5678;
5152 debug ("Flag");
5153 debug ("X = %d\n", x);
5154 showlist (The first, second, and third items.);
5155 report (x>y, "x is %d but y is %d", x, y);
5156 }
5157
5158 // Check long long types.
5159 #define BIG64 18446744073709551615ull
5160 #define BIG32 4294967295ul
5161 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
5162 #if !BIG_OK
5163 your preprocessor is broken;
5164 #endif
5165 #if BIG_OK
5166 #else
5167 your preprocessor is broken;
5168 #endif
5169 static long long int bignum = -9223372036854775807LL;
5170 static unsigned long long int ubignum = BIG64;
5171
5172 struct incomplete_array
5173 {
5174 int datasize;
5175 double data[];
5176 };
5177
5178 struct named_init {
5179 int number;
5180 const wchar_t *name;
5181 double average;
5182 };
5183
5184 typedef const char *ccp;
5185
5186 static inline int
5187 test_restrict (ccp restrict text)
5188 {
5189 // See if C++-style comments work.
5190 // Iterate through items via the restricted pointer.
5191 // Also check for declarations in for loops.
5192 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
5193 continue;
5194 return 0;
5195 }
5196
5197 // Check varargs and va_copy.
5198 static bool
5199 test_varargs (const char *format, ...)
5200 {
5201 va_list args;
5202 va_start (args, format);
5203 va_list args_copy;
5204 va_copy (args_copy, args);
5205
5206 const char *str = "";
5207 int number = 0;
5208 float fnumber = 0;
5209
5210 while (*format)
5211 {
5212 switch (*format++)
5213 {
5214 case 's': // string
5215 str = va_arg (args_copy, const char *);
5216 break;
5217 case 'd': // int
5218 number = va_arg (args_copy, int);
5219 break;
5220 case 'f': // float
5221 fnumber = va_arg (args_copy, double);
5222 break;
5223 default:
5224 break;
5225 }
5226 }
5227 va_end (args_copy);
5228 va_end (args);
5229
5230 return *str && number && fnumber;
5231 }
5232 int
5233 main ()
5234 {
5235
5236 // Check bool.
5237 _Bool success = false;
5238
5239 // Check restrict.
5240 if (test_restrict ("String literal") == 0)
5241 success = true;
5242 char *restrict newvar = "Another string";
5243
5244 // Check varargs.
5245 success &= test_varargs ("s, d' f .", "string", 65, 34.234);
5246 test_varargs_macros ();
5247
5248 // Check flexible array members.
5249 struct incomplete_array *ia =
5250 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
5251 ia->datasize = 10;
5252 for (int i = 0; i < ia->datasize; ++i)
5253 ia->data[i] = i * 1.234;
5254
5255 // Check named initializers.
5256 struct named_init ni = {
5257 .number = 34,
5258 .name = L"Test wide string",
5259 .average = 543.34343,
5260 };
5261
5262 ni.number = 58;
5263
5264 int dynamic_array[ni.number];
5265 dynamic_array[ni.number - 1] = 543;
5266
5267 // work around unused variable warnings
5268 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
5269 || dynamic_array[ni.number - 1] != 543);
5270
5271 ;
5272 return 0;
5273 }
5274 _ACEOF
5275 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc1x -qlanglvl=extc99
5276 do
5277 CC="$ac_save_CC $ac_arg"
5278 if ac_fn_c_try_compile "$LINENO"; then :
5279 ac_cv_prog_cc_c99=$ac_arg
5280 fi
5281 rm -f core conftest.err conftest.$ac_objext
5282 test "x$ac_cv_prog_cc_c99" != "xno" && break
5283 done
5284 rm -f conftest.$ac_ext
5285 CC=$ac_save_CC
5286
5287 fi
5288 # AC_CACHE_VAL
5289 ac_prog_cc_stdc_options=
5290 case "x$ac_cv_prog_cc_c99" in
5291 x)
5292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5293 $as_echo "none needed" >&6; } ;;
5294 xno)
5295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5296 $as_echo "unsupported" >&6; } ;;
5297 *)
5298 ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c99"
5299 CC=$CC$ac_prog_cc_stdc_options
5300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
5301 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
5302 esac
5303 if test "x$ac_cv_prog_cc_c99" != xno; then :
5304 ac_prog_cc_stdc=c99
5305 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
5306 else
5307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
5308 $as_echo_n "checking for $CC option to enable C89 features... " >&6; }
5309 if ${ac_cv_prog_cc_c89+:} false; then :
5310 $as_echo_n "(cached) " >&6
5311 else
5312 ac_cv_prog_cc_c89=no
5313 ac_save_CC=$CC
5314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5315 /* end confdefs.h. */
5316 #include <stdarg.h>
5317 #include <stdio.h>
5318 struct stat;
5319 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
5320 struct buf { int x; };
5321 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5322 static char *e (p, i)
5323 char **p;
5324 int i;
5325 {
5326 return p[i];
5327 }
5328 static char *f (char * (*g) (char **, int), char **p, ...)
5329 {
5330 char *s;
5331 va_list v;
5332 va_start (v,p);
5333 s = g (p, va_arg (v,int));
5334 va_end (v);
5335 return s;
5336 }
5337
5338 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
5339 function prototypes and stuff, but not '\xHH' hex character constants.
5340 These don't provoke an error unfortunately, instead are silently treated
5341 as 'x'. The following induces an error, until -std is added to get
5342 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
5343 array size at least. It's necessary to write '\x00'==0 to get something
5344 that's true only with -std. */
5345 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5346
5347 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5348 inside strings and character constants. */
5349 #define FOO(x) 'x'
5350 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5351
5352 int test (int i, double x);
5353 struct s1 {int (*f) (int a);};
5354 struct s2 {int (*f) (double a);};
5355 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5356 int argc;
5357 char **argv;
5358 int
5359 main ()
5360 {
5361 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5362 ;
5363 return 0;
5364 }
5365 _ACEOF
5366 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5367 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5368 do
5369 CC="$ac_save_CC $ac_arg"
5370 if ac_fn_c_try_compile "$LINENO"; then :
5371 ac_cv_prog_cc_c89=$ac_arg
5372 fi
5373 rm -f core conftest.err conftest.$ac_objext
5374 test "x$ac_cv_prog_cc_c89" != "xno" && break
5375 done
5376 rm -f conftest.$ac_ext
5377 CC=$ac_save_CC
5378
5379 fi
5380 # AC_CACHE_VAL
5381 ac_prog_cc_stdc_options=
5382 case "x$ac_cv_prog_cc_c89" in
5383 x)
5384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5385 $as_echo "none needed" >&6; } ;;
5386 xno)
5387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5388 $as_echo "unsupported" >&6; } ;;
5389 *)
5390 ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c89"
5391 CC=$CC$ac_prog_cc_stdc_options
5392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5393 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5394 esac
5395 if test "x$ac_cv_prog_cc_c89" != xno; then :
5396 ac_prog_cc_stdc=c89
5397 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
5398 else
5399 ac_prog_cc_stdc=no
5400 ac_cv_prog_cc_stdc=no
5401 fi
5402
5403 fi
5404
5405 fi
5406
5407 ac_ext=c
5408 ac_cpp='$CPP $CPPFLAGS'
5409 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5410 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5411 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5412
5413
5414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler is clang" >&5
5415 $as_echo_n "checking whether the compiler is clang... " >&6; }
5416 if ${gl_cv_compiler_clang+:} false; then :
5417 $as_echo_n "(cached) " >&6
5418 else
5419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5420 /* end confdefs.h. */
5421
5422 #ifdef __clang__
5423 barfbarf
5424 #endif
5425
5426 int
5427 main ()
5428 {
5429
5430 ;
5431 return 0;
5432 }
5433
5434 _ACEOF
5435 if ac_fn_c_try_compile "$LINENO"; then :
5436 gl_cv_compiler_clang=no
5437 else
5438 gl_cv_compiler_clang=yes
5439 fi
5440 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5441
5442 fi
5443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_clang" >&5
5444 $as_echo "$gl_cv_compiler_clang" >&6; }
5445
5446
5447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler option needed when checking for declarations" >&5
5448 $as_echo_n "checking for compiler option needed when checking for declarations... " >&6; }
5449 if ${gl_cv_compiler_check_decl_option+:} false; then :
5450 $as_echo_n "(cached) " >&6
5451 else
5452 if test $gl_cv_compiler_clang = yes; then
5453 save_ac_compile="$ac_compile"
5454 ac_compile="$ac_compile -Werror=implicit-function-declaration"
5455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5456 /* end confdefs.h. */
5457
5458 int
5459 main ()
5460 {
5461
5462 ;
5463 return 0;
5464 }
5465 _ACEOF
5466 if ac_fn_c_try_compile "$LINENO"; then :
5467 gl_cv_compiler_check_decl_option='-Werror=implicit-function-declaration'
5468 else
5469 gl_cv_compiler_check_decl_option=none
5470 fi
5471 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5472 ac_compile="$save_ac_compile"
5473 else
5474 gl_cv_compiler_check_decl_option=none
5475 fi
5476
5477 fi
5478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_check_decl_option" >&5
5479 $as_echo "$gl_cv_compiler_check_decl_option" >&6; }
5480 if test "x$gl_cv_compiler_check_decl_option" != xnone; then
5481 ac_compile_for_check_decl="$ac_compile $gl_cv_compiler_check_decl_option"
5482 else
5483 ac_compile_for_check_decl="$ac_compile"
5484 fi
5485
5486
5487
5488
5489 ac_ext=c
5490 ac_cpp='$CPP $CPPFLAGS'
5491 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5492 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5493 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5495 $as_echo_n "checking how to run the C preprocessor... " >&6; }
5496 # On Suns, sometimes $CPP names a directory.
5497 if test -n "$CPP" && test -d "$CPP"; then
5498 CPP=
5499 fi
5500 if test -z "$CPP"; then
5501 if ${ac_cv_prog_CPP+:} false; then :
5502 $as_echo_n "(cached) " >&6
5503 else
5504 # Double quotes because CPP needs to be expanded
5505 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5506 do
5507 ac_preproc_ok=false
5508 for ac_c_preproc_warn_flag in '' yes
5509 do
5510 # Use a header file that comes with gcc, so configuring glibc
5511 # with a fresh cross-compiler works.
5512 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5513 # <limits.h> exists even on freestanding compilers.
5514 # On the NeXT, cc -E runs the code through the compiler's parser,
5515 # not just through cpp. "Syntax error" is here to catch this case.
5516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5517 /* end confdefs.h. */
5518 #ifdef __STDC__
5519 # include <limits.h>
5520 #else
5521 # include <assert.h>
5522 #endif
5523 Syntax error
5524 _ACEOF
5525 if ac_fn_c_try_cpp "$LINENO"; then :
5526
5527 else
5528 # Broken: fails on valid input.
5529 continue
5530 fi
5531 rm -f conftest.err conftest.i conftest.$ac_ext
5532
5533 # OK, works on sane cases. Now check whether nonexistent headers
5534 # can be detected and how.
5535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5536 /* end confdefs.h. */
5537 #include <ac_nonexistent.h>
5538 _ACEOF
5539 if ac_fn_c_try_cpp "$LINENO"; then :
5540 # Broken: success on invalid input.
5541 continue
5542 else
5543 # Passes both tests.
5544 ac_preproc_ok=:
5545 break
5546 fi
5547 rm -f conftest.err conftest.i conftest.$ac_ext
5548
5549 done
5550 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5551 rm -f conftest.i conftest.err conftest.$ac_ext
5552 if $ac_preproc_ok; then :
5553 break
5554 fi
5555
5556 done
5557 ac_cv_prog_CPP=$CPP
5558
5559 fi
5560 CPP=$ac_cv_prog_CPP
5561 else
5562 ac_cv_prog_CPP=$CPP
5563 fi
5564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5565 $as_echo "$CPP" >&6; }
5566 ac_preproc_ok=false
5567 for ac_c_preproc_warn_flag in '' yes
5568 do
5569 # Use a header file that comes with gcc, so configuring glibc
5570 # with a fresh cross-compiler works.
5571 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5572 # <limits.h> exists even on freestanding compilers.
5573 # On the NeXT, cc -E runs the code through the compiler's parser,
5574 # not just through cpp. "Syntax error" is here to catch this case.
5575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5576 /* end confdefs.h. */
5577 #ifdef __STDC__
5578 # include <limits.h>
5579 #else
5580 # include <assert.h>
5581 #endif
5582 Syntax error
5583 _ACEOF
5584 if ac_fn_c_try_cpp "$LINENO"; then :
5585
5586 else
5587 # Broken: fails on valid input.
5588 continue
5589 fi
5590 rm -f conftest.err conftest.i conftest.$ac_ext
5591
5592 # OK, works on sane cases. Now check whether nonexistent headers
5593 # can be detected and how.
5594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5595 /* end confdefs.h. */
5596 #include <ac_nonexistent.h>
5597 _ACEOF
5598 if ac_fn_c_try_cpp "$LINENO"; then :
5599 # Broken: success on invalid input.
5600 continue
5601 else
5602 # Passes both tests.
5603 ac_preproc_ok=:
5604 break
5605 fi
5606 rm -f conftest.err conftest.i conftest.$ac_ext
5607
5608 done
5609 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5610 rm -f conftest.i conftest.err conftest.$ac_ext
5611 if $ac_preproc_ok; then :
5612
5613 else
5614 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5615 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5616 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5617 See \`config.log' for more details" "$LINENO" 5; }
5618 fi
5619
5620 ac_ext=c
5621 ac_cpp='$CPP $CPPFLAGS'
5622 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5623 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5624 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5625
5626
5627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5628 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5629 if ${ac_cv_path_GREP+:} false; then :
5630 $as_echo_n "(cached) " >&6
5631 else
5632 if test -z "$GREP"; then
5633 ac_path_GREP_found=false
5634 # Loop through the user's path and test for each of PROGNAME-LIST
5635 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5636 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5637 do
5638 IFS=$as_save_IFS
5639 test -z "$as_dir" && as_dir=.
5640 for ac_prog in grep ggrep; do
5641 for ac_exec_ext in '' $ac_executable_extensions; do
5642 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5643 as_fn_executable_p "$ac_path_GREP" || continue
5644 # Check for GNU ac_path_GREP and select it if it is found.
5645 # Check for GNU $ac_path_GREP
5646 case `"$ac_path_GREP" --version 2>&1` in
5647 *GNU*)
5648 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5649 *)
5650 ac_count=0
5651 $as_echo_n 0123456789 >"conftest.in"
5652 while :
5653 do
5654 cat "conftest.in" "conftest.in" >"conftest.tmp"
5655 mv "conftest.tmp" "conftest.in"
5656 cp "conftest.in" "conftest.nl"
5657 $as_echo 'GREP' >> "conftest.nl"
5658 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5659 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5660 as_fn_arith $ac_count + 1 && ac_count=$as_val
5661 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5662 # Best one so far, save it but keep looking for a better one
5663 ac_cv_path_GREP="$ac_path_GREP"
5664 ac_path_GREP_max=$ac_count
5665 fi
5666 # 10*(2^10) chars as input seems more than enough
5667 test $ac_count -gt 10 && break
5668 done
5669 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5670 esac
5671
5672 $ac_path_GREP_found && break 3
5673 done
5674 done
5675 done
5676 IFS=$as_save_IFS
5677 if test -z "$ac_cv_path_GREP"; then
5678 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5679 fi
5680 else
5681 ac_cv_path_GREP=$GREP
5682 fi
5683
5684 fi
5685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5686 $as_echo "$ac_cv_path_GREP" >&6; }
5687 GREP="$ac_cv_path_GREP"
5688
5689
5690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5691 $as_echo_n "checking for egrep... " >&6; }
5692 if ${ac_cv_path_EGREP+:} false; then :
5693 $as_echo_n "(cached) " >&6
5694 else
5695 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5696 then ac_cv_path_EGREP="$GREP -E"
5697 else
5698 if test -z "$EGREP"; then
5699 ac_path_EGREP_found=false
5700 # Loop through the user's path and test for each of PROGNAME-LIST
5701 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5702 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5703 do
5704 IFS=$as_save_IFS
5705 test -z "$as_dir" && as_dir=.
5706 for ac_prog in egrep; do
5707 for ac_exec_ext in '' $ac_executable_extensions; do
5708 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5709 as_fn_executable_p "$ac_path_EGREP" || continue
5710 # Check for GNU ac_path_EGREP and select it if it is found.
5711 # Check for GNU $ac_path_EGREP
5712 case `"$ac_path_EGREP" --version 2>&1` in
5713 *GNU*)
5714 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5715 *)
5716 ac_count=0
5717 $as_echo_n 0123456789 >"conftest.in"
5718 while :
5719 do
5720 cat "conftest.in" "conftest.in" >"conftest.tmp"
5721 mv "conftest.tmp" "conftest.in"
5722 cp "conftest.in" "conftest.nl"
5723 $as_echo 'EGREP' >> "conftest.nl"
5724 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5725 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5726 as_fn_arith $ac_count + 1 && ac_count=$as_val
5727 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5728 # Best one so far, save it but keep looking for a better one
5729 ac_cv_path_EGREP="$ac_path_EGREP"
5730 ac_path_EGREP_max=$ac_count
5731 fi
5732 # 10*(2^10) chars as input seems more than enough
5733 test $ac_count -gt 10 && break
5734 done
5735 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5736 esac
5737
5738 $ac_path_EGREP_found && break 3
5739 done
5740 done
5741 done
5742 IFS=$as_save_IFS
5743 if test -z "$ac_cv_path_EGREP"; then
5744 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5745 fi
5746 else
5747 ac_cv_path_EGREP=$EGREP
5748 fi
5749
5750 fi
5751 fi
5752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5753 $as_echo "$ac_cv_path_EGREP" >&6; }
5754 EGREP="$ac_cv_path_EGREP"
5755
5756
5757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5758 $as_echo_n "checking for ANSI C header files... " >&6; }
5759 if ${ac_cv_header_stdc+:} false; then :
5760 $as_echo_n "(cached) " >&6
5761 else
5762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5763 /* end confdefs.h. */
5764 #include <stdlib.h>
5765 #include <stdarg.h>
5766 #include <string.h>
5767 #include <float.h>
5768
5769 int
5770 main ()
5771 {
5772
5773 ;
5774 return 0;
5775 }
5776 _ACEOF
5777 if ac_fn_c_try_compile "$LINENO"; then :
5778 ac_cv_header_stdc=yes
5779 else
5780 ac_cv_header_stdc=no
5781 fi
5782 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5783
5784 if test $ac_cv_header_stdc = yes; then
5785 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5787 /* end confdefs.h. */
5788 #include <string.h>
5789
5790 _ACEOF
5791 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5792 $EGREP "memchr" >/dev/null 2>&1; then :
5793
5794 else
5795 ac_cv_header_stdc=no
5796 fi
5797 rm -f conftest*
5798
5799 fi
5800
5801 if test $ac_cv_header_stdc = yes; then
5802 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5804 /* end confdefs.h. */
5805 #include <stdlib.h>
5806
5807 _ACEOF
5808 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5809 $EGREP "free" >/dev/null 2>&1; then :
5810
5811 else
5812 ac_cv_header_stdc=no
5813 fi
5814 rm -f conftest*
5815
5816 fi
5817
5818 if test $ac_cv_header_stdc = yes; then
5819 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5820 if test "$cross_compiling" = yes; then :
5821 :
5822 else
5823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5824 /* end confdefs.h. */
5825 #include <ctype.h>
5826 #include <stdlib.h>
5827 #if ((' ' & 0x0FF) == 0x020)
5828 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5829 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5830 #else
5831 # define ISLOWER(c) \
5832 (('a' <= (c) && (c) <= 'i') \
5833 || ('j' <= (c) && (c) <= 'r') \
5834 || ('s' <= (c) && (c) <= 'z'))
5835 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5836 #endif
5837
5838 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5839 int
5840 main ()
5841 {
5842 int i;
5843 for (i = 0; i < 256; i++)
5844 if (XOR (islower (i), ISLOWER (i))
5845 || toupper (i) != TOUPPER (i))
5846 return 2;
5847 return 0;
5848 }
5849 _ACEOF
5850 if ac_fn_c_try_run "$LINENO"; then :
5851
5852 else
5853 ac_cv_header_stdc=no
5854 fi
5855 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5856 conftest.$ac_objext conftest.beam conftest.$ac_ext
5857 fi
5858
5859 fi
5860 fi
5861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5862 $as_echo "$ac_cv_header_stdc" >&6; }
5863 if test $ac_cv_header_stdc = yes; then
5864
5865 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
5866
5867 fi
5868
5869 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
5870 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5871 inttypes.h stdint.h unistd.h
5872 do :
5873 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5874 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5875 "
5876 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5877 cat >>confdefs.h <<_ACEOF
5878 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5879 _ACEOF
5880
5881 fi
5882
5883 done
5884
5885
5886
5887
5888
5889 for ac_header in $ac_header_list
5890 do :
5891 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5892 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5893 "
5894 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5895 cat >>confdefs.h <<_ACEOF
5896 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5897 _ACEOF
5898
5899 fi
5900
5901 done
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5912 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
5913 if ${ac_cv_safe_to_define___extensions__+:} false; then :
5914 $as_echo_n "(cached) " >&6
5915 else
5916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5917 /* end confdefs.h. */
5918
5919 # define __EXTENSIONS__ 1
5920 $ac_includes_default
5921 int
5922 main ()
5923 {
5924
5925 ;
5926 return 0;
5927 }
5928 _ACEOF
5929 if ac_fn_c_try_compile "$LINENO"; then :
5930 ac_cv_safe_to_define___extensions__=yes
5931 else
5932 ac_cv_safe_to_define___extensions__=no
5933 fi
5934 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5935 fi
5936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5937 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5938
5939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
5940 $as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; }
5941 if ${ac_cv_should_define__xopen_source+:} false; then :
5942 $as_echo_n "(cached) " >&6
5943 else
5944 ac_cv_should_define__xopen_source=no
5945 if test $ac_cv_header_wchar_h = yes; then :
5946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5947 /* end confdefs.h. */
5948
5949 #include <wchar.h>
5950 mbstate_t x;
5951 int
5952 main ()
5953 {
5954
5955 ;
5956 return 0;
5957 }
5958 _ACEOF
5959 if ac_fn_c_try_compile "$LINENO"; then :
5960
5961 else
5962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5963 /* end confdefs.h. */
5964
5965 #define _XOPEN_SOURCE 500
5966 #include <wchar.h>
5967 mbstate_t x;
5968 int
5969 main ()
5970 {
5971
5972 ;
5973 return 0;
5974 }
5975 _ACEOF
5976 if ac_fn_c_try_compile "$LINENO"; then :
5977 ac_cv_should_define__xopen_source=yes
5978 fi
5979 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5980 fi
5981 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5982 fi
5983 fi
5984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
5985 $as_echo "$ac_cv_should_define__xopen_source" >&6; }
5986
5987 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5988
5989 $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
5990
5991 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5992
5993 $as_echo "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h
5994
5995 $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
5996
5997 $as_echo "#define _OPENBSD_SOURCE 1" >>confdefs.h
5998
5999 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6000
6001 $as_echo "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
6002
6003 $as_echo "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
6004
6005 $as_echo "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
6006
6007 $as_echo "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
6008
6009 $as_echo "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
6010
6011 $as_echo "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
6012
6013 $as_echo "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
6014
6015 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
6016
6017 if test $ac_cv_header_minix_config_h = yes; then :
6018 MINIX=yes
6019 $as_echo "#define _MINIX 1" >>confdefs.h
6020
6021 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
6022
6023 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
6024
6025 else
6026 MINIX=
6027 fi
6028 if test $ac_cv_safe_to_define___extensions__ = yes; then :
6029 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
6030
6031 fi
6032 if test $ac_cv_should_define__xopen_source = yes; then :
6033 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
6034
6035 fi
6036
6037 # Needs to run before gl_EARLY so it can override AC_SYS_LARGEFILE included
6038 # there.
6039 ac_aux_dir=
6040 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
6041 if test -f "$ac_dir/install-sh"; then
6042 ac_aux_dir=$ac_dir
6043 ac_install_sh="$ac_aux_dir/install-sh -c"
6044 break
6045 elif test -f "$ac_dir/install.sh"; then
6046 ac_aux_dir=$ac_dir
6047 ac_install_sh="$ac_aux_dir/install.sh -c"
6048 break
6049 elif test -f "$ac_dir/shtool"; then
6050 ac_aux_dir=$ac_dir
6051 ac_install_sh="$ac_aux_dir/shtool install -c"
6052 break
6053 fi
6054 done
6055 if test -z "$ac_aux_dir"; then
6056 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
6057 fi
6058
6059 # These three variables are undocumented and unsupported,
6060 # and are intended to be withdrawn in a future Autoconf release.
6061 # They can cause serious problems if a builder's source tree is in a directory
6062 # whose full name contains unusual characters.
6063 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
6064 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
6065 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
6066
6067
6068 # Make sure we can run config.sub.
6069 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6070 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6071
6072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6073 $as_echo_n "checking build system type... " >&6; }
6074 if ${ac_cv_build+:} false; then :
6075 $as_echo_n "(cached) " >&6
6076 else
6077 ac_build_alias=$build_alias
6078 test "x$ac_build_alias" = x &&
6079 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6080 test "x$ac_build_alias" = x &&
6081 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6082 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6083 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6084
6085 fi
6086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6087 $as_echo "$ac_cv_build" >&6; }
6088 case $ac_cv_build in
6089 *-*-*) ;;
6090 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6091 esac
6092 build=$ac_cv_build
6093 ac_save_IFS=$IFS; IFS='-'
6094 set x $ac_cv_build
6095 shift
6096 build_cpu=$1
6097 build_vendor=$2
6098 shift; shift
6099 # Remember, the first character of IFS is used to create $*,
6100 # except with old shells:
6101 build_os=$*
6102 IFS=$ac_save_IFS
6103 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6104
6105
6106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6107 $as_echo_n "checking host system type... " >&6; }
6108 if ${ac_cv_host+:} false; then :
6109 $as_echo_n "(cached) " >&6
6110 else
6111 if test "x$host_alias" = x; then
6112 ac_cv_host=$ac_cv_build
6113 else
6114 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6115 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6116 fi
6117
6118 fi
6119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6120 $as_echo "$ac_cv_host" >&6; }
6121 case $ac_cv_host in
6122 *-*-*) ;;
6123 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6124 esac
6125 host=$ac_cv_host
6126 ac_save_IFS=$IFS; IFS='-'
6127 set x $ac_cv_host
6128 shift
6129 host_cpu=$1
6130 host_vendor=$2
6131 shift; shift
6132 # Remember, the first character of IFS is used to create $*,
6133 # except with old shells:
6134 host_os=$*
6135 IFS=$ac_save_IFS
6136 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6137
6138
6139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6140 $as_echo_n "checking target system type... " >&6; }
6141 if ${ac_cv_target+:} false; then :
6142 $as_echo_n "(cached) " >&6
6143 else
6144 if test "x$target_alias" = x; then
6145 ac_cv_target=$ac_cv_host
6146 else
6147 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6148 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6149 fi
6150
6151 fi
6152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6153 $as_echo "$ac_cv_target" >&6; }
6154 case $ac_cv_target in
6155 *-*-*) ;;
6156 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6157 esac
6158 target=$ac_cv_target
6159 ac_save_IFS=$IFS; IFS='-'
6160 set x $ac_cv_target
6161 shift
6162 target_cpu=$1
6163 target_vendor=$2
6164 shift; shift
6165 # Remember, the first character of IFS is used to create $*,
6166 # except with old shells:
6167 target_os=$*
6168 IFS=$ac_save_IFS
6169 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6170
6171
6172 # The aliases save the names the user supplied, while $host etc.
6173 # will get canonicalized.
6174 test -n "$target_alias" &&
6175 test "$program_prefix$program_suffix$program_transform_name" = \
6176 NONENONEs,x,x, &&
6177 program_prefix=${target_alias}-
6178
6179 # The tests for host and target for $enable_largefile require
6180 # canonical names.
6181
6182
6183
6184 # As the $enable_largefile decision depends on --enable-plugins we must set it
6185 # even in directories otherwise not depending on the $plugins option.
6186
6187
6188 maybe_plugins=no
6189 for ac_header in dlfcn.h
6190 do :
6191 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
6192 "
6193 if test "x$ac_cv_header_dlfcn_h" = xyes; then :
6194 cat >>confdefs.h <<_ACEOF
6195 #define HAVE_DLFCN_H 1
6196 _ACEOF
6197 maybe_plugins=yes
6198 fi
6199
6200 done
6201
6202 for ac_header in windows.h
6203 do :
6204 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
6205 "
6206 if test "x$ac_cv_header_windows_h" = xyes; then :
6207 cat >>confdefs.h <<_ACEOF
6208 #define HAVE_WINDOWS_H 1
6209 _ACEOF
6210 maybe_plugins=yes
6211 fi
6212
6213 done
6214
6215
6216 # Check whether --enable-plugins was given.
6217 if test "${enable_plugins+set}" = set; then :
6218 enableval=$enable_plugins; case "${enableval}" in
6219 no) plugins=no ;;
6220 *) plugins=yes
6221 if test "$maybe_plugins" != "yes" ; then
6222 as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
6223 fi ;;
6224 esac
6225 else
6226 plugins=$maybe_plugins
6227
6228 fi
6229
6230 if test "$plugins" = "yes"; then
6231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
6232 $as_echo_n "checking for library containing dlsym... " >&6; }
6233 if ${ac_cv_search_dlsym+:} false; then :
6234 $as_echo_n "(cached) " >&6
6235 else
6236 ac_func_search_save_LIBS=$LIBS
6237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6238 /* end confdefs.h. */
6239
6240 /* Override any GCC internal prototype to avoid an error.
6241 Use char because int might match the return type of a GCC
6242 builtin and then its argument prototype would still apply. */
6243 #ifdef __cplusplus
6244 extern "C"
6245 #endif
6246 char dlsym ();
6247 int
6248 main ()
6249 {
6250 return dlsym ();
6251 ;
6252 return 0;
6253 }
6254 _ACEOF
6255 for ac_lib in '' dl; do
6256 if test -z "$ac_lib"; then
6257 ac_res="none required"
6258 else
6259 ac_res=-l$ac_lib
6260 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
6261 fi
6262 if ac_fn_c_try_link "$LINENO"; then :
6263 ac_cv_search_dlsym=$ac_res
6264 fi
6265 rm -f core conftest.err conftest.$ac_objext \
6266 conftest$ac_exeext
6267 if ${ac_cv_search_dlsym+:} false; then :
6268 break
6269 fi
6270 done
6271 if ${ac_cv_search_dlsym+:} false; then :
6272
6273 else
6274 ac_cv_search_dlsym=no
6275 fi
6276 rm conftest.$ac_ext
6277 LIBS=$ac_func_search_save_LIBS
6278 fi
6279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
6280 $as_echo "$ac_cv_search_dlsym" >&6; }
6281 ac_res=$ac_cv_search_dlsym
6282 if test "$ac_res" != no; then :
6283 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6284
6285 fi
6286
6287 fi
6288
6289
6290 case "${host}" in
6291 sparc-*-solaris*|i?86-*-solaris*)
6292 # On native 32-bit Solaris/SPARC and x86, large-file and procfs support
6293 # were mutually exclusive until Solaris 11.3. Without procfs support,
6294 # the bfd/ elf module cannot provide certain routines such as
6295 # elfcore_write_prpsinfo or elfcore_write_prstatus. So unless the user
6296 # explicitly requested large-file support through the
6297 # --enable-largefile switch, disable large-file support in favor of
6298 # procfs support.
6299 #
6300 # Check if <sys/procfs.h> is incompatible with large-file support.
6301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6302 /* end confdefs.h. */
6303 #define _FILE_OFFSET_BITS 64
6304 #define _STRUCTURED_PROC 1
6305 #include <sys/procfs.h>
6306 int
6307 main ()
6308 {
6309
6310 ;
6311 return 0;
6312 }
6313 _ACEOF
6314 if ac_fn_c_try_compile "$LINENO"; then :
6315 acx_cv_procfs_lfs=yes
6316 else
6317 acx_cv_procfs_lfs=no
6318 fi
6319 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6320 #
6321 # Forcefully disable large-file support only if necessary, gdb is in
6322 # tree and enabled.
6323 if test "${target}" = "${host}" -a "$acx_cv_procfs_lfs" = no \
6324 -a -d $srcdir/../gdb -a "$enable_gdb" != no; then
6325 : ${enable_largefile="no"}
6326 if test "$plugins" = yes; then
6327 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
6328 plugin support disabled; require large-file support which is incompatible with GDB." >&5
6329 $as_echo "$as_me: WARNING:
6330 plugin support disabled; require large-file support which is incompatible with GDB." >&2;}
6331 plugins=no
6332 fi
6333 fi
6334 #
6335 # Explicitly undef _FILE_OFFSET_BITS if enable_largefile=no for the
6336 # benefit of g++ 9+ which predefines it on Solaris.
6337 if test "$enable_largefile" = no; then
6338 LARGEFILE_CPPFLAGS="-U_FILE_OFFSET_BITS"
6339
6340 fi
6341 ;;
6342 esac
6343
6344 # Check whether --enable-largefile was given.
6345 if test "${enable_largefile+set}" = set; then :
6346 enableval=$enable_largefile;
6347 fi
6348
6349 if test "$enable_largefile" != no; then :
6350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
6351 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
6352 if ${ac_cv_sys_largefile_CC+:} false; then :
6353 $as_echo_n "(cached) " >&6
6354 else
6355 ac_cv_sys_largefile_CC=no
6356 if test "$GCC" != yes; then
6357 ac_save_CC=$CC
6358 while :; do
6359 # IRIX 6.2 and later do not support large files by default,
6360 # so use the C compiler's -n32 option if that helps.
6361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6362 /* end confdefs.h. */
6363 #include <sys/types.h>
6364 /* Check that off_t can represent 2**63 - 1 correctly.
6365 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6366 since some C++ compilers masquerading as C compilers
6367 incorrectly reject 9223372036854775807. */
6368 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
6369 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6370 && LARGE_OFF_T % 2147483647 == 1)
6371 ? 1 : -1];
6372 int
6373 main ()
6374 {
6375
6376 ;
6377 return 0;
6378 }
6379 _ACEOF
6380 if ac_fn_c_try_compile "$LINENO"; then :
6381 break
6382 fi
6383 rm -f core conftest.err conftest.$ac_objext
6384 CC="$CC -n32"
6385 if ac_fn_c_try_compile "$LINENO"; then :
6386 ac_cv_sys_largefile_CC=' -n32'; break
6387 fi
6388 rm -f core conftest.err conftest.$ac_objext
6389 break
6390 done
6391 CC=$ac_save_CC
6392 rm -f conftest.$ac_ext
6393 fi
6394 fi
6395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
6396 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
6397 if test "$ac_cv_sys_largefile_CC" != no; then
6398 CC=$CC$ac_cv_sys_largefile_CC
6399 fi
6400
6401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
6402 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
6403 if ${ac_cv_sys_file_offset_bits+:} false; then :
6404 $as_echo_n "(cached) " >&6
6405 else
6406 while :; do
6407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6408 /* end confdefs.h. */
6409 #include <sys/types.h>
6410 /* Check that off_t can represent 2**63 - 1 correctly.
6411 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6412 since some C++ compilers masquerading as C compilers
6413 incorrectly reject 9223372036854775807. */
6414 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
6415 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6416 && LARGE_OFF_T % 2147483647 == 1)
6417 ? 1 : -1];
6418 int
6419 main ()
6420 {
6421
6422 ;
6423 return 0;
6424 }
6425 _ACEOF
6426 if ac_fn_c_try_compile "$LINENO"; then :
6427 ac_cv_sys_file_offset_bits=no; break
6428 fi
6429 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6431 /* end confdefs.h. */
6432 #undef _FILE_OFFSET_BITS
6433 #define _FILE_OFFSET_BITS 64
6434 #include <sys/types.h>
6435 /* Check that off_t can represent 2**63 - 1 correctly.
6436 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6437 since some C++ compilers masquerading as C compilers
6438 incorrectly reject 9223372036854775807. */
6439 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
6440 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6441 && LARGE_OFF_T % 2147483647 == 1)
6442 ? 1 : -1];
6443 int
6444 main ()
6445 {
6446
6447 ;
6448 return 0;
6449 }
6450 _ACEOF
6451 if ac_fn_c_try_compile "$LINENO"; then :
6452 ac_cv_sys_file_offset_bits=64; break
6453 fi
6454 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6455 ac_cv_sys_file_offset_bits=unknown
6456 break
6457 done
6458 fi
6459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
6460 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
6461 case $ac_cv_sys_file_offset_bits in #(
6462 no | unknown) ;;
6463 *)
6464 cat >>confdefs.h <<_ACEOF
6465 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
6466 _ACEOF
6467 ;;
6468 esac
6469 rm -rf conftest*
6470 case $ac_cv_sys_file_offset_bits in #(
6471 unknown) :
6472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
6473 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
6474 if ${ac_cv_sys_large_files+:} false; then :
6475 $as_echo_n "(cached) " >&6
6476 else
6477 while :; do
6478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6479 /* end confdefs.h. */
6480 #include <sys/types.h>
6481 /* Check that off_t can represent 2**63 - 1 correctly.
6482 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6483 since some C++ compilers masquerading as C compilers
6484 incorrectly reject 9223372036854775807. */
6485 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
6486 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6487 && LARGE_OFF_T % 2147483647 == 1)
6488 ? 1 : -1];
6489 int
6490 main ()
6491 {
6492
6493 ;
6494 return 0;
6495 }
6496 _ACEOF
6497 if ac_fn_c_try_compile "$LINENO"; then :
6498 ac_cv_sys_large_files=no; break
6499 fi
6500 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6502 /* end confdefs.h. */
6503 #undef _LARGE_FILES
6504 #define _LARGE_FILES 1
6505 #include <sys/types.h>
6506 /* Check that off_t can represent 2**63 - 1 correctly.
6507 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6508 since some C++ compilers masquerading as C compilers
6509 incorrectly reject 9223372036854775807. */
6510 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
6511 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6512 && LARGE_OFF_T % 2147483647 == 1)
6513 ? 1 : -1];
6514 int
6515 main ()
6516 {
6517
6518 ;
6519 return 0;
6520 }
6521 _ACEOF
6522 if ac_fn_c_try_compile "$LINENO"; then :
6523 ac_cv_sys_large_files=1; break
6524 fi
6525 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6526 ac_cv_sys_large_files=unknown
6527 break
6528 done
6529 fi
6530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
6531 $as_echo "$ac_cv_sys_large_files" >&6; }
6532 case $ac_cv_sys_large_files in #(
6533 no | unknown) ;;
6534 *)
6535 cat >>confdefs.h <<_ACEOF
6536 #define _LARGE_FILES $ac_cv_sys_large_files
6537 _ACEOF
6538 ;;
6539 esac
6540 rm -rf conftest* ;; #(
6541 64) :
6542
6543 # Check whether --enable-year2038 was given.
6544 if test "${enable_year2038+set}" = set; then :
6545 enableval=$enable_year2038;
6546 fi
6547
6548 if test "$enable_year2038" != no; then :
6549
6550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for time_t past the year 2038" >&5
6551 $as_echo_n "checking for time_t past the year 2038... " >&6; }
6552 if ${gl_cv_type_time_t_y2038+:} false; then :
6553 $as_echo_n "(cached) " >&6
6554 else
6555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6556 /* end confdefs.h. */
6557
6558 #include <time.h>
6559 /* Check that time_t can represent 2**32 - 1 correctly. */
6560 #define LARGE_TIME_T \\
6561 ((time_t) (((time_t) 1 << 30) - 1 + 3 * ((time_t) 1 << 30)))
6562 int verify_time_t_range[(LARGE_TIME_T / 65537 == 65535
6563 && LARGE_TIME_T % 65537 == 0)
6564 ? 1 : -1];
6565
6566 _ACEOF
6567 if ac_fn_c_try_compile "$LINENO"; then :
6568 gl_cv_type_time_t_y2038=yes
6569 else
6570 gl_cv_type_time_t_y2038=no
6571 fi
6572 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6573
6574 fi
6575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_time_t_y2038" >&5
6576 $as_echo "$gl_cv_type_time_t_y2038" >&6; }
6577 if test "$gl_cv_type_time_t_y2038" = no; then
6578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit time_t with _TIME_BITS=64" >&5
6579 $as_echo_n "checking for 64-bit time_t with _TIME_BITS=64... " >&6; }
6580 if ${gl_cv_type_time_t_bits_macro+:} false; then :
6581 $as_echo_n "(cached) " >&6
6582 else
6583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6584 /* end confdefs.h. */
6585 #define _TIME_BITS 64
6586 #define _FILE_OFFSET_BITS 64
6587
6588 #include <time.h>
6589 /* Check that time_t can represent 2**32 - 1 correctly. */
6590 #define LARGE_TIME_T \\
6591 ((time_t) (((time_t) 1 << 30) - 1 + 3 * ((time_t) 1 << 30)))
6592 int verify_time_t_range[(LARGE_TIME_T / 65537 == 65535
6593 && LARGE_TIME_T % 65537 == 0)
6594 ? 1 : -1];
6595
6596 _ACEOF
6597 if ac_fn_c_try_compile "$LINENO"; then :
6598 gl_cv_type_time_t_bits_macro=yes
6599 else
6600 gl_cv_type_time_t_bits_macro=no
6601 fi
6602 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6603
6604 fi
6605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_time_t_bits_macro" >&5
6606 $as_echo "$gl_cv_type_time_t_bits_macro" >&6; }
6607 if test "$gl_cv_type_time_t_bits_macro" = yes; then
6608
6609 $as_echo "#define _TIME_BITS 64" >>confdefs.h
6610
6611
6612 $as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
6613
6614 gl_cv_type_time_t_y2038=yes
6615 fi
6616 fi
6617 if test $gl_cv_type_time_t_y2038 = no; then
6618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6619 /* end confdefs.h. */
6620 #ifdef _USE_32BIT_TIME_T
6621 int ok;
6622 #else
6623 error fail
6624 #endif
6625
6626 _ACEOF
6627 if ac_fn_c_try_compile "$LINENO"; then :
6628 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6629 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6630 as_fn_error $? "The 'time_t' type stops working after January 2038.
6631 Remove _USE_32BIT_TIME_T from the compiler flags.
6632 See \`config.log' for more details" "$LINENO" 5; }
6633 else
6634 # If not cross-compiling and says we should check,
6635 # and 'touch' works with a large timestamp, then evidently wider time_t
6636 # is desired and supported, so fail and ask the builder to fix the
6637 # problem. Otherwise, just warn the builder.
6638
6639 if test "$gl_warned_about_y2038" != yes; then
6640 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The 'time_t' type stops working after January 2038,
6641 and this package needs a wider 'time_t' type
6642 if there is any way to access timestamps after that.
6643 Configure with 'CC=\"${CC} -m64\"' perhaps?" >&5
6644 $as_echo "$as_me: WARNING: The 'time_t' type stops working after January 2038,
6645 and this package needs a wider 'time_t' type
6646 if there is any way to access timestamps after that.
6647 Configure with 'CC=\"${CC} -m64\"' perhaps?" >&2;}
6648 gl_warned_about_y2038=yes
6649 fi
6650
6651 fi
6652 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6653 fi
6654 fi
6655 ;; #(
6656 *) :
6657 ;;
6658 esac
6659 fi
6660
6661
6662
6663
6664
6665
6666 case "$host_os" in
6667 openbsd*)
6668
6669 $as_echo "#define _ISOC11_SOURCE 1" >>confdefs.h
6670
6671 ;;
6672 esac
6673
6674
6675
6676
6677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
6678 $as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
6679 if ${gl_cv_c_amsterdam_compiler+:} false; then :
6680 $as_echo_n "(cached) " >&6
6681 else
6682
6683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6684 /* end confdefs.h. */
6685
6686 #ifdef __ACK__
6687 Amsterdam
6688 #endif
6689
6690 _ACEOF
6691 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6692 $EGREP "Amsterdam" >/dev/null 2>&1; then :
6693 gl_cv_c_amsterdam_compiler=yes
6694 else
6695 gl_cv_c_amsterdam_compiler=no
6696 fi
6697 rm -f conftest*
6698
6699
6700 fi
6701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
6702 $as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
6703
6704 if test $gl_cv_c_amsterdam_compiler = yes; then
6705 if test -z "$AR"; then
6706 AR='cc -c.a'
6707 fi
6708 if test -z "$ARFLAGS"; then
6709 ARFLAGS='-o'
6710 fi
6711 else
6712 :
6713 fi
6714
6715 if test -n "$ac_tool_prefix"; then
6716 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6717 set dummy ${ac_tool_prefix}ar; ac_word=$2
6718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6719 $as_echo_n "checking for $ac_word... " >&6; }
6720 if ${ac_cv_prog_AR+:} false; then :
6721 $as_echo_n "(cached) " >&6
6722 else
6723 if test -n "$AR"; then
6724 ac_cv_prog_AR="$AR" # Let the user override the test.
6725 else
6726 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6727 for as_dir in $PATH
6728 do
6729 IFS=$as_save_IFS
6730 test -z "$as_dir" && as_dir=.
6731 for ac_exec_ext in '' $ac_executable_extensions; do
6732 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6733 ac_cv_prog_AR="${ac_tool_prefix}ar"
6734 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6735 break 2
6736 fi
6737 done
6738 done
6739 IFS=$as_save_IFS
6740
6741 fi
6742 fi
6743 AR=$ac_cv_prog_AR
6744 if test -n "$AR"; then
6745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6746 $as_echo "$AR" >&6; }
6747 else
6748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6749 $as_echo "no" >&6; }
6750 fi
6751
6752
6753 fi
6754 if test -z "$ac_cv_prog_AR"; then
6755 ac_ct_AR=$AR
6756 # Extract the first word of "ar", so it can be a program name with args.
6757 set dummy ar; ac_word=$2
6758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6759 $as_echo_n "checking for $ac_word... " >&6; }
6760 if ${ac_cv_prog_ac_ct_AR+:} false; then :
6761 $as_echo_n "(cached) " >&6
6762 else
6763 if test -n "$ac_ct_AR"; then
6764 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6765 else
6766 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6767 for as_dir in $PATH
6768 do
6769 IFS=$as_save_IFS
6770 test -z "$as_dir" && as_dir=.
6771 for ac_exec_ext in '' $ac_executable_extensions; do
6772 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6773 ac_cv_prog_ac_ct_AR="ar"
6774 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6775 break 2
6776 fi
6777 done
6778 done
6779 IFS=$as_save_IFS
6780
6781 fi
6782 fi
6783 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6784 if test -n "$ac_ct_AR"; then
6785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6786 $as_echo "$ac_ct_AR" >&6; }
6787 else
6788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6789 $as_echo "no" >&6; }
6790 fi
6791
6792 if test "x$ac_ct_AR" = x; then
6793 AR="ar"
6794 else
6795 case $cross_compiling:$ac_tool_warned in
6796 yes:)
6797 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6798 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6799 ac_tool_warned=yes ;;
6800 esac
6801 AR=$ac_ct_AR
6802 fi
6803 else
6804 AR="$ac_cv_prog_AR"
6805 fi
6806
6807 if test -z "$ARFLAGS"; then
6808 ARFLAGS='cr'
6809 fi
6810
6811
6812
6813 if test -z "$RANLIB"; then
6814 if test $gl_cv_c_amsterdam_compiler = yes; then
6815 RANLIB=':'
6816 else
6817 if test -n "$ac_tool_prefix"; then
6818 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6819 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6821 $as_echo_n "checking for $ac_word... " >&6; }
6822 if ${ac_cv_prog_RANLIB+:} false; then :
6823 $as_echo_n "(cached) " >&6
6824 else
6825 if test -n "$RANLIB"; then
6826 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6827 else
6828 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6829 for as_dir in $PATH
6830 do
6831 IFS=$as_save_IFS
6832 test -z "$as_dir" && as_dir=.
6833 for ac_exec_ext in '' $ac_executable_extensions; do
6834 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6835 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6836 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6837 break 2
6838 fi
6839 done
6840 done
6841 IFS=$as_save_IFS
6842
6843 fi
6844 fi
6845 RANLIB=$ac_cv_prog_RANLIB
6846 if test -n "$RANLIB"; then
6847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6848 $as_echo "$RANLIB" >&6; }
6849 else
6850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6851 $as_echo "no" >&6; }
6852 fi
6853
6854
6855 fi
6856 if test -z "$ac_cv_prog_RANLIB"; then
6857 ac_ct_RANLIB=$RANLIB
6858 # Extract the first word of "ranlib", so it can be a program name with args.
6859 set dummy ranlib; ac_word=$2
6860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6861 $as_echo_n "checking for $ac_word... " >&6; }
6862 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
6863 $as_echo_n "(cached) " >&6
6864 else
6865 if test -n "$ac_ct_RANLIB"; then
6866 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6867 else
6868 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6869 for as_dir in $PATH
6870 do
6871 IFS=$as_save_IFS
6872 test -z "$as_dir" && as_dir=.
6873 for ac_exec_ext in '' $ac_executable_extensions; do
6874 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6875 ac_cv_prog_ac_ct_RANLIB="ranlib"
6876 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6877 break 2
6878 fi
6879 done
6880 done
6881 IFS=$as_save_IFS
6882
6883 fi
6884 fi
6885 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6886 if test -n "$ac_ct_RANLIB"; then
6887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6888 $as_echo "$ac_ct_RANLIB" >&6; }
6889 else
6890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6891 $as_echo "no" >&6; }
6892 fi
6893
6894 if test "x$ac_ct_RANLIB" = x; then
6895 RANLIB=":"
6896 else
6897 case $cross_compiling:$ac_tool_warned in
6898 yes:)
6899 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6900 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6901 ac_tool_warned=yes ;;
6902 esac
6903 RANLIB=$ac_ct_RANLIB
6904 fi
6905 else
6906 RANLIB="$ac_cv_prog_RANLIB"
6907 fi
6908
6909 fi
6910 fi
6911
6912
6913
6914
6915
6916 # IEEE behaviour is the default on all CPUs except Alpha and SH
6917 # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
6918 # and the GCC 4.1.2 manual).
6919 case "$host_cpu" in
6920 alpha*)
6921 # On Alpha systems, a compiler option provides the behaviour.
6922 # See the ieee(3) manual page, also available at
6923 # <https://backdrift.org/man/tru64/man3/ieee.3.html>
6924 if test -n "$GCC"; then
6925 # GCC has the option -mieee.
6926 # For full IEEE compliance (rarely needed), use option -mieee-with-inexact.
6927 CPPFLAGS="$CPPFLAGS -mieee"
6928 else
6929 # Compaq (ex-DEC) C has the option -ieee, equivalent to -ieee_with_no_inexact.
6930 # For full IEEE compliance (rarely needed), use option -ieee_with_inexact.
6931 CPPFLAGS="$CPPFLAGS -ieee"
6932 fi
6933 ;;
6934 sh*)
6935 if test -n "$GCC"; then
6936 # GCC has the option -mieee.
6937 CPPFLAGS="$CPPFLAGS -mieee"
6938 fi
6939 ;;
6940 esac
6941
6942
6943
6944 case "$host_os" in
6945 mingw*)
6946
6947 $as_echo "#define __MINGW_USE_VC2005_COMPAT 1" >>confdefs.h
6948
6949 ;;
6950 esac
6951
6952
6953
6954
6955
6956
6957
6958 # Check whether --enable-threads was given.
6959 if test "${enable_threads+set}" = set; then :
6960 enableval=$enable_threads; gl_use_threads=$enableval
6961 else
6962 if test -n "$gl_use_threads_default"; then
6963 gl_use_threads="$gl_use_threads_default"
6964 else
6965 case "$host_os" in
6966 osf*) gl_use_threads=no ;;
6967 cygwin*)
6968 case `uname -r` in
6969 1.[0-5].*) gl_use_threads=no ;;
6970 *) gl_use_threads=yes ;;
6971 esac
6972 ;;
6973 mingw*)
6974 case "$gl_use_winpthreads_default" in
6975 yes) gl_use_threads=posix ;;
6976 no) gl_use_threads=windows ;;
6977 *) gl_use_threads=yes ;;
6978 esac
6979 ;;
6980 *) gl_use_threads=yes ;;
6981 esac
6982 fi
6983
6984 fi
6985
6986 if test "$gl_use_threads" = yes \
6987 || test "$gl_use_threads" = isoc \
6988 || test "$gl_use_threads" = posix \
6989 || test "$gl_use_threads" = isoc+posix; then
6990 # For using <threads.h> or <pthread.h>:
6991
6992
6993 if test -z "$gl_anythreadlib_early_done"; then
6994 case "$host_os" in
6995 osf*)
6996 # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
6997 # groks <pthread.h>. cc also understands the flag -pthread, but
6998 # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
6999 # 2. putting a flag into CPPFLAGS that has an effect on the linker
7000 # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
7001 # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
7002 CPPFLAGS="$CPPFLAGS -D_REENTRANT"
7003 ;;
7004 esac
7005 # Some systems optimize for single-threaded programs by default, and
7006 # need special flags to disable these optimizations. For example, the
7007 # definition of 'errno' in <errno.h>.
7008 case "$host_os" in
7009 aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
7010 solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
7011 esac
7012 gl_anythreadlib_early_done=done
7013 fi
7014
7015 fi
7016
7017
7018
7019 # Pre-early section.
7020
7021
7022
7023 # Code from module absolute-header:
7024 # Code from module accept:
7025 # Code from module alloca:
7026 # Code from module alloca-opt:
7027 # Code from module arpa_inet:
7028 # Code from module assure:
7029 # Code from module at-internal:
7030 # Code from module attribute:
7031 # Code from module basename-lgpl:
7032 # Code from module bind:
7033 # Code from module btowc:
7034 # Code from module builtin-expect:
7035 # Code from module c99:
7036 # Code from module canonicalize-lgpl:
7037 # Code from module chdir:
7038 # Code from module chdir-long:
7039 # Code from module chown:
7040 # Code from module clock-time:
7041 # Code from module cloexec:
7042 # Code from module close:
7043 # Code from module closedir:
7044 # Code from module connect:
7045 # Code from module count-one-bits:
7046 # Code from module ctype:
7047 # Code from module d-ino:
7048 # Code from module d-type:
7049 # Code from module dirent:
7050 # Code from module dirfd:
7051 # Code from module dirname-lgpl:
7052 # Code from module double-slash-root:
7053 # Code from module dup:
7054 # Code from module dup2:
7055 # Code from module eloop-threshold:
7056 # Code from module environ:
7057 # Code from module errno:
7058 # Code from module error:
7059 # Code from module exitfail:
7060 # Code from module extensions:
7061 # Code from module extern-inline:
7062 # Code from module fchdir:
7063 # Code from module fcntl:
7064 # Code from module fcntl-h:
7065 # Code from module fd-hook:
7066 # Code from module fd-safer-flag:
7067 # Code from module fdopendir:
7068 # Code from module ffs:
7069 # Code from module filename:
7070 # Code from module filenamecat-lgpl:
7071 # Code from module flexmember:
7072 # Code from module float:
7073 # Code from module fnmatch:
7074 # Code from module fnmatch-gnu:
7075 # Code from module fnmatch-h:
7076 # Code from module fpieee:
7077
7078 # Code from module fpucw:
7079 # Code from module free-posix:
7080 # Code from module frexp:
7081 # Code from module frexpl:
7082 # Code from module fstat:
7083 # Code from module fstatat:
7084 # Code from module gen-header:
7085 # Code from module gendocs:
7086 # Code from module getcwd:
7087 # Code from module getcwd-lgpl:
7088 # Code from module getdelim:
7089 # Code from module getdtablesize:
7090 # Code from module getline:
7091 # Code from module getlogin_r:
7092 # Code from module getprogname:
7093 # Code from module getrandom:
7094 # Code from module gettext-h:
7095 # Code from module gettimeofday:
7096 # Code from module gitlog-to-changelog:
7097 # Code from module glob:
7098 # Code from module glob-h:
7099 # Code from module hard-locale:
7100 # Code from module idx:
7101 # Code from module include_next:
7102 # Code from module inet_ntop:
7103 # Code from module intprops:
7104 # Code from module inttypes:
7105 # Code from module inttypes-incomplete:
7106 # Code from module isblank:
7107 # Code from module isnand-nolibm:
7108 # Code from module isnanl-nolibm:
7109 # Code from module largefile:
7110
7111
7112 # Code from module libc-config:
7113 # Code from module limits-h:
7114 # Code from module listen:
7115 # Code from module localcharset:
7116 # Code from module locale:
7117 # Code from module lock:
7118 # Code from module lstat:
7119 # Code from module malloc-posix:
7120 # Code from module malloca:
7121 # Code from module math:
7122 # Code from module mbrtowc:
7123 # Code from module mbsinit:
7124 # Code from module mbsrtowcs:
7125 # Code from module mbtowc:
7126 # Code from module memchr:
7127 # Code from module memmem:
7128 # Code from module memmem-simple:
7129 # Code from module mempcpy:
7130 # Code from module memrchr:
7131 # Code from module minmax:
7132 # Code from module mkdir:
7133 # Code from module mkdtemp:
7134 # Code from module mkostemp:
7135 # Code from module msvc-inval:
7136 # Code from module msvc-nothrow:
7137 # Code from module multiarch:
7138 # Code from module netdb:
7139 # Code from module netinet_in:
7140 # Code from module nocrash:
7141 # Code from module open:
7142 # Code from module openat:
7143 # Code from module openat-die:
7144 # Code from module openat-h:
7145 # Code from module opendir:
7146 # Code from module pathmax:
7147 # Code from module pipe-posix:
7148 # Code from module rawmemchr:
7149 # Code from module readdir:
7150 # Code from module readlink:
7151 # Code from module realloc-posix:
7152 # Code from module rename:
7153 # Code from module rewinddir:
7154 # Code from module rmdir:
7155 # Code from module same-inode:
7156 # Code from module save-cwd:
7157 # Code from module scratch_buffer:
7158 # Code from module select:
7159 # Code from module setenv:
7160 # Code from module setlocale-null:
7161 # Code from module setsockopt:
7162 # Code from module signal-h:
7163 # Code from module snippet/_Noreturn:
7164 # Code from module snippet/arg-nonnull:
7165 # Code from module snippet/c++defs:
7166 # Code from module snippet/warn-on-use:
7167 # Code from module socket:
7168 # Code from module socketlib:
7169 # Code from module sockets:
7170 # Code from module socklen:
7171 # Code from module ssize_t:
7172 # Code from module stat:
7173 # Code from module stat-time:
7174 # Code from module std-gnu11:
7175 # Code from module stdalign:
7176 # Code from module stdbool:
7177 # Code from module stddef:
7178 # Code from module stdint:
7179 # Code from module stdio:
7180 # Code from module stdlib:
7181 # Code from module strchrnul:
7182 # Code from module strdup-posix:
7183 # Code from module streq:
7184 # Code from module strerror:
7185 # Code from module strerror-override:
7186 # Code from module strerror_r-posix:
7187 # Code from module string:
7188 # Code from module strings:
7189 # Code from module strnlen:
7190 # Code from module strnlen1:
7191 # Code from module strstr:
7192 # Code from module strstr-simple:
7193 # Code from module strtok_r:
7194 # Code from module sys_random:
7195 # Code from module sys_select:
7196 # Code from module sys_socket:
7197 # Code from module sys_stat:
7198 # Code from module sys_time:
7199 # Code from module sys_types:
7200 # Code from module sys_uio:
7201 # Code from module sys_wait:
7202 # Code from module tempname:
7203 # Code from module threadlib:
7204
7205
7206
7207 # Code from module time:
7208 # Code from module time_r:
7209 # Code from module unistd:
7210 # Code from module unistd-safer:
7211 # Code from module unsetenv:
7212 # Code from module update-copyright:
7213 # Code from module vararrays:
7214 # Code from module verify:
7215 # Code from module wchar:
7216 # Code from module wctype-h:
7217 # Code from module windows-mutex:
7218 # Code from module windows-once:
7219 # Code from module windows-recmutex:
7220 # Code from module windows-rwlock:
7221 # Code from module wmemchr:
7222 # Code from module wmempcpy:
7223 # Code from module xalloc-oversized:
7224
7225
7226 am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
7227
7228
7229 ac_aux_dir=
7230 for ac_dir in .. "$srcdir"/..; do
7231 if test -f "$ac_dir/install-sh"; then
7232 ac_aux_dir=$ac_dir
7233 ac_install_sh="$ac_aux_dir/install-sh -c"
7234 break
7235 elif test -f "$ac_dir/install.sh"; then
7236 ac_aux_dir=$ac_dir
7237 ac_install_sh="$ac_aux_dir/install.sh -c"
7238 break
7239 elif test -f "$ac_dir/shtool"; then
7240 ac_aux_dir=$ac_dir
7241 ac_install_sh="$ac_aux_dir/shtool install -c"
7242 break
7243 fi
7244 done
7245 if test -z "$ac_aux_dir"; then
7246 as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
7247 fi
7248
7249 # These three variables are undocumented and unsupported,
7250 # and are intended to be withdrawn in a future Autoconf release.
7251 # They can cause serious problems if a builder's source tree is in a directory
7252 # whose full name contains unusual characters.
7253 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
7254 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
7255 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269 # Check whether --enable-cross-guesses was given.
7270 if test "${enable_cross_guesses+set}" = set; then :
7271 enableval=$enable_cross_guesses; if test "x$enableval" != xconservative && test "x$enableval" != xrisky; then
7272 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: invalid argument supplied to --enable-cross-guesses" >&5
7273 $as_echo "$as_me: WARNING: invalid argument supplied to --enable-cross-guesses" >&2;}
7274 enableval=conservative
7275 fi
7276 gl_cross_guesses="$enableval"
7277 else
7278 gl_cross_guesses=conservative
7279 fi
7280
7281 if test $gl_cross_guesses = risky; then
7282 gl_cross_guess_normal="guessing yes"
7283 gl_cross_guess_inverted="guessing no"
7284 else
7285 gl_cross_guess_normal="guessing no"
7286 gl_cross_guess_inverted="guessing yes"
7287 fi
7288 LIBC_FATAL_STDERR_=1
7289 export LIBC_FATAL_STDERR_
7290
7291
7292
7293 HAVE_STRUCT_SOCKADDR_STORAGE=1;
7294 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1;
7295
7296 HAVE_SA_FAMILY_T=1;
7297 HAVE_ACCEPT4=1;
7298
7299
7300
7301
7302 if test $ac_cv_header_sys_socket_h = no; then
7303 for ac_header in ws2tcpip.h
7304 do :
7305 ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
7306 if test "x$ac_cv_header_ws2tcpip_h" = xyes; then :
7307 cat >>confdefs.h <<_ACEOF
7308 #define HAVE_WS2TCPIP_H 1
7309 _ACEOF
7310
7311 fi
7312
7313 done
7314
7315 fi
7316
7317
7318
7319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
7320 $as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
7321 if ${gl_cv_have_include_next+:} false; then :
7322 $as_echo_n "(cached) " >&6
7323 else
7324 rm -rf conftestd1a conftestd1b conftestd2
7325 mkdir conftestd1a conftestd1b conftestd2
7326 cat <<EOF > conftestd1a/conftest.h
7327 #define DEFINED_IN_CONFTESTD1
7328 #include_next <conftest.h>
7329 #ifdef DEFINED_IN_CONFTESTD2
7330 int foo;
7331 #else
7332 #error "include_next doesn't work"
7333 #endif
7334 EOF
7335 cat <<EOF > conftestd1b/conftest.h
7336 #define DEFINED_IN_CONFTESTD1
7337 #include <stdio.h>
7338 #include_next <conftest.h>
7339 #ifdef DEFINED_IN_CONFTESTD2
7340 int foo;
7341 #else
7342 #error "include_next doesn't work"
7343 #endif
7344 EOF
7345 cat <<EOF > conftestd2/conftest.h
7346 #ifndef DEFINED_IN_CONFTESTD1
7347 #error "include_next test doesn't work"
7348 #endif
7349 #define DEFINED_IN_CONFTESTD2
7350 EOF
7351 gl_save_CPPFLAGS="$CPPFLAGS"
7352 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
7353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7354 /* end confdefs.h. */
7355 #include <conftest.h>
7356 _ACEOF
7357 if ac_fn_c_try_compile "$LINENO"; then :
7358 gl_cv_have_include_next=yes
7359 else
7360 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
7361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7362 /* end confdefs.h. */
7363 #include <conftest.h>
7364 _ACEOF
7365 if ac_fn_c_try_compile "$LINENO"; then :
7366 gl_cv_have_include_next=buggy
7367 else
7368 gl_cv_have_include_next=no
7369 fi
7370 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7371
7372 fi
7373 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7374 CPPFLAGS="$gl_save_CPPFLAGS"
7375 rm -rf conftestd1a conftestd1b conftestd2
7376
7377 fi
7378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
7379 $as_echo "$gl_cv_have_include_next" >&6; }
7380 PRAGMA_SYSTEM_HEADER=
7381 if test $gl_cv_have_include_next = yes; then
7382 INCLUDE_NEXT=include_next
7383 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
7384 if test -n "$GCC"; then
7385 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
7386 fi
7387 else
7388 if test $gl_cv_have_include_next = buggy; then
7389 INCLUDE_NEXT=include
7390 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
7391 else
7392 INCLUDE_NEXT=include
7393 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
7394 fi
7395 fi
7396
7397
7398
7399
7400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether source code line length is unlimited" >&5
7401 $as_echo_n "checking whether source code line length is unlimited... " >&6; }
7402 if ${gl_cv_source_line_length_unlimited+:} false; then :
7403 $as_echo_n "(cached) " >&6
7404 else
7405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7406 /* end confdefs.h. */
7407
7408 #ifdef __TANDEM
7409 choke me
7410 #endif
7411
7412 _ACEOF
7413 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7414 $EGREP "choke me" >/dev/null 2>&1; then :
7415 gl_cv_source_line_length_unlimited=no
7416 else
7417 gl_cv_source_line_length_unlimited=yes
7418 fi
7419 rm -f conftest*
7420
7421
7422 fi
7423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_source_line_length_unlimited" >&5
7424 $as_echo "$gl_cv_source_line_length_unlimited" >&6; }
7425 if test $gl_cv_source_line_length_unlimited = no; then
7426 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
7427 else
7428 PRAGMA_COLUMNS=
7429 fi
7430
7431
7432
7433 HAVE_CHOWN=1;
7434 HAVE_COPY_FILE_RANGE=1;
7435 HAVE_DUP3=1;
7436 HAVE_EUIDACCESS=1;
7437 HAVE_EXECVPE=1;
7438 HAVE_FACCESSAT=1;
7439 HAVE_FCHDIR=1;
7440 HAVE_FCHOWNAT=1;
7441 HAVE_FDATASYNC=1;
7442 HAVE_FSYNC=1;
7443 HAVE_FTRUNCATE=1;
7444 HAVE_GETDTABLESIZE=1;
7445 HAVE_GETENTROPY=1;
7446 HAVE_GETGROUPS=1;
7447 HAVE_GETHOSTNAME=1;
7448 HAVE_GETLOGIN=1;
7449 HAVE_GETPAGESIZE=1;
7450 HAVE_GETPASS=1;
7451 HAVE_GROUP_MEMBER=1;
7452 HAVE_LCHOWN=1;
7453 HAVE_LINK=1;
7454 HAVE_LINKAT=1;
7455 HAVE_PIPE=1;
7456 HAVE_PIPE2=1;
7457 HAVE_PREAD=1;
7458 HAVE_PWRITE=1;
7459 HAVE_READLINK=1;
7460 HAVE_READLINKAT=1;
7461 HAVE_SETHOSTNAME=1;
7462 HAVE_SLEEP=1;
7463 HAVE_SYMLINK=1;
7464 HAVE_SYMLINKAT=1;
7465 HAVE_UNLINKAT=1;
7466 HAVE_USLEEP=1;
7467 HAVE_DECL_ENVIRON=1;
7468 HAVE_DECL_EXECVPE=1;
7469 HAVE_DECL_FCHDIR=1;
7470 HAVE_DECL_FDATASYNC=1;
7471 HAVE_DECL_GETDOMAINNAME=1;
7472 HAVE_DECL_GETLOGIN=1;
7473 HAVE_DECL_GETLOGIN_R=1;
7474 HAVE_DECL_GETPAGESIZE=1;
7475 HAVE_DECL_GETUSERSHELL=1;
7476 HAVE_DECL_SETHOSTNAME=1;
7477 HAVE_DECL_TRUNCATE=1;
7478 HAVE_DECL_TTYNAME_R=1;
7479 HAVE_OS_H=0;
7480 HAVE_SYS_PARAM_H=0;
7481 REPLACE_ACCESS=0;
7482 REPLACE_CHOWN=0;
7483 REPLACE_CLOSE=0;
7484 REPLACE_COPY_FILE_RANGE=0;
7485 REPLACE_DUP=0;
7486 REPLACE_DUP2=0;
7487 REPLACE_EXECL=0;
7488 REPLACE_EXECLE=0;
7489 REPLACE_EXECLP=0;
7490 REPLACE_EXECV=0;
7491 REPLACE_EXECVE=0;
7492 REPLACE_EXECVP=0;
7493 REPLACE_EXECVPE=0;
7494 REPLACE_FACCESSAT=0;
7495 REPLACE_FCHOWNAT=0;
7496 REPLACE_FTRUNCATE=0;
7497 REPLACE_GETCWD=0;
7498 REPLACE_GETDOMAINNAME=0;
7499 REPLACE_GETDTABLESIZE=0;
7500 REPLACE_GETLOGIN_R=0;
7501 REPLACE_GETGROUPS=0;
7502 REPLACE_GETPAGESIZE=0;
7503 REPLACE_GETPASS=0;
7504 REPLACE_GETPASS_FOR_GETPASS_GNU=0;
7505 REPLACE_ISATTY=0;
7506 REPLACE_LCHOWN=0;
7507 REPLACE_LINK=0;
7508 REPLACE_LINKAT=0;
7509 REPLACE_LSEEK=0;
7510 REPLACE_PREAD=0;
7511 REPLACE_PWRITE=0;
7512 REPLACE_READ=0;
7513 REPLACE_READLINK=0;
7514 REPLACE_READLINKAT=0;
7515 REPLACE_RMDIR=0;
7516 REPLACE_SLEEP=0;
7517 REPLACE_SYMLINK=0;
7518 REPLACE_SYMLINKAT=0;
7519 REPLACE_TRUNCATE=0;
7520 REPLACE_TTYNAME_R=0;
7521 REPLACE_UNLINK=0;
7522 REPLACE_UNLINKAT=0;
7523 REPLACE_USLEEP=0;
7524 REPLACE_WRITE=0;
7525 UNISTD_H_HAVE_SYS_RANDOM_H=0;
7526 UNISTD_H_HAVE_WINSOCK2_H=0;
7527 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
7528
7529
7530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
7531 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
7532 if ${ac_cv_c_restrict+:} false; then :
7533 $as_echo_n "(cached) " >&6
7534 else
7535 ac_cv_c_restrict=no
7536 # Put '__restrict__' first, to avoid problems with glibc and non-GCC; see:
7537 # https://lists.gnu.org/archive/html/bug-autoconf/2016-02/msg00006.html
7538 # Put 'restrict' last, because C++ lacks it.
7539 for ac_kw in __restrict__ __restrict _Restrict restrict; do
7540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7541 /* end confdefs.h. */
7542 typedef int *int_ptr;
7543 int foo (int_ptr $ac_kw ip) { return ip[0]; }
7544 int bar (int [$ac_kw]); /* Catch GCC bug 14050. */
7545 int bar (int ip[$ac_kw]) { return ip[0]; }
7546
7547 int
7548 main ()
7549 {
7550 int s[1];
7551 int *$ac_kw t = s;
7552 t[0] = 0;
7553 return foo (t) + bar (t);
7554
7555 ;
7556 return 0;
7557 }
7558 _ACEOF
7559 if ac_fn_c_try_compile "$LINENO"; then :
7560 ac_cv_c_restrict=$ac_kw
7561 fi
7562 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7563 test "$ac_cv_c_restrict" != no && break
7564 done
7565
7566 fi
7567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
7568 $as_echo "$ac_cv_c_restrict" >&6; }
7569
7570 case $ac_cv_c_restrict in
7571 restrict) ;;
7572 no) $as_echo "#define restrict /**/" >>confdefs.h
7573 ;;
7574 *) cat >>confdefs.h <<_ACEOF
7575 #define restrict $ac_cv_c_restrict
7576 _ACEOF
7577 ;;
7578 esac
7579
7580
7581
7582
7583
7584 case "$host_os" in
7585 osf*)
7586
7587 $as_echo "#define _POSIX_PII_SOCKET 1" >>confdefs.h
7588
7589 ;;
7590 esac
7591
7592 GL_GENERATE_SYS_SOCKET_H=false
7593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> is self-contained" >&5
7594 $as_echo_n "checking whether <sys/socket.h> is self-contained... " >&6; }
7595 if ${gl_cv_header_sys_socket_h_selfcontained+:} false; then :
7596 $as_echo_n "(cached) " >&6
7597 else
7598
7599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7600 /* end confdefs.h. */
7601 #include <sys/socket.h>
7602 int
7603 main ()
7604 {
7605
7606 ;
7607 return 0;
7608 }
7609 _ACEOF
7610 if ac_fn_c_try_compile "$LINENO"; then :
7611 gl_cv_header_sys_socket_h_selfcontained=yes
7612 else
7613 gl_cv_header_sys_socket_h_selfcontained=no
7614 fi
7615 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7616
7617 fi
7618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_selfcontained" >&5
7619 $as_echo "$gl_cv_header_sys_socket_h_selfcontained" >&6; }
7620 if test $gl_cv_header_sys_socket_h_selfcontained = yes; then
7621 for ac_func in shutdown
7622 do :
7623 ac_fn_c_check_func "$LINENO" "shutdown" "ac_cv_func_shutdown"
7624 if test "x$ac_cv_func_shutdown" = xyes; then :
7625 cat >>confdefs.h <<_ACEOF
7626 #define HAVE_SHUTDOWN 1
7627 _ACEOF
7628
7629 fi
7630 done
7631
7632 if test $ac_cv_func_shutdown = yes; then
7633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> defines the SHUT_* macros" >&5
7634 $as_echo_n "checking whether <sys/socket.h> defines the SHUT_* macros... " >&6; }
7635 if ${gl_cv_header_sys_socket_h_shut+:} false; then :
7636 $as_echo_n "(cached) " >&6
7637 else
7638
7639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7640 /* end confdefs.h. */
7641 #include <sys/socket.h>
7642 int
7643 main ()
7644 {
7645 int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };
7646 ;
7647 return 0;
7648 }
7649 _ACEOF
7650 if ac_fn_c_try_compile "$LINENO"; then :
7651 gl_cv_header_sys_socket_h_shut=yes
7652 else
7653 gl_cv_header_sys_socket_h_shut=no
7654 fi
7655 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7656
7657 fi
7658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_shut" >&5
7659 $as_echo "$gl_cv_header_sys_socket_h_shut" >&6; }
7660 if test $gl_cv_header_sys_socket_h_shut = no; then
7661 GL_GENERATE_SYS_SOCKET_H=true
7662 fi
7663 fi
7664 fi
7665 # We need to check for ws2tcpip.h now.
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677 if test $gl_cv_have_include_next = yes; then
7678 gl_cv_next_sys_socket_h='<'sys/socket.h'>'
7679 else
7680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/socket.h>" >&5
7681 $as_echo_n "checking absolute name of <sys/socket.h>... " >&6; }
7682 if ${gl_cv_next_sys_socket_h+:} false; then :
7683 $as_echo_n "(cached) " >&6
7684 else
7685
7686 if test $ac_cv_header_sys_socket_h = yes; then
7687
7688
7689
7690
7691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7692 /* end confdefs.h. */
7693 #include <sys/socket.h>
7694 _ACEOF
7695 case "$host_os" in
7696 aix*) gl_absname_cpp="$ac_cpp -C" ;;
7697 *) gl_absname_cpp="$ac_cpp" ;;
7698 esac
7699
7700 case "$host_os" in
7701 mingw*)
7702 gl_dirsep_regex='[/\\]'
7703 ;;
7704 *)
7705 gl_dirsep_regex='\/'
7706 ;;
7707 esac
7708 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
7709 gl_header_literal_regex=`echo 'sys/socket.h' \
7710 | sed -e "$gl_make_literal_regex_sed"`
7711 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
7712 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
7713 s|^/[^/]|//&|
7714 p
7715 q
7716 }'
7717
7718 gl_cv_absolute_sys_socket_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
7719 sed -n "$gl_absolute_header_sed"`
7720
7721 gl_header=$gl_cv_absolute_sys_socket_h
7722 gl_cv_next_sys_socket_h='"'$gl_header'"'
7723 else
7724 gl_cv_next_sys_socket_h='<'sys/socket.h'>'
7725 fi
7726
7727
7728 fi
7729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_socket_h" >&5
7730 $as_echo "$gl_cv_next_sys_socket_h" >&6; }
7731 fi
7732 NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_h
7733
7734 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
7735 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
7736 gl_next_as_first_directive='<'sys/socket.h'>'
7737 else
7738 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
7739 gl_next_as_first_directive=$gl_cv_next_sys_socket_h
7740 fi
7741 NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H=$gl_next_as_first_directive
7742
7743
7744
7745
7746 if test $ac_cv_header_sys_socket_h = yes; then
7747 HAVE_SYS_SOCKET_H=1
7748 else
7749 HAVE_SYS_SOCKET_H=0
7750 fi
7751
7752
7753
7754 if test $ac_cv_header_sys_socket_h = yes; then
7755 HAVE_WS2TCPIP_H=0
7756 else
7757 if test $ac_cv_header_ws2tcpip_h = yes; then
7758 HAVE_WS2TCPIP_H=1
7759 else
7760 HAVE_WS2TCPIP_H=0
7761 fi
7762 fi
7763
7764
7765
7766 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "
7767 /* sys/types.h is not needed according to POSIX, but the
7768 sys/socket.h in i386-unknown-freebsd4.10 and
7769 powerpc-apple-darwin5.5 required it. */
7770 #include <sys/types.h>
7771 #ifdef HAVE_SYS_SOCKET_H
7772 #include <sys/socket.h>
7773 #endif
7774 #ifdef HAVE_WS2TCPIP_H
7775 #include <ws2tcpip.h>
7776 #endif
7777
7778 "
7779 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
7780
7781 cat >>confdefs.h <<_ACEOF
7782 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
7783 _ACEOF
7784
7785
7786 fi
7787 ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" "
7788 /* sys/types.h is not needed according to POSIX, but the
7789 sys/socket.h in i386-unknown-freebsd4.10 and
7790 powerpc-apple-darwin5.5 required it. */
7791 #include <sys/types.h>
7792 #ifdef HAVE_SYS_SOCKET_H
7793 #include <sys/socket.h>
7794 #endif
7795 #ifdef HAVE_WS2TCPIP_H
7796 #include <ws2tcpip.h>
7797 #endif
7798
7799 "
7800 if test "x$ac_cv_type_sa_family_t" = xyes; then :
7801
7802 cat >>confdefs.h <<_ACEOF
7803 #define HAVE_SA_FAMILY_T 1
7804 _ACEOF
7805
7806
7807 fi
7808
7809 if test $ac_cv_type_struct_sockaddr_storage = no; then
7810 HAVE_STRUCT_SOCKADDR_STORAGE=0
7811 fi
7812 if test $ac_cv_type_sa_family_t = no; then
7813 HAVE_SA_FAMILY_T=0
7814 fi
7815 if test $ac_cv_type_struct_sockaddr_storage != no; then
7816 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
7817 #ifdef HAVE_SYS_SOCKET_H
7818 #include <sys/socket.h>
7819 #endif
7820 #ifdef HAVE_WS2TCPIP_H
7821 #include <ws2tcpip.h>
7822 #endif
7823
7824 "
7825 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
7826
7827 cat >>confdefs.h <<_ACEOF
7828 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
7829 _ACEOF
7830
7831
7832 else
7833 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0
7834 fi
7835
7836 fi
7837 if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \
7838 || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then
7839 GL_GENERATE_SYS_SOCKET_H=true
7840 fi
7841
7842
7843
7844
7845 if test $ac_cv_header_sys_socket_h != yes; then
7846 for ac_header in winsock2.h
7847 do :
7848 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
7849 if test "x$ac_cv_header_winsock2_h" = xyes; then :
7850 cat >>confdefs.h <<_ACEOF
7851 #define HAVE_WINSOCK2_H 1
7852 _ACEOF
7853
7854 fi
7855
7856 done
7857
7858 fi
7859 if test "$ac_cv_header_winsock2_h" = yes; then
7860 HAVE_WINSOCK2_H=1
7861 UNISTD_H_HAVE_WINSOCK2_H=1
7862 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
7863 else
7864 HAVE_WINSOCK2_H=0
7865 fi
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877 GL_GNULIB_SOCKET=0
7878
7879
7880
7881 GL_GNULIB_CONNECT=0
7882
7883
7884
7885 GL_GNULIB_ACCEPT=0
7886
7887
7888
7889 GL_GNULIB_BIND=0
7890
7891
7892
7893 GL_GNULIB_GETPEERNAME=0
7894
7895
7896
7897 GL_GNULIB_GETSOCKNAME=0
7898
7899
7900
7901 GL_GNULIB_GETSOCKOPT=0
7902
7903
7904
7905 GL_GNULIB_LISTEN=0
7906
7907
7908
7909 GL_GNULIB_RECV=0
7910
7911
7912
7913 GL_GNULIB_SEND=0
7914
7915
7916
7917 GL_GNULIB_RECVFROM=0
7918
7919
7920
7921 GL_GNULIB_SENDTO=0
7922
7923
7924
7925 GL_GNULIB_SETSOCKOPT=0
7926
7927
7928
7929 GL_GNULIB_SHUTDOWN=0
7930
7931
7932
7933 GL_GNULIB_ACCEPT4=0
7934
7935
7936
7937 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
7938 if test "x$ac_cv_type_size_t" = xyes; then :
7939
7940 else
7941
7942 cat >>confdefs.h <<_ACEOF
7943 #define size_t unsigned int
7944 _ACEOF
7945
7946 fi
7947
7948 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
7949 # for constant arguments. Useless!
7950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
7951 $as_echo_n "checking for working alloca.h... " >&6; }
7952 if ${ac_cv_working_alloca_h+:} false; then :
7953 $as_echo_n "(cached) " >&6
7954 else
7955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7956 /* end confdefs.h. */
7957 #include <alloca.h>
7958 int
7959 main ()
7960 {
7961 char *p = (char *) alloca (2 * sizeof (int));
7962 if (p) return 0;
7963 ;
7964 return 0;
7965 }
7966 _ACEOF
7967 if ac_fn_c_try_link "$LINENO"; then :
7968 ac_cv_working_alloca_h=yes
7969 else
7970 ac_cv_working_alloca_h=no
7971 fi
7972 rm -f core conftest.err conftest.$ac_objext \
7973 conftest$ac_exeext conftest.$ac_ext
7974 fi
7975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
7976 $as_echo "$ac_cv_working_alloca_h" >&6; }
7977 if test $ac_cv_working_alloca_h = yes; then
7978
7979 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
7980
7981 fi
7982
7983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
7984 $as_echo_n "checking for alloca... " >&6; }
7985 if ${ac_cv_func_alloca_works+:} false; then :
7986 $as_echo_n "(cached) " >&6
7987 else
7988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7989 /* end confdefs.h. */
7990 #ifdef __GNUC__
7991 # define alloca __builtin_alloca
7992 #else
7993 # ifdef _MSC_VER
7994 # include <malloc.h>
7995 # define alloca _alloca
7996 # else
7997 # ifdef HAVE_ALLOCA_H
7998 # include <alloca.h>
7999 # else
8000 # ifdef _AIX
8001 #pragma alloca
8002 # else
8003 # ifndef alloca /* predefined by HP cc +Olibcalls */
8004 void *alloca (size_t);
8005 # endif
8006 # endif
8007 # endif
8008 # endif
8009 #endif
8010
8011 int
8012 main ()
8013 {
8014 char *p = (char *) alloca (1);
8015 if (p) return 0;
8016 ;
8017 return 0;
8018 }
8019 _ACEOF
8020 if ac_fn_c_try_link "$LINENO"; then :
8021 ac_cv_func_alloca_works=yes
8022 else
8023 ac_cv_func_alloca_works=no
8024 fi
8025 rm -f core conftest.err conftest.$ac_objext \
8026 conftest$ac_exeext conftest.$ac_ext
8027 fi
8028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
8029 $as_echo "$ac_cv_func_alloca_works" >&6; }
8030
8031 if test $ac_cv_func_alloca_works = yes; then
8032
8033 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
8034
8035 else
8036 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
8037 # that cause trouble. Some versions do not even contain alloca or
8038 # contain a buggy version. If you still want to use their alloca,
8039 # use ar to extract alloca.o from them instead of compiling alloca.c.
8040
8041
8042
8043
8044
8045 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
8046
8047 $as_echo "#define C_ALLOCA 1" >>confdefs.h
8048
8049
8050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
8051 $as_echo_n "checking stack direction for C alloca... " >&6; }
8052 if ${ac_cv_c_stack_direction+:} false; then :
8053 $as_echo_n "(cached) " >&6
8054 else
8055 if test "$cross_compiling" = yes; then :
8056 ac_cv_c_stack_direction=0
8057 else
8058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8059 /* end confdefs.h. */
8060 $ac_includes_default
8061 int
8062 find_stack_direction (int *addr, int depth)
8063 {
8064 int dir, dummy = 0;
8065 if (! addr)
8066 addr = &dummy;
8067 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
8068 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
8069 return dir + dummy;
8070 }
8071
8072 int
8073 main (int argc, char **argv)
8074 {
8075 return find_stack_direction (0, argc + !argv + 20) < 0;
8076 }
8077 _ACEOF
8078 if ac_fn_c_try_run "$LINENO"; then :
8079 ac_cv_c_stack_direction=1
8080 else
8081 ac_cv_c_stack_direction=-1
8082 fi
8083 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8084 conftest.$ac_objext conftest.beam conftest.$ac_ext
8085 fi
8086
8087 fi
8088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
8089 $as_echo "$ac_cv_c_stack_direction" >&6; }
8090 cat >>confdefs.h <<_ACEOF
8091 #define STACK_DIRECTION $ac_cv_c_stack_direction
8092 _ACEOF
8093
8094
8095 fi
8096
8097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
8098 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
8099 if test -z "$MKDIR_P"; then
8100 if ${ac_cv_path_mkdir+:} false; then :
8101 $as_echo_n "(cached) " >&6
8102 else
8103 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8104 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
8105 do
8106 IFS=$as_save_IFS
8107 test -z "$as_dir" && as_dir=.
8108 for ac_prog in mkdir gmkdir; do
8109 for ac_exec_ext in '' $ac_executable_extensions; do
8110 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
8111 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
8112 'mkdir (GNU coreutils) '* | \
8113 'mkdir (coreutils) '* | \
8114 'mkdir (fileutils) '4.1*)
8115 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
8116 break 3;;
8117 esac
8118 done
8119 done
8120 done
8121 IFS=$as_save_IFS
8122
8123 fi
8124
8125 test -d ./--version && rmdir ./--version
8126 if test "${ac_cv_path_mkdir+set}" = set; then
8127 MKDIR_P="$ac_cv_path_mkdir -p"
8128 else
8129 # As a last resort, use the slow shell script. Don't cache a
8130 # value for MKDIR_P within a source directory, because that will
8131 # break other packages using the cache if that directory is
8132 # removed, or if the value is a relative name.
8133 MKDIR_P="$ac_install_sh -d"
8134 fi
8135 fi
8136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
8137 $as_echo "$MKDIR_P" >&6; }
8138
8139
8140 HAVE_DECL_INET_NTOP=1;
8141 HAVE_DECL_INET_PTON=1;
8142 REPLACE_INET_NTOP=0;
8143 REPLACE_INET_PTON=0;
8144
8145
8146
8147
8148
8149
8150
8151 if test $ac_cv_header_features_h = yes; then
8152 HAVE_FEATURES_H=1
8153 else
8154 HAVE_FEATURES_H=0
8155 fi
8156
8157
8158
8159
8160
8161
8162 if test $ac_cv_header_arpa_inet_h = yes; then
8163 HAVE_ARPA_INET_H=1
8164 else
8165 HAVE_ARPA_INET_H=0
8166 fi
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177 if test $gl_cv_have_include_next = yes; then
8178 gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
8179 else
8180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <arpa/inet.h>" >&5
8181 $as_echo_n "checking absolute name of <arpa/inet.h>... " >&6; }
8182 if ${gl_cv_next_arpa_inet_h+:} false; then :
8183 $as_echo_n "(cached) " >&6
8184 else
8185
8186 if test $ac_cv_header_arpa_inet_h = yes; then
8187
8188
8189
8190
8191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8192 /* end confdefs.h. */
8193 #include <arpa/inet.h>
8194 _ACEOF
8195 case "$host_os" in
8196 aix*) gl_absname_cpp="$ac_cpp -C" ;;
8197 *) gl_absname_cpp="$ac_cpp" ;;
8198 esac
8199
8200 case "$host_os" in
8201 mingw*)
8202 gl_dirsep_regex='[/\\]'
8203 ;;
8204 *)
8205 gl_dirsep_regex='\/'
8206 ;;
8207 esac
8208 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
8209 gl_header_literal_regex=`echo 'arpa/inet.h' \
8210 | sed -e "$gl_make_literal_regex_sed"`
8211 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
8212 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
8213 s|^/[^/]|//&|
8214 p
8215 q
8216 }'
8217
8218 gl_cv_absolute_arpa_inet_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
8219 sed -n "$gl_absolute_header_sed"`
8220
8221 gl_header=$gl_cv_absolute_arpa_inet_h
8222 gl_cv_next_arpa_inet_h='"'$gl_header'"'
8223 else
8224 gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
8225 fi
8226
8227
8228 fi
8229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_arpa_inet_h" >&5
8230 $as_echo "$gl_cv_next_arpa_inet_h" >&6; }
8231 fi
8232 NEXT_ARPA_INET_H=$gl_cv_next_arpa_inet_h
8233
8234 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
8235 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
8236 gl_next_as_first_directive='<'arpa/inet.h'>'
8237 else
8238 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
8239 gl_next_as_first_directive=$gl_cv_next_arpa_inet_h
8240 fi
8241 NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H=$gl_next_as_first_directive
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251 if test $ac_cv_header_sys_socket_h = yes; then
8252 HAVE_WS2TCPIP_H=0
8253 else
8254 if test $ac_cv_header_ws2tcpip_h = yes; then
8255 HAVE_WS2TCPIP_H=1
8256 else
8257 HAVE_WS2TCPIP_H=0
8258 fi
8259 fi
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269 GL_GNULIB_INET_NTOP=0
8270
8271
8272
8273 GL_GNULIB_INET_PTON=0
8274
8275
8276
8277
8278 HAVE_BTOWC=1;
8279 HAVE_MBSINIT=1;
8280 HAVE_MBRTOWC=1;
8281 HAVE_MBRLEN=1;
8282 HAVE_MBSRTOWCS=1;
8283 HAVE_MBSNRTOWCS=1;
8284 HAVE_WCRTOMB=1;
8285 HAVE_WCSRTOMBS=1;
8286 HAVE_WCSNRTOMBS=1;
8287 HAVE_WMEMCHR=1;
8288 HAVE_WMEMCMP=1;
8289 HAVE_WMEMCPY=1;
8290 HAVE_WMEMMOVE=1;
8291 HAVE_WMEMPCPY=1;
8292 HAVE_WMEMSET=1;
8293 HAVE_WCSLEN=1;
8294 HAVE_WCSNLEN=1;
8295 HAVE_WCSCPY=1;
8296 HAVE_WCPCPY=1;
8297 HAVE_WCSNCPY=1;
8298 HAVE_WCPNCPY=1;
8299 HAVE_WCSCAT=1;
8300 HAVE_WCSNCAT=1;
8301 HAVE_WCSCMP=1;
8302 HAVE_WCSNCMP=1;
8303 HAVE_WCSCASECMP=1;
8304 HAVE_WCSNCASECMP=1;
8305 HAVE_WCSCOLL=1;
8306 HAVE_WCSXFRM=1;
8307 HAVE_WCSDUP=1;
8308 HAVE_WCSCHR=1;
8309 HAVE_WCSRCHR=1;
8310 HAVE_WCSCSPN=1;
8311 HAVE_WCSSPN=1;
8312 HAVE_WCSPBRK=1;
8313 HAVE_WCSSTR=1;
8314 HAVE_WCSTOK=1;
8315 HAVE_WCSWIDTH=1;
8316 HAVE_WCSFTIME=1;
8317 HAVE_DECL_WCTOB=1;
8318 HAVE_DECL_WCSDUP=1;
8319 HAVE_DECL_WCWIDTH=1;
8320 REPLACE_MBSTATE_T=0;
8321 REPLACE_BTOWC=0;
8322 REPLACE_WCTOB=0;
8323 REPLACE_MBSINIT=0;
8324 REPLACE_MBRTOWC=0;
8325 REPLACE_MBRLEN=0;
8326 REPLACE_MBSRTOWCS=0;
8327 REPLACE_MBSNRTOWCS=0;
8328 REPLACE_WCRTOMB=0;
8329 REPLACE_WCSRTOMBS=0;
8330 REPLACE_WCSNRTOMBS=0;
8331 REPLACE_WCWIDTH=0;
8332 REPLACE_WCSWIDTH=0;
8333 REPLACE_WCSFTIME=0;
8334 REPLACE_WCSTOK=0;
8335
8336
8337
8338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
8339 $as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
8340 if ${gl_cv_header_wchar_h_correct_inline+:} false; then :
8341 $as_echo_n "(cached) " >&6
8342 else
8343 gl_cv_header_wchar_h_correct_inline=yes
8344 case "$host_os" in
8345 *-gnu* | gnu*)
8346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8347 /* end confdefs.h. */
8348
8349
8350 #define wcstod renamed_wcstod
8351 #include <wchar.h>
8352 extern int zero (void);
8353 int main () { return zero(); }
8354
8355 _ACEOF
8356 save_ac_compile="$ac_compile"
8357 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
8358 if echo '#include "conftest.c"' >conftest1.c \
8359 && { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8360 (eval $ac_compile) 2>&5
8361 ac_status=$?
8362 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8363 test $ac_status = 0; }; then
8364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8365 /* end confdefs.h. */
8366
8367
8368 #define wcstod renamed_wcstod
8369 #include <wchar.h>
8370 int zero (void) { return 0; }
8371
8372 _ACEOF
8373 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
8374 if echo '#include "conftest.c"' >conftest2.c \
8375 && { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8376 (eval $ac_compile) 2>&5
8377 ac_status=$?
8378 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8379 test $ac_status = 0; }; then
8380 if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
8381 :
8382 else
8383 gl_cv_header_wchar_h_correct_inline=no
8384 fi
8385 fi
8386 fi
8387 ac_compile="$save_ac_compile"
8388 rm -f conftest12.c conftest12.$ac_objext conftest$ac_exeext
8389 ;;
8390 esac
8391
8392 fi
8393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
8394 $as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
8395 if test $gl_cv_header_wchar_h_correct_inline = no; then
8396 as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
8397 This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
8398 C99 mode. You have four options:
8399 - Add the flag -fgnu89-inline to CC and reconfigure, or
8400 - Fix your include files, using parts of
8401 <https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
8402 - Use a gcc version older than 4.3, or
8403 - Don't use the flags -std=c99 or -std=gnu99.
8404 Configuration aborted." "$LINENO" 5
8405 fi
8406
8407
8408
8409
8410 for ac_func in $ac_func_list
8411 do :
8412 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8413 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8414 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8415 cat >>confdefs.h <<_ACEOF
8416 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8417 _ACEOF
8418
8419 fi
8420 done
8421
8422
8423
8424
8425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
8426 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
8427 if ${am_cv_langinfo_codeset+:} false; then :
8428 $as_echo_n "(cached) " >&6
8429 else
8430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8431 /* end confdefs.h. */
8432 #include <langinfo.h>
8433 int
8434 main ()
8435 {
8436 char* cs = nl_langinfo(CODESET); return !cs;
8437 ;
8438 return 0;
8439 }
8440 _ACEOF
8441 if ac_fn_c_try_link "$LINENO"; then :
8442 am_cv_langinfo_codeset=yes
8443 else
8444 am_cv_langinfo_codeset=no
8445 fi
8446 rm -f core conftest.err conftest.$ac_objext \
8447 conftest$ac_exeext conftest.$ac_ext
8448
8449 fi
8450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
8451 $as_echo "$am_cv_langinfo_codeset" >&6; }
8452 if test $am_cv_langinfo_codeset = yes; then
8453
8454 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
8455
8456 fi
8457
8458
8459
8460
8461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
8462 $as_echo_n "checking for a traditional french locale... " >&6; }
8463 if ${gt_cv_locale_fr+:} false; then :
8464 $as_echo_n "(cached) " >&6
8465 else
8466
8467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8468 /* end confdefs.h. */
8469
8470 #include <locale.h>
8471 #include <time.h>
8472 #if HAVE_LANGINFO_CODESET
8473 # include <langinfo.h>
8474 #endif
8475 #include <stdlib.h>
8476 #include <string.h>
8477 struct tm t;
8478 char buf[16];
8479 int main () {
8480 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
8481 imitates locale dependent behaviour by looking at the environment
8482 variables, and all locales use the UTF-8 encoding. */
8483 #if defined __BEOS__ || defined __HAIKU__
8484 return 1;
8485 #else
8486 /* Check whether the given locale name is recognized by the system. */
8487 # if defined _WIN32 && !defined __CYGWIN__
8488 /* On native Windows, setlocale(category, "") looks at the system settings,
8489 not at the environment variables. Also, when an encoding suffix such
8490 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
8491 category of the locale to "C". */
8492 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
8493 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
8494 return 1;
8495 # else
8496 if (setlocale (LC_ALL, "") == NULL) return 1;
8497 # endif
8498 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
8499 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
8500 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
8501 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
8502 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
8503 some unit tests fail.
8504 On MirBSD 10, when an unsupported locale is specified, setlocale()
8505 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
8506 # if HAVE_LANGINFO_CODESET
8507 {
8508 const char *cs = nl_langinfo (CODESET);
8509 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
8510 || strcmp (cs, "UTF-8") == 0)
8511 return 1;
8512 }
8513 # endif
8514 # ifdef __CYGWIN__
8515 /* On Cygwin, avoid locale names without encoding suffix, because the
8516 locale_charset() function relies on the encoding suffix. Note that
8517 LC_ALL is set on the command line. */
8518 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
8519 # endif
8520 /* Check whether in the abbreviation of the second month, the second
8521 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
8522 one byte long. This excludes the UTF-8 encoding. */
8523 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
8524 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
8525 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
8526 /* Check whether the decimal separator is a comma.
8527 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
8528 are nl_langinfo(RADIXCHAR) are both ".". */
8529 if (localeconv () ->decimal_point[0] != ',') return 1;
8530 # endif
8531 return 0;
8532 #endif
8533 }
8534
8535 _ACEOF
8536 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
8537 (eval $ac_link) 2>&5
8538 ac_status=$?
8539 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8540 test $ac_status = 0; } && test -s conftest$ac_exeext; then
8541 case "$host_os" in
8542 # Handle native Windows specially, because there setlocale() interprets
8543 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
8544 # "fr" or "fra" as "French" or "French_France.1252",
8545 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
8546 # "ja" as "Japanese" or "Japanese_Japan.932",
8547 # and similar.
8548 mingw*)
8549 # Test for the native Windows locale name.
8550 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8551 gt_cv_locale_fr=French_France.1252
8552 else
8553 # None found.
8554 gt_cv_locale_fr=none
8555 fi
8556 ;;
8557 *)
8558 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
8559 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
8560 # configure script would override the LC_ALL setting. Likewise for
8561 # LC_CTYPE, which is also set at the beginning of the configure script.
8562 # Test for the usual locale name.
8563 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8564 gt_cv_locale_fr=fr_FR
8565 else
8566 # Test for the locale name with explicit encoding suffix.
8567 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8568 gt_cv_locale_fr=fr_FR.ISO-8859-1
8569 else
8570 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
8571 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8572 gt_cv_locale_fr=fr_FR.ISO8859-1
8573 else
8574 # Test for the HP-UX locale name.
8575 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8576 gt_cv_locale_fr=fr_FR.iso88591
8577 else
8578 # Test for the Solaris 7 locale name.
8579 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8580 gt_cv_locale_fr=fr
8581 else
8582 # None found.
8583 gt_cv_locale_fr=none
8584 fi
8585 fi
8586 fi
8587 fi
8588 fi
8589 ;;
8590 esac
8591 fi
8592 rm -fr conftest*
8593
8594 fi
8595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
8596 $as_echo "$gt_cv_locale_fr" >&6; }
8597 LOCALE_FR=$gt_cv_locale_fr
8598
8599
8600
8601
8602 GL_GNULIB_BTOWC=0
8603
8604
8605
8606 GL_GNULIB_WCTOB=0
8607
8608
8609
8610 GL_GNULIB_MBSINIT=0
8611
8612
8613
8614 GL_GNULIB_MBRTOWC=0
8615
8616
8617
8618 GL_GNULIB_MBRLEN=0
8619
8620
8621
8622 GL_GNULIB_MBSRTOWCS=0
8623
8624
8625
8626 GL_GNULIB_MBSNRTOWCS=0
8627
8628
8629
8630 GL_GNULIB_WCRTOMB=0
8631
8632
8633
8634 GL_GNULIB_WCSRTOMBS=0
8635
8636
8637
8638 GL_GNULIB_WCSNRTOMBS=0
8639
8640
8641
8642 GL_GNULIB_WCWIDTH=0
8643
8644
8645
8646 GL_GNULIB_WMEMCHR=0
8647
8648
8649
8650 GL_GNULIB_WMEMCMP=0
8651
8652
8653
8654 GL_GNULIB_WMEMCPY=0
8655
8656
8657
8658 GL_GNULIB_WMEMMOVE=0
8659
8660
8661
8662 GL_GNULIB_WMEMPCPY=0
8663
8664
8665
8666 GL_GNULIB_WMEMSET=0
8667
8668
8669
8670 GL_GNULIB_WCSLEN=0
8671
8672
8673
8674 GL_GNULIB_WCSNLEN=0
8675
8676
8677
8678 GL_GNULIB_WCSCPY=0
8679
8680
8681
8682 GL_GNULIB_WCPCPY=0
8683
8684
8685
8686 GL_GNULIB_WCSNCPY=0
8687
8688
8689
8690 GL_GNULIB_WCPNCPY=0
8691
8692
8693
8694 GL_GNULIB_WCSCAT=0
8695
8696
8697
8698 GL_GNULIB_WCSNCAT=0
8699
8700
8701
8702 GL_GNULIB_WCSCMP=0
8703
8704
8705
8706 GL_GNULIB_WCSNCMP=0
8707
8708
8709
8710 GL_GNULIB_WCSCASECMP=0
8711
8712
8713
8714 GL_GNULIB_WCSNCASECMP=0
8715
8716
8717
8718 GL_GNULIB_WCSCOLL=0
8719
8720
8721
8722 GL_GNULIB_WCSXFRM=0
8723
8724
8725
8726 GL_GNULIB_WCSDUP=0
8727
8728
8729
8730 GL_GNULIB_WCSCHR=0
8731
8732
8733
8734 GL_GNULIB_WCSRCHR=0
8735
8736
8737
8738 GL_GNULIB_WCSCSPN=0
8739
8740
8741
8742 GL_GNULIB_WCSSPN=0
8743
8744
8745
8746 GL_GNULIB_WCSPBRK=0
8747
8748
8749
8750 GL_GNULIB_WCSSTR=0
8751
8752
8753
8754 GL_GNULIB_WCSTOK=0
8755
8756
8757
8758 GL_GNULIB_WCSWIDTH=0
8759
8760
8761
8762 GL_GNULIB_WCSFTIME=0
8763
8764
8765
8766 GL_GNULIB_MDA_WCSDUP=1
8767
8768
8769
8770
8771
8772 GL_GNULIB__EXIT=0
8773
8774
8775
8776 GL_GNULIB_ALIGNED_ALLOC=0
8777
8778
8779
8780 GL_GNULIB_ATOLL=0
8781
8782
8783
8784 GL_GNULIB_CALLOC_GNU=0
8785
8786
8787
8788 GL_GNULIB_CALLOC_POSIX=0
8789
8790
8791
8792 GL_GNULIB_CANONICALIZE_FILE_NAME=0
8793
8794
8795
8796 GL_GNULIB_FREE_POSIX=0
8797
8798
8799
8800 GL_GNULIB_GETLOADAVG=0
8801
8802
8803
8804 GL_GNULIB_GETSUBOPT=0
8805
8806
8807
8808 GL_GNULIB_GRANTPT=0
8809
8810
8811
8812 GL_GNULIB_MALLOC_GNU=0
8813
8814
8815
8816 GL_GNULIB_MALLOC_POSIX=0
8817
8818
8819
8820 GL_GNULIB_MBTOWC=0
8821
8822
8823
8824 GL_GNULIB_MKDTEMP=0
8825
8826
8827
8828 GL_GNULIB_MKOSTEMP=0
8829
8830
8831
8832 GL_GNULIB_MKOSTEMPS=0
8833
8834
8835
8836 GL_GNULIB_MKSTEMP=0
8837
8838
8839
8840 GL_GNULIB_MKSTEMPS=0
8841
8842
8843
8844 GL_GNULIB_POSIX_MEMALIGN=0
8845
8846
8847
8848 GL_GNULIB_POSIX_OPENPT=0
8849
8850
8851
8852 GL_GNULIB_PTSNAME=0
8853
8854
8855
8856 GL_GNULIB_PTSNAME_R=0
8857
8858
8859
8860 GL_GNULIB_PUTENV=0
8861
8862
8863
8864 GL_GNULIB_QSORT_R=0
8865
8866
8867
8868 GL_GNULIB_RANDOM=0
8869
8870
8871
8872 GL_GNULIB_RANDOM_R=0
8873
8874
8875
8876 GL_GNULIB_REALLOCARRAY=0
8877
8878
8879
8880 GL_GNULIB_REALLOC_GNU=0
8881
8882
8883
8884 GL_GNULIB_REALLOC_POSIX=0
8885
8886
8887
8888 GL_GNULIB_REALPATH=0
8889
8890
8891
8892 GL_GNULIB_RPMATCH=0
8893
8894
8895
8896 GL_GNULIB_SECURE_GETENV=0
8897
8898
8899
8900 GL_GNULIB_SETENV=0
8901
8902
8903
8904 GL_GNULIB_STRTOD=0
8905
8906
8907
8908 GL_GNULIB_STRTOL=0
8909
8910
8911
8912 GL_GNULIB_STRTOLD=0
8913
8914
8915
8916 GL_GNULIB_STRTOLL=0
8917
8918
8919
8920 GL_GNULIB_STRTOUL=0
8921
8922
8923
8924 GL_GNULIB_STRTOULL=0
8925
8926
8927
8928 GL_GNULIB_SYSTEM_POSIX=0
8929
8930
8931
8932 GL_GNULIB_UNLOCKPT=0
8933
8934
8935
8936 GL_GNULIB_UNSETENV=0
8937
8938
8939
8940 GL_GNULIB_WCTOMB=0
8941
8942
8943
8944 GL_GNULIB_MDA_ECVT=1
8945
8946
8947
8948 GL_GNULIB_MDA_FCVT=1
8949
8950
8951
8952 GL_GNULIB_MDA_GCVT=1
8953
8954
8955
8956 GL_GNULIB_MDA_MKTEMP=1
8957
8958
8959
8960 GL_GNULIB_MDA_PUTENV=1
8961
8962
8963
8964
8965 HAVE__EXIT=1;
8966 HAVE_ALIGNED_ALLOC=1;
8967 HAVE_ATOLL=1;
8968 HAVE_CANONICALIZE_FILE_NAME=1;
8969 HAVE_DECL_ECVT=1;
8970 HAVE_DECL_FCVT=1;
8971 HAVE_DECL_GCVT=1;
8972 HAVE_DECL_GETLOADAVG=1;
8973 HAVE_GETSUBOPT=1;
8974 HAVE_GRANTPT=1;
8975 HAVE_INITSTATE=1;
8976 HAVE_DECL_INITSTATE=1;
8977 HAVE_MBTOWC=1;
8978 HAVE_MKDTEMP=1;
8979 HAVE_MKOSTEMP=1;
8980 HAVE_MKOSTEMPS=1;
8981 HAVE_MKSTEMP=1;
8982 HAVE_MKSTEMPS=1;
8983 HAVE_POSIX_MEMALIGN=1;
8984 HAVE_POSIX_OPENPT=1;
8985 HAVE_PTSNAME=1;
8986 HAVE_PTSNAME_R=1;
8987 HAVE_QSORT_R=1;
8988 HAVE_RANDOM=1;
8989 HAVE_RANDOM_H=1;
8990 HAVE_RANDOM_R=1;
8991 HAVE_REALLOCARRAY=1;
8992 HAVE_REALPATH=1;
8993 HAVE_RPMATCH=1;
8994 HAVE_SECURE_GETENV=1;
8995 HAVE_SETENV=1;
8996 HAVE_DECL_SETENV=1;
8997 HAVE_SETSTATE=1;
8998 HAVE_DECL_SETSTATE=1;
8999 HAVE_STRTOD=1;
9000 HAVE_STRTOL=1;
9001 HAVE_STRTOLD=1;
9002 HAVE_STRTOLL=1;
9003 HAVE_STRTOUL=1;
9004 HAVE_STRTOULL=1;
9005 HAVE_STRUCT_RANDOM_DATA=1;
9006 HAVE_SYS_LOADAVG_H=0;
9007 HAVE_UNLOCKPT=1;
9008 HAVE_DECL_UNSETENV=1;
9009 REPLACE_ALIGNED_ALLOC=0;
9010 REPLACE_CALLOC_FOR_CALLOC_GNU=0;
9011 REPLACE_CALLOC_FOR_CALLOC_POSIX=0;
9012 REPLACE_CANONICALIZE_FILE_NAME=0;
9013 REPLACE_FREE=0;
9014 REPLACE_INITSTATE=0;
9015 REPLACE_MALLOC_FOR_MALLOC_GNU=0;
9016 REPLACE_MALLOC_FOR_MALLOC_POSIX=0;
9017 REPLACE_MBTOWC=0;
9018 REPLACE_MKSTEMP=0;
9019 REPLACE_POSIX_MEMALIGN=0;
9020 REPLACE_PTSNAME=0;
9021 REPLACE_PTSNAME_R=0;
9022 REPLACE_PUTENV=0;
9023 REPLACE_QSORT_R=0;
9024 REPLACE_RANDOM=0;
9025 REPLACE_RANDOM_R=0;
9026 REPLACE_REALLOC_FOR_REALLOC_GNU=0;
9027 REPLACE_REALLOC_FOR_REALLOC_POSIX=0;
9028 REPLACE_REALLOCARRAY=0;
9029 REPLACE_REALPATH=0;
9030 REPLACE_SETENV=0;
9031 REPLACE_SETSTATE=0;
9032 REPLACE_STRTOD=0;
9033 REPLACE_STRTOL=0;
9034 REPLACE_STRTOLD=0;
9035 REPLACE_STRTOLL=0;
9036 REPLACE_STRTOUL=0;
9037 REPLACE_STRTOULL=0;
9038 REPLACE_UNSETENV=0;
9039 REPLACE_WCTOMB=0;
9040
9041
9042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
9043 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
9044 if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
9045 $as_echo_n "(cached) " >&6
9046 else
9047 rm -f conftest.sym conftest.file
9048 echo >conftest.file
9049 if test "$cross_compiling" = yes; then :
9050 case "$host_os" in
9051 linux-* | linux)
9052 # Guess yes on Linux systems.
9053 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
9054 *-gnu* | gnu*)
9055 # Guess yes on glibc systems.
9056 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
9057 mingw*)
9058 # Guess no on native Windows.
9059 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
9060 *)
9061 # If we don't know, obey --enable-cross-guesses.
9062 gl_cv_func_lstat_dereferences_slashed_symlink="$gl_cross_guess_normal" ;;
9063 esac
9064
9065 else
9066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9067 /* end confdefs.h. */
9068 $ac_includes_default
9069 int
9070 main ()
9071 {
9072 struct stat sbuf;
9073 if (symlink ("conftest.file", "conftest.sym") != 0)
9074 return 1;
9075 /* Linux will dereference the symlink and fail, as required by
9076 POSIX. That is better in the sense that it means we will not
9077 have to compile and use the lstat wrapper. */
9078 return lstat ("conftest.sym/", &sbuf) == 0;
9079
9080 ;
9081 return 0;
9082 }
9083 _ACEOF
9084 if ac_fn_c_try_run "$LINENO"; then :
9085 gl_cv_func_lstat_dereferences_slashed_symlink=yes
9086 else
9087 gl_cv_func_lstat_dereferences_slashed_symlink=no
9088 fi
9089 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9090 conftest.$ac_objext conftest.beam conftest.$ac_ext
9091 fi
9092
9093 rm -f conftest.sym conftest.file
9094
9095 fi
9096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
9097 $as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
9098 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
9099 *yes)
9100
9101 cat >>confdefs.h <<_ACEOF
9102 #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
9103 _ACEOF
9104
9105 ;;
9106 esac
9107
9108
9109
9110
9111
9112
9113
9114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
9115 $as_echo_n "checking whether // is distinct from /... " >&6; }
9116 if ${gl_cv_double_slash_root+:} false; then :
9117 $as_echo_n "(cached) " >&6
9118 else
9119 if test x"$cross_compiling" = xyes ; then
9120 # When cross-compiling, there is no way to tell whether // is special
9121 # short of a list of hosts. However, the only known hosts to date
9122 # that have a distinct // are Apollo DomainOS (too old to port to),
9123 # Cygwin, and z/OS. If anyone knows of another system for which // has
9124 # special semantics and is distinct from /, please report it to
9125 # <bug-gnulib@gnu.org>.
9126 case $host in
9127 *-cygwin | i370-ibm-openedition)
9128 gl_cv_double_slash_root=yes ;;
9129 *)
9130 # Be optimistic and assume that / and // are the same when we
9131 # don't know.
9132 gl_cv_double_slash_root='unknown, assuming no' ;;
9133 esac
9134 else
9135 set x `ls -di / // 2>/dev/null`
9136 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
9137 gl_cv_double_slash_root=no
9138 else
9139 gl_cv_double_slash_root=yes
9140 fi
9141 fi
9142 fi
9143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
9144 $as_echo "$gl_cv_double_slash_root" >&6; }
9145 if test "$gl_cv_double_slash_root" = yes; then
9146
9147 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
9148
9149 fi
9150
9151
9152
9153
9154
9155
9156
9157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
9158 $as_echo_n "checking whether realpath works... " >&6; }
9159 if ${gl_cv_func_realpath_works+:} false; then :
9160 $as_echo_n "(cached) " >&6
9161 else
9162
9163 rm -rf conftest.a conftest.d
9164 touch conftest.a
9165 # Assume that if we have lstat, we can also check symlinks.
9166 if test $ac_cv_func_lstat = yes; then
9167 ln -s conftest.a conftest.l
9168 fi
9169 mkdir conftest.d
9170 if test "$cross_compiling" = yes; then :
9171 case "$host_os" in
9172 # Guess yes on glibc systems.
9173 *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
9174 # Guess 'nearly' on musl systems.
9175 *-musl*) gl_cv_func_realpath_works="guessing nearly" ;;
9176 # Guess no on Cygwin.
9177 cygwin*) gl_cv_func_realpath_works="guessing no" ;;
9178 # Guess no on native Windows.
9179 mingw*) gl_cv_func_realpath_works="guessing no" ;;
9180 # If we don't know, obey --enable-cross-guesses.
9181 *) gl_cv_func_realpath_works="$gl_cross_guess_normal" ;;
9182 esac
9183
9184 else
9185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9186 /* end confdefs.h. */
9187
9188
9189
9190 #include <stdlib.h>
9191 #if defined __MACH__ && defined __APPLE__
9192 /* Avoid a crash on Mac OS X. */
9193 #include <mach/mach.h>
9194 #include <mach/mach_error.h>
9195 #include <mach/thread_status.h>
9196 #include <mach/exception.h>
9197 #include <mach/task.h>
9198 #include <pthread.h>
9199 /* The exception port on which our thread listens. */
9200 static mach_port_t our_exception_port;
9201 /* The main function of the thread listening for exceptions of type
9202 EXC_BAD_ACCESS. */
9203 static void *
9204 mach_exception_thread (void *arg)
9205 {
9206 /* Buffer for a message to be received. */
9207 struct {
9208 mach_msg_header_t head;
9209 mach_msg_body_t msgh_body;
9210 char data[1024];
9211 } msg;
9212 mach_msg_return_t retval;
9213 /* Wait for a message on the exception port. */
9214 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
9215 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
9216 if (retval != MACH_MSG_SUCCESS)
9217 abort ();
9218 exit (1);
9219 }
9220 static void
9221 nocrash_init (void)
9222 {
9223 mach_port_t self = mach_task_self ();
9224 /* Allocate a port on which the thread shall listen for exceptions. */
9225 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
9226 == KERN_SUCCESS) {
9227 /* See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
9228 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
9229 MACH_MSG_TYPE_MAKE_SEND)
9230 == KERN_SUCCESS) {
9231 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
9232 for us. */
9233 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
9234 /* Create the thread listening on the exception port. */
9235 pthread_attr_t attr;
9236 pthread_t thread;
9237 if (pthread_attr_init (&attr) == 0
9238 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
9239 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
9240 pthread_attr_destroy (&attr);
9241 /* Replace the exception port info for these exceptions with our own.
9242 Note that we replace the exception port for the entire task, not only
9243 for a particular thread. This has the effect that when our exception
9244 port gets the message, the thread specific exception port has already
9245 been asked, and we don't need to bother about it.
9246 See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
9247 task_set_exception_ports (self, mask, our_exception_port,
9248 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
9249 }
9250 }
9251 }
9252 }
9253 #elif defined _WIN32 && ! defined __CYGWIN__
9254 /* Avoid a crash on native Windows. */
9255 #define WIN32_LEAN_AND_MEAN
9256 #include <windows.h>
9257 #include <winerror.h>
9258 static LONG WINAPI
9259 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
9260 {
9261 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
9262 {
9263 case EXCEPTION_ACCESS_VIOLATION:
9264 case EXCEPTION_IN_PAGE_ERROR:
9265 case EXCEPTION_STACK_OVERFLOW:
9266 case EXCEPTION_GUARD_PAGE:
9267 case EXCEPTION_PRIV_INSTRUCTION:
9268 case EXCEPTION_ILLEGAL_INSTRUCTION:
9269 case EXCEPTION_DATATYPE_MISALIGNMENT:
9270 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
9271 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
9272 exit (1);
9273 }
9274 return EXCEPTION_CONTINUE_SEARCH;
9275 }
9276 static void
9277 nocrash_init (void)
9278 {
9279 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
9280 }
9281 #else
9282 /* Avoid a crash on POSIX systems. */
9283 #include <signal.h>
9284 #include <unistd.h>
9285 /* A POSIX signal handler. */
9286 static void
9287 exception_handler (int sig)
9288 {
9289 _exit (1);
9290 }
9291 static void
9292 nocrash_init (void)
9293 {
9294 #ifdef SIGSEGV
9295 signal (SIGSEGV, exception_handler);
9296 #endif
9297 #ifdef SIGBUS
9298 signal (SIGBUS, exception_handler);
9299 #endif
9300 }
9301 #endif
9302
9303 #include <errno.h>
9304 #include <stdlib.h>
9305 #include <string.h>
9306
9307 int
9308 main ()
9309 {
9310
9311 int result = 0;
9312 /* This test fails on Solaris 10. */
9313 {
9314 char *name = realpath ("conftest.a", NULL);
9315 if (!(name && *name == '/'))
9316 result |= 1;
9317 free (name);
9318 }
9319 /* This test fails on older versions of Cygwin. */
9320 {
9321 char *name = realpath ("conftest.b/../conftest.a", NULL);
9322 if (name != NULL)
9323 result |= 2;
9324 free (name);
9325 }
9326 /* This test fails on Cygwin 2.9. */
9327 #if HAVE_LSTAT
9328 {
9329 char *name = realpath ("conftest.l/../conftest.a", NULL);
9330 if (name != NULL || errno != ENOTDIR)
9331 result |= 4;
9332 free (name);
9333 }
9334 #endif
9335 /* This test fails on Mac OS X 10.13, OpenBSD 6.0. */
9336 {
9337 char *name = realpath ("conftest.a/", NULL);
9338 if (name != NULL)
9339 result |= 8;
9340 free (name);
9341 }
9342 /* This test fails on AIX 7, Solaris 10. */
9343 {
9344 char *name1 = realpath (".", NULL);
9345 char *name2 = realpath ("conftest.d//./..", NULL);
9346 if (! name1 || ! name2 || strcmp (name1, name2))
9347 result |= 16;
9348 free (name1);
9349 free (name2);
9350 }
9351 #ifdef __linux__
9352 /* On Linux, // is the same as /. See also double-slash-root.m4.
9353 realpath() should respect this.
9354 This test fails on musl libc 1.2.2. */
9355 {
9356 char *name = realpath ("//", NULL);
9357 if (! name || strcmp (name, "/"))
9358 result |= 32;
9359 free (name);
9360 }
9361 #endif
9362 return result;
9363
9364 ;
9365 return 0;
9366 }
9367
9368 _ACEOF
9369 if ac_fn_c_try_run "$LINENO"; then :
9370 gl_cv_func_realpath_works=yes
9371 else
9372 case $? in
9373 32) gl_cv_func_realpath_works=nearly ;;
9374 *) gl_cv_func_realpath_works=no ;;
9375 esac
9376
9377 fi
9378 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9379 conftest.$ac_objext conftest.beam conftest.$ac_ext
9380 fi
9381
9382 rm -rf conftest.a conftest.l conftest.d
9383
9384 fi
9385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
9386 $as_echo "$gl_cv_func_realpath_works" >&6; }
9387 case "$gl_cv_func_realpath_works" in
9388 *yes)
9389
9390 $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
9391
9392 ;;
9393 *nearly)
9394
9395 $as_echo "#define FUNC_REALPATH_NEARLY_WORKS 1" >>confdefs.h
9396
9397 ;;
9398 esac
9399
9400
9401
9402
9403
9404
9405
9406
9407
9408 case "$host_os" in
9409 mingw*) ;;
9410 *) for ac_func in getcwd
9411 do :
9412 ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
9413 if test "x$ac_cv_func_getcwd" = xyes; then :
9414 cat >>confdefs.h <<_ACEOF
9415 #define HAVE_GETCWD 1
9416 _ACEOF
9417
9418 fi
9419 done
9420 ;;
9421 esac
9422
9423
9424
9425
9426
9427
9428
9429 GL_GNULIB_ACCESS=0
9430
9431
9432
9433 GL_GNULIB_CHDIR=0
9434
9435
9436
9437 GL_GNULIB_CHOWN=0
9438
9439
9440
9441 GL_GNULIB_CLOSE=0
9442
9443
9444
9445 GL_GNULIB_COPY_FILE_RANGE=0
9446
9447
9448
9449 GL_GNULIB_DUP=0
9450
9451
9452
9453 GL_GNULIB_DUP2=0
9454
9455
9456
9457 GL_GNULIB_DUP3=0
9458
9459
9460
9461 GL_GNULIB_ENVIRON=0
9462
9463
9464
9465 GL_GNULIB_EUIDACCESS=0
9466
9467
9468
9469 GL_GNULIB_EXECL=0
9470
9471
9472
9473 GL_GNULIB_EXECLE=0
9474
9475
9476
9477 GL_GNULIB_EXECLP=0
9478
9479
9480
9481 GL_GNULIB_EXECV=0
9482
9483
9484
9485 GL_GNULIB_EXECVE=0
9486
9487
9488
9489 GL_GNULIB_EXECVP=0
9490
9491
9492
9493 GL_GNULIB_EXECVPE=0
9494
9495
9496
9497 GL_GNULIB_FACCESSAT=0
9498
9499
9500
9501 GL_GNULIB_FCHDIR=0
9502
9503
9504
9505 GL_GNULIB_FCHOWNAT=0
9506
9507
9508
9509 GL_GNULIB_FDATASYNC=0
9510
9511
9512
9513 GL_GNULIB_FSYNC=0
9514
9515
9516
9517 GL_GNULIB_FTRUNCATE=0
9518
9519
9520
9521 GL_GNULIB_GETCWD=0
9522
9523
9524
9525 GL_GNULIB_GETDOMAINNAME=0
9526
9527
9528
9529 GL_GNULIB_GETDTABLESIZE=0
9530
9531
9532
9533 GL_GNULIB_GETENTROPY=0
9534
9535
9536
9537 GL_GNULIB_GETGROUPS=0
9538
9539
9540
9541 GL_GNULIB_GETHOSTNAME=0
9542
9543
9544
9545 GL_GNULIB_GETLOGIN=0
9546
9547
9548
9549 GL_GNULIB_GETLOGIN_R=0
9550
9551
9552
9553 GL_GNULIB_GETOPT_POSIX=0
9554
9555
9556
9557 GL_GNULIB_GETPAGESIZE=0
9558
9559
9560
9561 GL_GNULIB_GETPASS=0
9562
9563
9564
9565 GL_GNULIB_GETPASS_GNU=0
9566
9567
9568
9569 GL_GNULIB_GETUSERSHELL=0
9570
9571
9572
9573 GL_GNULIB_GROUP_MEMBER=0
9574
9575
9576
9577 GL_GNULIB_ISATTY=0
9578
9579
9580
9581 GL_GNULIB_LCHOWN=0
9582
9583
9584
9585 GL_GNULIB_LINK=0
9586
9587
9588
9589 GL_GNULIB_LINKAT=0
9590
9591
9592
9593 GL_GNULIB_LSEEK=0
9594
9595
9596
9597 GL_GNULIB_PIPE=0
9598
9599
9600
9601 GL_GNULIB_PIPE2=0
9602
9603
9604
9605 GL_GNULIB_PREAD=0
9606
9607
9608
9609 GL_GNULIB_PWRITE=0
9610
9611
9612
9613 GL_GNULIB_READ=0
9614
9615
9616
9617 GL_GNULIB_READLINK=0
9618
9619
9620
9621 GL_GNULIB_READLINKAT=0
9622
9623
9624
9625 GL_GNULIB_RMDIR=0
9626
9627
9628
9629 GL_GNULIB_SETHOSTNAME=0
9630
9631
9632
9633 GL_GNULIB_SLEEP=0
9634
9635
9636
9637 GL_GNULIB_SYMLINK=0
9638
9639
9640
9641 GL_GNULIB_SYMLINKAT=0
9642
9643
9644
9645 GL_GNULIB_TRUNCATE=0
9646
9647
9648
9649 GL_GNULIB_TTYNAME_R=0
9650
9651
9652
9653 GL_GNULIB_UNISTD_H_GETOPT=0
9654
9655
9656
9657 GL_GNULIB_UNISTD_H_NONBLOCKING=0
9658
9659
9660
9661 GL_GNULIB_UNISTD_H_SIGPIPE=0
9662
9663
9664
9665 GL_GNULIB_UNLINK=0
9666
9667
9668
9669 GL_GNULIB_UNLINKAT=0
9670
9671
9672
9673 GL_GNULIB_USLEEP=0
9674
9675
9676
9677 GL_GNULIB_WRITE=0
9678
9679
9680
9681 GL_GNULIB_MDA_ACCESS=1
9682
9683
9684
9685 GL_GNULIB_MDA_CHDIR=1
9686
9687
9688
9689 GL_GNULIB_MDA_CLOSE=1
9690
9691
9692
9693 GL_GNULIB_MDA_DUP=1
9694
9695
9696
9697 GL_GNULIB_MDA_DUP2=1
9698
9699
9700
9701 GL_GNULIB_MDA_EXECL=1
9702
9703
9704
9705 GL_GNULIB_MDA_EXECLE=1
9706
9707
9708
9709 GL_GNULIB_MDA_EXECLP=1
9710
9711
9712
9713 GL_GNULIB_MDA_EXECV=1
9714
9715
9716
9717 GL_GNULIB_MDA_EXECVE=1
9718
9719
9720
9721 GL_GNULIB_MDA_EXECVP=1
9722
9723
9724
9725 GL_GNULIB_MDA_EXECVPE=1
9726
9727
9728
9729 GL_GNULIB_MDA_GETCWD=1
9730
9731
9732
9733 GL_GNULIB_MDA_GETPID=1
9734
9735
9736
9737 GL_GNULIB_MDA_ISATTY=1
9738
9739
9740
9741 GL_GNULIB_MDA_LSEEK=1
9742
9743
9744
9745 GL_GNULIB_MDA_READ=1
9746
9747
9748
9749 GL_GNULIB_MDA_RMDIR=1
9750
9751
9752
9753 GL_GNULIB_MDA_SWAB=1
9754
9755
9756
9757 GL_GNULIB_MDA_UNLINK=1
9758
9759
9760
9761 GL_GNULIB_MDA_WRITE=1
9762
9763
9764
9765
9766
9767
9768
9769
9770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
9771 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
9772 if ${ac_cv_type_uid_t+:} false; then :
9773 $as_echo_n "(cached) " >&6
9774 else
9775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9776 /* end confdefs.h. */
9777 #include <sys/types.h>
9778
9779 _ACEOF
9780 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9781 $EGREP "uid_t" >/dev/null 2>&1; then :
9782 ac_cv_type_uid_t=yes
9783 else
9784 ac_cv_type_uid_t=no
9785 fi
9786 rm -f conftest*
9787
9788 fi
9789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
9790 $as_echo "$ac_cv_type_uid_t" >&6; }
9791 if test $ac_cv_type_uid_t = no; then
9792
9793 $as_echo "#define uid_t int" >>confdefs.h
9794
9795
9796 $as_echo "#define gid_t int" >>confdefs.h
9797
9798 fi
9799
9800 gl_mda_defines='
9801 #if defined _WIN32 && !defined __CYGWIN__
9802 #define access _access
9803 #define chdir _chdir
9804 #define chmod _chmod
9805 #define close _close
9806 #define creat _creat
9807 #define dup _dup
9808 #define dup2 _dup2
9809 #define ecvt _ecvt
9810 #define execl _execl
9811 #define execle _execle
9812 #define execlp _execlp
9813 #define execv _execv
9814 #define execve _execve
9815 #define execvp _execvp
9816 #define execvpe _execvpe
9817 #define fcloseall _fcloseall
9818 #define fcvt _fcvt
9819 #define fdopen _fdopen
9820 #define fileno _fileno
9821 #define gcvt _gcvt
9822 #define getcwd _getcwd
9823 #define getpid _getpid
9824 #define getw _getw
9825 #define isatty _isatty
9826 #define j0 _j0
9827 #define j1 _j1
9828 #define jn _jn
9829 #define lfind _lfind
9830 #define lsearch _lsearch
9831 #define lseek _lseek
9832 #define memccpy _memccpy
9833 #define mkdir _mkdir
9834 #define mktemp _mktemp
9835 #define open _open
9836 #define putenv _putenv
9837 #define putw _putw
9838 #define read _read
9839 #define rmdir _rmdir
9840 #define strdup _strdup
9841 #define swab _swab
9842 #define tempnam _tempnam
9843 #define tzset _tzset
9844 #define umask _umask
9845 #define unlink _unlink
9846 #define utime _utime
9847 #define wcsdup _wcsdup
9848 #define write _write
9849 #define y0 _y0
9850 #define y1 _y1
9851 #define yn _yn
9852 #endif
9853 '
9854
9855
9856 for ac_header in unistd.h
9857 do :
9858 ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
9859 if test "x$ac_cv_header_unistd_h" = xyes; then :
9860 cat >>confdefs.h <<_ACEOF
9861 #define HAVE_UNISTD_H 1
9862 _ACEOF
9863
9864 fi
9865
9866 done
9867
9868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5
9869 $as_echo_n "checking for working chown... " >&6; }
9870 if ${ac_cv_func_chown_works+:} false; then :
9871 $as_echo_n "(cached) " >&6
9872 else
9873 if test "$cross_compiling" = yes; then :
9874 case "$host_os" in # ((
9875 # Guess yes on Linux systems.
9876 linux-* | linux) ac_cv_func_chown_works="guessing yes" ;;
9877 # Guess yes on glibc systems.
9878 *-gnu* | gnu*) ac_cv_func_chown_works="guessing yes" ;;
9879 # Guess no on native Windows.
9880 mingw*) ac_cv_func_chown_works="guessing no" ;;
9881 # If we don't know, obey --enable-cross-guesses.
9882 *) ac_cv_func_chown_works="$gl_cross_guess_normal" ;;
9883 esac
9884
9885 else
9886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9887 /* end confdefs.h. */
9888 $ac_includes_default
9889 #include <fcntl.h>
9890
9891
9892 $gl_mda_defines
9893
9894 int
9895 main ()
9896 {
9897
9898 char *f = "conftest.chown";
9899 struct stat before, after;
9900
9901 if (creat (f, 0600) < 0)
9902 return 1;
9903 if (stat (f, &before) < 0)
9904 return 1;
9905 if (chown (f, (uid_t) -1, (gid_t) -1) == -1)
9906 return 1;
9907 if (stat (f, &after) < 0)
9908 return 1;
9909 return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid);
9910
9911 ;
9912 return 0;
9913 }
9914
9915 _ACEOF
9916 if ac_fn_c_try_run "$LINENO"; then :
9917 ac_cv_func_chown_works=yes
9918 else
9919 ac_cv_func_chown_works=no
9920 fi
9921 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9922 conftest.$ac_objext conftest.beam conftest.$ac_ext
9923 fi
9924
9925 rm -f conftest.chown
9926
9927 fi
9928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5
9929 $as_echo "$ac_cv_func_chown_works" >&6; }
9930 case "$ac_cv_func_chown_works" in
9931 *yes)
9932
9933 $as_echo "#define HAVE_CHOWN 1" >>confdefs.h
9934
9935 ;;
9936 esac
9937
9938
9939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown dereferences symlinks" >&5
9940 $as_echo_n "checking whether chown dereferences symlinks... " >&6; }
9941 if ${gl_cv_func_chown_follows_symlink+:} false; then :
9942 $as_echo_n "(cached) " >&6
9943 else
9944
9945 if test "$cross_compiling" = yes; then :
9946 gl_cv_func_chown_follows_symlink="guessing yes"
9947
9948 else
9949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9950 /* end confdefs.h. */
9951
9952 #include <unistd.h>
9953 #include <stdlib.h>
9954 #include <errno.h>
9955
9956
9957 $gl_mda_defines
9958
9959 int
9960 main ()
9961 {
9962 int result = 0;
9963 char const *dangling_symlink = "conftest.dangle";
9964
9965 unlink (dangling_symlink);
9966 if (symlink ("conftest.no-such", dangling_symlink))
9967 abort ();
9968
9969 /* Exit successfully on a conforming system,
9970 i.e., where chown must fail with ENOENT. */
9971 if (chown (dangling_symlink, getuid (), getgid ()) == 0)
9972 result |= 1;
9973 if (errno != ENOENT)
9974 result |= 2;
9975 return result;
9976 }
9977
9978 _ACEOF
9979 if ac_fn_c_try_run "$LINENO"; then :
9980 gl_cv_func_chown_follows_symlink=yes
9981 else
9982 gl_cv_func_chown_follows_symlink=no
9983 fi
9984 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9985 conftest.$ac_objext conftest.beam conftest.$ac_ext
9986 fi
9987
9988
9989
9990 fi
9991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_follows_symlink" >&5
9992 $as_echo "$gl_cv_func_chown_follows_symlink" >&6; }
9993
9994 case "$gl_cv_func_chown_follows_symlink" in
9995 *yes) ;;
9996 *)
9997
9998 $as_echo "#define CHOWN_MODIFIES_SYMLINK 1" >>confdefs.h
9999
10000 ;;
10001 esac
10002
10003
10004
10005
10006
10007
10008
10009
10010
10011
10012
10013
10014 if test $ac_cv_func_chown = no; then
10015 HAVE_CHOWN=0
10016 else
10017 case "$gl_cv_func_chown_follows_symlink" in
10018 *yes) ;;
10019 *) REPLACE_CHOWN=1 ;;
10020 esac
10021
10022 case "$ac_cv_func_chown_works" in
10023 *no)
10024
10025 $as_echo "#define CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE 1" >>confdefs.h
10026
10027 REPLACE_CHOWN=1
10028 ;;
10029 esac
10030
10031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown honors trailing slash" >&5
10032 $as_echo_n "checking whether chown honors trailing slash... " >&6; }
10033 if ${gl_cv_func_chown_slash_works+:} false; then :
10034 $as_echo_n "(cached) " >&6
10035 else
10036 touch conftest.file && rm -f conftest.link
10037 if test "$cross_compiling" = yes; then :
10038 case "$host_os" in
10039 # Guess yes on glibc systems.
10040 *-gnu*) gl_cv_func_chown_slash_works="guessing yes" ;;
10041 # Guess yes on musl systems.
10042 *-musl*) gl_cv_func_chown_slash_works="guessing yes" ;;
10043 # If we don't know, obey --enable-cross-guesses.
10044 *) gl_cv_func_chown_slash_works="$gl_cross_guess_normal" ;;
10045 esac
10046
10047 else
10048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10049 /* end confdefs.h. */
10050
10051 #include <unistd.h>
10052 #include <stdlib.h>
10053 #include <errno.h>
10054
10055
10056 $gl_mda_defines
10057
10058 int
10059 main ()
10060 {
10061 if (symlink ("conftest.file", "conftest.link")) return 1;
10062 if (chown ("conftest.link/", getuid (), getgid ()) == 0) return 2;
10063
10064 ;
10065 return 0;
10066 }
10067 _ACEOF
10068 if ac_fn_c_try_run "$LINENO"; then :
10069 gl_cv_func_chown_slash_works=yes
10070 else
10071 gl_cv_func_chown_slash_works=no
10072 fi
10073 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10074 conftest.$ac_objext conftest.beam conftest.$ac_ext
10075 fi
10076
10077 rm -f conftest.link conftest.file
10078 fi
10079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_slash_works" >&5
10080 $as_echo "$gl_cv_func_chown_slash_works" >&6; }
10081 case "$gl_cv_func_chown_slash_works" in
10082 *yes) ;;
10083 *)
10084
10085 $as_echo "#define CHOWN_TRAILING_SLASH_BUG 1" >>confdefs.h
10086
10087 REPLACE_CHOWN=1
10088 ;;
10089 esac
10090
10091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown always updates ctime" >&5
10092 $as_echo_n "checking whether chown always updates ctime... " >&6; }
10093 if ${gl_cv_func_chown_ctime_works+:} false; then :
10094 $as_echo_n "(cached) " >&6
10095 else
10096 if test "$cross_compiling" = yes; then :
10097 case "$host_os" in
10098 # Guess yes on glibc systems.
10099 *-gnu*) gl_cv_func_chown_ctime_works="guessing yes" ;;
10100 # Guess yes on musl systems.
10101 *-musl*) gl_cv_func_chown_ctime_works="guessing yes" ;;
10102 # If we don't know, obey --enable-cross-guesses.
10103 *) gl_cv_func_chown_ctime_works="$gl_cross_guess_normal" ;;
10104 esac
10105
10106 else
10107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10108 /* end confdefs.h. */
10109
10110 #include <unistd.h>
10111 #include <stdlib.h>
10112 #include <errno.h>
10113 #include <fcntl.h>
10114 #include <sys/stat.h>
10115
10116
10117 $gl_mda_defines
10118
10119 int
10120 main ()
10121 {
10122 struct stat st1, st2;
10123 if (close (creat ("conftest.file", 0600))) return 1;
10124 if (stat ("conftest.file", &st1)) return 2;
10125 sleep (1);
10126 if (chown ("conftest.file", st1.st_uid, st1.st_gid)) return 3;
10127 if (stat ("conftest.file", &st2)) return 4;
10128 if (st2.st_ctime <= st1.st_ctime) return 5;
10129
10130 ;
10131 return 0;
10132 }
10133 _ACEOF
10134 if ac_fn_c_try_run "$LINENO"; then :
10135 gl_cv_func_chown_ctime_works=yes
10136 else
10137 gl_cv_func_chown_ctime_works=no
10138 fi
10139 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10140 conftest.$ac_objext conftest.beam conftest.$ac_ext
10141 fi
10142
10143 rm -f conftest.file
10144 fi
10145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_ctime_works" >&5
10146 $as_echo "$gl_cv_func_chown_ctime_works" >&6; }
10147 case "$gl_cv_func_chown_ctime_works" in
10148 *yes) ;;
10149 *)
10150
10151 $as_echo "#define CHOWN_CHANGE_TIME_BUG 1" >>confdefs.h
10152
10153 REPLACE_CHOWN=1
10154 ;;
10155 esac
10156 fi
10157
10158
10159
10160
10161
10162 if test $ac_cv_func__set_invalid_parameter_handler = yes; then
10163 HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
10164
10165 $as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
10166
10167 else
10168 HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
10169 fi
10170
10171
10172
10173
10174
10175 HAVE_OPENDIR=1;
10176 HAVE_READDIR=1;
10177 HAVE_REWINDDIR=1;
10178 HAVE_CLOSEDIR=1;
10179 HAVE_DECL_DIRFD=1;
10180 HAVE_DECL_FDOPENDIR=1;
10181 HAVE_FDOPENDIR=1;
10182 HAVE_SCANDIR=1;
10183 HAVE_ALPHASORT=1;
10184 REPLACE_OPENDIR=0;
10185 REPLACE_CLOSEDIR=0;
10186 REPLACE_DIRFD=0;
10187 REPLACE_FDOPENDIR=0;
10188
10189
10190
10191
10192
10193
10194
10195 GL_GNULIB_OPENDIR=0
10196
10197
10198
10199 GL_GNULIB_READDIR=0
10200
10201
10202
10203 GL_GNULIB_REWINDDIR=0
10204
10205
10206
10207 GL_GNULIB_CLOSEDIR=0
10208
10209
10210
10211 GL_GNULIB_DIRFD=0
10212
10213
10214
10215 GL_GNULIB_FDOPENDIR=0
10216
10217
10218
10219 GL_GNULIB_SCANDIR=0
10220
10221
10222
10223 GL_GNULIB_ALPHASORT=0
10224
10225
10226
10227
10228 HAVE_ISBLANK=1;
10229
10230
10231
10232
10233
10234
10235
10236
10237
10238
10239
10240
10241 if test $gl_cv_have_include_next = yes; then
10242 gl_cv_next_ctype_h='<'ctype.h'>'
10243 else
10244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <ctype.h>" >&5
10245 $as_echo_n "checking absolute name of <ctype.h>... " >&6; }
10246 if ${gl_cv_next_ctype_h+:} false; then :
10247 $as_echo_n "(cached) " >&6
10248 else
10249
10250
10251
10252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10253 /* end confdefs.h. */
10254 #include <ctype.h>
10255 _ACEOF
10256 case "$host_os" in
10257 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10258 *) gl_absname_cpp="$ac_cpp" ;;
10259 esac
10260
10261 case "$host_os" in
10262 mingw*)
10263 gl_dirsep_regex='[/\\]'
10264 ;;
10265 *)
10266 gl_dirsep_regex='\/'
10267 ;;
10268 esac
10269 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10270 gl_header_literal_regex=`echo 'ctype.h' \
10271 | sed -e "$gl_make_literal_regex_sed"`
10272 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10273 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10274 s|^/[^/]|//&|
10275 p
10276 q
10277 }'
10278
10279 gl_cv_absolute_ctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10280 sed -n "$gl_absolute_header_sed"`
10281
10282 gl_header=$gl_cv_absolute_ctype_h
10283 gl_cv_next_ctype_h='"'$gl_header'"'
10284
10285
10286 fi
10287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_ctype_h" >&5
10288 $as_echo "$gl_cv_next_ctype_h" >&6; }
10289 fi
10290 NEXT_CTYPE_H=$gl_cv_next_ctype_h
10291
10292 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10293 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10294 gl_next_as_first_directive='<'ctype.h'>'
10295 else
10296 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10297 gl_next_as_first_directive=$gl_cv_next_ctype_h
10298 fi
10299 NEXT_AS_FIRST_DIRECTIVE_CTYPE_H=$gl_next_as_first_directive
10300
10301
10302
10303
10304
10305
10306
10307
10308
10309
10310
10311 GL_GNULIB_ISBLANK=0
10312
10313
10314
10315
10316
10317
10318
10319
10320
10321
10322
10323
10324
10325
10326
10327
10328
10329 if test $gl_cv_have_include_next = yes; then
10330 gl_cv_next_dirent_h='<'dirent.h'>'
10331 else
10332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
10333 $as_echo_n "checking absolute name of <dirent.h>... " >&6; }
10334 if ${gl_cv_next_dirent_h+:} false; then :
10335 $as_echo_n "(cached) " >&6
10336 else
10337
10338 if test $ac_cv_header_dirent_h = yes; then
10339
10340
10341
10342
10343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10344 /* end confdefs.h. */
10345 #include <dirent.h>
10346 _ACEOF
10347 case "$host_os" in
10348 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10349 *) gl_absname_cpp="$ac_cpp" ;;
10350 esac
10351
10352 case "$host_os" in
10353 mingw*)
10354 gl_dirsep_regex='[/\\]'
10355 ;;
10356 *)
10357 gl_dirsep_regex='\/'
10358 ;;
10359 esac
10360 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10361 gl_header_literal_regex=`echo 'dirent.h' \
10362 | sed -e "$gl_make_literal_regex_sed"`
10363 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10364 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10365 s|^/[^/]|//&|
10366 p
10367 q
10368 }'
10369
10370 gl_cv_absolute_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10371 sed -n "$gl_absolute_header_sed"`
10372
10373 gl_header=$gl_cv_absolute_dirent_h
10374 gl_cv_next_dirent_h='"'$gl_header'"'
10375 else
10376 gl_cv_next_dirent_h='<'dirent.h'>'
10377 fi
10378
10379
10380 fi
10381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
10382 $as_echo "$gl_cv_next_dirent_h" >&6; }
10383 fi
10384 NEXT_DIRENT_H=$gl_cv_next_dirent_h
10385
10386 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10387 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10388 gl_next_as_first_directive='<'dirent.h'>'
10389 else
10390 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10391 gl_next_as_first_directive=$gl_cv_next_dirent_h
10392 fi
10393 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
10394
10395
10396
10397
10398 if test $ac_cv_header_dirent_h = yes; then
10399 HAVE_DIRENT_H=1
10400 else
10401 HAVE_DIRENT_H=0
10402 fi
10403
10404
10405
10406
10407
10408
10409
10410
10411
10412
10413
10414
10415
10416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
10417 $as_echo_n "checking if environ is properly declared... " >&6; }
10418 if ${gt_cv_var_environ_declaration+:} false; then :
10419 $as_echo_n "(cached) " >&6
10420 else
10421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10422 /* end confdefs.h. */
10423 #if HAVE_UNISTD_H
10424 #include <unistd.h>
10425 #endif
10426 /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
10427 #include <stdlib.h>
10428
10429 typedef struct { int foo; } foo_t;
10430 extern foo_t environ;
10431 int
10432 main ()
10433 {
10434 environ.foo = 1;
10435 ;
10436 return 0;
10437 }
10438 _ACEOF
10439 if ac_fn_c_try_compile "$LINENO"; then :
10440 gt_cv_var_environ_declaration=no
10441 else
10442 gt_cv_var_environ_declaration=yes
10443 fi
10444 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10445 fi
10446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
10447 $as_echo "$gt_cv_var_environ_declaration" >&6; }
10448 if test $gt_cv_var_environ_declaration = yes; then
10449
10450 $as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
10451
10452 fi
10453
10454
10455 if test $gt_cv_var_environ_declaration != yes; then
10456 HAVE_DECL_ENVIRON=0
10457 fi
10458
10459
10460
10461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
10462 $as_echo_n "checking for complete errno.h... " >&6; }
10463 if ${gl_cv_header_errno_h_complete+:} false; then :
10464 $as_echo_n "(cached) " >&6
10465 else
10466
10467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10468 /* end confdefs.h. */
10469
10470 #include <errno.h>
10471 #if !defined ETXTBSY
10472 booboo
10473 #endif
10474 #if !defined ENOMSG
10475 booboo
10476 #endif
10477 #if !defined EIDRM
10478 booboo
10479 #endif
10480 #if !defined ENOLINK
10481 booboo
10482 #endif
10483 #if !defined EPROTO
10484 booboo
10485 #endif
10486 #if !defined EMULTIHOP
10487 booboo
10488 #endif
10489 #if !defined EBADMSG
10490 booboo
10491 #endif
10492 #if !defined EOVERFLOW
10493 booboo
10494 #endif
10495 #if !defined ENOTSUP
10496 booboo
10497 #endif
10498 #if !defined ENETRESET
10499 booboo
10500 #endif
10501 #if !defined ECONNABORTED
10502 booboo
10503 #endif
10504 #if !defined ESTALE
10505 booboo
10506 #endif
10507 #if !defined EDQUOT
10508 booboo
10509 #endif
10510 #if !defined ECANCELED
10511 booboo
10512 #endif
10513 #if !defined EOWNERDEAD
10514 booboo
10515 #endif
10516 #if !defined ENOTRECOVERABLE
10517 booboo
10518 #endif
10519 #if !defined EILSEQ
10520 booboo
10521 #endif
10522
10523 _ACEOF
10524 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10525 $EGREP "booboo" >/dev/null 2>&1; then :
10526 gl_cv_header_errno_h_complete=no
10527 else
10528 gl_cv_header_errno_h_complete=yes
10529 fi
10530 rm -f conftest*
10531
10532
10533 fi
10534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
10535 $as_echo "$gl_cv_header_errno_h_complete" >&6; }
10536 if test $gl_cv_header_errno_h_complete = yes; then
10537 GL_GENERATE_ERRNO_H=false
10538 else
10539
10540
10541
10542
10543
10544
10545
10546
10547 if test $gl_cv_have_include_next = yes; then
10548 gl_cv_next_errno_h='<'errno.h'>'
10549 else
10550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
10551 $as_echo_n "checking absolute name of <errno.h>... " >&6; }
10552 if ${gl_cv_next_errno_h+:} false; then :
10553 $as_echo_n "(cached) " >&6
10554 else
10555
10556
10557
10558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10559 /* end confdefs.h. */
10560 #include <errno.h>
10561 _ACEOF
10562 case "$host_os" in
10563 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10564 *) gl_absname_cpp="$ac_cpp" ;;
10565 esac
10566
10567 case "$host_os" in
10568 mingw*)
10569 gl_dirsep_regex='[/\\]'
10570 ;;
10571 *)
10572 gl_dirsep_regex='\/'
10573 ;;
10574 esac
10575 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10576 gl_header_literal_regex=`echo 'errno.h' \
10577 | sed -e "$gl_make_literal_regex_sed"`
10578 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10579 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10580 s|^/[^/]|//&|
10581 p
10582 q
10583 }'
10584
10585 gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10586 sed -n "$gl_absolute_header_sed"`
10587
10588 gl_header=$gl_cv_absolute_errno_h
10589 gl_cv_next_errno_h='"'$gl_header'"'
10590
10591
10592 fi
10593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
10594 $as_echo "$gl_cv_next_errno_h" >&6; }
10595 fi
10596 NEXT_ERRNO_H=$gl_cv_next_errno_h
10597
10598 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10599 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10600 gl_next_as_first_directive='<'errno.h'>'
10601 else
10602 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10603 gl_next_as_first_directive=$gl_cv_next_errno_h
10604 fi
10605 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
10606
10607
10608
10609
10610 GL_GENERATE_ERRNO_H=true
10611 fi
10612
10613 if $GL_GENERATE_ERRNO_H; then
10614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
10615 $as_echo_n "checking for EMULTIHOP value... " >&6; }
10616 if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then :
10617 $as_echo_n "(cached) " >&6
10618 else
10619
10620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10621 /* end confdefs.h. */
10622
10623 #include <errno.h>
10624 #ifdef EMULTIHOP
10625 yes
10626 #endif
10627
10628 _ACEOF
10629 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10630 $EGREP "yes" >/dev/null 2>&1; then :
10631 gl_cv_header_errno_h_EMULTIHOP=yes
10632 else
10633 gl_cv_header_errno_h_EMULTIHOP=no
10634 fi
10635 rm -f conftest*
10636
10637 if test $gl_cv_header_errno_h_EMULTIHOP = no; then
10638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10639 /* end confdefs.h. */
10640
10641 #define _XOPEN_SOURCE_EXTENDED 1
10642 #include <errno.h>
10643 #ifdef EMULTIHOP
10644 yes
10645 #endif
10646
10647 _ACEOF
10648 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10649 $EGREP "yes" >/dev/null 2>&1; then :
10650 gl_cv_header_errno_h_EMULTIHOP=hidden
10651 fi
10652 rm -f conftest*
10653
10654 if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
10655 if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
10656 #define _XOPEN_SOURCE_EXTENDED 1
10657 #include <errno.h>
10658 /* The following two lines are a workaround against an autoconf-2.52 bug. */
10659 #include <stdio.h>
10660 #include <stdlib.h>
10661 "; then :
10662
10663 fi
10664
10665 fi
10666 fi
10667
10668 fi
10669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
10670 $as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
10671 case $gl_cv_header_errno_h_EMULTIHOP in
10672 yes | no)
10673 EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
10674 ;;
10675 *)
10676 EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
10677 ;;
10678 esac
10679
10680
10681 fi
10682
10683
10684 if $GL_GENERATE_ERRNO_H; then
10685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
10686 $as_echo_n "checking for ENOLINK value... " >&6; }
10687 if ${gl_cv_header_errno_h_ENOLINK+:} false; then :
10688 $as_echo_n "(cached) " >&6
10689 else
10690
10691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10692 /* end confdefs.h. */
10693
10694 #include <errno.h>
10695 #ifdef ENOLINK
10696 yes
10697 #endif
10698
10699 _ACEOF
10700 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10701 $EGREP "yes" >/dev/null 2>&1; then :
10702 gl_cv_header_errno_h_ENOLINK=yes
10703 else
10704 gl_cv_header_errno_h_ENOLINK=no
10705 fi
10706 rm -f conftest*
10707
10708 if test $gl_cv_header_errno_h_ENOLINK = no; then
10709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10710 /* end confdefs.h. */
10711
10712 #define _XOPEN_SOURCE_EXTENDED 1
10713 #include <errno.h>
10714 #ifdef ENOLINK
10715 yes
10716 #endif
10717
10718 _ACEOF
10719 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10720 $EGREP "yes" >/dev/null 2>&1; then :
10721 gl_cv_header_errno_h_ENOLINK=hidden
10722 fi
10723 rm -f conftest*
10724
10725 if test $gl_cv_header_errno_h_ENOLINK = hidden; then
10726 if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
10727 #define _XOPEN_SOURCE_EXTENDED 1
10728 #include <errno.h>
10729 /* The following two lines are a workaround against an autoconf-2.52 bug. */
10730 #include <stdio.h>
10731 #include <stdlib.h>
10732 "; then :
10733
10734 fi
10735
10736 fi
10737 fi
10738
10739 fi
10740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
10741 $as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
10742 case $gl_cv_header_errno_h_ENOLINK in
10743 yes | no)
10744 ENOLINK_HIDDEN=0; ENOLINK_VALUE=
10745 ;;
10746 *)
10747 ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
10748 ;;
10749 esac
10750
10751
10752 fi
10753
10754
10755 if $GL_GENERATE_ERRNO_H; then
10756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
10757 $as_echo_n "checking for EOVERFLOW value... " >&6; }
10758 if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then :
10759 $as_echo_n "(cached) " >&6
10760 else
10761
10762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10763 /* end confdefs.h. */
10764
10765 #include <errno.h>
10766 #ifdef EOVERFLOW
10767 yes
10768 #endif
10769
10770 _ACEOF
10771 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10772 $EGREP "yes" >/dev/null 2>&1; then :
10773 gl_cv_header_errno_h_EOVERFLOW=yes
10774 else
10775 gl_cv_header_errno_h_EOVERFLOW=no
10776 fi
10777 rm -f conftest*
10778
10779 if test $gl_cv_header_errno_h_EOVERFLOW = no; then
10780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10781 /* end confdefs.h. */
10782
10783 #define _XOPEN_SOURCE_EXTENDED 1
10784 #include <errno.h>
10785 #ifdef EOVERFLOW
10786 yes
10787 #endif
10788
10789 _ACEOF
10790 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10791 $EGREP "yes" >/dev/null 2>&1; then :
10792 gl_cv_header_errno_h_EOVERFLOW=hidden
10793 fi
10794 rm -f conftest*
10795
10796 if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
10797 if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
10798 #define _XOPEN_SOURCE_EXTENDED 1
10799 #include <errno.h>
10800 /* The following two lines are a workaround against an autoconf-2.52 bug. */
10801 #include <stdio.h>
10802 #include <stdlib.h>
10803 "; then :
10804
10805 fi
10806
10807 fi
10808 fi
10809
10810 fi
10811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
10812 $as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
10813 case $gl_cv_header_errno_h_EOVERFLOW in
10814 yes | no)
10815 EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
10816 ;;
10817 *)
10818 EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
10819 ;;
10820 esac
10821
10822
10823 fi
10824
10825
10826 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
10827 if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
10828 ac_have_decl=1
10829 else
10830 ac_have_decl=0
10831 fi
10832
10833 cat >>confdefs.h <<_ACEOF
10834 #define HAVE_DECL_STRERROR_R $ac_have_decl
10835 _ACEOF
10836
10837 for ac_func in strerror_r
10838 do :
10839 ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
10840 if test "x$ac_cv_func_strerror_r" = xyes; then :
10841 cat >>confdefs.h <<_ACEOF
10842 #define HAVE_STRERROR_R 1
10843 _ACEOF
10844
10845 fi
10846 done
10847
10848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
10849 $as_echo_n "checking whether strerror_r returns char *... " >&6; }
10850 if ${ac_cv_func_strerror_r_char_p+:} false; then :
10851 $as_echo_n "(cached) " >&6
10852 else
10853
10854 ac_cv_func_strerror_r_char_p=no
10855 if test $ac_cv_have_decl_strerror_r = yes; then
10856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10857 /* end confdefs.h. */
10858 $ac_includes_default
10859 int
10860 main ()
10861 {
10862
10863 char buf[100];
10864 char x = *strerror_r (0, buf, sizeof buf);
10865 char *p = strerror_r (0, buf, sizeof buf);
10866 return !p || x;
10867
10868 ;
10869 return 0;
10870 }
10871 _ACEOF
10872 if ac_fn_c_try_compile "$LINENO"; then :
10873 ac_cv_func_strerror_r_char_p=yes
10874 fi
10875 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10876 else
10877 # strerror_r is not declared. Choose between
10878 # systems that have relatively inaccessible declarations for the
10879 # function. BeOS and DEC UNIX 4.0 fall in this category, but the
10880 # former has a strerror_r that returns char*, while the latter
10881 # has a strerror_r that returns `int'.
10882 # This test should segfault on the DEC system.
10883 if test "$cross_compiling" = yes; then :
10884 :
10885 else
10886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10887 /* end confdefs.h. */
10888 $ac_includes_default
10889 extern char *strerror_r ();
10890 int
10891 main ()
10892 {
10893 char buf[100];
10894 char x = *strerror_r (0, buf, sizeof buf);
10895 return ! isalpha (x);
10896 ;
10897 return 0;
10898 }
10899 _ACEOF
10900 if ac_fn_c_try_run "$LINENO"; then :
10901 ac_cv_func_strerror_r_char_p=yes
10902 fi
10903 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10904 conftest.$ac_objext conftest.beam conftest.$ac_ext
10905 fi
10906
10907 fi
10908
10909 fi
10910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
10911 $as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
10912 if test $ac_cv_func_strerror_r_char_p = yes; then
10913
10914 $as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
10915
10916 fi
10917
10918
10919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ctype.h defines __header_inline" >&5
10920 $as_echo_n "checking whether ctype.h defines __header_inline... " >&6; }
10921 if ${gl_cv_have___header_inline+:} false; then :
10922 $as_echo_n "(cached) " >&6
10923 else
10924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10925 /* end confdefs.h. */
10926 #include <ctype.h>
10927 #ifndef __header_inline
10928 #error "<ctype.h> does not define __header_inline"
10929 #endif
10930
10931 _ACEOF
10932 if ac_fn_c_try_cpp "$LINENO"; then :
10933 gl_cv_have___header_inline=yes
10934 else
10935 gl_cv_have___header_inline=no
10936 fi
10937 rm -f conftest.err conftest.i conftest.$ac_ext
10938 fi
10939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have___header_inline" >&5
10940 $as_echo "$gl_cv_have___header_inline" >&6; }
10941 if test "$gl_cv_have___header_inline" = yes; then
10942
10943 $as_echo "#define HAVE___HEADER_INLINE 1" >>confdefs.h
10944
10945 fi
10946
10947
10948
10949 ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default"
10950 if test "x$ac_cv_have_decl_fchdir" = xyes; then :
10951 ac_have_decl=1
10952 else
10953 ac_have_decl=0
10954 fi
10955
10956 cat >>confdefs.h <<_ACEOF
10957 #define HAVE_DECL_FCHDIR $ac_have_decl
10958 _ACEOF
10959
10960
10961 HAVE_FCNTL=1;
10962 HAVE_OPENAT=1;
10963 REPLACE_CREAT=0;
10964 REPLACE_FCNTL=0;
10965 REPLACE_OPEN=0;
10966 REPLACE_OPENAT=0;
10967
10968
10969
10970
10971
10972 GL_GNULIB_CREAT=0
10973
10974
10975
10976 GL_GNULIB_FCNTL=0
10977
10978
10979
10980 GL_GNULIB_NONBLOCKING=0
10981
10982
10983
10984 GL_GNULIB_OPEN=0
10985
10986
10987
10988 GL_GNULIB_OPENAT=0
10989
10990
10991
10992 GL_GNULIB_MDA_CREAT=1
10993
10994
10995
10996 GL_GNULIB_MDA_OPEN=1
10997
10998
10999
11000
11001
11002
11003
11004
11005
11006
11007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
11008 $as_echo_n "checking for working fcntl.h... " >&6; }
11009 if ${gl_cv_header_working_fcntl_h+:} false; then :
11010 $as_echo_n "(cached) " >&6
11011 else
11012 if test "$cross_compiling" = yes; then :
11013 case "$host_os" in
11014 # Guess 'no' on native Windows.
11015 mingw*) gl_cv_header_working_fcntl_h='no' ;;
11016 *) gl_cv_header_working_fcntl_h=cross-compiling ;;
11017 esac
11018
11019 else
11020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11021 /* end confdefs.h. */
11022 #include <sys/types.h>
11023 #include <sys/stat.h>
11024 #if HAVE_UNISTD_H
11025 # include <unistd.h>
11026 #else /* on Windows with MSVC */
11027 # include <io.h>
11028 # include <stdlib.h>
11029 # defined sleep(n) _sleep ((n) * 1000)
11030 #endif
11031 #include <fcntl.h>
11032
11033
11034 $gl_mda_defines
11035
11036 #ifndef O_NOATIME
11037 #define O_NOATIME 0
11038 #endif
11039 #ifndef O_NOFOLLOW
11040 #define O_NOFOLLOW 0
11041 #endif
11042 static int const constants[] =
11043 {
11044 O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
11045 O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
11046 };
11047
11048 int
11049 main ()
11050 {
11051
11052 int result = !constants;
11053 #if HAVE_SYMLINK
11054 {
11055 static char const sym[] = "conftest.sym";
11056 if (symlink ("/dev/null", sym) != 0)
11057 result |= 2;
11058 else
11059 {
11060 int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
11061 if (fd >= 0)
11062 {
11063 close (fd);
11064 result |= 4;
11065 }
11066 }
11067 if (unlink (sym) != 0 || symlink (".", sym) != 0)
11068 result |= 2;
11069 else
11070 {
11071 int fd = open (sym, O_RDONLY | O_NOFOLLOW);
11072 if (fd >= 0)
11073 {
11074 close (fd);
11075 result |= 4;
11076 }
11077 }
11078 unlink (sym);
11079 }
11080 #endif
11081 {
11082 static char const file[] = "confdefs.h";
11083 int fd = open (file, O_RDONLY | O_NOATIME);
11084 if (fd < 0)
11085 result |= 8;
11086 else
11087 {
11088 struct stat st0;
11089 if (fstat (fd, &st0) != 0)
11090 result |= 16;
11091 else
11092 {
11093 char c;
11094 sleep (1);
11095 if (read (fd, &c, 1) != 1)
11096 result |= 24;
11097 else
11098 {
11099 if (close (fd) != 0)
11100 result |= 32;
11101 else
11102 {
11103 struct stat st1;
11104 if (stat (file, &st1) != 0)
11105 result |= 40;
11106 else
11107 if (st0.st_atime != st1.st_atime)
11108 result |= 64;
11109 }
11110 }
11111 }
11112 }
11113 }
11114 return result;
11115 ;
11116 return 0;
11117 }
11118 _ACEOF
11119 if ac_fn_c_try_run "$LINENO"; then :
11120 gl_cv_header_working_fcntl_h=yes
11121 else
11122 case $? in #(
11123 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
11124 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
11125 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
11126 *) gl_cv_header_working_fcntl_h='no';;
11127 esac
11128 fi
11129 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11130 conftest.$ac_objext conftest.beam conftest.$ac_ext
11131 fi
11132
11133
11134 fi
11135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
11136 $as_echo "$gl_cv_header_working_fcntl_h" >&6; }
11137
11138 case $gl_cv_header_working_fcntl_h in #(
11139 *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
11140 *) ac_val=1;;
11141 esac
11142
11143 cat >>confdefs.h <<_ACEOF
11144 #define HAVE_WORKING_O_NOATIME $ac_val
11145 _ACEOF
11146
11147
11148 case $gl_cv_header_working_fcntl_h in #(
11149 *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
11150 *) ac_val=1;;
11151 esac
11152
11153 cat >>confdefs.h <<_ACEOF
11154 #define HAVE_WORKING_O_NOFOLLOW $ac_val
11155 _ACEOF
11156
11157
11158
11159 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
11160 "
11161 if test "x$ac_cv_type_pid_t" = xyes; then :
11162
11163 else
11164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11165 /* end confdefs.h. */
11166
11167 #if defined _WIN64 && !defined __CYGWIN__
11168 LLP64
11169 #endif
11170
11171 int
11172 main ()
11173 {
11174
11175 ;
11176 return 0;
11177 }
11178
11179 _ACEOF
11180 if ac_fn_c_try_compile "$LINENO"; then :
11181 gl_pid_type='int'
11182 else
11183 gl_pid_type='__int64'
11184 fi
11185 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11186
11187 cat >>confdefs.h <<_ACEOF
11188 #define pid_t $gl_pid_type
11189 _ACEOF
11190
11191
11192 fi
11193
11194
11195 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
11196 if test "x$ac_cv_type_mode_t" = xyes; then :
11197
11198 else
11199
11200 cat >>confdefs.h <<_ACEOF
11201 #define mode_t int
11202 _ACEOF
11203
11204 fi
11205
11206
11207
11208
11209
11210
11211
11212
11213
11214
11215
11216
11217 if test $gl_cv_have_include_next = yes; then
11218 gl_cv_next_fcntl_h='<'fcntl.h'>'
11219 else
11220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
11221 $as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
11222 if ${gl_cv_next_fcntl_h+:} false; then :
11223 $as_echo_n "(cached) " >&6
11224 else
11225
11226
11227
11228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11229 /* end confdefs.h. */
11230 #include <fcntl.h>
11231 _ACEOF
11232 case "$host_os" in
11233 aix*) gl_absname_cpp="$ac_cpp -C" ;;
11234 *) gl_absname_cpp="$ac_cpp" ;;
11235 esac
11236
11237 case "$host_os" in
11238 mingw*)
11239 gl_dirsep_regex='[/\\]'
11240 ;;
11241 *)
11242 gl_dirsep_regex='\/'
11243 ;;
11244 esac
11245 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11246 gl_header_literal_regex=`echo 'fcntl.h' \
11247 | sed -e "$gl_make_literal_regex_sed"`
11248 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11249 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11250 s|^/[^/]|//&|
11251 p
11252 q
11253 }'
11254
11255 gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11256 sed -n "$gl_absolute_header_sed"`
11257
11258 gl_header=$gl_cv_absolute_fcntl_h
11259 gl_cv_next_fcntl_h='"'$gl_header'"'
11260
11261
11262 fi
11263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
11264 $as_echo "$gl_cv_next_fcntl_h" >&6; }
11265 fi
11266 NEXT_FCNTL_H=$gl_cv_next_fcntl_h
11267
11268 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11269 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11270 gl_next_as_first_directive='<'fcntl.h'>'
11271 else
11272 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11273 gl_next_as_first_directive=$gl_cv_next_fcntl_h
11274 fi
11275 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
11276
11277
11278
11279
11280
11281
11282
11283
11284
11285
11286
11287
11288
11289
11290
11291
11292 HAVE_FFS=1;
11293 HAVE_STRCASECMP=1;
11294 HAVE_DECL_STRNCASECMP=1;
11295
11296
11297
11298 GL_GNULIB_FFS=0
11299
11300
11301
11302
11303
11304
11305 HAVE_FNMATCH=1;
11306 REPLACE_FNMATCH=0;
11307
11308
11309
11310
11311
11312
11313
11314
11315
11316
11317
11318
11319
11320
11321
11322
11323 if test $gl_cv_have_include_next = yes; then
11324 gl_cv_next_fnmatch_h='<'fnmatch.h'>'
11325 else
11326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fnmatch.h>" >&5
11327 $as_echo_n "checking absolute name of <fnmatch.h>... " >&6; }
11328 if ${gl_cv_next_fnmatch_h+:} false; then :
11329 $as_echo_n "(cached) " >&6
11330 else
11331
11332 if test $ac_cv_header_fnmatch_h = yes; then
11333
11334
11335
11336
11337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11338 /* end confdefs.h. */
11339 #include <fnmatch.h>
11340 _ACEOF
11341 case "$host_os" in
11342 aix*) gl_absname_cpp="$ac_cpp -C" ;;
11343 *) gl_absname_cpp="$ac_cpp" ;;
11344 esac
11345
11346 case "$host_os" in
11347 mingw*)
11348 gl_dirsep_regex='[/\\]'
11349 ;;
11350 *)
11351 gl_dirsep_regex='\/'
11352 ;;
11353 esac
11354 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11355 gl_header_literal_regex=`echo 'fnmatch.h' \
11356 | sed -e "$gl_make_literal_regex_sed"`
11357 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11358 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11359 s|^/[^/]|//&|
11360 p
11361 q
11362 }'
11363
11364 gl_cv_absolute_fnmatch_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11365 sed -n "$gl_absolute_header_sed"`
11366
11367 gl_header=$gl_cv_absolute_fnmatch_h
11368 gl_cv_next_fnmatch_h='"'$gl_header'"'
11369 else
11370 gl_cv_next_fnmatch_h='<'fnmatch.h'>'
11371 fi
11372
11373
11374 fi
11375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fnmatch_h" >&5
11376 $as_echo "$gl_cv_next_fnmatch_h" >&6; }
11377 fi
11378 NEXT_FNMATCH_H=$gl_cv_next_fnmatch_h
11379
11380 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11381 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11382 gl_next_as_first_directive='<'fnmatch.h'>'
11383 else
11384 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11385 gl_next_as_first_directive=$gl_cv_next_fnmatch_h
11386 fi
11387 NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H=$gl_next_as_first_directive
11388
11389
11390
11391
11392
11393
11394
11395 if test $ac_cv_header_fnmatch_h = yes; then
11396 HAVE_FNMATCH_H=1
11397 else
11398 HAVE_FNMATCH_H=0
11399 fi
11400
11401
11402 GL_GENERATE_FNMATCH_H=false
11403 if false; then
11404 GL_GENERATE_FNMATCH_H=true
11405 else
11406 if test $ac_cv_header_fnmatch_h != yes; then
11407 GL_GENERATE_FNMATCH_H=true
11408 fi
11409 fi
11410
11411
11412
11413
11414
11415
11416
11417
11418
11419
11420 GL_GNULIB_FNMATCH=0
11421
11422
11423
11424
11425
11426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
11427 $as_echo_n "checking for mbstate_t... " >&6; }
11428 if ${ac_cv_type_mbstate_t+:} false; then :
11429 $as_echo_n "(cached) " >&6
11430 else
11431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11432 /* end confdefs.h. */
11433 $ac_includes_default
11434 #include <wchar.h>
11435 int
11436 main ()
11437 {
11438 mbstate_t x; return sizeof x;
11439 ;
11440 return 0;
11441 }
11442 _ACEOF
11443 if ac_fn_c_try_compile "$LINENO"; then :
11444 ac_cv_type_mbstate_t=yes
11445 else
11446 ac_cv_type_mbstate_t=no
11447 fi
11448 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11449 fi
11450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
11451 $as_echo "$ac_cv_type_mbstate_t" >&6; }
11452 if test $ac_cv_type_mbstate_t = yes; then
11453
11454 $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
11455
11456 else
11457
11458 $as_echo "#define mbstate_t int" >>confdefs.h
11459
11460 fi
11461
11462
11463
11464
11465 HAVE_ACOSF=1;
11466 HAVE_ACOSL=1;
11467 HAVE_ASINF=1;
11468 HAVE_ASINL=1;
11469 HAVE_ATANF=1;
11470 HAVE_ATANL=1;
11471 HAVE_ATAN2F=1;
11472 HAVE_CBRT=1;
11473 HAVE_CBRTF=1;
11474 HAVE_CBRTL=1;
11475 HAVE_COPYSIGN=1;
11476 HAVE_COPYSIGNL=1;
11477 HAVE_COSF=1;
11478 HAVE_COSL=1;
11479 HAVE_COSHF=1;
11480 HAVE_EXPF=1;
11481 HAVE_EXPL=1;
11482 HAVE_EXPM1=1;
11483 HAVE_EXPM1F=1;
11484 HAVE_FABSF=1;
11485 HAVE_FABSL=1;
11486 HAVE_FMA=1;
11487 HAVE_FMAF=1;
11488 HAVE_FMAL=1;
11489 HAVE_FMODF=1;
11490 HAVE_FMODL=1;
11491 HAVE_FREXPF=1;
11492 HAVE_HYPOTF=1;
11493 HAVE_HYPOTL=1;
11494 HAVE_ILOGB=1;
11495 HAVE_ILOGBF=1;
11496 HAVE_ILOGBL=1;
11497 HAVE_ISNANF=1;
11498 HAVE_ISNAND=1;
11499 HAVE_ISNANL=1;
11500 HAVE_LDEXPF=1;
11501 HAVE_LOGF=1;
11502 HAVE_LOGL=1;
11503 HAVE_LOG10F=1;
11504 HAVE_LOG10L=1;
11505 HAVE_LOG1P=1;
11506 HAVE_LOG1PF=1;
11507 HAVE_LOG1PL=1;
11508 HAVE_LOGBF=1;
11509 HAVE_LOGBL=1;
11510 HAVE_MODFF=1;
11511 HAVE_MODFL=1;
11512 HAVE_POWF=1;
11513 HAVE_REMAINDER=1;
11514 HAVE_REMAINDERF=1;
11515 HAVE_RINT=1;
11516 HAVE_RINTL=1;
11517 HAVE_SINF=1;
11518 HAVE_SINL=1;
11519 HAVE_SINHF=1;
11520 HAVE_SQRTF=1;
11521 HAVE_SQRTL=1;
11522 HAVE_TANF=1;
11523 HAVE_TANL=1;
11524 HAVE_TANHF=1;
11525 HAVE_DECL_ACOSL=1;
11526 HAVE_DECL_ASINL=1;
11527 HAVE_DECL_ATANL=1;
11528 HAVE_DECL_CBRTF=1;
11529 HAVE_DECL_CBRTL=1;
11530 HAVE_DECL_CEILF=1;
11531 HAVE_DECL_CEILL=1;
11532 HAVE_DECL_COPYSIGNF=1;
11533 HAVE_DECL_COSL=1;
11534 HAVE_DECL_EXPL=1;
11535 HAVE_DECL_EXP2=1;
11536 HAVE_DECL_EXP2F=1;
11537 HAVE_DECL_EXP2L=1;
11538 HAVE_DECL_EXPM1L=1;
11539 HAVE_DECL_FLOORF=1;
11540 HAVE_DECL_FLOORL=1;
11541 HAVE_DECL_FREXPL=1;
11542 HAVE_DECL_LDEXPL=1;
11543 HAVE_DECL_LOGL=1;
11544 HAVE_DECL_LOG10L=1;
11545 HAVE_DECL_LOG2=1;
11546 HAVE_DECL_LOG2F=1;
11547 HAVE_DECL_LOG2L=1;
11548 HAVE_DECL_LOGB=1;
11549 HAVE_DECL_REMAINDER=1;
11550 HAVE_DECL_REMAINDERL=1;
11551 HAVE_DECL_RINTF=1;
11552 HAVE_DECL_ROUND=1;
11553 HAVE_DECL_ROUNDF=1;
11554 HAVE_DECL_ROUNDL=1;
11555 HAVE_DECL_SINL=1;
11556 HAVE_DECL_SQRTL=1;
11557 HAVE_DECL_TANL=1;
11558 HAVE_DECL_TRUNC=1;
11559 HAVE_DECL_TRUNCF=1;
11560 HAVE_DECL_TRUNCL=1;
11561 REPLACE_ACOSF=0;
11562 REPLACE_ASINF=0;
11563 REPLACE_ATANF=0;
11564 REPLACE_ATAN2F=0;
11565 REPLACE_CBRTF=0;
11566 REPLACE_CBRTL=0;
11567 REPLACE_CEIL=0;
11568 REPLACE_CEILF=0;
11569 REPLACE_CEILL=0;
11570 REPLACE_COSF=0;
11571 REPLACE_COSHF=0;
11572 REPLACE_EXPF=0;
11573 REPLACE_EXPL=0;
11574 REPLACE_EXPM1=0;
11575 REPLACE_EXPM1F=0;
11576 REPLACE_EXPM1L=0;
11577 REPLACE_EXP2=0;
11578 REPLACE_EXP2L=0;
11579 REPLACE_FABSL=0;
11580 REPLACE_FLOOR=0;
11581 REPLACE_FLOORF=0;
11582 REPLACE_FLOORL=0;
11583 REPLACE_FMA=0;
11584 REPLACE_FMAF=0;
11585 REPLACE_FMAL=0;
11586 REPLACE_FMOD=0;
11587 REPLACE_FMODF=0;
11588 REPLACE_FMODL=0;
11589 REPLACE_FREXPF=0;
11590 REPLACE_FREXP=0;
11591 REPLACE_FREXPL=0;
11592 REPLACE_HUGE_VAL=0;
11593 REPLACE_HYPOT=0;
11594 REPLACE_HYPOTF=0;
11595 REPLACE_HYPOTL=0;
11596 REPLACE_ILOGB=0;
11597 REPLACE_ILOGBF=0;
11598 REPLACE_ILOGBL=0;
11599 REPLACE_ISFINITE=0;
11600 REPLACE_ISINF=0;
11601 REPLACE_ISNAN=0;
11602 REPLACE_LDEXPL=0;
11603 REPLACE_LOG=0;
11604 REPLACE_LOGF=0;
11605 REPLACE_LOGL=0;
11606 REPLACE_LOG10=0;
11607 REPLACE_LOG10F=0;
11608 REPLACE_LOG10L=0;
11609 REPLACE_LOG1P=0;
11610 REPLACE_LOG1PF=0;
11611 REPLACE_LOG1PL=0;
11612 REPLACE_LOG2=0;
11613 REPLACE_LOG2F=0;
11614 REPLACE_LOG2L=0;
11615 REPLACE_LOGB=0;
11616 REPLACE_LOGBF=0;
11617 REPLACE_LOGBL=0;
11618 REPLACE_MODF=0;
11619 REPLACE_MODFF=0;
11620 REPLACE_MODFL=0;
11621 REPLACE_NAN=0;
11622 REPLACE_REMAINDER=0;
11623 REPLACE_REMAINDERF=0;
11624 REPLACE_REMAINDERL=0;
11625 REPLACE_RINTL=0;
11626 REPLACE_ROUND=0;
11627 REPLACE_ROUNDF=0;
11628 REPLACE_ROUNDL=0;
11629 REPLACE_SIGNBIT=0;
11630 REPLACE_SIGNBIT_USING_BUILTINS=0;
11631 REPLACE_SINF=0;
11632 REPLACE_SINHF=0;
11633 REPLACE_SQRTF=0;
11634 REPLACE_SQRTL=0;
11635 REPLACE_TANF=0;
11636 REPLACE_TANHF=0;
11637 REPLACE_TRUNC=0;
11638 REPLACE_TRUNCF=0;
11639 REPLACE_TRUNCL=0;
11640
11641
11642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5
11643 $as_echo_n "checking whether frexp() can be used without linking with libm... " >&6; }
11644 if ${gl_cv_func_frexp_no_libm+:} false; then :
11645 $as_echo_n "(cached) " >&6
11646 else
11647
11648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11649 /* end confdefs.h. */
11650 #include <math.h>
11651 double x;
11652 int
11653 main ()
11654 {
11655 int e; return frexp (x, &e) > 0;
11656 ;
11657 return 0;
11658 }
11659 _ACEOF
11660 if ac_fn_c_try_link "$LINENO"; then :
11661 gl_cv_func_frexp_no_libm=yes
11662 else
11663 gl_cv_func_frexp_no_libm=no
11664 fi
11665 rm -f core conftest.err conftest.$ac_objext \
11666 conftest$ac_exeext conftest.$ac_ext
11667
11668 fi
11669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
11670 $as_echo "$gl_cv_func_frexp_no_libm" >&6; }
11671
11672 ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
11673 if test "x$ac_cv_have_decl_alarm" = xyes; then :
11674 ac_have_decl=1
11675 else
11676 ac_have_decl=0
11677 fi
11678
11679 cat >>confdefs.h <<_ACEOF
11680 #define HAVE_DECL_ALARM $ac_have_decl
11681 _ACEOF
11682
11683
11684
11685
11686 FREXP_LIBM=
11687 if test $gl_cv_func_frexp_no_libm = no; then
11688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used with libm" >&5
11689 $as_echo_n "checking whether frexp() can be used with libm... " >&6; }
11690 if ${gl_cv_func_frexp_in_libm+:} false; then :
11691 $as_echo_n "(cached) " >&6
11692 else
11693
11694 save_LIBS="$LIBS"
11695 LIBS="$LIBS -lm"
11696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11697 /* end confdefs.h. */
11698 #include <math.h>
11699 double x;
11700 int
11701 main ()
11702 {
11703 int e; return frexp (x, &e) > 0;
11704 ;
11705 return 0;
11706 }
11707 _ACEOF
11708 if ac_fn_c_try_link "$LINENO"; then :
11709 gl_cv_func_frexp_in_libm=yes
11710 else
11711 gl_cv_func_frexp_in_libm=no
11712 fi
11713 rm -f core conftest.err conftest.$ac_objext \
11714 conftest$ac_exeext conftest.$ac_ext
11715 LIBS="$save_LIBS"
11716
11717 fi
11718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_in_libm" >&5
11719 $as_echo "$gl_cv_func_frexp_in_libm" >&6; }
11720 if test $gl_cv_func_frexp_in_libm = yes; then
11721 FREXP_LIBM=-lm
11722 fi
11723 fi
11724 if test $gl_cv_func_frexp_no_libm = yes \
11725 || test $gl_cv_func_frexp_in_libm = yes; then
11726 save_LIBS="$LIBS"
11727 LIBS="$LIBS $FREXP_LIBM"
11728
11729
11730
11731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
11732 $as_echo_n "checking whether frexp works... " >&6; }
11733 if ${gl_cv_func_frexp_works+:} false; then :
11734 $as_echo_n "(cached) " >&6
11735 else
11736
11737 if test "$cross_compiling" = yes; then :
11738 case "$host_os" in
11739 netbsd* | irix*) gl_cv_func_frexp_works="guessing no" ;;
11740 mingw*) # Guess yes with MSVC, no with mingw.
11741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11742 /* end confdefs.h. */
11743
11744 #ifdef _MSC_VER
11745 Good
11746 #endif
11747
11748 _ACEOF
11749 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11750 $EGREP "Good" >/dev/null 2>&1; then :
11751 gl_cv_func_frexp_works="guessing yes"
11752 else
11753 gl_cv_func_frexp_works="guessing no"
11754 fi
11755 rm -f conftest*
11756
11757 ;;
11758 *) gl_cv_func_frexp_works="guessing yes" ;;
11759 esac
11760
11761 else
11762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11763 /* end confdefs.h. */
11764
11765 #include <float.h>
11766 #include <math.h>
11767 #include <string.h>
11768 #if HAVE_DECL_ALARM
11769 # include <signal.h>
11770 # include <unistd.h>
11771 #endif
11772 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
11773 ICC 10.0 has a bug when optimizing the expression -zero.
11774 The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
11775 to PowerPC on Mac OS X 10.5. */
11776 #if defined __hpux || defined __sgi || defined __ICC
11777 static double
11778 compute_minus_zero (void)
11779 {
11780 return -DBL_MIN * DBL_MIN;
11781 }
11782 # define minus_zero compute_minus_zero ()
11783 #else
11784 double minus_zero = -0.0;
11785 #endif
11786 int main()
11787 {
11788 int result = 0;
11789 int i;
11790 volatile double x;
11791 double zero = 0.0;
11792 #if HAVE_DECL_ALARM
11793 /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
11794 number. Let the test fail in this case. */
11795 signal (SIGALRM, SIG_DFL);
11796 alarm (5);
11797 #endif
11798 /* Test on denormalized numbers. */
11799 for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
11800 ;
11801 if (x > 0.0)
11802 {
11803 int exp;
11804 double y = frexp (x, &exp);
11805 /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
11806 On NetBSD: y = 0.75. Correct: y = 0.5. */
11807 if (y != 0.5)
11808 result |= 1;
11809 }
11810 /* Test on infinite numbers. */
11811 x = 1.0 / zero;
11812 {
11813 int exp;
11814 double y = frexp (x, &exp);
11815 if (y != x)
11816 result |= 2;
11817 }
11818 /* Test on negative zero. */
11819 x = minus_zero;
11820 {
11821 int exp;
11822 double y = frexp (x, &exp);
11823 if (memcmp (&y, &x, sizeof x))
11824 result |= 4;
11825 }
11826 return result;
11827 }
11828 _ACEOF
11829 if ac_fn_c_try_run "$LINENO"; then :
11830 gl_cv_func_frexp_works=yes
11831 else
11832 gl_cv_func_frexp_works=no
11833 fi
11834 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11835 conftest.$ac_objext conftest.beam conftest.$ac_ext
11836 fi
11837
11838
11839 fi
11840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
11841 $as_echo "$gl_cv_func_frexp_works" >&6; }
11842
11843 LIBS="$save_LIBS"
11844 case "$gl_cv_func_frexp_works" in
11845 *yes) gl_func_frexp=yes ;;
11846 *) gl_func_frexp=no; REPLACE_FREXP=1; FREXP_LIBM= ;;
11847 esac
11848 else
11849 gl_func_frexp=no
11850 fi
11851 if test $gl_func_frexp = yes; then
11852
11853 $as_echo "#define HAVE_FREXP 1" >>confdefs.h
11854
11855 fi
11856
11857
11858
11859
11860 GL_GNULIB_ACOSF=0
11861
11862
11863
11864 GL_GNULIB_ACOSL=0
11865
11866
11867
11868 GL_GNULIB_ASINF=0
11869
11870
11871
11872 GL_GNULIB_ASINL=0
11873
11874
11875
11876 GL_GNULIB_ATANF=0
11877
11878
11879
11880 GL_GNULIB_ATANL=0
11881
11882
11883
11884 GL_GNULIB_ATAN2F=0
11885
11886
11887
11888 GL_GNULIB_CBRT=0
11889
11890
11891
11892 GL_GNULIB_CBRTF=0
11893
11894
11895
11896 GL_GNULIB_CBRTL=0
11897
11898
11899
11900 GL_GNULIB_CEIL=0
11901
11902
11903
11904 GL_GNULIB_CEILF=0
11905
11906
11907
11908 GL_GNULIB_CEILL=0
11909
11910
11911
11912 GL_GNULIB_COPYSIGN=0
11913
11914
11915
11916 GL_GNULIB_COPYSIGNF=0
11917
11918
11919
11920 GL_GNULIB_COPYSIGNL=0
11921
11922
11923
11924 GL_GNULIB_COSF=0
11925
11926
11927
11928 GL_GNULIB_COSL=0
11929
11930
11931
11932 GL_GNULIB_COSHF=0
11933
11934
11935
11936 GL_GNULIB_EXPF=0
11937
11938
11939
11940 GL_GNULIB_EXPL=0
11941
11942
11943
11944 GL_GNULIB_EXP2=0
11945
11946
11947
11948 GL_GNULIB_EXP2F=0
11949
11950
11951
11952 GL_GNULIB_EXP2L=0
11953
11954
11955
11956 GL_GNULIB_EXPM1=0
11957
11958
11959
11960 GL_GNULIB_EXPM1F=0
11961
11962
11963
11964 GL_GNULIB_EXPM1L=0
11965
11966
11967
11968 GL_GNULIB_FABSF=0
11969
11970
11971
11972 GL_GNULIB_FABSL=0
11973
11974
11975
11976 GL_GNULIB_FLOOR=0
11977
11978
11979
11980 GL_GNULIB_FLOORF=0
11981
11982
11983
11984 GL_GNULIB_FLOORL=0
11985
11986
11987
11988 GL_GNULIB_FMA=0
11989
11990
11991
11992 GL_GNULIB_FMAF=0
11993
11994
11995
11996 GL_GNULIB_FMAL=0
11997
11998
11999
12000 GL_GNULIB_FMOD=0
12001
12002
12003
12004 GL_GNULIB_FMODF=0
12005
12006
12007
12008 GL_GNULIB_FMODL=0
12009
12010
12011
12012 GL_GNULIB_FREXPF=0
12013
12014
12015
12016 GL_GNULIB_FREXP=0
12017
12018
12019
12020 GL_GNULIB_FREXPL=0
12021
12022
12023
12024 GL_GNULIB_HYPOT=0
12025
12026
12027
12028 GL_GNULIB_HYPOTF=0
12029
12030
12031
12032 GL_GNULIB_HYPOTL=0
12033
12034
12035
12036 GL_GNULIB_ILOGB=0
12037
12038
12039
12040 GL_GNULIB_ILOGBF=0
12041
12042
12043
12044 GL_GNULIB_ILOGBL=0
12045
12046
12047
12048 GL_GNULIB_ISFINITE=0
12049
12050
12051
12052 GL_GNULIB_ISINF=0
12053
12054
12055
12056 GL_GNULIB_ISNAN=0
12057
12058
12059
12060 GL_GNULIB_ISNANF=0
12061
12062
12063
12064 GL_GNULIB_ISNAND=0
12065
12066
12067
12068 GL_GNULIB_ISNANL=0
12069
12070
12071
12072 GL_GNULIB_LDEXPF=0
12073
12074
12075
12076 GL_GNULIB_LDEXPL=0
12077
12078
12079
12080 GL_GNULIB_LOG=0
12081
12082
12083
12084 GL_GNULIB_LOGF=0
12085
12086
12087
12088 GL_GNULIB_LOGL=0
12089
12090
12091
12092 GL_GNULIB_LOG10=0
12093
12094
12095
12096 GL_GNULIB_LOG10F=0
12097
12098
12099
12100 GL_GNULIB_LOG10L=0
12101
12102
12103
12104 GL_GNULIB_LOG1P=0
12105
12106
12107
12108 GL_GNULIB_LOG1PF=0
12109
12110
12111
12112 GL_GNULIB_LOG1PL=0
12113
12114
12115
12116 GL_GNULIB_LOG2=0
12117
12118
12119
12120 GL_GNULIB_LOG2F=0
12121
12122
12123
12124 GL_GNULIB_LOG2L=0
12125
12126
12127
12128 GL_GNULIB_LOGB=0
12129
12130
12131
12132 GL_GNULIB_LOGBF=0
12133
12134
12135
12136 GL_GNULIB_LOGBL=0
12137
12138
12139
12140 GL_GNULIB_MODF=0
12141
12142
12143
12144 GL_GNULIB_MODFF=0
12145
12146
12147
12148 GL_GNULIB_MODFL=0
12149
12150
12151
12152 GL_GNULIB_POWF=0
12153
12154
12155
12156 GL_GNULIB_REMAINDER=0
12157
12158
12159
12160 GL_GNULIB_REMAINDERF=0
12161
12162
12163
12164 GL_GNULIB_REMAINDERL=0
12165
12166
12167
12168 GL_GNULIB_RINT=0
12169
12170
12171
12172 GL_GNULIB_RINTF=0
12173
12174
12175
12176 GL_GNULIB_RINTL=0
12177
12178
12179
12180 GL_GNULIB_ROUND=0
12181
12182
12183
12184 GL_GNULIB_ROUNDF=0
12185
12186
12187
12188 GL_GNULIB_ROUNDL=0
12189
12190
12191
12192 GL_GNULIB_SIGNBIT=0
12193
12194
12195
12196 GL_GNULIB_SINF=0
12197
12198
12199
12200 GL_GNULIB_SINL=0
12201
12202
12203
12204 GL_GNULIB_SINHF=0
12205
12206
12207
12208 GL_GNULIB_SQRTF=0
12209
12210
12211
12212 GL_GNULIB_SQRTL=0
12213
12214
12215
12216 GL_GNULIB_TANF=0
12217
12218
12219
12220 GL_GNULIB_TANL=0
12221
12222
12223
12224 GL_GNULIB_TANHF=0
12225
12226
12227
12228 GL_GNULIB_TRUNC=0
12229
12230
12231
12232 GL_GNULIB_TRUNCF=0
12233
12234
12235
12236 GL_GNULIB_TRUNCL=0
12237
12238
12239
12240 GL_GNULIB_MDA_J0=1
12241
12242
12243
12244 GL_GNULIB_MDA_J1=1
12245
12246
12247
12248 GL_GNULIB_MDA_JN=1
12249
12250
12251
12252 GL_GNULIB_MDA_Y0=1
12253
12254
12255
12256 GL_GNULIB_MDA_Y1=1
12257
12258
12259
12260 GL_GNULIB_MDA_YN=1
12261
12262
12263
12264
12265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5
12266 $as_echo_n "checking whether long double and double are the same... " >&6; }
12267 if ${gl_cv_long_double_equals_double+:} false; then :
12268 $as_echo_n "(cached) " >&6
12269 else
12270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12271 /* end confdefs.h. */
12272 #include <float.h>
12273 int
12274 main ()
12275 {
12276 typedef int check[sizeof (long double) == sizeof (double)
12277 && LDBL_MANT_DIG == DBL_MANT_DIG
12278 && LDBL_MAX_EXP == DBL_MAX_EXP
12279 && LDBL_MIN_EXP == DBL_MIN_EXP
12280 ? 1 : -1];
12281
12282 ;
12283 return 0;
12284 }
12285 _ACEOF
12286 if ac_fn_c_try_compile "$LINENO"; then :
12287 gl_cv_long_double_equals_double=yes
12288 else
12289 gl_cv_long_double_equals_double=no
12290 fi
12291 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12292
12293 fi
12294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_long_double_equals_double" >&5
12295 $as_echo "$gl_cv_long_double_equals_double" >&6; }
12296 if test $gl_cv_long_double_equals_double = yes; then
12297
12298 $as_echo "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h
12299
12300 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1
12301 else
12302 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0
12303 fi
12304
12305
12306
12307
12308
12309
12310
12311
12312 ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
12313 "
12314 if test "x$ac_cv_have_decl_frexpl" = xyes; then :
12315
12316 else
12317 HAVE_DECL_FREXPL=0
12318 fi
12319
12320
12321 FREXPL_LIBM=
12322 if test $HAVE_DECL_FREXPL = 1; then
12323
12324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
12325 $as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; }
12326 if ${gl_cv_func_frexpl_no_libm+:} false; then :
12327 $as_echo_n "(cached) " >&6
12328 else
12329
12330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12331 /* end confdefs.h. */
12332 #include <math.h>
12333 long double x;
12334 int
12335 main ()
12336 {
12337 int e; return frexpl (x, &e) > 0;
12338 ;
12339 return 0;
12340 }
12341 _ACEOF
12342 if ac_fn_c_try_link "$LINENO"; then :
12343 gl_cv_func_frexpl_no_libm=yes
12344 else
12345 gl_cv_func_frexpl_no_libm=no
12346 fi
12347 rm -f core conftest.err conftest.$ac_objext \
12348 conftest$ac_exeext conftest.$ac_ext
12349
12350 fi
12351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
12352 $as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
12353
12354 if test $gl_cv_func_frexpl_no_libm = no; then
12355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used with libm" >&5
12356 $as_echo_n "checking whether frexpl() can be used with libm... " >&6; }
12357 if ${gl_cv_func_frexpl_in_libm+:} false; then :
12358 $as_echo_n "(cached) " >&6
12359 else
12360
12361 save_LIBS="$LIBS"
12362 LIBS="$LIBS -lm"
12363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12364 /* end confdefs.h. */
12365 #include <math.h>
12366 long double x;
12367 int
12368 main ()
12369 {
12370 int e; return frexpl (x, &e) > 0;
12371 ;
12372 return 0;
12373 }
12374 _ACEOF
12375 if ac_fn_c_try_link "$LINENO"; then :
12376 gl_cv_func_frexpl_in_libm=yes
12377 else
12378 gl_cv_func_frexpl_in_libm=no
12379 fi
12380 rm -f core conftest.err conftest.$ac_objext \
12381 conftest$ac_exeext conftest.$ac_ext
12382 LIBS="$save_LIBS"
12383
12384 fi
12385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_in_libm" >&5
12386 $as_echo "$gl_cv_func_frexpl_in_libm" >&6; }
12387 if test $gl_cv_func_frexpl_in_libm = yes; then
12388 FREXPL_LIBM=-lm
12389 fi
12390 fi
12391 if test $gl_cv_func_frexpl_no_libm = yes \
12392 || test $gl_cv_func_frexpl_in_libm = yes; then
12393 save_LIBS="$LIBS"
12394 LIBS="$LIBS $FREXPL_LIBM"
12395
12396
12397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
12398 $as_echo_n "checking whether frexpl works... " >&6; }
12399 if ${gl_cv_func_frexpl_works+:} false; then :
12400 $as_echo_n "(cached) " >&6
12401 else
12402
12403 if test "$cross_compiling" = yes; then :
12404
12405 case "$host_os" in
12406 aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
12407 gl_cv_func_frexpl_works="guessing no";;
12408 *) gl_cv_func_frexpl_works="guessing yes";;
12409 esac
12410
12411 else
12412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12413 /* end confdefs.h. */
12414
12415 #include <float.h>
12416 #include <math.h>
12417 /* Override the values of <float.h>, like done in float.in.h. */
12418 #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
12419 # undef LDBL_MIN_EXP
12420 # define LDBL_MIN_EXP (-16381)
12421 #endif
12422 #if defined __i386__ && (defined __FreeBSD__ || defined __DragonFly__)
12423 # undef LDBL_MIN_EXP
12424 # define LDBL_MIN_EXP (-16381)
12425 #endif
12426 #if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
12427 # undef LDBL_MIN_EXP
12428 # define LDBL_MIN_EXP DBL_MIN_EXP
12429 #endif
12430 #if defined __sgi && (LDBL_MANT_DIG >= 106)
12431 # if defined __GNUC__
12432 # undef LDBL_MIN_EXP
12433 # define LDBL_MIN_EXP DBL_MIN_EXP
12434 # endif
12435 #endif
12436 extern
12437 #ifdef __cplusplus
12438 "C"
12439 #endif
12440 long double frexpl (long double, int *);
12441 long double zero = 0.0L;
12442 int main()
12443 {
12444 int result = 0;
12445 volatile long double x;
12446 /* Test on finite numbers that fails on AIX 5.1. */
12447 x = 16.0L;
12448 {
12449 int exp = -9999;
12450 frexpl (x, &exp);
12451 if (exp != 5)
12452 result |= 1;
12453 }
12454 /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
12455 function returns an invalid (incorrectly normalized) value: it returns
12456 y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
12457 but the correct result is
12458 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */
12459 x = 1.01L;
12460 {
12461 int exp = -9999;
12462 long double y = frexpl (x, &exp);
12463 if (!(exp == 1 && y == 0.505L))
12464 result |= 2;
12465 }
12466 /* Test on large finite numbers. This fails on BeOS at i = 16322, while
12467 LDBL_MAX_EXP = 16384.
12468 In the loop end test, we test x against Infinity, rather than comparing
12469 i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */
12470 {
12471 int i;
12472 for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
12473 {
12474 int exp = -9999;
12475 frexpl (x, &exp);
12476 if (exp != i)
12477 {
12478 result |= 4;
12479 break;
12480 }
12481 }
12482 }
12483 /* Test on denormalized numbers. */
12484 {
12485 int i;
12486 for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
12487 ;
12488 if (x > 0.0L)
12489 {
12490 int exp;
12491 long double y = frexpl (x, &exp);
12492 /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
12493 exp = -16382, y = 0.5. On Mac OS X 10.5: exp = -16384, y = 0.5. */
12494 if (exp != LDBL_MIN_EXP - 1)
12495 result |= 8;
12496 }
12497 }
12498 /* Test on infinite numbers. */
12499 /* The Microsoft MSVC 14 compiler chokes on the expression 1.0 / 0.0. */
12500 x = 1.0L / zero;
12501 {
12502 int exp;
12503 long double y = frexpl (x, &exp);
12504 if (y != x)
12505 result |= 16;
12506 }
12507 return result;
12508 }
12509 _ACEOF
12510 if ac_fn_c_try_run "$LINENO"; then :
12511 gl_cv_func_frexpl_works=yes
12512 else
12513 gl_cv_func_frexpl_works=no
12514 fi
12515 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12516 conftest.$ac_objext conftest.beam conftest.$ac_ext
12517 fi
12518
12519
12520 fi
12521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
12522 $as_echo "$gl_cv_func_frexpl_works" >&6; }
12523
12524 LIBS="$save_LIBS"
12525 case "$gl_cv_func_frexpl_works" in
12526 *yes) gl_func_frexpl=yes ;;
12527 *) gl_func_frexpl=no; REPLACE_FREXPL=1 ;;
12528 esac
12529 else
12530 gl_func_frexpl=no
12531 fi
12532 if test $gl_func_frexpl = yes; then
12533
12534 $as_echo "#define HAVE_FREXPL 1" >>confdefs.h
12535
12536 fi
12537 fi
12538 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
12539 if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then
12540
12541 FREXPL_LIBM="$FREXP_LIBM"
12542 else
12543 FREXPL_LIBM=
12544 fi
12545 fi
12546
12547
12548
12549 HAVE_FCHMODAT=1;
12550 HAVE_FSTATAT=1;
12551 HAVE_FUTIMENS=1;
12552 HAVE_GETUMASK=1;
12553 HAVE_LCHMOD=1;
12554 HAVE_LSTAT=1;
12555 HAVE_MKDIRAT=1;
12556 HAVE_MKFIFO=1;
12557 HAVE_MKFIFOAT=1;
12558 HAVE_MKNOD=1;
12559 HAVE_MKNODAT=1;
12560 HAVE_UTIMENSAT=1;
12561 REPLACE_FCHMODAT=0;
12562 REPLACE_FSTAT=0;
12563 REPLACE_FSTATAT=0;
12564 REPLACE_FUTIMENS=0;
12565 REPLACE_LSTAT=0;
12566 REPLACE_MKDIR=0;
12567 REPLACE_MKFIFO=0;
12568 REPLACE_MKFIFOAT=0;
12569 REPLACE_MKNOD=0;
12570 REPLACE_MKNODAT=0;
12571 REPLACE_STAT=0;
12572 REPLACE_UTIMENSAT=0;
12573
12574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
12575 $as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
12576 if ${ac_cv_header_stat_broken+:} false; then :
12577 $as_echo_n "(cached) " >&6
12578 else
12579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12580 /* end confdefs.h. */
12581 #include <sys/types.h>
12582 #include <sys/stat.h>
12583
12584 #if defined S_ISBLK && defined S_IFDIR
12585 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
12586 #endif
12587
12588 #if defined S_ISBLK && defined S_IFCHR
12589 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
12590 #endif
12591
12592 #if defined S_ISLNK && defined S_IFREG
12593 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
12594 #endif
12595
12596 #if defined S_ISSOCK && defined S_IFREG
12597 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
12598 #endif
12599
12600 _ACEOF
12601 if ac_fn_c_try_compile "$LINENO"; then :
12602 ac_cv_header_stat_broken=no
12603 else
12604 ac_cv_header_stat_broken=yes
12605 fi
12606 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12607 fi
12608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
12609 $as_echo "$ac_cv_header_stat_broken" >&6; }
12610 if test $ac_cv_header_stat_broken = yes; then
12611
12612 $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
12613
12614 fi
12615
12616
12617
12618
12619
12620 case "$host_os" in
12621 mingw*)
12622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
12623 $as_echo_n "checking for 64-bit off_t... " >&6; }
12624 if ${gl_cv_type_off_t_64+:} false; then :
12625 $as_echo_n "(cached) " >&6
12626 else
12627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12628 /* end confdefs.h. */
12629 #include <sys/types.h>
12630 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
12631
12632 int
12633 main ()
12634 {
12635
12636 ;
12637 return 0;
12638 }
12639 _ACEOF
12640 if ac_fn_c_try_compile "$LINENO"; then :
12641 gl_cv_type_off_t_64=yes
12642 else
12643 gl_cv_type_off_t_64=no
12644 fi
12645 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12646
12647 fi
12648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
12649 $as_echo "$gl_cv_type_off_t_64" >&6; }
12650 if test $gl_cv_type_off_t_64 = no; then
12651 WINDOWS_64_BIT_OFF_T=1
12652 else
12653 WINDOWS_64_BIT_OFF_T=0
12654 fi
12655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit st_size" >&5
12656 $as_echo_n "checking for 64-bit st_size... " >&6; }
12657 if ${gl_cv_member_st_size_64+:} false; then :
12658 $as_echo_n "(cached) " >&6
12659 else
12660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12661 /* end confdefs.h. */
12662 #include <sys/types.h>
12663 struct stat buf;
12664 int verify_st_size_size[sizeof (buf.st_size) >= 8 ? 1 : -1];
12665
12666 int
12667 main ()
12668 {
12669
12670 ;
12671 return 0;
12672 }
12673 _ACEOF
12674 if ac_fn_c_try_compile "$LINENO"; then :
12675 gl_cv_member_st_size_64=yes
12676 else
12677 gl_cv_member_st_size_64=no
12678 fi
12679 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12680
12681 fi
12682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_member_st_size_64" >&5
12683 $as_echo "$gl_cv_member_st_size_64" >&6; }
12684 if test $gl_cv_member_st_size_64 = no; then
12685 WINDOWS_64_BIT_ST_SIZE=1
12686 else
12687 WINDOWS_64_BIT_ST_SIZE=0
12688 fi
12689 ;;
12690 *)
12691 WINDOWS_64_BIT_OFF_T=0
12692 WINDOWS_64_BIT_ST_SIZE=0
12693 ;;
12694 esac
12695
12696
12697
12698
12699
12700
12701
12702
12703
12704
12705
12706
12707
12708
12709
12710 if test $gl_cv_have_include_next = yes; then
12711 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
12712 else
12713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
12714 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
12715 if ${gl_cv_next_sys_stat_h+:} false; then :
12716 $as_echo_n "(cached) " >&6
12717 else
12718
12719 if test $ac_cv_header_sys_stat_h = yes; then
12720
12721
12722
12723
12724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12725 /* end confdefs.h. */
12726 #include <sys/stat.h>
12727 _ACEOF
12728 case "$host_os" in
12729 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12730 *) gl_absname_cpp="$ac_cpp" ;;
12731 esac
12732
12733 case "$host_os" in
12734 mingw*)
12735 gl_dirsep_regex='[/\\]'
12736 ;;
12737 *)
12738 gl_dirsep_regex='\/'
12739 ;;
12740 esac
12741 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12742 gl_header_literal_regex=`echo 'sys/stat.h' \
12743 | sed -e "$gl_make_literal_regex_sed"`
12744 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12745 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12746 s|^/[^/]|//&|
12747 p
12748 q
12749 }'
12750
12751 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12752 sed -n "$gl_absolute_header_sed"`
12753
12754 gl_header=$gl_cv_absolute_sys_stat_h
12755 gl_cv_next_sys_stat_h='"'$gl_header'"'
12756 else
12757 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
12758 fi
12759
12760
12761 fi
12762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
12763 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
12764 fi
12765 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
12766
12767 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12768 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12769 gl_next_as_first_directive='<'sys/stat.h'>'
12770 else
12771 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12772 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
12773 fi
12774 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
12775
12776
12777
12778
12779
12780
12781
12782
12783 WINDOWS_STAT_TIMESPEC=0
12784
12785
12786
12787
12788
12789
12790
12791
12792 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
12793 #include <sys/stat.h>
12794 "
12795 if test "x$ac_cv_type_nlink_t" = xyes; then :
12796
12797 else
12798
12799 $as_echo "#define nlink_t int" >>confdefs.h
12800
12801 fi
12802
12803
12804
12805
12806
12807
12808
12809
12810
12811
12812 case "$host_os" in
12813 mingw*)
12814 for ac_header in sdkddkver.h
12815 do :
12816 ac_fn_c_check_header_mongrel "$LINENO" "sdkddkver.h" "ac_cv_header_sdkddkver_h" "$ac_includes_default"
12817 if test "x$ac_cv_header_sdkddkver_h" = xyes; then :
12818 cat >>confdefs.h <<_ACEOF
12819 #define HAVE_SDKDDKVER_H 1
12820 _ACEOF
12821
12822 fi
12823
12824 done
12825
12826 ;;
12827 esac
12828
12829
12830
12831
12832
12833
12834
12835 GL_GNULIB_FCHMODAT=0
12836
12837
12838
12839 GL_GNULIB_FSTAT=0
12840
12841
12842
12843 GL_GNULIB_FSTATAT=0
12844
12845
12846
12847 GL_GNULIB_FUTIMENS=0
12848
12849
12850
12851 GL_GNULIB_GETUMASK=0
12852
12853
12854
12855 GL_GNULIB_LCHMOD=0
12856
12857
12858
12859 GL_GNULIB_LSTAT=0
12860
12861
12862
12863 GL_GNULIB_MKDIR=0
12864
12865
12866
12867 GL_GNULIB_MKDIRAT=0
12868
12869
12870
12871 GL_GNULIB_MKFIFO=0
12872
12873
12874
12875 GL_GNULIB_MKFIFOAT=0
12876
12877
12878
12879 GL_GNULIB_MKNOD=0
12880
12881
12882
12883 GL_GNULIB_MKNODAT=0
12884
12885
12886
12887 GL_GNULIB_STAT=0
12888
12889
12890
12891 GL_GNULIB_UTIMENSAT=0
12892
12893
12894
12895 GL_GNULIB_OVERRIDES_STRUCT_STAT=0
12896
12897
12898
12899 GL_GNULIB_MDA_CHMOD=1
12900
12901
12902
12903 GL_GNULIB_MDA_MKDIR=1
12904
12905
12906
12907 GL_GNULIB_MDA_UMASK=1
12908
12909
12910
12911
12912
12913
12914
12915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
12916 $as_echo_n "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
12917 if ${gl_cv_func_getcwd_null+:} false; then :
12918 $as_echo_n "(cached) " >&6
12919 else
12920 if test "$cross_compiling" = yes; then :
12921 case "$host_os" in
12922 # Guess yes on glibc systems.
12923 *-gnu* | gnu*) gl_cv_func_getcwd_null="guessing yes";;
12924 # Guess yes on musl systems.
12925 *-musl*) gl_cv_func_getcwd_null="guessing yes";;
12926 # Guess yes on Cygwin.
12927 cygwin*) gl_cv_func_getcwd_null="guessing yes";;
12928 # If we don't know, obey --enable-cross-guesses.
12929 *) gl_cv_func_getcwd_null="$gl_cross_guess_normal";;
12930 esac
12931
12932 else
12933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12934 /* end confdefs.h. */
12935
12936 # include <stdlib.h>
12937 # if HAVE_UNISTD_H
12938 # include <unistd.h>
12939 # else /* on Windows with MSVC */
12940 # include <direct.h>
12941 # endif
12942
12943
12944 $gl_mda_defines
12945
12946 # ifndef getcwd
12947 char *getcwd ();
12948 # endif
12949
12950 int
12951 main ()
12952 {
12953
12954 #if defined _WIN32 && ! defined __CYGWIN__
12955 /* mingw cwd does not start with '/', but _getcwd does allocate.
12956 However, mingw fails to honor non-zero size. */
12957 #else
12958 if (chdir ("/") != 0)
12959 return 1;
12960 else
12961 {
12962 char *f = getcwd (NULL, 0);
12963 if (! f)
12964 return 2;
12965 if (f[0] != '/')
12966 { free (f); return 3; }
12967 if (f[1] != '\0')
12968 { free (f); return 4; }
12969 free (f);
12970 return 0;
12971 }
12972 #endif
12973
12974 ;
12975 return 0;
12976 }
12977 _ACEOF
12978 if ac_fn_c_try_run "$LINENO"; then :
12979 gl_cv_func_getcwd_null=yes
12980 else
12981 gl_cv_func_getcwd_null=no
12982 fi
12983 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12984 conftest.$ac_objext conftest.beam conftest.$ac_ext
12985 fi
12986
12987 fi
12988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
12989 $as_echo "$gl_cv_func_getcwd_null" >&6; }
12990
12991
12992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
12993 $as_echo_n "checking for getcwd with POSIX signature... " >&6; }
12994 if ${gl_cv_func_getcwd_posix_signature+:} false; then :
12995 $as_echo_n "(cached) " >&6
12996 else
12997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12998 /* end confdefs.h. */
12999 #include <unistd.h>
13000
13001
13002 $gl_mda_defines
13003
13004 int
13005 main ()
13006 {
13007 extern
13008 #ifdef __cplusplus
13009 "C"
13010 #endif
13011 char *getcwd (char *, size_t);
13012
13013 ;
13014 return 0;
13015 }
13016
13017 _ACEOF
13018 if ac_fn_c_try_compile "$LINENO"; then :
13019 gl_cv_func_getcwd_posix_signature=yes
13020 else
13021 gl_cv_func_getcwd_posix_signature=no
13022 fi
13023 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13024
13025 fi
13026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
13027 $as_echo "$gl_cv_func_getcwd_posix_signature" >&6; }
13028
13029 ac_fn_c_check_decl "$LINENO" "getcwd" "ac_cv_have_decl_getcwd" "$ac_includes_default"
13030 if test "x$ac_cv_have_decl_getcwd" = xyes; then :
13031 ac_have_decl=1
13032 else
13033 ac_have_decl=0
13034 fi
13035
13036 cat >>confdefs.h <<_ACEOF
13037 #define HAVE_DECL_GETCWD $ac_have_decl
13038 _ACEOF
13039
13040
13041 HAVE_DECL_FCLOSEALL=1;
13042 HAVE_DECL_FPURGE=1;
13043 HAVE_DECL_FSEEKO=1;
13044 HAVE_DECL_FTELLO=1;
13045 HAVE_DECL_GETDELIM=1;
13046 HAVE_DECL_GETLINE=1;
13047 HAVE_DECL_OBSTACK_PRINTF=1;
13048 HAVE_DECL_SNPRINTF=1;
13049 HAVE_DECL_VSNPRINTF=1;
13050 HAVE_DPRINTF=1;
13051 HAVE_FSEEKO=1;
13052 HAVE_FTELLO=1;
13053 HAVE_PCLOSE=1;
13054 HAVE_POPEN=1;
13055 HAVE_RENAMEAT=1;
13056 HAVE_VASPRINTF=1;
13057 HAVE_VDPRINTF=1;
13058 REPLACE_DPRINTF=0;
13059 REPLACE_FCLOSE=0;
13060 REPLACE_FDOPEN=0;
13061 REPLACE_FFLUSH=0;
13062 REPLACE_FOPEN=0;
13063 REPLACE_FOPEN_FOR_FOPEN_GNU=0;
13064 REPLACE_FPRINTF=0;
13065 REPLACE_FPURGE=0;
13066 REPLACE_FREOPEN=0;
13067 REPLACE_FSEEK=0;
13068 REPLACE_FSEEKO=0;
13069 REPLACE_FTELL=0;
13070 REPLACE_FTELLO=0;
13071 REPLACE_GETDELIM=0;
13072 REPLACE_GETLINE=0;
13073 REPLACE_OBSTACK_PRINTF=0;
13074 REPLACE_PERROR=0;
13075 REPLACE_POPEN=0;
13076 REPLACE_PRINTF=0;
13077 REPLACE_REMOVE=0;
13078 REPLACE_RENAME=0;
13079 REPLACE_RENAMEAT=0;
13080 REPLACE_SNPRINTF=0;
13081 REPLACE_SPRINTF=0;
13082 REPLACE_STDIO_READ_FUNCS=0;
13083 REPLACE_STDIO_WRITE_FUNCS=0;
13084 REPLACE_TMPFILE=0;
13085 REPLACE_VASPRINTF=0;
13086 REPLACE_VDPRINTF=0;
13087 REPLACE_VFPRINTF=0;
13088 REPLACE_VPRINTF=0;
13089 REPLACE_VSNPRINTF=0;
13090 REPLACE_VSPRINTF=0;
13091
13092 ac_fn_c_check_decl "$LINENO" "getdelim" "ac_cv_have_decl_getdelim" "$ac_includes_default"
13093 if test "x$ac_cv_have_decl_getdelim" = xyes; then :
13094 ac_have_decl=1
13095 else
13096 ac_have_decl=0
13097 fi
13098
13099 cat >>confdefs.h <<_ACEOF
13100 #define HAVE_DECL_GETDELIM $ac_have_decl
13101 _ACEOF
13102
13103
13104
13105
13106
13107 GL_GNULIB_DPRINTF=0
13108
13109
13110
13111 GL_GNULIB_FCLOSE=0
13112
13113
13114
13115 GL_GNULIB_FDOPEN=0
13116
13117
13118
13119 GL_GNULIB_FFLUSH=0
13120
13121
13122
13123 GL_GNULIB_FGETC=0
13124
13125
13126
13127 GL_GNULIB_FGETS=0
13128
13129
13130
13131 GL_GNULIB_FOPEN=0
13132
13133
13134
13135 GL_GNULIB_FOPEN_GNU=0
13136
13137
13138
13139 GL_GNULIB_FPRINTF=0
13140
13141
13142
13143 GL_GNULIB_FPRINTF_POSIX=0
13144
13145
13146
13147 GL_GNULIB_FPURGE=0
13148
13149
13150
13151 GL_GNULIB_FPUTC=0
13152
13153
13154
13155 GL_GNULIB_FPUTS=0
13156
13157
13158
13159 GL_GNULIB_FREAD=0
13160
13161
13162
13163 GL_GNULIB_FREOPEN=0
13164
13165
13166
13167 GL_GNULIB_FSCANF=0
13168
13169
13170
13171 GL_GNULIB_FSEEK=0
13172
13173
13174
13175 GL_GNULIB_FSEEKO=0
13176
13177
13178
13179 GL_GNULIB_FTELL=0
13180
13181
13182
13183 GL_GNULIB_FTELLO=0
13184
13185
13186
13187 GL_GNULIB_FWRITE=0
13188
13189
13190
13191 GL_GNULIB_GETC=0
13192
13193
13194
13195 GL_GNULIB_GETCHAR=0
13196
13197
13198
13199 GL_GNULIB_GETDELIM=0
13200
13201
13202
13203 GL_GNULIB_GETLINE=0
13204
13205
13206
13207 GL_GNULIB_OBSTACK_PRINTF=0
13208
13209
13210
13211 GL_GNULIB_OBSTACK_PRINTF_POSIX=0
13212
13213
13214
13215 GL_GNULIB_PCLOSE=0
13216
13217
13218
13219 GL_GNULIB_PERROR=0
13220
13221
13222
13223 GL_GNULIB_POPEN=0
13224
13225
13226
13227 GL_GNULIB_PRINTF=0
13228
13229
13230
13231 GL_GNULIB_PRINTF_POSIX=0
13232
13233
13234
13235 GL_GNULIB_PUTC=0
13236
13237
13238
13239 GL_GNULIB_PUTCHAR=0
13240
13241
13242
13243 GL_GNULIB_PUTS=0
13244
13245
13246
13247 GL_GNULIB_REMOVE=0
13248
13249
13250
13251 GL_GNULIB_RENAME=0
13252
13253
13254
13255 GL_GNULIB_RENAMEAT=0
13256
13257
13258
13259 GL_GNULIB_SCANF=0
13260
13261
13262
13263 GL_GNULIB_SNPRINTF=0
13264
13265
13266
13267 GL_GNULIB_SPRINTF_POSIX=0
13268
13269
13270
13271 GL_GNULIB_STDIO_H_NONBLOCKING=0
13272
13273
13274
13275 GL_GNULIB_STDIO_H_SIGPIPE=0
13276
13277
13278
13279 GL_GNULIB_TMPFILE=0
13280
13281
13282
13283 GL_GNULIB_VASPRINTF=0
13284
13285
13286
13287 GL_GNULIB_VFSCANF=0
13288
13289
13290
13291 GL_GNULIB_VSCANF=0
13292
13293
13294
13295 GL_GNULIB_VDPRINTF=0
13296
13297
13298
13299 GL_GNULIB_VFPRINTF=0
13300
13301
13302
13303 GL_GNULIB_VFPRINTF_POSIX=0
13304
13305
13306
13307 GL_GNULIB_VPRINTF=0
13308
13309
13310
13311 GL_GNULIB_VPRINTF_POSIX=0
13312
13313
13314
13315 GL_GNULIB_VSNPRINTF=0
13316
13317
13318
13319 GL_GNULIB_VSPRINTF_POSIX=0
13320
13321
13322
13323 GL_GNULIB_MDA_FCLOSEALL=1
13324
13325
13326
13327 GL_GNULIB_MDA_FDOPEN=1
13328
13329
13330
13331 GL_GNULIB_MDA_FILENO=1
13332
13333
13334
13335 GL_GNULIB_MDA_GETW=1
13336
13337
13338
13339 GL_GNULIB_MDA_PUTW=1
13340
13341
13342
13343 GL_GNULIB_MDA_TEMPNAM=1
13344
13345
13346
13347
13348
13349 ac_fn_c_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default"
13350 if test "x$ac_cv_have_decl_getdtablesize" = xyes; then :
13351 ac_have_decl=1
13352 else
13353 ac_have_decl=0
13354 fi
13355
13356 cat >>confdefs.h <<_ACEOF
13357 #define HAVE_DECL_GETDTABLESIZE $ac_have_decl
13358 _ACEOF
13359
13360 ac_fn_c_check_decl "$LINENO" "getline" "ac_cv_have_decl_getline" "$ac_includes_default"
13361 if test "x$ac_cv_have_decl_getline" = xyes; then :
13362 ac_have_decl=1
13363 else
13364 ac_have_decl=0
13365 fi
13366
13367 cat >>confdefs.h <<_ACEOF
13368 #define HAVE_DECL_GETLINE $ac_have_decl
13369 _ACEOF
13370
13371 ac_fn_c_check_decl "$LINENO" "getlogin_r" "ac_cv_have_decl_getlogin_r" "$ac_includes_default"
13372 if test "x$ac_cv_have_decl_getlogin_r" = xyes; then :
13373 ac_have_decl=1
13374 else
13375 ac_have_decl=0
13376 fi
13377
13378 cat >>confdefs.h <<_ACEOF
13379 #define HAVE_DECL_GETLOGIN_R $ac_have_decl
13380 _ACEOF
13381
13382
13383
13384 ac_fn_c_check_decl "$LINENO" "getlogin" "ac_cv_have_decl_getlogin" "$ac_includes_default"
13385 if test "x$ac_cv_have_decl_getlogin" = xyes; then :
13386 ac_have_decl=1
13387 else
13388 ac_have_decl=0
13389 fi
13390
13391 cat >>confdefs.h <<_ACEOF
13392 #define HAVE_DECL_GETLOGIN $ac_have_decl
13393 _ACEOF
13394
13395
13396
13397 case $host_os in
13398 mingw*)
13399 LIB_GETLOGIN='-ladvapi32' ;;
13400 *)
13401 LIB_GETLOGIN= ;;
13402 esac
13403
13404
13405
13406
13407
13408
13409
13410 HAVE_GETRANDOM=1;
13411 REPLACE_GETRANDOM=0;
13412
13413
13414
13415
13416
13417 GL_GNULIB_GETRANDOM=0
13418
13419
13420
13421
13422 HAVE_GETTIMEOFDAY=1;
13423 HAVE_STRUCT_TIMEVAL=1;
13424 HAVE_SYS_TIME_H=1;
13425 REPLACE_GETTIMEOFDAY=0;
13426 REPLACE_STRUCT_TIMEVAL=0;
13427
13428
13429
13430
13431
13432
13433
13434
13435
13436
13437
13438
13439
13440
13441
13442
13443 if test $gl_cv_have_include_next = yes; then
13444 gl_cv_next_sys_time_h='<'sys/time.h'>'
13445 else
13446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
13447 $as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
13448 if ${gl_cv_next_sys_time_h+:} false; then :
13449 $as_echo_n "(cached) " >&6
13450 else
13451
13452 if test $ac_cv_header_sys_time_h = yes; then
13453
13454
13455
13456
13457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13458 /* end confdefs.h. */
13459 #include <sys/time.h>
13460 _ACEOF
13461 case "$host_os" in
13462 aix*) gl_absname_cpp="$ac_cpp -C" ;;
13463 *) gl_absname_cpp="$ac_cpp" ;;
13464 esac
13465
13466 case "$host_os" in
13467 mingw*)
13468 gl_dirsep_regex='[/\\]'
13469 ;;
13470 *)
13471 gl_dirsep_regex='\/'
13472 ;;
13473 esac
13474 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13475 gl_header_literal_regex=`echo 'sys/time.h' \
13476 | sed -e "$gl_make_literal_regex_sed"`
13477 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13478 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13479 s|^/[^/]|//&|
13480 p
13481 q
13482 }'
13483
13484 gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13485 sed -n "$gl_absolute_header_sed"`
13486
13487 gl_header=$gl_cv_absolute_sys_time_h
13488 gl_cv_next_sys_time_h='"'$gl_header'"'
13489 else
13490 gl_cv_next_sys_time_h='<'sys/time.h'>'
13491 fi
13492
13493
13494 fi
13495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
13496 $as_echo "$gl_cv_next_sys_time_h" >&6; }
13497 fi
13498 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
13499
13500 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13501 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13502 gl_next_as_first_directive='<'sys/time.h'>'
13503 else
13504 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13505 gl_next_as_first_directive=$gl_cv_next_sys_time_h
13506 fi
13507 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
13508
13509
13510
13511
13512
13513 if test $ac_cv_header_sys_time_h != yes; then
13514 HAVE_SYS_TIME_H=0
13515 fi
13516
13517
13518
13519
13520
13521 if test $ac_cv_header_sys_socket_h != yes; then
13522 for ac_header in winsock2.h
13523 do :
13524 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
13525 if test "x$ac_cv_header_winsock2_h" = xyes; then :
13526 cat >>confdefs.h <<_ACEOF
13527 #define HAVE_WINSOCK2_H 1
13528 _ACEOF
13529
13530 fi
13531
13532 done
13533
13534 fi
13535 if test "$ac_cv_header_winsock2_h" = yes; then
13536 HAVE_WINSOCK2_H=1
13537 UNISTD_H_HAVE_WINSOCK2_H=1
13538 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
13539 else
13540 HAVE_WINSOCK2_H=0
13541 fi
13542
13543
13544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
13545 $as_echo_n "checking for struct timeval... " >&6; }
13546 if ${gl_cv_sys_struct_timeval+:} false; then :
13547 $as_echo_n "(cached) " >&6
13548 else
13549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13550 /* end confdefs.h. */
13551 #if HAVE_SYS_TIME_H
13552 #include <sys/time.h>
13553 #endif
13554 #include <time.h>
13555 #if HAVE_WINSOCK2_H
13556 # include <winsock2.h>
13557 #endif
13558
13559 int
13560 main ()
13561 {
13562 static struct timeval x; x.tv_sec = x.tv_usec;
13563 ;
13564 return 0;
13565 }
13566 _ACEOF
13567 if ac_fn_c_try_compile "$LINENO"; then :
13568 gl_cv_sys_struct_timeval=yes
13569 else
13570 gl_cv_sys_struct_timeval=no
13571 fi
13572 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13573
13574 fi
13575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
13576 $as_echo "$gl_cv_sys_struct_timeval" >&6; }
13577 if test $gl_cv_sys_struct_timeval != yes; then
13578 HAVE_STRUCT_TIMEVAL=0
13579 else
13580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
13581 $as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
13582 if ${gl_cv_sys_struct_timeval_tv_sec+:} false; then :
13583 $as_echo_n "(cached) " >&6
13584 else
13585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13586 /* end confdefs.h. */
13587 #if HAVE_SYS_TIME_H
13588 #include <sys/time.h>
13589 #endif
13590 #include <time.h>
13591 #if HAVE_WINSOCK2_H
13592 # include <winsock2.h>
13593 #endif
13594
13595 int
13596 main ()
13597 {
13598 static struct timeval x;
13599 typedef int verify_tv_sec_type[
13600 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
13601 ];
13602
13603 ;
13604 return 0;
13605 }
13606 _ACEOF
13607 if ac_fn_c_try_compile "$LINENO"; then :
13608 gl_cv_sys_struct_timeval_tv_sec=yes
13609 else
13610 gl_cv_sys_struct_timeval_tv_sec=no
13611 fi
13612 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13613
13614 fi
13615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
13616 $as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
13617 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
13618 REPLACE_STRUCT_TIMEVAL=1
13619 fi
13620 fi
13621
13622
13623
13624
13625
13626
13627
13628
13629
13630 GL_GNULIB_GETTIMEOFDAY=0
13631
13632
13633
13634
13635 HAVE_GLOB=1;
13636 HAVE_GLOB_PATTERN_P=1;
13637 REPLACE_GLOB=0;
13638 REPLACE_GLOB_PATTERN_P=0;
13639
13640
13641
13642
13643
13644
13645
13646
13647
13648
13649
13650
13651
13652
13653
13654
13655
13656 if test $gl_cv_have_include_next = yes; then
13657 gl_cv_next_glob_h='<'glob.h'>'
13658 else
13659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <glob.h>" >&5
13660 $as_echo_n "checking absolute name of <glob.h>... " >&6; }
13661 if ${gl_cv_next_glob_h+:} false; then :
13662 $as_echo_n "(cached) " >&6
13663 else
13664
13665 if test $ac_cv_header_glob_h = yes; then
13666
13667
13668
13669
13670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13671 /* end confdefs.h. */
13672 #include <glob.h>
13673 _ACEOF
13674 case "$host_os" in
13675 aix*) gl_absname_cpp="$ac_cpp -C" ;;
13676 *) gl_absname_cpp="$ac_cpp" ;;
13677 esac
13678
13679 case "$host_os" in
13680 mingw*)
13681 gl_dirsep_regex='[/\\]'
13682 ;;
13683 *)
13684 gl_dirsep_regex='\/'
13685 ;;
13686 esac
13687 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13688 gl_header_literal_regex=`echo 'glob.h' \
13689 | sed -e "$gl_make_literal_regex_sed"`
13690 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13691 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13692 s|^/[^/]|//&|
13693 p
13694 q
13695 }'
13696
13697 gl_cv_absolute_glob_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13698 sed -n "$gl_absolute_header_sed"`
13699
13700 gl_header=$gl_cv_absolute_glob_h
13701 gl_cv_next_glob_h='"'$gl_header'"'
13702 else
13703 gl_cv_next_glob_h='<'glob.h'>'
13704 fi
13705
13706
13707 fi
13708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_glob_h" >&5
13709 $as_echo "$gl_cv_next_glob_h" >&6; }
13710 fi
13711 NEXT_GLOB_H=$gl_cv_next_glob_h
13712
13713 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13714 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13715 gl_next_as_first_directive='<'glob.h'>'
13716 else
13717 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13718 gl_next_as_first_directive=$gl_cv_next_glob_h
13719 fi
13720 NEXT_AS_FIRST_DIRECTIVE_GLOB_H=$gl_next_as_first_directive
13721
13722
13723
13724
13725
13726 if test $ac_cv_header_glob_h = yes; then
13727 HAVE_GLOB_H=1
13728 else
13729 HAVE_GLOB_H=0
13730 fi
13731
13732
13733 GL_GENERATE_GLOB_H=false
13734 if false; then
13735 GL_GENERATE_GLOB_H=true
13736 else
13737 if test $ac_cv_header_glob_h != yes; then
13738 GL_GENERATE_GLOB_H=true
13739 fi
13740 fi
13741
13742
13743
13744
13745
13746
13747
13748
13749
13750
13751
13752
13753 GL_GNULIB_GLOB=0
13754
13755
13756
13757
13758
13759
13760
13761
13762
13763 if test -z "$gl_pthreadlib_body_done"; then
13764 gl_pthread_api=no
13765 LIBPTHREAD=
13766 LIBPMULTITHREAD=
13767 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
13768 # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
13769 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
13770 if test "x$ac_cv_header_pthread_h" = xyes; then :
13771 gl_have_pthread_h=yes
13772 else
13773 gl_have_pthread_h=no
13774 fi
13775
13776
13777 if test "$gl_have_pthread_h" = yes; then
13778 # Other possible tests:
13779 # -lpthreads (FSU threads, PCthreads)
13780 # -lgthreads
13781 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
13782 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
13783 # the second one only in libpthread, and lock.c needs it.
13784 #
13785 # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
13786 # needs -pthread for some reason. See:
13787 # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
13788 save_LIBS=$LIBS
13789 for gl_pthread in '' '-pthread'; do
13790 LIBS="$LIBS $gl_pthread"
13791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13792 /* end confdefs.h. */
13793 #include <pthread.h>
13794 pthread_mutex_t m;
13795 pthread_mutexattr_t ma;
13796
13797 int
13798 main ()
13799 {
13800 pthread_mutex_lock (&m);
13801 pthread_mutexattr_init (&ma);
13802 ;
13803 return 0;
13804 }
13805 _ACEOF
13806 if ac_fn_c_try_link "$LINENO"; then :
13807 gl_pthread_api=yes
13808 LIBPTHREAD=$gl_pthread
13809 LIBPMULTITHREAD=$gl_pthread
13810 fi
13811 rm -f core conftest.err conftest.$ac_objext \
13812 conftest$ac_exeext conftest.$ac_ext
13813 LIBS=$save_LIBS
13814 test $gl_pthread_api = yes && break
13815 done
13816 echo "$as_me:13816: gl_pthread_api=$gl_pthread_api" >&5
13817 echo "$as_me:13817: LIBPTHREAD=$LIBPTHREAD" >&5
13818
13819 gl_pthread_in_glibc=no
13820 # On Linux with glibc >= 2.34, libc contains the fully functional
13821 # pthread functions.
13822 case "$host_os" in
13823 linux*)
13824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13825 /* end confdefs.h. */
13826 #include <features.h>
13827 #ifdef __GNU_LIBRARY__
13828 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 34) || (__GLIBC__ > 2)
13829 Lucky user
13830 #endif
13831 #endif
13832
13833 _ACEOF
13834 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13835 $EGREP "Lucky user" >/dev/null 2>&1; then :
13836 gl_pthread_in_glibc=yes
13837 fi
13838 rm -f conftest*
13839
13840 ;;
13841 esac
13842 echo "$as_me:13842: gl_pthread_in_glibc=$gl_pthread_in_glibc" >&5
13843
13844 # Test for libpthread by looking for pthread_kill. (Not pthread_self,
13845 # since it is defined as a macro on OSF/1.)
13846 if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
13847 # The program links fine without libpthread. But it may actually
13848 # need to link with libpthread in order to create multiple threads.
13849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
13850 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
13851 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
13852 $as_echo_n "(cached) " >&6
13853 else
13854 ac_check_lib_save_LIBS=$LIBS
13855 LIBS="-lpthread $LIBS"
13856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13857 /* end confdefs.h. */
13858
13859 /* Override any GCC internal prototype to avoid an error.
13860 Use char because int might match the return type of a GCC
13861 builtin and then its argument prototype would still apply. */
13862 #ifdef __cplusplus
13863 extern "C"
13864 #endif
13865 char pthread_kill ();
13866 int
13867 main ()
13868 {
13869 return pthread_kill ();
13870 ;
13871 return 0;
13872 }
13873 _ACEOF
13874 if ac_fn_c_try_link "$LINENO"; then :
13875 ac_cv_lib_pthread_pthread_kill=yes
13876 else
13877 ac_cv_lib_pthread_pthread_kill=no
13878 fi
13879 rm -f core conftest.err conftest.$ac_objext \
13880 conftest$ac_exeext conftest.$ac_ext
13881 LIBS=$ac_check_lib_save_LIBS
13882 fi
13883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
13884 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
13885 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
13886 if test $gl_pthread_in_glibc = yes; then
13887 LIBPMULTITHREAD=
13888 else
13889 LIBPMULTITHREAD=-lpthread
13890 # On Solaris and HP-UX, most pthread functions exist also in libc.
13891 # Therefore pthread_in_use() needs to actually try to create a
13892 # thread: pthread_create from libc will fail, whereas
13893 # pthread_create will actually create a thread.
13894 # On Solaris 10 or newer, this test is no longer needed, because
13895 # libc contains the fully functional pthread functions.
13896 case "$host_os" in
13897 solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
13898
13899 $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
13900
13901 esac
13902 fi
13903
13904 fi
13905
13906 elif test $gl_pthread_api != yes; then
13907 # Some library is needed. Try libpthread and libc_r.
13908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
13909 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
13910 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
13911 $as_echo_n "(cached) " >&6
13912 else
13913 ac_check_lib_save_LIBS=$LIBS
13914 LIBS="-lpthread $LIBS"
13915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13916 /* end confdefs.h. */
13917
13918 /* Override any GCC internal prototype to avoid an error.
13919 Use char because int might match the return type of a GCC
13920 builtin and then its argument prototype would still apply. */
13921 #ifdef __cplusplus
13922 extern "C"
13923 #endif
13924 char pthread_kill ();
13925 int
13926 main ()
13927 {
13928 return pthread_kill ();
13929 ;
13930 return 0;
13931 }
13932 _ACEOF
13933 if ac_fn_c_try_link "$LINENO"; then :
13934 ac_cv_lib_pthread_pthread_kill=yes
13935 else
13936 ac_cv_lib_pthread_pthread_kill=no
13937 fi
13938 rm -f core conftest.err conftest.$ac_objext \
13939 conftest$ac_exeext conftest.$ac_ext
13940 LIBS=$ac_check_lib_save_LIBS
13941 fi
13942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
13943 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
13944 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
13945 gl_pthread_api=yes
13946 LIBPTHREAD=-lpthread
13947 LIBPMULTITHREAD=-lpthread
13948 fi
13949
13950 if test $gl_pthread_api != yes; then
13951 # For FreeBSD 4.
13952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
13953 $as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
13954 if ${ac_cv_lib_c_r_pthread_kill+:} false; then :
13955 $as_echo_n "(cached) " >&6
13956 else
13957 ac_check_lib_save_LIBS=$LIBS
13958 LIBS="-lc_r $LIBS"
13959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13960 /* end confdefs.h. */
13961
13962 /* Override any GCC internal prototype to avoid an error.
13963 Use char because int might match the return type of a GCC
13964 builtin and then its argument prototype would still apply. */
13965 #ifdef __cplusplus
13966 extern "C"
13967 #endif
13968 char pthread_kill ();
13969 int
13970 main ()
13971 {
13972 return pthread_kill ();
13973 ;
13974 return 0;
13975 }
13976 _ACEOF
13977 if ac_fn_c_try_link "$LINENO"; then :
13978 ac_cv_lib_c_r_pthread_kill=yes
13979 else
13980 ac_cv_lib_c_r_pthread_kill=no
13981 fi
13982 rm -f core conftest.err conftest.$ac_objext \
13983 conftest$ac_exeext conftest.$ac_ext
13984 LIBS=$ac_check_lib_save_LIBS
13985 fi
13986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
13987 $as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
13988 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then :
13989 gl_pthread_api=yes
13990 LIBPTHREAD=-lc_r
13991 LIBPMULTITHREAD=-lc_r
13992 fi
13993
13994 fi
13995 fi
13996 echo "$as_me:13996: LIBPMULTITHREAD=$LIBPMULTITHREAD" >&5
13997 fi
13998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
13999 $as_echo_n "checking whether POSIX threads API is available... " >&6; }
14000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
14001 $as_echo "$gl_pthread_api" >&6; }
14002
14003
14004 if test $gl_pthread_api = yes; then
14005
14006 $as_echo "#define HAVE_PTHREAD_API 1" >>confdefs.h
14007
14008 fi
14009
14010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14011 /* end confdefs.h. */
14012 #include <sched.h>
14013 int
14014 main ()
14015 {
14016 sched_yield ();
14017 ;
14018 return 0;
14019 }
14020 _ACEOF
14021 if ac_fn_c_try_link "$LINENO"; then :
14022 LIB_SCHED_YIELD=
14023
14024 else
14025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
14026 $as_echo_n "checking for sched_yield in -lrt... " >&6; }
14027 if ${ac_cv_lib_rt_sched_yield+:} false; then :
14028 $as_echo_n "(cached) " >&6
14029 else
14030 ac_check_lib_save_LIBS=$LIBS
14031 LIBS="-lrt $LIBS"
14032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14033 /* end confdefs.h. */
14034
14035 /* Override any GCC internal prototype to avoid an error.
14036 Use char because int might match the return type of a GCC
14037 builtin and then its argument prototype would still apply. */
14038 #ifdef __cplusplus
14039 extern "C"
14040 #endif
14041 char sched_yield ();
14042 int
14043 main ()
14044 {
14045 return sched_yield ();
14046 ;
14047 return 0;
14048 }
14049 _ACEOF
14050 if ac_fn_c_try_link "$LINENO"; then :
14051 ac_cv_lib_rt_sched_yield=yes
14052 else
14053 ac_cv_lib_rt_sched_yield=no
14054 fi
14055 rm -f core conftest.err conftest.$ac_objext \
14056 conftest$ac_exeext conftest.$ac_ext
14057 LIBS=$ac_check_lib_save_LIBS
14058 fi
14059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
14060 $as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
14061 if test "x$ac_cv_lib_rt_sched_yield" = xyes; then :
14062 LIB_SCHED_YIELD=-lrt
14063 else
14064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
14065 $as_echo_n "checking for sched_yield in -lposix4... " >&6; }
14066 if ${ac_cv_lib_posix4_sched_yield+:} false; then :
14067 $as_echo_n "(cached) " >&6
14068 else
14069 ac_check_lib_save_LIBS=$LIBS
14070 LIBS="-lposix4 $LIBS"
14071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14072 /* end confdefs.h. */
14073
14074 /* Override any GCC internal prototype to avoid an error.
14075 Use char because int might match the return type of a GCC
14076 builtin and then its argument prototype would still apply. */
14077 #ifdef __cplusplus
14078 extern "C"
14079 #endif
14080 char sched_yield ();
14081 int
14082 main ()
14083 {
14084 return sched_yield ();
14085 ;
14086 return 0;
14087 }
14088 _ACEOF
14089 if ac_fn_c_try_link "$LINENO"; then :
14090 ac_cv_lib_posix4_sched_yield=yes
14091 else
14092 ac_cv_lib_posix4_sched_yield=no
14093 fi
14094 rm -f core conftest.err conftest.$ac_objext \
14095 conftest$ac_exeext conftest.$ac_ext
14096 LIBS=$ac_check_lib_save_LIBS
14097 fi
14098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
14099 $as_echo "$ac_cv_lib_posix4_sched_yield" >&6; }
14100 if test "x$ac_cv_lib_posix4_sched_yield" = xyes; then :
14101 LIB_SCHED_YIELD=-lposix4
14102 fi
14103
14104 fi
14105
14106
14107 fi
14108 rm -f core conftest.err conftest.$ac_objext \
14109 conftest$ac_exeext conftest.$ac_ext
14110
14111
14112 gl_pthreadlib_body_done=done
14113 fi
14114
14115
14116
14117
14118
14119
14120
14121
14122
14123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (LC_ALL, NULL) is multithread-safe" >&5
14124 $as_echo_n "checking whether setlocale (LC_ALL, NULL) is multithread-safe... " >&6; }
14125 if ${gl_cv_func_setlocale_null_all_mtsafe+:} false; then :
14126 $as_echo_n "(cached) " >&6
14127 else
14128 case "$host_os" in
14129 # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin.
14130 *-musl* | darwin* | freebsd* | midnightbsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*)
14131 gl_cv_func_setlocale_null_all_mtsafe=no ;;
14132 # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows.
14133 *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*)
14134 gl_cv_func_setlocale_null_all_mtsafe=yes ;;
14135 # If we don't know, obey --enable-cross-guesses.
14136 *)
14137 gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;;
14138 esac
14139
14140 fi
14141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_all_mtsafe" >&5
14142 $as_echo "$gl_cv_func_setlocale_null_all_mtsafe" >&6; }
14143 case "$host_os" in
14144 mingw*) ;;
14145 *)
14146 if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
14147 gl_cv_func_setlocale_null_all_mtsafe="trivially yes"
14148 fi
14149 ;;
14150 esac
14151 case "$gl_cv_func_setlocale_null_all_mtsafe" in
14152 *yes) SETLOCALE_NULL_ALL_MTSAFE=1 ;;
14153 *) SETLOCALE_NULL_ALL_MTSAFE=0 ;;
14154 esac
14155
14156 cat >>confdefs.h <<_ACEOF
14157 #define SETLOCALE_NULL_ALL_MTSAFE $SETLOCALE_NULL_ALL_MTSAFE
14158 _ACEOF
14159
14160
14161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (category, NULL) is multithread-safe" >&5
14162 $as_echo_n "checking whether setlocale (category, NULL) is multithread-safe... " >&6; }
14163 if ${gl_cv_func_setlocale_null_one_mtsafe+:} false; then :
14164 $as_echo_n "(cached) " >&6
14165 else
14166 case "$host_os" in
14167 # Guess no on OpenBSD, AIX.
14168 openbsd* | aix*)
14169 gl_cv_func_setlocale_null_one_mtsafe=no ;;
14170 # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows.
14171 *-gnu* | gnu* | *-musl* | darwin* | freebsd* | midnightbsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
14172 gl_cv_func_setlocale_null_one_mtsafe=yes ;;
14173 # If we don't know, obey --enable-cross-guesses.
14174 *)
14175 gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;;
14176 esac
14177
14178 fi
14179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_one_mtsafe" >&5
14180 $as_echo "$gl_cv_func_setlocale_null_one_mtsafe" >&6; }
14181 case "$host_os" in
14182 mingw*) ;;
14183 *)
14184 if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
14185 gl_cv_func_setlocale_null_one_mtsafe="trivially yes"
14186 fi
14187 ;;
14188 esac
14189 case "$gl_cv_func_setlocale_null_one_mtsafe" in
14190 *yes) SETLOCALE_NULL_ONE_MTSAFE=1 ;;
14191 *) SETLOCALE_NULL_ONE_MTSAFE=0 ;;
14192 esac
14193
14194 cat >>confdefs.h <<_ACEOF
14195 #define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE
14196 _ACEOF
14197
14198
14199 if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
14200 case "$host_os" in
14201 mingw*) LIB_SETLOCALE_NULL= ;;
14202 *)
14203
14204
14205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
14206 $as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
14207 if ${gl_cv_have_weak+:} false; then :
14208 $as_echo_n "(cached) " >&6
14209 else
14210 case "$host_os" in
14211 cygwin*)
14212 gl_cv_have_weak="guessing no"
14213 ;;
14214 *)
14215 gl_cv_have_weak=no
14216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14217 /* end confdefs.h. */
14218 extern void xyzzy ();
14219 #pragma weak xyzzy
14220 int
14221 main ()
14222 {
14223 xyzzy();
14224 ;
14225 return 0;
14226 }
14227 _ACEOF
14228 if ac_fn_c_try_link "$LINENO"; then :
14229 gl_cv_have_weak=maybe
14230 fi
14231 rm -f core conftest.err conftest.$ac_objext \
14232 conftest$ac_exeext conftest.$ac_ext
14233 if test $gl_cv_have_weak = maybe; then
14234 if test "$cross_compiling" = yes; then :
14235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14236 /* end confdefs.h. */
14237 #ifdef __ELF__
14238 Extensible Linking Format
14239 #endif
14240
14241 _ACEOF
14242 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14243 $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
14244 gl_cv_have_weak="guessing yes"
14245 else
14246 gl_cv_have_weak="guessing no"
14247 fi
14248 rm -f conftest*
14249
14250
14251 else
14252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14253 /* end confdefs.h. */
14254
14255 #include <stdio.h>
14256 #pragma weak fputs
14257 int main ()
14258 {
14259 return (fputs == NULL);
14260 }
14261 _ACEOF
14262 if ac_fn_c_try_run "$LINENO"; then :
14263 gl_cv_have_weak=yes
14264 else
14265 gl_cv_have_weak=no
14266 fi
14267 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14268 conftest.$ac_objext conftest.beam conftest.$ac_ext
14269 fi
14270
14271 fi
14272 ;;
14273 esac
14274 case " $LDFLAGS " in
14275 *" -static "*) gl_cv_have_weak=no ;;
14276 esac
14277 case "$gl_cv_have_weak" in
14278 *yes)
14279 case "$host_os" in
14280 freebsd* | dragonfly* | midnightbsd*)
14281 : > conftest1.c
14282 $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
14283 cat <<EOF > conftest2.c
14284 #include <pthread.h>
14285 #pragma weak pthread_mutexattr_gettype
14286 int main ()
14287 {
14288 return (pthread_mutexattr_gettype != NULL);
14289 }
14290 EOF
14291 $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
14292 || gl_cv_have_weak=no
14293 rm -f conftest1.c libempty.so conftest2.c conftest
14294 ;;
14295 esac
14296 ;;
14297 esac
14298
14299 fi
14300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
14301 $as_echo "$gl_cv_have_weak" >&6; }
14302 case "$gl_cv_have_weak" in
14303 *yes)
14304
14305 $as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
14306
14307 ;;
14308 esac
14309
14310 case "$gl_cv_have_weak" in
14311 *yes) LIB_SETLOCALE_NULL= ;;
14312 *) LIB_SETLOCALE_NULL="$LIBPTHREAD" ;;
14313 esac
14314 ;;
14315 esac
14316 else
14317 LIB_SETLOCALE_NULL=
14318 fi
14319
14320
14321
14322
14323
14324
14325
14326
14327
14328
14329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv4 sockets" >&5
14330 $as_echo_n "checking for IPv4 sockets... " >&6; }
14331 if ${gl_cv_socket_ipv4+:} false; then :
14332 $as_echo_n "(cached) " >&6
14333 else
14334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14335 /* end confdefs.h. */
14336 #include <sys/types.h>
14337 #ifdef HAVE_SYS_SOCKET_H
14338 #include <sys/socket.h>
14339 #endif
14340 #ifdef HAVE_NETINET_IN_H
14341 #include <netinet/in.h>
14342 #endif
14343 #ifdef HAVE_WINSOCK2_H
14344 #include <winsock2.h>
14345 #endif
14346 int
14347 main ()
14348 {
14349 int x = AF_INET; struct in_addr y; struct sockaddr_in z;
14350 if (&x && &y && &z) return 0;
14351 ;
14352 return 0;
14353 }
14354 _ACEOF
14355 if ac_fn_c_try_compile "$LINENO"; then :
14356 gl_cv_socket_ipv4=yes
14357 else
14358 gl_cv_socket_ipv4=no
14359 fi
14360 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14361 fi
14362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv4" >&5
14363 $as_echo "$gl_cv_socket_ipv4" >&6; }
14364 if test $gl_cv_socket_ipv4 = yes; then
14365
14366 $as_echo "#define HAVE_IPV4 1" >>confdefs.h
14367
14368 fi
14369
14370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv6 sockets" >&5
14371 $as_echo_n "checking for IPv6 sockets... " >&6; }
14372 if ${gl_cv_socket_ipv6+:} false; then :
14373 $as_echo_n "(cached) " >&6
14374 else
14375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14376 /* end confdefs.h. */
14377 #include <sys/types.h>
14378 #ifdef HAVE_SYS_SOCKET_H
14379 #include <sys/socket.h>
14380 #endif
14381 #ifdef HAVE_NETINET_IN_H
14382 #include <netinet/in.h>
14383 #endif
14384 #ifdef HAVE_WINSOCK2_H
14385 #include <winsock2.h>
14386 #endif
14387 #ifdef HAVE_WS2TCPIP_H
14388 #include <ws2tcpip.h>
14389 #endif
14390 int
14391 main ()
14392 {
14393 int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z;
14394 if (&x && &y && &z) return 0;
14395 ;
14396 return 0;
14397 }
14398 _ACEOF
14399 if ac_fn_c_try_compile "$LINENO"; then :
14400 gl_cv_socket_ipv6=yes
14401 else
14402 gl_cv_socket_ipv6=no
14403 fi
14404 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14405 fi
14406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv6" >&5
14407 $as_echo "$gl_cv_socket_ipv6" >&6; }
14408 if test $gl_cv_socket_ipv6 = yes; then
14409
14410 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
14411
14412 fi
14413
14414
14415
14416
14417
14418
14419
14420
14421
14422
14423
14424
14425
14426 if test $gl_cv_have_include_next = yes; then
14427 gl_cv_next_limits_h='<'limits.h'>'
14428 else
14429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5
14430 $as_echo_n "checking absolute name of <limits.h>... " >&6; }
14431 if ${gl_cv_next_limits_h+:} false; then :
14432 $as_echo_n "(cached) " >&6
14433 else
14434
14435 if test $ac_cv_header_limits_h = yes; then
14436
14437
14438
14439
14440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14441 /* end confdefs.h. */
14442 #include <limits.h>
14443 _ACEOF
14444 case "$host_os" in
14445 aix*) gl_absname_cpp="$ac_cpp -C" ;;
14446 *) gl_absname_cpp="$ac_cpp" ;;
14447 esac
14448
14449 case "$host_os" in
14450 mingw*)
14451 gl_dirsep_regex='[/\\]'
14452 ;;
14453 *)
14454 gl_dirsep_regex='\/'
14455 ;;
14456 esac
14457 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
14458 gl_header_literal_regex=`echo 'limits.h' \
14459 | sed -e "$gl_make_literal_regex_sed"`
14460 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14461 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14462 s|^/[^/]|//&|
14463 p
14464 q
14465 }'
14466
14467 gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14468 sed -n "$gl_absolute_header_sed"`
14469
14470 gl_header=$gl_cv_absolute_limits_h
14471 gl_cv_next_limits_h='"'$gl_header'"'
14472 else
14473 gl_cv_next_limits_h='<'limits.h'>'
14474 fi
14475
14476
14477 fi
14478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
14479 $as_echo "$gl_cv_next_limits_h" >&6; }
14480 fi
14481 NEXT_LIMITS_H=$gl_cv_next_limits_h
14482
14483 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14484 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14485 gl_next_as_first_directive='<'limits.h'>'
14486 else
14487 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14488 gl_next_as_first_directive=$gl_cv_next_limits_h
14489 fi
14490 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive
14491
14492
14493
14494
14495
14496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether limits.h has WORD_BIT, BOOL_WIDTH etc." >&5
14497 $as_echo_n "checking whether limits.h has WORD_BIT, BOOL_WIDTH etc.... " >&6; }
14498 if ${gl_cv_header_limits_width+:} false; then :
14499 $as_echo_n "(cached) " >&6
14500 else
14501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14502 /* end confdefs.h. */
14503 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
14504 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
14505 #endif
14506 #include <limits.h>
14507 long long llm = LLONG_MAX;
14508 int wb = WORD_BIT;
14509 int ullw = ULLONG_WIDTH;
14510 int bw = BOOL_WIDTH;
14511
14512 int
14513 main ()
14514 {
14515
14516 ;
14517 return 0;
14518 }
14519 _ACEOF
14520 if ac_fn_c_try_compile "$LINENO"; then :
14521 gl_cv_header_limits_width=yes
14522 else
14523 gl_cv_header_limits_width=no
14524 fi
14525 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14526 fi
14527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5
14528 $as_echo "$gl_cv_header_limits_width" >&6; }
14529 if test "$gl_cv_header_limits_width" = yes; then
14530 GL_GENERATE_LIMITS_H=false
14531 else
14532 GL_GENERATE_LIMITS_H=true
14533 fi
14534
14535
14536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
14537 $as_echo_n "checking for wint_t... " >&6; }
14538 if ${gt_cv_c_wint_t+:} false; then :
14539 $as_echo_n "(cached) " >&6
14540 else
14541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14542 /* end confdefs.h. */
14543 #include <wchar.h>
14544 wint_t foo = (wchar_t)'\0';
14545 int
14546 main ()
14547 {
14548
14549 ;
14550 return 0;
14551 }
14552 _ACEOF
14553 if ac_fn_c_try_compile "$LINENO"; then :
14554 gt_cv_c_wint_t=yes
14555 else
14556 gt_cv_c_wint_t=no
14557 fi
14558 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14559 fi
14560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
14561 $as_echo "$gt_cv_c_wint_t" >&6; }
14562 if test $gt_cv_c_wint_t = yes; then
14563
14564 $as_echo "#define HAVE_WINT_T 1" >>confdefs.h
14565
14566
14567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wint_t is large enough" >&5
14568 $as_echo_n "checking whether wint_t is large enough... " >&6; }
14569 if ${gl_cv_type_wint_t_large_enough+:} false; then :
14570 $as_echo_n "(cached) " >&6
14571 else
14572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14573 /* end confdefs.h. */
14574 #include <wchar.h>
14575 int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1];
14576
14577 int
14578 main ()
14579 {
14580
14581 ;
14582 return 0;
14583 }
14584 _ACEOF
14585 if ac_fn_c_try_compile "$LINENO"; then :
14586 gl_cv_type_wint_t_large_enough=yes
14587 else
14588 gl_cv_type_wint_t_large_enough=no
14589 fi
14590 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14591 fi
14592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wint_t_large_enough" >&5
14593 $as_echo "$gl_cv_type_wint_t_large_enough" >&6; }
14594 if test $gl_cv_type_wint_t_large_enough = no; then
14595 GNULIBHEADERS_OVERRIDE_WINT_T=1
14596 else
14597 GNULIBHEADERS_OVERRIDE_WINT_T=0
14598 fi
14599 else
14600 GNULIBHEADERS_OVERRIDE_WINT_T=0
14601 fi
14602
14603
14604
14605
14606
14607
14608
14609
14610
14611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler produces multi-arch binaries" >&5
14612 $as_echo_n "checking whether the compiler produces multi-arch binaries... " >&6; }
14613 if ${gl_cv_c_multiarch+:} false; then :
14614 $as_echo_n "(cached) " >&6
14615 else
14616 gl_cv_c_multiarch=no
14617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14618 /* end confdefs.h. */
14619 #ifndef __APPLE_CC__
14620 not a universal capable compiler
14621 #endif
14622 typedef int dummy;
14623
14624 _ACEOF
14625 if ac_fn_c_try_compile "$LINENO"; then :
14626
14627 arch=
14628 prev=
14629 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
14630 if test -n "$prev"; then
14631 case $word in
14632 i?86 | x86_64 | ppc | ppc64 | arm | arm64)
14633 if test -z "$arch" || test "$arch" = "$word"; then
14634 arch="$word"
14635 else
14636 gl_cv_c_multiarch=yes
14637 fi
14638 ;;
14639 esac
14640 prev=
14641 else
14642 if test "x$word" = "x-arch"; then
14643 prev=arch
14644 fi
14645 fi
14646 done
14647
14648 fi
14649 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14650
14651 fi
14652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_multiarch" >&5
14653 $as_echo "$gl_cv_c_multiarch" >&6; }
14654 if test $gl_cv_c_multiarch = yes; then
14655 APPLE_UNIVERSAL_BUILD=1
14656 else
14657 APPLE_UNIVERSAL_BUILD=0
14658 fi
14659
14660
14661
14662
14663
14664
14665
14666
14667 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
14668
14669
14670 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
14671
14672
14673
14674 if test $ac_cv_header_wchar_h = yes; then
14675 HAVE_WCHAR_H=1
14676 else
14677 HAVE_WCHAR_H=0
14678 fi
14679
14680
14681
14682 if test $ac_cv_header_inttypes_h = yes; then
14683 HAVE_INTTYPES_H=1
14684 else
14685 HAVE_INTTYPES_H=0
14686 fi
14687
14688
14689
14690 if test $ac_cv_header_sys_types_h = yes; then
14691 HAVE_SYS_TYPES_H=1
14692 else
14693 HAVE_SYS_TYPES_H=0
14694 fi
14695
14696
14697
14698
14699
14700
14701
14702
14703
14704
14705
14706 if test $gl_cv_have_include_next = yes; then
14707 gl_cv_next_stdint_h='<'stdint.h'>'
14708 else
14709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
14710 $as_echo_n "checking absolute name of <stdint.h>... " >&6; }
14711 if ${gl_cv_next_stdint_h+:} false; then :
14712 $as_echo_n "(cached) " >&6
14713 else
14714
14715 if test $ac_cv_header_stdint_h = yes; then
14716
14717
14718
14719
14720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14721 /* end confdefs.h. */
14722 #include <stdint.h>
14723 _ACEOF
14724 case "$host_os" in
14725 aix*) gl_absname_cpp="$ac_cpp -C" ;;
14726 *) gl_absname_cpp="$ac_cpp" ;;
14727 esac
14728
14729 case "$host_os" in
14730 mingw*)
14731 gl_dirsep_regex='[/\\]'
14732 ;;
14733 *)
14734 gl_dirsep_regex='\/'
14735 ;;
14736 esac
14737 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
14738 gl_header_literal_regex=`echo 'stdint.h' \
14739 | sed -e "$gl_make_literal_regex_sed"`
14740 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14741 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14742 s|^/[^/]|//&|
14743 p
14744 q
14745 }'
14746
14747 gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14748 sed -n "$gl_absolute_header_sed"`
14749
14750 gl_header=$gl_cv_absolute_stdint_h
14751 gl_cv_next_stdint_h='"'$gl_header'"'
14752 else
14753 gl_cv_next_stdint_h='<'stdint.h'>'
14754 fi
14755
14756
14757 fi
14758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
14759 $as_echo "$gl_cv_next_stdint_h" >&6; }
14760 fi
14761 NEXT_STDINT_H=$gl_cv_next_stdint_h
14762
14763 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14764 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14765 gl_next_as_first_directive='<'stdint.h'>'
14766 else
14767 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14768 gl_next_as_first_directive=$gl_cv_next_stdint_h
14769 fi
14770 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
14771
14772
14773
14774
14775 if test $ac_cv_header_stdint_h = yes; then
14776 HAVE_STDINT_H=1
14777 else
14778 HAVE_STDINT_H=0
14779 fi
14780
14781
14782 if test $ac_cv_header_stdint_h = yes; then
14783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
14784 $as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
14785 if ${gl_cv_header_working_stdint_h+:} false; then :
14786 $as_echo_n "(cached) " >&6
14787 else
14788 gl_cv_header_working_stdint_h=no
14789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14790 /* end confdefs.h. */
14791
14792
14793 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
14794 #define __STDC_CONSTANT_MACROS 1
14795 #define __STDC_LIMIT_MACROS 1
14796 #include <stdint.h>
14797 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
14798 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
14799 #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
14800 #endif
14801
14802
14803 #include <stddef.h>
14804 #include <signal.h>
14805 #if HAVE_WCHAR_H
14806 # include <wchar.h>
14807 #endif
14808
14809
14810 #ifdef INT8_MAX
14811 int8_t a1 = INT8_MAX;
14812 int8_t a1min = INT8_MIN;
14813 #endif
14814 #ifdef INT16_MAX
14815 int16_t a2 = INT16_MAX;
14816 int16_t a2min = INT16_MIN;
14817 #endif
14818 #ifdef INT32_MAX
14819 int32_t a3 = INT32_MAX;
14820 int32_t a3min = INT32_MIN;
14821 #endif
14822 #ifdef INT64_MAX
14823 int64_t a4 = INT64_MAX;
14824 int64_t a4min = INT64_MIN;
14825 #endif
14826 #ifdef UINT8_MAX
14827 uint8_t b1 = UINT8_MAX;
14828 #else
14829 typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
14830 #endif
14831 #ifdef UINT16_MAX
14832 uint16_t b2 = UINT16_MAX;
14833 #endif
14834 #ifdef UINT32_MAX
14835 uint32_t b3 = UINT32_MAX;
14836 #endif
14837 #ifdef UINT64_MAX
14838 uint64_t b4 = UINT64_MAX;
14839 #endif
14840 int_least8_t c1 = INT8_C (0x7f);
14841 int_least8_t c1max = INT_LEAST8_MAX;
14842 int_least8_t c1min = INT_LEAST8_MIN;
14843 int_least16_t c2 = INT16_C (0x7fff);
14844 int_least16_t c2max = INT_LEAST16_MAX;
14845 int_least16_t c2min = INT_LEAST16_MIN;
14846 int_least32_t c3 = INT32_C (0x7fffffff);
14847 int_least32_t c3max = INT_LEAST32_MAX;
14848 int_least32_t c3min = INT_LEAST32_MIN;
14849 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
14850 int_least64_t c4max = INT_LEAST64_MAX;
14851 int_least64_t c4min = INT_LEAST64_MIN;
14852 uint_least8_t d1 = UINT8_C (0xff);
14853 uint_least8_t d1max = UINT_LEAST8_MAX;
14854 uint_least16_t d2 = UINT16_C (0xffff);
14855 uint_least16_t d2max = UINT_LEAST16_MAX;
14856 uint_least32_t d3 = UINT32_C (0xffffffff);
14857 uint_least32_t d3max = UINT_LEAST32_MAX;
14858 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
14859 uint_least64_t d4max = UINT_LEAST64_MAX;
14860 int_fast8_t e1 = INT_FAST8_MAX;
14861 int_fast8_t e1min = INT_FAST8_MIN;
14862 int_fast16_t e2 = INT_FAST16_MAX;
14863 int_fast16_t e2min = INT_FAST16_MIN;
14864 int_fast32_t e3 = INT_FAST32_MAX;
14865 int_fast32_t e3min = INT_FAST32_MIN;
14866 int_fast64_t e4 = INT_FAST64_MAX;
14867 int_fast64_t e4min = INT_FAST64_MIN;
14868 uint_fast8_t f1 = UINT_FAST8_MAX;
14869 uint_fast16_t f2 = UINT_FAST16_MAX;
14870 uint_fast32_t f3 = UINT_FAST32_MAX;
14871 uint_fast64_t f4 = UINT_FAST64_MAX;
14872 #ifdef INTPTR_MAX
14873 intptr_t g = INTPTR_MAX;
14874 intptr_t gmin = INTPTR_MIN;
14875 #endif
14876 #ifdef UINTPTR_MAX
14877 uintptr_t h = UINTPTR_MAX;
14878 #endif
14879 intmax_t i = INTMAX_MAX;
14880 uintmax_t j = UINTMAX_MAX;
14881
14882 /* Check that SIZE_MAX has the correct type, if possible. */
14883 #if 201112 <= __STDC_VERSION__
14884 int k = _Generic (SIZE_MAX, size_t: 0);
14885 #elif (2 <= __GNUC__ || 4 <= __clang_major__ || defined __IBM__TYPEOF__ \
14886 || (0x5110 <= __SUNPRO_C && !__STDC__))
14887 extern size_t k;
14888 extern __typeof__ (SIZE_MAX) k;
14889 #endif
14890
14891 #include <limits.h> /* for CHAR_BIT */
14892 #define TYPE_MINIMUM(t) \
14893 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
14894 #define TYPE_MAXIMUM(t) \
14895 ((t) ((t) 0 < (t) -1 \
14896 ? (t) -1 \
14897 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
14898 struct s {
14899 int check_PTRDIFF:
14900 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
14901 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
14902 ? 1 : -1;
14903 /* Detect bug in FreeBSD 6.0/ia64 and FreeBSD 13.0/arm64. */
14904 int check_SIG_ATOMIC:
14905 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
14906 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
14907 ? 1 : -1;
14908 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
14909 int check_WCHAR:
14910 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
14911 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
14912 ? 1 : -1;
14913 /* Detect bug in mingw. */
14914 int check_WINT:
14915 WINT_MIN == TYPE_MINIMUM (wint_t)
14916 && WINT_MAX == TYPE_MAXIMUM (wint_t)
14917 ? 1 : -1;
14918
14919 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
14920 int check_UINT8_C:
14921 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
14922 int check_UINT16_C:
14923 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
14924
14925 /* Detect bugs in OpenBSD 3.9 stdint.h. */
14926 #ifdef UINT8_MAX
14927 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
14928 #endif
14929 #ifdef UINT16_MAX
14930 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
14931 #endif
14932 #ifdef UINT32_MAX
14933 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
14934 #endif
14935 #ifdef UINT64_MAX
14936 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
14937 #endif
14938 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
14939 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
14940 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
14941 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
14942 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
14943 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
14944 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
14945 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
14946 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
14947 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
14948 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
14949 };
14950
14951 int
14952 main ()
14953 {
14954
14955 ;
14956 return 0;
14957 }
14958 _ACEOF
14959 if ac_fn_c_try_compile "$LINENO"; then :
14960 if test "$cross_compiling" = yes; then :
14961 case "$host_os" in
14962 # Guess yes on native Windows.
14963 mingw*) gl_cv_header_working_stdint_h="guessing yes" ;;
14964 # In general, assume it works.
14965 *) gl_cv_header_working_stdint_h="guessing yes" ;;
14966 esac
14967
14968 else
14969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14970 /* end confdefs.h. */
14971
14972
14973 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
14974 #define __STDC_CONSTANT_MACROS 1
14975 #define __STDC_LIMIT_MACROS 1
14976 #include <stdint.h>
14977
14978
14979 #include <stddef.h>
14980 #include <signal.h>
14981 #if HAVE_WCHAR_H
14982 # include <wchar.h>
14983 #endif
14984
14985
14986 #include <stdio.h>
14987 #include <string.h>
14988 #define MVAL(macro) MVAL1(macro)
14989 #define MVAL1(expression) #expression
14990 static const char *macro_values[] =
14991 {
14992 #ifdef INT8_MAX
14993 MVAL (INT8_MAX),
14994 #endif
14995 #ifdef INT16_MAX
14996 MVAL (INT16_MAX),
14997 #endif
14998 #ifdef INT32_MAX
14999 MVAL (INT32_MAX),
15000 #endif
15001 #ifdef INT64_MAX
15002 MVAL (INT64_MAX),
15003 #endif
15004 #ifdef UINT8_MAX
15005 MVAL (UINT8_MAX),
15006 #endif
15007 #ifdef UINT16_MAX
15008 MVAL (UINT16_MAX),
15009 #endif
15010 #ifdef UINT32_MAX
15011 MVAL (UINT32_MAX),
15012 #endif
15013 #ifdef UINT64_MAX
15014 MVAL (UINT64_MAX),
15015 #endif
15016 NULL
15017 };
15018
15019 int
15020 main ()
15021 {
15022
15023 const char **mv;
15024 for (mv = macro_values; *mv != NULL; mv++)
15025 {
15026 const char *value = *mv;
15027 /* Test whether it looks like a cast expression. */
15028 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
15029 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
15030 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
15031 || strncmp (value, "((int)"/*)*/, 6) == 0
15032 || strncmp (value, "((signed short)"/*)*/, 15) == 0
15033 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
15034 return mv - macro_values + 1;
15035 }
15036 return 0;
15037
15038 ;
15039 return 0;
15040 }
15041 _ACEOF
15042 if ac_fn_c_try_run "$LINENO"; then :
15043 gl_cv_header_working_stdint_h=yes
15044 fi
15045 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15046 conftest.$ac_objext conftest.beam conftest.$ac_ext
15047 fi
15048
15049
15050 fi
15051 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15052
15053 fi
15054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
15055 $as_echo "$gl_cv_header_working_stdint_h" >&6; }
15056 fi
15057
15058 HAVE_C99_STDINT_H=0
15059 HAVE_SYS_BITYPES_H=0
15060 HAVE_SYS_INTTYPES_H=0
15061 GL_GENERATE_STDINT_H=true
15062 case "$gl_cv_header_working_stdint_h" in
15063 *yes)
15064 HAVE_C99_STDINT_H=1
15065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h works without ISO C predefines" >&5
15066 $as_echo_n "checking whether stdint.h works without ISO C predefines... " >&6; }
15067 if ${gl_cv_header_stdint_without_STDC_macros+:} false; then :
15068 $as_echo_n "(cached) " >&6
15069 else
15070 gl_cv_header_stdint_without_STDC_macros=no
15071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15072 /* end confdefs.h. */
15073
15074
15075 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
15076 #include <stdint.h>
15077
15078
15079 #include <stddef.h>
15080 #include <signal.h>
15081 #if HAVE_WCHAR_H
15082 # include <wchar.h>
15083 #endif
15084
15085
15086 intmax_t im = INTMAX_MAX;
15087 int32_t i32 = INT32_C (0x7fffffff);
15088
15089 int
15090 main ()
15091 {
15092
15093 ;
15094 return 0;
15095 }
15096 _ACEOF
15097 if ac_fn_c_try_compile "$LINENO"; then :
15098 gl_cv_header_stdint_without_STDC_macros=yes
15099 fi
15100 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15101
15102 fi
15103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_without_STDC_macros" >&5
15104 $as_echo "$gl_cv_header_stdint_without_STDC_macros" >&6; }
15105
15106 if test $gl_cv_header_stdint_without_STDC_macros = no; then
15107
15108 $as_echo "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
15109
15110
15111 $as_echo "#define __STDC_LIMIT_MACROS 1" >>confdefs.h
15112
15113 fi
15114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5
15115 $as_echo_n "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; }
15116 if ${gl_cv_header_stdint_width+:} false; then :
15117 $as_echo_n "(cached) " >&6
15118 else
15119 gl_cv_header_stdint_width=no
15120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15121 /* end confdefs.h. */
15122
15123 /* Work if build is not clean. */
15124 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
15125 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
15126 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
15127 #endif
15128 #include <stdint.h>
15129
15130 #include <stddef.h>
15131 #include <signal.h>
15132 #if HAVE_WCHAR_H
15133 # include <wchar.h>
15134 #endif
15135
15136 int iw = UINTMAX_WIDTH;
15137
15138 int
15139 main ()
15140 {
15141
15142 ;
15143 return 0;
15144 }
15145 _ACEOF
15146 if ac_fn_c_try_compile "$LINENO"; then :
15147 gl_cv_header_stdint_width=yes
15148 fi
15149 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15150 fi
15151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5
15152 $as_echo "$gl_cv_header_stdint_width" >&6; }
15153 if test "$gl_cv_header_stdint_width" = yes; then
15154 GL_GENERATE_STDINT_H=false
15155 fi
15156 ;;
15157 *)
15158 for ac_header in sys/inttypes.h sys/bitypes.h
15159 do :
15160 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15161 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15162 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15163 cat >>confdefs.h <<_ACEOF
15164 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15165 _ACEOF
15166
15167 fi
15168
15169 done
15170
15171 if test $ac_cv_header_sys_inttypes_h = yes; then
15172 HAVE_SYS_INTTYPES_H=1
15173 fi
15174 if test $ac_cv_header_sys_bitypes_h = yes; then
15175 HAVE_SYS_BITYPES_H=1
15176 fi
15177
15178
15179 if test $APPLE_UNIVERSAL_BUILD = 0; then
15180
15181
15182 for gltype in ptrdiff_t size_t ; do
15183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
15184 $as_echo_n "checking for bit size of $gltype... " >&6; }
15185 if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
15186 $as_echo_n "(cached) " >&6
15187 else
15188 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
15189 #include <stddef.h>
15190 #include <signal.h>
15191 #if HAVE_WCHAR_H
15192 # include <wchar.h>
15193 #endif
15194
15195 #include <limits.h>"; then :
15196
15197 else
15198 result=unknown
15199 fi
15200
15201 eval gl_cv_bitsizeof_${gltype}=\$result
15202
15203 fi
15204 eval ac_res=\$gl_cv_bitsizeof_${gltype}
15205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15206 $as_echo "$ac_res" >&6; }
15207 eval result=\$gl_cv_bitsizeof_${gltype}
15208 if test $result = unknown; then
15209 result=0
15210 fi
15211 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
15212 cat >>confdefs.h <<_ACEOF
15213 #define BITSIZEOF_${GLTYPE} $result
15214 _ACEOF
15215
15216 eval BITSIZEOF_${GLTYPE}=\$result
15217 done
15218
15219
15220 fi
15221
15222
15223 for gltype in sig_atomic_t wchar_t wint_t ; do
15224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
15225 $as_echo_n "checking for bit size of $gltype... " >&6; }
15226 if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
15227 $as_echo_n "(cached) " >&6
15228 else
15229 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
15230 #include <stddef.h>
15231 #include <signal.h>
15232 #if HAVE_WCHAR_H
15233 # include <wchar.h>
15234 #endif
15235
15236 #include <limits.h>"; then :
15237
15238 else
15239 result=unknown
15240 fi
15241
15242 eval gl_cv_bitsizeof_${gltype}=\$result
15243
15244 fi
15245 eval ac_res=\$gl_cv_bitsizeof_${gltype}
15246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15247 $as_echo "$ac_res" >&6; }
15248 eval result=\$gl_cv_bitsizeof_${gltype}
15249 if test $result = unknown; then
15250 result=0
15251 fi
15252 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
15253 cat >>confdefs.h <<_ACEOF
15254 #define BITSIZEOF_${GLTYPE} $result
15255 _ACEOF
15256
15257 eval BITSIZEOF_${GLTYPE}=\$result
15258 done
15259
15260
15261
15262
15263 for gltype in sig_atomic_t wchar_t wint_t ; do
15264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
15265 $as_echo_n "checking whether $gltype is signed... " >&6; }
15266 if eval \${gl_cv_type_${gltype}_signed+:} false; then :
15267 $as_echo_n "(cached) " >&6
15268 else
15269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15270 /* end confdefs.h. */
15271
15272 #include <stddef.h>
15273 #include <signal.h>
15274 #if HAVE_WCHAR_H
15275 # include <wchar.h>
15276 #endif
15277
15278 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
15279 int
15280 main ()
15281 {
15282
15283 ;
15284 return 0;
15285 }
15286 _ACEOF
15287 if ac_fn_c_try_compile "$LINENO"; then :
15288 result=yes
15289 else
15290 result=no
15291 fi
15292 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15293 eval gl_cv_type_${gltype}_signed=\$result
15294
15295 fi
15296 eval ac_res=\$gl_cv_type_${gltype}_signed
15297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15298 $as_echo "$ac_res" >&6; }
15299 eval result=\$gl_cv_type_${gltype}_signed
15300 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
15301 if test "$result" = yes; then
15302 cat >>confdefs.h <<_ACEOF
15303 #define HAVE_SIGNED_${GLTYPE} 1
15304 _ACEOF
15305
15306 eval HAVE_SIGNED_${GLTYPE}=1
15307 else
15308 eval HAVE_SIGNED_${GLTYPE}=0
15309 fi
15310 done
15311
15312
15313 gl_cv_type_ptrdiff_t_signed=yes
15314 gl_cv_type_size_t_signed=no
15315 if test $APPLE_UNIVERSAL_BUILD = 0; then
15316
15317
15318 for gltype in ptrdiff_t size_t ; do
15319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
15320 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
15321 if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
15322 $as_echo_n "(cached) " >&6
15323 else
15324 eval gl_cv_type_${gltype}_suffix=no
15325 eval result=\$gl_cv_type_${gltype}_signed
15326 if test "$result" = yes; then
15327 glsufu=
15328 else
15329 glsufu=u
15330 fi
15331 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
15332 case $glsuf in
15333 '') gltype1='int';;
15334 l) gltype1='long int';;
15335 ll) gltype1='long long int';;
15336 i64) gltype1='__int64';;
15337 u) gltype1='unsigned int';;
15338 ul) gltype1='unsigned long int';;
15339 ull) gltype1='unsigned long long int';;
15340 ui64)gltype1='unsigned __int64';;
15341 esac
15342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15343 /* end confdefs.h. */
15344
15345 #include <stddef.h>
15346 #include <signal.h>
15347 #if HAVE_WCHAR_H
15348 # include <wchar.h>
15349 #endif
15350
15351 extern $gltype foo;
15352 extern $gltype1 foo;
15353 int
15354 main ()
15355 {
15356
15357 ;
15358 return 0;
15359 }
15360 _ACEOF
15361 if ac_fn_c_try_compile "$LINENO"; then :
15362 eval gl_cv_type_${gltype}_suffix=\$glsuf
15363 fi
15364 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15365 eval result=\$gl_cv_type_${gltype}_suffix
15366 test "$result" != no && break
15367 done
15368 fi
15369 eval ac_res=\$gl_cv_type_${gltype}_suffix
15370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15371 $as_echo "$ac_res" >&6; }
15372 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
15373 eval result=\$gl_cv_type_${gltype}_suffix
15374 test "$result" = no && result=
15375 eval ${GLTYPE}_SUFFIX=\$result
15376 cat >>confdefs.h <<_ACEOF
15377 #define ${GLTYPE}_SUFFIX $result
15378 _ACEOF
15379
15380 done
15381
15382
15383 fi
15384
15385
15386 for gltype in sig_atomic_t wchar_t wint_t ; do
15387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
15388 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
15389 if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
15390 $as_echo_n "(cached) " >&6
15391 else
15392 eval gl_cv_type_${gltype}_suffix=no
15393 eval result=\$gl_cv_type_${gltype}_signed
15394 if test "$result" = yes; then
15395 glsufu=
15396 else
15397 glsufu=u
15398 fi
15399 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
15400 case $glsuf in
15401 '') gltype1='int';;
15402 l) gltype1='long int';;
15403 ll) gltype1='long long int';;
15404 i64) gltype1='__int64';;
15405 u) gltype1='unsigned int';;
15406 ul) gltype1='unsigned long int';;
15407 ull) gltype1='unsigned long long int';;
15408 ui64)gltype1='unsigned __int64';;
15409 esac
15410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15411 /* end confdefs.h. */
15412
15413 #include <stddef.h>
15414 #include <signal.h>
15415 #if HAVE_WCHAR_H
15416 # include <wchar.h>
15417 #endif
15418
15419 extern $gltype foo;
15420 extern $gltype1 foo;
15421 int
15422 main ()
15423 {
15424
15425 ;
15426 return 0;
15427 }
15428 _ACEOF
15429 if ac_fn_c_try_compile "$LINENO"; then :
15430 eval gl_cv_type_${gltype}_suffix=\$glsuf
15431 fi
15432 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15433 eval result=\$gl_cv_type_${gltype}_suffix
15434 test "$result" != no && break
15435 done
15436 fi
15437 eval ac_res=\$gl_cv_type_${gltype}_suffix
15438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15439 $as_echo "$ac_res" >&6; }
15440 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
15441 eval result=\$gl_cv_type_${gltype}_suffix
15442 test "$result" = no && result=
15443 eval ${GLTYPE}_SUFFIX=\$result
15444 cat >>confdefs.h <<_ACEOF
15445 #define ${GLTYPE}_SUFFIX $result
15446 _ACEOF
15447
15448 done
15449
15450
15451
15452 if test $GNULIBHEADERS_OVERRIDE_WINT_T = 1; then
15453 BITSIZEOF_WINT_T=32
15454 fi
15455
15456 ;;
15457 esac
15458
15459
15460
15461 GL_GENERATE_LIMITS_H=true
15462
15463
15464
15465
15466
15467
15468
15469 HAVE_DECL_IMAXABS=1;
15470 HAVE_DECL_IMAXDIV=1;
15471 HAVE_DECL_STRTOIMAX=1;
15472 HAVE_DECL_STRTOUMAX=1;
15473 HAVE_IMAXDIV_T=1;
15474 REPLACE_STRTOIMAX=0;
15475 REPLACE_STRTOUMAX=0;
15476 INT32_MAX_LT_INTMAX_MAX=1;
15477 INT64_MAX_EQ_LONG_MAX='defined _LP64';
15478 PRIPTR_PREFIX=__PRIPTR_PREFIX;
15479 UINT32_MAX_LT_UINTMAX_MAX=1;
15480 UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
15481
15482
15483
15484
15485
15486
15487
15488
15489
15490
15491
15492
15493
15494
15495
15496 if test $gl_cv_have_include_next = yes; then
15497 gl_cv_next_inttypes_h='<'inttypes.h'>'
15498 else
15499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
15500 $as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
15501 if ${gl_cv_next_inttypes_h+:} false; then :
15502 $as_echo_n "(cached) " >&6
15503 else
15504
15505 if test $ac_cv_header_inttypes_h = yes; then
15506
15507
15508
15509
15510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15511 /* end confdefs.h. */
15512 #include <inttypes.h>
15513 _ACEOF
15514 case "$host_os" in
15515 aix*) gl_absname_cpp="$ac_cpp -C" ;;
15516 *) gl_absname_cpp="$ac_cpp" ;;
15517 esac
15518
15519 case "$host_os" in
15520 mingw*)
15521 gl_dirsep_regex='[/\\]'
15522 ;;
15523 *)
15524 gl_dirsep_regex='\/'
15525 ;;
15526 esac
15527 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15528 gl_header_literal_regex=`echo 'inttypes.h' \
15529 | sed -e "$gl_make_literal_regex_sed"`
15530 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15531 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15532 s|^/[^/]|//&|
15533 p
15534 q
15535 }'
15536
15537 gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15538 sed -n "$gl_absolute_header_sed"`
15539
15540 gl_header=$gl_cv_absolute_inttypes_h
15541 gl_cv_next_inttypes_h='"'$gl_header'"'
15542 else
15543 gl_cv_next_inttypes_h='<'inttypes.h'>'
15544 fi
15545
15546
15547 fi
15548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
15549 $as_echo "$gl_cv_next_inttypes_h" >&6; }
15550 fi
15551 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
15552
15553 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15554 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15555 gl_next_as_first_directive='<'inttypes.h'>'
15556 else
15557 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15558 gl_next_as_first_directive=$gl_cv_next_inttypes_h
15559 fi
15560 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
15561
15562
15563
15564
15565
15566
15567
15568
15569
15570
15571
15572
15573
15574
15575
15576
15577 PRIPTR_PREFIX=
15578 if $GL_GENERATE_STDINT_H; then
15579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15580 /* end confdefs.h. */
15581
15582 #ifdef _WIN64
15583 LLP64
15584 #endif
15585
15586 int
15587 main ()
15588 {
15589
15590 ;
15591 return 0;
15592 }
15593
15594 _ACEOF
15595 if ac_fn_c_try_compile "$LINENO"; then :
15596 PRIPTR_PREFIX='"l"'
15597 else
15598 PRIPTR_PREFIX='"ll"'
15599 fi
15600 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15601 else
15602 for glpfx in '' l ll I64; do
15603 case $glpfx in
15604 '') gltype1='int';;
15605 l) gltype1='long int';;
15606 ll) gltype1='long long int';;
15607 I64) gltype1='__int64';;
15608 esac
15609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15610 /* end confdefs.h. */
15611 #include <stdint.h>
15612 extern intptr_t foo;
15613 extern $gltype1 foo;
15614 int
15615 main ()
15616 {
15617
15618 ;
15619 return 0;
15620 }
15621 _ACEOF
15622 if ac_fn_c_try_compile "$LINENO"; then :
15623 PRIPTR_PREFIX='"'$glpfx'"'
15624 fi
15625 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15626 test -n "$PRIPTR_PREFIX" && break
15627 done
15628 fi
15629
15630
15631
15632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
15633 $as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
15634 if ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+:} false; then :
15635 $as_echo_n "(cached) " >&6
15636 else
15637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15638 /* end confdefs.h. */
15639 /* Work also in C++ mode. */
15640 #define __STDC_LIMIT_MACROS 1
15641
15642 /* Work if build is not clean. */
15643 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
15644
15645 #include <limits.h>
15646 #if HAVE_STDINT_H
15647 #include <stdint.h>
15648 #endif
15649
15650 #if defined INT32_MAX && defined INTMAX_MAX
15651 #define CONDITION (INT32_MAX < INTMAX_MAX)
15652 #else
15653 #define CONDITION (sizeof (int) < sizeof (long long int))
15654 #endif
15655 int test[CONDITION ? 1 : -1];
15656 int
15657 main ()
15658 {
15659
15660 ;
15661 return 0;
15662 }
15663 _ACEOF
15664 if ac_fn_c_try_compile "$LINENO"; then :
15665 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
15666 else
15667 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
15668 fi
15669 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15670 fi
15671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
15672 $as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
15673 if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
15674 INT32_MAX_LT_INTMAX_MAX=1;
15675 else
15676 INT32_MAX_LT_INTMAX_MAX=0;
15677 fi
15678
15679
15680 if test $APPLE_UNIVERSAL_BUILD = 0; then
15681
15682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
15683 $as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; }
15684 if ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+:} false; then :
15685 $as_echo_n "(cached) " >&6
15686 else
15687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15688 /* end confdefs.h. */
15689 /* Work also in C++ mode. */
15690 #define __STDC_LIMIT_MACROS 1
15691
15692 /* Work if build is not clean. */
15693 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
15694
15695 #include <limits.h>
15696 #if HAVE_STDINT_H
15697 #include <stdint.h>
15698 #endif
15699
15700 #if defined INT64_MAX
15701 #define CONDITION (INT64_MAX == LONG_MAX)
15702 #else
15703 #define CONDITION (sizeof (long long int) == sizeof (long int))
15704 #endif
15705 int test[CONDITION ? 1 : -1];
15706 int
15707 main ()
15708 {
15709
15710 ;
15711 return 0;
15712 }
15713 _ACEOF
15714 if ac_fn_c_try_compile "$LINENO"; then :
15715 gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
15716 else
15717 gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
15718 fi
15719 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15720 fi
15721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
15722 $as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
15723 if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
15724 INT64_MAX_EQ_LONG_MAX=1;
15725 else
15726 INT64_MAX_EQ_LONG_MAX=0;
15727 fi
15728
15729
15730 else
15731 INT64_MAX_EQ_LONG_MAX=-1
15732 fi
15733
15734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
15735 $as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
15736 if ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+:} false; then :
15737 $as_echo_n "(cached) " >&6
15738 else
15739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15740 /* end confdefs.h. */
15741 /* Work also in C++ mode. */
15742 #define __STDC_LIMIT_MACROS 1
15743
15744 /* Work if build is not clean. */
15745 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
15746
15747 #include <limits.h>
15748 #if HAVE_STDINT_H
15749 #include <stdint.h>
15750 #endif
15751
15752 #if defined UINT32_MAX && defined UINTMAX_MAX
15753 #define CONDITION (UINT32_MAX < UINTMAX_MAX)
15754 #else
15755 #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
15756 #endif
15757 int test[CONDITION ? 1 : -1];
15758 int
15759 main ()
15760 {
15761
15762 ;
15763 return 0;
15764 }
15765 _ACEOF
15766 if ac_fn_c_try_compile "$LINENO"; then :
15767 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
15768 else
15769 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
15770 fi
15771 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15772 fi
15773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
15774 $as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
15775 if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
15776 UINT32_MAX_LT_UINTMAX_MAX=1;
15777 else
15778 UINT32_MAX_LT_UINTMAX_MAX=0;
15779 fi
15780
15781
15782 if test $APPLE_UNIVERSAL_BUILD = 0; then
15783
15784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
15785 $as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
15786 if ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+:} false; then :
15787 $as_echo_n "(cached) " >&6
15788 else
15789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15790 /* end confdefs.h. */
15791 /* Work also in C++ mode. */
15792 #define __STDC_LIMIT_MACROS 1
15793
15794 /* Work if build is not clean. */
15795 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
15796
15797 #include <limits.h>
15798 #if HAVE_STDINT_H
15799 #include <stdint.h>
15800 #endif
15801
15802 #if defined UINT64_MAX
15803 #define CONDITION (UINT64_MAX == ULONG_MAX)
15804 #else
15805 #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
15806 #endif
15807 int test[CONDITION ? 1 : -1];
15808 int
15809 main ()
15810 {
15811
15812 ;
15813 return 0;
15814 }
15815 _ACEOF
15816 if ac_fn_c_try_compile "$LINENO"; then :
15817 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
15818 else
15819 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
15820 fi
15821 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15822 fi
15823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
15824 $as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
15825 if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
15826 UINT64_MAX_EQ_ULONG_MAX=1;
15827 else
15828 UINT64_MAX_EQ_ULONG_MAX=0;
15829 fi
15830
15831
15832 else
15833 UINT64_MAX_EQ_ULONG_MAX=-1
15834 fi
15835
15836
15837
15838
15839 GL_GNULIB_IMAXABS=0
15840
15841
15842
15843 GL_GNULIB_IMAXDIV=0
15844
15845
15846
15847 GL_GNULIB_STRTOIMAX=0
15848
15849
15850
15851 GL_GNULIB_STRTOUMAX=0
15852
15853
15854
15855
15856
15857
15858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
15859 $as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
15860 if ${gl_cv_cc_double_expbit0+:} false; then :
15861 $as_echo_n "(cached) " >&6
15862 else
15863
15864 if test "$cross_compiling" = yes; then :
15865
15866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15867 /* end confdefs.h. */
15868
15869 #if defined arm || defined __arm || defined __arm__
15870 mixed_endianness
15871 #endif
15872
15873 _ACEOF
15874 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15875 $EGREP "mixed_endianness" >/dev/null 2>&1; then :
15876 gl_cv_cc_double_expbit0="unknown"
15877 else
15878
15879 :
15880 if ${ac_cv_c_bigendian+:} false; then :
15881 $as_echo_n "(cached) " >&6
15882 else
15883 ac_cv_c_bigendian=unknown
15884 # See if we're dealing with a universal compiler.
15885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15886 /* end confdefs.h. */
15887 #ifndef __APPLE_CC__
15888 not a universal capable compiler
15889 #endif
15890 typedef int dummy;
15891
15892 _ACEOF
15893 if ac_fn_c_try_compile "$LINENO"; then :
15894
15895 # Check for potential -arch flags. It is not universal unless
15896 # there are at least two -arch flags with different values.
15897 ac_arch=
15898 ac_prev=
15899 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
15900 if test -n "$ac_prev"; then
15901 case $ac_word in
15902 i?86 | x86_64 | ppc | ppc64)
15903 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
15904 ac_arch=$ac_word
15905 else
15906 ac_cv_c_bigendian=universal
15907 break
15908 fi
15909 ;;
15910 esac
15911 ac_prev=
15912 elif test "x$ac_word" = "x-arch"; then
15913 ac_prev=arch
15914 fi
15915 done
15916 fi
15917 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15918 if test $ac_cv_c_bigendian = unknown; then
15919 # See if sys/param.h defines the BYTE_ORDER macro.
15920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15921 /* end confdefs.h. */
15922 #include <sys/types.h>
15923 #include <sys/param.h>
15924
15925 int
15926 main ()
15927 {
15928 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
15929 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
15930 && LITTLE_ENDIAN)
15931 bogus endian macros
15932 #endif
15933
15934 ;
15935 return 0;
15936 }
15937 _ACEOF
15938 if ac_fn_c_try_compile "$LINENO"; then :
15939 # It does; now see whether it defined to BIG_ENDIAN or not.
15940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15941 /* end confdefs.h. */
15942 #include <sys/types.h>
15943 #include <sys/param.h>
15944
15945 int
15946 main ()
15947 {
15948 #if BYTE_ORDER != BIG_ENDIAN
15949 not big endian
15950 #endif
15951
15952 ;
15953 return 0;
15954 }
15955 _ACEOF
15956 if ac_fn_c_try_compile "$LINENO"; then :
15957 ac_cv_c_bigendian=yes
15958 else
15959 ac_cv_c_bigendian=no
15960 fi
15961 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15962 fi
15963 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15964 fi
15965 if test $ac_cv_c_bigendian = unknown; then
15966 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
15967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15968 /* end confdefs.h. */
15969 #include <limits.h>
15970
15971 int
15972 main ()
15973 {
15974 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
15975 bogus endian macros
15976 #endif
15977
15978 ;
15979 return 0;
15980 }
15981 _ACEOF
15982 if ac_fn_c_try_compile "$LINENO"; then :
15983 # It does; now see whether it defined to _BIG_ENDIAN or not.
15984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15985 /* end confdefs.h. */
15986 #include <limits.h>
15987
15988 int
15989 main ()
15990 {
15991 #ifndef _BIG_ENDIAN
15992 not big endian
15993 #endif
15994
15995 ;
15996 return 0;
15997 }
15998 _ACEOF
15999 if ac_fn_c_try_compile "$LINENO"; then :
16000 ac_cv_c_bigendian=yes
16001 else
16002 ac_cv_c_bigendian=no
16003 fi
16004 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16005 fi
16006 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16007 fi
16008 if test $ac_cv_c_bigendian = unknown; then
16009 # Compile a test program.
16010 if test "$cross_compiling" = yes; then :
16011 # Try to guess by grepping values from an object file.
16012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16013 /* end confdefs.h. */
16014 short int ascii_mm[] =
16015 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
16016 short int ascii_ii[] =
16017 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
16018 int use_ascii (int i) {
16019 return ascii_mm[i] + ascii_ii[i];
16020 }
16021 short int ebcdic_ii[] =
16022 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
16023 short int ebcdic_mm[] =
16024 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
16025 int use_ebcdic (int i) {
16026 return ebcdic_mm[i] + ebcdic_ii[i];
16027 }
16028 extern int foo;
16029
16030 int
16031 main ()
16032 {
16033 return use_ascii (foo) == use_ebcdic (foo);
16034 ;
16035 return 0;
16036 }
16037 _ACEOF
16038 if ac_fn_c_try_compile "$LINENO"; then :
16039 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
16040 ac_cv_c_bigendian=yes
16041 fi
16042 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
16043 if test "$ac_cv_c_bigendian" = unknown; then
16044 ac_cv_c_bigendian=no
16045 else
16046 # finding both strings is unlikely to happen, but who knows?
16047 ac_cv_c_bigendian=unknown
16048 fi
16049 fi
16050 fi
16051 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16052 else
16053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16054 /* end confdefs.h. */
16055 $ac_includes_default
16056 int
16057 main ()
16058 {
16059
16060 /* Are we little or big endian? From Harbison&Steele. */
16061 union
16062 {
16063 long int l;
16064 char c[sizeof (long int)];
16065 } u;
16066 u.l = 1;
16067 return u.c[sizeof (long int) - 1] == 1;
16068
16069 ;
16070 return 0;
16071 }
16072 _ACEOF
16073 if ac_fn_c_try_run "$LINENO"; then :
16074 ac_cv_c_bigendian=no
16075 else
16076 ac_cv_c_bigendian=yes
16077 fi
16078 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16079 conftest.$ac_objext conftest.beam conftest.$ac_ext
16080 fi
16081
16082 fi
16083 fi
16084 :
16085 case $ac_cv_c_bigendian in #(
16086 yes)
16087 gl_cv_cc_double_expbit0="word 0 bit 20";; #(
16088 no)
16089 gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
16090 universal)
16091
16092 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
16093
16094 ;; #(
16095 *)
16096 gl_cv_cc_double_expbit0="unknown" ;;
16097 esac
16098
16099
16100 fi
16101 rm -f conftest*
16102
16103
16104 else
16105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16106 /* end confdefs.h. */
16107
16108 #include <float.h>
16109 #include <stddef.h>
16110 #include <stdio.h>
16111 #include <string.h>
16112 #define NWORDS \
16113 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
16114 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
16115 static unsigned int ored_words[NWORDS];
16116 static unsigned int anded_words[NWORDS];
16117 static void add_to_ored_words (double x)
16118 {
16119 memory_double m;
16120 size_t i;
16121 /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
16122 memset (&m, 0, sizeof (memory_double));
16123 m.value = x;
16124 for (i = 0; i < NWORDS; i++)
16125 {
16126 ored_words[i] |= m.word[i];
16127 anded_words[i] &= m.word[i];
16128 }
16129 }
16130 int main ()
16131 {
16132 size_t j;
16133 FILE *fp = fopen ("conftest.out", "w");
16134 if (fp == NULL)
16135 return 1;
16136 for (j = 0; j < NWORDS; j++)
16137 anded_words[j] = ~ (unsigned int) 0;
16138 add_to_ored_words (0.25);
16139 add_to_ored_words (0.5);
16140 add_to_ored_words (1.0);
16141 add_to_ored_words (2.0);
16142 add_to_ored_words (4.0);
16143 /* Remove bits that are common (e.g. if representation of the first mantissa
16144 bit is explicit). */
16145 for (j = 0; j < NWORDS; j++)
16146 ored_words[j] &= ~anded_words[j];
16147 /* Now find the nonzero word. */
16148 for (j = 0; j < NWORDS; j++)
16149 if (ored_words[j] != 0)
16150 break;
16151 if (j < NWORDS)
16152 {
16153 size_t i;
16154 for (i = j + 1; i < NWORDS; i++)
16155 if (ored_words[i] != 0)
16156 {
16157 fprintf (fp, "unknown");
16158 return (fclose (fp) != 0);
16159 }
16160 for (i = 0; ; i++)
16161 if ((ored_words[j] >> i) & 1)
16162 {
16163 fprintf (fp, "word %d bit %d", (int) j, (int) i);
16164 return (fclose (fp) != 0);
16165 }
16166 }
16167 fprintf (fp, "unknown");
16168 return (fclose (fp) != 0);
16169 }
16170
16171 _ACEOF
16172 if ac_fn_c_try_run "$LINENO"; then :
16173 gl_cv_cc_double_expbit0=`cat conftest.out`
16174 else
16175 gl_cv_cc_double_expbit0="unknown"
16176 fi
16177 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16178 conftest.$ac_objext conftest.beam conftest.$ac_ext
16179 fi
16180
16181 rm -f conftest.out
16182
16183 fi
16184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
16185 $as_echo "$gl_cv_cc_double_expbit0" >&6; }
16186 case "$gl_cv_cc_double_expbit0" in
16187 word*bit*)
16188 word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
16189 bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
16190
16191 cat >>confdefs.h <<_ACEOF
16192 #define DBL_EXPBIT0_WORD $word
16193 _ACEOF
16194
16195
16196 cat >>confdefs.h <<_ACEOF
16197 #define DBL_EXPBIT0_BIT $bit
16198 _ACEOF
16199
16200 ;;
16201 esac
16202
16203
16204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
16205 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
16206 if ${ac_cv_c_bigendian+:} false; then :
16207 $as_echo_n "(cached) " >&6
16208 else
16209 ac_cv_c_bigendian=unknown
16210 # See if we're dealing with a universal compiler.
16211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16212 /* end confdefs.h. */
16213 #ifndef __APPLE_CC__
16214 not a universal capable compiler
16215 #endif
16216 typedef int dummy;
16217
16218 _ACEOF
16219 if ac_fn_c_try_compile "$LINENO"; then :
16220
16221 # Check for potential -arch flags. It is not universal unless
16222 # there are at least two -arch flags with different values.
16223 ac_arch=
16224 ac_prev=
16225 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
16226 if test -n "$ac_prev"; then
16227 case $ac_word in
16228 i?86 | x86_64 | ppc | ppc64)
16229 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
16230 ac_arch=$ac_word
16231 else
16232 ac_cv_c_bigendian=universal
16233 break
16234 fi
16235 ;;
16236 esac
16237 ac_prev=
16238 elif test "x$ac_word" = "x-arch"; then
16239 ac_prev=arch
16240 fi
16241 done
16242 fi
16243 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16244 if test $ac_cv_c_bigendian = unknown; then
16245 # See if sys/param.h defines the BYTE_ORDER macro.
16246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16247 /* end confdefs.h. */
16248 #include <sys/types.h>
16249 #include <sys/param.h>
16250
16251 int
16252 main ()
16253 {
16254 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
16255 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
16256 && LITTLE_ENDIAN)
16257 bogus endian macros
16258 #endif
16259
16260 ;
16261 return 0;
16262 }
16263 _ACEOF
16264 if ac_fn_c_try_compile "$LINENO"; then :
16265 # It does; now see whether it defined to BIG_ENDIAN or not.
16266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16267 /* end confdefs.h. */
16268 #include <sys/types.h>
16269 #include <sys/param.h>
16270
16271 int
16272 main ()
16273 {
16274 #if BYTE_ORDER != BIG_ENDIAN
16275 not big endian
16276 #endif
16277
16278 ;
16279 return 0;
16280 }
16281 _ACEOF
16282 if ac_fn_c_try_compile "$LINENO"; then :
16283 ac_cv_c_bigendian=yes
16284 else
16285 ac_cv_c_bigendian=no
16286 fi
16287 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16288 fi
16289 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16290 fi
16291 if test $ac_cv_c_bigendian = unknown; then
16292 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
16293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16294 /* end confdefs.h. */
16295 #include <limits.h>
16296
16297 int
16298 main ()
16299 {
16300 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
16301 bogus endian macros
16302 #endif
16303
16304 ;
16305 return 0;
16306 }
16307 _ACEOF
16308 if ac_fn_c_try_compile "$LINENO"; then :
16309 # It does; now see whether it defined to _BIG_ENDIAN or not.
16310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16311 /* end confdefs.h. */
16312 #include <limits.h>
16313
16314 int
16315 main ()
16316 {
16317 #ifndef _BIG_ENDIAN
16318 not big endian
16319 #endif
16320
16321 ;
16322 return 0;
16323 }
16324 _ACEOF
16325 if ac_fn_c_try_compile "$LINENO"; then :
16326 ac_cv_c_bigendian=yes
16327 else
16328 ac_cv_c_bigendian=no
16329 fi
16330 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16331 fi
16332 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16333 fi
16334 if test $ac_cv_c_bigendian = unknown; then
16335 # Compile a test program.
16336 if test "$cross_compiling" = yes; then :
16337 # Try to guess by grepping values from an object file.
16338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16339 /* end confdefs.h. */
16340 short int ascii_mm[] =
16341 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
16342 short int ascii_ii[] =
16343 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
16344 int use_ascii (int i) {
16345 return ascii_mm[i] + ascii_ii[i];
16346 }
16347 short int ebcdic_ii[] =
16348 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
16349 short int ebcdic_mm[] =
16350 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
16351 int use_ebcdic (int i) {
16352 return ebcdic_mm[i] + ebcdic_ii[i];
16353 }
16354 extern int foo;
16355
16356 int
16357 main ()
16358 {
16359 return use_ascii (foo) == use_ebcdic (foo);
16360 ;
16361 return 0;
16362 }
16363 _ACEOF
16364 if ac_fn_c_try_compile "$LINENO"; then :
16365 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
16366 ac_cv_c_bigendian=yes
16367 fi
16368 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
16369 if test "$ac_cv_c_bigendian" = unknown; then
16370 ac_cv_c_bigendian=no
16371 else
16372 # finding both strings is unlikely to happen, but who knows?
16373 ac_cv_c_bigendian=unknown
16374 fi
16375 fi
16376 fi
16377 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16378 else
16379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16380 /* end confdefs.h. */
16381 $ac_includes_default
16382 int
16383 main ()
16384 {
16385
16386 /* Are we little or big endian? From Harbison&Steele. */
16387 union
16388 {
16389 long int l;
16390 char c[sizeof (long int)];
16391 } u;
16392 u.l = 1;
16393 return u.c[sizeof (long int) - 1] == 1;
16394
16395 ;
16396 return 0;
16397 }
16398 _ACEOF
16399 if ac_fn_c_try_run "$LINENO"; then :
16400 ac_cv_c_bigendian=no
16401 else
16402 ac_cv_c_bigendian=yes
16403 fi
16404 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16405 conftest.$ac_objext conftest.beam conftest.$ac_ext
16406 fi
16407
16408 fi
16409 fi
16410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
16411 $as_echo "$ac_cv_c_bigendian" >&6; }
16412 case $ac_cv_c_bigendian in #(
16413 yes)
16414 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
16415 ;; #(
16416 no)
16417 ;; #(
16418 universal)
16419
16420 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
16421
16422 ;; #(
16423 *)
16424 as_fn_error $? "unknown endianness
16425 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
16426 esac
16427
16428
16429
16430 HAVE_NEWLOCALE=1;
16431 HAVE_DUPLOCALE=1;
16432 HAVE_FREELOCALE=1;
16433 REPLACE_LOCALECONV=0;
16434 REPLACE_SETLOCALE=0;
16435 REPLACE_NEWLOCALE=0;
16436 REPLACE_DUPLOCALE=0;
16437 REPLACE_FREELOCALE=0;
16438 REPLACE_STRUCT_LCONV=0;
16439 LOCALENAME_ENHANCE_LOCALE_FUNCS=0;
16440
16441
16442 REPLACE_NULL=0;
16443 HAVE_MAX_ALIGN_T=1;
16444 HAVE_WCHAR_T=1;
16445
16446
16447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
16448 $as_echo_n "checking for wchar_t... " >&6; }
16449 if ${gt_cv_c_wchar_t+:} false; then :
16450 $as_echo_n "(cached) " >&6
16451 else
16452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16453 /* end confdefs.h. */
16454 #include <stddef.h>
16455 wchar_t foo = (wchar_t)'\0';
16456 int
16457 main ()
16458 {
16459
16460 ;
16461 return 0;
16462 }
16463 _ACEOF
16464 if ac_fn_c_try_compile "$LINENO"; then :
16465 gt_cv_c_wchar_t=yes
16466 else
16467 gt_cv_c_wchar_t=no
16468 fi
16469 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16470 fi
16471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
16472 $as_echo "$gt_cv_c_wchar_t" >&6; }
16473 if test $gt_cv_c_wchar_t = yes; then
16474
16475 $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
16476
16477 fi
16478
16479
16480
16481
16482
16483
16484
16485 GL_GENERATE_STDDEF_H=false
16486
16487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5
16488 $as_echo_n "checking for good max_align_t... " >&6; }
16489 if ${gl_cv_type_max_align_t+:} false; then :
16490 $as_echo_n "(cached) " >&6
16491 else
16492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16493 /* end confdefs.h. */
16494 #include <stddef.h>
16495 unsigned int s = sizeof (max_align_t);
16496 #if defined __GNUC__ || defined __clang__ || defined __IBM__ALIGNOF__
16497 int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
16498 int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1];
16499 #endif
16500 typedef struct { char a; max_align_t b; } max_helper;
16501 typedef struct { char a; long b; } long_helper;
16502 typedef struct { char a; double b; } double_helper;
16503 typedef struct { char a; long double b; } long_double_helper;
16504 int check3[2 * (offsetof (long_helper, b) <= offsetof (max_helper, b)) - 1];
16505 int check4[2 * (offsetof (double_helper, b) <= offsetof (max_helper, b)) - 1];
16506 int check5[2 * (offsetof (long_double_helper, b) <= offsetof (max_helper, b)) - 1];
16507
16508 int
16509 main ()
16510 {
16511
16512 ;
16513 return 0;
16514 }
16515 _ACEOF
16516 if ac_fn_c_try_compile "$LINENO"; then :
16517 gl_cv_type_max_align_t=yes
16518 else
16519 gl_cv_type_max_align_t=no
16520 fi
16521 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16522
16523 fi
16524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5
16525 $as_echo "$gl_cv_type_max_align_t" >&6; }
16526 if test $gl_cv_type_max_align_t = no; then
16527 HAVE_MAX_ALIGN_T=0
16528 GL_GENERATE_STDDEF_H=true
16529 fi
16530
16531 if test $gt_cv_c_wchar_t = no; then
16532 HAVE_WCHAR_T=0
16533 GL_GENERATE_STDDEF_H=true
16534 fi
16535
16536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
16537 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
16538 if ${gl_cv_decl_null_works+:} false; then :
16539 $as_echo_n "(cached) " >&6
16540 else
16541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16542 /* end confdefs.h. */
16543 #include <stddef.h>
16544 int test[2 * (sizeof NULL == sizeof (void *)) -1];
16545
16546 int
16547 main ()
16548 {
16549
16550 ;
16551 return 0;
16552 }
16553 _ACEOF
16554 if ac_fn_c_try_compile "$LINENO"; then :
16555 gl_cv_decl_null_works=yes
16556 else
16557 gl_cv_decl_null_works=no
16558 fi
16559 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16560 fi
16561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
16562 $as_echo "$gl_cv_decl_null_works" >&6; }
16563 if test $gl_cv_decl_null_works = no; then
16564 REPLACE_NULL=1
16565 GL_GENERATE_STDDEF_H=true
16566 fi
16567
16568 if $GL_GENERATE_STDDEF_H; then
16569
16570
16571
16572
16573
16574
16575
16576
16577 if test $gl_cv_have_include_next = yes; then
16578 gl_cv_next_stddef_h='<'stddef.h'>'
16579 else
16580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
16581 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
16582 if ${gl_cv_next_stddef_h+:} false; then :
16583 $as_echo_n "(cached) " >&6
16584 else
16585
16586
16587
16588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16589 /* end confdefs.h. */
16590 #include <stddef.h>
16591 _ACEOF
16592 case "$host_os" in
16593 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16594 *) gl_absname_cpp="$ac_cpp" ;;
16595 esac
16596
16597 case "$host_os" in
16598 mingw*)
16599 gl_dirsep_regex='[/\\]'
16600 ;;
16601 *)
16602 gl_dirsep_regex='\/'
16603 ;;
16604 esac
16605 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16606 gl_header_literal_regex=`echo 'stddef.h' \
16607 | sed -e "$gl_make_literal_regex_sed"`
16608 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16609 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16610 s|^/[^/]|//&|
16611 p
16612 q
16613 }'
16614
16615 gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16616 sed -n "$gl_absolute_header_sed"`
16617
16618 gl_header=$gl_cv_absolute_stddef_h
16619 gl_cv_next_stddef_h='"'$gl_header'"'
16620
16621
16622 fi
16623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
16624 $as_echo "$gl_cv_next_stddef_h" >&6; }
16625 fi
16626 NEXT_STDDEF_H=$gl_cv_next_stddef_h
16627
16628 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16629 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16630 gl_next_as_first_directive='<'stddef.h'>'
16631 else
16632 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
16633 gl_next_as_first_directive=$gl_cv_next_stddef_h
16634 fi
16635 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
16636
16637
16638
16639
16640 fi
16641
16642
16643
16644
16645
16646
16647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5
16648 $as_echo_n "checking whether locale.h defines locale_t... " >&6; }
16649 if ${gl_cv_header_locale_has_locale_t+:} false; then :
16650 $as_echo_n "(cached) " >&6
16651 else
16652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16653 /* end confdefs.h. */
16654 #include <locale.h>
16655 locale_t x;
16656 int
16657 main ()
16658 {
16659
16660 ;
16661 return 0;
16662 }
16663 _ACEOF
16664 if ac_fn_c_try_compile "$LINENO"; then :
16665 gl_cv_header_locale_has_locale_t=yes
16666 else
16667 gl_cv_header_locale_has_locale_t=no
16668 fi
16669 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16670
16671 fi
16672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_has_locale_t" >&5
16673 $as_echo "$gl_cv_header_locale_has_locale_t" >&6; }
16674
16675
16676 if test $ac_cv_header_xlocale_h = yes; then
16677 HAVE_XLOCALE_H=1
16678 if test $gl_cv_header_locale_has_locale_t = yes; then
16679 gl_cv_header_locale_h_needs_xlocale_h=no
16680 else
16681 gl_cv_header_locale_h_needs_xlocale_h=yes
16682 fi
16683 HAVE_LOCALE_T=1
16684 else
16685 HAVE_XLOCALE_H=0
16686 gl_cv_header_locale_h_needs_xlocale_h=no
16687 if test $gl_cv_header_locale_has_locale_t = yes; then
16688 HAVE_LOCALE_T=1
16689 else
16690 HAVE_LOCALE_T=0
16691 fi
16692 fi
16693
16694
16695
16696
16697
16698
16699
16700
16701
16702
16703
16704
16705 case "$host_os" in
16706 solaris*)
16707
16708 $as_echo "#define _LCONV_C99 1" >>confdefs.h
16709
16710 ;;
16711 esac
16712
16713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5
16714 $as_echo_n "checking whether locale.h conforms to POSIX:2001... " >&6; }
16715 if ${gl_cv_header_locale_h_posix2001+:} false; then :
16716 $as_echo_n "(cached) " >&6
16717 else
16718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16719 /* end confdefs.h. */
16720 #include <locale.h>
16721 int x = LC_MESSAGES;
16722 int y = sizeof (((struct lconv *) 0)->decimal_point);
16723 int
16724 main ()
16725 {
16726
16727 ;
16728 return 0;
16729 }
16730 _ACEOF
16731 if ac_fn_c_try_compile "$LINENO"; then :
16732 gl_cv_header_locale_h_posix2001=yes
16733 else
16734 gl_cv_header_locale_h_posix2001=no
16735 fi
16736 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16737 fi
16738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_h_posix2001" >&5
16739 $as_echo "$gl_cv_header_locale_h_posix2001" >&6; }
16740
16741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct lconv is properly defined" >&5
16742 $as_echo_n "checking whether struct lconv is properly defined... " >&6; }
16743 if ${gl_cv_sys_struct_lconv_ok+:} false; then :
16744 $as_echo_n "(cached) " >&6
16745 else
16746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16747 /* end confdefs.h. */
16748 #include <locale.h>
16749 struct lconv l;
16750 int x = sizeof (l.decimal_point);
16751 int y = sizeof (l.int_p_cs_precedes);
16752 int
16753 main ()
16754 {
16755
16756 ;
16757 return 0;
16758 }
16759 _ACEOF
16760 if ac_fn_c_try_compile "$LINENO"; then :
16761 gl_cv_sys_struct_lconv_ok=yes
16762 else
16763 gl_cv_sys_struct_lconv_ok=no
16764 fi
16765 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16766
16767 fi
16768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_lconv_ok" >&5
16769 $as_echo "$gl_cv_sys_struct_lconv_ok" >&6; }
16770 if test $gl_cv_sys_struct_lconv_ok = no; then
16771 case "$host_os" in
16772 mingw*)
16773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16774 /* end confdefs.h. */
16775
16776 #ifdef _MSC_VER
16777 Special
16778 #endif
16779
16780 _ACEOF
16781 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16782 $EGREP "Special" >/dev/null 2>&1; then :
16783
16784 else
16785 REPLACE_STRUCT_LCONV=1
16786 fi
16787 rm -f conftest*
16788
16789 ;;
16790 *) REPLACE_STRUCT_LCONV=1 ;;
16791 esac
16792 fi
16793
16794
16795
16796
16797
16798
16799
16800
16801
16802 if test $gl_cv_have_include_next = yes; then
16803 gl_cv_next_locale_h='<'locale.h'>'
16804 else
16805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <locale.h>" >&5
16806 $as_echo_n "checking absolute name of <locale.h>... " >&6; }
16807 if ${gl_cv_next_locale_h+:} false; then :
16808 $as_echo_n "(cached) " >&6
16809 else
16810
16811
16812
16813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16814 /* end confdefs.h. */
16815 #include <locale.h>
16816 _ACEOF
16817 case "$host_os" in
16818 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16819 *) gl_absname_cpp="$ac_cpp" ;;
16820 esac
16821
16822 case "$host_os" in
16823 mingw*)
16824 gl_dirsep_regex='[/\\]'
16825 ;;
16826 *)
16827 gl_dirsep_regex='\/'
16828 ;;
16829 esac
16830 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16831 gl_header_literal_regex=`echo 'locale.h' \
16832 | sed -e "$gl_make_literal_regex_sed"`
16833 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16834 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16835 s|^/[^/]|//&|
16836 p
16837 q
16838 }'
16839
16840 gl_cv_absolute_locale_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16841 sed -n "$gl_absolute_header_sed"`
16842
16843 gl_header=$gl_cv_absolute_locale_h
16844 gl_cv_next_locale_h='"'$gl_header'"'
16845
16846
16847 fi
16848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_locale_h" >&5
16849 $as_echo "$gl_cv_next_locale_h" >&6; }
16850 fi
16851 NEXT_LOCALE_H=$gl_cv_next_locale_h
16852
16853 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16854 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16855 gl_next_as_first_directive='<'locale.h'>'
16856 else
16857 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
16858 gl_next_as_first_directive=$gl_cv_next_locale_h
16859 fi
16860 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H=$gl_next_as_first_directive
16861
16862
16863
16864
16865
16866
16867
16868
16869
16870
16871
16872 GL_GNULIB_LOCALECONV=0
16873
16874
16875
16876 GL_GNULIB_SETLOCALE=0
16877
16878
16879
16880 GL_GNULIB_SETLOCALE_NULL=0
16881
16882
16883
16884 GL_GNULIB_DUPLOCALE=0
16885
16886
16887
16888 GL_GNULIB_LOCALENAME=0
16889
16890
16891
16892
16893
16894 gl_threads_api=none
16895 LIBTHREAD=
16896 LTLIBTHREAD=
16897 LIBMULTITHREAD=
16898 LTLIBMULTITHREAD=
16899 if test "$gl_use_threads" != no; then
16900
16901
16902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
16903 $as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
16904 if ${gl_cv_have_weak+:} false; then :
16905 $as_echo_n "(cached) " >&6
16906 else
16907 case "$host_os" in
16908 cygwin*)
16909 gl_cv_have_weak="guessing no"
16910 ;;
16911 *)
16912 gl_cv_have_weak=no
16913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16914 /* end confdefs.h. */
16915 extern void xyzzy ();
16916 #pragma weak xyzzy
16917 int
16918 main ()
16919 {
16920 xyzzy();
16921 ;
16922 return 0;
16923 }
16924 _ACEOF
16925 if ac_fn_c_try_link "$LINENO"; then :
16926 gl_cv_have_weak=maybe
16927 fi
16928 rm -f core conftest.err conftest.$ac_objext \
16929 conftest$ac_exeext conftest.$ac_ext
16930 if test $gl_cv_have_weak = maybe; then
16931 if test "$cross_compiling" = yes; then :
16932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16933 /* end confdefs.h. */
16934 #ifdef __ELF__
16935 Extensible Linking Format
16936 #endif
16937
16938 _ACEOF
16939 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16940 $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
16941 gl_cv_have_weak="guessing yes"
16942 else
16943 gl_cv_have_weak="guessing no"
16944 fi
16945 rm -f conftest*
16946
16947
16948 else
16949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16950 /* end confdefs.h. */
16951
16952 #include <stdio.h>
16953 #pragma weak fputs
16954 int main ()
16955 {
16956 return (fputs == NULL);
16957 }
16958 _ACEOF
16959 if ac_fn_c_try_run "$LINENO"; then :
16960 gl_cv_have_weak=yes
16961 else
16962 gl_cv_have_weak=no
16963 fi
16964 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16965 conftest.$ac_objext conftest.beam conftest.$ac_ext
16966 fi
16967
16968 fi
16969 ;;
16970 esac
16971 case " $LDFLAGS " in
16972 *" -static "*) gl_cv_have_weak=no ;;
16973 esac
16974 case "$gl_cv_have_weak" in
16975 *yes)
16976 case "$host_os" in
16977 freebsd* | dragonfly* | midnightbsd*)
16978 : > conftest1.c
16979 $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
16980 cat <<EOF > conftest2.c
16981 #include <pthread.h>
16982 #pragma weak pthread_mutexattr_gettype
16983 int main ()
16984 {
16985 return (pthread_mutexattr_gettype != NULL);
16986 }
16987 EOF
16988 $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
16989 || gl_cv_have_weak=no
16990 rm -f conftest1.c libempty.so conftest2.c conftest
16991 ;;
16992 esac
16993 ;;
16994 esac
16995
16996 fi
16997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
16998 $as_echo "$gl_cv_have_weak" >&6; }
16999 case "$gl_cv_have_weak" in
17000 *yes)
17001
17002 $as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
17003
17004 ;;
17005 esac
17006
17007 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
17008
17009 :
17010 fi
17011 if test "$gl_use_threads" = isoc || test "$gl_use_threads" = isoc+posix; then
17012
17013 gl_have_isoc_threads="$ac_cv_header_threads_h"
17014 fi
17015 if test "$gl_use_threads" = yes \
17016 || test "$gl_use_threads" = posix \
17017 || test "$gl_use_threads" = isoc+posix; then
17018
17019
17020 if test -z "$gl_pthreadlib_body_done"; then
17021 gl_pthread_api=no
17022 LIBPTHREAD=
17023 LIBPMULTITHREAD=
17024 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
17025 # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
17026 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
17027 if test "x$ac_cv_header_pthread_h" = xyes; then :
17028 gl_have_pthread_h=yes
17029 else
17030 gl_have_pthread_h=no
17031 fi
17032
17033
17034 if test "$gl_have_pthread_h" = yes; then
17035 # Other possible tests:
17036 # -lpthreads (FSU threads, PCthreads)
17037 # -lgthreads
17038 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
17039 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
17040 # the second one only in libpthread, and lock.c needs it.
17041 #
17042 # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
17043 # needs -pthread for some reason. See:
17044 # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
17045 save_LIBS=$LIBS
17046 for gl_pthread in '' '-pthread'; do
17047 LIBS="$LIBS $gl_pthread"
17048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17049 /* end confdefs.h. */
17050 #include <pthread.h>
17051 pthread_mutex_t m;
17052 pthread_mutexattr_t ma;
17053
17054 int
17055 main ()
17056 {
17057 pthread_mutex_lock (&m);
17058 pthread_mutexattr_init (&ma);
17059 ;
17060 return 0;
17061 }
17062 _ACEOF
17063 if ac_fn_c_try_link "$LINENO"; then :
17064 gl_pthread_api=yes
17065 LIBPTHREAD=$gl_pthread
17066 LIBPMULTITHREAD=$gl_pthread
17067 fi
17068 rm -f core conftest.err conftest.$ac_objext \
17069 conftest$ac_exeext conftest.$ac_ext
17070 LIBS=$save_LIBS
17071 test $gl_pthread_api = yes && break
17072 done
17073 echo "$as_me:17073: gl_pthread_api=$gl_pthread_api" >&5
17074 echo "$as_me:17074: LIBPTHREAD=$LIBPTHREAD" >&5
17075
17076 gl_pthread_in_glibc=no
17077 # On Linux with glibc >= 2.34, libc contains the fully functional
17078 # pthread functions.
17079 case "$host_os" in
17080 linux*)
17081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17082 /* end confdefs.h. */
17083 #include <features.h>
17084 #ifdef __GNU_LIBRARY__
17085 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 34) || (__GLIBC__ > 2)
17086 Lucky user
17087 #endif
17088 #endif
17089
17090 _ACEOF
17091 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17092 $EGREP "Lucky user" >/dev/null 2>&1; then :
17093 gl_pthread_in_glibc=yes
17094 fi
17095 rm -f conftest*
17096
17097 ;;
17098 esac
17099 echo "$as_me:17099: gl_pthread_in_glibc=$gl_pthread_in_glibc" >&5
17100
17101 # Test for libpthread by looking for pthread_kill. (Not pthread_self,
17102 # since it is defined as a macro on OSF/1.)
17103 if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
17104 # The program links fine without libpthread. But it may actually
17105 # need to link with libpthread in order to create multiple threads.
17106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
17107 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
17108 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
17109 $as_echo_n "(cached) " >&6
17110 else
17111 ac_check_lib_save_LIBS=$LIBS
17112 LIBS="-lpthread $LIBS"
17113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17114 /* end confdefs.h. */
17115
17116 /* Override any GCC internal prototype to avoid an error.
17117 Use char because int might match the return type of a GCC
17118 builtin and then its argument prototype would still apply. */
17119 #ifdef __cplusplus
17120 extern "C"
17121 #endif
17122 char pthread_kill ();
17123 int
17124 main ()
17125 {
17126 return pthread_kill ();
17127 ;
17128 return 0;
17129 }
17130 _ACEOF
17131 if ac_fn_c_try_link "$LINENO"; then :
17132 ac_cv_lib_pthread_pthread_kill=yes
17133 else
17134 ac_cv_lib_pthread_pthread_kill=no
17135 fi
17136 rm -f core conftest.err conftest.$ac_objext \
17137 conftest$ac_exeext conftest.$ac_ext
17138 LIBS=$ac_check_lib_save_LIBS
17139 fi
17140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
17141 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
17142 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
17143 if test $gl_pthread_in_glibc = yes; then
17144 LIBPMULTITHREAD=
17145 else
17146 LIBPMULTITHREAD=-lpthread
17147 # On Solaris and HP-UX, most pthread functions exist also in libc.
17148 # Therefore pthread_in_use() needs to actually try to create a
17149 # thread: pthread_create from libc will fail, whereas
17150 # pthread_create will actually create a thread.
17151 # On Solaris 10 or newer, this test is no longer needed, because
17152 # libc contains the fully functional pthread functions.
17153 case "$host_os" in
17154 solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
17155
17156 $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
17157
17158 esac
17159 fi
17160
17161 fi
17162
17163 elif test $gl_pthread_api != yes; then
17164 # Some library is needed. Try libpthread and libc_r.
17165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
17166 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
17167 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
17168 $as_echo_n "(cached) " >&6
17169 else
17170 ac_check_lib_save_LIBS=$LIBS
17171 LIBS="-lpthread $LIBS"
17172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17173 /* end confdefs.h. */
17174
17175 /* Override any GCC internal prototype to avoid an error.
17176 Use char because int might match the return type of a GCC
17177 builtin and then its argument prototype would still apply. */
17178 #ifdef __cplusplus
17179 extern "C"
17180 #endif
17181 char pthread_kill ();
17182 int
17183 main ()
17184 {
17185 return pthread_kill ();
17186 ;
17187 return 0;
17188 }
17189 _ACEOF
17190 if ac_fn_c_try_link "$LINENO"; then :
17191 ac_cv_lib_pthread_pthread_kill=yes
17192 else
17193 ac_cv_lib_pthread_pthread_kill=no
17194 fi
17195 rm -f core conftest.err conftest.$ac_objext \
17196 conftest$ac_exeext conftest.$ac_ext
17197 LIBS=$ac_check_lib_save_LIBS
17198 fi
17199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
17200 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
17201 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
17202 gl_pthread_api=yes
17203 LIBPTHREAD=-lpthread
17204 LIBPMULTITHREAD=-lpthread
17205 fi
17206
17207 if test $gl_pthread_api != yes; then
17208 # For FreeBSD 4.
17209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
17210 $as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
17211 if ${ac_cv_lib_c_r_pthread_kill+:} false; then :
17212 $as_echo_n "(cached) " >&6
17213 else
17214 ac_check_lib_save_LIBS=$LIBS
17215 LIBS="-lc_r $LIBS"
17216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17217 /* end confdefs.h. */
17218
17219 /* Override any GCC internal prototype to avoid an error.
17220 Use char because int might match the return type of a GCC
17221 builtin and then its argument prototype would still apply. */
17222 #ifdef __cplusplus
17223 extern "C"
17224 #endif
17225 char pthread_kill ();
17226 int
17227 main ()
17228 {
17229 return pthread_kill ();
17230 ;
17231 return 0;
17232 }
17233 _ACEOF
17234 if ac_fn_c_try_link "$LINENO"; then :
17235 ac_cv_lib_c_r_pthread_kill=yes
17236 else
17237 ac_cv_lib_c_r_pthread_kill=no
17238 fi
17239 rm -f core conftest.err conftest.$ac_objext \
17240 conftest$ac_exeext conftest.$ac_ext
17241 LIBS=$ac_check_lib_save_LIBS
17242 fi
17243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
17244 $as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
17245 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then :
17246 gl_pthread_api=yes
17247 LIBPTHREAD=-lc_r
17248 LIBPMULTITHREAD=-lc_r
17249 fi
17250
17251 fi
17252 fi
17253 echo "$as_me:17253: LIBPMULTITHREAD=$LIBPMULTITHREAD" >&5
17254 fi
17255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
17256 $as_echo_n "checking whether POSIX threads API is available... " >&6; }
17257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
17258 $as_echo "$gl_pthread_api" >&6; }
17259
17260
17261 if test $gl_pthread_api = yes; then
17262
17263 $as_echo "#define HAVE_PTHREAD_API 1" >>confdefs.h
17264
17265 fi
17266
17267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17268 /* end confdefs.h. */
17269 #include <sched.h>
17270 int
17271 main ()
17272 {
17273 sched_yield ();
17274 ;
17275 return 0;
17276 }
17277 _ACEOF
17278 if ac_fn_c_try_link "$LINENO"; then :
17279 LIB_SCHED_YIELD=
17280
17281 else
17282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
17283 $as_echo_n "checking for sched_yield in -lrt... " >&6; }
17284 if ${ac_cv_lib_rt_sched_yield+:} false; then :
17285 $as_echo_n "(cached) " >&6
17286 else
17287 ac_check_lib_save_LIBS=$LIBS
17288 LIBS="-lrt $LIBS"
17289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17290 /* end confdefs.h. */
17291
17292 /* Override any GCC internal prototype to avoid an error.
17293 Use char because int might match the return type of a GCC
17294 builtin and then its argument prototype would still apply. */
17295 #ifdef __cplusplus
17296 extern "C"
17297 #endif
17298 char sched_yield ();
17299 int
17300 main ()
17301 {
17302 return sched_yield ();
17303 ;
17304 return 0;
17305 }
17306 _ACEOF
17307 if ac_fn_c_try_link "$LINENO"; then :
17308 ac_cv_lib_rt_sched_yield=yes
17309 else
17310 ac_cv_lib_rt_sched_yield=no
17311 fi
17312 rm -f core conftest.err conftest.$ac_objext \
17313 conftest$ac_exeext conftest.$ac_ext
17314 LIBS=$ac_check_lib_save_LIBS
17315 fi
17316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
17317 $as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
17318 if test "x$ac_cv_lib_rt_sched_yield" = xyes; then :
17319 LIB_SCHED_YIELD=-lrt
17320 else
17321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
17322 $as_echo_n "checking for sched_yield in -lposix4... " >&6; }
17323 if ${ac_cv_lib_posix4_sched_yield+:} false; then :
17324 $as_echo_n "(cached) " >&6
17325 else
17326 ac_check_lib_save_LIBS=$LIBS
17327 LIBS="-lposix4 $LIBS"
17328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17329 /* end confdefs.h. */
17330
17331 /* Override any GCC internal prototype to avoid an error.
17332 Use char because int might match the return type of a GCC
17333 builtin and then its argument prototype would still apply. */
17334 #ifdef __cplusplus
17335 extern "C"
17336 #endif
17337 char sched_yield ();
17338 int
17339 main ()
17340 {
17341 return sched_yield ();
17342 ;
17343 return 0;
17344 }
17345 _ACEOF
17346 if ac_fn_c_try_link "$LINENO"; then :
17347 ac_cv_lib_posix4_sched_yield=yes
17348 else
17349 ac_cv_lib_posix4_sched_yield=no
17350 fi
17351 rm -f core conftest.err conftest.$ac_objext \
17352 conftest$ac_exeext conftest.$ac_ext
17353 LIBS=$ac_check_lib_save_LIBS
17354 fi
17355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
17356 $as_echo "$ac_cv_lib_posix4_sched_yield" >&6; }
17357 if test "x$ac_cv_lib_posix4_sched_yield" = xyes; then :
17358 LIB_SCHED_YIELD=-lposix4
17359 fi
17360
17361 fi
17362
17363
17364 fi
17365 rm -f core conftest.err conftest.$ac_objext \
17366 conftest$ac_exeext conftest.$ac_ext
17367
17368
17369 gl_pthreadlib_body_done=done
17370 fi
17371
17372 LIBTHREAD=$LIBPTHREAD LTLIBTHREAD=$LIBPTHREAD
17373 LIBMULTITHREAD=$LIBPMULTITHREAD LTLIBMULTITHREAD=$LIBPMULTITHREAD
17374 if test $gl_pthread_api = yes; then
17375 if test "$gl_use_threads" = isoc+posix && test "$gl_have_isoc_threads" = yes; then
17376 gl_threads_api='isoc+posix'
17377
17378 $as_echo "#define USE_ISOC_AND_POSIX_THREADS 1" >>confdefs.h
17379
17380 LIBTHREAD= LTLIBTHREAD=
17381 else
17382 gl_threads_api=posix
17383
17384 $as_echo "#define USE_POSIX_THREADS 1" >>confdefs.h
17385
17386 if test -z "$LIBMULTITHREAD" && test -z "$LTLIBMULTITHREAD"; then
17387
17388 $as_echo "#define USE_POSIX_THREADS_FROM_LIBC 1" >>confdefs.h
17389
17390 else
17391 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
17392
17393 $as_echo "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h
17394
17395 LIBTHREAD= LTLIBTHREAD=
17396 else
17397 case "$host_os" in
17398 freebsd* | dragonfly* | midnightbsd*)
17399 if test "x$LIBTHREAD" != "x$LIBMULTITHREAD"; then
17400
17401 $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
17402
17403 fi
17404 ;;
17405 esac
17406 fi
17407 fi
17408 fi
17409 fi
17410 fi
17411 if test $gl_threads_api = none; then
17412 if test "$gl_use_threads" = isoc && test "$gl_have_isoc_threads" = yes; then
17413
17414
17415
17416 if test -z "$gl_stdthreadlib_body_done"; then
17417
17418
17419 case "$host_os" in
17420 mingw*)
17421 LIBSTDTHREAD=
17422 ;;
17423 *)
17424
17425
17426 if test -z "$gl_pthreadlib_body_done"; then
17427 gl_pthread_api=no
17428 LIBPTHREAD=
17429 LIBPMULTITHREAD=
17430 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
17431 # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
17432 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
17433 if test "x$ac_cv_header_pthread_h" = xyes; then :
17434 gl_have_pthread_h=yes
17435 else
17436 gl_have_pthread_h=no
17437 fi
17438
17439
17440 if test "$gl_have_pthread_h" = yes; then
17441 # Other possible tests:
17442 # -lpthreads (FSU threads, PCthreads)
17443 # -lgthreads
17444 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
17445 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
17446 # the second one only in libpthread, and lock.c needs it.
17447 #
17448 # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
17449 # needs -pthread for some reason. See:
17450 # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
17451 save_LIBS=$LIBS
17452 for gl_pthread in '' '-pthread'; do
17453 LIBS="$LIBS $gl_pthread"
17454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17455 /* end confdefs.h. */
17456 #include <pthread.h>
17457 pthread_mutex_t m;
17458 pthread_mutexattr_t ma;
17459
17460 int
17461 main ()
17462 {
17463 pthread_mutex_lock (&m);
17464 pthread_mutexattr_init (&ma);
17465 ;
17466 return 0;
17467 }
17468 _ACEOF
17469 if ac_fn_c_try_link "$LINENO"; then :
17470 gl_pthread_api=yes
17471 LIBPTHREAD=$gl_pthread
17472 LIBPMULTITHREAD=$gl_pthread
17473 fi
17474 rm -f core conftest.err conftest.$ac_objext \
17475 conftest$ac_exeext conftest.$ac_ext
17476 LIBS=$save_LIBS
17477 test $gl_pthread_api = yes && break
17478 done
17479 echo "$as_me:17479: gl_pthread_api=$gl_pthread_api" >&5
17480 echo "$as_me:17480: LIBPTHREAD=$LIBPTHREAD" >&5
17481
17482 gl_pthread_in_glibc=no
17483 # On Linux with glibc >= 2.34, libc contains the fully functional
17484 # pthread functions.
17485 case "$host_os" in
17486 linux*)
17487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17488 /* end confdefs.h. */
17489 #include <features.h>
17490 #ifdef __GNU_LIBRARY__
17491 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 34) || (__GLIBC__ > 2)
17492 Lucky user
17493 #endif
17494 #endif
17495
17496 _ACEOF
17497 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17498 $EGREP "Lucky user" >/dev/null 2>&1; then :
17499 gl_pthread_in_glibc=yes
17500 fi
17501 rm -f conftest*
17502
17503 ;;
17504 esac
17505 echo "$as_me:17505: gl_pthread_in_glibc=$gl_pthread_in_glibc" >&5
17506
17507 # Test for libpthread by looking for pthread_kill. (Not pthread_self,
17508 # since it is defined as a macro on OSF/1.)
17509 if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
17510 # The program links fine without libpthread. But it may actually
17511 # need to link with libpthread in order to create multiple threads.
17512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
17513 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
17514 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
17515 $as_echo_n "(cached) " >&6
17516 else
17517 ac_check_lib_save_LIBS=$LIBS
17518 LIBS="-lpthread $LIBS"
17519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17520 /* end confdefs.h. */
17521
17522 /* Override any GCC internal prototype to avoid an error.
17523 Use char because int might match the return type of a GCC
17524 builtin and then its argument prototype would still apply. */
17525 #ifdef __cplusplus
17526 extern "C"
17527 #endif
17528 char pthread_kill ();
17529 int
17530 main ()
17531 {
17532 return pthread_kill ();
17533 ;
17534 return 0;
17535 }
17536 _ACEOF
17537 if ac_fn_c_try_link "$LINENO"; then :
17538 ac_cv_lib_pthread_pthread_kill=yes
17539 else
17540 ac_cv_lib_pthread_pthread_kill=no
17541 fi
17542 rm -f core conftest.err conftest.$ac_objext \
17543 conftest$ac_exeext conftest.$ac_ext
17544 LIBS=$ac_check_lib_save_LIBS
17545 fi
17546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
17547 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
17548 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
17549 if test $gl_pthread_in_glibc = yes; then
17550 LIBPMULTITHREAD=
17551 else
17552 LIBPMULTITHREAD=-lpthread
17553 # On Solaris and HP-UX, most pthread functions exist also in libc.
17554 # Therefore pthread_in_use() needs to actually try to create a
17555 # thread: pthread_create from libc will fail, whereas
17556 # pthread_create will actually create a thread.
17557 # On Solaris 10 or newer, this test is no longer needed, because
17558 # libc contains the fully functional pthread functions.
17559 case "$host_os" in
17560 solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
17561
17562 $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
17563
17564 esac
17565 fi
17566
17567 fi
17568
17569 elif test $gl_pthread_api != yes; then
17570 # Some library is needed. Try libpthread and libc_r.
17571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
17572 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
17573 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
17574 $as_echo_n "(cached) " >&6
17575 else
17576 ac_check_lib_save_LIBS=$LIBS
17577 LIBS="-lpthread $LIBS"
17578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17579 /* end confdefs.h. */
17580
17581 /* Override any GCC internal prototype to avoid an error.
17582 Use char because int might match the return type of a GCC
17583 builtin and then its argument prototype would still apply. */
17584 #ifdef __cplusplus
17585 extern "C"
17586 #endif
17587 char pthread_kill ();
17588 int
17589 main ()
17590 {
17591 return pthread_kill ();
17592 ;
17593 return 0;
17594 }
17595 _ACEOF
17596 if ac_fn_c_try_link "$LINENO"; then :
17597 ac_cv_lib_pthread_pthread_kill=yes
17598 else
17599 ac_cv_lib_pthread_pthread_kill=no
17600 fi
17601 rm -f core conftest.err conftest.$ac_objext \
17602 conftest$ac_exeext conftest.$ac_ext
17603 LIBS=$ac_check_lib_save_LIBS
17604 fi
17605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
17606 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
17607 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
17608 gl_pthread_api=yes
17609 LIBPTHREAD=-lpthread
17610 LIBPMULTITHREAD=-lpthread
17611 fi
17612
17613 if test $gl_pthread_api != yes; then
17614 # For FreeBSD 4.
17615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
17616 $as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
17617 if ${ac_cv_lib_c_r_pthread_kill+:} false; then :
17618 $as_echo_n "(cached) " >&6
17619 else
17620 ac_check_lib_save_LIBS=$LIBS
17621 LIBS="-lc_r $LIBS"
17622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17623 /* end confdefs.h. */
17624
17625 /* Override any GCC internal prototype to avoid an error.
17626 Use char because int might match the return type of a GCC
17627 builtin and then its argument prototype would still apply. */
17628 #ifdef __cplusplus
17629 extern "C"
17630 #endif
17631 char pthread_kill ();
17632 int
17633 main ()
17634 {
17635 return pthread_kill ();
17636 ;
17637 return 0;
17638 }
17639 _ACEOF
17640 if ac_fn_c_try_link "$LINENO"; then :
17641 ac_cv_lib_c_r_pthread_kill=yes
17642 else
17643 ac_cv_lib_c_r_pthread_kill=no
17644 fi
17645 rm -f core conftest.err conftest.$ac_objext \
17646 conftest$ac_exeext conftest.$ac_ext
17647 LIBS=$ac_check_lib_save_LIBS
17648 fi
17649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
17650 $as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
17651 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then :
17652 gl_pthread_api=yes
17653 LIBPTHREAD=-lc_r
17654 LIBPMULTITHREAD=-lc_r
17655 fi
17656
17657 fi
17658 fi
17659 echo "$as_me:17659: LIBPMULTITHREAD=$LIBPMULTITHREAD" >&5
17660 fi
17661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
17662 $as_echo_n "checking whether POSIX threads API is available... " >&6; }
17663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
17664 $as_echo "$gl_pthread_api" >&6; }
17665
17666
17667 if test $gl_pthread_api = yes; then
17668
17669 $as_echo "#define HAVE_PTHREAD_API 1" >>confdefs.h
17670
17671 fi
17672
17673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17674 /* end confdefs.h. */
17675 #include <sched.h>
17676 int
17677 main ()
17678 {
17679 sched_yield ();
17680 ;
17681 return 0;
17682 }
17683 _ACEOF
17684 if ac_fn_c_try_link "$LINENO"; then :
17685 LIB_SCHED_YIELD=
17686
17687 else
17688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
17689 $as_echo_n "checking for sched_yield in -lrt... " >&6; }
17690 if ${ac_cv_lib_rt_sched_yield+:} false; then :
17691 $as_echo_n "(cached) " >&6
17692 else
17693 ac_check_lib_save_LIBS=$LIBS
17694 LIBS="-lrt $LIBS"
17695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17696 /* end confdefs.h. */
17697
17698 /* Override any GCC internal prototype to avoid an error.
17699 Use char because int might match the return type of a GCC
17700 builtin and then its argument prototype would still apply. */
17701 #ifdef __cplusplus
17702 extern "C"
17703 #endif
17704 char sched_yield ();
17705 int
17706 main ()
17707 {
17708 return sched_yield ();
17709 ;
17710 return 0;
17711 }
17712 _ACEOF
17713 if ac_fn_c_try_link "$LINENO"; then :
17714 ac_cv_lib_rt_sched_yield=yes
17715 else
17716 ac_cv_lib_rt_sched_yield=no
17717 fi
17718 rm -f core conftest.err conftest.$ac_objext \
17719 conftest$ac_exeext conftest.$ac_ext
17720 LIBS=$ac_check_lib_save_LIBS
17721 fi
17722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
17723 $as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
17724 if test "x$ac_cv_lib_rt_sched_yield" = xyes; then :
17725 LIB_SCHED_YIELD=-lrt
17726 else
17727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
17728 $as_echo_n "checking for sched_yield in -lposix4... " >&6; }
17729 if ${ac_cv_lib_posix4_sched_yield+:} false; then :
17730 $as_echo_n "(cached) " >&6
17731 else
17732 ac_check_lib_save_LIBS=$LIBS
17733 LIBS="-lposix4 $LIBS"
17734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17735 /* end confdefs.h. */
17736
17737 /* Override any GCC internal prototype to avoid an error.
17738 Use char because int might match the return type of a GCC
17739 builtin and then its argument prototype would still apply. */
17740 #ifdef __cplusplus
17741 extern "C"
17742 #endif
17743 char sched_yield ();
17744 int
17745 main ()
17746 {
17747 return sched_yield ();
17748 ;
17749 return 0;
17750 }
17751 _ACEOF
17752 if ac_fn_c_try_link "$LINENO"; then :
17753 ac_cv_lib_posix4_sched_yield=yes
17754 else
17755 ac_cv_lib_posix4_sched_yield=no
17756 fi
17757 rm -f core conftest.err conftest.$ac_objext \
17758 conftest$ac_exeext conftest.$ac_ext
17759 LIBS=$ac_check_lib_save_LIBS
17760 fi
17761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
17762 $as_echo "$ac_cv_lib_posix4_sched_yield" >&6; }
17763 if test "x$ac_cv_lib_posix4_sched_yield" = xyes; then :
17764 LIB_SCHED_YIELD=-lposix4
17765 fi
17766
17767 fi
17768
17769
17770 fi
17771 rm -f core conftest.err conftest.$ac_objext \
17772 conftest$ac_exeext conftest.$ac_ext
17773
17774
17775 gl_pthreadlib_body_done=done
17776 fi
17777
17778 if test $ac_cv_header_threads_h = yes; then
17779 for ac_func in thrd_create
17780 do :
17781 ac_fn_c_check_func "$LINENO" "thrd_create" "ac_cv_func_thrd_create"
17782 if test "x$ac_cv_func_thrd_create" = xyes; then :
17783 cat >>confdefs.h <<_ACEOF
17784 #define HAVE_THRD_CREATE 1
17785 _ACEOF
17786
17787 fi
17788 done
17789
17790 if test $ac_cv_func_thrd_create = yes; then
17791 LIBSTDTHREAD=
17792 else
17793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thrd_create in -lstdthreads" >&5
17794 $as_echo_n "checking for thrd_create in -lstdthreads... " >&6; }
17795 if ${ac_cv_lib_stdthreads_thrd_create+:} false; then :
17796 $as_echo_n "(cached) " >&6
17797 else
17798 ac_check_lib_save_LIBS=$LIBS
17799 LIBS="-lstdthreads $LIBS"
17800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17801 /* end confdefs.h. */
17802
17803 /* Override any GCC internal prototype to avoid an error.
17804 Use char because int might match the return type of a GCC
17805 builtin and then its argument prototype would still apply. */
17806 #ifdef __cplusplus
17807 extern "C"
17808 #endif
17809 char thrd_create ();
17810 int
17811 main ()
17812 {
17813 return thrd_create ();
17814 ;
17815 return 0;
17816 }
17817 _ACEOF
17818 if ac_fn_c_try_link "$LINENO"; then :
17819 ac_cv_lib_stdthreads_thrd_create=yes
17820 else
17821 ac_cv_lib_stdthreads_thrd_create=no
17822 fi
17823 rm -f core conftest.err conftest.$ac_objext \
17824 conftest$ac_exeext conftest.$ac_ext
17825 LIBS=$ac_check_lib_save_LIBS
17826 fi
17827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_stdthreads_thrd_create" >&5
17828 $as_echo "$ac_cv_lib_stdthreads_thrd_create" >&6; }
17829 if test "x$ac_cv_lib_stdthreads_thrd_create" = xyes; then :
17830
17831 LIBSTDTHREAD='-lstdthreads -lpthread'
17832
17833 else
17834
17835 LIBSTDTHREAD="$LIBPMULTITHREAD"
17836
17837 fi
17838
17839 fi
17840 else
17841 LIBSTDTHREAD="$LIBPMULTITHREAD $LIB_SCHED_YIELD"
17842 fi
17843 ;;
17844 esac
17845
17846
17847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ISO C threads API is available" >&5
17848 $as_echo_n "checking whether ISO C threads API is available... " >&6; }
17849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_threads_h" >&5
17850 $as_echo "$ac_cv_header_threads_h" >&6; }
17851 gl_stdthreadlib_body_done=done
17852 fi
17853
17854 LIBTHREAD=$LIBSTDTHREAD LTLIBTHREAD=$LIBSTDTHREAD
17855 LIBMULTITHREAD=$LIBSTDTHREAD LTLIBMULTITHREAD=$LIBSTDTHREAD
17856 gl_threads_api=isoc
17857
17858 $as_echo "#define USE_ISOC_THREADS 1" >>confdefs.h
17859
17860 fi
17861 fi
17862 if test $gl_threads_api = none; then
17863 case "$gl_use_threads" in
17864 yes | windows | win32) # The 'win32' is for backward compatibility.
17865 if { case "$host_os" in
17866 mingw*) true;;
17867 *) false;;
17868 esac
17869 }; then
17870 gl_threads_api=windows
17871
17872 $as_echo "#define USE_WINDOWS_THREADS 1" >>confdefs.h
17873
17874 fi
17875 ;;
17876 esac
17877 fi
17878 fi
17879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5
17880 $as_echo_n "checking for multithread API to use... " >&6; }
17881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5
17882 $as_echo "$gl_threads_api" >&6; }
17883
17884
17885
17886
17887
17888
17889
17890
17891
17892
17893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc is ptrdiff_t safe" >&5
17894 $as_echo_n "checking whether malloc is ptrdiff_t safe... " >&6; }
17895 if ${gl_cv_malloc_ptrdiff+:} false; then :
17896 $as_echo_n "(cached) " >&6
17897 else
17898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17899 /* end confdefs.h. */
17900 #include <stdint.h>
17901
17902 int
17903 main ()
17904 {
17905 /* 64-bit ptrdiff_t is so wide that no practical platform
17906 can exceed it. */
17907 #define WIDE_PTRDIFF (PTRDIFF_MAX >> 31 >> 31 != 0)
17908
17909 /* On rare machines where size_t fits in ptrdiff_t there
17910 is no problem. */
17911 #define NARROW_SIZE (SIZE_MAX <= PTRDIFF_MAX)
17912
17913 /* glibc 2.30 and later malloc refuses to exceed ptrdiff_t
17914 bounds even on 32-bit platforms. We don't know which
17915 non-glibc systems are safe. */
17916 #define KNOWN_SAFE (2 < __GLIBC__ + (30 <= __GLIBC_MINOR__))
17917
17918 #if WIDE_PTRDIFF || NARROW_SIZE || KNOWN_SAFE
17919 return 0;
17920 #else
17921 #error "malloc might not be ptrdiff_t safe"
17922 syntax error
17923 #endif
17924
17925 ;
17926 return 0;
17927 }
17928 _ACEOF
17929 if ac_fn_c_try_compile "$LINENO"; then :
17930 gl_cv_malloc_ptrdiff=yes
17931 else
17932 gl_cv_malloc_ptrdiff=no
17933 fi
17934 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17935
17936 fi
17937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_malloc_ptrdiff" >&5
17938 $as_echo "$gl_cv_malloc_ptrdiff" >&6; }
17939
17940
17941
17942
17943 test "$gl_cv_malloc_ptrdiff" = yes || REPLACE_MALLOC_FOR_MALLOC_POSIX=1
17944
17945
17946
17947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc set errno on failure" >&5
17948 $as_echo_n "checking whether malloc, realloc, calloc set errno on failure... " >&6; }
17949 if ${gl_cv_func_malloc_posix+:} false; then :
17950 $as_echo_n "(cached) " >&6
17951 else
17952
17953 case "$host_os" in
17954 mingw*)
17955 gl_cv_func_malloc_posix=no ;;
17956 irix* | solaris*)
17957
17958 gl_cv_func_malloc_posix=no ;;
17959 *)
17960 gl_cv_func_malloc_posix=yes ;;
17961 esac
17962
17963 fi
17964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
17965 $as_echo "$gl_cv_func_malloc_posix" >&6; }
17966
17967
17968
17969
17970
17971 if test "$gl_cv_func_malloc_posix" = yes; then
17972
17973 $as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
17974
17975 else
17976 REPLACE_MALLOC_FOR_MALLOC_POSIX=1
17977 fi
17978
17979
17980
17981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc (0) returns nonnull" >&5
17982 $as_echo_n "checking whether malloc (0) returns nonnull... " >&6; }
17983 if ${ac_cv_func_malloc_0_nonnull+:} false; then :
17984 $as_echo_n "(cached) " >&6
17985 else
17986 if test "$cross_compiling" = yes; then :
17987 case "$host_os" in
17988 # Guess yes on platforms where we know the result.
17989 *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
17990 | gnu* | *-musl* | midnightbsd* \
17991 | hpux* | solaris* | cygwin* | mingw* | msys* )
17992 ac_cv_func_malloc_0_nonnull="guessing yes" ;;
17993 # If we don't know, obey --enable-cross-guesses.
17994 *) ac_cv_func_malloc_0_nonnull="$gl_cross_guess_normal" ;;
17995 esac
17996
17997 else
17998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17999 /* end confdefs.h. */
18000 #include <stdlib.h>
18001
18002 int
18003 main ()
18004 {
18005 void *p = malloc (0);
18006 int result = !p;
18007 free (p);
18008 return result;
18009 ;
18010 return 0;
18011 }
18012
18013 _ACEOF
18014 if ac_fn_c_try_run "$LINENO"; then :
18015 ac_cv_func_malloc_0_nonnull=yes
18016 else
18017 ac_cv_func_malloc_0_nonnull=no
18018 fi
18019 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18020 conftest.$ac_objext conftest.beam conftest.$ac_ext
18021 fi
18022
18023
18024 fi
18025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
18026 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
18027 case $ac_cv_func_malloc_0_nonnull in #(
18028 *yes) :
18029 gl_cv_func_malloc_0_nonnull=1 ;; #(
18030 *) :
18031 gl_cv_func_malloc_0_nonnull=0 ;;
18032 esac
18033
18034
18035 cat >>confdefs.h <<_ACEOF
18036 #define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
18037 _ACEOF
18038
18039
18040
18041
18042
18043
18044
18045
18046
18047
18048
18049
18050
18051
18052
18053 if test $gl_cv_have_include_next = yes; then
18054 gl_cv_next_math_h='<'math.h'>'
18055 else
18056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
18057 $as_echo_n "checking absolute name of <math.h>... " >&6; }
18058 if ${gl_cv_next_math_h+:} false; then :
18059 $as_echo_n "(cached) " >&6
18060 else
18061
18062 if test $ac_cv_header_math_h = yes; then
18063
18064
18065
18066
18067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18068 /* end confdefs.h. */
18069 #include <math.h>
18070 _ACEOF
18071 case "$host_os" in
18072 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18073 *) gl_absname_cpp="$ac_cpp" ;;
18074 esac
18075
18076 case "$host_os" in
18077 mingw*)
18078 gl_dirsep_regex='[/\\]'
18079 ;;
18080 *)
18081 gl_dirsep_regex='\/'
18082 ;;
18083 esac
18084 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18085 gl_header_literal_regex=`echo 'math.h' \
18086 | sed -e "$gl_make_literal_regex_sed"`
18087 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18088 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18089 s|^/[^/]|//&|
18090 p
18091 q
18092 }'
18093
18094 gl_cv_absolute_math_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18095 sed -n "$gl_absolute_header_sed"`
18096
18097 gl_header=$gl_cv_absolute_math_h
18098 gl_cv_next_math_h='"'$gl_header'"'
18099 else
18100 gl_cv_next_math_h='<'math.h'>'
18101 fi
18102
18103
18104 fi
18105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
18106 $as_echo "$gl_cv_next_math_h" >&6; }
18107 fi
18108 NEXT_MATH_H=$gl_cv_next_math_h
18109
18110 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18111 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18112 gl_next_as_first_directive='<'math.h'>'
18113 else
18114 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18115 gl_next_as_first_directive=$gl_cv_next_math_h
18116 fi
18117 NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive
18118
18119
18120
18121
18122
18123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
18124 $as_echo_n "checking whether NAN macro works... " >&6; }
18125 if ${gl_cv_header_math_nan_works+:} false; then :
18126 $as_echo_n "(cached) " >&6
18127 else
18128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18129 /* end confdefs.h. */
18130 #include <math.h>
18131 int
18132 main ()
18133 {
18134 /* Solaris 10 has a broken definition of NAN. Other platforms
18135 fail to provide NAN, or provide it only in C99 mode; this
18136 test only needs to fail when NAN is provided but wrong. */
18137 float f = 1.0f;
18138 #ifdef NAN
18139 f = NAN;
18140 #endif
18141 return f == 0;
18142 ;
18143 return 0;
18144 }
18145 _ACEOF
18146 if ac_fn_c_try_compile "$LINENO"; then :
18147 gl_cv_header_math_nan_works=yes
18148 else
18149 gl_cv_header_math_nan_works=no
18150 fi
18151 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18152 fi
18153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5
18154 $as_echo "$gl_cv_header_math_nan_works" >&6; }
18155 if test $gl_cv_header_math_nan_works = no; then
18156 REPLACE_NAN=1
18157 fi
18158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
18159 $as_echo_n "checking whether HUGE_VAL works... " >&6; }
18160 if ${gl_cv_header_math_huge_val_works+:} false; then :
18161 $as_echo_n "(cached) " >&6
18162 else
18163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18164 /* end confdefs.h. */
18165 #include <math.h>
18166 int
18167 main ()
18168 {
18169 /* Solaris 10 has a broken definition of HUGE_VAL. */
18170 double d = HUGE_VAL;
18171 return d == 0;
18172 ;
18173 return 0;
18174 }
18175 _ACEOF
18176 if ac_fn_c_try_compile "$LINENO"; then :
18177 gl_cv_header_math_huge_val_works=yes
18178 else
18179 gl_cv_header_math_huge_val_works=no
18180 fi
18181 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18182 fi
18183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5
18184 $as_echo "$gl_cv_header_math_huge_val_works" >&6; }
18185 if test $gl_cv_header_math_huge_val_works = no; then
18186 REPLACE_HUGE_VAL=1
18187 fi
18188
18189
18190
18191
18192
18193
18194
18195
18196
18197
18198
18199
18200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
18201 $as_echo_n "checking for a traditional japanese locale... " >&6; }
18202 if ${gt_cv_locale_ja+:} false; then :
18203 $as_echo_n "(cached) " >&6
18204 else
18205
18206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18207 /* end confdefs.h. */
18208
18209 #include <locale.h>
18210 #include <time.h>
18211 #if HAVE_LANGINFO_CODESET
18212 # include <langinfo.h>
18213 #endif
18214 #include <stdlib.h>
18215 #include <string.h>
18216 struct tm t;
18217 char buf[16];
18218 int main ()
18219 {
18220 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
18221 imitates locale dependent behaviour by looking at the environment
18222 variables, and all locales use the UTF-8 encoding. */
18223 #if defined __BEOS__ || defined __HAIKU__
18224 return 1;
18225 #else
18226 /* Check whether the given locale name is recognized by the system. */
18227 # if defined _WIN32 && !defined __CYGWIN__
18228 /* On native Windows, setlocale(category, "") looks at the system settings,
18229 not at the environment variables. Also, when an encoding suffix such
18230 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
18231 category of the locale to "C". */
18232 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
18233 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
18234 return 1;
18235 # else
18236 if (setlocale (LC_ALL, "") == NULL) return 1;
18237 # endif
18238 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
18239 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
18240 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
18241 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
18242 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
18243 some unit tests fail.
18244 On MirBSD 10, when an unsupported locale is specified, setlocale()
18245 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
18246 # if HAVE_LANGINFO_CODESET
18247 {
18248 const char *cs = nl_langinfo (CODESET);
18249 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
18250 || strcmp (cs, "UTF-8") == 0)
18251 return 1;
18252 }
18253 # endif
18254 # ifdef __CYGWIN__
18255 /* On Cygwin, avoid locale names without encoding suffix, because the
18256 locale_charset() function relies on the encoding suffix. Note that
18257 LC_ALL is set on the command line. */
18258 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
18259 # endif
18260 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
18261 on Cygwin 1.5.x. */
18262 if (MB_CUR_MAX == 1)
18263 return 1;
18264 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
18265 This excludes the UTF-8 encoding (except on MirBSD). */
18266 {
18267 const char *p;
18268 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
18269 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
18270 for (p = buf; *p != '\0'; p++)
18271 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
18272 return 1;
18273 }
18274 return 0;
18275 #endif
18276 }
18277
18278 _ACEOF
18279 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
18280 (eval $ac_link) 2>&5
18281 ac_status=$?
18282 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18283 test $ac_status = 0; } && test -s conftest$ac_exeext; then
18284 case "$host_os" in
18285 # Handle native Windows specially, because there setlocale() interprets
18286 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
18287 # "fr" or "fra" as "French" or "French_France.1252",
18288 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
18289 # "ja" as "Japanese" or "Japanese_Japan.932",
18290 # and similar.
18291 mingw*)
18292 # Note that on native Windows, the Japanese locale is
18293 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
18294 # cannot use it here.
18295 gt_cv_locale_ja=none
18296 ;;
18297 *)
18298 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
18299 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
18300 # configure script would override the LC_ALL setting. Likewise for
18301 # LC_CTYPE, which is also set at the beginning of the configure script.
18302 # Test for the AIX locale name.
18303 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
18304 gt_cv_locale_ja=ja_JP
18305 else
18306 # Test for the locale name with explicit encoding suffix.
18307 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
18308 gt_cv_locale_ja=ja_JP.EUC-JP
18309 else
18310 # Test for the HP-UX, OSF/1, NetBSD locale name.
18311 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
18312 gt_cv_locale_ja=ja_JP.eucJP
18313 else
18314 # Test for the IRIX, FreeBSD locale name.
18315 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
18316 gt_cv_locale_ja=ja_JP.EUC
18317 else
18318 # Test for the Solaris 7 locale name.
18319 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
18320 gt_cv_locale_ja=ja
18321 else
18322 # Special test for NetBSD 1.6.
18323 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
18324 gt_cv_locale_ja=ja_JP.eucJP
18325 else
18326 # None found.
18327 gt_cv_locale_ja=none
18328 fi
18329 fi
18330 fi
18331 fi
18332 fi
18333 fi
18334 ;;
18335 esac
18336 fi
18337 rm -fr conftest*
18338
18339 fi
18340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
18341 $as_echo "$gt_cv_locale_ja" >&6; }
18342 LOCALE_JA=$gt_cv_locale_ja
18343
18344
18345
18346
18347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
18348 $as_echo_n "checking for a french Unicode locale... " >&6; }
18349 if ${gt_cv_locale_fr_utf8+:} false; then :
18350 $as_echo_n "(cached) " >&6
18351 else
18352
18353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18354 /* end confdefs.h. */
18355
18356 #include <locale.h>
18357 #include <time.h>
18358 #if HAVE_LANGINFO_CODESET
18359 # include <langinfo.h>
18360 #endif
18361 #include <stdlib.h>
18362 #include <string.h>
18363 struct tm t;
18364 char buf[16];
18365 int main () {
18366 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
18367 imitates locale dependent behaviour by looking at the environment
18368 variables, and all locales use the UTF-8 encoding. */
18369 #if !(defined __BEOS__ || defined __HAIKU__)
18370 /* Check whether the given locale name is recognized by the system. */
18371 # if defined _WIN32 && !defined __CYGWIN__
18372 /* On native Windows, setlocale(category, "") looks at the system settings,
18373 not at the environment variables. Also, when an encoding suffix such
18374 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
18375 category of the locale to "C". */
18376 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
18377 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
18378 return 1;
18379 # else
18380 if (setlocale (LC_ALL, "") == NULL) return 1;
18381 # endif
18382 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
18383 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
18384 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
18385 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
18386 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
18387 some unit tests fail. */
18388 # if HAVE_LANGINFO_CODESET
18389 {
18390 const char *cs = nl_langinfo (CODESET);
18391 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
18392 return 1;
18393 }
18394 # endif
18395 # ifdef __CYGWIN__
18396 /* On Cygwin, avoid locale names without encoding suffix, because the
18397 locale_charset() function relies on the encoding suffix. Note that
18398 LC_ALL is set on the command line. */
18399 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
18400 # endif
18401 /* Check whether in the abbreviation of the second month, the second
18402 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
18403 two bytes long, with UTF-8 encoding. */
18404 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
18405 if (strftime (buf, sizeof (buf), "%b", &t) < 4
18406 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
18407 return 1;
18408 #endif
18409 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
18410 /* Check whether the decimal separator is a comma.
18411 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
18412 are nl_langinfo(RADIXCHAR) are both ".". */
18413 if (localeconv () ->decimal_point[0] != ',') return 1;
18414 #endif
18415 return 0;
18416 }
18417
18418 _ACEOF
18419 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
18420 (eval $ac_link) 2>&5
18421 ac_status=$?
18422 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18423 test $ac_status = 0; } && test -s conftest$ac_exeext; then
18424 case "$host_os" in
18425 # Handle native Windows specially, because there setlocale() interprets
18426 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
18427 # "fr" or "fra" as "French" or "French_France.1252",
18428 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
18429 # "ja" as "Japanese" or "Japanese_Japan.932",
18430 # and similar.
18431 mingw*)
18432 # Test for the hypothetical native Windows locale name.
18433 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
18434 gt_cv_locale_fr_utf8=French_France.65001
18435 else
18436 # None found.
18437 gt_cv_locale_fr_utf8=none
18438 fi
18439 ;;
18440 *)
18441 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
18442 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
18443 # configure script would override the LC_ALL setting. Likewise for
18444 # LC_CTYPE, which is also set at the beginning of the configure script.
18445 # Test for the usual locale name.
18446 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
18447 gt_cv_locale_fr_utf8=fr_FR
18448 else
18449 # Test for the locale name with explicit encoding suffix.
18450 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
18451 gt_cv_locale_fr_utf8=fr_FR.UTF-8
18452 else
18453 # Test for the Solaris 7 locale name.
18454 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
18455 gt_cv_locale_fr_utf8=fr.UTF-8
18456 else
18457 # None found.
18458 gt_cv_locale_fr_utf8=none
18459 fi
18460 fi
18461 fi
18462 ;;
18463 esac
18464 fi
18465 rm -fr conftest*
18466
18467 fi
18468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
18469 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
18470 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
18471
18472
18473
18474
18475
18476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
18477 $as_echo_n "checking for a transitional chinese locale... " >&6; }
18478 if ${gt_cv_locale_zh_CN+:} false; then :
18479 $as_echo_n "(cached) " >&6
18480 else
18481
18482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18483 /* end confdefs.h. */
18484
18485 #include <locale.h>
18486 #include <stdlib.h>
18487 #include <time.h>
18488 #if HAVE_LANGINFO_CODESET
18489 # include <langinfo.h>
18490 #endif
18491 #include <stdlib.h>
18492 #include <string.h>
18493 struct tm t;
18494 char buf[16];
18495 int main ()
18496 {
18497 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
18498 imitates locale dependent behaviour by looking at the environment
18499 variables, and all locales use the UTF-8 encoding. */
18500 #if defined __BEOS__ || defined __HAIKU__
18501 return 1;
18502 #else
18503 /* Check whether the given locale name is recognized by the system. */
18504 # if defined _WIN32 && !defined __CYGWIN__
18505 /* On native Windows, setlocale(category, "") looks at the system settings,
18506 not at the environment variables. Also, when an encoding suffix such
18507 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
18508 category of the locale to "C". */
18509 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
18510 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
18511 return 1;
18512 # else
18513 if (setlocale (LC_ALL, "") == NULL) return 1;
18514 # endif
18515 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
18516 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
18517 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
18518 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
18519 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
18520 some unit tests fail.
18521 On MirBSD 10, when an unsupported locale is specified, setlocale()
18522 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
18523 # if HAVE_LANGINFO_CODESET
18524 {
18525 const char *cs = nl_langinfo (CODESET);
18526 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
18527 || strcmp (cs, "UTF-8") == 0)
18528 return 1;
18529 }
18530 # endif
18531 # ifdef __CYGWIN__
18532 /* On Cygwin, avoid locale names without encoding suffix, because the
18533 locale_charset() function relies on the encoding suffix. Note that
18534 LC_ALL is set on the command line. */
18535 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
18536 # endif
18537 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
18538 This excludes the UTF-8 encoding (except on MirBSD). */
18539 {
18540 const char *p;
18541 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
18542 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
18543 for (p = buf; *p != '\0'; p++)
18544 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
18545 return 1;
18546 }
18547 /* Check whether a typical GB18030 multibyte sequence is recognized as a
18548 single wide character. This excludes the GB2312 and GBK encodings. */
18549 if (mblen ("\203\062\332\066", 5) != 4)
18550 return 1;
18551 return 0;
18552 #endif
18553 }
18554
18555 _ACEOF
18556 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
18557 (eval $ac_link) 2>&5
18558 ac_status=$?
18559 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18560 test $ac_status = 0; } && test -s conftest$ac_exeext; then
18561 case "$host_os" in
18562 # Handle native Windows specially, because there setlocale() interprets
18563 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
18564 # "fr" or "fra" as "French" or "French_France.1252",
18565 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
18566 # "ja" as "Japanese" or "Japanese_Japan.932",
18567 # and similar.
18568 mingw*)
18569 # Test for the hypothetical native Windows locale name.
18570 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
18571 gt_cv_locale_zh_CN=Chinese_China.54936
18572 else
18573 # None found.
18574 gt_cv_locale_zh_CN=none
18575 fi
18576 ;;
18577 solaris2.8)
18578 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
18579 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
18580 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
18581 gt_cv_locale_zh_CN=none
18582 ;;
18583 *)
18584 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
18585 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
18586 # configure script would override the LC_ALL setting. Likewise for
18587 # LC_CTYPE, which is also set at the beginning of the configure script.
18588 # Test for the locale name without encoding suffix.
18589 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
18590 gt_cv_locale_zh_CN=zh_CN
18591 else
18592 # Test for the locale name with explicit encoding suffix.
18593 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
18594 gt_cv_locale_zh_CN=zh_CN.GB18030
18595 else
18596 # None found.
18597 gt_cv_locale_zh_CN=none
18598 fi
18599 fi
18600 ;;
18601 esac
18602 else
18603 # If there was a link error, due to mblen(), the system is so old that
18604 # it certainly doesn't have a chinese locale.
18605 gt_cv_locale_zh_CN=none
18606 fi
18607 rm -fr conftest*
18608
18609 fi
18610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
18611 $as_echo "$gt_cv_locale_zh_CN" >&6; }
18612 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
18613
18614
18615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
18616 $as_echo_n "checking for inline... " >&6; }
18617 if ${ac_cv_c_inline+:} false; then :
18618 $as_echo_n "(cached) " >&6
18619 else
18620 ac_cv_c_inline=no
18621 for ac_kw in inline __inline__ __inline; do
18622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18623 /* end confdefs.h. */
18624 #ifndef __cplusplus
18625 typedef int foo_t;
18626 static $ac_kw foo_t static_foo () {return 0; }
18627 $ac_kw foo_t foo () {return 0; }
18628 #endif
18629
18630 _ACEOF
18631 if ac_fn_c_try_compile "$LINENO"; then :
18632 ac_cv_c_inline=$ac_kw
18633 fi
18634 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18635 test "$ac_cv_c_inline" != no && break
18636 done
18637
18638 fi
18639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
18640 $as_echo "$ac_cv_c_inline" >&6; }
18641
18642 case $ac_cv_c_inline in
18643 inline | yes) ;;
18644 *)
18645 case $ac_cv_c_inline in
18646 no) ac_val=;;
18647 *) ac_val=$ac_cv_c_inline;;
18648 esac
18649 cat >>confdefs.h <<_ACEOF
18650 #ifndef __cplusplus
18651 #define inline $ac_val
18652 #endif
18653 _ACEOF
18654 ;;
18655 esac
18656
18657
18658
18659
18660 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
18661 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
18662 # irrelevant for anonymous mappings.
18663 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
18664 if test "x$ac_cv_func_mmap" = xyes; then :
18665 gl_have_mmap=yes
18666 else
18667 gl_have_mmap=no
18668 fi
18669
18670
18671 # Try to allow MAP_ANONYMOUS.
18672 gl_have_mmap_anonymous=no
18673 if test $gl_have_mmap = yes; then
18674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
18675 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
18676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18677 /* end confdefs.h. */
18678
18679 #include <sys/mman.h>
18680 #ifdef MAP_ANONYMOUS
18681 I cannot identify this map
18682 #endif
18683
18684 _ACEOF
18685 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18686 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
18687 gl_have_mmap_anonymous=yes
18688 fi
18689 rm -f conftest*
18690
18691 if test $gl_have_mmap_anonymous != yes; then
18692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18693 /* end confdefs.h. */
18694
18695 #include <sys/mman.h>
18696 #ifdef MAP_ANON
18697 I cannot identify this map
18698 #endif
18699
18700 _ACEOF
18701 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18702 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
18703
18704 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
18705
18706 gl_have_mmap_anonymous=yes
18707 fi
18708 rm -f conftest*
18709
18710 fi
18711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
18712 $as_echo "$gl_have_mmap_anonymous" >&6; }
18713 if test $gl_have_mmap_anonymous = yes; then
18714
18715 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
18716
18717 fi
18718 fi
18719
18720
18721
18722
18723
18724
18725 HAVE_MBSLEN=0;
18726 HAVE_EXPLICIT_BZERO=1;
18727 HAVE_FFSL=1;
18728 HAVE_FFSLL=1;
18729 HAVE_DECL_MEMMEM=1;
18730 HAVE_MEMPCPY=1;
18731 HAVE_DECL_MEMRCHR=1;
18732 HAVE_RAWMEMCHR=1;
18733 HAVE_STPCPY=1;
18734 HAVE_STPNCPY=1;
18735 HAVE_STRCHRNUL=1;
18736 HAVE_DECL_STRDUP=1;
18737 HAVE_DECL_STRNDUP=1;
18738 HAVE_DECL_STRNLEN=1;
18739 HAVE_STRPBRK=1;
18740 HAVE_STRSEP=1;
18741 HAVE_STRCASESTR=1;
18742 HAVE_DECL_STRTOK_R=1;
18743 HAVE_DECL_STRERROR_R=1;
18744 HAVE_STRERRORNAME_NP=1;
18745 HAVE_SIGABBREV_NP=1;
18746 HAVE_SIGDESCR_NP=1;
18747 HAVE_DECL_STRSIGNAL=1;
18748 HAVE_STRVERSCMP=1;
18749 REPLACE_FFSLL=0;
18750 REPLACE_MEMCHR=0;
18751 REPLACE_MEMMEM=0;
18752 REPLACE_STPNCPY=0;
18753 REPLACE_STRCHRNUL=0;
18754 REPLACE_STRDUP=0;
18755 REPLACE_STRNCAT=0;
18756 REPLACE_STRNDUP=0;
18757 REPLACE_STRNLEN=0;
18758 REPLACE_STRSTR=0;
18759 REPLACE_STRCASESTR=0;
18760 REPLACE_STRTOK_R=0;
18761 REPLACE_STRERROR=0;
18762 REPLACE_STRERROR_R=0;
18763 REPLACE_STRERRORNAME_NP=0;
18764 REPLACE_STRSIGNAL=0;
18765 UNDEFINE_STRTOK_R=0;
18766
18767
18768
18769
18770
18771
18772
18773
18774 # Detect platform-specific bugs in some versions of glibc:
18775 # memchr should not dereference anything with length 0
18776 # https://bugzilla.redhat.com/show_bug.cgi?id=499689
18777 # memchr should not dereference overestimated length after a match
18778 # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
18779 # https://sourceware.org/bugzilla/show_bug.cgi?id=10162
18780 # memchr should cast the second argument to 'unsigned char'.
18781 # This bug exists in Android 4.3.
18782 # Assume that memchr works on platforms that lack mprotect.
18783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
18784 $as_echo_n "checking whether memchr works... " >&6; }
18785 if ${gl_cv_func_memchr_works+:} false; then :
18786 $as_echo_n "(cached) " >&6
18787 else
18788 if test "$cross_compiling" = yes; then :
18789 case "$host_os" in
18790 # Guess no on Android.
18791 linux*-android*) gl_cv_func_memchr_works="guessing no" ;;
18792 # Guess yes on native Windows.
18793 mingw*) gl_cv_func_memchr_works="guessing yes" ;;
18794 # If we don't know, obey --enable-cross-guesses.
18795 *) gl_cv_func_memchr_works="$gl_cross_guess_normal" ;;
18796 esac
18797
18798 else
18799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18800 /* end confdefs.h. */
18801
18802 #include <string.h>
18803 #if HAVE_SYS_MMAN_H
18804 # include <fcntl.h>
18805 # include <unistd.h>
18806 # include <sys/types.h>
18807 # include <sys/mman.h>
18808 # ifndef MAP_FILE
18809 # define MAP_FILE 0
18810 # endif
18811 #endif
18812
18813 int
18814 main ()
18815 {
18816
18817 int result = 0;
18818 char *fence = NULL;
18819 #if HAVE_SYS_MMAN_H && HAVE_MPROTECT
18820 # if HAVE_MAP_ANONYMOUS
18821 const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
18822 const int fd = -1;
18823 # else /* !HAVE_MAP_ANONYMOUS */
18824 const int flags = MAP_FILE | MAP_PRIVATE;
18825 int fd = open ("/dev/zero", O_RDONLY, 0666);
18826 if (fd >= 0)
18827 # endif
18828 {
18829 int pagesize = getpagesize ();
18830 char *two_pages =
18831 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
18832 flags, fd, 0);
18833 if (two_pages != (char *)(-1)
18834 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
18835 fence = two_pages + pagesize;
18836 }
18837 #endif
18838 if (fence)
18839 {
18840 /* Test against bugs on glibc systems. */
18841 if (memchr (fence, 0, 0))
18842 result |= 1;
18843 strcpy (fence - 9, "12345678");
18844 if (memchr (fence - 9, 0, 79) != fence - 1)
18845 result |= 2;
18846 if (memchr (fence - 1, 0, 3) != fence - 1)
18847 result |= 4;
18848 /* Test against bug on AIX 7.2. */
18849 if (memchr (fence - 4, '6', 16) != fence - 4)
18850 result |= 8;
18851 }
18852 /* Test against bug on Android 4.3. */
18853 {
18854 char input[3];
18855 input[0] = 'a';
18856 input[1] = 'b';
18857 input[2] = 'c';
18858 if (memchr (input, 0x789abc00 | 'b', 3) != input + 1)
18859 result |= 16;
18860 }
18861 return result;
18862
18863 ;
18864 return 0;
18865 }
18866 _ACEOF
18867 if ac_fn_c_try_run "$LINENO"; then :
18868 gl_cv_func_memchr_works=yes
18869 else
18870 gl_cv_func_memchr_works=no
18871 fi
18872 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18873 conftest.$ac_objext conftest.beam conftest.$ac_ext
18874 fi
18875
18876
18877 fi
18878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
18879 $as_echo "$gl_cv_func_memchr_works" >&6; }
18880 case "$gl_cv_func_memchr_works" in
18881 *yes) ;;
18882 *) REPLACE_MEMCHR=1 ;;
18883 esac
18884
18885
18886
18887 GL_GNULIB_EXPLICIT_BZERO=0
18888
18889
18890
18891 GL_GNULIB_FFSL=0
18892
18893
18894
18895 GL_GNULIB_FFSLL=0
18896
18897
18898
18899 GL_GNULIB_MEMCHR=0
18900
18901
18902
18903 GL_GNULIB_MEMMEM=0
18904
18905
18906
18907 GL_GNULIB_MEMPCPY=0
18908
18909
18910
18911 GL_GNULIB_MEMRCHR=0
18912
18913
18914
18915 GL_GNULIB_RAWMEMCHR=0
18916
18917
18918
18919 GL_GNULIB_STPCPY=0
18920
18921
18922
18923 GL_GNULIB_STPNCPY=0
18924
18925
18926
18927 GL_GNULIB_STRCHRNUL=0
18928
18929
18930
18931 GL_GNULIB_STRDUP=0
18932
18933
18934
18935 GL_GNULIB_STRNCAT=0
18936
18937
18938
18939 GL_GNULIB_STRNDUP=0
18940
18941
18942
18943 GL_GNULIB_STRNLEN=0
18944
18945
18946
18947 GL_GNULIB_STRPBRK=0
18948
18949
18950
18951 GL_GNULIB_STRSEP=0
18952
18953
18954
18955 GL_GNULIB_STRSTR=0
18956
18957
18958
18959 GL_GNULIB_STRCASESTR=0
18960
18961
18962
18963 GL_GNULIB_STRTOK_R=0
18964
18965
18966
18967 GL_GNULIB_MBSLEN=0
18968
18969
18970
18971 GL_GNULIB_MBSNLEN=0
18972
18973
18974
18975 GL_GNULIB_MBSCHR=0
18976
18977
18978
18979 GL_GNULIB_MBSRCHR=0
18980
18981
18982
18983 GL_GNULIB_MBSSTR=0
18984
18985
18986
18987 GL_GNULIB_MBSCASECMP=0
18988
18989
18990
18991 GL_GNULIB_MBSNCASECMP=0
18992
18993
18994
18995 GL_GNULIB_MBSPCASECMP=0
18996
18997
18998
18999 GL_GNULIB_MBSCASESTR=0
19000
19001
19002
19003 GL_GNULIB_MBSCSPN=0
19004
19005
19006
19007 GL_GNULIB_MBSPBRK=0
19008
19009
19010
19011 GL_GNULIB_MBSSPN=0
19012
19013
19014
19015 GL_GNULIB_MBSSEP=0
19016
19017
19018
19019 GL_GNULIB_MBSTOK_R=0
19020
19021
19022
19023 GL_GNULIB_STRERROR=0
19024
19025
19026
19027 GL_GNULIB_STRERROR_R=0
19028
19029
19030
19031 GL_GNULIB_STRERRORNAME_NP=0
19032
19033
19034
19035 GL_GNULIB_SIGABBREV_NP=0
19036
19037
19038
19039 GL_GNULIB_SIGDESCR_NP=0
19040
19041
19042
19043 GL_GNULIB_STRSIGNAL=0
19044
19045
19046
19047 GL_GNULIB_STRVERSCMP=0
19048
19049
19050
19051 GL_GNULIB_MDA_MEMCCPY=1
19052
19053
19054
19055 GL_GNULIB_MDA_STRDUP=1
19056
19057
19058
19059 ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default"
19060 if test "x$ac_cv_have_decl_memmem" = xyes; then :
19061 ac_have_decl=1
19062 else
19063 ac_have_decl=0
19064 fi
19065
19066 cat >>confdefs.h <<_ACEOF
19067 #define HAVE_DECL_MEMMEM $ac_have_decl
19068 _ACEOF
19069
19070
19071
19072
19073
19074 for ac_func in memmem
19075 do :
19076 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
19077 if test "x$ac_cv_func_memmem" = xyes; then :
19078 cat >>confdefs.h <<_ACEOF
19079 #define HAVE_MEMMEM 1
19080 _ACEOF
19081
19082 fi
19083 done
19084
19085 if test $ac_cv_func_memmem = yes; then
19086 HAVE_MEMMEM=1
19087 else
19088 HAVE_MEMMEM=0
19089 fi
19090
19091 if test $ac_cv_have_decl_memmem = no; then
19092 HAVE_DECL_MEMMEM=0
19093 else
19094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
19095 $as_echo_n "checking whether memmem works... " >&6; }
19096 if ${gl_cv_func_memmem_works_always+:} false; then :
19097 $as_echo_n "(cached) " >&6
19098 else
19099 if test "$cross_compiling" = yes; then :
19100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19101 /* end confdefs.h. */
19102
19103 #include <string.h> /* for __GNU_LIBRARY__ */
19104 #ifdef __GNU_LIBRARY__
19105 #include <features.h>
19106 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
19107 || __GLIBC_MINOR__ > 12)) \
19108 || (__GLIBC__ > 2)) \
19109 || defined __UCLIBC__
19110 Lucky user
19111 #endif
19112 #elif defined __CYGWIN__
19113 #include <cygwin/version.h>
19114 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
19115 Lucky user
19116 #endif
19117 #else
19118 Lucky user
19119 #endif
19120
19121 _ACEOF
19122 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19123 $EGREP "Lucky user" >/dev/null 2>&1; then :
19124 gl_cv_func_memmem_works_always="guessing yes"
19125 else
19126 gl_cv_func_memmem_works_always="$gl_cross_guess_normal"
19127 fi
19128 rm -f conftest*
19129
19130
19131 else
19132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19133 /* end confdefs.h. */
19134
19135 #include <string.h> /* for memmem */
19136 #define P "_EF_BF_BD"
19137 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
19138 #define NEEDLE P P P P P
19139
19140 int
19141 main ()
19142 {
19143
19144 int result = 0;
19145 if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
19146 result |= 1;
19147 /* Check for empty needle behavior. */
19148 {
19149 const char *haystack = "AAA";
19150 if (memmem (haystack, 3, (const char *) 1, 0) != haystack)
19151 result |= 2;
19152 }
19153 return result;
19154
19155 ;
19156 return 0;
19157 }
19158 _ACEOF
19159 if ac_fn_c_try_run "$LINENO"; then :
19160 gl_cv_func_memmem_works_always=yes
19161 else
19162 gl_cv_func_memmem_works_always=no
19163 fi
19164 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19165 conftest.$ac_objext conftest.beam conftest.$ac_ext
19166 fi
19167
19168
19169 fi
19170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
19171 $as_echo "$gl_cv_func_memmem_works_always" >&6; }
19172 case "$gl_cv_func_memmem_works_always" in
19173 *yes) ;;
19174 *)
19175 REPLACE_MEMMEM=1
19176 ;;
19177 esac
19178 fi
19179 :
19180
19181 ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
19182 if test "x$ac_cv_have_decl_memrchr" = xyes; then :
19183 ac_have_decl=1
19184 else
19185 ac_have_decl=0
19186 fi
19187
19188 cat >>confdefs.h <<_ACEOF
19189 #define HAVE_DECL_MEMRCHR $ac_have_decl
19190 _ACEOF
19191
19192
19193
19194
19195
19196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <limits.h> defines MIN and MAX" >&5
19197 $as_echo_n "checking whether <limits.h> defines MIN and MAX... " >&6; }
19198 if ${gl_cv_minmax_in_limits_h+:} false; then :
19199 $as_echo_n "(cached) " >&6
19200 else
19201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19202 /* end confdefs.h. */
19203 #include <limits.h>
19204 int x = MIN (42, 17);
19205 int
19206 main ()
19207 {
19208
19209 ;
19210 return 0;
19211 }
19212 _ACEOF
19213 if ac_fn_c_try_compile "$LINENO"; then :
19214 gl_cv_minmax_in_limits_h=yes
19215 else
19216 gl_cv_minmax_in_limits_h=no
19217 fi
19218 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19219 fi
19220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_limits_h" >&5
19221 $as_echo "$gl_cv_minmax_in_limits_h" >&6; }
19222 if test $gl_cv_minmax_in_limits_h = yes; then
19223
19224 $as_echo "#define HAVE_MINMAX_IN_LIMITS_H 1" >>confdefs.h
19225
19226 fi
19227
19228
19229
19230
19231
19232
19233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/param.h> defines MIN and MAX" >&5
19234 $as_echo_n "checking whether <sys/param.h> defines MIN and MAX... " >&6; }
19235 if ${gl_cv_minmax_in_sys_param_h+:} false; then :
19236 $as_echo_n "(cached) " >&6
19237 else
19238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19239 /* end confdefs.h. */
19240 #include <sys/param.h>
19241 int x = MIN (42, 17);
19242 int
19243 main ()
19244 {
19245
19246 ;
19247 return 0;
19248 }
19249 _ACEOF
19250 if ac_fn_c_try_compile "$LINENO"; then :
19251 gl_cv_minmax_in_sys_param_h=yes
19252 else
19253 gl_cv_minmax_in_sys_param_h=no
19254 fi
19255 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19256 fi
19257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_sys_param_h" >&5
19258 $as_echo "$gl_cv_minmax_in_sys_param_h" >&6; }
19259 if test $gl_cv_minmax_in_sys_param_h = yes; then
19260
19261 $as_echo "#define HAVE_MINMAX_IN_SYS_PARAM_H 1" >>confdefs.h
19262
19263 fi
19264
19265
19266
19267
19268
19269
19270
19271
19272
19273
19274 HAVE_STRUCT_ADDRINFO=1;
19275 HAVE_DECL_FREEADDRINFO=1;
19276 HAVE_DECL_GAI_STRERROR=1;
19277 HAVE_DECL_GETADDRINFO=1;
19278 HAVE_DECL_GETNAMEINFO=1;
19279 REPLACE_GAI_STRERROR=0;
19280 REPLACE_GETADDRINFO=0;
19281
19282
19283
19284
19285
19286
19287
19288
19289
19290
19291
19292
19293 if test $gl_cv_have_include_next = yes; then
19294 gl_cv_next_netdb_h='<'netdb.h'>'
19295 else
19296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <netdb.h>" >&5
19297 $as_echo_n "checking absolute name of <netdb.h>... " >&6; }
19298 if ${gl_cv_next_netdb_h+:} false; then :
19299 $as_echo_n "(cached) " >&6
19300 else
19301
19302 if test $ac_cv_header_netdb_h = yes; then
19303
19304
19305
19306
19307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19308 /* end confdefs.h. */
19309 #include <netdb.h>
19310 _ACEOF
19311 case "$host_os" in
19312 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19313 *) gl_absname_cpp="$ac_cpp" ;;
19314 esac
19315
19316 case "$host_os" in
19317 mingw*)
19318 gl_dirsep_regex='[/\\]'
19319 ;;
19320 *)
19321 gl_dirsep_regex='\/'
19322 ;;
19323 esac
19324 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19325 gl_header_literal_regex=`echo 'netdb.h' \
19326 | sed -e "$gl_make_literal_regex_sed"`
19327 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19328 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19329 s|^/[^/]|//&|
19330 p
19331 q
19332 }'
19333
19334 gl_cv_absolute_netdb_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19335 sed -n "$gl_absolute_header_sed"`
19336
19337 gl_header=$gl_cv_absolute_netdb_h
19338 gl_cv_next_netdb_h='"'$gl_header'"'
19339 else
19340 gl_cv_next_netdb_h='<'netdb.h'>'
19341 fi
19342
19343
19344 fi
19345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_netdb_h" >&5
19346 $as_echo "$gl_cv_next_netdb_h" >&6; }
19347 fi
19348 NEXT_NETDB_H=$gl_cv_next_netdb_h
19349
19350 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19351 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19352 gl_next_as_first_directive='<'netdb.h'>'
19353 else
19354 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19355 gl_next_as_first_directive=$gl_cv_next_netdb_h
19356 fi
19357 NEXT_AS_FIRST_DIRECTIVE_NETDB_H=$gl_next_as_first_directive
19358
19359
19360
19361
19362 if test $ac_cv_header_netdb_h = yes; then
19363 HAVE_NETDB_H=1
19364 else
19365 HAVE_NETDB_H=0
19366 fi
19367
19368
19369
19370
19371
19372
19373
19374
19375 GL_GNULIB_GETADDRINFO=0
19376
19377
19378
19379
19380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for O_CLOEXEC" >&5
19381 $as_echo_n "checking for O_CLOEXEC... " >&6; }
19382 if ${gl_cv_macro_O_CLOEXEC+:} false; then :
19383 $as_echo_n "(cached) " >&6
19384 else
19385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19386 /* end confdefs.h. */
19387 #include <fcntl.h>
19388 #ifndef O_CLOEXEC
19389 choke me;
19390 #endif
19391
19392 int
19393 main ()
19394 {
19395 return O_CLOEXEC;
19396 ;
19397 return 0;
19398 }
19399 _ACEOF
19400 if ac_fn_c_try_compile "$LINENO"; then :
19401 gl_cv_macro_O_CLOEXEC=yes
19402 else
19403 gl_cv_macro_O_CLOEXEC=no
19404 fi
19405 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19406 fi
19407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_macro_O_CLOEXEC" >&5
19408 $as_echo "$gl_cv_macro_O_CLOEXEC" >&6; }
19409
19410
19411
19412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
19413 $as_echo_n "checking for promoted mode_t type... " >&6; }
19414 if ${gl_cv_promoted_mode_t+:} false; then :
19415 $as_echo_n "(cached) " >&6
19416 else
19417
19418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19419 /* end confdefs.h. */
19420 #include <sys/types.h>
19421 int
19422 main ()
19423 {
19424 typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
19425 ;
19426 return 0;
19427 }
19428 _ACEOF
19429 if ac_fn_c_try_compile "$LINENO"; then :
19430 gl_cv_promoted_mode_t='int'
19431 else
19432 gl_cv_promoted_mode_t='mode_t'
19433 fi
19434 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19435
19436 fi
19437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
19438 $as_echo "$gl_cv_promoted_mode_t" >&6; }
19439
19440 cat >>confdefs.h <<_ACEOF
19441 #define PROMOTED_MODE_T $gl_cv_promoted_mode_t
19442 _ACEOF
19443
19444
19445
19446
19447
19448
19449
19450
19451
19452
19453
19454 HAVE_PSELECT=1;
19455 REPLACE_PSELECT=0;
19456 REPLACE_SELECT=0;
19457
19458
19459
19460
19461
19462
19463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
19464 $as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; }
19465 if ${gl_cv_header_sys_select_h_selfcontained+:} false; then :
19466 $as_echo_n "(cached) " >&6
19467 else
19468
19469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19470 /* end confdefs.h. */
19471 #include <sys/select.h>
19472 int
19473 main ()
19474 {
19475 struct timeval b;
19476 ;
19477 return 0;
19478 }
19479 _ACEOF
19480 if ac_fn_c_try_compile "$LINENO"; then :
19481 gl_cv_header_sys_select_h_selfcontained=yes
19482 else
19483 gl_cv_header_sys_select_h_selfcontained=no
19484 fi
19485 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19486 if test $gl_cv_header_sys_select_h_selfcontained = yes; then
19487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19488 /* end confdefs.h. */
19489 #include <sys/select.h>
19490 int
19491 main ()
19492 {
19493 int memset; int bzero;
19494 ;
19495 return 0;
19496 }
19497
19498 _ACEOF
19499 if ac_fn_c_try_compile "$LINENO"; then :
19500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19501 /* end confdefs.h. */
19502 #include <sys/select.h>
19503 int
19504 main ()
19505 {
19506
19507 #undef memset
19508 #define memset nonexistent_memset
19509 extern
19510 #ifdef __cplusplus
19511 "C"
19512 #endif
19513 void *memset (void *, int, unsigned long);
19514 #undef bzero
19515 #define bzero nonexistent_bzero
19516 extern
19517 #ifdef __cplusplus
19518 "C"
19519 #endif
19520 void bzero (void *, unsigned long);
19521 fd_set fds;
19522 FD_ZERO (&fds);
19523
19524 ;
19525 return 0;
19526 }
19527
19528 _ACEOF
19529 if ac_fn_c_try_link "$LINENO"; then :
19530
19531 else
19532 gl_cv_header_sys_select_h_selfcontained=no
19533 fi
19534 rm -f core conftest.err conftest.$ac_objext \
19535 conftest$ac_exeext conftest.$ac_ext
19536
19537 fi
19538 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19539 fi
19540
19541 fi
19542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
19543 $as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; }
19544
19545
19546
19547
19548
19549
19550
19551
19552
19553 if test $gl_cv_have_include_next = yes; then
19554 gl_cv_next_sys_select_h='<'sys/select.h'>'
19555 else
19556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
19557 $as_echo_n "checking absolute name of <sys/select.h>... " >&6; }
19558 if ${gl_cv_next_sys_select_h+:} false; then :
19559 $as_echo_n "(cached) " >&6
19560 else
19561
19562 if test $ac_cv_header_sys_select_h = yes; then
19563
19564
19565
19566
19567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19568 /* end confdefs.h. */
19569 #include <sys/select.h>
19570 _ACEOF
19571 case "$host_os" in
19572 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19573 *) gl_absname_cpp="$ac_cpp" ;;
19574 esac
19575
19576 case "$host_os" in
19577 mingw*)
19578 gl_dirsep_regex='[/\\]'
19579 ;;
19580 *)
19581 gl_dirsep_regex='\/'
19582 ;;
19583 esac
19584 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19585 gl_header_literal_regex=`echo 'sys/select.h' \
19586 | sed -e "$gl_make_literal_regex_sed"`
19587 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19588 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19589 s|^/[^/]|//&|
19590 p
19591 q
19592 }'
19593
19594 gl_cv_absolute_sys_select_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19595 sed -n "$gl_absolute_header_sed"`
19596
19597 gl_header=$gl_cv_absolute_sys_select_h
19598 gl_cv_next_sys_select_h='"'$gl_header'"'
19599 else
19600 gl_cv_next_sys_select_h='<'sys/select.h'>'
19601 fi
19602
19603
19604 fi
19605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
19606 $as_echo "$gl_cv_next_sys_select_h" >&6; }
19607 fi
19608 NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
19609
19610 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19611 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19612 gl_next_as_first_directive='<'sys/select.h'>'
19613 else
19614 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19615 gl_next_as_first_directive=$gl_cv_next_sys_select_h
19616 fi
19617 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
19618
19619
19620
19621
19622 if test $ac_cv_header_sys_select_h = yes; then
19623 HAVE_SYS_SELECT_H=1
19624 else
19625 HAVE_SYS_SELECT_H=0
19626 fi
19627
19628
19629
19630
19631
19632 if test $ac_cv_header_sys_socket_h != yes; then
19633 for ac_header in winsock2.h
19634 do :
19635 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
19636 if test "x$ac_cv_header_winsock2_h" = xyes; then :
19637 cat >>confdefs.h <<_ACEOF
19638 #define HAVE_WINSOCK2_H 1
19639 _ACEOF
19640
19641 fi
19642
19643 done
19644
19645 fi
19646 if test "$ac_cv_header_winsock2_h" = yes; then
19647 HAVE_WINSOCK2_H=1
19648 UNISTD_H_HAVE_WINSOCK2_H=1
19649 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
19650 else
19651 HAVE_WINSOCK2_H=0
19652 fi
19653
19654
19655
19656
19657
19658
19659
19660
19661
19662
19663
19664
19665 if test $ac_cv_header_sys_socket_h != yes; then
19666 for ac_header in winsock2.h
19667 do :
19668 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
19669 if test "x$ac_cv_header_winsock2_h" = xyes; then :
19670 cat >>confdefs.h <<_ACEOF
19671 #define HAVE_WINSOCK2_H 1
19672 _ACEOF
19673
19674 fi
19675
19676 done
19677
19678 fi
19679 if test "$ac_cv_header_winsock2_h" = yes; then
19680 HAVE_WINSOCK2_H=1
19681 UNISTD_H_HAVE_WINSOCK2_H=1
19682 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
19683 else
19684 HAVE_WINSOCK2_H=0
19685 fi
19686
19687 LIBSOCKET=
19688 if test $HAVE_WINSOCK2_H = 1; then
19689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WSAStartup" >&5
19690 $as_echo_n "checking for WSAStartup... " >&6; }
19691 if ${gl_cv_func_wsastartup+:} false; then :
19692 $as_echo_n "(cached) " >&6
19693 else
19694
19695 gl_save_LIBS="$LIBS"
19696 LIBS="$LIBS -lws2_32"
19697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19698 /* end confdefs.h. */
19699
19700 #ifdef HAVE_WINSOCK2_H
19701 # include <winsock2.h>
19702 #endif
19703 int
19704 main ()
19705 {
19706
19707 WORD wVersionRequested = MAKEWORD(1, 1);
19708 WSADATA wsaData;
19709 int err = WSAStartup(wVersionRequested, &wsaData);
19710 WSACleanup ();
19711
19712 ;
19713 return 0;
19714 }
19715
19716 _ACEOF
19717 if ac_fn_c_try_link "$LINENO"; then :
19718 gl_cv_func_wsastartup=yes
19719 else
19720 gl_cv_func_wsastartup=no
19721 fi
19722 rm -f core conftest.err conftest.$ac_objext \
19723 conftest$ac_exeext conftest.$ac_ext
19724 LIBS="$gl_save_LIBS"
19725
19726 fi
19727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wsastartup" >&5
19728 $as_echo "$gl_cv_func_wsastartup" >&6; }
19729 if test "$gl_cv_func_wsastartup" = "yes"; then
19730
19731 $as_echo "#define WINDOWS_SOCKETS 1" >>confdefs.h
19732
19733 LIBSOCKET='-lws2_32'
19734 fi
19735 else
19736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
19737 $as_echo_n "checking for library containing setsockopt... " >&6; }
19738 if ${gl_cv_lib_socket+:} false; then :
19739 $as_echo_n "(cached) " >&6
19740 else
19741
19742 gl_cv_lib_socket=
19743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19744 /* end confdefs.h. */
19745 extern
19746 #ifdef __cplusplus
19747 "C"
19748 #endif
19749 char setsockopt();
19750 int
19751 main ()
19752 {
19753 setsockopt();
19754 ;
19755 return 0;
19756 }
19757 _ACEOF
19758 if ac_fn_c_try_link "$LINENO"; then :
19759
19760 else
19761 gl_save_LIBS="$LIBS"
19762 LIBS="$gl_save_LIBS -lsocket"
19763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19764 /* end confdefs.h. */
19765 extern
19766 #ifdef __cplusplus
19767 "C"
19768 #endif
19769 char setsockopt();
19770 int
19771 main ()
19772 {
19773 setsockopt();
19774 ;
19775 return 0;
19776 }
19777 _ACEOF
19778 if ac_fn_c_try_link "$LINENO"; then :
19779 gl_cv_lib_socket="-lsocket"
19780 fi
19781 rm -f core conftest.err conftest.$ac_objext \
19782 conftest$ac_exeext conftest.$ac_ext
19783 if test -z "$gl_cv_lib_socket"; then
19784 LIBS="$gl_save_LIBS -lnetwork"
19785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19786 /* end confdefs.h. */
19787 extern
19788 #ifdef __cplusplus
19789 "C"
19790 #endif
19791 char setsockopt();
19792 int
19793 main ()
19794 {
19795 setsockopt();
19796 ;
19797 return 0;
19798 }
19799 _ACEOF
19800 if ac_fn_c_try_link "$LINENO"; then :
19801 gl_cv_lib_socket="-lnetwork"
19802 fi
19803 rm -f core conftest.err conftest.$ac_objext \
19804 conftest$ac_exeext conftest.$ac_ext
19805 if test -z "$gl_cv_lib_socket"; then
19806 LIBS="$gl_save_LIBS -lnet"
19807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19808 /* end confdefs.h. */
19809 extern
19810 #ifdef __cplusplus
19811 "C"
19812 #endif
19813 char setsockopt();
19814 int
19815 main ()
19816 {
19817 setsockopt();
19818 ;
19819 return 0;
19820 }
19821 _ACEOF
19822 if ac_fn_c_try_link "$LINENO"; then :
19823 gl_cv_lib_socket="-lnet"
19824 fi
19825 rm -f core conftest.err conftest.$ac_objext \
19826 conftest$ac_exeext conftest.$ac_ext
19827 fi
19828 fi
19829 LIBS="$gl_save_LIBS"
19830
19831 fi
19832 rm -f core conftest.err conftest.$ac_objext \
19833 conftest$ac_exeext conftest.$ac_ext
19834 if test -z "$gl_cv_lib_socket"; then
19835 gl_cv_lib_socket="none needed"
19836 fi
19837
19838 fi
19839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_socket" >&5
19840 $as_echo "$gl_cv_lib_socket" >&6; }
19841 if test "$gl_cv_lib_socket" != "none needed"; then
19842 LIBSOCKET="$gl_cv_lib_socket"
19843 fi
19844 fi
19845
19846
19847
19848
19849
19850
19851 :
19852
19853
19854
19855
19856 GL_GNULIB_PSELECT=0
19857
19858
19859
19860 GL_GNULIB_SELECT=0
19861
19862
19863
19864 ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default"
19865 if test "x$ac_cv_have_decl_setenv" = xyes; then :
19866 ac_have_decl=1
19867 else
19868 ac_have_decl=0
19869 fi
19870
19871 cat >>confdefs.h <<_ACEOF
19872 #define HAVE_DECL_SETENV $ac_have_decl
19873 _ACEOF
19874
19875
19876
19877
19878
19879
19880 if test $ac_cv_have_decl_setenv = no; then
19881 HAVE_DECL_SETENV=0
19882 fi
19883
19884
19885
19886
19887
19888 for ac_header in search.h
19889 do :
19890 ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
19891 if test "x$ac_cv_header_search_h" = xyes; then :
19892 cat >>confdefs.h <<_ACEOF
19893 #define HAVE_SEARCH_H 1
19894 _ACEOF
19895
19896 fi
19897
19898 done
19899
19900 for ac_func in tsearch
19901 do :
19902 ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
19903 if test "x$ac_cv_func_tsearch" = xyes; then :
19904 cat >>confdefs.h <<_ACEOF
19905 #define HAVE_TSEARCH 1
19906 _ACEOF
19907
19908 fi
19909 done
19910
19911
19912
19913
19914 HAVE_POSIX_SIGNALBLOCKING=1;
19915 HAVE_PTHREAD_SIGMASK=1;
19916 HAVE_RAISE=1;
19917 HAVE_SIGSET_T=1;
19918 HAVE_SIGINFO_T=1;
19919 HAVE_SIGACTION=1;
19920 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
19921
19922 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
19923
19924 HAVE_SIGHANDLER_T=1;
19925 REPLACE_PTHREAD_SIGMASK=0;
19926 REPLACE_RAISE=0;
19927
19928
19929 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
19930 #include <signal.h>
19931 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
19932 #include <sys/types.h>
19933
19934 "
19935 if test "x$ac_cv_type_sigset_t" = xyes; then :
19936
19937 cat >>confdefs.h <<_ACEOF
19938 #define HAVE_SIGSET_T 1
19939 _ACEOF
19940
19941 gl_cv_type_sigset_t=yes
19942 else
19943 gl_cv_type_sigset_t=no
19944 fi
19945
19946 if test $gl_cv_type_sigset_t != yes; then
19947 HAVE_SIGSET_T=0
19948 fi
19949
19950
19951
19952
19953
19954
19955
19956
19957
19958
19959
19960
19961 if test $gl_cv_have_include_next = yes; then
19962 gl_cv_next_signal_h='<'signal.h'>'
19963 else
19964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
19965 $as_echo_n "checking absolute name of <signal.h>... " >&6; }
19966 if ${gl_cv_next_signal_h+:} false; then :
19967 $as_echo_n "(cached) " >&6
19968 else
19969
19970
19971
19972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19973 /* end confdefs.h. */
19974 #include <signal.h>
19975 _ACEOF
19976 case "$host_os" in
19977 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19978 *) gl_absname_cpp="$ac_cpp" ;;
19979 esac
19980
19981 case "$host_os" in
19982 mingw*)
19983 gl_dirsep_regex='[/\\]'
19984 ;;
19985 *)
19986 gl_dirsep_regex='\/'
19987 ;;
19988 esac
19989 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19990 gl_header_literal_regex=`echo 'signal.h' \
19991 | sed -e "$gl_make_literal_regex_sed"`
19992 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19993 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19994 s|^/[^/]|//&|
19995 p
19996 q
19997 }'
19998
19999 gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20000 sed -n "$gl_absolute_header_sed"`
20001
20002 gl_header=$gl_cv_absolute_signal_h
20003 gl_cv_next_signal_h='"'$gl_header'"'
20004
20005
20006 fi
20007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
20008 $as_echo "$gl_cv_next_signal_h" >&6; }
20009 fi
20010 NEXT_SIGNAL_H=$gl_cv_next_signal_h
20011
20012 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20013 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20014 gl_next_as_first_directive='<'signal.h'>'
20015 else
20016 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20017 gl_next_as_first_directive=$gl_cv_next_signal_h
20018 fi
20019 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
20020
20021
20022
20023
20024
20025 # AIX declares sig_atomic_t to already include volatile, and C89 compilers
20026 # then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
20027 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
20028 #include <signal.h>
20029
20030 "
20031 if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes; then :
20032
20033 else
20034 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
20035 fi
20036
20037
20038
20039
20040
20041
20042
20043 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
20044 #include <signal.h>
20045
20046 "
20047 if test "x$ac_cv_type_sighandler_t" = xyes; then :
20048
20049 else
20050 HAVE_SIGHANDLER_T=0
20051 fi
20052
20053
20054
20055
20056
20057
20058
20059
20060
20061
20062 GL_GNULIB_PTHREAD_SIGMASK=0
20063
20064
20065
20066 GL_GNULIB_RAISE=0
20067
20068
20069
20070 GL_GNULIB_SIGNAL_H_SIGPIPE=0
20071
20072
20073
20074 GL_GNULIB_SIGPROCMASK=0
20075
20076
20077
20078 GL_GNULIB_SIGACTION=0
20079
20080
20081
20082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
20083 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
20084 if ${ac_cv_header_stdbool_h+:} false; then :
20085 $as_echo_n "(cached) " >&6
20086 else
20087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20088 /* end confdefs.h. */
20089
20090 #include <stdbool.h>
20091
20092 #ifdef __cplusplus
20093 typedef bool Bool;
20094 #else
20095 typedef _Bool Bool;
20096 #ifndef bool
20097 "error: bool is not defined"
20098 #endif
20099 #ifndef false
20100 "error: false is not defined"
20101 #endif
20102 #if false
20103 "error: false is not 0"
20104 #endif
20105 #ifndef true
20106 "error: true is not defined"
20107 #endif
20108 #if true != 1
20109 "error: true is not 1"
20110 #endif
20111 #endif
20112
20113 #ifndef __bool_true_false_are_defined
20114 "error: __bool_true_false_are_defined is not defined"
20115 #endif
20116
20117 struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
20118
20119 char a[true == 1 ? 1 : -1];
20120 char b[false == 0 ? 1 : -1];
20121 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
20122 char d[(bool) 0.5 == true ? 1 : -1];
20123 /* See body of main program for 'e'. */
20124 char f[(Bool) 0.0 == false ? 1 : -1];
20125 char g[true];
20126 char h[sizeof (Bool)];
20127 char i[sizeof s.t];
20128 enum { j = false, k = true, l = false * true, m = true * 256 };
20129 /* The following fails for
20130 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
20131 Bool n[m];
20132 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
20133 char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
20134 /* Catch a bug in an HP-UX C compiler. See
20135 https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
20136 https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html
20137 */
20138 Bool q = true;
20139 Bool *pq = &q;
20140 bool *qq = &q;
20141
20142 int
20143 main ()
20144 {
20145
20146 bool e = &s;
20147 *pq |= q; *pq |= ! q;
20148 *qq |= q; *qq |= ! q;
20149 /* Refer to every declared value, to avoid compiler optimizations. */
20150 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
20151 + !m + !n + !o + !p + !q + !pq + !qq);
20152
20153 ;
20154 return 0;
20155 }
20156 _ACEOF
20157 if ac_fn_c_try_compile "$LINENO"; then :
20158 ac_cv_header_stdbool_h=yes
20159 else
20160 ac_cv_header_stdbool_h=no
20161 fi
20162 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20163 fi
20164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
20165 $as_echo "$ac_cv_header_stdbool_h" >&6; }
20166 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
20167 if test "x$ac_cv_type__Bool" = xyes; then :
20168
20169 cat >>confdefs.h <<_ACEOF
20170 #define HAVE__BOOL 1
20171 _ACEOF
20172
20173
20174 fi
20175
20176
20177
20178
20179 ac_fn_c_check_decl "$LINENO" "fcloseall" "ac_cv_have_decl_fcloseall" "$ac_includes_default"
20180 if test "x$ac_cv_have_decl_fcloseall" = xyes; then :
20181 ac_have_decl=1
20182 else
20183 ac_have_decl=0
20184 fi
20185
20186 cat >>confdefs.h <<_ACEOF
20187 #define HAVE_DECL_FCLOSEALL $ac_have_decl
20188 _ACEOF
20189
20190
20191
20192
20193 $as_echo "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
20194
20195
20196
20197
20198
20199
20200
20201
20202
20203 if test $gl_cv_have_include_next = yes; then
20204 gl_cv_next_stdio_h='<'stdio.h'>'
20205 else
20206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
20207 $as_echo_n "checking absolute name of <stdio.h>... " >&6; }
20208 if ${gl_cv_next_stdio_h+:} false; then :
20209 $as_echo_n "(cached) " >&6
20210 else
20211
20212
20213
20214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20215 /* end confdefs.h. */
20216 #include <stdio.h>
20217 _ACEOF
20218 case "$host_os" in
20219 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20220 *) gl_absname_cpp="$ac_cpp" ;;
20221 esac
20222
20223 case "$host_os" in
20224 mingw*)
20225 gl_dirsep_regex='[/\\]'
20226 ;;
20227 *)
20228 gl_dirsep_regex='\/'
20229 ;;
20230 esac
20231 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20232 gl_header_literal_regex=`echo 'stdio.h' \
20233 | sed -e "$gl_make_literal_regex_sed"`
20234 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20235 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20236 s|^/[^/]|//&|
20237 p
20238 q
20239 }'
20240
20241 gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20242 sed -n "$gl_absolute_header_sed"`
20243
20244 gl_header=$gl_cv_absolute_stdio_h
20245 gl_cv_next_stdio_h='"'$gl_header'"'
20246
20247
20248 fi
20249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
20250 $as_echo "$gl_cv_next_stdio_h" >&6; }
20251 fi
20252 NEXT_STDIO_H=$gl_cv_next_stdio_h
20253
20254 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20255 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20256 gl_next_as_first_directive='<'stdio.h'>'
20257 else
20258 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20259 gl_next_as_first_directive=$gl_cv_next_stdio_h
20260 fi
20261 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
20262
20263
20264
20265
20266
20267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
20268 $as_echo_n "checking which flavor of printf attribute matches inttypes macros... " >&6; }
20269 if ${gl_cv_func_printf_attribute_flavor+:} false; then :
20270 $as_echo_n "(cached) " >&6
20271 else
20272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20273 /* end confdefs.h. */
20274
20275 #define __STDC_FORMAT_MACROS 1
20276 #include <stdio.h>
20277 #include <inttypes.h>
20278 /* For non-mingw systems, compilation will trivially succeed.
20279 For mingw, compilation will succeed for older mingw (system
20280 printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
20281 #if (defined _WIN32 && ! defined __CYGWIN__) && \
20282 (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
20283 extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
20284 #endif
20285
20286 int
20287 main ()
20288 {
20289
20290 ;
20291 return 0;
20292 }
20293 _ACEOF
20294 if ac_fn_c_try_compile "$LINENO"; then :
20295 gl_cv_func_printf_attribute_flavor=system
20296 else
20297 gl_cv_func_printf_attribute_flavor=gnu
20298 fi
20299 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20300 fi
20301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
20302 $as_echo "$gl_cv_func_printf_attribute_flavor" >&6; }
20303 if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
20304
20305 $as_echo "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
20306
20307 fi
20308
20309
20310
20311
20312
20313
20314
20315
20316
20317
20318
20319
20320
20321 if test $ac_cv_have_decl_fcloseall = no; then
20322 HAVE_DECL_FCLOSEALL=0
20323 fi
20324
20325 ac_fn_c_check_decl "$LINENO" "ecvt" "ac_cv_have_decl_ecvt" "$ac_includes_default"
20326 if test "x$ac_cv_have_decl_ecvt" = xyes; then :
20327 ac_have_decl=1
20328 else
20329 ac_have_decl=0
20330 fi
20331
20332 cat >>confdefs.h <<_ACEOF
20333 #define HAVE_DECL_ECVT $ac_have_decl
20334 _ACEOF
20335
20336 ac_fn_c_check_decl "$LINENO" "fcvt" "ac_cv_have_decl_fcvt" "$ac_includes_default"
20337 if test "x$ac_cv_have_decl_fcvt" = xyes; then :
20338 ac_have_decl=1
20339 else
20340 ac_have_decl=0
20341 fi
20342
20343 cat >>confdefs.h <<_ACEOF
20344 #define HAVE_DECL_FCVT $ac_have_decl
20345 _ACEOF
20346
20347 ac_fn_c_check_decl "$LINENO" "gcvt" "ac_cv_have_decl_gcvt" "$ac_includes_default"
20348 if test "x$ac_cv_have_decl_gcvt" = xyes; then :
20349 ac_have_decl=1
20350 else
20351 ac_have_decl=0
20352 fi
20353
20354 cat >>confdefs.h <<_ACEOF
20355 #define HAVE_DECL_GCVT $ac_have_decl
20356 _ACEOF
20357
20358
20359
20360
20361
20362
20363
20364
20365
20366
20367
20368 if test $gl_cv_have_include_next = yes; then
20369 gl_cv_next_stdlib_h='<'stdlib.h'>'
20370 else
20371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
20372 $as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
20373 if ${gl_cv_next_stdlib_h+:} false; then :
20374 $as_echo_n "(cached) " >&6
20375 else
20376
20377
20378
20379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20380 /* end confdefs.h. */
20381 #include <stdlib.h>
20382 _ACEOF
20383 case "$host_os" in
20384 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20385 *) gl_absname_cpp="$ac_cpp" ;;
20386 esac
20387
20388 case "$host_os" in
20389 mingw*)
20390 gl_dirsep_regex='[/\\]'
20391 ;;
20392 *)
20393 gl_dirsep_regex='\/'
20394 ;;
20395 esac
20396 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20397 gl_header_literal_regex=`echo 'stdlib.h' \
20398 | sed -e "$gl_make_literal_regex_sed"`
20399 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20400 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20401 s|^/[^/]|//&|
20402 p
20403 q
20404 }'
20405
20406 gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20407 sed -n "$gl_absolute_header_sed"`
20408
20409 gl_header=$gl_cv_absolute_stdlib_h
20410 gl_cv_next_stdlib_h='"'$gl_header'"'
20411
20412
20413 fi
20414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
20415 $as_echo "$gl_cv_next_stdlib_h" >&6; }
20416 fi
20417 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
20418
20419 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20420 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20421 gl_next_as_first_directive='<'stdlib.h'>'
20422 else
20423 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20424 gl_next_as_first_directive=$gl_cv_next_stdlib_h
20425 fi
20426 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
20427
20428
20429
20430
20431
20432
20433
20434
20435
20436
20437
20438
20439 if test $ac_cv_have_decl_ecvt = no; then
20440 HAVE_DECL_ECVT=0
20441 fi
20442
20443 if test $ac_cv_have_decl_fcvt = no; then
20444 HAVE_DECL_FCVT=0
20445 fi
20446
20447 if test $ac_cv_have_decl_gcvt = no; then
20448 HAVE_DECL_GCVT=0
20449 fi
20450
20451 ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
20452 if test "x$ac_cv_have_decl_strdup" = xyes; then :
20453 ac_have_decl=1
20454 else
20455 ac_have_decl=0
20456 fi
20457
20458 cat >>confdefs.h <<_ACEOF
20459 #define HAVE_DECL_STRDUP $ac_have_decl
20460 _ACEOF
20461
20462
20463 REPLACE_STRERROR_0=0
20464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
20465 $as_echo_n "checking whether strerror(0) succeeds... " >&6; }
20466 if ${gl_cv_func_strerror_0_works+:} false; then :
20467 $as_echo_n "(cached) " >&6
20468 else
20469 if test "$cross_compiling" = yes; then :
20470 case "$host_os" in
20471 # Guess yes on glibc systems.
20472 *-gnu* | gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
20473 # Guess yes on musl systems.
20474 *-musl*) gl_cv_func_strerror_0_works="guessing yes" ;;
20475 # Guess yes on native Windows.
20476 mingw*) gl_cv_func_strerror_0_works="guessing yes" ;;
20477 # If we don't know, obey --enable-cross-guesses.
20478 *) gl_cv_func_strerror_0_works="$gl_cross_guess_normal" ;;
20479 esac
20480
20481 else
20482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20483 /* end confdefs.h. */
20484 #include <string.h>
20485 #include <errno.h>
20486
20487 int
20488 main ()
20489 {
20490 int result = 0;
20491 char *str;
20492 errno = 0;
20493 str = strerror (0);
20494 if (!*str) result |= 1;
20495 if (errno) result |= 2;
20496 if (strstr (str, "nknown") || strstr (str, "ndefined"))
20497 result |= 4;
20498 return result;
20499 ;
20500 return 0;
20501 }
20502 _ACEOF
20503 if ac_fn_c_try_run "$LINENO"; then :
20504 gl_cv_func_strerror_0_works=yes
20505 else
20506 gl_cv_func_strerror_0_works=no
20507 fi
20508 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20509 conftest.$ac_objext conftest.beam conftest.$ac_ext
20510 fi
20511
20512
20513 fi
20514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
20515 $as_echo "$gl_cv_func_strerror_0_works" >&6; }
20516 case "$gl_cv_func_strerror_0_works" in
20517 *yes) ;;
20518 *)
20519 REPLACE_STRERROR_0=1
20520
20521 $as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h
20522
20523 ;;
20524 esac
20525
20526
20527
20528
20529
20530
20531
20532
20533
20534
20535
20536
20537
20538 if test $ac_cv_func_strerror_r = yes; then
20539 if test "$GL_GENERATE_ERRNO_H:$REPLACE_STRERROR_0" = false:0; then
20540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strerror_r with POSIX signature" >&5
20541 $as_echo_n "checking for strerror_r with POSIX signature... " >&6; }
20542 if ${gl_cv_func_strerror_r_posix_signature+:} false; then :
20543 $as_echo_n "(cached) " >&6
20544 else
20545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20546 /* end confdefs.h. */
20547 #include <string.h>
20548 int strerror_r (int, char *, size_t);
20549
20550 int
20551 main ()
20552 {
20553
20554 ;
20555 return 0;
20556 }
20557 _ACEOF
20558 if ac_fn_c_try_compile "$LINENO"; then :
20559 gl_cv_func_strerror_r_posix_signature=yes
20560 else
20561 gl_cv_func_strerror_r_posix_signature=no
20562 fi
20563 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20564
20565 fi
20566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_posix_signature" >&5
20567 $as_echo "$gl_cv_func_strerror_r_posix_signature" >&6; }
20568 if test $gl_cv_func_strerror_r_posix_signature = yes; then
20569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r works" >&5
20570 $as_echo_n "checking whether strerror_r works... " >&6; }
20571 if ${gl_cv_func_strerror_r_works+:} false; then :
20572 $as_echo_n "(cached) " >&6
20573 else
20574 if test "$cross_compiling" = yes; then :
20575
20576 case "$host_os" in
20577 # Guess no on AIX.
20578 aix*) gl_cv_func_strerror_r_works="guessing no";;
20579 # Guess no on HP-UX.
20580 hpux*) gl_cv_func_strerror_r_works="guessing no";;
20581 # Guess no on BSD variants.
20582 *bsd*) gl_cv_func_strerror_r_works="guessing no";;
20583 # Guess yes otherwise.
20584 *) gl_cv_func_strerror_r_works="guessing yes";;
20585 esac
20586
20587 else
20588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20589 /* end confdefs.h. */
20590 #include <errno.h>
20591 #include <string.h>
20592
20593 int
20594 main ()
20595 {
20596 int result = 0;
20597 char buf[79];
20598 if (strerror_r (EACCES, buf, 0) < 0)
20599 result |= 1;
20600 errno = 0;
20601 if (strerror_r (EACCES, buf, sizeof buf) != 0)
20602 result |= 2;
20603 strcpy (buf, "Unknown");
20604 if (strerror_r (0, buf, sizeof buf) != 0)
20605 result |= 4;
20606 if (errno)
20607 result |= 8;
20608 if (strstr (buf, "nknown") || strstr (buf, "ndefined"))
20609 result |= 0x10;
20610 errno = 0;
20611 *buf = 0;
20612 if (strerror_r (-3, buf, sizeof buf) < 0)
20613 result |= 0x20;
20614 if (errno)
20615 result |= 0x40;
20616 if (!*buf)
20617 result |= 0x80;
20618 return result;
20619
20620 ;
20621 return 0;
20622 }
20623 _ACEOF
20624 if ac_fn_c_try_run "$LINENO"; then :
20625 gl_cv_func_strerror_r_works=yes
20626 else
20627 gl_cv_func_strerror_r_works=no
20628 fi
20629 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20630 conftest.$ac_objext conftest.beam conftest.$ac_ext
20631 fi
20632
20633
20634 fi
20635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
20636 $as_echo "$gl_cv_func_strerror_r_works" >&6; }
20637 else
20638
20639 if test $ac_cv_func___xpg_strerror_r = yes; then
20640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __xpg_strerror_r works" >&5
20641 $as_echo_n "checking whether __xpg_strerror_r works... " >&6; }
20642 if ${gl_cv_func_strerror_r_works+:} false; then :
20643 $as_echo_n "(cached) " >&6
20644 else
20645 if test "$cross_compiling" = yes; then :
20646 gl_cv_func_strerror_r_works="$gl_cross_guess_normal"
20647
20648 else
20649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20650 /* end confdefs.h. */
20651 #include <errno.h>
20652 #include <string.h>
20653 extern
20654 #ifdef __cplusplus
20655 "C"
20656 #endif
20657 int __xpg_strerror_r(int, char *, size_t);
20658
20659 int
20660 main ()
20661 {
20662 int result = 0;
20663 char buf[256] = "^";
20664 char copy[256];
20665 char *str = strerror (-1);
20666 strcpy (copy, str);
20667 if (__xpg_strerror_r (-2, buf, 1) == 0)
20668 result |= 1;
20669 if (*buf)
20670 result |= 2;
20671 __xpg_strerror_r (-2, buf, 256);
20672 if (strcmp (str, copy))
20673 result |= 4;
20674 return result;
20675
20676 ;
20677 return 0;
20678 }
20679 _ACEOF
20680 if ac_fn_c_try_run "$LINENO"; then :
20681 gl_cv_func_strerror_r_works=yes
20682 else
20683 gl_cv_func_strerror_r_works=no
20684 fi
20685 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20686 conftest.$ac_objext conftest.beam conftest.$ac_ext
20687 fi
20688
20689
20690 fi
20691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
20692 $as_echo "$gl_cv_func_strerror_r_works" >&6; }
20693 fi
20694 fi
20695 fi
20696 fi
20697
20698 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
20699 if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
20700 ac_have_decl=1
20701 else
20702 ac_have_decl=0
20703 fi
20704
20705 cat >>confdefs.h <<_ACEOF
20706 #define HAVE_DECL_STRERROR_R $ac_have_decl
20707 _ACEOF
20708
20709
20710
20711
20712
20713
20714
20715
20716
20717
20718
20719
20720
20721
20722
20723 if test $gl_cv_have_include_next = yes; then
20724 gl_cv_next_string_h='<'string.h'>'
20725 else
20726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
20727 $as_echo_n "checking absolute name of <string.h>... " >&6; }
20728 if ${gl_cv_next_string_h+:} false; then :
20729 $as_echo_n "(cached) " >&6
20730 else
20731
20732
20733
20734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20735 /* end confdefs.h. */
20736 #include <string.h>
20737 _ACEOF
20738 case "$host_os" in
20739 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20740 *) gl_absname_cpp="$ac_cpp" ;;
20741 esac
20742
20743 case "$host_os" in
20744 mingw*)
20745 gl_dirsep_regex='[/\\]'
20746 ;;
20747 *)
20748 gl_dirsep_regex='\/'
20749 ;;
20750 esac
20751 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20752 gl_header_literal_regex=`echo 'string.h' \
20753 | sed -e "$gl_make_literal_regex_sed"`
20754 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20755 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20756 s|^/[^/]|//&|
20757 p
20758 q
20759 }'
20760
20761 gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20762 sed -n "$gl_absolute_header_sed"`
20763
20764 gl_header=$gl_cv_absolute_string_h
20765 gl_cv_next_string_h='"'$gl_header'"'
20766
20767
20768 fi
20769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
20770 $as_echo "$gl_cv_next_string_h" >&6; }
20771 fi
20772 NEXT_STRING_H=$gl_cv_next_string_h
20773
20774 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20775 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20776 gl_next_as_first_directive='<'string.h'>'
20777 else
20778 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20779 gl_next_as_first_directive=$gl_cv_next_string_h
20780 fi
20781 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
20782
20783
20784
20785
20786
20787
20788
20789
20790
20791
20792
20793
20794
20795
20796
20797
20798
20799
20800
20801
20802
20803
20804
20805
20806
20807 if test $gl_cv_have_include_next = yes; then
20808 gl_cv_next_strings_h='<'strings.h'>'
20809 else
20810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <strings.h>" >&5
20811 $as_echo_n "checking absolute name of <strings.h>... " >&6; }
20812 if ${gl_cv_next_strings_h+:} false; then :
20813 $as_echo_n "(cached) " >&6
20814 else
20815
20816 if test $ac_cv_header_strings_h = yes; then
20817
20818
20819
20820
20821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20822 /* end confdefs.h. */
20823 #include <strings.h>
20824 _ACEOF
20825 case "$host_os" in
20826 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20827 *) gl_absname_cpp="$ac_cpp" ;;
20828 esac
20829
20830 case "$host_os" in
20831 mingw*)
20832 gl_dirsep_regex='[/\\]'
20833 ;;
20834 *)
20835 gl_dirsep_regex='\/'
20836 ;;
20837 esac
20838 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20839 gl_header_literal_regex=`echo 'strings.h' \
20840 | sed -e "$gl_make_literal_regex_sed"`
20841 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20842 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20843 s|^/[^/]|//&|
20844 p
20845 q
20846 }'
20847
20848 gl_cv_absolute_strings_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20849 sed -n "$gl_absolute_header_sed"`
20850
20851 gl_header=$gl_cv_absolute_strings_h
20852 gl_cv_next_strings_h='"'$gl_header'"'
20853 else
20854 gl_cv_next_strings_h='<'strings.h'>'
20855 fi
20856
20857
20858 fi
20859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_strings_h" >&5
20860 $as_echo "$gl_cv_next_strings_h" >&6; }
20861 fi
20862 NEXT_STRINGS_H=$gl_cv_next_strings_h
20863
20864 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20865 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20866 gl_next_as_first_directive='<'strings.h'>'
20867 else
20868 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20869 gl_next_as_first_directive=$gl_cv_next_strings_h
20870 fi
20871 NEXT_AS_FIRST_DIRECTIVE_STRINGS_H=$gl_next_as_first_directive
20872
20873
20874
20875
20876 if test $ac_cv_header_strings_h = yes; then
20877 HAVE_STRINGS_H=1
20878 else
20879 HAVE_STRINGS_H=0
20880 fi
20881
20882
20883
20884
20885
20886
20887 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
20888 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
20889 ac_have_decl=1
20890 else
20891 ac_have_decl=0
20892 fi
20893
20894 cat >>confdefs.h <<_ACEOF
20895 #define HAVE_DECL_STRNLEN $ac_have_decl
20896 _ACEOF
20897
20898
20899
20900
20901 if test $REPLACE_MEMCHR = 1; then
20902 REPLACE_STRSTR=1
20903 else
20904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
20905 $as_echo_n "checking whether strstr works... " >&6; }
20906 if ${gl_cv_func_strstr_works_always+:} false; then :
20907 $as_echo_n "(cached) " >&6
20908 else
20909 if test "$cross_compiling" = yes; then :
20910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20911 /* end confdefs.h. */
20912
20913 #include <string.h> /* for __GNU_LIBRARY__ */
20914 #ifdef __GNU_LIBRARY__
20915 #include <features.h>
20916 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
20917 || defined __UCLIBC__
20918 Lucky user
20919 #endif
20920 #elif defined __CYGWIN__
20921 #include <cygwin/version.h>
20922 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
20923 Lucky user
20924 #endif
20925 #else
20926 Lucky user
20927 #endif
20928
20929 _ACEOF
20930 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20931 $EGREP "Lucky user" >/dev/null 2>&1; then :
20932 gl_cv_func_strstr_works_always="guessing yes"
20933 else
20934 gl_cv_func_strstr_works_always="$gl_cross_guess_normal"
20935 fi
20936 rm -f conftest*
20937
20938
20939 else
20940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20941 /* end confdefs.h. */
20942
20943 #include <string.h> /* for __GNU_LIBRARY__, strstr */
20944 #ifdef __GNU_LIBRARY__
20945 #include <features.h>
20946 #if __GLIBC__ == 2 && __GLIBC_MINOR__ == 28
20947 Unlucky user
20948 #endif
20949 #endif
20950 #define P "_EF_BF_BD"
20951 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
20952 #define NEEDLE P P P P P
20953
20954 int
20955 main ()
20956 {
20957 return !!strstr (HAYSTACK, NEEDLE);
20958
20959 ;
20960 return 0;
20961 }
20962 _ACEOF
20963 if ac_fn_c_try_run "$LINENO"; then :
20964 gl_cv_func_strstr_works_always=yes
20965 else
20966 gl_cv_func_strstr_works_always=no
20967 fi
20968 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20969 conftest.$ac_objext conftest.beam conftest.$ac_ext
20970 fi
20971
20972
20973 fi
20974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
20975 $as_echo "$gl_cv_func_strstr_works_always" >&6; }
20976 case "$gl_cv_func_strstr_works_always" in
20977 *yes) ;;
20978 *)
20979 REPLACE_STRSTR=1
20980 ;;
20981 esac
20982 fi
20983
20984 ac_fn_c_check_decl "$LINENO" "strtok_r" "ac_cv_have_decl_strtok_r" "$ac_includes_default"
20985 if test "x$ac_cv_have_decl_strtok_r" = xyes; then :
20986 ac_have_decl=1
20987 else
20988 ac_have_decl=0
20989 fi
20990
20991 cat >>confdefs.h <<_ACEOF
20992 #define HAVE_DECL_STRTOK_R $ac_have_decl
20993 _ACEOF
20994
20995
20996
20997
20998
20999
21000
21001
21002
21003
21004
21005
21006
21007
21008 if test $gl_cv_have_include_next = yes; then
21009 gl_cv_next_sys_random_h='<'sys/random.h'>'
21010 else
21011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/random.h>" >&5
21012 $as_echo_n "checking absolute name of <sys/random.h>... " >&6; }
21013 if ${gl_cv_next_sys_random_h+:} false; then :
21014 $as_echo_n "(cached) " >&6
21015 else
21016
21017 if test $ac_cv_header_sys_random_h = yes; then
21018
21019
21020
21021
21022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21023 /* end confdefs.h. */
21024 #include <sys/random.h>
21025 _ACEOF
21026 case "$host_os" in
21027 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21028 *) gl_absname_cpp="$ac_cpp" ;;
21029 esac
21030
21031 case "$host_os" in
21032 mingw*)
21033 gl_dirsep_regex='[/\\]'
21034 ;;
21035 *)
21036 gl_dirsep_regex='\/'
21037 ;;
21038 esac
21039 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21040 gl_header_literal_regex=`echo 'sys/random.h' \
21041 | sed -e "$gl_make_literal_regex_sed"`
21042 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21043 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21044 s|^/[^/]|//&|
21045 p
21046 q
21047 }'
21048
21049 gl_cv_absolute_sys_random_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21050 sed -n "$gl_absolute_header_sed"`
21051
21052 gl_header=$gl_cv_absolute_sys_random_h
21053 gl_cv_next_sys_random_h='"'$gl_header'"'
21054 else
21055 gl_cv_next_sys_random_h='<'sys/random.h'>'
21056 fi
21057
21058
21059 fi
21060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_random_h" >&5
21061 $as_echo "$gl_cv_next_sys_random_h" >&6; }
21062 fi
21063 NEXT_SYS_RANDOM_H=$gl_cv_next_sys_random_h
21064
21065 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21066 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21067 gl_next_as_first_directive='<'sys/random.h'>'
21068 else
21069 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21070 gl_next_as_first_directive=$gl_cv_next_sys_random_h
21071 fi
21072 NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H=$gl_next_as_first_directive
21073
21074
21075
21076
21077 if test $ac_cv_header_sys_random_h = yes; then
21078 HAVE_SYS_RANDOM_H=1
21079 else
21080 HAVE_SYS_RANDOM_H=0
21081 fi
21082
21083
21084
21085 if test $ac_cv_header_sys_random_h = yes; then
21086 UNISTD_H_HAVE_SYS_RANDOM_H=1
21087 fi
21088
21089
21090
21091
21092
21093
21094
21095
21096
21097
21098
21099
21100
21101
21102
21103
21104
21105 $as_echo "#define _USE_STD_STAT 1" >>confdefs.h
21106
21107
21108
21109
21110
21111
21112
21113
21114
21115
21116 if test $gl_cv_have_include_next = yes; then
21117 gl_cv_next_sys_types_h='<'sys/types.h'>'
21118 else
21119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
21120 $as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
21121 if ${gl_cv_next_sys_types_h+:} false; then :
21122 $as_echo_n "(cached) " >&6
21123 else
21124
21125
21126
21127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21128 /* end confdefs.h. */
21129 #include <sys/types.h>
21130 _ACEOF
21131 case "$host_os" in
21132 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21133 *) gl_absname_cpp="$ac_cpp" ;;
21134 esac
21135
21136 case "$host_os" in
21137 mingw*)
21138 gl_dirsep_regex='[/\\]'
21139 ;;
21140 *)
21141 gl_dirsep_regex='\/'
21142 ;;
21143 esac
21144 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21145 gl_header_literal_regex=`echo 'sys/types.h' \
21146 | sed -e "$gl_make_literal_regex_sed"`
21147 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21148 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21149 s|^/[^/]|//&|
21150 p
21151 q
21152 }'
21153
21154 gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21155 sed -n "$gl_absolute_header_sed"`
21156
21157 gl_header=$gl_cv_absolute_sys_types_h
21158 gl_cv_next_sys_types_h='"'$gl_header'"'
21159
21160
21161 fi
21162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
21163 $as_echo "$gl_cv_next_sys_types_h" >&6; }
21164 fi
21165 NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
21166
21167 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21168 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21169 gl_next_as_first_directive='<'sys/types.h'>'
21170 else
21171 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21172 gl_next_as_first_directive=$gl_cv_next_sys_types_h
21173 fi
21174 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
21175
21176
21177
21178
21179
21180
21181
21182
21183
21184
21185
21186
21187 WINDOWS_STAT_INODES=0
21188
21189
21190
21191
21192
21193
21194
21195
21196
21197
21198
21199
21200
21201
21202
21203
21204
21205
21206
21207
21208 if test $gl_cv_have_include_next = yes; then
21209 gl_cv_next_sys_uio_h='<'sys/uio.h'>'
21210 else
21211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/uio.h>" >&5
21212 $as_echo_n "checking absolute name of <sys/uio.h>... " >&6; }
21213 if ${gl_cv_next_sys_uio_h+:} false; then :
21214 $as_echo_n "(cached) " >&6
21215 else
21216
21217 if test $ac_cv_header_sys_uio_h = yes; then
21218
21219
21220
21221
21222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21223 /* end confdefs.h. */
21224 #include <sys/uio.h>
21225 _ACEOF
21226 case "$host_os" in
21227 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21228 *) gl_absname_cpp="$ac_cpp" ;;
21229 esac
21230
21231 case "$host_os" in
21232 mingw*)
21233 gl_dirsep_regex='[/\\]'
21234 ;;
21235 *)
21236 gl_dirsep_regex='\/'
21237 ;;
21238 esac
21239 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21240 gl_header_literal_regex=`echo 'sys/uio.h' \
21241 | sed -e "$gl_make_literal_regex_sed"`
21242 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21243 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21244 s|^/[^/]|//&|
21245 p
21246 q
21247 }'
21248
21249 gl_cv_absolute_sys_uio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21250 sed -n "$gl_absolute_header_sed"`
21251
21252 gl_header=$gl_cv_absolute_sys_uio_h
21253 gl_cv_next_sys_uio_h='"'$gl_header'"'
21254 else
21255 gl_cv_next_sys_uio_h='<'sys/uio.h'>'
21256 fi
21257
21258
21259 fi
21260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_uio_h" >&5
21261 $as_echo "$gl_cv_next_sys_uio_h" >&6; }
21262 fi
21263 NEXT_SYS_UIO_H=$gl_cv_next_sys_uio_h
21264
21265 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21266 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21267 gl_next_as_first_directive='<'sys/uio.h'>'
21268 else
21269 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21270 gl_next_as_first_directive=$gl_cv_next_sys_uio_h
21271 fi
21272 NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H=$gl_next_as_first_directive
21273
21274
21275
21276
21277 if test $ac_cv_header_sys_uio_h = yes; then
21278 HAVE_SYS_UIO_H=1
21279 else
21280 HAVE_SYS_UIO_H=0
21281 fi
21282
21283
21284
21285
21286
21287
21288
21289
21290
21291
21292
21293
21294
21295
21296
21297
21298
21299
21300
21301
21302 if test $gl_cv_have_include_next = yes; then
21303 gl_cv_next_sys_wait_h='<'sys/wait.h'>'
21304 else
21305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/wait.h>" >&5
21306 $as_echo_n "checking absolute name of <sys/wait.h>... " >&6; }
21307 if ${gl_cv_next_sys_wait_h+:} false; then :
21308 $as_echo_n "(cached) " >&6
21309 else
21310
21311 if test $ac_cv_header_sys_wait_h = yes; then
21312
21313
21314
21315
21316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21317 /* end confdefs.h. */
21318 #include <sys/wait.h>
21319 _ACEOF
21320 case "$host_os" in
21321 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21322 *) gl_absname_cpp="$ac_cpp" ;;
21323 esac
21324
21325 case "$host_os" in
21326 mingw*)
21327 gl_dirsep_regex='[/\\]'
21328 ;;
21329 *)
21330 gl_dirsep_regex='\/'
21331 ;;
21332 esac
21333 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21334 gl_header_literal_regex=`echo 'sys/wait.h' \
21335 | sed -e "$gl_make_literal_regex_sed"`
21336 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21337 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21338 s|^/[^/]|//&|
21339 p
21340 q
21341 }'
21342
21343 gl_cv_absolute_sys_wait_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21344 sed -n "$gl_absolute_header_sed"`
21345
21346 gl_header=$gl_cv_absolute_sys_wait_h
21347 gl_cv_next_sys_wait_h='"'$gl_header'"'
21348 else
21349 gl_cv_next_sys_wait_h='<'sys/wait.h'>'
21350 fi
21351
21352
21353 fi
21354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_wait_h" >&5
21355 $as_echo "$gl_cv_next_sys_wait_h" >&6; }
21356 fi
21357 NEXT_SYS_WAIT_H=$gl_cv_next_sys_wait_h
21358
21359 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21360 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21361 gl_next_as_first_directive='<'sys/wait.h'>'
21362 else
21363 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21364 gl_next_as_first_directive=$gl_cv_next_sys_wait_h
21365 fi
21366 NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H=$gl_next_as_first_directive
21367
21368
21369
21370
21371
21372
21373
21374
21375
21376
21377
21378
21379
21380 GL_GNULIB_WAITPID=0
21381
21382
21383
21384
21385 HAVE_DECL_LOCALTIME_R=1;
21386 HAVE_NANOSLEEP=1;
21387 HAVE_STRPTIME=1;
21388 HAVE_TIMEGM=1;
21389 HAVE_TIMESPEC_GET=1;
21390 HAVE_TIMESPEC_GETRES=1;
21391 HAVE_TIMEZONE_T=0;
21392 REPLACE_CTIME=GNULIB_PORTCHECK;
21393 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
21394 REPLACE_MKTIME=GNULIB_PORTCHECK;
21395 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
21396 REPLACE_STRFTIME=GNULIB_PORTCHECK;
21397 REPLACE_TIMEGM=GNULIB_PORTCHECK;
21398 REPLACE_TZSET=GNULIB_PORTCHECK;
21399
21400 : ${GNULIB_GETTIMEOFDAY=0};
21401 REPLACE_GMTIME=0;
21402 REPLACE_LOCALTIME=0;
21403
21404
21405
21406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
21407 $as_echo_n "checking for struct timespec in <time.h>... " >&6; }
21408 if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then :
21409 $as_echo_n "(cached) " >&6
21410 else
21411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21412 /* end confdefs.h. */
21413 #include <time.h>
21414
21415 int
21416 main ()
21417 {
21418 static struct timespec x; x.tv_sec = x.tv_nsec;
21419 ;
21420 return 0;
21421 }
21422 _ACEOF
21423 if ac_fn_c_try_compile "$LINENO"; then :
21424 gl_cv_sys_struct_timespec_in_time_h=yes
21425 else
21426 gl_cv_sys_struct_timespec_in_time_h=no
21427 fi
21428 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21429 fi
21430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
21431 $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
21432
21433 TIME_H_DEFINES_STRUCT_TIMESPEC=0
21434 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
21435 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
21436 UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
21437 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
21438 TIME_H_DEFINES_STRUCT_TIMESPEC=1
21439 else
21440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
21441 $as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
21442 if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then :
21443 $as_echo_n "(cached) " >&6
21444 else
21445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21446 /* end confdefs.h. */
21447 #include <sys/time.h>
21448
21449 int
21450 main ()
21451 {
21452 static struct timespec x; x.tv_sec = x.tv_nsec;
21453 ;
21454 return 0;
21455 }
21456 _ACEOF
21457 if ac_fn_c_try_compile "$LINENO"; then :
21458 gl_cv_sys_struct_timespec_in_sys_time_h=yes
21459 else
21460 gl_cv_sys_struct_timespec_in_sys_time_h=no
21461 fi
21462 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21463 fi
21464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
21465 $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
21466 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
21467 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
21468 else
21469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
21470 $as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
21471 if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then :
21472 $as_echo_n "(cached) " >&6
21473 else
21474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21475 /* end confdefs.h. */
21476 #include <pthread.h>
21477
21478 int
21479 main ()
21480 {
21481 static struct timespec x; x.tv_sec = x.tv_nsec;
21482 ;
21483 return 0;
21484 }
21485 _ACEOF
21486 if ac_fn_c_try_compile "$LINENO"; then :
21487 gl_cv_sys_struct_timespec_in_pthread_h=yes
21488 else
21489 gl_cv_sys_struct_timespec_in_pthread_h=no
21490 fi
21491 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21492 fi
21493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
21494 $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
21495 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
21496 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
21497 else
21498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
21499 $as_echo_n "checking for struct timespec in <unistd.h>... " >&6; }
21500 if ${gl_cv_sys_struct_timespec_in_unistd_h+:} false; then :
21501 $as_echo_n "(cached) " >&6
21502 else
21503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21504 /* end confdefs.h. */
21505 #include <unistd.h>
21506
21507 int
21508 main ()
21509 {
21510 static struct timespec x; x.tv_sec = x.tv_nsec;
21511 ;
21512 return 0;
21513 }
21514 _ACEOF
21515 if ac_fn_c_try_compile "$LINENO"; then :
21516 gl_cv_sys_struct_timespec_in_unistd_h=yes
21517 else
21518 gl_cv_sys_struct_timespec_in_unistd_h=no
21519 fi
21520 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21521 fi
21522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5
21523 $as_echo "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
21524 if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
21525 UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
21526 fi
21527 fi
21528 fi
21529 fi
21530
21531
21532
21533
21534
21535
21536
21537
21538
21539
21540
21541
21542
21543
21544
21545
21546 if test $gl_cv_have_include_next = yes; then
21547 gl_cv_next_time_h='<'time.h'>'
21548 else
21549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
21550 $as_echo_n "checking absolute name of <time.h>... " >&6; }
21551 if ${gl_cv_next_time_h+:} false; then :
21552 $as_echo_n "(cached) " >&6
21553 else
21554
21555
21556
21557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21558 /* end confdefs.h. */
21559 #include <time.h>
21560 _ACEOF
21561 case "$host_os" in
21562 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21563 *) gl_absname_cpp="$ac_cpp" ;;
21564 esac
21565
21566 case "$host_os" in
21567 mingw*)
21568 gl_dirsep_regex='[/\\]'
21569 ;;
21570 *)
21571 gl_dirsep_regex='\/'
21572 ;;
21573 esac
21574 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21575 gl_header_literal_regex=`echo 'time.h' \
21576 | sed -e "$gl_make_literal_regex_sed"`
21577 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21578 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21579 s|^/[^/]|//&|
21580 p
21581 q
21582 }'
21583
21584 gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21585 sed -n "$gl_absolute_header_sed"`
21586
21587 gl_header=$gl_cv_absolute_time_h
21588 gl_cv_next_time_h='"'$gl_header'"'
21589
21590
21591 fi
21592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
21593 $as_echo "$gl_cv_next_time_h" >&6; }
21594 fi
21595 NEXT_TIME_H=$gl_cv_next_time_h
21596
21597 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21598 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21599 gl_next_as_first_directive='<'time.h'>'
21600 else
21601 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21602 gl_next_as_first_directive=$gl_cv_next_time_h
21603 fi
21604 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
21605
21606
21607
21608
21609
21610
21611
21612
21613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME_UTC in <time.h>" >&5
21614 $as_echo_n "checking for TIME_UTC in <time.h>... " >&6; }
21615 if ${gl_cv_time_h_has_TIME_UTC+:} false; then :
21616 $as_echo_n "(cached) " >&6
21617 else
21618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21619 /* end confdefs.h. */
21620 #include <time.h>
21621
21622 int
21623 main ()
21624 {
21625 static int x = TIME_UTC; x++;
21626 ;
21627 return 0;
21628 }
21629 _ACEOF
21630 if ac_fn_c_try_compile "$LINENO"; then :
21631 gl_cv_time_h_has_TIME_UTC=yes
21632 else
21633 gl_cv_time_h_has_TIME_UTC=no
21634 fi
21635 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21636 fi
21637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_h_has_TIME_UTC" >&5
21638 $as_echo "$gl_cv_time_h_has_TIME_UTC" >&6; }
21639 if test $gl_cv_time_h_has_TIME_UTC = yes; then
21640 TIME_H_DEFINES_TIME_UTC=1
21641 else
21642 TIME_H_DEFINES_TIME_UTC=0
21643 fi
21644
21645
21646
21647
21648 GL_GNULIB_CTIME=0
21649
21650
21651
21652 GL_GNULIB_MKTIME=0
21653
21654
21655
21656 GL_GNULIB_LOCALTIME=0
21657
21658
21659
21660 GL_GNULIB_NANOSLEEP=0
21661
21662
21663
21664 GL_GNULIB_STRFTIME=0
21665
21666
21667
21668 GL_GNULIB_STRPTIME=0
21669
21670
21671
21672 GL_GNULIB_TIMEGM=0
21673
21674
21675
21676 GL_GNULIB_TIMESPEC_GET=0
21677
21678
21679
21680 GL_GNULIB_TIMESPEC_GETRES=0
21681
21682
21683
21684 GL_GNULIB_TIME_R=0
21685
21686
21687
21688 GL_GNULIB_TIME_RZ=0
21689
21690
21691
21692 GL_GNULIB_TZSET=0
21693
21694
21695
21696 GL_GNULIB_MDA_TZSET=1
21697
21698
21699
21700
21701
21702 ac_fn_c_check_decl "$LINENO" "execvpe" "ac_cv_have_decl_execvpe" "$ac_includes_default"
21703 if test "x$ac_cv_have_decl_execvpe" = xyes; then :
21704 ac_have_decl=1
21705 else
21706 ac_have_decl=0
21707 fi
21708
21709 cat >>confdefs.h <<_ACEOF
21710 #define HAVE_DECL_EXECVPE $ac_have_decl
21711 _ACEOF
21712
21713
21714
21715
21716
21717
21718
21719
21720
21721
21722
21723
21724
21725 if test $gl_cv_have_include_next = yes; then
21726 gl_cv_next_unistd_h='<'unistd.h'>'
21727 else
21728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
21729 $as_echo_n "checking absolute name of <unistd.h>... " >&6; }
21730 if ${gl_cv_next_unistd_h+:} false; then :
21731 $as_echo_n "(cached) " >&6
21732 else
21733
21734 if test $ac_cv_header_unistd_h = yes; then
21735
21736
21737
21738
21739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21740 /* end confdefs.h. */
21741 #include <unistd.h>
21742 _ACEOF
21743 case "$host_os" in
21744 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21745 *) gl_absname_cpp="$ac_cpp" ;;
21746 esac
21747
21748 case "$host_os" in
21749 mingw*)
21750 gl_dirsep_regex='[/\\]'
21751 ;;
21752 *)
21753 gl_dirsep_regex='\/'
21754 ;;
21755 esac
21756 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21757 gl_header_literal_regex=`echo 'unistd.h' \
21758 | sed -e "$gl_make_literal_regex_sed"`
21759 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21760 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21761 s|^/[^/]|//&|
21762 p
21763 q
21764 }'
21765
21766 gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21767 sed -n "$gl_absolute_header_sed"`
21768
21769 gl_header=$gl_cv_absolute_unistd_h
21770 gl_cv_next_unistd_h='"'$gl_header'"'
21771 else
21772 gl_cv_next_unistd_h='<'unistd.h'>'
21773 fi
21774
21775
21776 fi
21777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
21778 $as_echo "$gl_cv_next_unistd_h" >&6; }
21779 fi
21780 NEXT_UNISTD_H=$gl_cv_next_unistd_h
21781
21782 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21783 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21784 gl_next_as_first_directive='<'unistd.h'>'
21785 else
21786 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21787 gl_next_as_first_directive=$gl_cv_next_unistd_h
21788 fi
21789 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
21790
21791
21792
21793
21794 if test $ac_cv_header_unistd_h = yes; then
21795 HAVE_UNISTD_H=1
21796 else
21797 HAVE_UNISTD_H=0
21798 fi
21799
21800
21801
21802
21803
21804
21805
21806
21807
21808
21809
21810
21811
21812 if test $ac_cv_have_decl_execvpe = no; then
21813 HAVE_DECL_EXECVPE=0
21814 fi
21815
21816 ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
21817 if test "x$ac_cv_have_decl_unsetenv" = xyes; then :
21818 ac_have_decl=1
21819 else
21820 ac_have_decl=0
21821 fi
21822
21823 cat >>confdefs.h <<_ACEOF
21824 #define HAVE_DECL_UNSETENV $ac_have_decl
21825 _ACEOF
21826
21827
21828
21829
21830
21831 if test $ac_cv_header_crtdefs_h = yes; then
21832 HAVE_CRTDEFS_H=1
21833 else
21834 HAVE_CRTDEFS_H=0
21835 fi
21836
21837
21838
21839
21840
21841
21842
21843
21844
21845
21846
21847
21848
21849
21850 if test $gl_cv_have_include_next = yes; then
21851 gl_cv_next_wchar_h='<'wchar.h'>'
21852 else
21853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
21854 $as_echo_n "checking absolute name of <wchar.h>... " >&6; }
21855 if ${gl_cv_next_wchar_h+:} false; then :
21856 $as_echo_n "(cached) " >&6
21857 else
21858
21859 if test $ac_cv_header_wchar_h = yes; then
21860
21861
21862
21863
21864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21865 /* end confdefs.h. */
21866 #include <wchar.h>
21867 _ACEOF
21868 case "$host_os" in
21869 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21870 *) gl_absname_cpp="$ac_cpp" ;;
21871 esac
21872
21873 case "$host_os" in
21874 mingw*)
21875 gl_dirsep_regex='[/\\]'
21876 ;;
21877 *)
21878 gl_dirsep_regex='\/'
21879 ;;
21880 esac
21881 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21882 gl_header_literal_regex=`echo 'wchar.h' \
21883 | sed -e "$gl_make_literal_regex_sed"`
21884 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21885 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21886 s|^/[^/]|//&|
21887 p
21888 q
21889 }'
21890
21891 gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21892 sed -n "$gl_absolute_header_sed"`
21893
21894 gl_header=$gl_cv_absolute_wchar_h
21895 gl_cv_next_wchar_h='"'$gl_header'"'
21896 else
21897 gl_cv_next_wchar_h='<'wchar.h'>'
21898 fi
21899
21900
21901 fi
21902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
21903 $as_echo "$gl_cv_next_wchar_h" >&6; }
21904 fi
21905 NEXT_WCHAR_H=$gl_cv_next_wchar_h
21906
21907 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21908 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21909 gl_next_as_first_directive='<'wchar.h'>'
21910 else
21911 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21912 gl_next_as_first_directive=$gl_cv_next_wchar_h
21913 fi
21914 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
21915
21916
21917
21918
21919 if test $ac_cv_header_wchar_h = yes; then
21920 HAVE_WCHAR_H=1
21921 else
21922 HAVE_WCHAR_H=0
21923 fi
21924
21925
21926
21927
21928
21929 if test $gt_cv_c_wint_t = yes; then
21930 HAVE_WINT_T=1
21931 else
21932 HAVE_WINT_T=0
21933 fi
21934
21935
21936
21937
21938
21939
21940
21941
21942
21943
21944 ac_fn_c_check_decl "$LINENO" "wcsdup" "ac_cv_have_decl_wcsdup" "
21945 #include <wchar.h>
21946
21947 "
21948 if test "x$ac_cv_have_decl_wcsdup" = xyes; then :
21949 ac_have_decl=1
21950 else
21951 ac_have_decl=0
21952 fi
21953
21954 cat >>confdefs.h <<_ACEOF
21955 #define HAVE_DECL_WCSDUP $ac_have_decl
21956 _ACEOF
21957
21958 if test $ac_cv_have_decl_wcsdup = no; then
21959 HAVE_DECL_WCSDUP=0
21960 fi
21961
21962
21963 HAVE_ISWBLANK=1;
21964 HAVE_WCTYPE_T=1;
21965 HAVE_WCTRANS_T=1;
21966 REPLACE_ISWBLANK=0;
21967 REPLACE_ISWDIGIT=0;
21968 REPLACE_ISWXDIGIT=0;
21969
21970
21971
21972
21973
21974
21975
21976
21977
21978
21979 if test $ac_cv_func_iswcntrl = yes; then
21980 HAVE_ISWCNTRL=1
21981 else
21982 HAVE_ISWCNTRL=0
21983 fi
21984
21985
21986
21987 if test $gt_cv_c_wint_t = yes; then
21988 HAVE_WINT_T=1
21989 else
21990 HAVE_WINT_T=0
21991 fi
21992
21993
21994
21995
21996
21997
21998
21999
22000
22001
22002
22003
22004
22005 if test $gl_cv_have_include_next = yes; then
22006 gl_cv_next_wctype_h='<'wctype.h'>'
22007 else
22008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
22009 $as_echo_n "checking absolute name of <wctype.h>... " >&6; }
22010 if ${gl_cv_next_wctype_h+:} false; then :
22011 $as_echo_n "(cached) " >&6
22012 else
22013
22014 if test $ac_cv_header_wctype_h = yes; then
22015
22016
22017
22018
22019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22020 /* end confdefs.h. */
22021 #include <wctype.h>
22022 _ACEOF
22023 case "$host_os" in
22024 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22025 *) gl_absname_cpp="$ac_cpp" ;;
22026 esac
22027
22028 case "$host_os" in
22029 mingw*)
22030 gl_dirsep_regex='[/\\]'
22031 ;;
22032 *)
22033 gl_dirsep_regex='\/'
22034 ;;
22035 esac
22036 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22037 gl_header_literal_regex=`echo 'wctype.h' \
22038 | sed -e "$gl_make_literal_regex_sed"`
22039 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22040 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22041 s|^/[^/]|//&|
22042 p
22043 q
22044 }'
22045
22046 gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22047 sed -n "$gl_absolute_header_sed"`
22048
22049 gl_header=$gl_cv_absolute_wctype_h
22050 gl_cv_next_wctype_h='"'$gl_header'"'
22051 else
22052 gl_cv_next_wctype_h='<'wctype.h'>'
22053 fi
22054
22055
22056 fi
22057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
22058 $as_echo "$gl_cv_next_wctype_h" >&6; }
22059 fi
22060 NEXT_WCTYPE_H=$gl_cv_next_wctype_h
22061
22062 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22063 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22064 gl_next_as_first_directive='<'wctype.h'>'
22065 else
22066 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22067 gl_next_as_first_directive=$gl_cv_next_wctype_h
22068 fi
22069 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
22070
22071
22072
22073
22074 if test $ac_cv_header_wctype_h = yes; then
22075 if test $ac_cv_func_iswcntrl = yes; then
22076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
22077 $as_echo_n "checking whether iswcntrl works... " >&6; }
22078 if ${gl_cv_func_iswcntrl_works+:} false; then :
22079 $as_echo_n "(cached) " >&6
22080 else
22081
22082 if test "$cross_compiling" = yes; then :
22083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22084 /* end confdefs.h. */
22085 #include <stdlib.h>
22086 #if __GNU_LIBRARY__ == 1
22087 Linux libc5 i18n is broken.
22088 #endif
22089 int
22090 main ()
22091 {
22092
22093 ;
22094 return 0;
22095 }
22096 _ACEOF
22097 if ac_fn_c_try_compile "$LINENO"; then :
22098 gl_cv_func_iswcntrl_works="guessing yes"
22099 else
22100 gl_cv_func_iswcntrl_works="guessing no"
22101 fi
22102 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22103
22104 else
22105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22106 /* end confdefs.h. */
22107
22108 #include <wchar.h>
22109 #include <wctype.h>
22110 int main () { return iswprint ('x') == 0; }
22111
22112 _ACEOF
22113 if ac_fn_c_try_run "$LINENO"; then :
22114 gl_cv_func_iswcntrl_works=yes
22115 else
22116 gl_cv_func_iswcntrl_works=no
22117 fi
22118 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22119 conftest.$ac_objext conftest.beam conftest.$ac_ext
22120 fi
22121
22122
22123 fi
22124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
22125 $as_echo "$gl_cv_func_iswcntrl_works" >&6; }
22126 fi
22127 HAVE_WCTYPE_H=1
22128 else
22129 HAVE_WCTYPE_H=0
22130 fi
22131
22132
22133 if test $GNULIBHEADERS_OVERRIDE_WINT_T = 1; then
22134 REPLACE_ISWCNTRL=1
22135 else
22136 case "$gl_cv_func_iswcntrl_works" in
22137 *yes) REPLACE_ISWCNTRL=0 ;;
22138 *) REPLACE_ISWCNTRL=1 ;;
22139 esac
22140 fi
22141
22142
22143 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
22144 :
22145 fi
22146
22147 if test $REPLACE_ISWCNTRL = 1; then
22148 REPLACE_TOWLOWER=1
22149 else
22150 for ac_func in towlower
22151 do :
22152 ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
22153 if test "x$ac_cv_func_towlower" = xyes; then :
22154 cat >>confdefs.h <<_ACEOF
22155 #define HAVE_TOWLOWER 1
22156 _ACEOF
22157
22158 fi
22159 done
22160
22161 if test $ac_cv_func_towlower = yes; then
22162 REPLACE_TOWLOWER=0
22163 else
22164 ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "#include <wchar.h>
22165 #if HAVE_WCTYPE_H
22166 # include <wctype.h>
22167 #endif
22168
22169 "
22170 if test "x$ac_cv_have_decl_towlower" = xyes; then :
22171 ac_have_decl=1
22172 else
22173 ac_have_decl=0
22174 fi
22175
22176 cat >>confdefs.h <<_ACEOF
22177 #define HAVE_DECL_TOWLOWER $ac_have_decl
22178 _ACEOF
22179
22180 if test $ac_cv_have_decl_towlower = yes; then
22181 REPLACE_TOWLOWER=1
22182 else
22183 REPLACE_TOWLOWER=0
22184 fi
22185 fi
22186 fi
22187
22188
22189 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
22190 :
22191 fi
22192
22193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
22194 $as_echo_n "checking for wctype_t... " >&6; }
22195 if ${gl_cv_type_wctype_t+:} false; then :
22196 $as_echo_n "(cached) " >&6
22197 else
22198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22199 /* end confdefs.h. */
22200 #include <wchar.h>
22201 #if HAVE_WCTYPE_H
22202 # include <wctype.h>
22203 #endif
22204 wctype_t a;
22205
22206 int
22207 main ()
22208 {
22209
22210 ;
22211 return 0;
22212 }
22213 _ACEOF
22214 if ac_fn_c_try_compile "$LINENO"; then :
22215 gl_cv_type_wctype_t=yes
22216 else
22217 gl_cv_type_wctype_t=no
22218 fi
22219 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22220
22221 fi
22222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
22223 $as_echo "$gl_cv_type_wctype_t" >&6; }
22224 if test $gl_cv_type_wctype_t = no; then
22225 HAVE_WCTYPE_T=0
22226 fi
22227
22228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
22229 $as_echo_n "checking for wctrans_t... " >&6; }
22230 if ${gl_cv_type_wctrans_t+:} false; then :
22231 $as_echo_n "(cached) " >&6
22232 else
22233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22234 /* end confdefs.h. */
22235 #include <wchar.h>
22236 #include <wctype.h>
22237 wctrans_t a;
22238
22239 int
22240 main ()
22241 {
22242
22243 ;
22244 return 0;
22245 }
22246 _ACEOF
22247 if ac_fn_c_try_compile "$LINENO"; then :
22248 gl_cv_type_wctrans_t=yes
22249 else
22250 gl_cv_type_wctrans_t=no
22251 fi
22252 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22253
22254 fi
22255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
22256 $as_echo "$gl_cv_type_wctrans_t" >&6; }
22257 if test $gl_cv_type_wctrans_t = no; then
22258 HAVE_WCTRANS_T=0
22259 fi
22260
22261
22262
22263
22264
22265
22266
22267 GL_GNULIB_ISWBLANK=0
22268
22269
22270
22271 GL_GNULIB_ISWDIGIT=0
22272
22273
22274
22275 GL_GNULIB_ISWXDIGIT=0
22276
22277
22278
22279 GL_GNULIB_WCTYPE=0
22280
22281
22282
22283 GL_GNULIB_ISWCTYPE=0
22284
22285
22286
22287 GL_GNULIB_WCTRANS=0
22288
22289
22290
22291 GL_GNULIB_TOWCTRANS=0
22292
22293
22294
22295
22296
22297
22298
22299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler option to allow warnings" >&5
22300 $as_echo_n "checking for C compiler option to allow warnings... " >&6; }
22301 if ${gl_cv_cc_wallow+:} false; then :
22302 $as_echo_n "(cached) " >&6
22303 else
22304 rm -f conftest*
22305 echo 'int dummy;' > conftest.c
22306 { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -c conftest.c 2>conftest1.err'
22307 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
22308 (eval $ac_try) 2>&5
22309 ac_status=$?
22310 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22311 test $ac_status = 0; }; } >/dev/null
22312 { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -Wno-error -c conftest.c 2>conftest2.err'
22313 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
22314 (eval $ac_try) 2>&5
22315 ac_status=$?
22316 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22317 test $ac_status = 0; }; } >/dev/null
22318 if test $? = 0 && test `wc -l < conftest1.err` = `wc -l < conftest2.err`; then
22319 gl_cv_cc_wallow='-Wno-error'
22320 else
22321 gl_cv_cc_wallow=none
22322 fi
22323 rm -f conftest*
22324
22325 fi
22326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_wallow" >&5
22327 $as_echo "$gl_cv_cc_wallow" >&6; }
22328 case "$gl_cv_cc_wallow" in
22329 none) GL_CFLAG_ALLOW_WARNINGS='' ;;
22330 *) GL_CFLAG_ALLOW_WARNINGS="$gl_cv_cc_wallow" ;;
22331 esac
22332
22333
22334
22335
22336 GL_CFLAG_GNULIB_WARNINGS=''
22337 if test -n "$GL_CFLAG_ALLOW_WARNINGS"; then
22338 cat > conftest.c <<\EOF
22339 #if __GNUC__ >= 3 || (__clang_major__ + (__clang_minor__ >= 9) > 3)
22340 -Wno-cast-qual
22341 -Wno-conversion
22342 -Wno-float-equal
22343 -Wno-sign-compare
22344 -Wno-undef
22345 -Wno-unused-function
22346 -Wno-unused-parameter
22347 #endif
22348 #if __GNUC__ + (__GNUC_MINOR__ >= 9) > 4 || (__clang_major__ + (__clang_minor__ >= 9) > 3)
22349 -Wno-float-conversion
22350 #endif
22351 #if __GNUC__ >= 7 || (__clang_major__ + (__clang_minor__ >= 9) > 3)
22352 -Wimplicit-fallthrough
22353 #endif
22354 #if __GNUC__ + (__GNUC_MINOR__ >= 8) > 4 || (__clang_major__ + (__clang_minor__ >= 9) > 3)
22355 -Wno-pedantic
22356 #endif
22357 #if __GNUC__ + (__GNUC_MINOR__ >= 3) > 4 || (__clang_major__ + (__clang_minor__ >= 9) > 3)
22358 -Wno-sign-conversion
22359 -Wno-type-limits
22360 #endif
22361 #if __GNUC__ + (__GNUC_MINOR__ >= 5) > 4
22362 -Wno-unsuffixed-float-constants
22363 #endif
22364 EOF
22365 gl_command="$CC $CFLAGS $CPPFLAGS -E conftest.c > conftest.out"
22366 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gl_command\""; } >&5
22367 (eval $gl_command) 2>&5
22368 ac_status=$?
22369 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22370 test $ac_status = 0; }; then
22371 gl_options=`grep -v '#' conftest.out`
22372 for word in $gl_options; do
22373 GL_CFLAG_GNULIB_WARNINGS="$GL_CFLAG_GNULIB_WARNINGS $word"
22374 done
22375 fi
22376 rm -f conftest.c conftest.out
22377 fi
22378
22379
22380
22381
22382 if false; then
22383 GL_COND_LIBTOOL_TRUE=
22384 GL_COND_LIBTOOL_FALSE='#'
22385 else
22386 GL_COND_LIBTOOL_TRUE='#'
22387 GL_COND_LIBTOOL_FALSE=
22388 fi
22389
22390 gl_cond_libtool=false
22391 gl_libdeps=
22392 gl_ltlibdeps=
22393 gl_m4_base='import/m4'
22394
22395
22396
22397
22398
22399
22400
22401
22402
22403
22404
22405
22406 gl_source_base='import'
22407 gl_source_base_prefix=
22408
22409
22410 if test "$ac_cv_header_winsock2_h" = yes; then
22411 GL_COND_OBJ_ACCEPT_TRUE=
22412 GL_COND_OBJ_ACCEPT_FALSE='#'
22413 else
22414 GL_COND_OBJ_ACCEPT_TRUE='#'
22415 GL_COND_OBJ_ACCEPT_FALSE=
22416 fi
22417 :
22418 if test -z "${GL_COND_OBJ_ACCEPT_TRUE}" && test -z "${GL_COND_OBJ_ACCEPT_FALSE}"; then
22419 GL_COND_OBJ_ACCEPT_TRUE='#'
22420 GL_COND_OBJ_ACCEPT_FALSE='#'
22421 fi
22422
22423
22424
22425
22426
22427
22428
22429
22430
22431
22432 GL_GNULIB_ACCEPT=1
22433
22434
22435
22436
22437
22438 $as_echo "#define GNULIB_TEST_ACCEPT 1" >>confdefs.h
22439
22440
22441
22442
22443
22444 if test $ac_cv_func_alloca_works = no; then
22445 :
22446 fi
22447
22448 # Define an additional variable used in the Makefile substitution.
22449 if test $ac_cv_working_alloca_h = yes; then
22450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
22451 $as_echo_n "checking for alloca as a compiler built-in... " >&6; }
22452 if ${gl_cv_rpl_alloca+:} false; then :
22453 $as_echo_n "(cached) " >&6
22454 else
22455
22456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22457 /* end confdefs.h. */
22458
22459 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
22460 Need own alloca
22461 #endif
22462
22463 _ACEOF
22464 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22465 $EGREP "Need own alloca" >/dev/null 2>&1; then :
22466 gl_cv_rpl_alloca=yes
22467 else
22468 gl_cv_rpl_alloca=no
22469 fi
22470 rm -f conftest*
22471
22472
22473 fi
22474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
22475 $as_echo "$gl_cv_rpl_alloca" >&6; }
22476 if test $gl_cv_rpl_alloca = yes; then
22477
22478 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
22479
22480 GL_GENERATE_ALLOCA_H=true
22481 else
22482 GL_GENERATE_ALLOCA_H=false
22483 fi
22484 else
22485 GL_GENERATE_ALLOCA_H=true
22486 fi
22487
22488 if test $ac_cv_working_alloca_h = yes; then
22489 HAVE_ALLOCA_H=1
22490 else
22491 HAVE_ALLOCA_H=0
22492 fi
22493
22494
22495
22496
22497
22498
22499 case "$GL_GENERATE_ALLOCA_H" in
22500 false) ALLOCA_H='' ;;
22501 true)
22502 if test -z "$ALLOCA_H"; then
22503 ALLOCA_H="${gl_source_base_prefix}alloca.h"
22504 fi
22505 ;;
22506 *) echo "*** GL_GENERATE_ALLOCA_H is not set correctly" 1>&2; exit 1 ;;
22507 esac
22508
22509
22510 if $GL_GENERATE_ALLOCA_H; then
22511 GL_GENERATE_ALLOCA_H_TRUE=
22512 GL_GENERATE_ALLOCA_H_FALSE='#'
22513 else
22514 GL_GENERATE_ALLOCA_H_TRUE='#'
22515 GL_GENERATE_ALLOCA_H_FALSE=
22516 fi
22517 :
22518 if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
22519 GL_GENERATE_ALLOCA_H_TRUE='#'
22520 GL_GENERATE_ALLOCA_H_FALSE='#'
22521 fi
22522
22523
22524
22525
22526
22527
22528
22529
22530
22531
22532
22533
22534
22535
22536
22537
22538 if test "$ac_cv_header_winsock2_h" = yes; then
22539 GL_COND_OBJ_BIND_TRUE=
22540 GL_COND_OBJ_BIND_FALSE='#'
22541 else
22542 GL_COND_OBJ_BIND_TRUE='#'
22543 GL_COND_OBJ_BIND_FALSE=
22544 fi
22545 :
22546 if test -z "${GL_COND_OBJ_BIND_TRUE}" && test -z "${GL_COND_OBJ_BIND_FALSE}"; then
22547 GL_COND_OBJ_BIND_TRUE='#'
22548 GL_COND_OBJ_BIND_FALSE='#'
22549 fi
22550
22551
22552
22553
22554
22555
22556
22557
22558
22559
22560 GL_GNULIB_BIND=1
22561
22562
22563
22564
22565
22566 $as_echo "#define GNULIB_TEST_BIND 1" >>confdefs.h
22567
22568
22569
22570
22571
22572
22573
22574
22575
22576 if test $ac_cv_func_btowc = no; then
22577 HAVE_BTOWC=0
22578 else
22579
22580
22581
22582
22583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(0) is correct" >&5
22584 $as_echo_n "checking whether btowc(0) is correct... " >&6; }
22585 if ${gl_cv_func_btowc_nul+:} false; then :
22586 $as_echo_n "(cached) " >&6
22587 else
22588
22589 if test "$cross_compiling" = yes; then :
22590
22591 case "$host_os" in
22592 # Guess no on Cygwin.
22593 cygwin*) gl_cv_func_btowc_nul="guessing no" ;;
22594 # Guess yes on native Windows.
22595 mingw*) gl_cv_func_btowc_nul="guessing yes" ;;
22596 # Guess yes otherwise.
22597 *) gl_cv_func_btowc_nul="guessing yes" ;;
22598 esac
22599
22600 else
22601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22602 /* end confdefs.h. */
22603
22604 #include <wchar.h>
22605 int main ()
22606 {
22607 if (btowc ('\0') != 0)
22608 return 1;
22609 return 0;
22610 }
22611 _ACEOF
22612 if ac_fn_c_try_run "$LINENO"; then :
22613 gl_cv_func_btowc_nul=yes
22614 else
22615 gl_cv_func_btowc_nul=no
22616 fi
22617 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22618 conftest.$ac_objext conftest.beam conftest.$ac_ext
22619 fi
22620
22621
22622 fi
22623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_nul" >&5
22624 $as_echo "$gl_cv_func_btowc_nul" >&6; }
22625
22626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(EOF) is correct" >&5
22627 $as_echo_n "checking whether btowc(EOF) is correct... " >&6; }
22628 if ${gl_cv_func_btowc_eof+:} false; then :
22629 $as_echo_n "(cached) " >&6
22630 else
22631
22632 case "$host_os" in
22633 # Guess no on IRIX.
22634 irix*) gl_cv_func_btowc_eof="guessing no" ;;
22635 # Guess yes on native Windows.
22636 mingw*) gl_cv_func_btowc_eof="guessing yes" ;;
22637 # Guess yes otherwise.
22638 *) gl_cv_func_btowc_eof="guessing yes" ;;
22639 esac
22640 if test $LOCALE_FR != none; then
22641 if test "$cross_compiling" = yes; then :
22642 :
22643 else
22644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22645 /* end confdefs.h. */
22646
22647 #include <locale.h>
22648 #include <stdio.h>
22649 #include <wchar.h>
22650 int main ()
22651 {
22652 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
22653 {
22654 if (btowc (EOF) != WEOF)
22655 return 1;
22656 }
22657 return 0;
22658 }
22659 _ACEOF
22660 if ac_fn_c_try_run "$LINENO"; then :
22661 gl_cv_func_btowc_eof=yes
22662 else
22663 gl_cv_func_btowc_eof=no
22664 fi
22665 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22666 conftest.$ac_objext conftest.beam conftest.$ac_ext
22667 fi
22668
22669 fi
22670
22671 fi
22672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5
22673 $as_echo "$gl_cv_func_btowc_eof" >&6; }
22674
22675 case "$gl_cv_func_btowc_nul" in
22676 *yes) ;;
22677 *) REPLACE_BTOWC=1 ;;
22678 esac
22679 case "$gl_cv_func_btowc_eof" in
22680 *yes) ;;
22681 *) REPLACE_BTOWC=1 ;;
22682 esac
22683 fi
22684
22685
22686 if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
22687 GL_COND_OBJ_BTOWC_TRUE=
22688 GL_COND_OBJ_BTOWC_FALSE='#'
22689 else
22690 GL_COND_OBJ_BTOWC_TRUE='#'
22691 GL_COND_OBJ_BTOWC_FALSE=
22692 fi
22693 :
22694 if test -z "${GL_COND_OBJ_BTOWC_TRUE}" && test -z "${GL_COND_OBJ_BTOWC_FALSE}"; then
22695 GL_COND_OBJ_BTOWC_TRUE='#'
22696 GL_COND_OBJ_BTOWC_FALSE='#'
22697 fi
22698
22699 if test -z "$GL_COND_OBJ_BTOWC_TRUE"; then :
22700
22701
22702 :
22703
22704
22705 fi
22706
22707
22708
22709
22710
22711
22712
22713
22714
22715
22716
22717
22718
22719
22720 GL_GNULIB_BTOWC=1
22721
22722
22723
22724
22725
22726 $as_echo "#define GNULIB_TEST_BTOWC 1" >>confdefs.h
22727
22728
22729
22730
22731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_expect" >&5
22732 $as_echo_n "checking for __builtin_expect... " >&6; }
22733 if ${gl_cv___builtin_expect+:} false; then :
22734 $as_echo_n "(cached) " >&6
22735 else
22736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22737 /* end confdefs.h. */
22738
22739 int
22740 main (int argc, char **argv)
22741 {
22742 argc = __builtin_expect (argc, 100);
22743 return argv[argc != 100][0];
22744 }
22745 _ACEOF
22746 if ac_fn_c_try_link "$LINENO"; then :
22747 gl_cv___builtin_expect=yes
22748 else
22749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22750 /* end confdefs.h. */
22751
22752 #include <builtins.h>
22753 int
22754 main (int argc, char **argv)
22755 {
22756 argc = __builtin_expect (argc, 100);
22757 return argv[argc != 100][0];
22758 }
22759 _ACEOF
22760 if ac_fn_c_try_link "$LINENO"; then :
22761 gl_cv___builtin_expect="in <builtins.h>"
22762 else
22763 gl_cv___builtin_expect=no
22764 fi
22765 rm -f core conftest.err conftest.$ac_objext \
22766 conftest$ac_exeext conftest.$ac_ext
22767 fi
22768 rm -f core conftest.err conftest.$ac_objext \
22769 conftest$ac_exeext conftest.$ac_ext
22770 fi
22771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv___builtin_expect" >&5
22772 $as_echo "$gl_cv___builtin_expect" >&6; }
22773 if test "$gl_cv___builtin_expect" = yes; then
22774 $as_echo "#define HAVE___BUILTIN_EXPECT 1" >>confdefs.h
22775
22776 elif test "$gl_cv___builtin_expect" = "in <builtins.h>"; then
22777 $as_echo "#define HAVE___BUILTIN_EXPECT 2" >>confdefs.h
22778
22779 fi
22780
22781
22782
22783
22784
22785 if test $ac_cv_func_canonicalize_file_name = no; then
22786 HAVE_CANONICALIZE_FILE_NAME=0
22787 if test $ac_cv_func_realpath = no; then
22788 HAVE_REALPATH=0
22789 else
22790 case "$gl_cv_func_realpath_works" in
22791 *yes) ;;
22792 *) REPLACE_REALPATH=1 ;;
22793 esac
22794 fi
22795 else
22796 case "$gl_cv_func_realpath_works" in
22797 *yes)
22798 ;;
22799 *)
22800 REPLACE_CANONICALIZE_FILE_NAME=1
22801 REPLACE_REALPATH=1
22802 ;;
22803 esac
22804 fi
22805
22806
22807 if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
22808 GL_COND_OBJ_CANONICALIZE_LGPL_TRUE=
22809 GL_COND_OBJ_CANONICALIZE_LGPL_FALSE='#'
22810 else
22811 GL_COND_OBJ_CANONICALIZE_LGPL_TRUE='#'
22812 GL_COND_OBJ_CANONICALIZE_LGPL_FALSE=
22813 fi
22814 :
22815 if test -z "${GL_COND_OBJ_CANONICALIZE_LGPL_TRUE}" && test -z "${GL_COND_OBJ_CANONICALIZE_LGPL_FALSE}"; then
22816 GL_COND_OBJ_CANONICALIZE_LGPL_TRUE='#'
22817 GL_COND_OBJ_CANONICALIZE_LGPL_FALSE='#'
22818 fi
22819
22820
22821
22822 cat >>confdefs.h <<_ACEOF
22823 #define GNULIB_CANONICALIZE_LGPL 1
22824 _ACEOF
22825
22826
22827
22828
22829
22830
22831
22832
22833
22834
22835
22836 GL_GNULIB_CANONICALIZE_FILE_NAME=1
22837
22838
22839
22840
22841
22842 $as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
22843
22844
22845
22846
22847
22848
22849
22850
22851
22852
22853
22854
22855 GL_GNULIB_REALPATH=1
22856
22857
22858
22859
22860
22861 $as_echo "#define GNULIB_TEST_REALPATH 1" >>confdefs.h
22862
22863
22864
22865
22866
22867
22868
22869
22870
22871
22872
22873
22874 GL_GNULIB_CHDIR=1
22875
22876
22877
22878
22879
22880 $as_echo "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
22881
22882
22883
22884
22885
22886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this system supports file names of any length" >&5
22887 $as_echo_n "checking whether this system supports file names of any length... " >&6; }
22888 if ${gl_cv_have_unlimited_file_name_length+:} false; then :
22889 $as_echo_n "(cached) " >&6
22890 else
22891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22892 /* end confdefs.h. */
22893
22894 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
22895 #if HAVE_UNISTD_H
22896 # include <unistd.h>
22897 #endif
22898 #include <limits.h>
22899 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
22900 # include <sys/param.h>
22901 #endif
22902 #if !defined PATH_MAX && defined MAXPATHLEN
22903 # define PATH_MAX MAXPATHLEN
22904 #endif
22905 #ifdef __hpux
22906 # undef PATH_MAX
22907 # define PATH_MAX 1024
22908 #endif
22909 #if defined _WIN32 && ! defined __CYGWIN__
22910 # undef PATH_MAX
22911 # define PATH_MAX 260
22912 #endif
22913
22914 #ifdef PATH_MAX
22915 have_arbitrary_file_name_length_limit
22916 #endif
22917 _ACEOF
22918 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22919 $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1; then :
22920 gl_cv_have_unlimited_file_name_length=no
22921 else
22922 gl_cv_have_unlimited_file_name_length=yes
22923 fi
22924 rm -f conftest*
22925
22926 fi
22927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_unlimited_file_name_length" >&5
22928 $as_echo "$gl_cv_have_unlimited_file_name_length" >&6; }
22929
22930
22931 if test $gl_cv_have_unlimited_file_name_length = no; then
22932 GL_COND_OBJ_CHDIR_LONG_TRUE=
22933 GL_COND_OBJ_CHDIR_LONG_FALSE='#'
22934 else
22935 GL_COND_OBJ_CHDIR_LONG_TRUE='#'
22936 GL_COND_OBJ_CHDIR_LONG_FALSE=
22937 fi
22938 :
22939 if test -z "${GL_COND_OBJ_CHDIR_LONG_TRUE}" && test -z "${GL_COND_OBJ_CHDIR_LONG_FALSE}"; then
22940 GL_COND_OBJ_CHDIR_LONG_TRUE='#'
22941 GL_COND_OBJ_CHDIR_LONG_FALSE='#'
22942 fi
22943
22944 if test -z "$GL_COND_OBJ_CHDIR_LONG_TRUE"; then :
22945
22946 :
22947
22948 fi
22949
22950
22951 if test $HAVE_CHOWN = 0 || test $REPLACE_CHOWN = 1; then
22952 GL_COND_OBJ_CHOWN_TRUE=
22953 GL_COND_OBJ_CHOWN_FALSE='#'
22954 else
22955 GL_COND_OBJ_CHOWN_TRUE='#'
22956 GL_COND_OBJ_CHOWN_FALSE=
22957 fi
22958 :
22959 if test -z "${GL_COND_OBJ_CHOWN_TRUE}" && test -z "${GL_COND_OBJ_CHOWN_FALSE}"; then
22960 GL_COND_OBJ_CHOWN_TRUE='#'
22961 GL_COND_OBJ_CHOWN_FALSE='#'
22962 fi
22963
22964
22965 if test $REPLACE_CHOWN = 1 && test $ac_cv_func_fchown = no; then
22966 GL_COND_OBJ_FCHOWN_STUB_TRUE=
22967 GL_COND_OBJ_FCHOWN_STUB_FALSE='#'
22968 else
22969 GL_COND_OBJ_FCHOWN_STUB_TRUE='#'
22970 GL_COND_OBJ_FCHOWN_STUB_FALSE=
22971 fi
22972 :
22973 if test -z "${GL_COND_OBJ_FCHOWN_STUB_TRUE}" && test -z "${GL_COND_OBJ_FCHOWN_STUB_FALSE}"; then
22974 GL_COND_OBJ_FCHOWN_STUB_TRUE='#'
22975 GL_COND_OBJ_FCHOWN_STUB_FALSE='#'
22976 fi
22977
22978
22979
22980
22981
22982
22983
22984
22985
22986
22987 GL_GNULIB_CHOWN=1
22988
22989
22990
22991
22992
22993 $as_echo "#define GNULIB_TEST_CHOWN 1" >>confdefs.h
22994
22995
22996
22997
22998
22999
23000 # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
23001 # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
23002
23003 # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all*
23004 # programs in the package would end up linked with that potentially-shared
23005 # library, inducing unnecessary run-time overhead.
23006 LIB_CLOCK_GETTIME=
23007
23008 gl_saved_libs=$LIBS
23009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
23010 $as_echo_n "checking for library containing clock_gettime... " >&6; }
23011 if ${ac_cv_search_clock_gettime+:} false; then :
23012 $as_echo_n "(cached) " >&6
23013 else
23014 ac_func_search_save_LIBS=$LIBS
23015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23016 /* end confdefs.h. */
23017
23018 /* Override any GCC internal prototype to avoid an error.
23019 Use char because int might match the return type of a GCC
23020 builtin and then its argument prototype would still apply. */
23021 #ifdef __cplusplus
23022 extern "C"
23023 #endif
23024 char clock_gettime ();
23025 int
23026 main ()
23027 {
23028 return clock_gettime ();
23029 ;
23030 return 0;
23031 }
23032 _ACEOF
23033 for ac_lib in '' rt posix4; do
23034 if test -z "$ac_lib"; then
23035 ac_res="none required"
23036 else
23037 ac_res=-l$ac_lib
23038 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
23039 fi
23040 if ac_fn_c_try_link "$LINENO"; then :
23041 ac_cv_search_clock_gettime=$ac_res
23042 fi
23043 rm -f core conftest.err conftest.$ac_objext \
23044 conftest$ac_exeext
23045 if ${ac_cv_search_clock_gettime+:} false; then :
23046 break
23047 fi
23048 done
23049 if ${ac_cv_search_clock_gettime+:} false; then :
23050
23051 else
23052 ac_cv_search_clock_gettime=no
23053 fi
23054 rm conftest.$ac_ext
23055 LIBS=$ac_func_search_save_LIBS
23056 fi
23057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
23058 $as_echo "$ac_cv_search_clock_gettime" >&6; }
23059 ac_res=$ac_cv_search_clock_gettime
23060 if test "$ac_res" != no; then :
23061 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
23062 test "$ac_cv_search_clock_gettime" = "none required" ||
23063 LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
23064 fi
23065
23066 for ac_func in clock_getres clock_gettime clock_settime
23067 do :
23068 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
23069 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
23070 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
23071 cat >>confdefs.h <<_ACEOF
23072 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
23073 _ACEOF
23074
23075 fi
23076 done
23077
23078 LIBS=$gl_saved_libs
23079
23080
23081
23082 $as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
23083
23084
23085
23086
23087
23088
23089 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
23090 REPLACE_CLOSE=1
23091 fi
23092
23093
23094
23095
23096
23097
23098 if test $ac_cv_header_sys_socket_h != yes; then
23099 for ac_header in winsock2.h
23100 do :
23101 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
23102 if test "x$ac_cv_header_winsock2_h" = xyes; then :
23103 cat >>confdefs.h <<_ACEOF
23104 #define HAVE_WINSOCK2_H 1
23105 _ACEOF
23106
23107 fi
23108
23109 done
23110
23111 fi
23112 if test "$ac_cv_header_winsock2_h" = yes; then
23113 HAVE_WINSOCK2_H=1
23114 UNISTD_H_HAVE_WINSOCK2_H=1
23115 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
23116 else
23117 HAVE_WINSOCK2_H=0
23118 fi
23119
23120
23121 if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
23122 REPLACE_CLOSE=1
23123 fi
23124
23125
23126 if test $REPLACE_CLOSE = 0; then
23127
23128
23129
23130 if test $ac_cv_func_fchdir = no; then
23131 HAVE_FCHDIR=0
23132 fi
23133
23134 if test $HAVE_FCHDIR = 0; then
23135 REPLACE_CLOSE=1
23136 fi
23137 fi
23138
23139
23140
23141 if test $REPLACE_CLOSE = 1; then
23142 GL_COND_OBJ_CLOSE_TRUE=
23143 GL_COND_OBJ_CLOSE_FALSE='#'
23144 else
23145 GL_COND_OBJ_CLOSE_TRUE='#'
23146 GL_COND_OBJ_CLOSE_FALSE=
23147 fi
23148 :
23149 if test -z "${GL_COND_OBJ_CLOSE_TRUE}" && test -z "${GL_COND_OBJ_CLOSE_FALSE}"; then
23150 GL_COND_OBJ_CLOSE_TRUE='#'
23151 GL_COND_OBJ_CLOSE_FALSE='#'
23152 fi
23153
23154
23155
23156
23157
23158
23159
23160
23161
23162
23163 GL_GNULIB_CLOSE=1
23164
23165
23166
23167
23168
23169 $as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
23170
23171
23172
23173
23174
23175
23176 for ac_func in closedir
23177 do :
23178 ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir"
23179 if test "x$ac_cv_func_closedir" = xyes; then :
23180 cat >>confdefs.h <<_ACEOF
23181 #define HAVE_CLOSEDIR 1
23182 _ACEOF
23183
23184 fi
23185 done
23186
23187 if test $ac_cv_func_closedir = no; then
23188 HAVE_CLOSEDIR=0
23189 fi
23190
23191
23192
23193
23194 if test $ac_cv_func_fchdir = no; then
23195 HAVE_FCHDIR=0
23196 fi
23197
23198 if test $HAVE_FCHDIR = 0; then
23199 if test $HAVE_CLOSEDIR = 1; then
23200 REPLACE_CLOSEDIR=1
23201 fi
23202 fi
23203
23204 case $host_os,$HAVE_CLOSEDIR in
23205 os2*,1)
23206 REPLACE_CLOSEDIR=1;;
23207 esac
23208
23209
23210 if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
23211 GL_COND_OBJ_CLOSEDIR_TRUE=
23212 GL_COND_OBJ_CLOSEDIR_FALSE='#'
23213 else
23214 GL_COND_OBJ_CLOSEDIR_TRUE='#'
23215 GL_COND_OBJ_CLOSEDIR_FALSE=
23216 fi
23217 :
23218 if test -z "${GL_COND_OBJ_CLOSEDIR_TRUE}" && test -z "${GL_COND_OBJ_CLOSEDIR_FALSE}"; then
23219 GL_COND_OBJ_CLOSEDIR_TRUE='#'
23220 GL_COND_OBJ_CLOSEDIR_FALSE='#'
23221 fi
23222
23223
23224
23225
23226
23227
23228
23229
23230
23231
23232 GL_GNULIB_CLOSEDIR=1
23233
23234
23235
23236
23237
23238 $as_echo "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
23239
23240
23241
23242
23243
23244 if test "$ac_cv_header_winsock2_h" = yes; then
23245 GL_COND_OBJ_CONNECT_TRUE=
23246 GL_COND_OBJ_CONNECT_FALSE='#'
23247 else
23248 GL_COND_OBJ_CONNECT_TRUE='#'
23249 GL_COND_OBJ_CONNECT_FALSE=
23250 fi
23251 :
23252 if test -z "${GL_COND_OBJ_CONNECT_TRUE}" && test -z "${GL_COND_OBJ_CONNECT_FALSE}"; then
23253 GL_COND_OBJ_CONNECT_TRUE='#'
23254 GL_COND_OBJ_CONNECT_FALSE='#'
23255 fi
23256
23257
23258
23259
23260
23261
23262
23263
23264
23265
23266 GL_GNULIB_CONNECT=1
23267
23268
23269
23270
23271
23272 $as_echo "#define GNULIB_TEST_CONNECT 1" >>confdefs.h
23273
23274
23275
23276
23277
23278
23279
23280
23281
23282
23283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
23284 $as_echo_n "checking for d_ino member in directory struct... " >&6; }
23285 if ${gl_cv_struct_dirent_d_ino+:} false; then :
23286 $as_echo_n "(cached) " >&6
23287 else
23288 if test "$cross_compiling" = yes; then :
23289 case "$host_os" in
23290 # Guess yes on glibc systems with Linux kernel.
23291 linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
23292 # Guess yes on musl systems with Linux kernel.
23293 linux*-musl*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
23294 # Guess no on native Windows.
23295 mingw*) gl_cv_struct_dirent_d_ino="guessing no" ;;
23296 # If we don't know, obey --enable-cross-guesses.
23297 *) gl_cv_struct_dirent_d_ino="$gl_cross_guess_normal" ;;
23298 esac
23299
23300 else
23301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23302 /* end confdefs.h. */
23303 #include <sys/types.h>
23304 #include <sys/stat.h>
23305 #include <dirent.h>
23306
23307 int
23308 main ()
23309 {
23310 DIR *dp = opendir (".");
23311 struct dirent *e;
23312 struct stat st;
23313 if (! dp)
23314 return 1;
23315 e = readdir (dp);
23316 if (! e)
23317 { closedir (dp); return 2; }
23318 if (lstat (e->d_name, &st) != 0)
23319 { closedir (dp); return 3; }
23320 if (e->d_ino != st.st_ino)
23321 { closedir (dp); return 4; }
23322 closedir (dp);
23323 return 0;
23324
23325 ;
23326 return 0;
23327 }
23328 _ACEOF
23329 if ac_fn_c_try_run "$LINENO"; then :
23330 gl_cv_struct_dirent_d_ino=yes
23331 else
23332 gl_cv_struct_dirent_d_ino=no
23333 fi
23334 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23335 conftest.$ac_objext conftest.beam conftest.$ac_ext
23336 fi
23337
23338 fi
23339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5
23340 $as_echo "$gl_cv_struct_dirent_d_ino" >&6; }
23341 case "$gl_cv_struct_dirent_d_ino" in
23342 *yes)
23343
23344 $as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h
23345
23346 ;;
23347 esac
23348
23349
23350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_type member in directory struct" >&5
23351 $as_echo_n "checking for d_type member in directory struct... " >&6; }
23352 if ${gl_cv_struct_dirent_d_type+:} false; then :
23353 $as_echo_n "(cached) " >&6
23354 else
23355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23356 /* end confdefs.h. */
23357
23358 #include <sys/types.h>
23359 #include <dirent.h>
23360
23361 int
23362 main ()
23363 {
23364 struct dirent dp; dp.d_type = 0;
23365 ;
23366 return 0;
23367 }
23368 _ACEOF
23369 if ac_fn_c_try_link "$LINENO"; then :
23370 gl_cv_struct_dirent_d_type=yes
23371 else
23372 gl_cv_struct_dirent_d_type=no
23373 fi
23374 rm -f core conftest.err conftest.$ac_objext \
23375 conftest$ac_exeext conftest.$ac_ext
23376
23377
23378 fi
23379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_type" >&5
23380 $as_echo "$gl_cv_struct_dirent_d_type" >&6; }
23381 if test $gl_cv_struct_dirent_d_type = yes; then
23382
23383 $as_echo "#define HAVE_STRUCT_DIRENT_D_TYPE 1" >>confdefs.h
23384
23385 fi
23386
23387
23388
23389
23390
23391
23392
23393
23394
23395
23396
23397
23398
23399
23400 for ac_func in dirfd
23401 do :
23402 ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
23403 if test "x$ac_cv_func_dirfd" = xyes; then :
23404 cat >>confdefs.h <<_ACEOF
23405 #define HAVE_DIRFD 1
23406 _ACEOF
23407
23408 fi
23409 done
23410
23411 ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
23412 #include <dirent.h>
23413 "
23414 if test "x$ac_cv_have_decl_dirfd" = xyes; then :
23415 ac_have_decl=1
23416 else
23417 ac_have_decl=0
23418 fi
23419
23420 cat >>confdefs.h <<_ACEOF
23421 #define HAVE_DECL_DIRFD $ac_have_decl
23422 _ACEOF
23423
23424 if test $ac_cv_have_decl_dirfd = no; then
23425 HAVE_DECL_DIRFD=0
23426 fi
23427
23428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
23429 $as_echo_n "checking whether dirfd is a macro... " >&6; }
23430 if ${gl_cv_func_dirfd_macro+:} false; then :
23431 $as_echo_n "(cached) " >&6
23432 else
23433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23434 /* end confdefs.h. */
23435
23436 #include <sys/types.h>
23437 #include <dirent.h>
23438 #ifdef dirfd
23439 dirent_header_defines_dirfd
23440 #endif
23441 _ACEOF
23442 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23443 $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1; then :
23444 gl_cv_func_dirfd_macro=yes
23445 else
23446 gl_cv_func_dirfd_macro=no
23447 fi
23448 rm -f conftest*
23449
23450 fi
23451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
23452 $as_echo "$gl_cv_func_dirfd_macro" >&6; }
23453
23454 # Use the replacement if we have no function or macro with that name,
23455 # or if OS/2 kLIBC whose dirfd() does not work.
23456 # Replace only if the system declares dirfd already.
23457 case $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro,$host_os,$ac_cv_have_decl_dirfd in
23458 no,no,*,yes | *,*,os2*,yes)
23459 REPLACE_DIRFD=1
23460
23461 $as_echo "#define REPLACE_DIRFD 1" >>confdefs.h
23462 ;;
23463 esac
23464
23465
23466 if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no || test $REPLACE_DIRFD = 1; then
23467 GL_COND_OBJ_DIRFD_TRUE=
23468 GL_COND_OBJ_DIRFD_FALSE='#'
23469 else
23470 GL_COND_OBJ_DIRFD_TRUE='#'
23471 GL_COND_OBJ_DIRFD_FALSE=
23472 fi
23473 :
23474 if test -z "${GL_COND_OBJ_DIRFD_TRUE}" && test -z "${GL_COND_OBJ_DIRFD_FALSE}"; then
23475 GL_COND_OBJ_DIRFD_TRUE='#'
23476 GL_COND_OBJ_DIRFD_FALSE='#'
23477 fi
23478
23479 if test -z "$GL_COND_OBJ_DIRFD_TRUE"; then :
23480
23481
23482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
23483 $as_echo_n "checking how to get the file descriptor associated with an open DIR*... " >&6; }
23484 if ${gl_cv_sys_dir_fd_member_name+:} false; then :
23485 $as_echo_n "(cached) " >&6
23486 else
23487
23488 dirfd_save_CFLAGS=$CFLAGS
23489 for ac_expr in d_fd dd_fd; do
23490
23491 CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
23492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23493 /* end confdefs.h. */
23494
23495 #include <sys/types.h>
23496 #include <dirent.h>
23497 int
23498 main ()
23499 {
23500 DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
23501 ;
23502 return 0;
23503 }
23504 _ACEOF
23505 if ac_fn_c_try_compile "$LINENO"; then :
23506 dir_fd_found=yes
23507
23508 fi
23509 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23510 CFLAGS=$dirfd_save_CFLAGS
23511 test "$dir_fd_found" = yes && break
23512 done
23513 test "$dir_fd_found" = yes || ac_expr=no_such_member
23514
23515 gl_cv_sys_dir_fd_member_name=$ac_expr
23516
23517
23518 fi
23519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
23520 $as_echo "$gl_cv_sys_dir_fd_member_name" >&6; }
23521 if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
23522
23523 cat >>confdefs.h <<_ACEOF
23524 #define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name
23525 _ACEOF
23526
23527 fi
23528
23529
23530
23531 fi
23532
23533
23534
23535
23536
23537
23538
23539
23540
23541 GL_GNULIB_DIRFD=1
23542
23543
23544
23545
23546
23547 $as_echo "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
23548
23549
23550
23551
23552
23553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
23554 $as_echo_n "checking whether // is distinct from /... " >&6; }
23555 if ${gl_cv_double_slash_root+:} false; then :
23556 $as_echo_n "(cached) " >&6
23557 else
23558 if test x"$cross_compiling" = xyes ; then
23559 # When cross-compiling, there is no way to tell whether // is special
23560 # short of a list of hosts. However, the only known hosts to date
23561 # that have a distinct // are Apollo DomainOS (too old to port to),
23562 # Cygwin, and z/OS. If anyone knows of another system for which // has
23563 # special semantics and is distinct from /, please report it to
23564 # <bug-gnulib@gnu.org>.
23565 case $host in
23566 *-cygwin | i370-ibm-openedition)
23567 gl_cv_double_slash_root=yes ;;
23568 *)
23569 # Be optimistic and assume that / and // are the same when we
23570 # don't know.
23571 gl_cv_double_slash_root='unknown, assuming no' ;;
23572 esac
23573 else
23574 set x `ls -di / // 2>/dev/null`
23575 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
23576 gl_cv_double_slash_root=no
23577 else
23578 gl_cv_double_slash_root=yes
23579 fi
23580 fi
23581 fi
23582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
23583 $as_echo "$gl_cv_double_slash_root" >&6; }
23584 if test "$gl_cv_double_slash_root" = yes; then
23585
23586 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
23587
23588 fi
23589
23590
23591
23592
23593
23594 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
23595 REPLACE_DUP=1
23596 fi
23597
23598
23599
23600
23601
23602 if test $ac_cv_func_fchdir = no; then
23603 HAVE_FCHDIR=0
23604 fi
23605
23606 if test $HAVE_FCHDIR = 0; then
23607 REPLACE_DUP=1
23608 fi
23609
23610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup works" >&5
23611 $as_echo_n "checking whether dup works... " >&6; }
23612 if ${gl_cv_func_dup_works+:} false; then :
23613 $as_echo_n "(cached) " >&6
23614 else
23615 if test "$cross_compiling" = yes; then :
23616 case "$host_os" in
23617 # Guess no on native Windows.
23618 mingw*) gl_cv_func_dup_works="guessing no" ;;
23619 *) gl_cv_func_dup_works="guessing yes" ;;
23620 esac
23621
23622 else
23623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23624 /* end confdefs.h. */
23625 #include <unistd.h>
23626 #include <fcntl.h>
23627 #include <errno.h>
23628
23629
23630 $gl_mda_defines
23631
23632 int
23633 main ()
23634 {
23635 /* On OS/2 kLIBC, dup does not work on a directory fd. */
23636 int fd = open (".", O_RDONLY);
23637 return fd < 0 ? 1 : dup (fd) < 0 ? 2 : 0;
23638
23639 ;
23640 return 0;
23641 }
23642
23643 _ACEOF
23644 if ac_fn_c_try_run "$LINENO"; then :
23645 gl_cv_func_dup_works=yes
23646 else
23647 gl_cv_func_dup_works=no
23648 fi
23649 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23650 conftest.$ac_objext conftest.beam conftest.$ac_ext
23651 fi
23652
23653
23654 fi
23655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup_works" >&5
23656 $as_echo "$gl_cv_func_dup_works" >&6; }
23657 case "$gl_cv_func_dup_works" in
23658 *yes) ;;
23659 *)
23660 REPLACE_DUP=1
23661 ;;
23662 esac
23663
23664
23665 if test $REPLACE_DUP = 1; then
23666 GL_COND_OBJ_DUP_TRUE=
23667 GL_COND_OBJ_DUP_FALSE='#'
23668 else
23669 GL_COND_OBJ_DUP_TRUE='#'
23670 GL_COND_OBJ_DUP_FALSE=
23671 fi
23672 :
23673 if test -z "${GL_COND_OBJ_DUP_TRUE}" && test -z "${GL_COND_OBJ_DUP_FALSE}"; then
23674 GL_COND_OBJ_DUP_TRUE='#'
23675 GL_COND_OBJ_DUP_FALSE='#'
23676 fi
23677
23678 if test -z "$GL_COND_OBJ_DUP_TRUE"; then :
23679
23680 :
23681
23682 fi
23683
23684
23685
23686
23687
23688
23689
23690
23691
23692 GL_GNULIB_DUP=1
23693
23694
23695
23696
23697
23698 $as_echo "#define GNULIB_TEST_DUP 1" >>confdefs.h
23699
23700
23701
23702
23703
23704
23705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
23706 $as_echo_n "checking whether dup2 works... " >&6; }
23707 if ${gl_cv_func_dup2_works+:} false; then :
23708 $as_echo_n "(cached) " >&6
23709 else
23710 if test "$cross_compiling" = yes; then :
23711 case "$host_os" in
23712 mingw*) # on this platform, dup2 always returns 0 for success
23713 gl_cv_func_dup2_works="guessing no" ;;
23714 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
23715 gl_cv_func_dup2_works="guessing no" ;;
23716 aix* | freebsd*)
23717 # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
23718 # not EBADF.
23719 gl_cv_func_dup2_works="guessing no" ;;
23720 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
23721 gl_cv_func_dup2_works="guessing no" ;;
23722 *-android*) # implemented using dup3(), which fails if oldfd == newfd
23723 gl_cv_func_dup2_works="guessing no" ;;
23724 os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
23725 gl_cv_func_dup2_works="guessing no" ;;
23726 *) gl_cv_func_dup2_works="guessing yes" ;;
23727 esac
23728 else
23729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23730 /* end confdefs.h. */
23731
23732 #include <errno.h>
23733 #include <fcntl.h>
23734 #include <limits.h>
23735 #include <sys/resource.h>
23736 #include <unistd.h>
23737
23738
23739 $gl_mda_defines
23740
23741 #ifndef RLIM_SAVED_CUR
23742 # define RLIM_SAVED_CUR RLIM_INFINITY
23743 #endif
23744 #ifndef RLIM_SAVED_MAX
23745 # define RLIM_SAVED_MAX RLIM_INFINITY
23746 #endif
23747
23748 int
23749 main ()
23750 {
23751 int result = 0;
23752 int bad_fd = INT_MAX;
23753 struct rlimit rlim;
23754 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
23755 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
23756 && rlim.rlim_cur != RLIM_INFINITY
23757 && rlim.rlim_cur != RLIM_SAVED_MAX
23758 && rlim.rlim_cur != RLIM_SAVED_CUR)
23759 bad_fd = rlim.rlim_cur;
23760 #ifdef FD_CLOEXEC
23761 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
23762 result |= 1;
23763 #endif
23764 if (dup2 (1, 1) != 1)
23765 result |= 2;
23766 #ifdef FD_CLOEXEC
23767 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
23768 result |= 4;
23769 #endif
23770 close (0);
23771 if (dup2 (0, 0) != -1)
23772 result |= 8;
23773 /* Many gnulib modules require POSIX conformance of EBADF. */
23774 if (dup2 (2, bad_fd) == -1 && errno != EBADF)
23775 result |= 16;
23776 /* Flush out some cygwin core dumps. */
23777 if (dup2 (2, -1) != -1 || errno != EBADF)
23778 result |= 32;
23779 dup2 (2, 255);
23780 dup2 (2, 256);
23781 /* On OS/2 kLIBC, dup2() does not work on a directory fd. */
23782 {
23783 int fd = open (".", O_RDONLY);
23784 if (fd == -1)
23785 result |= 64;
23786 else if (dup2 (fd, fd + 1) == -1)
23787 result |= 128;
23788 close (fd);
23789 }
23790 return result;
23791 ;
23792 return 0;
23793 }
23794
23795 _ACEOF
23796 if ac_fn_c_try_run "$LINENO"; then :
23797 gl_cv_func_dup2_works=yes
23798 else
23799 gl_cv_func_dup2_works=no
23800 fi
23801 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23802 conftest.$ac_objext conftest.beam conftest.$ac_ext
23803 fi
23804
23805
23806 fi
23807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
23808 $as_echo "$gl_cv_func_dup2_works" >&6; }
23809 case "$gl_cv_func_dup2_works" in
23810 *yes) ;;
23811 *)
23812 REPLACE_DUP2=1
23813 for ac_func in setdtablesize
23814 do :
23815 ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
23816 if test "x$ac_cv_func_setdtablesize" = xyes; then :
23817 cat >>confdefs.h <<_ACEOF
23818 #define HAVE_SETDTABLESIZE 1
23819 _ACEOF
23820
23821 fi
23822 done
23823
23824 ;;
23825 esac
23826
23827
23828
23829
23830 if test $ac_cv_func_fchdir = no; then
23831 HAVE_FCHDIR=0
23832 fi
23833
23834 if test $HAVE_FCHDIR = 0; then
23835 REPLACE_DUP2=1
23836 fi
23837
23838
23839
23840 if test $REPLACE_DUP2 = 1; then
23841 GL_COND_OBJ_DUP2_TRUE=
23842 GL_COND_OBJ_DUP2_FALSE='#'
23843 else
23844 GL_COND_OBJ_DUP2_TRUE='#'
23845 GL_COND_OBJ_DUP2_FALSE=
23846 fi
23847 :
23848 if test -z "${GL_COND_OBJ_DUP2_TRUE}" && test -z "${GL_COND_OBJ_DUP2_FALSE}"; then
23849 GL_COND_OBJ_DUP2_TRUE='#'
23850 GL_COND_OBJ_DUP2_FALSE='#'
23851 fi
23852
23853 if test -z "$GL_COND_OBJ_DUP2_TRUE"; then :
23854
23855
23856
23857 fi
23858
23859
23860
23861
23862
23863
23864
23865
23866
23867 GL_GNULIB_DUP2=1
23868
23869
23870
23871
23872
23873 $as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h
23874
23875
23876
23877
23878
23879
23880
23881
23882
23883
23884
23885
23886
23887 GL_GNULIB_ENVIRON=1
23888
23889
23890
23891
23892
23893 $as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
23894
23895
23896
23897
23898
23899
23900
23901
23902 case "$GL_GENERATE_ERRNO_H" in
23903 false) ERRNO_H='' ;;
23904 true)
23905 if test -z "$ERRNO_H"; then
23906 ERRNO_H="${gl_source_base_prefix}errno.h"
23907 fi
23908 ;;
23909 *) echo "*** GL_GENERATE_ERRNO_H is not set correctly" 1>&2; exit 1 ;;
23910 esac
23911
23912
23913 if $GL_GENERATE_ERRNO_H; then
23914 GL_GENERATE_ERRNO_H_TRUE=
23915 GL_GENERATE_ERRNO_H_FALSE='#'
23916 else
23917 GL_GENERATE_ERRNO_H_TRUE='#'
23918 GL_GENERATE_ERRNO_H_FALSE=
23919 fi
23920 :
23921 if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
23922 GL_GENERATE_ERRNO_H_TRUE='#'
23923 GL_GENERATE_ERRNO_H_FALSE='#'
23924 fi
23925
23926
23927
23928
23929
23930
23931
23932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
23933 $as_echo_n "checking for error_at_line... " >&6; }
23934 if ${ac_cv_lib_error_at_line+:} false; then :
23935 $as_echo_n "(cached) " >&6
23936 else
23937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23938 /* end confdefs.h. */
23939 #include <error.h>
23940 int
23941 main ()
23942 {
23943 error_at_line (0, 0, "", 0, "an error occurred");
23944 ;
23945 return 0;
23946 }
23947 _ACEOF
23948 if ac_fn_c_try_link "$LINENO"; then :
23949 ac_cv_lib_error_at_line=yes
23950 else
23951 ac_cv_lib_error_at_line=no
23952 fi
23953 rm -f core conftest.err conftest.$ac_objext \
23954 conftest$ac_exeext conftest.$ac_ext
23955 fi
23956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
23957 $as_echo "$ac_cv_lib_error_at_line" >&6; }
23958
23959
23960 if test "$ac_cv_lib_error_at_line" = no; then
23961 GL_COND_OBJ_ERROR_TRUE=
23962 GL_COND_OBJ_ERROR_FALSE='#'
23963 else
23964 GL_COND_OBJ_ERROR_TRUE='#'
23965 GL_COND_OBJ_ERROR_FALSE=
23966 fi
23967 :
23968 if test -z "${GL_COND_OBJ_ERROR_TRUE}" && test -z "${GL_COND_OBJ_ERROR_FALSE}"; then
23969 GL_COND_OBJ_ERROR_TRUE='#'
23970 GL_COND_OBJ_ERROR_FALSE='#'
23971 fi
23972
23973 if test -z "$GL_COND_OBJ_ERROR_TRUE"; then :
23974
23975
23976
23977
23978
23979 :
23980
23981
23982 fi
23983
23984
23985
23986
23987
23988
23989
23990 if test $ac_cv_have_decl_fchdir = no; then
23991 HAVE_DECL_FCHDIR=0
23992 fi
23993
23994
23995 if test $HAVE_FCHDIR = 0; then
23996
23997 $as_echo "#define REPLACE_FCHDIR 1" >>confdefs.h
23998
23999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5
24000 $as_echo_n "checking whether open can visit directories... " >&6; }
24001 if ${gl_cv_func_open_directory_works+:} false; then :
24002 $as_echo_n "(cached) " >&6
24003 else
24004 if test "$cross_compiling" = yes; then :
24005 case "$host_os" in
24006 # Guess yes on Linux systems.
24007 linux-* | linux) gl_cv_func_open_directory_works="guessing yes" ;;
24008 # Guess yes on glibc systems.
24009 *-gnu* | gnu*) gl_cv_func_open_directory_works="guessing yes" ;;
24010 # Guess no on native Windows.
24011 mingw*) gl_cv_func_open_directory_works="guessing no" ;;
24012 # If we don't know, obey --enable-cross-guesses.
24013 *) gl_cv_func_open_directory_works="$gl_cross_guess_normal" ;;
24014 esac
24015
24016 else
24017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24018 /* end confdefs.h. */
24019 #include <fcntl.h>
24020
24021
24022 $gl_mda_defines
24023
24024 int
24025 main ()
24026 {
24027 return open(".", O_RDONLY) < 0;
24028 ;
24029 return 0;
24030 }
24031 _ACEOF
24032 if ac_fn_c_try_run "$LINENO"; then :
24033 gl_cv_func_open_directory_works=yes
24034 else
24035 gl_cv_func_open_directory_works=no
24036 fi
24037 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24038 conftest.$ac_objext conftest.beam conftest.$ac_ext
24039 fi
24040
24041 fi
24042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5
24043 $as_echo "$gl_cv_func_open_directory_works" >&6; }
24044 case "$gl_cv_func_open_directory_works" in
24045 *yes) ;;
24046 *)
24047
24048 $as_echo "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h
24049
24050 ;;
24051 esac
24052 fi
24053
24054
24055 if test $HAVE_FCHDIR = 0; then
24056 GL_COND_OBJ_FCHDIR_TRUE=
24057 GL_COND_OBJ_FCHDIR_FALSE='#'
24058 else
24059 GL_COND_OBJ_FCHDIR_TRUE='#'
24060 GL_COND_OBJ_FCHDIR_FALSE=
24061 fi
24062 :
24063 if test -z "${GL_COND_OBJ_FCHDIR_TRUE}" && test -z "${GL_COND_OBJ_FCHDIR_FALSE}"; then
24064 GL_COND_OBJ_FCHDIR_TRUE='#'
24065 GL_COND_OBJ_FCHDIR_FALSE='#'
24066 fi
24067
24068 if test -z "$GL_COND_OBJ_FCHDIR_TRUE"; then :
24069
24070 :
24071
24072 fi
24073
24074
24075
24076
24077
24078
24079
24080
24081
24082 GL_GNULIB_FCHDIR=1
24083
24084
24085
24086
24087
24088 $as_echo "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h
24089
24090
24091
24092
24093
24094
24095
24096
24097 if test $ac_cv_func_fcntl = no; then
24098
24099
24100
24101 if test $ac_cv_func_fcntl = no; then
24102 HAVE_FCNTL=0
24103 else
24104 REPLACE_FCNTL=1
24105 fi
24106
24107 else
24108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
24109 $as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
24110 if ${gl_cv_func_fcntl_f_dupfd_works+:} false; then :
24111 $as_echo_n "(cached) " >&6
24112 else
24113 if test "$cross_compiling" = yes; then :
24114 case $host_os in
24115 aix* | cygwin* | haiku*)
24116 gl_cv_func_fcntl_f_dupfd_works="guessing no" ;;
24117 *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;;
24118 esac
24119 else
24120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24121 /* end confdefs.h. */
24122 #include <errno.h>
24123 #include <fcntl.h>
24124 #include <limits.h>
24125 #include <sys/resource.h>
24126 #include <unistd.h>
24127
24128
24129 $gl_mda_defines
24130
24131 #ifndef RLIM_SAVED_CUR
24132 # define RLIM_SAVED_CUR RLIM_INFINITY
24133 #endif
24134 #ifndef RLIM_SAVED_MAX
24135 # define RLIM_SAVED_MAX RLIM_INFINITY
24136 #endif
24137
24138 int
24139 main ()
24140 {
24141 int result = 0;
24142 int bad_fd = INT_MAX;
24143 struct rlimit rlim;
24144 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
24145 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
24146 && rlim.rlim_cur != RLIM_INFINITY
24147 && rlim.rlim_cur != RLIM_SAVED_MAX
24148 && rlim.rlim_cur != RLIM_SAVED_CUR)
24149 bad_fd = rlim.rlim_cur;
24150 if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
24151 if (errno != EINVAL) result |= 2;
24152 if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
24153 if (errno != EINVAL) result |= 8;
24154 /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */
24155 {
24156 int fd;
24157 fd = open (".", O_RDONLY);
24158 if (fd == -1)
24159 result |= 16;
24160 else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1)
24161 result |= 32;
24162
24163 close (fd);
24164 }
24165 return result;
24166 ;
24167 return 0;
24168 }
24169 _ACEOF
24170 if ac_fn_c_try_run "$LINENO"; then :
24171 gl_cv_func_fcntl_f_dupfd_works=yes
24172 else
24173 gl_cv_func_fcntl_f_dupfd_works=no
24174 fi
24175 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24176 conftest.$ac_objext conftest.beam conftest.$ac_ext
24177 fi
24178
24179 fi
24180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
24181 $as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
24182 case $gl_cv_func_fcntl_f_dupfd_works in
24183 *yes) ;;
24184 *)
24185
24186
24187 if test $ac_cv_func_fcntl = no; then
24188 HAVE_FCNTL=0
24189 else
24190 REPLACE_FCNTL=1
24191 fi
24192
24193
24194 $as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
24195 ;;
24196 esac
24197
24198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
24199 $as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
24200 if ${gl_cv_func_fcntl_f_dupfd_cloexec+:} false; then :
24201 $as_echo_n "(cached) " >&6
24202 else
24203 if test "$cross_compiling" = yes; then :
24204 case "$host_os" in
24205 # Guess no on NetBSD.
24206 netbsd*) gl_cv_func_fcntl_f_dupfd_cloexec="guessing no" ;;
24207 *) gl_cv_func_fcntl_f_dupfd_cloexec="$gl_cross_guess_normal" ;;
24208 esac
24209
24210 else
24211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24212 /* end confdefs.h. */
24213 #include <fcntl.h>
24214 #include <unistd.h>
24215 int main (int argc, char *argv[])
24216 {
24217 if (argc == 1)
24218 /* parent process */
24219 {
24220 if (fcntl (1, F_DUPFD_CLOEXEC, 10) < 0)
24221 return 1;
24222 return execl ("./conftest", "./conftest", "child", NULL);
24223 }
24224 else
24225 /* child process */
24226 return (fcntl (10, F_GETFL) < 0 ? 0 : 42);
24227 }
24228
24229
24230 _ACEOF
24231 if ac_fn_c_try_run "$LINENO"; then :
24232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24233 /* end confdefs.h. */
24234
24235 #ifdef __linux__
24236 /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
24237 it to support the semantics on older kernels that failed with EINVAL. */
24238 choke me
24239 #endif
24240
24241 int
24242 main ()
24243 {
24244
24245 ;
24246 return 0;
24247 }
24248 _ACEOF
24249 if ac_fn_c_try_compile "$LINENO"; then :
24250 gl_cv_func_fcntl_f_dupfd_cloexec=yes
24251 else
24252 gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
24253 fi
24254 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24255
24256 else
24257 gl_cv_func_fcntl_f_dupfd_cloexec=no
24258 fi
24259 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24260 conftest.$ac_objext conftest.beam conftest.$ac_ext
24261 fi
24262
24263
24264 fi
24265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
24266 $as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
24267 case "$gl_cv_func_fcntl_f_dupfd_cloexec" in
24268 *yes) ;;
24269 *)
24270
24271
24272 if test $ac_cv_func_fcntl = no; then
24273 HAVE_FCNTL=0
24274 else
24275 REPLACE_FCNTL=1
24276 fi
24277
24278 ;;
24279 esac
24280 fi
24281
24282
24283
24284
24285 if test $ac_cv_func_fchdir = no; then
24286 HAVE_FCHDIR=0
24287 fi
24288
24289 if test $HAVE_FCHDIR = 0; then
24290
24291
24292
24293 if test $ac_cv_func_fcntl = no; then
24294 HAVE_FCNTL=0
24295 else
24296 REPLACE_FCNTL=1
24297 fi
24298
24299 fi
24300
24301
24302
24303 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
24304 GL_COND_OBJ_FCNTL_TRUE=
24305 GL_COND_OBJ_FCNTL_FALSE='#'
24306 else
24307 GL_COND_OBJ_FCNTL_TRUE='#'
24308 GL_COND_OBJ_FCNTL_FALSE=
24309 fi
24310 :
24311 if test -z "${GL_COND_OBJ_FCNTL_TRUE}" && test -z "${GL_COND_OBJ_FCNTL_FALSE}"; then
24312 GL_COND_OBJ_FCNTL_TRUE='#'
24313 GL_COND_OBJ_FCNTL_FALSE='#'
24314 fi
24315
24316
24317
24318
24319
24320
24321
24322
24323
24324
24325 GL_GNULIB_FCNTL=1
24326
24327
24328
24329
24330
24331 $as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
24332
24333
24334
24335
24336
24337
24338
24339
24340
24341
24342
24343
24344 cat >>confdefs.h <<_ACEOF
24345 #define GNULIB_FD_SAFER_FLAG 1
24346 _ACEOF
24347
24348
24349
24350
24351
24352
24353
24354 ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
24355 #include <dirent.h>
24356
24357 "
24358 if test "x$ac_cv_have_decl_fdopendir" = xyes; then :
24359 ac_have_decl=1
24360 else
24361 ac_have_decl=0
24362 fi
24363
24364 cat >>confdefs.h <<_ACEOF
24365 #define HAVE_DECL_FDOPENDIR $ac_have_decl
24366 _ACEOF
24367 if test $ac_have_decl = 1; then :
24368
24369 else
24370 HAVE_DECL_FDOPENDIR=0
24371 fi
24372
24373
24374 if test $ac_cv_func_fdopendir = no; then
24375 HAVE_FDOPENDIR=0
24376 else
24377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
24378 $as_echo_n "checking whether fdopendir works... " >&6; }
24379 if ${gl_cv_func_fdopendir_works+:} false; then :
24380 $as_echo_n "(cached) " >&6
24381 else
24382 if test "$cross_compiling" = yes; then :
24383 case "$host_os" in
24384 # Guess yes on glibc systems.
24385 *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
24386 # Guess yes on musl systems.
24387 *-musl*) gl_cv_func_fdopendir_works="guessing yes" ;;
24388 # If we don't know, obey --enable-cross-guesses.
24389 *) gl_cv_func_fdopendir_works="$gl_cross_guess_normal" ;;
24390 esac
24391
24392 else
24393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24394 /* end confdefs.h. */
24395
24396 #include <dirent.h>
24397 #include <fcntl.h>
24398 #include <unistd.h>
24399
24400
24401 $gl_mda_defines
24402
24403 #if !HAVE_DECL_FDOPENDIR
24404 extern
24405 # ifdef __cplusplus
24406 "C"
24407 # endif
24408 DIR *fdopendir (int);
24409 #endif
24410
24411 int
24412 main ()
24413 {
24414 int result = 0;
24415 int fd = open ("conftest.c", O_RDONLY);
24416 if (fd < 0) result |= 1;
24417 if (fdopendir (fd)) result |= 2;
24418 if (close (fd)) result |= 4;
24419 return result;
24420
24421 ;
24422 return 0;
24423 }
24424 _ACEOF
24425 if ac_fn_c_try_run "$LINENO"; then :
24426 gl_cv_func_fdopendir_works=yes
24427 else
24428 gl_cv_func_fdopendir_works=no
24429 fi
24430 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24431 conftest.$ac_objext conftest.beam conftest.$ac_ext
24432 fi
24433
24434 fi
24435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
24436 $as_echo "$gl_cv_func_fdopendir_works" >&6; }
24437 case "$gl_cv_func_fdopendir_works" in
24438 *yes) ;;
24439 *)
24440 REPLACE_FDOPENDIR=1
24441 ;;
24442 esac
24443 fi
24444
24445
24446 if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
24447 GL_COND_OBJ_FDOPENDIR_TRUE=
24448 GL_COND_OBJ_FDOPENDIR_FALSE='#'
24449 else
24450 GL_COND_OBJ_FDOPENDIR_TRUE='#'
24451 GL_COND_OBJ_FDOPENDIR_FALSE=
24452 fi
24453 :
24454 if test -z "${GL_COND_OBJ_FDOPENDIR_TRUE}" && test -z "${GL_COND_OBJ_FDOPENDIR_FALSE}"; then
24455 GL_COND_OBJ_FDOPENDIR_TRUE='#'
24456 GL_COND_OBJ_FDOPENDIR_FALSE='#'
24457 fi
24458
24459
24460
24461
24462
24463
24464
24465
24466
24467
24468 GL_GNULIB_FDOPENDIR=1
24469
24470
24471
24472
24473
24474 $as_echo "#define GNULIB_TEST_FDOPENDIR 1" >>confdefs.h
24475
24476
24477
24478
24479
24480 cat >>confdefs.h <<_ACEOF
24481 #define GNULIB_FDOPENDIR 1
24482 _ACEOF
24483
24484
24485
24486
24487
24488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ffs" >&5
24489 $as_echo_n "checking for ffs... " >&6; }
24490 if ${gl_cv_func_ffs+:} false; then :
24491 $as_echo_n "(cached) " >&6
24492 else
24493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24494 /* end confdefs.h. */
24495 #include <strings.h>
24496 int x;
24497
24498 int
24499 main ()
24500 {
24501 int (*func) (int) = ffs;
24502 return func (x);
24503
24504 ;
24505 return 0;
24506 }
24507
24508 _ACEOF
24509 if ac_fn_c_try_link "$LINENO"; then :
24510 gl_cv_func_ffs=yes
24511 else
24512 gl_cv_func_ffs=no
24513 fi
24514 rm -f core conftest.err conftest.$ac_objext \
24515 conftest$ac_exeext conftest.$ac_ext
24516
24517 fi
24518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ffs" >&5
24519 $as_echo "$gl_cv_func_ffs" >&6; }
24520 if test $gl_cv_func_ffs = no; then
24521 HAVE_FFS=0
24522 fi
24523
24524
24525 if test $HAVE_FFS = 0; then
24526 GL_COND_OBJ_FFS_TRUE=
24527 GL_COND_OBJ_FFS_FALSE='#'
24528 else
24529 GL_COND_OBJ_FFS_TRUE='#'
24530 GL_COND_OBJ_FFS_FALSE=
24531 fi
24532 :
24533 if test -z "${GL_COND_OBJ_FFS_TRUE}" && test -z "${GL_COND_OBJ_FFS_FALSE}"; then
24534 GL_COND_OBJ_FFS_TRUE='#'
24535 GL_COND_OBJ_FFS_FALSE='#'
24536 fi
24537
24538
24539
24540
24541
24542
24543
24544
24545
24546
24547 GL_GNULIB_FFS=1
24548
24549
24550
24551
24552
24553
24554
24555
24556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
24557 $as_echo_n "checking for flexible array member... " >&6; }
24558 if ${ac_cv_c_flexmember+:} false; then :
24559 $as_echo_n "(cached) " >&6
24560 else
24561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24562 /* end confdefs.h. */
24563 #include <stdlib.h>
24564 #include <stdio.h>
24565 #include <stddef.h>
24566 struct m { struct m *next, **list; char name[]; };
24567 struct s { struct s *p; struct m *m; int n; double d[]; };
24568 int
24569 main ()
24570 {
24571 int m = getchar ();
24572 size_t nbytes = offsetof (struct s, d) + m * sizeof (double);
24573 nbytes += sizeof (struct s) - 1;
24574 nbytes -= nbytes % sizeof (struct s);
24575 struct s *p = malloc (nbytes);
24576 p->p = p;
24577 p->m = NULL;
24578 p->d[0] = 0.0;
24579 return p->d != (double *) NULL;
24580 ;
24581 return 0;
24582 }
24583 _ACEOF
24584 if ac_fn_c_try_compile "$LINENO"; then :
24585 ac_cv_c_flexmember=yes
24586 else
24587 ac_cv_c_flexmember=no
24588 fi
24589 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24590 fi
24591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
24592 $as_echo "$ac_cv_c_flexmember" >&6; }
24593 if test $ac_cv_c_flexmember = yes; then
24594
24595 $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
24596
24597 else
24598 $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
24599
24600 fi
24601
24602
24603
24604
24605 GL_GENERATE_FLOAT_H=false
24606 REPLACE_FLOAT_LDBL=0
24607 case "$host_os" in
24608 aix* | beos* | openbsd* | mirbsd* | irix*)
24609 GL_GENERATE_FLOAT_H=true
24610 ;;
24611 freebsd* | dragonfly*)
24612 case "$host_cpu" in
24613 i[34567]86 )
24614 GL_GENERATE_FLOAT_H=true
24615 ;;
24616 x86_64 )
24617 # On x86_64 systems, the C compiler may still be generating
24618 # 32-bit code.
24619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24620 /* end confdefs.h. */
24621 #if defined __LP64__ || defined __x86_64__ || defined __amd64__
24622 int ok;
24623 #else
24624 error fail
24625 #endif
24626
24627 _ACEOF
24628 if ac_fn_c_try_compile "$LINENO"; then :
24629
24630 else
24631 GL_GENERATE_FLOAT_H=true
24632 fi
24633 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24634 ;;
24635 esac
24636 ;;
24637 linux*)
24638 case "$host_cpu" in
24639 powerpc*)
24640 GL_GENERATE_FLOAT_H=true
24641 ;;
24642 esac
24643 ;;
24644 esac
24645 case "$host_os" in
24646 aix* | freebsd* | dragonfly* | linux*)
24647 if $GL_GENERATE_FLOAT_H; then
24648 REPLACE_FLOAT_LDBL=1
24649 fi
24650 ;;
24651 esac
24652
24653 REPLACE_ITOLD=0
24654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
24655 $as_echo_n "checking whether conversion from 'int' to 'long double' works... " >&6; }
24656 if ${gl_cv_func_itold_works+:} false; then :
24657 $as_echo_n "(cached) " >&6
24658 else
24659
24660 if test "$cross_compiling" = yes; then :
24661 case "$host" in
24662 sparc*-*-linux*)
24663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24664 /* end confdefs.h. */
24665 #if defined __LP64__ || defined __arch64__
24666 int ok;
24667 #else
24668 error fail
24669 #endif
24670
24671 _ACEOF
24672 if ac_fn_c_try_compile "$LINENO"; then :
24673 gl_cv_func_itold_works="guessing no"
24674 else
24675 gl_cv_func_itold_works="guessing yes"
24676 fi
24677 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24678 ;;
24679 # Guess yes on native Windows.
24680 mingw*) gl_cv_func_itold_works="guessing yes" ;;
24681 *) gl_cv_func_itold_works="guessing yes" ;;
24682 esac
24683
24684 else
24685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24686 /* end confdefs.h. */
24687
24688 int i = -1;
24689 volatile long double ld;
24690 int main ()
24691 {
24692 ld += i * 1.0L;
24693 if (ld > 0)
24694 return 1;
24695 return 0;
24696 }
24697 _ACEOF
24698 if ac_fn_c_try_run "$LINENO"; then :
24699 gl_cv_func_itold_works=yes
24700 else
24701 gl_cv_func_itold_works=no
24702 fi
24703 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24704 conftest.$ac_objext conftest.beam conftest.$ac_ext
24705 fi
24706
24707
24708 fi
24709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
24710 $as_echo "$gl_cv_func_itold_works" >&6; }
24711 case "$gl_cv_func_itold_works" in
24712 *no)
24713 REPLACE_ITOLD=1
24714 GL_GENERATE_FLOAT_H=true
24715 ;;
24716 esac
24717
24718 if $GL_GENERATE_FLOAT_H; then
24719
24720
24721
24722
24723
24724
24725
24726
24727 if test $gl_cv_have_include_next = yes; then
24728 gl_cv_next_float_h='<'float.h'>'
24729 else
24730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
24731 $as_echo_n "checking absolute name of <float.h>... " >&6; }
24732 if ${gl_cv_next_float_h+:} false; then :
24733 $as_echo_n "(cached) " >&6
24734 else
24735
24736
24737
24738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24739 /* end confdefs.h. */
24740 #include <float.h>
24741 _ACEOF
24742 case "$host_os" in
24743 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24744 *) gl_absname_cpp="$ac_cpp" ;;
24745 esac
24746
24747 case "$host_os" in
24748 mingw*)
24749 gl_dirsep_regex='[/\\]'
24750 ;;
24751 *)
24752 gl_dirsep_regex='\/'
24753 ;;
24754 esac
24755 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24756 gl_header_literal_regex=`echo 'float.h' \
24757 | sed -e "$gl_make_literal_regex_sed"`
24758 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24759 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24760 s|^/[^/]|//&|
24761 p
24762 q
24763 }'
24764
24765 gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24766 sed -n "$gl_absolute_header_sed"`
24767
24768 gl_header=$gl_cv_absolute_float_h
24769 gl_cv_next_float_h='"'$gl_header'"'
24770
24771
24772 fi
24773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
24774 $as_echo "$gl_cv_next_float_h" >&6; }
24775 fi
24776 NEXT_FLOAT_H=$gl_cv_next_float_h
24777
24778 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24779 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24780 gl_next_as_first_directive='<'float.h'>'
24781 else
24782 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24783 gl_next_as_first_directive=$gl_cv_next_float_h
24784 fi
24785 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
24786
24787
24788
24789
24790 fi
24791
24792
24793
24794
24795
24796
24797 case "$GL_GENERATE_FLOAT_H" in
24798 false) FLOAT_H='' ;;
24799 true)
24800 if test -z "$FLOAT_H"; then
24801 FLOAT_H="${gl_source_base_prefix}float.h"
24802 fi
24803 ;;
24804 *) echo "*** GL_GENERATE_FLOAT_H is not set correctly" 1>&2; exit 1 ;;
24805 esac
24806
24807
24808 if $GL_GENERATE_FLOAT_H; then
24809 GL_GENERATE_FLOAT_H_TRUE=
24810 GL_GENERATE_FLOAT_H_FALSE='#'
24811 else
24812 GL_GENERATE_FLOAT_H_TRUE='#'
24813 GL_GENERATE_FLOAT_H_FALSE=
24814 fi
24815 :
24816 if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
24817 GL_GENERATE_FLOAT_H_TRUE='#'
24818 GL_GENERATE_FLOAT_H_FALSE='#'
24819 fi
24820
24821
24822
24823
24824
24825
24826
24827 if test $REPLACE_FLOAT_LDBL = 1; then
24828 GL_COND_OBJ_FLOAT_TRUE=
24829 GL_COND_OBJ_FLOAT_FALSE='#'
24830 else
24831 GL_COND_OBJ_FLOAT_TRUE='#'
24832 GL_COND_OBJ_FLOAT_FALSE=
24833 fi
24834 :
24835 if test -z "${GL_COND_OBJ_FLOAT_TRUE}" && test -z "${GL_COND_OBJ_FLOAT_FALSE}"; then
24836 GL_COND_OBJ_FLOAT_TRUE='#'
24837 GL_COND_OBJ_FLOAT_FALSE='#'
24838 fi
24839
24840
24841 if test $REPLACE_ITOLD = 1; then
24842 GL_COND_OBJ_ITOLD_TRUE=
24843 GL_COND_OBJ_ITOLD_FALSE='#'
24844 else
24845 GL_COND_OBJ_ITOLD_TRUE='#'
24846 GL_COND_OBJ_ITOLD_FALSE=
24847 fi
24848 :
24849 if test -z "${GL_COND_OBJ_ITOLD_TRUE}" && test -z "${GL_COND_OBJ_ITOLD_FALSE}"; then
24850 GL_COND_OBJ_ITOLD_TRUE='#'
24851 GL_COND_OBJ_ITOLD_FALSE='#'
24852 fi
24853
24854
24855
24856
24857
24858 gl_fnmatch_required_lowercase=`
24859 echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]'
24860 `
24861
24862 if test $ac_cv_func_fnmatch = no; then
24863 HAVE_FNMATCH=0
24864 else
24865 gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}"
24866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5
24867 $as_echo_n "checking for working $gl_fnmatch_required fnmatch... " >&6; }
24868 if eval \${$gl_fnmatch_cache_var+:} false; then :
24869 $as_echo_n "(cached) " >&6
24870 else
24871 if test $gl_fnmatch_required = GNU; then
24872 gl_fnmatch_gnu_start=
24873 gl_fnmatch_gnu_end=
24874 else
24875 gl_fnmatch_gnu_start='#if 0'
24876 gl_fnmatch_gnu_end='#endif'
24877 fi
24878 if test "$cross_compiling" = yes; then :
24879 case "$host_os" in
24880 # Guess yes on musl systems.
24881 *-musl*) eval "$gl_fnmatch_cache_var=\"guessing yes\"" ;;
24882 # Guess no otherwise, even on glibc systems.
24883 *) eval "$gl_fnmatch_cache_var=\"guessing no\"" ;;
24884 esac
24885
24886 else
24887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24888 /* end confdefs.h. */
24889 #include <fnmatch.h>
24890 static int
24891 y (char const *pattern, char const *string, int flags)
24892 {
24893 return fnmatch (pattern, string, flags) == 0;
24894 }
24895 static int
24896 n (char const *pattern, char const *string, int flags)
24897 {
24898 return fnmatch (pattern, string, flags) == FNM_NOMATCH;
24899 }
24900
24901 int
24902 main ()
24903 {
24904 char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]";
24905 char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]";
24906 static char const A_1[] = { 'A' - 1, 0 };
24907 static char const A01[] = { 'A' + 1, 0 };
24908 static char const a_1[] = { 'a' - 1, 0 };
24909 static char const a01[] = { 'a' + 1, 0 };
24910 static char const bs_1[] = { '\\\\' - 1, 0 };
24911 static char const bs01[] = { '\\\\' + 1, 0 };
24912 int result = 0;
24913 if (!n ("a*", "", 0))
24914 return 1;
24915 if (!y ("a*", "abc", 0))
24916 return 1;
24917 if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */
24918 return 1;
24919 if (!n ("d*/*1", "d/s/1", FNM_PATHNAME))
24920 return 2;
24921 if (!y ("a\\\\bc", "abc", 0))
24922 return 3;
24923 if (!n ("a\\\\bc", "abc", FNM_NOESCAPE))
24924 return 3;
24925 if (!y ("*x", ".x", 0))
24926 return 4;
24927 if (!n ("*x", ".x", FNM_PERIOD))
24928 return 4;
24929 if (!y (Apat, "\\\\", 0))
24930 return 5;
24931 if (!y (Apat, "A", 0))
24932 return 5;
24933 if (!y (apat, "\\\\", 0))
24934 return 5;
24935 if (!y (apat, "a", 0))
24936 return 5;
24937 if (!(n (Apat, A_1, 0) == ('A' < '\\\\')))
24938 return 5;
24939 if (!(n (apat, a_1, 0) == ('a' < '\\\\')))
24940 return 5;
24941 if (!(y (Apat, A01, 0) == ('A' < '\\\\')))
24942 return 5;
24943 if (!(y (apat, a01, 0) == ('a' < '\\\\')))
24944 return 5;
24945 if (!(y (Apat, bs_1, 0) == ('A' < '\\\\')))
24946 return 5;
24947 if (!(y (apat, bs_1, 0) == ('a' < '\\\\')))
24948 return 5;
24949 if (!(n (Apat, bs01, 0) == ('A' < '\\\\')))
24950 return 5;
24951 if (!(n (apat, bs01, 0) == ('a' < '\\\\')))
24952 return 5;
24953 $gl_fnmatch_gnu_start
24954 if (!y ("xxXX", "xXxX", FNM_CASEFOLD))
24955 result |= 8;
24956 if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH))
24957 result |= 16;
24958 if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME))
24959 result |= 32;
24960 if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR))
24961 result |= 64;
24962 if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR))
24963 result |= 64;
24964 if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR))
24965 result |= 64;
24966 $gl_fnmatch_gnu_end
24967 return result;
24968
24969 ;
24970 return 0;
24971 }
24972 _ACEOF
24973 if ac_fn_c_try_run "$LINENO"; then :
24974 eval "$gl_fnmatch_cache_var=yes"
24975 else
24976 eval "$gl_fnmatch_cache_var=no"
24977 fi
24978 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24979 conftest.$ac_objext conftest.beam conftest.$ac_ext
24980 fi
24981
24982
24983 fi
24984 eval ac_res=\$$gl_fnmatch_cache_var
24985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
24986 $as_echo "$ac_res" >&6; }
24987 eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\""
24988 case "$gl_fnmatch_result" in
24989 *yes) ;;
24990 *) REPLACE_FNMATCH=1 ;;
24991 esac
24992 fi
24993 if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
24994
24995
24996
24997
24998
24999
25000 GL_GENERATE_FNMATCH_H=true
25001
25002 fi
25003
25004
25005
25006
25007
25008 case "$GL_GENERATE_FNMATCH_H" in
25009 false) FNMATCH_H='' ;;
25010 true)
25011 if test -z "$FNMATCH_H"; then
25012 FNMATCH_H="${gl_source_base_prefix}fnmatch.h"
25013 fi
25014 ;;
25015 *) echo "*** GL_GENERATE_FNMATCH_H is not set correctly" 1>&2; exit 1 ;;
25016 esac
25017
25018
25019 if $GL_GENERATE_FNMATCH_H; then
25020 GL_GENERATE_FNMATCH_H_TRUE=
25021 GL_GENERATE_FNMATCH_H_FALSE='#'
25022 else
25023 GL_GENERATE_FNMATCH_H_TRUE='#'
25024 GL_GENERATE_FNMATCH_H_FALSE=
25025 fi
25026 :
25027 if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
25028 GL_GENERATE_FNMATCH_H_TRUE='#'
25029 GL_GENERATE_FNMATCH_H_FALSE='#'
25030 fi
25031
25032
25033
25034
25035
25036 if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
25037
25038
25039
25040
25041
25042
25043
25044
25045 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
25046
25047
25048
25049
25050
25051 fi
25052
25053
25054
25055
25056
25057
25058
25059
25060
25061 GL_GNULIB_FNMATCH=1
25062
25063
25064
25065
25066
25067 $as_echo "#define GNULIB_TEST_FNMATCH 1" >>confdefs.h
25068
25069
25070
25071
25072
25073
25074
25075
25076 if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
25077
25078
25079
25080
25081
25082
25083
25084
25085 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
25086
25087
25088
25089
25090
25091 fi
25092
25093
25094 cat >>confdefs.h <<_ACEOF
25095 #define GNULIB_FNMATCH_GNU 1
25096 _ACEOF
25097
25098
25099
25100
25101
25102
25103
25104
25105
25106
25107
25108
25109 case "$GL_GENERATE_FNMATCH_H" in
25110 false) FNMATCH_H='' ;;
25111 true)
25112 if test -z "$FNMATCH_H"; then
25113 FNMATCH_H="${gl_source_base_prefix}fnmatch.h"
25114 fi
25115 ;;
25116 *) echo "*** GL_GENERATE_FNMATCH_H is not set correctly" 1>&2; exit 1 ;;
25117 esac
25118
25119
25120 if $GL_GENERATE_FNMATCH_H; then
25121 GL_GENERATE_FNMATCH_H_TRUE=
25122 GL_GENERATE_FNMATCH_H_FALSE='#'
25123 else
25124 GL_GENERATE_FNMATCH_H_TRUE='#'
25125 GL_GENERATE_FNMATCH_H_FALSE=
25126 fi
25127 :
25128 if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
25129 GL_GENERATE_FNMATCH_H_TRUE='#'
25130 GL_GENERATE_FNMATCH_H_FALSE='#'
25131 fi
25132
25133
25134
25135
25136
25137
25138
25139
25140
25141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether free is known to preserve errno" >&5
25142 $as_echo_n "checking whether free is known to preserve errno... " >&6; }
25143 if ${gl_cv_func_free_preserves_errno+:} false; then :
25144 $as_echo_n "(cached) " >&6
25145 else
25146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25147 /* end confdefs.h. */
25148 #include <stdlib.h>
25149
25150 int
25151 main ()
25152 {
25153 #if 2 < __GLIBC__ + (33 <= __GLIBC_MINOR__)
25154 #elif defined __OpenBSD__
25155 #elif defined __sun
25156 #else
25157 #error "'free' is not known to preserve errno"
25158 #endif
25159
25160 ;
25161 return 0;
25162 }
25163 _ACEOF
25164 if ac_fn_c_try_compile "$LINENO"; then :
25165 gl_cv_func_free_preserves_errno=yes
25166 else
25167 gl_cv_func_free_preserves_errno=no
25168 fi
25169 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25170
25171 fi
25172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_free_preserves_errno" >&5
25173 $as_echo "$gl_cv_func_free_preserves_errno" >&6; }
25174
25175 case $gl_cv_func_free_preserves_errno in
25176 *yes)
25177
25178 $as_echo "#define HAVE_FREE_POSIX 1" >>confdefs.h
25179
25180 ;;
25181 *) REPLACE_FREE=1 ;;
25182 esac
25183
25184
25185 if test $REPLACE_FREE = 1; then
25186 GL_COND_OBJ_FREE_TRUE=
25187 GL_COND_OBJ_FREE_FALSE='#'
25188 else
25189 GL_COND_OBJ_FREE_TRUE='#'
25190 GL_COND_OBJ_FREE_FALSE=
25191 fi
25192 :
25193 if test -z "${GL_COND_OBJ_FREE_TRUE}" && test -z "${GL_COND_OBJ_FREE_FALSE}"; then
25194 GL_COND_OBJ_FREE_TRUE='#'
25195 GL_COND_OBJ_FREE_FALSE='#'
25196 fi
25197
25198 if test -z "$GL_COND_OBJ_FREE_TRUE"; then :
25199
25200 :
25201
25202 fi
25203
25204
25205
25206
25207
25208
25209
25210
25211
25212 GL_GNULIB_FREE_POSIX=1
25213
25214
25215
25216
25217
25218 $as_echo "#define GNULIB_TEST_FREE_POSIX 1" >>confdefs.h
25219
25220
25221
25222
25223 if test $gl_func_frexp != yes; then
25224
25225
25226
25227
25228
25229
25230
25231
25232 gl_LIBOBJS="$gl_LIBOBJS frexp.$ac_objext"
25233
25234 fi
25235
25236
25237
25238
25239
25240
25241
25242
25243
25244 GL_GNULIB_FREXP=1
25245
25246
25247
25248
25249
25250 $as_echo "#define GNULIB_TEST_FREXP 1" >>confdefs.h
25251
25252
25253
25254
25255 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
25256
25257
25258
25259
25260
25261
25262
25263
25264 gl_LIBOBJS="$gl_LIBOBJS frexpl.$ac_objext"
25265
25266 fi
25267
25268
25269
25270
25271
25272
25273
25274
25275
25276 GL_GNULIB_FREXPL=1
25277
25278
25279
25280
25281
25282 $as_echo "#define GNULIB_TEST_FREXPL 1" >>confdefs.h
25283
25284
25285
25286
25287
25288
25289
25290 case "$host_os" in
25291 mingw* | solaris*)
25292 REPLACE_FSTAT=1
25293 ;;
25294 esac
25295
25296
25297
25298
25299
25300 if test $ac_cv_func_fchdir = no; then
25301 HAVE_FCHDIR=0
25302 fi
25303
25304 if test $HAVE_FCHDIR = 0; then
25305 case "$gl_cv_func_open_directory_works" in
25306 *yes) ;;
25307 *)
25308 REPLACE_FSTAT=1
25309 ;;
25310 esac
25311 fi
25312
25313
25314
25315 if test $REPLACE_FSTAT = 1; then
25316 GL_COND_OBJ_FSTAT_TRUE=
25317 GL_COND_OBJ_FSTAT_FALSE='#'
25318 else
25319 GL_COND_OBJ_FSTAT_TRUE='#'
25320 GL_COND_OBJ_FSTAT_FALSE=
25321 fi
25322 :
25323 if test -z "${GL_COND_OBJ_FSTAT_TRUE}" && test -z "${GL_COND_OBJ_FSTAT_FALSE}"; then
25324 GL_COND_OBJ_FSTAT_TRUE='#'
25325 GL_COND_OBJ_FSTAT_FALSE='#'
25326 fi
25327
25328 if test -z "$GL_COND_OBJ_FSTAT_TRUE"; then :
25329
25330 case "$host_os" in
25331 mingw*)
25332
25333
25334
25335
25336
25337
25338
25339
25340 gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
25341
25342 ;;
25343 esac
25344
25345
25346
25347 :
25348
25349
25350 fi
25351
25352
25353
25354
25355
25356
25357
25358
25359
25360 GL_GNULIB_FSTAT=1
25361
25362
25363
25364
25365
25366 $as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
25367
25368
25369
25370
25371
25372
25373
25374
25375
25376
25377 if test $ac_cv_func_fstatat = no; then
25378 HAVE_FSTATAT=0
25379 else
25380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
25381 $as_echo_n "checking whether fstatat (..., 0) works... " >&6; }
25382 if ${gl_cv_func_fstatat_zero_flag+:} false; then :
25383 $as_echo_n "(cached) " >&6
25384 else
25385 if test "$cross_compiling" = yes; then :
25386 case "$host_os" in
25387 aix*) gl_cv_func_fstatat_zero_flag="guessing no";;
25388 *) gl_cv_func_fstatat_zero_flag="guessing yes";;
25389 esac
25390
25391 else
25392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25393 /* end confdefs.h. */
25394
25395 #include <fcntl.h>
25396 #include <sys/stat.h>
25397 int
25398 main (void)
25399 {
25400 struct stat a;
25401 return fstatat (AT_FDCWD, ".", &a, 0) != 0;
25402 }
25403
25404 _ACEOF
25405 if ac_fn_c_try_run "$LINENO"; then :
25406 gl_cv_func_fstatat_zero_flag=yes
25407 else
25408 gl_cv_func_fstatat_zero_flag=no
25409 fi
25410 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25411 conftest.$ac_objext conftest.beam conftest.$ac_ext
25412 fi
25413
25414
25415 fi
25416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
25417 $as_echo "$gl_cv_func_fstatat_zero_flag" >&6; }
25418
25419 case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
25420 *yes+*yes) ;;
25421 *) REPLACE_FSTATAT=1 ;;
25422 esac
25423
25424 case $host_os in
25425 solaris*)
25426 REPLACE_FSTATAT=1 ;;
25427 esac
25428
25429 case $REPLACE_FSTATAT,$gl_cv_func_fstatat_zero_flag in
25430 1,*yes)
25431
25432 $as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
25433
25434 ;;
25435 esac
25436 fi
25437
25438
25439 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
25440 GL_COND_OBJ_FSTATAT_TRUE=
25441 GL_COND_OBJ_FSTATAT_FALSE='#'
25442 else
25443 GL_COND_OBJ_FSTATAT_TRUE='#'
25444 GL_COND_OBJ_FSTATAT_FALSE=
25445 fi
25446 :
25447 if test -z "${GL_COND_OBJ_FSTATAT_TRUE}" && test -z "${GL_COND_OBJ_FSTATAT_FALSE}"; then
25448 GL_COND_OBJ_FSTATAT_TRUE='#'
25449 GL_COND_OBJ_FSTATAT_FALSE='#'
25450 fi
25451
25452
25453
25454
25455
25456
25457
25458
25459
25460
25461 GL_GNULIB_FSTATAT=1
25462
25463
25464
25465
25466
25467 $as_echo "#define GNULIB_TEST_FSTATAT 1" >>confdefs.h
25468
25469
25470
25471
25472
25473
25474
25475
25476 gl_abort_bug=no
25477 case "$host_os" in
25478 mingw*)
25479 gl_cv_func_getcwd_path_max=yes
25480 ;;
25481 *)
25482
25483
25484
25485
25486
25487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd handles long file names properly" >&5
25488 $as_echo_n "checking whether getcwd handles long file names properly... " >&6; }
25489 if ${gl_cv_func_getcwd_path_max+:} false; then :
25490 $as_echo_n "(cached) " >&6
25491 else
25492 # Arrange for deletion of the temporary directory this test creates.
25493 ac_clean_files="$ac_clean_files confdir3"
25494 if test "$cross_compiling" = yes; then :
25495 # Cross-compilation guesses:
25496 case "$host_os" in
25497 aix*) # On AIX, it has the AIX bug.
25498 gl_cv_func_getcwd_path_max='guessing no, it has the AIX bug' ;;
25499 gnu*) # On Hurd, it is 'yes'.
25500 gl_cv_func_getcwd_path_max='guessing yes' ;;
25501 linux* | kfreebsd*)
25502 # On older Linux+glibc it's 'no, but it is partly working',
25503 # on newer Linux+glibc it's 'yes'.
25504 # On Linux+musl libc, it's 'no, but it is partly working'.
25505 # On kFreeBSD+glibc, it's 'no, but it is partly working'.
25506 gl_cv_func_getcwd_path_max='guessing no, but it is partly working' ;;
25507 *) # If we don't know, obey --enable-cross-guesses.
25508 gl_cv_func_getcwd_path_max="$gl_cross_guess_normal" ;;
25509 esac
25510
25511 else
25512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25513 /* end confdefs.h. */
25514
25515 #include <errno.h>
25516 #include <stdlib.h>
25517 #if HAVE_UNISTD_H
25518 # include <unistd.h>
25519 #else
25520 # include <direct.h>
25521 #endif
25522 #include <string.h>
25523 #include <limits.h>
25524 #include <sys/stat.h>
25525 #include <sys/types.h>
25526 #include <fcntl.h>
25527
25528
25529 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
25530 #if HAVE_UNISTD_H
25531 # include <unistd.h>
25532 #endif
25533 #include <limits.h>
25534 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
25535 # include <sys/param.h>
25536 #endif
25537 #if !defined PATH_MAX && defined MAXPATHLEN
25538 # define PATH_MAX MAXPATHLEN
25539 #endif
25540 #ifdef __hpux
25541 # undef PATH_MAX
25542 # define PATH_MAX 1024
25543 #endif
25544 #if defined _WIN32 && ! defined __CYGWIN__
25545 # undef PATH_MAX
25546 # define PATH_MAX 260
25547 #endif
25548
25549
25550 #ifndef AT_FDCWD
25551 # define AT_FDCWD 0
25552 #endif
25553 #ifdef ENAMETOOLONG
25554 # define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG)
25555 #else
25556 # define is_ENAMETOOLONG(x) 0
25557 #endif
25558
25559 /* Use the getcwd function, not any macro. */
25560 #undef getcwd
25561
25562
25563
25564 $gl_mda_defines
25565
25566
25567 #ifndef S_IRWXU
25568 # define S_IRWXU 0700
25569 #endif
25570
25571 /* The length of this name must be 8. */
25572 #define DIR_NAME "confdir3"
25573 #define DIR_NAME_LEN 8
25574 #define DIR_NAME_SIZE (DIR_NAME_LEN + 1)
25575
25576 /* The length of "../". */
25577 #define DOTDOTSLASH_LEN 3
25578
25579 /* Leftover bytes in the buffer, to work around library or OS bugs. */
25580 #define BUF_SLOP 20
25581
25582 int
25583 main ()
25584 {
25585 #ifndef PATH_MAX
25586 /* The Hurd doesn't define this, so getcwd can't exhibit the bug --
25587 at least not on a local file system. And if we were to start worrying
25588 about remote file systems, we'd have to enable the wrapper function
25589 all of the time, just to be safe. That's not worth the cost. */
25590 exit (0);
25591 #elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \
25592 - DIR_NAME_SIZE - BUF_SLOP) \
25593 <= PATH_MAX)
25594 /* FIXME: Assuming there's a system for which this is true,
25595 this should be done in a compile test. */
25596 exit (0);
25597 #else
25598 char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1)
25599 + DIR_NAME_SIZE + BUF_SLOP];
25600 char *cwd = getcwd (buf, PATH_MAX);
25601 size_t initial_cwd_len;
25602 size_t cwd_len;
25603 int fail = 0;
25604 size_t n_chdirs = 0;
25605
25606 if (cwd == NULL)
25607 exit (10);
25608
25609 cwd_len = initial_cwd_len = strlen (cwd);
25610
25611 while (1)
25612 {
25613 size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN);
25614 char *c = NULL;
25615
25616 cwd_len += DIR_NAME_SIZE;
25617 /* If mkdir or chdir fails, it could be that this system cannot create
25618 any file with an absolute name longer than PATH_MAX, such as cygwin.
25619 If so, leave fail as 0, because the current working directory can't
25620 be too long for getcwd if it can't even be created. On Linux with
25621 the 9p file system, mkdir fails with error EINVAL when cwd_len gets
25622 too long; ignore this failure because the getcwd() system call
25623 produces good results whereas the gnulib substitute calls getdents64
25624 which fails with error EPROTO.
25625 For other errors, be pessimistic and consider that as a failure,
25626 too. */
25627 if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0)
25628 {
25629 if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
25630 #ifdef __linux__
25631 if (! (errno == EINVAL))
25632 #endif
25633 fail = 20;
25634 break;
25635 }
25636
25637 if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE)
25638 {
25639 struct stat sb;
25640
25641 c = getcwd (buf, PATH_MAX);
25642 if (!c && errno == ENOENT)
25643 {
25644 fail = 11;
25645 break;
25646 }
25647 if (c)
25648 {
25649 fail = 31;
25650 break;
25651 }
25652 if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
25653 {
25654 fail = 21;
25655 break;
25656 }
25657
25658 /* Our replacement needs to be able to stat() long ../../paths,
25659 so generate a path larger than PATH_MAX to check,
25660 avoiding the replacement if we can't stat(). */
25661 c = getcwd (buf, cwd_len + 1);
25662 if (c && !AT_FDCWD && stat (c, &sb) != 0 && is_ENAMETOOLONG (errno))
25663 {
25664 fail = 32;
25665 break;
25666 }
25667 }
25668
25669 if (dotdot_max <= cwd_len - initial_cwd_len)
25670 {
25671 if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len)
25672 break;
25673 c = getcwd (buf, cwd_len + 1);
25674 if (!c)
25675 {
25676 if (! (errno == ERANGE || errno == ENOENT
25677 || is_ENAMETOOLONG (errno)))
25678 {
25679 fail = 22;
25680 break;
25681 }
25682 if (AT_FDCWD || errno == ERANGE || errno == ENOENT)
25683 {
25684 fail = 12;
25685 break;
25686 }
25687 }
25688 }
25689
25690 if (c && strlen (c) != cwd_len)
25691 {
25692 fail = 23;
25693 break;
25694 }
25695 ++n_chdirs;
25696 }
25697
25698 /* Leaving behind such a deep directory is not polite.
25699 So clean up here, right away, even though the driving
25700 shell script would also clean up. */
25701 {
25702 size_t i;
25703
25704 /* Try rmdir first, in case the chdir failed. */
25705 rmdir (DIR_NAME);
25706 for (i = 0; i <= n_chdirs; i++)
25707 {
25708 if (chdir ("..") < 0)
25709 break;
25710 if (rmdir (DIR_NAME) != 0)
25711 break;
25712 }
25713 }
25714
25715 exit (fail);
25716 #endif
25717 }
25718
25719 _ACEOF
25720 if ac_fn_c_try_run "$LINENO"; then :
25721 gl_cv_func_getcwd_path_max=yes
25722 else
25723 case $? in
25724 10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';;
25725 31) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
25726 32) gl_cv_func_getcwd_path_max='yes, but with shorter paths';;
25727 *) gl_cv_func_getcwd_path_max=no;;
25728 esac
25729 fi
25730 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25731 conftest.$ac_objext conftest.beam conftest.$ac_ext
25732 fi
25733
25734
25735 fi
25736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_path_max" >&5
25737 $as_echo "$gl_cv_func_getcwd_path_max" >&6; }
25738
25739 case "$gl_cv_func_getcwd_null" in
25740 *yes)
25741
25742
25743
25744
25745
25746
25747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
25748 $as_echo_n "checking for getpagesize... " >&6; }
25749 if ${gl_cv_func_getpagesize+:} false; then :
25750 $as_echo_n "(cached) " >&6
25751 else
25752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25753 /* end confdefs.h. */
25754 #include <unistd.h>
25755 int
25756 main ()
25757 {
25758 return getpagesize();
25759 ;
25760 return 0;
25761 }
25762
25763 _ACEOF
25764 if ac_fn_c_try_link "$LINENO"; then :
25765 gl_cv_func_getpagesize=yes
25766 else
25767 gl_cv_func_getpagesize=no
25768 fi
25769 rm -f core conftest.err conftest.$ac_objext \
25770 conftest$ac_exeext conftest.$ac_ext
25771
25772 fi
25773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getpagesize" >&5
25774 $as_echo "$gl_cv_func_getpagesize" >&6; }
25775
25776 if test $gl_cv_func_getpagesize = yes; then
25777
25778 cat >>confdefs.h <<_ACEOF
25779 #define HAVE_GETPAGESIZE 1
25780 _ACEOF
25781
25782 fi
25783
25784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd succeeds when 4k < cwd_length < 16k" >&5
25785 $as_echo_n "checking whether getcwd succeeds when 4k < cwd_length < 16k... " >&6; }
25786 if ${gl_cv_func_getcwd_succeeds_beyond_4k+:} false; then :
25787 $as_echo_n "(cached) " >&6
25788 else
25789 # Remove any remnants of a previous test.
25790 rm -rf confdir-14B---
25791 # Arrange for deletion of the temporary directory this test creates.
25792 ac_clean_files="$ac_clean_files confdir-14B---"
25793 if test "$cross_compiling" = yes; then :
25794 case "$host_os" in
25795 # Guess no otherwise, even on glibc systems and musl systems.
25796 *) gl_cv_func_getcwd_succeeds_beyond_4k="guessing no"
25797 esac
25798
25799 else
25800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25801 /* end confdefs.h. */
25802
25803 #include <errno.h>
25804 #include <stdlib.h>
25805 #if HAVE_UNISTD_H
25806 # include <unistd.h>
25807 #else /* on Windows with MSVC */
25808 # include <direct.h>
25809 #endif
25810 #include <string.h>
25811 #include <sys/stat.h>
25812
25813
25814 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
25815 #if HAVE_UNISTD_H
25816 # include <unistd.h>
25817 #endif
25818 #include <limits.h>
25819 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
25820 # include <sys/param.h>
25821 #endif
25822 #if !defined PATH_MAX && defined MAXPATHLEN
25823 # define PATH_MAX MAXPATHLEN
25824 #endif
25825 #ifdef __hpux
25826 # undef PATH_MAX
25827 # define PATH_MAX 1024
25828 #endif
25829 #if defined _WIN32 && ! defined __CYGWIN__
25830 # undef PATH_MAX
25831 # define PATH_MAX 260
25832 #endif
25833
25834
25835
25836 $gl_mda_defines
25837
25838
25839 #ifndef S_IRWXU
25840 # define S_IRWXU 0700
25841 #endif
25842
25843 /* FIXME: skip the run-test altogether on systems without getpagesize. */
25844 #if ! HAVE_GETPAGESIZE
25845 # define getpagesize() 0
25846 #endif
25847
25848 /* This size is chosen to be larger than PATH_MAX (4k), yet smaller than
25849 the 16kB pagesize on ia64 linux. Those conditions make the code below
25850 trigger a bug in glibc's getcwd implementation before 2.4.90-10. */
25851 #define TARGET_LEN (5 * 1024)
25852
25853 int
25854 main ()
25855 {
25856 char *cwd;
25857 size_t initial_cwd_len;
25858 int fail = 0;
25859
25860 /* The bug is triggered when PATH_MAX < getpagesize (), so skip
25861 this relatively expensive and invasive test if that's not true. */
25862 #ifdef PATH_MAX
25863 int bug_possible = PATH_MAX < getpagesize ();
25864 #else
25865 int bug_possible = 0;
25866 #endif
25867 if (! bug_possible)
25868 return 0;
25869
25870 cwd = getcwd (NULL, 0);
25871 if (cwd == NULL)
25872 return 2;
25873
25874 initial_cwd_len = strlen (cwd);
25875 free (cwd);
25876
25877 if (1)
25878 {
25879 static char const dir_name[] = "confdir-14B---";
25880 size_t desired_depth = ((TARGET_LEN - 1 - initial_cwd_len)
25881 / sizeof dir_name);
25882 size_t d;
25883 for (d = 0; d < desired_depth; d++)
25884 {
25885 if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0)
25886 {
25887 if (! (errno == ERANGE || errno == ENAMETOOLONG
25888 || errno == ENOENT))
25889 fail = 3; /* Unable to construct deep hierarchy. */
25890 break;
25891 }
25892 }
25893
25894 /* If libc has the bug in question, this invocation of getcwd
25895 results in a failed assertion. */
25896 cwd = getcwd (NULL, 0);
25897 if (cwd == NULL)
25898 fail = 4; /* getcwd didn't assert, but it failed for a long name
25899 where the answer could have been learned. */
25900 free (cwd);
25901
25902 /* Call rmdir first, in case the above chdir failed. */
25903 rmdir (dir_name);
25904 while (0 < d--)
25905 {
25906 if (chdir ("..") < 0)
25907 {
25908 fail = 5;
25909 break;
25910 }
25911 rmdir (dir_name);
25912 }
25913 }
25914
25915 return fail;
25916 }
25917
25918 _ACEOF
25919 if ac_fn_c_try_run "$LINENO"; then :
25920 gl_cv_func_getcwd_succeeds_beyond_4k=yes
25921 else
25922 ret=$?
25923 if test $ret -ge 128 || test $ret = 4; then
25924 gl_cv_func_getcwd_succeeds_beyond_4k=no
25925 else
25926 gl_cv_func_getcwd_succeeds_beyond_4k=yes
25927 fi
25928
25929 fi
25930 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25931 conftest.$ac_objext conftest.beam conftest.$ac_ext
25932 fi
25933
25934
25935 fi
25936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_succeeds_beyond_4k" >&5
25937 $as_echo "$gl_cv_func_getcwd_succeeds_beyond_4k" >&6; }
25938 case "$gl_cv_func_getcwd_succeeds_beyond_4k" in
25939 *no)
25940 gl_abort_bug=yes
25941 ;;
25942 *)
25943
25944 ;;
25945 esac
25946
25947 ;;
25948 esac
25949 ;;
25950 esac
25951 case "$gl_cv_func_getcwd_path_max" in
25952 *"no" | *"no, it has the AIX bug") ;;
25953 *)
25954
25955 $as_echo "#define HAVE_MINIMALLY_WORKING_GETCWD 1" >>confdefs.h
25956
25957 ;;
25958 esac
25959 case "$gl_cv_func_getcwd_path_max" in
25960 *"no, but it is partly working")
25961
25962 $as_echo "#define HAVE_PARTLY_WORKING_GETCWD 1" >>confdefs.h
25963
25964 ;;
25965 *"yes, but with shorter paths")
25966
25967 $as_echo "#define HAVE_GETCWD_SHORTER 1" >>confdefs.h
25968
25969 ;;
25970 esac
25971
25972 if { case "$gl_cv_func_getcwd_null" in *yes) false;; *) true;; esac; } \
25973 || test $gl_cv_func_getcwd_posix_signature != yes \
25974 || { case "$gl_cv_func_getcwd_path_max" in *yes*) false;; *) true;; esac; } \
25975 || test $gl_abort_bug = yes; then
25976 REPLACE_GETCWD=1
25977 fi
25978
25979
25980 if test $REPLACE_GETCWD = 1; then
25981 GL_COND_OBJ_GETCWD_TRUE=
25982 GL_COND_OBJ_GETCWD_FALSE='#'
25983 else
25984 GL_COND_OBJ_GETCWD_TRUE='#'
25985 GL_COND_OBJ_GETCWD_FALSE=
25986 fi
25987 :
25988 if test -z "${GL_COND_OBJ_GETCWD_TRUE}" && test -z "${GL_COND_OBJ_GETCWD_FALSE}"; then
25989 GL_COND_OBJ_GETCWD_TRUE='#'
25990 GL_COND_OBJ_GETCWD_FALSE='#'
25991 fi
25992
25993 if test -z "$GL_COND_OBJ_GETCWD_TRUE"; then :
25994
25995
25996
25997
25998 :
25999
26000
26001 fi
26002
26003
26004 cat >>confdefs.h <<_ACEOF
26005 #define GNULIB_GETCWD 1
26006 _ACEOF
26007
26008
26009
26010
26011
26012
26013
26014
26015
26016
26017
26018 GL_GNULIB_GETCWD=1
26019
26020
26021
26022
26023
26024 $as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
26025
26026
26027
26028
26029
26030
26031
26032
26033 case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
26034 *yes,yes) ;;
26035 *)
26036 REPLACE_GETCWD=1
26037 ;;
26038 esac
26039
26040
26041 if test $REPLACE_GETCWD = 1; then
26042 GL_COND_OBJ_GETCWD_LGPL_TRUE=
26043 GL_COND_OBJ_GETCWD_LGPL_FALSE='#'
26044 else
26045 GL_COND_OBJ_GETCWD_LGPL_TRUE='#'
26046 GL_COND_OBJ_GETCWD_LGPL_FALSE=
26047 fi
26048 :
26049 if test -z "${GL_COND_OBJ_GETCWD_LGPL_TRUE}" && test -z "${GL_COND_OBJ_GETCWD_LGPL_FALSE}"; then
26050 GL_COND_OBJ_GETCWD_LGPL_TRUE='#'
26051 GL_COND_OBJ_GETCWD_LGPL_FALSE='#'
26052 fi
26053
26054
26055
26056
26057
26058
26059
26060
26061
26062
26063 GL_GNULIB_GETCWD=1
26064
26065
26066
26067
26068
26069 $as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
26070
26071
26072
26073
26074
26075
26076
26077
26078
26079
26080
26081 if test $ac_cv_func_getdelim = yes; then
26082 HAVE_GETDELIM=1
26083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getdelim function" >&5
26084 $as_echo_n "checking for working getdelim function... " >&6; }
26085 if ${gl_cv_func_working_getdelim+:} false; then :
26086 $as_echo_n "(cached) " >&6
26087 else
26088 echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
26089 if test "$cross_compiling" = yes; then :
26090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26091 /* end confdefs.h. */
26092
26093 #include <features.h>
26094 #ifdef __GNU_LIBRARY__
26095 #if (__GLIBC__ >= 2) && !defined __UCLIBC__
26096 Lucky GNU user
26097 #endif
26098 #endif
26099
26100 _ACEOF
26101 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26102 $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
26103 gl_cv_func_working_getdelim="guessing yes"
26104 else
26105 case "$host_os" in
26106 *-musl*) gl_cv_func_working_getdelim="guessing yes" ;;
26107 *) gl_cv_func_working_getdelim="$gl_cross_guess_normal" ;;
26108 esac
26109
26110 fi
26111 rm -f conftest*
26112
26113
26114 else
26115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26116 /* end confdefs.h. */
26117
26118 # include <stdio.h>
26119 # include <stdlib.h>
26120 # include <string.h>
26121 int main ()
26122 {
26123 FILE *in = fopen ("./conftest.data", "r");
26124 if (!in)
26125 return 1;
26126 {
26127 /* Test result for a NULL buffer and a zero size.
26128 Based on a test program from Karl Heuer. */
26129 char *line = NULL;
26130 size_t siz = 0;
26131 int len = getdelim (&line, &siz, '\n', in);
26132 if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
26133 { free (line); fclose (in); return 2; }
26134 free (line);
26135 }
26136 {
26137 /* Test result for a NULL buffer and a non-zero size.
26138 This crashes on FreeBSD 8.0. */
26139 char *line = NULL;
26140 size_t siz = (size_t)(~0) / 4;
26141 if (getdelim (&line, &siz, '\n', in) == -1)
26142 { fclose (in); return 3; }
26143 free (line);
26144 }
26145 fclose (in);
26146 return 0;
26147 }
26148
26149 _ACEOF
26150 if ac_fn_c_try_run "$LINENO"; then :
26151 gl_cv_func_working_getdelim=yes
26152 else
26153 gl_cv_func_working_getdelim=no
26154 fi
26155 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26156 conftest.$ac_objext conftest.beam conftest.$ac_ext
26157 fi
26158
26159
26160 fi
26161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_getdelim" >&5
26162 $as_echo "$gl_cv_func_working_getdelim" >&6; }
26163 case "$gl_cv_func_working_getdelim" in
26164 *yes) ;;
26165 *) REPLACE_GETDELIM=1 ;;
26166 esac
26167 else
26168 HAVE_GETDELIM=0
26169 fi
26170
26171 if test $ac_cv_have_decl_getdelim = no; then
26172 HAVE_DECL_GETDELIM=0
26173 fi
26174
26175
26176 if test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1; then
26177 GL_COND_OBJ_GETDELIM_TRUE=
26178 GL_COND_OBJ_GETDELIM_FALSE='#'
26179 else
26180 GL_COND_OBJ_GETDELIM_TRUE='#'
26181 GL_COND_OBJ_GETDELIM_FALSE=
26182 fi
26183 :
26184 if test -z "${GL_COND_OBJ_GETDELIM_TRUE}" && test -z "${GL_COND_OBJ_GETDELIM_FALSE}"; then
26185 GL_COND_OBJ_GETDELIM_TRUE='#'
26186 GL_COND_OBJ_GETDELIM_FALSE='#'
26187 fi
26188
26189 if test -z "$GL_COND_OBJ_GETDELIM_TRUE"; then :
26190
26191
26192 for ac_func in flockfile funlockfile
26193 do :
26194 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
26195 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
26196 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
26197 cat >>confdefs.h <<_ACEOF
26198 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
26199 _ACEOF
26200
26201 fi
26202 done
26203
26204 ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
26205 if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
26206 ac_have_decl=1
26207 else
26208 ac_have_decl=0
26209 fi
26210
26211 cat >>confdefs.h <<_ACEOF
26212 #define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
26213 _ACEOF
26214
26215
26216
26217 fi
26218
26219
26220
26221
26222
26223
26224
26225
26226
26227 GL_GNULIB_GETDELIM=1
26228
26229
26230
26231
26232
26233 $as_echo "#define GNULIB_TEST_GETDELIM 1" >>confdefs.h
26234
26235
26236
26237
26238
26239
26240
26241
26242 if test $ac_cv_func_getdtablesize = yes &&
26243 test $ac_cv_have_decl_getdtablesize = yes; then
26244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
26245 $as_echo_n "checking whether getdtablesize works... " >&6; }
26246 if ${gl_cv_func_getdtablesize_works+:} false; then :
26247 $as_echo_n "(cached) " >&6
26248 else
26249 case "$host_os" in
26250 vms*) gl_cv_func_getdtablesize_works="no (limitation)" ;;
26251 *)
26252 if test "$cross_compiling" = yes; then :
26253 case "$host_os" in
26254 cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
26255 gl_cv_func_getdtablesize_works="guessing no" ;;
26256 *) gl_cv_func_getdtablesize_works="guessing yes" ;;
26257 esac
26258
26259 else
26260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26261 /* end confdefs.h. */
26262
26263 #include <unistd.h>
26264
26265
26266 $gl_mda_defines
26267
26268
26269 int
26270 main ()
26271 {
26272 int size = getdtablesize();
26273 if (dup2 (0, getdtablesize()) != -1)
26274 return 1;
26275 if (size != getdtablesize())
26276 return 2;
26277
26278 ;
26279 return 0;
26280 }
26281 _ACEOF
26282 if ac_fn_c_try_run "$LINENO"; then :
26283 gl_cv_func_getdtablesize_works=yes
26284 else
26285 gl_cv_func_getdtablesize_works=no
26286 fi
26287 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26288 conftest.$ac_objext conftest.beam conftest.$ac_ext
26289 fi
26290
26291 ;;
26292 esac
26293
26294 fi
26295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
26296 $as_echo "$gl_cv_func_getdtablesize_works" >&6; }
26297 case "$gl_cv_func_getdtablesize_works" in
26298 *yes | "no (limitation)") ;;
26299 *) REPLACE_GETDTABLESIZE=1 ;;
26300 esac
26301 else
26302 HAVE_GETDTABLESIZE=0
26303 fi
26304
26305
26306 if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
26307 GL_COND_OBJ_GETDTABLESIZE_TRUE=
26308 GL_COND_OBJ_GETDTABLESIZE_FALSE='#'
26309 else
26310 GL_COND_OBJ_GETDTABLESIZE_TRUE='#'
26311 GL_COND_OBJ_GETDTABLESIZE_FALSE=
26312 fi
26313 :
26314 if test -z "${GL_COND_OBJ_GETDTABLESIZE_TRUE}" && test -z "${GL_COND_OBJ_GETDTABLESIZE_FALSE}"; then
26315 GL_COND_OBJ_GETDTABLESIZE_TRUE='#'
26316 GL_COND_OBJ_GETDTABLESIZE_FALSE='#'
26317 fi
26318
26319 if test -z "$GL_COND_OBJ_GETDTABLESIZE_TRUE"; then :
26320
26321 :
26322
26323 fi
26324
26325
26326
26327
26328
26329
26330
26331
26332
26333 GL_GNULIB_GETDTABLESIZE=1
26334
26335
26336
26337
26338
26339 $as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
26340
26341
26342
26343
26344
26345
26346
26347
26348
26349
26350 gl_getline_needs_run_time_check=no
26351 ac_fn_c_check_func "$LINENO" "getline" "ac_cv_func_getline"
26352 if test "x$ac_cv_func_getline" = xyes; then :
26353 gl_getline_needs_run_time_check=yes
26354 else
26355 am_cv_func_working_getline=no
26356 fi
26357
26358 if test $gl_getline_needs_run_time_check = yes; then
26359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getline function" >&5
26360 $as_echo_n "checking for working getline function... " >&6; }
26361 if ${am_cv_func_working_getline+:} false; then :
26362 $as_echo_n "(cached) " >&6
26363 else
26364 echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
26365 if test "$cross_compiling" = yes; then :
26366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26367 /* end confdefs.h. */
26368
26369 #include <features.h>
26370 #ifdef __GNU_LIBRARY__
26371 #if (__GLIBC__ >= 2) && !defined __UCLIBC__
26372 Lucky GNU user
26373 #endif
26374 #endif
26375
26376 _ACEOF
26377 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26378 $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
26379 am_cv_func_working_getline="guessing yes"
26380 else
26381 case "$host_os" in
26382 *-musl*) am_cv_func_working_getline="guessing yes" ;;
26383 *) am_cv_func_working_getline="$gl_cross_guess_normal" ;;
26384 esac
26385
26386 fi
26387 rm -f conftest*
26388
26389
26390 else
26391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26392 /* end confdefs.h. */
26393
26394 # include <stdio.h>
26395 # include <stdlib.h>
26396 # include <string.h>
26397 int main ()
26398 {
26399 FILE *in = fopen ("./conftest.data", "r");
26400 if (!in)
26401 return 1;
26402 {
26403 /* Test result for a NULL buffer and a zero size.
26404 Based on a test program from Karl Heuer. */
26405 char *line = NULL;
26406 size_t siz = 0;
26407 int len = getline (&line, &siz, in);
26408 if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
26409 { free (line); fclose (in); return 2; }
26410 free (line);
26411 }
26412 {
26413 /* Test result for a NULL buffer and a non-zero size.
26414 This crashes on FreeBSD 8.0. */
26415 char *line = NULL;
26416 size_t siz = (size_t)(~0) / 4;
26417 if (getline (&line, &siz, in) == -1)
26418 { fclose (in); return 3; }
26419 free (line);
26420 }
26421 fclose (in);
26422 return 0;
26423 }
26424
26425 _ACEOF
26426 if ac_fn_c_try_run "$LINENO"; then :
26427 am_cv_func_working_getline=yes
26428 else
26429 am_cv_func_working_getline=no
26430 fi
26431 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26432 conftest.$ac_objext conftest.beam conftest.$ac_ext
26433 fi
26434
26435
26436 fi
26437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_working_getline" >&5
26438 $as_echo "$am_cv_func_working_getline" >&6; }
26439 fi
26440
26441 if test $ac_cv_have_decl_getline = no; then
26442 HAVE_DECL_GETLINE=0
26443 fi
26444
26445 case "$am_cv_func_working_getline" in
26446 *yes) ;;
26447 *)
26448 REPLACE_GETLINE=1
26449 ;;
26450 esac
26451
26452
26453 if test $REPLACE_GETLINE = 1; then
26454 GL_COND_OBJ_GETLINE_TRUE=
26455 GL_COND_OBJ_GETLINE_FALSE='#'
26456 else
26457 GL_COND_OBJ_GETLINE_TRUE='#'
26458 GL_COND_OBJ_GETLINE_FALSE=
26459 fi
26460 :
26461 if test -z "${GL_COND_OBJ_GETLINE_TRUE}" && test -z "${GL_COND_OBJ_GETLINE_FALSE}"; then
26462 GL_COND_OBJ_GETLINE_TRUE='#'
26463 GL_COND_OBJ_GETLINE_FALSE='#'
26464 fi
26465
26466 if test -z "$GL_COND_OBJ_GETLINE_TRUE"; then :
26467
26468
26469 :
26470
26471
26472 fi
26473
26474
26475
26476
26477
26478
26479
26480
26481
26482 GL_GNULIB_GETLINE=1
26483
26484
26485
26486
26487
26488 $as_echo "#define GNULIB_TEST_GETLINE 1" >>confdefs.h
26489
26490
26491
26492
26493
26494
26495
26496
26497
26498 if test $ac_cv_have_decl_getlogin_r = no; then
26499 HAVE_DECL_GETLOGIN_R=0
26500 fi
26501
26502
26503 if test $ac_cv_func_getlogin_r = no; then
26504 HAVE_GETLOGIN_R=0
26505 else
26506 HAVE_GETLOGIN_R=1
26507
26508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getlogin_r works with small buffers" >&5
26509 $as_echo_n "checking whether getlogin_r works with small buffers... " >&6; }
26510 if ${gl_cv_func_getlogin_r_works+:} false; then :
26511 $as_echo_n "(cached) " >&6
26512 else
26513
26514 case "$host_os" in
26515 # Guess no on Mac OS X, OSF/1.
26516 darwin* | osf*) gl_cv_func_getlogin_r_works="guessing no" ;;
26517 # Guess yes otherwise.
26518 *) gl_cv_func_getlogin_r_works="guessing yes" ;;
26519 esac
26520 if test "$cross_compiling" = yes; then :
26521 :
26522 else
26523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26524 /* end confdefs.h. */
26525
26526 #include <stddef.h>
26527 #include <string.h>
26528 #include <unistd.h>
26529 #if !HAVE_DECL_GETLOGIN_R
26530 extern
26531 # ifdef __cplusplus
26532 "C"
26533 # endif
26534 int getlogin_r (char *, size_t);
26535 #endif
26536 int
26537 main (void)
26538 {
26539 int result = 0;
26540 char buf[100];
26541
26542 if (getlogin_r (buf, 0) == 0)
26543 result |= 1;
26544 if (getlogin_r (buf, 1) == 0)
26545 result |= 2;
26546 if (getlogin_r (buf, 100) == 0)
26547 {
26548 size_t n = strlen (buf);
26549 if (getlogin_r (buf, n) == 0)
26550 result |= 4;
26551 }
26552 return result;
26553 }
26554 _ACEOF
26555 if ac_fn_c_try_run "$LINENO"; then :
26556 gl_cv_func_getlogin_r_works=yes
26557 else
26558 gl_cv_func_getlogin_r_works=no
26559 fi
26560 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26561 conftest.$ac_objext conftest.beam conftest.$ac_ext
26562 fi
26563
26564
26565 fi
26566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getlogin_r_works" >&5
26567 $as_echo "$gl_cv_func_getlogin_r_works" >&6; }
26568 case "$gl_cv_func_getlogin_r_works" in
26569 *yes) ;;
26570 *) REPLACE_GETLOGIN_R=1 ;;
26571 esac
26572 fi
26573
26574
26575 if test $HAVE_GETLOGIN_R = 0 || test $REPLACE_GETLOGIN_R = 1; then
26576 GL_COND_OBJ_GETLOGIN_R_TRUE=
26577 GL_COND_OBJ_GETLOGIN_R_FALSE='#'
26578 else
26579 GL_COND_OBJ_GETLOGIN_R_TRUE='#'
26580 GL_COND_OBJ_GETLOGIN_R_FALSE=
26581 fi
26582 :
26583 if test -z "${GL_COND_OBJ_GETLOGIN_R_TRUE}" && test -z "${GL_COND_OBJ_GETLOGIN_R_FALSE}"; then
26584 GL_COND_OBJ_GETLOGIN_R_TRUE='#'
26585 GL_COND_OBJ_GETLOGIN_R_FALSE='#'
26586 fi
26587
26588 if test -z "$GL_COND_OBJ_GETLOGIN_R_TRUE"; then :
26589
26590
26591
26592
26593
26594 fi
26595
26596
26597
26598
26599
26600
26601
26602
26603
26604 GL_GNULIB_GETLOGIN_R=1
26605
26606
26607
26608
26609
26610 $as_echo "#define GNULIB_TEST_GETLOGIN_R 1" >>confdefs.h
26611
26612
26613
26614
26615
26616
26617
26618 ac_found=0
26619 ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
26620 "
26621 if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
26622 ac_have_decl=1
26623 else
26624 ac_have_decl=0
26625 fi
26626
26627 cat >>confdefs.h <<_ACEOF
26628 #define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
26629 _ACEOF
26630 if test $ac_have_decl = 1; then :
26631 ac_found=1
26632 fi
26633
26634 ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
26635 "
26636 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
26637 ac_have_decl=1
26638 else
26639 ac_have_decl=0
26640 fi
26641
26642 cat >>confdefs.h <<_ACEOF
26643 #define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
26644 _ACEOF
26645 if test $ac_have_decl = 1; then :
26646 ac_found=1
26647 fi
26648
26649 ac_fn_c_check_decl "$LINENO" "__argv" "ac_cv_have_decl___argv" "#include <stdlib.h>
26650 "
26651 if test "x$ac_cv_have_decl___argv" = xyes; then :
26652 ac_have_decl=1
26653 else
26654 ac_have_decl=0
26655 fi
26656
26657 cat >>confdefs.h <<_ACEOF
26658 #define HAVE_DECL___ARGV $ac_have_decl
26659 _ACEOF
26660 if test $ac_have_decl = 1; then :
26661 ac_found=1
26662 fi
26663
26664
26665 # Incur the cost of this test only if none of the above worked.
26666 if test $ac_found = 0; then
26667 # On OpenBSD 5.1, using the global __progname variable appears to be
26668 # the only way to implement getprogname.
26669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __progname is defined in default libraries" >&5
26670 $as_echo_n "checking whether __progname is defined in default libraries... " >&6; }
26671 if ${gl_cv_var___progname+:} false; then :
26672 $as_echo_n "(cached) " >&6
26673 else
26674
26675 gl_cv_var___progname=
26676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26677 /* end confdefs.h. */
26678 extern char *__progname;
26679 int
26680 main ()
26681 {
26682 return *__progname;
26683
26684 ;
26685 return 0;
26686 }
26687 _ACEOF
26688 if ac_fn_c_try_link "$LINENO"; then :
26689 gl_cv_var___progname=yes
26690
26691 fi
26692 rm -f core conftest.err conftest.$ac_objext \
26693 conftest$ac_exeext conftest.$ac_ext
26694
26695
26696 fi
26697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var___progname" >&5
26698 $as_echo "$gl_cv_var___progname" >&6; }
26699 if test "$gl_cv_var___progname" = yes; then
26700
26701 $as_echo "#define HAVE_VAR___PROGNAME 1" >>confdefs.h
26702
26703 fi
26704 fi
26705
26706
26707
26708
26709
26710 if test "$ac_cv_func_getrandom" != yes; then
26711 HAVE_GETRANDOM=0
26712 else
26713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getrandom is compatible with its GNU+BSD signature" >&5
26714 $as_echo_n "checking whether getrandom is compatible with its GNU+BSD signature... " >&6; }
26715 if ${gl_cv_func_getrandom_ok+:} false; then :
26716 $as_echo_n "(cached) " >&6
26717 else
26718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26719 /* end confdefs.h. */
26720 /* Additional includes are needed before <sys/random.h> on uClibc
26721 and Mac OS X. */
26722 #include <sys/types.h>
26723 #include <stdlib.h>
26724 #include <sys/random.h>
26725 ssize_t getrandom (void *, size_t, unsigned int);
26726
26727 int
26728 main ()
26729 {
26730
26731 ;
26732 return 0;
26733 }
26734
26735 _ACEOF
26736 if ac_fn_c_try_compile "$LINENO"; then :
26737 gl_cv_func_getrandom_ok=yes
26738 else
26739 gl_cv_func_getrandom_ok=no
26740 fi
26741 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26742
26743 fi
26744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getrandom_ok" >&5
26745 $as_echo "$gl_cv_func_getrandom_ok" >&6; }
26746 if test $gl_cv_func_getrandom_ok = no; then
26747 REPLACE_GETRANDOM=1
26748 fi
26749 fi
26750
26751 case "$host_os" in
26752 mingw*)
26753 for ac_header in bcrypt.h
26754 do :
26755 ac_fn_c_check_header_compile "$LINENO" "bcrypt.h" "ac_cv_header_bcrypt_h" "#include <windows.h>
26756
26757 "
26758 if test "x$ac_cv_header_bcrypt_h" = xyes; then :
26759 cat >>confdefs.h <<_ACEOF
26760 #define HAVE_BCRYPT_H 1
26761 _ACEOF
26762
26763 fi
26764
26765 done
26766
26767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the bcrypt library is guaranteed to be present" >&5
26768 $as_echo_n "checking whether the bcrypt library is guaranteed to be present... " >&6; }
26769 if ${gl_cv_lib_assume_bcrypt+:} false; then :
26770 $as_echo_n "(cached) " >&6
26771 else
26772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26773 /* end confdefs.h. */
26774 #include <windows.h>
26775 int
26776 main ()
26777 {
26778 #if !(_WIN32_WINNT >= _WIN32_WINNT_WIN7)
26779 cannot assume it
26780 #endif
26781
26782 ;
26783 return 0;
26784 }
26785
26786 _ACEOF
26787 if ac_fn_c_try_compile "$LINENO"; then :
26788 gl_cv_lib_assume_bcrypt=yes
26789 else
26790 gl_cv_lib_assume_bcrypt=no
26791 fi
26792 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26793
26794 fi
26795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_assume_bcrypt" >&5
26796 $as_echo "$gl_cv_lib_assume_bcrypt" >&6; }
26797 if test $gl_cv_lib_assume_bcrypt = yes; then
26798
26799 $as_echo "#define HAVE_LIB_BCRYPT 1" >>confdefs.h
26800
26801 LIB_GETRANDOM='-lbcrypt'
26802 else
26803 LIB_GETRANDOM='-ladvapi32'
26804 fi
26805 ;;
26806 *)
26807 LIB_GETRANDOM= ;;
26808 esac
26809
26810
26811
26812 if test $HAVE_GETRANDOM = 0 || test $REPLACE_GETRANDOM = 1; then
26813 GL_COND_OBJ_GETRANDOM_TRUE=
26814 GL_COND_OBJ_GETRANDOM_FALSE='#'
26815 else
26816 GL_COND_OBJ_GETRANDOM_TRUE='#'
26817 GL_COND_OBJ_GETRANDOM_FALSE=
26818 fi
26819 :
26820 if test -z "${GL_COND_OBJ_GETRANDOM_TRUE}" && test -z "${GL_COND_OBJ_GETRANDOM_FALSE}"; then
26821 GL_COND_OBJ_GETRANDOM_TRUE='#'
26822 GL_COND_OBJ_GETRANDOM_FALSE='#'
26823 fi
26824
26825
26826
26827
26828
26829
26830
26831
26832
26833
26834 GL_GNULIB_GETRANDOM=1
26835
26836
26837
26838
26839
26840 $as_echo "#define GNULIB_TEST_GETRANDOM 1" >>confdefs.h
26841
26842
26843
26844
26845
26846
26847
26848
26849
26850
26851
26852
26853 gl_gettimeofday_timezone=void
26854 if test $ac_cv_func_gettimeofday != yes; then
26855 HAVE_GETTIMEOFDAY=0
26856 else
26857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
26858 $as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
26859 if ${gl_cv_func_gettimeofday_posix_signature+:} false; then :
26860 $as_echo_n "(cached) " >&6
26861 else
26862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26863 /* end confdefs.h. */
26864 #include <sys/time.h>
26865 struct timeval c;
26866 int gettimeofday (struct timeval *restrict, void *restrict);
26867
26868 int
26869 main ()
26870 {
26871 /* glibc uses struct timezone * rather than the POSIX void *
26872 if _GNU_SOURCE is defined. However, since the only portable
26873 use of gettimeofday uses NULL as the second parameter, and
26874 since the glibc definition is actually more typesafe, it is
26875 not worth wrapping this to get a compliant signature. */
26876 int (*f) (struct timeval *restrict, void *restrict)
26877 = gettimeofday;
26878 int x = f (&c, 0);
26879 return !(x | c.tv_sec | c.tv_usec);
26880
26881 ;
26882 return 0;
26883 }
26884 _ACEOF
26885 if ac_fn_c_try_compile "$LINENO"; then :
26886 gl_cv_func_gettimeofday_posix_signature=yes
26887 else
26888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26889 /* end confdefs.h. */
26890 #include <sys/time.h>
26891 int gettimeofday (struct timeval *restrict, struct timezone *restrict);
26892
26893 int
26894 main ()
26895 {
26896
26897 ;
26898 return 0;
26899 }
26900 _ACEOF
26901 if ac_fn_c_try_compile "$LINENO"; then :
26902 gl_cv_func_gettimeofday_posix_signature=almost
26903 else
26904 gl_cv_func_gettimeofday_posix_signature=no
26905 fi
26906 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26907 fi
26908 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26909 fi
26910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
26911 $as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
26912 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
26913 gl_gettimeofday_timezone='struct timezone'
26914 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
26915 REPLACE_GETTIMEOFDAY=1
26916 fi
26917 if test $REPLACE_STRUCT_TIMEVAL = 1; then
26918 REPLACE_GETTIMEOFDAY=1
26919 fi
26920 case "$host_os" in
26921 mingw*) REPLACE_GETTIMEOFDAY=1 ;;
26922 esac
26923 fi
26924
26925 cat >>confdefs.h <<_ACEOF
26926 #define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
26927 _ACEOF
26928
26929
26930
26931 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
26932 GL_COND_OBJ_GETTIMEOFDAY_TRUE=
26933 GL_COND_OBJ_GETTIMEOFDAY_FALSE='#'
26934 else
26935 GL_COND_OBJ_GETTIMEOFDAY_TRUE='#'
26936 GL_COND_OBJ_GETTIMEOFDAY_FALSE=
26937 fi
26938 :
26939 if test -z "${GL_COND_OBJ_GETTIMEOFDAY_TRUE}" && test -z "${GL_COND_OBJ_GETTIMEOFDAY_FALSE}"; then
26940 GL_COND_OBJ_GETTIMEOFDAY_TRUE='#'
26941 GL_COND_OBJ_GETTIMEOFDAY_FALSE='#'
26942 fi
26943
26944 if test -z "$GL_COND_OBJ_GETTIMEOFDAY_TRUE"; then :
26945
26946 :
26947
26948 fi
26949
26950
26951
26952
26953
26954
26955
26956
26957
26958 GL_GNULIB_GETTIMEOFDAY=1
26959
26960
26961
26962
26963
26964 $as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
26965
26966
26967
26968
26969
26970
26971
26972 if test $ac_cv_func_glob = no; then
26973 HAVE_GLOB=0
26974 else
26975
26976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU glob interface version 1 or 2" >&5
26977 $as_echo_n "checking for GNU glob interface version 1 or 2... " >&6; }
26978 if ${gl_cv_gnu_glob_interface_version_1_2+:} false; then :
26979 $as_echo_n "(cached) " >&6
26980 else
26981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26982 /* end confdefs.h. */
26983 #include <gnu-versions.h>
26984 char a[_GNU_GLOB_INTERFACE_VERSION == 1 || _GNU_GLOB_INTERFACE_VERSION == 2 ? 1 : -1];
26985 _ACEOF
26986 if ac_fn_c_try_compile "$LINENO"; then :
26987 gl_cv_gnu_glob_interface_version_1_2=yes
26988 else
26989 gl_cv_gnu_glob_interface_version_1_2=no
26990 fi
26991 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26992 fi
26993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_gnu_glob_interface_version_1_2" >&5
26994 $as_echo "$gl_cv_gnu_glob_interface_version_1_2" >&6; }
26995 if test "$gl_cv_gnu_glob_interface_version_1_2" = "no"; then
26996 REPLACE_GLOB=1
26997 fi
26998
26999 if test $REPLACE_GLOB = 0; then
27000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether glob lists broken symlinks" >&5
27001 $as_echo_n "checking whether glob lists broken symlinks... " >&6; }
27002 if ${gl_cv_glob_lists_symlinks+:} false; then :
27003 $as_echo_n "(cached) " >&6
27004 else
27005 if test $cross_compiling != yes; then
27006 if ln -s conf-doesntexist conf$$-globtest 2>/dev/null; then
27007 gl_cv_glob_lists_symlinks=maybe
27008 else
27009 # If we can't make a symlink, then we cannot test this issue. Be
27010 # pessimistic about this.
27011 gl_cv_glob_lists_symlinks=no
27012 fi
27013 if test $gl_cv_glob_lists_symlinks = maybe; then
27014 if test "$cross_compiling" = yes; then :
27015 :
27016
27017 else
27018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27019 /* end confdefs.h. */
27020 #include <stddef.h>
27021 #include <glob.h>
27022 int
27023 main ()
27024 {
27025 glob_t found;
27026 if (glob ("conf*-globtest", 0, NULL, &found) == GLOB_NOMATCH)
27027 return 1;
27028 globfree (&found);
27029
27030 ;
27031 return 0;
27032 }
27033 _ACEOF
27034 if ac_fn_c_try_run "$LINENO"; then :
27035 gl_cv_glob_lists_symlinks=yes
27036 else
27037 gl_cv_glob_lists_symlinks=no
27038 fi
27039 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27040 conftest.$ac_objext conftest.beam conftest.$ac_ext
27041 fi
27042
27043 fi
27044 rm -f conf$$-globtest
27045 else
27046 gl_cv_glob_lists_symlinks="$gl_cross_guess_normal"
27047 fi
27048
27049 fi
27050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_glob_lists_symlinks" >&5
27051 $as_echo "$gl_cv_glob_lists_symlinks" >&6; }
27052 case "$gl_cv_glob_lists_symlinks" in
27053 *yes) ;;
27054 *) REPLACE_GLOB=1 ;;
27055 esac
27056 fi
27057
27058 if test $REPLACE_GLOB = 0; then
27059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether glob NOTDIR*/ omits symlink to nondir" >&5
27060 $as_echo_n "checking whether glob NOTDIR*/ omits symlink to nondir... " >&6; }
27061 if ${gl_cv_glob_omit_nondir_symlinks+:} false; then :
27062 $as_echo_n "(cached) " >&6
27063 else
27064 if test $cross_compiling != yes; then
27065 if ln -s conf$$-file conf$$-globtest 2>/dev/null && touch conf$$-file
27066 then
27067 gl_cv_glob_omit_nondir_symlinks=maybe
27068 else
27069 # If we can't make a symlink, then we cannot test this issue. Be
27070 # pessimistic about this.
27071 gl_cv_glob_omit_nondir_symlinks=no
27072 fi
27073 if test $gl_cv_glob_omit_nondir_symlinks = maybe; then
27074 if test "$cross_compiling" = yes; then :
27075 :
27076
27077 else
27078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27079 /* end confdefs.h. */
27080 #include <stddef.h>
27081 #include <glob.h>
27082 int
27083 main ()
27084 {
27085 glob_t found;
27086 if (glob ("conf*-globtest/", 0, NULL, &found) != GLOB_NOMATCH)
27087 return 1;
27088 globfree (&found);
27089
27090 ;
27091 return 0;
27092 }
27093 _ACEOF
27094 if ac_fn_c_try_run "$LINENO"; then :
27095 gl_cv_glob_omit_nondir_symlinks=yes
27096 else
27097 gl_cv_glob_omit_nondir_symlinks=no
27098 fi
27099 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27100 conftest.$ac_objext conftest.beam conftest.$ac_ext
27101 fi
27102
27103 fi
27104 rm -f conf$$-file conf$$-globtest
27105 else
27106 gl_cv_glob_omit_nondir_symlinks="$gl_cross_guess_normal"
27107 fi
27108
27109 fi
27110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_glob_omit_nondir_symlinks" >&5
27111 $as_echo "$gl_cv_glob_omit_nondir_symlinks" >&6; }
27112 case "$gl_cv_glob_omit_nondir_symlinks" in
27113 *yes) ;;
27114 *) REPLACE_GLOB=1 ;;
27115 esac
27116 fi
27117
27118 fi
27119
27120 if test $ac_cv_func_glob_pattern_p = no; then
27121 HAVE_GLOB_PATTERN_P=0
27122 else
27123 if test $REPLACE_GLOB = 1; then
27124 REPLACE_GLOB_PATTERN_P=1
27125 fi
27126 fi
27127
27128 if test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1; then
27129
27130
27131
27132
27133
27134
27135 GL_GENERATE_GLOB_H=true
27136
27137 fi
27138
27139
27140
27141
27142
27143 case "$GL_GENERATE_GLOB_H" in
27144 false) GLOB_H='' ;;
27145 true)
27146 if test -z "$GLOB_H"; then
27147 GLOB_H="${gl_source_base_prefix}glob.h"
27148 fi
27149 ;;
27150 *) echo "*** GL_GENERATE_GLOB_H is not set correctly" 1>&2; exit 1 ;;
27151 esac
27152
27153
27154 if $GL_GENERATE_GLOB_H; then
27155 GL_GENERATE_GLOB_H_TRUE=
27156 GL_GENERATE_GLOB_H_FALSE='#'
27157 else
27158 GL_GENERATE_GLOB_H_TRUE='#'
27159 GL_GENERATE_GLOB_H_FALSE=
27160 fi
27161 :
27162 if test -z "${GL_GENERATE_GLOB_H_TRUE}" && test -z "${GL_GENERATE_GLOB_H_FALSE}"; then
27163 GL_GENERATE_GLOB_H_TRUE='#'
27164 GL_GENERATE_GLOB_H_FALSE='#'
27165 fi
27166
27167
27168
27169
27170
27171
27172 if test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1; then
27173 GL_COND_OBJ_GLOB_TRUE=
27174 GL_COND_OBJ_GLOB_FALSE='#'
27175 else
27176 GL_COND_OBJ_GLOB_TRUE='#'
27177 GL_COND_OBJ_GLOB_FALSE=
27178 fi
27179 :
27180 if test -z "${GL_COND_OBJ_GLOB_TRUE}" && test -z "${GL_COND_OBJ_GLOB_FALSE}"; then
27181 GL_COND_OBJ_GLOB_TRUE='#'
27182 GL_COND_OBJ_GLOB_FALSE='#'
27183 fi
27184
27185 if test -z "$GL_COND_OBJ_GLOB_TRUE"; then :
27186
27187
27188
27189
27190
27191
27192
27193 fi
27194
27195 if test $HAVE_GLOB_PATTERN_P = 0 || test $REPLACE_GLOB_PATTERN_P = 1; then
27196 GL_COND_OBJ_GLOB_PATTERN_P_TRUE=
27197 GL_COND_OBJ_GLOB_PATTERN_P_FALSE='#'
27198 else
27199 GL_COND_OBJ_GLOB_PATTERN_P_TRUE='#'
27200 GL_COND_OBJ_GLOB_PATTERN_P_FALSE=
27201 fi
27202 :
27203 if test -z "${GL_COND_OBJ_GLOB_PATTERN_P_TRUE}" && test -z "${GL_COND_OBJ_GLOB_PATTERN_P_FALSE}"; then
27204 GL_COND_OBJ_GLOB_PATTERN_P_TRUE='#'
27205 GL_COND_OBJ_GLOB_PATTERN_P_FALSE='#'
27206 fi
27207
27208
27209
27210
27211
27212
27213
27214
27215
27216
27217 GL_GNULIB_GLOB=1
27218
27219
27220
27221
27222
27223 $as_echo "#define GNULIB_TEST_GLOB 1" >>confdefs.h
27224
27225
27226
27227
27228
27229
27230
27231
27232
27233
27234
27235
27236
27237 case "$GL_GENERATE_GLOB_H" in
27238 false) GLOB_H='' ;;
27239 true)
27240 if test -z "$GLOB_H"; then
27241 GLOB_H="${gl_source_base_prefix}glob.h"
27242 fi
27243 ;;
27244 *) echo "*** GL_GENERATE_GLOB_H is not set correctly" 1>&2; exit 1 ;;
27245 esac
27246
27247
27248 if $GL_GENERATE_GLOB_H; then
27249 GL_GENERATE_GLOB_H_TRUE=
27250 GL_GENERATE_GLOB_H_FALSE='#'
27251 else
27252 GL_GENERATE_GLOB_H_TRUE='#'
27253 GL_GENERATE_GLOB_H_FALSE=
27254 fi
27255 :
27256 if test -z "${GL_GENERATE_GLOB_H_TRUE}" && test -z "${GL_GENERATE_GLOB_H_FALSE}"; then
27257 GL_GENERATE_GLOB_H_TRUE='#'
27258 GL_GENERATE_GLOB_H_FALSE='#'
27259 fi
27260
27261
27262
27263
27264
27265
27266
27267 LIB_HARD_LOCALE="$LIB_SETLOCALE_NULL"
27268
27269
27270
27271
27272
27273
27274
27275
27276 HAVE_INET_NTOP=1
27277 INET_NTOP_LIB=
27278
27279
27280
27281
27282 if test $ac_cv_header_sys_socket_h != yes; then
27283 for ac_header in winsock2.h
27284 do :
27285 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
27286 if test "x$ac_cv_header_winsock2_h" = xyes; then :
27287 cat >>confdefs.h <<_ACEOF
27288 #define HAVE_WINSOCK2_H 1
27289 _ACEOF
27290
27291 fi
27292
27293 done
27294
27295 fi
27296 if test "$ac_cv_header_winsock2_h" = yes; then
27297 HAVE_WINSOCK2_H=1
27298 UNISTD_H_HAVE_WINSOCK2_H=1
27299 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
27300 else
27301 HAVE_WINSOCK2_H=0
27302 fi
27303
27304
27305 if test $HAVE_WINSOCK2_H = 1; then
27306 REPLACE_INET_NTOP=1
27307 ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <ws2tcpip.h>
27308 "
27309 if test "x$ac_cv_have_decl_inet_ntop" = xyes; then :
27310 ac_have_decl=1
27311 else
27312 ac_have_decl=0
27313 fi
27314
27315 cat >>confdefs.h <<_ACEOF
27316 #define HAVE_DECL_INET_NTOP $ac_have_decl
27317 _ACEOF
27318
27319 if test $ac_cv_have_decl_inet_ntop = yes; then
27320 INET_NTOP_LIB="-lws2_32"
27321 else
27322 HAVE_DECL_INET_NTOP=0
27323 fi
27324 else
27325 gl_save_LIBS=$LIBS
27326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5
27327 $as_echo_n "checking for library containing inet_ntop... " >&6; }
27328 if ${ac_cv_search_inet_ntop+:} false; then :
27329 $as_echo_n "(cached) " >&6
27330 else
27331 ac_func_search_save_LIBS=$LIBS
27332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27333 /* end confdefs.h. */
27334
27335 /* Override any GCC internal prototype to avoid an error.
27336 Use char because int might match the return type of a GCC
27337 builtin and then its argument prototype would still apply. */
27338 #ifdef __cplusplus
27339 extern "C"
27340 #endif
27341 char inet_ntop ();
27342 int
27343 main ()
27344 {
27345 return inet_ntop ();
27346 ;
27347 return 0;
27348 }
27349 _ACEOF
27350 for ac_lib in '' nsl resolv network; do
27351 if test -z "$ac_lib"; then
27352 ac_res="none required"
27353 else
27354 ac_res=-l$ac_lib
27355 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
27356 fi
27357 if ac_fn_c_try_link "$LINENO"; then :
27358 ac_cv_search_inet_ntop=$ac_res
27359 fi
27360 rm -f core conftest.err conftest.$ac_objext \
27361 conftest$ac_exeext
27362 if ${ac_cv_search_inet_ntop+:} false; then :
27363 break
27364 fi
27365 done
27366 if ${ac_cv_search_inet_ntop+:} false; then :
27367
27368 else
27369 ac_cv_search_inet_ntop=no
27370 fi
27371 rm conftest.$ac_ext
27372 LIBS=$ac_func_search_save_LIBS
27373 fi
27374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5
27375 $as_echo "$ac_cv_search_inet_ntop" >&6; }
27376 ac_res=$ac_cv_search_inet_ntop
27377 if test "$ac_res" != no; then :
27378 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
27379
27380 else
27381 for ac_func in inet_ntop
27382 do :
27383 ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
27384 if test "x$ac_cv_func_inet_ntop" = xyes; then :
27385 cat >>confdefs.h <<_ACEOF
27386 #define HAVE_INET_NTOP 1
27387 _ACEOF
27388
27389 fi
27390 done
27391
27392 if test $ac_cv_func_inet_ntop = no; then
27393 HAVE_INET_NTOP=0
27394 fi
27395
27396 fi
27397
27398 LIBS=$gl_save_LIBS
27399
27400 if test "$ac_cv_search_inet_ntop" != "no" \
27401 && test "$ac_cv_search_inet_ntop" != "none required"; then
27402 INET_NTOP_LIB="$ac_cv_search_inet_ntop"
27403 fi
27404
27405
27406 ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <arpa/inet.h>
27407 #if HAVE_NETDB_H
27408 # include <netdb.h>
27409 #endif
27410
27411 "
27412 if test "x$ac_cv_have_decl_inet_ntop" = xyes; then :
27413 ac_have_decl=1
27414 else
27415 ac_have_decl=0
27416 fi
27417
27418 cat >>confdefs.h <<_ACEOF
27419 #define HAVE_DECL_INET_NTOP $ac_have_decl
27420 _ACEOF
27421
27422 if test $ac_cv_have_decl_inet_ntop = no; then
27423 HAVE_DECL_INET_NTOP=0
27424 fi
27425 fi
27426
27427
27428
27429 if test $HAVE_INET_NTOP = 0 || test $REPLACE_INET_NTOP = 1; then
27430 GL_COND_OBJ_INET_NTOP_TRUE=
27431 GL_COND_OBJ_INET_NTOP_FALSE='#'
27432 else
27433 GL_COND_OBJ_INET_NTOP_TRUE='#'
27434 GL_COND_OBJ_INET_NTOP_FALSE=
27435 fi
27436 :
27437 if test -z "${GL_COND_OBJ_INET_NTOP_TRUE}" && test -z "${GL_COND_OBJ_INET_NTOP_FALSE}"; then
27438 GL_COND_OBJ_INET_NTOP_TRUE='#'
27439 GL_COND_OBJ_INET_NTOP_FALSE='#'
27440 fi
27441
27442 if test -z "$GL_COND_OBJ_INET_NTOP_TRUE"; then :
27443
27444
27445
27446
27447
27448 fi
27449
27450
27451
27452
27453
27454
27455
27456
27457
27458 GL_GNULIB_INET_NTOP=1
27459
27460
27461
27462
27463
27464
27465
27466
27467
27468
27469
27470
27471
27472
27473
27474
27475
27476 if test $ac_cv_func_isblank = no; then
27477 HAVE_ISBLANK=0
27478 fi
27479
27480
27481 if test $HAVE_ISBLANK = 0; then
27482 GL_COND_OBJ_ISBLANK_TRUE=
27483 GL_COND_OBJ_ISBLANK_FALSE='#'
27484 else
27485 GL_COND_OBJ_ISBLANK_TRUE='#'
27486 GL_COND_OBJ_ISBLANK_FALSE=
27487 fi
27488 :
27489 if test -z "${GL_COND_OBJ_ISBLANK_TRUE}" && test -z "${GL_COND_OBJ_ISBLANK_FALSE}"; then
27490 GL_COND_OBJ_ISBLANK_TRUE='#'
27491 GL_COND_OBJ_ISBLANK_FALSE='#'
27492 fi
27493
27494
27495
27496 cat >>confdefs.h <<_ACEOF
27497 #define GNULIB_ISBLANK 1
27498 _ACEOF
27499
27500
27501
27502
27503
27504
27505
27506
27507
27508
27509
27510 GL_GNULIB_ISBLANK=1
27511
27512
27513
27514
27515
27516
27517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
27518 $as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; }
27519 if ${gl_cv_func_isnand_no_libm+:} false; then :
27520 $as_echo_n "(cached) " >&6
27521 else
27522
27523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27524 /* end confdefs.h. */
27525 #include <math.h>
27526 #if (__GNUC__ >= 4) || (__clang_major__ >= 4)
27527 # undef isnand
27528 # define isnand(x) __builtin_isnan ((double)(x))
27529 #else
27530 # undef isnand
27531 # define isnand(x) isnan ((double)(x))
27532 #endif
27533 double x;
27534 int
27535 main ()
27536 {
27537 return isnand (x);
27538 ;
27539 return 0;
27540 }
27541 _ACEOF
27542 if ac_fn_c_try_link "$LINENO"; then :
27543 gl_cv_func_isnand_no_libm=yes
27544 else
27545 gl_cv_func_isnand_no_libm=no
27546 fi
27547 rm -f core conftest.err conftest.$ac_objext \
27548 conftest$ac_exeext conftest.$ac_ext
27549
27550 fi
27551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
27552 $as_echo "$gl_cv_func_isnand_no_libm" >&6; }
27553
27554 gl_func_isnand_no_libm=$gl_cv_func_isnand_no_libm
27555 if test $gl_cv_func_isnand_no_libm = yes; then
27556
27557 $as_echo "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h
27558
27559 fi
27560
27561 if test $gl_func_isnand_no_libm != yes; then
27562
27563
27564
27565
27566
27567
27568
27569
27570 gl_LIBOBJS="$gl_LIBOBJS isnand.$ac_objext"
27571
27572
27573
27574
27575 fi
27576
27577
27578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
27579 $as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; }
27580 if ${gl_cv_func_isnanl_no_libm+:} false; then :
27581 $as_echo_n "(cached) " >&6
27582 else
27583
27584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27585 /* end confdefs.h. */
27586 #include <math.h>
27587 #if (__GNUC__ >= 4) || (__clang_major__ >= 4)
27588 # undef isnanl
27589 # define isnanl(x) __builtin_isnan ((long double)(x))
27590 #elif defined isnan
27591 # undef isnanl
27592 # define isnanl(x) isnan ((long double)(x))
27593 #endif
27594 long double x;
27595 int
27596 main ()
27597 {
27598 return isnanl (x);
27599 ;
27600 return 0;
27601 }
27602 _ACEOF
27603 if ac_fn_c_try_link "$LINENO"; then :
27604 gl_cv_func_isnanl_no_libm=yes
27605 else
27606 gl_cv_func_isnanl_no_libm=no
27607 fi
27608 rm -f core conftest.err conftest.$ac_objext \
27609 conftest$ac_exeext conftest.$ac_ext
27610
27611 fi
27612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
27613 $as_echo "$gl_cv_func_isnanl_no_libm" >&6; }
27614
27615 gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm
27616 if test $gl_func_isnanl_no_libm = yes; then
27617
27618
27619
27620
27621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
27622 $as_echo_n "checking whether isnanl works... " >&6; }
27623 if ${gl_cv_func_isnanl_works+:} false; then :
27624 $as_echo_n "(cached) " >&6
27625 else
27626
27627 if test "$cross_compiling" = yes; then :
27628 case "$host_os" in
27629 mingw*) # Guess yes on mingw, no on MSVC.
27630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27631 /* end confdefs.h. */
27632
27633 #ifdef __MINGW32__
27634 Known
27635 #endif
27636
27637 _ACEOF
27638 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27639 $EGREP "Known" >/dev/null 2>&1; then :
27640 gl_cv_func_isnanl_works="guessing yes"
27641 else
27642 gl_cv_func_isnanl_works="guessing no"
27643 fi
27644 rm -f conftest*
27645
27646 ;;
27647 *) gl_cv_func_isnanl_works="guessing yes" ;;
27648 esac
27649
27650 else
27651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27652 /* end confdefs.h. */
27653
27654 #include <float.h>
27655 #include <limits.h>
27656 #include <math.h>
27657 #if (__GNUC__ >= 4) || (__clang_major__ >= 4)
27658 # undef isnanl
27659 # define isnanl(x) __builtin_isnan ((long double)(x))
27660 #elif defined isnan
27661 # undef isnanl
27662 # define isnanl(x) isnan ((long double)(x))
27663 #endif
27664 #define NWORDS \
27665 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
27666 typedef union { unsigned int word[NWORDS]; long double value; }
27667 memory_long_double;
27668 /* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
27669 runtime type conversion. */
27670 #ifdef __sgi
27671 static long double NaNl ()
27672 {
27673 double zero = 0.0;
27674 return zero / zero;
27675 }
27676 #else
27677 # define NaNl() (0.0L / 0.0L)
27678 #endif
27679 int main ()
27680 {
27681 int result = 0;
27682
27683 if (!isnanl (NaNl ()))
27684 result |= 1;
27685
27686 {
27687 memory_long_double m;
27688 unsigned int i;
27689
27690 /* The isnanl function should be immune against changes in the sign bit and
27691 in the mantissa bits. The xor operation twiddles a bit that can only be
27692 a sign bit or a mantissa bit (since the exponent never extends to
27693 bit 31). */
27694 m.value = NaNl ();
27695 m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
27696 for (i = 0; i < NWORDS; i++)
27697 m.word[i] |= 1;
27698 if (!isnanl (m.value))
27699 result |= 1;
27700 }
27701
27702 #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
27703 /* Representation of an 80-bit 'long double' as an initializer for a sequence
27704 of 'unsigned int' words. */
27705 # ifdef WORDS_BIGENDIAN
27706 # define LDBL80_WORDS(exponent,manthi,mantlo) \
27707 { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
27708 ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \
27709 (unsigned int) (mantlo) << 16 \
27710 }
27711 # else
27712 # define LDBL80_WORDS(exponent,manthi,mantlo) \
27713 { mantlo, manthi, exponent }
27714 # endif
27715 { /* Quiet NaN. */
27716 static memory_long_double x =
27717 { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
27718 if (!isnanl (x.value))
27719 result |= 2;
27720 }
27721 {
27722 /* Signalling NaN. */
27723 static memory_long_double x =
27724 { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
27725 if (!isnanl (x.value))
27726 result |= 2;
27727 }
27728 /* isnanl should return something even for noncanonical values. */
27729 { /* Pseudo-NaN. */
27730 static memory_long_double x =
27731 { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
27732 if (isnanl (x.value) && !isnanl (x.value))
27733 result |= 4;
27734 }
27735 { /* Pseudo-Infinity. */
27736 static memory_long_double x =
27737 { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
27738 if (isnanl (x.value) && !isnanl (x.value))
27739 result |= 8;
27740 }
27741 { /* Pseudo-Zero. */
27742 static memory_long_double x =
27743 { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
27744 if (isnanl (x.value) && !isnanl (x.value))
27745 result |= 16;
27746 }
27747 { /* Unnormalized number. */
27748 static memory_long_double x =
27749 { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
27750 if (isnanl (x.value) && !isnanl (x.value))
27751 result |= 32;
27752 }
27753 { /* Pseudo-Denormal. */
27754 static memory_long_double x =
27755 { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
27756 if (isnanl (x.value) && !isnanl (x.value))
27757 result |= 64;
27758 }
27759 #endif
27760
27761 return result;
27762 }
27763 _ACEOF
27764 if ac_fn_c_try_run "$LINENO"; then :
27765 gl_cv_func_isnanl_works=yes
27766 else
27767 gl_cv_func_isnanl_works=no
27768 fi
27769 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27770 conftest.$ac_objext conftest.beam conftest.$ac_ext
27771 fi
27772
27773
27774 fi
27775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
27776 $as_echo "$gl_cv_func_isnanl_works" >&6; }
27777
27778 case "$gl_cv_func_isnanl_works" in
27779 *yes) ;;
27780 *) gl_func_isnanl_no_libm=no ;;
27781 esac
27782 fi
27783 if test $gl_func_isnanl_no_libm = yes; then
27784
27785 $as_echo "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h
27786
27787 fi
27788
27789 if test $gl_func_isnanl_no_libm != yes; then
27790
27791
27792
27793
27794
27795
27796
27797
27798 gl_LIBOBJS="$gl_LIBOBJS isnanl.$ac_objext"
27799
27800
27801
27802
27803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
27804 $as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
27805 if ${gl_cv_cc_long_double_expbit0+:} false; then :
27806 $as_echo_n "(cached) " >&6
27807 else
27808
27809 if test "$cross_compiling" = yes; then :
27810
27811 gl_cv_cc_long_double_expbit0="unknown"
27812 case "$host_os" in
27813 mingw*) # On native Windows (little-endian), we know the result
27814 # in two cases: mingw, MSVC.
27815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27816 /* end confdefs.h. */
27817
27818 #ifdef __MINGW32__
27819 Known
27820 #endif
27821
27822 _ACEOF
27823 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27824 $EGREP "Known" >/dev/null 2>&1; then :
27825 gl_cv_cc_long_double_expbit0="word 2 bit 0"
27826 fi
27827 rm -f conftest*
27828
27829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27830 /* end confdefs.h. */
27831
27832 #ifdef _MSC_VER
27833 Known
27834 #endif
27835
27836 _ACEOF
27837 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27838 $EGREP "Known" >/dev/null 2>&1; then :
27839 gl_cv_cc_long_double_expbit0="word 1 bit 20"
27840 fi
27841 rm -f conftest*
27842
27843 ;;
27844 esac
27845
27846 else
27847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27848 /* end confdefs.h. */
27849
27850 #include <float.h>
27851 #include <stddef.h>
27852 #include <stdio.h>
27853 #include <string.h>
27854 #define NWORDS \
27855 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
27856 typedef union { long double value; unsigned int word[NWORDS]; }
27857 memory_long_double;
27858 static unsigned int ored_words[NWORDS];
27859 static unsigned int anded_words[NWORDS];
27860 static void add_to_ored_words (long double *x)
27861 {
27862 memory_long_double m;
27863 size_t i;
27864 /* Clear it first, in case
27865 sizeof (long double) < sizeof (memory_long_double). */
27866 memset (&m, 0, sizeof (memory_long_double));
27867 m.value = *x;
27868 for (i = 0; i < NWORDS; i++)
27869 {
27870 ored_words[i] |= m.word[i];
27871 anded_words[i] &= m.word[i];
27872 }
27873 }
27874 int main ()
27875 {
27876 static long double samples[5] = { 0.25L, 0.5L, 1.0L, 2.0L, 4.0L };
27877 size_t j;
27878 FILE *fp = fopen ("conftest.out", "w");
27879 if (fp == NULL)
27880 return 1;
27881 for (j = 0; j < NWORDS; j++)
27882 anded_words[j] = ~ (unsigned int) 0;
27883 for (j = 0; j < 5; j++)
27884 add_to_ored_words (&samples[j]);
27885 /* Remove bits that are common (e.g. if representation of the first mantissa
27886 bit is explicit). */
27887 for (j = 0; j < NWORDS; j++)
27888 ored_words[j] &= ~anded_words[j];
27889 /* Now find the nonzero word. */
27890 for (j = 0; j < NWORDS; j++)
27891 if (ored_words[j] != 0)
27892 break;
27893 if (j < NWORDS)
27894 {
27895 size_t i;
27896 for (i = j + 1; i < NWORDS; i++)
27897 if (ored_words[i] != 0)
27898 {
27899 fprintf (fp, "unknown");
27900 return (fclose (fp) != 0);
27901 }
27902 for (i = 0; ; i++)
27903 if ((ored_words[j] >> i) & 1)
27904 {
27905 fprintf (fp, "word %d bit %d", (int) j, (int) i);
27906 return (fclose (fp) != 0);
27907 }
27908 }
27909 fprintf (fp, "unknown");
27910 return (fclose (fp) != 0);
27911 }
27912
27913 _ACEOF
27914 if ac_fn_c_try_run "$LINENO"; then :
27915 gl_cv_cc_long_double_expbit0=`cat conftest.out`
27916 else
27917 gl_cv_cc_long_double_expbit0="unknown"
27918 fi
27919 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27920 conftest.$ac_objext conftest.beam conftest.$ac_ext
27921 fi
27922
27923 rm -f conftest.out
27924
27925 fi
27926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
27927 $as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
27928 case "$gl_cv_cc_long_double_expbit0" in
27929 word*bit*)
27930 word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
27931 bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
27932
27933 cat >>confdefs.h <<_ACEOF
27934 #define LDBL_EXPBIT0_WORD $word
27935 _ACEOF
27936
27937
27938 cat >>confdefs.h <<_ACEOF
27939 #define LDBL_EXPBIT0_BIT $bit
27940 _ACEOF
27941
27942 ;;
27943 esac
27944
27945
27946
27947 fi
27948
27949
27950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the __inline keyword" >&5
27951 $as_echo_n "checking whether the compiler supports the __inline keyword... " >&6; }
27952 if ${gl_cv_c___inline+:} false; then :
27953 $as_echo_n "(cached) " >&6
27954 else
27955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27956 /* end confdefs.h. */
27957 typedef int foo_t;
27958 static __inline foo_t foo (void) { return 0; }
27959 int
27960 main ()
27961 {
27962 return foo ();
27963 ;
27964 return 0;
27965 }
27966 _ACEOF
27967 if ac_fn_c_try_compile "$LINENO"; then :
27968 gl_cv_c___inline=yes
27969 else
27970 gl_cv_c___inline=no
27971 fi
27972 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27973 fi
27974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c___inline" >&5
27975 $as_echo "$gl_cv_c___inline" >&6; }
27976 if test $gl_cv_c___inline = yes; then
27977
27978 $as_echo "#define HAVE___INLINE 1" >>confdefs.h
27979
27980 fi
27981
27982
27983
27984
27985
27986
27987 case "$GL_GENERATE_LIMITS_H" in
27988 false) LIMITS_H='' ;;
27989 true)
27990 if test -z "$LIMITS_H"; then
27991 LIMITS_H="${gl_source_base_prefix}limits.h"
27992 fi
27993 ;;
27994 *) echo "*** GL_GENERATE_LIMITS_H is not set correctly" 1>&2; exit 1 ;;
27995 esac
27996
27997
27998 if $GL_GENERATE_LIMITS_H; then
27999 GL_GENERATE_LIMITS_H_TRUE=
28000 GL_GENERATE_LIMITS_H_FALSE='#'
28001 else
28002 GL_GENERATE_LIMITS_H_TRUE='#'
28003 GL_GENERATE_LIMITS_H_FALSE=
28004 fi
28005 :
28006 if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
28007 GL_GENERATE_LIMITS_H_TRUE='#'
28008 GL_GENERATE_LIMITS_H_FALSE='#'
28009 fi
28010
28011
28012
28013
28014
28015
28016
28017
28018 if test "$ac_cv_header_winsock2_h" = yes; then
28019 GL_COND_OBJ_LISTEN_TRUE=
28020 GL_COND_OBJ_LISTEN_FALSE='#'
28021 else
28022 GL_COND_OBJ_LISTEN_TRUE='#'
28023 GL_COND_OBJ_LISTEN_FALSE=
28024 fi
28025 :
28026 if test -z "${GL_COND_OBJ_LISTEN_TRUE}" && test -z "${GL_COND_OBJ_LISTEN_FALSE}"; then
28027 GL_COND_OBJ_LISTEN_TRUE='#'
28028 GL_COND_OBJ_LISTEN_FALSE='#'
28029 fi
28030
28031
28032
28033
28034
28035
28036
28037
28038
28039
28040 GL_GNULIB_LISTEN=1
28041
28042
28043
28044
28045
28046 $as_echo "#define GNULIB_TEST_LISTEN 1" >>confdefs.h
28047
28048
28049
28050
28051
28052
28053 LOCALCHARSET_TESTS_ENVIRONMENT=
28054
28055
28056
28057
28058
28059
28060
28061
28062
28063
28064 if test "$gl_threads_api" = posix; then
28065 # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
28066 # pthread_rwlock_* functions.
28067 has_rwlock=false
28068 ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
28069 "
28070 if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then :
28071 has_rwlock=true
28072
28073 $as_echo "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
28074
28075 fi
28076
28077 if $has_rwlock; then
28078
28079
28080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_rwlock_rdlock prefers a writer to a reader" >&5
28081 $as_echo_n "checking whether pthread_rwlock_rdlock prefers a writer to a reader... " >&6; }
28082 if ${gl_cv_pthread_rwlock_rdlock_prefer_writer+:} false; then :
28083 $as_echo_n "(cached) " >&6
28084 else
28085 save_LIBS="$LIBS"
28086 LIBS="$LIBS $LIBMULTITHREAD"
28087 if test "$cross_compiling" = yes; then :
28088 case "$host_os" in
28089 # Guess no on glibc systems.
28090 *-gnu* | gnu*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
28091 # Guess no on musl systems.
28092 *-musl*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
28093 # Guess no on bionic systems.
28094 *-android*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
28095 # Guess yes on native Windows with the mingw-w64 winpthreads library.
28096 # Guess no on native Windows with the gnulib windows-rwlock module.
28097 mingw*) if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
28098 gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing yes"
28099 else
28100 gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no"
28101 fi
28102 ;;
28103 # If we don't know, obey --enable-cross-guesses.
28104 *) gl_cv_pthread_rwlock_rdlock_prefer_writer="$gl_cross_guess_normal" ;;
28105 esac
28106
28107 else
28108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28109 /* end confdefs.h. */
28110
28111 #include <errno.h>
28112 #include <pthread.h>
28113 #include <stdlib.h>
28114 #include <unistd.h>
28115
28116 #define SUCCEED() exit (0)
28117 #define FAILURE() exit (1)
28118 #define UNEXPECTED(n) (exit (10 + (n)))
28119
28120 /* The main thread creates the waiting writer and the requesting reader threads
28121 in the default way; this guarantees that they have the same priority.
28122 We can reuse the main thread as first reader thread. */
28123
28124 static pthread_rwlock_t lock;
28125 static pthread_t reader1;
28126 static pthread_t writer;
28127 static pthread_t reader2;
28128 static pthread_t timer;
28129 /* Used to pass control from writer to reader2 and from reader2 to timer,
28130 as in a relay race.
28131 Passing control from one running thread to another running thread
28132 is most likely faster than to create the second thread. */
28133 static pthread_mutex_t baton;
28134
28135 static void *
28136 timer_func (void *ignored)
28137 {
28138 /* Step 13 (can be before or after step 12):
28139 The timer thread takes the baton, then waits a moment to make sure
28140 it can tell whether the second reader thread is blocked at step 12. */
28141 if (pthread_mutex_lock (&baton))
28142 UNEXPECTED (13);
28143 usleep (100000);
28144 /* By the time we get here, it's clear that the second reader thread is
28145 blocked at step 12. This is the desired behaviour. */
28146 SUCCEED ();
28147 }
28148
28149 static void *
28150 reader2_func (void *ignored)
28151 {
28152 int err;
28153
28154 /* Step 8 (can be before or after step 7):
28155 The second reader thread takes the baton, then waits a moment to make sure
28156 the writer thread has reached step 7. */
28157 if (pthread_mutex_lock (&baton))
28158 UNEXPECTED (8);
28159 usleep (100000);
28160 /* Step 9: The second reader thread requests the lock. */
28161 err = pthread_rwlock_tryrdlock (&lock);
28162 if (err == 0)
28163 FAILURE ();
28164 else if (err != EBUSY)
28165 UNEXPECTED (9);
28166 /* Step 10: Launch a timer, to test whether the next call blocks. */
28167 if (pthread_create (&timer, NULL, timer_func, NULL))
28168 UNEXPECTED (10);
28169 /* Step 11: Release the baton. */
28170 if (pthread_mutex_unlock (&baton))
28171 UNEXPECTED (11);
28172 /* Step 12: The second reader thread requests the lock. */
28173 err = pthread_rwlock_rdlock (&lock);
28174 if (err == 0)
28175 FAILURE ();
28176 else
28177 UNEXPECTED (12);
28178 }
28179
28180 static void *
28181 writer_func (void *ignored)
28182 {
28183 /* Step 4: Take the baton, so that the second reader thread does not go ahead
28184 too early. */
28185 if (pthread_mutex_lock (&baton))
28186 UNEXPECTED (4);
28187 /* Step 5: Create the second reader thread. */
28188 if (pthread_create (&reader2, NULL, reader2_func, NULL))
28189 UNEXPECTED (5);
28190 /* Step 6: Release the baton. */
28191 if (pthread_mutex_unlock (&baton))
28192 UNEXPECTED (6);
28193 /* Step 7: The writer thread requests the lock. */
28194 if (pthread_rwlock_wrlock (&lock))
28195 UNEXPECTED (7);
28196 return NULL;
28197 }
28198
28199 int
28200 main ()
28201 {
28202 reader1 = pthread_self ();
28203
28204 /* Step 1: The main thread initializes the lock and the baton. */
28205 if (pthread_rwlock_init (&lock, NULL))
28206 UNEXPECTED (1);
28207 if (pthread_mutex_init (&baton, NULL))
28208 UNEXPECTED (1);
28209 /* Step 2: The main thread acquires the lock as a reader. */
28210 if (pthread_rwlock_rdlock (&lock))
28211 UNEXPECTED (2);
28212 /* Step 3: Create the writer thread. */
28213 if (pthread_create (&writer, NULL, writer_func, NULL))
28214 UNEXPECTED (3);
28215 /* Job done. Go to sleep. */
28216 for (;;)
28217 {
28218 sleep (1);
28219 }
28220 }
28221
28222 _ACEOF
28223 if ac_fn_c_try_run "$LINENO"; then :
28224 gl_cv_pthread_rwlock_rdlock_prefer_writer=yes
28225 else
28226 gl_cv_pthread_rwlock_rdlock_prefer_writer=no
28227 fi
28228 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28229 conftest.$ac_objext conftest.beam conftest.$ac_ext
28230 fi
28231
28232 LIBS="$save_LIBS"
28233
28234 fi
28235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pthread_rwlock_rdlock_prefer_writer" >&5
28236 $as_echo "$gl_cv_pthread_rwlock_rdlock_prefer_writer" >&6; }
28237 case "$gl_cv_pthread_rwlock_rdlock_prefer_writer" in
28238 *yes)
28239
28240 $as_echo "#define HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER 1" >>confdefs.h
28241
28242 ;;
28243 esac
28244
28245 fi
28246 # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
28247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28248 /* end confdefs.h. */
28249
28250 #include <pthread.h>
28251 int
28252 main ()
28253 {
28254
28255 #if __FreeBSD__ == 4
28256 error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
28257 #elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \
28258 && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
28259 error "No, in Mac OS X < 10.7 recursive mutexes actually don't work."
28260 #else
28261 int x = (int)PTHREAD_MUTEX_RECURSIVE;
28262 return !x;
28263 #endif
28264
28265 ;
28266 return 0;
28267 }
28268 _ACEOF
28269 if ac_fn_c_try_compile "$LINENO"; then :
28270
28271 $as_echo "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h
28272
28273 fi
28274 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28275 fi
28276 :
28277
28278
28279
28280 cat >>confdefs.h <<_ACEOF
28281 #define GNULIB_LOCK 1
28282 _ACEOF
28283
28284
28285
28286
28287
28288
28289 if test $ac_cv_func_lstat = yes; then
28290
28291 case $host_os,$gl_cv_func_lstat_dereferences_slashed_symlink in
28292 solaris* | *no)
28293 REPLACE_LSTAT=1
28294 ;;
28295 esac
28296 else
28297 HAVE_LSTAT=0
28298 fi
28299
28300
28301 if test $REPLACE_LSTAT = 1; then
28302 GL_COND_OBJ_LSTAT_TRUE=
28303 GL_COND_OBJ_LSTAT_FALSE='#'
28304 else
28305 GL_COND_OBJ_LSTAT_TRUE='#'
28306 GL_COND_OBJ_LSTAT_FALSE=
28307 fi
28308 :
28309 if test -z "${GL_COND_OBJ_LSTAT_TRUE}" && test -z "${GL_COND_OBJ_LSTAT_FALSE}"; then
28310 GL_COND_OBJ_LSTAT_TRUE='#'
28311 GL_COND_OBJ_LSTAT_FALSE='#'
28312 fi
28313
28314 if test -z "$GL_COND_OBJ_LSTAT_TRUE"; then :
28315
28316 :
28317
28318 fi
28319
28320
28321
28322
28323
28324
28325
28326
28327
28328 GL_GNULIB_LSTAT=1
28329
28330
28331
28332
28333
28334 $as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
28335
28336
28337
28338
28339 if test $REPLACE_MALLOC_FOR_MALLOC_POSIX = 1; then
28340
28341
28342
28343
28344
28345
28346
28347
28348 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
28349
28350 fi
28351
28352
28353
28354
28355
28356
28357
28358
28359
28360 GL_GNULIB_MALLOC_POSIX=1
28361
28362
28363
28364
28365
28366 $as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
28367
28368
28369
28370
28371
28372
28373
28374
28375
28376
28377
28378
28379
28380
28381
28382
28383
28384
28385
28386
28387
28388
28389
28390
28391
28392
28393 if case "$host_os" in
28394 mingw*) true ;;
28395 *) test $ac_cv_func_mbsinit = yes ;;
28396 esac \
28397 && test $ac_cv_func_mbrtowc = yes; then
28398
28399
28400
28401
28402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
28403 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
28404 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
28405 $as_echo_n "(cached) " >&6
28406 else
28407
28408 case "$host_os" in
28409 # Guess no on AIX and OSF/1.
28410 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
28411 # Guess yes otherwise.
28412 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
28413 esac
28414 if test $LOCALE_JA != none; then
28415 if test "$cross_compiling" = yes; then :
28416 :
28417 else
28418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28419 /* end confdefs.h. */
28420
28421 #include <locale.h>
28422 #include <string.h>
28423 #include <wchar.h>
28424 int main ()
28425 {
28426 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
28427 {
28428 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
28429 mbstate_t state;
28430 wchar_t wc;
28431
28432 memset (&state, '\0', sizeof (mbstate_t));
28433 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
28434 if (mbsinit (&state))
28435 return 2;
28436 }
28437 return 0;
28438 }
28439 _ACEOF
28440 if ac_fn_c_try_run "$LINENO"; then :
28441 gl_cv_func_mbrtowc_incomplete_state=yes
28442 else
28443 gl_cv_func_mbrtowc_incomplete_state=no
28444 fi
28445 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28446 conftest.$ac_objext conftest.beam conftest.$ac_ext
28447 fi
28448
28449 else
28450 if test $LOCALE_FR_UTF8 != none; then
28451 if test "$cross_compiling" = yes; then :
28452 :
28453 else
28454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28455 /* end confdefs.h. */
28456
28457 #include <locale.h>
28458 #include <string.h>
28459 #include <wchar.h>
28460 int main ()
28461 {
28462 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
28463 {
28464 const char input[] = "B\303\274\303\237er"; /* "Büßer" */
28465 mbstate_t state;
28466 wchar_t wc;
28467
28468 memset (&state, '\0', sizeof (mbstate_t));
28469 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
28470 if (mbsinit (&state))
28471 return 2;
28472 }
28473 return 0;
28474 }
28475 _ACEOF
28476 if ac_fn_c_try_run "$LINENO"; then :
28477 gl_cv_func_mbrtowc_incomplete_state=yes
28478 else
28479 gl_cv_func_mbrtowc_incomplete_state=no
28480 fi
28481 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28482 conftest.$ac_objext conftest.beam conftest.$ac_ext
28483 fi
28484
28485 fi
28486 fi
28487
28488 fi
28489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
28490 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
28491
28492
28493
28494
28495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
28496 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
28497 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
28498 $as_echo_n "(cached) " >&6
28499 else
28500
28501 case "$host_os" in
28502 # Guess no on Solaris 8.
28503 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
28504 # Guess yes otherwise.
28505 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
28506 esac
28507 if test $LOCALE_ZH_CN != none; then
28508 if test "$cross_compiling" = yes; then :
28509 :
28510 else
28511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28512 /* end confdefs.h. */
28513
28514 #include <locale.h>
28515 #include <stdlib.h>
28516 #include <string.h>
28517 #include <wchar.h>
28518 int main ()
28519 {
28520 /* This fails on Solaris 8:
28521 mbrtowc returns 2, and sets wc to 0x00F0.
28522 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
28523 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
28524 {
28525 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
28526 mbstate_t state;
28527 wchar_t wc;
28528
28529 memset (&state, '\0', sizeof (mbstate_t));
28530 if (mbrtowc (&wc, input + 3, 6, &state) != 4
28531 && mbtowc (&wc, input + 3, 6) == 4)
28532 return 2;
28533 }
28534 return 0;
28535 }
28536 _ACEOF
28537 if ac_fn_c_try_run "$LINENO"; then :
28538 gl_cv_func_mbrtowc_sanitycheck=yes
28539 else
28540 gl_cv_func_mbrtowc_sanitycheck=no
28541 fi
28542 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28543 conftest.$ac_objext conftest.beam conftest.$ac_ext
28544 fi
28545
28546 fi
28547
28548 fi
28549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
28550 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
28551
28552 REPLACE_MBSTATE_T=0
28553 case "$gl_cv_func_mbrtowc_incomplete_state" in
28554 *yes) ;;
28555 *) REPLACE_MBSTATE_T=1 ;;
28556 esac
28557 case "$gl_cv_func_mbrtowc_sanitycheck" in
28558 *yes) ;;
28559 *) REPLACE_MBSTATE_T=1 ;;
28560 esac
28561 else
28562 REPLACE_MBSTATE_T=1
28563 fi
28564
28565
28566
28567 if test $ac_cv_func_mbrtowc = no; then
28568 HAVE_MBRTOWC=0
28569 ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
28570 #include <wchar.h>
28571
28572 "
28573 if test "x$ac_cv_have_decl_mbrtowc" = xyes; then :
28574 ac_have_decl=1
28575 else
28576 ac_have_decl=0
28577 fi
28578
28579 cat >>confdefs.h <<_ACEOF
28580 #define HAVE_DECL_MBRTOWC $ac_have_decl
28581 _ACEOF
28582
28583 if test $ac_cv_have_decl_mbrtowc = yes; then
28584 REPLACE_MBRTOWC=1
28585 fi
28586 else
28587 if test $REPLACE_MBSTATE_T = 1; then
28588 REPLACE_MBRTOWC=1
28589 else
28590
28591
28592
28593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
28594 $as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
28595 if ${gl_cv_func_mbrtowc_null_arg1+:} false; then :
28596 $as_echo_n "(cached) " >&6
28597 else
28598
28599 case "$host_os" in
28600 # Guess no on Solaris.
28601 solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
28602 # Guess yes otherwise.
28603 *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
28604 esac
28605 if test $LOCALE_FR_UTF8 != none; then
28606 if test "$cross_compiling" = yes; then :
28607 :
28608 else
28609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28610 /* end confdefs.h. */
28611
28612 #include <locale.h>
28613 #include <stdlib.h>
28614 #include <string.h>
28615 #include <wchar.h>
28616 int main ()
28617 {
28618 int result = 0;
28619
28620 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
28621 {
28622 char input[] = "\303\237er";
28623 mbstate_t state;
28624 wchar_t wc;
28625 size_t ret;
28626
28627 memset (&state, '\0', sizeof (mbstate_t));
28628 wc = (wchar_t) 0xBADFACE;
28629 ret = mbrtowc (&wc, input, 5, &state);
28630 if (ret != 2)
28631 result |= 1;
28632 if (!mbsinit (&state))
28633 result |= 2;
28634
28635 memset (&state, '\0', sizeof (mbstate_t));
28636 ret = mbrtowc (NULL, input, 5, &state);
28637 if (ret != 2) /* Solaris 7 fails here: ret is -1. */
28638 result |= 4;
28639 if (!mbsinit (&state))
28640 result |= 8;
28641 }
28642 return result;
28643 }
28644 _ACEOF
28645 if ac_fn_c_try_run "$LINENO"; then :
28646 gl_cv_func_mbrtowc_null_arg1=yes
28647 else
28648 gl_cv_func_mbrtowc_null_arg1=no
28649 fi
28650 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28651 conftest.$ac_objext conftest.beam conftest.$ac_ext
28652 fi
28653
28654 fi
28655
28656 fi
28657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
28658 $as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; }
28659
28660
28661
28662
28663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
28664 $as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
28665 if ${gl_cv_func_mbrtowc_null_arg2+:} false; then :
28666 $as_echo_n "(cached) " >&6
28667 else
28668
28669 case "$host_os" in
28670 # Guess no on OSF/1.
28671 osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
28672 # Guess yes otherwise.
28673 *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
28674 esac
28675 if test $LOCALE_FR_UTF8 != none; then
28676 if test "$cross_compiling" = yes; then :
28677 :
28678 else
28679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28680 /* end confdefs.h. */
28681
28682 #include <locale.h>
28683 #include <string.h>
28684 #include <wchar.h>
28685 int main ()
28686 {
28687 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
28688 {
28689 mbstate_t state;
28690 wchar_t wc;
28691 int ret;
28692
28693 memset (&state, '\0', sizeof (mbstate_t));
28694 wc = (wchar_t) 0xBADFACE;
28695 mbrtowc (&wc, NULL, 5, &state);
28696 /* Check that wc was not modified. */
28697 if (wc != (wchar_t) 0xBADFACE)
28698 return 2;
28699 }
28700 return 0;
28701 }
28702 _ACEOF
28703 if ac_fn_c_try_run "$LINENO"; then :
28704 gl_cv_func_mbrtowc_null_arg2=yes
28705 else
28706 gl_cv_func_mbrtowc_null_arg2=no
28707 fi
28708 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28709 conftest.$ac_objext conftest.beam conftest.$ac_ext
28710 fi
28711
28712 fi
28713
28714 fi
28715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
28716 $as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; }
28717
28718
28719
28720
28721
28722
28723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
28724 $as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
28725 if ${gl_cv_func_mbrtowc_retval+:} false; then :
28726 $as_echo_n "(cached) " >&6
28727 else
28728
28729 case "$host_os" in
28730 # Guess no on HP-UX, Solaris, native Windows.
28731 hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
28732 # Guess yes otherwise.
28733 *) gl_cv_func_mbrtowc_retval="guessing yes" ;;
28734 esac
28735 if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
28736 || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
28737 if test "$cross_compiling" = yes; then :
28738 :
28739 else
28740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28741 /* end confdefs.h. */
28742
28743 #include <locale.h>
28744 #include <string.h>
28745 #include <wchar.h>
28746 int main ()
28747 {
28748 int result = 0;
28749 int found_some_locale = 0;
28750 /* This fails on Solaris. */
28751 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
28752 {
28753 char input[] = "B\303\274\303\237er"; /* "Büßer" */
28754 mbstate_t state;
28755 wchar_t wc;
28756
28757 memset (&state, '\0', sizeof (mbstate_t));
28758 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
28759 {
28760 input[1] = '\0';
28761 if (mbrtowc (&wc, input + 2, 5, &state) != 1)
28762 result |= 1;
28763 }
28764 found_some_locale = 1;
28765 }
28766 /* This fails on HP-UX 11.11. */
28767 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
28768 {
28769 char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
28770 mbstate_t state;
28771 wchar_t wc;
28772
28773 memset (&state, '\0', sizeof (mbstate_t));
28774 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
28775 {
28776 input[1] = '\0';
28777 if (mbrtowc (&wc, input + 2, 5, &state) != 2)
28778 result |= 2;
28779 }
28780 found_some_locale = 1;
28781 }
28782 /* This fails on native Windows. */
28783 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
28784 {
28785 char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
28786 mbstate_t state;
28787 wchar_t wc;
28788
28789 memset (&state, '\0', sizeof (mbstate_t));
28790 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
28791 {
28792 input[3] = '\0';
28793 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
28794 result |= 4;
28795 }
28796 found_some_locale = 1;
28797 }
28798 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
28799 {
28800 char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
28801 mbstate_t state;
28802 wchar_t wc;
28803
28804 memset (&state, '\0', sizeof (mbstate_t));
28805 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
28806 {
28807 input[3] = '\0';
28808 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
28809 result |= 8;
28810 }
28811 found_some_locale = 1;
28812 }
28813 if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
28814 {
28815 char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
28816 mbstate_t state;
28817 wchar_t wc;
28818
28819 memset (&state, '\0', sizeof (mbstate_t));
28820 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
28821 {
28822 input[3] = '\0';
28823 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
28824 result |= 16;
28825 }
28826 found_some_locale = 1;
28827 }
28828 return (found_some_locale ? result : 77);
28829 }
28830 _ACEOF
28831 if ac_fn_c_try_run "$LINENO"; then :
28832 gl_cv_func_mbrtowc_retval=yes
28833 else
28834 if test $? != 77; then
28835 gl_cv_func_mbrtowc_retval=no
28836 fi
28837
28838 fi
28839 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28840 conftest.$ac_objext conftest.beam conftest.$ac_ext
28841 fi
28842
28843 fi
28844
28845 fi
28846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
28847 $as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
28848
28849
28850
28851
28852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
28853 $as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
28854 if ${gl_cv_func_mbrtowc_nul_retval+:} false; then :
28855 $as_echo_n "(cached) " >&6
28856 else
28857
28858 case "$host_os" in
28859 # Guess no on Solaris 8 and 9.
28860 solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
28861 # Guess yes otherwise.
28862 *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
28863 esac
28864 if test $LOCALE_ZH_CN != none; then
28865 if test "$cross_compiling" = yes; then :
28866 :
28867 else
28868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28869 /* end confdefs.h. */
28870
28871 #include <locale.h>
28872 #include <string.h>
28873 #include <wchar.h>
28874 int main ()
28875 {
28876 /* This fails on Solaris 8 and 9. */
28877 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
28878 {
28879 mbstate_t state;
28880 wchar_t wc;
28881
28882 memset (&state, '\0', sizeof (mbstate_t));
28883 if (mbrtowc (&wc, "", 1, &state) != 0)
28884 return 2;
28885 }
28886 return 0;
28887 }
28888 _ACEOF
28889 if ac_fn_c_try_run "$LINENO"; then :
28890 gl_cv_func_mbrtowc_nul_retval=yes
28891 else
28892 gl_cv_func_mbrtowc_nul_retval=no
28893 fi
28894 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28895 conftest.$ac_objext conftest.beam conftest.$ac_ext
28896 fi
28897
28898 fi
28899
28900 fi
28901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
28902 $as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
28903
28904
28905
28906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc stores incomplete characters" >&5
28907 $as_echo_n "checking whether mbrtowc stores incomplete characters... " >&6; }
28908 if ${gl_cv_func_mbrtowc_stores_incomplete+:} false; then :
28909 $as_echo_n "(cached) " >&6
28910 else
28911
28912 case "$host_os" in
28913 # Guess yes on native Windows.
28914 mingw*) gl_cv_func_mbrtowc_stores_incomplete="guessing yes" ;;
28915 *) gl_cv_func_mbrtowc_stores_incomplete="guessing no" ;;
28916 esac
28917 case "$host_os" in
28918 mingw*)
28919 if test "$cross_compiling" = yes; then :
28920 :
28921 else
28922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28923 /* end confdefs.h. */
28924
28925 #include <locale.h>
28926 #include <string.h>
28927 #include <wchar.h>
28928 int main ()
28929 {
28930 int result = 0;
28931 if (setlocale (LC_ALL, "French_France.65001") != NULL)
28932 {
28933 wchar_t wc = (wchar_t) 0xBADFACE;
28934 mbstate_t state;
28935
28936 memset (&state, '\0', sizeof (mbstate_t));
28937 if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2)
28938 && wc != (wchar_t) 0xBADFACE)
28939 result |= 1;
28940 }
28941 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
28942 {
28943 wchar_t wc = (wchar_t) 0xBADFACE;
28944 mbstate_t state;
28945
28946 memset (&state, '\0', sizeof (mbstate_t));
28947 if (mbrtowc (&wc, "\226", 1, &state) == (size_t)(-2)
28948 && wc != (wchar_t) 0xBADFACE)
28949 result |= 2;
28950 }
28951 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
28952 {
28953 wchar_t wc = (wchar_t) 0xBADFACE;
28954 mbstate_t state;
28955
28956 memset (&state, '\0', sizeof (mbstate_t));
28957 if (mbrtowc (&wc, "\245", 1, &state) == (size_t)(-2)
28958 && wc != (wchar_t) 0xBADFACE)
28959 result |= 4;
28960 }
28961 if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
28962 {
28963 wchar_t wc = (wchar_t) 0xBADFACE;
28964 mbstate_t state;
28965
28966 memset (&state, '\0', sizeof (mbstate_t));
28967 if (mbrtowc (&wc, "\261", 1, &state) == (size_t)(-2)
28968 && wc != (wchar_t) 0xBADFACE)
28969 result |= 8;
28970 }
28971 return result;
28972 }
28973 _ACEOF
28974 if ac_fn_c_try_run "$LINENO"; then :
28975 gl_cv_func_mbrtowc_stores_incomplete=no
28976 else
28977 gl_cv_func_mbrtowc_stores_incomplete=yes
28978 fi
28979 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28980 conftest.$ac_objext conftest.beam conftest.$ac_ext
28981 fi
28982
28983 ;;
28984 *)
28985
28986 if test $LOCALE_FR_UTF8 != none; then
28987 if test "$cross_compiling" = yes; then :
28988 :
28989 else
28990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28991 /* end confdefs.h. */
28992
28993 #include <locale.h>
28994 #include <string.h>
28995 #include <wchar.h>
28996 int main ()
28997 {
28998 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
28999 {
29000 wchar_t wc = (wchar_t) 0xBADFACE;
29001 mbstate_t state;
29002
29003 memset (&state, '\0', sizeof (mbstate_t));
29004 if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2)
29005 && wc != (wchar_t) 0xBADFACE)
29006 return 1;
29007 }
29008 return 0;
29009 }
29010 _ACEOF
29011 if ac_fn_c_try_run "$LINENO"; then :
29012 gl_cv_func_mbrtowc_stores_incomplete=no
29013 else
29014 gl_cv_func_mbrtowc_stores_incomplete=yes
29015 fi
29016 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29017 conftest.$ac_objext conftest.beam conftest.$ac_ext
29018 fi
29019
29020 fi
29021 ;;
29022 esac
29023
29024 fi
29025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_stores_incomplete" >&5
29026 $as_echo "$gl_cv_func_mbrtowc_stores_incomplete" >&6; }
29027
29028
29029
29030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5
29031 $as_echo_n "checking whether mbrtowc works on empty input... " >&6; }
29032 if ${gl_cv_func_mbrtowc_empty_input+:} false; then :
29033 $as_echo_n "(cached) " >&6
29034 else
29035
29036 case "$host_os" in
29037 # Guess no on AIX and glibc systems.
29038 aix* | *-gnu* | gnu*) gl_cv_func_mbrtowc_empty_input="guessing no" ;;
29039 # Guess yes on native Windows.
29040 mingw*) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
29041 *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
29042 esac
29043 if test "$cross_compiling" = yes; then :
29044 :
29045 else
29046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29047 /* end confdefs.h. */
29048
29049 #include <wchar.h>
29050 static wchar_t wc;
29051 static mbstate_t mbs;
29052 int
29053 main (void)
29054 {
29055 return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
29056 }
29057 _ACEOF
29058 if ac_fn_c_try_run "$LINENO"; then :
29059 gl_cv_func_mbrtowc_empty_input=yes
29060 else
29061 gl_cv_func_mbrtowc_empty_input=no
29062 fi
29063 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29064 conftest.$ac_objext conftest.beam conftest.$ac_ext
29065 fi
29066
29067
29068 fi
29069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5
29070 $as_echo "$gl_cv_func_mbrtowc_empty_input" >&6; }
29071
29072
29073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
29074 $as_echo_n "checking whether the C locale is free of encoding errors... " >&6; }
29075 if ${gl_cv_func_mbrtowc_C_locale_sans_EILSEQ+:} false; then :
29076 $as_echo_n "(cached) " >&6
29077 else
29078
29079 gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="$gl_cross_guess_normal"
29080
29081 if test "$cross_compiling" = yes; then :
29082 case "$host_os" in
29083 # Guess yes on native Windows.
29084 mingw*) gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="guessing yes" ;;
29085 esac
29086
29087 else
29088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29089 /* end confdefs.h. */
29090 #include <limits.h>
29091 #include <locale.h>
29092 #include <wchar.h>
29093
29094 int
29095 main ()
29096 {
29097
29098 int i;
29099 char *locale = setlocale (LC_ALL, "C");
29100 if (! locale)
29101 return 2;
29102 for (i = CHAR_MIN; i <= CHAR_MAX; i++)
29103 {
29104 char c = i;
29105 wchar_t wc;
29106 mbstate_t mbs = { 0, };
29107 size_t ss = mbrtowc (&wc, &c, 1, &mbs);
29108 if (1 < ss)
29109 return 3;
29110 }
29111 return 0;
29112
29113 ;
29114 return 0;
29115 }
29116 _ACEOF
29117 if ac_fn_c_try_run "$LINENO"; then :
29118 gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=yes
29119 else
29120 gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=no
29121 fi
29122 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29123 conftest.$ac_objext conftest.beam conftest.$ac_ext
29124 fi
29125
29126
29127 fi
29128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&5
29129 $as_echo "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&6; }
29130
29131 case "$gl_cv_func_mbrtowc_null_arg1" in
29132 *yes) ;;
29133 *)
29134 $as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
29135
29136 REPLACE_MBRTOWC=1
29137 ;;
29138 esac
29139 case "$gl_cv_func_mbrtowc_null_arg2" in
29140 *yes) ;;
29141 *)
29142 $as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
29143
29144 REPLACE_MBRTOWC=1
29145 ;;
29146 esac
29147 case "$gl_cv_func_mbrtowc_retval" in
29148 *yes) ;;
29149 *)
29150 $as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
29151
29152 REPLACE_MBRTOWC=1
29153 ;;
29154 esac
29155 case "$gl_cv_func_mbrtowc_nul_retval" in
29156 *yes) ;;
29157 *)
29158 $as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
29159
29160 REPLACE_MBRTOWC=1
29161 ;;
29162 esac
29163 case "$gl_cv_func_mbrtowc_stores_incomplete" in
29164 *no) ;;
29165 *)
29166 $as_echo "#define MBRTOWC_STORES_INCOMPLETE_BUG 1" >>confdefs.h
29167
29168 REPLACE_MBRTOWC=1
29169 ;;
29170 esac
29171 case "$gl_cv_func_mbrtowc_empty_input" in
29172 *yes) ;;
29173 *)
29174 $as_echo "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h
29175
29176 REPLACE_MBRTOWC=1
29177 ;;
29178 esac
29179 case "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" in
29180 *yes) ;;
29181 *)
29182 $as_echo "#define MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
29183
29184 REPLACE_MBRTOWC=1
29185 ;;
29186 esac
29187 fi
29188 fi
29189 if test $REPLACE_MBSTATE_T = 1; then
29190 case "$host_os" in
29191 mingw*) LIB_MBRTOWC= ;;
29192 *)
29193
29194
29195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
29196 $as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
29197 if ${gl_cv_have_weak+:} false; then :
29198 $as_echo_n "(cached) " >&6
29199 else
29200 case "$host_os" in
29201 cygwin*)
29202 gl_cv_have_weak="guessing no"
29203 ;;
29204 *)
29205 gl_cv_have_weak=no
29206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29207 /* end confdefs.h. */
29208 extern void xyzzy ();
29209 #pragma weak xyzzy
29210 int
29211 main ()
29212 {
29213 xyzzy();
29214 ;
29215 return 0;
29216 }
29217 _ACEOF
29218 if ac_fn_c_try_link "$LINENO"; then :
29219 gl_cv_have_weak=maybe
29220 fi
29221 rm -f core conftest.err conftest.$ac_objext \
29222 conftest$ac_exeext conftest.$ac_ext
29223 if test $gl_cv_have_weak = maybe; then
29224 if test "$cross_compiling" = yes; then :
29225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29226 /* end confdefs.h. */
29227 #ifdef __ELF__
29228 Extensible Linking Format
29229 #endif
29230
29231 _ACEOF
29232 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
29233 $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
29234 gl_cv_have_weak="guessing yes"
29235 else
29236 gl_cv_have_weak="guessing no"
29237 fi
29238 rm -f conftest*
29239
29240
29241 else
29242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29243 /* end confdefs.h. */
29244
29245 #include <stdio.h>
29246 #pragma weak fputs
29247 int main ()
29248 {
29249 return (fputs == NULL);
29250 }
29251 _ACEOF
29252 if ac_fn_c_try_run "$LINENO"; then :
29253 gl_cv_have_weak=yes
29254 else
29255 gl_cv_have_weak=no
29256 fi
29257 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29258 conftest.$ac_objext conftest.beam conftest.$ac_ext
29259 fi
29260
29261 fi
29262 ;;
29263 esac
29264 case " $LDFLAGS " in
29265 *" -static "*) gl_cv_have_weak=no ;;
29266 esac
29267 case "$gl_cv_have_weak" in
29268 *yes)
29269 case "$host_os" in
29270 freebsd* | dragonfly* | midnightbsd*)
29271 : > conftest1.c
29272 $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
29273 cat <<EOF > conftest2.c
29274 #include <pthread.h>
29275 #pragma weak pthread_mutexattr_gettype
29276 int main ()
29277 {
29278 return (pthread_mutexattr_gettype != NULL);
29279 }
29280 EOF
29281 $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
29282 || gl_cv_have_weak=no
29283 rm -f conftest1.c libempty.so conftest2.c conftest
29284 ;;
29285 esac
29286 ;;
29287 esac
29288
29289 fi
29290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
29291 $as_echo "$gl_cv_have_weak" >&6; }
29292 case "$gl_cv_have_weak" in
29293 *yes)
29294
29295 $as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
29296
29297 ;;
29298 esac
29299
29300 case "$gl_cv_have_weak" in
29301 *yes) LIB_MBRTOWC= ;;
29302 *) LIB_MBRTOWC="$LIBPTHREAD" ;;
29303 esac
29304 ;;
29305 esac
29306 else
29307 LIB_MBRTOWC=
29308 fi
29309
29310
29311
29312 if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
29313 GL_COND_OBJ_MBRTOWC_TRUE=
29314 GL_COND_OBJ_MBRTOWC_FALSE='#'
29315 else
29316 GL_COND_OBJ_MBRTOWC_TRUE='#'
29317 GL_COND_OBJ_MBRTOWC_FALSE=
29318 fi
29319 :
29320 if test -z "${GL_COND_OBJ_MBRTOWC_TRUE}" && test -z "${GL_COND_OBJ_MBRTOWC_FALSE}"; then
29321 GL_COND_OBJ_MBRTOWC_TRUE='#'
29322 GL_COND_OBJ_MBRTOWC_FALSE='#'
29323 fi
29324
29325 if test -z "$GL_COND_OBJ_MBRTOWC_TRUE"; then :
29326
29327 if test $REPLACE_MBSTATE_T = 1; then
29328
29329
29330
29331
29332
29333
29334
29335
29336 gl_LIBOBJS="$gl_LIBOBJS lc-charset-dispatch.$ac_objext"
29337
29338
29339
29340
29341
29342
29343
29344
29345
29346 gl_LIBOBJS="$gl_LIBOBJS mbtowc-lock.$ac_objext"
29347
29348
29349
29350
29351 CFLAG_VISIBILITY=
29352 HAVE_VISIBILITY=0
29353 if test -n "$GCC"; then
29354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
29355 $as_echo_n "checking whether the -Werror option is usable... " >&6; }
29356 if ${gl_cv_cc_vis_werror+:} false; then :
29357 $as_echo_n "(cached) " >&6
29358 else
29359 gl_save_CFLAGS="$CFLAGS"
29360 CFLAGS="$CFLAGS -Werror"
29361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29362 /* end confdefs.h. */
29363
29364 int
29365 main ()
29366 {
29367
29368 ;
29369 return 0;
29370 }
29371 _ACEOF
29372 if ac_fn_c_try_compile "$LINENO"; then :
29373 gl_cv_cc_vis_werror=yes
29374 else
29375 gl_cv_cc_vis_werror=no
29376 fi
29377 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29378 CFLAGS="$gl_save_CFLAGS"
29379
29380 fi
29381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
29382 $as_echo "$gl_cv_cc_vis_werror" >&6; }
29383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
29384 $as_echo_n "checking for simple visibility declarations... " >&6; }
29385 if ${gl_cv_cc_visibility+:} false; then :
29386 $as_echo_n "(cached) " >&6
29387 else
29388 gl_save_CFLAGS="$CFLAGS"
29389 CFLAGS="$CFLAGS -fvisibility=hidden"
29390 if test $gl_cv_cc_vis_werror = yes; then
29391 CFLAGS="$CFLAGS -Werror"
29392 fi
29393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29394 /* end confdefs.h. */
29395 extern __attribute__((__visibility__("hidden"))) int hiddenvar;
29396 extern __attribute__((__visibility__("default"))) int exportedvar;
29397 extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
29398 extern __attribute__((__visibility__("default"))) int exportedfunc (void);
29399 void dummyfunc (void);
29400 int hiddenvar;
29401 int exportedvar;
29402 int hiddenfunc (void) { return 51; }
29403 int exportedfunc (void) { return 1225736919; }
29404 void dummyfunc (void) {}
29405
29406 int
29407 main ()
29408 {
29409
29410 ;
29411 return 0;
29412 }
29413 _ACEOF
29414 if ac_fn_c_try_compile "$LINENO"; then :
29415 gl_cv_cc_visibility=yes
29416 else
29417 gl_cv_cc_visibility=no
29418 fi
29419 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29420 CFLAGS="$gl_save_CFLAGS"
29421
29422 fi
29423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
29424 $as_echo "$gl_cv_cc_visibility" >&6; }
29425 if test $gl_cv_cc_visibility = yes; then
29426 CFLAG_VISIBILITY="-fvisibility=hidden"
29427 HAVE_VISIBILITY=1
29428 fi
29429 fi
29430
29431
29432
29433 cat >>confdefs.h <<_ACEOF
29434 #define HAVE_VISIBILITY $HAVE_VISIBILITY
29435 _ACEOF
29436
29437
29438
29439 fi
29440
29441
29442 :
29443
29444
29445 fi
29446
29447
29448
29449
29450
29451
29452
29453
29454
29455
29456
29457
29458
29459
29460 GL_GNULIB_MBRTOWC=1
29461
29462
29463
29464
29465
29466 $as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
29467
29468
29469
29470
29471
29472
29473
29474
29475
29476
29477
29478
29479
29480
29481
29482 if case "$host_os" in
29483 mingw*) true ;;
29484 *) test $ac_cv_func_mbsinit = yes ;;
29485 esac \
29486 && test $ac_cv_func_mbrtowc = yes; then
29487
29488
29489
29490
29491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
29492 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
29493 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
29494 $as_echo_n "(cached) " >&6
29495 else
29496
29497 case "$host_os" in
29498 # Guess no on AIX and OSF/1.
29499 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
29500 # Guess yes otherwise.
29501 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
29502 esac
29503 if test $LOCALE_JA != none; then
29504 if test "$cross_compiling" = yes; then :
29505 :
29506 else
29507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29508 /* end confdefs.h. */
29509
29510 #include <locale.h>
29511 #include <string.h>
29512 #include <wchar.h>
29513 int main ()
29514 {
29515 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
29516 {
29517 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
29518 mbstate_t state;
29519 wchar_t wc;
29520
29521 memset (&state, '\0', sizeof (mbstate_t));
29522 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
29523 if (mbsinit (&state))
29524 return 2;
29525 }
29526 return 0;
29527 }
29528 _ACEOF
29529 if ac_fn_c_try_run "$LINENO"; then :
29530 gl_cv_func_mbrtowc_incomplete_state=yes
29531 else
29532 gl_cv_func_mbrtowc_incomplete_state=no
29533 fi
29534 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29535 conftest.$ac_objext conftest.beam conftest.$ac_ext
29536 fi
29537
29538 else
29539 if test $LOCALE_FR_UTF8 != none; then
29540 if test "$cross_compiling" = yes; then :
29541 :
29542 else
29543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29544 /* end confdefs.h. */
29545
29546 #include <locale.h>
29547 #include <string.h>
29548 #include <wchar.h>
29549 int main ()
29550 {
29551 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
29552 {
29553 const char input[] = "B\303\274\303\237er"; /* "Büßer" */
29554 mbstate_t state;
29555 wchar_t wc;
29556
29557 memset (&state, '\0', sizeof (mbstate_t));
29558 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
29559 if (mbsinit (&state))
29560 return 2;
29561 }
29562 return 0;
29563 }
29564 _ACEOF
29565 if ac_fn_c_try_run "$LINENO"; then :
29566 gl_cv_func_mbrtowc_incomplete_state=yes
29567 else
29568 gl_cv_func_mbrtowc_incomplete_state=no
29569 fi
29570 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29571 conftest.$ac_objext conftest.beam conftest.$ac_ext
29572 fi
29573
29574 fi
29575 fi
29576
29577 fi
29578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
29579 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
29580
29581
29582
29583
29584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
29585 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
29586 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
29587 $as_echo_n "(cached) " >&6
29588 else
29589
29590 case "$host_os" in
29591 # Guess no on Solaris 8.
29592 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
29593 # Guess yes otherwise.
29594 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
29595 esac
29596 if test $LOCALE_ZH_CN != none; then
29597 if test "$cross_compiling" = yes; then :
29598 :
29599 else
29600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29601 /* end confdefs.h. */
29602
29603 #include <locale.h>
29604 #include <stdlib.h>
29605 #include <string.h>
29606 #include <wchar.h>
29607 int main ()
29608 {
29609 /* This fails on Solaris 8:
29610 mbrtowc returns 2, and sets wc to 0x00F0.
29611 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
29612 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
29613 {
29614 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
29615 mbstate_t state;
29616 wchar_t wc;
29617
29618 memset (&state, '\0', sizeof (mbstate_t));
29619 if (mbrtowc (&wc, input + 3, 6, &state) != 4
29620 && mbtowc (&wc, input + 3, 6) == 4)
29621 return 2;
29622 }
29623 return 0;
29624 }
29625 _ACEOF
29626 if ac_fn_c_try_run "$LINENO"; then :
29627 gl_cv_func_mbrtowc_sanitycheck=yes
29628 else
29629 gl_cv_func_mbrtowc_sanitycheck=no
29630 fi
29631 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29632 conftest.$ac_objext conftest.beam conftest.$ac_ext
29633 fi
29634
29635 fi
29636
29637 fi
29638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
29639 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
29640
29641 REPLACE_MBSTATE_T=0
29642 case "$gl_cv_func_mbrtowc_incomplete_state" in
29643 *yes) ;;
29644 *) REPLACE_MBSTATE_T=1 ;;
29645 esac
29646 case "$gl_cv_func_mbrtowc_sanitycheck" in
29647 *yes) ;;
29648 *) REPLACE_MBSTATE_T=1 ;;
29649 esac
29650 else
29651 REPLACE_MBSTATE_T=1
29652 fi
29653
29654
29655
29656 if test $ac_cv_func_mbsinit = no; then
29657 HAVE_MBSINIT=0
29658 ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
29659 #include <wchar.h>
29660
29661 "
29662 if test "x$ac_cv_have_decl_mbsinit" = xyes; then :
29663 ac_have_decl=1
29664 else
29665 ac_have_decl=0
29666 fi
29667
29668 cat >>confdefs.h <<_ACEOF
29669 #define HAVE_DECL_MBSINIT $ac_have_decl
29670 _ACEOF
29671
29672 if test $ac_cv_have_decl_mbsinit = yes; then
29673 REPLACE_MBSINIT=1
29674 fi
29675 else
29676 if test $REPLACE_MBSTATE_T = 1; then
29677 REPLACE_MBSINIT=1
29678 else
29679 case "$host_os" in
29680 mingw*) REPLACE_MBSINIT=1 ;;
29681 esac
29682 fi
29683 fi
29684
29685
29686 if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
29687 GL_COND_OBJ_MBSINIT_TRUE=
29688 GL_COND_OBJ_MBSINIT_FALSE='#'
29689 else
29690 GL_COND_OBJ_MBSINIT_TRUE='#'
29691 GL_COND_OBJ_MBSINIT_FALSE=
29692 fi
29693 :
29694 if test -z "${GL_COND_OBJ_MBSINIT_TRUE}" && test -z "${GL_COND_OBJ_MBSINIT_FALSE}"; then
29695 GL_COND_OBJ_MBSINIT_TRUE='#'
29696 GL_COND_OBJ_MBSINIT_FALSE='#'
29697 fi
29698
29699 if test -z "$GL_COND_OBJ_MBSINIT_TRUE"; then :
29700
29701
29702 :
29703
29704
29705 fi
29706
29707
29708
29709
29710
29711
29712
29713
29714
29715
29716
29717
29718
29719
29720 GL_GNULIB_MBSINIT=1
29721
29722
29723
29724
29725
29726 $as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
29727
29728
29729
29730
29731
29732
29733
29734
29735
29736
29737
29738
29739
29740
29741 if case "$host_os" in
29742 mingw*) true ;;
29743 *) test $ac_cv_func_mbsinit = yes ;;
29744 esac \
29745 && test $ac_cv_func_mbrtowc = yes; then
29746
29747
29748
29749
29750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
29751 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
29752 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
29753 $as_echo_n "(cached) " >&6
29754 else
29755
29756 case "$host_os" in
29757 # Guess no on AIX and OSF/1.
29758 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
29759 # Guess yes otherwise.
29760 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
29761 esac
29762 if test $LOCALE_JA != none; then
29763 if test "$cross_compiling" = yes; then :
29764 :
29765 else
29766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29767 /* end confdefs.h. */
29768
29769 #include <locale.h>
29770 #include <string.h>
29771 #include <wchar.h>
29772 int main ()
29773 {
29774 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
29775 {
29776 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
29777 mbstate_t state;
29778 wchar_t wc;
29779
29780 memset (&state, '\0', sizeof (mbstate_t));
29781 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
29782 if (mbsinit (&state))
29783 return 2;
29784 }
29785 return 0;
29786 }
29787 _ACEOF
29788 if ac_fn_c_try_run "$LINENO"; then :
29789 gl_cv_func_mbrtowc_incomplete_state=yes
29790 else
29791 gl_cv_func_mbrtowc_incomplete_state=no
29792 fi
29793 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29794 conftest.$ac_objext conftest.beam conftest.$ac_ext
29795 fi
29796
29797 else
29798 if test $LOCALE_FR_UTF8 != none; then
29799 if test "$cross_compiling" = yes; then :
29800 :
29801 else
29802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29803 /* end confdefs.h. */
29804
29805 #include <locale.h>
29806 #include <string.h>
29807 #include <wchar.h>
29808 int main ()
29809 {
29810 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
29811 {
29812 const char input[] = "B\303\274\303\237er"; /* "Büßer" */
29813 mbstate_t state;
29814 wchar_t wc;
29815
29816 memset (&state, '\0', sizeof (mbstate_t));
29817 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
29818 if (mbsinit (&state))
29819 return 2;
29820 }
29821 return 0;
29822 }
29823 _ACEOF
29824 if ac_fn_c_try_run "$LINENO"; then :
29825 gl_cv_func_mbrtowc_incomplete_state=yes
29826 else
29827 gl_cv_func_mbrtowc_incomplete_state=no
29828 fi
29829 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29830 conftest.$ac_objext conftest.beam conftest.$ac_ext
29831 fi
29832
29833 fi
29834 fi
29835
29836 fi
29837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
29838 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
29839
29840
29841
29842
29843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
29844 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
29845 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
29846 $as_echo_n "(cached) " >&6
29847 else
29848
29849 case "$host_os" in
29850 # Guess no on Solaris 8.
29851 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
29852 # Guess yes otherwise.
29853 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
29854 esac
29855 if test $LOCALE_ZH_CN != none; then
29856 if test "$cross_compiling" = yes; then :
29857 :
29858 else
29859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29860 /* end confdefs.h. */
29861
29862 #include <locale.h>
29863 #include <stdlib.h>
29864 #include <string.h>
29865 #include <wchar.h>
29866 int main ()
29867 {
29868 /* This fails on Solaris 8:
29869 mbrtowc returns 2, and sets wc to 0x00F0.
29870 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
29871 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
29872 {
29873 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
29874 mbstate_t state;
29875 wchar_t wc;
29876
29877 memset (&state, '\0', sizeof (mbstate_t));
29878 if (mbrtowc (&wc, input + 3, 6, &state) != 4
29879 && mbtowc (&wc, input + 3, 6) == 4)
29880 return 2;
29881 }
29882 return 0;
29883 }
29884 _ACEOF
29885 if ac_fn_c_try_run "$LINENO"; then :
29886 gl_cv_func_mbrtowc_sanitycheck=yes
29887 else
29888 gl_cv_func_mbrtowc_sanitycheck=no
29889 fi
29890 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29891 conftest.$ac_objext conftest.beam conftest.$ac_ext
29892 fi
29893
29894 fi
29895
29896 fi
29897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
29898 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
29899
29900 REPLACE_MBSTATE_T=0
29901 case "$gl_cv_func_mbrtowc_incomplete_state" in
29902 *yes) ;;
29903 *) REPLACE_MBSTATE_T=1 ;;
29904 esac
29905 case "$gl_cv_func_mbrtowc_sanitycheck" in
29906 *yes) ;;
29907 *) REPLACE_MBSTATE_T=1 ;;
29908 esac
29909 else
29910 REPLACE_MBSTATE_T=1
29911 fi
29912
29913
29914
29915 if test $ac_cv_func_mbsrtowcs = no; then
29916 HAVE_MBSRTOWCS=0
29917 ac_fn_c_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" "
29918 #include <wchar.h>
29919
29920 "
29921 if test "x$ac_cv_have_decl_mbsrtowcs" = xyes; then :
29922 ac_have_decl=1
29923 else
29924 ac_have_decl=0
29925 fi
29926
29927 cat >>confdefs.h <<_ACEOF
29928 #define HAVE_DECL_MBSRTOWCS $ac_have_decl
29929 _ACEOF
29930
29931 if test $ac_cv_have_decl_mbsrtowcs = yes; then
29932 REPLACE_MBSRTOWCS=1
29933 fi
29934 else
29935 if test $REPLACE_MBSTATE_T = 1; then
29936 REPLACE_MBSRTOWCS=1
29937 else
29938
29939
29940
29941
29942
29943
29944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5
29945 $as_echo_n "checking whether mbsrtowcs works... " >&6; }
29946 if ${gl_cv_func_mbsrtowcs_works+:} false; then :
29947 $as_echo_n "(cached) " >&6
29948 else
29949
29950 case "$host_os" in
29951 # Guess no on HP-UX, Solaris, mingw.
29952 hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;;
29953 # Guess yes otherwise.
29954 *) gl_cv_func_mbsrtowcs_works="guessing yes" ;;
29955 esac
29956 if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
29957 if test "$cross_compiling" = yes; then :
29958 :
29959 else
29960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29961 /* end confdefs.h. */
29962
29963 #include <locale.h>
29964 #include <string.h>
29965 #include <wchar.h>
29966 int main ()
29967 {
29968 int result = 0;
29969 /* Test whether the function supports a NULL destination argument.
29970 This fails on native Windows. */
29971 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
29972 {
29973 const char input[] = "\337er";
29974 const char *src = input;
29975 mbstate_t state;
29976
29977 memset (&state, '\0', sizeof (mbstate_t));
29978 if (mbsrtowcs (NULL, &src, 1, &state) != 3
29979 || src != input)
29980 result |= 1;
29981 }
29982 /* Test whether the function works when started with a conversion state
29983 in non-initial state. This fails on HP-UX 11.11 and Solaris 10. */
29984 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
29985 {
29986 const char input[] = "B\303\274\303\237er";
29987 mbstate_t state;
29988
29989 memset (&state, '\0', sizeof (mbstate_t));
29990 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
29991 if (!mbsinit (&state))
29992 {
29993 const char *src = input + 2;
29994 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
29995 result |= 2;
29996 }
29997 }
29998 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
29999 {
30000 const char input[] = "<\306\374\313\334\270\354>";
30001 mbstate_t state;
30002
30003 memset (&state, '\0', sizeof (mbstate_t));
30004 if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2))
30005 if (!mbsinit (&state))
30006 {
30007 const char *src = input + 4;
30008 if (mbsrtowcs (NULL, &src, 10, &state) != 3)
30009 result |= 4;
30010 }
30011 }
30012 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
30013 {
30014 const char input[] = "B\250\271\201\060\211\070er";
30015 mbstate_t state;
30016
30017 memset (&state, '\0', sizeof (mbstate_t));
30018 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
30019 if (!mbsinit (&state))
30020 {
30021 const char *src = input + 2;
30022 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
30023 result |= 8;
30024 }
30025 }
30026 return result;
30027 }
30028 _ACEOF
30029 if ac_fn_c_try_run "$LINENO"; then :
30030 gl_cv_func_mbsrtowcs_works=yes
30031 else
30032 gl_cv_func_mbsrtowcs_works=no
30033 fi
30034 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30035 conftest.$ac_objext conftest.beam conftest.$ac_ext
30036 fi
30037
30038 fi
30039
30040 fi
30041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5
30042 $as_echo "$gl_cv_func_mbsrtowcs_works" >&6; }
30043
30044 case "$gl_cv_func_mbsrtowcs_works" in
30045 *yes) ;;
30046 *) REPLACE_MBSRTOWCS=1 ;;
30047 esac
30048 fi
30049 fi
30050
30051
30052 if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
30053 GL_COND_OBJ_MBSRTOWCS_TRUE=
30054 GL_COND_OBJ_MBSRTOWCS_FALSE='#'
30055 else
30056 GL_COND_OBJ_MBSRTOWCS_TRUE='#'
30057 GL_COND_OBJ_MBSRTOWCS_FALSE=
30058 fi
30059 :
30060 if test -z "${GL_COND_OBJ_MBSRTOWCS_TRUE}" && test -z "${GL_COND_OBJ_MBSRTOWCS_FALSE}"; then
30061 GL_COND_OBJ_MBSRTOWCS_TRUE='#'
30062 GL_COND_OBJ_MBSRTOWCS_FALSE='#'
30063 fi
30064
30065 if test -z "$GL_COND_OBJ_MBSRTOWCS_TRUE"; then :
30066
30067
30068
30069
30070
30071
30072
30073
30074
30075 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext"
30076
30077
30078 :
30079
30080
30081 fi
30082
30083
30084
30085
30086
30087
30088
30089
30090
30091
30092
30093
30094
30095
30096 GL_GNULIB_MBSRTOWCS=1
30097
30098
30099
30100
30101
30102 $as_echo "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h
30103
30104
30105
30106
30107
30108
30109 for ac_func in mbtowc
30110 do :
30111 ac_fn_c_check_func "$LINENO" "mbtowc" "ac_cv_func_mbtowc"
30112 if test "x$ac_cv_func_mbtowc" = xyes; then :
30113 cat >>confdefs.h <<_ACEOF
30114 #define HAVE_MBTOWC 1
30115 _ACEOF
30116
30117 fi
30118 done
30119
30120 if test $ac_cv_func_mbtowc = no; then
30121 HAVE_MBTOWC=0
30122 else
30123 if false; then
30124 REPLACE_MBTOWC=1
30125 fi
30126 fi
30127
30128
30129 if test $HAVE_MBTOWC = 0 || test $REPLACE_MBTOWC = 1; then
30130 GL_COND_OBJ_MBTOWC_TRUE=
30131 GL_COND_OBJ_MBTOWC_FALSE='#'
30132 else
30133 GL_COND_OBJ_MBTOWC_TRUE='#'
30134 GL_COND_OBJ_MBTOWC_FALSE=
30135 fi
30136 :
30137 if test -z "${GL_COND_OBJ_MBTOWC_TRUE}" && test -z "${GL_COND_OBJ_MBTOWC_FALSE}"; then
30138 GL_COND_OBJ_MBTOWC_TRUE='#'
30139 GL_COND_OBJ_MBTOWC_FALSE='#'
30140 fi
30141
30142 if test -z "$GL_COND_OBJ_MBTOWC_TRUE"; then :
30143
30144
30145 :
30146
30147
30148 fi
30149
30150
30151
30152
30153
30154
30155
30156
30157
30158 GL_GNULIB_MBTOWC=1
30159
30160
30161
30162
30163
30164 $as_echo "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h
30165
30166
30167
30168
30169
30170 if test $REPLACE_MEMCHR = 1; then
30171 GL_COND_OBJ_MEMCHR_TRUE=
30172 GL_COND_OBJ_MEMCHR_FALSE='#'
30173 else
30174 GL_COND_OBJ_MEMCHR_TRUE='#'
30175 GL_COND_OBJ_MEMCHR_FALSE=
30176 fi
30177 :
30178 if test -z "${GL_COND_OBJ_MEMCHR_TRUE}" && test -z "${GL_COND_OBJ_MEMCHR_FALSE}"; then
30179 GL_COND_OBJ_MEMCHR_TRUE='#'
30180 GL_COND_OBJ_MEMCHR_FALSE='#'
30181 fi
30182
30183 if test -z "$GL_COND_OBJ_MEMCHR_TRUE"; then :
30184
30185
30186 for ac_header in bp-sym.h
30187 do :
30188 ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
30189 if test "x$ac_cv_header_bp_sym_h" = xyes; then :
30190 cat >>confdefs.h <<_ACEOF
30191 #define HAVE_BP_SYM_H 1
30192 _ACEOF
30193
30194 fi
30195
30196 done
30197
30198
30199
30200 fi
30201
30202
30203
30204
30205
30206
30207
30208
30209
30210
30211
30212
30213
30214
30215 GL_GNULIB_MEMCHR=1
30216
30217
30218
30219
30220
30221 $as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
30222
30223
30224
30225
30226
30227 if test $HAVE_DECL_MEMMEM = 1 && test $REPLACE_MEMMEM = 0; then
30228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works in linear time" >&5
30229 $as_echo_n "checking whether memmem works in linear time... " >&6; }
30230 if ${gl_cv_func_memmem_works_fast+:} false; then :
30231 $as_echo_n "(cached) " >&6
30232 else
30233 if test "$cross_compiling" = yes; then :
30234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30235 /* end confdefs.h. */
30236
30237 #include <features.h>
30238 #ifdef __GNU_LIBRARY__
30239 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2)) \
30240 && !defined __UCLIBC__
30241 Lucky user
30242 #endif
30243 #endif
30244 #ifdef __CYGWIN__
30245 #include <cygwin/version.h>
30246 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 0)
30247 Lucky user
30248 #endif
30249 #endif
30250
30251 _ACEOF
30252 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
30253 $EGREP "Lucky user" >/dev/null 2>&1; then :
30254 gl_cv_func_memmem_works_fast="guessing yes"
30255 else
30256 gl_cv_func_memmem_works_fast="$gl_cross_guess_normal"
30257 fi
30258 rm -f conftest*
30259
30260
30261 else
30262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30263 /* end confdefs.h. */
30264
30265 #include <signal.h> /* for signal */
30266 #include <string.h> /* for memmem */
30267 #include <stdlib.h> /* for malloc */
30268 #include <unistd.h> /* for alarm */
30269 static void quit (int sig) { _exit (sig + 128); }
30270
30271 int
30272 main ()
30273 {
30274
30275 int result = 0;
30276 size_t m = 1000000;
30277 char *haystack = (char *) malloc (2 * m + 1);
30278 char *needle = (char *) malloc (m + 1);
30279 /* Failure to compile this test due to missing alarm is okay,
30280 since all such platforms (mingw) also lack memmem. */
30281 signal (SIGALRM, quit);
30282 alarm (5);
30283 /* Check for quadratic performance. */
30284 if (haystack && needle)
30285 {
30286 memset (haystack, 'A', 2 * m);
30287 haystack[2 * m] = 'B';
30288 memset (needle, 'A', m);
30289 needle[m] = 'B';
30290 if (!memmem (haystack, 2 * m + 1, needle, m + 1))
30291 result |= 1;
30292 }
30293 /* Free allocated memory, in case some sanitizer is watching. */
30294 free (haystack);
30295 free (needle);
30296 return result;
30297
30298 ;
30299 return 0;
30300 }
30301 _ACEOF
30302 if ac_fn_c_try_run "$LINENO"; then :
30303 gl_cv_func_memmem_works_fast=yes
30304 else
30305 gl_cv_func_memmem_works_fast=no
30306 fi
30307 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30308 conftest.$ac_objext conftest.beam conftest.$ac_ext
30309 fi
30310
30311
30312 fi
30313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_fast" >&5
30314 $as_echo "$gl_cv_func_memmem_works_fast" >&6; }
30315 case "$gl_cv_func_memmem_works_fast" in
30316 *yes) ;;
30317 *)
30318 REPLACE_MEMMEM=1
30319 ;;
30320 esac
30321 fi
30322
30323 if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
30324
30325
30326
30327
30328
30329
30330
30331
30332 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
30333
30334 fi
30335
30336
30337
30338
30339 for ac_func in memmem
30340 do :
30341 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
30342 if test "x$ac_cv_func_memmem" = xyes; then :
30343 cat >>confdefs.h <<_ACEOF
30344 #define HAVE_MEMMEM 1
30345 _ACEOF
30346
30347 fi
30348 done
30349
30350 if test $ac_cv_func_memmem = yes; then
30351 HAVE_MEMMEM=1
30352 else
30353 HAVE_MEMMEM=0
30354 fi
30355
30356 if test $ac_cv_have_decl_memmem = no; then
30357 HAVE_DECL_MEMMEM=0
30358 else
30359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
30360 $as_echo_n "checking whether memmem works... " >&6; }
30361 if ${gl_cv_func_memmem_works_always+:} false; then :
30362 $as_echo_n "(cached) " >&6
30363 else
30364 if test "$cross_compiling" = yes; then :
30365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30366 /* end confdefs.h. */
30367
30368 #include <string.h> /* for __GNU_LIBRARY__ */
30369 #ifdef __GNU_LIBRARY__
30370 #include <features.h>
30371 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
30372 || __GLIBC_MINOR__ > 12)) \
30373 || (__GLIBC__ > 2)) \
30374 || defined __UCLIBC__
30375 Lucky user
30376 #endif
30377 #elif defined __CYGWIN__
30378 #include <cygwin/version.h>
30379 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
30380 Lucky user
30381 #endif
30382 #else
30383 Lucky user
30384 #endif
30385
30386 _ACEOF
30387 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
30388 $EGREP "Lucky user" >/dev/null 2>&1; then :
30389 gl_cv_func_memmem_works_always="guessing yes"
30390 else
30391 gl_cv_func_memmem_works_always="$gl_cross_guess_normal"
30392 fi
30393 rm -f conftest*
30394
30395
30396 else
30397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30398 /* end confdefs.h. */
30399
30400 #include <string.h> /* for memmem */
30401 #define P "_EF_BF_BD"
30402 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
30403 #define NEEDLE P P P P P
30404
30405 int
30406 main ()
30407 {
30408
30409 int result = 0;
30410 if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
30411 result |= 1;
30412 /* Check for empty needle behavior. */
30413 {
30414 const char *haystack = "AAA";
30415 if (memmem (haystack, 3, (const char *) 1, 0) != haystack)
30416 result |= 2;
30417 }
30418 return result;
30419
30420 ;
30421 return 0;
30422 }
30423 _ACEOF
30424 if ac_fn_c_try_run "$LINENO"; then :
30425 gl_cv_func_memmem_works_always=yes
30426 else
30427 gl_cv_func_memmem_works_always=no
30428 fi
30429 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30430 conftest.$ac_objext conftest.beam conftest.$ac_ext
30431 fi
30432
30433
30434 fi
30435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
30436 $as_echo "$gl_cv_func_memmem_works_always" >&6; }
30437 case "$gl_cv_func_memmem_works_always" in
30438 *yes) ;;
30439 *)
30440 REPLACE_MEMMEM=1
30441 ;;
30442 esac
30443 fi
30444 :
30445
30446 if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
30447
30448
30449
30450
30451
30452
30453
30454
30455 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
30456
30457 fi
30458
30459
30460
30461
30462
30463
30464
30465
30466
30467
30468
30469
30470
30471
30472 GL_GNULIB_MEMMEM=1
30473
30474
30475
30476
30477
30478 $as_echo "#define GNULIB_TEST_MEMMEM 1" >>confdefs.h
30479
30480
30481
30482
30483
30484
30485
30486
30487
30488 for ac_func in mempcpy
30489 do :
30490 ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
30491 if test "x$ac_cv_func_mempcpy" = xyes; then :
30492 cat >>confdefs.h <<_ACEOF
30493 #define HAVE_MEMPCPY 1
30494 _ACEOF
30495
30496 fi
30497 done
30498
30499 if test $ac_cv_func_mempcpy = no; then
30500 HAVE_MEMPCPY=0
30501 fi
30502
30503
30504 if test $HAVE_MEMPCPY = 0; then
30505 GL_COND_OBJ_MEMPCPY_TRUE=
30506 GL_COND_OBJ_MEMPCPY_FALSE='#'
30507 else
30508 GL_COND_OBJ_MEMPCPY_TRUE='#'
30509 GL_COND_OBJ_MEMPCPY_FALSE=
30510 fi
30511 :
30512 if test -z "${GL_COND_OBJ_MEMPCPY_TRUE}" && test -z "${GL_COND_OBJ_MEMPCPY_FALSE}"; then
30513 GL_COND_OBJ_MEMPCPY_TRUE='#'
30514 GL_COND_OBJ_MEMPCPY_FALSE='#'
30515 fi
30516
30517 if test -z "$GL_COND_OBJ_MEMPCPY_TRUE"; then :
30518
30519
30520 :
30521
30522
30523 fi
30524
30525
30526
30527
30528
30529
30530
30531
30532
30533
30534
30535
30536
30537
30538 GL_GNULIB_MEMPCPY=1
30539
30540
30541
30542
30543
30544 $as_echo "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h
30545
30546
30547
30548
30549
30550
30551
30552
30553 if test $ac_cv_have_decl_memrchr = no; then
30554 HAVE_DECL_MEMRCHR=0
30555 fi
30556
30557 for ac_func in memrchr
30558 do :
30559 ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
30560 if test "x$ac_cv_func_memrchr" = xyes; then :
30561 cat >>confdefs.h <<_ACEOF
30562 #define HAVE_MEMRCHR 1
30563 _ACEOF
30564
30565 fi
30566 done
30567
30568
30569
30570 if test $ac_cv_func_memrchr = no; then
30571 GL_COND_OBJ_MEMRCHR_TRUE=
30572 GL_COND_OBJ_MEMRCHR_FALSE='#'
30573 else
30574 GL_COND_OBJ_MEMRCHR_TRUE='#'
30575 GL_COND_OBJ_MEMRCHR_FALSE=
30576 fi
30577 :
30578 if test -z "${GL_COND_OBJ_MEMRCHR_TRUE}" && test -z "${GL_COND_OBJ_MEMRCHR_FALSE}"; then
30579 GL_COND_OBJ_MEMRCHR_TRUE='#'
30580 GL_COND_OBJ_MEMRCHR_FALSE='#'
30581 fi
30582
30583 if test -z "$GL_COND_OBJ_MEMRCHR_TRUE"; then :
30584
30585 :
30586
30587 fi
30588
30589
30590
30591
30592
30593
30594
30595
30596
30597
30598
30599
30600
30601
30602 GL_GNULIB_MEMRCHR=1
30603
30604
30605
30606
30607
30608 $as_echo "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h
30609
30610
30611
30612
30613
30614
30615
30616
30617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing slash" >&5
30618 $as_echo_n "checking whether mkdir handles trailing slash... " >&6; }
30619 if ${gl_cv_func_mkdir_trailing_slash_works+:} false; then :
30620 $as_echo_n "(cached) " >&6
30621 else
30622 rm -rf conftest.dir
30623 if test "$cross_compiling" = yes; then :
30624 case "$host_os" in
30625 # Guess yes on Linux systems.
30626 linux-* | linux) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
30627 # Guess yes on glibc systems.
30628 *-gnu* | gnu*) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
30629 # Guess yes on MSVC, no on mingw.
30630 mingw*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30631 /* end confdefs.h. */
30632
30633 #ifdef _MSC_VER
30634 Known
30635 #endif
30636
30637 _ACEOF
30638 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
30639 $EGREP "Known" >/dev/null 2>&1; then :
30640 gl_cv_func_mkdir_trailing_slash_works="guessing yes"
30641 else
30642 gl_cv_func_mkdir_trailing_slash_works="guessing no"
30643 fi
30644 rm -f conftest*
30645
30646 ;;
30647 # If we don't know, obey --enable-cross-guesses.
30648 *) gl_cv_func_mkdir_trailing_slash_works="$gl_cross_guess_normal" ;;
30649 esac
30650
30651 else
30652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30653 /* end confdefs.h. */
30654
30655 #include <sys/types.h>
30656 #include <sys/stat.h>
30657
30658
30659 $gl_mda_defines
30660
30661 int
30662 main ()
30663 {
30664 return mkdir ("conftest.dir/", 0700);
30665 ;
30666 return 0;
30667 }
30668 _ACEOF
30669 if ac_fn_c_try_run "$LINENO"; then :
30670 gl_cv_func_mkdir_trailing_slash_works=yes
30671 else
30672 gl_cv_func_mkdir_trailing_slash_works=no
30673 fi
30674 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30675 conftest.$ac_objext conftest.beam conftest.$ac_ext
30676 fi
30677
30678 rm -rf conftest.dir
30679
30680 fi
30681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_slash_works" >&5
30682 $as_echo "$gl_cv_func_mkdir_trailing_slash_works" >&6; }
30683 case "$gl_cv_func_mkdir_trailing_slash_works" in
30684 *yes) ;;
30685 *)
30686 REPLACE_MKDIR=1
30687 ;;
30688 esac
30689
30690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing dot" >&5
30691 $as_echo_n "checking whether mkdir handles trailing dot... " >&6; }
30692 if ${gl_cv_func_mkdir_trailing_dot_works+:} false; then :
30693 $as_echo_n "(cached) " >&6
30694 else
30695 rm -rf conftest.dir
30696 if test "$cross_compiling" = yes; then :
30697 case "$host_os" in
30698 # Guess yes on glibc systems.
30699 *-gnu* | gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
30700 # Guess yes on musl systems.
30701 *-musl*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
30702 # Guess no on native Windows.
30703 mingw*) gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
30704 # If we don't know, obey --enable-cross-guesses.
30705 *) gl_cv_func_mkdir_trailing_dot_works="$gl_cross_guess_normal" ;;
30706 esac
30707
30708 else
30709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30710 /* end confdefs.h. */
30711
30712 #include <sys/types.h>
30713 #include <sys/stat.h>
30714
30715
30716 $gl_mda_defines
30717
30718 int
30719 main ()
30720 {
30721 return !mkdir ("conftest.dir/./", 0700);
30722 ;
30723 return 0;
30724 }
30725 _ACEOF
30726 if ac_fn_c_try_run "$LINENO"; then :
30727 gl_cv_func_mkdir_trailing_dot_works=yes
30728 else
30729 gl_cv_func_mkdir_trailing_dot_works=no
30730 fi
30731 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30732 conftest.$ac_objext conftest.beam conftest.$ac_ext
30733 fi
30734
30735 rm -rf conftest.dir
30736
30737
30738 fi
30739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_dot_works" >&5
30740 $as_echo "$gl_cv_func_mkdir_trailing_dot_works" >&6; }
30741 case "$gl_cv_func_mkdir_trailing_dot_works" in
30742 *yes) ;;
30743 *)
30744 REPLACE_MKDIR=1
30745
30746 $as_echo "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h
30747
30748 ;;
30749 esac
30750
30751
30752 if test $REPLACE_MKDIR = 1; then
30753 GL_COND_OBJ_MKDIR_TRUE=
30754 GL_COND_OBJ_MKDIR_FALSE='#'
30755 else
30756 GL_COND_OBJ_MKDIR_TRUE='#'
30757 GL_COND_OBJ_MKDIR_FALSE=
30758 fi
30759 :
30760 if test -z "${GL_COND_OBJ_MKDIR_TRUE}" && test -z "${GL_COND_OBJ_MKDIR_FALSE}"; then
30761 GL_COND_OBJ_MKDIR_TRUE='#'
30762 GL_COND_OBJ_MKDIR_FALSE='#'
30763 fi
30764
30765
30766
30767
30768
30769
30770
30771
30772
30773
30774 GL_GNULIB_MKDIR=1
30775
30776
30777
30778
30779
30780 $as_echo "#define GNULIB_TEST_MKDIR 1" >>confdefs.h
30781
30782
30783
30784
30785
30786 for ac_func in mkdtemp
30787 do :
30788 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
30789 if test "x$ac_cv_func_mkdtemp" = xyes; then :
30790 cat >>confdefs.h <<_ACEOF
30791 #define HAVE_MKDTEMP 1
30792 _ACEOF
30793
30794 fi
30795 done
30796
30797 if test $ac_cv_func_mkdtemp = no; then
30798 HAVE_MKDTEMP=0
30799 fi
30800
30801
30802 if test $HAVE_MKDTEMP = 0; then
30803 GL_COND_OBJ_MKDTEMP_TRUE=
30804 GL_COND_OBJ_MKDTEMP_FALSE='#'
30805 else
30806 GL_COND_OBJ_MKDTEMP_TRUE='#'
30807 GL_COND_OBJ_MKDTEMP_FALSE=
30808 fi
30809 :
30810 if test -z "${GL_COND_OBJ_MKDTEMP_TRUE}" && test -z "${GL_COND_OBJ_MKDTEMP_FALSE}"; then
30811 GL_COND_OBJ_MKDTEMP_TRUE='#'
30812 GL_COND_OBJ_MKDTEMP_FALSE='#'
30813 fi
30814
30815 if test -z "$GL_COND_OBJ_MKDTEMP_TRUE"; then :
30816
30817 :
30818
30819
30820 fi
30821
30822
30823
30824
30825
30826
30827
30828
30829
30830 GL_GNULIB_MKDTEMP=1
30831
30832
30833
30834
30835
30836 $as_echo "#define GNULIB_TEST_MKDTEMP 1" >>confdefs.h
30837
30838
30839
30840
30841
30842
30843
30844
30845
30846 if test $ac_cv_func_mkostemp != yes; then
30847 HAVE_MKOSTEMP=0
30848 fi
30849
30850
30851 if test $HAVE_MKOSTEMP = 0; then
30852 GL_COND_OBJ_MKOSTEMP_TRUE=
30853 GL_COND_OBJ_MKOSTEMP_FALSE='#'
30854 else
30855 GL_COND_OBJ_MKOSTEMP_TRUE='#'
30856 GL_COND_OBJ_MKOSTEMP_FALSE=
30857 fi
30858 :
30859 if test -z "${GL_COND_OBJ_MKOSTEMP_TRUE}" && test -z "${GL_COND_OBJ_MKOSTEMP_FALSE}"; then
30860 GL_COND_OBJ_MKOSTEMP_TRUE='#'
30861 GL_COND_OBJ_MKOSTEMP_FALSE='#'
30862 fi
30863
30864 if test -z "$GL_COND_OBJ_MKOSTEMP_TRUE"; then :
30865
30866
30867
30868
30869 fi
30870
30871
30872 cat >>confdefs.h <<_ACEOF
30873 #define GNULIB_MKOSTEMP 1
30874 _ACEOF
30875
30876
30877
30878
30879
30880
30881
30882
30883
30884
30885
30886 GL_GNULIB_MKOSTEMP=1
30887
30888
30889
30890
30891
30892 $as_echo "#define GNULIB_TEST_MKOSTEMP 1" >>confdefs.h
30893
30894
30895
30896
30897
30898 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
30899 GL_COND_OBJ_MSVC_INVAL_TRUE=
30900 GL_COND_OBJ_MSVC_INVAL_FALSE='#'
30901 else
30902 GL_COND_OBJ_MSVC_INVAL_TRUE='#'
30903 GL_COND_OBJ_MSVC_INVAL_FALSE=
30904 fi
30905 :
30906 if test -z "${GL_COND_OBJ_MSVC_INVAL_TRUE}" && test -z "${GL_COND_OBJ_MSVC_INVAL_FALSE}"; then
30907 GL_COND_OBJ_MSVC_INVAL_TRUE='#'
30908 GL_COND_OBJ_MSVC_INVAL_FALSE='#'
30909 fi
30910
30911
30912
30913 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
30914 GL_COND_OBJ_MSVC_NOTHROW_TRUE=
30915 GL_COND_OBJ_MSVC_NOTHROW_FALSE='#'
30916 else
30917 GL_COND_OBJ_MSVC_NOTHROW_TRUE='#'
30918 GL_COND_OBJ_MSVC_NOTHROW_FALSE=
30919 fi
30920 :
30921 if test -z "${GL_COND_OBJ_MSVC_NOTHROW_TRUE}" && test -z "${GL_COND_OBJ_MSVC_NOTHROW_FALSE}"; then
30922 GL_COND_OBJ_MSVC_NOTHROW_TRUE='#'
30923 GL_COND_OBJ_MSVC_NOTHROW_FALSE='#'
30924 fi
30925
30926
30927
30928 cat >>confdefs.h <<_ACEOF
30929 #define GNULIB_MSVC_NOTHROW 1
30930 _ACEOF
30931
30932
30933
30934
30935
30936
30937
30938
30939
30940
30941
30942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <netinet/in.h> is self-contained" >&5
30943 $as_echo_n "checking whether <netinet/in.h> is self-contained... " >&6; }
30944 if ${gl_cv_header_netinet_in_h_selfcontained+:} false; then :
30945 $as_echo_n "(cached) " >&6
30946 else
30947
30948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30949 /* end confdefs.h. */
30950 #include <netinet/in.h>
30951 int
30952 main ()
30953 {
30954
30955 ;
30956 return 0;
30957 }
30958 _ACEOF
30959 if ac_fn_c_try_compile "$LINENO"; then :
30960 gl_cv_header_netinet_in_h_selfcontained=yes
30961 else
30962 gl_cv_header_netinet_in_h_selfcontained=no
30963 fi
30964 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30965
30966 fi
30967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_netinet_in_h_selfcontained" >&5
30968 $as_echo "$gl_cv_header_netinet_in_h_selfcontained" >&6; }
30969 if test $gl_cv_header_netinet_in_h_selfcontained = yes; then
30970 GL_GENERATE_NETINET_IN_H=false
30971 else
30972 GL_GENERATE_NETINET_IN_H=true
30973 for ac_header in netinet/in.h
30974 do :
30975 ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
30976 if test "x$ac_cv_header_netinet_in_h" = xyes; then :
30977 cat >>confdefs.h <<_ACEOF
30978 #define HAVE_NETINET_IN_H 1
30979 _ACEOF
30980
30981 fi
30982
30983 done
30984
30985
30986
30987
30988
30989
30990
30991
30992
30993
30994 if test $gl_cv_have_include_next = yes; then
30995 gl_cv_next_netinet_in_h='<'netinet/in.h'>'
30996 else
30997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <netinet/in.h>" >&5
30998 $as_echo_n "checking absolute name of <netinet/in.h>... " >&6; }
30999 if ${gl_cv_next_netinet_in_h+:} false; then :
31000 $as_echo_n "(cached) " >&6
31001 else
31002
31003 if test $ac_cv_header_netinet_in_h = yes; then
31004
31005
31006
31007
31008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31009 /* end confdefs.h. */
31010 #include <netinet/in.h>
31011 _ACEOF
31012 case "$host_os" in
31013 aix*) gl_absname_cpp="$ac_cpp -C" ;;
31014 *) gl_absname_cpp="$ac_cpp" ;;
31015 esac
31016
31017 case "$host_os" in
31018 mingw*)
31019 gl_dirsep_regex='[/\\]'
31020 ;;
31021 *)
31022 gl_dirsep_regex='\/'
31023 ;;
31024 esac
31025 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
31026 gl_header_literal_regex=`echo 'netinet/in.h' \
31027 | sed -e "$gl_make_literal_regex_sed"`
31028 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
31029 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
31030 s|^/[^/]|//&|
31031 p
31032 q
31033 }'
31034
31035 gl_cv_absolute_netinet_in_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
31036 sed -n "$gl_absolute_header_sed"`
31037
31038 gl_header=$gl_cv_absolute_netinet_in_h
31039 gl_cv_next_netinet_in_h='"'$gl_header'"'
31040 else
31041 gl_cv_next_netinet_in_h='<'netinet/in.h'>'
31042 fi
31043
31044
31045 fi
31046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_netinet_in_h" >&5
31047 $as_echo "$gl_cv_next_netinet_in_h" >&6; }
31048 fi
31049 NEXT_NETINET_IN_H=$gl_cv_next_netinet_in_h
31050
31051 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
31052 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
31053 gl_next_as_first_directive='<'netinet/in.h'>'
31054 else
31055 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
31056 gl_next_as_first_directive=$gl_cv_next_netinet_in_h
31057 fi
31058 NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H=$gl_next_as_first_directive
31059
31060
31061
31062
31063 if test $ac_cv_header_netinet_in_h = yes; then
31064 HAVE_NETINET_IN_H=1
31065 else
31066 HAVE_NETINET_IN_H=0
31067 fi
31068
31069 fi
31070
31071
31072
31073
31074
31075 case "$GL_GENERATE_NETINET_IN_H" in
31076 false) NETINET_IN_H='' ;;
31077 true)
31078 if test -z "$NETINET_IN_H"; then
31079 NETINET_IN_H="${gl_source_base_prefix}netinet/in.h"
31080 fi
31081 ;;
31082 *) echo "*** GL_GENERATE_NETINET_IN_H is not set correctly" 1>&2; exit 1 ;;
31083 esac
31084
31085
31086 if $GL_GENERATE_NETINET_IN_H; then
31087 GL_GENERATE_NETINET_IN_H_TRUE=
31088 GL_GENERATE_NETINET_IN_H_FALSE='#'
31089 else
31090 GL_GENERATE_NETINET_IN_H_TRUE='#'
31091 GL_GENERATE_NETINET_IN_H_FALSE=
31092 fi
31093 :
31094 if test -z "${GL_GENERATE_NETINET_IN_H_TRUE}" && test -z "${GL_GENERATE_NETINET_IN_H_FALSE}"; then
31095 GL_GENERATE_NETINET_IN_H_TRUE='#'
31096 GL_GENERATE_NETINET_IN_H_FALSE='#'
31097 fi
31098
31099
31100
31101
31102
31103
31104
31105
31106
31107 case "$host_os" in
31108 mingw* | pw*)
31109 REPLACE_OPEN=1
31110 ;;
31111 *)
31112
31113 if test "$gl_cv_macro_O_CLOEXEC" != yes; then
31114 REPLACE_OPEN=1
31115 fi
31116
31117
31118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
31119 $as_echo_n "checking whether open recognizes a trailing slash... " >&6; }
31120 if ${gl_cv_func_open_slash+:} false; then :
31121 $as_echo_n "(cached) " >&6
31122 else
31123 # Assume that if we have lstat, we can also check symlinks.
31124 if test $ac_cv_func_lstat = yes; then
31125 touch conftest.tmp
31126 ln -s conftest.tmp conftest.lnk
31127 fi
31128 if test "$cross_compiling" = yes; then :
31129
31130 case "$host_os" in
31131 freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
31132 gl_cv_func_open_slash="guessing no" ;;
31133 *)
31134 gl_cv_func_open_slash="guessing yes" ;;
31135 esac
31136
31137 else
31138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31139 /* end confdefs.h. */
31140
31141 #include <fcntl.h>
31142 #if HAVE_UNISTD_H
31143 # include <unistd.h>
31144 #endif
31145
31146
31147 $gl_mda_defines
31148
31149 int main ()
31150 {
31151 int result = 0;
31152 #if HAVE_LSTAT
31153 if (open ("conftest.lnk/", O_RDONLY) != -1)
31154 result |= 1;
31155 #endif
31156 if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
31157 result |= 2;
31158 return result;
31159 }
31160 _ACEOF
31161 if ac_fn_c_try_run "$LINENO"; then :
31162 gl_cv_func_open_slash=yes
31163 else
31164 gl_cv_func_open_slash=no
31165 fi
31166 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31167 conftest.$ac_objext conftest.beam conftest.$ac_ext
31168 fi
31169
31170 rm -f conftest.sl conftest.tmp conftest.lnk
31171
31172 fi
31173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
31174 $as_echo "$gl_cv_func_open_slash" >&6; }
31175 case "$gl_cv_func_open_slash" in
31176 *no)
31177
31178 $as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
31179
31180 ;;
31181 esac
31182
31183 case "$gl_cv_func_open_slash" in
31184 *no)
31185 REPLACE_OPEN=1
31186 ;;
31187 esac
31188 ;;
31189 esac
31190
31191 if test $REPLACE_OPEN = 0; then
31192
31193
31194
31195 if test $ac_cv_func_fchdir = no; then
31196 HAVE_FCHDIR=0
31197 fi
31198
31199 if test $HAVE_FCHDIR = 0; then
31200 REPLACE_OPEN=1
31201 fi
31202 fi
31203
31204
31205
31206
31207 if test $REPLACE_OPEN = 1; then
31208 GL_COND_OBJ_OPEN_TRUE=
31209 GL_COND_OBJ_OPEN_FALSE='#'
31210 else
31211 GL_COND_OBJ_OPEN_TRUE='#'
31212 GL_COND_OBJ_OPEN_FALSE=
31213 fi
31214 :
31215 if test -z "${GL_COND_OBJ_OPEN_TRUE}" && test -z "${GL_COND_OBJ_OPEN_FALSE}"; then
31216 GL_COND_OBJ_OPEN_TRUE='#'
31217 GL_COND_OBJ_OPEN_FALSE='#'
31218 fi
31219
31220 if test -z "$GL_COND_OBJ_OPEN_TRUE"; then :
31221
31222
31223
31224 :
31225
31226
31227 fi
31228
31229
31230
31231
31232
31233
31234
31235
31236
31237 GL_GNULIB_OPEN=1
31238
31239
31240
31241
31242
31243 $as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h
31244
31245
31246
31247
31248
31249
31250
31251
31252
31253 case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink+$gl_cv_macro_O_CLOEXEC in
31254 yes+*yes+yes)
31255 ;;
31256 yes+*)
31257 # Solaris 10 lacks O_CLOEXEC.
31258 # Solaris 9 has *at functions, but uniformly mishandles trailing
31259 # slash in all of them.
31260 REPLACE_OPENAT=1
31261 ;;
31262 *)
31263 HAVE_OPENAT=0
31264 ;;
31265 esac
31266
31267
31268 if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then
31269 GL_COND_OBJ_OPENAT_TRUE=
31270 GL_COND_OBJ_OPENAT_FALSE='#'
31271 else
31272 GL_COND_OBJ_OPENAT_TRUE='#'
31273 GL_COND_OBJ_OPENAT_FALSE=
31274 fi
31275 :
31276 if test -z "${GL_COND_OBJ_OPENAT_TRUE}" && test -z "${GL_COND_OBJ_OPENAT_FALSE}"; then
31277 GL_COND_OBJ_OPENAT_TRUE='#'
31278 GL_COND_OBJ_OPENAT_FALSE='#'
31279 fi
31280
31281 if test -z "$GL_COND_OBJ_OPENAT_TRUE"; then :
31282
31283
31284
31285 :
31286
31287
31288 fi
31289
31290
31291 cat >>confdefs.h <<_ACEOF
31292 #define GNULIB_OPENAT 1
31293 _ACEOF
31294
31295
31296
31297
31298
31299
31300
31301
31302
31303
31304 GL_GNULIB_OPENAT=1
31305
31306
31307
31308
31309
31310 $as_echo "#define GNULIB_TEST_OPENAT 1" >>confdefs.h
31311
31312
31313
31314
31315
31316
31317 for ac_func in opendir
31318 do :
31319 ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
31320 if test "x$ac_cv_func_opendir" = xyes; then :
31321 cat >>confdefs.h <<_ACEOF
31322 #define HAVE_OPENDIR 1
31323 _ACEOF
31324
31325 fi
31326 done
31327
31328 if test $ac_cv_func_opendir = no; then
31329 HAVE_OPENDIR=0
31330 fi
31331
31332
31333
31334
31335 if test $ac_cv_func_fchdir = no; then
31336 HAVE_FCHDIR=0
31337 fi
31338
31339 if test $HAVE_FCHDIR = 0; then
31340 if test $HAVE_OPENDIR = 1; then
31341 REPLACE_OPENDIR=1
31342 fi
31343 fi
31344
31345 case $host_os,$HAVE_OPENDIR in
31346 os2*,1)
31347 REPLACE_OPENDIR=1;;
31348 esac
31349
31350
31351 if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
31352 GL_COND_OBJ_OPENDIR_TRUE=
31353 GL_COND_OBJ_OPENDIR_FALSE='#'
31354 else
31355 GL_COND_OBJ_OPENDIR_TRUE='#'
31356 GL_COND_OBJ_OPENDIR_FALSE=
31357 fi
31358 :
31359 if test -z "${GL_COND_OBJ_OPENDIR_TRUE}" && test -z "${GL_COND_OBJ_OPENDIR_FALSE}"; then
31360 GL_COND_OBJ_OPENDIR_TRUE='#'
31361 GL_COND_OBJ_OPENDIR_FALSE='#'
31362 fi
31363
31364
31365
31366
31367
31368
31369
31370
31371
31372
31373 GL_GNULIB_OPENDIR=1
31374
31375
31376
31377
31378
31379 $as_echo "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
31380
31381
31382
31383
31384
31385
31386
31387
31388
31389
31390 if test $ac_cv_func_pipe != yes; then
31391 HAVE_PIPE=0
31392 fi
31393
31394
31395 if test $HAVE_PIPE = 0; then
31396 GL_COND_OBJ_PIPE_TRUE=
31397 GL_COND_OBJ_PIPE_FALSE='#'
31398 else
31399 GL_COND_OBJ_PIPE_TRUE='#'
31400 GL_COND_OBJ_PIPE_FALSE=
31401 fi
31402 :
31403 if test -z "${GL_COND_OBJ_PIPE_TRUE}" && test -z "${GL_COND_OBJ_PIPE_FALSE}"; then
31404 GL_COND_OBJ_PIPE_TRUE='#'
31405 GL_COND_OBJ_PIPE_FALSE='#'
31406 fi
31407
31408
31409
31410
31411
31412
31413
31414
31415
31416
31417 GL_GNULIB_PIPE=1
31418
31419
31420
31421
31422
31423 $as_echo "#define GNULIB_TEST_PIPE 1" >>confdefs.h
31424
31425
31426
31427
31428
31429
31430
31431 for ac_func in rawmemchr
31432 do :
31433 ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
31434 if test "x$ac_cv_func_rawmemchr" = xyes; then :
31435 cat >>confdefs.h <<_ACEOF
31436 #define HAVE_RAWMEMCHR 1
31437 _ACEOF
31438
31439 fi
31440 done
31441
31442 if test $ac_cv_func_rawmemchr = no; then
31443 HAVE_RAWMEMCHR=0
31444 fi
31445
31446
31447 if test $HAVE_RAWMEMCHR = 0; then
31448 GL_COND_OBJ_RAWMEMCHR_TRUE=
31449 GL_COND_OBJ_RAWMEMCHR_FALSE='#'
31450 else
31451 GL_COND_OBJ_RAWMEMCHR_TRUE='#'
31452 GL_COND_OBJ_RAWMEMCHR_FALSE=
31453 fi
31454 :
31455 if test -z "${GL_COND_OBJ_RAWMEMCHR_TRUE}" && test -z "${GL_COND_OBJ_RAWMEMCHR_FALSE}"; then
31456 GL_COND_OBJ_RAWMEMCHR_TRUE='#'
31457 GL_COND_OBJ_RAWMEMCHR_FALSE='#'
31458 fi
31459
31460 if test -z "$GL_COND_OBJ_RAWMEMCHR_TRUE"; then :
31461
31462 :
31463
31464 fi
31465
31466
31467
31468
31469
31470
31471
31472
31473
31474
31475
31476
31477
31478
31479 GL_GNULIB_RAWMEMCHR=1
31480
31481
31482
31483
31484
31485 $as_echo "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
31486
31487
31488
31489
31490
31491
31492 for ac_func in readdir
31493 do :
31494 ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir"
31495 if test "x$ac_cv_func_readdir" = xyes; then :
31496 cat >>confdefs.h <<_ACEOF
31497 #define HAVE_READDIR 1
31498 _ACEOF
31499
31500 fi
31501 done
31502
31503 if test $ac_cv_func_readdir = no; then
31504 HAVE_READDIR=0
31505 fi
31506
31507
31508 if test $HAVE_READDIR = 0; then
31509 GL_COND_OBJ_READDIR_TRUE=
31510 GL_COND_OBJ_READDIR_FALSE='#'
31511 else
31512 GL_COND_OBJ_READDIR_TRUE='#'
31513 GL_COND_OBJ_READDIR_FALSE=
31514 fi
31515 :
31516 if test -z "${GL_COND_OBJ_READDIR_TRUE}" && test -z "${GL_COND_OBJ_READDIR_FALSE}"; then
31517 GL_COND_OBJ_READDIR_TRUE='#'
31518 GL_COND_OBJ_READDIR_FALSE='#'
31519 fi
31520
31521
31522
31523
31524
31525
31526
31527
31528
31529
31530 GL_GNULIB_READDIR=1
31531
31532
31533
31534
31535
31536 $as_echo "#define GNULIB_TEST_READDIR 1" >>confdefs.h
31537
31538
31539
31540
31541
31542
31543 if test $ac_cv_func_readlink = no; then
31544 HAVE_READLINK=0
31545 else
31546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
31547 $as_echo_n "checking whether readlink signature is correct... " >&6; }
31548 if ${gl_cv_decl_readlink_works+:} false; then :
31549 $as_echo_n "(cached) " >&6
31550 else
31551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31552 /* end confdefs.h. */
31553 #include <unistd.h>
31554 /* Cause compilation failure if original declaration has wrong type. */
31555 ssize_t readlink (const char *, char *, size_t);
31556 int
31557 main ()
31558 {
31559
31560 ;
31561 return 0;
31562 }
31563 _ACEOF
31564 if ac_fn_c_try_compile "$LINENO"; then :
31565 gl_cv_decl_readlink_works=yes
31566 else
31567 gl_cv_decl_readlink_works=no
31568 fi
31569 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31570 fi
31571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
31572 $as_echo "$gl_cv_decl_readlink_works" >&6; }
31573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
31574 $as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
31575 if ${gl_cv_func_readlink_trailing_slash+:} false; then :
31576 $as_echo_n "(cached) " >&6
31577 else
31578 # We have readlink, so assume ln -s works.
31579 ln -s conftest.no-such conftest.link
31580 ln -s conftest.link conftest.lnk2
31581 if test "$cross_compiling" = yes; then :
31582 case "$host_os" in
31583 # Guess yes on Linux or glibc systems.
31584 linux-* | linux | *-gnu* | gnu*)
31585 gl_cv_func_readlink_trailing_slash="guessing yes" ;;
31586 # Guess no on AIX or HP-UX.
31587 aix* | hpux*)
31588 gl_cv_func_readlink_trailing_slash="guessing no" ;;
31589 # If we don't know, obey --enable-cross-guesses.
31590 *)
31591 gl_cv_func_readlink_trailing_slash="$gl_cross_guess_normal" ;;
31592 esac
31593
31594 else
31595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31596 /* end confdefs.h. */
31597 #include <unistd.h>
31598
31599 int
31600 main ()
31601 {
31602 char buf[20];
31603 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
31604 ;
31605 return 0;
31606 }
31607 _ACEOF
31608 if ac_fn_c_try_run "$LINENO"; then :
31609 gl_cv_func_readlink_trailing_slash=yes
31610 else
31611 gl_cv_func_readlink_trailing_slash=no
31612 fi
31613 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31614 conftest.$ac_objext conftest.beam conftest.$ac_ext
31615 fi
31616
31617 rm -f conftest.link conftest.lnk2
31618 fi
31619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_trailing_slash" >&5
31620 $as_echo "$gl_cv_func_readlink_trailing_slash" >&6; }
31621 case "$gl_cv_func_readlink_trailing_slash" in
31622 *yes)
31623 if test "$gl_cv_decl_readlink_works" != yes; then
31624 REPLACE_READLINK=1
31625 fi
31626 ;;
31627 *)
31628
31629 $as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
31630
31631 REPLACE_READLINK=1
31632 ;;
31633 esac
31634
31635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink truncates results correctly" >&5
31636 $as_echo_n "checking whether readlink truncates results correctly... " >&6; }
31637 if ${gl_cv_func_readlink_truncate+:} false; then :
31638 $as_echo_n "(cached) " >&6
31639 else
31640 # We have readlink, so assume ln -s works.
31641 ln -s ab conftest.link
31642 if test "$cross_compiling" = yes; then :
31643 case "$host_os" in
31644 # Guess yes on Linux or glibc systems.
31645 linux-* | linux | *-gnu* | gnu*)
31646 gl_cv_func_readlink_truncate="guessing yes" ;;
31647 # Guess no on AIX or HP-UX.
31648 aix* | hpux*)
31649 gl_cv_func_readlink_truncate="guessing no" ;;
31650 # If we don't know, obey --enable-cross-guesses.
31651 *)
31652 gl_cv_func_readlink_truncate="$gl_cross_guess_normal" ;;
31653 esac
31654
31655 else
31656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31657 /* end confdefs.h. */
31658 #include <unistd.h>
31659
31660 int
31661 main ()
31662 {
31663 char c;
31664 return readlink ("conftest.link", &c, 1) != 1;
31665 ;
31666 return 0;
31667 }
31668 _ACEOF
31669 if ac_fn_c_try_run "$LINENO"; then :
31670 gl_cv_func_readlink_truncate=yes
31671 else
31672 gl_cv_func_readlink_truncate=no
31673 fi
31674 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31675 conftest.$ac_objext conftest.beam conftest.$ac_ext
31676 fi
31677
31678 rm -f conftest.link conftest.lnk2
31679 fi
31680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_truncate" >&5
31681 $as_echo "$gl_cv_func_readlink_truncate" >&6; }
31682 case $gl_cv_func_readlink_truncate in
31683 *yes)
31684 if test "$gl_cv_decl_readlink_works" != yes; then
31685 REPLACE_READLINK=1
31686 fi
31687 ;;
31688 *)
31689
31690 $as_echo "#define READLINK_TRUNCATE_BUG 1" >>confdefs.h
31691
31692 REPLACE_READLINK=1
31693 ;;
31694 esac
31695 fi
31696
31697
31698 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
31699 GL_COND_OBJ_READLINK_TRUE=
31700 GL_COND_OBJ_READLINK_FALSE='#'
31701 else
31702 GL_COND_OBJ_READLINK_TRUE='#'
31703 GL_COND_OBJ_READLINK_FALSE=
31704 fi
31705 :
31706 if test -z "${GL_COND_OBJ_READLINK_TRUE}" && test -z "${GL_COND_OBJ_READLINK_FALSE}"; then
31707 GL_COND_OBJ_READLINK_TRUE='#'
31708 GL_COND_OBJ_READLINK_FALSE='#'
31709 fi
31710
31711 if test -z "$GL_COND_OBJ_READLINK_TRUE"; then :
31712
31713
31714 :
31715
31716
31717 fi
31718
31719
31720
31721
31722
31723
31724
31725
31726
31727 GL_GNULIB_READLINK=1
31728
31729
31730
31731
31732
31733 $as_echo "#define GNULIB_TEST_READLINK 1" >>confdefs.h
31734
31735
31736
31737
31738
31739
31740 if test $REPLACE_MALLOC_FOR_MALLOC_POSIX = 1; then
31741 REPLACE_REALLOC_FOR_REALLOC_POSIX=1
31742 fi
31743
31744 if test $REPLACE_REALLOC_FOR_REALLOC_POSIX = 1; then
31745
31746
31747
31748
31749
31750
31751
31752
31753 gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
31754
31755 fi
31756
31757
31758
31759
31760
31761
31762
31763
31764
31765 GL_GNULIB_REALLOC_POSIX=1
31766
31767
31768
31769
31770
31771 $as_echo "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
31772
31773
31774
31775
31776
31777
31778
31779
31780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on destination" >&5
31781 $as_echo_n "checking whether rename honors trailing slash on destination... " >&6; }
31782 if ${gl_cv_func_rename_slash_dst_works+:} false; then :
31783 $as_echo_n "(cached) " >&6
31784 else
31785 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
31786 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
31787 as_fn_error $? "cannot create temporary files" "$LINENO" 5
31788 # Assume that if we have lstat, we can also check symlinks.
31789 if test $ac_cv_func_lstat = yes; then
31790 ln -s conftest.f conftest.lnk
31791 fi
31792 if test "$cross_compiling" = yes; then :
31793 case "$host_os" in
31794 # Guess yes on Linux systems.
31795 linux-* | linux) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
31796 # Guess yes on glibc systems.
31797 *-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
31798 # Guess no on native Windows.
31799 mingw*) gl_cv_func_rename_slash_dst_works="guessing no" ;;
31800 # If we don't know, obey --enable-cross-guesses.
31801 *) gl_cv_func_rename_slash_dst_works="$gl_cross_guess_normal" ;;
31802 esac
31803
31804 else
31805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31806 /* end confdefs.h. */
31807
31808 # include <stdio.h>
31809 # include <stdlib.h>
31810
31811 int
31812 main ()
31813 {
31814 int result = 0;
31815 if (rename ("conftest.f1", "conftest.f2/") == 0)
31816 result |= 1;
31817 if (rename ("conftest.d1", "conftest.d2/") != 0)
31818 result |= 2;
31819 #if HAVE_LSTAT
31820 if (rename ("conftest.f", "conftest.lnk/") == 0)
31821 result |= 4;
31822 #endif
31823 return result;
31824
31825 ;
31826 return 0;
31827 }
31828 _ACEOF
31829 if ac_fn_c_try_run "$LINENO"; then :
31830 gl_cv_func_rename_slash_dst_works=yes
31831 else
31832 gl_cv_func_rename_slash_dst_works=no
31833 fi
31834 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31835 conftest.$ac_objext conftest.beam conftest.$ac_ext
31836 fi
31837
31838 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
31839
31840 fi
31841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_dst_works" >&5
31842 $as_echo "$gl_cv_func_rename_slash_dst_works" >&6; }
31843 case "$gl_cv_func_rename_slash_dst_works" in
31844 *yes) ;;
31845 *)
31846 REPLACE_RENAME=1
31847
31848 $as_echo "#define RENAME_TRAILING_SLASH_DEST_BUG 1" >>confdefs.h
31849
31850 ;;
31851 esac
31852
31853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on source" >&5
31854 $as_echo_n "checking whether rename honors trailing slash on source... " >&6; }
31855 if ${gl_cv_func_rename_slash_src_works+:} false; then :
31856 $as_echo_n "(cached) " >&6
31857 else
31858 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
31859 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
31860 as_fn_error $? "cannot create temporary files" "$LINENO" 5
31861 # Assume that if we have lstat, we can also check symlinks.
31862 if test $ac_cv_func_lstat = yes; then
31863 ln -s conftest.f conftest.lnk
31864 fi
31865 if test "$cross_compiling" = yes; then :
31866 case "$host_os" in
31867 # Guess yes on Linux systems.
31868 linux-* | linux) gl_cv_func_rename_slash_src_works="guessing yes" ;;
31869 # Guess yes on glibc systems.
31870 *-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
31871 # Guess yes on native Windows.
31872 mingw*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
31873 # If we don't know, obey --enable-cross-guesses.
31874 *) gl_cv_func_rename_slash_src_works="$gl_cross_guess_normal" ;;
31875 esac
31876
31877 else
31878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31879 /* end confdefs.h. */
31880
31881 # include <stdio.h>
31882 # include <stdlib.h>
31883
31884 int
31885 main ()
31886 {
31887 int result = 0;
31888 if (rename ("conftest.f1/", "conftest.d3") == 0)
31889 result |= 1;
31890 if (rename ("conftest.d1/", "conftest.d2") != 0)
31891 result |= 2;
31892 #if HAVE_LSTAT
31893 if (rename ("conftest.lnk/", "conftest.f") == 0)
31894 result |= 4;
31895 #endif
31896 return result;
31897
31898 ;
31899 return 0;
31900 }
31901 _ACEOF
31902 if ac_fn_c_try_run "$LINENO"; then :
31903 gl_cv_func_rename_slash_src_works=yes
31904 else
31905 gl_cv_func_rename_slash_src_works=no
31906 fi
31907 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31908 conftest.$ac_objext conftest.beam conftest.$ac_ext
31909 fi
31910
31911 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
31912
31913 fi
31914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_src_works" >&5
31915 $as_echo "$gl_cv_func_rename_slash_src_works" >&6; }
31916 case "$gl_cv_func_rename_slash_src_works" in
31917 *yes) ;;
31918 *)
31919 REPLACE_RENAME=1
31920
31921 $as_echo "#define RENAME_TRAILING_SLASH_SOURCE_BUG 1" >>confdefs.h
31922
31923 ;;
31924 esac
31925
31926
31927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5
31928 $as_echo_n "checking whether rename manages hard links correctly... " >&6; }
31929 if ${gl_cv_func_rename_link_works+:} false; then :
31930 $as_echo_n "(cached) " >&6
31931 else
31932 if test $ac_cv_func_link = yes; then
31933 if test $cross_compiling != yes; then
31934 rm -rf conftest.f conftest.f1 conftest.f2
31935 if touch conftest.f conftest.f2 && ln conftest.f conftest.f1 &&
31936 set x `ls -i conftest.f conftest.f1` && test "" = ""; then
31937 if test "$cross_compiling" = yes; then :
31938 :
31939
31940 else
31941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31942 /* end confdefs.h. */
31943
31944 # include <errno.h>
31945 # include <stdio.h>
31946 # include <stdlib.h>
31947 # include <unistd.h>
31948
31949
31950 $gl_mda_defines
31951
31952 int
31953 main ()
31954 {
31955 int result = 0;
31956 if (rename ("conftest.f", "conftest.f1"))
31957 result |= 1;
31958 if (unlink ("conftest.f1"))
31959 result |= 2;
31960
31961 /* Allow either the POSIX-required behavior, where the
31962 previous rename kept conftest.f, or the (better) NetBSD
31963 behavior, where it removed conftest.f. */
31964 if (rename ("conftest.f", "conftest.f") != 0
31965 && errno != ENOENT)
31966 result |= 4;
31967
31968 if (rename ("conftest.f1", "conftest.f1") == 0)
31969 result |= 8;
31970 if (rename ("conftest.f2", "conftest.f2") != 0)
31971 result |= 16;
31972 return result;
31973
31974 ;
31975 return 0;
31976 }
31977 _ACEOF
31978 if ac_fn_c_try_run "$LINENO"; then :
31979 gl_cv_func_rename_link_works=yes
31980 else
31981 gl_cv_func_rename_link_works=no
31982 fi
31983 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31984 conftest.$ac_objext conftest.beam conftest.$ac_ext
31985 fi
31986
31987 else
31988 gl_cv_func_rename_link_works="guessing no"
31989 fi
31990 rm -rf conftest.f conftest.f1 conftest.f2
31991 else
31992 case "$host_os" in
31993 # Guess yes on Linux systems.
31994 linux-* | linux) gl_cv_func_rename_link_works="guessing yes" ;;
31995 # Guess yes on glibc systems.
31996 *-gnu*) gl_cv_func_rename_link_works="guessing yes" ;;
31997 # Guess yes on native Windows.
31998 mingw*) gl_cv_func_rename_link_works="guessing yes" ;;
31999 # If we don't know, obey --enable-cross-guesses.
32000 *) gl_cv_func_rename_link_works="$gl_cross_guess_normal" ;;
32001 esac
32002 fi
32003 else
32004 gl_cv_func_rename_link_works=yes
32005 fi
32006
32007 fi
32008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_link_works" >&5
32009 $as_echo "$gl_cv_func_rename_link_works" >&6; }
32010 case "$gl_cv_func_rename_link_works" in
32011 *yes) ;;
32012 *)
32013 REPLACE_RENAME=1
32014
32015 $as_echo "#define RENAME_HARD_LINK_BUG 1" >>confdefs.h
32016
32017 ;;
32018 esac
32019
32020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages existing destinations correctly" >&5
32021 $as_echo_n "checking whether rename manages existing destinations correctly... " >&6; }
32022 if ${gl_cv_func_rename_dest_works+:} false; then :
32023 $as_echo_n "(cached) " >&6
32024 else
32025 rm -rf conftest.f conftest.d1 conftest.d2
32026 touch conftest.f && mkdir conftest.d1 conftest.d2 ||
32027 as_fn_error $? "cannot create temporary files" "$LINENO" 5
32028 if test "$cross_compiling" = yes; then :
32029 case "$host_os" in
32030 # Guess yes on Linux systems.
32031 linux-* | linux) gl_cv_func_rename_dest_works="guessing yes" ;;
32032 # Guess yes on glibc systems.
32033 *-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;;
32034 # Guess no on native Windows.
32035 mingw*) gl_cv_func_rename_dest_works="guessing no" ;;
32036 # If we don't know, obey --enable-cross-guesses.
32037 *) gl_cv_func_rename_dest_works="$gl_cross_guess_normal" ;;
32038 esac
32039
32040 else
32041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32042 /* end confdefs.h. */
32043
32044 # include <stdio.h>
32045 # include <stdlib.h>
32046
32047 int
32048 main ()
32049 {
32050 int result = 0;
32051 if (rename ("conftest.d1", "conftest.d2") != 0)
32052 result |= 1;
32053 if (rename ("conftest.d2", "conftest.f") == 0)
32054 result |= 2;
32055 return result;
32056
32057 ;
32058 return 0;
32059 }
32060 _ACEOF
32061 if ac_fn_c_try_run "$LINENO"; then :
32062 gl_cv_func_rename_dest_works=yes
32063 else
32064 gl_cv_func_rename_dest_works=no
32065 fi
32066 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32067 conftest.$ac_objext conftest.beam conftest.$ac_ext
32068 fi
32069
32070 rm -rf conftest.f conftest.d1 conftest.d2
32071
32072 fi
32073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_dest_works" >&5
32074 $as_echo "$gl_cv_func_rename_dest_works" >&6; }
32075 case "$gl_cv_func_rename_dest_works" in
32076 *yes) ;;
32077 *)
32078 REPLACE_RENAME=1
32079
32080 $as_echo "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h
32081
32082 ;;
32083 esac
32084
32085
32086 if test $REPLACE_RENAME = 1; then
32087 GL_COND_OBJ_RENAME_TRUE=
32088 GL_COND_OBJ_RENAME_FALSE='#'
32089 else
32090 GL_COND_OBJ_RENAME_TRUE='#'
32091 GL_COND_OBJ_RENAME_FALSE=
32092 fi
32093 :
32094 if test -z "${GL_COND_OBJ_RENAME_TRUE}" && test -z "${GL_COND_OBJ_RENAME_FALSE}"; then
32095 GL_COND_OBJ_RENAME_TRUE='#'
32096 GL_COND_OBJ_RENAME_FALSE='#'
32097 fi
32098
32099
32100
32101
32102
32103
32104
32105
32106
32107
32108 GL_GNULIB_RENAME=1
32109
32110
32111
32112
32113
32114 $as_echo "#define GNULIB_TEST_RENAME 1" >>confdefs.h
32115
32116
32117
32118
32119
32120
32121 for ac_func in rewinddir
32122 do :
32123 ac_fn_c_check_func "$LINENO" "rewinddir" "ac_cv_func_rewinddir"
32124 if test "x$ac_cv_func_rewinddir" = xyes; then :
32125 cat >>confdefs.h <<_ACEOF
32126 #define HAVE_REWINDDIR 1
32127 _ACEOF
32128
32129 fi
32130 done
32131
32132 if test $ac_cv_func_rewinddir = no; then
32133 HAVE_REWINDDIR=0
32134 fi
32135
32136
32137 if test $HAVE_REWINDDIR = 0; then
32138 GL_COND_OBJ_REWINDDIR_TRUE=
32139 GL_COND_OBJ_REWINDDIR_FALSE='#'
32140 else
32141 GL_COND_OBJ_REWINDDIR_TRUE='#'
32142 GL_COND_OBJ_REWINDDIR_FALSE=
32143 fi
32144 :
32145 if test -z "${GL_COND_OBJ_REWINDDIR_TRUE}" && test -z "${GL_COND_OBJ_REWINDDIR_FALSE}"; then
32146 GL_COND_OBJ_REWINDDIR_TRUE='#'
32147 GL_COND_OBJ_REWINDDIR_FALSE='#'
32148 fi
32149
32150
32151
32152
32153
32154
32155
32156
32157
32158
32159 GL_GNULIB_REWINDDIR=1
32160
32161
32162
32163
32164
32165 $as_echo "#define GNULIB_TEST_REWINDDIR 1" >>confdefs.h
32166
32167
32168
32169
32170
32171
32172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
32173 $as_echo_n "checking whether rmdir works... " >&6; }
32174 if ${gl_cv_func_rmdir_works+:} false; then :
32175 $as_echo_n "(cached) " >&6
32176 else
32177 mkdir conftest.dir
32178 touch conftest.file
32179 if test "$cross_compiling" = yes; then :
32180 case "$host_os" in
32181 # Guess yes on Linux systems.
32182 linux-* | linux) gl_cv_func_rmdir_works="guessing yes" ;;
32183 # Guess yes on glibc systems.
32184 *-gnu* | gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
32185 # Guess no on native Windows.
32186 mingw*) gl_cv_func_rmdir_works="guessing no" ;;
32187 # If we don't know, obey --enable-cross-guesses.
32188 *) gl_cv_func_rmdir_works="$gl_cross_guess_normal" ;;
32189 esac
32190
32191 else
32192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32193 /* end confdefs.h. */
32194 #include <stdio.h>
32195 #include <errno.h>
32196 #if HAVE_UNISTD_H
32197 # include <unistd.h>
32198 #else /* on Windows with MSVC */
32199 # include <direct.h>
32200 #endif
32201
32202
32203 $gl_mda_defines
32204
32205 int
32206 main ()
32207 {
32208 int result = 0;
32209 if (!rmdir ("conftest.file/"))
32210 result |= 1;
32211 else if (errno != ENOTDIR)
32212 result |= 2;
32213 if (!rmdir ("conftest.dir/./"))
32214 result |= 4;
32215 return result;
32216
32217 ;
32218 return 0;
32219 }
32220 _ACEOF
32221 if ac_fn_c_try_run "$LINENO"; then :
32222 gl_cv_func_rmdir_works=yes
32223 else
32224 gl_cv_func_rmdir_works=no
32225 fi
32226 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32227 conftest.$ac_objext conftest.beam conftest.$ac_ext
32228 fi
32229
32230 rm -rf conftest.dir conftest.file
32231 fi
32232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
32233 $as_echo "$gl_cv_func_rmdir_works" >&6; }
32234 case "$gl_cv_func_rmdir_works" in
32235 *yes) ;;
32236 *)
32237 REPLACE_RMDIR=1
32238 ;;
32239 esac
32240
32241
32242 if test $REPLACE_RMDIR = 1; then
32243 GL_COND_OBJ_RMDIR_TRUE=
32244 GL_COND_OBJ_RMDIR_FALSE='#'
32245 else
32246 GL_COND_OBJ_RMDIR_TRUE='#'
32247 GL_COND_OBJ_RMDIR_FALSE=
32248 fi
32249 :
32250 if test -z "${GL_COND_OBJ_RMDIR_TRUE}" && test -z "${GL_COND_OBJ_RMDIR_FALSE}"; then
32251 GL_COND_OBJ_RMDIR_TRUE='#'
32252 GL_COND_OBJ_RMDIR_FALSE='#'
32253 fi
32254
32255
32256
32257
32258
32259
32260
32261
32262
32263
32264 GL_GNULIB_RMDIR=1
32265
32266
32267
32268
32269
32270 $as_echo "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
32271
32272
32273
32274
32275
32276
32277
32278
32279
32280
32281
32282 if test "$ac_cv_header_winsock2_h" = yes; then
32283 REPLACE_SELECT=1
32284 else
32285
32286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether select supports a 0 argument" >&5
32287 $as_echo_n "checking whether select supports a 0 argument... " >&6; }
32288 if ${gl_cv_func_select_supports0+:} false; then :
32289 $as_echo_n "(cached) " >&6
32290 else
32291
32292 if test "$cross_compiling" = yes; then :
32293
32294 case "$host_os" in
32295 # Guess no on Interix.
32296 interix*) gl_cv_func_select_supports0="guessing no";;
32297 # Guess yes otherwise.
32298 *) gl_cv_func_select_supports0="guessing yes";;
32299 esac
32300
32301 else
32302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32303 /* end confdefs.h. */
32304
32305 #include <sys/types.h>
32306 #include <sys/time.h>
32307 #if HAVE_SYS_SELECT_H
32308 #include <sys/select.h>
32309 #endif
32310 int main ()
32311 {
32312 struct timeval timeout;
32313 timeout.tv_sec = 0;
32314 timeout.tv_usec = 5;
32315 return select (0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &timeout) < 0;
32316 }
32317 _ACEOF
32318 if ac_fn_c_try_run "$LINENO"; then :
32319 gl_cv_func_select_supports0=yes
32320 else
32321 gl_cv_func_select_supports0=no
32322 fi
32323 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32324 conftest.$ac_objext conftest.beam conftest.$ac_ext
32325 fi
32326
32327
32328 fi
32329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_supports0" >&5
32330 $as_echo "$gl_cv_func_select_supports0" >&6; }
32331 case "$gl_cv_func_select_supports0" in
32332 *yes) ;;
32333 *) REPLACE_SELECT=1 ;;
32334 esac
32335
32336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether select detects invalid fds" >&5
32337 $as_echo_n "checking whether select detects invalid fds... " >&6; }
32338 if ${gl_cv_func_select_detects_ebadf+:} false; then :
32339 $as_echo_n "(cached) " >&6
32340 else
32341
32342 if test "$cross_compiling" = yes; then :
32343
32344 case "$host_os" in
32345 # Guess yes on Linux systems.
32346 linux-* | linux) gl_cv_func_select_detects_ebadf="guessing yes" ;;
32347 # Guess yes on glibc systems.
32348 *-gnu* | gnu*) gl_cv_func_select_detects_ebadf="guessing yes" ;;
32349 # If we don't know, obey --enable-cross-guesses.
32350 *) gl_cv_func_select_detects_ebadf="$gl_cross_guess_normal" ;;
32351 esac
32352
32353 else
32354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32355 /* end confdefs.h. */
32356
32357 #include <sys/types.h>
32358 #include <sys/time.h>
32359 #if HAVE_SYS_SELECT_H
32360 # include <sys/select.h>
32361 #endif
32362 #include <unistd.h>
32363 #include <errno.h>
32364
32365
32366 $gl_mda_defines
32367
32368 int
32369 main ()
32370 {
32371
32372 fd_set set;
32373 dup2(0, 16);
32374 FD_ZERO(&set);
32375 FD_SET(16, &set);
32376 close(16);
32377 struct timeval timeout;
32378 timeout.tv_sec = 0;
32379 timeout.tv_usec = 5;
32380 return select (17, &set, NULL, NULL, &timeout) != -1 || errno != EBADF;
32381
32382 ;
32383 return 0;
32384 }
32385 _ACEOF
32386 if ac_fn_c_try_run "$LINENO"; then :
32387 gl_cv_func_select_detects_ebadf=yes
32388 else
32389 gl_cv_func_select_detects_ebadf=no
32390 fi
32391 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32392 conftest.$ac_objext conftest.beam conftest.$ac_ext
32393 fi
32394
32395
32396 fi
32397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_detects_ebadf" >&5
32398 $as_echo "$gl_cv_func_select_detects_ebadf" >&6; }
32399 case $gl_cv_func_select_detects_ebadf in
32400 *yes) ;;
32401 *) REPLACE_SELECT=1 ;;
32402 esac
32403 fi
32404
32405 LIB_SELECT="$LIBSOCKET"
32406 if test $REPLACE_SELECT = 1; then
32407 case "$host_os" in
32408 mingw*)
32409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32410 /* end confdefs.h. */
32411
32412 #define WIN32_LEAN_AND_MEAN
32413 #include <windows.h>
32414 int
32415 main ()
32416 {
32417 MsgWaitForMultipleObjects (0, NULL, 0, 0, 0);
32418 return 0;
32419 }
32420 _ACEOF
32421 if ac_fn_c_try_link "$LINENO"; then :
32422
32423 else
32424 LIB_SELECT="$LIB_SELECT -luser32"
32425 fi
32426 rm -f core conftest.err conftest.$ac_objext \
32427 conftest$ac_exeext conftest.$ac_ext
32428 ;;
32429 esac
32430 fi
32431
32432
32433
32434 if test $REPLACE_SELECT = 1; then
32435 GL_COND_OBJ_SELECT_TRUE=
32436 GL_COND_OBJ_SELECT_FALSE='#'
32437 else
32438 GL_COND_OBJ_SELECT_TRUE='#'
32439 GL_COND_OBJ_SELECT_FALSE=
32440 fi
32441 :
32442 if test -z "${GL_COND_OBJ_SELECT_TRUE}" && test -z "${GL_COND_OBJ_SELECT_FALSE}"; then
32443 GL_COND_OBJ_SELECT_TRUE='#'
32444 GL_COND_OBJ_SELECT_FALSE='#'
32445 fi
32446
32447
32448
32449
32450
32451
32452
32453
32454
32455
32456 GL_GNULIB_SELECT=1
32457
32458
32459
32460
32461
32462 $as_echo "#define GNULIB_TEST_SELECT 1" >>confdefs.h
32463
32464
32465
32466
32467
32468 if test $ac_cv_func_setenv = no; then
32469 HAVE_SETENV=0
32470 else
32471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
32472 $as_echo_n "checking whether setenv validates arguments... " >&6; }
32473 if ${gl_cv_func_setenv_works+:} false; then :
32474 $as_echo_n "(cached) " >&6
32475 else
32476 if test "$cross_compiling" = yes; then :
32477 case "$host_os" in
32478 # Guess yes on glibc systems.
32479 *-gnu* | gnu*) gl_cv_func_setenv_works="guessing yes" ;;
32480 # Guess yes on musl systems.
32481 *-musl*) gl_cv_func_setenv_works="guessing yes" ;;
32482 # If we don't know, obey --enable-cross-guesses.
32483 *) gl_cv_func_setenv_works="$gl_cross_guess_normal" ;;
32484 esac
32485
32486 else
32487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32488 /* end confdefs.h. */
32489
32490 #include <stdlib.h>
32491 #include <errno.h>
32492 #include <string.h>
32493
32494 int
32495 main ()
32496 {
32497
32498 int result = 0;
32499 {
32500 if (setenv ("", "", 0) != -1)
32501 result |= 1;
32502 else if (errno != EINVAL)
32503 result |= 2;
32504 }
32505 {
32506 if (setenv ("a", "=", 1) != 0)
32507 result |= 4;
32508 else if (strcmp (getenv ("a"), "=") != 0)
32509 result |= 8;
32510 }
32511 return result;
32512
32513 ;
32514 return 0;
32515 }
32516 _ACEOF
32517 if ac_fn_c_try_run "$LINENO"; then :
32518 gl_cv_func_setenv_works=yes
32519 else
32520 gl_cv_func_setenv_works=no
32521 fi
32522 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32523 conftest.$ac_objext conftest.beam conftest.$ac_ext
32524 fi
32525
32526 fi
32527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
32528 $as_echo "$gl_cv_func_setenv_works" >&6; }
32529 case "$gl_cv_func_setenv_works" in
32530 *yes) ;;
32531 *)
32532 REPLACE_SETENV=1
32533 ;;
32534 esac
32535 fi
32536
32537
32538 if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
32539 GL_COND_OBJ_SETENV_TRUE=
32540 GL_COND_OBJ_SETENV_FALSE='#'
32541 else
32542 GL_COND_OBJ_SETENV_TRUE='#'
32543 GL_COND_OBJ_SETENV_FALSE=
32544 fi
32545 :
32546 if test -z "${GL_COND_OBJ_SETENV_TRUE}" && test -z "${GL_COND_OBJ_SETENV_FALSE}"; then
32547 GL_COND_OBJ_SETENV_TRUE='#'
32548 GL_COND_OBJ_SETENV_FALSE='#'
32549 fi
32550
32551
32552
32553
32554
32555
32556
32557
32558
32559
32560 GL_GNULIB_SETENV=1
32561
32562
32563
32564
32565
32566 $as_echo "#define GNULIB_TEST_SETENV 1" >>confdefs.h
32567
32568
32569
32570
32571
32572
32573
32574
32575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (LC_ALL, NULL) is multithread-safe" >&5
32576 $as_echo_n "checking whether setlocale (LC_ALL, NULL) is multithread-safe... " >&6; }
32577 if ${gl_cv_func_setlocale_null_all_mtsafe+:} false; then :
32578 $as_echo_n "(cached) " >&6
32579 else
32580 case "$host_os" in
32581 # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin.
32582 *-musl* | darwin* | freebsd* | midnightbsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*)
32583 gl_cv_func_setlocale_null_all_mtsafe=no ;;
32584 # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows.
32585 *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*)
32586 gl_cv_func_setlocale_null_all_mtsafe=yes ;;
32587 # If we don't know, obey --enable-cross-guesses.
32588 *)
32589 gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;;
32590 esac
32591
32592 fi
32593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_all_mtsafe" >&5
32594 $as_echo "$gl_cv_func_setlocale_null_all_mtsafe" >&6; }
32595 case "$host_os" in
32596 mingw*) ;;
32597 *)
32598 if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
32599 gl_cv_func_setlocale_null_all_mtsafe="trivially yes"
32600 fi
32601 ;;
32602 esac
32603 case "$gl_cv_func_setlocale_null_all_mtsafe" in
32604 *yes) SETLOCALE_NULL_ALL_MTSAFE=1 ;;
32605 *) SETLOCALE_NULL_ALL_MTSAFE=0 ;;
32606 esac
32607
32608 cat >>confdefs.h <<_ACEOF
32609 #define SETLOCALE_NULL_ALL_MTSAFE $SETLOCALE_NULL_ALL_MTSAFE
32610 _ACEOF
32611
32612
32613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (category, NULL) is multithread-safe" >&5
32614 $as_echo_n "checking whether setlocale (category, NULL) is multithread-safe... " >&6; }
32615 if ${gl_cv_func_setlocale_null_one_mtsafe+:} false; then :
32616 $as_echo_n "(cached) " >&6
32617 else
32618 case "$host_os" in
32619 # Guess no on OpenBSD, AIX.
32620 openbsd* | aix*)
32621 gl_cv_func_setlocale_null_one_mtsafe=no ;;
32622 # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows.
32623 *-gnu* | gnu* | *-musl* | darwin* | freebsd* | midnightbsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
32624 gl_cv_func_setlocale_null_one_mtsafe=yes ;;
32625 # If we don't know, obey --enable-cross-guesses.
32626 *)
32627 gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;;
32628 esac
32629
32630 fi
32631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_one_mtsafe" >&5
32632 $as_echo "$gl_cv_func_setlocale_null_one_mtsafe" >&6; }
32633 case "$host_os" in
32634 mingw*) ;;
32635 *)
32636 if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
32637 gl_cv_func_setlocale_null_one_mtsafe="trivially yes"
32638 fi
32639 ;;
32640 esac
32641 case "$gl_cv_func_setlocale_null_one_mtsafe" in
32642 *yes) SETLOCALE_NULL_ONE_MTSAFE=1 ;;
32643 *) SETLOCALE_NULL_ONE_MTSAFE=0 ;;
32644 esac
32645
32646 cat >>confdefs.h <<_ACEOF
32647 #define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE
32648 _ACEOF
32649
32650
32651 if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
32652 case "$host_os" in
32653 mingw*) LIB_SETLOCALE_NULL= ;;
32654 *)
32655
32656
32657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
32658 $as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
32659 if ${gl_cv_have_weak+:} false; then :
32660 $as_echo_n "(cached) " >&6
32661 else
32662 case "$host_os" in
32663 cygwin*)
32664 gl_cv_have_weak="guessing no"
32665 ;;
32666 *)
32667 gl_cv_have_weak=no
32668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32669 /* end confdefs.h. */
32670 extern void xyzzy ();
32671 #pragma weak xyzzy
32672 int
32673 main ()
32674 {
32675 xyzzy();
32676 ;
32677 return 0;
32678 }
32679 _ACEOF
32680 if ac_fn_c_try_link "$LINENO"; then :
32681 gl_cv_have_weak=maybe
32682 fi
32683 rm -f core conftest.err conftest.$ac_objext \
32684 conftest$ac_exeext conftest.$ac_ext
32685 if test $gl_cv_have_weak = maybe; then
32686 if test "$cross_compiling" = yes; then :
32687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32688 /* end confdefs.h. */
32689 #ifdef __ELF__
32690 Extensible Linking Format
32691 #endif
32692
32693 _ACEOF
32694 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
32695 $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
32696 gl_cv_have_weak="guessing yes"
32697 else
32698 gl_cv_have_weak="guessing no"
32699 fi
32700 rm -f conftest*
32701
32702
32703 else
32704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32705 /* end confdefs.h. */
32706
32707 #include <stdio.h>
32708 #pragma weak fputs
32709 int main ()
32710 {
32711 return (fputs == NULL);
32712 }
32713 _ACEOF
32714 if ac_fn_c_try_run "$LINENO"; then :
32715 gl_cv_have_weak=yes
32716 else
32717 gl_cv_have_weak=no
32718 fi
32719 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32720 conftest.$ac_objext conftest.beam conftest.$ac_ext
32721 fi
32722
32723 fi
32724 ;;
32725 esac
32726 case " $LDFLAGS " in
32727 *" -static "*) gl_cv_have_weak=no ;;
32728 esac
32729 case "$gl_cv_have_weak" in
32730 *yes)
32731 case "$host_os" in
32732 freebsd* | dragonfly* | midnightbsd*)
32733 : > conftest1.c
32734 $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
32735 cat <<EOF > conftest2.c
32736 #include <pthread.h>
32737 #pragma weak pthread_mutexattr_gettype
32738 int main ()
32739 {
32740 return (pthread_mutexattr_gettype != NULL);
32741 }
32742 EOF
32743 $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
32744 || gl_cv_have_weak=no
32745 rm -f conftest1.c libempty.so conftest2.c conftest
32746 ;;
32747 esac
32748 ;;
32749 esac
32750
32751 fi
32752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
32753 $as_echo "$gl_cv_have_weak" >&6; }
32754 case "$gl_cv_have_weak" in
32755 *yes)
32756
32757 $as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
32758
32759 ;;
32760 esac
32761
32762 case "$gl_cv_have_weak" in
32763 *yes) LIB_SETLOCALE_NULL= ;;
32764 *) LIB_SETLOCALE_NULL="$LIBPTHREAD" ;;
32765 esac
32766 ;;
32767 esac
32768 else
32769 LIB_SETLOCALE_NULL=
32770 fi
32771
32772
32773
32774 if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
32775 GL_COND_OBJ_SETLOCALE_LOCK_TRUE=
32776 GL_COND_OBJ_SETLOCALE_LOCK_FALSE='#'
32777 else
32778 GL_COND_OBJ_SETLOCALE_LOCK_TRUE='#'
32779 GL_COND_OBJ_SETLOCALE_LOCK_FALSE=
32780 fi
32781 :
32782 if test -z "${GL_COND_OBJ_SETLOCALE_LOCK_TRUE}" && test -z "${GL_COND_OBJ_SETLOCALE_LOCK_FALSE}"; then
32783 GL_COND_OBJ_SETLOCALE_LOCK_TRUE='#'
32784 GL_COND_OBJ_SETLOCALE_LOCK_FALSE='#'
32785 fi
32786
32787 if test -z "$GL_COND_OBJ_SETLOCALE_LOCK_TRUE"; then :
32788
32789
32790
32791
32792 CFLAG_VISIBILITY=
32793 HAVE_VISIBILITY=0
32794 if test -n "$GCC"; then
32795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
32796 $as_echo_n "checking whether the -Werror option is usable... " >&6; }
32797 if ${gl_cv_cc_vis_werror+:} false; then :
32798 $as_echo_n "(cached) " >&6
32799 else
32800 gl_save_CFLAGS="$CFLAGS"
32801 CFLAGS="$CFLAGS -Werror"
32802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32803 /* end confdefs.h. */
32804
32805 int
32806 main ()
32807 {
32808
32809 ;
32810 return 0;
32811 }
32812 _ACEOF
32813 if ac_fn_c_try_compile "$LINENO"; then :
32814 gl_cv_cc_vis_werror=yes
32815 else
32816 gl_cv_cc_vis_werror=no
32817 fi
32818 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32819 CFLAGS="$gl_save_CFLAGS"
32820
32821 fi
32822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
32823 $as_echo "$gl_cv_cc_vis_werror" >&6; }
32824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
32825 $as_echo_n "checking for simple visibility declarations... " >&6; }
32826 if ${gl_cv_cc_visibility+:} false; then :
32827 $as_echo_n "(cached) " >&6
32828 else
32829 gl_save_CFLAGS="$CFLAGS"
32830 CFLAGS="$CFLAGS -fvisibility=hidden"
32831 if test $gl_cv_cc_vis_werror = yes; then
32832 CFLAGS="$CFLAGS -Werror"
32833 fi
32834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32835 /* end confdefs.h. */
32836 extern __attribute__((__visibility__("hidden"))) int hiddenvar;
32837 extern __attribute__((__visibility__("default"))) int exportedvar;
32838 extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
32839 extern __attribute__((__visibility__("default"))) int exportedfunc (void);
32840 void dummyfunc (void);
32841 int hiddenvar;
32842 int exportedvar;
32843 int hiddenfunc (void) { return 51; }
32844 int exportedfunc (void) { return 1225736919; }
32845 void dummyfunc (void) {}
32846
32847 int
32848 main ()
32849 {
32850
32851 ;
32852 return 0;
32853 }
32854 _ACEOF
32855 if ac_fn_c_try_compile "$LINENO"; then :
32856 gl_cv_cc_visibility=yes
32857 else
32858 gl_cv_cc_visibility=no
32859 fi
32860 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32861 CFLAGS="$gl_save_CFLAGS"
32862
32863 fi
32864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
32865 $as_echo "$gl_cv_cc_visibility" >&6; }
32866 if test $gl_cv_cc_visibility = yes; then
32867 CFLAG_VISIBILITY="-fvisibility=hidden"
32868 HAVE_VISIBILITY=1
32869 fi
32870 fi
32871
32872
32873
32874 cat >>confdefs.h <<_ACEOF
32875 #define HAVE_VISIBILITY $HAVE_VISIBILITY
32876 _ACEOF
32877
32878
32879
32880
32881 fi
32882
32883
32884
32885
32886
32887
32888
32889
32890
32891 GL_GNULIB_SETLOCALE_NULL=1
32892
32893
32894
32895
32896
32897 $as_echo "#define GNULIB_TEST_SETLOCALE_NULL 1" >>confdefs.h
32898
32899
32900
32901
32902
32903 if test "$ac_cv_header_winsock2_h" = yes; then
32904 GL_COND_OBJ_SETSOCKOPT_TRUE=
32905 GL_COND_OBJ_SETSOCKOPT_FALSE='#'
32906 else
32907 GL_COND_OBJ_SETSOCKOPT_TRUE='#'
32908 GL_COND_OBJ_SETSOCKOPT_FALSE=
32909 fi
32910 :
32911 if test -z "${GL_COND_OBJ_SETSOCKOPT_TRUE}" && test -z "${GL_COND_OBJ_SETSOCKOPT_FALSE}"; then
32912 GL_COND_OBJ_SETSOCKOPT_TRUE='#'
32913 GL_COND_OBJ_SETSOCKOPT_FALSE='#'
32914 fi
32915
32916
32917
32918
32919
32920
32921
32922
32923
32924
32925 GL_GNULIB_SETSOCKOPT=1
32926
32927
32928
32929
32930
32931 $as_echo "#define GNULIB_TEST_SETSOCKOPT 1" >>confdefs.h
32932
32933
32934
32935
32936
32937
32938
32939
32940
32941
32942
32943
32944 if test "$ac_cv_header_winsock2_h" = yes; then
32945 GL_COND_OBJ_SOCKET_TRUE=
32946 GL_COND_OBJ_SOCKET_FALSE='#'
32947 else
32948 GL_COND_OBJ_SOCKET_TRUE='#'
32949 GL_COND_OBJ_SOCKET_FALSE=
32950 fi
32951 :
32952 if test -z "${GL_COND_OBJ_SOCKET_TRUE}" && test -z "${GL_COND_OBJ_SOCKET_FALSE}"; then
32953 GL_COND_OBJ_SOCKET_TRUE='#'
32954 GL_COND_OBJ_SOCKET_FALSE='#'
32955 fi
32956
32957 # When this module is used, sockets may actually occur as file descriptors,
32958 # hence it is worth warning if the modules 'close' and 'ioctl' are not used.
32959
32960
32961
32962
32963
32964
32965
32966 if test "$ac_cv_header_winsock2_h" = yes; then
32967 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
32968 SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
32969 fi
32970
32971
32972
32973
32974
32975
32976
32977
32978
32979 GL_GNULIB_SOCKET=1
32980
32981
32982
32983
32984
32985 $as_echo "#define GNULIB_TEST_SOCKET 1" >>confdefs.h
32986
32987
32988
32989
32990
32991 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
32992 /* <sys/types.h> is not needed according to POSIX, but the
32993 <sys/socket.h> in i386-unknown-freebsd4.10 and
32994 powerpc-apple-darwin5.5 required it. */
32995 #include <sys/types.h>
32996 #if HAVE_SYS_SOCKET_H
32997 # include <sys/socket.h>
32998 #elif HAVE_WS2TCPIP_H
32999 # include <ws2tcpip.h>
33000 #endif
33001
33002 "
33003 if test "x$ac_cv_type_socklen_t" = xyes; then :
33004
33005 else
33006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
33007 $as_echo_n "checking for socklen_t equivalent... " >&6; }
33008 if ${gl_cv_socklen_t_equiv+:} false; then :
33009 $as_echo_n "(cached) " >&6
33010 else
33011 # Systems have either "struct sockaddr *" or
33012 # "void *" as the second argument to getpeername
33013 gl_cv_socklen_t_equiv=
33014 for arg2 in "struct sockaddr" void; do
33015 for t in int size_t "unsigned int" "long int" "unsigned long int"; do
33016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33017 /* end confdefs.h. */
33018 #include <sys/types.h>
33019 #include <sys/socket.h>
33020
33021 int getpeername (int, $arg2 *, $t *);
33022 int
33023 main ()
33024 {
33025 $t len;
33026 getpeername (0, 0, &len);
33027 ;
33028 return 0;
33029 }
33030 _ACEOF
33031 if ac_fn_c_try_compile "$LINENO"; then :
33032 gl_cv_socklen_t_equiv="$t"
33033 fi
33034 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33035 test "$gl_cv_socklen_t_equiv" != "" && break
33036 done
33037 test "$gl_cv_socklen_t_equiv" != "" && break
33038 done
33039 if test "$gl_cv_socklen_t_equiv" = ""; then
33040 as_fn_error $? "Cannot find a type to use in place of socklen_t" "$LINENO" 5
33041 fi
33042
33043 fi
33044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
33045 $as_echo "$gl_cv_socklen_t_equiv" >&6; }
33046
33047 cat >>confdefs.h <<_ACEOF
33048 #define socklen_t $gl_cv_socklen_t_equiv
33049 _ACEOF
33050
33051 fi
33052
33053
33054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
33055 $as_echo_n "checking for ssize_t... " >&6; }
33056 if ${gt_cv_ssize_t+:} false; then :
33057 $as_echo_n "(cached) " >&6
33058 else
33059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33060 /* end confdefs.h. */
33061 #include <sys/types.h>
33062 int
33063 main ()
33064 {
33065 int x = sizeof (ssize_t *) + sizeof (ssize_t);
33066 return !x;
33067 ;
33068 return 0;
33069 }
33070 _ACEOF
33071 if ac_fn_c_try_compile "$LINENO"; then :
33072 gt_cv_ssize_t=yes
33073 else
33074 gt_cv_ssize_t=no
33075 fi
33076 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33077 fi
33078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
33079 $as_echo "$gt_cv_ssize_t" >&6; }
33080 if test $gt_cv_ssize_t = no; then
33081
33082 $as_echo "#define ssize_t int" >>confdefs.h
33083
33084 fi
33085
33086
33087
33088
33089
33090 case "$host_os" in
33091 mingw*)
33092 ;;
33093 *)
33094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
33095 $as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
33096 if ${gl_cv_func_stat_file_slash+:} false; then :
33097 $as_echo_n "(cached) " >&6
33098 else
33099 touch conftest.tmp
33100 # Assume that if we have lstat, we can also check symlinks.
33101 if test $ac_cv_func_lstat = yes; then
33102 ln -s conftest.tmp conftest.lnk
33103 fi
33104 if test "$cross_compiling" = yes; then :
33105 case "$host_os" in
33106 # Guess yes on Linux systems.
33107 linux-* | linux) gl_cv_func_stat_file_slash="guessing yes" ;;
33108 # Guess yes on glibc systems.
33109 *-gnu* | gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
33110 # If we don't know, obey --enable-cross-guesses.
33111 *) gl_cv_func_stat_file_slash="$gl_cross_guess_normal" ;;
33112 esac
33113
33114 else
33115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33116 /* end confdefs.h. */
33117 #include <sys/stat.h>
33118
33119 int
33120 main ()
33121 {
33122 int result = 0;
33123 struct stat st;
33124 if (!stat ("conftest.tmp/", &st))
33125 result |= 1;
33126 #if HAVE_LSTAT
33127 if (!stat ("conftest.lnk/", &st))
33128 result |= 2;
33129 #endif
33130 return result;
33131
33132 ;
33133 return 0;
33134 }
33135 _ACEOF
33136 if ac_fn_c_try_run "$LINENO"; then :
33137 gl_cv_func_stat_file_slash=yes
33138 else
33139 gl_cv_func_stat_file_slash=no
33140 fi
33141 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33142 conftest.$ac_objext conftest.beam conftest.$ac_ext
33143 fi
33144
33145 rm -f conftest.tmp conftest.lnk
33146 fi
33147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
33148 $as_echo "$gl_cv_func_stat_file_slash" >&6; }
33149 case $gl_cv_func_stat_file_slash in
33150 *no)
33151 REPLACE_STAT=1
33152
33153 $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
33154 ;;
33155 esac
33156 case $host_os in
33157 solaris*)
33158 REPLACE_FSTAT=1 ;;
33159 esac
33160 ;;
33161 esac
33162
33163
33164 if test $REPLACE_STAT = 1; then
33165 GL_COND_OBJ_STAT_TRUE=
33166 GL_COND_OBJ_STAT_FALSE='#'
33167 else
33168 GL_COND_OBJ_STAT_TRUE='#'
33169 GL_COND_OBJ_STAT_FALSE=
33170 fi
33171 :
33172 if test -z "${GL_COND_OBJ_STAT_TRUE}" && test -z "${GL_COND_OBJ_STAT_FALSE}"; then
33173 GL_COND_OBJ_STAT_TRUE='#'
33174 GL_COND_OBJ_STAT_FALSE='#'
33175 fi
33176
33177 if test -z "$GL_COND_OBJ_STAT_TRUE"; then :
33178
33179 case "$host_os" in
33180 mingw*)
33181
33182
33183
33184
33185
33186
33187
33188
33189 gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
33190
33191 ;;
33192 esac
33193
33194
33195
33196 :
33197
33198
33199 fi
33200
33201
33202
33203
33204
33205
33206
33207
33208
33209 GL_GNULIB_STAT=1
33210
33211
33212
33213
33214
33215 $as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h
33216
33217
33218
33219
33220
33221
33222
33223 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>
33224 #include <sys/stat.h>
33225 "
33226 if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes; then :
33227
33228 cat >>confdefs.h <<_ACEOF
33229 #define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
33230 _ACEOF
33231
33232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
33233 $as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
33234 if ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+:} false; then :
33235 $as_echo_n "(cached) " >&6
33236 else
33237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33238 /* end confdefs.h. */
33239
33240 #include <sys/types.h>
33241 #include <sys/stat.h>
33242 #if HAVE_SYS_TIME_H
33243 # include <sys/time.h>
33244 #endif
33245 #include <time.h>
33246 struct timespec ts;
33247 struct stat st;
33248
33249 int
33250 main ()
33251 {
33252
33253 st.st_atim = ts;
33254
33255 ;
33256 return 0;
33257 }
33258 _ACEOF
33259 if ac_fn_c_try_compile "$LINENO"; then :
33260 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
33261 else
33262 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
33263 fi
33264 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33265 fi
33266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
33267 $as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
33268 if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
33269
33270 $as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
33271
33272 fi
33273 else
33274 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>
33275 #include <sys/stat.h>
33276 "
33277 if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes; then :
33278
33279 cat >>confdefs.h <<_ACEOF
33280 #define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
33281 _ACEOF
33282
33283
33284 else
33285 ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
33286 #include <sys/stat.h>
33287 "
33288 if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes; then :
33289
33290 cat >>confdefs.h <<_ACEOF
33291 #define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
33292 _ACEOF
33293
33294
33295 else
33296 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>
33297 #include <sys/stat.h>
33298 "
33299 if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes; then :
33300
33301 cat >>confdefs.h <<_ACEOF
33302 #define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
33303 _ACEOF
33304
33305
33306 fi
33307
33308 fi
33309
33310 fi
33311
33312 fi
33313
33314
33315
33316
33317
33318 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>
33319 #include <sys/stat.h>
33320 "
33321 if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes; then :
33322
33323 cat >>confdefs.h <<_ACEOF
33324 #define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
33325 _ACEOF
33326
33327
33328 else
33329 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
33330 #include <sys/stat.h>
33331 "
33332 if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes; then :
33333
33334 cat >>confdefs.h <<_ACEOF
33335 #define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
33336 _ACEOF
33337
33338
33339 else
33340 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>
33341 #include <sys/stat.h>
33342 "
33343 if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes; then :
33344
33345 cat >>confdefs.h <<_ACEOF
33346 #define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
33347 _ACEOF
33348
33349
33350 fi
33351
33352 fi
33353
33354 fi
33355
33356
33357
33358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
33359 $as_echo_n "checking for working stdalign.h... " >&6; }
33360 if ${gl_cv_header_working_stdalign_h+:} false; then :
33361 $as_echo_n "(cached) " >&6
33362 else
33363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33364 /* end confdefs.h. */
33365 #include <stdint.h>
33366 #include <stdalign.h>
33367 #include <stddef.h>
33368
33369 /* Test that alignof yields a result consistent with offsetof.
33370 This catches GCC bug 52023
33371 <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
33372 #ifdef __cplusplus
33373 template <class t> struct alignof_helper { char a; t b; };
33374 # define ao(type) offsetof (alignof_helper<type>, b)
33375 #else
33376 # define ao(type) offsetof (struct { char a; type b; }, b)
33377 #endif
33378 char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
33379 char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
33380 char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
33381
33382 /* Test _Alignas only on platforms where gnulib can help. */
33383 #if \
33384 ((defined __cplusplus && 201103 <= __cplusplus) \
33385 || (__TINYC__ && defined __attribute__) \
33386 || (defined __APPLE__ && defined __MACH__ \
33387 ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
33388 : __GNUC__) \
33389 || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \
33390 || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__ \
33391 || 1300 <= _MSC_VER)
33392 struct alignas_test { char c; char alignas (8) alignas_8; };
33393 char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
33394 ? 1 : -1];
33395 #endif
33396
33397 int
33398 main ()
33399 {
33400
33401 ;
33402 return 0;
33403 }
33404 _ACEOF
33405 if ac_fn_c_try_compile "$LINENO"; then :
33406 gl_cv_header_working_stdalign_h=yes
33407 else
33408 gl_cv_header_working_stdalign_h=no
33409 fi
33410 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33411 fi
33412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
33413 $as_echo "$gl_cv_header_working_stdalign_h" >&6; }
33414
33415 if test $gl_cv_header_working_stdalign_h = yes; then
33416 GL_GENERATE_STDALIGN_H=false
33417 else
33418 GL_GENERATE_STDALIGN_H=true
33419 fi
33420
33421
33422
33423
33424
33425 case "$GL_GENERATE_STDALIGN_H" in
33426 false) STDALIGN_H='' ;;
33427 true)
33428 if test -z "$STDALIGN_H"; then
33429 STDALIGN_H="${gl_source_base_prefix}stdalign.h"
33430 fi
33431 ;;
33432 *) echo "*** GL_GENERATE_STDALIGN_H is not set correctly" 1>&2; exit 1 ;;
33433 esac
33434
33435
33436 if $GL_GENERATE_STDALIGN_H; then
33437 GL_GENERATE_STDALIGN_H_TRUE=
33438 GL_GENERATE_STDALIGN_H_FALSE='#'
33439 else
33440 GL_GENERATE_STDALIGN_H_TRUE='#'
33441 GL_GENERATE_STDALIGN_H_FALSE=
33442 fi
33443 :
33444 if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
33445 GL_GENERATE_STDALIGN_H_TRUE='#'
33446 GL_GENERATE_STDALIGN_H_FALSE='#'
33447 fi
33448
33449
33450
33451
33452
33453
33454
33455
33456
33457
33458 if test "$ac_cv_header_stdbool_h" = yes; then
33459 case "$host_os" in
33460 solaris*)
33461 if test -z "$GCC"; then
33462 GL_GENERATE_STDBOOL_H=true
33463 else
33464 GL_GENERATE_STDBOOL_H=false
33465 fi
33466 ;;
33467 *)
33468 GL_GENERATE_STDBOOL_H=false
33469 ;;
33470 esac
33471 else
33472 GL_GENERATE_STDBOOL_H=true
33473 fi
33474
33475 if test "$ac_cv_type__Bool" = yes; then
33476 HAVE__BOOL=1
33477 else
33478 HAVE__BOOL=0
33479 fi
33480
33481
33482
33483
33484
33485
33486 case "$GL_GENERATE_STDBOOL_H" in
33487 false) STDBOOL_H='' ;;
33488 true)
33489 if test -z "$STDBOOL_H"; then
33490 STDBOOL_H="${gl_source_base_prefix}stdbool.h"
33491 fi
33492 ;;
33493 *) echo "*** GL_GENERATE_STDBOOL_H is not set correctly" 1>&2; exit 1 ;;
33494 esac
33495
33496
33497 if $GL_GENERATE_STDBOOL_H; then
33498 GL_GENERATE_STDBOOL_H_TRUE=
33499 GL_GENERATE_STDBOOL_H_FALSE='#'
33500 else
33501 GL_GENERATE_STDBOOL_H_TRUE='#'
33502 GL_GENERATE_STDBOOL_H_FALSE=
33503 fi
33504 :
33505 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
33506 GL_GENERATE_STDBOOL_H_TRUE='#'
33507 GL_GENERATE_STDBOOL_H_FALSE='#'
33508 fi
33509
33510
33511
33512
33513
33514
33515
33516
33517
33518
33519
33520
33521
33522
33523
33524
33525 case "$GL_GENERATE_STDDEF_H" in
33526 false) STDDEF_H='' ;;
33527 true)
33528 if test -z "$STDDEF_H"; then
33529 STDDEF_H="${gl_source_base_prefix}stddef.h"
33530 fi
33531 ;;
33532 *) echo "*** GL_GENERATE_STDDEF_H is not set correctly" 1>&2; exit 1 ;;
33533 esac
33534
33535
33536 if $GL_GENERATE_STDDEF_H; then
33537 GL_GENERATE_STDDEF_H_TRUE=
33538 GL_GENERATE_STDDEF_H_FALSE='#'
33539 else
33540 GL_GENERATE_STDDEF_H_TRUE='#'
33541 GL_GENERATE_STDDEF_H_FALSE=
33542 fi
33543 :
33544 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
33545 GL_GENERATE_STDDEF_H_TRUE='#'
33546 GL_GENERATE_STDDEF_H_FALSE='#'
33547 fi
33548
33549
33550
33551
33552
33553
33554
33555
33556
33557
33558
33559 case "$GL_GENERATE_STDINT_H" in
33560 false) STDINT_H='' ;;
33561 true)
33562 if test -z "$STDINT_H"; then
33563 STDINT_H="${gl_source_base_prefix}stdint.h"
33564 fi
33565 ;;
33566 *) echo "*** GL_GENERATE_STDINT_H is not set correctly" 1>&2; exit 1 ;;
33567 esac
33568
33569
33570 if $GL_GENERATE_STDINT_H; then
33571 GL_GENERATE_STDINT_H_TRUE=
33572 GL_GENERATE_STDINT_H_FALSE='#'
33573 else
33574 GL_GENERATE_STDINT_H_TRUE='#'
33575 GL_GENERATE_STDINT_H_FALSE=
33576 fi
33577 :
33578 if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
33579 GL_GENERATE_STDINT_H_TRUE='#'
33580 GL_GENERATE_STDINT_H_FALSE='#'
33581 fi
33582
33583
33584
33585
33586
33587
33588
33589
33590
33591 case "$GL_GENERATE_LIMITS_H" in
33592 false) LIMITS_H='' ;;
33593 true)
33594 if test -z "$LIMITS_H"; then
33595 LIMITS_H="${gl_source_base_prefix}limits.h"
33596 fi
33597 ;;
33598 *) echo "*** GL_GENERATE_LIMITS_H is not set correctly" 1>&2; exit 1 ;;
33599 esac
33600
33601
33602 if $GL_GENERATE_LIMITS_H; then
33603 GL_GENERATE_LIMITS_H_TRUE=
33604 GL_GENERATE_LIMITS_H_FALSE='#'
33605 else
33606 GL_GENERATE_LIMITS_H_TRUE='#'
33607 GL_GENERATE_LIMITS_H_FALSE=
33608 fi
33609 :
33610 if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
33611 GL_GENERATE_LIMITS_H_TRUE='#'
33612 GL_GENERATE_LIMITS_H_FALSE='#'
33613 fi
33614
33615
33616
33617
33618
33619
33620
33621
33622
33623
33624
33625
33626
33627
33628 if test $REPLACE_STDIO_READ_FUNCS = 1; then
33629 GL_COND_OBJ_STDIO_READ_TRUE=
33630 GL_COND_OBJ_STDIO_READ_FALSE='#'
33631 else
33632 GL_COND_OBJ_STDIO_READ_TRUE='#'
33633 GL_COND_OBJ_STDIO_READ_FALSE=
33634 fi
33635 :
33636 if test -z "${GL_COND_OBJ_STDIO_READ_TRUE}" && test -z "${GL_COND_OBJ_STDIO_READ_FALSE}"; then
33637 GL_COND_OBJ_STDIO_READ_TRUE='#'
33638 GL_COND_OBJ_STDIO_READ_FALSE='#'
33639 fi
33640
33641
33642 if test $REPLACE_STDIO_WRITE_FUNCS = 1; then
33643 GL_COND_OBJ_STDIO_WRITE_TRUE=
33644 GL_COND_OBJ_STDIO_WRITE_FALSE='#'
33645 else
33646 GL_COND_OBJ_STDIO_WRITE_TRUE='#'
33647 GL_COND_OBJ_STDIO_WRITE_FALSE=
33648 fi
33649 :
33650 if test -z "${GL_COND_OBJ_STDIO_WRITE_TRUE}" && test -z "${GL_COND_OBJ_STDIO_WRITE_FALSE}"; then
33651 GL_COND_OBJ_STDIO_WRITE_TRUE='#'
33652 GL_COND_OBJ_STDIO_WRITE_FALSE='#'
33653 fi
33654
33655
33656
33657
33658
33659
33660
33661
33662
33663
33664 GL_GNULIB_FSCANF=1
33665
33666
33667
33668
33669
33670 $as_echo "#define GNULIB_TEST_FSCANF 1" >>confdefs.h
33671
33672
33673
33674
33675
33676 cat >>confdefs.h <<_ACEOF
33677 #define GNULIB_FSCANF 1
33678 _ACEOF
33679
33680
33681
33682
33683
33684
33685
33686
33687
33688
33689
33690 GL_GNULIB_SCANF=1
33691
33692
33693
33694
33695
33696 $as_echo "#define GNULIB_TEST_SCANF 1" >>confdefs.h
33697
33698
33699
33700
33701
33702 cat >>confdefs.h <<_ACEOF
33703 #define GNULIB_SCANF 1
33704 _ACEOF
33705
33706
33707
33708
33709
33710
33711
33712
33713
33714
33715
33716 GL_GNULIB_FGETC=1
33717
33718
33719
33720
33721
33722 $as_echo "#define GNULIB_TEST_FGETC 1" >>confdefs.h
33723
33724
33725
33726
33727
33728
33729
33730
33731
33732
33733
33734
33735 GL_GNULIB_GETC=1
33736
33737
33738
33739
33740
33741 $as_echo "#define GNULIB_TEST_GETC 1" >>confdefs.h
33742
33743
33744
33745
33746
33747
33748
33749
33750
33751
33752
33753
33754 GL_GNULIB_GETCHAR=1
33755
33756
33757
33758
33759
33760 $as_echo "#define GNULIB_TEST_GETCHAR 1" >>confdefs.h
33761
33762
33763
33764
33765
33766
33767
33768
33769
33770
33771
33772
33773 GL_GNULIB_FGETS=1
33774
33775
33776
33777
33778
33779 $as_echo "#define GNULIB_TEST_FGETS 1" >>confdefs.h
33780
33781
33782
33783
33784
33785
33786
33787
33788
33789
33790
33791
33792 GL_GNULIB_FREAD=1
33793
33794
33795
33796
33797
33798 $as_echo "#define GNULIB_TEST_FREAD 1" >>confdefs.h
33799
33800
33801
33802
33803
33804
33805
33806
33807
33808
33809
33810
33811 GL_GNULIB_FPRINTF=1
33812
33813
33814
33815
33816
33817 $as_echo "#define GNULIB_TEST_FPRINTF 1" >>confdefs.h
33818
33819
33820
33821
33822
33823
33824
33825
33826
33827
33828
33829
33830 GL_GNULIB_PRINTF=1
33831
33832
33833
33834
33835
33836 $as_echo "#define GNULIB_TEST_PRINTF 1" >>confdefs.h
33837
33838
33839
33840
33841
33842
33843
33844
33845
33846
33847
33848
33849 GL_GNULIB_VFPRINTF=1
33850
33851
33852
33853
33854
33855 $as_echo "#define GNULIB_TEST_VFPRINTF 1" >>confdefs.h
33856
33857
33858
33859
33860
33861
33862
33863
33864
33865
33866
33867
33868 GL_GNULIB_VPRINTF=1
33869
33870
33871
33872
33873
33874 $as_echo "#define GNULIB_TEST_VPRINTF 1" >>confdefs.h
33875
33876
33877
33878
33879
33880
33881
33882
33883
33884
33885
33886
33887 GL_GNULIB_FPUTC=1
33888
33889
33890
33891
33892
33893 $as_echo "#define GNULIB_TEST_FPUTC 1" >>confdefs.h
33894
33895
33896
33897
33898
33899
33900
33901
33902
33903
33904
33905
33906 GL_GNULIB_PUTC=1
33907
33908
33909
33910
33911
33912 $as_echo "#define GNULIB_TEST_PUTC 1" >>confdefs.h
33913
33914
33915
33916
33917
33918
33919
33920
33921
33922
33923
33924
33925 GL_GNULIB_PUTCHAR=1
33926
33927
33928
33929
33930
33931 $as_echo "#define GNULIB_TEST_PUTCHAR 1" >>confdefs.h
33932
33933
33934
33935
33936
33937
33938
33939
33940
33941
33942
33943
33944 GL_GNULIB_FPUTS=1
33945
33946
33947
33948
33949
33950 $as_echo "#define GNULIB_TEST_FPUTS 1" >>confdefs.h
33951
33952
33953
33954
33955
33956
33957
33958
33959
33960
33961
33962
33963 GL_GNULIB_PUTS=1
33964
33965
33966
33967
33968
33969 $as_echo "#define GNULIB_TEST_PUTS 1" >>confdefs.h
33970
33971
33972
33973
33974
33975
33976
33977
33978
33979
33980
33981
33982 GL_GNULIB_FWRITE=1
33983
33984
33985
33986
33987
33988 $as_echo "#define GNULIB_TEST_FWRITE 1" >>confdefs.h
33989
33990
33991
33992
33993
33994
33995
33996
33997
33998
33999
34000
34001
34002
34003 for ac_func in strchrnul
34004 do :
34005 ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
34006 if test "x$ac_cv_func_strchrnul" = xyes; then :
34007 cat >>confdefs.h <<_ACEOF
34008 #define HAVE_STRCHRNUL 1
34009 _ACEOF
34010
34011 fi
34012 done
34013
34014 if test $ac_cv_func_strchrnul = no; then
34015 HAVE_STRCHRNUL=0
34016 else
34017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5
34018 $as_echo_n "checking whether strchrnul works... " >&6; }
34019 if ${gl_cv_func_strchrnul_works+:} false; then :
34020 $as_echo_n "(cached) " >&6
34021 else
34022 if test "$cross_compiling" = yes; then :
34023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34024 /* end confdefs.h. */
34025
34026 #if defined __CYGWIN__
34027 #include <cygwin/version.h>
34028 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9)
34029 Lucky user
34030 #endif
34031 #else
34032 Lucky user
34033 #endif
34034
34035 _ACEOF
34036 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
34037 $EGREP "Lucky user" >/dev/null 2>&1; then :
34038 gl_cv_func_strchrnul_works="guessing yes"
34039 else
34040 gl_cv_func_strchrnul_works="guessing no"
34041 fi
34042 rm -f conftest*
34043
34044
34045 else
34046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34047 /* end confdefs.h. */
34048
34049 #include <string.h> /* for strchrnul */
34050
34051 int
34052 main ()
34053 {
34054 const char *buf = "a";
34055 return strchrnul (buf, 'b') != buf + 1;
34056
34057 ;
34058 return 0;
34059 }
34060 _ACEOF
34061 if ac_fn_c_try_run "$LINENO"; then :
34062 gl_cv_func_strchrnul_works=yes
34063 else
34064 gl_cv_func_strchrnul_works=no
34065 fi
34066 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34067 conftest.$ac_objext conftest.beam conftest.$ac_ext
34068 fi
34069
34070
34071 fi
34072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strchrnul_works" >&5
34073 $as_echo "$gl_cv_func_strchrnul_works" >&6; }
34074 case "$gl_cv_func_strchrnul_works" in
34075 *yes) ;;
34076 *) REPLACE_STRCHRNUL=1 ;;
34077 esac
34078 fi
34079
34080
34081 if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
34082 GL_COND_OBJ_STRCHRNUL_TRUE=
34083 GL_COND_OBJ_STRCHRNUL_FALSE='#'
34084 else
34085 GL_COND_OBJ_STRCHRNUL_TRUE='#'
34086 GL_COND_OBJ_STRCHRNUL_FALSE=
34087 fi
34088 :
34089 if test -z "${GL_COND_OBJ_STRCHRNUL_TRUE}" && test -z "${GL_COND_OBJ_STRCHRNUL_FALSE}"; then
34090 GL_COND_OBJ_STRCHRNUL_TRUE='#'
34091 GL_COND_OBJ_STRCHRNUL_FALSE='#'
34092 fi
34093
34094 if test -z "$GL_COND_OBJ_STRCHRNUL_TRUE"; then :
34095
34096 :
34097
34098 fi
34099
34100
34101
34102
34103
34104
34105
34106
34107
34108
34109
34110
34111
34112
34113 GL_GNULIB_STRCHRNUL=1
34114
34115
34116
34117
34118
34119 $as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
34120
34121
34122
34123
34124
34125
34126 if test $gl_cv_func_malloc_posix != yes; then
34127 REPLACE_STRDUP=1
34128 fi
34129
34130 if test $ac_cv_have_decl_strdup = no; then
34131 HAVE_DECL_STRDUP=0
34132 fi
34133
34134
34135 if test $REPLACE_STRDUP = 1; then
34136 GL_COND_OBJ_STRDUP_TRUE=
34137 GL_COND_OBJ_STRDUP_FALSE='#'
34138 else
34139 GL_COND_OBJ_STRDUP_TRUE='#'
34140 GL_COND_OBJ_STRDUP_FALSE=
34141 fi
34142 :
34143 if test -z "${GL_COND_OBJ_STRDUP_TRUE}" && test -z "${GL_COND_OBJ_STRDUP_FALSE}"; then
34144 GL_COND_OBJ_STRDUP_TRUE='#'
34145 GL_COND_OBJ_STRDUP_FALSE='#'
34146 fi
34147
34148 if test -z "$GL_COND_OBJ_STRDUP_TRUE"; then :
34149
34150 :
34151
34152 fi
34153
34154
34155
34156
34157
34158
34159
34160
34161
34162
34163
34164
34165
34166
34167 GL_GNULIB_STRDUP=1
34168
34169
34170
34171
34172
34173 $as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
34174
34175
34176
34177
34178
34179
34180
34181
34182
34183
34184 if test "$GL_GENERATE_ERRNO_H:$REPLACE_STRERROR_0" = false:0; then
34185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
34186 $as_echo_n "checking for working strerror function... " >&6; }
34187 if ${gl_cv_func_working_strerror+:} false; then :
34188 $as_echo_n "(cached) " >&6
34189 else
34190 if test "$cross_compiling" = yes; then :
34191 case "$host_os" in
34192 # Guess yes on glibc systems.
34193 *-gnu* | gnu*) gl_cv_func_working_strerror="guessing yes" ;;
34194 # Guess yes on musl systems.
34195 *-musl*) gl_cv_func_working_strerror="guessing yes" ;;
34196 # If we don't know, obey --enable-cross-guesses.
34197 *) gl_cv_func_working_strerror="$gl_cross_guess_normal" ;;
34198 esac
34199
34200 else
34201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34202 /* end confdefs.h. */
34203 #include <string.h>
34204
34205 int
34206 main ()
34207 {
34208 if (!*strerror (-2)) return 1;
34209 ;
34210 return 0;
34211 }
34212 _ACEOF
34213 if ac_fn_c_try_run "$LINENO"; then :
34214 gl_cv_func_working_strerror=yes
34215 else
34216 gl_cv_func_working_strerror=no
34217 fi
34218 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34219 conftest.$ac_objext conftest.beam conftest.$ac_ext
34220 fi
34221
34222
34223 fi
34224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
34225 $as_echo "$gl_cv_func_working_strerror" >&6; }
34226 case "$gl_cv_func_working_strerror" in
34227 *yes) ;;
34228 *)
34229 REPLACE_STRERROR=1
34230 ;;
34231 esac
34232
34233 case "$gl_cv_func_strerror_r_works" in
34234 *no) REPLACE_STRERROR=1 ;;
34235 esac
34236
34237 else
34238 REPLACE_STRERROR=1
34239 fi
34240
34241
34242 if test $REPLACE_STRERROR = 1; then
34243 GL_COND_OBJ_STRERROR_TRUE=
34244 GL_COND_OBJ_STRERROR_FALSE='#'
34245 else
34246 GL_COND_OBJ_STRERROR_TRUE='#'
34247 GL_COND_OBJ_STRERROR_FALSE=
34248 fi
34249 :
34250 if test -z "${GL_COND_OBJ_STRERROR_TRUE}" && test -z "${GL_COND_OBJ_STRERROR_FALSE}"; then
34251 GL_COND_OBJ_STRERROR_TRUE='#'
34252 GL_COND_OBJ_STRERROR_FALSE='#'
34253 fi
34254
34255
34256
34257 cat >>confdefs.h <<_ACEOF
34258 #define GNULIB_STRERROR 1
34259 _ACEOF
34260
34261
34262
34263
34264
34265
34266
34267
34268
34269
34270
34271
34272
34273
34274
34275
34276 GL_GNULIB_STRERROR=1
34277
34278
34279
34280
34281
34282 $as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
34283
34284
34285
34286
34287
34288
34289 if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
34290 GL_COND_OBJ_STRERROR_OVERRIDE_TRUE=
34291 GL_COND_OBJ_STRERROR_OVERRIDE_FALSE='#'
34292 else
34293 GL_COND_OBJ_STRERROR_OVERRIDE_TRUE='#'
34294 GL_COND_OBJ_STRERROR_OVERRIDE_FALSE=
34295 fi
34296 :
34297 if test -z "${GL_COND_OBJ_STRERROR_OVERRIDE_TRUE}" && test -z "${GL_COND_OBJ_STRERROR_OVERRIDE_FALSE}"; then
34298 GL_COND_OBJ_STRERROR_OVERRIDE_TRUE='#'
34299 GL_COND_OBJ_STRERROR_OVERRIDE_FALSE='#'
34300 fi
34301
34302 if test -z "$GL_COND_OBJ_STRERROR_OVERRIDE_TRUE"; then :
34303
34304
34305
34306
34307
34308 if test $ac_cv_header_sys_socket_h != yes; then
34309 for ac_header in winsock2.h
34310 do :
34311 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
34312 if test "x$ac_cv_header_winsock2_h" = xyes; then :
34313 cat >>confdefs.h <<_ACEOF
34314 #define HAVE_WINSOCK2_H 1
34315 _ACEOF
34316
34317 fi
34318
34319 done
34320
34321 fi
34322 if test "$ac_cv_header_winsock2_h" = yes; then
34323 HAVE_WINSOCK2_H=1
34324 UNISTD_H_HAVE_WINSOCK2_H=1
34325 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
34326 else
34327 HAVE_WINSOCK2_H=0
34328 fi
34329
34330
34331
34332 fi
34333
34334
34335
34336
34337
34338 if test $ac_cv_have_decl_strerror_r = no; then
34339 HAVE_DECL_STRERROR_R=0
34340 fi
34341
34342 if test $ac_cv_func_strerror_r = yes; then
34343 if test "$GL_GENERATE_ERRNO_H:$REPLACE_STRERROR_0" = false:0; then
34344 if test $gl_cv_func_strerror_r_posix_signature = yes; then
34345 case "$gl_cv_func_strerror_r_works" in
34346 *no) REPLACE_STRERROR_R=1 ;;
34347 esac
34348 else
34349 REPLACE_STRERROR_R=1
34350 fi
34351 else
34352 REPLACE_STRERROR_R=1
34353 fi
34354 fi
34355
34356 if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then :
34357
34358
34359
34360
34361
34362
34363
34364
34365
34366 gl_LIBOBJS="$gl_LIBOBJS strerror_r.$ac_objext"
34367
34368
34369
34370
34371
34372
34373
34374
34375 fi
34376
34377
34378
34379
34380
34381
34382
34383
34384
34385
34386
34387
34388
34389
34390 GL_GNULIB_STRERROR_R=1
34391
34392
34393
34394
34395
34396 $as_echo "#define GNULIB_TEST_STRERROR_R 1" >>confdefs.h
34397
34398
34399
34400
34401
34402 cat >>confdefs.h <<_ACEOF
34403 #define GNULIB_STRERROR_R_POSIX 1
34404 _ACEOF
34405
34406
34407
34408
34409
34410
34411
34412
34413
34414
34415
34416
34417
34418
34419
34420
34421
34422
34423
34424
34425
34426
34427
34428
34429
34430
34431
34432 if test $ac_cv_have_decl_strnlen = no; then
34433 HAVE_DECL_STRNLEN=0
34434 else
34435
34436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5
34437 $as_echo_n "checking for working strnlen... " >&6; }
34438 if ${ac_cv_func_strnlen_working+:} false; then :
34439 $as_echo_n "(cached) " >&6
34440 else
34441 if test "$cross_compiling" = yes; then :
34442 # Guess no on AIX systems, yes otherwise.
34443 case "$host_os" in
34444 aix*) ac_cv_func_strnlen_working=no;;
34445 *) ac_cv_func_strnlen_working=yes;;
34446 esac
34447 else
34448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34449 /* end confdefs.h. */
34450 $ac_includes_default
34451 int
34452 main ()
34453 {
34454
34455 #define S "foobar"
34456 #define S_LEN (sizeof S - 1)
34457
34458 /* At least one implementation is buggy: that of AIX 4.3 would
34459 give strnlen (S, 1) == 3. */
34460
34461 int i;
34462 for (i = 0; i < S_LEN + 1; ++i)
34463 {
34464 int expected = i <= S_LEN ? i : S_LEN;
34465 if (strnlen (S, i) != expected)
34466 return 1;
34467 }
34468 return 0;
34469
34470 ;
34471 return 0;
34472 }
34473 _ACEOF
34474 if ac_fn_c_try_run "$LINENO"; then :
34475 ac_cv_func_strnlen_working=yes
34476 else
34477 ac_cv_func_strnlen_working=no
34478 fi
34479 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34480 conftest.$ac_objext conftest.beam conftest.$ac_ext
34481 fi
34482
34483 fi
34484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5
34485 $as_echo "$ac_cv_func_strnlen_working" >&6; }
34486 test $ac_cv_func_strnlen_working = no && :
34487
34488
34489 if test $ac_cv_func_strnlen_working = no; then
34490 REPLACE_STRNLEN=1
34491 fi
34492 fi
34493
34494
34495 if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
34496 GL_COND_OBJ_STRNLEN_TRUE=
34497 GL_COND_OBJ_STRNLEN_FALSE='#'
34498 else
34499 GL_COND_OBJ_STRNLEN_TRUE='#'
34500 GL_COND_OBJ_STRNLEN_FALSE=
34501 fi
34502 :
34503 if test -z "${GL_COND_OBJ_STRNLEN_TRUE}" && test -z "${GL_COND_OBJ_STRNLEN_FALSE}"; then
34504 GL_COND_OBJ_STRNLEN_TRUE='#'
34505 GL_COND_OBJ_STRNLEN_FALSE='#'
34506 fi
34507
34508 if test -z "$GL_COND_OBJ_STRNLEN_TRUE"; then :
34509
34510 :
34511
34512 fi
34513
34514
34515
34516
34517
34518
34519
34520
34521
34522
34523
34524
34525
34526
34527 GL_GNULIB_STRNLEN=1
34528
34529
34530
34531
34532
34533 $as_echo "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h
34534
34535
34536
34537
34538
34539 if test $REPLACE_STRSTR = 0; then
34540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works in linear time" >&5
34541 $as_echo_n "checking whether strstr works in linear time... " >&6; }
34542 if ${gl_cv_func_strstr_linear+:} false; then :
34543 $as_echo_n "(cached) " >&6
34544 else
34545 if test "$cross_compiling" = yes; then :
34546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34547 /* end confdefs.h. */
34548
34549 #include <features.h>
34550 #ifdef __GNU_LIBRARY__
34551 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
34552 && !(defined __i386__ || defined __x86_64__) \
34553 && !defined __UCLIBC__
34554 Lucky user
34555 #endif
34556 #endif
34557 #ifdef __CYGWIN__
34558 #include <cygwin/version.h>
34559 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
34560 Lucky user
34561 #endif
34562 #endif
34563
34564 _ACEOF
34565 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
34566 $EGREP "Lucky user" >/dev/null 2>&1; then :
34567 gl_cv_func_strstr_linear="guessing yes"
34568 else
34569 gl_cv_func_strstr_linear="$gl_cross_guess_normal"
34570 fi
34571 rm -f conftest*
34572
34573
34574 else
34575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34576 /* end confdefs.h. */
34577
34578 #ifdef __MVS__
34579 /* z/OS does not deliver signals while strstr() is running (thanks to
34580 restrictions on its LE runtime), which prevents us from limiting the
34581 running time of this test. */
34582 # error "This test does not work properly on z/OS"
34583 #endif
34584 #include <signal.h> /* for signal */
34585 #include <string.h> /* for strstr */
34586 #include <stdlib.h> /* for malloc */
34587 #include <unistd.h> /* for alarm */
34588 static void quit (int sig) { _exit (sig + 128); }
34589
34590 int
34591 main ()
34592 {
34593
34594 int result = 0;
34595 size_t m = 1000000;
34596 char *haystack = (char *) malloc (2 * m + 2);
34597 char *needle = (char *) malloc (m + 2);
34598 /* Failure to compile this test due to missing alarm is okay,
34599 since all such platforms (mingw) also have quadratic strstr. */
34600 signal (SIGALRM, quit);
34601 alarm (5);
34602 /* Check for quadratic performance. */
34603 if (haystack && needle)
34604 {
34605 memset (haystack, 'A', 2 * m);
34606 haystack[2 * m] = 'B';
34607 haystack[2 * m + 1] = 0;
34608 memset (needle, 'A', m);
34609 needle[m] = 'B';
34610 needle[m + 1] = 0;
34611 if (!strstr (haystack, needle))
34612 result |= 1;
34613 }
34614 /* Free allocated memory, in case some sanitizer is watching. */
34615 free (haystack);
34616 free (needle);
34617 return result;
34618
34619 ;
34620 return 0;
34621 }
34622 _ACEOF
34623 if ac_fn_c_try_run "$LINENO"; then :
34624 gl_cv_func_strstr_linear=yes
34625 else
34626 gl_cv_func_strstr_linear=no
34627 fi
34628 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34629 conftest.$ac_objext conftest.beam conftest.$ac_ext
34630 fi
34631
34632
34633 fi
34634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_linear" >&5
34635 $as_echo "$gl_cv_func_strstr_linear" >&6; }
34636 case "$gl_cv_func_strstr_linear" in
34637 *yes) ;;
34638 *)
34639 REPLACE_STRSTR=1
34640 ;;
34641 esac
34642 fi
34643
34644 if test $REPLACE_STRSTR = 1; then
34645
34646
34647
34648
34649
34650
34651
34652
34653 gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
34654
34655 fi
34656
34657
34658
34659 if test $REPLACE_MEMCHR = 1; then
34660 REPLACE_STRSTR=1
34661 else
34662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
34663 $as_echo_n "checking whether strstr works... " >&6; }
34664 if ${gl_cv_func_strstr_works_always+:} false; then :
34665 $as_echo_n "(cached) " >&6
34666 else
34667 if test "$cross_compiling" = yes; then :
34668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34669 /* end confdefs.h. */
34670
34671 #include <string.h> /* for __GNU_LIBRARY__ */
34672 #ifdef __GNU_LIBRARY__
34673 #include <features.h>
34674 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
34675 || defined __UCLIBC__
34676 Lucky user
34677 #endif
34678 #elif defined __CYGWIN__
34679 #include <cygwin/version.h>
34680 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
34681 Lucky user
34682 #endif
34683 #else
34684 Lucky user
34685 #endif
34686
34687 _ACEOF
34688 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
34689 $EGREP "Lucky user" >/dev/null 2>&1; then :
34690 gl_cv_func_strstr_works_always="guessing yes"
34691 else
34692 gl_cv_func_strstr_works_always="$gl_cross_guess_normal"
34693 fi
34694 rm -f conftest*
34695
34696
34697 else
34698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34699 /* end confdefs.h. */
34700
34701 #include <string.h> /* for __GNU_LIBRARY__, strstr */
34702 #ifdef __GNU_LIBRARY__
34703 #include <features.h>
34704 #if __GLIBC__ == 2 && __GLIBC_MINOR__ == 28
34705 Unlucky user
34706 #endif
34707 #endif
34708 #define P "_EF_BF_BD"
34709 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
34710 #define NEEDLE P P P P P
34711
34712 int
34713 main ()
34714 {
34715 return !!strstr (HAYSTACK, NEEDLE);
34716
34717 ;
34718 return 0;
34719 }
34720 _ACEOF
34721 if ac_fn_c_try_run "$LINENO"; then :
34722 gl_cv_func_strstr_works_always=yes
34723 else
34724 gl_cv_func_strstr_works_always=no
34725 fi
34726 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34727 conftest.$ac_objext conftest.beam conftest.$ac_ext
34728 fi
34729
34730
34731 fi
34732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
34733 $as_echo "$gl_cv_func_strstr_works_always" >&6; }
34734 case "$gl_cv_func_strstr_works_always" in
34735 *yes) ;;
34736 *)
34737 REPLACE_STRSTR=1
34738 ;;
34739 esac
34740 fi
34741
34742 if test $REPLACE_STRSTR = 1; then
34743
34744
34745
34746
34747
34748
34749
34750
34751 gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
34752
34753 fi
34754
34755
34756
34757
34758
34759
34760
34761
34762
34763
34764
34765
34766
34767
34768 GL_GNULIB_STRSTR=1
34769
34770
34771
34772
34773
34774 $as_echo "#define GNULIB_TEST_STRSTR 1" >>confdefs.h
34775
34776
34777
34778
34779
34780
34781
34782 for ac_func in strtok_r
34783 do :
34784 ac_fn_c_check_func "$LINENO" "strtok_r" "ac_cv_func_strtok_r"
34785 if test "x$ac_cv_func_strtok_r" = xyes; then :
34786 cat >>confdefs.h <<_ACEOF
34787 #define HAVE_STRTOK_R 1
34788 _ACEOF
34789
34790 fi
34791 done
34792
34793 if test $ac_cv_func_strtok_r = yes; then
34794 HAVE_STRTOK_R=1
34795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtok_r works" >&5
34796 $as_echo_n "checking whether strtok_r works... " >&6; }
34797 if ${gl_cv_func_strtok_r_works+:} false; then :
34798 $as_echo_n "(cached) " >&6
34799 else
34800 if test "$cross_compiling" = yes; then :
34801 case "$host_os" in
34802 # Guess no on glibc systems.
34803 *-gnu* | gnu*) gl_cv_func_strtok_r_works="guessing no" ;;
34804 # Guess yes on native Windows.
34805 mingw*) gl_cv_func_strtok_r_works="guessing yes" ;;
34806 *) gl_cv_func_strtok_r_works="guessing yes" ;;
34807 esac
34808
34809 else
34810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34811 /* end confdefs.h. */
34812
34813 #ifndef __OPTIMIZE__
34814 # define __OPTIMIZE__ 1
34815 #endif
34816 #undef __OPTIMIZE_SIZE__
34817 #undef __NO_INLINE__
34818 #include <stdlib.h>
34819 #include <string.h>
34820
34821 int
34822 main ()
34823 {
34824 static const char dummy[] = "\177\01a";
34825 char delimiters[] = "xxxxxxxx";
34826 char *save_ptr = (char *) dummy;
34827 strtok_r (delimiters, "x", &save_ptr);
34828 strtok_r (NULL, "x", &save_ptr);
34829 return 0;
34830
34831 ;
34832 return 0;
34833 }
34834
34835 _ACEOF
34836 if ac_fn_c_try_run "$LINENO"; then :
34837 gl_cv_func_strtok_r_works=yes
34838 else
34839 gl_cv_func_strtok_r_works=no
34840 fi
34841 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34842 conftest.$ac_objext conftest.beam conftest.$ac_ext
34843 fi
34844
34845
34846 fi
34847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtok_r_works" >&5
34848 $as_echo "$gl_cv_func_strtok_r_works" >&6; }
34849 case "$gl_cv_func_strtok_r_works" in
34850 *no)
34851 UNDEFINE_STRTOK_R=1
34852 ;;
34853 esac
34854 else
34855 HAVE_STRTOK_R=0
34856 fi
34857
34858 if test $ac_cv_have_decl_strtok_r = no; then
34859 HAVE_DECL_STRTOK_R=0
34860 fi
34861
34862
34863 if test $HAVE_STRTOK_R = 0 || test $REPLACE_STRTOK_R = 1; then
34864 GL_COND_OBJ_STRTOK_R_TRUE=
34865 GL_COND_OBJ_STRTOK_R_FALSE='#'
34866 else
34867 GL_COND_OBJ_STRTOK_R_TRUE='#'
34868 GL_COND_OBJ_STRTOK_R_FALSE=
34869 fi
34870 :
34871 if test -z "${GL_COND_OBJ_STRTOK_R_TRUE}" && test -z "${GL_COND_OBJ_STRTOK_R_FALSE}"; then
34872 GL_COND_OBJ_STRTOK_R_TRUE='#'
34873 GL_COND_OBJ_STRTOK_R_FALSE='#'
34874 fi
34875
34876 if test -z "$GL_COND_OBJ_STRTOK_R_TRUE"; then :
34877
34878
34879 :
34880
34881
34882 fi
34883
34884
34885
34886
34887
34888
34889
34890
34891
34892
34893
34894
34895
34896
34897 GL_GNULIB_STRTOK_R=1
34898
34899
34900
34901
34902
34903 $as_echo "#define GNULIB_TEST_STRTOK_R 1" >>confdefs.h
34904
34905
34906
34907
34908
34909
34910
34911
34912
34913
34914
34915
34916
34917
34918
34919
34920
34921
34922
34923
34924
34925
34926
34927
34928
34929
34930
34931
34932
34933
34934
34935
34936
34937
34938
34939
34940
34941
34942
34943
34944
34945
34946
34947
34948
34949
34950
34951
34952
34953
34954
34955
34956
34957
34958
34959
34960
34961
34962
34963
34964
34965 :
34966
34967
34968
34969
34970 cat >>confdefs.h <<_ACEOF
34971 #define GNULIB_TEMPNAME 1
34972 _ACEOF
34973
34974
34975
34976
34977
34978
34979
34980
34981
34982
34983
34984
34985
34986
34987
34988
34989 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,
34990 gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
34991 been included before. */
34992 #if defined __MINGW32__
34993 # include <unistd.h>
34994 #endif
34995 #include <time.h>
34996
34997 "
34998 if test "x$ac_cv_have_decl_localtime_r" = xyes; then :
34999 ac_have_decl=1
35000 else
35001 ac_have_decl=0
35002 fi
35003
35004 cat >>confdefs.h <<_ACEOF
35005 #define HAVE_DECL_LOCALTIME_R $ac_have_decl
35006 _ACEOF
35007
35008 if test $ac_cv_have_decl_localtime_r = no; then
35009 HAVE_DECL_LOCALTIME_R=0
35010 fi
35011
35012
35013 if test $ac_cv_func_localtime_r = yes; then
35014 HAVE_LOCALTIME_R=1
35015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
35016 $as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
35017 if ${gl_cv_time_r_posix+:} false; then :
35018 $as_echo_n "(cached) " >&6
35019 else
35020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35021 /* end confdefs.h. */
35022 /* mingw's <time.h> provides the functions asctime_r, ctime_r,
35023 gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
35024 been included before. */
35025 #if defined __MINGW32__
35026 # include <unistd.h>
35027 #endif
35028 #include <time.h>
35029
35030 int
35031 main ()
35032 {
35033 /* We don't need to append 'restrict's to the argument types,
35034 even though the POSIX signature has the 'restrict's,
35035 since C99 says they can't affect type compatibility. */
35036 struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
35037 if (ptr) return 0;
35038 /* Check the return type is a pointer.
35039 On HP-UX 10 it is 'int'. */
35040 *localtime_r (0, 0);
35041 ;
35042 return 0;
35043 }
35044
35045 _ACEOF
35046 if ac_fn_c_try_compile "$LINENO"; then :
35047 gl_cv_time_r_posix=yes
35048 else
35049 gl_cv_time_r_posix=no
35050 fi
35051 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35052
35053 fi
35054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
35055 $as_echo "$gl_cv_time_r_posix" >&6; }
35056 if test $gl_cv_time_r_posix = yes; then
35057 REPLACE_LOCALTIME_R=0
35058 else
35059 REPLACE_LOCALTIME_R=1
35060 fi
35061 else
35062 HAVE_LOCALTIME_R=0
35063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r exists as an inline function" >&5
35064 $as_echo_n "checking whether localtime_r exists as an inline function... " >&6; }
35065 if ${gl_cv_func_localtime_r_inline+:} false; then :
35066 $as_echo_n "(cached) " >&6
35067 else
35068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35069 /* end confdefs.h. */
35070 /* mingw's <time.h> provides the functions asctime_r, ctime_r,
35071 gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
35072 been included before. */
35073 #if defined __MINGW32__
35074 # include <unistd.h>
35075 #endif
35076 #include <time.h>
35077
35078 int
35079 main ()
35080 {
35081 time_t a;
35082 struct tm r;
35083 localtime_r (&a, &r);
35084
35085 ;
35086 return 0;
35087 }
35088
35089 _ACEOF
35090 if ac_fn_c_try_link "$LINENO"; then :
35091 gl_cv_func_localtime_r_inline=yes
35092 else
35093 gl_cv_func_localtime_r_inline=no
35094 fi
35095 rm -f core conftest.err conftest.$ac_objext \
35096 conftest$ac_exeext conftest.$ac_ext
35097
35098 fi
35099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_localtime_r_inline" >&5
35100 $as_echo "$gl_cv_func_localtime_r_inline" >&6; }
35101 if test $gl_cv_func_localtime_r_inline = yes; then
35102 REPLACE_LOCALTIME_R=1
35103 fi
35104 fi
35105
35106
35107 if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
35108 GL_COND_OBJ_TIME_R_TRUE=
35109 GL_COND_OBJ_TIME_R_FALSE='#'
35110 else
35111 GL_COND_OBJ_TIME_R_TRUE='#'
35112 GL_COND_OBJ_TIME_R_FALSE=
35113 fi
35114 :
35115 if test -z "${GL_COND_OBJ_TIME_R_TRUE}" && test -z "${GL_COND_OBJ_TIME_R_FALSE}"; then
35116 GL_COND_OBJ_TIME_R_TRUE='#'
35117 GL_COND_OBJ_TIME_R_FALSE='#'
35118 fi
35119
35120 if test -z "$GL_COND_OBJ_TIME_R_TRUE"; then :
35121
35122
35123 :
35124
35125
35126 fi
35127
35128
35129
35130
35131
35132
35133
35134
35135
35136 GL_GNULIB_TIME_R=1
35137
35138
35139
35140
35141
35142 $as_echo "#define GNULIB_TEST_TIME_R 1" >>confdefs.h
35143
35144
35145
35146
35147
35148
35149
35150
35151
35152
35153
35154
35155
35156
35157
35158
35159 if test $ac_cv_have_decl_unsetenv = no; then
35160 HAVE_DECL_UNSETENV=0
35161 fi
35162 for ac_func in unsetenv
35163 do :
35164 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
35165 if test "x$ac_cv_func_unsetenv" = xyes; then :
35166 cat >>confdefs.h <<_ACEOF
35167 #define HAVE_UNSETENV 1
35168 _ACEOF
35169
35170 fi
35171 done
35172
35173 if test $ac_cv_func_unsetenv = no; then
35174 HAVE_UNSETENV=0
35175 else
35176 HAVE_UNSETENV=1
35177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
35178 $as_echo_n "checking for unsetenv() return type... " >&6; }
35179 if ${gt_cv_func_unsetenv_ret+:} false; then :
35180 $as_echo_n "(cached) " >&6
35181 else
35182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35183 /* end confdefs.h. */
35184
35185 #undef _BSD
35186 #define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
35187 #include <stdlib.h>
35188 extern
35189 #ifdef __cplusplus
35190 "C"
35191 #endif
35192 int unsetenv (const char *name);
35193
35194 int
35195 main ()
35196 {
35197
35198 ;
35199 return 0;
35200 }
35201 _ACEOF
35202 if ac_fn_c_try_compile "$LINENO"; then :
35203 gt_cv_func_unsetenv_ret='int'
35204 else
35205 gt_cv_func_unsetenv_ret='void'
35206 fi
35207 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35208 fi
35209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
35210 $as_echo "$gt_cv_func_unsetenv_ret" >&6; }
35211 if test $gt_cv_func_unsetenv_ret = 'void'; then
35212
35213 $as_echo "#define VOID_UNSETENV 1" >>confdefs.h
35214
35215 REPLACE_UNSETENV=1
35216 fi
35217
35218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
35219 $as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
35220 if ${gl_cv_func_unsetenv_works+:} false; then :
35221 $as_echo_n "(cached) " >&6
35222 else
35223 if test "$cross_compiling" = yes; then :
35224 case "$host_os" in
35225 # Guess yes on glibc systems.
35226 *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
35227 # If we don't know, obey --enable-cross-guesses.
35228 *) gl_cv_func_unsetenv_works="$gl_cross_guess_normal" ;;
35229 esac
35230
35231 else
35232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35233 /* end confdefs.h. */
35234
35235 #include <stdlib.h>
35236 #include <errno.h>
35237 extern char **environ;
35238
35239
35240 $gl_mda_defines
35241
35242 int
35243 main ()
35244 {
35245
35246 char entry1[] = "a=1";
35247 char entry2[] = "b=2";
35248 char *env[] = { entry1, entry2, NULL };
35249 if (putenv ((char *) "a=1")) return 1;
35250 if (putenv (entry2)) return 2;
35251 entry2[0] = 'a';
35252 unsetenv ("a");
35253 if (getenv ("a")) return 3;
35254 if (!unsetenv ("") || errno != EINVAL) return 4;
35255 entry2[0] = 'b';
35256 environ = env;
35257 if (!getenv ("a")) return 5;
35258 entry2[0] = 'a';
35259 unsetenv ("a");
35260 if (getenv ("a")) return 6;
35261
35262 ;
35263 return 0;
35264 }
35265 _ACEOF
35266 if ac_fn_c_try_run "$LINENO"; then :
35267 gl_cv_func_unsetenv_works=yes
35268 else
35269 gl_cv_func_unsetenv_works=no
35270 fi
35271 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35272 conftest.$ac_objext conftest.beam conftest.$ac_ext
35273 fi
35274
35275
35276 fi
35277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
35278 $as_echo "$gl_cv_func_unsetenv_works" >&6; }
35279 case "$gl_cv_func_unsetenv_works" in
35280 *yes) ;;
35281 *)
35282 REPLACE_UNSETENV=1
35283 ;;
35284 esac
35285 fi
35286
35287
35288 if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
35289 GL_COND_OBJ_UNSETENV_TRUE=
35290 GL_COND_OBJ_UNSETENV_FALSE='#'
35291 else
35292 GL_COND_OBJ_UNSETENV_TRUE='#'
35293 GL_COND_OBJ_UNSETENV_FALSE=
35294 fi
35295 :
35296 if test -z "${GL_COND_OBJ_UNSETENV_TRUE}" && test -z "${GL_COND_OBJ_UNSETENV_FALSE}"; then
35297 GL_COND_OBJ_UNSETENV_TRUE='#'
35298 GL_COND_OBJ_UNSETENV_FALSE='#'
35299 fi
35300
35301 if test -z "$GL_COND_OBJ_UNSETENV_TRUE"; then :
35302
35303
35304
35305
35306
35307
35308 fi
35309
35310
35311
35312
35313
35314
35315
35316
35317
35318 GL_GNULIB_UNSETENV=1
35319
35320
35321
35322
35323
35324 $as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
35325
35326
35327
35328
35329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable-length arrays" >&5
35330 $as_echo_n "checking for variable-length arrays... " >&6; }
35331 if ${ac_cv_c_vararrays+:} false; then :
35332 $as_echo_n "(cached) " >&6
35333 else
35334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35335 /* end confdefs.h. */
35336 #ifdef __STDC_NO_VLA__
35337 defined
35338 #endif
35339
35340 _ACEOF
35341 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
35342 $EGREP "defined" >/dev/null 2>&1; then :
35343 ac_cv_c_vararrays='no: __STDC_NO_VLA__ is defined'
35344 else
35345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35346 /* end confdefs.h. */
35347 /* Test for VLA support. This test is partly inspired
35348 from examples in the C standard. Use at least two VLA
35349 functions to detect the GCC 3.4.3 bug described in:
35350 https://lists.gnu.org/archive/html/bug-gnulib/2014-08/msg00014.html
35351 */
35352 #ifdef __STDC_NO_VLA__
35353 syntax error;
35354 #else
35355 extern int n;
35356 int B[100];
35357 int fvla (int m, int C[m][m]);
35358
35359 int
35360 simple (int count, int all[static count])
35361 {
35362 return all[count - 1];
35363 }
35364
35365 int
35366 fvla (int m, int C[m][m])
35367 {
35368 typedef int VLA[m][m];
35369 VLA x;
35370 int D[m];
35371 static int (*q)[m] = &B;
35372 int (*s)[n] = q;
35373 return C && &x[0][0] == &D[0] && &D[0] == s[0];
35374 }
35375 #endif
35376
35377 int
35378 main ()
35379 {
35380
35381 ;
35382 return 0;
35383 }
35384 _ACEOF
35385 if ac_fn_c_try_compile "$LINENO"; then :
35386 ac_cv_c_vararrays=yes
35387 else
35388 ac_cv_c_vararrays=no
35389 fi
35390 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35391 fi
35392 rm -f conftest*
35393
35394 fi
35395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_vararrays" >&5
35396 $as_echo "$ac_cv_c_vararrays" >&6; }
35397 if test "$ac_cv_c_vararrays" = yes; then
35398
35399 $as_echo "#define HAVE_C_VARARRAYS 1" >>confdefs.h
35400
35401 elif test "$ac_cv_c_vararrays" = no; then
35402
35403 $as_echo "#define __STDC_NO_VLA__ 1" >>confdefs.h
35404
35405 fi
35406
35407
35408
35409
35410
35411
35412
35413
35414
35415
35416
35417
35418
35419
35420
35421
35422
35423
35424
35425
35426
35427
35428 if case "$host_os" in mingw*) true;; *) false;; esac; then
35429 GL_COND_OBJ_WINDOWS_MUTEX_TRUE=
35430 GL_COND_OBJ_WINDOWS_MUTEX_FALSE='#'
35431 else
35432 GL_COND_OBJ_WINDOWS_MUTEX_TRUE='#'
35433 GL_COND_OBJ_WINDOWS_MUTEX_FALSE=
35434 fi
35435 :
35436 if test -z "${GL_COND_OBJ_WINDOWS_MUTEX_TRUE}" && test -z "${GL_COND_OBJ_WINDOWS_MUTEX_FALSE}"; then
35437 GL_COND_OBJ_WINDOWS_MUTEX_TRUE='#'
35438 GL_COND_OBJ_WINDOWS_MUTEX_FALSE='#'
35439 fi
35440
35441
35442
35443 if case "$host_os" in mingw*) true;; *) false;; esac; then
35444 GL_COND_OBJ_WINDOWS_ONCE_TRUE=
35445 GL_COND_OBJ_WINDOWS_ONCE_FALSE='#'
35446 else
35447 GL_COND_OBJ_WINDOWS_ONCE_TRUE='#'
35448 GL_COND_OBJ_WINDOWS_ONCE_FALSE=
35449 fi
35450 :
35451 if test -z "${GL_COND_OBJ_WINDOWS_ONCE_TRUE}" && test -z "${GL_COND_OBJ_WINDOWS_ONCE_FALSE}"; then
35452 GL_COND_OBJ_WINDOWS_ONCE_TRUE='#'
35453 GL_COND_OBJ_WINDOWS_ONCE_FALSE='#'
35454 fi
35455
35456
35457
35458 if case "$host_os" in mingw*) true;; *) false;; esac; then
35459 GL_COND_OBJ_WINDOWS_RECMUTEX_TRUE=
35460 GL_COND_OBJ_WINDOWS_RECMUTEX_FALSE='#'
35461 else
35462 GL_COND_OBJ_WINDOWS_RECMUTEX_TRUE='#'
35463 GL_COND_OBJ_WINDOWS_RECMUTEX_FALSE=
35464 fi
35465 :
35466 if test -z "${GL_COND_OBJ_WINDOWS_RECMUTEX_TRUE}" && test -z "${GL_COND_OBJ_WINDOWS_RECMUTEX_FALSE}"; then
35467 GL_COND_OBJ_WINDOWS_RECMUTEX_TRUE='#'
35468 GL_COND_OBJ_WINDOWS_RECMUTEX_FALSE='#'
35469 fi
35470
35471
35472
35473 if case "$host_os" in mingw*) true;; *) false;; esac; then
35474 GL_COND_OBJ_WINDOWS_RWLOCK_TRUE=
35475 GL_COND_OBJ_WINDOWS_RWLOCK_FALSE='#'
35476 else
35477 GL_COND_OBJ_WINDOWS_RWLOCK_TRUE='#'
35478 GL_COND_OBJ_WINDOWS_RWLOCK_FALSE=
35479 fi
35480 :
35481 if test -z "${GL_COND_OBJ_WINDOWS_RWLOCK_TRUE}" && test -z "${GL_COND_OBJ_WINDOWS_RWLOCK_FALSE}"; then
35482 GL_COND_OBJ_WINDOWS_RWLOCK_TRUE='#'
35483 GL_COND_OBJ_WINDOWS_RWLOCK_FALSE='#'
35484 fi
35485
35486
35487
35488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wmemchr" >&5
35489 $as_echo_n "checking for wmemchr... " >&6; }
35490 if ${gl_cv_func_wmemchr+:} false; then :
35491 $as_echo_n "(cached) " >&6
35492 else
35493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35494 /* end confdefs.h. */
35495 #include <wchar.h>
35496
35497 int
35498 main ()
35499 {
35500 return ! wmemchr ((const wchar_t *) 0, (wchar_t) ' ', 0);
35501 ;
35502 return 0;
35503 }
35504
35505 _ACEOF
35506 if ac_fn_c_try_link "$LINENO"; then :
35507 gl_cv_func_wmemchr=yes
35508 else
35509 gl_cv_func_wmemchr=no
35510 fi
35511 rm -f core conftest.err conftest.$ac_objext \
35512 conftest$ac_exeext conftest.$ac_ext
35513
35514 fi
35515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wmemchr" >&5
35516 $as_echo "$gl_cv_func_wmemchr" >&6; }
35517 if test $gl_cv_func_wmemchr = no; then
35518 HAVE_WMEMCHR=0
35519 fi
35520
35521
35522 if test $HAVE_WMEMCHR = 0; then
35523 GL_COND_OBJ_WMEMCHR_TRUE=
35524 GL_COND_OBJ_WMEMCHR_FALSE='#'
35525 else
35526 GL_COND_OBJ_WMEMCHR_TRUE='#'
35527 GL_COND_OBJ_WMEMCHR_FALSE=
35528 fi
35529 :
35530 if test -z "${GL_COND_OBJ_WMEMCHR_TRUE}" && test -z "${GL_COND_OBJ_WMEMCHR_FALSE}"; then
35531 GL_COND_OBJ_WMEMCHR_TRUE='#'
35532 GL_COND_OBJ_WMEMCHR_FALSE='#'
35533 fi
35534
35535
35536
35537
35538
35539
35540
35541
35542
35543
35544
35545
35546
35547
35548
35549 GL_GNULIB_WMEMCHR=1
35550
35551
35552
35553
35554
35555 $as_echo "#define GNULIB_TEST_WMEMCHR 1" >>confdefs.h
35556
35557
35558
35559
35560
35561
35562
35563
35564
35565
35566
35567 if test $ac_cv_func_wmempcpy = no; then
35568 HAVE_WMEMPCPY=0
35569 fi
35570
35571
35572 if test $HAVE_WMEMPCPY = 0; then
35573 GL_COND_OBJ_WMEMPCPY_TRUE=
35574 GL_COND_OBJ_WMEMPCPY_FALSE='#'
35575 else
35576 GL_COND_OBJ_WMEMPCPY_TRUE='#'
35577 GL_COND_OBJ_WMEMPCPY_FALSE=
35578 fi
35579 :
35580 if test -z "${GL_COND_OBJ_WMEMPCPY_TRUE}" && test -z "${GL_COND_OBJ_WMEMPCPY_FALSE}"; then
35581 GL_COND_OBJ_WMEMPCPY_TRUE='#'
35582 GL_COND_OBJ_WMEMPCPY_FALSE='#'
35583 fi
35584
35585
35586
35587
35588
35589
35590
35591
35592
35593
35594
35595
35596
35597
35598
35599 GL_GNULIB_WMEMPCPY=1
35600
35601
35602
35603
35604
35605 $as_echo "#define GNULIB_TEST_WMEMPCPY 1" >>confdefs.h
35606
35607
35608
35609 # End of code from modules
35610
35611
35612
35613
35614
35615
35616
35617
35618
35619
35620
35621 gltests_libdeps=
35622 gltests_ltlibdeps=
35623
35624
35625
35626
35627
35628
35629
35630
35631
35632
35633
35634
35635 gl_source_base='tests'
35636 gl_source_base_prefix=
35637 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
35638
35639 gl_module_indicator_condition=$gltests_WITNESS
35640
35641
35642
35643
35644
35645
35646
35647
35648
35649
35650
35651
35652 LIBGNU_LIBDEPS="$gl_libdeps"
35653
35654 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
35655
35656
35657
35658 am__api_version='1.15'
35659
35660 # Find a good install program. We prefer a C program (faster),
35661 # so one script is as good as another. But avoid the broken or
35662 # incompatible versions:
35663 # SysV /etc/install, /usr/sbin/install
35664 # SunOS /usr/etc/install
35665 # IRIX /sbin/install
35666 # AIX /bin/install
35667 # AmigaOS /C/install, which installs bootblocks on floppy discs
35668 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
35669 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
35670 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
35671 # OS/2's system install, which has a completely different semantic
35672 # ./install, which can be erroneously created by make from ./install.sh.
35673 # Reject install programs that cannot install multiple files.
35674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
35675 $as_echo_n "checking for a BSD-compatible install... " >&6; }
35676 if test -z "$INSTALL"; then
35677 if ${ac_cv_path_install+:} false; then :
35678 $as_echo_n "(cached) " >&6
35679 else
35680 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35681 for as_dir in $PATH
35682 do
35683 IFS=$as_save_IFS
35684 test -z "$as_dir" && as_dir=.
35685 # Account for people who put trailing slashes in PATH elements.
35686 case $as_dir/ in #((
35687 ./ | .// | /[cC]/* | \
35688 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
35689 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
35690 /usr/ucb/* ) ;;
35691 *)
35692 # OSF1 and SCO ODT 3.0 have their own names for install.
35693 # Don't use installbsd from OSF since it installs stuff as root
35694 # by default.
35695 for ac_prog in ginstall scoinst install; do
35696 for ac_exec_ext in '' $ac_executable_extensions; do
35697 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
35698 if test $ac_prog = install &&
35699 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
35700 # AIX install. It has an incompatible calling convention.
35701 :
35702 elif test $ac_prog = install &&
35703 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
35704 # program-specific install script used by HP pwplus--don't use.
35705 :
35706 else
35707 rm -rf conftest.one conftest.two conftest.dir
35708 echo one > conftest.one
35709 echo two > conftest.two
35710 mkdir conftest.dir
35711 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
35712 test -s conftest.one && test -s conftest.two &&
35713 test -s conftest.dir/conftest.one &&
35714 test -s conftest.dir/conftest.two
35715 then
35716 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
35717 break 3
35718 fi
35719 fi
35720 fi
35721 done
35722 done
35723 ;;
35724 esac
35725
35726 done
35727 IFS=$as_save_IFS
35728
35729 rm -rf conftest.one conftest.two conftest.dir
35730
35731 fi
35732 if test "${ac_cv_path_install+set}" = set; then
35733 INSTALL=$ac_cv_path_install
35734 else
35735 # As a last resort, use the slow shell script. Don't cache a
35736 # value for INSTALL within a source directory, because that will
35737 # break other packages using the cache if that directory is
35738 # removed, or if the value is a relative name.
35739 INSTALL=$ac_install_sh
35740 fi
35741 fi
35742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
35743 $as_echo "$INSTALL" >&6; }
35744
35745 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
35746 # It thinks the first close brace ends the variable substitution.
35747 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
35748
35749 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
35750
35751 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
35752
35753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
35754 $as_echo_n "checking whether build environment is sane... " >&6; }
35755 # Reject unsafe characters in $srcdir or the absolute working directory
35756 # name. Accept space and tab only in the latter.
35757 am_lf='
35758 '
35759 case `pwd` in
35760 *[\\\"\#\$\&\'\`$am_lf]*)
35761 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
35762 esac
35763 case $srcdir in
35764 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
35765 as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
35766 esac
35767
35768 # Do 'set' in a subshell so we don't clobber the current shell's
35769 # arguments. Must try -L first in case configure is actually a
35770 # symlink; some systems play weird games with the mod time of symlinks
35771 # (eg FreeBSD returns the mod time of the symlink's containing
35772 # directory).
35773 if (
35774 am_has_slept=no
35775 for am_try in 1 2; do
35776 echo "timestamp, slept: $am_has_slept" > conftest.file
35777 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
35778 if test "$*" = "X"; then
35779 # -L didn't work.
35780 set X `ls -t "$srcdir/configure" conftest.file`
35781 fi
35782 if test "$*" != "X $srcdir/configure conftest.file" \
35783 && test "$*" != "X conftest.file $srcdir/configure"; then
35784
35785 # If neither matched, then we have a broken ls. This can happen
35786 # if, for instance, CONFIG_SHELL is bash and it inherits a
35787 # broken ls alias from the environment. This has actually
35788 # happened. Such a system could not be considered "sane".
35789 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
35790 alias in your environment" "$LINENO" 5
35791 fi
35792 if test "$2" = conftest.file || test $am_try -eq 2; then
35793 break
35794 fi
35795 # Just in case.
35796 sleep 1
35797 am_has_slept=yes
35798 done
35799 test "$2" = conftest.file
35800 )
35801 then
35802 # Ok.
35803 :
35804 else
35805 as_fn_error $? "newly created file is older than distributed files!
35806 Check your system clock" "$LINENO" 5
35807 fi
35808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35809 $as_echo "yes" >&6; }
35810 # If we didn't sleep, we still need to ensure time stamps of config.status and
35811 # generated files are strictly newer.
35812 am_sleep_pid=
35813 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
35814 ( sleep 1 ) &
35815 am_sleep_pid=$!
35816 fi
35817
35818 rm -f conftest.file
35819
35820 test "$program_prefix" != NONE &&
35821 program_transform_name="s&^&$program_prefix&;$program_transform_name"
35822 # Use a double $ so make ignores it.
35823 test "$program_suffix" != NONE &&
35824 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
35825 # Double any \ or $.
35826 # By default was `s,x,x', remove it if useless.
35827 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
35828 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
35829
35830 # Expand $ac_aux_dir to an absolute path.
35831 am_aux_dir=`cd "$ac_aux_dir" && pwd`
35832
35833 if test x"${MISSING+set}" != xset; then
35834 case $am_aux_dir in
35835 *\ * | *\ *)
35836 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
35837 *)
35838 MISSING="\${SHELL} $am_aux_dir/missing" ;;
35839 esac
35840 fi
35841 # Use eval to expand $SHELL
35842 if eval "$MISSING --is-lightweight"; then
35843 am_missing_run="$MISSING "
35844 else
35845 am_missing_run=
35846 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
35847 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
35848 fi
35849
35850 if test x"${install_sh+set}" != xset; then
35851 case $am_aux_dir in
35852 *\ * | *\ *)
35853 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
35854 *)
35855 install_sh="\${SHELL} $am_aux_dir/install-sh"
35856 esac
35857 fi
35858
35859 # Installed binaries are usually stripped using 'strip' when the user
35860 # run "make install-strip". However 'strip' might not be the right
35861 # tool to use in cross-compilation environments, therefore Automake
35862 # will honor the 'STRIP' environment variable to overrule this program.
35863 if test "$cross_compiling" != no; then
35864 if test -n "$ac_tool_prefix"; then
35865 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
35866 set dummy ${ac_tool_prefix}strip; ac_word=$2
35867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35868 $as_echo_n "checking for $ac_word... " >&6; }
35869 if ${ac_cv_prog_STRIP+:} false; then :
35870 $as_echo_n "(cached) " >&6
35871 else
35872 if test -n "$STRIP"; then
35873 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
35874 else
35875 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35876 for as_dir in $PATH
35877 do
35878 IFS=$as_save_IFS
35879 test -z "$as_dir" && as_dir=.
35880 for ac_exec_ext in '' $ac_executable_extensions; do
35881 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35882 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
35883 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35884 break 2
35885 fi
35886 done
35887 done
35888 IFS=$as_save_IFS
35889
35890 fi
35891 fi
35892 STRIP=$ac_cv_prog_STRIP
35893 if test -n "$STRIP"; then
35894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35895 $as_echo "$STRIP" >&6; }
35896 else
35897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35898 $as_echo "no" >&6; }
35899 fi
35900
35901
35902 fi
35903 if test -z "$ac_cv_prog_STRIP"; then
35904 ac_ct_STRIP=$STRIP
35905 # Extract the first word of "strip", so it can be a program name with args.
35906 set dummy strip; ac_word=$2
35907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35908 $as_echo_n "checking for $ac_word... " >&6; }
35909 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
35910 $as_echo_n "(cached) " >&6
35911 else
35912 if test -n "$ac_ct_STRIP"; then
35913 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
35914 else
35915 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35916 for as_dir in $PATH
35917 do
35918 IFS=$as_save_IFS
35919 test -z "$as_dir" && as_dir=.
35920 for ac_exec_ext in '' $ac_executable_extensions; do
35921 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35922 ac_cv_prog_ac_ct_STRIP="strip"
35923 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35924 break 2
35925 fi
35926 done
35927 done
35928 IFS=$as_save_IFS
35929
35930 fi
35931 fi
35932 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
35933 if test -n "$ac_ct_STRIP"; then
35934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
35935 $as_echo "$ac_ct_STRIP" >&6; }
35936 else
35937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35938 $as_echo "no" >&6; }
35939 fi
35940
35941 if test "x$ac_ct_STRIP" = x; then
35942 STRIP=":"
35943 else
35944 case $cross_compiling:$ac_tool_warned in
35945 yes:)
35946 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35947 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35948 ac_tool_warned=yes ;;
35949 esac
35950 STRIP=$ac_ct_STRIP
35951 fi
35952 else
35953 STRIP="$ac_cv_prog_STRIP"
35954 fi
35955
35956 fi
35957 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
35958
35959 for ac_prog in gawk mawk nawk awk
35960 do
35961 # Extract the first word of "$ac_prog", so it can be a program name with args.
35962 set dummy $ac_prog; ac_word=$2
35963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35964 $as_echo_n "checking for $ac_word... " >&6; }
35965 if ${ac_cv_prog_AWK+:} false; then :
35966 $as_echo_n "(cached) " >&6
35967 else
35968 if test -n "$AWK"; then
35969 ac_cv_prog_AWK="$AWK" # Let the user override the test.
35970 else
35971 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35972 for as_dir in $PATH
35973 do
35974 IFS=$as_save_IFS
35975 test -z "$as_dir" && as_dir=.
35976 for ac_exec_ext in '' $ac_executable_extensions; do
35977 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35978 ac_cv_prog_AWK="$ac_prog"
35979 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35980 break 2
35981 fi
35982 done
35983 done
35984 IFS=$as_save_IFS
35985
35986 fi
35987 fi
35988 AWK=$ac_cv_prog_AWK
35989 if test -n "$AWK"; then
35990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
35991 $as_echo "$AWK" >&6; }
35992 else
35993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35994 $as_echo "no" >&6; }
35995 fi
35996
35997
35998 test -n "$AWK" && break
35999 done
36000
36001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
36002 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
36003 set x ${MAKE-make}
36004 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
36005 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
36006 $as_echo_n "(cached) " >&6
36007 else
36008 cat >conftest.make <<\_ACEOF
36009 SHELL = /bin/sh
36010 all:
36011 @echo '@@@%%%=$(MAKE)=@@@%%%'
36012 _ACEOF
36013 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
36014 case `${MAKE-make} -f conftest.make 2>/dev/null` in
36015 *@@@%%%=?*=@@@%%%*)
36016 eval ac_cv_prog_make_${ac_make}_set=yes;;
36017 *)
36018 eval ac_cv_prog_make_${ac_make}_set=no;;
36019 esac
36020 rm -f conftest.make
36021 fi
36022 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
36023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36024 $as_echo "yes" >&6; }
36025 SET_MAKE=
36026 else
36027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36028 $as_echo "no" >&6; }
36029 SET_MAKE="MAKE=${MAKE-make}"
36030 fi
36031
36032 rm -rf .tst 2>/dev/null
36033 mkdir .tst 2>/dev/null
36034 if test -d .tst; then
36035 am__leading_dot=.
36036 else
36037 am__leading_dot=_
36038 fi
36039 rmdir .tst 2>/dev/null
36040
36041 DEPDIR="${am__leading_dot}deps"
36042
36043 ac_config_commands="$ac_config_commands depfiles"
36044
36045
36046 am_make=${MAKE-make}
36047 cat > confinc << 'END'
36048 am__doit:
36049 @echo this is the am__doit target
36050 .PHONY: am__doit
36051 END
36052 # If we don't find an include directive, just comment out the code.
36053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
36054 $as_echo_n "checking for style of include used by $am_make... " >&6; }
36055 am__include="#"
36056 am__quote=
36057 _am_result=none
36058 # First try GNU make style include.
36059 echo "include confinc" > confmf
36060 # Ignore all kinds of additional output from 'make'.
36061 case `$am_make -s -f confmf 2> /dev/null` in #(
36062 *the\ am__doit\ target*)
36063 am__include=include
36064 am__quote=
36065 _am_result=GNU
36066 ;;
36067 esac
36068 # Now try BSD make style include.
36069 if test "$am__include" = "#"; then
36070 echo '.include "confinc"' > confmf
36071 case `$am_make -s -f confmf 2> /dev/null` in #(
36072 *the\ am__doit\ target*)
36073 am__include=.include
36074 am__quote="\""
36075 _am_result=BSD
36076 ;;
36077 esac
36078 fi
36079
36080
36081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
36082 $as_echo "$_am_result" >&6; }
36083 rm -f confinc confmf
36084
36085 # Check whether --enable-dependency-tracking was given.
36086 if test "${enable_dependency_tracking+set}" = set; then :
36087 enableval=$enable_dependency_tracking;
36088 fi
36089
36090 if test "x$enable_dependency_tracking" != xno; then
36091 am_depcomp="$ac_aux_dir/depcomp"
36092 AMDEPBACKSLASH='\'
36093 am__nodep='_no'
36094 fi
36095 if test "x$enable_dependency_tracking" != xno; then
36096 AMDEP_TRUE=
36097 AMDEP_FALSE='#'
36098 else
36099 AMDEP_TRUE='#'
36100 AMDEP_FALSE=
36101 fi
36102
36103
36104 # Check whether --enable-silent-rules was given.
36105 if test "${enable_silent_rules+set}" = set; then :
36106 enableval=$enable_silent_rules;
36107 fi
36108
36109 case $enable_silent_rules in # (((
36110 yes) AM_DEFAULT_VERBOSITY=0;;
36111 no) AM_DEFAULT_VERBOSITY=1;;
36112 *) AM_DEFAULT_VERBOSITY=1;;
36113 esac
36114 am_make=${MAKE-make}
36115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
36116 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
36117 if ${am_cv_make_support_nested_variables+:} false; then :
36118 $as_echo_n "(cached) " >&6
36119 else
36120 if $as_echo 'TRUE=$(BAR$(V))
36121 BAR0=false
36122 BAR1=true
36123 V=1
36124 am__doit:
36125 @$(TRUE)
36126 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
36127 am_cv_make_support_nested_variables=yes
36128 else
36129 am_cv_make_support_nested_variables=no
36130 fi
36131 fi
36132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
36133 $as_echo "$am_cv_make_support_nested_variables" >&6; }
36134 if test $am_cv_make_support_nested_variables = yes; then
36135 AM_V='$(V)'
36136 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
36137 else
36138 AM_V=$AM_DEFAULT_VERBOSITY
36139 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
36140 fi
36141 AM_BACKSLASH='\'
36142
36143 if test "`cd $srcdir && pwd`" != "`pwd`"; then
36144 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
36145 # is not polluted with repeated "-I."
36146 am__isrc=' -I$(srcdir)'
36147 # test to see if srcdir already configured
36148 if test -f $srcdir/config.status; then
36149 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
36150 fi
36151 fi
36152
36153 # test whether we have cygpath
36154 if test -z "$CYGPATH_W"; then
36155 if (cygpath --version) >/dev/null 2>/dev/null; then
36156 CYGPATH_W='cygpath -w'
36157 else
36158 CYGPATH_W=echo
36159 fi
36160 fi
36161
36162
36163 # Define the identity of the package.
36164 PACKAGE='libgnu'
36165 VERSION='UNUSED-VERSION'
36166
36167
36168 # Some tools Automake needs.
36169
36170 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
36171
36172
36173 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
36174
36175
36176 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
36177
36178
36179 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
36180
36181
36182 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
36183
36184 # For better backward compatibility. To be removed once Automake 1.9.x
36185 # dies out for good. For more background, see:
36186 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
36187 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
36188 mkdir_p='$(MKDIR_P)'
36189
36190 # We need awk for the "check" target (and possibly the TAP driver). The
36191 # system "awk" is bad on some platforms.
36192 # Always define AMTAR for backward compatibility. Yes, it's still used
36193 # in the wild :-( We should find a proper way to deprecate it ...
36194 AMTAR='$${TAR-tar}'
36195
36196
36197 # We'll loop over all known methods to create a tar archive until one works.
36198 _am_tools='gnutar pax cpio none'
36199
36200 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
36201
36202
36203
36204
36205
36206 depcc="$CC" am_compiler_list=
36207
36208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
36209 $as_echo_n "checking dependency style of $depcc... " >&6; }
36210 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
36211 $as_echo_n "(cached) " >&6
36212 else
36213 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
36214 # We make a subdir and do the tests there. Otherwise we can end up
36215 # making bogus files that we don't know about and never remove. For
36216 # instance it was reported that on HP-UX the gcc test will end up
36217 # making a dummy file named 'D' -- because '-MD' means "put the output
36218 # in D".
36219 rm -rf conftest.dir
36220 mkdir conftest.dir
36221 # Copy depcomp to subdir because otherwise we won't find it if we're
36222 # using a relative directory.
36223 cp "$am_depcomp" conftest.dir
36224 cd conftest.dir
36225 # We will build objects and dependencies in a subdirectory because
36226 # it helps to detect inapplicable dependency modes. For instance
36227 # both Tru64's cc and ICC support -MD to output dependencies as a
36228 # side effect of compilation, but ICC will put the dependencies in
36229 # the current directory while Tru64 will put them in the object
36230 # directory.
36231 mkdir sub
36232
36233 am_cv_CC_dependencies_compiler_type=none
36234 if test "$am_compiler_list" = ""; then
36235 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
36236 fi
36237 am__universal=false
36238 case " $depcc " in #(
36239 *\ -arch\ *\ -arch\ *) am__universal=true ;;
36240 esac
36241
36242 for depmode in $am_compiler_list; do
36243 # Setup a source with many dependencies, because some compilers
36244 # like to wrap large dependency lists on column 80 (with \), and
36245 # we should not choose a depcomp mode which is confused by this.
36246 #
36247 # We need to recreate these files for each test, as the compiler may
36248 # overwrite some of them when testing with obscure command lines.
36249 # This happens at least with the AIX C compiler.
36250 : > sub/conftest.c
36251 for i in 1 2 3 4 5 6; do
36252 echo '#include "conftst'$i'.h"' >> sub/conftest.c
36253 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
36254 # Solaris 10 /bin/sh.
36255 echo '/* dummy */' > sub/conftst$i.h
36256 done
36257 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
36258
36259 # We check with '-c' and '-o' for the sake of the "dashmstdout"
36260 # mode. It turns out that the SunPro C++ compiler does not properly
36261 # handle '-M -o', and we need to detect this. Also, some Intel
36262 # versions had trouble with output in subdirs.
36263 am__obj=sub/conftest.${OBJEXT-o}
36264 am__minus_obj="-o $am__obj"
36265 case $depmode in
36266 gcc)
36267 # This depmode causes a compiler race in universal mode.
36268 test "$am__universal" = false || continue
36269 ;;
36270 nosideeffect)
36271 # After this tag, mechanisms are not by side-effect, so they'll
36272 # only be used when explicitly requested.
36273 if test "x$enable_dependency_tracking" = xyes; then
36274 continue
36275 else
36276 break
36277 fi
36278 ;;
36279 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
36280 # This compiler won't grok '-c -o', but also, the minuso test has
36281 # not run yet. These depmodes are late enough in the game, and
36282 # so weak that their functioning should not be impacted.
36283 am__obj=conftest.${OBJEXT-o}
36284 am__minus_obj=
36285 ;;
36286 none) break ;;
36287 esac
36288 if depmode=$depmode \
36289 source=sub/conftest.c object=$am__obj \
36290 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
36291 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
36292 >/dev/null 2>conftest.err &&
36293 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
36294 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
36295 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
36296 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
36297 # icc doesn't choke on unknown options, it will just issue warnings
36298 # or remarks (even with -Werror). So we grep stderr for any message
36299 # that says an option was ignored or not supported.
36300 # When given -MP, icc 7.0 and 7.1 complain thusly:
36301 # icc: Command line warning: ignoring option '-M'; no argument required
36302 # The diagnosis changed in icc 8.0:
36303 # icc: Command line remark: option '-MP' not supported
36304 if (grep 'ignoring option' conftest.err ||
36305 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
36306 am_cv_CC_dependencies_compiler_type=$depmode
36307 break
36308 fi
36309 fi
36310 done
36311
36312 cd ..
36313 rm -rf conftest.dir
36314 else
36315 am_cv_CC_dependencies_compiler_type=none
36316 fi
36317
36318 fi
36319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
36320 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
36321 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
36322
36323 if
36324 test "x$enable_dependency_tracking" != xno \
36325 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
36326 am__fastdepCC_TRUE=
36327 am__fastdepCC_FALSE='#'
36328 else
36329 am__fastdepCC_TRUE='#'
36330 am__fastdepCC_FALSE=
36331 fi
36332
36333
36334
36335 # POSIX will say in a future version that running "rm -f" with no argument
36336 # is OK; and we want to be able to make that assumption in our Makefile
36337 # recipes. So use an aggressive probe to check that the usage we want is
36338 # actually supported "in the wild" to an acceptable degree.
36339 # See automake bug#10828.
36340 # To make any issue more visible, cause the running configure to be aborted
36341 # by default if the 'rm' program in use doesn't match our expectations; the
36342 # user can still override this though.
36343 if rm -f && rm -fr && rm -rf; then : OK; else
36344 cat >&2 <<'END'
36345 Oops!
36346
36347 Your 'rm' program seems unable to run without file operands specified
36348 on the command line, even when the '-f' option is present. This is contrary
36349 to the behaviour of most rm programs out there, and not conforming with
36350 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
36351
36352 Please tell bug-automake@gnu.org about your system, including the value
36353 of your $PATH and any error possibly output before this message. This
36354 can help us improve future automake versions.
36355
36356 END
36357 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
36358 echo 'Configuration will proceed anyway, since you have set the' >&2
36359 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
36360 echo >&2
36361 else
36362 cat >&2 <<'END'
36363 Aborting the configuration process, to ensure you take notice of the issue.
36364
36365 You can download and install GNU coreutils to get an 'rm' implementation
36366 that behaves properly: <http://www.gnu.org/software/coreutils/>.
36367
36368 If you want to complete the configuration process using your problematic
36369 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
36370 to "yes", and re-run configure.
36371
36372 END
36373 as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
36374 fi
36375 fi
36376
36377
36378 # Check whether --enable-silent-rules was given.
36379 if test "${enable_silent_rules+set}" = set; then :
36380 enableval=$enable_silent_rules;
36381 fi
36382
36383 case $enable_silent_rules in # (((
36384 yes) AM_DEFAULT_VERBOSITY=0;;
36385 no) AM_DEFAULT_VERBOSITY=1;;
36386 *) AM_DEFAULT_VERBOSITY=0;;
36387 esac
36388 am_make=${MAKE-make}
36389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
36390 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
36391 if ${am_cv_make_support_nested_variables+:} false; then :
36392 $as_echo_n "(cached) " >&6
36393 else
36394 if $as_echo 'TRUE=$(BAR$(V))
36395 BAR0=false
36396 BAR1=true
36397 V=1
36398 am__doit:
36399 @$(TRUE)
36400 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
36401 am_cv_make_support_nested_variables=yes
36402 else
36403 am_cv_make_support_nested_variables=no
36404 fi
36405 fi
36406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
36407 $as_echo "$am_cv_make_support_nested_variables" >&6; }
36408 if test $am_cv_make_support_nested_variables = yes; then
36409 AM_V='$(V)'
36410 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
36411 else
36412 AM_V=$AM_DEFAULT_VERBOSITY
36413 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
36414 fi
36415 AM_BACKSLASH='\'
36416
36417
36418 # --------------------- #
36419 # Checks for programs. #
36420 # --------------------- #
36421
36422
36423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
36424 $as_echo_n "checking whether ln -s works... " >&6; }
36425 LN_S=$as_ln_s
36426 if test "$LN_S" = "ln -s"; then
36427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36428 $as_echo "yes" >&6; }
36429 else
36430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
36431 $as_echo "no, using $LN_S" >&6; }
36432 fi
36433
36434 if test -n "$ac_tool_prefix"; then
36435 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
36436 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
36437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36438 $as_echo_n "checking for $ac_word... " >&6; }
36439 if ${ac_cv_prog_RANLIB+:} false; then :
36440 $as_echo_n "(cached) " >&6
36441 else
36442 if test -n "$RANLIB"; then
36443 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
36444 else
36445 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36446 for as_dir in $PATH
36447 do
36448 IFS=$as_save_IFS
36449 test -z "$as_dir" && as_dir=.
36450 for ac_exec_ext in '' $ac_executable_extensions; do
36451 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36452 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
36453 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36454 break 2
36455 fi
36456 done
36457 done
36458 IFS=$as_save_IFS
36459
36460 fi
36461 fi
36462 RANLIB=$ac_cv_prog_RANLIB
36463 if test -n "$RANLIB"; then
36464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
36465 $as_echo "$RANLIB" >&6; }
36466 else
36467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36468 $as_echo "no" >&6; }
36469 fi
36470
36471
36472 fi
36473 if test -z "$ac_cv_prog_RANLIB"; then
36474 ac_ct_RANLIB=$RANLIB
36475 # Extract the first word of "ranlib", so it can be a program name with args.
36476 set dummy ranlib; ac_word=$2
36477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36478 $as_echo_n "checking for $ac_word... " >&6; }
36479 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
36480 $as_echo_n "(cached) " >&6
36481 else
36482 if test -n "$ac_ct_RANLIB"; then
36483 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
36484 else
36485 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36486 for as_dir in $PATH
36487 do
36488 IFS=$as_save_IFS
36489 test -z "$as_dir" && as_dir=.
36490 for ac_exec_ext in '' $ac_executable_extensions; do
36491 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36492 ac_cv_prog_ac_ct_RANLIB="ranlib"
36493 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36494 break 2
36495 fi
36496 done
36497 done
36498 IFS=$as_save_IFS
36499
36500 fi
36501 fi
36502 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
36503 if test -n "$ac_ct_RANLIB"; then
36504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
36505 $as_echo "$ac_ct_RANLIB" >&6; }
36506 else
36507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36508 $as_echo "no" >&6; }
36509 fi
36510
36511 if test "x$ac_ct_RANLIB" = x; then
36512 RANLIB=":"
36513 else
36514 case $cross_compiling:$ac_tool_warned in
36515 yes:)
36516 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36517 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36518 ac_tool_warned=yes ;;
36519 esac
36520 RANLIB=$ac_ct_RANLIB
36521 fi
36522 else
36523 RANLIB="$ac_cv_prog_RANLIB"
36524 fi
36525
36526
36527 if test -n "$ac_tool_prefix"; then
36528 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
36529 set dummy ${ac_tool_prefix}ar; ac_word=$2
36530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36531 $as_echo_n "checking for $ac_word... " >&6; }
36532 if ${ac_cv_prog_AR+:} false; then :
36533 $as_echo_n "(cached) " >&6
36534 else
36535 if test -n "$AR"; then
36536 ac_cv_prog_AR="$AR" # Let the user override the test.
36537 else
36538 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36539 for as_dir in $PATH
36540 do
36541 IFS=$as_save_IFS
36542 test -z "$as_dir" && as_dir=.
36543 for ac_exec_ext in '' $ac_executable_extensions; do
36544 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36545 ac_cv_prog_AR="${ac_tool_prefix}ar"
36546 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36547 break 2
36548 fi
36549 done
36550 done
36551 IFS=$as_save_IFS
36552
36553 fi
36554 fi
36555 AR=$ac_cv_prog_AR
36556 if test -n "$AR"; then
36557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36558 $as_echo "$AR" >&6; }
36559 else
36560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36561 $as_echo "no" >&6; }
36562 fi
36563
36564
36565 fi
36566 if test -z "$ac_cv_prog_AR"; then
36567 ac_ct_AR=$AR
36568 # Extract the first word of "ar", so it can be a program name with args.
36569 set dummy ar; ac_word=$2
36570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36571 $as_echo_n "checking for $ac_word... " >&6; }
36572 if ${ac_cv_prog_ac_ct_AR+:} false; then :
36573 $as_echo_n "(cached) " >&6
36574 else
36575 if test -n "$ac_ct_AR"; then
36576 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36577 else
36578 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36579 for as_dir in $PATH
36580 do
36581 IFS=$as_save_IFS
36582 test -z "$as_dir" && as_dir=.
36583 for ac_exec_ext in '' $ac_executable_extensions; do
36584 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36585 ac_cv_prog_ac_ct_AR="ar"
36586 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36587 break 2
36588 fi
36589 done
36590 done
36591 IFS=$as_save_IFS
36592
36593 fi
36594 fi
36595 ac_ct_AR=$ac_cv_prog_ac_ct_AR
36596 if test -n "$ac_ct_AR"; then
36597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36598 $as_echo "$ac_ct_AR" >&6; }
36599 else
36600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36601 $as_echo "no" >&6; }
36602 fi
36603
36604 if test "x$ac_ct_AR" = x; then
36605 AR=""
36606 else
36607 case $cross_compiling:$ac_tool_warned in
36608 yes:)
36609 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36610 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36611 ac_tool_warned=yes ;;
36612 esac
36613 AR=$ac_ct_AR
36614 fi
36615 else
36616 AR="$ac_cv_prog_AR"
36617 fi
36618
36619
36620 # ---------------------- #
36621 # Checks for libraries. #
36622 # ---------------------- #
36623
36624 ac_config_files="$ac_config_files Makefile.gnulib.inc"
36625
36626
36627 ac_config_files="$ac_config_files Makefile import/Makefile"
36628
36629 ac_config_commands="$ac_config_commands default"
36630
36631 cat >confcache <<\_ACEOF
36632 # This file is a shell script that caches the results of configure
36633 # tests run on this system so they can be shared between configure
36634 # scripts and configure runs, see configure's option --config-cache.
36635 # It is not useful on other systems. If it contains results you don't
36636 # want to keep, you may remove or edit it.
36637 #
36638 # config.status only pays attention to the cache file if you give it
36639 # the --recheck option to rerun configure.
36640 #
36641 # `ac_cv_env_foo' variables (set or unset) will be overridden when
36642 # loading this file, other *unset* `ac_cv_foo' will be assigned the
36643 # following values.
36644
36645 _ACEOF
36646
36647 # The following way of writing the cache mishandles newlines in values,
36648 # but we know of no workaround that is simple, portable, and efficient.
36649 # So, we kill variables containing newlines.
36650 # Ultrix sh set writes to stderr and can't be redirected directly,
36651 # and sets the high bit in the cache file unless we assign to the vars.
36652 (
36653 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
36654 eval ac_val=\$$ac_var
36655 case $ac_val in #(
36656 *${as_nl}*)
36657 case $ac_var in #(
36658 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
36659 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
36660 esac
36661 case $ac_var in #(
36662 _ | IFS | as_nl) ;; #(
36663 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
36664 *) { eval $ac_var=; unset $ac_var;} ;;
36665 esac ;;
36666 esac
36667 done
36668
36669 (set) 2>&1 |
36670 case $as_nl`(ac_space=' '; set) 2>&1` in #(
36671 *${as_nl}ac_space=\ *)
36672 # `set' does not quote correctly, so add quotes: double-quote
36673 # substitution turns \\\\ into \\, and sed turns \\ into \.
36674 sed -n \
36675 "s/'/'\\\\''/g;
36676 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
36677 ;; #(
36678 *)
36679 # `set' quotes correctly as required by POSIX, so do not add quotes.
36680 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
36681 ;;
36682 esac |
36683 sort
36684 ) |
36685 sed '
36686 /^ac_cv_env_/b end
36687 t clear
36688 :clear
36689 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
36690 t end
36691 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
36692 :end' >>confcache
36693 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
36694 if test -w "$cache_file"; then
36695 if test "x$cache_file" != "x/dev/null"; then
36696 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
36697 $as_echo "$as_me: updating cache $cache_file" >&6;}
36698 if test ! -f "$cache_file" || test -h "$cache_file"; then
36699 cat confcache >"$cache_file"
36700 else
36701 case $cache_file in #(
36702 */* | ?:*)
36703 mv -f confcache "$cache_file"$$ &&
36704 mv -f "$cache_file"$$ "$cache_file" ;; #(
36705 *)
36706 mv -f confcache "$cache_file" ;;
36707 esac
36708 fi
36709 fi
36710 else
36711 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
36712 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
36713 fi
36714 fi
36715 rm -f confcache
36716
36717 test "x$prefix" = xNONE && prefix=$ac_default_prefix
36718 # Let make expand exec_prefix.
36719 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
36720
36721 DEFS=-DHAVE_CONFIG_H
36722
36723 ac_libobjs=
36724 ac_ltlibobjs=
36725 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
36726 # 1. Remove the extension, and $U if already installed.
36727 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
36728 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
36729 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
36730 # will be set to the directory where LIBOBJS objects are built.
36731 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
36732 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
36733 done
36734 LIBOBJS=$ac_libobjs
36735
36736 LTLIBOBJS=$ac_ltlibobjs
36737
36738
36739 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
36740 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
36741 Usually this means the macro was only invoked conditionally." "$LINENO" 5
36742 fi
36743 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
36744 as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
36745 Usually this means the macro was only invoked conditionally." "$LINENO" 5
36746 fi
36747
36748
36749
36750 gl_libobjs=
36751 gl_ltlibobjs=
36752 gl_libobjdeps=
36753 if test -n "$gl_LIBOBJS"; then
36754 # Remove the extension.
36755 sed_drop_objext='s/\.o$//;s/\.obj$//'
36756 sed_dirname1='s,//*,/,g'
36757 sed_dirname2='s,\(.\)/$,\1,'
36758 sed_dirname3='s,^[^/]*$,.,'
36759 sed_dirname4='s,\(.\)/[^/]*$,\1,'
36760 sed_basename1='s,.*/,,'
36761 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
36762 gl_libobjs="$gl_libobjs $i.$ac_objext"
36763 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
36764 i_dir=`echo "$i" | sed -e "$sed_dirname1" -e "$sed_dirname2" -e "$sed_dirname3" -e "$sed_dirname4"`
36765 i_base=`echo "$i" | sed -e "$sed_basename1"`
36766 gl_libobjdeps="$gl_libobjdeps $i_dir/\$(DEPDIR)/$i_base.Po"
36767 done
36768 fi
36769 gl_LIBOBJS=$gl_libobjs
36770
36771 gl_LTLIBOBJS=$gl_ltlibobjs
36772
36773 gl_LIBOBJDEPS=$gl_libobjdeps
36774
36775
36776
36777 gltests_libobjs=
36778 gltests_ltlibobjs=
36779 gltests_libobjdeps=
36780 if test -n "$gltests_LIBOBJS"; then
36781 # Remove the extension.
36782 sed_drop_objext='s/\.o$//;s/\.obj$//'
36783 sed_dirname1='s,//*,/,g'
36784 sed_dirname2='s,\(.\)/$,\1,'
36785 sed_dirname3='s,^[^/]*$,.,'
36786 sed_dirname4='s,\(.\)/[^/]*$,\1,'
36787 sed_basename1='s,.*/,,'
36788 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
36789 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
36790 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
36791 i_dir=`echo "$i" | sed -e "$sed_dirname1" -e "$sed_dirname2" -e "$sed_dirname3" -e "$sed_dirname4"`
36792 i_base=`echo "$i" | sed -e "$sed_basename1"`
36793 gltests_libobjdeps="$gltests_libobjdeps $i_dir/\$(DEPDIR)/$i_base.Po"
36794 done
36795 fi
36796 gltests_LIBOBJS=$gltests_libobjs
36797
36798 gltests_LTLIBOBJS=$gltests_ltlibobjs
36799
36800 gltests_LIBOBJDEPS=$gltests_libobjdeps
36801
36802
36803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
36804 $as_echo_n "checking that generated files are newer than configure... " >&6; }
36805 if test -n "$am_sleep_pid"; then
36806 # Hide warnings about reused PIDs.
36807 wait $am_sleep_pid 2>/dev/null
36808 fi
36809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
36810 $as_echo "done" >&6; }
36811 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
36812 as_fn_error $? "conditional \"AMDEP\" was never defined.
36813 Usually this means the macro was only invoked conditionally." "$LINENO" 5
36814 fi
36815 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
36816 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
36817 Usually this means the macro was only invoked conditionally." "$LINENO" 5
36818 fi
36819 if test -n "$EXEEXT"; then
36820 am__EXEEXT_TRUE=
36821 am__EXEEXT_FALSE='#'
36822 else
36823 am__EXEEXT_TRUE='#'
36824 am__EXEEXT_FALSE=
36825 fi
36826
36827
36828 : "${CONFIG_STATUS=./config.status}"
36829 ac_write_fail=0
36830 ac_clean_files_save=$ac_clean_files
36831 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
36832 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
36833 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
36834 as_write_fail=0
36835 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
36836 #! $SHELL
36837 # Generated by $as_me.
36838 # Run this file to recreate the current configuration.
36839 # Compiler output produced by configure, useful for debugging
36840 # configure, is in config.log if it exists.
36841
36842 debug=false
36843 ac_cs_recheck=false
36844 ac_cs_silent=false
36845
36846 SHELL=\${CONFIG_SHELL-$SHELL}
36847 export SHELL
36848 _ASEOF
36849 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
36850 ## -------------------- ##
36851 ## M4sh Initialization. ##
36852 ## -------------------- ##
36853
36854 # Be more Bourne compatible
36855 DUALCASE=1; export DUALCASE # for MKS sh
36856 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
36857 emulate sh
36858 NULLCMD=:
36859 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
36860 # is contrary to our usage. Disable this feature.
36861 alias -g '${1+"$@"}'='"$@"'
36862 setopt NO_GLOB_SUBST
36863 else
36864 case `(set -o) 2>/dev/null` in #(
36865 *posix*) :
36866 set -o posix ;; #(
36867 *) :
36868 ;;
36869 esac
36870 fi
36871
36872
36873 as_nl='
36874 '
36875 export as_nl
36876 # Printing a long string crashes Solaris 7 /usr/bin/printf.
36877 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
36878 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
36879 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
36880 # Prefer a ksh shell builtin over an external printf program on Solaris,
36881 # but without wasting forks for bash or zsh.
36882 if test -z "$BASH_VERSION$ZSH_VERSION" \
36883 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
36884 as_echo='print -r --'
36885 as_echo_n='print -rn --'
36886 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
36887 as_echo='printf %s\n'
36888 as_echo_n='printf %s'
36889 else
36890 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
36891 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
36892 as_echo_n='/usr/ucb/echo -n'
36893 else
36894 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
36895 as_echo_n_body='eval
36896 arg=$1;
36897 case $arg in #(
36898 *"$as_nl"*)
36899 expr "X$arg" : "X\\(.*\\)$as_nl";
36900 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
36901 esac;
36902 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
36903 '
36904 export as_echo_n_body
36905 as_echo_n='sh -c $as_echo_n_body as_echo'
36906 fi
36907 export as_echo_body
36908 as_echo='sh -c $as_echo_body as_echo'
36909 fi
36910
36911 # The user is always right.
36912 if test "${PATH_SEPARATOR+set}" != set; then
36913 PATH_SEPARATOR=:
36914 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
36915 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
36916 PATH_SEPARATOR=';'
36917 }
36918 fi
36919
36920
36921 # IFS
36922 # We need space, tab and new line, in precisely that order. Quoting is
36923 # there to prevent editors from complaining about space-tab.
36924 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
36925 # splitting by setting IFS to empty value.)
36926 IFS=" "" $as_nl"
36927
36928 # Find who we are. Look in the path if we contain no directory separator.
36929 as_myself=
36930 case $0 in #((
36931 *[\\/]* ) as_myself=$0 ;;
36932 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36933 for as_dir in $PATH
36934 do
36935 IFS=$as_save_IFS
36936 test -z "$as_dir" && as_dir=.
36937 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
36938 done
36939 IFS=$as_save_IFS
36940
36941 ;;
36942 esac
36943 # We did not find ourselves, most probably we were run as `sh COMMAND'
36944 # in which case we are not to be found in the path.
36945 if test "x$as_myself" = x; then
36946 as_myself=$0
36947 fi
36948 if test ! -f "$as_myself"; then
36949 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
36950 exit 1
36951 fi
36952
36953 # Unset variables that we do not need and which cause bugs (e.g. in
36954 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
36955 # suppresses any "Segmentation fault" message there. '((' could
36956 # trigger a bug in pdksh 5.2.14.
36957 for as_var in BASH_ENV ENV MAIL MAILPATH
36958 do eval test x\${$as_var+set} = xset \
36959 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
36960 done
36961 PS1='$ '
36962 PS2='> '
36963 PS4='+ '
36964
36965 # NLS nuisances.
36966 LC_ALL=C
36967 export LC_ALL
36968 LANGUAGE=C
36969 export LANGUAGE
36970
36971 # CDPATH.
36972 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
36973
36974
36975 # as_fn_error STATUS ERROR [LINENO LOG_FD]
36976 # ----------------------------------------
36977 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
36978 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
36979 # script with STATUS, using 1 if that was 0.
36980 as_fn_error ()
36981 {
36982 as_status=$1; test $as_status -eq 0 && as_status=1
36983 if test "$4"; then
36984 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
36985 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
36986 fi
36987 $as_echo "$as_me: error: $2" >&2
36988 as_fn_exit $as_status
36989 } # as_fn_error
36990
36991
36992 # as_fn_set_status STATUS
36993 # -----------------------
36994 # Set $? to STATUS, without forking.
36995 as_fn_set_status ()
36996 {
36997 return $1
36998 } # as_fn_set_status
36999
37000 # as_fn_exit STATUS
37001 # -----------------
37002 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
37003 as_fn_exit ()
37004 {
37005 set +e
37006 as_fn_set_status $1
37007 exit $1
37008 } # as_fn_exit
37009
37010 # as_fn_unset VAR
37011 # ---------------
37012 # Portably unset VAR.
37013 as_fn_unset ()
37014 {
37015 { eval $1=; unset $1;}
37016 }
37017 as_unset=as_fn_unset
37018 # as_fn_append VAR VALUE
37019 # ----------------------
37020 # Append the text in VALUE to the end of the definition contained in VAR. Take
37021 # advantage of any shell optimizations that allow amortized linear growth over
37022 # repeated appends, instead of the typical quadratic growth present in naive
37023 # implementations.
37024 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
37025 eval 'as_fn_append ()
37026 {
37027 eval $1+=\$2
37028 }'
37029 else
37030 as_fn_append ()
37031 {
37032 eval $1=\$$1\$2
37033 }
37034 fi # as_fn_append
37035
37036 # as_fn_arith ARG...
37037 # ------------------
37038 # Perform arithmetic evaluation on the ARGs, and store the result in the
37039 # global $as_val. Take advantage of shells that can avoid forks. The arguments
37040 # must be portable across $(()) and expr.
37041 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
37042 eval 'as_fn_arith ()
37043 {
37044 as_val=$(( $* ))
37045 }'
37046 else
37047 as_fn_arith ()
37048 {
37049 as_val=`expr "$@" || test $? -eq 1`
37050 }
37051 fi # as_fn_arith
37052
37053
37054 if expr a : '\(a\)' >/dev/null 2>&1 &&
37055 test "X`expr 00001 : '.*\(...\)'`" = X001; then
37056 as_expr=expr
37057 else
37058 as_expr=false
37059 fi
37060
37061 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
37062 as_basename=basename
37063 else
37064 as_basename=false
37065 fi
37066
37067 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
37068 as_dirname=dirname
37069 else
37070 as_dirname=false
37071 fi
37072
37073 as_me=`$as_basename -- "$0" ||
37074 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
37075 X"$0" : 'X\(//\)$' \| \
37076 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
37077 $as_echo X/"$0" |
37078 sed '/^.*\/\([^/][^/]*\)\/*$/{
37079 s//\1/
37080 q
37081 }
37082 /^X\/\(\/\/\)$/{
37083 s//\1/
37084 q
37085 }
37086 /^X\/\(\/\).*/{
37087 s//\1/
37088 q
37089 }
37090 s/.*/./; q'`
37091
37092 # Avoid depending upon Character Ranges.
37093 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
37094 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
37095 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
37096 as_cr_digits='0123456789'
37097 as_cr_alnum=$as_cr_Letters$as_cr_digits
37098
37099 ECHO_C= ECHO_N= ECHO_T=
37100 case `echo -n x` in #(((((
37101 -n*)
37102 case `echo 'xy\c'` in
37103 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
37104 xy) ECHO_C='\c';;
37105 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
37106 ECHO_T=' ';;
37107 esac;;
37108 *)
37109 ECHO_N='-n';;
37110 esac
37111
37112 rm -f conf$$ conf$$.exe conf$$.file
37113 if test -d conf$$.dir; then
37114 rm -f conf$$.dir/conf$$.file
37115 else
37116 rm -f conf$$.dir
37117 mkdir conf$$.dir 2>/dev/null
37118 fi
37119 if (echo >conf$$.file) 2>/dev/null; then
37120 if ln -s conf$$.file conf$$ 2>/dev/null; then
37121 as_ln_s='ln -s'
37122 # ... but there are two gotchas:
37123 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
37124 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
37125 # In both cases, we have to default to `cp -pR'.
37126 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
37127 as_ln_s='cp -pR'
37128 elif ln conf$$.file conf$$ 2>/dev/null; then
37129 as_ln_s=ln
37130 else
37131 as_ln_s='cp -pR'
37132 fi
37133 else
37134 as_ln_s='cp -pR'
37135 fi
37136 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
37137 rmdir conf$$.dir 2>/dev/null
37138
37139
37140 # as_fn_mkdir_p
37141 # -------------
37142 # Create "$as_dir" as a directory, including parents if necessary.
37143 as_fn_mkdir_p ()
37144 {
37145
37146 case $as_dir in #(
37147 -*) as_dir=./$as_dir;;
37148 esac
37149 test -d "$as_dir" || eval $as_mkdir_p || {
37150 as_dirs=
37151 while :; do
37152 case $as_dir in #(
37153 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
37154 *) as_qdir=$as_dir;;
37155 esac
37156 as_dirs="'$as_qdir' $as_dirs"
37157 as_dir=`$as_dirname -- "$as_dir" ||
37158 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
37159 X"$as_dir" : 'X\(//\)[^/]' \| \
37160 X"$as_dir" : 'X\(//\)$' \| \
37161 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
37162 $as_echo X"$as_dir" |
37163 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
37164 s//\1/
37165 q
37166 }
37167 /^X\(\/\/\)[^/].*/{
37168 s//\1/
37169 q
37170 }
37171 /^X\(\/\/\)$/{
37172 s//\1/
37173 q
37174 }
37175 /^X\(\/\).*/{
37176 s//\1/
37177 q
37178 }
37179 s/.*/./; q'`
37180 test -d "$as_dir" && break
37181 done
37182 test -z "$as_dirs" || eval "mkdir $as_dirs"
37183 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
37184
37185
37186 } # as_fn_mkdir_p
37187 if mkdir -p . 2>/dev/null; then
37188 as_mkdir_p='mkdir -p "$as_dir"'
37189 else
37190 test -d ./-p && rmdir ./-p
37191 as_mkdir_p=false
37192 fi
37193
37194
37195 # as_fn_executable_p FILE
37196 # -----------------------
37197 # Test if FILE is an executable regular file.
37198 as_fn_executable_p ()
37199 {
37200 test -f "$1" && test -x "$1"
37201 } # as_fn_executable_p
37202 as_test_x='test -x'
37203 as_executable_p=as_fn_executable_p
37204
37205 # Sed expression to map a string onto a valid CPP name.
37206 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
37207
37208 # Sed expression to map a string onto a valid variable name.
37209 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
37210
37211
37212 exec 6>&1
37213 ## ----------------------------------- ##
37214 ## Main body of $CONFIG_STATUS script. ##
37215 ## ----------------------------------- ##
37216 _ASEOF
37217 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
37218
37219 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37220 # Save the log message, to keep $0 and so on meaningful, and to
37221 # report actual input values of CONFIG_FILES etc. instead of their
37222 # values after options handling.
37223 ac_log="
37224 This file was extended by libgnu $as_me UNUSED-VERSION, which was
37225 generated by GNU Autoconf 2.69. Invocation command line was
37226
37227 CONFIG_FILES = $CONFIG_FILES
37228 CONFIG_HEADERS = $CONFIG_HEADERS
37229 CONFIG_LINKS = $CONFIG_LINKS
37230 CONFIG_COMMANDS = $CONFIG_COMMANDS
37231 $ $0 $@
37232
37233 on `(hostname || uname -n) 2>/dev/null | sed 1q`
37234 "
37235
37236 _ACEOF
37237
37238 case $ac_config_files in *"
37239 "*) set x $ac_config_files; shift; ac_config_files=$*;;
37240 esac
37241
37242 case $ac_config_headers in *"
37243 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
37244 esac
37245
37246
37247 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37248 # Files that config.status was made for.
37249 config_files="$ac_config_files"
37250 config_headers="$ac_config_headers"
37251 config_commands="$ac_config_commands"
37252
37253 _ACEOF
37254
37255 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37256 ac_cs_usage="\
37257 \`$as_me' instantiates files and other configuration actions
37258 from templates according to the current configuration. Unless the files
37259 and actions are specified as TAGs, all are instantiated by default.
37260
37261 Usage: $0 [OPTION]... [TAG]...
37262
37263 -h, --help print this help, then exit
37264 -V, --version print version number and configuration settings, then exit
37265 --config print configuration, then exit
37266 -q, --quiet, --silent
37267 do not print progress messages
37268 -d, --debug don't remove temporary files
37269 --recheck update $as_me by reconfiguring in the same conditions
37270 --file=FILE[:TEMPLATE]
37271 instantiate the configuration file FILE
37272 --header=FILE[:TEMPLATE]
37273 instantiate the configuration header FILE
37274
37275 Configuration files:
37276 $config_files
37277
37278 Configuration headers:
37279 $config_headers
37280
37281 Configuration commands:
37282 $config_commands
37283
37284 Report bugs to the package provider."
37285
37286 _ACEOF
37287 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37288 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
37289 ac_cs_version="\\
37290 libgnu config.status UNUSED-VERSION
37291 configured by $0, generated by GNU Autoconf 2.69,
37292 with options \\"\$ac_cs_config\\"
37293
37294 Copyright (C) 2012 Free Software Foundation, Inc.
37295 This config.status script is free software; the Free Software Foundation
37296 gives unlimited permission to copy, distribute and modify it."
37297
37298 ac_pwd='$ac_pwd'
37299 srcdir='$srcdir'
37300 INSTALL='$INSTALL'
37301 MKDIR_P='$MKDIR_P'
37302 AWK='$AWK'
37303 test -n "\$AWK" || AWK=awk
37304 _ACEOF
37305
37306 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37307 # The default lists apply if the user does not specify any file.
37308 ac_need_defaults=:
37309 while test $# != 0
37310 do
37311 case $1 in
37312 --*=?*)
37313 ac_option=`expr "X$1" : 'X\([^=]*\)='`
37314 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
37315 ac_shift=:
37316 ;;
37317 --*=)
37318 ac_option=`expr "X$1" : 'X\([^=]*\)='`
37319 ac_optarg=
37320 ac_shift=:
37321 ;;
37322 *)
37323 ac_option=$1
37324 ac_optarg=$2
37325 ac_shift=shift
37326 ;;
37327 esac
37328
37329 case $ac_option in
37330 # Handling of the options.
37331 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
37332 ac_cs_recheck=: ;;
37333 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
37334 $as_echo "$ac_cs_version"; exit ;;
37335 --config | --confi | --conf | --con | --co | --c )
37336 $as_echo "$ac_cs_config"; exit ;;
37337 --debug | --debu | --deb | --de | --d | -d )
37338 debug=: ;;
37339 --file | --fil | --fi | --f )
37340 $ac_shift
37341 case $ac_optarg in
37342 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
37343 '') as_fn_error $? "missing file argument" ;;
37344 esac
37345 as_fn_append CONFIG_FILES " '$ac_optarg'"
37346 ac_need_defaults=false;;
37347 --header | --heade | --head | --hea )
37348 $ac_shift
37349 case $ac_optarg in
37350 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
37351 esac
37352 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
37353 ac_need_defaults=false;;
37354 --he | --h)
37355 # Conflict between --help and --header
37356 as_fn_error $? "ambiguous option: \`$1'
37357 Try \`$0 --help' for more information.";;
37358 --help | --hel | -h )
37359 $as_echo "$ac_cs_usage"; exit ;;
37360 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
37361 | -silent | --silent | --silen | --sile | --sil | --si | --s)
37362 ac_cs_silent=: ;;
37363
37364 # This is an error.
37365 -*) as_fn_error $? "unrecognized option: \`$1'
37366 Try \`$0 --help' for more information." ;;
37367
37368 *) as_fn_append ac_config_targets " $1"
37369 ac_need_defaults=false ;;
37370
37371 esac
37372 shift
37373 done
37374
37375 ac_configure_extra_args=
37376
37377 if $ac_cs_silent; then
37378 exec 6>/dev/null
37379 ac_configure_extra_args="$ac_configure_extra_args --silent"
37380 fi
37381
37382 _ACEOF
37383 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37384 if \$ac_cs_recheck; then
37385 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
37386 shift
37387 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
37388 CONFIG_SHELL='$SHELL'
37389 export CONFIG_SHELL
37390 exec "\$@"
37391 fi
37392
37393 _ACEOF
37394 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37395 exec 5>>config.log
37396 {
37397 echo
37398 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
37399 ## Running $as_me. ##
37400 _ASBOX
37401 $as_echo "$ac_log"
37402 } >&5
37403
37404 _ACEOF
37405 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37406 #
37407 # INIT-COMMANDS
37408 #
37409 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
37410
37411 _ACEOF
37412
37413 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37414
37415 # Handling of arguments.
37416 for ac_config_target in $ac_config_targets
37417 do
37418 case $ac_config_target in
37419 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
37420 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
37421 "Makefile.gnulib.inc") CONFIG_FILES="$CONFIG_FILES Makefile.gnulib.inc" ;;
37422 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
37423 "import/Makefile") CONFIG_FILES="$CONFIG_FILES import/Makefile" ;;
37424 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
37425
37426 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
37427 esac
37428 done
37429
37430
37431 # If the user did not use the arguments to specify the items to instantiate,
37432 # then the envvar interface is used. Set only those that are not.
37433 # We use the long form for the default assignment because of an extremely
37434 # bizarre bug on SunOS 4.1.3.
37435 if $ac_need_defaults; then
37436 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
37437 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
37438 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
37439 fi
37440
37441 # Have a temporary directory for convenience. Make it in the build tree
37442 # simply because there is no reason against having it here, and in addition,
37443 # creating and moving files from /tmp can sometimes cause problems.
37444 # Hook for its removal unless debugging.
37445 # Note that there is a small window in which the directory will not be cleaned:
37446 # after its creation but before its name has been assigned to `$tmp'.
37447 $debug ||
37448 {
37449 tmp= ac_tmp=
37450 trap 'exit_status=$?
37451 : "${ac_tmp:=$tmp}"
37452 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
37453 ' 0
37454 trap 'as_fn_exit 1' 1 2 13 15
37455 }
37456 # Create a (secure) tmp directory for tmp files.
37457
37458 {
37459 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
37460 test -d "$tmp"
37461 } ||
37462 {
37463 tmp=./conf$$-$RANDOM
37464 (umask 077 && mkdir "$tmp")
37465 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
37466 ac_tmp=$tmp
37467
37468 # Set up the scripts for CONFIG_FILES section.
37469 # No need to generate them if there are no CONFIG_FILES.
37470 # This happens for instance with `./config.status config.h'.
37471 if test -n "$CONFIG_FILES"; then
37472
37473
37474 ac_cr=`echo X | tr X '\015'`
37475 # On cygwin, bash can eat \r inside `` if the user requested igncr.
37476 # But we know of no other shell where ac_cr would be empty at this
37477 # point, so we can use a bashism as a fallback.
37478 if test "x$ac_cr" = x; then
37479 eval ac_cr=\$\'\\r\'
37480 fi
37481 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
37482 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
37483 ac_cs_awk_cr='\\r'
37484 else
37485 ac_cs_awk_cr=$ac_cr
37486 fi
37487
37488 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
37489 _ACEOF
37490
37491
37492 {
37493 echo "cat >conf$$subs.awk <<_ACEOF" &&
37494 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
37495 echo "_ACEOF"
37496 } >conf$$subs.sh ||
37497 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
37498 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
37499 ac_delim='%!_!# '
37500 for ac_last_try in false false false false false :; do
37501 . ./conf$$subs.sh ||
37502 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
37503
37504 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
37505 if test $ac_delim_n = $ac_delim_num; then
37506 break
37507 elif $ac_last_try; then
37508 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
37509 else
37510 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
37511 fi
37512 done
37513 rm -f conf$$subs.sh
37514
37515 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37516 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
37517 _ACEOF
37518 sed -n '
37519 h
37520 s/^/S["/; s/!.*/"]=/
37521 p
37522 g
37523 s/^[^!]*!//
37524 :repl
37525 t repl
37526 s/'"$ac_delim"'$//
37527 t delim
37528 :nl
37529 h
37530 s/\(.\{148\}\)..*/\1/
37531 t more1
37532 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
37533 p
37534 n
37535 b repl
37536 :more1
37537 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
37538 p
37539 g
37540 s/.\{148\}//
37541 t nl
37542 :delim
37543 h
37544 s/\(.\{148\}\)..*/\1/
37545 t more2
37546 s/["\\]/\\&/g; s/^/"/; s/$/"/
37547 p
37548 b
37549 :more2
37550 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
37551 p
37552 g
37553 s/.\{148\}//
37554 t delim
37555 ' <conf$$subs.awk | sed '
37556 /^[^""]/{
37557 N
37558 s/\n//
37559 }
37560 ' >>$CONFIG_STATUS || ac_write_fail=1
37561 rm -f conf$$subs.awk
37562 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37563 _ACAWK
37564 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
37565 for (key in S) S_is_set[key] = 1
37566 FS = "\a"
37567
37568 }
37569 {
37570 line = $ 0
37571 nfields = split(line, field, "@")
37572 substed = 0
37573 len = length(field[1])
37574 for (i = 2; i < nfields; i++) {
37575 key = field[i]
37576 keylen = length(key)
37577 if (S_is_set[key]) {
37578 value = S[key]
37579 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
37580 len += length(value) + length(field[++i])
37581 substed = 1
37582 } else
37583 len += 1 + keylen
37584 }
37585
37586 print line
37587 }
37588
37589 _ACAWK
37590 _ACEOF
37591 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37592 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
37593 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
37594 else
37595 cat
37596 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
37597 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
37598 _ACEOF
37599
37600 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
37601 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
37602 # trailing colons and then remove the whole line if VPATH becomes empty
37603 # (actually we leave an empty line to preserve line numbers).
37604 if test "x$srcdir" = x.; then
37605 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
37606 h
37607 s///
37608 s/^/:/
37609 s/[ ]*$/:/
37610 s/:\$(srcdir):/:/g
37611 s/:\${srcdir}:/:/g
37612 s/:@srcdir@:/:/g
37613 s/^:*//
37614 s/:*$//
37615 x
37616 s/\(=[ ]*\).*/\1/
37617 G
37618 s/\n//
37619 s/^[^=]*=[ ]*$//
37620 }'
37621 fi
37622
37623 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37624 fi # test -n "$CONFIG_FILES"
37625
37626 # Set up the scripts for CONFIG_HEADERS section.
37627 # No need to generate them if there are no CONFIG_HEADERS.
37628 # This happens for instance with `./config.status Makefile'.
37629 if test -n "$CONFIG_HEADERS"; then
37630 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
37631 BEGIN {
37632 _ACEOF
37633
37634 # Transform confdefs.h into an awk script `defines.awk', embedded as
37635 # here-document in config.status, that substitutes the proper values into
37636 # config.h.in to produce config.h.
37637
37638 # Create a delimiter string that does not exist in confdefs.h, to ease
37639 # handling of long lines.
37640 ac_delim='%!_!# '
37641 for ac_last_try in false false :; do
37642 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
37643 if test -z "$ac_tt"; then
37644 break
37645 elif $ac_last_try; then
37646 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
37647 else
37648 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
37649 fi
37650 done
37651
37652 # For the awk script, D is an array of macro values keyed by name,
37653 # likewise P contains macro parameters if any. Preserve backslash
37654 # newline sequences.
37655
37656 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
37657 sed -n '
37658 s/.\{148\}/&'"$ac_delim"'/g
37659 t rset
37660 :rset
37661 s/^[ ]*#[ ]*define[ ][ ]*/ /
37662 t def
37663 d
37664 :def
37665 s/\\$//
37666 t bsnl
37667 s/["\\]/\\&/g
37668 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
37669 D["\1"]=" \3"/p
37670 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
37671 d
37672 :bsnl
37673 s/["\\]/\\&/g
37674 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
37675 D["\1"]=" \3\\\\\\n"\\/p
37676 t cont
37677 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
37678 t cont
37679 d
37680 :cont
37681 n
37682 s/.\{148\}/&'"$ac_delim"'/g
37683 t clear
37684 :clear
37685 s/\\$//
37686 t bsnlc
37687 s/["\\]/\\&/g; s/^/"/; s/$/"/p
37688 d
37689 :bsnlc
37690 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
37691 b cont
37692 ' <confdefs.h | sed '
37693 s/'"$ac_delim"'/"\\\
37694 "/g' >>$CONFIG_STATUS || ac_write_fail=1
37695
37696 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37697 for (key in D) D_is_set[key] = 1
37698 FS = "\a"
37699 }
37700 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
37701 line = \$ 0
37702 split(line, arg, " ")
37703 if (arg[1] == "#") {
37704 defundef = arg[2]
37705 mac1 = arg[3]
37706 } else {
37707 defundef = substr(arg[1], 2)
37708 mac1 = arg[2]
37709 }
37710 split(mac1, mac2, "(") #)
37711 macro = mac2[1]
37712 prefix = substr(line, 1, index(line, defundef) - 1)
37713 if (D_is_set[macro]) {
37714 # Preserve the white space surrounding the "#".
37715 print prefix "define", macro P[macro] D[macro]
37716 next
37717 } else {
37718 # Replace #undef with comments. This is necessary, for example,
37719 # in the case of _POSIX_SOURCE, which is predefined and required
37720 # on some systems where configure will not decide to define it.
37721 if (defundef == "undef") {
37722 print "/*", prefix defundef, macro, "*/"
37723 next
37724 }
37725 }
37726 }
37727 { print }
37728 _ACAWK
37729 _ACEOF
37730 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37731 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
37732 fi # test -n "$CONFIG_HEADERS"
37733
37734
37735 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
37736 shift
37737 for ac_tag
37738 do
37739 case $ac_tag in
37740 :[FHLC]) ac_mode=$ac_tag; continue;;
37741 esac
37742 case $ac_mode$ac_tag in
37743 :[FHL]*:*);;
37744 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
37745 :[FH]-) ac_tag=-:-;;
37746 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
37747 esac
37748 ac_save_IFS=$IFS
37749 IFS=:
37750 set x $ac_tag
37751 IFS=$ac_save_IFS
37752 shift
37753 ac_file=$1
37754 shift
37755
37756 case $ac_mode in
37757 :L) ac_source=$1;;
37758 :[FH])
37759 ac_file_inputs=
37760 for ac_f
37761 do
37762 case $ac_f in
37763 -) ac_f="$ac_tmp/stdin";;
37764 *) # Look for the file first in the build tree, then in the source tree
37765 # (if the path is not absolute). The absolute path cannot be DOS-style,
37766 # because $ac_f cannot contain `:'.
37767 test -f "$ac_f" ||
37768 case $ac_f in
37769 [\\/$]*) false;;
37770 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
37771 esac ||
37772 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
37773 esac
37774 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
37775 as_fn_append ac_file_inputs " '$ac_f'"
37776 done
37777
37778 # Let's still pretend it is `configure' which instantiates (i.e., don't
37779 # use $as_me), people would be surprised to read:
37780 # /* config.h. Generated by config.status. */
37781 configure_input='Generated from '`
37782 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
37783 `' by configure.'
37784 if test x"$ac_file" != x-; then
37785 configure_input="$ac_file. $configure_input"
37786 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
37787 $as_echo "$as_me: creating $ac_file" >&6;}
37788 fi
37789 # Neutralize special characters interpreted by sed in replacement strings.
37790 case $configure_input in #(
37791 *\&* | *\|* | *\\* )
37792 ac_sed_conf_input=`$as_echo "$configure_input" |
37793 sed 's/[\\\\&|]/\\\\&/g'`;; #(
37794 *) ac_sed_conf_input=$configure_input;;
37795 esac
37796
37797 case $ac_tag in
37798 *:-:* | *:-) cat >"$ac_tmp/stdin" \
37799 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
37800 esac
37801 ;;
37802 esac
37803
37804 ac_dir=`$as_dirname -- "$ac_file" ||
37805 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
37806 X"$ac_file" : 'X\(//\)[^/]' \| \
37807 X"$ac_file" : 'X\(//\)$' \| \
37808 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
37809 $as_echo X"$ac_file" |
37810 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
37811 s//\1/
37812 q
37813 }
37814 /^X\(\/\/\)[^/].*/{
37815 s//\1/
37816 q
37817 }
37818 /^X\(\/\/\)$/{
37819 s//\1/
37820 q
37821 }
37822 /^X\(\/\).*/{
37823 s//\1/
37824 q
37825 }
37826 s/.*/./; q'`
37827 as_dir="$ac_dir"; as_fn_mkdir_p
37828 ac_builddir=.
37829
37830 case "$ac_dir" in
37831 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
37832 *)
37833 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
37834 # A ".." for each directory in $ac_dir_suffix.
37835 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
37836 case $ac_top_builddir_sub in
37837 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
37838 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
37839 esac ;;
37840 esac
37841 ac_abs_top_builddir=$ac_pwd
37842 ac_abs_builddir=$ac_pwd$ac_dir_suffix
37843 # for backward compatibility:
37844 ac_top_builddir=$ac_top_build_prefix
37845
37846 case $srcdir in
37847 .) # We are building in place.
37848 ac_srcdir=.
37849 ac_top_srcdir=$ac_top_builddir_sub
37850 ac_abs_top_srcdir=$ac_pwd ;;
37851 [\\/]* | ?:[\\/]* ) # Absolute name.
37852 ac_srcdir=$srcdir$ac_dir_suffix;
37853 ac_top_srcdir=$srcdir
37854 ac_abs_top_srcdir=$srcdir ;;
37855 *) # Relative name.
37856 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
37857 ac_top_srcdir=$ac_top_build_prefix$srcdir
37858 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
37859 esac
37860 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
37861
37862
37863 case $ac_mode in
37864 :F)
37865 #
37866 # CONFIG_FILE
37867 #
37868
37869 case $INSTALL in
37870 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
37871 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
37872 esac
37873 ac_MKDIR_P=$MKDIR_P
37874 case $MKDIR_P in
37875 [\\/$]* | ?:[\\/]* ) ;;
37876 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
37877 esac
37878 _ACEOF
37879
37880 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37881 # If the template does not know about datarootdir, expand it.
37882 # FIXME: This hack should be removed a few years after 2.60.
37883 ac_datarootdir_hack=; ac_datarootdir_seen=
37884 ac_sed_dataroot='
37885 /datarootdir/ {
37886 p
37887 q
37888 }
37889 /@datadir@/p
37890 /@docdir@/p
37891 /@infodir@/p
37892 /@localedir@/p
37893 /@mandir@/p'
37894 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
37895 *datarootdir*) ac_datarootdir_seen=yes;;
37896 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
37897 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
37898 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
37899 _ACEOF
37900 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37901 ac_datarootdir_hack='
37902 s&@datadir@&$datadir&g
37903 s&@docdir@&$docdir&g
37904 s&@infodir@&$infodir&g
37905 s&@localedir@&$localedir&g
37906 s&@mandir@&$mandir&g
37907 s&\\\${datarootdir}&$datarootdir&g' ;;
37908 esac
37909 _ACEOF
37910
37911 # Neutralize VPATH when `$srcdir' = `.'.
37912 # Shell code in configure.ac might set extrasub.
37913 # FIXME: do we really want to maintain this feature?
37914 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37915 ac_sed_extra="$ac_vpsub
37916 $extrasub
37917 _ACEOF
37918 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37919 :t
37920 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
37921 s|@configure_input@|$ac_sed_conf_input|;t t
37922 s&@top_builddir@&$ac_top_builddir_sub&;t t
37923 s&@top_build_prefix@&$ac_top_build_prefix&;t t
37924 s&@srcdir@&$ac_srcdir&;t t
37925 s&@abs_srcdir@&$ac_abs_srcdir&;t t
37926 s&@top_srcdir@&$ac_top_srcdir&;t t
37927 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
37928 s&@builddir@&$ac_builddir&;t t
37929 s&@abs_builddir@&$ac_abs_builddir&;t t
37930 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
37931 s&@INSTALL@&$ac_INSTALL&;t t
37932 s&@MKDIR_P@&$ac_MKDIR_P&;t t
37933 $ac_datarootdir_hack
37934 "
37935 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
37936 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37937
37938 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
37939 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
37940 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
37941 "$ac_tmp/out"`; test -z "$ac_out"; } &&
37942 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
37943 which seems to be undefined. Please make sure it is defined" >&5
37944 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
37945 which seems to be undefined. Please make sure it is defined" >&2;}
37946
37947 rm -f "$ac_tmp/stdin"
37948 case $ac_file in
37949 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
37950 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
37951 esac \
37952 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37953 ;;
37954 :H)
37955 #
37956 # CONFIG_HEADER
37957 #
37958 if test x"$ac_file" != x-; then
37959 {
37960 $as_echo "/* $configure_input */" \
37961 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
37962 } >"$ac_tmp/config.h" \
37963 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37964 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
37965 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
37966 $as_echo "$as_me: $ac_file is unchanged" >&6;}
37967 else
37968 rm -f "$ac_file"
37969 mv "$ac_tmp/config.h" "$ac_file" \
37970 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37971 fi
37972 else
37973 $as_echo "/* $configure_input */" \
37974 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
37975 || as_fn_error $? "could not create -" "$LINENO" 5
37976 fi
37977 # Compute "$ac_file"'s index in $config_headers.
37978 _am_arg="$ac_file"
37979 _am_stamp_count=1
37980 for _am_header in $config_headers :; do
37981 case $_am_header in
37982 $_am_arg | $_am_arg:* )
37983 break ;;
37984 * )
37985 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
37986 esac
37987 done
37988 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
37989 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
37990 X"$_am_arg" : 'X\(//\)[^/]' \| \
37991 X"$_am_arg" : 'X\(//\)$' \| \
37992 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
37993 $as_echo X"$_am_arg" |
37994 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
37995 s//\1/
37996 q
37997 }
37998 /^X\(\/\/\)[^/].*/{
37999 s//\1/
38000 q
38001 }
38002 /^X\(\/\/\)$/{
38003 s//\1/
38004 q
38005 }
38006 /^X\(\/\).*/{
38007 s//\1/
38008 q
38009 }
38010 s/.*/./; q'`/stamp-h$_am_stamp_count
38011 ;;
38012
38013 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
38014 $as_echo "$as_me: executing $ac_file commands" >&6;}
38015 ;;
38016 esac
38017
38018
38019 case $ac_file$ac_mode in
38020 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
38021 # Older Autoconf quotes --file arguments for eval, but not when files
38022 # are listed without --file. Let's play safe and only enable the eval
38023 # if we detect the quoting.
38024 case $CONFIG_FILES in
38025 *\'*) eval set x "$CONFIG_FILES" ;;
38026 *) set x $CONFIG_FILES ;;
38027 esac
38028 shift
38029 for mf
38030 do
38031 # Strip MF so we end up with the name of the file.
38032 mf=`echo "$mf" | sed -e 's/:.*$//'`
38033 # Check whether this is an Automake generated Makefile or not.
38034 # We used to match only the files named 'Makefile.in', but
38035 # some people rename them; so instead we look at the file content.
38036 # Grep'ing the first line is not enough: some people post-process
38037 # each Makefile.in and add a new line on top of each file to say so.
38038 # Grep'ing the whole file is not good either: AIX grep has a line
38039 # limit of 2048, but all sed's we know have understand at least 4000.
38040 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
38041 dirpart=`$as_dirname -- "$mf" ||
38042 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
38043 X"$mf" : 'X\(//\)[^/]' \| \
38044 X"$mf" : 'X\(//\)$' \| \
38045 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
38046 $as_echo X"$mf" |
38047 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
38048 s//\1/
38049 q
38050 }
38051 /^X\(\/\/\)[^/].*/{
38052 s//\1/
38053 q
38054 }
38055 /^X\(\/\/\)$/{
38056 s//\1/
38057 q
38058 }
38059 /^X\(\/\).*/{
38060 s//\1/
38061 q
38062 }
38063 s/.*/./; q'`
38064 else
38065 continue
38066 fi
38067 # Extract the definition of DEPDIR, am__include, and am__quote
38068 # from the Makefile without running 'make'.
38069 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
38070 test -z "$DEPDIR" && continue
38071 am__include=`sed -n 's/^am__include = //p' < "$mf"`
38072 test -z "$am__include" && continue
38073 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
38074 # Find all dependency output files, they are included files with
38075 # $(DEPDIR) in their names. We invoke sed twice because it is the
38076 # simplest approach to changing $(DEPDIR) to its actual value in the
38077 # expansion.
38078 for file in `sed -n "
38079 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
38080 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
38081 # Make sure the directory exists.
38082 test -f "$dirpart/$file" && continue
38083 fdir=`$as_dirname -- "$file" ||
38084 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
38085 X"$file" : 'X\(//\)[^/]' \| \
38086 X"$file" : 'X\(//\)$' \| \
38087 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
38088 $as_echo X"$file" |
38089 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
38090 s//\1/
38091 q
38092 }
38093 /^X\(\/\/\)[^/].*/{
38094 s//\1/
38095 q
38096 }
38097 /^X\(\/\/\)$/{
38098 s//\1/
38099 q
38100 }
38101 /^X\(\/\).*/{
38102 s//\1/
38103 q
38104 }
38105 s/.*/./; q'`
38106 as_dir=$dirpart/$fdir; as_fn_mkdir_p
38107 # echo "creating $dirpart/$file"
38108 echo '# dummy' > "$dirpart/$file"
38109 done
38110 done
38111 }
38112 ;;
38113 "default":C)
38114 case x$CONFIG_HEADERS in
38115 xconfig.h:config.in)
38116 echo > stamp-h ;;
38117 esac
38118 ;;
38119
38120 esac
38121 done # for ac_tag
38122
38123
38124 as_fn_exit 0
38125 _ACEOF
38126 ac_clean_files=$ac_clean_files_save
38127
38128 test $ac_write_fail = 0 ||
38129 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
38130
38131
38132 # configure is writing to config.log, and then calls config.status.
38133 # config.status does its own redirection, appending to config.log.
38134 # Unfortunately, on DOS this fails, as config.log is still kept open
38135 # by configure, so config.status won't be able to write to it; its
38136 # output is simply discarded. So we exec the FD to /dev/null,
38137 # effectively closing config.log, so it can be properly (re)opened and
38138 # appended to by config.status. When coming back to configure, we
38139 # need to make the FD available again.
38140 if test "$no_create" != yes; then
38141 ac_cs_success=:
38142 ac_config_status_args=
38143 test "$silent" = yes &&
38144 ac_config_status_args="$ac_config_status_args --quiet"
38145 exec 5>/dev/null
38146 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
38147 exec 5>>config.log
38148 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
38149 # would make configure fail if this is the last instruction.
38150 $ac_cs_success || as_fn_exit 1
38151 fi
38152 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
38153 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
38154 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
38155 fi
38156
38157
38158 exit 0