Update README file's installation instructions
[binutils-gdb.git] / gnulib / configure
blobcc7e8287d5a0a250e2b4f55c1c2fa270399793bd
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for libgnu UNUSED-VERSION.
6 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
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 ## -------------------- ##
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 *) :
30 esac
34 as_nl='
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"
65 export as_echo_n_body
66 as_echo_n='sh -c $as_echo_n_body as_echo'
68 export as_echo_body
69 as_echo='sh -c $as_echo_body as_echo'
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=';'
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"
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
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
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
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
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='+ '
126 # NLS nuisances.
127 LC_ALL=C
128 export LC_ALL
129 LANGUAGE=C
130 export LANGUAGE
132 # CDPATH.
133 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
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
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 *) :
174 esac
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; }
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 :
190 else
191 exitcode=1; echo positional parameters were not saved.
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
205 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
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
212 IFS=$as_save_IFS
213 test -z "$as_dir" && as_dir=.
214 as_found=:
215 case $as_dir in #(
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
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
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
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."
272 exit 1
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
282 ## --------------------- ##
283 ## M4sh Shell Functions. ##
284 ## --------------------- ##
285 # as_fn_unset VAR
286 # ---------------
287 # Portably unset VAR.
288 as_fn_unset ()
290 { eval $1=; unset $1;}
292 as_unset=as_fn_unset
294 # as_fn_set_status STATUS
295 # -----------------------
296 # Set $? to STATUS, without forking.
297 as_fn_set_status ()
299 return $1
300 } # as_fn_set_status
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 ()
307 set +e
308 as_fn_set_status $1
309 exit $1
310 } # as_fn_exit
312 # as_fn_mkdir_p
313 # -------------
314 # Create "$as_dir" as a directory, including parents if necessary.
315 as_fn_mkdir_p ()
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/
339 /^X\(\/\/\)[^/].*/{
340 s//\1/
343 /^X\(\/\/\)$/{
344 s//\1/
347 /^X\(\/\).*/{
348 s//\1/
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"
358 } # as_fn_mkdir_p
360 # as_fn_executable_p FILE
361 # -----------------------
362 # Test if FILE is an executable regular file.
363 as_fn_executable_p ()
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 ()
376 eval $1+=\$2
378 else
379 as_fn_append ()
381 eval $1=\$$1\$2
383 fi # as_fn_append
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 ()
393 as_val=$(( $* ))
395 else
396 as_fn_arith ()
398 as_val=`expr "$@" || test $? -eq 1`
400 fi # as_fn_arith
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 ()
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
415 $as_echo "$as_me: error: $2" >&2
416 as_fn_exit $as_status
417 } # as_fn_error
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
426 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
427 as_basename=basename
428 else
429 as_basename=false
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
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/
447 /^X\/\(\/\/\)$/{
448 s//\1/
451 /^X\/\(\/\).*/{
452 s//\1/
455 s/.*/./; q'`
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
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 '
472 /[$]LINENO/=
473 ' <$as_myself |
474 sed '
475 s/[$]LINENO.*/&-/
476 t lineno
478 :lineno
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; }
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
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;;
510 ECHO_N='-n';;
511 esac
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
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'
534 else
535 as_ln_s='cp -pR'
537 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538 rmdir conf$$.dir 2>/dev/null
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
547 as_test_x='test -x'
548 as_executable_p=as_fn_executable_p
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'"
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'"
557 test -n "$DJDIR" || exec 7<&0 </dev/null
558 exec 6>&1
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`
566 # Initializations.
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=
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=''
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"
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
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
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
2163 OBJEXT
2164 EXEEXT
2165 ac_ct_CC
2166 CPPFLAGS
2167 LDFLAGS
2168 CFLAGS
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
2223 ac_precious_vars='build_alias
2224 host_alias
2225 target_alias
2227 CFLAGS
2228 LDFLAGS
2229 LIBS
2230 CPPFLAGS
2231 CPP'
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
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'
2282 ac_prev=
2283 ac_dashdash=
2284 for ac_option
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
2293 case $ac_option in
2294 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
2295 *=) ac_optarg= ;;
2296 *) ac_optarg=yes ;;
2297 esac
2299 # Accept the important Cygnus configure options, so we can diagnose typos.
2301 case $ac_dashdash$ac_option in
2303 ac_dashdash=yes ;;
2305 -bindir | --bindir | --bindi | --bind | --bin | --bi)
2306 ac_prev=bindir ;;
2307 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
2308 bindir=$ac_optarg ;;
2310 -build | --build | --buil | --bui | --bu)
2311 ac_prev=build_alias ;;
2312 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
2313 build_alias=$ac_optarg ;;
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 ;;
2322 --config-cache | -C)
2323 cache_file=config.cache ;;
2325 -datadir | --datadir | --datadi | --datad)
2326 ac_prev=datadir ;;
2327 -datadir=* | --datadir=* | --datadi=* | --datad=*)
2328 datadir=$ac_optarg ;;
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 ;;
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
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 ;;
2353 -docdir | --docdir | --docdi | --doc | --do)
2354 ac_prev=docdir ;;
2355 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
2356 docdir=$ac_optarg ;;
2358 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
2359 ac_prev=dvidir ;;
2360 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
2361 dvidir=$ac_optarg ;;
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
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 ;;
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 ;;
2388 -gas | --gas | --ga | --g)
2389 # Obsolete; use --with-gas.
2390 with_gas=yes ;;
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 ;;
2399 -host | --host | --hos | --ho)
2400 ac_prev=host_alias ;;
2401 -host=* | --host=* | --hos=* | --ho=*)
2402 host_alias=$ac_optarg ;;
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 ;;
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 ;;
2417 -infodir | --infodir | --infodi | --infod | --info | --inf)
2418 ac_prev=infodir ;;
2419 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
2420 infodir=$ac_optarg ;;
2422 -libdir | --libdir | --libdi | --libd)
2423 ac_prev=libdir ;;
2424 -libdir=* | --libdir=* | --libdi=* | --libd=*)
2425 libdir=$ac_optarg ;;
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 ;;
2434 -localedir | --localedir | --localedi | --localed | --locale)
2435 ac_prev=localedir ;;
2436 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
2437 localedir=$ac_optarg ;;
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 ;;
2446 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
2447 ac_prev=mandir ;;
2448 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
2449 mandir=$ac_optarg ;;
2451 -nfp | --nfp | --nf)
2452 # Obsolete; use --without-fp.
2453 with_fp=no ;;
2455 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
2456 | --no-cr | --no-c | -n)
2457 no_create=yes ;;
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 ;;
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 ;;
2472 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
2473 ac_prev=prefix ;;
2474 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
2475 prefix=$ac_optarg ;;
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 ;;
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 ;;
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 ;;
2508 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
2509 ac_prev=pdfdir ;;
2510 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
2511 pdfdir=$ac_optarg ;;
2513 -psdir | --psdir | --psdi | --psd | --ps)
2514 ac_prev=psdir ;;
2515 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
2516 psdir=$ac_optarg ;;
2518 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2519 | -silent | --silent | --silen | --sile | --sil)
2520 silent=yes ;;
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 ;;
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 ;;
2539 -site | --site | --sit)
2540 ac_prev=site ;;
2541 -site=* | --site=* | --sit=*)
2542 site=$ac_optarg ;;
2544 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2545 ac_prev=srcdir ;;
2546 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2547 srcdir=$ac_optarg ;;
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 ;;
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 ;;
2561 -v | -verbose | --verbose | --verbos | --verbo | --verb)
2562 verbose=yes ;;
2564 -version | --version | --versio | --versi | --vers | -V)
2565 ac_init_version=: ;;
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
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 ;;
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
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 ;;
2599 --x)
2600 # Obsolete; use --with-x.
2601 with_x=yes ;;
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 ;;
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 ;;
2617 -*) as_fn_error $? "unrecognized option: \`$ac_option'
2618 Try \`$0 --help' for more information"
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 ;;
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}"
2639 esac
2640 done
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"
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
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
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
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
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
2692 ac_tool_prefix=
2693 test -n "$host_alias" && ac_tool_prefix=$host_alias-
2695 test "$silent" = yes && exec 6>/dev/null
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"
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/
2720 /^X\(\/\/\)[^/].*/{
2721 s//\1/
2724 /^X\(\/\/\)$/{
2725 s//\1/
2728 /^X\(\/\).*/{
2729 s//\1/
2732 s/.*/./; q'`
2733 srcdir=$ac_confdir
2734 if test ! -r "$srcdir/$ac_unique_file"; then
2735 srcdir=..
2737 else
2738 ac_srcdir_defaulted=no
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"
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=.
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
2766 # Report the --help message.
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.
2774 Usage: $0 [OPTION]... [VAR=VALUE]...
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.
2779 Defaults for the options are specified in brackets.
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 \`..']
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]
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'.
2803 For better control, use the options below.
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
2827 cat <<\_ACEOF
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
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
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
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")
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
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.
2882 Report bugs to the package provider.
2883 _ACEOF
2884 ac_status=$?
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=.
2895 case "$ac_dir" in
2896 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
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
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
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
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
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
2955 ## ------------------------ ##
2956 ## Autoconf initialization. ##
2957 ## ------------------------ ##
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 ()
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
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
2990 ac_retval=1
2992 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2993 as_fn_set_status $ac_retval
2995 } # ac_fn_c_try_compile
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 ()
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. */
3012 #include <$2>
3013 _ACEOF
3014 if ac_fn_c_try_compile "$LINENO"; then :
3015 eval "$3=yes"
3016 else
3017 eval "$3=no"
3019 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
3026 } # ac_fn_c_check_header_compile
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 ()
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
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
3058 ac_retval=1
3060 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3061 as_fn_set_status $ac_retval
3063 } # ac_fn_c_try_cpp
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 ()
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
3099 ac_retval=$ac_status
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
3105 } # ac_fn_c_try_run
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 ()
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
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
3141 ac_retval=1
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
3151 } # ac_fn_c_try_link
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 ()
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
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. */
3175 #ifdef __STDC__
3176 # include <limits.h>
3177 #else
3178 # include <assert.h>
3179 #endif
3181 #undef $2
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
3198 main ()
3200 return $2 ();
3202 return 0;
3204 _ACEOF
3205 if ac_fn_c_try_link "$LINENO"; then :
3206 eval "$3=yes"
3207 else
3208 eval "$3=no"
3210 rm -f core conftest.err conftest.$ac_objext \
3211 conftest$ac_exeext conftest.$ac_ext
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
3218 } # ac_fn_c_check_func
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 ()
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
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. */
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
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; }
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
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; }
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;}
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;}
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"
3299 eval ac_res=\$$3
3300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3301 $as_echo "$ac_res" >&6; }
3303 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3305 } # ac_fn_c_check_header_mongrel
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 ()
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. */
3324 main ()
3326 if (sizeof ($2))
3327 return 0;
3329 return 0;
3331 _ACEOF
3332 if ac_fn_c_try_compile "$LINENO"; then :
3333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3334 /* end confdefs.h. */
3337 main ()
3339 if (sizeof (($2)))
3340 return 0;
3342 return 0;
3344 _ACEOF
3345 if ac_fn_c_try_compile "$LINENO"; then :
3347 else
3348 eval "$3=yes"
3350 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3352 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
3359 } # ac_fn_c_check_type
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 ()
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. */
3377 main ()
3379 static $2 ac_aggr;
3380 if (ac_aggr.$3)
3381 return 0;
3383 return 0;
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. */
3393 main ()
3395 static $2 ac_aggr;
3396 if (sizeof ac_aggr.$3)
3397 return 0;
3399 return 0;
3401 _ACEOF
3402 if ac_fn_c_try_compile "$LINENO"; then :
3403 eval "$4=yes"
3404 else
3405 eval "$4=no"
3407 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3409 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
3416 } # ac_fn_c_check_member
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 ()
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"
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. */
3440 main ()
3442 #ifndef $as_decl_name
3443 #ifdef __cplusplus
3444 (void) $as_decl_use;
3445 #else
3446 (void) $as_decl_name;
3447 #endif
3448 #endif
3451 return 0;
3453 _ACEOF
3454 if ac_fn_c_try_compile "$LINENO"; then :
3455 eval "$3=yes"
3456 else
3457 eval "$3=no"
3459 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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"
3467 } # ac_fn_c_check_decl
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 ()
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. */
3483 main ()
3485 static int test_array [1 - 2 * !(($2) >= 0)];
3486 test_array [0] = 0;
3487 return test_array [0];
3490 return 0;
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. */
3500 main ()
3502 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3503 test_array [0] = 0;
3504 return test_array [0];
3507 return 0;
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
3518 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
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. */
3527 main ()
3529 static int test_array [1 - 2 * !(($2) < 0)];
3530 test_array [0] = 0;
3531 return test_array [0];
3534 return 0;
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. */
3544 main ()
3546 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
3547 test_array [0] = 0;
3548 return test_array [0];
3551 return 0;
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
3562 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
3564 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3565 done
3566 else
3567 ac_lo= ac_hi=
3569 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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. */
3579 main ()
3581 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3582 test_array [0] = 0;
3583 return test_array [0];
3586 return 0;
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
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. */
3604 static long int longval () { return $2; }
3605 static unsigned long int ulongval () { return $2; }
3606 #include <stdio.h>
3607 #include <stdlib.h>
3609 main ()
3612 FILE *f = fopen ("conftest.val", "w");
3613 if (! f)
3614 return 1;
3615 if (($2) < 0)
3617 long int i = longval ();
3618 if (i != ($2))
3619 return 1;
3620 fprintf (f, "%ld", i);
3622 else
3624 unsigned long int i = ulongval ();
3625 if (i != ($2))
3626 return 1;
3627 fprintf (f, "%lu", i);
3629 /* Do not output a trailing newline, as this causes \r\n confusion
3630 on some platforms. */
3631 return ferror (f) || fclose (f) != 0;
3634 return 0;
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
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
3647 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3648 as_fn_set_status $ac_retval
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.
3655 It was created by libgnu $as_me UNUSED-VERSION, which was
3656 generated by GNU Autoconf 2.69. Invocation command line was
3658 $ $0 $@
3660 _ACEOF
3661 exec 5>>config.log
3663 cat <<_ASUNAME
3664 ## --------- ##
3665 ## Platform. ##
3666 ## --------- ##
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`
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`
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`
3685 _ASUNAME
3687 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3688 for as_dir in $PATH
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
3696 } >&5
3698 cat >&5 <<_ACEOF
3701 ## ----------- ##
3702 ## Core tests. ##
3703 ## ----------- ##
3705 _ACEOF
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
3719 for ac_arg
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'" ;;
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
3745 -* ) ac_must_keep_next=true ;;
3746 esac
3748 as_fn_append ac_configure_args " '$ac_arg'"
3750 esac
3751 done
3752 done
3753 { ac_configure_args0=; unset ac_configure_args0;}
3754 { ac_configure_args1=; unset ac_configure_args1;}
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.
3764 echo
3766 $as_echo "## ---------------- ##
3767 ## Cache variables. ##
3768 ## ---------------- ##"
3769 echo
3770 # The following way of writing the cache mishandles newlines in values,
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 ;; #(
3795 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3797 esac |
3798 sort
3800 echo
3802 $as_echo "## ----------------- ##
3803 ## Output variables. ##
3804 ## ----------------- ##"
3805 echo
3806 for ac_var in $ac_subst_vars
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
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
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
3832 if test -s confdefs.h; then
3833 $as_echo "## ----------- ##
3834 ## confdefs.h. ##
3835 ## ----------- ##"
3836 echo
3837 cat confdefs.h
3838 echo
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
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
3853 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3854 rm -f -r conftest* confdefs.h
3856 $as_echo "/* confdefs.h */" > confdefs.h
3858 # Predefined preprocessor variables.
3860 cat >>confdefs.h <<_ACEOF
3861 #define PACKAGE_NAME "$PACKAGE_NAME"
3862 _ACEOF
3864 cat >>confdefs.h <<_ACEOF
3865 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3866 _ACEOF
3868 cat >>confdefs.h <<_ACEOF
3869 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3870 _ACEOF
3872 cat >>confdefs.h <<_ACEOF
3873 #define PACKAGE_STRING "$PACKAGE_STRING"
3874 _ACEOF
3876 cat >>confdefs.h <<_ACEOF
3877 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3878 _ACEOF
3880 cat >>confdefs.h <<_ACEOF
3881 #define PACKAGE_URL "$PACKAGE_URL"
3882 _ACEOF
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
3903 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
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; }
3916 done
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
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
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 ,);;
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
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
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
4065 ## -------------------- ##
4066 ## Main body of script. ##
4067 ## -------------------- ##
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
4080 ac_config_headers="$ac_config_headers config.h:config.in"
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
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=
4104 MAINT=$MAINTAINER_MODE_TRUE
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
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
4135 done
4136 done
4137 IFS=$as_save_IFS
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; }
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
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
4175 done
4176 done
4177 IFS=$as_save_IFS
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; }
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
4201 else
4202 CC="$ac_cv_prog_CC"
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
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
4228 done
4229 done
4230 IFS=$as_save_IFS
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; }
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
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
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
4273 done
4274 done
4275 IFS=$as_save_IFS
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+' '}$@"
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; }
4302 if test -z "$CC"; then
4303 if test -n "$ac_tool_prefix"; then
4304 for ac_prog in cl.exe
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
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
4327 done
4328 done
4329 IFS=$as_save_IFS
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; }
4343 test -n "$CC" && break
4344 done
4346 if test -z "$CC"; then
4347 ac_ct_CC=$CC
4348 for ac_prog in cl.exe
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
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
4371 done
4372 done
4373 IFS=$as_save_IFS
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; }
4387 test -n "$ac_ct_CC" && break
4388 done
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
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
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
4427 done
4428 done
4429 IFS=$as_save_IFS
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; }
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
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
4467 done
4468 done
4469 IFS=$as_save_IFS
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; }
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
4493 else
4494 CC="$ac_cv_prog_CC"
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; }
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
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
4530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4531 /* end confdefs.h. */
4534 main ()
4538 return 0;
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[^ ]*//'`
4550 # The possible output files:
4551 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4553 ac_rmfiles=
4554 for ac_file in $ac_files
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
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 ''
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 )
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" : '[^.]*\(\..*\)'`
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;;
4601 break;;
4602 esac
4603 done
4604 test "$ac_cv_exeext" = no && ac_cv_exeext=
4606 else
4607 ac_file=''
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
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; }
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
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; }
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; }
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>
4674 main ()
4676 FILE *f = fopen ("conftest.out", "w");
4677 return ferror (f) || fclose (f) != 0;
4680 return 0;
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; }
4724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4725 $as_echo "$cross_compiling" >&6; }
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. */
4738 main ()
4742 return 0;
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
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; }
4774 rm -f conftest.$ac_cv_objext conftest.$ac_ext
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. */
4789 main ()
4791 #ifndef __GNUC__
4792 choke me
4793 #endif
4796 return 0;
4798 _ACEOF
4799 if ac_fn_c_try_compile "$LINENO"; then :
4800 ac_compiler_gnu=yes
4801 else
4802 ac_compiler_gnu=no
4804 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4805 ac_cv_c_compiler_gnu=$ac_compiler_gnu
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=
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. */
4830 main ()
4834 return 0;
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. */
4845 main ()
4849 return 0;
4851 _ACEOF
4852 if ac_fn_c_try_compile "$LINENO"; then :
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. */
4861 main ()
4865 return 0;
4867 _ACEOF
4868 if ac_fn_c_try_compile "$LINENO"; then :
4869 ac_cv_prog_cc_g=yes
4871 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4873 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4875 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4876 ac_c_werror_flag=$ac_save_c_werror_flag
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"
4888 else
4889 if test "$GCC" = yes; then
4890 CFLAGS="-O2"
4891 else
4892 CFLAGS=
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>
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)
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);
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;
4940 struct incomplete_array
4942 int datasize;
4943 double data[];
4946 struct named_init {
4947 int number;
4948 const wchar_t *name;
4949 double average;
4952 typedef const char *ccp;
4954 static inline int
4955 test_restrict (ccp restrict text)
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;
4965 // Check varargs and va_copy.
4966 static bool
4967 test_varargs (const char *format, ...)
4969 va_list args;
4970 va_start (args, format);
4971 va_list args_copy;
4972 va_copy (args_copy, args);
4974 const char *str = "";
4975 int number = 0;
4976 float fnumber = 0;
4978 while (*format)
4980 switch (*format++)
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;
4995 va_end (args_copy);
4996 va_end (args);
4998 return *str && number && fnumber;
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;
5006 // Check _Alignof.
5007 enum
5009 int_alignment = _Alignof (int),
5010 int_array_alignment = _Alignof (int[100]),
5011 char_alignment = _Alignof (char)
5013 _Static_assert (0 < -_Alignof (int), "_Alignof is signed");
5015 // Check _Noreturn.
5016 int _Noreturn does_not_return (void) { for (;;) continue; }
5018 // Check _Static_assert.
5019 struct test_static_assert
5021 int x;
5022 _Static_assert (sizeof (int) <= sizeof (long int),
5023 "_Static_assert does not work in struct");
5024 long int y;
5027 // Check UTF-8 literals.
5028 #define u8 syntax error!
5029 char const utf8_literal[] = u8"happens to be ASCII" "another string";
5031 // Check duplicate typedefs.
5032 typedef long *long_ptr;
5033 typedef long int *long_ptr;
5034 typedef long_ptr long_ptr;
5036 // Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
5037 struct anonymous
5039 union {
5040 struct { int i; int j; };
5041 struct { int k; long int l; } w;
5043 int m;
5044 } v1;
5047 main ()
5050 // Check bool.
5051 _Bool success = false;
5053 // Check restrict.
5054 if (test_restrict ("String literal") == 0)
5055 success = true;
5056 char *restrict newvar = "Another string";
5058 // Check varargs.
5059 success &= test_varargs ("s, d' f .", "string", 65, 34.234);
5060 test_varargs_macros ();
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;
5069 // Check named initializers.
5070 struct named_init ni = {
5071 .number = 34,
5072 .name = L"Test wide string",
5073 .average = 543.34343,
5076 ni.number = 58;
5078 int dynamic_array[ni.number];
5079 dynamic_array[ni.number - 1] = 543;
5081 // work around unused variable warnings
5082 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
5083 || dynamic_array[ni.number - 1] != 543);
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");
5092 return 0;
5094 _ACEOF
5095 for ac_arg in '' -std=gnu11
5097 CC="$ac_save_CC $ac_arg"
5098 if ac_fn_c_try_compile "$LINENO"; then :
5099 ac_cv_prog_cc_c11=$ac_arg
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
5108 # AC_CACHE_VAL
5109 ac_prog_cc_stdc_options=
5110 case "x$ac_cv_prog_cc_c11" in
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; } ;;
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>
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)
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);
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;
5172 struct incomplete_array
5174 int datasize;
5175 double data[];
5178 struct named_init {
5179 int number;
5180 const wchar_t *name;
5181 double average;
5184 typedef const char *ccp;
5186 static inline int
5187 test_restrict (ccp restrict text)
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;
5197 // Check varargs and va_copy.
5198 static bool
5199 test_varargs (const char *format, ...)
5201 va_list args;
5202 va_start (args, format);
5203 va_list args_copy;
5204 va_copy (args_copy, args);
5206 const char *str = "";
5207 int number = 0;
5208 float fnumber = 0;
5210 while (*format)
5212 switch (*format++)
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;
5227 va_end (args_copy);
5228 va_end (args);
5230 return *str && number && fnumber;
5233 main ()
5236 // Check bool.
5237 _Bool success = false;
5239 // Check restrict.
5240 if (test_restrict ("String literal") == 0)
5241 success = true;
5242 char *restrict newvar = "Another string";
5244 // Check varargs.
5245 success &= test_varargs ("s, d' f .", "string", 65, 34.234);
5246 test_varargs_macros ();
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;
5255 // Check named initializers.
5256 struct named_init ni = {
5257 .number = 34,
5258 .name = L"Test wide string",
5259 .average = 543.34343,
5262 ni.number = 58;
5264 int dynamic_array[ni.number];
5265 dynamic_array[ni.number - 1] = 543;
5267 // work around unused variable warnings
5268 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
5269 || dynamic_array[ni.number - 1] != 543);
5272 return 0;
5274 _ACEOF
5275 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc1x -qlanglvl=extc99
5277 CC="$ac_save_CC $ac_arg"
5278 if ac_fn_c_try_compile "$LINENO"; then :
5279 ac_cv_prog_cc_c99=$ac_arg
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
5288 # AC_CACHE_VAL
5289 ac_prog_cc_stdc_options=
5290 case "x$ac_cv_prog_cc_c99" in
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; } ;;
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;
5326 return p[i];
5328 static char *f (char * (*g) (char **, int), char **p, ...)
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;
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];
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];
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;
5359 main ()
5361 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5363 return 0;
5365 _ACEOF
5366 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5367 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5369 CC="$ac_save_CC $ac_arg"
5370 if ac_fn_c_try_compile "$LINENO"; then :
5371 ac_cv_prog_cc_c89=$ac_arg
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
5380 # AC_CACHE_VAL
5381 ac_prog_cc_stdc_options=
5382 case "x$ac_cv_prog_cc_c89" in
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; } ;;
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
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
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. */
5422 #ifdef __clang__
5423 barfbarf
5424 #endif
5427 main ()
5431 return 0;
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
5440 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_clang" >&5
5444 $as_echo "$gl_cv_compiler_clang" >&6; }
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. */
5459 main ()
5463 return 0;
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
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
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"
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=
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"
5507 ac_preproc_ok=false
5508 for ac_c_preproc_warn_flag in '' yes
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 :
5527 else
5528 # Broken: fails on valid input.
5529 continue
5531 rm -f conftest.err conftest.i conftest.$ac_ext
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
5547 rm -f conftest.err conftest.i conftest.$ac_ext
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
5556 done
5557 ac_cv_prog_CPP=$CPP
5560 CPP=$ac_cv_prog_CPP
5561 else
5562 ac_cv_prog_CPP=$CPP
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
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 :
5586 else
5587 # Broken: fails on valid input.
5588 continue
5590 rm -f conftest.err conftest.i conftest.$ac_ext
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
5606 rm -f conftest.err conftest.i conftest.$ac_ext
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 :
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; }
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
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
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=:;;
5650 ac_count=0
5651 $as_echo_n 0123456789 >"conftest.in"
5652 while :
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
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
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
5680 else
5681 ac_cv_path_GREP=$GREP
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"
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
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=:;;
5716 ac_count=0
5717 $as_echo_n 0123456789 >"conftest.in"
5718 while :
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
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
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
5746 else
5747 ac_cv_path_EGREP=$EGREP
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"
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>
5770 main ()
5774 return 0;
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
5782 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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>
5790 _ACEOF
5791 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5792 $EGREP "memchr" >/dev/null 2>&1; then :
5794 else
5795 ac_cv_header_stdc=no
5797 rm -f conftest*
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>
5807 _ACEOF
5808 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5809 $EGREP "free" >/dev/null 2>&1; then :
5811 else
5812 ac_cv_header_stdc=no
5814 rm -f conftest*
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 :
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
5838 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5840 main ()
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;
5849 _ACEOF
5850 if ac_fn_c_try_run "$LINENO"; then :
5852 else
5853 ac_cv_header_stdc=no
5855 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5856 conftest.$ac_objext conftest.beam conftest.$ac_ext
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
5865 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
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
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
5883 done
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
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
5901 done
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. */
5919 # define __EXTENSIONS__ 1
5920 $ac_includes_default
5922 main ()
5926 return 0;
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
5934 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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; }
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. */
5949 #include <wchar.h>
5950 mbstate_t x;
5952 main ()
5956 return 0;
5958 _ACEOF
5959 if ac_fn_c_try_compile "$LINENO"; then :
5961 else
5962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5963 /* end confdefs.h. */
5965 #define _XOPEN_SOURCE 500
5966 #include <wchar.h>
5967 mbstate_t x;
5969 main ()
5973 return 0;
5975 _ACEOF
5976 if ac_fn_c_try_compile "$LINENO"; then :
5977 ac_cv_should_define__xopen_source=yes
5979 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5981 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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; }
5987 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5989 $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
5991 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5993 $as_echo "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h
5995 $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
5997 $as_echo "#define _OPENBSD_SOURCE 1" >>confdefs.h
5999 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6001 $as_echo "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
6003 $as_echo "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
6005 $as_echo "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
6007 $as_echo "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
6009 $as_echo "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
6011 $as_echo "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
6013 $as_echo "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
6015 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
6017 if test $ac_cv_header_minix_config_h = yes; then :
6018 MINIX=yes
6019 $as_echo "#define _MINIX 1" >>confdefs.h
6021 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
6023 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
6025 else
6026 MINIX=
6028 if test $ac_cv_safe_to_define___extensions__ = yes; then :
6029 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
6032 if test $ac_cv_should_define__xopen_source = yes; then :
6033 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
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
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
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.
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
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
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
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
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
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
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
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}-
6179 # The tests for host and target for $enable_largefile require
6180 # canonical names.
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.
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
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
6200 done
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
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
6213 done
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
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. */
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 ();
6248 main ()
6250 return dlsym ();
6252 return 0;
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"
6262 if ac_fn_c_try_link "$LINENO"; then :
6263 ac_cv_search_dlsym=$ac_res
6265 rm -f core conftest.err conftest.$ac_objext \
6266 conftest$ac_exeext
6267 if ${ac_cv_search_dlsym+:} false; then :
6268 break
6270 done
6271 if ${ac_cv_search_dlsym+:} false; then :
6273 else
6274 ac_cv_search_dlsym=no
6276 rm conftest.$ac_ext
6277 LIBS=$ac_func_search_save_LIBS
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"
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.
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>
6307 main ()
6311 return 0;
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
6319 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
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"
6342 esac
6344 # Check whether --enable-largefile was given.
6345 if test "${enable_largefile+set}" = set; then :
6346 enableval=$enable_largefile;
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];
6373 main ()
6377 return 0;
6379 _ACEOF
6380 if ac_fn_c_try_compile "$LINENO"; then :
6381 break
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
6388 rm -f core conftest.err conftest.$ac_objext
6389 break
6390 done
6391 CC=$ac_save_CC
6392 rm -f conftest.$ac_ext
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
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];
6419 main ()
6423 return 0;
6425 _ACEOF
6426 if ac_fn_c_try_compile "$LINENO"; then :
6427 ac_cv_sys_file_offset_bits=no; break
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];
6444 main ()
6448 return 0;
6450 _ACEOF
6451 if ac_fn_c_try_compile "$LINENO"; then :
6452 ac_cv_sys_file_offset_bits=64; break
6454 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6455 ac_cv_sys_file_offset_bits=unknown
6456 break
6457 done
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) ;;
6464 cat >>confdefs.h <<_ACEOF
6465 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
6466 _ACEOF
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];
6490 main ()
6494 return 0;
6496 _ACEOF
6497 if ac_fn_c_try_compile "$LINENO"; then :
6498 ac_cv_sys_large_files=no; break
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];
6515 main ()
6519 return 0;
6521 _ACEOF
6522 if ac_fn_c_try_compile "$LINENO"; then :
6523 ac_cv_sys_large_files=1; break
6525 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6526 ac_cv_sys_large_files=unknown
6527 break
6528 done
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) ;;
6535 cat >>confdefs.h <<_ACEOF
6536 #define _LARGE_FILES $ac_cv_sys_large_files
6537 _ACEOF
6539 esac
6540 rm -rf conftest* ;; #(
6541 64) :
6543 # Check whether --enable-year2038 was given.
6544 if test "${enable_year2038+set}" = set; then :
6545 enableval=$enable_year2038;
6548 if test "$enable_year2038" != no; then :
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. */
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];
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
6572 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
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];
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
6602 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
6609 $as_echo "#define _TIME_BITS 64" >>confdefs.h
6612 $as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
6614 gl_cv_type_time_t_y2038=yes
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
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.
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
6652 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6655 ;; #(
6656 *) :
6658 esac
6666 case "$host_os" in
6667 openbsd*)
6669 $as_echo "#define _ISOC11_SOURCE 1" >>confdefs.h
6672 esac
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
6683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6684 /* end confdefs.h. */
6686 #ifdef __ACK__
6687 Amsterdam
6688 #endif
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
6697 rm -f conftest*
6701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
6702 $as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
6704 if test $gl_cv_c_amsterdam_compiler = yes; then
6705 if test -z "$AR"; then
6706 AR='cc -c.a'
6708 if test -z "$ARFLAGS"; then
6709 ARFLAGS='-o'
6711 else
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
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
6737 done
6738 done
6739 IFS=$as_save_IFS
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; }
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
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
6777 done
6778 done
6779 IFS=$as_save_IFS
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; }
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
6803 else
6804 AR="$ac_cv_prog_AR"
6807 if test -z "$ARFLAGS"; then
6808 ARFLAGS='cr'
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
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
6839 done
6840 done
6841 IFS=$as_save_IFS
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; }
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
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
6879 done
6880 done
6881 IFS=$as_save_IFS
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; }
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
6905 else
6906 RANLIB="$ac_cv_prog_RANLIB"
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"
6934 sh*)
6935 if test -n "$GCC"; then
6936 # GCC has the option -mieee.
6937 CPPFLAGS="$CPPFLAGS -mieee"
6940 esac
6944 case "$host_os" in
6945 mingw*)
6947 $as_echo "#define __MINGW_USE_VC2005_COMPAT 1" >>confdefs.h
6950 esac
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
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
6980 *) gl_use_threads=yes ;;
6981 esac
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>:
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"
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
7019 # Pre-early section.
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:
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:
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:
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:
7226 am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
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
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
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.
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
7276 gl_cross_guesses="$enableval"
7277 else
7278 gl_cross_guesses=conservative
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"
7288 LIBC_FATAL_STDERR_=1
7289 export LIBC_FATAL_STDERR_
7293 HAVE_STRUCT_SOCKADDR_STORAGE=1;
7294 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1;
7296 HAVE_SA_FAMILY_T=1;
7297 HAVE_ACCEPT4=1;
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
7313 done
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
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
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
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
7370 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7373 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7374 CPPFLAGS="$gl_save_CPPFLAGS"
7375 rm -rf conftestd1a conftestd1b conftestd2
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'
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
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. */
7408 #ifdef __TANDEM
7409 choke me
7410 #endif
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
7419 rm -f conftest*
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=
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;
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]; }
7548 main ()
7550 int s[1];
7551 int *$ac_kw t = s;
7552 t[0] = 0;
7553 return foo (t) + bar (t);
7556 return 0;
7558 _ACEOF
7559 if ac_fn_c_try_compile "$LINENO"; then :
7560 ac_cv_c_restrict=$ac_kw
7562 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7563 test "$ac_cv_c_restrict" != no && break
7564 done
7567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
7568 $as_echo "$ac_cv_c_restrict" >&6; }
7570 case $ac_cv_c_restrict in
7571 restrict) ;;
7572 no) $as_echo "#define restrict /**/" >>confdefs.h
7574 *) cat >>confdefs.h <<_ACEOF
7575 #define restrict $ac_cv_c_restrict
7576 _ACEOF
7578 esac
7584 case "$host_os" in
7585 osf*)
7587 $as_echo "#define _POSIX_PII_SOCKET 1" >>confdefs.h
7590 esac
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
7599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7600 /* end confdefs.h. */
7601 #include <sys/socket.h>
7603 main ()
7607 return 0;
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
7615 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
7630 done
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
7639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7640 /* end confdefs.h. */
7641 #include <sys/socket.h>
7643 main ()
7645 int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };
7647 return 0;
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
7655 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
7665 # We need to check for ws2tcpip.h now.
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
7686 if test $ac_cv_header_sys_socket_h = yes; then
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
7700 case "$host_os" in
7701 mingw*)
7702 gl_dirsep_regex='[/\\]'
7705 gl_dirsep_regex='\/'
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|^/[^/]|//&|
7718 gl_cv_absolute_sys_socket_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
7719 sed -n "$gl_absolute_header_sed"`
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'>'
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; }
7732 NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_h
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
7741 NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H=$gl_next_as_first_directive
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
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
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
7779 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
7781 cat >>confdefs.h <<_ACEOF
7782 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
7783 _ACEOF
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
7800 if test "x$ac_cv_type_sa_family_t" = xyes; then :
7802 cat >>confdefs.h <<_ACEOF
7803 #define HAVE_SA_FAMILY_T 1
7804 _ACEOF
7809 if test $ac_cv_type_struct_sockaddr_storage = no; then
7810 HAVE_STRUCT_SOCKADDR_STORAGE=0
7812 if test $ac_cv_type_sa_family_t = no; then
7813 HAVE_SA_FAMILY_T=0
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
7825 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
7827 cat >>confdefs.h <<_ACEOF
7828 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
7829 _ACEOF
7832 else
7833 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0
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
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
7856 done
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
7877 GL_GNULIB_SOCKET=0
7881 GL_GNULIB_CONNECT=0
7885 GL_GNULIB_ACCEPT=0
7889 GL_GNULIB_BIND=0
7893 GL_GNULIB_GETPEERNAME=0
7897 GL_GNULIB_GETSOCKNAME=0
7901 GL_GNULIB_GETSOCKOPT=0
7905 GL_GNULIB_LISTEN=0
7909 GL_GNULIB_RECV=0
7913 GL_GNULIB_SEND=0
7917 GL_GNULIB_RECVFROM=0
7921 GL_GNULIB_SENDTO=0
7925 GL_GNULIB_SETSOCKOPT=0
7929 GL_GNULIB_SHUTDOWN=0
7933 GL_GNULIB_ACCEPT4=0
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 :
7940 else
7942 cat >>confdefs.h <<_ACEOF
7943 #define size_t unsigned int
7944 _ACEOF
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>
7959 main ()
7961 char *p = (char *) alloca (2 * sizeof (int));
7962 if (p) return 0;
7964 return 0;
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
7972 rm -f core conftest.err conftest.$ac_objext \
7973 conftest$ac_exeext conftest.$ac_ext
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
7979 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
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
8012 main ()
8014 char *p = (char *) alloca (1);
8015 if (p) return 0;
8017 return 0;
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
8025 rm -f core conftest.err conftest.$ac_objext \
8026 conftest$ac_exeext conftest.$ac_ext
8028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
8029 $as_echo "$ac_cv_func_alloca_works" >&6; }
8031 if test $ac_cv_func_alloca_works = yes; then
8033 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
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.
8045 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
8047 $as_echo "#define C_ALLOCA 1" >>confdefs.h
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
8062 find_stack_direction (int *addr, int depth)
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;
8073 main (int argc, char **argv)
8075 return find_stack_direction (0, argc + !argv + 20) < 0;
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
8083 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8084 conftest.$ac_objext conftest.beam conftest.$ac_ext
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
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
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
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"
8136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
8137 $as_echo "$MKDIR_P" >&6; }
8140 HAVE_DECL_INET_NTOP=1;
8141 HAVE_DECL_INET_PTON=1;
8142 REPLACE_INET_NTOP=0;
8143 REPLACE_INET_PTON=0;
8151 if test $ac_cv_header_features_h = yes; then
8152 HAVE_FEATURES_H=1
8153 else
8154 HAVE_FEATURES_H=0
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
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
8186 if test $ac_cv_header_arpa_inet_h = yes; then
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
8200 case "$host_os" in
8201 mingw*)
8202 gl_dirsep_regex='[/\\]'
8205 gl_dirsep_regex='\/'
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|^/[^/]|//&|
8218 gl_cv_absolute_arpa_inet_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
8219 sed -n "$gl_absolute_header_sed"`
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'>'
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; }
8232 NEXT_ARPA_INET_H=$gl_cv_next_arpa_inet_h
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
8241 NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H=$gl_next_as_first_directive
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
8269 GL_GNULIB_INET_NTOP=0
8273 GL_GNULIB_INET_PTON=0
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;
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. */
8350 #define wcstod renamed_wcstod
8351 #include <wchar.h>
8352 extern int zero (void);
8353 int main () { return zero(); }
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. */
8368 #define wcstod renamed_wcstod
8369 #include <wchar.h>
8370 int zero (void) { return 0; }
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
8382 else
8383 gl_cv_header_wchar_h_correct_inline=no
8387 ac_compile="$save_ac_compile"
8388 rm -f conftest12.c conftest12.$ac_objext conftest$ac_exeext
8390 esac
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
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
8420 done
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>
8434 main ()
8436 char* cs = nl_langinfo(CODESET); return !cs;
8438 return 0;
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
8446 rm -f core conftest.err conftest.$ac_objext \
8447 conftest$ac_exeext conftest.$ac_ext
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
8454 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
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
8467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8468 /* end confdefs.h. */
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
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;
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
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
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
8590 esac
8592 rm -fr conftest*
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
8602 GL_GNULIB_BTOWC=0
8606 GL_GNULIB_WCTOB=0
8610 GL_GNULIB_MBSINIT=0
8614 GL_GNULIB_MBRTOWC=0
8618 GL_GNULIB_MBRLEN=0
8622 GL_GNULIB_MBSRTOWCS=0
8626 GL_GNULIB_MBSNRTOWCS=0
8630 GL_GNULIB_WCRTOMB=0
8634 GL_GNULIB_WCSRTOMBS=0
8638 GL_GNULIB_WCSNRTOMBS=0
8642 GL_GNULIB_WCWIDTH=0
8646 GL_GNULIB_WMEMCHR=0
8650 GL_GNULIB_WMEMCMP=0
8654 GL_GNULIB_WMEMCPY=0
8658 GL_GNULIB_WMEMMOVE=0
8662 GL_GNULIB_WMEMPCPY=0
8666 GL_GNULIB_WMEMSET=0
8670 GL_GNULIB_WCSLEN=0
8674 GL_GNULIB_WCSNLEN=0
8678 GL_GNULIB_WCSCPY=0
8682 GL_GNULIB_WCPCPY=0
8686 GL_GNULIB_WCSNCPY=0
8690 GL_GNULIB_WCPNCPY=0
8694 GL_GNULIB_WCSCAT=0
8698 GL_GNULIB_WCSNCAT=0
8702 GL_GNULIB_WCSCMP=0
8706 GL_GNULIB_WCSNCMP=0
8710 GL_GNULIB_WCSCASECMP=0
8714 GL_GNULIB_WCSNCASECMP=0
8718 GL_GNULIB_WCSCOLL=0
8722 GL_GNULIB_WCSXFRM=0
8726 GL_GNULIB_WCSDUP=0
8730 GL_GNULIB_WCSCHR=0
8734 GL_GNULIB_WCSRCHR=0
8738 GL_GNULIB_WCSCSPN=0
8742 GL_GNULIB_WCSSPN=0
8746 GL_GNULIB_WCSPBRK=0
8750 GL_GNULIB_WCSSTR=0
8754 GL_GNULIB_WCSTOK=0
8758 GL_GNULIB_WCSWIDTH=0
8762 GL_GNULIB_WCSFTIME=0
8766 GL_GNULIB_MDA_WCSDUP=1
8772 GL_GNULIB__EXIT=0
8776 GL_GNULIB_ALIGNED_ALLOC=0
8780 GL_GNULIB_ATOLL=0
8784 GL_GNULIB_CALLOC_GNU=0
8788 GL_GNULIB_CALLOC_POSIX=0
8792 GL_GNULIB_CANONICALIZE_FILE_NAME=0
8796 GL_GNULIB_FREE_POSIX=0
8800 GL_GNULIB_GETLOADAVG=0
8804 GL_GNULIB_GETSUBOPT=0
8808 GL_GNULIB_GRANTPT=0
8812 GL_GNULIB_MALLOC_GNU=0
8816 GL_GNULIB_MALLOC_POSIX=0
8820 GL_GNULIB_MBTOWC=0
8824 GL_GNULIB_MKDTEMP=0
8828 GL_GNULIB_MKOSTEMP=0
8832 GL_GNULIB_MKOSTEMPS=0
8836 GL_GNULIB_MKSTEMP=0
8840 GL_GNULIB_MKSTEMPS=0
8844 GL_GNULIB_POSIX_MEMALIGN=0
8848 GL_GNULIB_POSIX_OPENPT=0
8852 GL_GNULIB_PTSNAME=0
8856 GL_GNULIB_PTSNAME_R=0
8860 GL_GNULIB_PUTENV=0
8864 GL_GNULIB_QSORT_R=0
8868 GL_GNULIB_RANDOM=0
8872 GL_GNULIB_RANDOM_R=0
8876 GL_GNULIB_REALLOCARRAY=0
8880 GL_GNULIB_REALLOC_GNU=0
8884 GL_GNULIB_REALLOC_POSIX=0
8888 GL_GNULIB_REALPATH=0
8892 GL_GNULIB_RPMATCH=0
8896 GL_GNULIB_SECURE_GETENV=0
8900 GL_GNULIB_SETENV=0
8904 GL_GNULIB_STRTOD=0
8908 GL_GNULIB_STRTOL=0
8912 GL_GNULIB_STRTOLD=0
8916 GL_GNULIB_STRTOLL=0
8920 GL_GNULIB_STRTOUL=0
8924 GL_GNULIB_STRTOULL=0
8928 GL_GNULIB_SYSTEM_POSIX=0
8932 GL_GNULIB_UNLOCKPT=0
8936 GL_GNULIB_UNSETENV=0
8940 GL_GNULIB_WCTOMB=0
8944 GL_GNULIB_MDA_ECVT=1
8948 GL_GNULIB_MDA_FCVT=1
8952 GL_GNULIB_MDA_GCVT=1
8956 GL_GNULIB_MDA_MKTEMP=1
8960 GL_GNULIB_MDA_PUTENV=1
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;
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" ;;
9061 # If we don't know, obey --enable-cross-guesses.
9062 gl_cv_func_lstat_dereferences_slashed_symlink="$gl_cross_guess_normal" ;;
9063 esac
9065 else
9066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9067 /* end confdefs.h. */
9068 $ac_includes_default
9070 main ()
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;
9081 return 0;
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
9089 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9090 conftest.$ac_objext conftest.beam conftest.$ac_ext
9093 rm -f conftest.sym conftest.file
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)
9101 cat >>confdefs.h <<_ACEOF
9102 #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
9103 _ACEOF
9106 esac
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 ;;
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
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
9147 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
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
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
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
9184 else
9185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9186 /* end confdefs.h. */
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)
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);
9220 static void
9221 nocrash_init (void)
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);
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)
9261 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
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);
9274 return EXCEPTION_CONTINUE_SEARCH;
9276 static void
9277 nocrash_init (void)
9279 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
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)
9289 _exit (1);
9291 static void
9292 nocrash_init (void)
9294 #ifdef SIGSEGV
9295 signal (SIGSEGV, exception_handler);
9296 #endif
9297 #ifdef SIGBUS
9298 signal (SIGBUS, exception_handler);
9299 #endif
9301 #endif
9303 #include <errno.h>
9304 #include <stdlib.h>
9305 #include <string.h>
9308 main ()
9311 int result = 0;
9312 /* This test fails on Solaris 10. */
9314 char *name = realpath ("conftest.a", NULL);
9315 if (!(name && *name == '/'))
9316 result |= 1;
9317 free (name);
9319 /* This test fails on older versions of Cygwin. */
9321 char *name = realpath ("conftest.b/../conftest.a", NULL);
9322 if (name != NULL)
9323 result |= 2;
9324 free (name);
9326 /* This test fails on Cygwin 2.9. */
9327 #if HAVE_LSTAT
9329 char *name = realpath ("conftest.l/../conftest.a", NULL);
9330 if (name != NULL || errno != ENOTDIR)
9331 result |= 4;
9332 free (name);
9334 #endif
9335 /* This test fails on Mac OS X 10.13, OpenBSD 6.0. */
9337 char *name = realpath ("conftest.a/", NULL);
9338 if (name != NULL)
9339 result |= 8;
9340 free (name);
9342 /* This test fails on AIX 7, Solaris 10. */
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);
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. */
9356 char *name = realpath ("//", NULL);
9357 if (! name || strcmp (name, "/"))
9358 result |= 32;
9359 free (name);
9361 #endif
9362 return result;
9365 return 0;
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
9378 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9379 conftest.$ac_objext conftest.beam conftest.$ac_ext
9382 rm -rf conftest.a conftest.l conftest.d
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)
9390 $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
9393 *nearly)
9395 $as_echo "#define FUNC_REALPATH_NEARLY_WORKS 1" >>confdefs.h
9398 esac
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
9419 done
9421 esac
9429 GL_GNULIB_ACCESS=0
9433 GL_GNULIB_CHDIR=0
9437 GL_GNULIB_CHOWN=0
9441 GL_GNULIB_CLOSE=0
9445 GL_GNULIB_COPY_FILE_RANGE=0
9449 GL_GNULIB_DUP=0
9453 GL_GNULIB_DUP2=0
9457 GL_GNULIB_DUP3=0
9461 GL_GNULIB_ENVIRON=0
9465 GL_GNULIB_EUIDACCESS=0
9469 GL_GNULIB_EXECL=0
9473 GL_GNULIB_EXECLE=0
9477 GL_GNULIB_EXECLP=0
9481 GL_GNULIB_EXECV=0
9485 GL_GNULIB_EXECVE=0
9489 GL_GNULIB_EXECVP=0
9493 GL_GNULIB_EXECVPE=0
9497 GL_GNULIB_FACCESSAT=0
9501 GL_GNULIB_FCHDIR=0
9505 GL_GNULIB_FCHOWNAT=0
9509 GL_GNULIB_FDATASYNC=0
9513 GL_GNULIB_FSYNC=0
9517 GL_GNULIB_FTRUNCATE=0
9521 GL_GNULIB_GETCWD=0
9525 GL_GNULIB_GETDOMAINNAME=0
9529 GL_GNULIB_GETDTABLESIZE=0
9533 GL_GNULIB_GETENTROPY=0
9537 GL_GNULIB_GETGROUPS=0
9541 GL_GNULIB_GETHOSTNAME=0
9545 GL_GNULIB_GETLOGIN=0
9549 GL_GNULIB_GETLOGIN_R=0
9553 GL_GNULIB_GETOPT_POSIX=0
9557 GL_GNULIB_GETPAGESIZE=0
9561 GL_GNULIB_GETPASS=0
9565 GL_GNULIB_GETPASS_GNU=0
9569 GL_GNULIB_GETUSERSHELL=0
9573 GL_GNULIB_GROUP_MEMBER=0
9577 GL_GNULIB_ISATTY=0
9581 GL_GNULIB_LCHOWN=0
9585 GL_GNULIB_LINK=0
9589 GL_GNULIB_LINKAT=0
9593 GL_GNULIB_LSEEK=0
9597 GL_GNULIB_PIPE=0
9601 GL_GNULIB_PIPE2=0
9605 GL_GNULIB_PREAD=0
9609 GL_GNULIB_PWRITE=0
9613 GL_GNULIB_READ=0
9617 GL_GNULIB_READLINK=0
9621 GL_GNULIB_READLINKAT=0
9625 GL_GNULIB_RMDIR=0
9629 GL_GNULIB_SETHOSTNAME=0
9633 GL_GNULIB_SLEEP=0
9637 GL_GNULIB_SYMLINK=0
9641 GL_GNULIB_SYMLINKAT=0
9645 GL_GNULIB_TRUNCATE=0
9649 GL_GNULIB_TTYNAME_R=0
9653 GL_GNULIB_UNISTD_H_GETOPT=0
9657 GL_GNULIB_UNISTD_H_NONBLOCKING=0
9661 GL_GNULIB_UNISTD_H_SIGPIPE=0
9665 GL_GNULIB_UNLINK=0
9669 GL_GNULIB_UNLINKAT=0
9673 GL_GNULIB_USLEEP=0
9677 GL_GNULIB_WRITE=0
9681 GL_GNULIB_MDA_ACCESS=1
9685 GL_GNULIB_MDA_CHDIR=1
9689 GL_GNULIB_MDA_CLOSE=1
9693 GL_GNULIB_MDA_DUP=1
9697 GL_GNULIB_MDA_DUP2=1
9701 GL_GNULIB_MDA_EXECL=1
9705 GL_GNULIB_MDA_EXECLE=1
9709 GL_GNULIB_MDA_EXECLP=1
9713 GL_GNULIB_MDA_EXECV=1
9717 GL_GNULIB_MDA_EXECVE=1
9721 GL_GNULIB_MDA_EXECVP=1
9725 GL_GNULIB_MDA_EXECVPE=1
9729 GL_GNULIB_MDA_GETCWD=1
9733 GL_GNULIB_MDA_GETPID=1
9737 GL_GNULIB_MDA_ISATTY=1
9741 GL_GNULIB_MDA_LSEEK=1
9745 GL_GNULIB_MDA_READ=1
9749 GL_GNULIB_MDA_RMDIR=1
9753 GL_GNULIB_MDA_SWAB=1
9757 GL_GNULIB_MDA_UNLINK=1
9761 GL_GNULIB_MDA_WRITE=1
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>
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
9786 rm -f conftest*
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
9793 $as_echo "#define uid_t int" >>confdefs.h
9796 $as_echo "#define gid_t int" >>confdefs.h
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
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
9866 done
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
9885 else
9886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9887 /* end confdefs.h. */
9888 $ac_includes_default
9889 #include <fcntl.h>
9892 $gl_mda_defines
9895 main ()
9898 char *f = "conftest.chown";
9899 struct stat before, after;
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);
9912 return 0;
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
9921 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9922 conftest.$ac_objext conftest.beam conftest.$ac_ext
9925 rm -f conftest.chown
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)
9933 $as_echo "#define HAVE_CHOWN 1" >>confdefs.h
9936 esac
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
9945 if test "$cross_compiling" = yes; then :
9946 gl_cv_func_chown_follows_symlink="guessing yes"
9948 else
9949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9950 /* end confdefs.h. */
9952 #include <unistd.h>
9953 #include <stdlib.h>
9954 #include <errno.h>
9957 $gl_mda_defines
9960 main ()
9962 int result = 0;
9963 char const *dangling_symlink = "conftest.dangle";
9965 unlink (dangling_symlink);
9966 if (symlink ("conftest.no-such", dangling_symlink))
9967 abort ();
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;
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
9984 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9985 conftest.$ac_objext conftest.beam conftest.$ac_ext
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; }
9994 case "$gl_cv_func_chown_follows_symlink" in
9995 *yes) ;;
9998 $as_echo "#define CHOWN_MODIFIES_SYMLINK 1" >>confdefs.h
10001 esac
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
10022 case "$ac_cv_func_chown_works" in
10023 *no)
10025 $as_echo "#define CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE 1" >>confdefs.h
10027 REPLACE_CHOWN=1
10029 esac
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
10047 else
10048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10049 /* end confdefs.h. */
10051 #include <unistd.h>
10052 #include <stdlib.h>
10053 #include <errno.h>
10056 $gl_mda_defines
10059 main ()
10061 if (symlink ("conftest.file", "conftest.link")) return 1;
10062 if (chown ("conftest.link/", getuid (), getgid ()) == 0) return 2;
10065 return 0;
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
10073 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10074 conftest.$ac_objext conftest.beam conftest.$ac_ext
10077 rm -f conftest.link conftest.file
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) ;;
10085 $as_echo "#define CHOWN_TRAILING_SLASH_BUG 1" >>confdefs.h
10087 REPLACE_CHOWN=1
10089 esac
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
10106 else
10107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10108 /* end confdefs.h. */
10110 #include <unistd.h>
10111 #include <stdlib.h>
10112 #include <errno.h>
10113 #include <fcntl.h>
10114 #include <sys/stat.h>
10117 $gl_mda_defines
10120 main ()
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;
10131 return 0;
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
10139 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10140 conftest.$ac_objext conftest.beam conftest.$ac_ext
10143 rm -f conftest.file
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) ;;
10151 $as_echo "#define CHOWN_CHANGE_TIME_BUG 1" >>confdefs.h
10153 REPLACE_CHOWN=1
10155 esac
10162 if test $ac_cv_func__set_invalid_parameter_handler = yes; then
10163 HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
10165 $as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
10167 else
10168 HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
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;
10195 GL_GNULIB_OPENDIR=0
10199 GL_GNULIB_READDIR=0
10203 GL_GNULIB_REWINDDIR=0
10207 GL_GNULIB_CLOSEDIR=0
10211 GL_GNULIB_DIRFD=0
10215 GL_GNULIB_FDOPENDIR=0
10219 GL_GNULIB_SCANDIR=0
10223 GL_GNULIB_ALPHASORT=0
10228 HAVE_ISBLANK=1;
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
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
10261 case "$host_os" in
10262 mingw*)
10263 gl_dirsep_regex='[/\\]'
10266 gl_dirsep_regex='\/'
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|^/[^/]|//&|
10279 gl_cv_absolute_ctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10280 sed -n "$gl_absolute_header_sed"`
10282 gl_header=$gl_cv_absolute_ctype_h
10283 gl_cv_next_ctype_h='"'$gl_header'"'
10287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_ctype_h" >&5
10288 $as_echo "$gl_cv_next_ctype_h" >&6; }
10290 NEXT_CTYPE_H=$gl_cv_next_ctype_h
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
10299 NEXT_AS_FIRST_DIRECTIVE_CTYPE_H=$gl_next_as_first_directive
10311 GL_GNULIB_ISBLANK=0
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
10338 if test $ac_cv_header_dirent_h = yes; then
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
10352 case "$host_os" in
10353 mingw*)
10354 gl_dirsep_regex='[/\\]'
10357 gl_dirsep_regex='\/'
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|^/[^/]|//&|
10370 gl_cv_absolute_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10371 sed -n "$gl_absolute_header_sed"`
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'>'
10381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
10382 $as_echo "$gl_cv_next_dirent_h" >&6; }
10384 NEXT_DIRENT_H=$gl_cv_next_dirent_h
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
10393 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
10398 if test $ac_cv_header_dirent_h = yes; then
10399 HAVE_DIRENT_H=1
10400 else
10401 HAVE_DIRENT_H=0
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>
10429 typedef struct { int foo; } foo_t;
10430 extern foo_t environ;
10432 main ()
10434 environ.foo = 1;
10436 return 0;
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
10444 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
10450 $as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
10455 if test $gt_cv_var_environ_declaration != yes; then
10456 HAVE_DECL_ENVIRON=0
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
10467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10468 /* end confdefs.h. */
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
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
10530 rm -f conftest*
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
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
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
10567 case "$host_os" in
10568 mingw*)
10569 gl_dirsep_regex='[/\\]'
10572 gl_dirsep_regex='\/'
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|^/[^/]|//&|
10585 gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10586 sed -n "$gl_absolute_header_sed"`
10588 gl_header=$gl_cv_absolute_errno_h
10589 gl_cv_next_errno_h='"'$gl_header'"'
10593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
10594 $as_echo "$gl_cv_next_errno_h" >&6; }
10596 NEXT_ERRNO_H=$gl_cv_next_errno_h
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
10605 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
10610 GL_GENERATE_ERRNO_H=true
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
10620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10621 /* end confdefs.h. */
10623 #include <errno.h>
10624 #ifdef EMULTIHOP
10626 #endif
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
10635 rm -f conftest*
10637 if test $gl_cv_header_errno_h_EMULTIHOP = no; then
10638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10639 /* end confdefs.h. */
10641 #define _XOPEN_SOURCE_EXTENDED 1
10642 #include <errno.h>
10643 #ifdef EMULTIHOP
10645 #endif
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
10652 rm -f conftest*
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 :
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=
10676 EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
10678 esac
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
10691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10692 /* end confdefs.h. */
10694 #include <errno.h>
10695 #ifdef ENOLINK
10697 #endif
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
10706 rm -f conftest*
10708 if test $gl_cv_header_errno_h_ENOLINK = no; then
10709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10710 /* end confdefs.h. */
10712 #define _XOPEN_SOURCE_EXTENDED 1
10713 #include <errno.h>
10714 #ifdef ENOLINK
10716 #endif
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
10723 rm -f conftest*
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 :
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=
10747 ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
10749 esac
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
10762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10763 /* end confdefs.h. */
10765 #include <errno.h>
10766 #ifdef EOVERFLOW
10768 #endif
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
10777 rm -f conftest*
10779 if test $gl_cv_header_errno_h_EOVERFLOW = no; then
10780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10781 /* end confdefs.h. */
10783 #define _XOPEN_SOURCE_EXTENDED 1
10784 #include <errno.h>
10785 #ifdef EOVERFLOW
10787 #endif
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
10794 rm -f conftest*
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 :
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=
10818 EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
10820 esac
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
10833 cat >>confdefs.h <<_ACEOF
10834 #define HAVE_DECL_STRERROR_R $ac_have_decl
10835 _ACEOF
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
10846 done
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
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
10860 main ()
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;
10869 return 0;
10871 _ACEOF
10872 if ac_fn_c_try_compile "$LINENO"; then :
10873 ac_cv_func_strerror_r_char_p=yes
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 :
10885 else
10886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10887 /* end confdefs.h. */
10888 $ac_includes_default
10889 extern char *strerror_r ();
10891 main ()
10893 char buf[100];
10894 char x = *strerror_r (0, buf, sizeof buf);
10895 return ! isalpha (x);
10897 return 0;
10899 _ACEOF
10900 if ac_fn_c_try_run "$LINENO"; then :
10901 ac_cv_func_strerror_r_char_p=yes
10903 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10904 conftest.$ac_objext conftest.beam conftest.$ac_ext
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
10914 $as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
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
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
10937 rm -f conftest.err conftest.i conftest.$ac_ext
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
10943 $as_echo "#define HAVE___HEADER_INLINE 1" >>confdefs.h
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
10956 cat >>confdefs.h <<_ACEOF
10957 #define HAVE_DECL_FCHDIR $ac_have_decl
10958 _ACEOF
10961 HAVE_FCNTL=1;
10962 HAVE_OPENAT=1;
10963 REPLACE_CREAT=0;
10964 REPLACE_FCNTL=0;
10965 REPLACE_OPEN=0;
10966 REPLACE_OPENAT=0;
10972 GL_GNULIB_CREAT=0
10976 GL_GNULIB_FCNTL=0
10980 GL_GNULIB_NONBLOCKING=0
10984 GL_GNULIB_OPEN=0
10988 GL_GNULIB_OPENAT=0
10992 GL_GNULIB_MDA_CREAT=1
10996 GL_GNULIB_MDA_OPEN=1
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
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>
11034 $gl_mda_defines
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[] =
11044 O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
11045 O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
11049 main ()
11052 int result = !constants;
11053 #if HAVE_SYMLINK
11055 static char const sym[] = "conftest.sym";
11056 if (symlink ("/dev/null", sym) != 0)
11057 result |= 2;
11058 else
11060 int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
11061 if (fd >= 0)
11063 close (fd);
11064 result |= 4;
11067 if (unlink (sym) != 0 || symlink (".", sym) != 0)
11068 result |= 2;
11069 else
11071 int fd = open (sym, O_RDONLY | O_NOFOLLOW);
11072 if (fd >= 0)
11074 close (fd);
11075 result |= 4;
11078 unlink (sym);
11080 #endif
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
11088 struct stat st0;
11089 if (fstat (fd, &st0) != 0)
11090 result |= 16;
11091 else
11093 char c;
11094 sleep (1);
11095 if (read (fd, &c, 1) != 1)
11096 result |= 24;
11097 else
11099 if (close (fd) != 0)
11100 result |= 32;
11101 else
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;
11114 return result;
11116 return 0;
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
11129 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11130 conftest.$ac_objext conftest.beam conftest.$ac_ext
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; }
11138 case $gl_cv_header_working_fcntl_h in #(
11139 *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
11140 *) ac_val=1;;
11141 esac
11143 cat >>confdefs.h <<_ACEOF
11144 #define HAVE_WORKING_O_NOATIME $ac_val
11145 _ACEOF
11148 case $gl_cv_header_working_fcntl_h in #(
11149 *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
11150 *) ac_val=1;;
11151 esac
11153 cat >>confdefs.h <<_ACEOF
11154 #define HAVE_WORKING_O_NOFOLLOW $ac_val
11155 _ACEOF
11159 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
11161 if test "x$ac_cv_type_pid_t" = xyes; then :
11163 else
11164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11165 /* end confdefs.h. */
11167 #if defined _WIN64 && !defined __CYGWIN__
11168 LLP64
11169 #endif
11172 main ()
11176 return 0;
11179 _ACEOF
11180 if ac_fn_c_try_compile "$LINENO"; then :
11181 gl_pid_type='int'
11182 else
11183 gl_pid_type='__int64'
11185 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11187 cat >>confdefs.h <<_ACEOF
11188 #define pid_t $gl_pid_type
11189 _ACEOF
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 :
11198 else
11200 cat >>confdefs.h <<_ACEOF
11201 #define mode_t int
11202 _ACEOF
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
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
11237 case "$host_os" in
11238 mingw*)
11239 gl_dirsep_regex='[/\\]'
11242 gl_dirsep_regex='\/'
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|^/[^/]|//&|
11255 gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11256 sed -n "$gl_absolute_header_sed"`
11258 gl_header=$gl_cv_absolute_fcntl_h
11259 gl_cv_next_fcntl_h='"'$gl_header'"'
11263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
11264 $as_echo "$gl_cv_next_fcntl_h" >&6; }
11266 NEXT_FCNTL_H=$gl_cv_next_fcntl_h
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
11275 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
11292 HAVE_FFS=1;
11293 HAVE_STRCASECMP=1;
11294 HAVE_DECL_STRNCASECMP=1;
11298 GL_GNULIB_FFS=0
11305 HAVE_FNMATCH=1;
11306 REPLACE_FNMATCH=0;
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
11332 if test $ac_cv_header_fnmatch_h = yes; then
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
11346 case "$host_os" in
11347 mingw*)
11348 gl_dirsep_regex='[/\\]'
11351 gl_dirsep_regex='\/'
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|^/[^/]|//&|
11364 gl_cv_absolute_fnmatch_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11365 sed -n "$gl_absolute_header_sed"`
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'>'
11375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fnmatch_h" >&5
11376 $as_echo "$gl_cv_next_fnmatch_h" >&6; }
11378 NEXT_FNMATCH_H=$gl_cv_next_fnmatch_h
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
11387 NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H=$gl_next_as_first_directive
11395 if test $ac_cv_header_fnmatch_h = yes; then
11396 HAVE_FNMATCH_H=1
11397 else
11398 HAVE_FNMATCH_H=0
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
11420 GL_GNULIB_FNMATCH=0
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>
11436 main ()
11438 mbstate_t x; return sizeof x;
11440 return 0;
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
11448 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
11454 $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
11456 else
11458 $as_echo "#define mbstate_t int" >>confdefs.h
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;
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
11648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11649 /* end confdefs.h. */
11650 #include <math.h>
11651 double x;
11653 main ()
11655 int e; return frexp (x, &e) > 0;
11657 return 0;
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
11665 rm -f core conftest.err conftest.$ac_objext \
11666 conftest$ac_exeext conftest.$ac_ext
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; }
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
11679 cat >>confdefs.h <<_ACEOF
11680 #define HAVE_DECL_ALARM $ac_have_decl
11681 _ACEOF
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
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;
11701 main ()
11703 int e; return frexp (x, &e) > 0;
11705 return 0;
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
11713 rm -f core conftest.err conftest.$ac_objext \
11714 conftest$ac_exeext conftest.$ac_ext
11715 LIBS="$save_LIBS"
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
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"
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
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. */
11744 #ifdef _MSC_VER
11745 Good
11746 #endif
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"
11755 rm -f conftest*
11758 *) gl_cv_func_frexp_works="guessing yes" ;;
11759 esac
11761 else
11762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11763 /* end confdefs.h. */
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)
11780 return -DBL_MIN * DBL_MIN;
11782 # define minus_zero compute_minus_zero ()
11783 #else
11784 double minus_zero = -0.0;
11785 #endif
11786 int main()
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)
11801 if (x > 0.0)
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;
11810 /* Test on infinite numbers. */
11811 x = 1.0 / zero;
11813 int exp;
11814 double y = frexp (x, &exp);
11815 if (y != x)
11816 result |= 2;
11818 /* Test on negative zero. */
11819 x = minus_zero;
11821 int exp;
11822 double y = frexp (x, &exp);
11823 if (memcmp (&y, &x, sizeof x))
11824 result |= 4;
11826 return result;
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
11834 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11835 conftest.$ac_objext conftest.beam conftest.$ac_ext
11840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
11841 $as_echo "$gl_cv_func_frexp_works" >&6; }
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
11851 if test $gl_func_frexp = yes; then
11853 $as_echo "#define HAVE_FREXP 1" >>confdefs.h
11860 GL_GNULIB_ACOSF=0
11864 GL_GNULIB_ACOSL=0
11868 GL_GNULIB_ASINF=0
11872 GL_GNULIB_ASINL=0
11876 GL_GNULIB_ATANF=0
11880 GL_GNULIB_ATANL=0
11884 GL_GNULIB_ATAN2F=0
11888 GL_GNULIB_CBRT=0
11892 GL_GNULIB_CBRTF=0
11896 GL_GNULIB_CBRTL=0
11900 GL_GNULIB_CEIL=0
11904 GL_GNULIB_CEILF=0
11908 GL_GNULIB_CEILL=0
11912 GL_GNULIB_COPYSIGN=0
11916 GL_GNULIB_COPYSIGNF=0
11920 GL_GNULIB_COPYSIGNL=0
11924 GL_GNULIB_COSF=0
11928 GL_GNULIB_COSL=0
11932 GL_GNULIB_COSHF=0
11936 GL_GNULIB_EXPF=0
11940 GL_GNULIB_EXPL=0
11944 GL_GNULIB_EXP2=0
11948 GL_GNULIB_EXP2F=0
11952 GL_GNULIB_EXP2L=0
11956 GL_GNULIB_EXPM1=0
11960 GL_GNULIB_EXPM1F=0
11964 GL_GNULIB_EXPM1L=0
11968 GL_GNULIB_FABSF=0
11972 GL_GNULIB_FABSL=0
11976 GL_GNULIB_FLOOR=0
11980 GL_GNULIB_FLOORF=0
11984 GL_GNULIB_FLOORL=0
11988 GL_GNULIB_FMA=0
11992 GL_GNULIB_FMAF=0
11996 GL_GNULIB_FMAL=0
12000 GL_GNULIB_FMOD=0
12004 GL_GNULIB_FMODF=0
12008 GL_GNULIB_FMODL=0
12012 GL_GNULIB_FREXPF=0
12016 GL_GNULIB_FREXP=0
12020 GL_GNULIB_FREXPL=0
12024 GL_GNULIB_HYPOT=0
12028 GL_GNULIB_HYPOTF=0
12032 GL_GNULIB_HYPOTL=0
12036 GL_GNULIB_ILOGB=0
12040 GL_GNULIB_ILOGBF=0
12044 GL_GNULIB_ILOGBL=0
12048 GL_GNULIB_ISFINITE=0
12052 GL_GNULIB_ISINF=0
12056 GL_GNULIB_ISNAN=0
12060 GL_GNULIB_ISNANF=0
12064 GL_GNULIB_ISNAND=0
12068 GL_GNULIB_ISNANL=0
12072 GL_GNULIB_LDEXPF=0
12076 GL_GNULIB_LDEXPL=0
12080 GL_GNULIB_LOG=0
12084 GL_GNULIB_LOGF=0
12088 GL_GNULIB_LOGL=0
12092 GL_GNULIB_LOG10=0
12096 GL_GNULIB_LOG10F=0
12100 GL_GNULIB_LOG10L=0
12104 GL_GNULIB_LOG1P=0
12108 GL_GNULIB_LOG1PF=0
12112 GL_GNULIB_LOG1PL=0
12116 GL_GNULIB_LOG2=0
12120 GL_GNULIB_LOG2F=0
12124 GL_GNULIB_LOG2L=0
12128 GL_GNULIB_LOGB=0
12132 GL_GNULIB_LOGBF=0
12136 GL_GNULIB_LOGBL=0
12140 GL_GNULIB_MODF=0
12144 GL_GNULIB_MODFF=0
12148 GL_GNULIB_MODFL=0
12152 GL_GNULIB_POWF=0
12156 GL_GNULIB_REMAINDER=0
12160 GL_GNULIB_REMAINDERF=0
12164 GL_GNULIB_REMAINDERL=0
12168 GL_GNULIB_RINT=0
12172 GL_GNULIB_RINTF=0
12176 GL_GNULIB_RINTL=0
12180 GL_GNULIB_ROUND=0
12184 GL_GNULIB_ROUNDF=0
12188 GL_GNULIB_ROUNDL=0
12192 GL_GNULIB_SIGNBIT=0
12196 GL_GNULIB_SINF=0
12200 GL_GNULIB_SINL=0
12204 GL_GNULIB_SINHF=0
12208 GL_GNULIB_SQRTF=0
12212 GL_GNULIB_SQRTL=0
12216 GL_GNULIB_TANF=0
12220 GL_GNULIB_TANL=0
12224 GL_GNULIB_TANHF=0
12228 GL_GNULIB_TRUNC=0
12232 GL_GNULIB_TRUNCF=0
12236 GL_GNULIB_TRUNCL=0
12240 GL_GNULIB_MDA_J0=1
12244 GL_GNULIB_MDA_J1=1
12248 GL_GNULIB_MDA_JN=1
12252 GL_GNULIB_MDA_Y0=1
12256 GL_GNULIB_MDA_Y1=1
12260 GL_GNULIB_MDA_YN=1
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>
12274 main ()
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];
12283 return 0;
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
12291 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
12298 $as_echo "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h
12300 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1
12301 else
12302 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0
12312 ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
12314 if test "x$ac_cv_have_decl_frexpl" = xyes; then :
12316 else
12317 HAVE_DECL_FREXPL=0
12321 FREXPL_LIBM=
12322 if test $HAVE_DECL_FREXPL = 1; then
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
12330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12331 /* end confdefs.h. */
12332 #include <math.h>
12333 long double x;
12335 main ()
12337 int e; return frexpl (x, &e) > 0;
12339 return 0;
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
12347 rm -f core conftest.err conftest.$ac_objext \
12348 conftest$ac_exeext conftest.$ac_ext
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; }
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
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;
12368 main ()
12370 int e; return frexpl (x, &e) > 0;
12372 return 0;
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
12380 rm -f core conftest.err conftest.$ac_objext \
12381 conftest$ac_exeext conftest.$ac_ext
12382 LIBS="$save_LIBS"
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
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"
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
12403 if test "$cross_compiling" = yes; then :
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
12411 else
12412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12413 /* end confdefs.h. */
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
12439 #endif
12440 long double frexpl (long double, int *);
12441 long double zero = 0.0L;
12442 int main()
12444 int result = 0;
12445 volatile long double x;
12446 /* Test on finite numbers that fails on AIX 5.1. */
12447 x = 16.0L;
12449 int exp = -9999;
12450 frexpl (x, &exp);
12451 if (exp != 5)
12452 result |= 1;
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;
12461 int exp = -9999;
12462 long double y = frexpl (x, &exp);
12463 if (!(exp == 1 && y == 0.505L))
12464 result |= 2;
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. */
12471 int i;
12472 for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
12474 int exp = -9999;
12475 frexpl (x, &exp);
12476 if (exp != i)
12478 result |= 4;
12479 break;
12483 /* Test on denormalized numbers. */
12485 int i;
12486 for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
12488 if (x > 0.0L)
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;
12498 /* Test on infinite numbers. */
12499 /* The Microsoft MSVC 14 compiler chokes on the expression 1.0 / 0.0. */
12500 x = 1.0L / zero;
12502 int exp;
12503 long double y = frexpl (x, &exp);
12504 if (y != x)
12505 result |= 16;
12507 return result;
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
12515 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12516 conftest.$ac_objext conftest.beam conftest.$ac_ext
12521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
12522 $as_echo "$gl_cv_func_frexpl_works" >&6; }
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
12532 if test $gl_func_frexpl = yes; then
12534 $as_echo "#define HAVE_FREXPL 1" >>confdefs.h
12538 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
12539 if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then
12541 FREXPL_LIBM="$FREXP_LIBM"
12542 else
12543 FREXPL_LIBM=
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;
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>
12584 #if defined S_ISBLK && defined S_IFDIR
12585 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
12586 #endif
12588 #if defined S_ISBLK && defined S_IFCHR
12589 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
12590 #endif
12592 #if defined S_ISLNK && defined S_IFREG
12593 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
12594 #endif
12596 #if defined S_ISSOCK && defined S_IFREG
12597 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
12598 #endif
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
12606 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
12612 $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
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];
12633 main ()
12637 return 0;
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
12645 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
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];
12667 main ()
12671 return 0;
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
12679 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
12691 WINDOWS_64_BIT_OFF_T=0
12692 WINDOWS_64_BIT_ST_SIZE=0
12694 esac
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
12719 if test $ac_cv_header_sys_stat_h = yes; then
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
12733 case "$host_os" in
12734 mingw*)
12735 gl_dirsep_regex='[/\\]'
12738 gl_dirsep_regex='\/'
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|^/[^/]|//&|
12751 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12752 sed -n "$gl_absolute_header_sed"`
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'>'
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; }
12765 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
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
12774 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
12783 WINDOWS_STAT_TIMESPEC=0
12792 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
12793 #include <sys/stat.h>
12795 if test "x$ac_cv_type_nlink_t" = xyes; then :
12797 else
12799 $as_echo "#define nlink_t int" >>confdefs.h
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
12824 done
12827 esac
12835 GL_GNULIB_FCHMODAT=0
12839 GL_GNULIB_FSTAT=0
12843 GL_GNULIB_FSTATAT=0
12847 GL_GNULIB_FUTIMENS=0
12851 GL_GNULIB_GETUMASK=0
12855 GL_GNULIB_LCHMOD=0
12859 GL_GNULIB_LSTAT=0
12863 GL_GNULIB_MKDIR=0
12867 GL_GNULIB_MKDIRAT=0
12871 GL_GNULIB_MKFIFO=0
12875 GL_GNULIB_MKFIFOAT=0
12879 GL_GNULIB_MKNOD=0
12883 GL_GNULIB_MKNODAT=0
12887 GL_GNULIB_STAT=0
12891 GL_GNULIB_UTIMENSAT=0
12895 GL_GNULIB_OVERRIDES_STRUCT_STAT=0
12899 GL_GNULIB_MDA_CHMOD=1
12903 GL_GNULIB_MDA_MKDIR=1
12907 GL_GNULIB_MDA_UMASK=1
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
12932 else
12933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12934 /* end confdefs.h. */
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
12944 $gl_mda_defines
12946 # ifndef getcwd
12947 char *getcwd ();
12948 # endif
12951 main ()
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
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;
12972 #endif
12975 return 0;
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
12983 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12984 conftest.$ac_objext conftest.beam conftest.$ac_ext
12988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
12989 $as_echo "$gl_cv_func_getcwd_null" >&6; }
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>
13002 $gl_mda_defines
13005 main ()
13007 extern
13008 #ifdef __cplusplus
13010 #endif
13011 char *getcwd (char *, size_t);
13014 return 0;
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
13023 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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; }
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
13036 cat >>confdefs.h <<_ACEOF
13037 #define HAVE_DECL_GETCWD $ac_have_decl
13038 _ACEOF
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;
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
13099 cat >>confdefs.h <<_ACEOF
13100 #define HAVE_DECL_GETDELIM $ac_have_decl
13101 _ACEOF
13107 GL_GNULIB_DPRINTF=0
13111 GL_GNULIB_FCLOSE=0
13115 GL_GNULIB_FDOPEN=0
13119 GL_GNULIB_FFLUSH=0
13123 GL_GNULIB_FGETC=0
13127 GL_GNULIB_FGETS=0
13131 GL_GNULIB_FOPEN=0
13135 GL_GNULIB_FOPEN_GNU=0
13139 GL_GNULIB_FPRINTF=0
13143 GL_GNULIB_FPRINTF_POSIX=0
13147 GL_GNULIB_FPURGE=0
13151 GL_GNULIB_FPUTC=0
13155 GL_GNULIB_FPUTS=0
13159 GL_GNULIB_FREAD=0
13163 GL_GNULIB_FREOPEN=0
13167 GL_GNULIB_FSCANF=0
13171 GL_GNULIB_FSEEK=0
13175 GL_GNULIB_FSEEKO=0
13179 GL_GNULIB_FTELL=0
13183 GL_GNULIB_FTELLO=0
13187 GL_GNULIB_FWRITE=0
13191 GL_GNULIB_GETC=0
13195 GL_GNULIB_GETCHAR=0
13199 GL_GNULIB_GETDELIM=0
13203 GL_GNULIB_GETLINE=0
13207 GL_GNULIB_OBSTACK_PRINTF=0
13211 GL_GNULIB_OBSTACK_PRINTF_POSIX=0
13215 GL_GNULIB_PCLOSE=0
13219 GL_GNULIB_PERROR=0
13223 GL_GNULIB_POPEN=0
13227 GL_GNULIB_PRINTF=0
13231 GL_GNULIB_PRINTF_POSIX=0
13235 GL_GNULIB_PUTC=0
13239 GL_GNULIB_PUTCHAR=0
13243 GL_GNULIB_PUTS=0
13247 GL_GNULIB_REMOVE=0
13251 GL_GNULIB_RENAME=0
13255 GL_GNULIB_RENAMEAT=0
13259 GL_GNULIB_SCANF=0
13263 GL_GNULIB_SNPRINTF=0
13267 GL_GNULIB_SPRINTF_POSIX=0
13271 GL_GNULIB_STDIO_H_NONBLOCKING=0
13275 GL_GNULIB_STDIO_H_SIGPIPE=0
13279 GL_GNULIB_TMPFILE=0
13283 GL_GNULIB_VASPRINTF=0
13287 GL_GNULIB_VFSCANF=0
13291 GL_GNULIB_VSCANF=0
13295 GL_GNULIB_VDPRINTF=0
13299 GL_GNULIB_VFPRINTF=0
13303 GL_GNULIB_VFPRINTF_POSIX=0
13307 GL_GNULIB_VPRINTF=0
13311 GL_GNULIB_VPRINTF_POSIX=0
13315 GL_GNULIB_VSNPRINTF=0
13319 GL_GNULIB_VSPRINTF_POSIX=0
13323 GL_GNULIB_MDA_FCLOSEALL=1
13327 GL_GNULIB_MDA_FDOPEN=1
13331 GL_GNULIB_MDA_FILENO=1
13335 GL_GNULIB_MDA_GETW=1
13339 GL_GNULIB_MDA_PUTW=1
13343 GL_GNULIB_MDA_TEMPNAM=1
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
13356 cat >>confdefs.h <<_ACEOF
13357 #define HAVE_DECL_GETDTABLESIZE $ac_have_decl
13358 _ACEOF
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
13367 cat >>confdefs.h <<_ACEOF
13368 #define HAVE_DECL_GETLINE $ac_have_decl
13369 _ACEOF
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
13378 cat >>confdefs.h <<_ACEOF
13379 #define HAVE_DECL_GETLOGIN_R $ac_have_decl
13380 _ACEOF
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
13391 cat >>confdefs.h <<_ACEOF
13392 #define HAVE_DECL_GETLOGIN $ac_have_decl
13393 _ACEOF
13397 case $host_os in
13398 mingw*)
13399 LIB_GETLOGIN='-ladvapi32' ;;
13401 LIB_GETLOGIN= ;;
13402 esac
13410 HAVE_GETRANDOM=1;
13411 REPLACE_GETRANDOM=0;
13417 GL_GNULIB_GETRANDOM=0
13422 HAVE_GETTIMEOFDAY=1;
13423 HAVE_STRUCT_TIMEVAL=1;
13424 HAVE_SYS_TIME_H=1;
13425 REPLACE_GETTIMEOFDAY=0;
13426 REPLACE_STRUCT_TIMEVAL=0;
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
13452 if test $ac_cv_header_sys_time_h = yes; then
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
13466 case "$host_os" in
13467 mingw*)
13468 gl_dirsep_regex='[/\\]'
13471 gl_dirsep_regex='\/'
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|^/[^/]|//&|
13484 gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13485 sed -n "$gl_absolute_header_sed"`
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'>'
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; }
13498 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
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
13507 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
13513 if test $ac_cv_header_sys_time_h != yes; then
13514 HAVE_SYS_TIME_H=0
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
13532 done
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
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
13560 main ()
13562 static struct timeval x; x.tv_sec = x.tv_usec;
13564 return 0;
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
13572 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
13596 main ()
13598 static struct timeval x;
13599 typedef int verify_tv_sec_type[
13600 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
13604 return 0;
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
13612 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
13630 GL_GNULIB_GETTIMEOFDAY=0
13635 HAVE_GLOB=1;
13636 HAVE_GLOB_PATTERN_P=1;
13637 REPLACE_GLOB=0;
13638 REPLACE_GLOB_PATTERN_P=0;
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
13665 if test $ac_cv_header_glob_h = yes; then
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
13679 case "$host_os" in
13680 mingw*)
13681 gl_dirsep_regex='[/\\]'
13684 gl_dirsep_regex='\/'
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|^/[^/]|//&|
13697 gl_cv_absolute_glob_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13698 sed -n "$gl_absolute_header_sed"`
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'>'
13708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_glob_h" >&5
13709 $as_echo "$gl_cv_next_glob_h" >&6; }
13711 NEXT_GLOB_H=$gl_cv_next_glob_h
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
13720 NEXT_AS_FIRST_DIRECTIVE_GLOB_H=$gl_next_as_first_directive
13726 if test $ac_cv_header_glob_h = yes; then
13727 HAVE_GLOB_H=1
13728 else
13729 HAVE_GLOB_H=0
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
13753 GL_GNULIB_GLOB=0
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
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.
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;
13798 main ()
13800 pthread_mutex_lock (&m);
13801 pthread_mutexattr_init (&ma);
13803 return 0;
13805 _ACEOF
13806 if ac_fn_c_try_link "$LINENO"; then :
13807 gl_pthread_api=yes
13808 LIBPTHREAD=$gl_pthread
13809 LIBPMULTITHREAD=$gl_pthread
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
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
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
13838 rm -f conftest*
13841 esac
13842 echo "$as_me:13842: gl_pthread_in_glibc=$gl_pthread_in_glibc" >&5
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. */
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 ();
13867 main ()
13869 return pthread_kill ();
13871 return 0;
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
13879 rm -f core conftest.err conftest.$ac_objext \
13880 conftest$ac_exeext conftest.$ac_ext
13881 LIBS=$ac_check_lib_save_LIBS
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*)
13899 $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
13901 esac
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. */
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 ();
13926 main ()
13928 return pthread_kill ();
13930 return 0;
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
13938 rm -f core conftest.err conftest.$ac_objext \
13939 conftest$ac_exeext conftest.$ac_ext
13940 LIBS=$ac_check_lib_save_LIBS
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
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. */
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 ();
13970 main ()
13972 return pthread_kill ();
13974 return 0;
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
13982 rm -f core conftest.err conftest.$ac_objext \
13983 conftest$ac_exeext conftest.$ac_ext
13984 LIBS=$ac_check_lib_save_LIBS
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
13996 echo "$as_me:13996: LIBPMULTITHREAD=$LIBPMULTITHREAD" >&5
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; }
14004 if test $gl_pthread_api = yes; then
14006 $as_echo "#define HAVE_PTHREAD_API 1" >>confdefs.h
14010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14011 /* end confdefs.h. */
14012 #include <sched.h>
14014 main ()
14016 sched_yield ();
14018 return 0;
14020 _ACEOF
14021 if ac_fn_c_try_link "$LINENO"; then :
14022 LIB_SCHED_YIELD=
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. */
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 ();
14043 main ()
14045 return sched_yield ();
14047 return 0;
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
14055 rm -f core conftest.err conftest.$ac_objext \
14056 conftest$ac_exeext conftest.$ac_ext
14057 LIBS=$ac_check_lib_save_LIBS
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. */
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 ();
14082 main ()
14084 return sched_yield ();
14086 return 0;
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
14094 rm -f core conftest.err conftest.$ac_objext \
14095 conftest$ac_exeext conftest.$ac_ext
14096 LIBS=$ac_check_lib_save_LIBS
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
14108 rm -f core conftest.err conftest.$ac_objext \
14109 conftest$ac_exeext conftest.$ac_ext
14112 gl_pthreadlib_body_done=done
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.
14137 gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;;
14138 esac
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*) ;;
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"
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
14156 cat >>confdefs.h <<_ACEOF
14157 #define SETLOCALE_NULL_ALL_MTSAFE $SETLOCALE_NULL_ALL_MTSAFE
14158 _ACEOF
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.
14175 gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;;
14176 esac
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*) ;;
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"
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
14194 cat >>confdefs.h <<_ACEOF
14195 #define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE
14196 _ACEOF
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= ;;
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"
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
14221 main ()
14223 xyzzy();
14225 return 0;
14227 _ACEOF
14228 if ac_fn_c_try_link "$LINENO"; then :
14229 gl_cv_have_weak=maybe
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
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"
14248 rm -f conftest*
14251 else
14252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14253 /* end confdefs.h. */
14255 #include <stdio.h>
14256 #pragma weak fputs
14257 int main ()
14259 return (fputs == NULL);
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
14267 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14268 conftest.$ac_objext conftest.beam conftest.$ac_ext
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 ()
14288 return (pthread_mutexattr_gettype != NULL);
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
14295 esac
14297 esac
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)
14305 $as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
14308 esac
14310 case "$gl_cv_have_weak" in
14311 *yes) LIB_SETLOCALE_NULL= ;;
14312 *) LIB_SETLOCALE_NULL="$LIBPTHREAD" ;;
14313 esac
14315 esac
14316 else
14317 LIB_SETLOCALE_NULL=
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
14347 main ()
14349 int x = AF_INET; struct in_addr y; struct sockaddr_in z;
14350 if (&x && &y && &z) return 0;
14352 return 0;
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
14360 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
14366 $as_echo "#define HAVE_IPV4 1" >>confdefs.h
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
14391 main ()
14393 int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z;
14394 if (&x && &y && &z) return 0;
14396 return 0;
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
14404 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
14410 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
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
14435 if test $ac_cv_header_limits_h = yes; then
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
14449 case "$host_os" in
14450 mingw*)
14451 gl_dirsep_regex='[/\\]'
14454 gl_dirsep_regex='\/'
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|^/[^/]|//&|
14467 gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14468 sed -n "$gl_absolute_header_sed"`
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'>'
14478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
14479 $as_echo "$gl_cv_next_limits_h" >&6; }
14481 NEXT_LIMITS_H=$gl_cv_next_limits_h
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
14490 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive
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;
14513 main ()
14517 return 0;
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
14525 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
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';
14546 main ()
14550 return 0;
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
14558 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
14564 $as_echo "#define HAVE_WINT_T 1" >>confdefs.h
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];
14578 main ()
14582 return 0;
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
14590 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
14599 else
14600 GNULIBHEADERS_OVERRIDE_WINT_T=0
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;
14624 _ACEOF
14625 if ac_fn_c_try_compile "$LINENO"; then :
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
14639 esac
14640 prev=
14641 else
14642 if test "x$word" = "x-arch"; then
14643 prev=arch
14646 done
14649 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
14667 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
14670 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
14674 if test $ac_cv_header_wchar_h = yes; then
14675 HAVE_WCHAR_H=1
14676 else
14677 HAVE_WCHAR_H=0
14682 if test $ac_cv_header_inttypes_h = yes; then
14683 HAVE_INTTYPES_H=1
14684 else
14685 HAVE_INTTYPES_H=0
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
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
14715 if test $ac_cv_header_stdint_h = yes; then
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
14729 case "$host_os" in
14730 mingw*)
14731 gl_dirsep_regex='[/\\]'
14734 gl_dirsep_regex='\/'
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|^/[^/]|//&|
14747 gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14748 sed -n "$gl_absolute_header_sed"`
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'>'
14758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
14759 $as_echo "$gl_cv_next_stdint_h" >&6; }
14761 NEXT_STDINT_H=$gl_cv_next_stdint_h
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
14770 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
14775 if test $ac_cv_header_stdint_h = yes; then
14776 HAVE_STDINT_H=1
14777 else
14778 HAVE_STDINT_H=0
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. */
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
14803 #include <stddef.h>
14804 #include <signal.h>
14805 #if HAVE_WCHAR_H
14806 # include <wchar.h>
14807 #endif
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;
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
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;
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;
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;
14952 main ()
14956 return 0;
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
14968 else
14969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14970 /* end confdefs.h. */
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>
14979 #include <stddef.h>
14980 #include <signal.h>
14981 #if HAVE_WCHAR_H
14982 # include <wchar.h>
14983 #endif
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[] =
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
15020 main ()
15023 const char **mv;
15024 for (mv = macro_values; *mv != NULL; mv++)
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;
15036 return 0;
15039 return 0;
15041 _ACEOF
15042 if ac_fn_c_try_run "$LINENO"; then :
15043 gl_cv_header_working_stdint_h=yes
15045 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15046 conftest.$ac_objext conftest.beam conftest.$ac_ext
15051 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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; }
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. */
15075 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
15076 #include <stdint.h>
15079 #include <stddef.h>
15080 #include <signal.h>
15081 #if HAVE_WCHAR_H
15082 # include <wchar.h>
15083 #endif
15086 intmax_t im = INTMAX_MAX;
15087 int32_t i32 = INT32_C (0x7fffffff);
15090 main ()
15094 return 0;
15096 _ACEOF
15097 if ac_fn_c_try_compile "$LINENO"; then :
15098 gl_cv_header_stdint_without_STDC_macros=yes
15100 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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; }
15106 if test $gl_cv_header_stdint_without_STDC_macros = no; then
15108 $as_echo "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
15111 $as_echo "#define __STDC_LIMIT_MACROS 1" >>confdefs.h
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. */
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>
15130 #include <stddef.h>
15131 #include <signal.h>
15132 #if HAVE_WCHAR_H
15133 # include <wchar.h>
15134 #endif
15136 int iw = UINTMAX_WIDTH;
15139 main ()
15143 return 0;
15145 _ACEOF
15146 if ac_fn_c_try_compile "$LINENO"; then :
15147 gl_cv_header_stdint_width=yes
15149 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
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
15169 done
15171 if test $ac_cv_header_sys_inttypes_h = yes; then
15172 HAVE_SYS_INTTYPES_H=1
15174 if test $ac_cv_header_sys_bitypes_h = yes; then
15175 HAVE_SYS_BITYPES_H=1
15179 if test $APPLE_UNIVERSAL_BUILD = 0; then
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
15195 #include <limits.h>"; then :
15197 else
15198 result=unknown
15201 eval gl_cv_bitsizeof_${gltype}=\$result
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
15211 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
15212 cat >>confdefs.h <<_ACEOF
15213 #define BITSIZEOF_${GLTYPE} $result
15214 _ACEOF
15216 eval BITSIZEOF_${GLTYPE}=\$result
15217 done
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
15236 #include <limits.h>"; then :
15238 else
15239 result=unknown
15242 eval gl_cv_bitsizeof_${gltype}=\$result
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
15252 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
15253 cat >>confdefs.h <<_ACEOF
15254 #define BITSIZEOF_${GLTYPE} $result
15255 _ACEOF
15257 eval BITSIZEOF_${GLTYPE}=\$result
15258 done
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. */
15272 #include <stddef.h>
15273 #include <signal.h>
15274 #if HAVE_WCHAR_H
15275 # include <wchar.h>
15276 #endif
15278 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
15280 main ()
15284 return 0;
15286 _ACEOF
15287 if ac_fn_c_try_compile "$LINENO"; then :
15288 result=yes
15289 else
15290 result=no
15292 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15293 eval gl_cv_type_${gltype}_signed=\$result
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
15306 eval HAVE_SIGNED_${GLTYPE}=1
15307 else
15308 eval HAVE_SIGNED_${GLTYPE}=0
15310 done
15313 gl_cv_type_ptrdiff_t_signed=yes
15314 gl_cv_type_size_t_signed=no
15315 if test $APPLE_UNIVERSAL_BUILD = 0; then
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
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. */
15345 #include <stddef.h>
15346 #include <signal.h>
15347 #if HAVE_WCHAR_H
15348 # include <wchar.h>
15349 #endif
15351 extern $gltype foo;
15352 extern $gltype1 foo;
15354 main ()
15358 return 0;
15360 _ACEOF
15361 if ac_fn_c_try_compile "$LINENO"; then :
15362 eval gl_cv_type_${gltype}_suffix=\$glsuf
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
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
15380 done
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
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. */
15413 #include <stddef.h>
15414 #include <signal.h>
15415 #if HAVE_WCHAR_H
15416 # include <wchar.h>
15417 #endif
15419 extern $gltype foo;
15420 extern $gltype1 foo;
15422 main ()
15426 return 0;
15428 _ACEOF
15429 if ac_fn_c_try_compile "$LINENO"; then :
15430 eval gl_cv_type_${gltype}_suffix=\$glsuf
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
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
15448 done
15452 if test $GNULIBHEADERS_OVERRIDE_WINT_T = 1; then
15453 BITSIZEOF_WINT_T=32
15457 esac
15461 GL_GENERATE_LIMITS_H=true
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';
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
15505 if test $ac_cv_header_inttypes_h = yes; then
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
15519 case "$host_os" in
15520 mingw*)
15521 gl_dirsep_regex='[/\\]'
15524 gl_dirsep_regex='\/'
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|^/[^/]|//&|
15537 gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15538 sed -n "$gl_absolute_header_sed"`
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'>'
15548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
15549 $as_echo "$gl_cv_next_inttypes_h" >&6; }
15551 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
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
15560 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
15577 PRIPTR_PREFIX=
15578 if $GL_GENERATE_STDINT_H; then
15579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15580 /* end confdefs.h. */
15582 #ifdef _WIN64
15583 LLP64
15584 #endif
15587 main ()
15591 return 0;
15594 _ACEOF
15595 if ac_fn_c_try_compile "$LINENO"; then :
15596 PRIPTR_PREFIX='"l"'
15597 else
15598 PRIPTR_PREFIX='"ll"'
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;
15615 main ()
15619 return 0;
15621 _ACEOF
15622 if ac_fn_c_try_compile "$LINENO"; then :
15623 PRIPTR_PREFIX='"'$glpfx'"'
15625 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15626 test -n "$PRIPTR_PREFIX" && break
15627 done
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
15642 /* Work if build is not clean. */
15643 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
15645 #include <limits.h>
15646 #if HAVE_STDINT_H
15647 #include <stdint.h>
15648 #endif
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];
15657 main ()
15661 return 0;
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
15669 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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;
15680 if test $APPLE_UNIVERSAL_BUILD = 0; then
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
15692 /* Work if build is not clean. */
15693 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
15695 #include <limits.h>
15696 #if HAVE_STDINT_H
15697 #include <stdint.h>
15698 #endif
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];
15707 main ()
15711 return 0;
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
15719 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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;
15730 else
15731 INT64_MAX_EQ_LONG_MAX=-1
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
15744 /* Work if build is not clean. */
15745 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
15747 #include <limits.h>
15748 #if HAVE_STDINT_H
15749 #include <stdint.h>
15750 #endif
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];
15759 main ()
15763 return 0;
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
15771 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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;
15782 if test $APPLE_UNIVERSAL_BUILD = 0; then
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
15794 /* Work if build is not clean. */
15795 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
15797 #include <limits.h>
15798 #if HAVE_STDINT_H
15799 #include <stdint.h>
15800 #endif
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];
15809 main ()
15813 return 0;
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
15821 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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;
15832 else
15833 UINT64_MAX_EQ_ULONG_MAX=-1
15839 GL_GNULIB_IMAXABS=0
15843 GL_GNULIB_IMAXDIV=0
15847 GL_GNULIB_STRTOIMAX=0
15851 GL_GNULIB_STRTOUMAX=0
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
15864 if test "$cross_compiling" = yes; then :
15866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15867 /* end confdefs.h. */
15869 #if defined arm || defined __arm || defined __arm__
15870 mixed_endianness
15871 #endif
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
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;
15892 _ACEOF
15893 if ac_fn_c_try_compile "$LINENO"; then :
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
15910 esac
15911 ac_prev=
15912 elif test "x$ac_word" = "x-arch"; then
15913 ac_prev=arch
15915 done
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>
15926 main ()
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
15935 return 0;
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>
15946 main ()
15948 #if BYTE_ORDER != BIG_ENDIAN
15949 not big endian
15950 #endif
15953 return 0;
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
15961 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15963 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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>
15972 main ()
15974 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
15975 bogus endian macros
15976 #endif
15979 return 0;
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>
15989 main ()
15991 #ifndef _BIG_ENDIAN
15992 not big endian
15993 #endif
15996 return 0;
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
16004 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16006 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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];
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];
16028 extern int foo;
16031 main ()
16033 return use_ascii (foo) == use_ebcdic (foo);
16035 return 0;
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
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
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
16057 main ()
16060 /* Are we little or big endian? From Harbison&Steele. */
16061 union
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;
16070 return 0;
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
16078 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16079 conftest.$ac_objext conftest.beam conftest.$ac_ext
16085 case $ac_cv_c_bigendian in #(
16086 yes)
16087 gl_cv_cc_double_expbit0="word 0 bit 20";; #(
16089 gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
16090 universal)
16092 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
16094 ;; #(
16096 gl_cv_cc_double_expbit0="unknown" ;;
16097 esac
16101 rm -f conftest*
16104 else
16105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16106 /* end confdefs.h. */
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)
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++)
16126 ored_words[i] |= m.word[i];
16127 anded_words[i] &= m.word[i];
16130 int main ()
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)
16153 size_t i;
16154 for (i = j + 1; i < NWORDS; i++)
16155 if (ored_words[i] != 0)
16157 fprintf (fp, "unknown");
16158 return (fclose (fp) != 0);
16160 for (i = 0; ; i++)
16161 if ((ored_words[j] >> i) & 1)
16163 fprintf (fp, "word %d bit %d", (int) j, (int) i);
16164 return (fclose (fp) != 0);
16167 fprintf (fp, "unknown");
16168 return (fclose (fp) != 0);
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"
16177 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16178 conftest.$ac_objext conftest.beam conftest.$ac_ext
16181 rm -f conftest.out
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 //'`
16191 cat >>confdefs.h <<_ACEOF
16192 #define DBL_EXPBIT0_WORD $word
16193 _ACEOF
16196 cat >>confdefs.h <<_ACEOF
16197 #define DBL_EXPBIT0_BIT $bit
16198 _ACEOF
16201 esac
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;
16218 _ACEOF
16219 if ac_fn_c_try_compile "$LINENO"; then :
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
16236 esac
16237 ac_prev=
16238 elif test "x$ac_word" = "x-arch"; then
16239 ac_prev=arch
16241 done
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>
16252 main ()
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
16261 return 0;
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>
16272 main ()
16274 #if BYTE_ORDER != BIG_ENDIAN
16275 not big endian
16276 #endif
16279 return 0;
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
16287 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16289 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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>
16298 main ()
16300 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
16301 bogus endian macros
16302 #endif
16305 return 0;
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>
16315 main ()
16317 #ifndef _BIG_ENDIAN
16318 not big endian
16319 #endif
16322 return 0;
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
16330 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16332 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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];
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];
16354 extern int foo;
16357 main ()
16359 return use_ascii (foo) == use_ebcdic (foo);
16361 return 0;
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
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
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
16383 main ()
16386 /* Are we little or big endian? From Harbison&Steele. */
16387 union
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;
16396 return 0;
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
16404 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16405 conftest.$ac_objext conftest.beam conftest.$ac_ext
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 ;; #(
16417 ;; #(
16418 universal)
16420 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
16422 ;; #(
16424 as_fn_error $? "unknown endianness
16425 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
16426 esac
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;
16442 REPLACE_NULL=0;
16443 HAVE_MAX_ALIGN_T=1;
16444 HAVE_WCHAR_T=1;
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';
16457 main ()
16461 return 0;
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
16469 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
16475 $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
16485 GL_GENERATE_STDDEF_H=false
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];
16509 main ()
16513 return 0;
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
16521 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
16531 if test $gt_cv_c_wchar_t = no; then
16532 HAVE_WCHAR_T=0
16533 GL_GENERATE_STDDEF_H=true
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];
16547 main ()
16551 return 0;
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
16559 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
16568 if $GL_GENERATE_STDDEF_H; then
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
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
16597 case "$host_os" in
16598 mingw*)
16599 gl_dirsep_regex='[/\\]'
16602 gl_dirsep_regex='\/'
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|^/[^/]|//&|
16615 gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16616 sed -n "$gl_absolute_header_sed"`
16618 gl_header=$gl_cv_absolute_stddef_h
16619 gl_cv_next_stddef_h='"'$gl_header'"'
16623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
16624 $as_echo "$gl_cv_next_stddef_h" >&6; }
16626 NEXT_STDDEF_H=$gl_cv_next_stddef_h
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
16635 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
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;
16657 main ()
16661 return 0;
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
16669 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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; }
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
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
16705 case "$host_os" in
16706 solaris*)
16708 $as_echo "#define _LCONV_C99 1" >>confdefs.h
16711 esac
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);
16724 main ()
16728 return 0;
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
16736 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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; }
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);
16753 main ()
16757 return 0;
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
16765 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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. */
16776 #ifdef _MSC_VER
16777 Special
16778 #endif
16780 _ACEOF
16781 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16782 $EGREP "Special" >/dev/null 2>&1; then :
16784 else
16785 REPLACE_STRUCT_LCONV=1
16787 rm -f conftest*
16790 *) REPLACE_STRUCT_LCONV=1 ;;
16791 esac
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
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
16822 case "$host_os" in
16823 mingw*)
16824 gl_dirsep_regex='[/\\]'
16827 gl_dirsep_regex='\/'
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|^/[^/]|//&|
16840 gl_cv_absolute_locale_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16841 sed -n "$gl_absolute_header_sed"`
16843 gl_header=$gl_cv_absolute_locale_h
16844 gl_cv_next_locale_h='"'$gl_header'"'
16848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_locale_h" >&5
16849 $as_echo "$gl_cv_next_locale_h" >&6; }
16851 NEXT_LOCALE_H=$gl_cv_next_locale_h
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
16860 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H=$gl_next_as_first_directive
16872 GL_GNULIB_LOCALECONV=0
16876 GL_GNULIB_SETLOCALE=0
16880 GL_GNULIB_SETLOCALE_NULL=0
16884 GL_GNULIB_DUPLOCALE=0
16888 GL_GNULIB_LOCALENAME=0
16894 gl_threads_api=none
16895 LIBTHREAD=
16896 LTLIBTHREAD=
16897 LIBMULTITHREAD=
16898 LTLIBMULTITHREAD=
16899 if test "$gl_use_threads" != no; then
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"
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
16918 main ()
16920 xyzzy();
16922 return 0;
16924 _ACEOF
16925 if ac_fn_c_try_link "$LINENO"; then :
16926 gl_cv_have_weak=maybe
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
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"
16945 rm -f conftest*
16948 else
16949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16950 /* end confdefs.h. */
16952 #include <stdio.h>
16953 #pragma weak fputs
16954 int main ()
16956 return (fputs == NULL);
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
16964 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16965 conftest.$ac_objext conftest.beam conftest.$ac_ext
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 ()
16985 return (pthread_mutexattr_gettype != NULL);
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
16992 esac
16994 esac
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)
17002 $as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
17005 esac
17007 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
17011 if test "$gl_use_threads" = isoc || test "$gl_use_threads" = isoc+posix; then
17013 gl_have_isoc_threads="$ac_cv_header_threads_h"
17015 if test "$gl_use_threads" = yes \
17016 || test "$gl_use_threads" = posix \
17017 || test "$gl_use_threads" = isoc+posix; then
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
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.
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;
17055 main ()
17057 pthread_mutex_lock (&m);
17058 pthread_mutexattr_init (&ma);
17060 return 0;
17062 _ACEOF
17063 if ac_fn_c_try_link "$LINENO"; then :
17064 gl_pthread_api=yes
17065 LIBPTHREAD=$gl_pthread
17066 LIBPMULTITHREAD=$gl_pthread
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
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
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
17095 rm -f conftest*
17098 esac
17099 echo "$as_me:17099: gl_pthread_in_glibc=$gl_pthread_in_glibc" >&5
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. */
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 ();
17124 main ()
17126 return pthread_kill ();
17128 return 0;
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
17136 rm -f core conftest.err conftest.$ac_objext \
17137 conftest$ac_exeext conftest.$ac_ext
17138 LIBS=$ac_check_lib_save_LIBS
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*)
17156 $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
17158 esac
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. */
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 ();
17183 main ()
17185 return pthread_kill ();
17187 return 0;
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
17195 rm -f core conftest.err conftest.$ac_objext \
17196 conftest$ac_exeext conftest.$ac_ext
17197 LIBS=$ac_check_lib_save_LIBS
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
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. */
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 ();
17227 main ()
17229 return pthread_kill ();
17231 return 0;
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
17239 rm -f core conftest.err conftest.$ac_objext \
17240 conftest$ac_exeext conftest.$ac_ext
17241 LIBS=$ac_check_lib_save_LIBS
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
17253 echo "$as_me:17253: LIBPMULTITHREAD=$LIBPMULTITHREAD" >&5
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; }
17261 if test $gl_pthread_api = yes; then
17263 $as_echo "#define HAVE_PTHREAD_API 1" >>confdefs.h
17267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17268 /* end confdefs.h. */
17269 #include <sched.h>
17271 main ()
17273 sched_yield ();
17275 return 0;
17277 _ACEOF
17278 if ac_fn_c_try_link "$LINENO"; then :
17279 LIB_SCHED_YIELD=
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. */
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 ();
17300 main ()
17302 return sched_yield ();
17304 return 0;
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
17312 rm -f core conftest.err conftest.$ac_objext \
17313 conftest$ac_exeext conftest.$ac_ext
17314 LIBS=$ac_check_lib_save_LIBS
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. */
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 ();
17339 main ()
17341 return sched_yield ();
17343 return 0;
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
17351 rm -f core conftest.err conftest.$ac_objext \
17352 conftest$ac_exeext conftest.$ac_ext
17353 LIBS=$ac_check_lib_save_LIBS
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
17365 rm -f core conftest.err conftest.$ac_objext \
17366 conftest$ac_exeext conftest.$ac_ext
17369 gl_pthreadlib_body_done=done
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'
17378 $as_echo "#define USE_ISOC_AND_POSIX_THREADS 1" >>confdefs.h
17380 LIBTHREAD= LTLIBTHREAD=
17381 else
17382 gl_threads_api=posix
17384 $as_echo "#define USE_POSIX_THREADS 1" >>confdefs.h
17386 if test -z "$LIBMULTITHREAD" && test -z "$LTLIBMULTITHREAD"; then
17388 $as_echo "#define USE_POSIX_THREADS_FROM_LIBC 1" >>confdefs.h
17390 else
17391 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
17393 $as_echo "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h
17395 LIBTHREAD= LTLIBTHREAD=
17396 else
17397 case "$host_os" in
17398 freebsd* | dragonfly* | midnightbsd*)
17399 if test "x$LIBTHREAD" != "x$LIBMULTITHREAD"; then
17401 $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
17405 esac
17411 if test $gl_threads_api = none; then
17412 if test "$gl_use_threads" = isoc && test "$gl_have_isoc_threads" = yes; then
17416 if test -z "$gl_stdthreadlib_body_done"; then
17419 case "$host_os" in
17420 mingw*)
17421 LIBSTDTHREAD=
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
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.
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;
17461 main ()
17463 pthread_mutex_lock (&m);
17464 pthread_mutexattr_init (&ma);
17466 return 0;
17468 _ACEOF
17469 if ac_fn_c_try_link "$LINENO"; then :
17470 gl_pthread_api=yes
17471 LIBPTHREAD=$gl_pthread
17472 LIBPMULTITHREAD=$gl_pthread
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
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
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
17501 rm -f conftest*
17504 esac
17505 echo "$as_me:17505: gl_pthread_in_glibc=$gl_pthread_in_glibc" >&5
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. */
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 ();
17530 main ()
17532 return pthread_kill ();
17534 return 0;
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
17542 rm -f core conftest.err conftest.$ac_objext \
17543 conftest$ac_exeext conftest.$ac_ext
17544 LIBS=$ac_check_lib_save_LIBS
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*)
17562 $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
17564 esac
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. */
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 ();
17589 main ()
17591 return pthread_kill ();
17593 return 0;
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
17601 rm -f core conftest.err conftest.$ac_objext \
17602 conftest$ac_exeext conftest.$ac_ext
17603 LIBS=$ac_check_lib_save_LIBS
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
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. */
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 ();
17633 main ()
17635 return pthread_kill ();
17637 return 0;
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
17645 rm -f core conftest.err conftest.$ac_objext \
17646 conftest$ac_exeext conftest.$ac_ext
17647 LIBS=$ac_check_lib_save_LIBS
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
17659 echo "$as_me:17659: LIBPMULTITHREAD=$LIBPMULTITHREAD" >&5
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; }
17667 if test $gl_pthread_api = yes; then
17669 $as_echo "#define HAVE_PTHREAD_API 1" >>confdefs.h
17673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17674 /* end confdefs.h. */
17675 #include <sched.h>
17677 main ()
17679 sched_yield ();
17681 return 0;
17683 _ACEOF
17684 if ac_fn_c_try_link "$LINENO"; then :
17685 LIB_SCHED_YIELD=
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. */
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 ();
17706 main ()
17708 return sched_yield ();
17710 return 0;
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
17718 rm -f core conftest.err conftest.$ac_objext \
17719 conftest$ac_exeext conftest.$ac_ext
17720 LIBS=$ac_check_lib_save_LIBS
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. */
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 ();
17745 main ()
17747 return sched_yield ();
17749 return 0;
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
17757 rm -f core conftest.err conftest.$ac_objext \
17758 conftest$ac_exeext conftest.$ac_ext
17759 LIBS=$ac_check_lib_save_LIBS
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
17771 rm -f core conftest.err conftest.$ac_objext \
17772 conftest$ac_exeext conftest.$ac_ext
17775 gl_pthreadlib_body_done=done
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
17788 done
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. */
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 ();
17811 main ()
17813 return thrd_create ();
17815 return 0;
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
17823 rm -f core conftest.err conftest.$ac_objext \
17824 conftest$ac_exeext conftest.$ac_ext
17825 LIBS=$ac_check_lib_save_LIBS
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 :
17831 LIBSTDTHREAD='-lstdthreads -lpthread'
17833 else
17835 LIBSTDTHREAD="$LIBPMULTITHREAD"
17840 else
17841 LIBSTDTHREAD="$LIBPMULTITHREAD $LIB_SCHED_YIELD"
17844 esac
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
17854 LIBTHREAD=$LIBSTDTHREAD LTLIBTHREAD=$LIBSTDTHREAD
17855 LIBMULTITHREAD=$LIBSTDTHREAD LTLIBMULTITHREAD=$LIBSTDTHREAD
17856 gl_threads_api=isoc
17858 $as_echo "#define USE_ISOC_THREADS 1" >>confdefs.h
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
17872 $as_echo "#define USE_WINDOWS_THREADS 1" >>confdefs.h
17876 esac
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; }
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>
17903 main ()
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)
17909 /* On rare machines where size_t fits in ptrdiff_t there
17910 is no problem. */
17911 #define NARROW_SIZE (SIZE_MAX <= PTRDIFF_MAX)
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__))
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
17926 return 0;
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
17934 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_malloc_ptrdiff" >&5
17938 $as_echo "$gl_cv_malloc_ptrdiff" >&6; }
17943 test "$gl_cv_malloc_ptrdiff" = yes || REPLACE_MALLOC_FOR_MALLOC_POSIX=1
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
17953 case "$host_os" in
17954 mingw*)
17955 gl_cv_func_malloc_posix=no ;;
17956 irix* | solaris*)
17958 gl_cv_func_malloc_posix=no ;;
17960 gl_cv_func_malloc_posix=yes ;;
17961 esac
17964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
17965 $as_echo "$gl_cv_func_malloc_posix" >&6; }
17971 if test "$gl_cv_func_malloc_posix" = yes; then
17973 $as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
17975 else
17976 REPLACE_MALLOC_FOR_MALLOC_POSIX=1
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
17997 else
17998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17999 /* end confdefs.h. */
18000 #include <stdlib.h>
18003 main ()
18005 void *p = malloc (0);
18006 int result = !p;
18007 free (p);
18008 return result;
18010 return 0;
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
18019 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18020 conftest.$ac_objext conftest.beam conftest.$ac_ext
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
18035 cat >>confdefs.h <<_ACEOF
18036 #define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
18037 _ACEOF
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
18062 if test $ac_cv_header_math_h = yes; then
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
18076 case "$host_os" in
18077 mingw*)
18078 gl_dirsep_regex='[/\\]'
18081 gl_dirsep_regex='\/'
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|^/[^/]|//&|
18094 gl_cv_absolute_math_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18095 sed -n "$gl_absolute_header_sed"`
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'>'
18105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
18106 $as_echo "$gl_cv_next_math_h" >&6; }
18108 NEXT_MATH_H=$gl_cv_next_math_h
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
18117 NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive
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>
18132 main ()
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;
18143 return 0;
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
18151 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
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>
18167 main ()
18169 /* Solaris 10 has a broken definition of HUGE_VAL. */
18170 double d = HUGE_VAL;
18171 return d == 0;
18173 return 0;
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
18181 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
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
18206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18207 /* end confdefs.h. */
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 ()
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
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;
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). */
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;
18274 return 0;
18275 #endif
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
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
18335 esac
18337 rm -fr conftest*
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
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
18353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18354 /* end confdefs.h. */
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
18390 const char *cs = nl_langinfo (CODESET);
18391 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
18392 return 1;
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;
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
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
18463 esac
18465 rm -fr conftest*
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
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
18482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18483 /* end confdefs.h. */
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 ()
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
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;
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). */
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;
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
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
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
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
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
18607 rm -fr conftest*
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
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
18630 _ACEOF
18631 if ac_fn_c_try_compile "$LINENO"; then :
18632 ac_cv_c_inline=$ac_kw
18634 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18635 test "$ac_cv_c_inline" != no && break
18636 done
18639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
18640 $as_echo "$ac_cv_c_inline" >&6; }
18642 case $ac_cv_c_inline in
18643 inline | yes) ;;
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
18655 esac
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
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. */
18679 #include <sys/mman.h>
18680 #ifdef MAP_ANONYMOUS
18681 I cannot identify this map
18682 #endif
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
18689 rm -f conftest*
18691 if test $gl_have_mmap_anonymous != yes; then
18692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18693 /* end confdefs.h. */
18695 #include <sys/mman.h>
18696 #ifdef MAP_ANON
18697 I cannot identify this map
18698 #endif
18700 _ACEOF
18701 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18702 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
18704 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
18706 gl_have_mmap_anonymous=yes
18708 rm -f conftest*
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
18715 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
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;
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
18798 else
18799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18800 /* end confdefs.h. */
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
18814 main ()
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
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;
18837 #endif
18838 if (fence)
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;
18852 /* Test against bug on Android 4.3. */
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;
18861 return result;
18864 return 0;
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
18872 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18873 conftest.$ac_objext conftest.beam conftest.$ac_ext
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
18887 GL_GNULIB_EXPLICIT_BZERO=0
18891 GL_GNULIB_FFSL=0
18895 GL_GNULIB_FFSLL=0
18899 GL_GNULIB_MEMCHR=0
18903 GL_GNULIB_MEMMEM=0
18907 GL_GNULIB_MEMPCPY=0
18911 GL_GNULIB_MEMRCHR=0
18915 GL_GNULIB_RAWMEMCHR=0
18919 GL_GNULIB_STPCPY=0
18923 GL_GNULIB_STPNCPY=0
18927 GL_GNULIB_STRCHRNUL=0
18931 GL_GNULIB_STRDUP=0
18935 GL_GNULIB_STRNCAT=0
18939 GL_GNULIB_STRNDUP=0
18943 GL_GNULIB_STRNLEN=0
18947 GL_GNULIB_STRPBRK=0
18951 GL_GNULIB_STRSEP=0
18955 GL_GNULIB_STRSTR=0
18959 GL_GNULIB_STRCASESTR=0
18963 GL_GNULIB_STRTOK_R=0
18967 GL_GNULIB_MBSLEN=0
18971 GL_GNULIB_MBSNLEN=0
18975 GL_GNULIB_MBSCHR=0
18979 GL_GNULIB_MBSRCHR=0
18983 GL_GNULIB_MBSSTR=0
18987 GL_GNULIB_MBSCASECMP=0
18991 GL_GNULIB_MBSNCASECMP=0
18995 GL_GNULIB_MBSPCASECMP=0
18999 GL_GNULIB_MBSCASESTR=0
19003 GL_GNULIB_MBSCSPN=0
19007 GL_GNULIB_MBSPBRK=0
19011 GL_GNULIB_MBSSPN=0
19015 GL_GNULIB_MBSSEP=0
19019 GL_GNULIB_MBSTOK_R=0
19023 GL_GNULIB_STRERROR=0
19027 GL_GNULIB_STRERROR_R=0
19031 GL_GNULIB_STRERRORNAME_NP=0
19035 GL_GNULIB_SIGABBREV_NP=0
19039 GL_GNULIB_SIGDESCR_NP=0
19043 GL_GNULIB_STRSIGNAL=0
19047 GL_GNULIB_STRVERSCMP=0
19051 GL_GNULIB_MDA_MEMCCPY=1
19055 GL_GNULIB_MDA_STRDUP=1
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
19066 cat >>confdefs.h <<_ACEOF
19067 #define HAVE_DECL_MEMMEM $ac_have_decl
19068 _ACEOF
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
19083 done
19085 if test $ac_cv_func_memmem = yes; then
19086 HAVE_MEMMEM=1
19087 else
19088 HAVE_MEMMEM=0
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. */
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
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"
19128 rm -f conftest*
19131 else
19132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19133 /* end confdefs.h. */
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
19141 main ()
19144 int result = 0;
19145 if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
19146 result |= 1;
19147 /* Check for empty needle behavior. */
19149 const char *haystack = "AAA";
19150 if (memmem (haystack, 3, (const char *) 1, 0) != haystack)
19151 result |= 2;
19153 return result;
19156 return 0;
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
19164 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19165 conftest.$ac_objext conftest.beam conftest.$ac_ext
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) ;;
19175 REPLACE_MEMMEM=1
19177 esac
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
19188 cat >>confdefs.h <<_ACEOF
19189 #define HAVE_DECL_MEMRCHR $ac_have_decl
19190 _ACEOF
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);
19206 main ()
19210 return 0;
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
19218 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
19224 $as_echo "#define HAVE_MINMAX_IN_LIMITS_H 1" >>confdefs.h
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);
19243 main ()
19247 return 0;
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
19255 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
19261 $as_echo "#define HAVE_MINMAX_IN_SYS_PARAM_H 1" >>confdefs.h
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;
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
19302 if test $ac_cv_header_netdb_h = yes; then
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
19316 case "$host_os" in
19317 mingw*)
19318 gl_dirsep_regex='[/\\]'
19321 gl_dirsep_regex='\/'
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|^/[^/]|//&|
19334 gl_cv_absolute_netdb_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19335 sed -n "$gl_absolute_header_sed"`
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'>'
19345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_netdb_h" >&5
19346 $as_echo "$gl_cv_next_netdb_h" >&6; }
19348 NEXT_NETDB_H=$gl_cv_next_netdb_h
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
19357 NEXT_AS_FIRST_DIRECTIVE_NETDB_H=$gl_next_as_first_directive
19362 if test $ac_cv_header_netdb_h = yes; then
19363 HAVE_NETDB_H=1
19364 else
19365 HAVE_NETDB_H=0
19375 GL_GNULIB_GETADDRINFO=0
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
19393 main ()
19395 return O_CLOEXEC;
19397 return 0;
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
19405 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_macro_O_CLOEXEC" >&5
19408 $as_echo "$gl_cv_macro_O_CLOEXEC" >&6; }
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
19418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19419 /* end confdefs.h. */
19420 #include <sys/types.h>
19422 main ()
19424 typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
19426 return 0;
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'
19434 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
19438 $as_echo "$gl_cv_promoted_mode_t" >&6; }
19440 cat >>confdefs.h <<_ACEOF
19441 #define PROMOTED_MODE_T $gl_cv_promoted_mode_t
19442 _ACEOF
19454 HAVE_PSELECT=1;
19455 REPLACE_PSELECT=0;
19456 REPLACE_SELECT=0;
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
19469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19470 /* end confdefs.h. */
19471 #include <sys/select.h>
19473 main ()
19475 struct timeval b;
19477 return 0;
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
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>
19491 main ()
19493 int memset; int bzero;
19495 return 0;
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>
19504 main ()
19507 #undef memset
19508 #define memset nonexistent_memset
19509 extern
19510 #ifdef __cplusplus
19512 #endif
19513 void *memset (void *, int, unsigned long);
19514 #undef bzero
19515 #define bzero nonexistent_bzero
19516 extern
19517 #ifdef __cplusplus
19519 #endif
19520 void bzero (void *, unsigned long);
19521 fd_set fds;
19522 FD_ZERO (&fds);
19525 return 0;
19528 _ACEOF
19529 if ac_fn_c_try_link "$LINENO"; then :
19531 else
19532 gl_cv_header_sys_select_h_selfcontained=no
19534 rm -f core conftest.err conftest.$ac_objext \
19535 conftest$ac_exeext conftest.$ac_ext
19538 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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; }
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
19562 if test $ac_cv_header_sys_select_h = yes; then
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
19576 case "$host_os" in
19577 mingw*)
19578 gl_dirsep_regex='[/\\]'
19581 gl_dirsep_regex='\/'
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|^/[^/]|//&|
19594 gl_cv_absolute_sys_select_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19595 sed -n "$gl_absolute_header_sed"`
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'>'
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; }
19608 NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
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
19617 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
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
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
19643 done
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
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
19676 done
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
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
19695 gl_save_LIBS="$LIBS"
19696 LIBS="$LIBS -lws2_32"
19697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19698 /* end confdefs.h. */
19700 #ifdef HAVE_WINSOCK2_H
19701 # include <winsock2.h>
19702 #endif
19704 main ()
19707 WORD wVersionRequested = MAKEWORD(1, 1);
19708 WSADATA wsaData;
19709 int err = WSAStartup(wVersionRequested, &wsaData);
19710 WSACleanup ();
19713 return 0;
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
19722 rm -f core conftest.err conftest.$ac_objext \
19723 conftest$ac_exeext conftest.$ac_ext
19724 LIBS="$gl_save_LIBS"
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
19731 $as_echo "#define WINDOWS_SOCKETS 1" >>confdefs.h
19733 LIBSOCKET='-lws2_32'
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
19742 gl_cv_lib_socket=
19743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19744 /* end confdefs.h. */
19745 extern
19746 #ifdef __cplusplus
19748 #endif
19749 char setsockopt();
19751 main ()
19753 setsockopt();
19755 return 0;
19757 _ACEOF
19758 if ac_fn_c_try_link "$LINENO"; then :
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
19768 #endif
19769 char setsockopt();
19771 main ()
19773 setsockopt();
19775 return 0;
19777 _ACEOF
19778 if ac_fn_c_try_link "$LINENO"; then :
19779 gl_cv_lib_socket="-lsocket"
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
19790 #endif
19791 char setsockopt();
19793 main ()
19795 setsockopt();
19797 return 0;
19799 _ACEOF
19800 if ac_fn_c_try_link "$LINENO"; then :
19801 gl_cv_lib_socket="-lnetwork"
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
19812 #endif
19813 char setsockopt();
19815 main ()
19817 setsockopt();
19819 return 0;
19821 _ACEOF
19822 if ac_fn_c_try_link "$LINENO"; then :
19823 gl_cv_lib_socket="-lnet"
19825 rm -f core conftest.err conftest.$ac_objext \
19826 conftest$ac_exeext conftest.$ac_ext
19829 LIBS="$gl_save_LIBS"
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"
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"
19856 GL_GNULIB_PSELECT=0
19860 GL_GNULIB_SELECT=0
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
19871 cat >>confdefs.h <<_ACEOF
19872 #define HAVE_DECL_SETENV $ac_have_decl
19873 _ACEOF
19880 if test $ac_cv_have_decl_setenv = no; then
19881 HAVE_DECL_SETENV=0
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
19898 done
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
19909 done
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;
19922 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
19924 HAVE_SIGHANDLER_T=1;
19925 REPLACE_PTHREAD_SIGMASK=0;
19926 REPLACE_RAISE=0;
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>
19935 if test "x$ac_cv_type_sigset_t" = xyes; then :
19937 cat >>confdefs.h <<_ACEOF
19938 #define HAVE_SIGSET_T 1
19939 _ACEOF
19941 gl_cv_type_sigset_t=yes
19942 else
19943 gl_cv_type_sigset_t=no
19946 if test $gl_cv_type_sigset_t != yes; then
19947 HAVE_SIGSET_T=0
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
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
19981 case "$host_os" in
19982 mingw*)
19983 gl_dirsep_regex='[/\\]'
19986 gl_dirsep_regex='\/'
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|^/[^/]|//&|
19999 gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20000 sed -n "$gl_absolute_header_sed"`
20002 gl_header=$gl_cv_absolute_signal_h
20003 gl_cv_next_signal_h='"'$gl_header'"'
20007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
20008 $as_echo "$gl_cv_next_signal_h" >&6; }
20010 NEXT_SIGNAL_H=$gl_cv_next_signal_h
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
20019 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
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>
20031 if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes; then :
20033 else
20034 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
20043 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
20044 #include <signal.h>
20047 if test "x$ac_cv_type_sighandler_t" = xyes; then :
20049 else
20050 HAVE_SIGHANDLER_T=0
20062 GL_GNULIB_PTHREAD_SIGMASK=0
20066 GL_GNULIB_RAISE=0
20070 GL_GNULIB_SIGNAL_H_SIGPIPE=0
20074 GL_GNULIB_SIGPROCMASK=0
20078 GL_GNULIB_SIGACTION=0
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. */
20090 #include <stdbool.h>
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
20113 #ifndef __bool_true_false_are_defined
20114 "error: __bool_true_false_are_defined is not defined"
20115 #endif
20117 struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
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
20138 Bool q = true;
20139 Bool *pq = &q;
20140 bool *qq = &q;
20143 main ()
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);
20154 return 0;
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
20162 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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 :
20169 cat >>confdefs.h <<_ACEOF
20170 #define HAVE__BOOL 1
20171 _ACEOF
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
20186 cat >>confdefs.h <<_ACEOF
20187 #define HAVE_DECL_FCLOSEALL $ac_have_decl
20188 _ACEOF
20193 $as_echo "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
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
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
20223 case "$host_os" in
20224 mingw*)
20225 gl_dirsep_regex='[/\\]'
20228 gl_dirsep_regex='\/'
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|^/[^/]|//&|
20241 gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20242 sed -n "$gl_absolute_header_sed"`
20244 gl_header=$gl_cv_absolute_stdio_h
20245 gl_cv_next_stdio_h='"'$gl_header'"'
20249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
20250 $as_echo "$gl_cv_next_stdio_h" >&6; }
20252 NEXT_STDIO_H=$gl_cv_next_stdio_h
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
20261 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
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. */
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
20287 main ()
20291 return 0;
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
20299 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
20305 $as_echo "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
20321 if test $ac_cv_have_decl_fcloseall = no; then
20322 HAVE_DECL_FCLOSEALL=0
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
20332 cat >>confdefs.h <<_ACEOF
20333 #define HAVE_DECL_ECVT $ac_have_decl
20334 _ACEOF
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
20343 cat >>confdefs.h <<_ACEOF
20344 #define HAVE_DECL_FCVT $ac_have_decl
20345 _ACEOF
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
20354 cat >>confdefs.h <<_ACEOF
20355 #define HAVE_DECL_GCVT $ac_have_decl
20356 _ACEOF
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
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
20388 case "$host_os" in
20389 mingw*)
20390 gl_dirsep_regex='[/\\]'
20393 gl_dirsep_regex='\/'
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|^/[^/]|//&|
20406 gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20407 sed -n "$gl_absolute_header_sed"`
20409 gl_header=$gl_cv_absolute_stdlib_h
20410 gl_cv_next_stdlib_h='"'$gl_header'"'
20414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
20415 $as_echo "$gl_cv_next_stdlib_h" >&6; }
20417 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
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
20426 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
20439 if test $ac_cv_have_decl_ecvt = no; then
20440 HAVE_DECL_ECVT=0
20443 if test $ac_cv_have_decl_fcvt = no; then
20444 HAVE_DECL_FCVT=0
20447 if test $ac_cv_have_decl_gcvt = no; then
20448 HAVE_DECL_GCVT=0
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
20458 cat >>confdefs.h <<_ACEOF
20459 #define HAVE_DECL_STRDUP $ac_have_decl
20460 _ACEOF
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
20481 else
20482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20483 /* end confdefs.h. */
20484 #include <string.h>
20485 #include <errno.h>
20488 main ()
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;
20500 return 0;
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
20508 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20509 conftest.$ac_objext conftest.beam conftest.$ac_ext
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) ;;
20519 REPLACE_STRERROR_0=1
20521 $as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h
20524 esac
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);
20551 main ()
20555 return 0;
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
20563 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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 :
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
20587 else
20588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20589 /* end confdefs.h. */
20590 #include <errno.h>
20591 #include <string.h>
20594 main ()
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;
20621 return 0;
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
20629 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20630 conftest.$ac_objext conftest.beam conftest.$ac_ext
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
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"
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
20656 #endif
20657 int __xpg_strerror_r(int, char *, size_t);
20660 main ()
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;
20677 return 0;
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
20685 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20686 conftest.$ac_objext conftest.beam conftest.$ac_ext
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; }
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
20705 cat >>confdefs.h <<_ACEOF
20706 #define HAVE_DECL_STRERROR_R $ac_have_decl
20707 _ACEOF
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
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
20743 case "$host_os" in
20744 mingw*)
20745 gl_dirsep_regex='[/\\]'
20748 gl_dirsep_regex='\/'
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|^/[^/]|//&|
20761 gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20762 sed -n "$gl_absolute_header_sed"`
20764 gl_header=$gl_cv_absolute_string_h
20765 gl_cv_next_string_h='"'$gl_header'"'
20769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
20770 $as_echo "$gl_cv_next_string_h" >&6; }
20772 NEXT_STRING_H=$gl_cv_next_string_h
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
20781 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
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
20816 if test $ac_cv_header_strings_h = yes; then
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
20830 case "$host_os" in
20831 mingw*)
20832 gl_dirsep_regex='[/\\]'
20835 gl_dirsep_regex='\/'
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|^/[^/]|//&|
20848 gl_cv_absolute_strings_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20849 sed -n "$gl_absolute_header_sed"`
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'>'
20859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_strings_h" >&5
20860 $as_echo "$gl_cv_next_strings_h" >&6; }
20862 NEXT_STRINGS_H=$gl_cv_next_strings_h
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
20871 NEXT_AS_FIRST_DIRECTIVE_STRINGS_H=$gl_next_as_first_directive
20876 if test $ac_cv_header_strings_h = yes; then
20877 HAVE_STRINGS_H=1
20878 else
20879 HAVE_STRINGS_H=0
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
20894 cat >>confdefs.h <<_ACEOF
20895 #define HAVE_DECL_STRNLEN $ac_have_decl
20896 _ACEOF
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. */
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
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"
20936 rm -f conftest*
20939 else
20940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20941 /* end confdefs.h. */
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
20955 main ()
20957 return !!strstr (HAYSTACK, NEEDLE);
20960 return 0;
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
20968 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20969 conftest.$ac_objext conftest.beam conftest.$ac_ext
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) ;;
20979 REPLACE_STRSTR=1
20981 esac
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
20991 cat >>confdefs.h <<_ACEOF
20992 #define HAVE_DECL_STRTOK_R $ac_have_decl
20993 _ACEOF
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
21017 if test $ac_cv_header_sys_random_h = yes; then
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
21031 case "$host_os" in
21032 mingw*)
21033 gl_dirsep_regex='[/\\]'
21036 gl_dirsep_regex='\/'
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|^/[^/]|//&|
21049 gl_cv_absolute_sys_random_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21050 sed -n "$gl_absolute_header_sed"`
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'>'
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; }
21063 NEXT_SYS_RANDOM_H=$gl_cv_next_sys_random_h
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
21072 NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H=$gl_next_as_first_directive
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
21085 if test $ac_cv_header_sys_random_h = yes; then
21086 UNISTD_H_HAVE_SYS_RANDOM_H=1
21105 $as_echo "#define _USE_STD_STAT 1" >>confdefs.h
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
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
21136 case "$host_os" in
21137 mingw*)
21138 gl_dirsep_regex='[/\\]'
21141 gl_dirsep_regex='\/'
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|^/[^/]|//&|
21154 gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21155 sed -n "$gl_absolute_header_sed"`
21157 gl_header=$gl_cv_absolute_sys_types_h
21158 gl_cv_next_sys_types_h='"'$gl_header'"'
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; }
21165 NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
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
21174 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
21187 WINDOWS_STAT_INODES=0
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
21217 if test $ac_cv_header_sys_uio_h = yes; then
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
21231 case "$host_os" in
21232 mingw*)
21233 gl_dirsep_regex='[/\\]'
21236 gl_dirsep_regex='\/'
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|^/[^/]|//&|
21249 gl_cv_absolute_sys_uio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21250 sed -n "$gl_absolute_header_sed"`
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'>'
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; }
21263 NEXT_SYS_UIO_H=$gl_cv_next_sys_uio_h
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
21272 NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H=$gl_next_as_first_directive
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
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
21311 if test $ac_cv_header_sys_wait_h = yes; then
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
21325 case "$host_os" in
21326 mingw*)
21327 gl_dirsep_regex='[/\\]'
21330 gl_dirsep_regex='\/'
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|^/[^/]|//&|
21343 gl_cv_absolute_sys_wait_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21344 sed -n "$gl_absolute_header_sed"`
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'>'
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; }
21357 NEXT_SYS_WAIT_H=$gl_cv_next_sys_wait_h
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
21366 NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H=$gl_next_as_first_directive
21380 GL_GNULIB_WAITPID=0
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;
21400 : ${GNULIB_GETTIMEOFDAY=0};
21401 REPLACE_GMTIME=0;
21402 REPLACE_LOCALTIME=0;
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>
21416 main ()
21418 static struct timespec x; x.tv_sec = x.tv_nsec;
21420 return 0;
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
21428 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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; }
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>
21450 main ()
21452 static struct timespec x; x.tv_sec = x.tv_nsec;
21454 return 0;
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
21462 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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>
21479 main ()
21481 static struct timespec x; x.tv_sec = x.tv_nsec;
21483 return 0;
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
21491 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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>
21508 main ()
21510 static struct timespec x; x.tv_sec = x.tv_nsec;
21512 return 0;
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
21520 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
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
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
21566 case "$host_os" in
21567 mingw*)
21568 gl_dirsep_regex='[/\\]'
21571 gl_dirsep_regex='\/'
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|^/[^/]|//&|
21584 gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21585 sed -n "$gl_absolute_header_sed"`
21587 gl_header=$gl_cv_absolute_time_h
21588 gl_cv_next_time_h='"'$gl_header'"'
21592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
21593 $as_echo "$gl_cv_next_time_h" >&6; }
21595 NEXT_TIME_H=$gl_cv_next_time_h
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
21604 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
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>
21623 main ()
21625 static int x = TIME_UTC; x++;
21627 return 0;
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
21635 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
21648 GL_GNULIB_CTIME=0
21652 GL_GNULIB_MKTIME=0
21656 GL_GNULIB_LOCALTIME=0
21660 GL_GNULIB_NANOSLEEP=0
21664 GL_GNULIB_STRFTIME=0
21668 GL_GNULIB_STRPTIME=0
21672 GL_GNULIB_TIMEGM=0
21676 GL_GNULIB_TIMESPEC_GET=0
21680 GL_GNULIB_TIMESPEC_GETRES=0
21684 GL_GNULIB_TIME_R=0
21688 GL_GNULIB_TIME_RZ=0
21692 GL_GNULIB_TZSET=0
21696 GL_GNULIB_MDA_TZSET=1
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
21709 cat >>confdefs.h <<_ACEOF
21710 #define HAVE_DECL_EXECVPE $ac_have_decl
21711 _ACEOF
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
21734 if test $ac_cv_header_unistd_h = yes; then
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
21748 case "$host_os" in
21749 mingw*)
21750 gl_dirsep_regex='[/\\]'
21753 gl_dirsep_regex='\/'
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|^/[^/]|//&|
21766 gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21767 sed -n "$gl_absolute_header_sed"`
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'>'
21777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
21778 $as_echo "$gl_cv_next_unistd_h" >&6; }
21780 NEXT_UNISTD_H=$gl_cv_next_unistd_h
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
21789 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
21794 if test $ac_cv_header_unistd_h = yes; then
21795 HAVE_UNISTD_H=1
21796 else
21797 HAVE_UNISTD_H=0
21812 if test $ac_cv_have_decl_execvpe = no; then
21813 HAVE_DECL_EXECVPE=0
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
21823 cat >>confdefs.h <<_ACEOF
21824 #define HAVE_DECL_UNSETENV $ac_have_decl
21825 _ACEOF
21831 if test $ac_cv_header_crtdefs_h = yes; then
21832 HAVE_CRTDEFS_H=1
21833 else
21834 HAVE_CRTDEFS_H=0
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
21859 if test $ac_cv_header_wchar_h = yes; then
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
21873 case "$host_os" in
21874 mingw*)
21875 gl_dirsep_regex='[/\\]'
21878 gl_dirsep_regex='\/'
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|^/[^/]|//&|
21891 gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21892 sed -n "$gl_absolute_header_sed"`
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'>'
21902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
21903 $as_echo "$gl_cv_next_wchar_h" >&6; }
21905 NEXT_WCHAR_H=$gl_cv_next_wchar_h
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
21914 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
21919 if test $ac_cv_header_wchar_h = yes; then
21920 HAVE_WCHAR_H=1
21921 else
21922 HAVE_WCHAR_H=0
21929 if test $gt_cv_c_wint_t = yes; then
21930 HAVE_WINT_T=1
21931 else
21932 HAVE_WINT_T=0
21944 ac_fn_c_check_decl "$LINENO" "wcsdup" "ac_cv_have_decl_wcsdup" "
21945 #include <wchar.h>
21948 if test "x$ac_cv_have_decl_wcsdup" = xyes; then :
21949 ac_have_decl=1
21950 else
21951 ac_have_decl=0
21954 cat >>confdefs.h <<_ACEOF
21955 #define HAVE_DECL_WCSDUP $ac_have_decl
21956 _ACEOF
21958 if test $ac_cv_have_decl_wcsdup = no; then
21959 HAVE_DECL_WCSDUP=0
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;
21979 if test $ac_cv_func_iswcntrl = yes; then
21980 HAVE_ISWCNTRL=1
21981 else
21982 HAVE_ISWCNTRL=0
21987 if test $gt_cv_c_wint_t = yes; then
21988 HAVE_WINT_T=1
21989 else
21990 HAVE_WINT_T=0
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
22014 if test $ac_cv_header_wctype_h = yes; then
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
22028 case "$host_os" in
22029 mingw*)
22030 gl_dirsep_regex='[/\\]'
22033 gl_dirsep_regex='\/'
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|^/[^/]|//&|
22046 gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22047 sed -n "$gl_absolute_header_sed"`
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'>'
22057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
22058 $as_echo "$gl_cv_next_wctype_h" >&6; }
22060 NEXT_WCTYPE_H=$gl_cv_next_wctype_h
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
22069 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
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
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
22090 main ()
22094 return 0;
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"
22102 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22104 else
22105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22106 /* end confdefs.h. */
22108 #include <wchar.h>
22109 #include <wctype.h>
22110 int main () { return iswprint ('x') == 0; }
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
22118 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22119 conftest.$ac_objext conftest.beam conftest.$ac_ext
22124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
22125 $as_echo "$gl_cv_func_iswcntrl_works" >&6; }
22127 HAVE_WCTYPE_H=1
22128 else
22129 HAVE_WCTYPE_H=0
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
22143 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
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
22159 done
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
22170 if test "x$ac_cv_have_decl_towlower" = xyes; then :
22171 ac_have_decl=1
22172 else
22173 ac_have_decl=0
22176 cat >>confdefs.h <<_ACEOF
22177 #define HAVE_DECL_TOWLOWER $ac_have_decl
22178 _ACEOF
22180 if test $ac_cv_have_decl_towlower = yes; then
22181 REPLACE_TOWLOWER=1
22182 else
22183 REPLACE_TOWLOWER=0
22189 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
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;
22207 main ()
22211 return 0;
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
22219 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
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;
22240 main ()
22244 return 0;
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
22252 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
22267 GL_GNULIB_ISWBLANK=0
22271 GL_GNULIB_ISWDIGIT=0
22275 GL_GNULIB_ISWXDIGIT=0
22279 GL_GNULIB_WCTYPE=0
22283 GL_GNULIB_ISWCTYPE=0
22287 GL_GNULIB_WCTRANS=0
22291 GL_GNULIB_TOWCTRANS=0
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
22323 rm -f conftest*
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
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
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
22376 rm -f conftest.c conftest.out
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=
22390 gl_cond_libtool=false
22391 gl_libdeps=
22392 gl_ltlibdeps=
22393 gl_m4_base='import/m4'
22406 gl_source_base='import'
22407 gl_source_base_prefix=
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=
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='#'
22432 GL_GNULIB_ACCEPT=1
22438 $as_echo "#define GNULIB_TEST_ACCEPT 1" >>confdefs.h
22444 if test $ac_cv_func_alloca_works = no; then
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
22456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22457 /* end confdefs.h. */
22459 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
22460 Need own alloca
22461 #endif
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
22470 rm -f conftest*
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
22478 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
22480 GL_GENERATE_ALLOCA_H=true
22481 else
22482 GL_GENERATE_ALLOCA_H=false
22484 else
22485 GL_GENERATE_ALLOCA_H=true
22488 if test $ac_cv_working_alloca_h = yes; then
22489 HAVE_ALLOCA_H=1
22490 else
22491 HAVE_ALLOCA_H=0
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"
22506 *) echo "*** GL_GENERATE_ALLOCA_H is not set correctly" 1>&2; exit 1 ;;
22507 esac
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=
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='#'
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=
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='#'
22560 GL_GNULIB_BIND=1
22566 $as_echo "#define GNULIB_TEST_BIND 1" >>confdefs.h
22576 if test $ac_cv_func_btowc = no; then
22577 HAVE_BTOWC=0
22578 else
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
22589 if test "$cross_compiling" = yes; then :
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
22600 else
22601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22602 /* end confdefs.h. */
22604 #include <wchar.h>
22605 int main ()
22607 if (btowc ('\0') != 0)
22608 return 1;
22609 return 0;
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
22617 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22618 conftest.$ac_objext conftest.beam conftest.$ac_ext
22623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_nul" >&5
22624 $as_echo "$gl_cv_func_btowc_nul" >&6; }
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
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 :
22643 else
22644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22645 /* end confdefs.h. */
22647 #include <locale.h>
22648 #include <stdio.h>
22649 #include <wchar.h>
22650 int main ()
22652 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
22654 if (btowc (EOF) != WEOF)
22655 return 1;
22657 return 0;
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
22665 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22666 conftest.$ac_objext conftest.beam conftest.$ac_ext
22672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5
22673 $as_echo "$gl_cv_func_btowc_eof" >&6; }
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
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=
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='#'
22699 if test -z "$GL_COND_OBJ_BTOWC_TRUE"; then :
22720 GL_GNULIB_BTOWC=1
22726 $as_echo "#define GNULIB_TEST_BTOWC 1" >>confdefs.h
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. */
22740 main (int argc, char **argv)
22742 argc = __builtin_expect (argc, 100);
22743 return argv[argc != 100][0];
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. */
22752 #include <builtins.h>
22754 main (int argc, char **argv)
22756 argc = __builtin_expect (argc, 100);
22757 return argv[argc != 100][0];
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
22765 rm -f core conftest.err conftest.$ac_objext \
22766 conftest$ac_exeext conftest.$ac_ext
22768 rm -f core conftest.err conftest.$ac_objext \
22769 conftest$ac_exeext conftest.$ac_ext
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
22776 elif test "$gl_cv___builtin_expect" = "in <builtins.h>"; then
22777 $as_echo "#define HAVE___BUILTIN_EXPECT 2" >>confdefs.h
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
22795 else
22796 case "$gl_cv_func_realpath_works" in
22797 *yes)
22800 REPLACE_CANONICALIZE_FILE_NAME=1
22801 REPLACE_REALPATH=1
22803 esac
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=
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='#'
22822 cat >>confdefs.h <<_ACEOF
22823 #define GNULIB_CANONICALIZE_LGPL 1
22824 _ACEOF
22836 GL_GNULIB_CANONICALIZE_FILE_NAME=1
22842 $as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
22855 GL_GNULIB_REALPATH=1
22861 $as_echo "#define GNULIB_TEST_REALPATH 1" >>confdefs.h
22874 GL_GNULIB_CHDIR=1
22880 $as_echo "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
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. */
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
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
22924 rm -f conftest*
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; }
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=
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='#'
22944 if test -z "$GL_COND_OBJ_CHDIR_LONG_TRUE"; then :
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=
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='#'
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=
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='#'
22987 GL_GNULIB_CHOWN=1
22993 $as_echo "#define GNULIB_TEST_CHOWN 1" >>confdefs.h
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.
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=
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. */
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 ();
23026 main ()
23028 return clock_gettime ();
23030 return 0;
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"
23040 if ac_fn_c_try_link "$LINENO"; then :
23041 ac_cv_search_clock_gettime=$ac_res
23043 rm -f core conftest.err conftest.$ac_objext \
23044 conftest$ac_exeext
23045 if ${ac_cv_search_clock_gettime+:} false; then :
23046 break
23048 done
23049 if ${ac_cv_search_clock_gettime+:} false; then :
23051 else
23052 ac_cv_search_clock_gettime=no
23054 rm conftest.$ac_ext
23055 LIBS=$ac_func_search_save_LIBS
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
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
23076 done
23078 LIBS=$gl_saved_libs
23082 $as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
23089 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
23090 REPLACE_CLOSE=1
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
23109 done
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
23121 if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
23122 REPLACE_CLOSE=1
23126 if test $REPLACE_CLOSE = 0; then
23130 if test $ac_cv_func_fchdir = no; then
23131 HAVE_FCHDIR=0
23134 if test $HAVE_FCHDIR = 0; then
23135 REPLACE_CLOSE=1
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=
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='#'
23163 GL_GNULIB_CLOSE=1
23169 $as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
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
23185 done
23187 if test $ac_cv_func_closedir = no; then
23188 HAVE_CLOSEDIR=0
23194 if test $ac_cv_func_fchdir = no; then
23195 HAVE_FCHDIR=0
23198 if test $HAVE_FCHDIR = 0; then
23199 if test $HAVE_CLOSEDIR = 1; then
23200 REPLACE_CLOSEDIR=1
23204 case $host_os,$HAVE_CLOSEDIR in
23205 os2*,1)
23206 REPLACE_CLOSEDIR=1;;
23207 esac
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=
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='#'
23232 GL_GNULIB_CLOSEDIR=1
23238 $as_echo "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
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=
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='#'
23266 GL_GNULIB_CONNECT=1
23272 $as_echo "#define GNULIB_TEST_CONNECT 1" >>confdefs.h
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
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>
23308 main ()
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;
23326 return 0;
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
23334 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23335 conftest.$ac_objext conftest.beam conftest.$ac_ext
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)
23344 $as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h
23347 esac
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. */
23358 #include <sys/types.h>
23359 #include <dirent.h>
23362 main ()
23364 struct dirent dp; dp.d_type = 0;
23366 return 0;
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
23374 rm -f core conftest.err conftest.$ac_objext \
23375 conftest$ac_exeext conftest.$ac_ext
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
23383 $as_echo "#define HAVE_STRUCT_DIRENT_D_TYPE 1" >>confdefs.h
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
23409 done
23411 ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
23412 #include <dirent.h>
23414 if test "x$ac_cv_have_decl_dirfd" = xyes; then :
23415 ac_have_decl=1
23416 else
23417 ac_have_decl=0
23420 cat >>confdefs.h <<_ACEOF
23421 #define HAVE_DECL_DIRFD $ac_have_decl
23422 _ACEOF
23424 if test $ac_cv_have_decl_dirfd = no; then
23425 HAVE_DECL_DIRFD=0
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. */
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
23448 rm -f conftest*
23451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
23452 $as_echo "$gl_cv_func_dirfd_macro" >&6; }
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
23461 $as_echo "#define REPLACE_DIRFD 1" >>confdefs.h
23463 esac
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=
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='#'
23479 if test -z "$GL_COND_OBJ_DIRFD_TRUE"; then :
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
23488 dirfd_save_CFLAGS=$CFLAGS
23489 for ac_expr in d_fd dd_fd; do
23491 CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
23492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23493 /* end confdefs.h. */
23495 #include <sys/types.h>
23496 #include <dirent.h>
23498 main ()
23500 DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
23502 return 0;
23504 _ACEOF
23505 if ac_fn_c_try_compile "$LINENO"; then :
23506 dir_fd_found=yes
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
23515 gl_cv_sys_dir_fd_member_name=$ac_expr
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
23523 cat >>confdefs.h <<_ACEOF
23524 #define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name
23525 _ACEOF
23541 GL_GNULIB_DIRFD=1
23547 $as_echo "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
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 ;;
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
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
23586 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
23594 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
23595 REPLACE_DUP=1
23602 if test $ac_cv_func_fchdir = no; then
23603 HAVE_FCHDIR=0
23606 if test $HAVE_FCHDIR = 0; then
23607 REPLACE_DUP=1
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
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>
23630 $gl_mda_defines
23633 main ()
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;
23640 return 0;
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
23649 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23650 conftest.$ac_objext conftest.beam conftest.$ac_ext
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) ;;
23660 REPLACE_DUP=1
23662 esac
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=
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='#'
23678 if test -z "$GL_COND_OBJ_DUP_TRUE"; then :
23692 GL_GNULIB_DUP=1
23698 $as_echo "#define GNULIB_TEST_DUP 1" >>confdefs.h
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. */
23732 #include <errno.h>
23733 #include <fcntl.h>
23734 #include <limits.h>
23735 #include <sys/resource.h>
23736 #include <unistd.h>
23739 $gl_mda_defines
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
23749 main ()
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. */
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);
23790 return result;
23792 return 0;
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
23801 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23802 conftest.$ac_objext conftest.beam conftest.$ac_ext
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) ;;
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
23822 done
23825 esac
23830 if test $ac_cv_func_fchdir = no; then
23831 HAVE_FCHDIR=0
23834 if test $HAVE_FCHDIR = 0; then
23835 REPLACE_DUP2=1
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=
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='#'
23853 if test -z "$GL_COND_OBJ_DUP2_TRUE"; then :
23867 GL_GNULIB_DUP2=1
23873 $as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h
23887 GL_GNULIB_ENVIRON=1
23893 $as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
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"
23909 *) echo "*** GL_GENERATE_ERRNO_H is not set correctly" 1>&2; exit 1 ;;
23910 esac
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=
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='#'
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>
23941 main ()
23943 error_at_line (0, 0, "", 0, "an error occurred");
23945 return 0;
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
23953 rm -f core conftest.err conftest.$ac_objext \
23954 conftest$ac_exeext conftest.$ac_ext
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; }
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=
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='#'
23973 if test -z "$GL_COND_OBJ_ERROR_TRUE"; then :
23990 if test $ac_cv_have_decl_fchdir = no; then
23991 HAVE_DECL_FCHDIR=0
23995 if test $HAVE_FCHDIR = 0; then
23997 $as_echo "#define REPLACE_FCHDIR 1" >>confdefs.h
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
24016 else
24017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24018 /* end confdefs.h. */
24019 #include <fcntl.h>
24022 $gl_mda_defines
24025 main ()
24027 return open(".", O_RDONLY) < 0;
24029 return 0;
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
24037 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24038 conftest.$ac_objext conftest.beam conftest.$ac_ext
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) ;;
24048 $as_echo "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h
24051 esac
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=
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='#'
24068 if test -z "$GL_COND_OBJ_FCHDIR_TRUE"; then :
24082 GL_GNULIB_FCHDIR=1
24088 $as_echo "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h
24097 if test $ac_cv_func_fcntl = no; then
24101 if test $ac_cv_func_fcntl = no; then
24102 HAVE_FCNTL=0
24103 else
24104 REPLACE_FCNTL=1
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>
24129 $gl_mda_defines
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
24139 main ()
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 */
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;
24163 close (fd);
24165 return result;
24167 return 0;
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
24175 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24176 conftest.$ac_objext conftest.beam conftest.$ac_ext
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) ;;
24187 if test $ac_cv_func_fcntl = no; then
24188 HAVE_FCNTL=0
24189 else
24190 REPLACE_FCNTL=1
24194 $as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
24196 esac
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
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[])
24217 if (argc == 1)
24218 /* parent process */
24220 if (fcntl (1, F_DUPFD_CLOEXEC, 10) < 0)
24221 return 1;
24222 return execl ("./conftest", "./conftest", "child", NULL);
24224 else
24225 /* child process */
24226 return (fcntl (10, F_GETFL) < 0 ? 0 : 42);
24230 _ACEOF
24231 if ac_fn_c_try_run "$LINENO"; then :
24232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24233 /* end confdefs.h. */
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
24242 main ()
24246 return 0;
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"
24254 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24256 else
24257 gl_cv_func_fcntl_f_dupfd_cloexec=no
24259 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24260 conftest.$ac_objext conftest.beam conftest.$ac_ext
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) ;;
24272 if test $ac_cv_func_fcntl = no; then
24273 HAVE_FCNTL=0
24274 else
24275 REPLACE_FCNTL=1
24279 esac
24285 if test $ac_cv_func_fchdir = no; then
24286 HAVE_FCHDIR=0
24289 if test $HAVE_FCHDIR = 0; then
24293 if test $ac_cv_func_fcntl = no; then
24294 HAVE_FCNTL=0
24295 else
24296 REPLACE_FCNTL=1
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=
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='#'
24325 GL_GNULIB_FCNTL=1
24331 $as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
24344 cat >>confdefs.h <<_ACEOF
24345 #define GNULIB_FD_SAFER_FLAG 1
24346 _ACEOF
24354 ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
24355 #include <dirent.h>
24358 if test "x$ac_cv_have_decl_fdopendir" = xyes; then :
24359 ac_have_decl=1
24360 else
24361 ac_have_decl=0
24364 cat >>confdefs.h <<_ACEOF
24365 #define HAVE_DECL_FDOPENDIR $ac_have_decl
24366 _ACEOF
24367 if test $ac_have_decl = 1; then :
24369 else
24370 HAVE_DECL_FDOPENDIR=0
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
24392 else
24393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24394 /* end confdefs.h. */
24396 #include <dirent.h>
24397 #include <fcntl.h>
24398 #include <unistd.h>
24401 $gl_mda_defines
24403 #if !HAVE_DECL_FDOPENDIR
24404 extern
24405 # ifdef __cplusplus
24407 # endif
24408 DIR *fdopendir (int);
24409 #endif
24412 main ()
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;
24422 return 0;
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
24430 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24431 conftest.$ac_objext conftest.beam conftest.$ac_ext
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) ;;
24440 REPLACE_FDOPENDIR=1
24442 esac
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=
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='#'
24468 GL_GNULIB_FDOPENDIR=1
24474 $as_echo "#define GNULIB_TEST_FDOPENDIR 1" >>confdefs.h
24480 cat >>confdefs.h <<_ACEOF
24481 #define GNULIB_FDOPENDIR 1
24482 _ACEOF
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;
24499 main ()
24501 int (*func) (int) = ffs;
24502 return func (x);
24505 return 0;
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
24514 rm -f core conftest.err conftest.$ac_objext \
24515 conftest$ac_exeext conftest.$ac_ext
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
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=
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='#'
24547 GL_GNULIB_FFS=1
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[]; };
24569 main ()
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;
24581 return 0;
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
24589 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
24595 $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
24597 else
24598 $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
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
24611 freebsd* | dragonfly*)
24612 case "$host_cpu" in
24613 i[34567]86 )
24614 GL_GENERATE_FLOAT_H=true
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
24627 _ACEOF
24628 if ac_fn_c_try_compile "$LINENO"; then :
24630 else
24631 GL_GENERATE_FLOAT_H=true
24633 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24635 esac
24637 linux*)
24638 case "$host_cpu" in
24639 powerpc*)
24640 GL_GENERATE_FLOAT_H=true
24642 esac
24644 esac
24645 case "$host_os" in
24646 aix* | freebsd* | dragonfly* | linux*)
24647 if $GL_GENERATE_FLOAT_H; then
24648 REPLACE_FLOAT_LDBL=1
24651 esac
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
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
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"
24677 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
24684 else
24685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24686 /* end confdefs.h. */
24688 int i = -1;
24689 volatile long double ld;
24690 int main ()
24692 ld += i * 1.0L;
24693 if (ld > 0)
24694 return 1;
24695 return 0;
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
24703 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24704 conftest.$ac_objext conftest.beam conftest.$ac_ext
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
24716 esac
24718 if $GL_GENERATE_FLOAT_H; then
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
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
24747 case "$host_os" in
24748 mingw*)
24749 gl_dirsep_regex='[/\\]'
24752 gl_dirsep_regex='\/'
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|^/[^/]|//&|
24765 gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24766 sed -n "$gl_absolute_header_sed"`
24768 gl_header=$gl_cv_absolute_float_h
24769 gl_cv_next_float_h='"'$gl_header'"'
24773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
24774 $as_echo "$gl_cv_next_float_h" >&6; }
24776 NEXT_FLOAT_H=$gl_cv_next_float_h
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
24785 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
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"
24804 *) echo "*** GL_GENERATE_FLOAT_H is not set correctly" 1>&2; exit 1 ;;
24805 esac
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=
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='#'
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=
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='#'
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=
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='#'
24858 gl_fnmatch_required_lowercase=`
24859 echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]'
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'
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
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)
24893 return fnmatch (pattern, string, flags) == 0;
24895 static int
24896 n (char const *pattern, char const *string, int flags)
24898 return fnmatch (pattern, string, flags) == FNM_NOMATCH;
24902 main ()
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;
24970 return 0;
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"
24978 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24979 conftest.$ac_objext conftest.beam conftest.$ac_ext
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
24993 if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
25000 GL_GENERATE_FNMATCH_H=true
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"
25015 *) echo "*** GL_GENERATE_FNMATCH_H is not set correctly" 1>&2; exit 1 ;;
25016 esac
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=
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='#'
25036 if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
25045 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
25061 GL_GNULIB_FNMATCH=1
25067 $as_echo "#define GNULIB_TEST_FNMATCH 1" >>confdefs.h
25076 if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
25085 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
25094 cat >>confdefs.h <<_ACEOF
25095 #define GNULIB_FNMATCH_GNU 1
25096 _ACEOF
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"
25116 *) echo "*** GL_GENERATE_FNMATCH_H is not set correctly" 1>&2; exit 1 ;;
25117 esac
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=
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='#'
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>
25151 main ()
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
25161 return 0;
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
25169 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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; }
25175 case $gl_cv_func_free_preserves_errno in
25176 *yes)
25178 $as_echo "#define HAVE_FREE_POSIX 1" >>confdefs.h
25181 *) REPLACE_FREE=1 ;;
25182 esac
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=
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='#'
25198 if test -z "$GL_COND_OBJ_FREE_TRUE"; then :
25212 GL_GNULIB_FREE_POSIX=1
25218 $as_echo "#define GNULIB_TEST_FREE_POSIX 1" >>confdefs.h
25223 if test $gl_func_frexp != yes; then
25232 gl_LIBOBJS="$gl_LIBOBJS frexp.$ac_objext"
25244 GL_GNULIB_FREXP=1
25250 $as_echo "#define GNULIB_TEST_FREXP 1" >>confdefs.h
25255 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
25264 gl_LIBOBJS="$gl_LIBOBJS frexpl.$ac_objext"
25276 GL_GNULIB_FREXPL=1
25282 $as_echo "#define GNULIB_TEST_FREXPL 1" >>confdefs.h
25290 case "$host_os" in
25291 mingw* | solaris*)
25292 REPLACE_FSTAT=1
25294 esac
25300 if test $ac_cv_func_fchdir = no; then
25301 HAVE_FCHDIR=0
25304 if test $HAVE_FCHDIR = 0; then
25305 case "$gl_cv_func_open_directory_works" in
25306 *yes) ;;
25308 REPLACE_FSTAT=1
25310 esac
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=
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='#'
25328 if test -z "$GL_COND_OBJ_FSTAT_TRUE"; then :
25330 case "$host_os" in
25331 mingw*)
25340 gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
25343 esac
25360 GL_GNULIB_FSTAT=1
25366 $as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
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
25391 else
25392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25393 /* end confdefs.h. */
25395 #include <fcntl.h>
25396 #include <sys/stat.h>
25398 main (void)
25400 struct stat a;
25401 return fstatat (AT_FDCWD, ".", &a, 0) != 0;
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
25410 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25411 conftest.$ac_objext conftest.beam conftest.$ac_ext
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; }
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
25424 case $host_os in
25425 solaris*)
25426 REPLACE_FSTATAT=1 ;;
25427 esac
25429 case $REPLACE_FSTATAT,$gl_cv_func_fstatat_zero_flag in
25430 1,*yes)
25432 $as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
25435 esac
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=
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='#'
25461 GL_GNULIB_FSTATAT=1
25467 $as_echo "#define GNULIB_TEST_FSTATAT 1" >>confdefs.h
25476 gl_abort_bug=no
25477 case "$host_os" in
25478 mingw*)
25479 gl_cv_func_getcwd_path_max=yes
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
25511 else
25512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25513 /* end confdefs.h. */
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>
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
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
25559 /* Use the getcwd function, not any macro. */
25560 #undef getcwd
25564 $gl_mda_defines
25567 #ifndef S_IRWXU
25568 # define S_IRWXU 0700
25569 #endif
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)
25576 /* The length of "../". */
25577 #define DOTDOTSLASH_LEN 3
25579 /* Leftover bytes in the buffer, to work around library or OS bugs. */
25580 #define BUF_SLOP 20
25583 main ()
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;
25606 if (cwd == NULL)
25607 exit (10);
25609 cwd_len = initial_cwd_len = strlen (cwd);
25611 while (1)
25613 size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN);
25614 char *c = NULL;
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)
25629 if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
25630 #ifdef __linux__
25631 if (! (errno == EINVAL))
25632 #endif
25633 fail = 20;
25634 break;
25637 if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE)
25639 struct stat sb;
25641 c = getcwd (buf, PATH_MAX);
25642 if (!c && errno == ENOENT)
25644 fail = 11;
25645 break;
25647 if (c)
25649 fail = 31;
25650 break;
25652 if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
25654 fail = 21;
25655 break;
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))
25664 fail = 32;
25665 break;
25669 if (dotdot_max <= cwd_len - initial_cwd_len)
25671 if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len)
25672 break;
25673 c = getcwd (buf, cwd_len + 1);
25674 if (!c)
25676 if (! (errno == ERANGE || errno == ENOENT
25677 || is_ENAMETOOLONG (errno)))
25679 fail = 22;
25680 break;
25682 if (AT_FDCWD || errno == ERANGE || errno == ENOENT)
25684 fail = 12;
25685 break;
25690 if (c && strlen (c) != cwd_len)
25692 fail = 23;
25693 break;
25695 ++n_chdirs;
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. */
25702 size_t i;
25704 /* Try rmdir first, in case the chdir failed. */
25705 rmdir (DIR_NAME);
25706 for (i = 0; i <= n_chdirs; i++)
25708 if (chdir ("..") < 0)
25709 break;
25710 if (rmdir (DIR_NAME) != 0)
25711 break;
25715 exit (fail);
25716 #endif
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
25730 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25731 conftest.$ac_objext conftest.beam conftest.$ac_ext
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; }
25739 case "$gl_cv_func_getcwd_null" in
25740 *yes)
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>
25756 main ()
25758 return getpagesize();
25760 return 0;
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
25769 rm -f core conftest.err conftest.$ac_objext \
25770 conftest$ac_exeext conftest.$ac_ext
25773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getpagesize" >&5
25774 $as_echo "$gl_cv_func_getpagesize" >&6; }
25776 if test $gl_cv_func_getpagesize = yes; then
25778 cat >>confdefs.h <<_ACEOF
25779 #define HAVE_GETPAGESIZE 1
25780 _ACEOF
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
25799 else
25800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25801 /* end confdefs.h. */
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>
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
25836 $gl_mda_defines
25839 #ifndef S_IRWXU
25840 # define S_IRWXU 0700
25841 #endif
25843 /* FIXME: skip the run-test altogether on systems without getpagesize. */
25844 #if ! HAVE_GETPAGESIZE
25845 # define getpagesize() 0
25846 #endif
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)
25854 main ()
25856 char *cwd;
25857 size_t initial_cwd_len;
25858 int fail = 0;
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;
25870 cwd = getcwd (NULL, 0);
25871 if (cwd == NULL)
25872 return 2;
25874 initial_cwd_len = strlen (cwd);
25875 free (cwd);
25877 if (1)
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++)
25885 if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0)
25887 if (! (errno == ERANGE || errno == ENAMETOOLONG
25888 || errno == ENOENT))
25889 fail = 3; /* Unable to construct deep hierarchy. */
25890 break;
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);
25902 /* Call rmdir first, in case the above chdir failed. */
25903 rmdir (dir_name);
25904 while (0 < d--)
25906 if (chdir ("..") < 0)
25908 fail = 5;
25909 break;
25911 rmdir (dir_name);
25915 return fail;
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
25930 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25931 conftest.$ac_objext conftest.beam conftest.$ac_ext
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
25945 esac
25948 esac
25950 esac
25951 case "$gl_cv_func_getcwd_path_max" in
25952 *"no" | *"no, it has the AIX bug") ;;
25955 $as_echo "#define HAVE_MINIMALLY_WORKING_GETCWD 1" >>confdefs.h
25958 esac
25959 case "$gl_cv_func_getcwd_path_max" in
25960 *"no, but it is partly working")
25962 $as_echo "#define HAVE_PARTLY_WORKING_GETCWD 1" >>confdefs.h
25965 *"yes, but with shorter paths")
25967 $as_echo "#define HAVE_GETCWD_SHORTER 1" >>confdefs.h
25970 esac
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
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=
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='#'
25993 if test -z "$GL_COND_OBJ_GETCWD_TRUE"; then :
26004 cat >>confdefs.h <<_ACEOF
26005 #define GNULIB_GETCWD 1
26006 _ACEOF
26018 GL_GNULIB_GETCWD=1
26024 $as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
26033 case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
26034 *yes,yes) ;;
26036 REPLACE_GETCWD=1
26038 esac
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=
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='#'
26063 GL_GNULIB_GETCWD=1
26069 $as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
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. */
26093 #include <features.h>
26094 #ifdef __GNU_LIBRARY__
26095 #if (__GLIBC__ >= 2) && !defined __UCLIBC__
26096 Lucky GNU user
26097 #endif
26098 #endif
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
26111 rm -f conftest*
26114 else
26115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26116 /* end confdefs.h. */
26118 # include <stdio.h>
26119 # include <stdlib.h>
26120 # include <string.h>
26121 int main ()
26123 FILE *in = fopen ("./conftest.data", "r");
26124 if (!in)
26125 return 1;
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);
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);
26145 fclose (in);
26146 return 0;
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
26155 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26156 conftest.$ac_objext conftest.beam conftest.$ac_ext
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
26171 if test $ac_cv_have_decl_getdelim = no; then
26172 HAVE_DECL_GETDELIM=0
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=
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='#'
26189 if test -z "$GL_COND_OBJ_GETDELIM_TRUE"; then :
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
26202 done
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
26211 cat >>confdefs.h <<_ACEOF
26212 #define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
26213 _ACEOF
26227 GL_GNULIB_GETDELIM=1
26233 $as_echo "#define GNULIB_TEST_GETDELIM 1" >>confdefs.h
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)" ;;
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
26259 else
26260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26261 /* end confdefs.h. */
26263 #include <unistd.h>
26266 $gl_mda_defines
26270 main ()
26272 int size = getdtablesize();
26273 if (dup2 (0, getdtablesize()) != -1)
26274 return 1;
26275 if (size != getdtablesize())
26276 return 2;
26279 return 0;
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
26287 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26288 conftest.$ac_objext conftest.beam conftest.$ac_ext
26292 esac
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
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=
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='#'
26319 if test -z "$GL_COND_OBJ_GETDTABLESIZE_TRUE"; then :
26333 GL_GNULIB_GETDTABLESIZE=1
26339 $as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
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
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. */
26369 #include <features.h>
26370 #ifdef __GNU_LIBRARY__
26371 #if (__GLIBC__ >= 2) && !defined __UCLIBC__
26372 Lucky GNU user
26373 #endif
26374 #endif
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
26387 rm -f conftest*
26390 else
26391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26392 /* end confdefs.h. */
26394 # include <stdio.h>
26395 # include <stdlib.h>
26396 # include <string.h>
26397 int main ()
26399 FILE *in = fopen ("./conftest.data", "r");
26400 if (!in)
26401 return 1;
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);
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);
26421 fclose (in);
26422 return 0;
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
26431 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26432 conftest.$ac_objext conftest.beam conftest.$ac_ext
26437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_working_getline" >&5
26438 $as_echo "$am_cv_func_working_getline" >&6; }
26441 if test $ac_cv_have_decl_getline = no; then
26442 HAVE_DECL_GETLINE=0
26445 case "$am_cv_func_working_getline" in
26446 *yes) ;;
26448 REPLACE_GETLINE=1
26450 esac
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=
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='#'
26466 if test -z "$GL_COND_OBJ_GETLINE_TRUE"; then :
26482 GL_GNULIB_GETLINE=1
26488 $as_echo "#define GNULIB_TEST_GETLINE 1" >>confdefs.h
26498 if test $ac_cv_have_decl_getlogin_r = no; then
26499 HAVE_DECL_GETLOGIN_R=0
26503 if test $ac_cv_func_getlogin_r = no; then
26504 HAVE_GETLOGIN_R=0
26505 else
26506 HAVE_GETLOGIN_R=1
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
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 :
26522 else
26523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26524 /* end confdefs.h. */
26526 #include <stddef.h>
26527 #include <string.h>
26528 #include <unistd.h>
26529 #if !HAVE_DECL_GETLOGIN_R
26530 extern
26531 # ifdef __cplusplus
26533 # endif
26534 int getlogin_r (char *, size_t);
26535 #endif
26537 main (void)
26539 int result = 0;
26540 char buf[100];
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)
26548 size_t n = strlen (buf);
26549 if (getlogin_r (buf, n) == 0)
26550 result |= 4;
26552 return result;
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
26560 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26561 conftest.$ac_objext conftest.beam conftest.$ac_ext
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
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=
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='#'
26588 if test -z "$GL_COND_OBJ_GETLOGIN_R_TRUE"; then :
26604 GL_GNULIB_GETLOGIN_R=1
26610 $as_echo "#define GNULIB_TEST_GETLOGIN_R 1" >>confdefs.h
26618 ac_found=0
26619 ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
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
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
26634 ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
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
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
26649 ac_fn_c_check_decl "$LINENO" "__argv" "ac_cv_have_decl___argv" "#include <stdlib.h>
26651 if test "x$ac_cv_have_decl___argv" = xyes; then :
26652 ac_have_decl=1
26653 else
26654 ac_have_decl=0
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
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
26675 gl_cv_var___progname=
26676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26677 /* end confdefs.h. */
26678 extern char *__progname;
26680 main ()
26682 return *__progname;
26685 return 0;
26687 _ACEOF
26688 if ac_fn_c_try_link "$LINENO"; then :
26689 gl_cv_var___progname=yes
26692 rm -f core conftest.err conftest.$ac_objext \
26693 conftest$ac_exeext conftest.$ac_ext
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
26701 $as_echo "#define HAVE_VAR___PROGNAME 1" >>confdefs.h
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);
26728 main ()
26732 return 0;
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
26741 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
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>
26758 if test "x$ac_cv_header_bcrypt_h" = xyes; then :
26759 cat >>confdefs.h <<_ACEOF
26760 #define HAVE_BCRYPT_H 1
26761 _ACEOF
26765 done
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>
26776 main ()
26778 #if !(_WIN32_WINNT >= _WIN32_WINNT_WIN7)
26779 cannot assume it
26780 #endif
26783 return 0;
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
26792 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
26799 $as_echo "#define HAVE_LIB_BCRYPT 1" >>confdefs.h
26801 LIB_GETRANDOM='-lbcrypt'
26802 else
26803 LIB_GETRANDOM='-ladvapi32'
26807 LIB_GETRANDOM= ;;
26808 esac
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=
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='#'
26834 GL_GNULIB_GETRANDOM=1
26840 $as_echo "#define GNULIB_TEST_GETRANDOM 1" >>confdefs.h
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);
26869 main ()
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);
26882 return 0;
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);
26894 main ()
26898 return 0;
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
26906 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26908 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
26917 if test $REPLACE_STRUCT_TIMEVAL = 1; then
26918 REPLACE_GETTIMEOFDAY=1
26920 case "$host_os" in
26921 mingw*) REPLACE_GETTIMEOFDAY=1 ;;
26922 esac
26925 cat >>confdefs.h <<_ACEOF
26926 #define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
26927 _ACEOF
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=
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='#'
26944 if test -z "$GL_COND_OBJ_GETTIMEOFDAY_TRUE"; then :
26958 GL_GNULIB_GETTIMEOFDAY=1
26964 $as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
26972 if test $ac_cv_func_glob = no; then
26973 HAVE_GLOB=0
26974 else
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
26991 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
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
27013 if test $gl_cv_glob_lists_symlinks = maybe; then
27014 if test "$cross_compiling" = yes; then :
27017 else
27018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27019 /* end confdefs.h. */
27020 #include <stddef.h>
27021 #include <glob.h>
27023 main ()
27025 glob_t found;
27026 if (glob ("conf*-globtest", 0, NULL, &found) == GLOB_NOMATCH)
27027 return 1;
27028 globfree (&found);
27031 return 0;
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
27039 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27040 conftest.$ac_objext conftest.beam conftest.$ac_ext
27044 rm -f conf$$-globtest
27045 else
27046 gl_cv_glob_lists_symlinks="$gl_cross_guess_normal"
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
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
27073 if test $gl_cv_glob_omit_nondir_symlinks = maybe; then
27074 if test "$cross_compiling" = yes; then :
27077 else
27078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27079 /* end confdefs.h. */
27080 #include <stddef.h>
27081 #include <glob.h>
27083 main ()
27085 glob_t found;
27086 if (glob ("conf*-globtest/", 0, NULL, &found) != GLOB_NOMATCH)
27087 return 1;
27088 globfree (&found);
27091 return 0;
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
27099 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27100 conftest.$ac_objext conftest.beam conftest.$ac_ext
27104 rm -f conf$$-file conf$$-globtest
27105 else
27106 gl_cv_glob_omit_nondir_symlinks="$gl_cross_guess_normal"
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
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
27128 if test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1; then
27135 GL_GENERATE_GLOB_H=true
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"
27150 *) echo "*** GL_GENERATE_GLOB_H is not set correctly" 1>&2; exit 1 ;;
27151 esac
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=
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='#'
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=
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='#'
27185 if test -z "$GL_COND_OBJ_GLOB_TRUE"; then :
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=
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='#'
27217 GL_GNULIB_GLOB=1
27223 $as_echo "#define GNULIB_TEST_GLOB 1" >>confdefs.h
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"
27244 *) echo "*** GL_GENERATE_GLOB_H is not set correctly" 1>&2; exit 1 ;;
27245 esac
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=
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='#'
27267 LIB_HARD_LOCALE="$LIB_SETLOCALE_NULL"
27276 HAVE_INET_NTOP=1
27277 INET_NTOP_LIB=
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
27293 done
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
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>
27309 if test "x$ac_cv_have_decl_inet_ntop" = xyes; then :
27310 ac_have_decl=1
27311 else
27312 ac_have_decl=0
27315 cat >>confdefs.h <<_ACEOF
27316 #define HAVE_DECL_INET_NTOP $ac_have_decl
27317 _ACEOF
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
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. */
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 ();
27343 main ()
27345 return inet_ntop ();
27347 return 0;
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"
27357 if ac_fn_c_try_link "$LINENO"; then :
27358 ac_cv_search_inet_ntop=$ac_res
27360 rm -f core conftest.err conftest.$ac_objext \
27361 conftest$ac_exeext
27362 if ${ac_cv_search_inet_ntop+:} false; then :
27363 break
27365 done
27366 if ${ac_cv_search_inet_ntop+:} false; then :
27368 else
27369 ac_cv_search_inet_ntop=no
27371 rm conftest.$ac_ext
27372 LIBS=$ac_func_search_save_LIBS
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"
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
27390 done
27392 if test $ac_cv_func_inet_ntop = no; then
27393 HAVE_INET_NTOP=0
27398 LIBS=$gl_save_LIBS
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"
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
27412 if test "x$ac_cv_have_decl_inet_ntop" = xyes; then :
27413 ac_have_decl=1
27414 else
27415 ac_have_decl=0
27418 cat >>confdefs.h <<_ACEOF
27419 #define HAVE_DECL_INET_NTOP $ac_have_decl
27420 _ACEOF
27422 if test $ac_cv_have_decl_inet_ntop = no; then
27423 HAVE_DECL_INET_NTOP=0
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=
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='#'
27442 if test -z "$GL_COND_OBJ_INET_NTOP_TRUE"; then :
27458 GL_GNULIB_INET_NTOP=1
27476 if test $ac_cv_func_isblank = no; then
27477 HAVE_ISBLANK=0
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=
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='#'
27496 cat >>confdefs.h <<_ACEOF
27497 #define GNULIB_ISBLANK 1
27498 _ACEOF
27510 GL_GNULIB_ISBLANK=1
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
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;
27535 main ()
27537 return isnand (x);
27539 return 0;
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
27547 rm -f core conftest.err conftest.$ac_objext \
27548 conftest$ac_exeext conftest.$ac_ext
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; }
27554 gl_func_isnand_no_libm=$gl_cv_func_isnand_no_libm
27555 if test $gl_cv_func_isnand_no_libm = yes; then
27557 $as_echo "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h
27561 if test $gl_func_isnand_no_libm != yes; then
27570 gl_LIBOBJS="$gl_LIBOBJS isnand.$ac_objext"
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
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;
27596 main ()
27598 return isnanl (x);
27600 return 0;
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
27608 rm -f core conftest.err conftest.$ac_objext \
27609 conftest$ac_exeext conftest.$ac_ext
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; }
27615 gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm
27616 if test $gl_func_isnanl_no_libm = yes; then
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
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. */
27633 #ifdef __MINGW32__
27634 Known
27635 #endif
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"
27644 rm -f conftest*
27647 *) gl_cv_func_isnanl_works="guessing yes" ;;
27648 esac
27650 else
27651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27652 /* end confdefs.h. */
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 ()
27673 double zero = 0.0;
27674 return zero / zero;
27676 #else
27677 # define NaNl() (0.0L / 0.0L)
27678 #endif
27679 int main ()
27681 int result = 0;
27683 if (!isnanl (NaNl ()))
27684 result |= 1;
27687 memory_long_double m;
27688 unsigned int i;
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;
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 \
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;
27722 /* Signalling NaN. */
27723 static memory_long_double x =
27724 { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
27725 if (!isnanl (x.value))
27726 result |= 2;
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;
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;
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;
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;
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;
27759 #endif
27761 return result;
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
27769 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27770 conftest.$ac_objext conftest.beam conftest.$ac_ext
27775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
27776 $as_echo "$gl_cv_func_isnanl_works" >&6; }
27778 case "$gl_cv_func_isnanl_works" in
27779 *yes) ;;
27780 *) gl_func_isnanl_no_libm=no ;;
27781 esac
27783 if test $gl_func_isnanl_no_libm = yes; then
27785 $as_echo "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h
27789 if test $gl_func_isnanl_no_libm != yes; then
27798 gl_LIBOBJS="$gl_LIBOBJS isnanl.$ac_objext"
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
27809 if test "$cross_compiling" = yes; then :
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. */
27818 #ifdef __MINGW32__
27819 Known
27820 #endif
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"
27827 rm -f conftest*
27829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27830 /* end confdefs.h. */
27832 #ifdef _MSC_VER
27833 Known
27834 #endif
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"
27841 rm -f conftest*
27844 esac
27846 else
27847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27848 /* end confdefs.h. */
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)
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++)
27870 ored_words[i] |= m.word[i];
27871 anded_words[i] &= m.word[i];
27874 int main ()
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)
27895 size_t i;
27896 for (i = j + 1; i < NWORDS; i++)
27897 if (ored_words[i] != 0)
27899 fprintf (fp, "unknown");
27900 return (fclose (fp) != 0);
27902 for (i = 0; ; i++)
27903 if ((ored_words[j] >> i) & 1)
27905 fprintf (fp, "word %d bit %d", (int) j, (int) i);
27906 return (fclose (fp) != 0);
27909 fprintf (fp, "unknown");
27910 return (fclose (fp) != 0);
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"
27919 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27920 conftest.$ac_objext conftest.beam conftest.$ac_ext
27923 rm -f conftest.out
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 //'`
27933 cat >>confdefs.h <<_ACEOF
27934 #define LDBL_EXPBIT0_WORD $word
27935 _ACEOF
27938 cat >>confdefs.h <<_ACEOF
27939 #define LDBL_EXPBIT0_BIT $bit
27940 _ACEOF
27943 esac
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; }
27960 main ()
27962 return foo ();
27964 return 0;
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
27972 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
27978 $as_echo "#define HAVE___INLINE 1" >>confdefs.h
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"
27994 *) echo "*** GL_GENERATE_LIMITS_H is not set correctly" 1>&2; exit 1 ;;
27995 esac
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=
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='#'
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=
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='#'
28040 GL_GNULIB_LISTEN=1
28046 $as_echo "#define GNULIB_TEST_LISTEN 1" >>confdefs.h
28053 LOCALCHARSET_TESTS_ENVIRONMENT=
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>
28070 if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then :
28071 has_rwlock=true
28073 $as_echo "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
28077 if $has_rwlock; then
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"
28103 # If we don't know, obey --enable-cross-guesses.
28104 *) gl_cv_pthread_rwlock_rdlock_prefer_writer="$gl_cross_guess_normal" ;;
28105 esac
28107 else
28108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28109 /* end confdefs.h. */
28111 #include <errno.h>
28112 #include <pthread.h>
28113 #include <stdlib.h>
28114 #include <unistd.h>
28116 #define SUCCEED() exit (0)
28117 #define FAILURE() exit (1)
28118 #define UNEXPECTED(n) (exit (10 + (n)))
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. */
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;
28135 static void *
28136 timer_func (void *ignored)
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 ();
28149 static void *
28150 reader2_func (void *ignored)
28152 int err;
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);
28180 static void *
28181 writer_func (void *ignored)
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;
28200 main ()
28202 reader1 = pthread_self ();
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 (;;)
28218 sleep (1);
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
28228 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28229 conftest.$ac_objext conftest.beam conftest.$ac_ext
28232 LIBS="$save_LIBS"
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)
28240 $as_echo "#define HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER 1" >>confdefs.h
28243 esac
28246 # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
28247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28248 /* end confdefs.h. */
28250 #include <pthread.h>
28252 main ()
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
28266 return 0;
28268 _ACEOF
28269 if ac_fn_c_try_compile "$LINENO"; then :
28271 $as_echo "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h
28274 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28280 cat >>confdefs.h <<_ACEOF
28281 #define GNULIB_LOCK 1
28282 _ACEOF
28289 if test $ac_cv_func_lstat = yes; then
28291 case $host_os,$gl_cv_func_lstat_dereferences_slashed_symlink in
28292 solaris* | *no)
28293 REPLACE_LSTAT=1
28295 esac
28296 else
28297 HAVE_LSTAT=0
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=
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='#'
28314 if test -z "$GL_COND_OBJ_LSTAT_TRUE"; then :
28328 GL_GNULIB_LSTAT=1
28334 $as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
28339 if test $REPLACE_MALLOC_FOR_MALLOC_POSIX = 1; then
28348 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
28360 GL_GNULIB_MALLOC_POSIX=1
28366 $as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
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
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
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 :
28417 else
28418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28419 /* end confdefs.h. */
28421 #include <locale.h>
28422 #include <string.h>
28423 #include <wchar.h>
28424 int main ()
28426 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
28428 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
28429 mbstate_t state;
28430 wchar_t wc;
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;
28437 return 0;
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
28445 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28446 conftest.$ac_objext conftest.beam conftest.$ac_ext
28449 else
28450 if test $LOCALE_FR_UTF8 != none; then
28451 if test "$cross_compiling" = yes; then :
28453 else
28454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28455 /* end confdefs.h. */
28457 #include <locale.h>
28458 #include <string.h>
28459 #include <wchar.h>
28460 int main ()
28462 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
28464 const char input[] = "B\303\274\303\237er"; /* "Büßer" */
28465 mbstate_t state;
28466 wchar_t wc;
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;
28473 return 0;
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
28481 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28482 conftest.$ac_objext conftest.beam conftest.$ac_ext
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; }
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
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 :
28510 else
28511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28512 /* end confdefs.h. */
28514 #include <locale.h>
28515 #include <stdlib.h>
28516 #include <string.h>
28517 #include <wchar.h>
28518 int main ()
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)
28525 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
28526 mbstate_t state;
28527 wchar_t wc;
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;
28534 return 0;
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
28542 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28543 conftest.$ac_objext conftest.beam conftest.$ac_ext
28549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
28550 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
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
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>
28573 if test "x$ac_cv_have_decl_mbrtowc" = xyes; then :
28574 ac_have_decl=1
28575 else
28576 ac_have_decl=0
28579 cat >>confdefs.h <<_ACEOF
28580 #define HAVE_DECL_MBRTOWC $ac_have_decl
28581 _ACEOF
28583 if test $ac_cv_have_decl_mbrtowc = yes; then
28584 REPLACE_MBRTOWC=1
28586 else
28587 if test $REPLACE_MBSTATE_T = 1; then
28588 REPLACE_MBRTOWC=1
28589 else
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
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 :
28608 else
28609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28610 /* end confdefs.h. */
28612 #include <locale.h>
28613 #include <stdlib.h>
28614 #include <string.h>
28615 #include <wchar.h>
28616 int main ()
28618 int result = 0;
28620 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
28622 char input[] = "\303\237er";
28623 mbstate_t state;
28624 wchar_t wc;
28625 size_t ret;
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;
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;
28642 return result;
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
28650 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28651 conftest.$ac_objext conftest.beam conftest.$ac_ext
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; }
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
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 :
28678 else
28679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28680 /* end confdefs.h. */
28682 #include <locale.h>
28683 #include <string.h>
28684 #include <wchar.h>
28685 int main ()
28687 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
28689 mbstate_t state;
28690 wchar_t wc;
28691 int ret;
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;
28700 return 0;
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
28708 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28709 conftest.$ac_objext conftest.beam conftest.$ac_ext
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; }
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
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 :
28739 else
28740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28741 /* end confdefs.h. */
28743 #include <locale.h>
28744 #include <string.h>
28745 #include <wchar.h>
28746 int main ()
28748 int result = 0;
28749 int found_some_locale = 0;
28750 /* This fails on Solaris. */
28751 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
28753 char input[] = "B\303\274\303\237er"; /* "Büßer" */
28754 mbstate_t state;
28755 wchar_t wc;
28757 memset (&state, '\0', sizeof (mbstate_t));
28758 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
28760 input[1] = '\0';
28761 if (mbrtowc (&wc, input + 2, 5, &state) != 1)
28762 result |= 1;
28764 found_some_locale = 1;
28766 /* This fails on HP-UX 11.11. */
28767 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
28769 char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
28770 mbstate_t state;
28771 wchar_t wc;
28773 memset (&state, '\0', sizeof (mbstate_t));
28774 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
28776 input[1] = '\0';
28777 if (mbrtowc (&wc, input + 2, 5, &state) != 2)
28778 result |= 2;
28780 found_some_locale = 1;
28782 /* This fails on native Windows. */
28783 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
28785 char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
28786 mbstate_t state;
28787 wchar_t wc;
28789 memset (&state, '\0', sizeof (mbstate_t));
28790 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
28792 input[3] = '\0';
28793 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
28794 result |= 4;
28796 found_some_locale = 1;
28798 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
28800 char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
28801 mbstate_t state;
28802 wchar_t wc;
28804 memset (&state, '\0', sizeof (mbstate_t));
28805 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
28807 input[3] = '\0';
28808 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
28809 result |= 8;
28811 found_some_locale = 1;
28813 if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
28815 char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
28816 mbstate_t state;
28817 wchar_t wc;
28819 memset (&state, '\0', sizeof (mbstate_t));
28820 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
28822 input[3] = '\0';
28823 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
28824 result |= 16;
28826 found_some_locale = 1;
28828 return (found_some_locale ? result : 77);
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
28839 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28840 conftest.$ac_objext conftest.beam conftest.$ac_ext
28846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
28847 $as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
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
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 :
28867 else
28868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28869 /* end confdefs.h. */
28871 #include <locale.h>
28872 #include <string.h>
28873 #include <wchar.h>
28874 int main ()
28876 /* This fails on Solaris 8 and 9. */
28877 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
28879 mbstate_t state;
28880 wchar_t wc;
28882 memset (&state, '\0', sizeof (mbstate_t));
28883 if (mbrtowc (&wc, "", 1, &state) != 0)
28884 return 2;
28886 return 0;
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
28894 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28895 conftest.$ac_objext conftest.beam conftest.$ac_ext
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; }
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
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 :
28921 else
28922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28923 /* end confdefs.h. */
28925 #include <locale.h>
28926 #include <string.h>
28927 #include <wchar.h>
28928 int main ()
28930 int result = 0;
28931 if (setlocale (LC_ALL, "French_France.65001") != NULL)
28933 wchar_t wc = (wchar_t) 0xBADFACE;
28934 mbstate_t state;
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;
28941 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
28943 wchar_t wc = (wchar_t) 0xBADFACE;
28944 mbstate_t state;
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;
28951 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
28953 wchar_t wc = (wchar_t) 0xBADFACE;
28954 mbstate_t state;
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;
28961 if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
28963 wchar_t wc = (wchar_t) 0xBADFACE;
28964 mbstate_t state;
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;
28971 return result;
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
28979 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28980 conftest.$ac_objext conftest.beam conftest.$ac_ext
28986 if test $LOCALE_FR_UTF8 != none; then
28987 if test "$cross_compiling" = yes; then :
28989 else
28990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28991 /* end confdefs.h. */
28993 #include <locale.h>
28994 #include <string.h>
28995 #include <wchar.h>
28996 int main ()
28998 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
29000 wchar_t wc = (wchar_t) 0xBADFACE;
29001 mbstate_t state;
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;
29008 return 0;
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
29016 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29017 conftest.$ac_objext conftest.beam conftest.$ac_ext
29022 esac
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; }
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
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 :
29045 else
29046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29047 /* end confdefs.h. */
29049 #include <wchar.h>
29050 static wchar_t wc;
29051 static mbstate_t mbs;
29053 main (void)
29055 return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
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
29063 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29064 conftest.$ac_objext conftest.beam conftest.$ac_ext
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; }
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
29079 gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="$gl_cross_guess_normal"
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
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>
29095 main ()
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++)
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;
29111 return 0;
29114 return 0;
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
29122 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29123 conftest.$ac_objext conftest.beam conftest.$ac_ext
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; }
29131 case "$gl_cv_func_mbrtowc_null_arg1" in
29132 *yes) ;;
29134 $as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
29136 REPLACE_MBRTOWC=1
29138 esac
29139 case "$gl_cv_func_mbrtowc_null_arg2" in
29140 *yes) ;;
29142 $as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
29144 REPLACE_MBRTOWC=1
29146 esac
29147 case "$gl_cv_func_mbrtowc_retval" in
29148 *yes) ;;
29150 $as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
29152 REPLACE_MBRTOWC=1
29154 esac
29155 case "$gl_cv_func_mbrtowc_nul_retval" in
29156 *yes) ;;
29158 $as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
29160 REPLACE_MBRTOWC=1
29162 esac
29163 case "$gl_cv_func_mbrtowc_stores_incomplete" in
29164 *no) ;;
29166 $as_echo "#define MBRTOWC_STORES_INCOMPLETE_BUG 1" >>confdefs.h
29168 REPLACE_MBRTOWC=1
29170 esac
29171 case "$gl_cv_func_mbrtowc_empty_input" in
29172 *yes) ;;
29174 $as_echo "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h
29176 REPLACE_MBRTOWC=1
29178 esac
29179 case "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" in
29180 *yes) ;;
29182 $as_echo "#define MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
29184 REPLACE_MBRTOWC=1
29186 esac
29189 if test $REPLACE_MBSTATE_T = 1; then
29190 case "$host_os" in
29191 mingw*) LIB_MBRTOWC= ;;
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"
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
29211 main ()
29213 xyzzy();
29215 return 0;
29217 _ACEOF
29218 if ac_fn_c_try_link "$LINENO"; then :
29219 gl_cv_have_weak=maybe
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
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"
29238 rm -f conftest*
29241 else
29242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29243 /* end confdefs.h. */
29245 #include <stdio.h>
29246 #pragma weak fputs
29247 int main ()
29249 return (fputs == NULL);
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
29257 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29258 conftest.$ac_objext conftest.beam conftest.$ac_ext
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 ()
29278 return (pthread_mutexattr_gettype != NULL);
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
29285 esac
29287 esac
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)
29295 $as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
29298 esac
29300 case "$gl_cv_have_weak" in
29301 *yes) LIB_MBRTOWC= ;;
29302 *) LIB_MBRTOWC="$LIBPTHREAD" ;;
29303 esac
29305 esac
29306 else
29307 LIB_MBRTOWC=
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=
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='#'
29325 if test -z "$GL_COND_OBJ_MBRTOWC_TRUE"; then :
29327 if test $REPLACE_MBSTATE_T = 1; then
29336 gl_LIBOBJS="$gl_LIBOBJS lc-charset-dispatch.$ac_objext"
29346 gl_LIBOBJS="$gl_LIBOBJS mbtowc-lock.$ac_objext"
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. */
29365 main ()
29369 return 0;
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
29377 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29378 CFLAGS="$gl_save_CFLAGS"
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"
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) {}
29407 main ()
29411 return 0;
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
29419 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29420 CFLAGS="$gl_save_CFLAGS"
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
29433 cat >>confdefs.h <<_ACEOF
29434 #define HAVE_VISIBILITY $HAVE_VISIBILITY
29435 _ACEOF
29460 GL_GNULIB_MBRTOWC=1
29466 $as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
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
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
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 :
29506 else
29507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29508 /* end confdefs.h. */
29510 #include <locale.h>
29511 #include <string.h>
29512 #include <wchar.h>
29513 int main ()
29515 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
29517 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
29518 mbstate_t state;
29519 wchar_t wc;
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;
29526 return 0;
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
29534 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29535 conftest.$ac_objext conftest.beam conftest.$ac_ext
29538 else
29539 if test $LOCALE_FR_UTF8 != none; then
29540 if test "$cross_compiling" = yes; then :
29542 else
29543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29544 /* end confdefs.h. */
29546 #include <locale.h>
29547 #include <string.h>
29548 #include <wchar.h>
29549 int main ()
29551 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
29553 const char input[] = "B\303\274\303\237er"; /* "Büßer" */
29554 mbstate_t state;
29555 wchar_t wc;
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;
29562 return 0;
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
29570 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29571 conftest.$ac_objext conftest.beam conftest.$ac_ext
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; }
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
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 :
29599 else
29600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29601 /* end confdefs.h. */
29603 #include <locale.h>
29604 #include <stdlib.h>
29605 #include <string.h>
29606 #include <wchar.h>
29607 int main ()
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)
29614 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
29615 mbstate_t state;
29616 wchar_t wc;
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;
29623 return 0;
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
29631 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29632 conftest.$ac_objext conftest.beam conftest.$ac_ext
29638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
29639 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
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
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>
29662 if test "x$ac_cv_have_decl_mbsinit" = xyes; then :
29663 ac_have_decl=1
29664 else
29665 ac_have_decl=0
29668 cat >>confdefs.h <<_ACEOF
29669 #define HAVE_DECL_MBSINIT $ac_have_decl
29670 _ACEOF
29672 if test $ac_cv_have_decl_mbsinit = yes; then
29673 REPLACE_MBSINIT=1
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
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=
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='#'
29699 if test -z "$GL_COND_OBJ_MBSINIT_TRUE"; then :
29720 GL_GNULIB_MBSINIT=1
29726 $as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
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
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
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 :
29765 else
29766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29767 /* end confdefs.h. */
29769 #include <locale.h>
29770 #include <string.h>
29771 #include <wchar.h>
29772 int main ()
29774 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
29776 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
29777 mbstate_t state;
29778 wchar_t wc;
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;
29785 return 0;
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
29793 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29794 conftest.$ac_objext conftest.beam conftest.$ac_ext
29797 else
29798 if test $LOCALE_FR_UTF8 != none; then
29799 if test "$cross_compiling" = yes; then :
29801 else
29802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29803 /* end confdefs.h. */
29805 #include <locale.h>
29806 #include <string.h>
29807 #include <wchar.h>
29808 int main ()
29810 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
29812 const char input[] = "B\303\274\303\237er"; /* "Büßer" */
29813 mbstate_t state;
29814 wchar_t wc;
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;
29821 return 0;
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
29829 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29830 conftest.$ac_objext conftest.beam conftest.$ac_ext
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; }
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
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 :
29858 else
29859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29860 /* end confdefs.h. */
29862 #include <locale.h>
29863 #include <stdlib.h>
29864 #include <string.h>
29865 #include <wchar.h>
29866 int main ()
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)
29873 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
29874 mbstate_t state;
29875 wchar_t wc;
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;
29882 return 0;
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
29890 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29891 conftest.$ac_objext conftest.beam conftest.$ac_ext
29897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
29898 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
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
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>
29921 if test "x$ac_cv_have_decl_mbsrtowcs" = xyes; then :
29922 ac_have_decl=1
29923 else
29924 ac_have_decl=0
29927 cat >>confdefs.h <<_ACEOF
29928 #define HAVE_DECL_MBSRTOWCS $ac_have_decl
29929 _ACEOF
29931 if test $ac_cv_have_decl_mbsrtowcs = yes; then
29932 REPLACE_MBSRTOWCS=1
29934 else
29935 if test $REPLACE_MBSTATE_T = 1; then
29936 REPLACE_MBSRTOWCS=1
29937 else
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
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 :
29959 else
29960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29961 /* end confdefs.h. */
29963 #include <locale.h>
29964 #include <string.h>
29965 #include <wchar.h>
29966 int main ()
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)
29973 const char input[] = "\337er";
29974 const char *src = input;
29975 mbstate_t state;
29977 memset (&state, '\0', sizeof (mbstate_t));
29978 if (mbsrtowcs (NULL, &src, 1, &state) != 3
29979 || src != input)
29980 result |= 1;
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)
29986 const char input[] = "B\303\274\303\237er";
29987 mbstate_t state;
29989 memset (&state, '\0', sizeof (mbstate_t));
29990 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
29991 if (!mbsinit (&state))
29993 const char *src = input + 2;
29994 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
29995 result |= 2;
29998 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
30000 const char input[] = "<\306\374\313\334\270\354>";
30001 mbstate_t state;
30003 memset (&state, '\0', sizeof (mbstate_t));
30004 if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2))
30005 if (!mbsinit (&state))
30007 const char *src = input + 4;
30008 if (mbsrtowcs (NULL, &src, 10, &state) != 3)
30009 result |= 4;
30012 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
30014 const char input[] = "B\250\271\201\060\211\070er";
30015 mbstate_t state;
30017 memset (&state, '\0', sizeof (mbstate_t));
30018 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
30019 if (!mbsinit (&state))
30021 const char *src = input + 2;
30022 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
30023 result |= 8;
30026 return result;
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
30034 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30035 conftest.$ac_objext conftest.beam conftest.$ac_ext
30041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5
30042 $as_echo "$gl_cv_func_mbsrtowcs_works" >&6; }
30044 case "$gl_cv_func_mbsrtowcs_works" in
30045 *yes) ;;
30046 *) REPLACE_MBSRTOWCS=1 ;;
30047 esac
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=
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='#'
30065 if test -z "$GL_COND_OBJ_MBSRTOWCS_TRUE"; then :
30075 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext"
30096 GL_GNULIB_MBSRTOWCS=1
30102 $as_echo "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h
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
30118 done
30120 if test $ac_cv_func_mbtowc = no; then
30121 HAVE_MBTOWC=0
30122 else
30123 if false; then
30124 REPLACE_MBTOWC=1
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=
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='#'
30142 if test -z "$GL_COND_OBJ_MBTOWC_TRUE"; then :
30158 GL_GNULIB_MBTOWC=1
30164 $as_echo "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h
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=
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='#'
30183 if test -z "$GL_COND_OBJ_MEMCHR_TRUE"; then :
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
30196 done
30215 GL_GNULIB_MEMCHR=1
30221 $as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
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. */
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
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"
30258 rm -f conftest*
30261 else
30262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30263 /* end confdefs.h. */
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); }
30272 main ()
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)
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;
30293 /* Free allocated memory, in case some sanitizer is watching. */
30294 free (haystack);
30295 free (needle);
30296 return result;
30299 return 0;
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
30307 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30308 conftest.$ac_objext conftest.beam conftest.$ac_ext
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) ;;
30318 REPLACE_MEMMEM=1
30320 esac
30323 if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
30332 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
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
30348 done
30350 if test $ac_cv_func_memmem = yes; then
30351 HAVE_MEMMEM=1
30352 else
30353 HAVE_MEMMEM=0
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. */
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
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"
30393 rm -f conftest*
30396 else
30397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30398 /* end confdefs.h. */
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
30406 main ()
30409 int result = 0;
30410 if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
30411 result |= 1;
30412 /* Check for empty needle behavior. */
30414 const char *haystack = "AAA";
30415 if (memmem (haystack, 3, (const char *) 1, 0) != haystack)
30416 result |= 2;
30418 return result;
30421 return 0;
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
30429 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30430 conftest.$ac_objext conftest.beam conftest.$ac_ext
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) ;;
30440 REPLACE_MEMMEM=1
30442 esac
30446 if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
30455 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
30472 GL_GNULIB_MEMMEM=1
30478 $as_echo "#define GNULIB_TEST_MEMMEM 1" >>confdefs.h
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
30497 done
30499 if test $ac_cv_func_mempcpy = no; then
30500 HAVE_MEMPCPY=0
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=
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='#'
30517 if test -z "$GL_COND_OBJ_MEMPCPY_TRUE"; then :
30538 GL_GNULIB_MEMPCPY=1
30544 $as_echo "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h
30553 if test $ac_cv_have_decl_memrchr = no; then
30554 HAVE_DECL_MEMRCHR=0
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
30566 done
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=
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='#'
30583 if test -z "$GL_COND_OBJ_MEMRCHR_TRUE"; then :
30602 GL_GNULIB_MEMRCHR=1
30608 $as_echo "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h
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. */
30633 #ifdef _MSC_VER
30634 Known
30635 #endif
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"
30644 rm -f conftest*
30647 # If we don't know, obey --enable-cross-guesses.
30648 *) gl_cv_func_mkdir_trailing_slash_works="$gl_cross_guess_normal" ;;
30649 esac
30651 else
30652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30653 /* end confdefs.h. */
30655 #include <sys/types.h>
30656 #include <sys/stat.h>
30659 $gl_mda_defines
30662 main ()
30664 return mkdir ("conftest.dir/", 0700);
30666 return 0;
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
30674 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30675 conftest.$ac_objext conftest.beam conftest.$ac_ext
30678 rm -rf conftest.dir
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) ;;
30686 REPLACE_MKDIR=1
30688 esac
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
30708 else
30709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30710 /* end confdefs.h. */
30712 #include <sys/types.h>
30713 #include <sys/stat.h>
30716 $gl_mda_defines
30719 main ()
30721 return !mkdir ("conftest.dir/./", 0700);
30723 return 0;
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
30731 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30732 conftest.$ac_objext conftest.beam conftest.$ac_ext
30735 rm -rf conftest.dir
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) ;;
30744 REPLACE_MKDIR=1
30746 $as_echo "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h
30749 esac
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=
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='#'
30774 GL_GNULIB_MKDIR=1
30780 $as_echo "#define GNULIB_TEST_MKDIR 1" >>confdefs.h
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
30795 done
30797 if test $ac_cv_func_mkdtemp = no; then
30798 HAVE_MKDTEMP=0
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=
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='#'
30815 if test -z "$GL_COND_OBJ_MKDTEMP_TRUE"; then :
30830 GL_GNULIB_MKDTEMP=1
30836 $as_echo "#define GNULIB_TEST_MKDTEMP 1" >>confdefs.h
30846 if test $ac_cv_func_mkostemp != yes; then
30847 HAVE_MKOSTEMP=0
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=
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='#'
30864 if test -z "$GL_COND_OBJ_MKOSTEMP_TRUE"; then :
30872 cat >>confdefs.h <<_ACEOF
30873 #define GNULIB_MKOSTEMP 1
30874 _ACEOF
30886 GL_GNULIB_MKOSTEMP=1
30892 $as_echo "#define GNULIB_TEST_MKOSTEMP 1" >>confdefs.h
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=
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='#'
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=
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='#'
30928 cat >>confdefs.h <<_ACEOF
30929 #define GNULIB_MSVC_NOTHROW 1
30930 _ACEOF
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
30948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30949 /* end confdefs.h. */
30950 #include <netinet/in.h>
30952 main ()
30956 return 0;
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
30964 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
30983 done
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
31003 if test $ac_cv_header_netinet_in_h = yes; then
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
31017 case "$host_os" in
31018 mingw*)
31019 gl_dirsep_regex='[/\\]'
31022 gl_dirsep_regex='\/'
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|^/[^/]|//&|
31035 gl_cv_absolute_netinet_in_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
31036 sed -n "$gl_absolute_header_sed"`
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'>'
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; }
31049 NEXT_NETINET_IN_H=$gl_cv_next_netinet_in_h
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
31058 NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H=$gl_next_as_first_directive
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
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"
31082 *) echo "*** GL_GENERATE_NETINET_IN_H is not set correctly" 1>&2; exit 1 ;;
31083 esac
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=
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='#'
31107 case "$host_os" in
31108 mingw* | pw*)
31109 REPLACE_OPEN=1
31113 if test "$gl_cv_macro_O_CLOEXEC" != yes; then
31114 REPLACE_OPEN=1
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
31128 if test "$cross_compiling" = yes; then :
31130 case "$host_os" in
31131 freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
31132 gl_cv_func_open_slash="guessing no" ;;
31134 gl_cv_func_open_slash="guessing yes" ;;
31135 esac
31137 else
31138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31139 /* end confdefs.h. */
31141 #include <fcntl.h>
31142 #if HAVE_UNISTD_H
31143 # include <unistd.h>
31144 #endif
31147 $gl_mda_defines
31149 int main ()
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;
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
31166 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31167 conftest.$ac_objext conftest.beam conftest.$ac_ext
31170 rm -f conftest.sl conftest.tmp conftest.lnk
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)
31178 $as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
31181 esac
31183 case "$gl_cv_func_open_slash" in
31184 *no)
31185 REPLACE_OPEN=1
31187 esac
31189 esac
31191 if test $REPLACE_OPEN = 0; then
31195 if test $ac_cv_func_fchdir = no; then
31196 HAVE_FCHDIR=0
31199 if test $HAVE_FCHDIR = 0; then
31200 REPLACE_OPEN=1
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=
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='#'
31220 if test -z "$GL_COND_OBJ_OPEN_TRUE"; then :
31237 GL_GNULIB_OPEN=1
31243 $as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h
31253 case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink+$gl_cv_macro_O_CLOEXEC in
31254 yes+*yes+yes)
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
31263 HAVE_OPENAT=0
31265 esac
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=
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='#'
31281 if test -z "$GL_COND_OBJ_OPENAT_TRUE"; then :
31291 cat >>confdefs.h <<_ACEOF
31292 #define GNULIB_OPENAT 1
31293 _ACEOF
31304 GL_GNULIB_OPENAT=1
31310 $as_echo "#define GNULIB_TEST_OPENAT 1" >>confdefs.h
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
31326 done
31328 if test $ac_cv_func_opendir = no; then
31329 HAVE_OPENDIR=0
31335 if test $ac_cv_func_fchdir = no; then
31336 HAVE_FCHDIR=0
31339 if test $HAVE_FCHDIR = 0; then
31340 if test $HAVE_OPENDIR = 1; then
31341 REPLACE_OPENDIR=1
31345 case $host_os,$HAVE_OPENDIR in
31346 os2*,1)
31347 REPLACE_OPENDIR=1;;
31348 esac
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=
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='#'
31373 GL_GNULIB_OPENDIR=1
31379 $as_echo "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
31390 if test $ac_cv_func_pipe != yes; then
31391 HAVE_PIPE=0
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=
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='#'
31417 GL_GNULIB_PIPE=1
31423 $as_echo "#define GNULIB_TEST_PIPE 1" >>confdefs.h
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
31440 done
31442 if test $ac_cv_func_rawmemchr = no; then
31443 HAVE_RAWMEMCHR=0
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=
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='#'
31460 if test -z "$GL_COND_OBJ_RAWMEMCHR_TRUE"; then :
31479 GL_GNULIB_RAWMEMCHR=1
31485 $as_echo "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
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
31501 done
31503 if test $ac_cv_func_readdir = no; then
31504 HAVE_READDIR=0
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=
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='#'
31530 GL_GNULIB_READDIR=1
31536 $as_echo "#define GNULIB_TEST_READDIR 1" >>confdefs.h
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);
31557 main ()
31561 return 0;
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
31569 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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.
31591 gl_cv_func_readlink_trailing_slash="$gl_cross_guess_normal" ;;
31592 esac
31594 else
31595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31596 /* end confdefs.h. */
31597 #include <unistd.h>
31600 main ()
31602 char buf[20];
31603 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
31605 return 0;
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
31613 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31614 conftest.$ac_objext conftest.beam conftest.$ac_ext
31617 rm -f conftest.link conftest.lnk2
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
31629 $as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
31631 REPLACE_READLINK=1
31633 esac
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.
31652 gl_cv_func_readlink_truncate="$gl_cross_guess_normal" ;;
31653 esac
31655 else
31656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31657 /* end confdefs.h. */
31658 #include <unistd.h>
31661 main ()
31663 char c;
31664 return readlink ("conftest.link", &c, 1) != 1;
31666 return 0;
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
31674 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31675 conftest.$ac_objext conftest.beam conftest.$ac_ext
31678 rm -f conftest.link conftest.lnk2
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
31690 $as_echo "#define READLINK_TRUNCATE_BUG 1" >>confdefs.h
31692 REPLACE_READLINK=1
31694 esac
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=
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='#'
31711 if test -z "$GL_COND_OBJ_READLINK_TRUE"; then :
31727 GL_GNULIB_READLINK=1
31733 $as_echo "#define GNULIB_TEST_READLINK 1" >>confdefs.h
31740 if test $REPLACE_MALLOC_FOR_MALLOC_POSIX = 1; then
31741 REPLACE_REALLOC_FOR_REALLOC_POSIX=1
31744 if test $REPLACE_REALLOC_FOR_REALLOC_POSIX = 1; then
31753 gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
31765 GL_GNULIB_REALLOC_POSIX=1
31771 $as_echo "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
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
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
31804 else
31805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31806 /* end confdefs.h. */
31808 # include <stdio.h>
31809 # include <stdlib.h>
31812 main ()
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;
31826 return 0;
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
31834 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31835 conftest.$ac_objext conftest.beam conftest.$ac_ext
31838 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
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) ;;
31846 REPLACE_RENAME=1
31848 $as_echo "#define RENAME_TRAILING_SLASH_DEST_BUG 1" >>confdefs.h
31851 esac
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
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
31877 else
31878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31879 /* end confdefs.h. */
31881 # include <stdio.h>
31882 # include <stdlib.h>
31885 main ()
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;
31899 return 0;
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
31907 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31908 conftest.$ac_objext conftest.beam conftest.$ac_ext
31911 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
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) ;;
31919 REPLACE_RENAME=1
31921 $as_echo "#define RENAME_TRAILING_SLASH_SOURCE_BUG 1" >>confdefs.h
31924 esac
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 :
31940 else
31941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31942 /* end confdefs.h. */
31944 # include <errno.h>
31945 # include <stdio.h>
31946 # include <stdlib.h>
31947 # include <unistd.h>
31950 $gl_mda_defines
31953 main ()
31955 int result = 0;
31956 if (rename ("conftest.f", "conftest.f1"))
31957 result |= 1;
31958 if (unlink ("conftest.f1"))
31959 result |= 2;
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;
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;
31975 return 0;
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
31983 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31984 conftest.$ac_objext conftest.beam conftest.$ac_ext
31987 else
31988 gl_cv_func_rename_link_works="guessing no"
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
32003 else
32004 gl_cv_func_rename_link_works=yes
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) ;;
32013 REPLACE_RENAME=1
32015 $as_echo "#define RENAME_HARD_LINK_BUG 1" >>confdefs.h
32018 esac
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
32040 else
32041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32042 /* end confdefs.h. */
32044 # include <stdio.h>
32045 # include <stdlib.h>
32048 main ()
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;
32058 return 0;
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
32066 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32067 conftest.$ac_objext conftest.beam conftest.$ac_ext
32070 rm -rf conftest.f conftest.d1 conftest.d2
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) ;;
32078 REPLACE_RENAME=1
32080 $as_echo "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h
32083 esac
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=
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='#'
32108 GL_GNULIB_RENAME=1
32114 $as_echo "#define GNULIB_TEST_RENAME 1" >>confdefs.h
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
32130 done
32132 if test $ac_cv_func_rewinddir = no; then
32133 HAVE_REWINDDIR=0
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=
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='#'
32159 GL_GNULIB_REWINDDIR=1
32165 $as_echo "#define GNULIB_TEST_REWINDDIR 1" >>confdefs.h
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
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
32203 $gl_mda_defines
32206 main ()
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;
32218 return 0;
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
32226 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32227 conftest.$ac_objext conftest.beam conftest.$ac_ext
32230 rm -rf conftest.dir conftest.file
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) ;;
32237 REPLACE_RMDIR=1
32239 esac
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=
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='#'
32264 GL_GNULIB_RMDIR=1
32270 $as_echo "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
32282 if test "$ac_cv_header_winsock2_h" = yes; then
32283 REPLACE_SELECT=1
32284 else
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
32292 if test "$cross_compiling" = yes; then :
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
32301 else
32302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32303 /* end confdefs.h. */
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 ()
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;
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
32323 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32324 conftest.$ac_objext conftest.beam conftest.$ac_ext
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
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
32342 if test "$cross_compiling" = yes; then :
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
32353 else
32354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32355 /* end confdefs.h. */
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>
32366 $gl_mda_defines
32369 main ()
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;
32383 return 0;
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
32391 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32392 conftest.$ac_objext conftest.beam conftest.$ac_ext
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
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. */
32412 #define WIN32_LEAN_AND_MEAN
32413 #include <windows.h>
32415 main ()
32417 MsgWaitForMultipleObjects (0, NULL, 0, 0, 0);
32418 return 0;
32420 _ACEOF
32421 if ac_fn_c_try_link "$LINENO"; then :
32423 else
32424 LIB_SELECT="$LIB_SELECT -luser32"
32426 rm -f core conftest.err conftest.$ac_objext \
32427 conftest$ac_exeext conftest.$ac_ext
32429 esac
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=
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='#'
32456 GL_GNULIB_SELECT=1
32462 $as_echo "#define GNULIB_TEST_SELECT 1" >>confdefs.h
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
32486 else
32487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32488 /* end confdefs.h. */
32490 #include <stdlib.h>
32491 #include <errno.h>
32492 #include <string.h>
32495 main ()
32498 int result = 0;
32500 if (setenv ("", "", 0) != -1)
32501 result |= 1;
32502 else if (errno != EINVAL)
32503 result |= 2;
32506 if (setenv ("a", "=", 1) != 0)
32507 result |= 4;
32508 else if (strcmp (getenv ("a"), "=") != 0)
32509 result |= 8;
32511 return result;
32514 return 0;
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
32522 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32523 conftest.$ac_objext conftest.beam conftest.$ac_ext
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) ;;
32532 REPLACE_SETENV=1
32534 esac
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=
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='#'
32560 GL_GNULIB_SETENV=1
32566 $as_echo "#define GNULIB_TEST_SETENV 1" >>confdefs.h
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.
32589 gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;;
32590 esac
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*) ;;
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"
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
32608 cat >>confdefs.h <<_ACEOF
32609 #define SETLOCALE_NULL_ALL_MTSAFE $SETLOCALE_NULL_ALL_MTSAFE
32610 _ACEOF
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.
32627 gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;;
32628 esac
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*) ;;
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"
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
32646 cat >>confdefs.h <<_ACEOF
32647 #define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE
32648 _ACEOF
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= ;;
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"
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
32673 main ()
32675 xyzzy();
32677 return 0;
32679 _ACEOF
32680 if ac_fn_c_try_link "$LINENO"; then :
32681 gl_cv_have_weak=maybe
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
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"
32700 rm -f conftest*
32703 else
32704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32705 /* end confdefs.h. */
32707 #include <stdio.h>
32708 #pragma weak fputs
32709 int main ()
32711 return (fputs == NULL);
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
32719 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32720 conftest.$ac_objext conftest.beam conftest.$ac_ext
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 ()
32740 return (pthread_mutexattr_gettype != NULL);
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
32747 esac
32749 esac
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)
32757 $as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
32760 esac
32762 case "$gl_cv_have_weak" in
32763 *yes) LIB_SETLOCALE_NULL= ;;
32764 *) LIB_SETLOCALE_NULL="$LIBPTHREAD" ;;
32765 esac
32767 esac
32768 else
32769 LIB_SETLOCALE_NULL=
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=
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='#'
32787 if test -z "$GL_COND_OBJ_SETLOCALE_LOCK_TRUE"; then :
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. */
32806 main ()
32810 return 0;
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
32818 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32819 CFLAGS="$gl_save_CFLAGS"
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"
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) {}
32848 main ()
32852 return 0;
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
32860 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32861 CFLAGS="$gl_save_CFLAGS"
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
32874 cat >>confdefs.h <<_ACEOF
32875 #define HAVE_VISIBILITY $HAVE_VISIBILITY
32876 _ACEOF
32891 GL_GNULIB_SETLOCALE_NULL=1
32897 $as_echo "#define GNULIB_TEST_SETLOCALE_NULL 1" >>confdefs.h
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=
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='#'
32925 GL_GNULIB_SETSOCKOPT=1
32931 $as_echo "#define GNULIB_TEST_SETSOCKOPT 1" >>confdefs.h
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=
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='#'
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.
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
32979 GL_GNULIB_SOCKET=1
32985 $as_echo "#define GNULIB_TEST_SOCKET 1" >>confdefs.h
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
33003 if test "x$ac_cv_type_socklen_t" = xyes; then :
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>
33021 int getpeername (int, $arg2 *, $t *);
33023 main ()
33025 $t len;
33026 getpeername (0, 0, &len);
33028 return 0;
33030 _ACEOF
33031 if ac_fn_c_try_compile "$LINENO"; then :
33032 gl_cv_socklen_t_equiv="$t"
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
33044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
33045 $as_echo "$gl_cv_socklen_t_equiv" >&6; }
33047 cat >>confdefs.h <<_ACEOF
33048 #define socklen_t $gl_cv_socklen_t_equiv
33049 _ACEOF
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>
33063 main ()
33065 int x = sizeof (ssize_t *) + sizeof (ssize_t);
33066 return !x;
33068 return 0;
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
33076 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
33082 $as_echo "#define ssize_t int" >>confdefs.h
33090 case "$host_os" in
33091 mingw*)
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
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
33114 else
33115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33116 /* end confdefs.h. */
33117 #include <sys/stat.h>
33120 main ()
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;
33133 return 0;
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
33141 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33142 conftest.$ac_objext conftest.beam conftest.$ac_ext
33145 rm -f conftest.tmp conftest.lnk
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
33153 $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
33155 esac
33156 case $host_os in
33157 solaris*)
33158 REPLACE_FSTAT=1 ;;
33159 esac
33161 esac
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=
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='#'
33177 if test -z "$GL_COND_OBJ_STAT_TRUE"; then :
33179 case "$host_os" in
33180 mingw*)
33189 gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
33192 esac
33209 GL_GNULIB_STAT=1
33215 $as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h
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>
33226 if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes; then :
33228 cat >>confdefs.h <<_ACEOF
33229 #define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
33230 _ACEOF
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. */
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;
33250 main ()
33253 st.st_atim = ts;
33256 return 0;
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
33264 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
33270 $as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
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>
33277 if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes; then :
33279 cat >>confdefs.h <<_ACEOF
33280 #define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
33281 _ACEOF
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>
33288 if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes; then :
33290 cat >>confdefs.h <<_ACEOF
33291 #define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
33292 _ACEOF
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>
33299 if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes; then :
33301 cat >>confdefs.h <<_ACEOF
33302 #define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
33303 _ACEOF
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>
33321 if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes; then :
33323 cat >>confdefs.h <<_ACEOF
33324 #define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
33325 _ACEOF
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>
33332 if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes; then :
33334 cat >>confdefs.h <<_ACEOF
33335 #define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
33336 _ACEOF
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>
33343 if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes; then :
33345 cat >>confdefs.h <<_ACEOF
33346 #define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
33347 _ACEOF
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>
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];
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
33398 main ()
33402 return 0;
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
33410 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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; }
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
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"
33432 *) echo "*** GL_GENERATE_STDALIGN_H is not set correctly" 1>&2; exit 1 ;;
33433 esac
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=
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='#'
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
33468 GL_GENERATE_STDBOOL_H=false
33470 esac
33471 else
33472 GL_GENERATE_STDBOOL_H=true
33475 if test "$ac_cv_type__Bool" = yes; then
33476 HAVE__BOOL=1
33477 else
33478 HAVE__BOOL=0
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"
33493 *) echo "*** GL_GENERATE_STDBOOL_H is not set correctly" 1>&2; exit 1 ;;
33494 esac
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=
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='#'
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"
33532 *) echo "*** GL_GENERATE_STDDEF_H is not set correctly" 1>&2; exit 1 ;;
33533 esac
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=
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='#'
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"
33566 *) echo "*** GL_GENERATE_STDINT_H is not set correctly" 1>&2; exit 1 ;;
33567 esac
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=
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='#'
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"
33598 *) echo "*** GL_GENERATE_LIMITS_H is not set correctly" 1>&2; exit 1 ;;
33599 esac
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=
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='#'
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=
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='#'
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=
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='#'
33664 GL_GNULIB_FSCANF=1
33670 $as_echo "#define GNULIB_TEST_FSCANF 1" >>confdefs.h
33676 cat >>confdefs.h <<_ACEOF
33677 #define GNULIB_FSCANF 1
33678 _ACEOF
33690 GL_GNULIB_SCANF=1
33696 $as_echo "#define GNULIB_TEST_SCANF 1" >>confdefs.h
33702 cat >>confdefs.h <<_ACEOF
33703 #define GNULIB_SCANF 1
33704 _ACEOF
33716 GL_GNULIB_FGETC=1
33722 $as_echo "#define GNULIB_TEST_FGETC 1" >>confdefs.h
33735 GL_GNULIB_GETC=1
33741 $as_echo "#define GNULIB_TEST_GETC 1" >>confdefs.h
33754 GL_GNULIB_GETCHAR=1
33760 $as_echo "#define GNULIB_TEST_GETCHAR 1" >>confdefs.h
33773 GL_GNULIB_FGETS=1
33779 $as_echo "#define GNULIB_TEST_FGETS 1" >>confdefs.h
33792 GL_GNULIB_FREAD=1
33798 $as_echo "#define GNULIB_TEST_FREAD 1" >>confdefs.h
33811 GL_GNULIB_FPRINTF=1
33817 $as_echo "#define GNULIB_TEST_FPRINTF 1" >>confdefs.h
33830 GL_GNULIB_PRINTF=1
33836 $as_echo "#define GNULIB_TEST_PRINTF 1" >>confdefs.h
33849 GL_GNULIB_VFPRINTF=1
33855 $as_echo "#define GNULIB_TEST_VFPRINTF 1" >>confdefs.h
33868 GL_GNULIB_VPRINTF=1
33874 $as_echo "#define GNULIB_TEST_VPRINTF 1" >>confdefs.h
33887 GL_GNULIB_FPUTC=1
33893 $as_echo "#define GNULIB_TEST_FPUTC 1" >>confdefs.h
33906 GL_GNULIB_PUTC=1
33912 $as_echo "#define GNULIB_TEST_PUTC 1" >>confdefs.h
33925 GL_GNULIB_PUTCHAR=1
33931 $as_echo "#define GNULIB_TEST_PUTCHAR 1" >>confdefs.h
33944 GL_GNULIB_FPUTS=1
33950 $as_echo "#define GNULIB_TEST_FPUTS 1" >>confdefs.h
33963 GL_GNULIB_PUTS=1
33969 $as_echo "#define GNULIB_TEST_PUTS 1" >>confdefs.h
33982 GL_GNULIB_FWRITE=1
33988 $as_echo "#define GNULIB_TEST_FWRITE 1" >>confdefs.h
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
34012 done
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. */
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
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"
34042 rm -f conftest*
34045 else
34046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34047 /* end confdefs.h. */
34049 #include <string.h> /* for strchrnul */
34052 main ()
34054 const char *buf = "a";
34055 return strchrnul (buf, 'b') != buf + 1;
34058 return 0;
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
34066 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34067 conftest.$ac_objext conftest.beam conftest.$ac_ext
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
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=
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='#'
34094 if test -z "$GL_COND_OBJ_STRCHRNUL_TRUE"; then :
34113 GL_GNULIB_STRCHRNUL=1
34119 $as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
34126 if test $gl_cv_func_malloc_posix != yes; then
34127 REPLACE_STRDUP=1
34130 if test $ac_cv_have_decl_strdup = no; then
34131 HAVE_DECL_STRDUP=0
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=
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='#'
34148 if test -z "$GL_COND_OBJ_STRDUP_TRUE"; then :
34167 GL_GNULIB_STRDUP=1
34173 $as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
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
34200 else
34201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34202 /* end confdefs.h. */
34203 #include <string.h>
34206 main ()
34208 if (!*strerror (-2)) return 1;
34210 return 0;
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
34218 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34219 conftest.$ac_objext conftest.beam conftest.$ac_ext
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) ;;
34229 REPLACE_STRERROR=1
34231 esac
34233 case "$gl_cv_func_strerror_r_works" in
34234 *no) REPLACE_STRERROR=1 ;;
34235 esac
34237 else
34238 REPLACE_STRERROR=1
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=
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='#'
34257 cat >>confdefs.h <<_ACEOF
34258 #define GNULIB_STRERROR 1
34259 _ACEOF
34276 GL_GNULIB_STRERROR=1
34282 $as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
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=
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='#'
34302 if test -z "$GL_COND_OBJ_STRERROR_OVERRIDE_TRUE"; then :
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
34319 done
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
34338 if test $ac_cv_have_decl_strerror_r = no; then
34339 HAVE_DECL_STRERROR_R=0
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
34351 else
34352 REPLACE_STRERROR_R=1
34356 if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then :
34366 gl_LIBOBJS="$gl_LIBOBJS strerror_r.$ac_objext"
34390 GL_GNULIB_STRERROR_R=1
34396 $as_echo "#define GNULIB_TEST_STRERROR_R 1" >>confdefs.h
34402 cat >>confdefs.h <<_ACEOF
34403 #define GNULIB_STRERROR_R_POSIX 1
34404 _ACEOF
34432 if test $ac_cv_have_decl_strnlen = no; then
34433 HAVE_DECL_STRNLEN=0
34434 else
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
34452 main ()
34455 #define S "foobar"
34456 #define S_LEN (sizeof S - 1)
34458 /* At least one implementation is buggy: that of AIX 4.3 would
34459 give strnlen (S, 1) == 3. */
34461 int i;
34462 for (i = 0; i < S_LEN + 1; ++i)
34464 int expected = i <= S_LEN ? i : S_LEN;
34465 if (strnlen (S, i) != expected)
34466 return 1;
34468 return 0;
34471 return 0;
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
34479 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34480 conftest.$ac_objext conftest.beam conftest.$ac_ext
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 && :
34489 if test $ac_cv_func_strnlen_working = no; then
34490 REPLACE_STRNLEN=1
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=
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='#'
34508 if test -z "$GL_COND_OBJ_STRNLEN_TRUE"; then :
34527 GL_GNULIB_STRNLEN=1
34533 $as_echo "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h
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. */
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
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"
34571 rm -f conftest*
34574 else
34575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34576 /* end confdefs.h. */
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); }
34591 main ()
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)
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;
34614 /* Free allocated memory, in case some sanitizer is watching. */
34615 free (haystack);
34616 free (needle);
34617 return result;
34620 return 0;
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
34628 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34629 conftest.$ac_objext conftest.beam conftest.$ac_ext
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) ;;
34639 REPLACE_STRSTR=1
34641 esac
34644 if test $REPLACE_STRSTR = 1; then
34653 gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
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. */
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
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"
34694 rm -f conftest*
34697 else
34698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34699 /* end confdefs.h. */
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
34713 main ()
34715 return !!strstr (HAYSTACK, NEEDLE);
34718 return 0;
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
34726 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34727 conftest.$ac_objext conftest.beam conftest.$ac_ext
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) ;;
34737 REPLACE_STRSTR=1
34739 esac
34742 if test $REPLACE_STRSTR = 1; then
34751 gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
34768 GL_GNULIB_STRSTR=1
34774 $as_echo "#define GNULIB_TEST_STRSTR 1" >>confdefs.h
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
34791 done
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
34809 else
34810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34811 /* end confdefs.h. */
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>
34822 main ()
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;
34832 return 0;
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
34841 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34842 conftest.$ac_objext conftest.beam conftest.$ac_ext
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
34853 esac
34854 else
34855 HAVE_STRTOK_R=0
34858 if test $ac_cv_have_decl_strtok_r = no; then
34859 HAVE_DECL_STRTOK_R=0
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=
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='#'
34876 if test -z "$GL_COND_OBJ_STRTOK_R_TRUE"; then :
34897 GL_GNULIB_STRTOK_R=1
34903 $as_echo "#define GNULIB_TEST_STRTOK_R 1" >>confdefs.h
34970 cat >>confdefs.h <<_ACEOF
34971 #define GNULIB_TEMPNAME 1
34972 _ACEOF
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>
34998 if test "x$ac_cv_have_decl_localtime_r" = xyes; then :
34999 ac_have_decl=1
35000 else
35001 ac_have_decl=0
35004 cat >>confdefs.h <<_ACEOF
35005 #define HAVE_DECL_LOCALTIME_R $ac_have_decl
35006 _ACEOF
35008 if test $ac_cv_have_decl_localtime_r = no; then
35009 HAVE_DECL_LOCALTIME_R=0
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>
35031 main ()
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);
35042 return 0;
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
35051 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
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>
35079 main ()
35081 time_t a;
35082 struct tm r;
35083 localtime_r (&a, &r);
35086 return 0;
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
35095 rm -f core conftest.err conftest.$ac_objext \
35096 conftest$ac_exeext conftest.$ac_ext
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
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=
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='#'
35120 if test -z "$GL_COND_OBJ_TIME_R_TRUE"; then :
35136 GL_GNULIB_TIME_R=1
35142 $as_echo "#define GNULIB_TEST_TIME_R 1" >>confdefs.h
35159 if test $ac_cv_have_decl_unsetenv = no; then
35160 HAVE_DECL_UNSETENV=0
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
35171 done
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. */
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
35191 #endif
35192 int unsetenv (const char *name);
35195 main ()
35199 return 0;
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'
35207 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
35213 $as_echo "#define VOID_UNSETENV 1" >>confdefs.h
35215 REPLACE_UNSETENV=1
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
35231 else
35232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35233 /* end confdefs.h. */
35235 #include <stdlib.h>
35236 #include <errno.h>
35237 extern char **environ;
35240 $gl_mda_defines
35243 main ()
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;
35263 return 0;
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
35271 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35272 conftest.$ac_objext conftest.beam conftest.$ac_ext
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) ;;
35282 REPLACE_UNSETENV=1
35284 esac
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=
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='#'
35301 if test -z "$GL_COND_OBJ_UNSETENV_TRUE"; then :
35318 GL_GNULIB_UNSETENV=1
35324 $as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
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
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
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]);
35360 simple (int count, int all[static count])
35362 return all[count - 1];
35366 fvla (int m, int C[m][m])
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];
35375 #endif
35378 main ()
35382 return 0;
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
35390 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35392 rm -f conftest*
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
35399 $as_echo "#define HAVE_C_VARARRAYS 1" >>confdefs.h
35401 elif test "$ac_cv_c_vararrays" = no; then
35403 $as_echo "#define __STDC_NO_VLA__ 1" >>confdefs.h
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=
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='#'
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=
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='#'
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=
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='#'
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=
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='#'
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>
35498 main ()
35500 return ! wmemchr ((const wchar_t *) 0, (wchar_t) ' ', 0);
35502 return 0;
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
35511 rm -f core conftest.err conftest.$ac_objext \
35512 conftest$ac_exeext conftest.$ac_ext
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
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=
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='#'
35549 GL_GNULIB_WMEMCHR=1
35555 $as_echo "#define GNULIB_TEST_WMEMCHR 1" >>confdefs.h
35567 if test $ac_cv_func_wmempcpy = no; then
35568 HAVE_WMEMPCPY=0
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=
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='#'
35599 GL_GNULIB_WMEMPCPY=1
35605 $as_echo "#define GNULIB_TEST_WMEMPCPY 1" >>confdefs.h
35609 # End of code from modules
35621 gltests_libdeps=
35622 gltests_ltlibdeps=
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
35639 gl_module_indicator_condition=$gltests_WITNESS
35652 LIBGNU_LIBDEPS="$gl_libdeps"
35654 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
35658 am__api_version='1.15'
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
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/* ) ;;
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.
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.
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
35721 done
35722 done
35724 esac
35726 done
35727 IFS=$as_save_IFS
35729 rm -rf conftest.one conftest.two conftest.dir
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
35742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
35743 $as_echo "$INSTALL" >&6; }
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}'
35749 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
35751 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
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='
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
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`
35782 if test "$*" != "X $srcdir/configure conftest.file" \
35783 && test "$*" != "X conftest.file $srcdir/configure"; then
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
35792 if test "$2" = conftest.file || test $am_try -eq 2; then
35793 break
35795 # Just in case.
35796 sleep 1
35797 am_has_slept=yes
35798 done
35799 test "$2" = conftest.file
35801 then
35802 # Ok.
35804 else
35805 as_fn_error $? "newly created file is older than distributed files!
35806 Check your system clock" "$LINENO" 5
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=$!
35818 rm -f conftest.file
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"`
35830 # Expand $ac_aux_dir to an absolute path.
35831 am_aux_dir=`cd "$ac_aux_dir" && pwd`
35833 if test x"${MISSING+set}" != xset; then
35834 case $am_aux_dir in
35835 *\ * | *\ *)
35836 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
35838 MISSING="\${SHELL} $am_aux_dir/missing" ;;
35839 esac
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;}
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'" ;;
35855 install_sh="\${SHELL} $am_aux_dir/install-sh"
35856 esac
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
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
35886 done
35887 done
35888 IFS=$as_save_IFS
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; }
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
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
35926 done
35927 done
35928 IFS=$as_save_IFS
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; }
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
35952 else
35953 STRIP="$ac_cv_prog_STRIP"
35957 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
35959 for ac_prog in gawk mawk nawk awk
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
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
35982 done
35983 done
35984 IFS=$as_save_IFS
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; }
35998 test -n "$AWK" && break
35999 done
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;;
36018 eval ac_cv_prog_make_${ac_make}_set=no;;
36019 esac
36020 rm -f conftest.make
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}"
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=_
36039 rmdir .tst 2>/dev/null
36041 DEPDIR="${am__leading_dot}deps"
36043 ac_config_commands="$ac_config_commands depfiles"
36046 am_make=${MAKE-make}
36047 cat > confinc << 'END'
36048 am__doit:
36049 @echo this is the am__doit target
36050 .PHONY: am__doit
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
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
36077 esac
36081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
36082 $as_echo "$_am_result" >&6; }
36083 rm -f confinc confmf
36085 # Check whether --enable-dependency-tracking was given.
36086 if test "${enable_dependency_tracking+set}" = set; then :
36087 enableval=$enable_dependency_tracking;
36090 if test "x$enable_dependency_tracking" != xno; then
36091 am_depcomp="$ac_aux_dir/depcomp"
36092 AMDEPBACKSLASH='\'
36093 am__nodep='_no'
36095 if test "x$enable_dependency_tracking" != xno; then
36096 AMDEP_TRUE=
36097 AMDEP_FALSE='#'
36098 else
36099 AMDEP_TRUE='#'
36100 AMDEP_FALSE=
36104 # Check whether --enable-silent-rules was given.
36105 if test "${enable_silent_rules+set}" = set; then :
36106 enableval=$enable_silent_rules;
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
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
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
36141 AM_BACKSLASH='\'
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
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
36163 # Define the identity of the package.
36164 PACKAGE='libgnu'
36165 VERSION='UNUSED-VERSION'
36168 # Some tools Automake needs.
36170 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
36173 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
36176 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
36179 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
36182 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
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)'
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}'
36197 # We'll loop over all known methods to create a tar archive until one works.
36198 _am_tools='gnutar pax cpio none'
36200 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
36206 depcc="$CC" am_compiler_list=
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
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`
36237 am__universal=false
36238 case " $depcc " in #(
36239 *\ -arch\ *\ -arch\ *) am__universal=true ;;
36240 esac
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.
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
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
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
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=
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
36310 done
36312 cd ..
36313 rm -rf conftest.dir
36314 else
36315 am_cv_CC_dependencies_compiler_type=none
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
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=
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!
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>
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.
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.
36365 You can download and install GNU coreutils to get an 'rm' implementation
36366 that behaves properly: <http://www.gnu.org/software/coreutils/>.
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.
36373 as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
36378 # Check whether --enable-silent-rules was given.
36379 if test "${enable_silent_rules+set}" = set; then :
36380 enableval=$enable_silent_rules;
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
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
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
36415 AM_BACKSLASH='\'
36418 # --------------------- #
36419 # Checks for programs. #
36420 # --------------------- #
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; }
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
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
36456 done
36457 done
36458 IFS=$as_save_IFS
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; }
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
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
36496 done
36497 done
36498 IFS=$as_save_IFS
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; }
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
36522 else
36523 RANLIB="$ac_cv_prog_RANLIB"
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
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
36549 done
36550 done
36551 IFS=$as_save_IFS
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; }
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
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
36589 done
36590 done
36591 IFS=$as_save_IFS
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; }
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
36615 else
36616 AR="$ac_cv_prog_AR"
36620 # ---------------------- #
36621 # Checks for libraries. #
36622 # ---------------------- #
36624 ac_config_files="$ac_config_files Makefile.gnulib.inc"
36627 ac_config_files="$ac_config_files Makefile import/Makefile"
36629 ac_config_commands="$ac_config_commands default"
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.
36638 # config.status only pays attention to the cache file if you give it
36639 # the --recheck option to rerun configure.
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.
36645 _ACEOF
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.
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
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 ;; #(
36679 # `set' quotes correctly as required by POSIX, so do not add quotes.
36680 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
36682 esac |
36683 sort
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" ;; #(
36706 mv -f confcache "$cache_file" ;;
36707 esac
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;}
36715 rm -f confcache
36717 test "x$prefix" = xNONE && prefix=$ac_default_prefix
36718 # Let make expand exec_prefix.
36719 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
36721 DEFS=-DHAVE_CONFIG_H
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
36736 LTLIBOBJS=$ac_ltlibobjs
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
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
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
36769 gl_LIBOBJS=$gl_libobjs
36771 gl_LTLIBOBJS=$gl_ltlibobjs
36773 gl_LIBOBJDEPS=$gl_libobjdeps
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
36796 gltests_LIBOBJS=$gltests_libobjs
36798 gltests_LTLIBOBJS=$gltests_ltlibobjs
36800 gltests_LIBOBJDEPS=$gltests_libobjdeps
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
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
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
36819 if test -n "$EXEEXT"; then
36820 am__EXEEXT_TRUE=
36821 am__EXEEXT_FALSE='#'
36822 else
36823 am__EXEEXT_TRUE='#'
36824 am__EXEEXT_FALSE=
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.
36842 debug=false
36843 ac_cs_recheck=false
36844 ac_cs_silent=false
36846 SHELL=\${CONFIG_SHELL-$SHELL}
36847 export SHELL
36848 _ASEOF
36849 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
36850 ## -------------------- ##
36851 ## M4sh Initialization. ##
36852 ## -------------------- ##
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 *) :
36869 esac
36873 as_nl='
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"
36904 export as_echo_n_body
36905 as_echo_n='sh -c $as_echo_n_body as_echo'
36907 export as_echo_body
36908 as_echo='sh -c $as_echo_body as_echo'
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=';'
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"
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
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
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
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
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='+ '
36965 # NLS nuisances.
36966 LC_ALL=C
36967 export LC_ALL
36968 LANGUAGE=C
36969 export LANGUAGE
36971 # CDPATH.
36972 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
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 ()
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
36987 $as_echo "$as_me: error: $2" >&2
36988 as_fn_exit $as_status
36989 } # as_fn_error
36992 # as_fn_set_status STATUS
36993 # -----------------------
36994 # Set $? to STATUS, without forking.
36995 as_fn_set_status ()
36997 return $1
36998 } # as_fn_set_status
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 ()
37005 set +e
37006 as_fn_set_status $1
37007 exit $1
37008 } # as_fn_exit
37010 # as_fn_unset VAR
37011 # ---------------
37012 # Portably unset VAR.
37013 as_fn_unset ()
37015 { eval $1=; unset $1;}
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 ()
37027 eval $1+=\$2
37029 else
37030 as_fn_append ()
37032 eval $1=\$$1\$2
37034 fi # as_fn_append
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 ()
37044 as_val=$(( $* ))
37046 else
37047 as_fn_arith ()
37049 as_val=`expr "$@" || test $? -eq 1`
37051 fi # as_fn_arith
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
37061 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
37062 as_basename=basename
37063 else
37064 as_basename=false
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
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/
37082 /^X\/\(\/\/\)$/{
37083 s//\1/
37086 /^X\/\(\/\).*/{
37087 s//\1/
37090 s/.*/./; q'`
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
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;;
37109 ECHO_N='-n';;
37110 esac
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
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'
37133 else
37134 as_ln_s='cp -pR'
37136 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
37137 rmdir conf$$.dir 2>/dev/null
37140 # as_fn_mkdir_p
37141 # -------------
37142 # Create "$as_dir" as a directory, including parents if necessary.
37143 as_fn_mkdir_p ()
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/
37167 /^X\(\/\/\)[^/].*/{
37168 s//\1/
37171 /^X\(\/\/\)$/{
37172 s//\1/
37175 /^X\(\/\).*/{
37176 s//\1/
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"
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
37195 # as_fn_executable_p FILE
37196 # -----------------------
37197 # Test if FILE is an executable regular file.
37198 as_fn_executable_p ()
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
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'"
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'"
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
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
37227 CONFIG_FILES = $CONFIG_FILES
37228 CONFIG_HEADERS = $CONFIG_HEADERS
37229 CONFIG_LINKS = $CONFIG_LINKS
37230 CONFIG_COMMANDS = $CONFIG_COMMANDS
37231 $ $0 $@
37233 on `(hostname || uname -n) 2>/dev/null | sed 1q`
37236 _ACEOF
37238 case $ac_config_files in *"
37239 "*) set x $ac_config_files; shift; ac_config_files=$*;;
37240 esac
37242 case $ac_config_headers in *"
37243 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
37244 esac
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"
37253 _ACEOF
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.
37261 Usage: $0 [OPTION]... [TAG]...
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
37275 Configuration files:
37276 $config_files
37278 Configuration headers:
37279 $config_headers
37281 Configuration commands:
37282 $config_commands
37284 Report bugs to the package provider."
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\\"
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."
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
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
37311 case $1 in
37312 --*=?*)
37313 ac_option=`expr "X$1" : 'X\([^=]*\)='`
37314 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
37315 ac_shift=:
37317 --*=)
37318 ac_option=`expr "X$1" : 'X\([^=]*\)='`
37319 ac_optarg=
37320 ac_shift=:
37323 ac_option=$1
37324 ac_optarg=$2
37325 ac_shift=shift
37327 esac
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=: ;;
37364 # This is an error.
37365 -*) as_fn_error $? "unrecognized option: \`$1'
37366 Try \`$0 --help' for more information." ;;
37368 *) as_fn_append ac_config_targets " $1"
37369 ac_need_defaults=false ;;
37371 esac
37372 shift
37373 done
37375 ac_configure_extra_args=
37377 if $ac_cs_silent; then
37378 exec 6>/dev/null
37379 ac_configure_extra_args="$ac_configure_extra_args --silent"
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 "\$@"
37393 _ACEOF
37394 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37395 exec 5>>config.log
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
37404 _ACEOF
37405 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37407 # INIT-COMMANDS
37409 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
37411 _ACEOF
37413 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37415 # Handling of arguments.
37416 for ac_config_target in $ac_config_targets
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" ;;
37426 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
37427 esac
37428 done
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
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 ||
37449 tmp= ac_tmp=
37450 trap 'exit_status=$?
37451 : "${ac_tmp:=$tmp}"
37452 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
37454 trap 'as_fn_exit 1' 1 2 13 15
37456 # Create a (secure) tmp directory for tmp files.
37459 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
37460 test -d "$tmp"
37461 } ||
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
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
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\'
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
37488 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
37489 _ACEOF
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
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!! "
37512 done
37513 rm -f conf$$subs.sh
37515 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37516 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
37517 _ACEOF
37518 sed -n '
37520 s/^/S["/; s/!.*/"]=/
37523 s/^[^!]*!//
37524 :repl
37525 t repl
37526 s/'"$ac_delim"'$//
37527 t delim
37530 s/\(.\{148\}\)..*/\1/
37531 t more1
37532 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
37535 b repl
37536 :more1
37537 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
37540 s/.\{148\}//
37541 t nl
37542 :delim
37544 s/\(.\{148\}\)..*/\1/
37545 t more2
37546 s/["\\]/\\&/g; s/^/"/; s/$/"/
37549 :more2
37550 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
37553 s/.\{148\}//
37554 t delim
37555 ' <conf$$subs.awk | sed '
37556 /^[^""]/{
37558 s/\n//
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"
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
37586 print line
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
37596 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
37597 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
37598 _ACEOF
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[ ]*=[ ]*/{
37607 s///
37608 s/^/:/
37609 s/[ ]*$/:/
37610 s/:\$(srcdir):/:/g
37611 s/:\${srcdir}:/:/g
37612 s/:@srcdir@:/:/g
37613 s/^:*//
37614 s/:*$//
37616 s/\(=[ ]*\).*/\1/
37618 s/\n//
37619 s/^[^=]*=[ ]*$//
37623 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37624 fi # test -n "$CONFIG_FILES"
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
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.
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!! "
37650 done
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.
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
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
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
37680 :cont
37682 s/.\{148\}/&'"$ac_delim"'/g
37683 t clear
37684 :clear
37685 s/\\$//
37686 t bsnlc
37687 s/["\\]/\\&/g; s/^/"/; s/$/"/p
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
37696 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37697 for (key in D) D_is_set[key] = 1
37698 FS = "\a"
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]
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
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"
37735 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
37736 shift
37737 for ac_tag
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
37756 case $ac_mode in
37757 :L) ac_source=$1;;
37758 :[FH])
37759 ac_file_inputs=
37760 for ac_f
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
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;}
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
37797 case $ac_tag in
37798 *:-:* | *:-) cat >"$ac_tmp/stdin" \
37799 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
37800 esac
37802 esac
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/
37814 /^X\(\/\/\)[^/].*/{
37815 s//\1/
37818 /^X\(\/\/\)$/{
37819 s//\1/
37822 /^X\(\/\).*/{
37823 s//\1/
37826 s/.*/./; q'`
37827 as_dir="$ac_dir"; as_fn_mkdir_p
37828 ac_builddir=.
37830 case "$ac_dir" in
37831 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
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
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
37863 case $ac_mode in
37866 # CONFIG_FILE
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
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/ {
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
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
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
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
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;}
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
37956 # CONFIG_HEADER
37958 if test x"$ac_file" != x-; then
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
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
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 ;;
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/
37998 /^X\(\/\/\)[^/].*/{
37999 s//\1/
38002 /^X\(\/\/\)$/{
38003 s//\1/
38006 /^X\(\/\).*/{
38007 s//\1/
38010 s/.*/./; q'`/stamp-h$_am_stamp_count
38013 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
38014 $as_echo "$as_me: executing $ac_file commands" >&6;}
38016 esac
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
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/
38051 /^X\(\/\/\)[^/].*/{
38052 s//\1/
38055 /^X\(\/\/\)$/{
38056 s//\1/
38059 /^X\(\/\).*/{
38060 s//\1/
38063 s/.*/./; q'`
38064 else
38065 continue
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/
38093 /^X\(\/\/\)[^/].*/{
38094 s//\1/
38097 /^X\(\/\/\)$/{
38098 s//\1/
38101 /^X\(\/\).*/{
38102 s//\1/
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
38113 "default":C)
38114 case x$CONFIG_HEADERS in
38115 xconfig.h:config.in)
38116 echo > stamp-h ;;
38117 esac
38120 esac
38121 done # for ac_tag
38124 as_fn_exit 0
38125 _ACEOF
38126 ac_clean_files=$ac_clean_files_save
38128 test $ac_write_fail = 0 ||
38129 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
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
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;}
38158 exit 0