gdb: add target_ops::supports_displaced_step
[deliverable/binutils-gdb.git] / gnulib / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for libgnu UNUSED-VERSION.
4 #
5 #
6 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
7 #
8 #
9 # This configure script is free software; the Free Software Foundation
10 # gives unlimited permission to copy, distribute and modify it.
11 ## -------------------- ##
12 ## M4sh Initialization. ##
13 ## -------------------- ##
14
15 # Be more Bourne compatible
16 DUALCASE=1; export DUALCASE # for MKS sh
17 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
18 emulate sh
19 NULLCMD=:
20 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
21 # is contrary to our usage. Disable this feature.
22 alias -g '${1+"$@"}'='"$@"'
23 setopt NO_GLOB_SUBST
24 else
25 case `(set -o) 2>/dev/null` in #(
26 *posix*) :
27 set -o posix ;; #(
28 *) :
29 ;;
30 esac
31 fi
32
33
34 as_nl='
35 '
36 export as_nl
37 # Printing a long string crashes Solaris 7 /usr/bin/printf.
38 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41 # Prefer a ksh shell builtin over an external printf program on Solaris,
42 # but without wasting forks for bash or zsh.
43 if test -z "$BASH_VERSION$ZSH_VERSION" \
44 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45 as_echo='print -r --'
46 as_echo_n='print -rn --'
47 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='printf %s\n'
49 as_echo_n='printf %s'
50 else
51 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53 as_echo_n='/usr/ucb/echo -n'
54 else
55 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56 as_echo_n_body='eval
57 arg=$1;
58 case $arg in #(
59 *"$as_nl"*)
60 expr "X$arg" : "X\\(.*\\)$as_nl";
61 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62 esac;
63 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64 '
65 export as_echo_n_body
66 as_echo_n='sh -c $as_echo_n_body as_echo'
67 fi
68 export as_echo_body
69 as_echo='sh -c $as_echo_body as_echo'
70 fi
71
72 # The user is always right.
73 if test "${PATH_SEPARATOR+set}" != set; then
74 PATH_SEPARATOR=:
75 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77 PATH_SEPARATOR=';'
78 }
79 fi
80
81
82 # IFS
83 # We need space, tab and new line, in precisely that order. Quoting is
84 # there to prevent editors from complaining about space-tab.
85 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
86 # splitting by setting IFS to empty value.)
87 IFS=" "" $as_nl"
88
89 # Find who we are. Look in the path if we contain no directory separator.
90 as_myself=
91 case $0 in #((
92 *[\\/]* ) as_myself=$0 ;;
93 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
94 for as_dir in $PATH
95 do
96 IFS=$as_save_IFS
97 test -z "$as_dir" && as_dir=.
98 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
99 done
100 IFS=$as_save_IFS
101
102 ;;
103 esac
104 # We did not find ourselves, most probably we were run as `sh COMMAND'
105 # in which case we are not to be found in the path.
106 if test "x$as_myself" = x; then
107 as_myself=$0
108 fi
109 if test ! -f "$as_myself"; then
110 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
111 exit 1
112 fi
113
114 # Unset variables that we do not need and which cause bugs (e.g. in
115 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
116 # suppresses any "Segmentation fault" message there. '((' could
117 # trigger a bug in pdksh 5.2.14.
118 for as_var in BASH_ENV ENV MAIL MAILPATH
119 do eval test x\${$as_var+set} = xset \
120 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
121 done
122 PS1='$ '
123 PS2='> '
124 PS4='+ '
125
126 # NLS nuisances.
127 LC_ALL=C
128 export LC_ALL
129 LANGUAGE=C
130 export LANGUAGE
131
132 # CDPATH.
133 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
134
135 # Use a proper internal environment variable to ensure we don't fall
136 # into an infinite loop, continuously re-executing ourselves.
137 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
138 _as_can_reexec=no; export _as_can_reexec;
139 # We cannot yet assume a decent shell, so we have to provide a
140 # neutralization value for shells without unset; and this also
141 # works around shells that cannot unset nonexistent variables.
142 # Preserve -v and -x to the replacement shell.
143 BASH_ENV=/dev/null
144 ENV=/dev/null
145 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
146 case $- in # ((((
147 *v*x* | *x*v* ) as_opts=-vx ;;
148 *v* ) as_opts=-v ;;
149 *x* ) as_opts=-x ;;
150 * ) as_opts= ;;
151 esac
152 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
153 # Admittedly, this is quite paranoid, since all the known shells bail
154 # out after a failed `exec'.
155 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
156 as_fn_exit 255
157 fi
158 # We don't want this to propagate to other subprocesses.
159 { _as_can_reexec=; unset _as_can_reexec;}
160 if test "x$CONFIG_SHELL" = x; then
161 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
162 emulate sh
163 NULLCMD=:
164 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
165 # is contrary to our usage. Disable this feature.
166 alias -g '\${1+\"\$@\"}'='\"\$@\"'
167 setopt NO_GLOB_SUBST
168 else
169 case \`(set -o) 2>/dev/null\` in #(
170 *posix*) :
171 set -o posix ;; #(
172 *) :
173 ;;
174 esac
175 fi
176 "
177 as_required="as_fn_return () { (exit \$1); }
178 as_fn_success () { as_fn_return 0; }
179 as_fn_failure () { as_fn_return 1; }
180 as_fn_ret_success () { return 0; }
181 as_fn_ret_failure () { return 1; }
182
183 exitcode=0
184 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
185 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
186 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
187 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
188 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
189
190 else
191 exitcode=1; echo positional parameters were not saved.
192 fi
193 test x\$exitcode = x0 || exit 1
194 test -x / || exit 1"
195 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
196 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
197 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
198 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
199 test \$(( 1 + 1 )) = 2 || exit 1"
200 if (eval "$as_required") 2>/dev/null; then :
201 as_have_required=yes
202 else
203 as_have_required=no
204 fi
205 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
206
207 else
208 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
209 as_found=false
210 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
211 do
212 IFS=$as_save_IFS
213 test -z "$as_dir" && as_dir=.
214 as_found=:
215 case $as_dir in #(
216 /*)
217 for as_base in sh bash ksh sh5; do
218 # Try only shells that exist, to save several forks.
219 as_shell=$as_dir/$as_base
220 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
221 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
222 CONFIG_SHELL=$as_shell as_have_required=yes
223 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 break 2
225 fi
226 fi
227 done;;
228 esac
229 as_found=false
230 done
231 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
232 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
233 CONFIG_SHELL=$SHELL as_have_required=yes
234 fi; }
235 IFS=$as_save_IFS
236
237
238 if test "x$CONFIG_SHELL" != x; then :
239 export CONFIG_SHELL
240 # We cannot yet assume a decent shell, so we have to provide a
241 # neutralization value for shells without unset; and this also
242 # works around shells that cannot unset nonexistent variables.
243 # Preserve -v and -x to the replacement shell.
244 BASH_ENV=/dev/null
245 ENV=/dev/null
246 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247 case $- in # ((((
248 *v*x* | *x*v* ) as_opts=-vx ;;
249 *v* ) as_opts=-v ;;
250 *x* ) as_opts=-x ;;
251 * ) as_opts= ;;
252 esac
253 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
254 # Admittedly, this is quite paranoid, since all the known shells bail
255 # out after a failed `exec'.
256 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
257 exit 255
258 fi
259
260 if test x$as_have_required = xno; then :
261 $as_echo "$0: This script requires a shell more modern than all"
262 $as_echo "$0: the shells that I found on your system."
263 if test x${ZSH_VERSION+set} = xset ; then
264 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
265 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
266 else
267 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
268 $0: including any error possibly output before this
269 $0: message. Then install a modern shell, or manually run
270 $0: the script under such a shell if you do have one."
271 fi
272 exit 1
273 fi
274 fi
275 fi
276 SHELL=${CONFIG_SHELL-/bin/sh}
277 export SHELL
278 # Unset more variables known to interfere with behavior of common tools.
279 CLICOLOR_FORCE= GREP_OPTIONS=
280 unset CLICOLOR_FORCE GREP_OPTIONS
281
282 ## --------------------- ##
283 ## M4sh Shell Functions. ##
284 ## --------------------- ##
285 # as_fn_unset VAR
286 # ---------------
287 # Portably unset VAR.
288 as_fn_unset ()
289 {
290 { eval $1=; unset $1;}
291 }
292 as_unset=as_fn_unset
293
294 # as_fn_set_status STATUS
295 # -----------------------
296 # Set $? to STATUS, without forking.
297 as_fn_set_status ()
298 {
299 return $1
300 } # as_fn_set_status
301
302 # as_fn_exit STATUS
303 # -----------------
304 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
305 as_fn_exit ()
306 {
307 set +e
308 as_fn_set_status $1
309 exit $1
310 } # as_fn_exit
311
312 # as_fn_mkdir_p
313 # -------------
314 # Create "$as_dir" as a directory, including parents if necessary.
315 as_fn_mkdir_p ()
316 {
317
318 case $as_dir in #(
319 -*) as_dir=./$as_dir;;
320 esac
321 test -d "$as_dir" || eval $as_mkdir_p || {
322 as_dirs=
323 while :; do
324 case $as_dir in #(
325 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
326 *) as_qdir=$as_dir;;
327 esac
328 as_dirs="'$as_qdir' $as_dirs"
329 as_dir=`$as_dirname -- "$as_dir" ||
330 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
331 X"$as_dir" : 'X\(//\)[^/]' \| \
332 X"$as_dir" : 'X\(//\)$' \| \
333 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
334 $as_echo X"$as_dir" |
335 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
336 s//\1/
337 q
338 }
339 /^X\(\/\/\)[^/].*/{
340 s//\1/
341 q
342 }
343 /^X\(\/\/\)$/{
344 s//\1/
345 q
346 }
347 /^X\(\/\).*/{
348 s//\1/
349 q
350 }
351 s/.*/./; q'`
352 test -d "$as_dir" && break
353 done
354 test -z "$as_dirs" || eval "mkdir $as_dirs"
355 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
356
357
358 } # as_fn_mkdir_p
359
360 # as_fn_executable_p FILE
361 # -----------------------
362 # Test if FILE is an executable regular file.
363 as_fn_executable_p ()
364 {
365 test -f "$1" && test -x "$1"
366 } # as_fn_executable_p
367 # as_fn_append VAR VALUE
368 # ----------------------
369 # Append the text in VALUE to the end of the definition contained in VAR. Take
370 # advantage of any shell optimizations that allow amortized linear growth over
371 # repeated appends, instead of the typical quadratic growth present in naive
372 # implementations.
373 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
374 eval 'as_fn_append ()
375 {
376 eval $1+=\$2
377 }'
378 else
379 as_fn_append ()
380 {
381 eval $1=\$$1\$2
382 }
383 fi # as_fn_append
384
385 # as_fn_arith ARG...
386 # ------------------
387 # Perform arithmetic evaluation on the ARGs, and store the result in the
388 # global $as_val. Take advantage of shells that can avoid forks. The arguments
389 # must be portable across $(()) and expr.
390 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
391 eval 'as_fn_arith ()
392 {
393 as_val=$(( $* ))
394 }'
395 else
396 as_fn_arith ()
397 {
398 as_val=`expr "$@" || test $? -eq 1`
399 }
400 fi # as_fn_arith
401
402
403 # as_fn_error STATUS ERROR [LINENO LOG_FD]
404 # ----------------------------------------
405 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
406 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
407 # script with STATUS, using 1 if that was 0.
408 as_fn_error ()
409 {
410 as_status=$1; test $as_status -eq 0 && as_status=1
411 if test "$4"; then
412 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
413 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
414 fi
415 $as_echo "$as_me: error: $2" >&2
416 as_fn_exit $as_status
417 } # as_fn_error
418
419 if expr a : '\(a\)' >/dev/null 2>&1 &&
420 test "X`expr 00001 : '.*\(...\)'`" = X001; then
421 as_expr=expr
422 else
423 as_expr=false
424 fi
425
426 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
427 as_basename=basename
428 else
429 as_basename=false
430 fi
431
432 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
433 as_dirname=dirname
434 else
435 as_dirname=false
436 fi
437
438 as_me=`$as_basename -- "$0" ||
439 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
440 X"$0" : 'X\(//\)$' \| \
441 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
442 $as_echo X/"$0" |
443 sed '/^.*\/\([^/][^/]*\)\/*$/{
444 s//\1/
445 q
446 }
447 /^X\/\(\/\/\)$/{
448 s//\1/
449 q
450 }
451 /^X\/\(\/\).*/{
452 s//\1/
453 q
454 }
455 s/.*/./; q'`
456
457 # Avoid depending upon Character Ranges.
458 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
459 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
460 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
461 as_cr_digits='0123456789'
462 as_cr_alnum=$as_cr_Letters$as_cr_digits
463
464
465 as_lineno_1=$LINENO as_lineno_1a=$LINENO
466 as_lineno_2=$LINENO as_lineno_2a=$LINENO
467 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
468 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
469 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
470 sed -n '
471 p
472 /[$]LINENO/=
473 ' <$as_myself |
474 sed '
475 s/[$]LINENO.*/&-/
476 t lineno
477 b
478 :lineno
479 N
480 :loop
481 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
482 t loop
483 s/-\n.*//
484 ' >$as_me.lineno &&
485 chmod +x "$as_me.lineno" ||
486 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
487
488 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
489 # already done that, so ensure we don't try to do so again and fall
490 # in an infinite loop. This has already happened in practice.
491 _as_can_reexec=no; export _as_can_reexec
492 # Don't try to exec as it changes $[0], causing all sort of problems
493 # (the dirname of $[0] is not the place where we might find the
494 # original and so on. Autoconf is especially sensitive to this).
495 . "./$as_me.lineno"
496 # Exit status is that of the last command.
497 exit
498 }
499
500 ECHO_C= ECHO_N= ECHO_T=
501 case `echo -n x` in #(((((
502 -n*)
503 case `echo 'xy\c'` in
504 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
505 xy) ECHO_C='\c';;
506 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
507 ECHO_T=' ';;
508 esac;;
509 *)
510 ECHO_N='-n';;
511 esac
512
513 rm -f conf$$ conf$$.exe conf$$.file
514 if test -d conf$$.dir; then
515 rm -f conf$$.dir/conf$$.file
516 else
517 rm -f conf$$.dir
518 mkdir conf$$.dir 2>/dev/null
519 fi
520 if (echo >conf$$.file) 2>/dev/null; then
521 if ln -s conf$$.file conf$$ 2>/dev/null; then
522 as_ln_s='ln -s'
523 # ... but there are two gotchas:
524 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
525 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
526 # In both cases, we have to default to `cp -pR'.
527 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
528 as_ln_s='cp -pR'
529 elif ln conf$$.file conf$$ 2>/dev/null; then
530 as_ln_s=ln
531 else
532 as_ln_s='cp -pR'
533 fi
534 else
535 as_ln_s='cp -pR'
536 fi
537 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538 rmdir conf$$.dir 2>/dev/null
539
540 if mkdir -p . 2>/dev/null; then
541 as_mkdir_p='mkdir -p "$as_dir"'
542 else
543 test -d ./-p && rmdir ./-p
544 as_mkdir_p=false
545 fi
546
547 as_test_x='test -x'
548 as_executable_p=as_fn_executable_p
549
550 # Sed expression to map a string onto a valid CPP name.
551 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
552
553 # Sed expression to map a string onto a valid variable name.
554 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
555
556
557 test -n "$DJDIR" || exec 7<&0 </dev/null
558 exec 6>&1
559
560 # Name of the host.
561 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
562 # so uname gets run too.
563 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
564
565 #
566 # Initializations.
567 #
568 ac_default_prefix=/usr/local
569 ac_clean_files=
570 ac_config_libobj_dir=.
571 LIBOBJS=
572 cross_compiling=no
573 subdirs=
574 MFLAGS=
575 MAKEFLAGS=
576
577 # Identity of this package.
578 PACKAGE_NAME='libgnu'
579 PACKAGE_TARNAME='libgnu'
580 PACKAGE_VERSION='UNUSED-VERSION'
581 PACKAGE_STRING='libgnu UNUSED-VERSION'
582 PACKAGE_BUGREPORT=''
583 PACKAGE_URL=''
584
585 ac_unique_file="import/memmem.c"
586 # Factoring default headers for most tests.
587 ac_includes_default="\
588 #include <stdio.h>
589 #ifdef HAVE_SYS_TYPES_H
590 # include <sys/types.h>
591 #endif
592 #ifdef HAVE_SYS_STAT_H
593 # include <sys/stat.h>
594 #endif
595 #ifdef STDC_HEADERS
596 # include <stdlib.h>
597 # include <stddef.h>
598 #else
599 # ifdef HAVE_STDLIB_H
600 # include <stdlib.h>
601 # endif
602 #endif
603 #ifdef HAVE_STRING_H
604 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
605 # include <memory.h>
606 # endif
607 # include <string.h>
608 #endif
609 #ifdef HAVE_STRINGS_H
610 # include <strings.h>
611 #endif
612 #ifdef HAVE_INTTYPES_H
613 # include <inttypes.h>
614 #endif
615 #ifdef HAVE_STDINT_H
616 # include <stdint.h>
617 #endif
618 #ifdef HAVE_UNISTD_H
619 # include <unistd.h>
620 #endif"
621
622 gl_use_threads_default=
623 gl_use_winpthreads_default=
624 ac_header_list=
625 ac_func_list=
626 gl_fnmatch_required=POSIX
627 ac_subst_vars='am__EXEEXT_FALSE
628 am__EXEEXT_TRUE
629 gltests_LTLIBOBJS
630 gltests_LIBOBJS
631 gl_LTLIBOBJS
632 gl_LIBOBJS
633 LTLIBOBJS
634 LIBOBJS
635 LN_S
636 AM_BACKSLASH
637 AM_DEFAULT_VERBOSITY
638 AM_DEFAULT_V
639 AM_V
640 am__fastdepCC_FALSE
641 am__fastdepCC_TRUE
642 CCDEPMODE
643 am__nodep
644 AMDEPBACKSLASH
645 AMDEP_FALSE
646 AMDEP_TRUE
647 am__quote
648 am__include
649 DEPDIR
650 am__untar
651 am__tar
652 AMTAR
653 am__leading_dot
654 SET_MAKE
655 AWK
656 mkdir_p
657 INSTALL_STRIP_PROGRAM
658 STRIP
659 install_sh
660 MAKEINFO
661 AUTOHEADER
662 AUTOMAKE
663 AUTOCONF
664 ACLOCAL
665 VERSION
666 PACKAGE
667 CYGPATH_W
668 am__isrc
669 INSTALL_DATA
670 INSTALL_SCRIPT
671 INSTALL_PROGRAM
672 LIBGNU_LTLIBDEPS
673 LIBGNU_LIBDEPS
674 gltests_WITNESS
675 REPLACE_TOWLOWER
676 REPLACE_ISWCNTRL
677 HAVE_WCTYPE_H
678 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
679 NEXT_WCTYPE_H
680 HAVE_ISWCNTRL
681 REPLACE_ISWXDIGIT
682 REPLACE_ISWDIGIT
683 REPLACE_ISWBLANK
684 HAVE_WCTRANS_T
685 HAVE_WCTYPE_T
686 HAVE_ISWBLANK
687 GNULIB_TOWCTRANS
688 GNULIB_WCTRANS
689 GNULIB_ISWCTYPE
690 GNULIB_WCTYPE
691 GNULIB_ISWXDIGIT
692 GNULIB_ISWDIGIT
693 GNULIB_ISWBLANK
694 HAVE_CRTDEFS_H
695 HAVE_WINT_T
696 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
697 NEXT_WCHAR_H
698 HAVE_UNISTD_H
699 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
700 NEXT_UNISTD_H
701 UNISTD_H_DEFINES_STRUCT_TIMESPEC
702 PTHREAD_H_DEFINES_STRUCT_TIMESPEC
703 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
704 TIME_H_DEFINES_STRUCT_TIMESPEC
705 NEXT_AS_FIRST_DIRECTIVE_TIME_H
706 NEXT_TIME_H
707 HAVE_SYS_UIO_H
708 NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H
709 NEXT_SYS_UIO_H
710 WINDOWS_STAT_INODES
711 WINDOWS_64_BIT_OFF_T
712 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
713 NEXT_SYS_TYPES_H
714 NEXT_AS_FIRST_DIRECTIVE_STRING_H
715 NEXT_STRING_H
716 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
717 NEXT_STDLIB_H
718 NEXT_AS_FIRST_DIRECTIVE_STDIO_H
719 NEXT_STDIO_H
720 HAVE__BOOL
721 GL_GENERATE_STDBOOL_H_FALSE
722 GL_GENERATE_STDBOOL_H_TRUE
723 STDBOOL_H
724 GL_GENERATE_STDALIGN_H_FALSE
725 GL_GENERATE_STDALIGN_H_TRUE
726 STDALIGN_H
727 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
728 NEXT_SIGNAL_H
729 REPLACE_RAISE
730 REPLACE_PTHREAD_SIGMASK
731 HAVE_SIGHANDLER_T
732 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
733 HAVE_STRUCT_SIGACTION_SA_SIGACTION
734 HAVE_SIGACTION
735 HAVE_SIGINFO_T
736 HAVE_SIGSET_T
737 HAVE_RAISE
738 HAVE_PTHREAD_SIGMASK
739 HAVE_POSIX_SIGNALBLOCKING
740 GNULIB_SIGACTION
741 GNULIB_SIGPROCMASK
742 GNULIB_SIGNAL_H_SIGPIPE
743 GNULIB_RAISE
744 GNULIB_PTHREAD_SIGMASK
745 REPLACE_VSPRINTF
746 REPLACE_VSNPRINTF
747 REPLACE_VPRINTF
748 REPLACE_VFPRINTF
749 REPLACE_VDPRINTF
750 REPLACE_VASPRINTF
751 REPLACE_TMPFILE
752 REPLACE_STDIO_WRITE_FUNCS
753 REPLACE_STDIO_READ_FUNCS
754 REPLACE_SPRINTF
755 REPLACE_SNPRINTF
756 REPLACE_RENAMEAT
757 REPLACE_RENAME
758 REPLACE_REMOVE
759 REPLACE_PRINTF
760 REPLACE_POPEN
761 REPLACE_PERROR
762 REPLACE_OBSTACK_PRINTF
763 REPLACE_GETLINE
764 REPLACE_GETDELIM
765 REPLACE_FTELLO
766 REPLACE_FTELL
767 REPLACE_FSEEKO
768 REPLACE_FSEEK
769 REPLACE_FREOPEN
770 REPLACE_FPURGE
771 REPLACE_FPRINTF
772 REPLACE_FOPEN
773 REPLACE_FFLUSH
774 REPLACE_FDOPEN
775 REPLACE_FCLOSE
776 REPLACE_DPRINTF
777 HAVE_VDPRINTF
778 HAVE_VASPRINTF
779 HAVE_RENAMEAT
780 HAVE_POPEN
781 HAVE_PCLOSE
782 HAVE_FTELLO
783 HAVE_FSEEKO
784 HAVE_DPRINTF
785 HAVE_DECL_VSNPRINTF
786 HAVE_DECL_SNPRINTF
787 HAVE_DECL_OBSTACK_PRINTF
788 HAVE_DECL_GETLINE
789 HAVE_DECL_GETDELIM
790 HAVE_DECL_FTELLO
791 HAVE_DECL_FSEEKO
792 HAVE_DECL_FPURGE
793 GNULIB_VSPRINTF_POSIX
794 GNULIB_VSNPRINTF
795 GNULIB_VPRINTF_POSIX
796 GNULIB_VPRINTF
797 GNULIB_VFPRINTF_POSIX
798 GNULIB_VFPRINTF
799 GNULIB_VDPRINTF
800 GNULIB_VSCANF
801 GNULIB_VFSCANF
802 GNULIB_VASPRINTF
803 GNULIB_TMPFILE
804 GNULIB_STDIO_H_SIGPIPE
805 GNULIB_STDIO_H_NONBLOCKING
806 GNULIB_SPRINTF_POSIX
807 GNULIB_SNPRINTF
808 GNULIB_SCANF
809 GNULIB_RENAMEAT
810 GNULIB_RENAME
811 GNULIB_REMOVE
812 GNULIB_PUTS
813 GNULIB_PUTCHAR
814 GNULIB_PUTC
815 GNULIB_PRINTF_POSIX
816 GNULIB_PRINTF
817 GNULIB_POPEN
818 GNULIB_PERROR
819 GNULIB_PCLOSE
820 GNULIB_OBSTACK_PRINTF_POSIX
821 GNULIB_OBSTACK_PRINTF
822 GNULIB_GETLINE
823 GNULIB_GETDELIM
824 GNULIB_GETCHAR
825 GNULIB_GETC
826 GNULIB_FWRITE
827 GNULIB_FTELLO
828 GNULIB_FTELL
829 GNULIB_FSEEKO
830 GNULIB_FSEEK
831 GNULIB_FSCANF
832 GNULIB_FREOPEN
833 GNULIB_FREAD
834 GNULIB_FPUTS
835 GNULIB_FPUTC
836 GNULIB_FPURGE
837 GNULIB_FPRINTF_POSIX
838 GNULIB_FPRINTF
839 GNULIB_FOPEN
840 GNULIB_FGETS
841 GNULIB_FGETC
842 GNULIB_FFLUSH
843 GNULIB_FDOPEN
844 GNULIB_FCLOSE
845 GNULIB_DPRINTF
846 GL_GENERATE_NETINET_IN_H_FALSE
847 GL_GENERATE_NETINET_IN_H_TRUE
848 NETINET_IN_H
849 HAVE_NETINET_IN_H
850 NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H
851 NEXT_NETINET_IN_H
852 UNDEFINE_STRTOK_R
853 REPLACE_STRSIGNAL
854 REPLACE_STRERROR_R
855 REPLACE_STRERROR
856 REPLACE_STRTOK_R
857 REPLACE_STRCASESTR
858 REPLACE_STRSTR
859 REPLACE_STRNLEN
860 REPLACE_STRNDUP
861 REPLACE_STRNCAT
862 REPLACE_STRDUP
863 REPLACE_STRCHRNUL
864 REPLACE_STPNCPY
865 REPLACE_MEMMEM
866 REPLACE_MEMCHR
867 HAVE_STRVERSCMP
868 HAVE_DECL_STRSIGNAL
869 HAVE_DECL_STRERROR_R
870 HAVE_DECL_STRTOK_R
871 HAVE_STRCASESTR
872 HAVE_STRSEP
873 HAVE_STRPBRK
874 HAVE_DECL_STRNLEN
875 HAVE_DECL_STRNDUP
876 HAVE_DECL_STRDUP
877 HAVE_STRCHRNUL
878 HAVE_STPNCPY
879 HAVE_STPCPY
880 HAVE_RAWMEMCHR
881 HAVE_DECL_MEMRCHR
882 HAVE_MEMPCPY
883 HAVE_DECL_MEMMEM
884 HAVE_MEMCHR
885 HAVE_FFSLL
886 HAVE_FFSL
887 HAVE_EXPLICIT_BZERO
888 HAVE_MBSLEN
889 GNULIB_STRVERSCMP
890 GNULIB_STRSIGNAL
891 GNULIB_STRERROR_R
892 GNULIB_STRERROR
893 GNULIB_MBSTOK_R
894 GNULIB_MBSSEP
895 GNULIB_MBSSPN
896 GNULIB_MBSPBRK
897 GNULIB_MBSCSPN
898 GNULIB_MBSCASESTR
899 GNULIB_MBSPCASECMP
900 GNULIB_MBSNCASECMP
901 GNULIB_MBSCASECMP
902 GNULIB_MBSSTR
903 GNULIB_MBSRCHR
904 GNULIB_MBSCHR
905 GNULIB_MBSNLEN
906 GNULIB_MBSLEN
907 GNULIB_STRTOK_R
908 GNULIB_STRCASESTR
909 GNULIB_STRSTR
910 GNULIB_STRSEP
911 GNULIB_STRPBRK
912 GNULIB_STRNLEN
913 GNULIB_STRNDUP
914 GNULIB_STRNCAT
915 GNULIB_STRDUP
916 GNULIB_STRCHRNUL
917 GNULIB_STPNCPY
918 GNULIB_STPCPY
919 GNULIB_RAWMEMCHR
920 GNULIB_MEMRCHR
921 GNULIB_MEMPCPY
922 GNULIB_MEMMEM
923 GNULIB_MEMCHR
924 GNULIB_FFSLL
925 GNULIB_FFSL
926 GNULIB_EXPLICIT_BZERO
927 LOCALE_FR
928 HAVE_VISIBILITY
929 CFLAG_VISIBILITY
930 LIB_MBRTOWC
931 LOCALE_ZH_CN
932 LOCALE_FR_UTF8
933 LOCALE_JA
934 REPLACE_WCSTOK
935 REPLACE_WCSFTIME
936 REPLACE_WCSWIDTH
937 REPLACE_WCWIDTH
938 REPLACE_WCSNRTOMBS
939 REPLACE_WCSRTOMBS
940 REPLACE_WCRTOMB
941 REPLACE_MBSNRTOWCS
942 REPLACE_MBSRTOWCS
943 REPLACE_MBRLEN
944 REPLACE_MBRTOWC
945 REPLACE_MBSINIT
946 REPLACE_WCTOB
947 REPLACE_BTOWC
948 REPLACE_MBSTATE_T
949 HAVE_DECL_WCWIDTH
950 HAVE_DECL_WCTOB
951 HAVE_WCSFTIME
952 HAVE_WCSWIDTH
953 HAVE_WCSTOK
954 HAVE_WCSSTR
955 HAVE_WCSPBRK
956 HAVE_WCSSPN
957 HAVE_WCSCSPN
958 HAVE_WCSRCHR
959 HAVE_WCSCHR
960 HAVE_WCSDUP
961 HAVE_WCSXFRM
962 HAVE_WCSCOLL
963 HAVE_WCSNCASECMP
964 HAVE_WCSCASECMP
965 HAVE_WCSNCMP
966 HAVE_WCSCMP
967 HAVE_WCSNCAT
968 HAVE_WCSCAT
969 HAVE_WCPNCPY
970 HAVE_WCSNCPY
971 HAVE_WCPCPY
972 HAVE_WCSCPY
973 HAVE_WCSNLEN
974 HAVE_WCSLEN
975 HAVE_WMEMSET
976 HAVE_WMEMMOVE
977 HAVE_WMEMCPY
978 HAVE_WMEMCMP
979 HAVE_WMEMCHR
980 HAVE_WCSNRTOMBS
981 HAVE_WCSRTOMBS
982 HAVE_WCRTOMB
983 HAVE_MBSNRTOWCS
984 HAVE_MBSRTOWCS
985 HAVE_MBRLEN
986 HAVE_MBRTOWC
987 HAVE_MBSINIT
988 HAVE_BTOWC
989 GNULIB_WCSFTIME
990 GNULIB_WCSWIDTH
991 GNULIB_WCSTOK
992 GNULIB_WCSSTR
993 GNULIB_WCSPBRK
994 GNULIB_WCSSPN
995 GNULIB_WCSCSPN
996 GNULIB_WCSRCHR
997 GNULIB_WCSCHR
998 GNULIB_WCSDUP
999 GNULIB_WCSXFRM
1000 GNULIB_WCSCOLL
1001 GNULIB_WCSNCASECMP
1002 GNULIB_WCSCASECMP
1003 GNULIB_WCSNCMP
1004 GNULIB_WCSCMP
1005 GNULIB_WCSNCAT
1006 GNULIB_WCSCAT
1007 GNULIB_WCPNCPY
1008 GNULIB_WCSNCPY
1009 GNULIB_WCPCPY
1010 GNULIB_WCSCPY
1011 GNULIB_WCSNLEN
1012 GNULIB_WCSLEN
1013 GNULIB_WMEMSET
1014 GNULIB_WMEMMOVE
1015 GNULIB_WMEMCPY
1016 GNULIB_WMEMCMP
1017 GNULIB_WMEMCHR
1018 GNULIB_WCWIDTH
1019 GNULIB_WCSNRTOMBS
1020 GNULIB_WCSRTOMBS
1021 GNULIB_WCRTOMB
1022 GNULIB_MBSNRTOWCS
1023 GNULIB_MBSRTOWCS
1024 GNULIB_MBRLEN
1025 GNULIB_MBRTOWC
1026 GNULIB_MBSINIT
1027 GNULIB_WCTOB
1028 GNULIB_BTOWC
1029 NEXT_AS_FIRST_DIRECTIVE_MATH_H
1030 NEXT_MATH_H
1031 LTLIBMULTITHREAD
1032 LIBMULTITHREAD
1033 LTLIBTHREAD
1034 LIBTHREAD
1035 LIBSTDTHREAD
1036 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H
1037 NEXT_LOCALE_H
1038 HAVE_XLOCALE_H
1039 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
1040 NEXT_STDDEF_H
1041 GL_GENERATE_STDDEF_H_FALSE
1042 GL_GENERATE_STDDEF_H_TRUE
1043 STDDEF_H
1044 HAVE_WCHAR_T
1045 HAVE_MAX_ALIGN_T
1046 REPLACE_NULL
1047 REPLACE_STRUCT_LCONV
1048 REPLACE_FREELOCALE
1049 REPLACE_DUPLOCALE
1050 REPLACE_NEWLOCALE
1051 REPLACE_SETLOCALE
1052 REPLACE_LOCALECONV
1053 HAVE_FREELOCALE
1054 HAVE_DUPLOCALE
1055 HAVE_NEWLOCALE
1056 GNULIB_LOCALENAME
1057 GNULIB_DUPLOCALE
1058 GNULIB_SETLOCALE_NULL
1059 GNULIB_SETLOCALE
1060 GNULIB_LOCALECONV
1061 LOCALCHARSET_TESTS_ENVIRONMENT
1062 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
1063 NEXT_INTTYPES_H
1064 UINT64_MAX_EQ_ULONG_MAX
1065 UINT32_MAX_LT_UINTMAX_MAX
1066 PRIPTR_PREFIX
1067 PRI_MACROS_BROKEN
1068 INT64_MAX_EQ_LONG_MAX
1069 INT32_MAX_LT_INTMAX_MAX
1070 REPLACE_STRTOUMAX
1071 REPLACE_STRTOIMAX
1072 HAVE_IMAXDIV_T
1073 HAVE_DECL_STRTOUMAX
1074 HAVE_DECL_STRTOIMAX
1075 HAVE_DECL_IMAXDIV
1076 HAVE_DECL_IMAXABS
1077 GNULIB_STRTOUMAX
1078 GNULIB_STRTOIMAX
1079 GNULIB_IMAXDIV
1080 GNULIB_IMAXABS
1081 GL_GENERATE_STDINT_H_FALSE
1082 GL_GENERATE_STDINT_H_TRUE
1083 STDINT_H
1084 HAVE_SYS_INTTYPES_H
1085 HAVE_SYS_BITYPES_H
1086 HAVE_C99_STDINT_H
1087 WINT_T_SUFFIX
1088 WCHAR_T_SUFFIX
1089 SIG_ATOMIC_T_SUFFIX
1090 SIZE_T_SUFFIX
1091 PTRDIFF_T_SUFFIX
1092 HAVE_SIGNED_WINT_T
1093 HAVE_SIGNED_WCHAR_T
1094 HAVE_SIGNED_SIG_ATOMIC_T
1095 BITSIZEOF_WINT_T
1096 BITSIZEOF_WCHAR_T
1097 BITSIZEOF_SIG_ATOMIC_T
1098 BITSIZEOF_SIZE_T
1099 BITSIZEOF_PTRDIFF_T
1100 APPLE_UNIVERSAL_BUILD
1101 HAVE_STDINT_H
1102 NEXT_AS_FIRST_DIRECTIVE_STDINT_H
1103 NEXT_STDINT_H
1104 HAVE_SYS_TYPES_H
1105 HAVE_INTTYPES_H
1106 HAVE_WCHAR_H
1107 GNULIB_OVERRIDES_WINT_T
1108 GL_GENERATE_LIMITS_H_FALSE
1109 GL_GENERATE_LIMITS_H_TRUE
1110 LIMITS_H
1111 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H
1112 NEXT_LIMITS_H
1113 HAVE_SYS_SOCKET_H
1114 NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H
1115 NEXT_SYS_SOCKET_H
1116 HAVE_ACCEPT4
1117 HAVE_SA_FAMILY_T
1118 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY
1119 HAVE_STRUCT_SOCKADDR_STORAGE
1120 GNULIB_ACCEPT4
1121 GNULIB_SHUTDOWN
1122 GNULIB_SETSOCKOPT
1123 GNULIB_SENDTO
1124 GNULIB_RECVFROM
1125 GNULIB_SEND
1126 GNULIB_RECV
1127 GNULIB_LISTEN
1128 GNULIB_GETSOCKOPT
1129 GNULIB_GETSOCKNAME
1130 GNULIB_GETPEERNAME
1131 GNULIB_BIND
1132 GNULIB_ACCEPT
1133 GNULIB_CONNECT
1134 GNULIB_SOCKET
1135 INET_NTOP_LIB
1136 LIB_HARD_LOCALE
1137 LIB_SETLOCALE_NULL
1138 LIB_SCHED_YIELD
1139 LIBPMULTITHREAD
1140 LIBPTHREAD
1141 GL_GENERATE_GLOB_H_FALSE
1142 GL_GENERATE_GLOB_H_TRUE
1143 GLOB_H
1144 HAVE_GLOB_H
1145 NEXT_AS_FIRST_DIRECTIVE_GLOB_H
1146 NEXT_GLOB_H
1147 REPLACE_GLOB_PATTERN_P
1148 REPLACE_GLOB
1149 HAVE_GLOB_PATTERN_P
1150 HAVE_GLOB
1151 GNULIB_GLOB
1152 REPLACE_LOCALTIME
1153 REPLACE_GMTIME
1154 REPLACE_TZSET
1155 REPLACE_TIMEGM
1156 REPLACE_STRFTIME
1157 REPLACE_NANOSLEEP
1158 REPLACE_MKTIME
1159 REPLACE_LOCALTIME_R
1160 REPLACE_CTIME
1161 HAVE_TIMEZONE_T
1162 HAVE_TZSET
1163 HAVE_TIMEGM
1164 HAVE_STRPTIME
1165 HAVE_NANOSLEEP
1166 HAVE_DECL_LOCALTIME_R
1167 GNULIB_TZSET
1168 GNULIB_TIME_RZ
1169 GNULIB_TIME_R
1170 GNULIB_TIMEGM
1171 GNULIB_STRPTIME
1172 GNULIB_STRFTIME
1173 GNULIB_NANOSLEEP
1174 GNULIB_LOCALTIME
1175 GNULIB_MKTIME
1176 GNULIB_CTIME
1177 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
1178 NEXT_SYS_TIME_H
1179 REPLACE_STRUCT_TIMEVAL
1180 REPLACE_GETTIMEOFDAY
1181 HAVE_SYS_TIME_H
1182 HAVE_STRUCT_TIMEVAL
1183 HAVE_GETTIMEOFDAY
1184 GNULIB_GETTIMEOFDAY
1185 LTLIBINTL
1186 LIBINTL
1187 LIB_GETLOGIN
1188 WINDOWS_64_BIT_ST_SIZE
1189 WINDOWS_STAT_TIMESPEC
1190 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
1191 NEXT_SYS_STAT_H
1192 REPLACE_UTIMENSAT
1193 REPLACE_STAT
1194 REPLACE_MKNOD
1195 REPLACE_MKFIFO
1196 REPLACE_MKDIR
1197 REPLACE_LSTAT
1198 REPLACE_LCHMOD
1199 REPLACE_FUTIMENS
1200 REPLACE_FSTATAT
1201 REPLACE_FSTAT
1202 REPLACE_FCHMODAT
1203 HAVE_UTIMENSAT
1204 HAVE_MKNODAT
1205 HAVE_MKNOD
1206 HAVE_MKFIFOAT
1207 HAVE_MKFIFO
1208 HAVE_MKDIRAT
1209 HAVE_LSTAT
1210 HAVE_LCHMOD
1211 HAVE_FUTIMENS
1212 HAVE_FSTATAT
1213 HAVE_FCHMODAT
1214 GNULIB_OVERRIDES_STRUCT_STAT
1215 GNULIB_UTIMENSAT
1216 GNULIB_STAT
1217 GNULIB_MKNODAT
1218 GNULIB_MKNOD
1219 GNULIB_MKFIFOAT
1220 GNULIB_MKFIFO
1221 GNULIB_MKDIRAT
1222 GNULIB_LSTAT
1223 GNULIB_LCHMOD
1224 GNULIB_FUTIMENS
1225 GNULIB_FSTATAT
1226 GNULIB_FSTAT
1227 GNULIB_FCHMODAT
1228 FREXPL_LIBM
1229 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
1230 FREXP_LIBM
1231 REPLACE_TRUNCL
1232 REPLACE_TRUNCF
1233 REPLACE_TRUNC
1234 REPLACE_TANHF
1235 REPLACE_TANF
1236 REPLACE_SQRTL
1237 REPLACE_SQRTF
1238 REPLACE_SINHF
1239 REPLACE_SINF
1240 REPLACE_SIGNBIT_USING_GCC
1241 REPLACE_SIGNBIT
1242 REPLACE_ROUNDL
1243 REPLACE_ROUNDF
1244 REPLACE_ROUND
1245 REPLACE_RINTL
1246 REPLACE_REMAINDERL
1247 REPLACE_REMAINDERF
1248 REPLACE_REMAINDER
1249 REPLACE_NAN
1250 REPLACE_MODFL
1251 REPLACE_MODFF
1252 REPLACE_MODF
1253 REPLACE_LOGBL
1254 REPLACE_LOGBF
1255 REPLACE_LOGB
1256 REPLACE_LOG2L
1257 REPLACE_LOG2F
1258 REPLACE_LOG2
1259 REPLACE_LOG1PL
1260 REPLACE_LOG1PF
1261 REPLACE_LOG1P
1262 REPLACE_LOG10L
1263 REPLACE_LOG10F
1264 REPLACE_LOG10
1265 REPLACE_LOGL
1266 REPLACE_LOGF
1267 REPLACE_LOG
1268 REPLACE_LDEXPL
1269 REPLACE_ISNAN
1270 REPLACE_ISINF
1271 REPLACE_ISFINITE
1272 REPLACE_ILOGBL
1273 REPLACE_ILOGBF
1274 REPLACE_ILOGB
1275 REPLACE_HYPOTL
1276 REPLACE_HYPOTF
1277 REPLACE_HYPOT
1278 REPLACE_HUGE_VAL
1279 REPLACE_FREXPL
1280 REPLACE_FREXP
1281 REPLACE_FREXPF
1282 REPLACE_FMODL
1283 REPLACE_FMODF
1284 REPLACE_FMOD
1285 REPLACE_FMAL
1286 REPLACE_FMAF
1287 REPLACE_FMA
1288 REPLACE_FLOORL
1289 REPLACE_FLOORF
1290 REPLACE_FLOOR
1291 REPLACE_FABSL
1292 REPLACE_EXP2L
1293 REPLACE_EXP2
1294 REPLACE_EXPM1L
1295 REPLACE_EXPM1F
1296 REPLACE_EXPM1
1297 REPLACE_EXPL
1298 REPLACE_EXPF
1299 REPLACE_COSHF
1300 REPLACE_COSF
1301 REPLACE_CEILL
1302 REPLACE_CEILF
1303 REPLACE_CEIL
1304 REPLACE_CBRTL
1305 REPLACE_CBRTF
1306 REPLACE_ATAN2F
1307 REPLACE_ATANF
1308 REPLACE_ASINF
1309 REPLACE_ACOSF
1310 HAVE_DECL_TRUNCL
1311 HAVE_DECL_TRUNCF
1312 HAVE_DECL_TRUNC
1313 HAVE_DECL_TANL
1314 HAVE_DECL_SQRTL
1315 HAVE_DECL_SINL
1316 HAVE_DECL_ROUNDL
1317 HAVE_DECL_ROUNDF
1318 HAVE_DECL_ROUND
1319 HAVE_DECL_RINTF
1320 HAVE_DECL_REMAINDERL
1321 HAVE_DECL_REMAINDER
1322 HAVE_DECL_LOGB
1323 HAVE_DECL_LOG2L
1324 HAVE_DECL_LOG2F
1325 HAVE_DECL_LOG2
1326 HAVE_DECL_LOG10L
1327 HAVE_DECL_LOGL
1328 HAVE_DECL_LDEXPL
1329 HAVE_DECL_FREXPL
1330 HAVE_DECL_FLOORL
1331 HAVE_DECL_FLOORF
1332 HAVE_DECL_EXPM1L
1333 HAVE_DECL_EXP2L
1334 HAVE_DECL_EXP2F
1335 HAVE_DECL_EXP2
1336 HAVE_DECL_EXPL
1337 HAVE_DECL_COSL
1338 HAVE_DECL_COPYSIGNF
1339 HAVE_DECL_CEILL
1340 HAVE_DECL_CEILF
1341 HAVE_DECL_CBRTL
1342 HAVE_DECL_CBRTF
1343 HAVE_DECL_ATANL
1344 HAVE_DECL_ASINL
1345 HAVE_DECL_ACOSL
1346 HAVE_TANHF
1347 HAVE_TANL
1348 HAVE_TANF
1349 HAVE_SQRTL
1350 HAVE_SQRTF
1351 HAVE_SINHF
1352 HAVE_SINL
1353 HAVE_SINF
1354 HAVE_RINTL
1355 HAVE_RINT
1356 HAVE_REMAINDERF
1357 HAVE_REMAINDER
1358 HAVE_POWF
1359 HAVE_MODFL
1360 HAVE_MODFF
1361 HAVE_LOGBL
1362 HAVE_LOGBF
1363 HAVE_LOG1PL
1364 HAVE_LOG1PF
1365 HAVE_LOG1P
1366 HAVE_LOG10L
1367 HAVE_LOG10F
1368 HAVE_LOGL
1369 HAVE_LOGF
1370 HAVE_LDEXPF
1371 HAVE_ISNANL
1372 HAVE_ISNAND
1373 HAVE_ISNANF
1374 HAVE_ILOGBL
1375 HAVE_ILOGBF
1376 HAVE_ILOGB
1377 HAVE_HYPOTL
1378 HAVE_HYPOTF
1379 HAVE_FREXPF
1380 HAVE_FMODL
1381 HAVE_FMODF
1382 HAVE_FMAL
1383 HAVE_FMAF
1384 HAVE_FMA
1385 HAVE_FABSL
1386 HAVE_FABSF
1387 HAVE_EXPM1F
1388 HAVE_EXPM1
1389 HAVE_EXPL
1390 HAVE_EXPF
1391 HAVE_COSHF
1392 HAVE_COSL
1393 HAVE_COSF
1394 HAVE_COPYSIGNL
1395 HAVE_COPYSIGN
1396 HAVE_CBRTL
1397 HAVE_CBRTF
1398 HAVE_CBRT
1399 HAVE_ATAN2F
1400 HAVE_ATANL
1401 HAVE_ATANF
1402 HAVE_ASINL
1403 HAVE_ASINF
1404 HAVE_ACOSL
1405 HAVE_ACOSF
1406 GNULIB_TRUNCL
1407 GNULIB_TRUNCF
1408 GNULIB_TRUNC
1409 GNULIB_TANHF
1410 GNULIB_TANL
1411 GNULIB_TANF
1412 GNULIB_SQRTL
1413 GNULIB_SQRTF
1414 GNULIB_SINHF
1415 GNULIB_SINL
1416 GNULIB_SINF
1417 GNULIB_SIGNBIT
1418 GNULIB_ROUNDL
1419 GNULIB_ROUNDF
1420 GNULIB_ROUND
1421 GNULIB_RINTL
1422 GNULIB_RINTF
1423 GNULIB_RINT
1424 GNULIB_REMAINDERL
1425 GNULIB_REMAINDERF
1426 GNULIB_REMAINDER
1427 GNULIB_POWF
1428 GNULIB_MODFL
1429 GNULIB_MODFF
1430 GNULIB_MODF
1431 GNULIB_LOGBL
1432 GNULIB_LOGBF
1433 GNULIB_LOGB
1434 GNULIB_LOG2L
1435 GNULIB_LOG2F
1436 GNULIB_LOG2
1437 GNULIB_LOG1PL
1438 GNULIB_LOG1PF
1439 GNULIB_LOG1P
1440 GNULIB_LOG10L
1441 GNULIB_LOG10F
1442 GNULIB_LOG10
1443 GNULIB_LOGL
1444 GNULIB_LOGF
1445 GNULIB_LOG
1446 GNULIB_LDEXPL
1447 GNULIB_LDEXPF
1448 GNULIB_ISNANL
1449 GNULIB_ISNAND
1450 GNULIB_ISNANF
1451 GNULIB_ISNAN
1452 GNULIB_ISINF
1453 GNULIB_ISFINITE
1454 GNULIB_ILOGBL
1455 GNULIB_ILOGBF
1456 GNULIB_ILOGB
1457 GNULIB_HYPOTL
1458 GNULIB_HYPOTF
1459 GNULIB_HYPOT
1460 GNULIB_FREXPL
1461 GNULIB_FREXP
1462 GNULIB_FREXPF
1463 GNULIB_FMODL
1464 GNULIB_FMODF
1465 GNULIB_FMOD
1466 GNULIB_FMAL
1467 GNULIB_FMAF
1468 GNULIB_FMA
1469 GNULIB_FLOORL
1470 GNULIB_FLOORF
1471 GNULIB_FLOOR
1472 GNULIB_FABSL
1473 GNULIB_FABSF
1474 GNULIB_EXPM1L
1475 GNULIB_EXPM1F
1476 GNULIB_EXPM1
1477 GNULIB_EXP2L
1478 GNULIB_EXP2F
1479 GNULIB_EXP2
1480 GNULIB_EXPL
1481 GNULIB_EXPF
1482 GNULIB_COSHF
1483 GNULIB_COSL
1484 GNULIB_COSF
1485 GNULIB_COPYSIGNL
1486 GNULIB_COPYSIGNF
1487 GNULIB_COPYSIGN
1488 GNULIB_CEILL
1489 GNULIB_CEILF
1490 GNULIB_CEIL
1491 GNULIB_CBRTL
1492 GNULIB_CBRTF
1493 GNULIB_CBRT
1494 GNULIB_ATAN2F
1495 GNULIB_ATANL
1496 GNULIB_ATANF
1497 GNULIB_ASINL
1498 GNULIB_ASINF
1499 GNULIB_ACOSL
1500 GNULIB_ACOSF
1501 GL_GENERATE_FNMATCH_H_FALSE
1502 GL_GENERATE_FNMATCH_H_TRUE
1503 FNMATCH_H
1504 HAVE_FNMATCH_H
1505 NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H
1506 NEXT_FNMATCH_H
1507 REPLACE_FNMATCH
1508 HAVE_FNMATCH
1509 GNULIB_FNMATCH
1510 REPLACE_ITOLD
1511 GL_GENERATE_FLOAT_H_FALSE
1512 GL_GENERATE_FLOAT_H_TRUE
1513 FLOAT_H
1514 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1515 NEXT_FLOAT_H
1516 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1517 NEXT_FCNTL_H
1518 REPLACE_OPENAT
1519 REPLACE_OPEN
1520 REPLACE_FCNTL
1521 REPLACE_CREAT
1522 HAVE_OPENAT
1523 HAVE_FCNTL
1524 GNULIB_OPENAT
1525 GNULIB_OPEN
1526 GNULIB_NONBLOCKING
1527 GNULIB_FCNTL
1528 GNULIB_CREAT
1529 EOVERFLOW_VALUE
1530 EOVERFLOW_HIDDEN
1531 ENOLINK_VALUE
1532 ENOLINK_HIDDEN
1533 EMULTIHOP_VALUE
1534 EMULTIHOP_HIDDEN
1535 GL_GENERATE_ERRNO_H_FALSE
1536 GL_GENERATE_ERRNO_H_TRUE
1537 ERRNO_H
1538 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1539 NEXT_ERRNO_H
1540 HAVE_DIRENT_H
1541 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1542 NEXT_DIRENT_H
1543 REPLACE_FDOPENDIR
1544 REPLACE_DIRFD
1545 REPLACE_CLOSEDIR
1546 REPLACE_OPENDIR
1547 HAVE_ALPHASORT
1548 HAVE_SCANDIR
1549 HAVE_FDOPENDIR
1550 HAVE_DECL_FDOPENDIR
1551 HAVE_DECL_DIRFD
1552 HAVE_CLOSEDIR
1553 HAVE_REWINDDIR
1554 HAVE_READDIR
1555 HAVE_OPENDIR
1556 GNULIB_ALPHASORT
1557 GNULIB_SCANDIR
1558 GNULIB_FDOPENDIR
1559 GNULIB_DIRFD
1560 GNULIB_CLOSEDIR
1561 GNULIB_REWINDDIR
1562 GNULIB_READDIR
1563 GNULIB_OPENDIR
1564 HAVE_WINSOCK2_H
1565 HAVE_MSVC_INVALID_PARAMETER_HANDLER
1566 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1567 UNISTD_H_HAVE_WINSOCK2_H
1568 REPLACE_WRITE
1569 REPLACE_USLEEP
1570 REPLACE_UNLINKAT
1571 REPLACE_UNLINK
1572 REPLACE_TTYNAME_R
1573 REPLACE_TRUNCATE
1574 REPLACE_SYMLINKAT
1575 REPLACE_SYMLINK
1576 REPLACE_SLEEP
1577 REPLACE_RMDIR
1578 REPLACE_READLINKAT
1579 REPLACE_READLINK
1580 REPLACE_READ
1581 REPLACE_PWRITE
1582 REPLACE_PREAD
1583 REPLACE_LSEEK
1584 REPLACE_LINKAT
1585 REPLACE_LINK
1586 REPLACE_LCHOWN
1587 REPLACE_ISATTY
1588 REPLACE_GETPASS
1589 REPLACE_GETPAGESIZE
1590 REPLACE_GETGROUPS
1591 REPLACE_GETLOGIN_R
1592 REPLACE_GETDTABLESIZE
1593 REPLACE_GETDOMAINNAME
1594 REPLACE_GETCWD
1595 REPLACE_FTRUNCATE
1596 REPLACE_FCHOWNAT
1597 REPLACE_FACCESSAT
1598 REPLACE_DUP2
1599 REPLACE_DUP
1600 REPLACE_CLOSE
1601 REPLACE_CHOWN
1602 REPLACE_ACCESS
1603 HAVE_SYS_PARAM_H
1604 HAVE_OS_H
1605 HAVE_DECL_TTYNAME_R
1606 HAVE_DECL_TRUNCATE
1607 HAVE_DECL_SETHOSTNAME
1608 HAVE_DECL_GETUSERSHELL
1609 HAVE_DECL_GETPAGESIZE
1610 HAVE_DECL_GETLOGIN_R
1611 HAVE_DECL_GETLOGIN
1612 HAVE_DECL_GETDOMAINNAME
1613 HAVE_DECL_FDATASYNC
1614 HAVE_DECL_FCHDIR
1615 HAVE_DECL_ENVIRON
1616 HAVE_USLEEP
1617 HAVE_UNLINKAT
1618 HAVE_SYMLINKAT
1619 HAVE_SYMLINK
1620 HAVE_SLEEP
1621 HAVE_SETHOSTNAME
1622 HAVE_READLINKAT
1623 HAVE_READLINK
1624 HAVE_PWRITE
1625 HAVE_PREAD
1626 HAVE_PIPE2
1627 HAVE_PIPE
1628 HAVE_LINKAT
1629 HAVE_LINK
1630 HAVE_LCHOWN
1631 HAVE_GROUP_MEMBER
1632 HAVE_GETPASS
1633 HAVE_GETPAGESIZE
1634 HAVE_GETLOGIN
1635 HAVE_GETHOSTNAME
1636 HAVE_GETGROUPS
1637 HAVE_GETDTABLESIZE
1638 HAVE_FTRUNCATE
1639 HAVE_FSYNC
1640 HAVE_FDATASYNC
1641 HAVE_FCHOWNAT
1642 HAVE_FCHDIR
1643 HAVE_FACCESSAT
1644 HAVE_EUIDACCESS
1645 HAVE_DUP3
1646 HAVE_DUP2
1647 HAVE_COPY_FILE_RANGE
1648 HAVE_CHOWN
1649 GNULIB_WRITE
1650 GNULIB_USLEEP
1651 GNULIB_UNLINKAT
1652 GNULIB_UNLINK
1653 GNULIB_UNISTD_H_SIGPIPE
1654 GNULIB_UNISTD_H_NONBLOCKING
1655 GNULIB_TTYNAME_R
1656 GNULIB_TRUNCATE
1657 GNULIB_SYMLINKAT
1658 GNULIB_SYMLINK
1659 GNULIB_SLEEP
1660 GNULIB_SETHOSTNAME
1661 GNULIB_RMDIR
1662 GNULIB_READLINKAT
1663 GNULIB_READLINK
1664 GNULIB_READ
1665 GNULIB_PWRITE
1666 GNULIB_PREAD
1667 GNULIB_PIPE2
1668 GNULIB_PIPE
1669 GNULIB_LSEEK
1670 GNULIB_LINKAT
1671 GNULIB_LINK
1672 GNULIB_LCHOWN
1673 GNULIB_ISATTY
1674 GNULIB_GROUP_MEMBER
1675 GNULIB_GETUSERSHELL
1676 GNULIB_GETPASS
1677 GNULIB_GETPAGESIZE
1678 GNULIB_GETOPT_POSIX
1679 GNULIB_GETLOGIN_R
1680 GNULIB_GETLOGIN
1681 GNULIB_GETHOSTNAME
1682 GNULIB_GETGROUPS
1683 GNULIB_GETDTABLESIZE
1684 GNULIB_GETDOMAINNAME
1685 GNULIB_GETCWD
1686 GNULIB_FTRUNCATE
1687 GNULIB_FSYNC
1688 GNULIB_FDATASYNC
1689 GNULIB_FCHOWNAT
1690 GNULIB_FCHDIR
1691 GNULIB_FACCESSAT
1692 GNULIB_EUIDACCESS
1693 GNULIB_ENVIRON
1694 GNULIB_DUP3
1695 GNULIB_DUP2
1696 GNULIB_DUP
1697 GNULIB_COPY_FILE_RANGE
1698 GNULIB_CLOSE
1699 GNULIB_CHOWN
1700 GNULIB_CHDIR
1701 GNULIB_ACCESS
1702 REPLACE_WCTOMB
1703 REPLACE_UNSETENV
1704 REPLACE_STRTOLD
1705 REPLACE_STRTOD
1706 REPLACE_SETSTATE
1707 REPLACE_SETENV
1708 REPLACE_REALPATH
1709 REPLACE_REALLOC
1710 REPLACE_RANDOM_R
1711 REPLACE_RANDOM
1712 REPLACE_QSORT_R
1713 REPLACE_PUTENV
1714 REPLACE_PTSNAME_R
1715 REPLACE_PTSNAME
1716 REPLACE_MKSTEMP
1717 REPLACE_MBTOWC
1718 REPLACE_MALLOC
1719 REPLACE_INITSTATE
1720 REPLACE_CANONICALIZE_FILE_NAME
1721 REPLACE_CALLOC
1722 HAVE_DECL_UNSETENV
1723 HAVE_UNLOCKPT
1724 HAVE_SYS_LOADAVG_H
1725 HAVE_STRUCT_RANDOM_DATA
1726 HAVE_STRTOULL
1727 HAVE_STRTOLL
1728 HAVE_STRTOLD
1729 HAVE_STRTOD
1730 HAVE_DECL_SETSTATE
1731 HAVE_SETSTATE
1732 HAVE_DECL_SETENV
1733 HAVE_SETENV
1734 HAVE_SECURE_GETENV
1735 HAVE_RPMATCH
1736 HAVE_REALPATH
1737 HAVE_REALLOCARRAY
1738 HAVE_RANDOM_R
1739 HAVE_RANDOM_H
1740 HAVE_RANDOM
1741 HAVE_QSORT_R
1742 HAVE_PTSNAME_R
1743 HAVE_PTSNAME
1744 HAVE_POSIX_OPENPT
1745 HAVE_MKSTEMPS
1746 HAVE_MKSTEMP
1747 HAVE_MKOSTEMPS
1748 HAVE_MKOSTEMP
1749 HAVE_MKDTEMP
1750 HAVE_MBTOWC
1751 HAVE_DECL_INITSTATE
1752 HAVE_INITSTATE
1753 HAVE_GRANTPT
1754 HAVE_GETSUBOPT
1755 HAVE_DECL_GETLOADAVG
1756 HAVE_CANONICALIZE_FILE_NAME
1757 HAVE_ATOLL
1758 HAVE__EXIT
1759 GNULIB_WCTOMB
1760 GNULIB_UNSETENV
1761 GNULIB_UNLOCKPT
1762 GNULIB_SYSTEM_POSIX
1763 GNULIB_STRTOULL
1764 GNULIB_STRTOLL
1765 GNULIB_STRTOLD
1766 GNULIB_STRTOD
1767 GNULIB_SETENV
1768 GNULIB_SECURE_GETENV
1769 GNULIB_RPMATCH
1770 GNULIB_REALPATH
1771 GNULIB_REALLOC_POSIX
1772 GNULIB_REALLOCARRAY
1773 GNULIB_RANDOM_R
1774 GNULIB_RANDOM
1775 GNULIB_QSORT_R
1776 GNULIB_PUTENV
1777 GNULIB_PTSNAME_R
1778 GNULIB_PTSNAME
1779 GNULIB_POSIX_OPENPT
1780 GNULIB_MKSTEMPS
1781 GNULIB_MKSTEMP
1782 GNULIB_MKOSTEMPS
1783 GNULIB_MKOSTEMP
1784 GNULIB_MKDTEMP
1785 GNULIB_MBTOWC
1786 GNULIB_MALLOC_POSIX
1787 GNULIB_GRANTPT
1788 GNULIB_GETSUBOPT
1789 GNULIB_GETLOADAVG
1790 GNULIB_CANONICALIZE_FILE_NAME
1791 GNULIB_CALLOC_POSIX
1792 GNULIB_ATOLL
1793 GNULIB__EXIT
1794 MKDIR_P
1795 HAVE_WS2TCPIP_H
1796 HAVE_FEATURES_H
1797 NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H
1798 NEXT_ARPA_INET_H
1799 PRAGMA_COLUMNS
1800 PRAGMA_SYSTEM_HEADER
1801 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1802 INCLUDE_NEXT
1803 HAVE_ARPA_INET_H
1804 REPLACE_INET_PTON
1805 REPLACE_INET_NTOP
1806 HAVE_DECL_INET_PTON
1807 HAVE_DECL_INET_NTOP
1808 GNULIB_INET_PTON
1809 GNULIB_INET_NTOP
1810 HAVE_ALLOCA_H
1811 GL_GENERATE_ALLOCA_H_FALSE
1812 GL_GENERATE_ALLOCA_H_TRUE
1813 ALLOCA_H
1814 ALLOCA
1815 GL_COND_LIBTOOL_FALSE
1816 GL_COND_LIBTOOL_TRUE
1817 target_os
1818 target_vendor
1819 target_cpu
1820 target
1821 host_os
1822 host_vendor
1823 host_cpu
1824 host
1825 build_os
1826 build_vendor
1827 build_cpu
1828 build
1829 RANLIB
1830 ARFLAGS
1831 AR
1832 EGREP
1833 GREP
1834 CPP
1835 OBJEXT
1836 EXEEXT
1837 ac_ct_CC
1838 CPPFLAGS
1839 LDFLAGS
1840 CFLAGS
1841 CC
1842 MAINT
1843 MAINTAINER_MODE_FALSE
1844 MAINTAINER_MODE_TRUE
1845 target_alias
1846 host_alias
1847 build_alias
1848 LIBS
1849 ECHO_T
1850 ECHO_N
1851 ECHO_C
1852 DEFS
1853 mandir
1854 localedir
1855 libdir
1856 psdir
1857 pdfdir
1858 dvidir
1859 htmldir
1860 infodir
1861 docdir
1862 oldincludedir
1863 includedir
1864 localstatedir
1865 sharedstatedir
1866 sysconfdir
1867 datadir
1868 datarootdir
1869 libexecdir
1870 sbindir
1871 bindir
1872 program_transform_name
1873 prefix
1874 exec_prefix
1875 PACKAGE_URL
1876 PACKAGE_BUGREPORT
1877 PACKAGE_STRING
1878 PACKAGE_VERSION
1879 PACKAGE_TARNAME
1880 PACKAGE_NAME
1881 PATH_SEPARATOR
1882 SHELL'
1883 ac_subst_files=''
1884 ac_user_opts='
1885 enable_option_checking
1886 enable_maintainer_mode
1887 enable_largefile
1888 enable_threads
1889 enable_plugins
1890 enable_cross_guesses
1891 enable_dependency_tracking
1892 enable_silent_rules
1893 '
1894 ac_precious_vars='build_alias
1895 host_alias
1896 target_alias
1897 CC
1898 CFLAGS
1899 LDFLAGS
1900 LIBS
1901 CPPFLAGS
1902 CPP'
1903
1904
1905 # Initialize some variables set by options.
1906 ac_init_help=
1907 ac_init_version=false
1908 ac_unrecognized_opts=
1909 ac_unrecognized_sep=
1910 # The variables have the same names as the options, with
1911 # dashes changed to underlines.
1912 cache_file=/dev/null
1913 exec_prefix=NONE
1914 no_create=
1915 no_recursion=
1916 prefix=NONE
1917 program_prefix=NONE
1918 program_suffix=NONE
1919 program_transform_name=s,x,x,
1920 silent=
1921 site=
1922 srcdir=
1923 verbose=
1924 x_includes=NONE
1925 x_libraries=NONE
1926
1927 # Installation directory options.
1928 # These are left unexpanded so users can "make install exec_prefix=/foo"
1929 # and all the variables that are supposed to be based on exec_prefix
1930 # by default will actually change.
1931 # Use braces instead of parens because sh, perl, etc. also accept them.
1932 # (The list follows the same order as the GNU Coding Standards.)
1933 bindir='${exec_prefix}/bin'
1934 sbindir='${exec_prefix}/sbin'
1935 libexecdir='${exec_prefix}/libexec'
1936 datarootdir='${prefix}/share'
1937 datadir='${datarootdir}'
1938 sysconfdir='${prefix}/etc'
1939 sharedstatedir='${prefix}/com'
1940 localstatedir='${prefix}/var'
1941 includedir='${prefix}/include'
1942 oldincludedir='/usr/include'
1943 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1944 infodir='${datarootdir}/info'
1945 htmldir='${docdir}'
1946 dvidir='${docdir}'
1947 pdfdir='${docdir}'
1948 psdir='${docdir}'
1949 libdir='${exec_prefix}/lib'
1950 localedir='${datarootdir}/locale'
1951 mandir='${datarootdir}/man'
1952
1953 ac_prev=
1954 ac_dashdash=
1955 for ac_option
1956 do
1957 # If the previous option needs an argument, assign it.
1958 if test -n "$ac_prev"; then
1959 eval $ac_prev=\$ac_option
1960 ac_prev=
1961 continue
1962 fi
1963
1964 case $ac_option in
1965 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1966 *=) ac_optarg= ;;
1967 *) ac_optarg=yes ;;
1968 esac
1969
1970 # Accept the important Cygnus configure options, so we can diagnose typos.
1971
1972 case $ac_dashdash$ac_option in
1973 --)
1974 ac_dashdash=yes ;;
1975
1976 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1977 ac_prev=bindir ;;
1978 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1979 bindir=$ac_optarg ;;
1980
1981 -build | --build | --buil | --bui | --bu)
1982 ac_prev=build_alias ;;
1983 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1984 build_alias=$ac_optarg ;;
1985
1986 -cache-file | --cache-file | --cache-fil | --cache-fi \
1987 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1988 ac_prev=cache_file ;;
1989 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1990 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1991 cache_file=$ac_optarg ;;
1992
1993 --config-cache | -C)
1994 cache_file=config.cache ;;
1995
1996 -datadir | --datadir | --datadi | --datad)
1997 ac_prev=datadir ;;
1998 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1999 datadir=$ac_optarg ;;
2000
2001 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
2002 | --dataroo | --dataro | --datar)
2003 ac_prev=datarootdir ;;
2004 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
2005 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
2006 datarootdir=$ac_optarg ;;
2007
2008 -disable-* | --disable-*)
2009 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
2010 # Reject names that are not valid shell variable names.
2011 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2012 as_fn_error $? "invalid feature name: $ac_useropt"
2013 ac_useropt_orig=$ac_useropt
2014 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2015 case $ac_user_opts in
2016 *"
2017 "enable_$ac_useropt"
2018 "*) ;;
2019 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
2020 ac_unrecognized_sep=', ';;
2021 esac
2022 eval enable_$ac_useropt=no ;;
2023
2024 -docdir | --docdir | --docdi | --doc | --do)
2025 ac_prev=docdir ;;
2026 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
2027 docdir=$ac_optarg ;;
2028
2029 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
2030 ac_prev=dvidir ;;
2031 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
2032 dvidir=$ac_optarg ;;
2033
2034 -enable-* | --enable-*)
2035 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
2036 # Reject names that are not valid shell variable names.
2037 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2038 as_fn_error $? "invalid feature name: $ac_useropt"
2039 ac_useropt_orig=$ac_useropt
2040 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2041 case $ac_user_opts in
2042 *"
2043 "enable_$ac_useropt"
2044 "*) ;;
2045 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
2046 ac_unrecognized_sep=', ';;
2047 esac
2048 eval enable_$ac_useropt=\$ac_optarg ;;
2049
2050 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
2051 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
2052 | --exec | --exe | --ex)
2053 ac_prev=exec_prefix ;;
2054 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
2055 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
2056 | --exec=* | --exe=* | --ex=*)
2057 exec_prefix=$ac_optarg ;;
2058
2059 -gas | --gas | --ga | --g)
2060 # Obsolete; use --with-gas.
2061 with_gas=yes ;;
2062
2063 -help | --help | --hel | --he | -h)
2064 ac_init_help=long ;;
2065 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
2066 ac_init_help=recursive ;;
2067 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
2068 ac_init_help=short ;;
2069
2070 -host | --host | --hos | --ho)
2071 ac_prev=host_alias ;;
2072 -host=* | --host=* | --hos=* | --ho=*)
2073 host_alias=$ac_optarg ;;
2074
2075 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
2076 ac_prev=htmldir ;;
2077 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
2078 | --ht=*)
2079 htmldir=$ac_optarg ;;
2080
2081 -includedir | --includedir | --includedi | --included | --include \
2082 | --includ | --inclu | --incl | --inc)
2083 ac_prev=includedir ;;
2084 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
2085 | --includ=* | --inclu=* | --incl=* | --inc=*)
2086 includedir=$ac_optarg ;;
2087
2088 -infodir | --infodir | --infodi | --infod | --info | --inf)
2089 ac_prev=infodir ;;
2090 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
2091 infodir=$ac_optarg ;;
2092
2093 -libdir | --libdir | --libdi | --libd)
2094 ac_prev=libdir ;;
2095 -libdir=* | --libdir=* | --libdi=* | --libd=*)
2096 libdir=$ac_optarg ;;
2097
2098 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
2099 | --libexe | --libex | --libe)
2100 ac_prev=libexecdir ;;
2101 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
2102 | --libexe=* | --libex=* | --libe=*)
2103 libexecdir=$ac_optarg ;;
2104
2105 -localedir | --localedir | --localedi | --localed | --locale)
2106 ac_prev=localedir ;;
2107 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
2108 localedir=$ac_optarg ;;
2109
2110 -localstatedir | --localstatedir | --localstatedi | --localstated \
2111 | --localstate | --localstat | --localsta | --localst | --locals)
2112 ac_prev=localstatedir ;;
2113 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
2114 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
2115 localstatedir=$ac_optarg ;;
2116
2117 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
2118 ac_prev=mandir ;;
2119 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
2120 mandir=$ac_optarg ;;
2121
2122 -nfp | --nfp | --nf)
2123 # Obsolete; use --without-fp.
2124 with_fp=no ;;
2125
2126 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
2127 | --no-cr | --no-c | -n)
2128 no_create=yes ;;
2129
2130 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
2131 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
2132 no_recursion=yes ;;
2133
2134 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
2135 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
2136 | --oldin | --oldi | --old | --ol | --o)
2137 ac_prev=oldincludedir ;;
2138 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
2139 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
2140 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
2141 oldincludedir=$ac_optarg ;;
2142
2143 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
2144 ac_prev=prefix ;;
2145 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
2146 prefix=$ac_optarg ;;
2147
2148 -program-prefix | --program-prefix | --program-prefi | --program-pref \
2149 | --program-pre | --program-pr | --program-p)
2150 ac_prev=program_prefix ;;
2151 -program-prefix=* | --program-prefix=* | --program-prefi=* \
2152 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
2153 program_prefix=$ac_optarg ;;
2154
2155 -program-suffix | --program-suffix | --program-suffi | --program-suff \
2156 | --program-suf | --program-su | --program-s)
2157 ac_prev=program_suffix ;;
2158 -program-suffix=* | --program-suffix=* | --program-suffi=* \
2159 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
2160 program_suffix=$ac_optarg ;;
2161
2162 -program-transform-name | --program-transform-name \
2163 | --program-transform-nam | --program-transform-na \
2164 | --program-transform-n | --program-transform- \
2165 | --program-transform | --program-transfor \
2166 | --program-transfo | --program-transf \
2167 | --program-trans | --program-tran \
2168 | --progr-tra | --program-tr | --program-t)
2169 ac_prev=program_transform_name ;;
2170 -program-transform-name=* | --program-transform-name=* \
2171 | --program-transform-nam=* | --program-transform-na=* \
2172 | --program-transform-n=* | --program-transform-=* \
2173 | --program-transform=* | --program-transfor=* \
2174 | --program-transfo=* | --program-transf=* \
2175 | --program-trans=* | --program-tran=* \
2176 | --progr-tra=* | --program-tr=* | --program-t=*)
2177 program_transform_name=$ac_optarg ;;
2178
2179 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
2180 ac_prev=pdfdir ;;
2181 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
2182 pdfdir=$ac_optarg ;;
2183
2184 -psdir | --psdir | --psdi | --psd | --ps)
2185 ac_prev=psdir ;;
2186 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
2187 psdir=$ac_optarg ;;
2188
2189 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2190 | -silent | --silent | --silen | --sile | --sil)
2191 silent=yes ;;
2192
2193 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
2194 ac_prev=sbindir ;;
2195 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
2196 | --sbi=* | --sb=*)
2197 sbindir=$ac_optarg ;;
2198
2199 -sharedstatedir | --sharedstatedir | --sharedstatedi \
2200 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
2201 | --sharedst | --shareds | --shared | --share | --shar \
2202 | --sha | --sh)
2203 ac_prev=sharedstatedir ;;
2204 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
2205 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
2206 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
2207 | --sha=* | --sh=*)
2208 sharedstatedir=$ac_optarg ;;
2209
2210 -site | --site | --sit)
2211 ac_prev=site ;;
2212 -site=* | --site=* | --sit=*)
2213 site=$ac_optarg ;;
2214
2215 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2216 ac_prev=srcdir ;;
2217 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2218 srcdir=$ac_optarg ;;
2219
2220 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
2221 | --syscon | --sysco | --sysc | --sys | --sy)
2222 ac_prev=sysconfdir ;;
2223 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
2224 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
2225 sysconfdir=$ac_optarg ;;
2226
2227 -target | --target | --targe | --targ | --tar | --ta | --t)
2228 ac_prev=target_alias ;;
2229 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
2230 target_alias=$ac_optarg ;;
2231
2232 -v | -verbose | --verbose | --verbos | --verbo | --verb)
2233 verbose=yes ;;
2234
2235 -version | --version | --versio | --versi | --vers | -V)
2236 ac_init_version=: ;;
2237
2238 -with-* | --with-*)
2239 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
2240 # Reject names that are not valid shell variable names.
2241 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2242 as_fn_error $? "invalid package name: $ac_useropt"
2243 ac_useropt_orig=$ac_useropt
2244 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2245 case $ac_user_opts in
2246 *"
2247 "with_$ac_useropt"
2248 "*) ;;
2249 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
2250 ac_unrecognized_sep=', ';;
2251 esac
2252 eval with_$ac_useropt=\$ac_optarg ;;
2253
2254 -without-* | --without-*)
2255 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
2256 # Reject names that are not valid shell variable names.
2257 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2258 as_fn_error $? "invalid package name: $ac_useropt"
2259 ac_useropt_orig=$ac_useropt
2260 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2261 case $ac_user_opts in
2262 *"
2263 "with_$ac_useropt"
2264 "*) ;;
2265 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
2266 ac_unrecognized_sep=', ';;
2267 esac
2268 eval with_$ac_useropt=no ;;
2269
2270 --x)
2271 # Obsolete; use --with-x.
2272 with_x=yes ;;
2273
2274 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
2275 | --x-incl | --x-inc | --x-in | --x-i)
2276 ac_prev=x_includes ;;
2277 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
2278 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
2279 x_includes=$ac_optarg ;;
2280
2281 -x-libraries | --x-libraries | --x-librarie | --x-librari \
2282 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
2283 ac_prev=x_libraries ;;
2284 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
2285 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
2286 x_libraries=$ac_optarg ;;
2287
2288 -*) as_fn_error $? "unrecognized option: \`$ac_option'
2289 Try \`$0 --help' for more information"
2290 ;;
2291
2292 *=*)
2293 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
2294 # Reject names that are not valid shell variable names.
2295 case $ac_envvar in #(
2296 '' | [0-9]* | *[!_$as_cr_alnum]* )
2297 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
2298 esac
2299 eval $ac_envvar=\$ac_optarg
2300 export $ac_envvar ;;
2301
2302 *)
2303 # FIXME: should be removed in autoconf 3.0.
2304 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
2305 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
2306 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
2307 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
2308 ;;
2309
2310 esac
2311 done
2312
2313 if test -n "$ac_prev"; then
2314 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
2315 as_fn_error $? "missing argument to $ac_option"
2316 fi
2317
2318 if test -n "$ac_unrecognized_opts"; then
2319 case $enable_option_checking in
2320 no) ;;
2321 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
2322 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2323 esac
2324 fi
2325
2326 # Check all directory arguments for consistency.
2327 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
2328 datadir sysconfdir sharedstatedir localstatedir includedir \
2329 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2330 libdir localedir mandir
2331 do
2332 eval ac_val=\$$ac_var
2333 # Remove trailing slashes.
2334 case $ac_val in
2335 */ )
2336 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2337 eval $ac_var=\$ac_val;;
2338 esac
2339 # Be sure to have absolute directory names.
2340 case $ac_val in
2341 [\\/$]* | ?:[\\/]* ) continue;;
2342 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2343 esac
2344 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
2345 done
2346
2347 # There might be people who depend on the old broken behavior: `$host'
2348 # used to hold the argument of --host etc.
2349 # FIXME: To remove some day.
2350 build=$build_alias
2351 host=$host_alias
2352 target=$target_alias
2353
2354 # FIXME: To remove some day.
2355 if test "x$host_alias" != x; then
2356 if test "x$build_alias" = x; then
2357 cross_compiling=maybe
2358 elif test "x$build_alias" != "x$host_alias"; then
2359 cross_compiling=yes
2360 fi
2361 fi
2362
2363 ac_tool_prefix=
2364 test -n "$host_alias" && ac_tool_prefix=$host_alias-
2365
2366 test "$silent" = yes && exec 6>/dev/null
2367
2368
2369 ac_pwd=`pwd` && test -n "$ac_pwd" &&
2370 ac_ls_di=`ls -di .` &&
2371 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2372 as_fn_error $? "working directory cannot be determined"
2373 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2374 as_fn_error $? "pwd does not report name of working directory"
2375
2376
2377 # Find the source files, if location was not specified.
2378 if test -z "$srcdir"; then
2379 ac_srcdir_defaulted=yes
2380 # Try the directory containing this script, then the parent directory.
2381 ac_confdir=`$as_dirname -- "$as_myself" ||
2382 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2383 X"$as_myself" : 'X\(//\)[^/]' \| \
2384 X"$as_myself" : 'X\(//\)$' \| \
2385 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2386 $as_echo X"$as_myself" |
2387 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2388 s//\1/
2389 q
2390 }
2391 /^X\(\/\/\)[^/].*/{
2392 s//\1/
2393 q
2394 }
2395 /^X\(\/\/\)$/{
2396 s//\1/
2397 q
2398 }
2399 /^X\(\/\).*/{
2400 s//\1/
2401 q
2402 }
2403 s/.*/./; q'`
2404 srcdir=$ac_confdir
2405 if test ! -r "$srcdir/$ac_unique_file"; then
2406 srcdir=..
2407 fi
2408 else
2409 ac_srcdir_defaulted=no
2410 fi
2411 if test ! -r "$srcdir/$ac_unique_file"; then
2412 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2413 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
2414 fi
2415 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2416 ac_abs_confdir=`(
2417 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
2418 pwd)`
2419 # When building in place, set srcdir=.
2420 if test "$ac_abs_confdir" = "$ac_pwd"; then
2421 srcdir=.
2422 fi
2423 # Remove unnecessary trailing slashes from srcdir.
2424 # Double slashes in file names in object file debugging info
2425 # mess up M-x gdb in Emacs.
2426 case $srcdir in
2427 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2428 esac
2429 for ac_var in $ac_precious_vars; do
2430 eval ac_env_${ac_var}_set=\${${ac_var}+set}
2431 eval ac_env_${ac_var}_value=\$${ac_var}
2432 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2433 eval ac_cv_env_${ac_var}_value=\$${ac_var}
2434 done
2435
2436 #
2437 # Report the --help message.
2438 #
2439 if test "$ac_init_help" = "long"; then
2440 # Omit some internal or obsolete options to make the list less imposing.
2441 # This message is too long to be a string in the A/UX 3.1 sh.
2442 cat <<_ACEOF
2443 \`configure' configures libgnu UNUSED-VERSION to adapt to many kinds of systems.
2444
2445 Usage: $0 [OPTION]... [VAR=VALUE]...
2446
2447 To assign environment variables (e.g., CC, CFLAGS...), specify them as
2448 VAR=VALUE. See below for descriptions of some of the useful variables.
2449
2450 Defaults for the options are specified in brackets.
2451
2452 Configuration:
2453 -h, --help display this help and exit
2454 --help=short display options specific to this package
2455 --help=recursive display the short help of all the included packages
2456 -V, --version display version information and exit
2457 -q, --quiet, --silent do not print \`checking ...' messages
2458 --cache-file=FILE cache test results in FILE [disabled]
2459 -C, --config-cache alias for \`--cache-file=config.cache'
2460 -n, --no-create do not create output files
2461 --srcdir=DIR find the sources in DIR [configure dir or \`..']
2462
2463 Installation directories:
2464 --prefix=PREFIX install architecture-independent files in PREFIX
2465 [$ac_default_prefix]
2466 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
2467 [PREFIX]
2468
2469 By default, \`make install' will install all the files in
2470 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
2471 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2472 for instance \`--prefix=\$HOME'.
2473
2474 For better control, use the options below.
2475
2476 Fine tuning of the installation directories:
2477 --bindir=DIR user executables [EPREFIX/bin]
2478 --sbindir=DIR system admin executables [EPREFIX/sbin]
2479 --libexecdir=DIR program executables [EPREFIX/libexec]
2480 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
2481 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
2482 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
2483 --libdir=DIR object code libraries [EPREFIX/lib]
2484 --includedir=DIR C header files [PREFIX/include]
2485 --oldincludedir=DIR C header files for non-gcc [/usr/include]
2486 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
2487 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
2488 --infodir=DIR info documentation [DATAROOTDIR/info]
2489 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
2490 --mandir=DIR man documentation [DATAROOTDIR/man]
2491 --docdir=DIR documentation root [DATAROOTDIR/doc/libgnu]
2492 --htmldir=DIR html documentation [DOCDIR]
2493 --dvidir=DIR dvi documentation [DOCDIR]
2494 --pdfdir=DIR pdf documentation [DOCDIR]
2495 --psdir=DIR ps documentation [DOCDIR]
2496 _ACEOF
2497
2498 cat <<\_ACEOF
2499
2500 Program names:
2501 --program-prefix=PREFIX prepend PREFIX to installed program names
2502 --program-suffix=SUFFIX append SUFFIX to installed program names
2503 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
2504
2505 System types:
2506 --build=BUILD configure for building on BUILD [guessed]
2507 --host=HOST cross-compile to build programs to run on HOST [BUILD]
2508 --target=TARGET configure for building compilers for TARGET [HOST]
2509 _ACEOF
2510 fi
2511
2512 if test -n "$ac_init_help"; then
2513 case $ac_init_help in
2514 short | recursive ) echo "Configuration of libgnu UNUSED-VERSION:";;
2515 esac
2516 cat <<\_ACEOF
2517
2518 Optional Features:
2519 --disable-option-checking ignore unrecognized --enable/--with options
2520 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
2521 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
2522 --enable-maintainer-mode
2523 enable make rules and dependencies not useful (and
2524 sometimes confusing) to the casual installer
2525 --disable-largefile omit support for large files
2526 --enable-threads={isoc|posix|isoc+posix|windows}
2527 specify multithreading API
2528 --disable-threads build without multithread safety
2529 --enable-plugins Enable support for plugins
2530 --enable-cross-guesses={conservative|risky}
2531 specify policy for cross-compilation guesses
2532 --enable-dependency-tracking
2533 do not reject slow dependency extractors
2534 --disable-dependency-tracking
2535 speeds up one-time build
2536 --enable-silent-rules less verbose build output (undo: "make V=1")
2537 --disable-silent-rules verbose build output (undo: "make V=0")
2538
2539 Some influential environment variables:
2540 CC C compiler command
2541 CFLAGS C compiler flags
2542 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2543 nonstandard directory <lib dir>
2544 LIBS libraries to pass to the linker, e.g. -l<library>
2545 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2546 you have headers in a nonstandard directory <include dir>
2547 CPP C preprocessor
2548
2549 Use these variables to override the choices made by `configure' or to help
2550 it to find libraries and programs with nonstandard names/locations.
2551
2552 Report bugs to the package provider.
2553 _ACEOF
2554 ac_status=$?
2555 fi
2556
2557 if test "$ac_init_help" = "recursive"; then
2558 # If there are subdirs, report their specific --help.
2559 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2560 test -d "$ac_dir" ||
2561 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2562 continue
2563 ac_builddir=.
2564
2565 case "$ac_dir" in
2566 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2567 *)
2568 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2569 # A ".." for each directory in $ac_dir_suffix.
2570 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2571 case $ac_top_builddir_sub in
2572 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2573 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2574 esac ;;
2575 esac
2576 ac_abs_top_builddir=$ac_pwd
2577 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2578 # for backward compatibility:
2579 ac_top_builddir=$ac_top_build_prefix
2580
2581 case $srcdir in
2582 .) # We are building in place.
2583 ac_srcdir=.
2584 ac_top_srcdir=$ac_top_builddir_sub
2585 ac_abs_top_srcdir=$ac_pwd ;;
2586 [\\/]* | ?:[\\/]* ) # Absolute name.
2587 ac_srcdir=$srcdir$ac_dir_suffix;
2588 ac_top_srcdir=$srcdir
2589 ac_abs_top_srcdir=$srcdir ;;
2590 *) # Relative name.
2591 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2592 ac_top_srcdir=$ac_top_build_prefix$srcdir
2593 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2594 esac
2595 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2596
2597 cd "$ac_dir" || { ac_status=$?; continue; }
2598 # Check for guested configure.
2599 if test -f "$ac_srcdir/configure.gnu"; then
2600 echo &&
2601 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2602 elif test -f "$ac_srcdir/configure"; then
2603 echo &&
2604 $SHELL "$ac_srcdir/configure" --help=recursive
2605 else
2606 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2607 fi || ac_status=$?
2608 cd "$ac_pwd" || { ac_status=$?; break; }
2609 done
2610 fi
2611
2612 test -n "$ac_init_help" && exit $ac_status
2613 if $ac_init_version; then
2614 cat <<\_ACEOF
2615 libgnu configure UNUSED-VERSION
2616 generated by GNU Autoconf 2.69
2617
2618 Copyright (C) 2012 Free Software Foundation, Inc.
2619 This configure script is free software; the Free Software Foundation
2620 gives unlimited permission to copy, distribute and modify it.
2621 _ACEOF
2622 exit
2623 fi
2624
2625 ## ------------------------ ##
2626 ## Autoconf initialization. ##
2627 ## ------------------------ ##
2628
2629 # ac_fn_c_try_compile LINENO
2630 # --------------------------
2631 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2632 ac_fn_c_try_compile ()
2633 {
2634 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2635 rm -f conftest.$ac_objext
2636 if { { ac_try="$ac_compile"
2637 case "(($ac_try" in
2638 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2639 *) ac_try_echo=$ac_try;;
2640 esac
2641 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2642 $as_echo "$ac_try_echo"; } >&5
2643 (eval "$ac_compile") 2>conftest.err
2644 ac_status=$?
2645 if test -s conftest.err; then
2646 grep -v '^ *+' conftest.err >conftest.er1
2647 cat conftest.er1 >&5
2648 mv -f conftest.er1 conftest.err
2649 fi
2650 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2651 test $ac_status = 0; } && {
2652 test -z "$ac_c_werror_flag" ||
2653 test ! -s conftest.err
2654 } && test -s conftest.$ac_objext; then :
2655 ac_retval=0
2656 else
2657 $as_echo "$as_me: failed program was:" >&5
2658 sed 's/^/| /' conftest.$ac_ext >&5
2659
2660 ac_retval=1
2661 fi
2662 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2663 as_fn_set_status $ac_retval
2664
2665 } # ac_fn_c_try_compile
2666
2667 # ac_fn_c_try_cpp LINENO
2668 # ----------------------
2669 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2670 ac_fn_c_try_cpp ()
2671 {
2672 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2673 if { { ac_try="$ac_cpp conftest.$ac_ext"
2674 case "(($ac_try" in
2675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2676 *) ac_try_echo=$ac_try;;
2677 esac
2678 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2679 $as_echo "$ac_try_echo"; } >&5
2680 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2681 ac_status=$?
2682 if test -s conftest.err; then
2683 grep -v '^ *+' conftest.err >conftest.er1
2684 cat conftest.er1 >&5
2685 mv -f conftest.er1 conftest.err
2686 fi
2687 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2688 test $ac_status = 0; } > conftest.i && {
2689 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2690 test ! -s conftest.err
2691 }; then :
2692 ac_retval=0
2693 else
2694 $as_echo "$as_me: failed program was:" >&5
2695 sed 's/^/| /' conftest.$ac_ext >&5
2696
2697 ac_retval=1
2698 fi
2699 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2700 as_fn_set_status $ac_retval
2701
2702 } # ac_fn_c_try_cpp
2703
2704 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2705 # -------------------------------------------------------
2706 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2707 # the include files in INCLUDES and setting the cache variable VAR
2708 # accordingly.
2709 ac_fn_c_check_header_mongrel ()
2710 {
2711 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2712 if eval \${$3+:} false; then :
2713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2714 $as_echo_n "checking for $2... " >&6; }
2715 if eval \${$3+:} false; then :
2716 $as_echo_n "(cached) " >&6
2717 fi
2718 eval ac_res=\$$3
2719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2720 $as_echo "$ac_res" >&6; }
2721 else
2722 # Is the header compilable?
2723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2724 $as_echo_n "checking $2 usability... " >&6; }
2725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2726 /* end confdefs.h. */
2727 $4
2728 #include <$2>
2729 _ACEOF
2730 if ac_fn_c_try_compile "$LINENO"; then :
2731 ac_header_compiler=yes
2732 else
2733 ac_header_compiler=no
2734 fi
2735 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2737 $as_echo "$ac_header_compiler" >&6; }
2738
2739 # Is the header present?
2740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2741 $as_echo_n "checking $2 presence... " >&6; }
2742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2743 /* end confdefs.h. */
2744 #include <$2>
2745 _ACEOF
2746 if ac_fn_c_try_cpp "$LINENO"; then :
2747 ac_header_preproc=yes
2748 else
2749 ac_header_preproc=no
2750 fi
2751 rm -f conftest.err conftest.i conftest.$ac_ext
2752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2753 $as_echo "$ac_header_preproc" >&6; }
2754
2755 # So? What about this header?
2756 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2757 yes:no: )
2758 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2759 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2760 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2761 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2762 ;;
2763 no:yes:* )
2764 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2765 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2766 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2767 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2768 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2769 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2770 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2771 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2772 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2773 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2774 ;;
2775 esac
2776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2777 $as_echo_n "checking for $2... " >&6; }
2778 if eval \${$3+:} false; then :
2779 $as_echo_n "(cached) " >&6
2780 else
2781 eval "$3=\$ac_header_compiler"
2782 fi
2783 eval ac_res=\$$3
2784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2785 $as_echo "$ac_res" >&6; }
2786 fi
2787 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2788
2789 } # ac_fn_c_check_header_mongrel
2790
2791 # ac_fn_c_try_run LINENO
2792 # ----------------------
2793 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2794 # that executables *can* be run.
2795 ac_fn_c_try_run ()
2796 {
2797 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2798 if { { ac_try="$ac_link"
2799 case "(($ac_try" in
2800 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2801 *) ac_try_echo=$ac_try;;
2802 esac
2803 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2804 $as_echo "$ac_try_echo"; } >&5
2805 (eval "$ac_link") 2>&5
2806 ac_status=$?
2807 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2808 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2809 { { case "(($ac_try" in
2810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2811 *) ac_try_echo=$ac_try;;
2812 esac
2813 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2814 $as_echo "$ac_try_echo"; } >&5
2815 (eval "$ac_try") 2>&5
2816 ac_status=$?
2817 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2818 test $ac_status = 0; }; }; then :
2819 ac_retval=0
2820 else
2821 $as_echo "$as_me: program exited with status $ac_status" >&5
2822 $as_echo "$as_me: failed program was:" >&5
2823 sed 's/^/| /' conftest.$ac_ext >&5
2824
2825 ac_retval=$ac_status
2826 fi
2827 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2828 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2829 as_fn_set_status $ac_retval
2830
2831 } # ac_fn_c_try_run
2832
2833 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2834 # -------------------------------------------------------
2835 # Tests whether HEADER exists and can be compiled using the include files in
2836 # INCLUDES, setting the cache variable VAR accordingly.
2837 ac_fn_c_check_header_compile ()
2838 {
2839 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2841 $as_echo_n "checking for $2... " >&6; }
2842 if eval \${$3+:} false; then :
2843 $as_echo_n "(cached) " >&6
2844 else
2845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2846 /* end confdefs.h. */
2847 $4
2848 #include <$2>
2849 _ACEOF
2850 if ac_fn_c_try_compile "$LINENO"; then :
2851 eval "$3=yes"
2852 else
2853 eval "$3=no"
2854 fi
2855 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2856 fi
2857 eval ac_res=\$$3
2858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2859 $as_echo "$ac_res" >&6; }
2860 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2861
2862 } # ac_fn_c_check_header_compile
2863
2864 # ac_fn_c_try_link LINENO
2865 # -----------------------
2866 # Try to link conftest.$ac_ext, and return whether this succeeded.
2867 ac_fn_c_try_link ()
2868 {
2869 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2870 rm -f conftest.$ac_objext conftest$ac_exeext
2871 if { { ac_try="$ac_link"
2872 case "(($ac_try" in
2873 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2874 *) ac_try_echo=$ac_try;;
2875 esac
2876 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2877 $as_echo "$ac_try_echo"; } >&5
2878 (eval "$ac_link") 2>conftest.err
2879 ac_status=$?
2880 if test -s conftest.err; then
2881 grep -v '^ *+' conftest.err >conftest.er1
2882 cat conftest.er1 >&5
2883 mv -f conftest.er1 conftest.err
2884 fi
2885 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2886 test $ac_status = 0; } && {
2887 test -z "$ac_c_werror_flag" ||
2888 test ! -s conftest.err
2889 } && test -s conftest$ac_exeext && {
2890 test "$cross_compiling" = yes ||
2891 test -x conftest$ac_exeext
2892 }; then :
2893 ac_retval=0
2894 else
2895 $as_echo "$as_me: failed program was:" >&5
2896 sed 's/^/| /' conftest.$ac_ext >&5
2897
2898 ac_retval=1
2899 fi
2900 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2901 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2902 # interfere with the next link command; also delete a directory that is
2903 # left behind by Apple's compiler. We do this before executing the actions.
2904 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2905 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2906 as_fn_set_status $ac_retval
2907
2908 } # ac_fn_c_try_link
2909
2910 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2911 # -------------------------------------------
2912 # Tests whether TYPE exists after having included INCLUDES, setting cache
2913 # variable VAR accordingly.
2914 ac_fn_c_check_type ()
2915 {
2916 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2918 $as_echo_n "checking for $2... " >&6; }
2919 if eval \${$3+:} false; then :
2920 $as_echo_n "(cached) " >&6
2921 else
2922 eval "$3=no"
2923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2924 /* end confdefs.h. */
2925 $4
2926 int
2927 main ()
2928 {
2929 if (sizeof ($2))
2930 return 0;
2931 ;
2932 return 0;
2933 }
2934 _ACEOF
2935 if ac_fn_c_try_compile "$LINENO"; then :
2936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2937 /* end confdefs.h. */
2938 $4
2939 int
2940 main ()
2941 {
2942 if (sizeof (($2)))
2943 return 0;
2944 ;
2945 return 0;
2946 }
2947 _ACEOF
2948 if ac_fn_c_try_compile "$LINENO"; then :
2949
2950 else
2951 eval "$3=yes"
2952 fi
2953 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2954 fi
2955 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2956 fi
2957 eval ac_res=\$$3
2958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2959 $as_echo "$ac_res" >&6; }
2960 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2961
2962 } # ac_fn_c_check_type
2963
2964 # ac_fn_c_check_func LINENO FUNC VAR
2965 # ----------------------------------
2966 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2967 ac_fn_c_check_func ()
2968 {
2969 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2971 $as_echo_n "checking for $2... " >&6; }
2972 if eval \${$3+:} false; then :
2973 $as_echo_n "(cached) " >&6
2974 else
2975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2976 /* end confdefs.h. */
2977 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2978 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2979 #define $2 innocuous_$2
2980
2981 /* System header to define __stub macros and hopefully few prototypes,
2982 which can conflict with char $2 (); below.
2983 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2984 <limits.h> exists even on freestanding compilers. */
2985
2986 #ifdef __STDC__
2987 # include <limits.h>
2988 #else
2989 # include <assert.h>
2990 #endif
2991
2992 #undef $2
2993
2994 /* Override any GCC internal prototype to avoid an error.
2995 Use char because int might match the return type of a GCC
2996 builtin and then its argument prototype would still apply. */
2997 #ifdef __cplusplus
2998 extern "C"
2999 #endif
3000 char $2 ();
3001 /* The GNU C library defines this for functions which it implements
3002 to always fail with ENOSYS. Some functions are actually named
3003 something starting with __ and the normal name is an alias. */
3004 #if defined __stub_$2 || defined __stub___$2
3005 choke me
3006 #endif
3007
3008 int
3009 main ()
3010 {
3011 return $2 ();
3012 ;
3013 return 0;
3014 }
3015 _ACEOF
3016 if ac_fn_c_try_link "$LINENO"; then :
3017 eval "$3=yes"
3018 else
3019 eval "$3=no"
3020 fi
3021 rm -f core conftest.err conftest.$ac_objext \
3022 conftest$ac_exeext conftest.$ac_ext
3023 fi
3024 eval ac_res=\$$3
3025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3026 $as_echo "$ac_res" >&6; }
3027 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3028
3029 } # ac_fn_c_check_func
3030
3031 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
3032 # ---------------------------------------------
3033 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
3034 # accordingly.
3035 ac_fn_c_check_decl ()
3036 {
3037 ac_save_ac_compile="$ac_compile"
3038 if test -n "$ac_compile_for_check_decl"; then
3039 ac_compile="$ac_compile_for_check_decl"
3040 fi
3041 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3042 as_decl_name=`echo $2|sed 's/ *(.*//'`
3043 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
3044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
3045 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
3046 if eval \${$3+:} false; then :
3047 $as_echo_n "(cached) " >&6
3048 else
3049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3050 /* end confdefs.h. */
3051 $4
3052 int
3053 main ()
3054 {
3055 #ifndef $as_decl_name
3056 #ifdef __cplusplus
3057 (void) $as_decl_use;
3058 #else
3059 (void) $as_decl_name;
3060 #endif
3061 #endif
3062
3063 ;
3064 return 0;
3065 }
3066 _ACEOF
3067 if ac_fn_c_try_compile "$LINENO"; then :
3068 eval "$3=yes"
3069 else
3070 eval "$3=no"
3071 fi
3072 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3073 fi
3074 eval ac_res=\$$3
3075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3076 $as_echo "$ac_res" >&6; }
3077 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3078 ac_compile="$ac_save_ac_compile"
3079
3080 } # ac_fn_c_check_decl
3081
3082 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
3083 # --------------------------------------------
3084 # Tries to find the compile-time value of EXPR in a program that includes
3085 # INCLUDES, setting VAR accordingly. Returns whether the value could be
3086 # computed
3087 ac_fn_c_compute_int ()
3088 {
3089 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3090 if test "$cross_compiling" = yes; then
3091 # Depending upon the size, compute the lo and hi bounds.
3092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3093 /* end confdefs.h. */
3094 $4
3095 int
3096 main ()
3097 {
3098 static int test_array [1 - 2 * !(($2) >= 0)];
3099 test_array [0] = 0;
3100 return test_array [0];
3101
3102 ;
3103 return 0;
3104 }
3105 _ACEOF
3106 if ac_fn_c_try_compile "$LINENO"; then :
3107 ac_lo=0 ac_mid=0
3108 while :; do
3109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3110 /* end confdefs.h. */
3111 $4
3112 int
3113 main ()
3114 {
3115 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3116 test_array [0] = 0;
3117 return test_array [0];
3118
3119 ;
3120 return 0;
3121 }
3122 _ACEOF
3123 if ac_fn_c_try_compile "$LINENO"; then :
3124 ac_hi=$ac_mid; break
3125 else
3126 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
3127 if test $ac_lo -le $ac_mid; then
3128 ac_lo= ac_hi=
3129 break
3130 fi
3131 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
3132 fi
3133 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3134 done
3135 else
3136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3137 /* end confdefs.h. */
3138 $4
3139 int
3140 main ()
3141 {
3142 static int test_array [1 - 2 * !(($2) < 0)];
3143 test_array [0] = 0;
3144 return test_array [0];
3145
3146 ;
3147 return 0;
3148 }
3149 _ACEOF
3150 if ac_fn_c_try_compile "$LINENO"; then :
3151 ac_hi=-1 ac_mid=-1
3152 while :; do
3153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3154 /* end confdefs.h. */
3155 $4
3156 int
3157 main ()
3158 {
3159 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
3160 test_array [0] = 0;
3161 return test_array [0];
3162
3163 ;
3164 return 0;
3165 }
3166 _ACEOF
3167 if ac_fn_c_try_compile "$LINENO"; then :
3168 ac_lo=$ac_mid; break
3169 else
3170 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
3171 if test $ac_mid -le $ac_hi; then
3172 ac_lo= ac_hi=
3173 break
3174 fi
3175 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
3176 fi
3177 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3178 done
3179 else
3180 ac_lo= ac_hi=
3181 fi
3182 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3183 fi
3184 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3185 # Binary search between lo and hi bounds.
3186 while test "x$ac_lo" != "x$ac_hi"; do
3187 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
3188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3189 /* end confdefs.h. */
3190 $4
3191 int
3192 main ()
3193 {
3194 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3195 test_array [0] = 0;
3196 return test_array [0];
3197
3198 ;
3199 return 0;
3200 }
3201 _ACEOF
3202 if ac_fn_c_try_compile "$LINENO"; then :
3203 ac_hi=$ac_mid
3204 else
3205 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
3206 fi
3207 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3208 done
3209 case $ac_lo in #((
3210 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
3211 '') ac_retval=1 ;;
3212 esac
3213 else
3214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3215 /* end confdefs.h. */
3216 $4
3217 static long int longval () { return $2; }
3218 static unsigned long int ulongval () { return $2; }
3219 #include <stdio.h>
3220 #include <stdlib.h>
3221 int
3222 main ()
3223 {
3224
3225 FILE *f = fopen ("conftest.val", "w");
3226 if (! f)
3227 return 1;
3228 if (($2) < 0)
3229 {
3230 long int i = longval ();
3231 if (i != ($2))
3232 return 1;
3233 fprintf (f, "%ld", i);
3234 }
3235 else
3236 {
3237 unsigned long int i = ulongval ();
3238 if (i != ($2))
3239 return 1;
3240 fprintf (f, "%lu", i);
3241 }
3242 /* Do not output a trailing newline, as this causes \r\n confusion
3243 on some platforms. */
3244 return ferror (f) || fclose (f) != 0;
3245
3246 ;
3247 return 0;
3248 }
3249 _ACEOF
3250 if ac_fn_c_try_run "$LINENO"; then :
3251 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
3252 else
3253 ac_retval=1
3254 fi
3255 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3256 conftest.$ac_objext conftest.beam conftest.$ac_ext
3257 rm -f conftest.val
3258
3259 fi
3260 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3261 as_fn_set_status $ac_retval
3262
3263 } # ac_fn_c_compute_int
3264
3265 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
3266 # ----------------------------------------------------
3267 # Tries to find if the field MEMBER exists in type AGGR, after including
3268 # INCLUDES, setting cache variable VAR accordingly.
3269 ac_fn_c_check_member ()
3270 {
3271 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
3273 $as_echo_n "checking for $2.$3... " >&6; }
3274 if eval \${$4+:} false; then :
3275 $as_echo_n "(cached) " >&6
3276 else
3277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3278 /* end confdefs.h. */
3279 $5
3280 int
3281 main ()
3282 {
3283 static $2 ac_aggr;
3284 if (ac_aggr.$3)
3285 return 0;
3286 ;
3287 return 0;
3288 }
3289 _ACEOF
3290 if ac_fn_c_try_compile "$LINENO"; then :
3291 eval "$4=yes"
3292 else
3293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3294 /* end confdefs.h. */
3295 $5
3296 int
3297 main ()
3298 {
3299 static $2 ac_aggr;
3300 if (sizeof ac_aggr.$3)
3301 return 0;
3302 ;
3303 return 0;
3304 }
3305 _ACEOF
3306 if ac_fn_c_try_compile "$LINENO"; then :
3307 eval "$4=yes"
3308 else
3309 eval "$4=no"
3310 fi
3311 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3312 fi
3313 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3314 fi
3315 eval ac_res=\$$4
3316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3317 $as_echo "$ac_res" >&6; }
3318 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3319
3320 } # ac_fn_c_check_member
3321 cat >config.log <<_ACEOF
3322 This file contains any messages produced by compilers while
3323 running configure, to aid debugging if configure makes a mistake.
3324
3325 It was created by libgnu $as_me UNUSED-VERSION, which was
3326 generated by GNU Autoconf 2.69. Invocation command line was
3327
3328 $ $0 $@
3329
3330 _ACEOF
3331 exec 5>>config.log
3332 {
3333 cat <<_ASUNAME
3334 ## --------- ##
3335 ## Platform. ##
3336 ## --------- ##
3337
3338 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3339 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3340 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3341 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3342 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3343
3344 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3345 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
3346
3347 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
3348 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
3349 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3350 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
3351 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
3352 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
3353 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
3354
3355 _ASUNAME
3356
3357 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3358 for as_dir in $PATH
3359 do
3360 IFS=$as_save_IFS
3361 test -z "$as_dir" && as_dir=.
3362 $as_echo "PATH: $as_dir"
3363 done
3364 IFS=$as_save_IFS
3365
3366 } >&5
3367
3368 cat >&5 <<_ACEOF
3369
3370
3371 ## ----------- ##
3372 ## Core tests. ##
3373 ## ----------- ##
3374
3375 _ACEOF
3376
3377
3378 # Keep a trace of the command line.
3379 # Strip out --no-create and --no-recursion so they do not pile up.
3380 # Strip out --silent because we don't want to record it for future runs.
3381 # Also quote any args containing shell meta-characters.
3382 # Make two passes to allow for proper duplicate-argument suppression.
3383 ac_configure_args=
3384 ac_configure_args0=
3385 ac_configure_args1=
3386 ac_must_keep_next=false
3387 for ac_pass in 1 2
3388 do
3389 for ac_arg
3390 do
3391 case $ac_arg in
3392 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3393 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3394 | -silent | --silent | --silen | --sile | --sil)
3395 continue ;;
3396 *\'*)
3397 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3398 esac
3399 case $ac_pass in
3400 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3401 2)
3402 as_fn_append ac_configure_args1 " '$ac_arg'"
3403 if test $ac_must_keep_next = true; then
3404 ac_must_keep_next=false # Got value, back to normal.
3405 else
3406 case $ac_arg in
3407 *=* | --config-cache | -C | -disable-* | --disable-* \
3408 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3409 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3410 | -with-* | --with-* | -without-* | --without-* | --x)
3411 case "$ac_configure_args0 " in
3412 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3413 esac
3414 ;;
3415 -* ) ac_must_keep_next=true ;;
3416 esac
3417 fi
3418 as_fn_append ac_configure_args " '$ac_arg'"
3419 ;;
3420 esac
3421 done
3422 done
3423 { ac_configure_args0=; unset ac_configure_args0;}
3424 { ac_configure_args1=; unset ac_configure_args1;}
3425
3426 # When interrupted or exit'd, cleanup temporary files, and complete
3427 # config.log. We remove comments because anyway the quotes in there
3428 # would cause problems or look ugly.
3429 # WARNING: Use '\'' to represent an apostrophe within the trap.
3430 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3431 trap 'exit_status=$?
3432 # Save into config.log some information that might help in debugging.
3433 {
3434 echo
3435
3436 $as_echo "## ---------------- ##
3437 ## Cache variables. ##
3438 ## ---------------- ##"
3439 echo
3440 # The following way of writing the cache mishandles newlines in values,
3441 (
3442 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3443 eval ac_val=\$$ac_var
3444 case $ac_val in #(
3445 *${as_nl}*)
3446 case $ac_var in #(
3447 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3448 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3449 esac
3450 case $ac_var in #(
3451 _ | IFS | as_nl) ;; #(
3452 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3453 *) { eval $ac_var=; unset $ac_var;} ;;
3454 esac ;;
3455 esac
3456 done
3457 (set) 2>&1 |
3458 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3459 *${as_nl}ac_space=\ *)
3460 sed -n \
3461 "s/'\''/'\''\\\\'\'''\''/g;
3462 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3463 ;; #(
3464 *)
3465 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3466 ;;
3467 esac |
3468 sort
3469 )
3470 echo
3471
3472 $as_echo "## ----------------- ##
3473 ## Output variables. ##
3474 ## ----------------- ##"
3475 echo
3476 for ac_var in $ac_subst_vars
3477 do
3478 eval ac_val=\$$ac_var
3479 case $ac_val in
3480 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3481 esac
3482 $as_echo "$ac_var='\''$ac_val'\''"
3483 done | sort
3484 echo
3485
3486 if test -n "$ac_subst_files"; then
3487 $as_echo "## ------------------- ##
3488 ## File substitutions. ##
3489 ## ------------------- ##"
3490 echo
3491 for ac_var in $ac_subst_files
3492 do
3493 eval ac_val=\$$ac_var
3494 case $ac_val in
3495 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3496 esac
3497 $as_echo "$ac_var='\''$ac_val'\''"
3498 done | sort
3499 echo
3500 fi
3501
3502 if test -s confdefs.h; then
3503 $as_echo "## ----------- ##
3504 ## confdefs.h. ##
3505 ## ----------- ##"
3506 echo
3507 cat confdefs.h
3508 echo
3509 fi
3510 test "$ac_signal" != 0 &&
3511 $as_echo "$as_me: caught signal $ac_signal"
3512 $as_echo "$as_me: exit $exit_status"
3513 } >&5
3514 rm -f core *.core core.conftest.* &&
3515 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3516 exit $exit_status
3517 ' 0
3518 for ac_signal in 1 2 13 15; do
3519 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3520 done
3521 ac_signal=0
3522
3523 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3524 rm -f -r conftest* confdefs.h
3525
3526 $as_echo "/* confdefs.h */" > confdefs.h
3527
3528 # Predefined preprocessor variables.
3529
3530 cat >>confdefs.h <<_ACEOF
3531 #define PACKAGE_NAME "$PACKAGE_NAME"
3532 _ACEOF
3533
3534 cat >>confdefs.h <<_ACEOF
3535 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3536 _ACEOF
3537
3538 cat >>confdefs.h <<_ACEOF
3539 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3540 _ACEOF
3541
3542 cat >>confdefs.h <<_ACEOF
3543 #define PACKAGE_STRING "$PACKAGE_STRING"
3544 _ACEOF
3545
3546 cat >>confdefs.h <<_ACEOF
3547 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3548 _ACEOF
3549
3550 cat >>confdefs.h <<_ACEOF
3551 #define PACKAGE_URL "$PACKAGE_URL"
3552 _ACEOF
3553
3554
3555 # Let the site file select an alternate cache file if it wants to.
3556 # Prefer an explicitly selected file to automatically selected ones.
3557 ac_site_file1=NONE
3558 ac_site_file2=NONE
3559 if test -n "$CONFIG_SITE"; then
3560 # We do not want a PATH search for config.site.
3561 case $CONFIG_SITE in #((
3562 -*) ac_site_file1=./$CONFIG_SITE;;
3563 */*) ac_site_file1=$CONFIG_SITE;;
3564 *) ac_site_file1=./$CONFIG_SITE;;
3565 esac
3566 elif test "x$prefix" != xNONE; then
3567 ac_site_file1=$prefix/share/config.site
3568 ac_site_file2=$prefix/etc/config.site
3569 else
3570 ac_site_file1=$ac_default_prefix/share/config.site
3571 ac_site_file2=$ac_default_prefix/etc/config.site
3572 fi
3573 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3574 do
3575 test "x$ac_site_file" = xNONE && continue
3576 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3577 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3578 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3579 sed 's/^/| /' "$ac_site_file" >&5
3580 . "$ac_site_file" \
3581 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3582 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3583 as_fn_error $? "failed to load site script $ac_site_file
3584 See \`config.log' for more details" "$LINENO" 5; }
3585 fi
3586 done
3587
3588 if test -r "$cache_file"; then
3589 # Some versions of bash will fail to source /dev/null (special files
3590 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
3591 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3592 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3593 $as_echo "$as_me: loading cache $cache_file" >&6;}
3594 case $cache_file in
3595 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3596 *) . "./$cache_file";;
3597 esac
3598 fi
3599 else
3600 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3601 $as_echo "$as_me: creating cache $cache_file" >&6;}
3602 >$cache_file
3603 fi
3604
3605 as_fn_append ac_header_list " arpa/inet.h"
3606 as_fn_append ac_header_list " features.h"
3607 as_fn_append ac_header_list " sys/socket.h"
3608 as_fn_append ac_func_list " canonicalize_file_name"
3609 as_fn_append ac_func_list " getcwd"
3610 as_fn_append ac_func_list " readlink"
3611 as_fn_append ac_func_list " realpath"
3612 as_fn_append ac_header_list " sys/param.h"
3613 as_fn_append ac_header_list " unistd.h"
3614 as_fn_append ac_func_list " _set_invalid_parameter_handler"
3615 as_fn_append ac_func_list " fchdir"
3616 as_fn_append ac_header_list " dirent.h"
3617 as_fn_append ac_func_list " fcntl"
3618 as_fn_append ac_func_list " symlink"
3619 as_fn_append ac_func_list " fdopendir"
3620 as_fn_append ac_func_list " mempcpy"
3621 as_fn_append ac_header_list " fnmatch.h"
3622 as_fn_append ac_func_list " fnmatch"
3623 as_fn_append ac_func_list " btowc"
3624 as_fn_append ac_func_list " isblank"
3625 as_fn_append ac_func_list " iswctype"
3626 as_fn_append ac_func_list " mbsrtowcs"
3627 as_fn_append ac_func_list " wmemchr"
3628 as_fn_append ac_func_list " wmemcpy"
3629 as_fn_append ac_func_list " wmempcpy"
3630 as_fn_append ac_header_list " wctype.h"
3631 gl_fnmatch_required=GNU
3632 as_fn_append ac_header_list " sys/stat.h"
3633 as_fn_append ac_func_list " fstatat"
3634 as_fn_append ac_func_list " getdtablesize"
3635 as_fn_append ac_func_list " getlogin_r"
3636 as_fn_append ac_func_list " getprogname"
3637 as_fn_append ac_func_list " getexecname"
3638 as_fn_append ac_header_list " sys/time.h"
3639 as_fn_append ac_func_list " gettimeofday"
3640 as_fn_append ac_header_list " glob.h"
3641 as_fn_append ac_func_list " glob"
3642 as_fn_append ac_func_list " glob_pattern_p"
3643 as_fn_append ac_func_list " getpwnam_r"
3644 as_fn_append ac_header_list " threads.h"
3645 as_fn_append ac_header_list " netdb.h"
3646 as_fn_append ac_header_list " netinet/in.h"
3647 as_fn_append ac_header_list " limits.h"
3648 as_fn_append ac_header_list " wchar.h"
3649 as_fn_append ac_header_list " stdint.h"
3650 as_fn_append ac_header_list " inttypes.h"
3651 as_fn_append ac_header_list " xlocale.h"
3652 as_fn_append ac_func_list " lstat"
3653 as_fn_append ac_header_list " math.h"
3654 as_fn_append ac_func_list " mbsinit"
3655 as_fn_append ac_func_list " mbrtowc"
3656 as_fn_append ac_header_list " sys/mman.h"
3657 as_fn_append ac_func_list " mprotect"
3658 as_fn_append ac_func_list " mkostemp"
3659 as_fn_append ac_func_list " openat"
3660 as_fn_append ac_func_list " link"
3661 as_fn_append ac_func_list " setenv"
3662 as_fn_append ac_func_list " strdup"
3663 as_fn_append ac_func_list " strerror_r"
3664 as_fn_append ac_func_list " __xpg_strerror_r"
3665 as_fn_append ac_func_list " catgets"
3666 as_fn_append ac_func_list " snprintf"
3667 as_fn_append ac_header_list " sys/uio.h"
3668 as_fn_append ac_func_list " localtime_r"
3669 as_fn_append ac_func_list " pipe"
3670 as_fn_append ac_header_list " crtdefs.h"
3671 as_fn_append ac_func_list " iswcntrl"
3672 # Check that the precious variables saved in the cache have kept the same
3673 # value.
3674 ac_cache_corrupted=false
3675 for ac_var in $ac_precious_vars; do
3676 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3677 eval ac_new_set=\$ac_env_${ac_var}_set
3678 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3679 eval ac_new_val=\$ac_env_${ac_var}_value
3680 case $ac_old_set,$ac_new_set in
3681 set,)
3682 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3683 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3684 ac_cache_corrupted=: ;;
3685 ,set)
3686 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3687 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3688 ac_cache_corrupted=: ;;
3689 ,);;
3690 *)
3691 if test "x$ac_old_val" != "x$ac_new_val"; then
3692 # differences in whitespace do not lead to failure.
3693 ac_old_val_w=`echo x $ac_old_val`
3694 ac_new_val_w=`echo x $ac_new_val`
3695 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3696 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3697 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3698 ac_cache_corrupted=:
3699 else
3700 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3701 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3702 eval $ac_var=\$ac_old_val
3703 fi
3704 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3705 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3706 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3707 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
3708 fi;;
3709 esac
3710 # Pass precious variables to config.status.
3711 if test "$ac_new_set" = set; then
3712 case $ac_new_val in
3713 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3714 *) ac_arg=$ac_var=$ac_new_val ;;
3715 esac
3716 case " $ac_configure_args " in
3717 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3718 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3719 esac
3720 fi
3721 done
3722 if $ac_cache_corrupted; then
3723 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3724 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3725 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3726 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3727 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3728 fi
3729 ## -------------------- ##
3730 ## Main body of script. ##
3731 ## -------------------- ##
3732
3733 ac_ext=c
3734 ac_cpp='$CPP $CPPFLAGS'
3735 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3736 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3737 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3738
3739
3740
3741
3742
3743
3744 ac_config_headers="$ac_config_headers config.h:config.in"
3745
3746
3747
3748
3749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
3750 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
3751 # Check whether --enable-maintainer-mode was given.
3752 if test "${enable_maintainer_mode+set}" = set; then :
3753 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
3754 else
3755 USE_MAINTAINER_MODE=no
3756 fi
3757
3758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
3759 $as_echo "$USE_MAINTAINER_MODE" >&6; }
3760 if test $USE_MAINTAINER_MODE = yes; then
3761 MAINTAINER_MODE_TRUE=
3762 MAINTAINER_MODE_FALSE='#'
3763 else
3764 MAINTAINER_MODE_TRUE='#'
3765 MAINTAINER_MODE_FALSE=
3766 fi
3767
3768 MAINT=$MAINTAINER_MODE_TRUE
3769
3770
3771
3772 ac_ext=c
3773 ac_cpp='$CPP $CPPFLAGS'
3774 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3775 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3776 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3777 if test -n "$ac_tool_prefix"; then
3778 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3779 set dummy ${ac_tool_prefix}gcc; ac_word=$2
3780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3781 $as_echo_n "checking for $ac_word... " >&6; }
3782 if ${ac_cv_prog_CC+:} false; then :
3783 $as_echo_n "(cached) " >&6
3784 else
3785 if test -n "$CC"; then
3786 ac_cv_prog_CC="$CC" # Let the user override the test.
3787 else
3788 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3789 for as_dir in $PATH
3790 do
3791 IFS=$as_save_IFS
3792 test -z "$as_dir" && as_dir=.
3793 for ac_exec_ext in '' $ac_executable_extensions; do
3794 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3795 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3796 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3797 break 2
3798 fi
3799 done
3800 done
3801 IFS=$as_save_IFS
3802
3803 fi
3804 fi
3805 CC=$ac_cv_prog_CC
3806 if test -n "$CC"; then
3807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3808 $as_echo "$CC" >&6; }
3809 else
3810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3811 $as_echo "no" >&6; }
3812 fi
3813
3814
3815 fi
3816 if test -z "$ac_cv_prog_CC"; then
3817 ac_ct_CC=$CC
3818 # Extract the first word of "gcc", so it can be a program name with args.
3819 set dummy gcc; ac_word=$2
3820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3821 $as_echo_n "checking for $ac_word... " >&6; }
3822 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3823 $as_echo_n "(cached) " >&6
3824 else
3825 if test -n "$ac_ct_CC"; then
3826 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3827 else
3828 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3829 for as_dir in $PATH
3830 do
3831 IFS=$as_save_IFS
3832 test -z "$as_dir" && as_dir=.
3833 for ac_exec_ext in '' $ac_executable_extensions; do
3834 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3835 ac_cv_prog_ac_ct_CC="gcc"
3836 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3837 break 2
3838 fi
3839 done
3840 done
3841 IFS=$as_save_IFS
3842
3843 fi
3844 fi
3845 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3846 if test -n "$ac_ct_CC"; then
3847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3848 $as_echo "$ac_ct_CC" >&6; }
3849 else
3850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3851 $as_echo "no" >&6; }
3852 fi
3853
3854 if test "x$ac_ct_CC" = x; then
3855 CC=""
3856 else
3857 case $cross_compiling:$ac_tool_warned in
3858 yes:)
3859 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3860 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3861 ac_tool_warned=yes ;;
3862 esac
3863 CC=$ac_ct_CC
3864 fi
3865 else
3866 CC="$ac_cv_prog_CC"
3867 fi
3868
3869 if test -z "$CC"; then
3870 if test -n "$ac_tool_prefix"; then
3871 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3872 set dummy ${ac_tool_prefix}cc; ac_word=$2
3873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3874 $as_echo_n "checking for $ac_word... " >&6; }
3875 if ${ac_cv_prog_CC+:} false; then :
3876 $as_echo_n "(cached) " >&6
3877 else
3878 if test -n "$CC"; then
3879 ac_cv_prog_CC="$CC" # Let the user override the test.
3880 else
3881 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3882 for as_dir in $PATH
3883 do
3884 IFS=$as_save_IFS
3885 test -z "$as_dir" && as_dir=.
3886 for ac_exec_ext in '' $ac_executable_extensions; do
3887 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3888 ac_cv_prog_CC="${ac_tool_prefix}cc"
3889 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3890 break 2
3891 fi
3892 done
3893 done
3894 IFS=$as_save_IFS
3895
3896 fi
3897 fi
3898 CC=$ac_cv_prog_CC
3899 if test -n "$CC"; then
3900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3901 $as_echo "$CC" >&6; }
3902 else
3903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3904 $as_echo "no" >&6; }
3905 fi
3906
3907
3908 fi
3909 fi
3910 if test -z "$CC"; then
3911 # Extract the first word of "cc", so it can be a program name with args.
3912 set dummy cc; ac_word=$2
3913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3914 $as_echo_n "checking for $ac_word... " >&6; }
3915 if ${ac_cv_prog_CC+:} false; then :
3916 $as_echo_n "(cached) " >&6
3917 else
3918 if test -n "$CC"; then
3919 ac_cv_prog_CC="$CC" # Let the user override the test.
3920 else
3921 ac_prog_rejected=no
3922 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3923 for as_dir in $PATH
3924 do
3925 IFS=$as_save_IFS
3926 test -z "$as_dir" && as_dir=.
3927 for ac_exec_ext in '' $ac_executable_extensions; do
3928 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3929 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3930 ac_prog_rejected=yes
3931 continue
3932 fi
3933 ac_cv_prog_CC="cc"
3934 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3935 break 2
3936 fi
3937 done
3938 done
3939 IFS=$as_save_IFS
3940
3941 if test $ac_prog_rejected = yes; then
3942 # We found a bogon in the path, so make sure we never use it.
3943 set dummy $ac_cv_prog_CC
3944 shift
3945 if test $# != 0; then
3946 # We chose a different compiler from the bogus one.
3947 # However, it has the same basename, so the bogon will be chosen
3948 # first if we set CC to just the basename; use the full file name.
3949 shift
3950 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3951 fi
3952 fi
3953 fi
3954 fi
3955 CC=$ac_cv_prog_CC
3956 if test -n "$CC"; then
3957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3958 $as_echo "$CC" >&6; }
3959 else
3960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3961 $as_echo "no" >&6; }
3962 fi
3963
3964
3965 fi
3966 if test -z "$CC"; then
3967 if test -n "$ac_tool_prefix"; then
3968 for ac_prog in cl.exe
3969 do
3970 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3971 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3973 $as_echo_n "checking for $ac_word... " >&6; }
3974 if ${ac_cv_prog_CC+:} false; then :
3975 $as_echo_n "(cached) " >&6
3976 else
3977 if test -n "$CC"; then
3978 ac_cv_prog_CC="$CC" # Let the user override the test.
3979 else
3980 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3981 for as_dir in $PATH
3982 do
3983 IFS=$as_save_IFS
3984 test -z "$as_dir" && as_dir=.
3985 for ac_exec_ext in '' $ac_executable_extensions; do
3986 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3987 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3988 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3989 break 2
3990 fi
3991 done
3992 done
3993 IFS=$as_save_IFS
3994
3995 fi
3996 fi
3997 CC=$ac_cv_prog_CC
3998 if test -n "$CC"; then
3999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4000 $as_echo "$CC" >&6; }
4001 else
4002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4003 $as_echo "no" >&6; }
4004 fi
4005
4006
4007 test -n "$CC" && break
4008 done
4009 fi
4010 if test -z "$CC"; then
4011 ac_ct_CC=$CC
4012 for ac_prog in cl.exe
4013 do
4014 # Extract the first word of "$ac_prog", so it can be a program name with args.
4015 set dummy $ac_prog; ac_word=$2
4016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4017 $as_echo_n "checking for $ac_word... " >&6; }
4018 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4019 $as_echo_n "(cached) " >&6
4020 else
4021 if test -n "$ac_ct_CC"; then
4022 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4023 else
4024 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4025 for as_dir in $PATH
4026 do
4027 IFS=$as_save_IFS
4028 test -z "$as_dir" && as_dir=.
4029 for ac_exec_ext in '' $ac_executable_extensions; do
4030 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4031 ac_cv_prog_ac_ct_CC="$ac_prog"
4032 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4033 break 2
4034 fi
4035 done
4036 done
4037 IFS=$as_save_IFS
4038
4039 fi
4040 fi
4041 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4042 if test -n "$ac_ct_CC"; then
4043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4044 $as_echo "$ac_ct_CC" >&6; }
4045 else
4046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4047 $as_echo "no" >&6; }
4048 fi
4049
4050
4051 test -n "$ac_ct_CC" && break
4052 done
4053
4054 if test "x$ac_ct_CC" = x; then
4055 CC=""
4056 else
4057 case $cross_compiling:$ac_tool_warned in
4058 yes:)
4059 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4060 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4061 ac_tool_warned=yes ;;
4062 esac
4063 CC=$ac_ct_CC
4064 fi
4065 fi
4066
4067 fi
4068 if test -z "$CC"; then
4069 if test -n "$ac_tool_prefix"; then
4070 # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
4071 set dummy ${ac_tool_prefix}clang; ac_word=$2
4072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4073 $as_echo_n "checking for $ac_word... " >&6; }
4074 if ${ac_cv_prog_CC+:} false; then :
4075 $as_echo_n "(cached) " >&6
4076 else
4077 if test -n "$CC"; then
4078 ac_cv_prog_CC="$CC" # Let the user override the test.
4079 else
4080 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4081 for as_dir in $PATH
4082 do
4083 IFS=$as_save_IFS
4084 test -z "$as_dir" && as_dir=.
4085 for ac_exec_ext in '' $ac_executable_extensions; do
4086 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4087 ac_cv_prog_CC="${ac_tool_prefix}clang"
4088 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4089 break 2
4090 fi
4091 done
4092 done
4093 IFS=$as_save_IFS
4094
4095 fi
4096 fi
4097 CC=$ac_cv_prog_CC
4098 if test -n "$CC"; then
4099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4100 $as_echo "$CC" >&6; }
4101 else
4102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4103 $as_echo "no" >&6; }
4104 fi
4105
4106
4107 fi
4108 if test -z "$ac_cv_prog_CC"; then
4109 ac_ct_CC=$CC
4110 # Extract the first word of "clang", so it can be a program name with args.
4111 set dummy clang; ac_word=$2
4112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4113 $as_echo_n "checking for $ac_word... " >&6; }
4114 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4115 $as_echo_n "(cached) " >&6
4116 else
4117 if test -n "$ac_ct_CC"; then
4118 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4119 else
4120 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4121 for as_dir in $PATH
4122 do
4123 IFS=$as_save_IFS
4124 test -z "$as_dir" && as_dir=.
4125 for ac_exec_ext in '' $ac_executable_extensions; do
4126 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4127 ac_cv_prog_ac_ct_CC="clang"
4128 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4129 break 2
4130 fi
4131 done
4132 done
4133 IFS=$as_save_IFS
4134
4135 fi
4136 fi
4137 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4138 if test -n "$ac_ct_CC"; then
4139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4140 $as_echo "$ac_ct_CC" >&6; }
4141 else
4142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4143 $as_echo "no" >&6; }
4144 fi
4145
4146 if test "x$ac_ct_CC" = x; then
4147 CC=""
4148 else
4149 case $cross_compiling:$ac_tool_warned in
4150 yes:)
4151 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4152 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4153 ac_tool_warned=yes ;;
4154 esac
4155 CC=$ac_ct_CC
4156 fi
4157 else
4158 CC="$ac_cv_prog_CC"
4159 fi
4160
4161 fi
4162
4163
4164 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4165 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4166 as_fn_error $? "no acceptable C compiler found in \$PATH
4167 See \`config.log' for more details" "$LINENO" 5; }
4168
4169 # Provide some information about the compiler.
4170 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4171 set X $ac_compile
4172 ac_compiler=$2
4173 for ac_option in --version -v -V -qversion -version; do
4174 { { ac_try="$ac_compiler $ac_option >&5"
4175 case "(($ac_try" in
4176 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4177 *) ac_try_echo=$ac_try;;
4178 esac
4179 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4180 $as_echo "$ac_try_echo"; } >&5
4181 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4182 ac_status=$?
4183 if test -s conftest.err; then
4184 sed '10a\
4185 ... rest of stderr output deleted ...
4186 10q' conftest.err >conftest.er1
4187 cat conftest.er1 >&5
4188 fi
4189 rm -f conftest.er1 conftest.err
4190 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4191 test $ac_status = 0; }
4192 done
4193
4194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4195 /* end confdefs.h. */
4196
4197 int
4198 main ()
4199 {
4200
4201 ;
4202 return 0;
4203 }
4204 _ACEOF
4205 ac_clean_files_save=$ac_clean_files
4206 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4207 # Try to create an executable without -o first, disregard a.out.
4208 # It will help us diagnose broken compilers, and finding out an intuition
4209 # of exeext.
4210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4211 $as_echo_n "checking whether the C compiler works... " >&6; }
4212 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4213
4214 # The possible output files:
4215 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4216
4217 ac_rmfiles=
4218 for ac_file in $ac_files
4219 do
4220 case $ac_file in
4221 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4222 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4223 esac
4224 done
4225 rm -f $ac_rmfiles
4226
4227 if { { ac_try="$ac_link_default"
4228 case "(($ac_try" in
4229 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4230 *) ac_try_echo=$ac_try;;
4231 esac
4232 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4233 $as_echo "$ac_try_echo"; } >&5
4234 (eval "$ac_link_default") 2>&5
4235 ac_status=$?
4236 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4237 test $ac_status = 0; }; then :
4238 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4239 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4240 # in a Makefile. We should not override ac_cv_exeext if it was cached,
4241 # so that the user can short-circuit this test for compilers unknown to
4242 # Autoconf.
4243 for ac_file in $ac_files ''
4244 do
4245 test -f "$ac_file" || continue
4246 case $ac_file in
4247 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4248 ;;
4249 [ab].out )
4250 # We found the default executable, but exeext='' is most
4251 # certainly right.
4252 break;;
4253 *.* )
4254 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4255 then :; else
4256 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4257 fi
4258 # We set ac_cv_exeext here because the later test for it is not
4259 # safe: cross compilers may not add the suffix if given an `-o'
4260 # argument, so we may need to know it at that point already.
4261 # Even if this section looks crufty: it has the advantage of
4262 # actually working.
4263 break;;
4264 * )
4265 break;;
4266 esac
4267 done
4268 test "$ac_cv_exeext" = no && ac_cv_exeext=
4269
4270 else
4271 ac_file=''
4272 fi
4273 if test -z "$ac_file"; then :
4274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4275 $as_echo "no" >&6; }
4276 $as_echo "$as_me: failed program was:" >&5
4277 sed 's/^/| /' conftest.$ac_ext >&5
4278
4279 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4280 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4281 as_fn_error 77 "C compiler cannot create executables
4282 See \`config.log' for more details" "$LINENO" 5; }
4283 else
4284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4285 $as_echo "yes" >&6; }
4286 fi
4287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4288 $as_echo_n "checking for C compiler default output file name... " >&6; }
4289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4290 $as_echo "$ac_file" >&6; }
4291 ac_exeext=$ac_cv_exeext
4292
4293 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4294 ac_clean_files=$ac_clean_files_save
4295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4296 $as_echo_n "checking for suffix of executables... " >&6; }
4297 if { { ac_try="$ac_link"
4298 case "(($ac_try" in
4299 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4300 *) ac_try_echo=$ac_try;;
4301 esac
4302 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4303 $as_echo "$ac_try_echo"; } >&5
4304 (eval "$ac_link") 2>&5
4305 ac_status=$?
4306 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4307 test $ac_status = 0; }; then :
4308 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4309 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4310 # work properly (i.e., refer to `conftest.exe'), while it won't with
4311 # `rm'.
4312 for ac_file in conftest.exe conftest conftest.*; do
4313 test -f "$ac_file" || continue
4314 case $ac_file in
4315 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4316 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4317 break;;
4318 * ) break;;
4319 esac
4320 done
4321 else
4322 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4323 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4324 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4325 See \`config.log' for more details" "$LINENO" 5; }
4326 fi
4327 rm -f conftest conftest$ac_cv_exeext
4328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4329 $as_echo "$ac_cv_exeext" >&6; }
4330
4331 rm -f conftest.$ac_ext
4332 EXEEXT=$ac_cv_exeext
4333 ac_exeext=$EXEEXT
4334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4335 /* end confdefs.h. */
4336 #include <stdio.h>
4337 int
4338 main ()
4339 {
4340 FILE *f = fopen ("conftest.out", "w");
4341 return ferror (f) || fclose (f) != 0;
4342
4343 ;
4344 return 0;
4345 }
4346 _ACEOF
4347 ac_clean_files="$ac_clean_files conftest.out"
4348 # Check that the compiler produces executables we can run. If not, either
4349 # the compiler is broken, or we cross compile.
4350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4351 $as_echo_n "checking whether we are cross compiling... " >&6; }
4352 if test "$cross_compiling" != yes; then
4353 { { ac_try="$ac_link"
4354 case "(($ac_try" in
4355 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4356 *) ac_try_echo=$ac_try;;
4357 esac
4358 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4359 $as_echo "$ac_try_echo"; } >&5
4360 (eval "$ac_link") 2>&5
4361 ac_status=$?
4362 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4363 test $ac_status = 0; }
4364 if { ac_try='./conftest$ac_cv_exeext'
4365 { { case "(($ac_try" in
4366 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4367 *) ac_try_echo=$ac_try;;
4368 esac
4369 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4370 $as_echo "$ac_try_echo"; } >&5
4371 (eval "$ac_try") 2>&5
4372 ac_status=$?
4373 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4374 test $ac_status = 0; }; }; then
4375 cross_compiling=no
4376 else
4377 if test "$cross_compiling" = maybe; then
4378 cross_compiling=yes
4379 else
4380 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4381 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4382 as_fn_error $? "cannot run C compiled programs.
4383 If you meant to cross compile, use \`--host'.
4384 See \`config.log' for more details" "$LINENO" 5; }
4385 fi
4386 fi
4387 fi
4388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4389 $as_echo "$cross_compiling" >&6; }
4390
4391 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4392 ac_clean_files=$ac_clean_files_save
4393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4394 $as_echo_n "checking for suffix of object files... " >&6; }
4395 if ${ac_cv_objext+:} false; then :
4396 $as_echo_n "(cached) " >&6
4397 else
4398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4399 /* end confdefs.h. */
4400
4401 int
4402 main ()
4403 {
4404
4405 ;
4406 return 0;
4407 }
4408 _ACEOF
4409 rm -f conftest.o conftest.obj
4410 if { { ac_try="$ac_compile"
4411 case "(($ac_try" in
4412 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4413 *) ac_try_echo=$ac_try;;
4414 esac
4415 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4416 $as_echo "$ac_try_echo"; } >&5
4417 (eval "$ac_compile") 2>&5
4418 ac_status=$?
4419 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4420 test $ac_status = 0; }; then :
4421 for ac_file in conftest.o conftest.obj conftest.*; do
4422 test -f "$ac_file" || continue;
4423 case $ac_file in
4424 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4425 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4426 break;;
4427 esac
4428 done
4429 else
4430 $as_echo "$as_me: failed program was:" >&5
4431 sed 's/^/| /' conftest.$ac_ext >&5
4432
4433 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4434 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4435 as_fn_error $? "cannot compute suffix of object files: cannot compile
4436 See \`config.log' for more details" "$LINENO" 5; }
4437 fi
4438 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4439 fi
4440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4441 $as_echo "$ac_cv_objext" >&6; }
4442 OBJEXT=$ac_cv_objext
4443 ac_objext=$OBJEXT
4444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4445 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4446 if ${ac_cv_c_compiler_gnu+:} false; then :
4447 $as_echo_n "(cached) " >&6
4448 else
4449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4450 /* end confdefs.h. */
4451
4452 int
4453 main ()
4454 {
4455 #ifndef __GNUC__
4456 choke me
4457 #endif
4458
4459 ;
4460 return 0;
4461 }
4462 _ACEOF
4463 if ac_fn_c_try_compile "$LINENO"; then :
4464 ac_compiler_gnu=yes
4465 else
4466 ac_compiler_gnu=no
4467 fi
4468 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4469 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4470
4471 fi
4472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4473 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4474 if test $ac_compiler_gnu = yes; then
4475 GCC=yes
4476 else
4477 GCC=
4478 fi
4479 ac_test_CFLAGS=${CFLAGS+set}
4480 ac_save_CFLAGS=$CFLAGS
4481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4482 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4483 if ${ac_cv_prog_cc_g+:} false; then :
4484 $as_echo_n "(cached) " >&6
4485 else
4486 ac_save_c_werror_flag=$ac_c_werror_flag
4487 ac_c_werror_flag=yes
4488 ac_cv_prog_cc_g=no
4489 CFLAGS="-g"
4490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4491 /* end confdefs.h. */
4492
4493 int
4494 main ()
4495 {
4496
4497 ;
4498 return 0;
4499 }
4500 _ACEOF
4501 if ac_fn_c_try_compile "$LINENO"; then :
4502 ac_cv_prog_cc_g=yes
4503 else
4504 CFLAGS=""
4505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4506 /* end confdefs.h. */
4507
4508 int
4509 main ()
4510 {
4511
4512 ;
4513 return 0;
4514 }
4515 _ACEOF
4516 if ac_fn_c_try_compile "$LINENO"; then :
4517
4518 else
4519 ac_c_werror_flag=$ac_save_c_werror_flag
4520 CFLAGS="-g"
4521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4522 /* end confdefs.h. */
4523
4524 int
4525 main ()
4526 {
4527
4528 ;
4529 return 0;
4530 }
4531 _ACEOF
4532 if ac_fn_c_try_compile "$LINENO"; then :
4533 ac_cv_prog_cc_g=yes
4534 fi
4535 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4536 fi
4537 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4538 fi
4539 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4540 ac_c_werror_flag=$ac_save_c_werror_flag
4541 fi
4542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4543 $as_echo "$ac_cv_prog_cc_g" >&6; }
4544 if test "$ac_test_CFLAGS" = set; then
4545 CFLAGS=$ac_save_CFLAGS
4546 elif test $ac_cv_prog_cc_g = yes; then
4547 if test "$GCC" = yes; then
4548 CFLAGS="-g -O2"
4549 else
4550 CFLAGS="-g"
4551 fi
4552 else
4553 if test "$GCC" = yes; then
4554 CFLAGS="-O2"
4555 else
4556 CFLAGS=
4557 fi
4558 fi
4559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
4560 $as_echo_n "checking for $CC option to enable C11 features... " >&6; }
4561 if ${ac_cv_prog_cc_c11+:} false; then :
4562 $as_echo_n "(cached) " >&6
4563 else
4564 ac_cv_prog_cc_c11=no
4565 ac_save_CC=$CC
4566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4567 /* end confdefs.h. */
4568 #include <stdarg.h>
4569 #include <stdbool.h>
4570 #include <stddef.h>
4571 #include <stdlib.h>
4572 #include <wchar.h>
4573 #include <stdio.h>
4574
4575 // Check varargs macros. These examples are taken from C99 6.10.3.5.
4576 #define debug(...) fprintf (stderr, __VA_ARGS__)
4577 #define showlist(...) puts (#__VA_ARGS__)
4578 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4579 static void
4580 test_varargs_macros (void)
4581 {
4582 int x = 1234;
4583 int y = 5678;
4584 debug ("Flag");
4585 debug ("X = %d\n", x);
4586 showlist (The first, second, and third items.);
4587 report (x>y, "x is %d but y is %d", x, y);
4588 }
4589
4590 // Check long long types.
4591 #define BIG64 18446744073709551615ull
4592 #define BIG32 4294967295ul
4593 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4594 #if !BIG_OK
4595 your preprocessor is broken;
4596 #endif
4597 #if BIG_OK
4598 #else
4599 your preprocessor is broken;
4600 #endif
4601 static long long int bignum = -9223372036854775807LL;
4602 static unsigned long long int ubignum = BIG64;
4603
4604 struct incomplete_array
4605 {
4606 int datasize;
4607 double data[];
4608 };
4609
4610 struct named_init {
4611 int number;
4612 const wchar_t *name;
4613 double average;
4614 };
4615
4616 typedef const char *ccp;
4617
4618 static inline int
4619 test_restrict (ccp restrict text)
4620 {
4621 // See if C++-style comments work.
4622 // Iterate through items via the restricted pointer.
4623 // Also check for declarations in for loops.
4624 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4625 continue;
4626 return 0;
4627 }
4628
4629 // Check varargs and va_copy.
4630 static bool
4631 test_varargs (const char *format, ...)
4632 {
4633 va_list args;
4634 va_start (args, format);
4635 va_list args_copy;
4636 va_copy (args_copy, args);
4637
4638 const char *str = "";
4639 int number = 0;
4640 float fnumber = 0;
4641
4642 while (*format)
4643 {
4644 switch (*format++)
4645 {
4646 case 's': // string
4647 str = va_arg (args_copy, const char *);
4648 break;
4649 case 'd': // int
4650 number = va_arg (args_copy, int);
4651 break;
4652 case 'f': // float
4653 fnumber = va_arg (args_copy, double);
4654 break;
4655 default:
4656 break;
4657 }
4658 }
4659 va_end (args_copy);
4660 va_end (args);
4661
4662 return *str && number && fnumber;
4663 }
4664 // Check _Alignas.
4665 char _Alignas (double) aligned_as_double;
4666 char _Alignas (0) no_special_alignment;
4667 extern char aligned_as_int;
4668 char _Alignas (0) _Alignas (int) aligned_as_int;
4669
4670 // Check _Alignof.
4671 enum
4672 {
4673 int_alignment = _Alignof (int),
4674 int_array_alignment = _Alignof (int[100]),
4675 char_alignment = _Alignof (char)
4676 };
4677 _Static_assert (0 < -_Alignof (int), "_Alignof is signed");
4678
4679 // Check _Noreturn.
4680 int _Noreturn does_not_return (void) { for (;;) continue; }
4681
4682 // Check _Static_assert.
4683 struct test_static_assert
4684 {
4685 int x;
4686 _Static_assert (sizeof (int) <= sizeof (long int),
4687 "_Static_assert does not work in struct");
4688 long int y;
4689 };
4690
4691 // Check UTF-8 literals.
4692 #define u8 syntax error!
4693 char const utf8_literal[] = u8"happens to be ASCII" "another string";
4694
4695 // Check duplicate typedefs.
4696 typedef long *long_ptr;
4697 typedef long int *long_ptr;
4698 typedef long_ptr long_ptr;
4699
4700 // Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
4701 struct anonymous
4702 {
4703 union {
4704 struct { int i; int j; };
4705 struct { int k; long int l; } w;
4706 };
4707 int m;
4708 } v1;
4709
4710 int
4711 main ()
4712 {
4713
4714 // Check bool.
4715 _Bool success = false;
4716
4717 // Check restrict.
4718 if (test_restrict ("String literal") == 0)
4719 success = true;
4720 char *restrict newvar = "Another string";
4721
4722 // Check varargs.
4723 success &= test_varargs ("s, d' f .", "string", 65, 34.234);
4724 test_varargs_macros ();
4725
4726 // Check flexible array members.
4727 struct incomplete_array *ia =
4728 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4729 ia->datasize = 10;
4730 for (int i = 0; i < ia->datasize; ++i)
4731 ia->data[i] = i * 1.234;
4732
4733 // Check named initializers.
4734 struct named_init ni = {
4735 .number = 34,
4736 .name = L"Test wide string",
4737 .average = 543.34343,
4738 };
4739
4740 ni.number = 58;
4741
4742 int dynamic_array[ni.number];
4743 dynamic_array[ni.number - 1] = 543;
4744
4745 // work around unused variable warnings
4746 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
4747 || dynamic_array[ni.number - 1] != 543);
4748
4749 v1.i = 2;
4750 v1.w.k = 5;
4751 _Static_assert ((offsetof (struct anonymous, i)
4752 == offsetof (struct anonymous, w.k)),
4753 "Anonymous union alignment botch");
4754
4755 ;
4756 return 0;
4757 }
4758 _ACEOF
4759 for ac_arg in '' -std=gnu11
4760 do
4761 CC="$ac_save_CC $ac_arg"
4762 if ac_fn_c_try_compile "$LINENO"; then :
4763 ac_cv_prog_cc_c11=$ac_arg
4764 fi
4765 rm -f core conftest.err conftest.$ac_objext
4766 test "x$ac_cv_prog_cc_c11" != "xno" && break
4767 done
4768 rm -f conftest.$ac_ext
4769 CC=$ac_save_CC
4770
4771 fi
4772 # AC_CACHE_VAL
4773 ac_prog_cc_stdc_options=
4774 case "x$ac_cv_prog_cc_c11" in
4775 x)
4776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4777 $as_echo "none needed" >&6; } ;;
4778 xno)
4779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4780 $as_echo "unsupported" >&6; } ;;
4781 *)
4782 ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c11"
4783 CC=$CC$ac_prog_cc_stdc_options
4784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
4785 $as_echo "$ac_cv_prog_cc_c11" >&6; } ;;
4786 esac
4787 if test "x$ac_cv_prog_cc_c11" != xno; then :
4788 ac_prog_cc_stdc=c11
4789 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
4790 else
4791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
4792 $as_echo_n "checking for $CC option to enable C99 features... " >&6; }
4793 if ${ac_cv_prog_cc_c99+:} false; then :
4794 $as_echo_n "(cached) " >&6
4795 else
4796 ac_cv_prog_cc_c99=no
4797 ac_save_CC=$CC
4798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4799 /* end confdefs.h. */
4800 #include <stdarg.h>
4801 #include <stdbool.h>
4802 #include <stddef.h>
4803 #include <stdlib.h>
4804 #include <wchar.h>
4805 #include <stdio.h>
4806
4807 // Check varargs macros. These examples are taken from C99 6.10.3.5.
4808 #define debug(...) fprintf (stderr, __VA_ARGS__)
4809 #define showlist(...) puts (#__VA_ARGS__)
4810 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4811 static void
4812 test_varargs_macros (void)
4813 {
4814 int x = 1234;
4815 int y = 5678;
4816 debug ("Flag");
4817 debug ("X = %d\n", x);
4818 showlist (The first, second, and third items.);
4819 report (x>y, "x is %d but y is %d", x, y);
4820 }
4821
4822 // Check long long types.
4823 #define BIG64 18446744073709551615ull
4824 #define BIG32 4294967295ul
4825 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4826 #if !BIG_OK
4827 your preprocessor is broken;
4828 #endif
4829 #if BIG_OK
4830 #else
4831 your preprocessor is broken;
4832 #endif
4833 static long long int bignum = -9223372036854775807LL;
4834 static unsigned long long int ubignum = BIG64;
4835
4836 struct incomplete_array
4837 {
4838 int datasize;
4839 double data[];
4840 };
4841
4842 struct named_init {
4843 int number;
4844 const wchar_t *name;
4845 double average;
4846 };
4847
4848 typedef const char *ccp;
4849
4850 static inline int
4851 test_restrict (ccp restrict text)
4852 {
4853 // See if C++-style comments work.
4854 // Iterate through items via the restricted pointer.
4855 // Also check for declarations in for loops.
4856 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4857 continue;
4858 return 0;
4859 }
4860
4861 // Check varargs and va_copy.
4862 static bool
4863 test_varargs (const char *format, ...)
4864 {
4865 va_list args;
4866 va_start (args, format);
4867 va_list args_copy;
4868 va_copy (args_copy, args);
4869
4870 const char *str = "";
4871 int number = 0;
4872 float fnumber = 0;
4873
4874 while (*format)
4875 {
4876 switch (*format++)
4877 {
4878 case 's': // string
4879 str = va_arg (args_copy, const char *);
4880 break;
4881 case 'd': // int
4882 number = va_arg (args_copy, int);
4883 break;
4884 case 'f': // float
4885 fnumber = va_arg (args_copy, double);
4886 break;
4887 default:
4888 break;
4889 }
4890 }
4891 va_end (args_copy);
4892 va_end (args);
4893
4894 return *str && number && fnumber;
4895 }
4896 int
4897 main ()
4898 {
4899
4900 // Check bool.
4901 _Bool success = false;
4902
4903 // Check restrict.
4904 if (test_restrict ("String literal") == 0)
4905 success = true;
4906 char *restrict newvar = "Another string";
4907
4908 // Check varargs.
4909 success &= test_varargs ("s, d' f .", "string", 65, 34.234);
4910 test_varargs_macros ();
4911
4912 // Check flexible array members.
4913 struct incomplete_array *ia =
4914 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4915 ia->datasize = 10;
4916 for (int i = 0; i < ia->datasize; ++i)
4917 ia->data[i] = i * 1.234;
4918
4919 // Check named initializers.
4920 struct named_init ni = {
4921 .number = 34,
4922 .name = L"Test wide string",
4923 .average = 543.34343,
4924 };
4925
4926 ni.number = 58;
4927
4928 int dynamic_array[ni.number];
4929 dynamic_array[ni.number - 1] = 543;
4930
4931 // work around unused variable warnings
4932 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
4933 || dynamic_array[ni.number - 1] != 543);
4934
4935 ;
4936 return 0;
4937 }
4938 _ACEOF
4939 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc1x -qlanglvl=extc99
4940 do
4941 CC="$ac_save_CC $ac_arg"
4942 if ac_fn_c_try_compile "$LINENO"; then :
4943 ac_cv_prog_cc_c99=$ac_arg
4944 fi
4945 rm -f core conftest.err conftest.$ac_objext
4946 test "x$ac_cv_prog_cc_c99" != "xno" && break
4947 done
4948 rm -f conftest.$ac_ext
4949 CC=$ac_save_CC
4950
4951 fi
4952 # AC_CACHE_VAL
4953 ac_prog_cc_stdc_options=
4954 case "x$ac_cv_prog_cc_c99" in
4955 x)
4956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4957 $as_echo "none needed" >&6; } ;;
4958 xno)
4959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4960 $as_echo "unsupported" >&6; } ;;
4961 *)
4962 ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c99"
4963 CC=$CC$ac_prog_cc_stdc_options
4964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4965 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
4966 esac
4967 if test "x$ac_cv_prog_cc_c99" != xno; then :
4968 ac_prog_cc_stdc=c99
4969 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
4970 else
4971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
4972 $as_echo_n "checking for $CC option to enable C89 features... " >&6; }
4973 if ${ac_cv_prog_cc_c89+:} false; then :
4974 $as_echo_n "(cached) " >&6
4975 else
4976 ac_cv_prog_cc_c89=no
4977 ac_save_CC=$CC
4978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4979 /* end confdefs.h. */
4980 #include <stdarg.h>
4981 #include <stdio.h>
4982 struct stat;
4983 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4984 struct buf { int x; };
4985 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4986 static char *e (p, i)
4987 char **p;
4988 int i;
4989 {
4990 return p[i];
4991 }
4992 static char *f (char * (*g) (char **, int), char **p, ...)
4993 {
4994 char *s;
4995 va_list v;
4996 va_start (v,p);
4997 s = g (p, va_arg (v,int));
4998 va_end (v);
4999 return s;
5000 }
5001
5002 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
5003 function prototypes and stuff, but not '\xHH' hex character constants.
5004 These don't provoke an error unfortunately, instead are silently treated
5005 as 'x'. The following induces an error, until -std is added to get
5006 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
5007 array size at least. It's necessary to write '\x00'==0 to get something
5008 that's true only with -std. */
5009 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5010
5011 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5012 inside strings and character constants. */
5013 #define FOO(x) 'x'
5014 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5015
5016 int test (int i, double x);
5017 struct s1 {int (*f) (int a);};
5018 struct s2 {int (*f) (double a);};
5019 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5020 int argc;
5021 char **argv;
5022 int
5023 main ()
5024 {
5025 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5026 ;
5027 return 0;
5028 }
5029 _ACEOF
5030 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5031 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5032 do
5033 CC="$ac_save_CC $ac_arg"
5034 if ac_fn_c_try_compile "$LINENO"; then :
5035 ac_cv_prog_cc_c89=$ac_arg
5036 fi
5037 rm -f core conftest.err conftest.$ac_objext
5038 test "x$ac_cv_prog_cc_c89" != "xno" && break
5039 done
5040 rm -f conftest.$ac_ext
5041 CC=$ac_save_CC
5042
5043 fi
5044 # AC_CACHE_VAL
5045 ac_prog_cc_stdc_options=
5046 case "x$ac_cv_prog_cc_c89" in
5047 x)
5048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5049 $as_echo "none needed" >&6; } ;;
5050 xno)
5051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5052 $as_echo "unsupported" >&6; } ;;
5053 *)
5054 ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c89"
5055 CC=$CC$ac_prog_cc_stdc_options
5056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5057 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5058 esac
5059 if test "x$ac_cv_prog_cc_c89" != xno; then :
5060 ac_prog_cc_stdc=c89
5061 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
5062 else
5063 ac_prog_cc_stdc=no
5064 ac_cv_prog_cc_stdc=no
5065 fi
5066
5067 fi
5068
5069 fi
5070
5071 ac_ext=c
5072 ac_cpp='$CPP $CPPFLAGS'
5073 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5074 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5075 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5076
5077
5078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler is clang" >&5
5079 $as_echo_n "checking whether the compiler is clang... " >&6; }
5080 if ${gl_cv_compiler_clang+:} false; then :
5081 $as_echo_n "(cached) " >&6
5082 else
5083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5084 /* end confdefs.h. */
5085
5086 #ifdef __clang__
5087 barfbarf
5088 #endif
5089
5090 int
5091 main ()
5092 {
5093
5094 ;
5095 return 0;
5096 }
5097
5098 _ACEOF
5099 if ac_fn_c_try_compile "$LINENO"; then :
5100 gl_cv_compiler_clang=no
5101 else
5102 gl_cv_compiler_clang=yes
5103 fi
5104 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5105
5106 fi
5107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_clang" >&5
5108 $as_echo "$gl_cv_compiler_clang" >&6; }
5109
5110
5111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler option needed when checking for declarations" >&5
5112 $as_echo_n "checking for compiler option needed when checking for declarations... " >&6; }
5113 if ${gl_cv_compiler_check_decl_option+:} false; then :
5114 $as_echo_n "(cached) " >&6
5115 else
5116 if test $gl_cv_compiler_clang = yes; then
5117 save_ac_compile="$ac_compile"
5118 ac_compile="$ac_compile -Werror=implicit-function-declaration"
5119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5120 /* end confdefs.h. */
5121
5122 int
5123 main ()
5124 {
5125
5126 ;
5127 return 0;
5128 }
5129 _ACEOF
5130 if ac_fn_c_try_compile "$LINENO"; then :
5131 gl_cv_compiler_check_decl_option='-Werror=implicit-function-declaration'
5132 else
5133 gl_cv_compiler_check_decl_option=none
5134 fi
5135 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5136 ac_compile="$save_ac_compile"
5137 else
5138 gl_cv_compiler_check_decl_option=none
5139 fi
5140
5141 fi
5142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_check_decl_option" >&5
5143 $as_echo "$gl_cv_compiler_check_decl_option" >&6; }
5144 if test "x$gl_cv_compiler_check_decl_option" != xnone; then
5145 ac_compile_for_check_decl="$ac_compile $gl_cv_compiler_check_decl_option"
5146 else
5147 ac_compile_for_check_decl="$ac_compile"
5148 fi
5149
5150
5151
5152 ac_ext=c
5153 ac_cpp='$CPP $CPPFLAGS'
5154 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5155 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5156 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5158 $as_echo_n "checking how to run the C preprocessor... " >&6; }
5159 # On Suns, sometimes $CPP names a directory.
5160 if test -n "$CPP" && test -d "$CPP"; then
5161 CPP=
5162 fi
5163 if test -z "$CPP"; then
5164 if ${ac_cv_prog_CPP+:} false; then :
5165 $as_echo_n "(cached) " >&6
5166 else
5167 # Double quotes because CPP needs to be expanded
5168 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5169 do
5170 ac_preproc_ok=false
5171 for ac_c_preproc_warn_flag in '' yes
5172 do
5173 # Use a header file that comes with gcc, so configuring glibc
5174 # with a fresh cross-compiler works.
5175 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5176 # <limits.h> exists even on freestanding compilers.
5177 # On the NeXT, cc -E runs the code through the compiler's parser,
5178 # not just through cpp. "Syntax error" is here to catch this case.
5179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5180 /* end confdefs.h. */
5181 #ifdef __STDC__
5182 # include <limits.h>
5183 #else
5184 # include <assert.h>
5185 #endif
5186 Syntax error
5187 _ACEOF
5188 if ac_fn_c_try_cpp "$LINENO"; then :
5189
5190 else
5191 # Broken: fails on valid input.
5192 continue
5193 fi
5194 rm -f conftest.err conftest.i conftest.$ac_ext
5195
5196 # OK, works on sane cases. Now check whether nonexistent headers
5197 # can be detected and how.
5198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5199 /* end confdefs.h. */
5200 #include <ac_nonexistent.h>
5201 _ACEOF
5202 if ac_fn_c_try_cpp "$LINENO"; then :
5203 # Broken: success on invalid input.
5204 continue
5205 else
5206 # Passes both tests.
5207 ac_preproc_ok=:
5208 break
5209 fi
5210 rm -f conftest.err conftest.i conftest.$ac_ext
5211
5212 done
5213 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5214 rm -f conftest.i conftest.err conftest.$ac_ext
5215 if $ac_preproc_ok; then :
5216 break
5217 fi
5218
5219 done
5220 ac_cv_prog_CPP=$CPP
5221
5222 fi
5223 CPP=$ac_cv_prog_CPP
5224 else
5225 ac_cv_prog_CPP=$CPP
5226 fi
5227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5228 $as_echo "$CPP" >&6; }
5229 ac_preproc_ok=false
5230 for ac_c_preproc_warn_flag in '' yes
5231 do
5232 # Use a header file that comes with gcc, so configuring glibc
5233 # with a fresh cross-compiler works.
5234 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5235 # <limits.h> exists even on freestanding compilers.
5236 # On the NeXT, cc -E runs the code through the compiler's parser,
5237 # not just through cpp. "Syntax error" is here to catch this case.
5238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5239 /* end confdefs.h. */
5240 #ifdef __STDC__
5241 # include <limits.h>
5242 #else
5243 # include <assert.h>
5244 #endif
5245 Syntax error
5246 _ACEOF
5247 if ac_fn_c_try_cpp "$LINENO"; then :
5248
5249 else
5250 # Broken: fails on valid input.
5251 continue
5252 fi
5253 rm -f conftest.err conftest.i conftest.$ac_ext
5254
5255 # OK, works on sane cases. Now check whether nonexistent headers
5256 # can be detected and how.
5257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5258 /* end confdefs.h. */
5259 #include <ac_nonexistent.h>
5260 _ACEOF
5261 if ac_fn_c_try_cpp "$LINENO"; then :
5262 # Broken: success on invalid input.
5263 continue
5264 else
5265 # Passes both tests.
5266 ac_preproc_ok=:
5267 break
5268 fi
5269 rm -f conftest.err conftest.i conftest.$ac_ext
5270
5271 done
5272 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5273 rm -f conftest.i conftest.err conftest.$ac_ext
5274 if $ac_preproc_ok; then :
5275
5276 else
5277 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5278 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5279 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5280 See \`config.log' for more details" "$LINENO" 5; }
5281 fi
5282
5283 ac_ext=c
5284 ac_cpp='$CPP $CPPFLAGS'
5285 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5286 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5287 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5288
5289
5290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5291 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5292 if ${ac_cv_path_GREP+:} false; then :
5293 $as_echo_n "(cached) " >&6
5294 else
5295 if test -z "$GREP"; then
5296 ac_path_GREP_found=false
5297 # Loop through the user's path and test for each of PROGNAME-LIST
5298 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5299 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5300 do
5301 IFS=$as_save_IFS
5302 test -z "$as_dir" && as_dir=.
5303 for ac_prog in grep ggrep; do
5304 for ac_exec_ext in '' $ac_executable_extensions; do
5305 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5306 as_fn_executable_p "$ac_path_GREP" || continue
5307 # Check for GNU ac_path_GREP and select it if it is found.
5308 # Check for GNU $ac_path_GREP
5309 case `"$ac_path_GREP" --version 2>&1` in
5310 *GNU*)
5311 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5312 *)
5313 ac_count=0
5314 $as_echo_n 0123456789 >"conftest.in"
5315 while :
5316 do
5317 cat "conftest.in" "conftest.in" >"conftest.tmp"
5318 mv "conftest.tmp" "conftest.in"
5319 cp "conftest.in" "conftest.nl"
5320 $as_echo 'GREP' >> "conftest.nl"
5321 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5322 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5323 as_fn_arith $ac_count + 1 && ac_count=$as_val
5324 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5325 # Best one so far, save it but keep looking for a better one
5326 ac_cv_path_GREP="$ac_path_GREP"
5327 ac_path_GREP_max=$ac_count
5328 fi
5329 # 10*(2^10) chars as input seems more than enough
5330 test $ac_count -gt 10 && break
5331 done
5332 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5333 esac
5334
5335 $ac_path_GREP_found && break 3
5336 done
5337 done
5338 done
5339 IFS=$as_save_IFS
5340 if test -z "$ac_cv_path_GREP"; then
5341 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5342 fi
5343 else
5344 ac_cv_path_GREP=$GREP
5345 fi
5346
5347 fi
5348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5349 $as_echo "$ac_cv_path_GREP" >&6; }
5350 GREP="$ac_cv_path_GREP"
5351
5352
5353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5354 $as_echo_n "checking for egrep... " >&6; }
5355 if ${ac_cv_path_EGREP+:} false; then :
5356 $as_echo_n "(cached) " >&6
5357 else
5358 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5359 then ac_cv_path_EGREP="$GREP -E"
5360 else
5361 if test -z "$EGREP"; then
5362 ac_path_EGREP_found=false
5363 # Loop through the user's path and test for each of PROGNAME-LIST
5364 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5365 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5366 do
5367 IFS=$as_save_IFS
5368 test -z "$as_dir" && as_dir=.
5369 for ac_prog in egrep; do
5370 for ac_exec_ext in '' $ac_executable_extensions; do
5371 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5372 as_fn_executable_p "$ac_path_EGREP" || continue
5373 # Check for GNU ac_path_EGREP and select it if it is found.
5374 # Check for GNU $ac_path_EGREP
5375 case `"$ac_path_EGREP" --version 2>&1` in
5376 *GNU*)
5377 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5378 *)
5379 ac_count=0
5380 $as_echo_n 0123456789 >"conftest.in"
5381 while :
5382 do
5383 cat "conftest.in" "conftest.in" >"conftest.tmp"
5384 mv "conftest.tmp" "conftest.in"
5385 cp "conftest.in" "conftest.nl"
5386 $as_echo 'EGREP' >> "conftest.nl"
5387 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5388 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5389 as_fn_arith $ac_count + 1 && ac_count=$as_val
5390 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5391 # Best one so far, save it but keep looking for a better one
5392 ac_cv_path_EGREP="$ac_path_EGREP"
5393 ac_path_EGREP_max=$ac_count
5394 fi
5395 # 10*(2^10) chars as input seems more than enough
5396 test $ac_count -gt 10 && break
5397 done
5398 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5399 esac
5400
5401 $ac_path_EGREP_found && break 3
5402 done
5403 done
5404 done
5405 IFS=$as_save_IFS
5406 if test -z "$ac_cv_path_EGREP"; then
5407 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5408 fi
5409 else
5410 ac_cv_path_EGREP=$EGREP
5411 fi
5412
5413 fi
5414 fi
5415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5416 $as_echo "$ac_cv_path_EGREP" >&6; }
5417 EGREP="$ac_cv_path_EGREP"
5418
5419
5420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5421 $as_echo_n "checking for ANSI C header files... " >&6; }
5422 if ${ac_cv_header_stdc+:} false; then :
5423 $as_echo_n "(cached) " >&6
5424 else
5425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5426 /* end confdefs.h. */
5427 #include <stdlib.h>
5428 #include <stdarg.h>
5429 #include <string.h>
5430 #include <float.h>
5431
5432 int
5433 main ()
5434 {
5435
5436 ;
5437 return 0;
5438 }
5439 _ACEOF
5440 if ac_fn_c_try_compile "$LINENO"; then :
5441 ac_cv_header_stdc=yes
5442 else
5443 ac_cv_header_stdc=no
5444 fi
5445 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5446
5447 if test $ac_cv_header_stdc = yes; then
5448 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5450 /* end confdefs.h. */
5451 #include <string.h>
5452
5453 _ACEOF
5454 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5455 $EGREP "memchr" >/dev/null 2>&1; then :
5456
5457 else
5458 ac_cv_header_stdc=no
5459 fi
5460 rm -f conftest*
5461
5462 fi
5463
5464 if test $ac_cv_header_stdc = yes; then
5465 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5467 /* end confdefs.h. */
5468 #include <stdlib.h>
5469
5470 _ACEOF
5471 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5472 $EGREP "free" >/dev/null 2>&1; then :
5473
5474 else
5475 ac_cv_header_stdc=no
5476 fi
5477 rm -f conftest*
5478
5479 fi
5480
5481 if test $ac_cv_header_stdc = yes; then
5482 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5483 if test "$cross_compiling" = yes; then :
5484 :
5485 else
5486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5487 /* end confdefs.h. */
5488 #include <ctype.h>
5489 #include <stdlib.h>
5490 #if ((' ' & 0x0FF) == 0x020)
5491 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5492 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5493 #else
5494 # define ISLOWER(c) \
5495 (('a' <= (c) && (c) <= 'i') \
5496 || ('j' <= (c) && (c) <= 'r') \
5497 || ('s' <= (c) && (c) <= 'z'))
5498 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5499 #endif
5500
5501 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5502 int
5503 main ()
5504 {
5505 int i;
5506 for (i = 0; i < 256; i++)
5507 if (XOR (islower (i), ISLOWER (i))
5508 || toupper (i) != TOUPPER (i))
5509 return 2;
5510 return 0;
5511 }
5512 _ACEOF
5513 if ac_fn_c_try_run "$LINENO"; then :
5514
5515 else
5516 ac_cv_header_stdc=no
5517 fi
5518 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5519 conftest.$ac_objext conftest.beam conftest.$ac_ext
5520 fi
5521
5522 fi
5523 fi
5524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5525 $as_echo "$ac_cv_header_stdc" >&6; }
5526 if test $ac_cv_header_stdc = yes; then
5527
5528 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
5529
5530 fi
5531
5532 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
5533 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5534 inttypes.h stdint.h unistd.h
5535 do :
5536 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5537 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5538 "
5539 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5540 cat >>confdefs.h <<_ACEOF
5541 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5542 _ACEOF
5543
5544 fi
5545
5546 done
5547
5548
5549
5550 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
5551 if test "x$ac_cv_header_minix_config_h" = xyes; then :
5552 MINIX=yes
5553 else
5554 MINIX=
5555 fi
5556
5557
5558 if test "$MINIX" = yes; then
5559
5560 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5561
5562
5563 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5564
5565
5566 $as_echo "#define _MINIX 1" >>confdefs.h
5567
5568
5569 $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
5570
5571 fi
5572
5573
5574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5575 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
5576 if ${ac_cv_safe_to_define___extensions__+:} false; then :
5577 $as_echo_n "(cached) " >&6
5578 else
5579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5580 /* end confdefs.h. */
5581
5582 # define __EXTENSIONS__ 1
5583 $ac_includes_default
5584 int
5585 main ()
5586 {
5587
5588 ;
5589 return 0;
5590 }
5591 _ACEOF
5592 if ac_fn_c_try_compile "$LINENO"; then :
5593 ac_cv_safe_to_define___extensions__=yes
5594 else
5595 ac_cv_safe_to_define___extensions__=no
5596 fi
5597 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5598 fi
5599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5600 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5601 test $ac_cv_safe_to_define___extensions__ = yes &&
5602 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5603
5604 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5605
5606 $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
5607
5608 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5609
5610 $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
5611
5612 $as_echo "#define _OPENBSD_SOURCE 1" >>confdefs.h
5613
5614 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5615
5616 $as_echo "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
5617
5618 $as_echo "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
5619
5620 $as_echo "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
5621
5622 $as_echo "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
5623
5624 $as_echo "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
5625
5626 $as_echo "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
5627
5628 $as_echo "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
5629
5630 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5631
5632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
5633 $as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; }
5634 if ${ac_cv_should_define__xopen_source+:} false; then :
5635 $as_echo_n "(cached) " >&6
5636 else
5637 ac_cv_should_define__xopen_source=no
5638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5639 /* end confdefs.h. */
5640
5641 #include <wchar.h>
5642 mbstate_t x;
5643 int
5644 main ()
5645 {
5646
5647 ;
5648 return 0;
5649 }
5650 _ACEOF
5651 if ac_fn_c_try_compile "$LINENO"; then :
5652
5653 else
5654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5655 /* end confdefs.h. */
5656
5657 #define _XOPEN_SOURCE 500
5658 #include <wchar.h>
5659 mbstate_t x;
5660 int
5661 main ()
5662 {
5663
5664 ;
5665 return 0;
5666 }
5667 _ACEOF
5668 if ac_fn_c_try_compile "$LINENO"; then :
5669 ac_cv_should_define__xopen_source=yes
5670 fi
5671 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5672 fi
5673 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5674 fi
5675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
5676 $as_echo "$ac_cv_should_define__xopen_source" >&6; }
5677 test $ac_cv_should_define__xopen_source = yes &&
5678 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
5679
5680 $as_echo "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
5693 $as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
5694 if ${gl_cv_c_amsterdam_compiler+:} false; then :
5695 $as_echo_n "(cached) " >&6
5696 else
5697
5698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5699 /* end confdefs.h. */
5700
5701 #ifdef __ACK__
5702 Amsterdam
5703 #endif
5704
5705 _ACEOF
5706 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5707 $EGREP "Amsterdam" >/dev/null 2>&1; then :
5708 gl_cv_c_amsterdam_compiler=yes
5709 else
5710 gl_cv_c_amsterdam_compiler=no
5711 fi
5712 rm -f conftest*
5713
5714
5715 fi
5716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
5717 $as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
5718
5719 if test $gl_cv_c_amsterdam_compiler = yes; then
5720 if test -z "$AR"; then
5721 AR='cc -c.a'
5722 fi
5723 if test -z "$ARFLAGS"; then
5724 ARFLAGS='-o'
5725 fi
5726 else
5727 :
5728 fi
5729
5730 if test -n "$ac_tool_prefix"; then
5731 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5732 set dummy ${ac_tool_prefix}ar; ac_word=$2
5733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5734 $as_echo_n "checking for $ac_word... " >&6; }
5735 if ${ac_cv_prog_AR+:} false; then :
5736 $as_echo_n "(cached) " >&6
5737 else
5738 if test -n "$AR"; then
5739 ac_cv_prog_AR="$AR" # Let the user override the test.
5740 else
5741 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5742 for as_dir in $PATH
5743 do
5744 IFS=$as_save_IFS
5745 test -z "$as_dir" && as_dir=.
5746 for ac_exec_ext in '' $ac_executable_extensions; do
5747 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5748 ac_cv_prog_AR="${ac_tool_prefix}ar"
5749 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5750 break 2
5751 fi
5752 done
5753 done
5754 IFS=$as_save_IFS
5755
5756 fi
5757 fi
5758 AR=$ac_cv_prog_AR
5759 if test -n "$AR"; then
5760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5761 $as_echo "$AR" >&6; }
5762 else
5763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5764 $as_echo "no" >&6; }
5765 fi
5766
5767
5768 fi
5769 if test -z "$ac_cv_prog_AR"; then
5770 ac_ct_AR=$AR
5771 # Extract the first word of "ar", so it can be a program name with args.
5772 set dummy ar; ac_word=$2
5773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5774 $as_echo_n "checking for $ac_word... " >&6; }
5775 if ${ac_cv_prog_ac_ct_AR+:} false; then :
5776 $as_echo_n "(cached) " >&6
5777 else
5778 if test -n "$ac_ct_AR"; then
5779 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5780 else
5781 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5782 for as_dir in $PATH
5783 do
5784 IFS=$as_save_IFS
5785 test -z "$as_dir" && as_dir=.
5786 for ac_exec_ext in '' $ac_executable_extensions; do
5787 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5788 ac_cv_prog_ac_ct_AR="ar"
5789 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5790 break 2
5791 fi
5792 done
5793 done
5794 IFS=$as_save_IFS
5795
5796 fi
5797 fi
5798 ac_ct_AR=$ac_cv_prog_ac_ct_AR
5799 if test -n "$ac_ct_AR"; then
5800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5801 $as_echo "$ac_ct_AR" >&6; }
5802 else
5803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5804 $as_echo "no" >&6; }
5805 fi
5806
5807 if test "x$ac_ct_AR" = x; then
5808 AR="ar"
5809 else
5810 case $cross_compiling:$ac_tool_warned in
5811 yes:)
5812 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5813 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5814 ac_tool_warned=yes ;;
5815 esac
5816 AR=$ac_ct_AR
5817 fi
5818 else
5819 AR="$ac_cv_prog_AR"
5820 fi
5821
5822 if test -z "$ARFLAGS"; then
5823 ARFLAGS='cr'
5824 fi
5825
5826
5827
5828 if test -z "$RANLIB"; then
5829 if test $gl_cv_c_amsterdam_compiler = yes; then
5830 RANLIB=':'
5831 else
5832 if test -n "$ac_tool_prefix"; then
5833 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5834 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5836 $as_echo_n "checking for $ac_word... " >&6; }
5837 if ${ac_cv_prog_RANLIB+:} false; then :
5838 $as_echo_n "(cached) " >&6
5839 else
5840 if test -n "$RANLIB"; then
5841 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5842 else
5843 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5844 for as_dir in $PATH
5845 do
5846 IFS=$as_save_IFS
5847 test -z "$as_dir" && as_dir=.
5848 for ac_exec_ext in '' $ac_executable_extensions; do
5849 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5850 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5851 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5852 break 2
5853 fi
5854 done
5855 done
5856 IFS=$as_save_IFS
5857
5858 fi
5859 fi
5860 RANLIB=$ac_cv_prog_RANLIB
5861 if test -n "$RANLIB"; then
5862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5863 $as_echo "$RANLIB" >&6; }
5864 else
5865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5866 $as_echo "no" >&6; }
5867 fi
5868
5869
5870 fi
5871 if test -z "$ac_cv_prog_RANLIB"; then
5872 ac_ct_RANLIB=$RANLIB
5873 # Extract the first word of "ranlib", so it can be a program name with args.
5874 set dummy ranlib; ac_word=$2
5875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5876 $as_echo_n "checking for $ac_word... " >&6; }
5877 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
5878 $as_echo_n "(cached) " >&6
5879 else
5880 if test -n "$ac_ct_RANLIB"; then
5881 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5882 else
5883 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5884 for as_dir in $PATH
5885 do
5886 IFS=$as_save_IFS
5887 test -z "$as_dir" && as_dir=.
5888 for ac_exec_ext in '' $ac_executable_extensions; do
5889 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5890 ac_cv_prog_ac_ct_RANLIB="ranlib"
5891 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5892 break 2
5893 fi
5894 done
5895 done
5896 IFS=$as_save_IFS
5897
5898 fi
5899 fi
5900 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5901 if test -n "$ac_ct_RANLIB"; then
5902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5903 $as_echo "$ac_ct_RANLIB" >&6; }
5904 else
5905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5906 $as_echo "no" >&6; }
5907 fi
5908
5909 if test "x$ac_ct_RANLIB" = x; then
5910 RANLIB=":"
5911 else
5912 case $cross_compiling:$ac_tool_warned in
5913 yes:)
5914 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5915 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5916 ac_tool_warned=yes ;;
5917 esac
5918 RANLIB=$ac_ct_RANLIB
5919 fi
5920 else
5921 RANLIB="$ac_cv_prog_RANLIB"
5922 fi
5923
5924 fi
5925 fi
5926
5927
5928
5929 ac_aux_dir=
5930 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
5931 if test -f "$ac_dir/install-sh"; then
5932 ac_aux_dir=$ac_dir
5933 ac_install_sh="$ac_aux_dir/install-sh -c"
5934 break
5935 elif test -f "$ac_dir/install.sh"; then
5936 ac_aux_dir=$ac_dir
5937 ac_install_sh="$ac_aux_dir/install.sh -c"
5938 break
5939 elif test -f "$ac_dir/shtool"; then
5940 ac_aux_dir=$ac_dir
5941 ac_install_sh="$ac_aux_dir/shtool install -c"
5942 break
5943 fi
5944 done
5945 if test -z "$ac_aux_dir"; then
5946 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
5947 fi
5948
5949 # These three variables are undocumented and unsupported,
5950 # and are intended to be withdrawn in a future Autoconf release.
5951 # They can cause serious problems if a builder's source tree is in a directory
5952 # whose full name contains unusual characters.
5953 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5954 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5955 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5956
5957
5958 # Make sure we can run config.sub.
5959 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
5960 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
5961
5962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
5963 $as_echo_n "checking build system type... " >&6; }
5964 if ${ac_cv_build+:} false; then :
5965 $as_echo_n "(cached) " >&6
5966 else
5967 ac_build_alias=$build_alias
5968 test "x$ac_build_alias" = x &&
5969 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
5970 test "x$ac_build_alias" = x &&
5971 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
5972 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
5973 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
5974
5975 fi
5976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
5977 $as_echo "$ac_cv_build" >&6; }
5978 case $ac_cv_build in
5979 *-*-*) ;;
5980 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
5981 esac
5982 build=$ac_cv_build
5983 ac_save_IFS=$IFS; IFS='-'
5984 set x $ac_cv_build
5985 shift
5986 build_cpu=$1
5987 build_vendor=$2
5988 shift; shift
5989 # Remember, the first character of IFS is used to create $*,
5990 # except with old shells:
5991 build_os=$*
5992 IFS=$ac_save_IFS
5993 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
5994
5995
5996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
5997 $as_echo_n "checking host system type... " >&6; }
5998 if ${ac_cv_host+:} false; then :
5999 $as_echo_n "(cached) " >&6
6000 else
6001 if test "x$host_alias" = x; then
6002 ac_cv_host=$ac_cv_build
6003 else
6004 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6005 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6006 fi
6007
6008 fi
6009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6010 $as_echo "$ac_cv_host" >&6; }
6011 case $ac_cv_host in
6012 *-*-*) ;;
6013 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6014 esac
6015 host=$ac_cv_host
6016 ac_save_IFS=$IFS; IFS='-'
6017 set x $ac_cv_host
6018 shift
6019 host_cpu=$1
6020 host_vendor=$2
6021 shift; shift
6022 # Remember, the first character of IFS is used to create $*,
6023 # except with old shells:
6024 host_os=$*
6025 IFS=$ac_save_IFS
6026 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6027
6028
6029
6030
6031
6032 # IEEE behaviour is the default on all CPUs except Alpha and SH
6033 # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
6034 # and the GCC 4.1.2 manual).
6035 case "$host_cpu" in
6036 alpha*)
6037 # On Alpha systems, a compiler option provides the behaviour.
6038 # See the ieee(3) manual page, also available at
6039 # <https://backdrift.org/man/tru64/man3/ieee.3.html>
6040 if test -n "$GCC"; then
6041 # GCC has the option -mieee.
6042 # For full IEEE compliance (rarely needed), use option -mieee-with-inexact.
6043 CPPFLAGS="$CPPFLAGS -mieee"
6044 else
6045 # Compaq (ex-DEC) C has the option -ieee, equivalent to -ieee_with_no_inexact.
6046 # For full IEEE compliance (rarely needed), use option -ieee_with_inexact.
6047 CPPFLAGS="$CPPFLAGS -ieee"
6048 fi
6049 ;;
6050 sh*)
6051 if test -n "$GCC"; then
6052 # GCC has the option -mieee.
6053 CPPFLAGS="$CPPFLAGS -mieee"
6054 fi
6055 ;;
6056 esac
6057
6058 # Check whether --enable-largefile was given.
6059 if test "${enable_largefile+set}" = set; then :
6060 enableval=$enable_largefile;
6061 fi
6062
6063 if test "$enable_largefile" != no; then
6064
6065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
6066 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
6067 if ${ac_cv_sys_largefile_CC+:} false; then :
6068 $as_echo_n "(cached) " >&6
6069 else
6070 ac_cv_sys_largefile_CC=no
6071 if test "$GCC" != yes; then
6072 ac_save_CC=$CC
6073 while :; do
6074 # IRIX 6.2 and later do not support large files by default,
6075 # so use the C compiler's -n32 option if that helps.
6076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6077 /* end confdefs.h. */
6078 #include <sys/types.h>
6079 /* Check that off_t can represent 2**63 - 1 correctly.
6080 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6081 since some C++ compilers masquerading as C compilers
6082 incorrectly reject 9223372036854775807. */
6083 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6084 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6085 && LARGE_OFF_T % 2147483647 == 1)
6086 ? 1 : -1];
6087 int
6088 main ()
6089 {
6090
6091 ;
6092 return 0;
6093 }
6094 _ACEOF
6095 if ac_fn_c_try_compile "$LINENO"; then :
6096 break
6097 fi
6098 rm -f core conftest.err conftest.$ac_objext
6099 CC="$CC -n32"
6100 if ac_fn_c_try_compile "$LINENO"; then :
6101 ac_cv_sys_largefile_CC=' -n32'; break
6102 fi
6103 rm -f core conftest.err conftest.$ac_objext
6104 break
6105 done
6106 CC=$ac_save_CC
6107 rm -f conftest.$ac_ext
6108 fi
6109 fi
6110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
6111 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
6112 if test "$ac_cv_sys_largefile_CC" != no; then
6113 CC=$CC$ac_cv_sys_largefile_CC
6114 fi
6115
6116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
6117 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
6118 if ${ac_cv_sys_file_offset_bits+:} false; then :
6119 $as_echo_n "(cached) " >&6
6120 else
6121 while :; do
6122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6123 /* end confdefs.h. */
6124 #include <sys/types.h>
6125 /* Check that off_t can represent 2**63 - 1 correctly.
6126 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6127 since some C++ compilers masquerading as C compilers
6128 incorrectly reject 9223372036854775807. */
6129 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6130 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6131 && LARGE_OFF_T % 2147483647 == 1)
6132 ? 1 : -1];
6133 int
6134 main ()
6135 {
6136
6137 ;
6138 return 0;
6139 }
6140 _ACEOF
6141 if ac_fn_c_try_compile "$LINENO"; then :
6142 ac_cv_sys_file_offset_bits=no; break
6143 fi
6144 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6146 /* end confdefs.h. */
6147 #define _FILE_OFFSET_BITS 64
6148 #include <sys/types.h>
6149 /* Check that off_t can represent 2**63 - 1 correctly.
6150 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6151 since some C++ compilers masquerading as C compilers
6152 incorrectly reject 9223372036854775807. */
6153 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6154 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6155 && LARGE_OFF_T % 2147483647 == 1)
6156 ? 1 : -1];
6157 int
6158 main ()
6159 {
6160
6161 ;
6162 return 0;
6163 }
6164 _ACEOF
6165 if ac_fn_c_try_compile "$LINENO"; then :
6166 ac_cv_sys_file_offset_bits=64; break
6167 fi
6168 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6169 ac_cv_sys_file_offset_bits=unknown
6170 break
6171 done
6172 fi
6173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
6174 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
6175 case $ac_cv_sys_file_offset_bits in #(
6176 no | unknown) ;;
6177 *)
6178 cat >>confdefs.h <<_ACEOF
6179 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
6180 _ACEOF
6181 ;;
6182 esac
6183 rm -rf conftest*
6184 if test $ac_cv_sys_file_offset_bits = unknown; then
6185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
6186 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
6187 if ${ac_cv_sys_large_files+:} false; then :
6188 $as_echo_n "(cached) " >&6
6189 else
6190 while :; do
6191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6192 /* end confdefs.h. */
6193 #include <sys/types.h>
6194 /* Check that off_t can represent 2**63 - 1 correctly.
6195 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6196 since some C++ compilers masquerading as C compilers
6197 incorrectly reject 9223372036854775807. */
6198 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6199 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6200 && LARGE_OFF_T % 2147483647 == 1)
6201 ? 1 : -1];
6202 int
6203 main ()
6204 {
6205
6206 ;
6207 return 0;
6208 }
6209 _ACEOF
6210 if ac_fn_c_try_compile "$LINENO"; then :
6211 ac_cv_sys_large_files=no; break
6212 fi
6213 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6215 /* end confdefs.h. */
6216 #define _LARGE_FILES 1
6217 #include <sys/types.h>
6218 /* Check that off_t can represent 2**63 - 1 correctly.
6219 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6220 since some C++ compilers masquerading as C compilers
6221 incorrectly reject 9223372036854775807. */
6222 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6223 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6224 && LARGE_OFF_T % 2147483647 == 1)
6225 ? 1 : -1];
6226 int
6227 main ()
6228 {
6229
6230 ;
6231 return 0;
6232 }
6233 _ACEOF
6234 if ac_fn_c_try_compile "$LINENO"; then :
6235 ac_cv_sys_large_files=1; break
6236 fi
6237 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6238 ac_cv_sys_large_files=unknown
6239 break
6240 done
6241 fi
6242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
6243 $as_echo "$ac_cv_sys_large_files" >&6; }
6244 case $ac_cv_sys_large_files in #(
6245 no | unknown) ;;
6246 *)
6247 cat >>confdefs.h <<_ACEOF
6248 #define _LARGE_FILES $ac_cv_sys_large_files
6249 _ACEOF
6250 ;;
6251 esac
6252 rm -rf conftest*
6253 fi
6254
6255
6256 $as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
6257
6258 fi
6259
6260
6261
6262
6263
6264
6265
6266 # Check whether --enable-threads was given.
6267 if test "${enable_threads+set}" = set; then :
6268 enableval=$enable_threads; gl_use_threads=$enableval
6269 else
6270 if test -n "$gl_use_threads_default"; then
6271 gl_use_threads="$gl_use_threads_default"
6272 else
6273 case "$host_os" in
6274 osf*) gl_use_threads=no ;;
6275 cygwin*)
6276 case `uname -r` in
6277 1.[0-5].*) gl_use_threads=no ;;
6278 *) gl_use_threads=yes ;;
6279 esac
6280 ;;
6281 mingw*)
6282 case "$gl_use_winpthreads_default" in
6283 yes) gl_use_threads=posix ;;
6284 no) gl_use_threads=windows ;;
6285 *) gl_use_threads=yes ;;
6286 esac
6287 ;;
6288 *) gl_use_threads=yes ;;
6289 esac
6290 fi
6291
6292 fi
6293
6294 if test "$gl_use_threads" = yes \
6295 || test "$gl_use_threads" = isoc \
6296 || test "$gl_use_threads" = posix \
6297 || test "$gl_use_threads" = isoc+posix; then
6298 # For using <threads.h> or <pthread.h>:
6299
6300
6301 if test -z "$gl_anythreadlib_early_done"; then
6302 case "$host_os" in
6303 osf*)
6304 # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
6305 # groks <pthread.h>. cc also understands the flag -pthread, but
6306 # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
6307 # 2. putting a flag into CPPFLAGS that has an effect on the linker
6308 # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
6309 # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
6310 CPPFLAGS="$CPPFLAGS -D_REENTRANT"
6311 ;;
6312 esac
6313 # Some systems optimize for single-threaded programs by default, and
6314 # need special flags to disable these optimizations. For example, the
6315 # definition of 'errno' in <errno.h>.
6316 case "$host_os" in
6317 aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
6318 solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
6319 esac
6320 gl_anythreadlib_early_done=done
6321 fi
6322
6323 fi
6324
6325
6326
6327 # Pre-early section.
6328
6329
6330
6331
6332 # Code from module absolute-header:
6333 # Code from module alloca:
6334 # Code from module alloca-opt:
6335 # Code from module arpa_inet:
6336 # Code from module assure:
6337 # Code from module at-internal:
6338 # Code from module builtin-expect:
6339 # Code from module c99:
6340 # Code from module canonicalize-lgpl:
6341 # Code from module chdir:
6342 # Code from module chdir-long:
6343 # Code from module cloexec:
6344 # Code from module close:
6345 # Code from module closedir:
6346 # Code from module count-one-bits:
6347 # Code from module d-ino:
6348 # Code from module d-type:
6349 # Code from module dirent:
6350 # Code from module dirfd:
6351 # Code from module dirname-lgpl:
6352 # Code from module dosname:
6353 # Code from module double-slash-root:
6354 # Code from module dup:
6355 # Code from module dup2:
6356 # Code from module environ:
6357 # Code from module errno:
6358 # Code from module error:
6359 # Code from module exitfail:
6360 # Code from module extensions:
6361 # Code from module extern-inline:
6362 # Code from module fchdir:
6363 # Code from module fcntl:
6364 # Code from module fcntl-h:
6365 # Code from module fd-hook:
6366 # Code from module fd-safer-flag:
6367 # Code from module fdopendir:
6368 # Code from module filename:
6369 # Code from module filenamecat-lgpl:
6370 # Code from module flexmember:
6371 # Code from module float:
6372 # Code from module fnmatch:
6373 # Code from module fnmatch-gnu:
6374 # Code from module fnmatch-h:
6375 # Code from module fpieee:
6376
6377 # Code from module fpucw:
6378 # Code from module frexp:
6379 # Code from module frexpl:
6380 # Code from module fstat:
6381 # Code from module fstatat:
6382 # Code from module getcwd:
6383 # Code from module getcwd-lgpl:
6384 # Code from module getdtablesize:
6385 # Code from module getlogin_r:
6386 # Code from module getprogname:
6387 # Code from module gettext-h:
6388 # Code from module gettimeofday:
6389 # Code from module glob:
6390 # Code from module glob-h:
6391 # Code from module hard-locale:
6392 # Code from module include_next:
6393 # Code from module inet_ntop:
6394 # Code from module intprops:
6395 # Code from module inttypes:
6396 # Code from module inttypes-incomplete:
6397 # Code from module isnand-nolibm:
6398 # Code from module isnanl-nolibm:
6399 # Code from module largefile:
6400
6401 # Code from module libc-config:
6402 # Code from module limits-h:
6403 # Code from module localcharset:
6404 # Code from module locale:
6405 # Code from module localtime-buffer:
6406 # Code from module lock:
6407 # Code from module lstat:
6408 # Code from module malloc-posix:
6409 # Code from module malloca:
6410 # Code from module math:
6411 # Code from module mbrtowc:
6412 # Code from module mbsinit:
6413 # Code from module mbsrtowcs:
6414 # Code from module memchr:
6415 # Code from module memmem:
6416 # Code from module memmem-simple:
6417 # Code from module mempcpy:
6418 # Code from module memrchr:
6419 # Code from module mkdir:
6420 # Code from module mkdtemp:
6421 # Code from module mkostemp:
6422 # Code from module msvc-inval:
6423 # Code from module msvc-nothrow:
6424 # Code from module multiarch:
6425 # Code from module netinet_in:
6426 # Code from module nocrash:
6427 # Code from module open:
6428 # Code from module openat:
6429 # Code from module openat-die:
6430 # Code from module openat-h:
6431 # Code from module opendir:
6432 # Code from module pathmax:
6433 # Code from module rawmemchr:
6434 # Code from module readdir:
6435 # Code from module readlink:
6436 # Code from module realloc-posix:
6437 # Code from module rename:
6438 # Code from module rewinddir:
6439 # Code from module rmdir:
6440 # Code from module same-inode:
6441 # Code from module save-cwd:
6442 # Code from module scratch_buffer:
6443 # Code from module setenv:
6444 # Code from module setlocale-null:
6445 # Code from module signal-h:
6446 # Code from module snippet/_Noreturn:
6447 # Code from module snippet/arg-nonnull:
6448 # Code from module snippet/c++defs:
6449 # Code from module snippet/warn-on-use:
6450 # Code from module socklen:
6451 # Code from module ssize_t:
6452 # Code from module stat:
6453 # Code from module stat-time:
6454 # Code from module std-gnu11:
6455 # Code from module stdalign:
6456 # Code from module stdbool:
6457 # Code from module stddef:
6458 # Code from module stdint:
6459 # Code from module stdio:
6460 # Code from module stdlib:
6461 # Code from module strchrnul:
6462 # Code from module strdup-posix:
6463 # Code from module streq:
6464 # Code from module strerror:
6465 # Code from module strerror-override:
6466 # Code from module strerror_r-posix:
6467 # Code from module string:
6468 # Code from module strnlen1:
6469 # Code from module strstr:
6470 # Code from module strstr-simple:
6471 # Code from module strtok_r:
6472 # Code from module sys_socket:
6473 # Code from module sys_stat:
6474 # Code from module sys_time:
6475 # Code from module sys_types:
6476 # Code from module sys_uio:
6477 # Code from module tempname:
6478 # Code from module threadlib:
6479
6480
6481
6482 # Code from module time:
6483 # Code from module time_r:
6484 # Code from module unistd:
6485 # Code from module unistd-safer:
6486 # Code from module unsetenv:
6487 # Code from module update-copyright:
6488 # Code from module verify:
6489 # Code from module wchar:
6490 # Code from module wctype-h:
6491 # Code from module windows-mutex:
6492 # Code from module windows-once:
6493 # Code from module windows-recmutex:
6494 # Code from module windows-rwlock:
6495 # Code from module xalloc-oversized:
6496
6497
6498 am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
6499
6500
6501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6502 $as_echo_n "checking target system type... " >&6; }
6503 if ${ac_cv_target+:} false; then :
6504 $as_echo_n "(cached) " >&6
6505 else
6506 if test "x$target_alias" = x; then
6507 ac_cv_target=$ac_cv_host
6508 else
6509 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6510 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6511 fi
6512
6513 fi
6514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6515 $as_echo "$ac_cv_target" >&6; }
6516 case $ac_cv_target in
6517 *-*-*) ;;
6518 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6519 esac
6520 target=$ac_cv_target
6521 ac_save_IFS=$IFS; IFS='-'
6522 set x $ac_cv_target
6523 shift
6524 target_cpu=$1
6525 target_vendor=$2
6526 shift; shift
6527 # Remember, the first character of IFS is used to create $*,
6528 # except with old shells:
6529 target_os=$*
6530 IFS=$ac_save_IFS
6531 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6532
6533
6534 # The aliases save the names the user supplied, while $host etc.
6535 # will get canonicalized.
6536 test -n "$target_alias" &&
6537 test "$program_prefix$program_suffix$program_transform_name" = \
6538 NONENONEs,x,x, &&
6539 program_prefix=${target_alias}-
6540
6541 # The tests for host and target for $enable_largefile require
6542 # canonical names.
6543
6544
6545
6546 # As the $enable_largefile decision depends on --enable-plugins we must set it
6547 # even in directories otherwise not depending on the $plugins option.
6548
6549
6550 maybe_plugins=no
6551 for ac_header in dlfcn.h
6552 do :
6553 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
6554 "
6555 if test "x$ac_cv_header_dlfcn_h" = xyes; then :
6556 cat >>confdefs.h <<_ACEOF
6557 #define HAVE_DLFCN_H 1
6558 _ACEOF
6559 maybe_plugins=yes
6560 fi
6561
6562 done
6563
6564 for ac_header in windows.h
6565 do :
6566 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
6567 "
6568 if test "x$ac_cv_header_windows_h" = xyes; then :
6569 cat >>confdefs.h <<_ACEOF
6570 #define HAVE_WINDOWS_H 1
6571 _ACEOF
6572 maybe_plugins=yes
6573 fi
6574
6575 done
6576
6577
6578 # Check whether --enable-plugins was given.
6579 if test "${enable_plugins+set}" = set; then :
6580 enableval=$enable_plugins; case "${enableval}" in
6581 no) plugins=no ;;
6582 *) plugins=yes
6583 if test "$maybe_plugins" != "yes" ; then
6584 as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
6585 fi ;;
6586 esac
6587 else
6588 plugins=$maybe_plugins
6589
6590 fi
6591
6592 if test "$plugins" = "yes"; then
6593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
6594 $as_echo_n "checking for library containing dlsym... " >&6; }
6595 if ${ac_cv_search_dlsym+:} false; then :
6596 $as_echo_n "(cached) " >&6
6597 else
6598 ac_func_search_save_LIBS=$LIBS
6599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6600 /* end confdefs.h. */
6601
6602 /* Override any GCC internal prototype to avoid an error.
6603 Use char because int might match the return type of a GCC
6604 builtin and then its argument prototype would still apply. */
6605 #ifdef __cplusplus
6606 extern "C"
6607 #endif
6608 char dlsym ();
6609 int
6610 main ()
6611 {
6612 return dlsym ();
6613 ;
6614 return 0;
6615 }
6616 _ACEOF
6617 for ac_lib in '' dl; do
6618 if test -z "$ac_lib"; then
6619 ac_res="none required"
6620 else
6621 ac_res=-l$ac_lib
6622 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
6623 fi
6624 if ac_fn_c_try_link "$LINENO"; then :
6625 ac_cv_search_dlsym=$ac_res
6626 fi
6627 rm -f core conftest.err conftest.$ac_objext \
6628 conftest$ac_exeext
6629 if ${ac_cv_search_dlsym+:} false; then :
6630 break
6631 fi
6632 done
6633 if ${ac_cv_search_dlsym+:} false; then :
6634
6635 else
6636 ac_cv_search_dlsym=no
6637 fi
6638 rm conftest.$ac_ext
6639 LIBS=$ac_func_search_save_LIBS
6640 fi
6641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
6642 $as_echo "$ac_cv_search_dlsym" >&6; }
6643 ac_res=$ac_cv_search_dlsym
6644 if test "$ac_res" != no; then :
6645 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6646
6647 fi
6648
6649 fi
6650
6651
6652 case "${host}" in
6653 sparc-*-solaris*|i[3-7]86-*-solaris*)
6654 # On native 32bit sparc and ia32 solaris, large-file and procfs support
6655 # are mutually exclusive; and without procfs support, the bfd/ elf module
6656 # cannot provide certain routines such as elfcore_write_prpsinfo
6657 # or elfcore_write_prstatus. So unless the user explicitly requested
6658 # large-file support through the --enable-largefile switch, disable
6659 # large-file support in favor of procfs support.
6660 test "${target}" = "${host}" -a "x$plugins" = xno \
6661 && : ${enable_largefile="no"}
6662 ;;
6663 esac
6664
6665 # Check whether --enable-largefile was given.
6666 if test "${enable_largefile+set}" = set; then :
6667 enableval=$enable_largefile;
6668 fi
6669
6670 if test "$enable_largefile" != no; then
6671
6672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
6673 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
6674 if ${ac_cv_sys_largefile_CC+:} false; then :
6675 $as_echo_n "(cached) " >&6
6676 else
6677 ac_cv_sys_largefile_CC=no
6678 if test "$GCC" != yes; then
6679 ac_save_CC=$CC
6680 while :; do
6681 # IRIX 6.2 and later do not support large files by default,
6682 # so use the C compiler's -n32 option if that helps.
6683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6684 /* end confdefs.h. */
6685 #include <sys/types.h>
6686 /* Check that off_t can represent 2**63 - 1 correctly.
6687 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6688 since some C++ compilers masquerading as C compilers
6689 incorrectly reject 9223372036854775807. */
6690 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6691 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6692 && LARGE_OFF_T % 2147483647 == 1)
6693 ? 1 : -1];
6694 int
6695 main ()
6696 {
6697
6698 ;
6699 return 0;
6700 }
6701 _ACEOF
6702 if ac_fn_c_try_compile "$LINENO"; then :
6703 break
6704 fi
6705 rm -f core conftest.err conftest.$ac_objext
6706 CC="$CC -n32"
6707 if ac_fn_c_try_compile "$LINENO"; then :
6708 ac_cv_sys_largefile_CC=' -n32'; break
6709 fi
6710 rm -f core conftest.err conftest.$ac_objext
6711 break
6712 done
6713 CC=$ac_save_CC
6714 rm -f conftest.$ac_ext
6715 fi
6716 fi
6717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
6718 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
6719 if test "$ac_cv_sys_largefile_CC" != no; then
6720 CC=$CC$ac_cv_sys_largefile_CC
6721 fi
6722
6723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
6724 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
6725 if ${ac_cv_sys_file_offset_bits+:} false; then :
6726 $as_echo_n "(cached) " >&6
6727 else
6728 while :; do
6729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6730 /* end confdefs.h. */
6731 #include <sys/types.h>
6732 /* Check that off_t can represent 2**63 - 1 correctly.
6733 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6734 since some C++ compilers masquerading as C compilers
6735 incorrectly reject 9223372036854775807. */
6736 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6737 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6738 && LARGE_OFF_T % 2147483647 == 1)
6739 ? 1 : -1];
6740 int
6741 main ()
6742 {
6743
6744 ;
6745 return 0;
6746 }
6747 _ACEOF
6748 if ac_fn_c_try_compile "$LINENO"; then :
6749 ac_cv_sys_file_offset_bits=no; break
6750 fi
6751 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6753 /* end confdefs.h. */
6754 #define _FILE_OFFSET_BITS 64
6755 #include <sys/types.h>
6756 /* Check that off_t can represent 2**63 - 1 correctly.
6757 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6758 since some C++ compilers masquerading as C compilers
6759 incorrectly reject 9223372036854775807. */
6760 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6761 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6762 && LARGE_OFF_T % 2147483647 == 1)
6763 ? 1 : -1];
6764 int
6765 main ()
6766 {
6767
6768 ;
6769 return 0;
6770 }
6771 _ACEOF
6772 if ac_fn_c_try_compile "$LINENO"; then :
6773 ac_cv_sys_file_offset_bits=64; break
6774 fi
6775 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6776 ac_cv_sys_file_offset_bits=unknown
6777 break
6778 done
6779 fi
6780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
6781 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
6782 case $ac_cv_sys_file_offset_bits in #(
6783 no | unknown) ;;
6784 *)
6785 cat >>confdefs.h <<_ACEOF
6786 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
6787 _ACEOF
6788 ;;
6789 esac
6790 rm -rf conftest*
6791 if test $ac_cv_sys_file_offset_bits = unknown; then
6792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
6793 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
6794 if ${ac_cv_sys_large_files+:} false; then :
6795 $as_echo_n "(cached) " >&6
6796 else
6797 while :; do
6798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6799 /* end confdefs.h. */
6800 #include <sys/types.h>
6801 /* Check that off_t can represent 2**63 - 1 correctly.
6802 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6803 since some C++ compilers masquerading as C compilers
6804 incorrectly reject 9223372036854775807. */
6805 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6806 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6807 && LARGE_OFF_T % 2147483647 == 1)
6808 ? 1 : -1];
6809 int
6810 main ()
6811 {
6812
6813 ;
6814 return 0;
6815 }
6816 _ACEOF
6817 if ac_fn_c_try_compile "$LINENO"; then :
6818 ac_cv_sys_large_files=no; break
6819 fi
6820 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6822 /* end confdefs.h. */
6823 #define _LARGE_FILES 1
6824 #include <sys/types.h>
6825 /* Check that off_t can represent 2**63 - 1 correctly.
6826 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6827 since some C++ compilers masquerading as C compilers
6828 incorrectly reject 9223372036854775807. */
6829 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6830 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6831 && LARGE_OFF_T % 2147483647 == 1)
6832 ? 1 : -1];
6833 int
6834 main ()
6835 {
6836
6837 ;
6838 return 0;
6839 }
6840 _ACEOF
6841 if ac_fn_c_try_compile "$LINENO"; then :
6842 ac_cv_sys_large_files=1; break
6843 fi
6844 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6845 ac_cv_sys_large_files=unknown
6846 break
6847 done
6848 fi
6849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
6850 $as_echo "$ac_cv_sys_large_files" >&6; }
6851 case $ac_cv_sys_large_files in #(
6852 no | unknown) ;;
6853 *)
6854 cat >>confdefs.h <<_ACEOF
6855 #define _LARGE_FILES $ac_cv_sys_large_files
6856 _ACEOF
6857 ;;
6858 esac
6859 rm -rf conftest*
6860 fi
6861
6862
6863 $as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
6864
6865 fi
6866
6867
6868
6869 ac_aux_dir=
6870 for ac_dir in .. "$srcdir"/..; do
6871 if test -f "$ac_dir/install-sh"; then
6872 ac_aux_dir=$ac_dir
6873 ac_install_sh="$ac_aux_dir/install-sh -c"
6874 break
6875 elif test -f "$ac_dir/install.sh"; then
6876 ac_aux_dir=$ac_dir
6877 ac_install_sh="$ac_aux_dir/install.sh -c"
6878 break
6879 elif test -f "$ac_dir/shtool"; then
6880 ac_aux_dir=$ac_dir
6881 ac_install_sh="$ac_aux_dir/shtool install -c"
6882 break
6883 fi
6884 done
6885 if test -z "$ac_aux_dir"; then
6886 as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
6887 fi
6888
6889 # These three variables are undocumented and unsupported,
6890 # and are intended to be withdrawn in a future Autoconf release.
6891 # They can cause serious problems if a builder's source tree is in a directory
6892 # whose full name contains unusual characters.
6893 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
6894 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
6895 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906 # Check whether --enable-cross-guesses was given.
6907 if test "${enable_cross_guesses+set}" = set; then :
6908 enableval=$enable_cross_guesses; if test "x$enableval" != xconservative && test "x$enableval" != xrisky; then
6909 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: invalid argument supplied to --enable-cross-guesses" >&5
6910 $as_echo "$as_me: WARNING: invalid argument supplied to --enable-cross-guesses" >&2;}
6911 enableval=conservative
6912 fi
6913 gl_cross_guesses="$enableval"
6914 else
6915 gl_cross_guesses=conservative
6916 fi
6917
6918 if test $gl_cross_guesses = risky; then
6919 gl_cross_guess_normal="guessing yes"
6920 gl_cross_guess_inverted="guessing no"
6921 else
6922 gl_cross_guess_normal="guessing no"
6923 gl_cross_guess_inverted="guessing yes"
6924 fi
6925 LIBC_FATAL_STDERR_=1
6926 export LIBC_FATAL_STDERR_
6927
6928
6929 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
6930 if test "x$ac_cv_type_size_t" = xyes; then :
6931
6932 else
6933
6934 cat >>confdefs.h <<_ACEOF
6935 #define size_t unsigned int
6936 _ACEOF
6937
6938 fi
6939
6940 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6941 # for constant arguments. Useless!
6942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
6943 $as_echo_n "checking for working alloca.h... " >&6; }
6944 if ${ac_cv_working_alloca_h+:} false; then :
6945 $as_echo_n "(cached) " >&6
6946 else
6947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6948 /* end confdefs.h. */
6949 #include <alloca.h>
6950 int
6951 main ()
6952 {
6953 char *p = (char *) alloca (2 * sizeof (int));
6954 if (p) return 0;
6955 ;
6956 return 0;
6957 }
6958 _ACEOF
6959 if ac_fn_c_try_link "$LINENO"; then :
6960 ac_cv_working_alloca_h=yes
6961 else
6962 ac_cv_working_alloca_h=no
6963 fi
6964 rm -f core conftest.err conftest.$ac_objext \
6965 conftest$ac_exeext conftest.$ac_ext
6966 fi
6967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
6968 $as_echo "$ac_cv_working_alloca_h" >&6; }
6969 if test $ac_cv_working_alloca_h = yes; then
6970
6971 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
6972
6973 fi
6974
6975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
6976 $as_echo_n "checking for alloca... " >&6; }
6977 if ${ac_cv_func_alloca_works+:} false; then :
6978 $as_echo_n "(cached) " >&6
6979 else
6980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6981 /* end confdefs.h. */
6982 #ifdef __GNUC__
6983 # define alloca __builtin_alloca
6984 #else
6985 # ifdef _MSC_VER
6986 # include <malloc.h>
6987 # define alloca _alloca
6988 # else
6989 # ifdef HAVE_ALLOCA_H
6990 # include <alloca.h>
6991 # else
6992 # ifdef _AIX
6993 #pragma alloca
6994 # else
6995 # ifndef alloca /* predefined by HP cc +Olibcalls */
6996 void *alloca (size_t);
6997 # endif
6998 # endif
6999 # endif
7000 # endif
7001 #endif
7002
7003 int
7004 main ()
7005 {
7006 char *p = (char *) alloca (1);
7007 if (p) return 0;
7008 ;
7009 return 0;
7010 }
7011 _ACEOF
7012 if ac_fn_c_try_link "$LINENO"; then :
7013 ac_cv_func_alloca_works=yes
7014 else
7015 ac_cv_func_alloca_works=no
7016 fi
7017 rm -f core conftest.err conftest.$ac_objext \
7018 conftest$ac_exeext conftest.$ac_ext
7019 fi
7020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
7021 $as_echo "$ac_cv_func_alloca_works" >&6; }
7022
7023 if test $ac_cv_func_alloca_works = yes; then
7024
7025 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
7026
7027 else
7028 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
7029 # that cause trouble. Some versions do not even contain alloca or
7030 # contain a buggy version. If you still want to use their alloca,
7031 # use ar to extract alloca.o from them instead of compiling alloca.c.
7032
7033
7034
7035
7036
7037 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
7038
7039 $as_echo "#define C_ALLOCA 1" >>confdefs.h
7040
7041
7042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
7043 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
7044 if ${ac_cv_os_cray+:} false; then :
7045 $as_echo_n "(cached) " >&6
7046 else
7047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7048 /* end confdefs.h. */
7049 #if defined CRAY && ! defined CRAY2
7050 webecray
7051 #else
7052 wenotbecray
7053 #endif
7054
7055 _ACEOF
7056 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7057 $EGREP "webecray" >/dev/null 2>&1; then :
7058 ac_cv_os_cray=yes
7059 else
7060 ac_cv_os_cray=no
7061 fi
7062 rm -f conftest*
7063
7064 fi
7065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
7066 $as_echo "$ac_cv_os_cray" >&6; }
7067 if test $ac_cv_os_cray = yes; then
7068 for ac_func in _getb67 GETB67 getb67; do
7069 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7070 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7071 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7072
7073 cat >>confdefs.h <<_ACEOF
7074 #define CRAY_STACKSEG_END $ac_func
7075 _ACEOF
7076
7077 break
7078 fi
7079
7080 done
7081 fi
7082
7083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
7084 $as_echo_n "checking stack direction for C alloca... " >&6; }
7085 if ${ac_cv_c_stack_direction+:} false; then :
7086 $as_echo_n "(cached) " >&6
7087 else
7088 if test "$cross_compiling" = yes; then :
7089 ac_cv_c_stack_direction=0
7090 else
7091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7092 /* end confdefs.h. */
7093 $ac_includes_default
7094 int
7095 find_stack_direction (int *addr, int depth)
7096 {
7097 int dir, dummy = 0;
7098 if (! addr)
7099 addr = &dummy;
7100 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
7101 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
7102 return dir + dummy;
7103 }
7104
7105 int
7106 main (int argc, char **argv)
7107 {
7108 return find_stack_direction (0, argc + !argv + 20) < 0;
7109 }
7110 _ACEOF
7111 if ac_fn_c_try_run "$LINENO"; then :
7112 ac_cv_c_stack_direction=1
7113 else
7114 ac_cv_c_stack_direction=-1
7115 fi
7116 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7117 conftest.$ac_objext conftest.beam conftest.$ac_ext
7118 fi
7119
7120 fi
7121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
7122 $as_echo "$ac_cv_c_stack_direction" >&6; }
7123 cat >>confdefs.h <<_ACEOF
7124 #define STACK_DIRECTION $ac_cv_c_stack_direction
7125 _ACEOF
7126
7127
7128 fi
7129
7130
7131 GNULIB_INET_NTOP=0;
7132 GNULIB_INET_PTON=0;
7133 HAVE_DECL_INET_NTOP=1;
7134 HAVE_DECL_INET_PTON=1;
7135 REPLACE_INET_NTOP=0;
7136 REPLACE_INET_PTON=0;
7137
7138
7139
7140
7141 for ac_header in $ac_header_list
7142 do :
7143 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7144 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
7145 "
7146 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7147 cat >>confdefs.h <<_ACEOF
7148 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7149 _ACEOF
7150
7151 fi
7152
7153 done
7154
7155
7156
7157
7158
7159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
7160 $as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
7161 if ${gl_cv_have_include_next+:} false; then :
7162 $as_echo_n "(cached) " >&6
7163 else
7164 rm -rf conftestd1a conftestd1b conftestd2
7165 mkdir conftestd1a conftestd1b conftestd2
7166 cat <<EOF > conftestd1a/conftest.h
7167 #define DEFINED_IN_CONFTESTD1
7168 #include_next <conftest.h>
7169 #ifdef DEFINED_IN_CONFTESTD2
7170 int foo;
7171 #else
7172 #error "include_next doesn't work"
7173 #endif
7174 EOF
7175 cat <<EOF > conftestd1b/conftest.h
7176 #define DEFINED_IN_CONFTESTD1
7177 #include <stdio.h>
7178 #include_next <conftest.h>
7179 #ifdef DEFINED_IN_CONFTESTD2
7180 int foo;
7181 #else
7182 #error "include_next doesn't work"
7183 #endif
7184 EOF
7185 cat <<EOF > conftestd2/conftest.h
7186 #ifndef DEFINED_IN_CONFTESTD1
7187 #error "include_next test doesn't work"
7188 #endif
7189 #define DEFINED_IN_CONFTESTD2
7190 EOF
7191 gl_save_CPPFLAGS="$CPPFLAGS"
7192 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
7193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7194 /* end confdefs.h. */
7195 #include <conftest.h>
7196 _ACEOF
7197 if ac_fn_c_try_compile "$LINENO"; then :
7198 gl_cv_have_include_next=yes
7199 else
7200 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
7201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7202 /* end confdefs.h. */
7203 #include <conftest.h>
7204 _ACEOF
7205 if ac_fn_c_try_compile "$LINENO"; then :
7206 gl_cv_have_include_next=buggy
7207 else
7208 gl_cv_have_include_next=no
7209 fi
7210 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7211
7212 fi
7213 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7214 CPPFLAGS="$gl_save_CPPFLAGS"
7215 rm -rf conftestd1a conftestd1b conftestd2
7216
7217 fi
7218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
7219 $as_echo "$gl_cv_have_include_next" >&6; }
7220 PRAGMA_SYSTEM_HEADER=
7221 if test $gl_cv_have_include_next = yes; then
7222 INCLUDE_NEXT=include_next
7223 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
7224 if test -n "$GCC"; then
7225 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
7226 fi
7227 else
7228 if test $gl_cv_have_include_next = buggy; then
7229 INCLUDE_NEXT=include
7230 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
7231 else
7232 INCLUDE_NEXT=include
7233 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
7234 fi
7235 fi
7236
7237
7238
7239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
7240 $as_echo_n "checking whether system header files limit the line length... " >&6; }
7241 if ${gl_cv_pragma_columns+:} false; then :
7242 $as_echo_n "(cached) " >&6
7243 else
7244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7245 /* end confdefs.h. */
7246
7247 #ifdef __TANDEM
7248 choke me
7249 #endif
7250
7251 _ACEOF
7252 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7253 $EGREP "choke me" >/dev/null 2>&1; then :
7254 gl_cv_pragma_columns=yes
7255 else
7256 gl_cv_pragma_columns=no
7257 fi
7258 rm -f conftest*
7259
7260
7261 fi
7262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
7263 $as_echo "$gl_cv_pragma_columns" >&6; }
7264 if test $gl_cv_pragma_columns = yes; then
7265 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
7266 else
7267 PRAGMA_COLUMNS=
7268 fi
7269
7270
7271
7272
7273
7274
7275 if test $ac_cv_header_features_h = yes; then
7276 HAVE_FEATURES_H=1
7277 else
7278 HAVE_FEATURES_H=0
7279 fi
7280
7281
7282
7283
7284
7285 if test $ac_cv_header_sys_socket_h = no; then
7286 for ac_header in ws2tcpip.h
7287 do :
7288 ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
7289 if test "x$ac_cv_header_ws2tcpip_h" = xyes; then :
7290 cat >>confdefs.h <<_ACEOF
7291 #define HAVE_WS2TCPIP_H 1
7292 _ACEOF
7293
7294 fi
7295
7296 done
7297
7298 fi
7299
7300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
7301 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
7302 if test -z "$MKDIR_P"; then
7303 if ${ac_cv_path_mkdir+:} false; then :
7304 $as_echo_n "(cached) " >&6
7305 else
7306 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7307 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
7308 do
7309 IFS=$as_save_IFS
7310 test -z "$as_dir" && as_dir=.
7311 for ac_prog in mkdir gmkdir; do
7312 for ac_exec_ext in '' $ac_executable_extensions; do
7313 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
7314 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
7315 'mkdir (GNU coreutils) '* | \
7316 'mkdir (coreutils) '* | \
7317 'mkdir (fileutils) '4.1*)
7318 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
7319 break 3;;
7320 esac
7321 done
7322 done
7323 done
7324 IFS=$as_save_IFS
7325
7326 fi
7327
7328 test -d ./--version && rmdir ./--version
7329 if test "${ac_cv_path_mkdir+set}" = set; then
7330 MKDIR_P="$ac_cv_path_mkdir -p"
7331 else
7332 # As a last resort, use the slow shell script. Don't cache a
7333 # value for MKDIR_P within a source directory, because that will
7334 # break other packages using the cache if that directory is
7335 # removed, or if the value is a relative name.
7336 MKDIR_P="$ac_install_sh -d"
7337 fi
7338 fi
7339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
7340 $as_echo "$MKDIR_P" >&6; }
7341
7342
7343 GNULIB__EXIT=0;
7344 GNULIB_ATOLL=0;
7345 GNULIB_CALLOC_POSIX=0;
7346 GNULIB_CANONICALIZE_FILE_NAME=0;
7347 GNULIB_GETLOADAVG=0;
7348 GNULIB_GETSUBOPT=0;
7349 GNULIB_GRANTPT=0;
7350 GNULIB_MALLOC_POSIX=0;
7351 GNULIB_MBTOWC=0;
7352 GNULIB_MKDTEMP=0;
7353 GNULIB_MKOSTEMP=0;
7354 GNULIB_MKOSTEMPS=0;
7355 GNULIB_MKSTEMP=0;
7356 GNULIB_MKSTEMPS=0;
7357 GNULIB_POSIX_OPENPT=0;
7358 GNULIB_PTSNAME=0;
7359 GNULIB_PTSNAME_R=0;
7360 GNULIB_PUTENV=0;
7361 GNULIB_QSORT_R=0;
7362 GNULIB_RANDOM=0;
7363 GNULIB_RANDOM_R=0;
7364 GNULIB_REALLOCARRAY=0;
7365 GNULIB_REALLOC_POSIX=0;
7366 GNULIB_REALPATH=0;
7367 GNULIB_RPMATCH=0;
7368 GNULIB_SECURE_GETENV=0;
7369 GNULIB_SETENV=0;
7370 GNULIB_STRTOD=0;
7371 GNULIB_STRTOLD=0;
7372 GNULIB_STRTOLL=0;
7373 GNULIB_STRTOULL=0;
7374 GNULIB_SYSTEM_POSIX=0;
7375 GNULIB_UNLOCKPT=0;
7376 GNULIB_UNSETENV=0;
7377 GNULIB_WCTOMB=0;
7378 HAVE__EXIT=1;
7379 HAVE_ATOLL=1;
7380 HAVE_CANONICALIZE_FILE_NAME=1;
7381 HAVE_DECL_GETLOADAVG=1;
7382 HAVE_GETSUBOPT=1;
7383 HAVE_GRANTPT=1;
7384 HAVE_INITSTATE=1;
7385 HAVE_DECL_INITSTATE=1;
7386 HAVE_MBTOWC=1;
7387 HAVE_MKDTEMP=1;
7388 HAVE_MKOSTEMP=1;
7389 HAVE_MKOSTEMPS=1;
7390 HAVE_MKSTEMP=1;
7391 HAVE_MKSTEMPS=1;
7392 HAVE_POSIX_OPENPT=1;
7393 HAVE_PTSNAME=1;
7394 HAVE_PTSNAME_R=1;
7395 HAVE_QSORT_R=1;
7396 HAVE_RANDOM=1;
7397 HAVE_RANDOM_H=1;
7398 HAVE_RANDOM_R=1;
7399 HAVE_REALLOCARRAY=1;
7400 HAVE_REALPATH=1;
7401 HAVE_RPMATCH=1;
7402 HAVE_SECURE_GETENV=1;
7403 HAVE_SETENV=1;
7404 HAVE_DECL_SETENV=1;
7405 HAVE_SETSTATE=1;
7406 HAVE_DECL_SETSTATE=1;
7407 HAVE_STRTOD=1;
7408 HAVE_STRTOLD=1;
7409 HAVE_STRTOLL=1;
7410 HAVE_STRTOULL=1;
7411 HAVE_STRUCT_RANDOM_DATA=1;
7412 HAVE_SYS_LOADAVG_H=0;
7413 HAVE_UNLOCKPT=1;
7414 HAVE_DECL_UNSETENV=1;
7415 REPLACE_CALLOC=0;
7416 REPLACE_CANONICALIZE_FILE_NAME=0;
7417 REPLACE_INITSTATE=0;
7418 REPLACE_MALLOC=0;
7419 REPLACE_MBTOWC=0;
7420 REPLACE_MKSTEMP=0;
7421 REPLACE_PTSNAME=0;
7422 REPLACE_PTSNAME_R=0;
7423 REPLACE_PUTENV=0;
7424 REPLACE_QSORT_R=0;
7425 REPLACE_RANDOM=0;
7426 REPLACE_RANDOM_R=0;
7427 REPLACE_REALLOC=0;
7428 REPLACE_REALPATH=0;
7429 REPLACE_SETENV=0;
7430 REPLACE_SETSTATE=0;
7431 REPLACE_STRTOD=0;
7432 REPLACE_STRTOLD=0;
7433 REPLACE_UNSETENV=0;
7434 REPLACE_WCTOMB=0;
7435
7436
7437
7438
7439 for ac_func in $ac_func_list
7440 do :
7441 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7442 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7443 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7444 cat >>confdefs.h <<_ACEOF
7445 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7446 _ACEOF
7447
7448 fi
7449 done
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
7460 $as_echo_n "checking whether // is distinct from /... " >&6; }
7461 if ${gl_cv_double_slash_root+:} false; then :
7462 $as_echo_n "(cached) " >&6
7463 else
7464 if test x"$cross_compiling" = xyes ; then
7465 # When cross-compiling, there is no way to tell whether // is special
7466 # short of a list of hosts. However, the only known hosts to date
7467 # that have a distinct // are Apollo DomainOS (too old to port to),
7468 # Cygwin, and z/OS. If anyone knows of another system for which // has
7469 # special semantics and is distinct from /, please report it to
7470 # <bug-gnulib@gnu.org>.
7471 case $host in
7472 *-cygwin | i370-ibm-openedition)
7473 gl_cv_double_slash_root=yes ;;
7474 *)
7475 # Be optimistic and assume that / and // are the same when we
7476 # don't know.
7477 gl_cv_double_slash_root='unknown, assuming no' ;;
7478 esac
7479 else
7480 set x `ls -di / // 2>/dev/null`
7481 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
7482 gl_cv_double_slash_root=no
7483 else
7484 gl_cv_double_slash_root=yes
7485 fi
7486 fi
7487 fi
7488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
7489 $as_echo "$gl_cv_double_slash_root" >&6; }
7490 if test "$gl_cv_double_slash_root" = yes; then
7491
7492 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
7493
7494 fi
7495
7496
7497
7498
7499
7500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
7501 $as_echo_n "checking whether realpath works... " >&6; }
7502 if ${gl_cv_func_realpath_works+:} false; then :
7503 $as_echo_n "(cached) " >&6
7504 else
7505
7506 touch conftest.a
7507 mkdir conftest.d
7508 if test "$cross_compiling" = yes; then :
7509 case "$host_os" in
7510 # Guess yes on glibc systems.
7511 *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
7512 # Guess yes on musl systems.
7513 *-musl*) gl_cv_func_realpath_works="guessing yes" ;;
7514 # Guess no on native Windows.
7515 mingw*) gl_cv_func_realpath_works="guessing no" ;;
7516 # If we don't know, obey --enable-cross-guesses.
7517 *) gl_cv_func_realpath_works="$gl_cross_guess_normal" ;;
7518 esac
7519
7520 else
7521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7522 /* end confdefs.h. */
7523
7524
7525
7526 #include <stdlib.h>
7527 #if defined __MACH__ && defined __APPLE__
7528 /* Avoid a crash on Mac OS X. */
7529 #include <mach/mach.h>
7530 #include <mach/mach_error.h>
7531 #include <mach/thread_status.h>
7532 #include <mach/exception.h>
7533 #include <mach/task.h>
7534 #include <pthread.h>
7535 /* The exception port on which our thread listens. */
7536 static mach_port_t our_exception_port;
7537 /* The main function of the thread listening for exceptions of type
7538 EXC_BAD_ACCESS. */
7539 static void *
7540 mach_exception_thread (void *arg)
7541 {
7542 /* Buffer for a message to be received. */
7543 struct {
7544 mach_msg_header_t head;
7545 mach_msg_body_t msgh_body;
7546 char data[1024];
7547 } msg;
7548 mach_msg_return_t retval;
7549 /* Wait for a message on the exception port. */
7550 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
7551 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
7552 if (retval != MACH_MSG_SUCCESS)
7553 abort ();
7554 exit (1);
7555 }
7556 static void
7557 nocrash_init (void)
7558 {
7559 mach_port_t self = mach_task_self ();
7560 /* Allocate a port on which the thread shall listen for exceptions. */
7561 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
7562 == KERN_SUCCESS) {
7563 /* See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
7564 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
7565 MACH_MSG_TYPE_MAKE_SEND)
7566 == KERN_SUCCESS) {
7567 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
7568 for us. */
7569 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
7570 /* Create the thread listening on the exception port. */
7571 pthread_attr_t attr;
7572 pthread_t thread;
7573 if (pthread_attr_init (&attr) == 0
7574 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
7575 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
7576 pthread_attr_destroy (&attr);
7577 /* Replace the exception port info for these exceptions with our own.
7578 Note that we replace the exception port for the entire task, not only
7579 for a particular thread. This has the effect that when our exception
7580 port gets the message, the thread specific exception port has already
7581 been asked, and we don't need to bother about it.
7582 See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
7583 task_set_exception_ports (self, mask, our_exception_port,
7584 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
7585 }
7586 }
7587 }
7588 }
7589 #elif defined _WIN32 && ! defined __CYGWIN__
7590 /* Avoid a crash on native Windows. */
7591 #define WIN32_LEAN_AND_MEAN
7592 #include <windows.h>
7593 #include <winerror.h>
7594 static LONG WINAPI
7595 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
7596 {
7597 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
7598 {
7599 case EXCEPTION_ACCESS_VIOLATION:
7600 case EXCEPTION_IN_PAGE_ERROR:
7601 case EXCEPTION_STACK_OVERFLOW:
7602 case EXCEPTION_GUARD_PAGE:
7603 case EXCEPTION_PRIV_INSTRUCTION:
7604 case EXCEPTION_ILLEGAL_INSTRUCTION:
7605 case EXCEPTION_DATATYPE_MISALIGNMENT:
7606 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
7607 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
7608 exit (1);
7609 }
7610 return EXCEPTION_CONTINUE_SEARCH;
7611 }
7612 static void
7613 nocrash_init (void)
7614 {
7615 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
7616 }
7617 #else
7618 /* Avoid a crash on POSIX systems. */
7619 #include <signal.h>
7620 #include <unistd.h>
7621 /* A POSIX signal handler. */
7622 static void
7623 exception_handler (int sig)
7624 {
7625 _exit (1);
7626 }
7627 static void
7628 nocrash_init (void)
7629 {
7630 #ifdef SIGSEGV
7631 signal (SIGSEGV, exception_handler);
7632 #endif
7633 #ifdef SIGBUS
7634 signal (SIGBUS, exception_handler);
7635 #endif
7636 }
7637 #endif
7638
7639 #include <stdlib.h>
7640 #include <string.h>
7641
7642 int
7643 main ()
7644 {
7645
7646 int result = 0;
7647 {
7648 char *name = realpath ("conftest.a", NULL);
7649 if (!(name && *name == '/'))
7650 result |= 1;
7651 free (name);
7652 }
7653 {
7654 char *name = realpath ("conftest.b/../conftest.a", NULL);
7655 if (name != NULL)
7656 result |= 2;
7657 free (name);
7658 }
7659 {
7660 char *name = realpath ("conftest.a/", NULL);
7661 if (name != NULL)
7662 result |= 4;
7663 free (name);
7664 }
7665 {
7666 char *name1 = realpath (".", NULL);
7667 char *name2 = realpath ("conftest.d//./..", NULL);
7668 if (! name1 || ! name2 || strcmp (name1, name2))
7669 result |= 8;
7670 free (name1);
7671 free (name2);
7672 }
7673 return result;
7674
7675 ;
7676 return 0;
7677 }
7678
7679 _ACEOF
7680 if ac_fn_c_try_run "$LINENO"; then :
7681 gl_cv_func_realpath_works=yes
7682 else
7683 gl_cv_func_realpath_works=no
7684 fi
7685 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7686 conftest.$ac_objext conftest.beam conftest.$ac_ext
7687 fi
7688
7689 rm -rf conftest.a conftest.d
7690
7691 fi
7692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
7693 $as_echo "$gl_cv_func_realpath_works" >&6; }
7694 case "$gl_cv_func_realpath_works" in
7695 *yes)
7696
7697 $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
7698
7699 ;;
7700 esac
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712 GNULIB_ACCESS=0;
7713 GNULIB_CHDIR=0;
7714 GNULIB_CHOWN=0;
7715 GNULIB_CLOSE=0;
7716 GNULIB_COPY_FILE_RANGE=0;
7717 GNULIB_DUP=0;
7718 GNULIB_DUP2=0;
7719 GNULIB_DUP3=0;
7720 GNULIB_ENVIRON=0;
7721 GNULIB_EUIDACCESS=0;
7722 GNULIB_FACCESSAT=0;
7723 GNULIB_FCHDIR=0;
7724 GNULIB_FCHOWNAT=0;
7725 GNULIB_FDATASYNC=0;
7726 GNULIB_FSYNC=0;
7727 GNULIB_FTRUNCATE=0;
7728 GNULIB_GETCWD=0;
7729 GNULIB_GETDOMAINNAME=0;
7730 GNULIB_GETDTABLESIZE=0;
7731 GNULIB_GETGROUPS=0;
7732 GNULIB_GETHOSTNAME=0;
7733 GNULIB_GETLOGIN=0;
7734 GNULIB_GETLOGIN_R=0;
7735 GNULIB_GETOPT_POSIX=0;
7736 GNULIB_GETPAGESIZE=0;
7737 GNULIB_GETPASS=0;
7738 GNULIB_GETUSERSHELL=0;
7739 GNULIB_GROUP_MEMBER=0;
7740 GNULIB_ISATTY=0;
7741 GNULIB_LCHOWN=0;
7742 GNULIB_LINK=0;
7743 GNULIB_LINKAT=0;
7744 GNULIB_LSEEK=0;
7745 GNULIB_PIPE=0;
7746 GNULIB_PIPE2=0;
7747 GNULIB_PREAD=0;
7748 GNULIB_PWRITE=0;
7749 GNULIB_READ=0;
7750 GNULIB_READLINK=0;
7751 GNULIB_READLINKAT=0;
7752 GNULIB_RMDIR=0;
7753 GNULIB_SETHOSTNAME=0;
7754 GNULIB_SLEEP=0;
7755 GNULIB_SYMLINK=0;
7756 GNULIB_SYMLINKAT=0;
7757 GNULIB_TRUNCATE=0;
7758 GNULIB_TTYNAME_R=0;
7759 GNULIB_UNISTD_H_NONBLOCKING=0;
7760 GNULIB_UNISTD_H_SIGPIPE=0;
7761 GNULIB_UNLINK=0;
7762 GNULIB_UNLINKAT=0;
7763 GNULIB_USLEEP=0;
7764 GNULIB_WRITE=0;
7765 HAVE_CHOWN=1;
7766 HAVE_COPY_FILE_RANGE=1;
7767 HAVE_DUP2=1;
7768 HAVE_DUP3=1;
7769 HAVE_EUIDACCESS=1;
7770 HAVE_FACCESSAT=1;
7771 HAVE_FCHDIR=1;
7772 HAVE_FCHOWNAT=1;
7773 HAVE_FDATASYNC=1;
7774 HAVE_FSYNC=1;
7775 HAVE_FTRUNCATE=1;
7776 HAVE_GETDTABLESIZE=1;
7777 HAVE_GETGROUPS=1;
7778 HAVE_GETHOSTNAME=1;
7779 HAVE_GETLOGIN=1;
7780 HAVE_GETPAGESIZE=1;
7781 HAVE_GETPASS=1;
7782 HAVE_GROUP_MEMBER=1;
7783 HAVE_LCHOWN=1;
7784 HAVE_LINK=1;
7785 HAVE_LINKAT=1;
7786 HAVE_PIPE=1;
7787 HAVE_PIPE2=1;
7788 HAVE_PREAD=1;
7789 HAVE_PWRITE=1;
7790 HAVE_READLINK=1;
7791 HAVE_READLINKAT=1;
7792 HAVE_SETHOSTNAME=1;
7793 HAVE_SLEEP=1;
7794 HAVE_SYMLINK=1;
7795 HAVE_SYMLINKAT=1;
7796 HAVE_UNLINKAT=1;
7797 HAVE_USLEEP=1;
7798 HAVE_DECL_ENVIRON=1;
7799 HAVE_DECL_FCHDIR=1;
7800 HAVE_DECL_FDATASYNC=1;
7801 HAVE_DECL_GETDOMAINNAME=1;
7802 HAVE_DECL_GETLOGIN=1;
7803 HAVE_DECL_GETLOGIN_R=1;
7804 HAVE_DECL_GETPAGESIZE=1;
7805 HAVE_DECL_GETUSERSHELL=1;
7806 HAVE_DECL_SETHOSTNAME=1;
7807 HAVE_DECL_TRUNCATE=1;
7808 HAVE_DECL_TTYNAME_R=1;
7809 HAVE_OS_H=0;
7810 HAVE_SYS_PARAM_H=0;
7811 REPLACE_ACCESS=0;
7812 REPLACE_CHOWN=0;
7813 REPLACE_CLOSE=0;
7814 REPLACE_DUP=0;
7815 REPLACE_DUP2=0;
7816 REPLACE_FACCESSAT=0;
7817 REPLACE_FCHOWNAT=0;
7818 REPLACE_FTRUNCATE=0;
7819 REPLACE_GETCWD=0;
7820 REPLACE_GETDOMAINNAME=0;
7821 REPLACE_GETDTABLESIZE=0;
7822 REPLACE_GETLOGIN_R=0;
7823 REPLACE_GETGROUPS=0;
7824 REPLACE_GETPAGESIZE=0;
7825 REPLACE_GETPASS=0;
7826 REPLACE_ISATTY=0;
7827 REPLACE_LCHOWN=0;
7828 REPLACE_LINK=0;
7829 REPLACE_LINKAT=0;
7830 REPLACE_LSEEK=0;
7831 REPLACE_PREAD=0;
7832 REPLACE_PWRITE=0;
7833 REPLACE_READ=0;
7834 REPLACE_READLINK=0;
7835 REPLACE_READLINKAT=0;
7836 REPLACE_RMDIR=0;
7837 REPLACE_SLEEP=0;
7838 REPLACE_SYMLINK=0;
7839 REPLACE_SYMLINKAT=0;
7840 REPLACE_TRUNCATE=0;
7841 REPLACE_TTYNAME_R=0;
7842 REPLACE_UNLINK=0;
7843 REPLACE_UNLINKAT=0;
7844 REPLACE_USLEEP=0;
7845 REPLACE_WRITE=0;
7846 UNISTD_H_HAVE_WINSOCK2_H=0;
7847 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859 if test $ac_cv_func__set_invalid_parameter_handler = yes; then
7860 HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
7861
7862 $as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
7863
7864 else
7865 HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
7866 fi
7867
7868
7869
7870
7871
7872 GNULIB_OPENDIR=0;
7873 GNULIB_READDIR=0;
7874 GNULIB_REWINDDIR=0;
7875 GNULIB_CLOSEDIR=0;
7876 GNULIB_DIRFD=0;
7877 GNULIB_FDOPENDIR=0;
7878 GNULIB_SCANDIR=0;
7879 GNULIB_ALPHASORT=0;
7880 HAVE_OPENDIR=1;
7881 HAVE_READDIR=1;
7882 HAVE_REWINDDIR=1;
7883 HAVE_CLOSEDIR=1;
7884 HAVE_DECL_DIRFD=1;
7885 HAVE_DECL_FDOPENDIR=1;
7886 HAVE_FDOPENDIR=1;
7887 HAVE_SCANDIR=1;
7888 HAVE_ALPHASORT=1;
7889 REPLACE_OPENDIR=0;
7890 REPLACE_CLOSEDIR=0;
7891 REPLACE_DIRFD=0;
7892 REPLACE_FDOPENDIR=0;
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
7904 $as_echo_n "checking if environ is properly declared... " >&6; }
7905 if ${gt_cv_var_environ_declaration+:} false; then :
7906 $as_echo_n "(cached) " >&6
7907 else
7908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7909 /* end confdefs.h. */
7910 #if HAVE_UNISTD_H
7911 #include <unistd.h>
7912 #endif
7913 /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
7914 #include <stdlib.h>
7915
7916 extern struct { int foo; } environ;
7917 int
7918 main ()
7919 {
7920 environ.foo = 1;
7921 ;
7922 return 0;
7923 }
7924 _ACEOF
7925 if ac_fn_c_try_compile "$LINENO"; then :
7926 gt_cv_var_environ_declaration=no
7927 else
7928 gt_cv_var_environ_declaration=yes
7929 fi
7930 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7931 fi
7932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
7933 $as_echo "$gt_cv_var_environ_declaration" >&6; }
7934 if test $gt_cv_var_environ_declaration = yes; then
7935
7936 $as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
7937
7938 fi
7939
7940
7941 if test $gt_cv_var_environ_declaration != yes; then
7942 HAVE_DECL_ENVIRON=0
7943 fi
7944
7945
7946
7947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
7948 $as_echo_n "checking for complete errno.h... " >&6; }
7949 if ${gl_cv_header_errno_h_complete+:} false; then :
7950 $as_echo_n "(cached) " >&6
7951 else
7952
7953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7954 /* end confdefs.h. */
7955
7956 #include <errno.h>
7957 #if !defined ETXTBSY
7958 booboo
7959 #endif
7960 #if !defined ENOMSG
7961 booboo
7962 #endif
7963 #if !defined EIDRM
7964 booboo
7965 #endif
7966 #if !defined ENOLINK
7967 booboo
7968 #endif
7969 #if !defined EPROTO
7970 booboo
7971 #endif
7972 #if !defined EMULTIHOP
7973 booboo
7974 #endif
7975 #if !defined EBADMSG
7976 booboo
7977 #endif
7978 #if !defined EOVERFLOW
7979 booboo
7980 #endif
7981 #if !defined ENOTSUP
7982 booboo
7983 #endif
7984 #if !defined ENETRESET
7985 booboo
7986 #endif
7987 #if !defined ECONNABORTED
7988 booboo
7989 #endif
7990 #if !defined ESTALE
7991 booboo
7992 #endif
7993 #if !defined EDQUOT
7994 booboo
7995 #endif
7996 #if !defined ECANCELED
7997 booboo
7998 #endif
7999 #if !defined EOWNERDEAD
8000 booboo
8001 #endif
8002 #if !defined ENOTRECOVERABLE
8003 booboo
8004 #endif
8005 #if !defined EILSEQ
8006 booboo
8007 #endif
8008
8009 _ACEOF
8010 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8011 $EGREP "booboo" >/dev/null 2>&1; then :
8012 gl_cv_header_errno_h_complete=no
8013 else
8014 gl_cv_header_errno_h_complete=yes
8015 fi
8016 rm -f conftest*
8017
8018
8019 fi
8020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
8021 $as_echo "$gl_cv_header_errno_h_complete" >&6; }
8022 if test $gl_cv_header_errno_h_complete = yes; then
8023 ERRNO_H=''
8024 else
8025
8026
8027
8028
8029
8030
8031
8032
8033 if test $gl_cv_have_include_next = yes; then
8034 gl_cv_next_errno_h='<'errno.h'>'
8035 else
8036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
8037 $as_echo_n "checking absolute name of <errno.h>... " >&6; }
8038 if ${gl_cv_next_errno_h+:} false; then :
8039 $as_echo_n "(cached) " >&6
8040 else
8041
8042
8043
8044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8045 /* end confdefs.h. */
8046 #include <errno.h>
8047 _ACEOF
8048 case "$host_os" in
8049 aix*) gl_absname_cpp="$ac_cpp -C" ;;
8050 *) gl_absname_cpp="$ac_cpp" ;;
8051 esac
8052
8053 case "$host_os" in
8054 mingw*)
8055 gl_dirsep_regex='[/\\]'
8056 ;;
8057 *)
8058 gl_dirsep_regex='\/'
8059 ;;
8060 esac
8061 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
8062 gl_header_literal_regex=`echo 'errno.h' \
8063 | sed -e "$gl_make_literal_regex_sed"`
8064 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
8065 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
8066 s|^/[^/]|//&|
8067 p
8068 q
8069 }'
8070
8071 gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
8072 sed -n "$gl_absolute_header_sed"`
8073
8074 gl_header=$gl_cv_absolute_errno_h
8075 gl_cv_next_errno_h='"'$gl_header'"'
8076
8077
8078 fi
8079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
8080 $as_echo "$gl_cv_next_errno_h" >&6; }
8081 fi
8082 NEXT_ERRNO_H=$gl_cv_next_errno_h
8083
8084 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
8085 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
8086 gl_next_as_first_directive='<'errno.h'>'
8087 else
8088 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
8089 gl_next_as_first_directive=$gl_cv_next_errno_h
8090 fi
8091 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
8092
8093
8094
8095
8096 ERRNO_H='errno.h'
8097 fi
8098
8099 if test -n "$ERRNO_H"; then
8100 GL_GENERATE_ERRNO_H_TRUE=
8101 GL_GENERATE_ERRNO_H_FALSE='#'
8102 else
8103 GL_GENERATE_ERRNO_H_TRUE='#'
8104 GL_GENERATE_ERRNO_H_FALSE=
8105 fi
8106
8107
8108 if test -n "$ERRNO_H"; then
8109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
8110 $as_echo_n "checking for EMULTIHOP value... " >&6; }
8111 if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then :
8112 $as_echo_n "(cached) " >&6
8113 else
8114
8115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8116 /* end confdefs.h. */
8117
8118 #include <errno.h>
8119 #ifdef EMULTIHOP
8120 yes
8121 #endif
8122
8123 _ACEOF
8124 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8125 $EGREP "yes" >/dev/null 2>&1; then :
8126 gl_cv_header_errno_h_EMULTIHOP=yes
8127 else
8128 gl_cv_header_errno_h_EMULTIHOP=no
8129 fi
8130 rm -f conftest*
8131
8132 if test $gl_cv_header_errno_h_EMULTIHOP = no; then
8133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8134 /* end confdefs.h. */
8135
8136 #define _XOPEN_SOURCE_EXTENDED 1
8137 #include <errno.h>
8138 #ifdef EMULTIHOP
8139 yes
8140 #endif
8141
8142 _ACEOF
8143 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8144 $EGREP "yes" >/dev/null 2>&1; then :
8145 gl_cv_header_errno_h_EMULTIHOP=hidden
8146 fi
8147 rm -f conftest*
8148
8149 if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
8150 if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
8151 #define _XOPEN_SOURCE_EXTENDED 1
8152 #include <errno.h>
8153 /* The following two lines are a workaround against an autoconf-2.52 bug. */
8154 #include <stdio.h>
8155 #include <stdlib.h>
8156 "; then :
8157
8158 fi
8159
8160 fi
8161 fi
8162
8163 fi
8164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
8165 $as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
8166 case $gl_cv_header_errno_h_EMULTIHOP in
8167 yes | no)
8168 EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
8169 ;;
8170 *)
8171 EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
8172 ;;
8173 esac
8174
8175
8176 fi
8177
8178
8179 if test -n "$ERRNO_H"; then
8180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
8181 $as_echo_n "checking for ENOLINK value... " >&6; }
8182 if ${gl_cv_header_errno_h_ENOLINK+:} false; then :
8183 $as_echo_n "(cached) " >&6
8184 else
8185
8186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8187 /* end confdefs.h. */
8188
8189 #include <errno.h>
8190 #ifdef ENOLINK
8191 yes
8192 #endif
8193
8194 _ACEOF
8195 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8196 $EGREP "yes" >/dev/null 2>&1; then :
8197 gl_cv_header_errno_h_ENOLINK=yes
8198 else
8199 gl_cv_header_errno_h_ENOLINK=no
8200 fi
8201 rm -f conftest*
8202
8203 if test $gl_cv_header_errno_h_ENOLINK = no; then
8204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8205 /* end confdefs.h. */
8206
8207 #define _XOPEN_SOURCE_EXTENDED 1
8208 #include <errno.h>
8209 #ifdef ENOLINK
8210 yes
8211 #endif
8212
8213 _ACEOF
8214 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8215 $EGREP "yes" >/dev/null 2>&1; then :
8216 gl_cv_header_errno_h_ENOLINK=hidden
8217 fi
8218 rm -f conftest*
8219
8220 if test $gl_cv_header_errno_h_ENOLINK = hidden; then
8221 if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
8222 #define _XOPEN_SOURCE_EXTENDED 1
8223 #include <errno.h>
8224 /* The following two lines are a workaround against an autoconf-2.52 bug. */
8225 #include <stdio.h>
8226 #include <stdlib.h>
8227 "; then :
8228
8229 fi
8230
8231 fi
8232 fi
8233
8234 fi
8235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
8236 $as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
8237 case $gl_cv_header_errno_h_ENOLINK in
8238 yes | no)
8239 ENOLINK_HIDDEN=0; ENOLINK_VALUE=
8240 ;;
8241 *)
8242 ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
8243 ;;
8244 esac
8245
8246
8247 fi
8248
8249
8250 if test -n "$ERRNO_H"; then
8251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
8252 $as_echo_n "checking for EOVERFLOW value... " >&6; }
8253 if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then :
8254 $as_echo_n "(cached) " >&6
8255 else
8256
8257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8258 /* end confdefs.h. */
8259
8260 #include <errno.h>
8261 #ifdef EOVERFLOW
8262 yes
8263 #endif
8264
8265 _ACEOF
8266 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8267 $EGREP "yes" >/dev/null 2>&1; then :
8268 gl_cv_header_errno_h_EOVERFLOW=yes
8269 else
8270 gl_cv_header_errno_h_EOVERFLOW=no
8271 fi
8272 rm -f conftest*
8273
8274 if test $gl_cv_header_errno_h_EOVERFLOW = no; then
8275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8276 /* end confdefs.h. */
8277
8278 #define _XOPEN_SOURCE_EXTENDED 1
8279 #include <errno.h>
8280 #ifdef EOVERFLOW
8281 yes
8282 #endif
8283
8284 _ACEOF
8285 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8286 $EGREP "yes" >/dev/null 2>&1; then :
8287 gl_cv_header_errno_h_EOVERFLOW=hidden
8288 fi
8289 rm -f conftest*
8290
8291 if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
8292 if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
8293 #define _XOPEN_SOURCE_EXTENDED 1
8294 #include <errno.h>
8295 /* The following two lines are a workaround against an autoconf-2.52 bug. */
8296 #include <stdio.h>
8297 #include <stdlib.h>
8298 "; then :
8299
8300 fi
8301
8302 fi
8303 fi
8304
8305 fi
8306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
8307 $as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
8308 case $gl_cv_header_errno_h_EOVERFLOW in
8309 yes | no)
8310 EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
8311 ;;
8312 *)
8313 EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
8314 ;;
8315 esac
8316
8317
8318 fi
8319
8320
8321 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
8322 if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
8323 ac_have_decl=1
8324 else
8325 ac_have_decl=0
8326 fi
8327
8328 cat >>confdefs.h <<_ACEOF
8329 #define HAVE_DECL_STRERROR_R $ac_have_decl
8330 _ACEOF
8331
8332 for ac_func in strerror_r
8333 do :
8334 ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
8335 if test "x$ac_cv_func_strerror_r" = xyes; then :
8336 cat >>confdefs.h <<_ACEOF
8337 #define HAVE_STRERROR_R 1
8338 _ACEOF
8339
8340 fi
8341 done
8342
8343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
8344 $as_echo_n "checking whether strerror_r returns char *... " >&6; }
8345 if ${ac_cv_func_strerror_r_char_p+:} false; then :
8346 $as_echo_n "(cached) " >&6
8347 else
8348
8349 ac_cv_func_strerror_r_char_p=no
8350 if test $ac_cv_have_decl_strerror_r = yes; then
8351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8352 /* end confdefs.h. */
8353 $ac_includes_default
8354 int
8355 main ()
8356 {
8357
8358 char buf[100];
8359 char x = *strerror_r (0, buf, sizeof buf);
8360 char *p = strerror_r (0, buf, sizeof buf);
8361 return !p || x;
8362
8363 ;
8364 return 0;
8365 }
8366 _ACEOF
8367 if ac_fn_c_try_compile "$LINENO"; then :
8368 ac_cv_func_strerror_r_char_p=yes
8369 fi
8370 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8371 else
8372 # strerror_r is not declared. Choose between
8373 # systems that have relatively inaccessible declarations for the
8374 # function. BeOS and DEC UNIX 4.0 fall in this category, but the
8375 # former has a strerror_r that returns char*, while the latter
8376 # has a strerror_r that returns `int'.
8377 # This test should segfault on the DEC system.
8378 if test "$cross_compiling" = yes; then :
8379 :
8380 else
8381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8382 /* end confdefs.h. */
8383 $ac_includes_default
8384 extern char *strerror_r ();
8385 int
8386 main ()
8387 {
8388 char buf[100];
8389 char x = *strerror_r (0, buf, sizeof buf);
8390 return ! isalpha (x);
8391 ;
8392 return 0;
8393 }
8394 _ACEOF
8395 if ac_fn_c_try_run "$LINENO"; then :
8396 ac_cv_func_strerror_r_char_p=yes
8397 fi
8398 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8399 conftest.$ac_objext conftest.beam conftest.$ac_ext
8400 fi
8401
8402 fi
8403
8404 fi
8405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
8406 $as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
8407 if test $ac_cv_func_strerror_r_char_p = yes; then
8408
8409 $as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
8410
8411 fi
8412
8413
8414
8415
8416 ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default"
8417 if test "x$ac_cv_have_decl_fchdir" = xyes; then :
8418 ac_have_decl=1
8419 else
8420 ac_have_decl=0
8421 fi
8422
8423 cat >>confdefs.h <<_ACEOF
8424 #define HAVE_DECL_FCHDIR $ac_have_decl
8425 _ACEOF
8426
8427
8428 GNULIB_CREAT=0;
8429 GNULIB_FCNTL=0;
8430 GNULIB_NONBLOCKING=0;
8431 GNULIB_OPEN=0;
8432 GNULIB_OPENAT=0;
8433 HAVE_FCNTL=1;
8434 HAVE_OPENAT=1;
8435 REPLACE_CREAT=0;
8436 REPLACE_FCNTL=0;
8437 REPLACE_OPEN=0;
8438 REPLACE_OPENAT=0;
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
8450 $as_echo_n "checking for working fcntl.h... " >&6; }
8451 if ${gl_cv_header_working_fcntl_h+:} false; then :
8452 $as_echo_n "(cached) " >&6
8453 else
8454 if test "$cross_compiling" = yes; then :
8455 case "$host_os" in
8456 # Guess 'no' on native Windows.
8457 mingw*) gl_cv_header_working_fcntl_h='no' ;;
8458 *) gl_cv_header_working_fcntl_h=cross-compiling ;;
8459 esac
8460
8461 else
8462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8463 /* end confdefs.h. */
8464 #include <sys/types.h>
8465 #include <sys/stat.h>
8466 #if HAVE_UNISTD_H
8467 # include <unistd.h>
8468 #else /* on Windows with MSVC */
8469 # include <io.h>
8470 # include <stdlib.h>
8471 # defined sleep(n) _sleep ((n) * 1000)
8472 #endif
8473 #include <fcntl.h>
8474 #ifndef O_NOATIME
8475 #define O_NOATIME 0
8476 #endif
8477 #ifndef O_NOFOLLOW
8478 #define O_NOFOLLOW 0
8479 #endif
8480 static int const constants[] =
8481 {
8482 O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
8483 O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
8484 };
8485
8486 int
8487 main ()
8488 {
8489
8490 int result = !constants;
8491 #if HAVE_SYMLINK
8492 {
8493 static char const sym[] = "conftest.sym";
8494 if (symlink ("/dev/null", sym) != 0)
8495 result |= 2;
8496 else
8497 {
8498 int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
8499 if (fd >= 0)
8500 {
8501 close (fd);
8502 result |= 4;
8503 }
8504 }
8505 if (unlink (sym) != 0 || symlink (".", sym) != 0)
8506 result |= 2;
8507 else
8508 {
8509 int fd = open (sym, O_RDONLY | O_NOFOLLOW);
8510 if (fd >= 0)
8511 {
8512 close (fd);
8513 result |= 4;
8514 }
8515 }
8516 unlink (sym);
8517 }
8518 #endif
8519 {
8520 static char const file[] = "confdefs.h";
8521 int fd = open (file, O_RDONLY | O_NOATIME);
8522 if (fd < 0)
8523 result |= 8;
8524 else
8525 {
8526 struct stat st0;
8527 if (fstat (fd, &st0) != 0)
8528 result |= 16;
8529 else
8530 {
8531 char c;
8532 sleep (1);
8533 if (read (fd, &c, 1) != 1)
8534 result |= 24;
8535 else
8536 {
8537 if (close (fd) != 0)
8538 result |= 32;
8539 else
8540 {
8541 struct stat st1;
8542 if (stat (file, &st1) != 0)
8543 result |= 40;
8544 else
8545 if (st0.st_atime != st1.st_atime)
8546 result |= 64;
8547 }
8548 }
8549 }
8550 }
8551 }
8552 return result;
8553 ;
8554 return 0;
8555 }
8556 _ACEOF
8557 if ac_fn_c_try_run "$LINENO"; then :
8558 gl_cv_header_working_fcntl_h=yes
8559 else
8560 case $? in #(
8561 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
8562 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
8563 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
8564 *) gl_cv_header_working_fcntl_h='no';;
8565 esac
8566 fi
8567 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8568 conftest.$ac_objext conftest.beam conftest.$ac_ext
8569 fi
8570
8571
8572 fi
8573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
8574 $as_echo "$gl_cv_header_working_fcntl_h" >&6; }
8575
8576 case $gl_cv_header_working_fcntl_h in #(
8577 *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
8578 *) ac_val=1;;
8579 esac
8580
8581 cat >>confdefs.h <<_ACEOF
8582 #define HAVE_WORKING_O_NOATIME $ac_val
8583 _ACEOF
8584
8585
8586 case $gl_cv_header_working_fcntl_h in #(
8587 *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
8588 *) ac_val=1;;
8589 esac
8590
8591 cat >>confdefs.h <<_ACEOF
8592 #define HAVE_WORKING_O_NOFOLLOW $ac_val
8593 _ACEOF
8594
8595
8596 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
8597 if test "x$ac_cv_type_pid_t" = xyes; then :
8598
8599 else
8600
8601 cat >>confdefs.h <<_ACEOF
8602 #define pid_t int
8603 _ACEOF
8604
8605 fi
8606
8607 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
8608 if test "x$ac_cv_type_mode_t" = xyes; then :
8609
8610 else
8611
8612 cat >>confdefs.h <<_ACEOF
8613 #define mode_t int
8614 _ACEOF
8615
8616 fi
8617
8618
8619
8620
8621
8622
8623 GNULIB_FNMATCH=0;
8624 HAVE_FNMATCH=1;
8625 REPLACE_FNMATCH=0;
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642 if test $gl_cv_have_include_next = yes; then
8643 gl_cv_next_fnmatch_h='<'fnmatch.h'>'
8644 else
8645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fnmatch.h>" >&5
8646 $as_echo_n "checking absolute name of <fnmatch.h>... " >&6; }
8647 if ${gl_cv_next_fnmatch_h+:} false; then :
8648 $as_echo_n "(cached) " >&6
8649 else
8650
8651 if test $ac_cv_header_fnmatch_h = yes; then
8652
8653
8654
8655
8656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8657 /* end confdefs.h. */
8658 #include <fnmatch.h>
8659 _ACEOF
8660 case "$host_os" in
8661 aix*) gl_absname_cpp="$ac_cpp -C" ;;
8662 *) gl_absname_cpp="$ac_cpp" ;;
8663 esac
8664
8665 case "$host_os" in
8666 mingw*)
8667 gl_dirsep_regex='[/\\]'
8668 ;;
8669 *)
8670 gl_dirsep_regex='\/'
8671 ;;
8672 esac
8673 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
8674 gl_header_literal_regex=`echo 'fnmatch.h' \
8675 | sed -e "$gl_make_literal_regex_sed"`
8676 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
8677 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
8678 s|^/[^/]|//&|
8679 p
8680 q
8681 }'
8682
8683 gl_cv_absolute_fnmatch_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
8684 sed -n "$gl_absolute_header_sed"`
8685
8686 gl_header=$gl_cv_absolute_fnmatch_h
8687 gl_cv_next_fnmatch_h='"'$gl_header'"'
8688 else
8689 gl_cv_next_fnmatch_h='<'fnmatch.h'>'
8690 fi
8691
8692
8693 fi
8694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fnmatch_h" >&5
8695 $as_echo "$gl_cv_next_fnmatch_h" >&6; }
8696 fi
8697 NEXT_FNMATCH_H=$gl_cv_next_fnmatch_h
8698
8699 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
8700 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
8701 gl_next_as_first_directive='<'fnmatch.h'>'
8702 else
8703 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
8704 gl_next_as_first_directive=$gl_cv_next_fnmatch_h
8705 fi
8706 NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H=$gl_next_as_first_directive
8707
8708
8709
8710
8711
8712
8713
8714 if test $ac_cv_header_fnmatch_h = yes; then
8715 HAVE_FNMATCH_H=1
8716 else
8717 HAVE_FNMATCH_H=0
8718 fi
8719
8720
8721 FNMATCH_H=''
8722 if false; then
8723 FNMATCH_H=fnmatch.h
8724 else
8725 if test $ac_cv_header_fnmatch_h != yes; then
8726 FNMATCH_H=fnmatch.h
8727 fi
8728 fi
8729
8730
8731 if test -n "$FNMATCH_H"; then
8732 GL_GENERATE_FNMATCH_H_TRUE=
8733 GL_GENERATE_FNMATCH_H_FALSE='#'
8734 else
8735 GL_GENERATE_FNMATCH_H_TRUE='#'
8736 GL_GENERATE_FNMATCH_H_FALSE=
8737 fi
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
8749 $as_echo_n "checking for mbstate_t... " >&6; }
8750 if ${ac_cv_type_mbstate_t+:} false; then :
8751 $as_echo_n "(cached) " >&6
8752 else
8753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8754 /* end confdefs.h. */
8755 $ac_includes_default
8756 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
8757 <wchar.h>.
8758 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8759 included before <wchar.h>. */
8760 #include <stddef.h>
8761 #include <stdio.h>
8762 #include <time.h>
8763 #include <wchar.h>
8764 int
8765 main ()
8766 {
8767 mbstate_t x; return sizeof x;
8768 ;
8769 return 0;
8770 }
8771 _ACEOF
8772 if ac_fn_c_try_compile "$LINENO"; then :
8773 ac_cv_type_mbstate_t=yes
8774 else
8775 ac_cv_type_mbstate_t=no
8776 fi
8777 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8778 fi
8779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
8780 $as_echo "$ac_cv_type_mbstate_t" >&6; }
8781 if test $ac_cv_type_mbstate_t = yes; then
8782
8783 $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
8784
8785 else
8786
8787 $as_echo "#define mbstate_t int" >>confdefs.h
8788
8789 fi
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808 GNULIB_ACOSF=0;
8809 GNULIB_ACOSL=0;
8810 GNULIB_ASINF=0;
8811 GNULIB_ASINL=0;
8812 GNULIB_ATANF=0;
8813 GNULIB_ATANL=0;
8814 GNULIB_ATAN2F=0;
8815 GNULIB_CBRT=0;
8816 GNULIB_CBRTF=0;
8817 GNULIB_CBRTL=0;
8818 GNULIB_CEIL=0;
8819 GNULIB_CEILF=0;
8820 GNULIB_CEILL=0;
8821 GNULIB_COPYSIGN=0;
8822 GNULIB_COPYSIGNF=0;
8823 GNULIB_COPYSIGNL=0;
8824 GNULIB_COSF=0;
8825 GNULIB_COSL=0;
8826 GNULIB_COSHF=0;
8827 GNULIB_EXPF=0;
8828 GNULIB_EXPL=0;
8829 GNULIB_EXP2=0;
8830 GNULIB_EXP2F=0;
8831 GNULIB_EXP2L=0;
8832 GNULIB_EXPM1=0;
8833 GNULIB_EXPM1F=0;
8834 GNULIB_EXPM1L=0;
8835 GNULIB_FABSF=0;
8836 GNULIB_FABSL=0;
8837 GNULIB_FLOOR=0;
8838 GNULIB_FLOORF=0;
8839 GNULIB_FLOORL=0;
8840 GNULIB_FMA=0;
8841 GNULIB_FMAF=0;
8842 GNULIB_FMAL=0;
8843 GNULIB_FMOD=0;
8844 GNULIB_FMODF=0;
8845 GNULIB_FMODL=0;
8846 GNULIB_FREXPF=0;
8847 GNULIB_FREXP=0;
8848 GNULIB_FREXPL=0;
8849 GNULIB_HYPOT=0;
8850 GNULIB_HYPOTF=0;
8851 GNULIB_HYPOTL=0;
8852 GNULIB_ILOGB=0;
8853 GNULIB_ILOGBF=0;
8854 GNULIB_ILOGBL=0;
8855 GNULIB_ISFINITE=0;
8856 GNULIB_ISINF=0;
8857 GNULIB_ISNAN=0;
8858 GNULIB_ISNANF=0;
8859 GNULIB_ISNAND=0;
8860 GNULIB_ISNANL=0;
8861 GNULIB_LDEXPF=0;
8862 GNULIB_LDEXPL=0;
8863 GNULIB_LOG=0;
8864 GNULIB_LOGF=0;
8865 GNULIB_LOGL=0;
8866 GNULIB_LOG10=0;
8867 GNULIB_LOG10F=0;
8868 GNULIB_LOG10L=0;
8869 GNULIB_LOG1P=0;
8870 GNULIB_LOG1PF=0;
8871 GNULIB_LOG1PL=0;
8872 GNULIB_LOG2=0;
8873 GNULIB_LOG2F=0;
8874 GNULIB_LOG2L=0;
8875 GNULIB_LOGB=0;
8876 GNULIB_LOGBF=0;
8877 GNULIB_LOGBL=0;
8878 GNULIB_MODF=0;
8879 GNULIB_MODFF=0;
8880 GNULIB_MODFL=0;
8881 GNULIB_POWF=0;
8882 GNULIB_REMAINDER=0;
8883 GNULIB_REMAINDERF=0;
8884 GNULIB_REMAINDERL=0;
8885 GNULIB_RINT=0;
8886 GNULIB_RINTF=0;
8887 GNULIB_RINTL=0;
8888 GNULIB_ROUND=0;
8889 GNULIB_ROUNDF=0;
8890 GNULIB_ROUNDL=0;
8891 GNULIB_SIGNBIT=0;
8892 GNULIB_SINF=0;
8893 GNULIB_SINL=0;
8894 GNULIB_SINHF=0;
8895 GNULIB_SQRTF=0;
8896 GNULIB_SQRTL=0;
8897 GNULIB_TANF=0;
8898 GNULIB_TANL=0;
8899 GNULIB_TANHF=0;
8900 GNULIB_TRUNC=0;
8901 GNULIB_TRUNCF=0;
8902 GNULIB_TRUNCL=0;
8903 HAVE_ACOSF=1;
8904 HAVE_ACOSL=1;
8905 HAVE_ASINF=1;
8906 HAVE_ASINL=1;
8907 HAVE_ATANF=1;
8908 HAVE_ATANL=1;
8909 HAVE_ATAN2F=1;
8910 HAVE_CBRT=1;
8911 HAVE_CBRTF=1;
8912 HAVE_CBRTL=1;
8913 HAVE_COPYSIGN=1;
8914 HAVE_COPYSIGNL=1;
8915 HAVE_COSF=1;
8916 HAVE_COSL=1;
8917 HAVE_COSHF=1;
8918 HAVE_EXPF=1;
8919 HAVE_EXPL=1;
8920 HAVE_EXPM1=1;
8921 HAVE_EXPM1F=1;
8922 HAVE_FABSF=1;
8923 HAVE_FABSL=1;
8924 HAVE_FMA=1;
8925 HAVE_FMAF=1;
8926 HAVE_FMAL=1;
8927 HAVE_FMODF=1;
8928 HAVE_FMODL=1;
8929 HAVE_FREXPF=1;
8930 HAVE_HYPOTF=1;
8931 HAVE_HYPOTL=1;
8932 HAVE_ILOGB=1;
8933 HAVE_ILOGBF=1;
8934 HAVE_ILOGBL=1;
8935 HAVE_ISNANF=1;
8936 HAVE_ISNAND=1;
8937 HAVE_ISNANL=1;
8938 HAVE_LDEXPF=1;
8939 HAVE_LOGF=1;
8940 HAVE_LOGL=1;
8941 HAVE_LOG10F=1;
8942 HAVE_LOG10L=1;
8943 HAVE_LOG1P=1;
8944 HAVE_LOG1PF=1;
8945 HAVE_LOG1PL=1;
8946 HAVE_LOGBF=1;
8947 HAVE_LOGBL=1;
8948 HAVE_MODFF=1;
8949 HAVE_MODFL=1;
8950 HAVE_POWF=1;
8951 HAVE_REMAINDER=1;
8952 HAVE_REMAINDERF=1;
8953 HAVE_RINT=1;
8954 HAVE_RINTL=1;
8955 HAVE_SINF=1;
8956 HAVE_SINL=1;
8957 HAVE_SINHF=1;
8958 HAVE_SQRTF=1;
8959 HAVE_SQRTL=1;
8960 HAVE_TANF=1;
8961 HAVE_TANL=1;
8962 HAVE_TANHF=1;
8963 HAVE_DECL_ACOSL=1;
8964 HAVE_DECL_ASINL=1;
8965 HAVE_DECL_ATANL=1;
8966 HAVE_DECL_CBRTF=1;
8967 HAVE_DECL_CBRTL=1;
8968 HAVE_DECL_CEILF=1;
8969 HAVE_DECL_CEILL=1;
8970 HAVE_DECL_COPYSIGNF=1;
8971 HAVE_DECL_COSL=1;
8972 HAVE_DECL_EXPL=1;
8973 HAVE_DECL_EXP2=1;
8974 HAVE_DECL_EXP2F=1;
8975 HAVE_DECL_EXP2L=1;
8976 HAVE_DECL_EXPM1L=1;
8977 HAVE_DECL_FLOORF=1;
8978 HAVE_DECL_FLOORL=1;
8979 HAVE_DECL_FREXPL=1;
8980 HAVE_DECL_LDEXPL=1;
8981 HAVE_DECL_LOGL=1;
8982 HAVE_DECL_LOG10L=1;
8983 HAVE_DECL_LOG2=1;
8984 HAVE_DECL_LOG2F=1;
8985 HAVE_DECL_LOG2L=1;
8986 HAVE_DECL_LOGB=1;
8987 HAVE_DECL_REMAINDER=1;
8988 HAVE_DECL_REMAINDERL=1;
8989 HAVE_DECL_RINTF=1;
8990 HAVE_DECL_ROUND=1;
8991 HAVE_DECL_ROUNDF=1;
8992 HAVE_DECL_ROUNDL=1;
8993 HAVE_DECL_SINL=1;
8994 HAVE_DECL_SQRTL=1;
8995 HAVE_DECL_TANL=1;
8996 HAVE_DECL_TRUNC=1;
8997 HAVE_DECL_TRUNCF=1;
8998 HAVE_DECL_TRUNCL=1;
8999 REPLACE_ACOSF=0;
9000 REPLACE_ASINF=0;
9001 REPLACE_ATANF=0;
9002 REPLACE_ATAN2F=0;
9003 REPLACE_CBRTF=0;
9004 REPLACE_CBRTL=0;
9005 REPLACE_CEIL=0;
9006 REPLACE_CEILF=0;
9007 REPLACE_CEILL=0;
9008 REPLACE_COSF=0;
9009 REPLACE_COSHF=0;
9010 REPLACE_EXPF=0;
9011 REPLACE_EXPL=0;
9012 REPLACE_EXPM1=0;
9013 REPLACE_EXPM1F=0;
9014 REPLACE_EXPM1L=0;
9015 REPLACE_EXP2=0;
9016 REPLACE_EXP2L=0;
9017 REPLACE_FABSL=0;
9018 REPLACE_FLOOR=0;
9019 REPLACE_FLOORF=0;
9020 REPLACE_FLOORL=0;
9021 REPLACE_FMA=0;
9022 REPLACE_FMAF=0;
9023 REPLACE_FMAL=0;
9024 REPLACE_FMOD=0;
9025 REPLACE_FMODF=0;
9026 REPLACE_FMODL=0;
9027 REPLACE_FREXPF=0;
9028 REPLACE_FREXP=0;
9029 REPLACE_FREXPL=0;
9030 REPLACE_HUGE_VAL=0;
9031 REPLACE_HYPOT=0;
9032 REPLACE_HYPOTF=0;
9033 REPLACE_HYPOTL=0;
9034 REPLACE_ILOGB=0;
9035 REPLACE_ILOGBF=0;
9036 REPLACE_ILOGBL=0;
9037 REPLACE_ISFINITE=0;
9038 REPLACE_ISINF=0;
9039 REPLACE_ISNAN=0;
9040 REPLACE_LDEXPL=0;
9041 REPLACE_LOG=0;
9042 REPLACE_LOGF=0;
9043 REPLACE_LOGL=0;
9044 REPLACE_LOG10=0;
9045 REPLACE_LOG10F=0;
9046 REPLACE_LOG10L=0;
9047 REPLACE_LOG1P=0;
9048 REPLACE_LOG1PF=0;
9049 REPLACE_LOG1PL=0;
9050 REPLACE_LOG2=0;
9051 REPLACE_LOG2F=0;
9052 REPLACE_LOG2L=0;
9053 REPLACE_LOGB=0;
9054 REPLACE_LOGBF=0;
9055 REPLACE_LOGBL=0;
9056 REPLACE_MODF=0;
9057 REPLACE_MODFF=0;
9058 REPLACE_MODFL=0;
9059 REPLACE_NAN=0;
9060 REPLACE_REMAINDER=0;
9061 REPLACE_REMAINDERF=0;
9062 REPLACE_REMAINDERL=0;
9063 REPLACE_RINTL=0;
9064 REPLACE_ROUND=0;
9065 REPLACE_ROUNDF=0;
9066 REPLACE_ROUNDL=0;
9067 REPLACE_SIGNBIT=0;
9068 REPLACE_SIGNBIT_USING_GCC=0;
9069 REPLACE_SINF=0;
9070 REPLACE_SINHF=0;
9071 REPLACE_SQRTF=0;
9072 REPLACE_SQRTL=0;
9073 REPLACE_TANF=0;
9074 REPLACE_TANHF=0;
9075 REPLACE_TRUNC=0;
9076 REPLACE_TRUNCF=0;
9077 REPLACE_TRUNCL=0;
9078
9079
9080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5
9081 $as_echo_n "checking whether frexp() can be used without linking with libm... " >&6; }
9082 if ${gl_cv_func_frexp_no_libm+:} false; then :
9083 $as_echo_n "(cached) " >&6
9084 else
9085
9086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9087 /* end confdefs.h. */
9088 #include <math.h>
9089 double x;
9090 int
9091 main ()
9092 {
9093 int e; return frexp (x, &e) > 0;
9094 ;
9095 return 0;
9096 }
9097 _ACEOF
9098 if ac_fn_c_try_link "$LINENO"; then :
9099 gl_cv_func_frexp_no_libm=yes
9100 else
9101 gl_cv_func_frexp_no_libm=no
9102 fi
9103 rm -f core conftest.err conftest.$ac_objext \
9104 conftest$ac_exeext conftest.$ac_ext
9105
9106 fi
9107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
9108 $as_echo "$gl_cv_func_frexp_no_libm" >&6; }
9109
9110 ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
9111 if test "x$ac_cv_have_decl_alarm" = xyes; then :
9112 ac_have_decl=1
9113 else
9114 ac_have_decl=0
9115 fi
9116
9117 cat >>confdefs.h <<_ACEOF
9118 #define HAVE_DECL_ALARM $ac_have_decl
9119 _ACEOF
9120
9121
9122
9123
9124 FREXP_LIBM=
9125 if test $gl_cv_func_frexp_no_libm = no; then
9126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used with libm" >&5
9127 $as_echo_n "checking whether frexp() can be used with libm... " >&6; }
9128 if ${gl_cv_func_frexp_in_libm+:} false; then :
9129 $as_echo_n "(cached) " >&6
9130 else
9131
9132 save_LIBS="$LIBS"
9133 LIBS="$LIBS -lm"
9134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9135 /* end confdefs.h. */
9136 #include <math.h>
9137 double x;
9138 int
9139 main ()
9140 {
9141 int e; return frexp (x, &e) > 0;
9142 ;
9143 return 0;
9144 }
9145 _ACEOF
9146 if ac_fn_c_try_link "$LINENO"; then :
9147 gl_cv_func_frexp_in_libm=yes
9148 else
9149 gl_cv_func_frexp_in_libm=no
9150 fi
9151 rm -f core conftest.err conftest.$ac_objext \
9152 conftest$ac_exeext conftest.$ac_ext
9153 LIBS="$save_LIBS"
9154
9155 fi
9156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_in_libm" >&5
9157 $as_echo "$gl_cv_func_frexp_in_libm" >&6; }
9158 if test $gl_cv_func_frexp_in_libm = yes; then
9159 FREXP_LIBM=-lm
9160 fi
9161 fi
9162 if test $gl_cv_func_frexp_no_libm = yes \
9163 || test $gl_cv_func_frexp_in_libm = yes; then
9164 save_LIBS="$LIBS"
9165 LIBS="$LIBS $FREXP_LIBM"
9166
9167
9168
9169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
9170 $as_echo_n "checking whether frexp works... " >&6; }
9171 if ${gl_cv_func_frexp_works+:} false; then :
9172 $as_echo_n "(cached) " >&6
9173 else
9174
9175 if test "$cross_compiling" = yes; then :
9176 case "$host_os" in
9177 netbsd* | irix*) gl_cv_func_frexp_works="guessing no" ;;
9178 mingw*) # Guess yes with MSVC, no with mingw.
9179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9180 /* end confdefs.h. */
9181
9182 #ifdef _MSC_VER
9183 Good
9184 #endif
9185
9186 _ACEOF
9187 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9188 $EGREP "Good" >/dev/null 2>&1; then :
9189 gl_cv_func_frexp_works="guessing yes"
9190 else
9191 gl_cv_func_frexp_works="guessing no"
9192 fi
9193 rm -f conftest*
9194
9195 ;;
9196 *) gl_cv_func_frexp_works="guessing yes" ;;
9197 esac
9198
9199 else
9200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9201 /* end confdefs.h. */
9202
9203 #include <float.h>
9204 #include <math.h>
9205 #include <string.h>
9206 #if HAVE_DECL_ALARM
9207 # include <signal.h>
9208 # include <unistd.h>
9209 #endif
9210 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
9211 ICC 10.0 has a bug when optimizing the expression -zero.
9212 The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
9213 to PowerPC on Mac OS X 10.5. */
9214 #if defined __hpux || defined __sgi || defined __ICC
9215 static double
9216 compute_minus_zero (void)
9217 {
9218 return -DBL_MIN * DBL_MIN;
9219 }
9220 # define minus_zero compute_minus_zero ()
9221 #else
9222 double minus_zero = -0.0;
9223 #endif
9224 int main()
9225 {
9226 int result = 0;
9227 int i;
9228 volatile double x;
9229 double zero = 0.0;
9230 #if HAVE_DECL_ALARM
9231 /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
9232 number. Let the test fail in this case. */
9233 signal (SIGALRM, SIG_DFL);
9234 alarm (5);
9235 #endif
9236 /* Test on denormalized numbers. */
9237 for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
9238 ;
9239 if (x > 0.0)
9240 {
9241 int exp;
9242 double y = frexp (x, &exp);
9243 /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
9244 On NetBSD: y = 0.75. Correct: y = 0.5. */
9245 if (y != 0.5)
9246 result |= 1;
9247 }
9248 /* Test on infinite numbers. */
9249 x = 1.0 / zero;
9250 {
9251 int exp;
9252 double y = frexp (x, &exp);
9253 if (y != x)
9254 result |= 2;
9255 }
9256 /* Test on negative zero. */
9257 x = minus_zero;
9258 {
9259 int exp;
9260 double y = frexp (x, &exp);
9261 if (memcmp (&y, &x, sizeof x))
9262 result |= 4;
9263 }
9264 return result;
9265 }
9266 _ACEOF
9267 if ac_fn_c_try_run "$LINENO"; then :
9268 gl_cv_func_frexp_works=yes
9269 else
9270 gl_cv_func_frexp_works=no
9271 fi
9272 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9273 conftest.$ac_objext conftest.beam conftest.$ac_ext
9274 fi
9275
9276
9277 fi
9278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
9279 $as_echo "$gl_cv_func_frexp_works" >&6; }
9280
9281 LIBS="$save_LIBS"
9282 case "$gl_cv_func_frexp_works" in
9283 *yes) gl_func_frexp=yes ;;
9284 *) gl_func_frexp=no; REPLACE_FREXP=1; FREXP_LIBM= ;;
9285 esac
9286 else
9287 gl_func_frexp=no
9288 fi
9289 if test $gl_func_frexp = yes; then
9290
9291 $as_echo "#define HAVE_FREXP 1" >>confdefs.h
9292
9293 fi
9294
9295
9296
9297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5
9298 $as_echo_n "checking whether long double and double are the same... " >&6; }
9299 if ${gl_cv_long_double_equals_double+:} false; then :
9300 $as_echo_n "(cached) " >&6
9301 else
9302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9303 /* end confdefs.h. */
9304 #include <float.h>
9305 int
9306 main ()
9307 {
9308 typedef int check[sizeof (long double) == sizeof (double)
9309 && LDBL_MANT_DIG == DBL_MANT_DIG
9310 && LDBL_MAX_EXP == DBL_MAX_EXP
9311 && LDBL_MIN_EXP == DBL_MIN_EXP
9312 ? 1 : -1];
9313
9314 ;
9315 return 0;
9316 }
9317 _ACEOF
9318 if ac_fn_c_try_compile "$LINENO"; then :
9319 gl_cv_long_double_equals_double=yes
9320 else
9321 gl_cv_long_double_equals_double=no
9322 fi
9323 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9324
9325 fi
9326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_long_double_equals_double" >&5
9327 $as_echo "$gl_cv_long_double_equals_double" >&6; }
9328 if test $gl_cv_long_double_equals_double = yes; then
9329
9330 $as_echo "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h
9331
9332 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1
9333 else
9334 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0
9335 fi
9336
9337
9338
9339
9340
9341
9342
9343
9344 ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
9345 "
9346 if test "x$ac_cv_have_decl_frexpl" = xyes; then :
9347
9348 else
9349 HAVE_DECL_FREXPL=0
9350 fi
9351
9352
9353 FREXPL_LIBM=
9354 if test $HAVE_DECL_FREXPL = 1; then
9355
9356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
9357 $as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; }
9358 if ${gl_cv_func_frexpl_no_libm+:} false; then :
9359 $as_echo_n "(cached) " >&6
9360 else
9361
9362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9363 /* end confdefs.h. */
9364 #include <math.h>
9365 long double x;
9366 int
9367 main ()
9368 {
9369 int e; return frexpl (x, &e) > 0;
9370 ;
9371 return 0;
9372 }
9373 _ACEOF
9374 if ac_fn_c_try_link "$LINENO"; then :
9375 gl_cv_func_frexpl_no_libm=yes
9376 else
9377 gl_cv_func_frexpl_no_libm=no
9378 fi
9379 rm -f core conftest.err conftest.$ac_objext \
9380 conftest$ac_exeext conftest.$ac_ext
9381
9382 fi
9383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
9384 $as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
9385
9386 if test $gl_cv_func_frexpl_no_libm = no; then
9387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used with libm" >&5
9388 $as_echo_n "checking whether frexpl() can be used with libm... " >&6; }
9389 if ${gl_cv_func_frexpl_in_libm+:} false; then :
9390 $as_echo_n "(cached) " >&6
9391 else
9392
9393 save_LIBS="$LIBS"
9394 LIBS="$LIBS -lm"
9395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9396 /* end confdefs.h. */
9397 #include <math.h>
9398 long double x;
9399 int
9400 main ()
9401 {
9402 int e; return frexpl (x, &e) > 0;
9403 ;
9404 return 0;
9405 }
9406 _ACEOF
9407 if ac_fn_c_try_link "$LINENO"; then :
9408 gl_cv_func_frexpl_in_libm=yes
9409 else
9410 gl_cv_func_frexpl_in_libm=no
9411 fi
9412 rm -f core conftest.err conftest.$ac_objext \
9413 conftest$ac_exeext conftest.$ac_ext
9414 LIBS="$save_LIBS"
9415
9416 fi
9417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_in_libm" >&5
9418 $as_echo "$gl_cv_func_frexpl_in_libm" >&6; }
9419 if test $gl_cv_func_frexpl_in_libm = yes; then
9420 FREXPL_LIBM=-lm
9421 fi
9422 fi
9423 if test $gl_cv_func_frexpl_no_libm = yes \
9424 || test $gl_cv_func_frexpl_in_libm = yes; then
9425 save_LIBS="$LIBS"
9426 LIBS="$LIBS $FREXPL_LIBM"
9427
9428
9429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
9430 $as_echo_n "checking whether frexpl works... " >&6; }
9431 if ${gl_cv_func_frexpl_works+:} false; then :
9432 $as_echo_n "(cached) " >&6
9433 else
9434
9435 if test "$cross_compiling" = yes; then :
9436
9437 case "$host_os" in
9438 aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
9439 gl_cv_func_frexpl_works="guessing no";;
9440 *) gl_cv_func_frexpl_works="guessing yes";;
9441 esac
9442
9443 else
9444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9445 /* end confdefs.h. */
9446
9447 #include <float.h>
9448 #include <math.h>
9449 /* Override the values of <float.h>, like done in float.in.h. */
9450 #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
9451 # undef LDBL_MIN_EXP
9452 # define LDBL_MIN_EXP (-16381)
9453 #endif
9454 #if defined __i386__ && (defined __FreeBSD__ || defined __DragonFly__)
9455 # undef LDBL_MIN_EXP
9456 # define LDBL_MIN_EXP (-16381)
9457 #endif
9458 #if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
9459 # undef LDBL_MIN_EXP
9460 # define LDBL_MIN_EXP DBL_MIN_EXP
9461 #endif
9462 #if defined __sgi && (LDBL_MANT_DIG >= 106)
9463 # if defined __GNUC__
9464 # undef LDBL_MIN_EXP
9465 # define LDBL_MIN_EXP DBL_MIN_EXP
9466 # endif
9467 #endif
9468 extern
9469 #ifdef __cplusplus
9470 "C"
9471 #endif
9472 long double frexpl (long double, int *);
9473 int main()
9474 {
9475 int result = 0;
9476 volatile long double x;
9477 /* Test on finite numbers that fails on AIX 5.1. */
9478 x = 16.0L;
9479 {
9480 int exp = -9999;
9481 frexpl (x, &exp);
9482 if (exp != 5)
9483 result |= 1;
9484 }
9485 /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
9486 function returns an invalid (incorrectly normalized) value: it returns
9487 y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
9488 but the correct result is
9489 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */
9490 x = 1.01L;
9491 {
9492 int exp = -9999;
9493 long double y = frexpl (x, &exp);
9494 if (!(exp == 1 && y == 0.505L))
9495 result |= 2;
9496 }
9497 /* Test on large finite numbers. This fails on BeOS at i = 16322, while
9498 LDBL_MAX_EXP = 16384.
9499 In the loop end test, we test x against Infinity, rather than comparing
9500 i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */
9501 {
9502 int i;
9503 for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
9504 {
9505 int exp = -9999;
9506 frexpl (x, &exp);
9507 if (exp != i)
9508 {
9509 result |= 4;
9510 break;
9511 }
9512 }
9513 }
9514 /* Test on denormalized numbers. */
9515 {
9516 int i;
9517 for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
9518 ;
9519 if (x > 0.0L)
9520 {
9521 int exp;
9522 long double y = frexpl (x, &exp);
9523 /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
9524 exp = -16382, y = 0.5. On Mac OS X 10.5: exp = -16384, y = 0.5. */
9525 if (exp != LDBL_MIN_EXP - 1)
9526 result |= 8;
9527 }
9528 }
9529 /* Test on infinite numbers. */
9530 x = 1.0L / 0.0L;
9531 {
9532 int exp;
9533 long double y = frexpl (x, &exp);
9534 if (y != x)
9535 result |= 16;
9536 }
9537 return result;
9538 }
9539 _ACEOF
9540 if ac_fn_c_try_run "$LINENO"; then :
9541 gl_cv_func_frexpl_works=yes
9542 else
9543 gl_cv_func_frexpl_works=no
9544 fi
9545 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9546 conftest.$ac_objext conftest.beam conftest.$ac_ext
9547 fi
9548
9549
9550 fi
9551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
9552 $as_echo "$gl_cv_func_frexpl_works" >&6; }
9553
9554 LIBS="$save_LIBS"
9555 case "$gl_cv_func_frexpl_works" in
9556 *yes) gl_func_frexpl=yes ;;
9557 *) gl_func_frexpl=no; REPLACE_FREXPL=1 ;;
9558 esac
9559 else
9560 gl_func_frexpl=no
9561 fi
9562 if test $gl_func_frexpl = yes; then
9563
9564 $as_echo "#define HAVE_FREXPL 1" >>confdefs.h
9565
9566 fi
9567 fi
9568 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
9569 if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then
9570
9571 FREXPL_LIBM="$FREXP_LIBM"
9572 else
9573 FREXPL_LIBM=
9574 fi
9575 fi
9576
9577
9578
9579 GNULIB_FCHMODAT=0;
9580 GNULIB_FSTAT=0;
9581 GNULIB_FSTATAT=0;
9582 GNULIB_FUTIMENS=0;
9583 GNULIB_LCHMOD=0;
9584 GNULIB_LSTAT=0;
9585 GNULIB_MKDIRAT=0;
9586 GNULIB_MKFIFO=0;
9587 GNULIB_MKFIFOAT=0;
9588 GNULIB_MKNOD=0;
9589 GNULIB_MKNODAT=0;
9590 GNULIB_STAT=0;
9591 GNULIB_UTIMENSAT=0;
9592 GNULIB_OVERRIDES_STRUCT_STAT=0;
9593 HAVE_FCHMODAT=1;
9594 HAVE_FSTATAT=1;
9595 HAVE_FUTIMENS=1;
9596 HAVE_LCHMOD=1;
9597 HAVE_LSTAT=1;
9598 HAVE_MKDIRAT=1;
9599 HAVE_MKFIFO=1;
9600 HAVE_MKFIFOAT=1;
9601 HAVE_MKNOD=1;
9602 HAVE_MKNODAT=1;
9603 HAVE_UTIMENSAT=1;
9604 REPLACE_FCHMODAT=0;
9605 REPLACE_FSTAT=0;
9606 REPLACE_FSTATAT=0;
9607 REPLACE_FUTIMENS=0;
9608 REPLACE_LCHMOD=0;
9609 REPLACE_LSTAT=0;
9610 REPLACE_MKDIR=0;
9611 REPLACE_MKFIFO=0;
9612 REPLACE_MKNOD=0;
9613 REPLACE_STAT=0;
9614 REPLACE_UTIMENSAT=0;
9615
9616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
9617 $as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
9618 if ${ac_cv_header_stat_broken+:} false; then :
9619 $as_echo_n "(cached) " >&6
9620 else
9621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9622 /* end confdefs.h. */
9623 #include <sys/types.h>
9624 #include <sys/stat.h>
9625
9626 #if defined S_ISBLK && defined S_IFDIR
9627 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
9628 #endif
9629
9630 #if defined S_ISBLK && defined S_IFCHR
9631 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
9632 #endif
9633
9634 #if defined S_ISLNK && defined S_IFREG
9635 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
9636 #endif
9637
9638 #if defined S_ISSOCK && defined S_IFREG
9639 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
9640 #endif
9641
9642 _ACEOF
9643 if ac_fn_c_try_compile "$LINENO"; then :
9644 ac_cv_header_stat_broken=no
9645 else
9646 ac_cv_header_stat_broken=yes
9647 fi
9648 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9649 fi
9650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
9651 $as_echo "$ac_cv_header_stat_broken" >&6; }
9652 if test $ac_cv_header_stat_broken = yes; then
9653
9654 $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
9655
9656 fi
9657
9658
9659
9660
9661
9662 case "$host_os" in
9663 mingw*)
9664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
9665 $as_echo_n "checking for 64-bit off_t... " >&6; }
9666 if ${gl_cv_type_off_t_64+:} false; then :
9667 $as_echo_n "(cached) " >&6
9668 else
9669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9670 /* end confdefs.h. */
9671 #include <sys/types.h>
9672 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
9673
9674 int
9675 main ()
9676 {
9677
9678 ;
9679 return 0;
9680 }
9681 _ACEOF
9682 if ac_fn_c_try_compile "$LINENO"; then :
9683 gl_cv_type_off_t_64=yes
9684 else
9685 gl_cv_type_off_t_64=no
9686 fi
9687 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9688
9689 fi
9690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
9691 $as_echo "$gl_cv_type_off_t_64" >&6; }
9692 if test $gl_cv_type_off_t_64 = no; then
9693 WINDOWS_64_BIT_OFF_T=1
9694 else
9695 WINDOWS_64_BIT_OFF_T=0
9696 fi
9697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit st_size" >&5
9698 $as_echo_n "checking for 64-bit st_size... " >&6; }
9699 if ${gl_cv_member_st_size_64+:} false; then :
9700 $as_echo_n "(cached) " >&6
9701 else
9702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9703 /* end confdefs.h. */
9704 #include <sys/types.h>
9705 struct stat buf;
9706 int verify_st_size_size[sizeof (buf.st_size) >= 8 ? 1 : -1];
9707
9708 int
9709 main ()
9710 {
9711
9712 ;
9713 return 0;
9714 }
9715 _ACEOF
9716 if ac_fn_c_try_compile "$LINENO"; then :
9717 gl_cv_member_st_size_64=yes
9718 else
9719 gl_cv_member_st_size_64=no
9720 fi
9721 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9722
9723 fi
9724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_member_st_size_64" >&5
9725 $as_echo "$gl_cv_member_st_size_64" >&6; }
9726 if test $gl_cv_member_st_size_64 = no; then
9727 WINDOWS_64_BIT_ST_SIZE=1
9728 else
9729 WINDOWS_64_BIT_ST_SIZE=0
9730 fi
9731 ;;
9732 *)
9733 WINDOWS_64_BIT_OFF_T=0
9734 WINDOWS_64_BIT_ST_SIZE=0
9735 ;;
9736 esac
9737
9738
9739
9740
9741
9742
9743
9744
9745
9746
9747
9748
9749
9750
9751
9752 if test $gl_cv_have_include_next = yes; then
9753 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
9754 else
9755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
9756 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
9757 if ${gl_cv_next_sys_stat_h+:} false; then :
9758 $as_echo_n "(cached) " >&6
9759 else
9760
9761 if test $ac_cv_header_sys_stat_h = yes; then
9762
9763
9764
9765
9766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9767 /* end confdefs.h. */
9768 #include <sys/stat.h>
9769 _ACEOF
9770 case "$host_os" in
9771 aix*) gl_absname_cpp="$ac_cpp -C" ;;
9772 *) gl_absname_cpp="$ac_cpp" ;;
9773 esac
9774
9775 case "$host_os" in
9776 mingw*)
9777 gl_dirsep_regex='[/\\]'
9778 ;;
9779 *)
9780 gl_dirsep_regex='\/'
9781 ;;
9782 esac
9783 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
9784 gl_header_literal_regex=`echo 'sys/stat.h' \
9785 | sed -e "$gl_make_literal_regex_sed"`
9786 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
9787 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
9788 s|^/[^/]|//&|
9789 p
9790 q
9791 }'
9792
9793 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
9794 sed -n "$gl_absolute_header_sed"`
9795
9796 gl_header=$gl_cv_absolute_sys_stat_h
9797 gl_cv_next_sys_stat_h='"'$gl_header'"'
9798 else
9799 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
9800 fi
9801
9802
9803 fi
9804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
9805 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
9806 fi
9807 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
9808
9809 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
9810 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
9811 gl_next_as_first_directive='<'sys/stat.h'>'
9812 else
9813 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
9814 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
9815 fi
9816 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
9817
9818
9819
9820
9821
9822
9823
9824
9825 WINDOWS_STAT_TIMESPEC=0
9826
9827
9828
9829
9830
9831
9832
9833
9834 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
9835 #include <sys/stat.h>
9836 "
9837 if test "x$ac_cv_type_nlink_t" = xyes; then :
9838
9839 else
9840
9841 $as_echo "#define nlink_t int" >>confdefs.h
9842
9843 fi
9844
9845
9846
9847
9848
9849
9850
9851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
9852 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
9853 if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
9854 $as_echo_n "(cached) " >&6
9855 else
9856 rm -f conftest.sym conftest.file
9857 echo >conftest.file
9858 if test "$cross_compiling" = yes; then :
9859 case "$host_os" in
9860 linux-* | linux)
9861 # Guess yes on Linux systems.
9862 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
9863 *-gnu* | gnu*)
9864 # Guess yes on glibc systems.
9865 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
9866 mingw*)
9867 # Guess no on native Windows.
9868 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
9869 *)
9870 # If we don't know, obey --enable-cross-guesses.
9871 gl_cv_func_lstat_dereferences_slashed_symlink="$gl_cross_guess_normal" ;;
9872 esac
9873
9874 else
9875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9876 /* end confdefs.h. */
9877 $ac_includes_default
9878 int
9879 main ()
9880 {
9881 struct stat sbuf;
9882 if (symlink ("conftest.file", "conftest.sym") != 0)
9883 return 1;
9884 /* Linux will dereference the symlink and fail, as required by
9885 POSIX. That is better in the sense that it means we will not
9886 have to compile and use the lstat wrapper. */
9887 return lstat ("conftest.sym/", &sbuf) == 0;
9888
9889 ;
9890 return 0;
9891 }
9892 _ACEOF
9893 if ac_fn_c_try_run "$LINENO"; then :
9894 gl_cv_func_lstat_dereferences_slashed_symlink=yes
9895 else
9896 gl_cv_func_lstat_dereferences_slashed_symlink=no
9897 fi
9898 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9899 conftest.$ac_objext conftest.beam conftest.$ac_ext
9900 fi
9901
9902 rm -f conftest.sym conftest.file
9903
9904 fi
9905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
9906 $as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
9907 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
9908 *yes)
9909
9910 cat >>confdefs.h <<_ACEOF
9911 #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
9912 _ACEOF
9913
9914 ;;
9915 esac
9916
9917
9918
9919
9920
9921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
9922 $as_echo_n "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
9923 if ${gl_cv_func_getcwd_null+:} false; then :
9924 $as_echo_n "(cached) " >&6
9925 else
9926 if test "$cross_compiling" = yes; then :
9927 case "$host_os" in
9928 # Guess yes on glibc systems.
9929 *-gnu* | gnu*) gl_cv_func_getcwd_null="guessing yes";;
9930 # Guess yes on musl systems.
9931 *-musl*) gl_cv_func_getcwd_null="guessing yes";;
9932 # Guess yes on Cygwin.
9933 cygwin*) gl_cv_func_getcwd_null="guessing yes";;
9934 # If we don't know, obey --enable-cross-guesses.
9935 *) gl_cv_func_getcwd_null="$gl_cross_guess_normal";;
9936 esac
9937
9938 else
9939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9940 /* end confdefs.h. */
9941
9942 # include <stdlib.h>
9943 # if HAVE_UNISTD_H
9944 # include <unistd.h>
9945 # else /* on Windows with MSVC */
9946 # include <direct.h>
9947 # endif
9948 # ifndef getcwd
9949 char *getcwd ();
9950 # endif
9951
9952 int
9953 main ()
9954 {
9955
9956 #if defined _WIN32 && ! defined __CYGWIN__
9957 /* mingw cwd does not start with '/', but getcwd does allocate.
9958 However, mingw fails to honor non-zero size. */
9959 #else
9960 if (chdir ("/") != 0)
9961 return 1;
9962 else
9963 {
9964 char *f = getcwd (NULL, 0);
9965 if (! f)
9966 return 2;
9967 if (f[0] != '/')
9968 { free (f); return 3; }
9969 if (f[1] != '\0')
9970 { free (f); return 4; }
9971 free (f);
9972 return 0;
9973 }
9974 #endif
9975
9976 ;
9977 return 0;
9978 }
9979 _ACEOF
9980 if ac_fn_c_try_run "$LINENO"; then :
9981 gl_cv_func_getcwd_null=yes
9982 else
9983 gl_cv_func_getcwd_null=no
9984 fi
9985 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9986 conftest.$ac_objext conftest.beam conftest.$ac_ext
9987 fi
9988
9989 fi
9990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
9991 $as_echo "$gl_cv_func_getcwd_null" >&6; }
9992
9993
9994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
9995 $as_echo_n "checking for getcwd with POSIX signature... " >&6; }
9996 if ${gl_cv_func_getcwd_posix_signature+:} false; then :
9997 $as_echo_n "(cached) " >&6
9998 else
9999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10000 /* end confdefs.h. */
10001 #include <unistd.h>
10002 int
10003 main ()
10004 {
10005 extern
10006 #ifdef __cplusplus
10007 "C"
10008 #endif
10009 char *getcwd (char *, size_t);
10010
10011 ;
10012 return 0;
10013 }
10014
10015 _ACEOF
10016 if ac_fn_c_try_compile "$LINENO"; then :
10017 gl_cv_func_getcwd_posix_signature=yes
10018 else
10019 gl_cv_func_getcwd_posix_signature=no
10020 fi
10021 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10022
10023 fi
10024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
10025 $as_echo "$gl_cv_func_getcwd_posix_signature" >&6; }
10026
10027 ac_fn_c_check_decl "$LINENO" "getcwd" "ac_cv_have_decl_getcwd" "$ac_includes_default"
10028 if test "x$ac_cv_have_decl_getcwd" = xyes; then :
10029 ac_have_decl=1
10030 else
10031 ac_have_decl=0
10032 fi
10033
10034 cat >>confdefs.h <<_ACEOF
10035 #define HAVE_DECL_GETCWD $ac_have_decl
10036 _ACEOF
10037
10038
10039
10040 ac_fn_c_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default"
10041 if test "x$ac_cv_have_decl_getdtablesize" = xyes; then :
10042 ac_have_decl=1
10043 else
10044 ac_have_decl=0
10045 fi
10046
10047 cat >>confdefs.h <<_ACEOF
10048 #define HAVE_DECL_GETDTABLESIZE $ac_have_decl
10049 _ACEOF
10050
10051 ac_fn_c_check_decl "$LINENO" "getlogin_r" "ac_cv_have_decl_getlogin_r" "$ac_includes_default"
10052 if test "x$ac_cv_have_decl_getlogin_r" = xyes; then :
10053 ac_have_decl=1
10054 else
10055 ac_have_decl=0
10056 fi
10057
10058 cat >>confdefs.h <<_ACEOF
10059 #define HAVE_DECL_GETLOGIN_R $ac_have_decl
10060 _ACEOF
10061
10062
10063
10064 ac_fn_c_check_decl "$LINENO" "getlogin" "ac_cv_have_decl_getlogin" "$ac_includes_default"
10065 if test "x$ac_cv_have_decl_getlogin" = xyes; then :
10066 ac_have_decl=1
10067 else
10068 ac_have_decl=0
10069 fi
10070
10071 cat >>confdefs.h <<_ACEOF
10072 #define HAVE_DECL_GETLOGIN $ac_have_decl
10073 _ACEOF
10074
10075
10076
10077 case $host_os in
10078 mingw*)
10079 LIB_GETLOGIN='-ladvapi32' ;;
10080 *)
10081 LIB_GETLOGIN= ;;
10082 esac
10083
10084
10085
10086
10087
10088
10089
10090 GNULIB_GETTIMEOFDAY=0;
10091 HAVE_GETTIMEOFDAY=1;
10092 HAVE_STRUCT_TIMEVAL=1;
10093 HAVE_SYS_TIME_H=1;
10094 REPLACE_GETTIMEOFDAY=0;
10095 REPLACE_STRUCT_TIMEVAL=0;
10096
10097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
10098 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
10099 if ${ac_cv_c_restrict+:} false; then :
10100 $as_echo_n "(cached) " >&6
10101 else
10102 ac_cv_c_restrict=no
10103 # The order here caters to the fact that C++ does not require restrict.
10104 for ac_kw in __restrict __restrict__ _Restrict restrict; do
10105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10106 /* end confdefs.h. */
10107 typedef int *int_ptr;
10108 int foo (int_ptr $ac_kw ip) { return ip[0]; }
10109 int bar (int [$ac_kw]); /* Catch GCC bug 14050. */
10110 int bar (int ip[$ac_kw]) { return ip[0]; }
10111
10112 int
10113 main ()
10114 {
10115 int s[1];
10116 int *$ac_kw t = s;
10117 t[0] = 0;
10118 return foo (t) + bar (t);
10119
10120 ;
10121 return 0;
10122 }
10123 _ACEOF
10124 if ac_fn_c_try_compile "$LINENO"; then :
10125 ac_cv_c_restrict=$ac_kw
10126 fi
10127 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10128 test "$ac_cv_c_restrict" != no && break
10129 done
10130
10131 fi
10132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
10133 $as_echo "$ac_cv_c_restrict" >&6; }
10134
10135 case $ac_cv_c_restrict in
10136 restrict) ;;
10137 no) $as_echo "#define restrict /**/" >>confdefs.h
10138 ;;
10139 *) cat >>confdefs.h <<_ACEOF
10140 #define restrict $ac_cv_c_restrict
10141 _ACEOF
10142 ;;
10143 esac
10144
10145
10146
10147
10148
10149
10150
10151
10152
10153
10154
10155
10156
10157
10158
10159
10160 if test $gl_cv_have_include_next = yes; then
10161 gl_cv_next_sys_time_h='<'sys/time.h'>'
10162 else
10163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
10164 $as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
10165 if ${gl_cv_next_sys_time_h+:} false; then :
10166 $as_echo_n "(cached) " >&6
10167 else
10168
10169 if test $ac_cv_header_sys_time_h = yes; then
10170
10171
10172
10173
10174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10175 /* end confdefs.h. */
10176 #include <sys/time.h>
10177 _ACEOF
10178 case "$host_os" in
10179 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10180 *) gl_absname_cpp="$ac_cpp" ;;
10181 esac
10182
10183 case "$host_os" in
10184 mingw*)
10185 gl_dirsep_regex='[/\\]'
10186 ;;
10187 *)
10188 gl_dirsep_regex='\/'
10189 ;;
10190 esac
10191 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10192 gl_header_literal_regex=`echo 'sys/time.h' \
10193 | sed -e "$gl_make_literal_regex_sed"`
10194 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10195 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10196 s|^/[^/]|//&|
10197 p
10198 q
10199 }'
10200
10201 gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10202 sed -n "$gl_absolute_header_sed"`
10203
10204 gl_header=$gl_cv_absolute_sys_time_h
10205 gl_cv_next_sys_time_h='"'$gl_header'"'
10206 else
10207 gl_cv_next_sys_time_h='<'sys/time.h'>'
10208 fi
10209
10210
10211 fi
10212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
10213 $as_echo "$gl_cv_next_sys_time_h" >&6; }
10214 fi
10215 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
10216
10217 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10218 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10219 gl_next_as_first_directive='<'sys/time.h'>'
10220 else
10221 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10222 gl_next_as_first_directive=$gl_cv_next_sys_time_h
10223 fi
10224 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
10225
10226
10227
10228
10229
10230 if test $ac_cv_header_sys_time_h != yes; then
10231 HAVE_SYS_TIME_H=0
10232 fi
10233
10234
10235
10236
10237
10238 if test $ac_cv_header_sys_socket_h != yes; then
10239 for ac_header in winsock2.h
10240 do :
10241 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
10242 if test "x$ac_cv_header_winsock2_h" = xyes; then :
10243 cat >>confdefs.h <<_ACEOF
10244 #define HAVE_WINSOCK2_H 1
10245 _ACEOF
10246
10247 fi
10248
10249 done
10250
10251 fi
10252 if test "$ac_cv_header_winsock2_h" = yes; then
10253 HAVE_WINSOCK2_H=1
10254 UNISTD_H_HAVE_WINSOCK2_H=1
10255 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
10256 else
10257 HAVE_WINSOCK2_H=0
10258 fi
10259
10260
10261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
10262 $as_echo_n "checking for struct timeval... " >&6; }
10263 if ${gl_cv_sys_struct_timeval+:} false; then :
10264 $as_echo_n "(cached) " >&6
10265 else
10266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10267 /* end confdefs.h. */
10268 #if HAVE_SYS_TIME_H
10269 #include <sys/time.h>
10270 #endif
10271 #include <time.h>
10272 #if HAVE_WINSOCK2_H
10273 # include <winsock2.h>
10274 #endif
10275
10276 int
10277 main ()
10278 {
10279 static struct timeval x; x.tv_sec = x.tv_usec;
10280 ;
10281 return 0;
10282 }
10283 _ACEOF
10284 if ac_fn_c_try_compile "$LINENO"; then :
10285 gl_cv_sys_struct_timeval=yes
10286 else
10287 gl_cv_sys_struct_timeval=no
10288 fi
10289 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10290
10291 fi
10292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
10293 $as_echo "$gl_cv_sys_struct_timeval" >&6; }
10294 if test $gl_cv_sys_struct_timeval != yes; then
10295 HAVE_STRUCT_TIMEVAL=0
10296 else
10297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
10298 $as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
10299 if ${gl_cv_sys_struct_timeval_tv_sec+:} false; then :
10300 $as_echo_n "(cached) " >&6
10301 else
10302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10303 /* end confdefs.h. */
10304 #if HAVE_SYS_TIME_H
10305 #include <sys/time.h>
10306 #endif
10307 #include <time.h>
10308 #if HAVE_WINSOCK2_H
10309 # include <winsock2.h>
10310 #endif
10311
10312 int
10313 main ()
10314 {
10315 static struct timeval x;
10316 typedef int verify_tv_sec_type[
10317 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
10318 ];
10319
10320 ;
10321 return 0;
10322 }
10323 _ACEOF
10324 if ac_fn_c_try_compile "$LINENO"; then :
10325 gl_cv_sys_struct_timeval_tv_sec=yes
10326 else
10327 gl_cv_sys_struct_timeval_tv_sec=no
10328 fi
10329 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10330
10331 fi
10332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
10333 $as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
10334 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
10335 REPLACE_STRUCT_TIMEVAL=1
10336 fi
10337 fi
10338
10339
10340
10341
10342
10343
10344
10345
10346
10347
10348
10349 NEED_LOCALTIME_BUFFER=0
10350
10351
10352 GNULIB_CTIME=0;
10353 GNULIB_MKTIME=0;
10354 GNULIB_LOCALTIME=0;
10355 GNULIB_NANOSLEEP=0;
10356 GNULIB_STRFTIME=0;
10357 GNULIB_STRPTIME=0;
10358 GNULIB_TIMEGM=0;
10359 GNULIB_TIME_R=0;
10360 GNULIB_TIME_RZ=0;
10361 GNULIB_TZSET=0;
10362 HAVE_DECL_LOCALTIME_R=1;
10363 HAVE_NANOSLEEP=1;
10364 HAVE_STRPTIME=1;
10365 HAVE_TIMEGM=1;
10366 HAVE_TZSET=1;
10367 HAVE_TIMEZONE_T=0;
10368 REPLACE_CTIME=GNULIB_PORTCHECK;
10369 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
10370 REPLACE_MKTIME=GNULIB_PORTCHECK;
10371 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
10372 REPLACE_STRFTIME=GNULIB_PORTCHECK;
10373 REPLACE_TIMEGM=GNULIB_PORTCHECK;
10374 REPLACE_TZSET=GNULIB_PORTCHECK;
10375
10376 : ${GNULIB_GETTIMEOFDAY=0};
10377 REPLACE_GMTIME=0;
10378 REPLACE_LOCALTIME=0;
10379
10380
10381 GNULIB_GLOB=0;
10382 HAVE_GLOB=1;
10383 HAVE_GLOB_PATTERN_P=1;
10384 REPLACE_GLOB=0;
10385 REPLACE_GLOB_PATTERN_P=0;
10386
10387
10388
10389
10390
10391
10392
10393
10394
10395
10396
10397
10398
10399
10400
10401
10402
10403 if test $gl_cv_have_include_next = yes; then
10404 gl_cv_next_glob_h='<'glob.h'>'
10405 else
10406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <glob.h>" >&5
10407 $as_echo_n "checking absolute name of <glob.h>... " >&6; }
10408 if ${gl_cv_next_glob_h+:} false; then :
10409 $as_echo_n "(cached) " >&6
10410 else
10411
10412 if test $ac_cv_header_glob_h = yes; then
10413
10414
10415
10416
10417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10418 /* end confdefs.h. */
10419 #include <glob.h>
10420 _ACEOF
10421 case "$host_os" in
10422 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10423 *) gl_absname_cpp="$ac_cpp" ;;
10424 esac
10425
10426 case "$host_os" in
10427 mingw*)
10428 gl_dirsep_regex='[/\\]'
10429 ;;
10430 *)
10431 gl_dirsep_regex='\/'
10432 ;;
10433 esac
10434 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10435 gl_header_literal_regex=`echo 'glob.h' \
10436 | sed -e "$gl_make_literal_regex_sed"`
10437 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10438 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10439 s|^/[^/]|//&|
10440 p
10441 q
10442 }'
10443
10444 gl_cv_absolute_glob_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10445 sed -n "$gl_absolute_header_sed"`
10446
10447 gl_header=$gl_cv_absolute_glob_h
10448 gl_cv_next_glob_h='"'$gl_header'"'
10449 else
10450 gl_cv_next_glob_h='<'glob.h'>'
10451 fi
10452
10453
10454 fi
10455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_glob_h" >&5
10456 $as_echo "$gl_cv_next_glob_h" >&6; }
10457 fi
10458 NEXT_GLOB_H=$gl_cv_next_glob_h
10459
10460 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10461 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10462 gl_next_as_first_directive='<'glob.h'>'
10463 else
10464 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10465 gl_next_as_first_directive=$gl_cv_next_glob_h
10466 fi
10467 NEXT_AS_FIRST_DIRECTIVE_GLOB_H=$gl_next_as_first_directive
10468
10469
10470
10471
10472
10473 if test $ac_cv_header_glob_h = yes; then
10474 HAVE_GLOB_H=1
10475 else
10476 HAVE_GLOB_H=0
10477 fi
10478
10479
10480 GLOB_H=''
10481 if false; then
10482 GLOB_H=glob.h
10483 else
10484 if test $ac_cv_header_glob_h != yes; then
10485 GLOB_H=glob.h
10486 fi
10487 fi
10488
10489
10490 if test -n "$GLOB_H"; then
10491 GL_GENERATE_GLOB_H_TRUE=
10492 GL_GENERATE_GLOB_H_FALSE='#'
10493 else
10494 GL_GENERATE_GLOB_H_TRUE='#'
10495 GL_GENERATE_GLOB_H_FALSE=
10496 fi
10497
10498
10499
10500
10501
10502
10503
10504
10505
10506
10507
10508
10509
10510
10511
10512
10513 if test -z "$gl_pthreadlib_body_done"; then
10514 gl_pthread_api=no
10515 LIBPTHREAD=
10516 LIBPMULTITHREAD=
10517 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
10518 # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
10519 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
10520 if test "x$ac_cv_header_pthread_h" = xyes; then :
10521 gl_have_pthread_h=yes
10522 else
10523 gl_have_pthread_h=no
10524 fi
10525
10526
10527 if test "$gl_have_pthread_h" = yes; then
10528 # Other possible tests:
10529 # -lpthreads (FSU threads, PCthreads)
10530 # -lgthreads
10531 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
10532 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
10533 # the second one only in libpthread, and lock.c needs it.
10534 #
10535 # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
10536 # needs -pthread for some reason. See:
10537 # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
10538 save_LIBS=$LIBS
10539 for gl_pthread in '' '-pthread'; do
10540 LIBS="$LIBS $gl_pthread"
10541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10542 /* end confdefs.h. */
10543 #include <pthread.h>
10544 pthread_mutex_t m;
10545 pthread_mutexattr_t ma;
10546
10547 int
10548 main ()
10549 {
10550 pthread_mutex_lock (&m);
10551 pthread_mutexattr_init (&ma);
10552 ;
10553 return 0;
10554 }
10555 _ACEOF
10556 if ac_fn_c_try_link "$LINENO"; then :
10557 gl_pthread_api=yes
10558 LIBPTHREAD=$gl_pthread
10559 LIBPMULTITHREAD=$gl_pthread
10560 fi
10561 rm -f core conftest.err conftest.$ac_objext \
10562 conftest$ac_exeext conftest.$ac_ext
10563 LIBS=$save_LIBS
10564 test $gl_pthread_api = yes && break
10565 done
10566
10567 # Test for libpthread by looking for pthread_kill. (Not pthread_self,
10568 # since it is defined as a macro on OSF/1.)
10569 if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
10570 # The program links fine without libpthread. But it may actually
10571 # need to link with libpthread in order to create multiple threads.
10572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
10573 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
10574 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
10575 $as_echo_n "(cached) " >&6
10576 else
10577 ac_check_lib_save_LIBS=$LIBS
10578 LIBS="-lpthread $LIBS"
10579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10580 /* end confdefs.h. */
10581
10582 /* Override any GCC internal prototype to avoid an error.
10583 Use char because int might match the return type of a GCC
10584 builtin and then its argument prototype would still apply. */
10585 #ifdef __cplusplus
10586 extern "C"
10587 #endif
10588 char pthread_kill ();
10589 int
10590 main ()
10591 {
10592 return pthread_kill ();
10593 ;
10594 return 0;
10595 }
10596 _ACEOF
10597 if ac_fn_c_try_link "$LINENO"; then :
10598 ac_cv_lib_pthread_pthread_kill=yes
10599 else
10600 ac_cv_lib_pthread_pthread_kill=no
10601 fi
10602 rm -f core conftest.err conftest.$ac_objext \
10603 conftest$ac_exeext conftest.$ac_ext
10604 LIBS=$ac_check_lib_save_LIBS
10605 fi
10606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
10607 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
10608 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
10609 LIBPMULTITHREAD=-lpthread
10610 # On Solaris and HP-UX, most pthread functions exist also in libc.
10611 # Therefore pthread_in_use() needs to actually try to create a
10612 # thread: pthread_create from libc will fail, whereas
10613 # pthread_create will actually create a thread.
10614 # On Solaris 10 or newer, this test is no longer needed, because
10615 # libc contains the fully functional pthread functions.
10616 case "$host_os" in
10617 solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
10618
10619 $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
10620
10621 esac
10622
10623 fi
10624
10625 elif test $gl_pthread_api != yes; then
10626 # Some library is needed. Try libpthread and libc_r.
10627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
10628 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
10629 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
10630 $as_echo_n "(cached) " >&6
10631 else
10632 ac_check_lib_save_LIBS=$LIBS
10633 LIBS="-lpthread $LIBS"
10634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10635 /* end confdefs.h. */
10636
10637 /* Override any GCC internal prototype to avoid an error.
10638 Use char because int might match the return type of a GCC
10639 builtin and then its argument prototype would still apply. */
10640 #ifdef __cplusplus
10641 extern "C"
10642 #endif
10643 char pthread_kill ();
10644 int
10645 main ()
10646 {
10647 return pthread_kill ();
10648 ;
10649 return 0;
10650 }
10651 _ACEOF
10652 if ac_fn_c_try_link "$LINENO"; then :
10653 ac_cv_lib_pthread_pthread_kill=yes
10654 else
10655 ac_cv_lib_pthread_pthread_kill=no
10656 fi
10657 rm -f core conftest.err conftest.$ac_objext \
10658 conftest$ac_exeext conftest.$ac_ext
10659 LIBS=$ac_check_lib_save_LIBS
10660 fi
10661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
10662 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
10663 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
10664 gl_pthread_api=yes
10665 LIBPTHREAD=-lpthread
10666 LIBPMULTITHREAD=-lpthread
10667 fi
10668
10669 if test $gl_pthread_api != yes; then
10670 # For FreeBSD 4.
10671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
10672 $as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
10673 if ${ac_cv_lib_c_r_pthread_kill+:} false; then :
10674 $as_echo_n "(cached) " >&6
10675 else
10676 ac_check_lib_save_LIBS=$LIBS
10677 LIBS="-lc_r $LIBS"
10678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10679 /* end confdefs.h. */
10680
10681 /* Override any GCC internal prototype to avoid an error.
10682 Use char because int might match the return type of a GCC
10683 builtin and then its argument prototype would still apply. */
10684 #ifdef __cplusplus
10685 extern "C"
10686 #endif
10687 char pthread_kill ();
10688 int
10689 main ()
10690 {
10691 return pthread_kill ();
10692 ;
10693 return 0;
10694 }
10695 _ACEOF
10696 if ac_fn_c_try_link "$LINENO"; then :
10697 ac_cv_lib_c_r_pthread_kill=yes
10698 else
10699 ac_cv_lib_c_r_pthread_kill=no
10700 fi
10701 rm -f core conftest.err conftest.$ac_objext \
10702 conftest$ac_exeext conftest.$ac_ext
10703 LIBS=$ac_check_lib_save_LIBS
10704 fi
10705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
10706 $as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
10707 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then :
10708 gl_pthread_api=yes
10709 LIBPTHREAD=-lc_r
10710 LIBPMULTITHREAD=-lc_r
10711 fi
10712
10713 fi
10714 fi
10715 fi
10716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
10717 $as_echo_n "checking whether POSIX threads API is available... " >&6; }
10718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
10719 $as_echo "$gl_pthread_api" >&6; }
10720
10721
10722 if test $gl_pthread_api = yes; then
10723
10724 $as_echo "#define HAVE_PTHREAD_API 1" >>confdefs.h
10725
10726 fi
10727
10728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10729 /* end confdefs.h. */
10730 #include <sched.h>
10731 int
10732 main ()
10733 {
10734 sched_yield ();
10735 ;
10736 return 0;
10737 }
10738 _ACEOF
10739 if ac_fn_c_try_link "$LINENO"; then :
10740 LIB_SCHED_YIELD=
10741
10742 else
10743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
10744 $as_echo_n "checking for sched_yield in -lrt... " >&6; }
10745 if ${ac_cv_lib_rt_sched_yield+:} false; then :
10746 $as_echo_n "(cached) " >&6
10747 else
10748 ac_check_lib_save_LIBS=$LIBS
10749 LIBS="-lrt $LIBS"
10750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10751 /* end confdefs.h. */
10752
10753 /* Override any GCC internal prototype to avoid an error.
10754 Use char because int might match the return type of a GCC
10755 builtin and then its argument prototype would still apply. */
10756 #ifdef __cplusplus
10757 extern "C"
10758 #endif
10759 char sched_yield ();
10760 int
10761 main ()
10762 {
10763 return sched_yield ();
10764 ;
10765 return 0;
10766 }
10767 _ACEOF
10768 if ac_fn_c_try_link "$LINENO"; then :
10769 ac_cv_lib_rt_sched_yield=yes
10770 else
10771 ac_cv_lib_rt_sched_yield=no
10772 fi
10773 rm -f core conftest.err conftest.$ac_objext \
10774 conftest$ac_exeext conftest.$ac_ext
10775 LIBS=$ac_check_lib_save_LIBS
10776 fi
10777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
10778 $as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
10779 if test "x$ac_cv_lib_rt_sched_yield" = xyes; then :
10780 LIB_SCHED_YIELD=-lrt
10781 else
10782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
10783 $as_echo_n "checking for sched_yield in -lposix4... " >&6; }
10784 if ${ac_cv_lib_posix4_sched_yield+:} false; then :
10785 $as_echo_n "(cached) " >&6
10786 else
10787 ac_check_lib_save_LIBS=$LIBS
10788 LIBS="-lposix4 $LIBS"
10789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10790 /* end confdefs.h. */
10791
10792 /* Override any GCC internal prototype to avoid an error.
10793 Use char because int might match the return type of a GCC
10794 builtin and then its argument prototype would still apply. */
10795 #ifdef __cplusplus
10796 extern "C"
10797 #endif
10798 char sched_yield ();
10799 int
10800 main ()
10801 {
10802 return sched_yield ();
10803 ;
10804 return 0;
10805 }
10806 _ACEOF
10807 if ac_fn_c_try_link "$LINENO"; then :
10808 ac_cv_lib_posix4_sched_yield=yes
10809 else
10810 ac_cv_lib_posix4_sched_yield=no
10811 fi
10812 rm -f core conftest.err conftest.$ac_objext \
10813 conftest$ac_exeext conftest.$ac_ext
10814 LIBS=$ac_check_lib_save_LIBS
10815 fi
10816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
10817 $as_echo "$ac_cv_lib_posix4_sched_yield" >&6; }
10818 if test "x$ac_cv_lib_posix4_sched_yield" = xyes; then :
10819 LIB_SCHED_YIELD=-lposix4
10820 fi
10821
10822 fi
10823
10824
10825 fi
10826 rm -f core conftest.err conftest.$ac_objext \
10827 conftest$ac_exeext conftest.$ac_ext
10828
10829
10830 gl_pthreadlib_body_done=done
10831 fi
10832
10833
10834
10835
10836
10837
10838
10839
10840
10841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (LC_ALL, NULL) is multithread-safe" >&5
10842 $as_echo_n "checking whether setlocale (LC_ALL, NULL) is multithread-safe... " >&6; }
10843 if ${gl_cv_func_setlocale_null_all_mtsafe+:} false; then :
10844 $as_echo_n "(cached) " >&6
10845 else
10846 case "$host_os" in
10847 # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin.
10848 *-musl* | darwin* | freebsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*)
10849 gl_cv_func_setlocale_null_all_mtsafe=no ;;
10850 # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows.
10851 *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*)
10852 gl_cv_func_setlocale_null_all_mtsafe=yes ;;
10853 # If we don't know, obey --enable-cross-guesses.
10854 *)
10855 gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;;
10856 esac
10857
10858 fi
10859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_all_mtsafe" >&5
10860 $as_echo "$gl_cv_func_setlocale_null_all_mtsafe" >&6; }
10861 case "$host_os" in
10862 mingw*) ;;
10863 *)
10864 if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
10865 gl_cv_func_setlocale_null_all_mtsafe="trivially yes"
10866 fi
10867 ;;
10868 esac
10869 case "$gl_cv_func_setlocale_null_all_mtsafe" in
10870 *yes) SETLOCALE_NULL_ALL_MTSAFE=1 ;;
10871 *) SETLOCALE_NULL_ALL_MTSAFE=0 ;;
10872 esac
10873
10874 cat >>confdefs.h <<_ACEOF
10875 #define SETLOCALE_NULL_ALL_MTSAFE $SETLOCALE_NULL_ALL_MTSAFE
10876 _ACEOF
10877
10878
10879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (category, NULL) is multithread-safe" >&5
10880 $as_echo_n "checking whether setlocale (category, NULL) is multithread-safe... " >&6; }
10881 if ${gl_cv_func_setlocale_null_one_mtsafe+:} false; then :
10882 $as_echo_n "(cached) " >&6
10883 else
10884 case "$host_os" in
10885 # Guess no on OpenBSD, AIX.
10886 openbsd* | aix*)
10887 gl_cv_func_setlocale_null_one_mtsafe=no ;;
10888 # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows.
10889 *-gnu* | gnu* | *-musl* | darwin* | freebsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
10890 gl_cv_func_setlocale_null_one_mtsafe=yes ;;
10891 # If we don't know, obey --enable-cross-guesses.
10892 *)
10893 gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;;
10894 esac
10895
10896 fi
10897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_one_mtsafe" >&5
10898 $as_echo "$gl_cv_func_setlocale_null_one_mtsafe" >&6; }
10899 case "$host_os" in
10900 mingw*) ;;
10901 *)
10902 if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
10903 gl_cv_func_setlocale_null_one_mtsafe="trivially yes"
10904 fi
10905 ;;
10906 esac
10907 case "$gl_cv_func_setlocale_null_one_mtsafe" in
10908 *yes) SETLOCALE_NULL_ONE_MTSAFE=1 ;;
10909 *) SETLOCALE_NULL_ONE_MTSAFE=0 ;;
10910 esac
10911
10912 cat >>confdefs.h <<_ACEOF
10913 #define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE
10914 _ACEOF
10915
10916
10917 if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
10918 case "$host_os" in
10919 mingw*) LIB_SETLOCALE_NULL= ;;
10920 *)
10921
10922
10923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
10924 $as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
10925 if ${gl_cv_have_weak+:} false; then :
10926 $as_echo_n "(cached) " >&6
10927 else
10928 gl_cv_have_weak=no
10929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10930 /* end confdefs.h. */
10931 extern void xyzzy ();
10932 #pragma weak xyzzy
10933 int
10934 main ()
10935 {
10936 xyzzy();
10937 ;
10938 return 0;
10939 }
10940 _ACEOF
10941 if ac_fn_c_try_link "$LINENO"; then :
10942 gl_cv_have_weak=maybe
10943 fi
10944 rm -f core conftest.err conftest.$ac_objext \
10945 conftest$ac_exeext conftest.$ac_ext
10946 if test $gl_cv_have_weak = maybe; then
10947 if test "$cross_compiling" = yes; then :
10948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10949 /* end confdefs.h. */
10950 #ifdef __ELF__
10951 Extensible Linking Format
10952 #endif
10953
10954 _ACEOF
10955 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10956 $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
10957 gl_cv_have_weak="guessing yes"
10958 else
10959 gl_cv_have_weak="guessing no"
10960 fi
10961 rm -f conftest*
10962
10963
10964 else
10965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10966 /* end confdefs.h. */
10967
10968 #include <stdio.h>
10969 #pragma weak fputs
10970 int main ()
10971 {
10972 return (fputs == NULL);
10973 }
10974 _ACEOF
10975 if ac_fn_c_try_run "$LINENO"; then :
10976 gl_cv_have_weak=yes
10977 else
10978 gl_cv_have_weak=no
10979 fi
10980 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10981 conftest.$ac_objext conftest.beam conftest.$ac_ext
10982 fi
10983
10984 fi
10985 case " $LDFLAGS " in
10986 *" -static "*) gl_cv_have_weak=no ;;
10987 esac
10988 case "$gl_cv_have_weak" in
10989 *yes)
10990 case "$host_os" in
10991 freebsd* | dragonfly*)
10992 : > conftest1.c
10993 $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
10994 cat <<EOF > conftest2.c
10995 #include <pthread.h>
10996 #pragma weak pthread_mutexattr_gettype
10997 int main ()
10998 {
10999 return (pthread_mutexattr_gettype != NULL);
11000 }
11001 EOF
11002 $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
11003 || gl_cv_have_weak=no
11004 rm -f conftest1.c libempty.so conftest2.c conftest
11005 ;;
11006 esac
11007 ;;
11008 esac
11009
11010 fi
11011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
11012 $as_echo "$gl_cv_have_weak" >&6; }
11013 case "$gl_cv_have_weak" in
11014 *yes)
11015
11016 $as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
11017
11018 ;;
11019 esac
11020
11021 case "$gl_cv_have_weak" in
11022 *yes) LIB_SETLOCALE_NULL= ;;
11023 *) LIB_SETLOCALE_NULL="$LIBPTHREAD" ;;
11024 esac
11025 ;;
11026 esac
11027 else
11028 LIB_SETLOCALE_NULL=
11029 fi
11030
11031
11032
11033
11034
11035 GNULIB_SOCKET=0;
11036 GNULIB_CONNECT=0;
11037 GNULIB_ACCEPT=0;
11038 GNULIB_BIND=0;
11039 GNULIB_GETPEERNAME=0;
11040 GNULIB_GETSOCKNAME=0;
11041 GNULIB_GETSOCKOPT=0;
11042 GNULIB_LISTEN=0;
11043 GNULIB_RECV=0;
11044 GNULIB_SEND=0;
11045 GNULIB_RECVFROM=0;
11046 GNULIB_SENDTO=0;
11047 GNULIB_SETSOCKOPT=0;
11048 GNULIB_SHUTDOWN=0;
11049 GNULIB_ACCEPT4=0;
11050 HAVE_STRUCT_SOCKADDR_STORAGE=1;
11051 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1;
11052
11053 HAVE_SA_FAMILY_T=1;
11054 HAVE_ACCEPT4=1;
11055
11056
11057
11058
11059
11060 case "$host_os" in
11061 osf*)
11062
11063 $as_echo "#define _POSIX_PII_SOCKET 1" >>confdefs.h
11064
11065 ;;
11066 esac
11067
11068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> is self-contained" >&5
11069 $as_echo_n "checking whether <sys/socket.h> is self-contained... " >&6; }
11070 if ${gl_cv_header_sys_socket_h_selfcontained+:} false; then :
11071 $as_echo_n "(cached) " >&6
11072 else
11073
11074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11075 /* end confdefs.h. */
11076 #include <sys/socket.h>
11077 int
11078 main ()
11079 {
11080
11081 ;
11082 return 0;
11083 }
11084 _ACEOF
11085 if ac_fn_c_try_compile "$LINENO"; then :
11086 gl_cv_header_sys_socket_h_selfcontained=yes
11087 else
11088 gl_cv_header_sys_socket_h_selfcontained=no
11089 fi
11090 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11091
11092 fi
11093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_selfcontained" >&5
11094 $as_echo "$gl_cv_header_sys_socket_h_selfcontained" >&6; }
11095 if test $gl_cv_header_sys_socket_h_selfcontained = yes; then
11096 for ac_func in shutdown
11097 do :
11098 ac_fn_c_check_func "$LINENO" "shutdown" "ac_cv_func_shutdown"
11099 if test "x$ac_cv_func_shutdown" = xyes; then :
11100 cat >>confdefs.h <<_ACEOF
11101 #define HAVE_SHUTDOWN 1
11102 _ACEOF
11103
11104 fi
11105 done
11106
11107 if test $ac_cv_func_shutdown = yes; then
11108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> defines the SHUT_* macros" >&5
11109 $as_echo_n "checking whether <sys/socket.h> defines the SHUT_* macros... " >&6; }
11110 if ${gl_cv_header_sys_socket_h_shut+:} false; then :
11111 $as_echo_n "(cached) " >&6
11112 else
11113
11114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11115 /* end confdefs.h. */
11116 #include <sys/socket.h>
11117 int
11118 main ()
11119 {
11120 int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };
11121 ;
11122 return 0;
11123 }
11124 _ACEOF
11125 if ac_fn_c_try_compile "$LINENO"; then :
11126 gl_cv_header_sys_socket_h_shut=yes
11127 else
11128 gl_cv_header_sys_socket_h_shut=no
11129 fi
11130 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11131
11132 fi
11133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_shut" >&5
11134 $as_echo "$gl_cv_header_sys_socket_h_shut" >&6; }
11135 if test $gl_cv_header_sys_socket_h_shut = no; then
11136 SYS_SOCKET_H='sys/socket.h'
11137 fi
11138 fi
11139 fi
11140 # We need to check for ws2tcpip.h now.
11141
11142
11143
11144
11145
11146
11147
11148
11149
11150
11151
11152 if test $gl_cv_have_include_next = yes; then
11153 gl_cv_next_sys_socket_h='<'sys/socket.h'>'
11154 else
11155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/socket.h>" >&5
11156 $as_echo_n "checking absolute name of <sys/socket.h>... " >&6; }
11157 if ${gl_cv_next_sys_socket_h+:} false; then :
11158 $as_echo_n "(cached) " >&6
11159 else
11160
11161 if test $ac_cv_header_sys_socket_h = yes; then
11162
11163
11164
11165
11166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11167 /* end confdefs.h. */
11168 #include <sys/socket.h>
11169 _ACEOF
11170 case "$host_os" in
11171 aix*) gl_absname_cpp="$ac_cpp -C" ;;
11172 *) gl_absname_cpp="$ac_cpp" ;;
11173 esac
11174
11175 case "$host_os" in
11176 mingw*)
11177 gl_dirsep_regex='[/\\]'
11178 ;;
11179 *)
11180 gl_dirsep_regex='\/'
11181 ;;
11182 esac
11183 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11184 gl_header_literal_regex=`echo 'sys/socket.h' \
11185 | sed -e "$gl_make_literal_regex_sed"`
11186 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11187 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11188 s|^/[^/]|//&|
11189 p
11190 q
11191 }'
11192
11193 gl_cv_absolute_sys_socket_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11194 sed -n "$gl_absolute_header_sed"`
11195
11196 gl_header=$gl_cv_absolute_sys_socket_h
11197 gl_cv_next_sys_socket_h='"'$gl_header'"'
11198 else
11199 gl_cv_next_sys_socket_h='<'sys/socket.h'>'
11200 fi
11201
11202
11203 fi
11204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_socket_h" >&5
11205 $as_echo "$gl_cv_next_sys_socket_h" >&6; }
11206 fi
11207 NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_h
11208
11209 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11210 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11211 gl_next_as_first_directive='<'sys/socket.h'>'
11212 else
11213 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11214 gl_next_as_first_directive=$gl_cv_next_sys_socket_h
11215 fi
11216 NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H=$gl_next_as_first_directive
11217
11218
11219
11220
11221 if test $ac_cv_header_sys_socket_h = yes; then
11222 HAVE_SYS_SOCKET_H=1
11223 else
11224 HAVE_SYS_SOCKET_H=0
11225 fi
11226
11227
11228
11229 if test $ac_cv_header_sys_socket_h = yes; then
11230 HAVE_WS2TCPIP_H=0
11231 else
11232 if test $ac_cv_header_ws2tcpip_h = yes; then
11233 HAVE_WS2TCPIP_H=1
11234 else
11235 HAVE_WS2TCPIP_H=0
11236 fi
11237 fi
11238
11239
11240
11241 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "
11242 /* sys/types.h is not needed according to POSIX, but the
11243 sys/socket.h in i386-unknown-freebsd4.10 and
11244 powerpc-apple-darwin5.5 required it. */
11245 #include <sys/types.h>
11246 #ifdef HAVE_SYS_SOCKET_H
11247 #include <sys/socket.h>
11248 #endif
11249 #ifdef HAVE_WS2TCPIP_H
11250 #include <ws2tcpip.h>
11251 #endif
11252
11253 "
11254 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
11255
11256 cat >>confdefs.h <<_ACEOF
11257 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
11258 _ACEOF
11259
11260
11261 fi
11262 ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" "
11263 /* sys/types.h is not needed according to POSIX, but the
11264 sys/socket.h in i386-unknown-freebsd4.10 and
11265 powerpc-apple-darwin5.5 required it. */
11266 #include <sys/types.h>
11267 #ifdef HAVE_SYS_SOCKET_H
11268 #include <sys/socket.h>
11269 #endif
11270 #ifdef HAVE_WS2TCPIP_H
11271 #include <ws2tcpip.h>
11272 #endif
11273
11274 "
11275 if test "x$ac_cv_type_sa_family_t" = xyes; then :
11276
11277 cat >>confdefs.h <<_ACEOF
11278 #define HAVE_SA_FAMILY_T 1
11279 _ACEOF
11280
11281
11282 fi
11283
11284 if test $ac_cv_type_struct_sockaddr_storage = no; then
11285 HAVE_STRUCT_SOCKADDR_STORAGE=0
11286 fi
11287 if test $ac_cv_type_sa_family_t = no; then
11288 HAVE_SA_FAMILY_T=0
11289 fi
11290 if test $ac_cv_type_struct_sockaddr_storage != no; then
11291 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
11292 #ifdef HAVE_SYS_SOCKET_H
11293 #include <sys/socket.h>
11294 #endif
11295 #ifdef HAVE_WS2TCPIP_H
11296 #include <ws2tcpip.h>
11297 #endif
11298
11299 "
11300 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
11301
11302 cat >>confdefs.h <<_ACEOF
11303 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
11304 _ACEOF
11305
11306
11307 else
11308 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0
11309 fi
11310
11311 fi
11312 if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \
11313 || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then
11314 SYS_SOCKET_H='sys/socket.h'
11315 fi
11316
11317
11318
11319
11320 if test $ac_cv_header_sys_socket_h != yes; then
11321 for ac_header in winsock2.h
11322 do :
11323 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
11324 if test "x$ac_cv_header_winsock2_h" = xyes; then :
11325 cat >>confdefs.h <<_ACEOF
11326 #define HAVE_WINSOCK2_H 1
11327 _ACEOF
11328
11329 fi
11330
11331 done
11332
11333 fi
11334 if test "$ac_cv_header_winsock2_h" = yes; then
11335 HAVE_WINSOCK2_H=1
11336 UNISTD_H_HAVE_WINSOCK2_H=1
11337 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
11338 else
11339 HAVE_WINSOCK2_H=0
11340 fi
11341
11342
11343
11344
11345
11346
11347
11348
11349
11350
11351
11352
11353
11354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv4 sockets" >&5
11355 $as_echo_n "checking for IPv4 sockets... " >&6; }
11356 if ${gl_cv_socket_ipv4+:} false; then :
11357 $as_echo_n "(cached) " >&6
11358 else
11359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11360 /* end confdefs.h. */
11361 #include <sys/types.h>
11362 #ifdef HAVE_SYS_SOCKET_H
11363 #include <sys/socket.h>
11364 #endif
11365 #ifdef HAVE_NETINET_IN_H
11366 #include <netinet/in.h>
11367 #endif
11368 #ifdef HAVE_WINSOCK2_H
11369 #include <winsock2.h>
11370 #endif
11371 int
11372 main ()
11373 {
11374 int x = AF_INET; struct in_addr y; struct sockaddr_in z;
11375 if (&x && &y && &z) return 0;
11376 ;
11377 return 0;
11378 }
11379 _ACEOF
11380 if ac_fn_c_try_compile "$LINENO"; then :
11381 gl_cv_socket_ipv4=yes
11382 else
11383 gl_cv_socket_ipv4=no
11384 fi
11385 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11386 fi
11387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv4" >&5
11388 $as_echo "$gl_cv_socket_ipv4" >&6; }
11389 if test $gl_cv_socket_ipv4 = yes; then
11390
11391 $as_echo "#define HAVE_IPV4 1" >>confdefs.h
11392
11393 fi
11394
11395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv6 sockets" >&5
11396 $as_echo_n "checking for IPv6 sockets... " >&6; }
11397 if ${gl_cv_socket_ipv6+:} false; then :
11398 $as_echo_n "(cached) " >&6
11399 else
11400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11401 /* end confdefs.h. */
11402 #include <sys/types.h>
11403 #ifdef HAVE_SYS_SOCKET_H
11404 #include <sys/socket.h>
11405 #endif
11406 #ifdef HAVE_NETINET_IN_H
11407 #include <netinet/in.h>
11408 #endif
11409 #ifdef HAVE_WINSOCK2_H
11410 #include <winsock2.h>
11411 #endif
11412 #ifdef HAVE_WS2TCPIP_H
11413 #include <ws2tcpip.h>
11414 #endif
11415 int
11416 main ()
11417 {
11418 int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z;
11419 if (&x && &y && &z) return 0;
11420 ;
11421 return 0;
11422 }
11423 _ACEOF
11424 if ac_fn_c_try_compile "$LINENO"; then :
11425 gl_cv_socket_ipv6=yes
11426 else
11427 gl_cv_socket_ipv6=no
11428 fi
11429 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11430 fi
11431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv6" >&5
11432 $as_echo "$gl_cv_socket_ipv6" >&6; }
11433 if test $gl_cv_socket_ipv6 = yes; then
11434
11435 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
11436
11437 fi
11438
11439
11440
11441
11442
11443
11444
11445
11446
11447
11448
11449
11450
11451 if test $gl_cv_have_include_next = yes; then
11452 gl_cv_next_limits_h='<'limits.h'>'
11453 else
11454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5
11455 $as_echo_n "checking absolute name of <limits.h>... " >&6; }
11456 if ${gl_cv_next_limits_h+:} false; then :
11457 $as_echo_n "(cached) " >&6
11458 else
11459
11460 if test $ac_cv_header_limits_h = yes; then
11461
11462
11463
11464
11465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11466 /* end confdefs.h. */
11467 #include <limits.h>
11468 _ACEOF
11469 case "$host_os" in
11470 aix*) gl_absname_cpp="$ac_cpp -C" ;;
11471 *) gl_absname_cpp="$ac_cpp" ;;
11472 esac
11473
11474 case "$host_os" in
11475 mingw*)
11476 gl_dirsep_regex='[/\\]'
11477 ;;
11478 *)
11479 gl_dirsep_regex='\/'
11480 ;;
11481 esac
11482 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11483 gl_header_literal_regex=`echo 'limits.h' \
11484 | sed -e "$gl_make_literal_regex_sed"`
11485 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11486 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11487 s|^/[^/]|//&|
11488 p
11489 q
11490 }'
11491
11492 gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11493 sed -n "$gl_absolute_header_sed"`
11494
11495 gl_header=$gl_cv_absolute_limits_h
11496 gl_cv_next_limits_h='"'$gl_header'"'
11497 else
11498 gl_cv_next_limits_h='<'limits.h'>'
11499 fi
11500
11501
11502 fi
11503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
11504 $as_echo "$gl_cv_next_limits_h" >&6; }
11505 fi
11506 NEXT_LIMITS_H=$gl_cv_next_limits_h
11507
11508 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11509 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11510 gl_next_as_first_directive='<'limits.h'>'
11511 else
11512 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11513 gl_next_as_first_directive=$gl_cv_next_limits_h
11514 fi
11515 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive
11516
11517
11518
11519
11520
11521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc." >&5
11522 $as_echo_n "checking whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc.... " >&6; }
11523 if ${gl_cv_header_limits_width+:} false; then :
11524 $as_echo_n "(cached) " >&6
11525 else
11526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11527 /* end confdefs.h. */
11528 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
11529 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
11530 #endif
11531 #include <limits.h>
11532 long long llm = LLONG_MAX;
11533 int wb = WORD_BIT;
11534 int ullw = ULLONG_WIDTH;
11535
11536 int
11537 main ()
11538 {
11539
11540 ;
11541 return 0;
11542 }
11543 _ACEOF
11544 if ac_fn_c_try_compile "$LINENO"; then :
11545 gl_cv_header_limits_width=yes
11546 else
11547 gl_cv_header_limits_width=no
11548 fi
11549 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11550 fi
11551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5
11552 $as_echo "$gl_cv_header_limits_width" >&6; }
11553 if test "$gl_cv_header_limits_width" = yes; then
11554 LIMITS_H=
11555 else
11556 LIMITS_H=limits.h
11557 fi
11558
11559 if test -n "$LIMITS_H"; then
11560 GL_GENERATE_LIMITS_H_TRUE=
11561 GL_GENERATE_LIMITS_H_FALSE='#'
11562 else
11563 GL_GENERATE_LIMITS_H_TRUE='#'
11564 GL_GENERATE_LIMITS_H_FALSE=
11565 fi
11566
11567
11568
11569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
11570 $as_echo_n "checking for wint_t... " >&6; }
11571 if ${gt_cv_c_wint_t+:} false; then :
11572 $as_echo_n "(cached) " >&6
11573 else
11574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11575 /* end confdefs.h. */
11576
11577 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
11578 <wchar.h>.
11579 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
11580 before <wchar.h>. */
11581 #include <stddef.h>
11582 #include <stdio.h>
11583 #include <time.h>
11584 #include <wchar.h>
11585 wint_t foo = (wchar_t)'\0';
11586 int
11587 main ()
11588 {
11589
11590 ;
11591 return 0;
11592 }
11593 _ACEOF
11594 if ac_fn_c_try_compile "$LINENO"; then :
11595 gt_cv_c_wint_t=yes
11596 else
11597 gt_cv_c_wint_t=no
11598 fi
11599 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11600 fi
11601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
11602 $as_echo "$gt_cv_c_wint_t" >&6; }
11603 if test $gt_cv_c_wint_t = yes; then
11604
11605 $as_echo "#define HAVE_WINT_T 1" >>confdefs.h
11606
11607
11608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wint_t is too small" >&5
11609 $as_echo_n "checking whether wint_t is too small... " >&6; }
11610 if ${gl_cv_type_wint_t_too_small+:} false; then :
11611 $as_echo_n "(cached) " >&6
11612 else
11613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11614 /* end confdefs.h. */
11615
11616 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
11617 <wchar.h>.
11618 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11619 included before <wchar.h>. */
11620 #if !(defined __GLIBC__ && !defined __UCLIBC__)
11621 # include <stddef.h>
11622 # include <stdio.h>
11623 # include <time.h>
11624 #endif
11625 #include <wchar.h>
11626 int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1];
11627
11628 int
11629 main ()
11630 {
11631
11632 ;
11633 return 0;
11634 }
11635 _ACEOF
11636 if ac_fn_c_try_compile "$LINENO"; then :
11637 gl_cv_type_wint_t_too_small=no
11638 else
11639 gl_cv_type_wint_t_too_small=yes
11640 fi
11641 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11642 fi
11643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wint_t_too_small" >&5
11644 $as_echo "$gl_cv_type_wint_t_too_small" >&6; }
11645 if test $gl_cv_type_wint_t_too_small = yes; then
11646 GNULIB_OVERRIDES_WINT_T=1
11647 else
11648 GNULIB_OVERRIDES_WINT_T=0
11649 fi
11650 else
11651 GNULIB_OVERRIDES_WINT_T=0
11652 fi
11653
11654
11655
11656
11657
11658
11659
11660 gl_cv_c_multiarch=no
11661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11662 /* end confdefs.h. */
11663 #ifndef __APPLE_CC__
11664 not a universal capable compiler
11665 #endif
11666 typedef int dummy;
11667
11668 _ACEOF
11669 if ac_fn_c_try_compile "$LINENO"; then :
11670
11671 arch=
11672 prev=
11673 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
11674 if test -n "$prev"; then
11675 case $word in
11676 i?86 | x86_64 | ppc | ppc64)
11677 if test -z "$arch" || test "$arch" = "$word"; then
11678 arch="$word"
11679 else
11680 gl_cv_c_multiarch=yes
11681 fi
11682 ;;
11683 esac
11684 prev=
11685 else
11686 if test "x$word" = "x-arch"; then
11687 prev=arch
11688 fi
11689 fi
11690 done
11691
11692 fi
11693 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11694 if test $gl_cv_c_multiarch = yes; then
11695 APPLE_UNIVERSAL_BUILD=1
11696 else
11697 APPLE_UNIVERSAL_BUILD=0
11698 fi
11699
11700
11701
11702
11703
11704
11705
11706
11707 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
11708
11709
11710 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
11711
11712
11713
11714 if test $ac_cv_header_wchar_h = yes; then
11715 HAVE_WCHAR_H=1
11716 else
11717 HAVE_WCHAR_H=0
11718 fi
11719
11720
11721 if test $ac_cv_header_inttypes_h = yes; then
11722 HAVE_INTTYPES_H=1
11723 else
11724 HAVE_INTTYPES_H=0
11725 fi
11726
11727
11728 if test $ac_cv_header_sys_types_h = yes; then
11729 HAVE_SYS_TYPES_H=1
11730 else
11731 HAVE_SYS_TYPES_H=0
11732 fi
11733
11734
11735
11736
11737
11738
11739
11740
11741
11742
11743
11744 if test $gl_cv_have_include_next = yes; then
11745 gl_cv_next_stdint_h='<'stdint.h'>'
11746 else
11747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
11748 $as_echo_n "checking absolute name of <stdint.h>... " >&6; }
11749 if ${gl_cv_next_stdint_h+:} false; then :
11750 $as_echo_n "(cached) " >&6
11751 else
11752
11753 if test $ac_cv_header_stdint_h = yes; then
11754
11755
11756
11757
11758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11759 /* end confdefs.h. */
11760 #include <stdint.h>
11761 _ACEOF
11762 case "$host_os" in
11763 aix*) gl_absname_cpp="$ac_cpp -C" ;;
11764 *) gl_absname_cpp="$ac_cpp" ;;
11765 esac
11766
11767 case "$host_os" in
11768 mingw*)
11769 gl_dirsep_regex='[/\\]'
11770 ;;
11771 *)
11772 gl_dirsep_regex='\/'
11773 ;;
11774 esac
11775 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11776 gl_header_literal_regex=`echo 'stdint.h' \
11777 | sed -e "$gl_make_literal_regex_sed"`
11778 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11779 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11780 s|^/[^/]|//&|
11781 p
11782 q
11783 }'
11784
11785 gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11786 sed -n "$gl_absolute_header_sed"`
11787
11788 gl_header=$gl_cv_absolute_stdint_h
11789 gl_cv_next_stdint_h='"'$gl_header'"'
11790 else
11791 gl_cv_next_stdint_h='<'stdint.h'>'
11792 fi
11793
11794
11795 fi
11796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
11797 $as_echo "$gl_cv_next_stdint_h" >&6; }
11798 fi
11799 NEXT_STDINT_H=$gl_cv_next_stdint_h
11800
11801 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11802 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11803 gl_next_as_first_directive='<'stdint.h'>'
11804 else
11805 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11806 gl_next_as_first_directive=$gl_cv_next_stdint_h
11807 fi
11808 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
11809
11810
11811
11812
11813 if test $ac_cv_header_stdint_h = yes; then
11814 HAVE_STDINT_H=1
11815 else
11816 HAVE_STDINT_H=0
11817 fi
11818
11819
11820 if test $ac_cv_header_stdint_h = yes; then
11821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
11822 $as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
11823 if ${gl_cv_header_working_stdint_h+:} false; then :
11824 $as_echo_n "(cached) " >&6
11825 else
11826 gl_cv_header_working_stdint_h=no
11827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11828 /* end confdefs.h. */
11829
11830
11831 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
11832 #define __STDC_CONSTANT_MACROS 1
11833 #define __STDC_LIMIT_MACROS 1
11834 #include <stdint.h>
11835 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
11836 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
11837 #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
11838 #endif
11839
11840
11841 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11842 included before <wchar.h>. */
11843 #include <stddef.h>
11844 #include <signal.h>
11845 #if HAVE_WCHAR_H
11846 # include <stdio.h>
11847 # include <time.h>
11848 # include <wchar.h>
11849 #endif
11850
11851
11852 #ifdef INT8_MAX
11853 int8_t a1 = INT8_MAX;
11854 int8_t a1min = INT8_MIN;
11855 #endif
11856 #ifdef INT16_MAX
11857 int16_t a2 = INT16_MAX;
11858 int16_t a2min = INT16_MIN;
11859 #endif
11860 #ifdef INT32_MAX
11861 int32_t a3 = INT32_MAX;
11862 int32_t a3min = INT32_MIN;
11863 #endif
11864 #ifdef INT64_MAX
11865 int64_t a4 = INT64_MAX;
11866 int64_t a4min = INT64_MIN;
11867 #endif
11868 #ifdef UINT8_MAX
11869 uint8_t b1 = UINT8_MAX;
11870 #else
11871 typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
11872 #endif
11873 #ifdef UINT16_MAX
11874 uint16_t b2 = UINT16_MAX;
11875 #endif
11876 #ifdef UINT32_MAX
11877 uint32_t b3 = UINT32_MAX;
11878 #endif
11879 #ifdef UINT64_MAX
11880 uint64_t b4 = UINT64_MAX;
11881 #endif
11882 int_least8_t c1 = INT8_C (0x7f);
11883 int_least8_t c1max = INT_LEAST8_MAX;
11884 int_least8_t c1min = INT_LEAST8_MIN;
11885 int_least16_t c2 = INT16_C (0x7fff);
11886 int_least16_t c2max = INT_LEAST16_MAX;
11887 int_least16_t c2min = INT_LEAST16_MIN;
11888 int_least32_t c3 = INT32_C (0x7fffffff);
11889 int_least32_t c3max = INT_LEAST32_MAX;
11890 int_least32_t c3min = INT_LEAST32_MIN;
11891 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
11892 int_least64_t c4max = INT_LEAST64_MAX;
11893 int_least64_t c4min = INT_LEAST64_MIN;
11894 uint_least8_t d1 = UINT8_C (0xff);
11895 uint_least8_t d1max = UINT_LEAST8_MAX;
11896 uint_least16_t d2 = UINT16_C (0xffff);
11897 uint_least16_t d2max = UINT_LEAST16_MAX;
11898 uint_least32_t d3 = UINT32_C (0xffffffff);
11899 uint_least32_t d3max = UINT_LEAST32_MAX;
11900 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
11901 uint_least64_t d4max = UINT_LEAST64_MAX;
11902 int_fast8_t e1 = INT_FAST8_MAX;
11903 int_fast8_t e1min = INT_FAST8_MIN;
11904 int_fast16_t e2 = INT_FAST16_MAX;
11905 int_fast16_t e2min = INT_FAST16_MIN;
11906 int_fast32_t e3 = INT_FAST32_MAX;
11907 int_fast32_t e3min = INT_FAST32_MIN;
11908 int_fast64_t e4 = INT_FAST64_MAX;
11909 int_fast64_t e4min = INT_FAST64_MIN;
11910 uint_fast8_t f1 = UINT_FAST8_MAX;
11911 uint_fast16_t f2 = UINT_FAST16_MAX;
11912 uint_fast32_t f3 = UINT_FAST32_MAX;
11913 uint_fast64_t f4 = UINT_FAST64_MAX;
11914 #ifdef INTPTR_MAX
11915 intptr_t g = INTPTR_MAX;
11916 intptr_t gmin = INTPTR_MIN;
11917 #endif
11918 #ifdef UINTPTR_MAX
11919 uintptr_t h = UINTPTR_MAX;
11920 #endif
11921 intmax_t i = INTMAX_MAX;
11922 uintmax_t j = UINTMAX_MAX;
11923
11924 /* Check that SIZE_MAX has the correct type, if possible. */
11925 #if 201112 <= __STDC_VERSION__
11926 int k = _Generic (SIZE_MAX, size_t: 0);
11927 #elif (2 <= __GNUC__ || defined __IBM__TYPEOF__ \
11928 || (0x5110 <= __SUNPRO_C && !__STDC__))
11929 extern size_t k;
11930 extern __typeof__ (SIZE_MAX) k;
11931 #endif
11932
11933 #include <limits.h> /* for CHAR_BIT */
11934 #define TYPE_MINIMUM(t) \
11935 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
11936 #define TYPE_MAXIMUM(t) \
11937 ((t) ((t) 0 < (t) -1 \
11938 ? (t) -1 \
11939 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
11940 struct s {
11941 int check_PTRDIFF:
11942 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
11943 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
11944 ? 1 : -1;
11945 /* Detect bug in FreeBSD 6.0 / ia64. */
11946 int check_SIG_ATOMIC:
11947 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
11948 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
11949 ? 1 : -1;
11950 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
11951 int check_WCHAR:
11952 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
11953 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
11954 ? 1 : -1;
11955 /* Detect bug in mingw. */
11956 int check_WINT:
11957 WINT_MIN == TYPE_MINIMUM (wint_t)
11958 && WINT_MAX == TYPE_MAXIMUM (wint_t)
11959 ? 1 : -1;
11960
11961 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
11962 int check_UINT8_C:
11963 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
11964 int check_UINT16_C:
11965 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
11966
11967 /* Detect bugs in OpenBSD 3.9 stdint.h. */
11968 #ifdef UINT8_MAX
11969 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
11970 #endif
11971 #ifdef UINT16_MAX
11972 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
11973 #endif
11974 #ifdef UINT32_MAX
11975 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
11976 #endif
11977 #ifdef UINT64_MAX
11978 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
11979 #endif
11980 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
11981 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
11982 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
11983 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
11984 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
11985 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
11986 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
11987 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
11988 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
11989 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
11990 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
11991 };
11992
11993 int
11994 main ()
11995 {
11996
11997 ;
11998 return 0;
11999 }
12000 _ACEOF
12001 if ac_fn_c_try_compile "$LINENO"; then :
12002 if test "$cross_compiling" = yes; then :
12003 case "$host_os" in
12004 # Guess yes on native Windows.
12005 mingw*) gl_cv_header_working_stdint_h="guessing yes" ;;
12006 # In general, assume it works.
12007 *) gl_cv_header_working_stdint_h="guessing yes" ;;
12008 esac
12009
12010 else
12011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12012 /* end confdefs.h. */
12013
12014
12015 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
12016 #define __STDC_CONSTANT_MACROS 1
12017 #define __STDC_LIMIT_MACROS 1
12018 #include <stdint.h>
12019
12020
12021 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12022 included before <wchar.h>. */
12023 #include <stddef.h>
12024 #include <signal.h>
12025 #if HAVE_WCHAR_H
12026 # include <stdio.h>
12027 # include <time.h>
12028 # include <wchar.h>
12029 #endif
12030
12031
12032 #include <stdio.h>
12033 #include <string.h>
12034 #define MVAL(macro) MVAL1(macro)
12035 #define MVAL1(expression) #expression
12036 static const char *macro_values[] =
12037 {
12038 #ifdef INT8_MAX
12039 MVAL (INT8_MAX),
12040 #endif
12041 #ifdef INT16_MAX
12042 MVAL (INT16_MAX),
12043 #endif
12044 #ifdef INT32_MAX
12045 MVAL (INT32_MAX),
12046 #endif
12047 #ifdef INT64_MAX
12048 MVAL (INT64_MAX),
12049 #endif
12050 #ifdef UINT8_MAX
12051 MVAL (UINT8_MAX),
12052 #endif
12053 #ifdef UINT16_MAX
12054 MVAL (UINT16_MAX),
12055 #endif
12056 #ifdef UINT32_MAX
12057 MVAL (UINT32_MAX),
12058 #endif
12059 #ifdef UINT64_MAX
12060 MVAL (UINT64_MAX),
12061 #endif
12062 NULL
12063 };
12064
12065 int
12066 main ()
12067 {
12068
12069 const char **mv;
12070 for (mv = macro_values; *mv != NULL; mv++)
12071 {
12072 const char *value = *mv;
12073 /* Test whether it looks like a cast expression. */
12074 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
12075 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
12076 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
12077 || strncmp (value, "((int)"/*)*/, 6) == 0
12078 || strncmp (value, "((signed short)"/*)*/, 15) == 0
12079 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
12080 return mv - macro_values + 1;
12081 }
12082 return 0;
12083
12084 ;
12085 return 0;
12086 }
12087 _ACEOF
12088 if ac_fn_c_try_run "$LINENO"; then :
12089 gl_cv_header_working_stdint_h=yes
12090 fi
12091 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12092 conftest.$ac_objext conftest.beam conftest.$ac_ext
12093 fi
12094
12095
12096 fi
12097 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12098
12099 fi
12100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
12101 $as_echo "$gl_cv_header_working_stdint_h" >&6; }
12102 fi
12103
12104 HAVE_C99_STDINT_H=0
12105 HAVE_SYS_BITYPES_H=0
12106 HAVE_SYS_INTTYPES_H=0
12107 STDINT_H=stdint.h
12108 case "$gl_cv_header_working_stdint_h" in
12109 *yes)
12110 HAVE_C99_STDINT_H=1
12111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h predates C++11" >&5
12112 $as_echo_n "checking whether stdint.h predates C++11... " >&6; }
12113 if ${gl_cv_header_stdint_predates_cxx11_h+:} false; then :
12114 $as_echo_n "(cached) " >&6
12115 else
12116 gl_cv_header_stdint_predates_cxx11_h=yes
12117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12118 /* end confdefs.h. */
12119
12120
12121 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
12122 #include <stdint.h>
12123
12124
12125 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12126 included before <wchar.h>. */
12127 #include <stddef.h>
12128 #include <signal.h>
12129 #if HAVE_WCHAR_H
12130 # include <stdio.h>
12131 # include <time.h>
12132 # include <wchar.h>
12133 #endif
12134
12135
12136 intmax_t im = INTMAX_MAX;
12137 int32_t i32 = INT32_C (0x7fffffff);
12138
12139 int
12140 main ()
12141 {
12142
12143 ;
12144 return 0;
12145 }
12146 _ACEOF
12147 if ac_fn_c_try_compile "$LINENO"; then :
12148 gl_cv_header_stdint_predates_cxx11_h=no
12149 fi
12150 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12151 fi
12152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_predates_cxx11_h" >&5
12153 $as_echo "$gl_cv_header_stdint_predates_cxx11_h" >&6; }
12154
12155 if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then
12156
12157 $as_echo "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
12158
12159
12160 $as_echo "#define __STDC_LIMIT_MACROS 1" >>confdefs.h
12161
12162 fi
12163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5
12164 $as_echo_n "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; }
12165 if ${gl_cv_header_stdint_width+:} false; then :
12166 $as_echo_n "(cached) " >&6
12167 else
12168 gl_cv_header_stdint_width=no
12169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12170 /* end confdefs.h. */
12171
12172 /* Work if build is not clean. */
12173 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
12174 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
12175 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
12176 #endif
12177 #include <stdint.h>
12178
12179 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12180 included before <wchar.h>. */
12181 #include <stddef.h>
12182 #include <signal.h>
12183 #if HAVE_WCHAR_H
12184 # include <stdio.h>
12185 # include <time.h>
12186 # include <wchar.h>
12187 #endif
12188
12189 int iw = UINTMAX_WIDTH;
12190
12191 int
12192 main ()
12193 {
12194
12195 ;
12196 return 0;
12197 }
12198 _ACEOF
12199 if ac_fn_c_try_compile "$LINENO"; then :
12200 gl_cv_header_stdint_width=yes
12201 fi
12202 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12203 fi
12204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5
12205 $as_echo "$gl_cv_header_stdint_width" >&6; }
12206 if test "$gl_cv_header_stdint_width" = yes; then
12207 STDINT_H=
12208 fi
12209 ;;
12210 *)
12211 for ac_header in sys/inttypes.h sys/bitypes.h
12212 do :
12213 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12214 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12215 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12216 cat >>confdefs.h <<_ACEOF
12217 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12218 _ACEOF
12219
12220 fi
12221
12222 done
12223
12224 if test $ac_cv_header_sys_inttypes_h = yes; then
12225 HAVE_SYS_INTTYPES_H=1
12226 fi
12227 if test $ac_cv_header_sys_bitypes_h = yes; then
12228 HAVE_SYS_BITYPES_H=1
12229 fi
12230
12231
12232 if test $APPLE_UNIVERSAL_BUILD = 0; then
12233
12234
12235 for gltype in ptrdiff_t size_t ; do
12236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
12237 $as_echo_n "checking for bit size of $gltype... " >&6; }
12238 if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
12239 $as_echo_n "(cached) " >&6
12240 else
12241 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
12242 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12243 included before <wchar.h>. */
12244 #include <stddef.h>
12245 #include <signal.h>
12246 #if HAVE_WCHAR_H
12247 # include <stdio.h>
12248 # include <time.h>
12249 # include <wchar.h>
12250 #endif
12251
12252 #include <limits.h>"; then :
12253
12254 else
12255 result=unknown
12256 fi
12257
12258 eval gl_cv_bitsizeof_${gltype}=\$result
12259
12260 fi
12261 eval ac_res=\$gl_cv_bitsizeof_${gltype}
12262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12263 $as_echo "$ac_res" >&6; }
12264 eval result=\$gl_cv_bitsizeof_${gltype}
12265 if test $result = unknown; then
12266 result=0
12267 fi
12268 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
12269 cat >>confdefs.h <<_ACEOF
12270 #define BITSIZEOF_${GLTYPE} $result
12271 _ACEOF
12272
12273 eval BITSIZEOF_${GLTYPE}=\$result
12274 done
12275
12276
12277 fi
12278
12279
12280 for gltype in sig_atomic_t wchar_t wint_t ; do
12281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
12282 $as_echo_n "checking for bit size of $gltype... " >&6; }
12283 if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
12284 $as_echo_n "(cached) " >&6
12285 else
12286 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
12287 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12288 included before <wchar.h>. */
12289 #include <stddef.h>
12290 #include <signal.h>
12291 #if HAVE_WCHAR_H
12292 # include <stdio.h>
12293 # include <time.h>
12294 # include <wchar.h>
12295 #endif
12296
12297 #include <limits.h>"; then :
12298
12299 else
12300 result=unknown
12301 fi
12302
12303 eval gl_cv_bitsizeof_${gltype}=\$result
12304
12305 fi
12306 eval ac_res=\$gl_cv_bitsizeof_${gltype}
12307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12308 $as_echo "$ac_res" >&6; }
12309 eval result=\$gl_cv_bitsizeof_${gltype}
12310 if test $result = unknown; then
12311 result=0
12312 fi
12313 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
12314 cat >>confdefs.h <<_ACEOF
12315 #define BITSIZEOF_${GLTYPE} $result
12316 _ACEOF
12317
12318 eval BITSIZEOF_${GLTYPE}=\$result
12319 done
12320
12321
12322
12323
12324 for gltype in sig_atomic_t wchar_t wint_t ; do
12325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
12326 $as_echo_n "checking whether $gltype is signed... " >&6; }
12327 if eval \${gl_cv_type_${gltype}_signed+:} false; then :
12328 $as_echo_n "(cached) " >&6
12329 else
12330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12331 /* end confdefs.h. */
12332
12333 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12334 included before <wchar.h>. */
12335 #include <stddef.h>
12336 #include <signal.h>
12337 #if HAVE_WCHAR_H
12338 # include <stdio.h>
12339 # include <time.h>
12340 # include <wchar.h>
12341 #endif
12342
12343 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
12344 int
12345 main ()
12346 {
12347
12348 ;
12349 return 0;
12350 }
12351 _ACEOF
12352 if ac_fn_c_try_compile "$LINENO"; then :
12353 result=yes
12354 else
12355 result=no
12356 fi
12357 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12358 eval gl_cv_type_${gltype}_signed=\$result
12359
12360 fi
12361 eval ac_res=\$gl_cv_type_${gltype}_signed
12362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12363 $as_echo "$ac_res" >&6; }
12364 eval result=\$gl_cv_type_${gltype}_signed
12365 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
12366 if test "$result" = yes; then
12367 cat >>confdefs.h <<_ACEOF
12368 #define HAVE_SIGNED_${GLTYPE} 1
12369 _ACEOF
12370
12371 eval HAVE_SIGNED_${GLTYPE}=1
12372 else
12373 eval HAVE_SIGNED_${GLTYPE}=0
12374 fi
12375 done
12376
12377
12378 gl_cv_type_ptrdiff_t_signed=yes
12379 gl_cv_type_size_t_signed=no
12380 if test $APPLE_UNIVERSAL_BUILD = 0; then
12381
12382
12383 for gltype in ptrdiff_t size_t ; do
12384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
12385 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
12386 if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
12387 $as_echo_n "(cached) " >&6
12388 else
12389 eval gl_cv_type_${gltype}_suffix=no
12390 eval result=\$gl_cv_type_${gltype}_signed
12391 if test "$result" = yes; then
12392 glsufu=
12393 else
12394 glsufu=u
12395 fi
12396 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
12397 case $glsuf in
12398 '') gltype1='int';;
12399 l) gltype1='long int';;
12400 ll) gltype1='long long int';;
12401 i64) gltype1='__int64';;
12402 u) gltype1='unsigned int';;
12403 ul) gltype1='unsigned long int';;
12404 ull) gltype1='unsigned long long int';;
12405 ui64)gltype1='unsigned __int64';;
12406 esac
12407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12408 /* end confdefs.h. */
12409
12410 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12411 included before <wchar.h>. */
12412 #include <stddef.h>
12413 #include <signal.h>
12414 #if HAVE_WCHAR_H
12415 # include <stdio.h>
12416 # include <time.h>
12417 # include <wchar.h>
12418 #endif
12419
12420 extern $gltype foo;
12421 extern $gltype1 foo;
12422 int
12423 main ()
12424 {
12425
12426 ;
12427 return 0;
12428 }
12429 _ACEOF
12430 if ac_fn_c_try_compile "$LINENO"; then :
12431 eval gl_cv_type_${gltype}_suffix=\$glsuf
12432 fi
12433 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12434 eval result=\$gl_cv_type_${gltype}_suffix
12435 test "$result" != no && break
12436 done
12437 fi
12438 eval ac_res=\$gl_cv_type_${gltype}_suffix
12439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12440 $as_echo "$ac_res" >&6; }
12441 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
12442 eval result=\$gl_cv_type_${gltype}_suffix
12443 test "$result" = no && result=
12444 eval ${GLTYPE}_SUFFIX=\$result
12445 cat >>confdefs.h <<_ACEOF
12446 #define ${GLTYPE}_SUFFIX $result
12447 _ACEOF
12448
12449 done
12450
12451
12452 fi
12453
12454
12455 for gltype in sig_atomic_t wchar_t wint_t ; do
12456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
12457 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
12458 if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
12459 $as_echo_n "(cached) " >&6
12460 else
12461 eval gl_cv_type_${gltype}_suffix=no
12462 eval result=\$gl_cv_type_${gltype}_signed
12463 if test "$result" = yes; then
12464 glsufu=
12465 else
12466 glsufu=u
12467 fi
12468 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
12469 case $glsuf in
12470 '') gltype1='int';;
12471 l) gltype1='long int';;
12472 ll) gltype1='long long int';;
12473 i64) gltype1='__int64';;
12474 u) gltype1='unsigned int';;
12475 ul) gltype1='unsigned long int';;
12476 ull) gltype1='unsigned long long int';;
12477 ui64)gltype1='unsigned __int64';;
12478 esac
12479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12480 /* end confdefs.h. */
12481
12482 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12483 included before <wchar.h>. */
12484 #include <stddef.h>
12485 #include <signal.h>
12486 #if HAVE_WCHAR_H
12487 # include <stdio.h>
12488 # include <time.h>
12489 # include <wchar.h>
12490 #endif
12491
12492 extern $gltype foo;
12493 extern $gltype1 foo;
12494 int
12495 main ()
12496 {
12497
12498 ;
12499 return 0;
12500 }
12501 _ACEOF
12502 if ac_fn_c_try_compile "$LINENO"; then :
12503 eval gl_cv_type_${gltype}_suffix=\$glsuf
12504 fi
12505 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12506 eval result=\$gl_cv_type_${gltype}_suffix
12507 test "$result" != no && break
12508 done
12509 fi
12510 eval ac_res=\$gl_cv_type_${gltype}_suffix
12511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12512 $as_echo "$ac_res" >&6; }
12513 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
12514 eval result=\$gl_cv_type_${gltype}_suffix
12515 test "$result" = no && result=
12516 eval ${GLTYPE}_SUFFIX=\$result
12517 cat >>confdefs.h <<_ACEOF
12518 #define ${GLTYPE}_SUFFIX $result
12519 _ACEOF
12520
12521 done
12522
12523
12524
12525 if test $GNULIB_OVERRIDES_WINT_T = 1; then
12526 BITSIZEOF_WINT_T=32
12527 fi
12528
12529 ;;
12530 esac
12531
12532
12533
12534 LIMITS_H='limits.h'
12535 if test -n "$LIMITS_H"; then
12536 GL_GENERATE_LIMITS_H_TRUE=
12537 GL_GENERATE_LIMITS_H_FALSE='#'
12538 else
12539 GL_GENERATE_LIMITS_H_TRUE='#'
12540 GL_GENERATE_LIMITS_H_FALSE=
12541 fi
12542
12543
12544
12545
12546
12547
12548
12549 if test -n "$STDINT_H"; then
12550 GL_GENERATE_STDINT_H_TRUE=
12551 GL_GENERATE_STDINT_H_FALSE='#'
12552 else
12553 GL_GENERATE_STDINT_H_TRUE='#'
12554 GL_GENERATE_STDINT_H_FALSE=
12555 fi
12556
12557
12558
12559
12560
12561 GNULIB_IMAXABS=0;
12562 GNULIB_IMAXDIV=0;
12563 GNULIB_STRTOIMAX=0;
12564 GNULIB_STRTOUMAX=0;
12565 HAVE_DECL_IMAXABS=1;
12566 HAVE_DECL_IMAXDIV=1;
12567 HAVE_DECL_STRTOIMAX=1;
12568 HAVE_DECL_STRTOUMAX=1;
12569 HAVE_IMAXDIV_T=1;
12570 REPLACE_STRTOIMAX=0;
12571 REPLACE_STRTOUMAX=0;
12572 INT32_MAX_LT_INTMAX_MAX=1;
12573 INT64_MAX_EQ_LONG_MAX='defined _LP64';
12574 PRI_MACROS_BROKEN=0;
12575 PRIPTR_PREFIX=__PRIPTR_PREFIX;
12576 UINT32_MAX_LT_UINTMAX_MAX=1;
12577 UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
12578
12579
12580
12581
12582
12583
12584
12585
12586
12587
12588
12589
12590
12591
12592
12593 if test $gl_cv_have_include_next = yes; then
12594 gl_cv_next_inttypes_h='<'inttypes.h'>'
12595 else
12596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
12597 $as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
12598 if ${gl_cv_next_inttypes_h+:} false; then :
12599 $as_echo_n "(cached) " >&6
12600 else
12601
12602 if test $ac_cv_header_inttypes_h = yes; then
12603
12604
12605
12606
12607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12608 /* end confdefs.h. */
12609 #include <inttypes.h>
12610 _ACEOF
12611 case "$host_os" in
12612 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12613 *) gl_absname_cpp="$ac_cpp" ;;
12614 esac
12615
12616 case "$host_os" in
12617 mingw*)
12618 gl_dirsep_regex='[/\\]'
12619 ;;
12620 *)
12621 gl_dirsep_regex='\/'
12622 ;;
12623 esac
12624 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12625 gl_header_literal_regex=`echo 'inttypes.h' \
12626 | sed -e "$gl_make_literal_regex_sed"`
12627 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12628 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12629 s|^/[^/]|//&|
12630 p
12631 q
12632 }'
12633
12634 gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12635 sed -n "$gl_absolute_header_sed"`
12636
12637 gl_header=$gl_cv_absolute_inttypes_h
12638 gl_cv_next_inttypes_h='"'$gl_header'"'
12639 else
12640 gl_cv_next_inttypes_h='<'inttypes.h'>'
12641 fi
12642
12643
12644 fi
12645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
12646 $as_echo "$gl_cv_next_inttypes_h" >&6; }
12647 fi
12648 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
12649
12650 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12651 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12652 gl_next_as_first_directive='<'inttypes.h'>'
12653 else
12654 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12655 gl_next_as_first_directive=$gl_cv_next_inttypes_h
12656 fi
12657 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
12658
12659
12660
12661
12662
12663
12664
12665
12666
12667
12668
12669
12670 for ac_header in inttypes.h
12671 do :
12672 ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
12673 if test "x$ac_cv_header_inttypes_h" = xyes; then :
12674 cat >>confdefs.h <<_ACEOF
12675 #define HAVE_INTTYPES_H 1
12676 _ACEOF
12677
12678 fi
12679
12680 done
12681
12682 if test $ac_cv_header_inttypes_h = yes; then
12683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5
12684 $as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; }
12685 if ${gt_cv_inttypes_pri_broken+:} false; then :
12686 $as_echo_n "(cached) " >&6
12687 else
12688
12689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12690 /* end confdefs.h. */
12691
12692 #include <inttypes.h>
12693 #ifdef PRId32
12694 char *p = PRId32;
12695 #endif
12696
12697 int
12698 main ()
12699 {
12700
12701 ;
12702 return 0;
12703 }
12704 _ACEOF
12705 if ac_fn_c_try_compile "$LINENO"; then :
12706 gt_cv_inttypes_pri_broken=no
12707 else
12708 gt_cv_inttypes_pri_broken=yes
12709 fi
12710 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12711
12712 fi
12713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5
12714 $as_echo "$gt_cv_inttypes_pri_broken" >&6; }
12715 fi
12716 if test "$gt_cv_inttypes_pri_broken" = yes; then
12717
12718 cat >>confdefs.h <<_ACEOF
12719 #define PRI_MACROS_BROKEN 1
12720 _ACEOF
12721
12722 PRI_MACROS_BROKEN=1
12723 else
12724 PRI_MACROS_BROKEN=0
12725 fi
12726
12727
12728
12729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
12730 $as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
12731 if ${gl_cv_cc_double_expbit0+:} false; then :
12732 $as_echo_n "(cached) " >&6
12733 else
12734
12735 if test "$cross_compiling" = yes; then :
12736
12737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12738 /* end confdefs.h. */
12739
12740 #if defined arm || defined __arm || defined __arm__
12741 mixed_endianness
12742 #endif
12743
12744 _ACEOF
12745 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12746 $EGREP "mixed_endianness" >/dev/null 2>&1; then :
12747 gl_cv_cc_double_expbit0="unknown"
12748 else
12749
12750 :
12751 if ${ac_cv_c_bigendian+:} false; then :
12752 $as_echo_n "(cached) " >&6
12753 else
12754 ac_cv_c_bigendian=unknown
12755 # See if we're dealing with a universal compiler.
12756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12757 /* end confdefs.h. */
12758 #ifndef __APPLE_CC__
12759 not a universal capable compiler
12760 #endif
12761 typedef int dummy;
12762
12763 _ACEOF
12764 if ac_fn_c_try_compile "$LINENO"; then :
12765
12766 # Check for potential -arch flags. It is not universal unless
12767 # there are at least two -arch flags with different values.
12768 ac_arch=
12769 ac_prev=
12770 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12771 if test -n "$ac_prev"; then
12772 case $ac_word in
12773 i?86 | x86_64 | ppc | ppc64)
12774 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12775 ac_arch=$ac_word
12776 else
12777 ac_cv_c_bigendian=universal
12778 break
12779 fi
12780 ;;
12781 esac
12782 ac_prev=
12783 elif test "x$ac_word" = "x-arch"; then
12784 ac_prev=arch
12785 fi
12786 done
12787 fi
12788 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12789 if test $ac_cv_c_bigendian = unknown; then
12790 # See if sys/param.h defines the BYTE_ORDER macro.
12791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12792 /* end confdefs.h. */
12793 #include <sys/types.h>
12794 #include <sys/param.h>
12795
12796 int
12797 main ()
12798 {
12799 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12800 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12801 && LITTLE_ENDIAN)
12802 bogus endian macros
12803 #endif
12804
12805 ;
12806 return 0;
12807 }
12808 _ACEOF
12809 if ac_fn_c_try_compile "$LINENO"; then :
12810 # It does; now see whether it defined to BIG_ENDIAN or not.
12811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12812 /* end confdefs.h. */
12813 #include <sys/types.h>
12814 #include <sys/param.h>
12815
12816 int
12817 main ()
12818 {
12819 #if BYTE_ORDER != BIG_ENDIAN
12820 not big endian
12821 #endif
12822
12823 ;
12824 return 0;
12825 }
12826 _ACEOF
12827 if ac_fn_c_try_compile "$LINENO"; then :
12828 ac_cv_c_bigendian=yes
12829 else
12830 ac_cv_c_bigendian=no
12831 fi
12832 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12833 fi
12834 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12835 fi
12836 if test $ac_cv_c_bigendian = unknown; then
12837 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12839 /* end confdefs.h. */
12840 #include <limits.h>
12841
12842 int
12843 main ()
12844 {
12845 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12846 bogus endian macros
12847 #endif
12848
12849 ;
12850 return 0;
12851 }
12852 _ACEOF
12853 if ac_fn_c_try_compile "$LINENO"; then :
12854 # It does; now see whether it defined to _BIG_ENDIAN or not.
12855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12856 /* end confdefs.h. */
12857 #include <limits.h>
12858
12859 int
12860 main ()
12861 {
12862 #ifndef _BIG_ENDIAN
12863 not big endian
12864 #endif
12865
12866 ;
12867 return 0;
12868 }
12869 _ACEOF
12870 if ac_fn_c_try_compile "$LINENO"; then :
12871 ac_cv_c_bigendian=yes
12872 else
12873 ac_cv_c_bigendian=no
12874 fi
12875 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12876 fi
12877 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12878 fi
12879 if test $ac_cv_c_bigendian = unknown; then
12880 # Compile a test program.
12881 if test "$cross_compiling" = yes; then :
12882 # Try to guess by grepping values from an object file.
12883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12884 /* end confdefs.h. */
12885 short int ascii_mm[] =
12886 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12887 short int ascii_ii[] =
12888 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12889 int use_ascii (int i) {
12890 return ascii_mm[i] + ascii_ii[i];
12891 }
12892 short int ebcdic_ii[] =
12893 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12894 short int ebcdic_mm[] =
12895 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12896 int use_ebcdic (int i) {
12897 return ebcdic_mm[i] + ebcdic_ii[i];
12898 }
12899 extern int foo;
12900
12901 int
12902 main ()
12903 {
12904 return use_ascii (foo) == use_ebcdic (foo);
12905 ;
12906 return 0;
12907 }
12908 _ACEOF
12909 if ac_fn_c_try_compile "$LINENO"; then :
12910 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12911 ac_cv_c_bigendian=yes
12912 fi
12913 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12914 if test "$ac_cv_c_bigendian" = unknown; then
12915 ac_cv_c_bigendian=no
12916 else
12917 # finding both strings is unlikely to happen, but who knows?
12918 ac_cv_c_bigendian=unknown
12919 fi
12920 fi
12921 fi
12922 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12923 else
12924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12925 /* end confdefs.h. */
12926 $ac_includes_default
12927 int
12928 main ()
12929 {
12930
12931 /* Are we little or big endian? From Harbison&Steele. */
12932 union
12933 {
12934 long int l;
12935 char c[sizeof (long int)];
12936 } u;
12937 u.l = 1;
12938 return u.c[sizeof (long int) - 1] == 1;
12939
12940 ;
12941 return 0;
12942 }
12943 _ACEOF
12944 if ac_fn_c_try_run "$LINENO"; then :
12945 ac_cv_c_bigendian=no
12946 else
12947 ac_cv_c_bigendian=yes
12948 fi
12949 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12950 conftest.$ac_objext conftest.beam conftest.$ac_ext
12951 fi
12952
12953 fi
12954 fi
12955 :
12956 case $ac_cv_c_bigendian in #(
12957 yes)
12958 gl_cv_cc_double_expbit0="word 0 bit 20";; #(
12959 no)
12960 gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
12961 universal)
12962
12963 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12964
12965 ;; #(
12966 *)
12967 gl_cv_cc_double_expbit0="unknown" ;;
12968 esac
12969
12970
12971 fi
12972 rm -f conftest*
12973
12974
12975 else
12976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12977 /* end confdefs.h. */
12978
12979 #include <float.h>
12980 #include <stddef.h>
12981 #include <stdio.h>
12982 #include <string.h>
12983 #define NWORDS \
12984 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
12985 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
12986 static unsigned int ored_words[NWORDS];
12987 static unsigned int anded_words[NWORDS];
12988 static void add_to_ored_words (double x)
12989 {
12990 memory_double m;
12991 size_t i;
12992 /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
12993 memset (&m, 0, sizeof (memory_double));
12994 m.value = x;
12995 for (i = 0; i < NWORDS; i++)
12996 {
12997 ored_words[i] |= m.word[i];
12998 anded_words[i] &= m.word[i];
12999 }
13000 }
13001 int main ()
13002 {
13003 size_t j;
13004 FILE *fp = fopen ("conftest.out", "w");
13005 if (fp == NULL)
13006 return 1;
13007 for (j = 0; j < NWORDS; j++)
13008 anded_words[j] = ~ (unsigned int) 0;
13009 add_to_ored_words (0.25);
13010 add_to_ored_words (0.5);
13011 add_to_ored_words (1.0);
13012 add_to_ored_words (2.0);
13013 add_to_ored_words (4.0);
13014 /* Remove bits that are common (e.g. if representation of the first mantissa
13015 bit is explicit). */
13016 for (j = 0; j < NWORDS; j++)
13017 ored_words[j] &= ~anded_words[j];
13018 /* Now find the nonzero word. */
13019 for (j = 0; j < NWORDS; j++)
13020 if (ored_words[j] != 0)
13021 break;
13022 if (j < NWORDS)
13023 {
13024 size_t i;
13025 for (i = j + 1; i < NWORDS; i++)
13026 if (ored_words[i] != 0)
13027 {
13028 fprintf (fp, "unknown");
13029 return (fclose (fp) != 0);
13030 }
13031 for (i = 0; ; i++)
13032 if ((ored_words[j] >> i) & 1)
13033 {
13034 fprintf (fp, "word %d bit %d", (int) j, (int) i);
13035 return (fclose (fp) != 0);
13036 }
13037 }
13038 fprintf (fp, "unknown");
13039 return (fclose (fp) != 0);
13040 }
13041
13042 _ACEOF
13043 if ac_fn_c_try_run "$LINENO"; then :
13044 gl_cv_cc_double_expbit0=`cat conftest.out`
13045 else
13046 gl_cv_cc_double_expbit0="unknown"
13047 fi
13048 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13049 conftest.$ac_objext conftest.beam conftest.$ac_ext
13050 fi
13051
13052 rm -f conftest.out
13053
13054 fi
13055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
13056 $as_echo "$gl_cv_cc_double_expbit0" >&6; }
13057 case "$gl_cv_cc_double_expbit0" in
13058 word*bit*)
13059 word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
13060 bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
13061
13062 cat >>confdefs.h <<_ACEOF
13063 #define DBL_EXPBIT0_WORD $word
13064 _ACEOF
13065
13066
13067 cat >>confdefs.h <<_ACEOF
13068 #define DBL_EXPBIT0_BIT $bit
13069 _ACEOF
13070
13071 ;;
13072 esac
13073
13074
13075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13076 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
13077 if ${ac_cv_c_bigendian+:} false; then :
13078 $as_echo_n "(cached) " >&6
13079 else
13080 ac_cv_c_bigendian=unknown
13081 # See if we're dealing with a universal compiler.
13082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13083 /* end confdefs.h. */
13084 #ifndef __APPLE_CC__
13085 not a universal capable compiler
13086 #endif
13087 typedef int dummy;
13088
13089 _ACEOF
13090 if ac_fn_c_try_compile "$LINENO"; then :
13091
13092 # Check for potential -arch flags. It is not universal unless
13093 # there are at least two -arch flags with different values.
13094 ac_arch=
13095 ac_prev=
13096 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13097 if test -n "$ac_prev"; then
13098 case $ac_word in
13099 i?86 | x86_64 | ppc | ppc64)
13100 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13101 ac_arch=$ac_word
13102 else
13103 ac_cv_c_bigendian=universal
13104 break
13105 fi
13106 ;;
13107 esac
13108 ac_prev=
13109 elif test "x$ac_word" = "x-arch"; then
13110 ac_prev=arch
13111 fi
13112 done
13113 fi
13114 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13115 if test $ac_cv_c_bigendian = unknown; then
13116 # See if sys/param.h defines the BYTE_ORDER macro.
13117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13118 /* end confdefs.h. */
13119 #include <sys/types.h>
13120 #include <sys/param.h>
13121
13122 int
13123 main ()
13124 {
13125 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13126 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13127 && LITTLE_ENDIAN)
13128 bogus endian macros
13129 #endif
13130
13131 ;
13132 return 0;
13133 }
13134 _ACEOF
13135 if ac_fn_c_try_compile "$LINENO"; then :
13136 # It does; now see whether it defined to BIG_ENDIAN or not.
13137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13138 /* end confdefs.h. */
13139 #include <sys/types.h>
13140 #include <sys/param.h>
13141
13142 int
13143 main ()
13144 {
13145 #if BYTE_ORDER != BIG_ENDIAN
13146 not big endian
13147 #endif
13148
13149 ;
13150 return 0;
13151 }
13152 _ACEOF
13153 if ac_fn_c_try_compile "$LINENO"; then :
13154 ac_cv_c_bigendian=yes
13155 else
13156 ac_cv_c_bigendian=no
13157 fi
13158 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13159 fi
13160 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13161 fi
13162 if test $ac_cv_c_bigendian = unknown; then
13163 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13165 /* end confdefs.h. */
13166 #include <limits.h>
13167
13168 int
13169 main ()
13170 {
13171 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13172 bogus endian macros
13173 #endif
13174
13175 ;
13176 return 0;
13177 }
13178 _ACEOF
13179 if ac_fn_c_try_compile "$LINENO"; then :
13180 # It does; now see whether it defined to _BIG_ENDIAN or not.
13181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13182 /* end confdefs.h. */
13183 #include <limits.h>
13184
13185 int
13186 main ()
13187 {
13188 #ifndef _BIG_ENDIAN
13189 not big endian
13190 #endif
13191
13192 ;
13193 return 0;
13194 }
13195 _ACEOF
13196 if ac_fn_c_try_compile "$LINENO"; then :
13197 ac_cv_c_bigendian=yes
13198 else
13199 ac_cv_c_bigendian=no
13200 fi
13201 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13202 fi
13203 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13204 fi
13205 if test $ac_cv_c_bigendian = unknown; then
13206 # Compile a test program.
13207 if test "$cross_compiling" = yes; then :
13208 # Try to guess by grepping values from an object file.
13209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13210 /* end confdefs.h. */
13211 short int ascii_mm[] =
13212 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13213 short int ascii_ii[] =
13214 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13215 int use_ascii (int i) {
13216 return ascii_mm[i] + ascii_ii[i];
13217 }
13218 short int ebcdic_ii[] =
13219 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13220 short int ebcdic_mm[] =
13221 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13222 int use_ebcdic (int i) {
13223 return ebcdic_mm[i] + ebcdic_ii[i];
13224 }
13225 extern int foo;
13226
13227 int
13228 main ()
13229 {
13230 return use_ascii (foo) == use_ebcdic (foo);
13231 ;
13232 return 0;
13233 }
13234 _ACEOF
13235 if ac_fn_c_try_compile "$LINENO"; then :
13236 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13237 ac_cv_c_bigendian=yes
13238 fi
13239 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13240 if test "$ac_cv_c_bigendian" = unknown; then
13241 ac_cv_c_bigendian=no
13242 else
13243 # finding both strings is unlikely to happen, but who knows?
13244 ac_cv_c_bigendian=unknown
13245 fi
13246 fi
13247 fi
13248 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13249 else
13250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13251 /* end confdefs.h. */
13252 $ac_includes_default
13253 int
13254 main ()
13255 {
13256
13257 /* Are we little or big endian? From Harbison&Steele. */
13258 union
13259 {
13260 long int l;
13261 char c[sizeof (long int)];
13262 } u;
13263 u.l = 1;
13264 return u.c[sizeof (long int) - 1] == 1;
13265
13266 ;
13267 return 0;
13268 }
13269 _ACEOF
13270 if ac_fn_c_try_run "$LINENO"; then :
13271 ac_cv_c_bigendian=no
13272 else
13273 ac_cv_c_bigendian=yes
13274 fi
13275 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13276 conftest.$ac_objext conftest.beam conftest.$ac_ext
13277 fi
13278
13279 fi
13280 fi
13281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13282 $as_echo "$ac_cv_c_bigendian" >&6; }
13283 case $ac_cv_c_bigendian in #(
13284 yes)
13285 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13286 ;; #(
13287 no)
13288 ;; #(
13289 universal)
13290
13291 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
13292
13293 ;; #(
13294 *)
13295 as_fn_error $? "unknown endianness
13296 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
13297 esac
13298
13299
13300
13301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13302 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
13303 if ${am_cv_langinfo_codeset+:} false; then :
13304 $as_echo_n "(cached) " >&6
13305 else
13306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13307 /* end confdefs.h. */
13308 #include <langinfo.h>
13309 int
13310 main ()
13311 {
13312 char* cs = nl_langinfo(CODESET); return !cs;
13313 ;
13314 return 0;
13315 }
13316 _ACEOF
13317 if ac_fn_c_try_link "$LINENO"; then :
13318 am_cv_langinfo_codeset=yes
13319 else
13320 am_cv_langinfo_codeset=no
13321 fi
13322 rm -f core conftest.err conftest.$ac_objext \
13323 conftest$ac_exeext conftest.$ac_ext
13324
13325 fi
13326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13327 $as_echo "$am_cv_langinfo_codeset" >&6; }
13328 if test $am_cv_langinfo_codeset = yes; then
13329
13330 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
13331
13332 fi
13333
13334
13335 GNULIB_LOCALECONV=0;
13336 GNULIB_SETLOCALE=0;
13337 GNULIB_SETLOCALE_NULL=0;
13338 GNULIB_DUPLOCALE=0;
13339 GNULIB_LOCALENAME=0;
13340 HAVE_NEWLOCALE=1;
13341 HAVE_DUPLOCALE=1;
13342 HAVE_FREELOCALE=1;
13343 REPLACE_LOCALECONV=0;
13344 REPLACE_SETLOCALE=0;
13345 REPLACE_NEWLOCALE=0;
13346 REPLACE_DUPLOCALE=0;
13347 REPLACE_FREELOCALE=0;
13348 REPLACE_STRUCT_LCONV=0;
13349
13350
13351 REPLACE_NULL=0;
13352 HAVE_MAX_ALIGN_T=1;
13353 HAVE_WCHAR_T=1;
13354
13355
13356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
13357 $as_echo_n "checking for wchar_t... " >&6; }
13358 if ${gt_cv_c_wchar_t+:} false; then :
13359 $as_echo_n "(cached) " >&6
13360 else
13361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13362 /* end confdefs.h. */
13363 #include <stddef.h>
13364 wchar_t foo = (wchar_t)'\0';
13365 int
13366 main ()
13367 {
13368
13369 ;
13370 return 0;
13371 }
13372 _ACEOF
13373 if ac_fn_c_try_compile "$LINENO"; then :
13374 gt_cv_c_wchar_t=yes
13375 else
13376 gt_cv_c_wchar_t=no
13377 fi
13378 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13379 fi
13380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
13381 $as_echo "$gt_cv_c_wchar_t" >&6; }
13382 if test $gt_cv_c_wchar_t = yes; then
13383
13384 $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
13385
13386 fi
13387
13388
13389
13390
13391 STDDEF_H=
13392
13393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5
13394 $as_echo_n "checking for good max_align_t... " >&6; }
13395 if ${gl_cv_type_max_align_t+:} false; then :
13396 $as_echo_n "(cached) " >&6
13397 else
13398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13399 /* end confdefs.h. */
13400 #include <stddef.h>
13401 unsigned int s = sizeof (max_align_t);
13402 #if defined __GNUC__ || defined __IBM__ALIGNOF__
13403 int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
13404 int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1];
13405 #endif
13406
13407 int
13408 main ()
13409 {
13410
13411 ;
13412 return 0;
13413 }
13414 _ACEOF
13415 if ac_fn_c_try_compile "$LINENO"; then :
13416 gl_cv_type_max_align_t=yes
13417 else
13418 gl_cv_type_max_align_t=no
13419 fi
13420 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13421
13422 fi
13423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5
13424 $as_echo "$gl_cv_type_max_align_t" >&6; }
13425 if test $gl_cv_type_max_align_t = no; then
13426 HAVE_MAX_ALIGN_T=0
13427 STDDEF_H=stddef.h
13428 fi
13429
13430 if test $gt_cv_c_wchar_t = no; then
13431 HAVE_WCHAR_T=0
13432 STDDEF_H=stddef.h
13433 fi
13434
13435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
13436 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
13437 if ${gl_cv_decl_null_works+:} false; then :
13438 $as_echo_n "(cached) " >&6
13439 else
13440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13441 /* end confdefs.h. */
13442 #include <stddef.h>
13443 int test[2 * (sizeof NULL == sizeof (void *)) -1];
13444
13445 int
13446 main ()
13447 {
13448
13449 ;
13450 return 0;
13451 }
13452 _ACEOF
13453 if ac_fn_c_try_compile "$LINENO"; then :
13454 gl_cv_decl_null_works=yes
13455 else
13456 gl_cv_decl_null_works=no
13457 fi
13458 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13459 fi
13460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
13461 $as_echo "$gl_cv_decl_null_works" >&6; }
13462 if test $gl_cv_decl_null_works = no; then
13463 REPLACE_NULL=1
13464 STDDEF_H=stddef.h
13465 fi
13466
13467
13468 if test -n "$STDDEF_H"; then
13469 GL_GENERATE_STDDEF_H_TRUE=
13470 GL_GENERATE_STDDEF_H_FALSE='#'
13471 else
13472 GL_GENERATE_STDDEF_H_TRUE='#'
13473 GL_GENERATE_STDDEF_H_FALSE=
13474 fi
13475
13476 if test -n "$STDDEF_H"; then
13477
13478
13479
13480
13481
13482
13483
13484
13485 if test $gl_cv_have_include_next = yes; then
13486 gl_cv_next_stddef_h='<'stddef.h'>'
13487 else
13488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
13489 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
13490 if ${gl_cv_next_stddef_h+:} false; then :
13491 $as_echo_n "(cached) " >&6
13492 else
13493
13494
13495
13496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13497 /* end confdefs.h. */
13498 #include <stddef.h>
13499 _ACEOF
13500 case "$host_os" in
13501 aix*) gl_absname_cpp="$ac_cpp -C" ;;
13502 *) gl_absname_cpp="$ac_cpp" ;;
13503 esac
13504
13505 case "$host_os" in
13506 mingw*)
13507 gl_dirsep_regex='[/\\]'
13508 ;;
13509 *)
13510 gl_dirsep_regex='\/'
13511 ;;
13512 esac
13513 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13514 gl_header_literal_regex=`echo 'stddef.h' \
13515 | sed -e "$gl_make_literal_regex_sed"`
13516 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13517 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13518 s|^/[^/]|//&|
13519 p
13520 q
13521 }'
13522
13523 gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13524 sed -n "$gl_absolute_header_sed"`
13525
13526 gl_header=$gl_cv_absolute_stddef_h
13527 gl_cv_next_stddef_h='"'$gl_header'"'
13528
13529
13530 fi
13531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
13532 $as_echo "$gl_cv_next_stddef_h" >&6; }
13533 fi
13534 NEXT_STDDEF_H=$gl_cv_next_stddef_h
13535
13536 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13537 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13538 gl_next_as_first_directive='<'stddef.h'>'
13539 else
13540 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13541 gl_next_as_first_directive=$gl_cv_next_stddef_h
13542 fi
13543 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
13544
13545
13546
13547
13548 fi
13549
13550
13551
13552
13553
13554
13555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5
13556 $as_echo_n "checking whether locale.h defines locale_t... " >&6; }
13557 if ${gl_cv_header_locale_has_locale_t+:} false; then :
13558 $as_echo_n "(cached) " >&6
13559 else
13560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13561 /* end confdefs.h. */
13562 #include <locale.h>
13563 locale_t x;
13564 int
13565 main ()
13566 {
13567
13568 ;
13569 return 0;
13570 }
13571 _ACEOF
13572 if ac_fn_c_try_compile "$LINENO"; then :
13573 gl_cv_header_locale_has_locale_t=yes
13574 else
13575 gl_cv_header_locale_has_locale_t=no
13576 fi
13577 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13578
13579 fi
13580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_has_locale_t" >&5
13581 $as_echo "$gl_cv_header_locale_has_locale_t" >&6; }
13582
13583
13584 if test $ac_cv_header_xlocale_h = yes; then
13585 HAVE_XLOCALE_H=1
13586 if test $gl_cv_header_locale_has_locale_t = yes; then
13587 gl_cv_header_locale_h_needs_xlocale_h=no
13588 else
13589 gl_cv_header_locale_h_needs_xlocale_h=yes
13590 fi
13591 HAVE_LOCALE_T=1
13592 else
13593 HAVE_XLOCALE_H=0
13594 gl_cv_header_locale_h_needs_xlocale_h=no
13595 if test $gl_cv_header_locale_has_locale_t = yes; then
13596 HAVE_LOCALE_T=1
13597 else
13598 HAVE_LOCALE_T=0
13599 fi
13600 fi
13601
13602
13603
13604
13605 gl_threads_api=none
13606 LIBTHREAD=
13607 LTLIBTHREAD=
13608 LIBMULTITHREAD=
13609 LTLIBMULTITHREAD=
13610 if test "$gl_use_threads" != no; then
13611
13612
13613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
13614 $as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
13615 if ${gl_cv_have_weak+:} false; then :
13616 $as_echo_n "(cached) " >&6
13617 else
13618 gl_cv_have_weak=no
13619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13620 /* end confdefs.h. */
13621 extern void xyzzy ();
13622 #pragma weak xyzzy
13623 int
13624 main ()
13625 {
13626 xyzzy();
13627 ;
13628 return 0;
13629 }
13630 _ACEOF
13631 if ac_fn_c_try_link "$LINENO"; then :
13632 gl_cv_have_weak=maybe
13633 fi
13634 rm -f core conftest.err conftest.$ac_objext \
13635 conftest$ac_exeext conftest.$ac_ext
13636 if test $gl_cv_have_weak = maybe; then
13637 if test "$cross_compiling" = yes; then :
13638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13639 /* end confdefs.h. */
13640 #ifdef __ELF__
13641 Extensible Linking Format
13642 #endif
13643
13644 _ACEOF
13645 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13646 $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
13647 gl_cv_have_weak="guessing yes"
13648 else
13649 gl_cv_have_weak="guessing no"
13650 fi
13651 rm -f conftest*
13652
13653
13654 else
13655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13656 /* end confdefs.h. */
13657
13658 #include <stdio.h>
13659 #pragma weak fputs
13660 int main ()
13661 {
13662 return (fputs == NULL);
13663 }
13664 _ACEOF
13665 if ac_fn_c_try_run "$LINENO"; then :
13666 gl_cv_have_weak=yes
13667 else
13668 gl_cv_have_weak=no
13669 fi
13670 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13671 conftest.$ac_objext conftest.beam conftest.$ac_ext
13672 fi
13673
13674 fi
13675 case " $LDFLAGS " in
13676 *" -static "*) gl_cv_have_weak=no ;;
13677 esac
13678 case "$gl_cv_have_weak" in
13679 *yes)
13680 case "$host_os" in
13681 freebsd* | dragonfly*)
13682 : > conftest1.c
13683 $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
13684 cat <<EOF > conftest2.c
13685 #include <pthread.h>
13686 #pragma weak pthread_mutexattr_gettype
13687 int main ()
13688 {
13689 return (pthread_mutexattr_gettype != NULL);
13690 }
13691 EOF
13692 $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
13693 || gl_cv_have_weak=no
13694 rm -f conftest1.c libempty.so conftest2.c conftest
13695 ;;
13696 esac
13697 ;;
13698 esac
13699
13700 fi
13701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
13702 $as_echo "$gl_cv_have_weak" >&6; }
13703 case "$gl_cv_have_weak" in
13704 *yes)
13705
13706 $as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
13707
13708 ;;
13709 esac
13710
13711 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
13712
13713 :
13714 fi
13715 if test "$gl_use_threads" = isoc || test "$gl_use_threads" = isoc+posix; then
13716
13717 gl_have_isoc_threads="$ac_cv_header_threads_h"
13718 fi
13719 if test "$gl_use_threads" = yes \
13720 || test "$gl_use_threads" = posix \
13721 || test "$gl_use_threads" = isoc+posix; then
13722
13723
13724 if test -z "$gl_pthreadlib_body_done"; then
13725 gl_pthread_api=no
13726 LIBPTHREAD=
13727 LIBPMULTITHREAD=
13728 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
13729 # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
13730 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
13731 if test "x$ac_cv_header_pthread_h" = xyes; then :
13732 gl_have_pthread_h=yes
13733 else
13734 gl_have_pthread_h=no
13735 fi
13736
13737
13738 if test "$gl_have_pthread_h" = yes; then
13739 # Other possible tests:
13740 # -lpthreads (FSU threads, PCthreads)
13741 # -lgthreads
13742 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
13743 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
13744 # the second one only in libpthread, and lock.c needs it.
13745 #
13746 # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
13747 # needs -pthread for some reason. See:
13748 # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
13749 save_LIBS=$LIBS
13750 for gl_pthread in '' '-pthread'; do
13751 LIBS="$LIBS $gl_pthread"
13752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13753 /* end confdefs.h. */
13754 #include <pthread.h>
13755 pthread_mutex_t m;
13756 pthread_mutexattr_t ma;
13757
13758 int
13759 main ()
13760 {
13761 pthread_mutex_lock (&m);
13762 pthread_mutexattr_init (&ma);
13763 ;
13764 return 0;
13765 }
13766 _ACEOF
13767 if ac_fn_c_try_link "$LINENO"; then :
13768 gl_pthread_api=yes
13769 LIBPTHREAD=$gl_pthread
13770 LIBPMULTITHREAD=$gl_pthread
13771 fi
13772 rm -f core conftest.err conftest.$ac_objext \
13773 conftest$ac_exeext conftest.$ac_ext
13774 LIBS=$save_LIBS
13775 test $gl_pthread_api = yes && break
13776 done
13777
13778 # Test for libpthread by looking for pthread_kill. (Not pthread_self,
13779 # since it is defined as a macro on OSF/1.)
13780 if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
13781 # The program links fine without libpthread. But it may actually
13782 # need to link with libpthread in order to create multiple threads.
13783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
13784 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
13785 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
13786 $as_echo_n "(cached) " >&6
13787 else
13788 ac_check_lib_save_LIBS=$LIBS
13789 LIBS="-lpthread $LIBS"
13790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13791 /* end confdefs.h. */
13792
13793 /* Override any GCC internal prototype to avoid an error.
13794 Use char because int might match the return type of a GCC
13795 builtin and then its argument prototype would still apply. */
13796 #ifdef __cplusplus
13797 extern "C"
13798 #endif
13799 char pthread_kill ();
13800 int
13801 main ()
13802 {
13803 return pthread_kill ();
13804 ;
13805 return 0;
13806 }
13807 _ACEOF
13808 if ac_fn_c_try_link "$LINENO"; then :
13809 ac_cv_lib_pthread_pthread_kill=yes
13810 else
13811 ac_cv_lib_pthread_pthread_kill=no
13812 fi
13813 rm -f core conftest.err conftest.$ac_objext \
13814 conftest$ac_exeext conftest.$ac_ext
13815 LIBS=$ac_check_lib_save_LIBS
13816 fi
13817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
13818 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
13819 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
13820 LIBPMULTITHREAD=-lpthread
13821 # On Solaris and HP-UX, most pthread functions exist also in libc.
13822 # Therefore pthread_in_use() needs to actually try to create a
13823 # thread: pthread_create from libc will fail, whereas
13824 # pthread_create will actually create a thread.
13825 # On Solaris 10 or newer, this test is no longer needed, because
13826 # libc contains the fully functional pthread functions.
13827 case "$host_os" in
13828 solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
13829
13830 $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
13831
13832 esac
13833
13834 fi
13835
13836 elif test $gl_pthread_api != yes; then
13837 # Some library is needed. Try libpthread and libc_r.
13838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
13839 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
13840 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
13841 $as_echo_n "(cached) " >&6
13842 else
13843 ac_check_lib_save_LIBS=$LIBS
13844 LIBS="-lpthread $LIBS"
13845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13846 /* end confdefs.h. */
13847
13848 /* Override any GCC internal prototype to avoid an error.
13849 Use char because int might match the return type of a GCC
13850 builtin and then its argument prototype would still apply. */
13851 #ifdef __cplusplus
13852 extern "C"
13853 #endif
13854 char pthread_kill ();
13855 int
13856 main ()
13857 {
13858 return pthread_kill ();
13859 ;
13860 return 0;
13861 }
13862 _ACEOF
13863 if ac_fn_c_try_link "$LINENO"; then :
13864 ac_cv_lib_pthread_pthread_kill=yes
13865 else
13866 ac_cv_lib_pthread_pthread_kill=no
13867 fi
13868 rm -f core conftest.err conftest.$ac_objext \
13869 conftest$ac_exeext conftest.$ac_ext
13870 LIBS=$ac_check_lib_save_LIBS
13871 fi
13872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
13873 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
13874 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
13875 gl_pthread_api=yes
13876 LIBPTHREAD=-lpthread
13877 LIBPMULTITHREAD=-lpthread
13878 fi
13879
13880 if test $gl_pthread_api != yes; then
13881 # For FreeBSD 4.
13882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
13883 $as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
13884 if ${ac_cv_lib_c_r_pthread_kill+:} false; then :
13885 $as_echo_n "(cached) " >&6
13886 else
13887 ac_check_lib_save_LIBS=$LIBS
13888 LIBS="-lc_r $LIBS"
13889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13890 /* end confdefs.h. */
13891
13892 /* Override any GCC internal prototype to avoid an error.
13893 Use char because int might match the return type of a GCC
13894 builtin and then its argument prototype would still apply. */
13895 #ifdef __cplusplus
13896 extern "C"
13897 #endif
13898 char pthread_kill ();
13899 int
13900 main ()
13901 {
13902 return pthread_kill ();
13903 ;
13904 return 0;
13905 }
13906 _ACEOF
13907 if ac_fn_c_try_link "$LINENO"; then :
13908 ac_cv_lib_c_r_pthread_kill=yes
13909 else
13910 ac_cv_lib_c_r_pthread_kill=no
13911 fi
13912 rm -f core conftest.err conftest.$ac_objext \
13913 conftest$ac_exeext conftest.$ac_ext
13914 LIBS=$ac_check_lib_save_LIBS
13915 fi
13916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
13917 $as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
13918 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then :
13919 gl_pthread_api=yes
13920 LIBPTHREAD=-lc_r
13921 LIBPMULTITHREAD=-lc_r
13922 fi
13923
13924 fi
13925 fi
13926 fi
13927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
13928 $as_echo_n "checking whether POSIX threads API is available... " >&6; }
13929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
13930 $as_echo "$gl_pthread_api" >&6; }
13931
13932
13933 if test $gl_pthread_api = yes; then
13934
13935 $as_echo "#define HAVE_PTHREAD_API 1" >>confdefs.h
13936
13937 fi
13938
13939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13940 /* end confdefs.h. */
13941 #include <sched.h>
13942 int
13943 main ()
13944 {
13945 sched_yield ();
13946 ;
13947 return 0;
13948 }
13949 _ACEOF
13950 if ac_fn_c_try_link "$LINENO"; then :
13951 LIB_SCHED_YIELD=
13952
13953 else
13954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
13955 $as_echo_n "checking for sched_yield in -lrt... " >&6; }
13956 if ${ac_cv_lib_rt_sched_yield+:} false; then :
13957 $as_echo_n "(cached) " >&6
13958 else
13959 ac_check_lib_save_LIBS=$LIBS
13960 LIBS="-lrt $LIBS"
13961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13962 /* end confdefs.h. */
13963
13964 /* Override any GCC internal prototype to avoid an error.
13965 Use char because int might match the return type of a GCC
13966 builtin and then its argument prototype would still apply. */
13967 #ifdef __cplusplus
13968 extern "C"
13969 #endif
13970 char sched_yield ();
13971 int
13972 main ()
13973 {
13974 return sched_yield ();
13975 ;
13976 return 0;
13977 }
13978 _ACEOF
13979 if ac_fn_c_try_link "$LINENO"; then :
13980 ac_cv_lib_rt_sched_yield=yes
13981 else
13982 ac_cv_lib_rt_sched_yield=no
13983 fi
13984 rm -f core conftest.err conftest.$ac_objext \
13985 conftest$ac_exeext conftest.$ac_ext
13986 LIBS=$ac_check_lib_save_LIBS
13987 fi
13988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
13989 $as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
13990 if test "x$ac_cv_lib_rt_sched_yield" = xyes; then :
13991 LIB_SCHED_YIELD=-lrt
13992 else
13993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
13994 $as_echo_n "checking for sched_yield in -lposix4... " >&6; }
13995 if ${ac_cv_lib_posix4_sched_yield+:} false; then :
13996 $as_echo_n "(cached) " >&6
13997 else
13998 ac_check_lib_save_LIBS=$LIBS
13999 LIBS="-lposix4 $LIBS"
14000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14001 /* end confdefs.h. */
14002
14003 /* Override any GCC internal prototype to avoid an error.
14004 Use char because int might match the return type of a GCC
14005 builtin and then its argument prototype would still apply. */
14006 #ifdef __cplusplus
14007 extern "C"
14008 #endif
14009 char sched_yield ();
14010 int
14011 main ()
14012 {
14013 return sched_yield ();
14014 ;
14015 return 0;
14016 }
14017 _ACEOF
14018 if ac_fn_c_try_link "$LINENO"; then :
14019 ac_cv_lib_posix4_sched_yield=yes
14020 else
14021 ac_cv_lib_posix4_sched_yield=no
14022 fi
14023 rm -f core conftest.err conftest.$ac_objext \
14024 conftest$ac_exeext conftest.$ac_ext
14025 LIBS=$ac_check_lib_save_LIBS
14026 fi
14027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
14028 $as_echo "$ac_cv_lib_posix4_sched_yield" >&6; }
14029 if test "x$ac_cv_lib_posix4_sched_yield" = xyes; then :
14030 LIB_SCHED_YIELD=-lposix4
14031 fi
14032
14033 fi
14034
14035
14036 fi
14037 rm -f core conftest.err conftest.$ac_objext \
14038 conftest$ac_exeext conftest.$ac_ext
14039
14040
14041 gl_pthreadlib_body_done=done
14042 fi
14043
14044 LIBTHREAD=$LIBPTHREAD LTLIBTHREAD=$LIBPTHREAD
14045 LIBMULTITHREAD=$LIBPMULTITHREAD LTLIBMULTITHREAD=$LIBPMULTITHREAD
14046 if test $gl_pthread_api = yes; then
14047 if test "$gl_use_threads" = isoc+posix && test "$gl_have_isoc_threads" = yes; then
14048 gl_threads_api='isoc+posix'
14049
14050 $as_echo "#define USE_ISOC_AND_POSIX_THREADS 1" >>confdefs.h
14051
14052 LIBTHREAD= LTLIBTHREAD=
14053 else
14054 gl_threads_api=posix
14055
14056 $as_echo "#define USE_POSIX_THREADS 1" >>confdefs.h
14057
14058 if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
14059 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
14060
14061 $as_echo "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h
14062
14063 LIBTHREAD= LTLIBTHREAD=
14064 fi
14065 fi
14066 fi
14067 fi
14068 fi
14069 if test $gl_threads_api = none; then
14070 if test "$gl_use_threads" = isoc && test "$gl_have_isoc_threads" = yes; then
14071
14072
14073
14074 if test -z "$gl_stdthreadlib_body_done"; then
14075
14076
14077 case "$host_os" in
14078 mingw*)
14079 LIBSTDTHREAD=
14080 ;;
14081 *)
14082
14083
14084 if test -z "$gl_pthreadlib_body_done"; then
14085 gl_pthread_api=no
14086 LIBPTHREAD=
14087 LIBPMULTITHREAD=
14088 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
14089 # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
14090 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
14091 if test "x$ac_cv_header_pthread_h" = xyes; then :
14092 gl_have_pthread_h=yes
14093 else
14094 gl_have_pthread_h=no
14095 fi
14096
14097
14098 if test "$gl_have_pthread_h" = yes; then
14099 # Other possible tests:
14100 # -lpthreads (FSU threads, PCthreads)
14101 # -lgthreads
14102 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
14103 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
14104 # the second one only in libpthread, and lock.c needs it.
14105 #
14106 # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
14107 # needs -pthread for some reason. See:
14108 # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
14109 save_LIBS=$LIBS
14110 for gl_pthread in '' '-pthread'; do
14111 LIBS="$LIBS $gl_pthread"
14112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14113 /* end confdefs.h. */
14114 #include <pthread.h>
14115 pthread_mutex_t m;
14116 pthread_mutexattr_t ma;
14117
14118 int
14119 main ()
14120 {
14121 pthread_mutex_lock (&m);
14122 pthread_mutexattr_init (&ma);
14123 ;
14124 return 0;
14125 }
14126 _ACEOF
14127 if ac_fn_c_try_link "$LINENO"; then :
14128 gl_pthread_api=yes
14129 LIBPTHREAD=$gl_pthread
14130 LIBPMULTITHREAD=$gl_pthread
14131 fi
14132 rm -f core conftest.err conftest.$ac_objext \
14133 conftest$ac_exeext conftest.$ac_ext
14134 LIBS=$save_LIBS
14135 test $gl_pthread_api = yes && break
14136 done
14137
14138 # Test for libpthread by looking for pthread_kill. (Not pthread_self,
14139 # since it is defined as a macro on OSF/1.)
14140 if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
14141 # The program links fine without libpthread. But it may actually
14142 # need to link with libpthread in order to create multiple threads.
14143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
14144 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
14145 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
14146 $as_echo_n "(cached) " >&6
14147 else
14148 ac_check_lib_save_LIBS=$LIBS
14149 LIBS="-lpthread $LIBS"
14150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14151 /* end confdefs.h. */
14152
14153 /* Override any GCC internal prototype to avoid an error.
14154 Use char because int might match the return type of a GCC
14155 builtin and then its argument prototype would still apply. */
14156 #ifdef __cplusplus
14157 extern "C"
14158 #endif
14159 char pthread_kill ();
14160 int
14161 main ()
14162 {
14163 return pthread_kill ();
14164 ;
14165 return 0;
14166 }
14167 _ACEOF
14168 if ac_fn_c_try_link "$LINENO"; then :
14169 ac_cv_lib_pthread_pthread_kill=yes
14170 else
14171 ac_cv_lib_pthread_pthread_kill=no
14172 fi
14173 rm -f core conftest.err conftest.$ac_objext \
14174 conftest$ac_exeext conftest.$ac_ext
14175 LIBS=$ac_check_lib_save_LIBS
14176 fi
14177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
14178 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
14179 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
14180 LIBPMULTITHREAD=-lpthread
14181 # On Solaris and HP-UX, most pthread functions exist also in libc.
14182 # Therefore pthread_in_use() needs to actually try to create a
14183 # thread: pthread_create from libc will fail, whereas
14184 # pthread_create will actually create a thread.
14185 # On Solaris 10 or newer, this test is no longer needed, because
14186 # libc contains the fully functional pthread functions.
14187 case "$host_os" in
14188 solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
14189
14190 $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
14191
14192 esac
14193
14194 fi
14195
14196 elif test $gl_pthread_api != yes; then
14197 # Some library is needed. Try libpthread and libc_r.
14198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
14199 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
14200 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
14201 $as_echo_n "(cached) " >&6
14202 else
14203 ac_check_lib_save_LIBS=$LIBS
14204 LIBS="-lpthread $LIBS"
14205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14206 /* end confdefs.h. */
14207
14208 /* Override any GCC internal prototype to avoid an error.
14209 Use char because int might match the return type of a GCC
14210 builtin and then its argument prototype would still apply. */
14211 #ifdef __cplusplus
14212 extern "C"
14213 #endif
14214 char pthread_kill ();
14215 int
14216 main ()
14217 {
14218 return pthread_kill ();
14219 ;
14220 return 0;
14221 }
14222 _ACEOF
14223 if ac_fn_c_try_link "$LINENO"; then :
14224 ac_cv_lib_pthread_pthread_kill=yes
14225 else
14226 ac_cv_lib_pthread_pthread_kill=no
14227 fi
14228 rm -f core conftest.err conftest.$ac_objext \
14229 conftest$ac_exeext conftest.$ac_ext
14230 LIBS=$ac_check_lib_save_LIBS
14231 fi
14232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
14233 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
14234 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
14235 gl_pthread_api=yes
14236 LIBPTHREAD=-lpthread
14237 LIBPMULTITHREAD=-lpthread
14238 fi
14239
14240 if test $gl_pthread_api != yes; then
14241 # For FreeBSD 4.
14242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
14243 $as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
14244 if ${ac_cv_lib_c_r_pthread_kill+:} false; then :
14245 $as_echo_n "(cached) " >&6
14246 else
14247 ac_check_lib_save_LIBS=$LIBS
14248 LIBS="-lc_r $LIBS"
14249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14250 /* end confdefs.h. */
14251
14252 /* Override any GCC internal prototype to avoid an error.
14253 Use char because int might match the return type of a GCC
14254 builtin and then its argument prototype would still apply. */
14255 #ifdef __cplusplus
14256 extern "C"
14257 #endif
14258 char pthread_kill ();
14259 int
14260 main ()
14261 {
14262 return pthread_kill ();
14263 ;
14264 return 0;
14265 }
14266 _ACEOF
14267 if ac_fn_c_try_link "$LINENO"; then :
14268 ac_cv_lib_c_r_pthread_kill=yes
14269 else
14270 ac_cv_lib_c_r_pthread_kill=no
14271 fi
14272 rm -f core conftest.err conftest.$ac_objext \
14273 conftest$ac_exeext conftest.$ac_ext
14274 LIBS=$ac_check_lib_save_LIBS
14275 fi
14276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
14277 $as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
14278 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then :
14279 gl_pthread_api=yes
14280 LIBPTHREAD=-lc_r
14281 LIBPMULTITHREAD=-lc_r
14282 fi
14283
14284 fi
14285 fi
14286 fi
14287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
14288 $as_echo_n "checking whether POSIX threads API is available... " >&6; }
14289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
14290 $as_echo "$gl_pthread_api" >&6; }
14291
14292
14293 if test $gl_pthread_api = yes; then
14294
14295 $as_echo "#define HAVE_PTHREAD_API 1" >>confdefs.h
14296
14297 fi
14298
14299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14300 /* end confdefs.h. */
14301 #include <sched.h>
14302 int
14303 main ()
14304 {
14305 sched_yield ();
14306 ;
14307 return 0;
14308 }
14309 _ACEOF
14310 if ac_fn_c_try_link "$LINENO"; then :
14311 LIB_SCHED_YIELD=
14312
14313 else
14314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
14315 $as_echo_n "checking for sched_yield in -lrt... " >&6; }
14316 if ${ac_cv_lib_rt_sched_yield+:} false; then :
14317 $as_echo_n "(cached) " >&6
14318 else
14319 ac_check_lib_save_LIBS=$LIBS
14320 LIBS="-lrt $LIBS"
14321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14322 /* end confdefs.h. */
14323
14324 /* Override any GCC internal prototype to avoid an error.
14325 Use char because int might match the return type of a GCC
14326 builtin and then its argument prototype would still apply. */
14327 #ifdef __cplusplus
14328 extern "C"
14329 #endif
14330 char sched_yield ();
14331 int
14332 main ()
14333 {
14334 return sched_yield ();
14335 ;
14336 return 0;
14337 }
14338 _ACEOF
14339 if ac_fn_c_try_link "$LINENO"; then :
14340 ac_cv_lib_rt_sched_yield=yes
14341 else
14342 ac_cv_lib_rt_sched_yield=no
14343 fi
14344 rm -f core conftest.err conftest.$ac_objext \
14345 conftest$ac_exeext conftest.$ac_ext
14346 LIBS=$ac_check_lib_save_LIBS
14347 fi
14348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
14349 $as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
14350 if test "x$ac_cv_lib_rt_sched_yield" = xyes; then :
14351 LIB_SCHED_YIELD=-lrt
14352 else
14353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
14354 $as_echo_n "checking for sched_yield in -lposix4... " >&6; }
14355 if ${ac_cv_lib_posix4_sched_yield+:} false; then :
14356 $as_echo_n "(cached) " >&6
14357 else
14358 ac_check_lib_save_LIBS=$LIBS
14359 LIBS="-lposix4 $LIBS"
14360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14361 /* end confdefs.h. */
14362
14363 /* Override any GCC internal prototype to avoid an error.
14364 Use char because int might match the return type of a GCC
14365 builtin and then its argument prototype would still apply. */
14366 #ifdef __cplusplus
14367 extern "C"
14368 #endif
14369 char sched_yield ();
14370 int
14371 main ()
14372 {
14373 return sched_yield ();
14374 ;
14375 return 0;
14376 }
14377 _ACEOF
14378 if ac_fn_c_try_link "$LINENO"; then :
14379 ac_cv_lib_posix4_sched_yield=yes
14380 else
14381 ac_cv_lib_posix4_sched_yield=no
14382 fi
14383 rm -f core conftest.err conftest.$ac_objext \
14384 conftest$ac_exeext conftest.$ac_ext
14385 LIBS=$ac_check_lib_save_LIBS
14386 fi
14387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
14388 $as_echo "$ac_cv_lib_posix4_sched_yield" >&6; }
14389 if test "x$ac_cv_lib_posix4_sched_yield" = xyes; then :
14390 LIB_SCHED_YIELD=-lposix4
14391 fi
14392
14393 fi
14394
14395
14396 fi
14397 rm -f core conftest.err conftest.$ac_objext \
14398 conftest$ac_exeext conftest.$ac_ext
14399
14400
14401 gl_pthreadlib_body_done=done
14402 fi
14403
14404 if test $ac_cv_header_threads_h = yes; then
14405 for ac_func in thrd_create
14406 do :
14407 ac_fn_c_check_func "$LINENO" "thrd_create" "ac_cv_func_thrd_create"
14408 if test "x$ac_cv_func_thrd_create" = xyes; then :
14409 cat >>confdefs.h <<_ACEOF
14410 #define HAVE_THRD_CREATE 1
14411 _ACEOF
14412
14413 fi
14414 done
14415
14416 if test $ac_cv_func_thrd_create = yes; then
14417 LIBSTDTHREAD=
14418 else
14419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thrd_create in -lstdthreads" >&5
14420 $as_echo_n "checking for thrd_create in -lstdthreads... " >&6; }
14421 if ${ac_cv_lib_stdthreads_thrd_create+:} false; then :
14422 $as_echo_n "(cached) " >&6
14423 else
14424 ac_check_lib_save_LIBS=$LIBS
14425 LIBS="-lstdthreads $LIBS"
14426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14427 /* end confdefs.h. */
14428
14429 /* Override any GCC internal prototype to avoid an error.
14430 Use char because int might match the return type of a GCC
14431 builtin and then its argument prototype would still apply. */
14432 #ifdef __cplusplus
14433 extern "C"
14434 #endif
14435 char thrd_create ();
14436 int
14437 main ()
14438 {
14439 return thrd_create ();
14440 ;
14441 return 0;
14442 }
14443 _ACEOF
14444 if ac_fn_c_try_link "$LINENO"; then :
14445 ac_cv_lib_stdthreads_thrd_create=yes
14446 else
14447 ac_cv_lib_stdthreads_thrd_create=no
14448 fi
14449 rm -f core conftest.err conftest.$ac_objext \
14450 conftest$ac_exeext conftest.$ac_ext
14451 LIBS=$ac_check_lib_save_LIBS
14452 fi
14453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_stdthreads_thrd_create" >&5
14454 $as_echo "$ac_cv_lib_stdthreads_thrd_create" >&6; }
14455 if test "x$ac_cv_lib_stdthreads_thrd_create" = xyes; then :
14456
14457 LIBSTDTHREAD='-lstdthreads -lpthread'
14458
14459 else
14460
14461 LIBSTDTHREAD="$LIBPMULTITHREAD"
14462
14463 fi
14464
14465 fi
14466 else
14467 LIBSTDTHREAD="$LIBPMULTITHREAD $LIB_SCHED_YIELD"
14468 fi
14469 ;;
14470 esac
14471
14472
14473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ISO C threads API is available" >&5
14474 $as_echo_n "checking whether ISO C threads API is available... " >&6; }
14475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_threads_h" >&5
14476 $as_echo "$ac_cv_header_threads_h" >&6; }
14477 gl_stdthreadlib_body_done=done
14478 fi
14479
14480 LIBTHREAD=$LIBSTDTHREAD LTLIBTHREAD=$LIBSTDTHREAD
14481 LIBMULTITHREAD=$LIBSTDTHREAD LTLIBMULTITHREAD=$LIBSTDTHREAD
14482 gl_threads_api=isoc
14483
14484 $as_echo "#define USE_ISOC_THREADS 1" >>confdefs.h
14485
14486 fi
14487 fi
14488 if test $gl_threads_api = none; then
14489 case "$gl_use_threads" in
14490 yes | windows | win32) # The 'win32' is for backward compatibility.
14491 if { case "$host_os" in
14492 mingw*) true;;
14493 *) false;;
14494 esac
14495 }; then
14496 gl_threads_api=windows
14497
14498 $as_echo "#define USE_WINDOWS_THREADS 1" >>confdefs.h
14499
14500 fi
14501 ;;
14502 esac
14503 fi
14504 fi
14505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5
14506 $as_echo_n "checking for multithread API to use... " >&6; }
14507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5
14508 $as_echo "$gl_threads_api" >&6; }
14509
14510
14511
14512
14513
14514
14515
14516
14517
14518
14519
14520
14521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
14522 $as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
14523 if ${gl_cv_func_malloc_posix+:} false; then :
14524 $as_echo_n "(cached) " >&6
14525 else
14526
14527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14528 /* end confdefs.h. */
14529
14530 int
14531 main ()
14532 {
14533 #if defined _WIN32 && ! defined __CYGWIN__
14534 choke me
14535 #endif
14536
14537 ;
14538 return 0;
14539 }
14540 _ACEOF
14541 if ac_fn_c_try_compile "$LINENO"; then :
14542 gl_cv_func_malloc_posix=yes
14543 else
14544 gl_cv_func_malloc_posix=no
14545 fi
14546 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14547
14548 fi
14549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
14550 $as_echo "$gl_cv_func_malloc_posix" >&6; }
14551
14552
14553
14554 for ac_header in stdlib.h
14555 do :
14556 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
14557 if test "x$ac_cv_header_stdlib_h" = xyes; then :
14558 cat >>confdefs.h <<_ACEOF
14559 #define HAVE_STDLIB_H 1
14560 _ACEOF
14561
14562 fi
14563
14564 done
14565
14566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
14567 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
14568 if ${ac_cv_func_malloc_0_nonnull+:} false; then :
14569 $as_echo_n "(cached) " >&6
14570 else
14571 if test "$cross_compiling" = yes; then :
14572 case "$host_os" in
14573 # Guess yes on platforms where we know the result.
14574 *-gnu* | gnu* | *-musl* | freebsd* | netbsd* | openbsd* \
14575 | hpux* | solaris* | cygwin* | mingw*)
14576 ac_cv_func_malloc_0_nonnull="guessing yes" ;;
14577 # If we don't know, obey --enable-cross-guesses.
14578 *) ac_cv_func_malloc_0_nonnull="$gl_cross_guess_normal" ;;
14579 esac
14580
14581 else
14582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14583 /* end confdefs.h. */
14584 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
14585 # include <stdlib.h>
14586 #else
14587 char *malloc ();
14588 #endif
14589
14590 int
14591 main ()
14592 {
14593 char *p = malloc (0);
14594 int result = !p;
14595 free (p);
14596 return result;
14597 ;
14598 return 0;
14599 }
14600
14601 _ACEOF
14602 if ac_fn_c_try_run "$LINENO"; then :
14603 ac_cv_func_malloc_0_nonnull=yes
14604 else
14605 ac_cv_func_malloc_0_nonnull=no
14606 fi
14607 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14608 conftest.$ac_objext conftest.beam conftest.$ac_ext
14609 fi
14610
14611
14612 fi
14613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
14614 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
14615 case "$ac_cv_func_malloc_0_nonnull" in
14616 *yes)
14617 gl_cv_func_malloc_0_nonnull=1
14618 ;;
14619 *)
14620 gl_cv_func_malloc_0_nonnull=0
14621 ;;
14622 esac
14623
14624
14625 cat >>confdefs.h <<_ACEOF
14626 #define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
14627 _ACEOF
14628
14629
14630
14631
14632
14633 GNULIB_BTOWC=0;
14634 GNULIB_WCTOB=0;
14635 GNULIB_MBSINIT=0;
14636 GNULIB_MBRTOWC=0;
14637 GNULIB_MBRLEN=0;
14638 GNULIB_MBSRTOWCS=0;
14639 GNULIB_MBSNRTOWCS=0;
14640 GNULIB_WCRTOMB=0;
14641 GNULIB_WCSRTOMBS=0;
14642 GNULIB_WCSNRTOMBS=0;
14643 GNULIB_WCWIDTH=0;
14644 GNULIB_WMEMCHR=0;
14645 GNULIB_WMEMCMP=0;
14646 GNULIB_WMEMCPY=0;
14647 GNULIB_WMEMMOVE=0;
14648 GNULIB_WMEMSET=0;
14649 GNULIB_WCSLEN=0;
14650 GNULIB_WCSNLEN=0;
14651 GNULIB_WCSCPY=0;
14652 GNULIB_WCPCPY=0;
14653 GNULIB_WCSNCPY=0;
14654 GNULIB_WCPNCPY=0;
14655 GNULIB_WCSCAT=0;
14656 GNULIB_WCSNCAT=0;
14657 GNULIB_WCSCMP=0;
14658 GNULIB_WCSNCMP=0;
14659 GNULIB_WCSCASECMP=0;
14660 GNULIB_WCSNCASECMP=0;
14661 GNULIB_WCSCOLL=0;
14662 GNULIB_WCSXFRM=0;
14663 GNULIB_WCSDUP=0;
14664 GNULIB_WCSCHR=0;
14665 GNULIB_WCSRCHR=0;
14666 GNULIB_WCSCSPN=0;
14667 GNULIB_WCSSPN=0;
14668 GNULIB_WCSPBRK=0;
14669 GNULIB_WCSSTR=0;
14670 GNULIB_WCSTOK=0;
14671 GNULIB_WCSWIDTH=0;
14672 GNULIB_WCSFTIME=0;
14673 HAVE_BTOWC=1;
14674 HAVE_MBSINIT=1;
14675 HAVE_MBRTOWC=1;
14676 HAVE_MBRLEN=1;
14677 HAVE_MBSRTOWCS=1;
14678 HAVE_MBSNRTOWCS=1;
14679 HAVE_WCRTOMB=1;
14680 HAVE_WCSRTOMBS=1;
14681 HAVE_WCSNRTOMBS=1;
14682 HAVE_WMEMCHR=1;
14683 HAVE_WMEMCMP=1;
14684 HAVE_WMEMCPY=1;
14685 HAVE_WMEMMOVE=1;
14686 HAVE_WMEMSET=1;
14687 HAVE_WCSLEN=1;
14688 HAVE_WCSNLEN=1;
14689 HAVE_WCSCPY=1;
14690 HAVE_WCPCPY=1;
14691 HAVE_WCSNCPY=1;
14692 HAVE_WCPNCPY=1;
14693 HAVE_WCSCAT=1;
14694 HAVE_WCSNCAT=1;
14695 HAVE_WCSCMP=1;
14696 HAVE_WCSNCMP=1;
14697 HAVE_WCSCASECMP=1;
14698 HAVE_WCSNCASECMP=1;
14699 HAVE_WCSCOLL=1;
14700 HAVE_WCSXFRM=1;
14701 HAVE_WCSDUP=1;
14702 HAVE_WCSCHR=1;
14703 HAVE_WCSRCHR=1;
14704 HAVE_WCSCSPN=1;
14705 HAVE_WCSSPN=1;
14706 HAVE_WCSPBRK=1;
14707 HAVE_WCSSTR=1;
14708 HAVE_WCSTOK=1;
14709 HAVE_WCSWIDTH=1;
14710 HAVE_WCSFTIME=1;
14711 HAVE_DECL_WCTOB=1;
14712 HAVE_DECL_WCWIDTH=1;
14713 REPLACE_MBSTATE_T=0;
14714 REPLACE_BTOWC=0;
14715 REPLACE_WCTOB=0;
14716 REPLACE_MBSINIT=0;
14717 REPLACE_MBRTOWC=0;
14718 REPLACE_MBRLEN=0;
14719 REPLACE_MBSRTOWCS=0;
14720 REPLACE_MBSNRTOWCS=0;
14721 REPLACE_WCRTOMB=0;
14722 REPLACE_WCSRTOMBS=0;
14723 REPLACE_WCSNRTOMBS=0;
14724 REPLACE_WCWIDTH=0;
14725 REPLACE_WCSWIDTH=0;
14726 REPLACE_WCSFTIME=0;
14727 REPLACE_WCSTOK=0;
14728
14729
14730
14731
14732
14733
14734
14735
14736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
14737 $as_echo_n "checking for a traditional japanese locale... " >&6; }
14738 if ${gt_cv_locale_ja+:} false; then :
14739 $as_echo_n "(cached) " >&6
14740 else
14741
14742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14743 /* end confdefs.h. */
14744
14745 #include <locale.h>
14746 #include <time.h>
14747 #if HAVE_LANGINFO_CODESET
14748 # include <langinfo.h>
14749 #endif
14750 #include <stdlib.h>
14751 #include <string.h>
14752 struct tm t;
14753 char buf[16];
14754 int main ()
14755 {
14756 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
14757 imitates locale dependent behaviour by looking at the environment
14758 variables, and all locales use the UTF-8 encoding. */
14759 #if defined __BEOS__ || defined __HAIKU__
14760 return 1;
14761 #else
14762 /* Check whether the given locale name is recognized by the system. */
14763 # if defined _WIN32 && !defined __CYGWIN__
14764 /* On native Windows, setlocale(category, "") looks at the system settings,
14765 not at the environment variables. Also, when an encoding suffix such
14766 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
14767 category of the locale to "C". */
14768 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
14769 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
14770 return 1;
14771 # else
14772 if (setlocale (LC_ALL, "") == NULL) return 1;
14773 # endif
14774 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
14775 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
14776 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
14777 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
14778 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
14779 some unit tests fail.
14780 On MirBSD 10, when an unsupported locale is specified, setlocale()
14781 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
14782 # if HAVE_LANGINFO_CODESET
14783 {
14784 const char *cs = nl_langinfo (CODESET);
14785 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
14786 || strcmp (cs, "UTF-8") == 0)
14787 return 1;
14788 }
14789 # endif
14790 # ifdef __CYGWIN__
14791 /* On Cygwin, avoid locale names without encoding suffix, because the
14792 locale_charset() function relies on the encoding suffix. Note that
14793 LC_ALL is set on the command line. */
14794 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
14795 # endif
14796 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
14797 on Cygwin 1.5.x. */
14798 if (MB_CUR_MAX == 1)
14799 return 1;
14800 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
14801 This excludes the UTF-8 encoding (except on MirBSD). */
14802 {
14803 const char *p;
14804 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
14805 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
14806 for (p = buf; *p != '\0'; p++)
14807 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
14808 return 1;
14809 }
14810 return 0;
14811 #endif
14812 }
14813
14814 _ACEOF
14815 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14816 (eval $ac_link) 2>&5
14817 ac_status=$?
14818 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14819 test $ac_status = 0; } && test -s conftest$ac_exeext; then
14820 case "$host_os" in
14821 # Handle native Windows specially, because there setlocale() interprets
14822 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
14823 # "fr" or "fra" as "French" or "French_France.1252",
14824 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
14825 # "ja" as "Japanese" or "Japanese_Japan.932",
14826 # and similar.
14827 mingw*)
14828 # Note that on native Windows, the Japanese locale is
14829 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
14830 # cannot use it here.
14831 gt_cv_locale_ja=none
14832 ;;
14833 *)
14834 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
14835 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
14836 # configure script would override the LC_ALL setting. Likewise for
14837 # LC_CTYPE, which is also set at the beginning of the configure script.
14838 # Test for the AIX locale name.
14839 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14840 gt_cv_locale_ja=ja_JP
14841 else
14842 # Test for the locale name with explicit encoding suffix.
14843 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14844 gt_cv_locale_ja=ja_JP.EUC-JP
14845 else
14846 # Test for the HP-UX, OSF/1, NetBSD locale name.
14847 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14848 gt_cv_locale_ja=ja_JP.eucJP
14849 else
14850 # Test for the IRIX, FreeBSD locale name.
14851 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14852 gt_cv_locale_ja=ja_JP.EUC
14853 else
14854 # Test for the Solaris 7 locale name.
14855 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14856 gt_cv_locale_ja=ja
14857 else
14858 # Special test for NetBSD 1.6.
14859 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
14860 gt_cv_locale_ja=ja_JP.eucJP
14861 else
14862 # None found.
14863 gt_cv_locale_ja=none
14864 fi
14865 fi
14866 fi
14867 fi
14868 fi
14869 fi
14870 ;;
14871 esac
14872 fi
14873 rm -fr conftest*
14874
14875 fi
14876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
14877 $as_echo "$gt_cv_locale_ja" >&6; }
14878 LOCALE_JA=$gt_cv_locale_ja
14879
14880
14881
14882
14883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
14884 $as_echo_n "checking for a french Unicode locale... " >&6; }
14885 if ${gt_cv_locale_fr_utf8+:} false; then :
14886 $as_echo_n "(cached) " >&6
14887 else
14888
14889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14890 /* end confdefs.h. */
14891
14892 #include <locale.h>
14893 #include <time.h>
14894 #if HAVE_LANGINFO_CODESET
14895 # include <langinfo.h>
14896 #endif
14897 #include <stdlib.h>
14898 #include <string.h>
14899 struct tm t;
14900 char buf[16];
14901 int main () {
14902 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
14903 imitates locale dependent behaviour by looking at the environment
14904 variables, and all locales use the UTF-8 encoding. */
14905 #if !(defined __BEOS__ || defined __HAIKU__)
14906 /* Check whether the given locale name is recognized by the system. */
14907 # if defined _WIN32 && !defined __CYGWIN__
14908 /* On native Windows, setlocale(category, "") looks at the system settings,
14909 not at the environment variables. Also, when an encoding suffix such
14910 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
14911 category of the locale to "C". */
14912 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
14913 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
14914 return 1;
14915 # else
14916 if (setlocale (LC_ALL, "") == NULL) return 1;
14917 # endif
14918 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
14919 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
14920 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
14921 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
14922 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
14923 some unit tests fail. */
14924 # if HAVE_LANGINFO_CODESET
14925 {
14926 const char *cs = nl_langinfo (CODESET);
14927 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
14928 return 1;
14929 }
14930 # endif
14931 # ifdef __CYGWIN__
14932 /* On Cygwin, avoid locale names without encoding suffix, because the
14933 locale_charset() function relies on the encoding suffix. Note that
14934 LC_ALL is set on the command line. */
14935 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
14936 # endif
14937 /* Check whether in the abbreviation of the second month, the second
14938 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
14939 two bytes long, with UTF-8 encoding. */
14940 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
14941 if (strftime (buf, sizeof (buf), "%b", &t) < 4
14942 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
14943 return 1;
14944 #endif
14945 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
14946 /* Check whether the decimal separator is a comma.
14947 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
14948 are nl_langinfo(RADIXCHAR) are both ".". */
14949 if (localeconv () ->decimal_point[0] != ',') return 1;
14950 #endif
14951 return 0;
14952 }
14953
14954 _ACEOF
14955 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14956 (eval $ac_link) 2>&5
14957 ac_status=$?
14958 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14959 test $ac_status = 0; } && test -s conftest$ac_exeext; then
14960 case "$host_os" in
14961 # Handle native Windows specially, because there setlocale() interprets
14962 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
14963 # "fr" or "fra" as "French" or "French_France.1252",
14964 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
14965 # "ja" as "Japanese" or "Japanese_Japan.932",
14966 # and similar.
14967 mingw*)
14968 # Test for the hypothetical native Windows locale name.
14969 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14970 gt_cv_locale_fr_utf8=French_France.65001
14971 else
14972 # None found.
14973 gt_cv_locale_fr_utf8=none
14974 fi
14975 ;;
14976 *)
14977 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
14978 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
14979 # configure script would override the LC_ALL setting. Likewise for
14980 # LC_CTYPE, which is also set at the beginning of the configure script.
14981 # Test for the usual locale name.
14982 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14983 gt_cv_locale_fr_utf8=fr_FR
14984 else
14985 # Test for the locale name with explicit encoding suffix.
14986 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14987 gt_cv_locale_fr_utf8=fr_FR.UTF-8
14988 else
14989 # Test for the Solaris 7 locale name.
14990 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14991 gt_cv_locale_fr_utf8=fr.UTF-8
14992 else
14993 # None found.
14994 gt_cv_locale_fr_utf8=none
14995 fi
14996 fi
14997 fi
14998 ;;
14999 esac
15000 fi
15001 rm -fr conftest*
15002
15003 fi
15004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
15005 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
15006 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
15007
15008
15009
15010
15011
15012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
15013 $as_echo_n "checking for a transitional chinese locale... " >&6; }
15014 if ${gt_cv_locale_zh_CN+:} false; then :
15015 $as_echo_n "(cached) " >&6
15016 else
15017
15018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15019 /* end confdefs.h. */
15020
15021 #include <locale.h>
15022 #include <stdlib.h>
15023 #include <time.h>
15024 #if HAVE_LANGINFO_CODESET
15025 # include <langinfo.h>
15026 #endif
15027 #include <stdlib.h>
15028 #include <string.h>
15029 struct tm t;
15030 char buf[16];
15031 int main ()
15032 {
15033 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
15034 imitates locale dependent behaviour by looking at the environment
15035 variables, and all locales use the UTF-8 encoding. */
15036 #if defined __BEOS__ || defined __HAIKU__
15037 return 1;
15038 #else
15039 /* Check whether the given locale name is recognized by the system. */
15040 # if defined _WIN32 && !defined __CYGWIN__
15041 /* On native Windows, setlocale(category, "") looks at the system settings,
15042 not at the environment variables. Also, when an encoding suffix such
15043 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
15044 category of the locale to "C". */
15045 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
15046 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
15047 return 1;
15048 # else
15049 if (setlocale (LC_ALL, "") == NULL) return 1;
15050 # endif
15051 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
15052 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
15053 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
15054 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
15055 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
15056 some unit tests fail.
15057 On MirBSD 10, when an unsupported locale is specified, setlocale()
15058 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
15059 # if HAVE_LANGINFO_CODESET
15060 {
15061 const char *cs = nl_langinfo (CODESET);
15062 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
15063 || strcmp (cs, "UTF-8") == 0)
15064 return 1;
15065 }
15066 # endif
15067 # ifdef __CYGWIN__
15068 /* On Cygwin, avoid locale names without encoding suffix, because the
15069 locale_charset() function relies on the encoding suffix. Note that
15070 LC_ALL is set on the command line. */
15071 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
15072 # endif
15073 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
15074 This excludes the UTF-8 encoding (except on MirBSD). */
15075 {
15076 const char *p;
15077 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
15078 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
15079 for (p = buf; *p != '\0'; p++)
15080 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
15081 return 1;
15082 }
15083 /* Check whether a typical GB18030 multibyte sequence is recognized as a
15084 single wide character. This excludes the GB2312 and GBK encodings. */
15085 if (mblen ("\203\062\332\066", 5) != 4)
15086 return 1;
15087 return 0;
15088 #endif
15089 }
15090
15091 _ACEOF
15092 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
15093 (eval $ac_link) 2>&5
15094 ac_status=$?
15095 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15096 test $ac_status = 0; } && test -s conftest$ac_exeext; then
15097 case "$host_os" in
15098 # Handle native Windows specially, because there setlocale() interprets
15099 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
15100 # "fr" or "fra" as "French" or "French_France.1252",
15101 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
15102 # "ja" as "Japanese" or "Japanese_Japan.932",
15103 # and similar.
15104 mingw*)
15105 # Test for the hypothetical native Windows locale name.
15106 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15107 gt_cv_locale_zh_CN=Chinese_China.54936
15108 else
15109 # None found.
15110 gt_cv_locale_zh_CN=none
15111 fi
15112 ;;
15113 solaris2.8)
15114 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
15115 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
15116 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
15117 gt_cv_locale_zh_CN=none
15118 ;;
15119 *)
15120 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
15121 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
15122 # configure script would override the LC_ALL setting. Likewise for
15123 # LC_CTYPE, which is also set at the beginning of the configure script.
15124 # Test for the locale name without encoding suffix.
15125 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15126 gt_cv_locale_zh_CN=zh_CN
15127 else
15128 # Test for the locale name with explicit encoding suffix.
15129 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15130 gt_cv_locale_zh_CN=zh_CN.GB18030
15131 else
15132 # None found.
15133 gt_cv_locale_zh_CN=none
15134 fi
15135 fi
15136 ;;
15137 esac
15138 else
15139 # If there was a link error, due to mblen(), the system is so old that
15140 # it certainly doesn't have a chinese locale.
15141 gt_cv_locale_zh_CN=none
15142 fi
15143 rm -fr conftest*
15144
15145 fi
15146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
15147 $as_echo "$gt_cv_locale_zh_CN" >&6; }
15148 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
15149
15150
15151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
15152 $as_echo_n "checking for inline... " >&6; }
15153 if ${ac_cv_c_inline+:} false; then :
15154 $as_echo_n "(cached) " >&6
15155 else
15156 ac_cv_c_inline=no
15157 for ac_kw in inline __inline__ __inline; do
15158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15159 /* end confdefs.h. */
15160 #ifndef __cplusplus
15161 typedef int foo_t;
15162 static $ac_kw foo_t static_foo () {return 0; }
15163 $ac_kw foo_t foo () {return 0; }
15164 #endif
15165
15166 _ACEOF
15167 if ac_fn_c_try_compile "$LINENO"; then :
15168 ac_cv_c_inline=$ac_kw
15169 fi
15170 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15171 test "$ac_cv_c_inline" != no && break
15172 done
15173
15174 fi
15175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
15176 $as_echo "$ac_cv_c_inline" >&6; }
15177
15178 case $ac_cv_c_inline in
15179 inline | yes) ;;
15180 *)
15181 case $ac_cv_c_inline in
15182 no) ac_val=;;
15183 *) ac_val=$ac_cv_c_inline;;
15184 esac
15185 cat >>confdefs.h <<_ACEOF
15186 #ifndef __cplusplus
15187 #define inline $ac_val
15188 #endif
15189 _ACEOF
15190 ;;
15191 esac
15192
15193
15194
15195
15196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
15197 $as_echo_n "checking for a traditional french locale... " >&6; }
15198 if ${gt_cv_locale_fr+:} false; then :
15199 $as_echo_n "(cached) " >&6
15200 else
15201
15202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15203 /* end confdefs.h. */
15204
15205 #include <locale.h>
15206 #include <time.h>
15207 #if HAVE_LANGINFO_CODESET
15208 # include <langinfo.h>
15209 #endif
15210 #include <stdlib.h>
15211 #include <string.h>
15212 struct tm t;
15213 char buf[16];
15214 int main () {
15215 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
15216 imitates locale dependent behaviour by looking at the environment
15217 variables, and all locales use the UTF-8 encoding. */
15218 #if defined __BEOS__ || defined __HAIKU__
15219 return 1;
15220 #else
15221 /* Check whether the given locale name is recognized by the system. */
15222 # if defined _WIN32 && !defined __CYGWIN__
15223 /* On native Windows, setlocale(category, "") looks at the system settings,
15224 not at the environment variables. Also, when an encoding suffix such
15225 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
15226 category of the locale to "C". */
15227 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
15228 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
15229 return 1;
15230 # else
15231 if (setlocale (LC_ALL, "") == NULL) return 1;
15232 # endif
15233 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
15234 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
15235 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
15236 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
15237 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
15238 some unit tests fail.
15239 On MirBSD 10, when an unsupported locale is specified, setlocale()
15240 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
15241 # if HAVE_LANGINFO_CODESET
15242 {
15243 const char *cs = nl_langinfo (CODESET);
15244 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
15245 || strcmp (cs, "UTF-8") == 0)
15246 return 1;
15247 }
15248 # endif
15249 # ifdef __CYGWIN__
15250 /* On Cygwin, avoid locale names without encoding suffix, because the
15251 locale_charset() function relies on the encoding suffix. Note that
15252 LC_ALL is set on the command line. */
15253 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
15254 # endif
15255 /* Check whether in the abbreviation of the second month, the second
15256 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
15257 one byte long. This excludes the UTF-8 encoding. */
15258 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
15259 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
15260 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
15261 /* Check whether the decimal separator is a comma.
15262 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
15263 are nl_langinfo(RADIXCHAR) are both ".". */
15264 if (localeconv () ->decimal_point[0] != ',') return 1;
15265 # endif
15266 return 0;
15267 #endif
15268 }
15269
15270 _ACEOF
15271 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
15272 (eval $ac_link) 2>&5
15273 ac_status=$?
15274 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15275 test $ac_status = 0; } && test -s conftest$ac_exeext; then
15276 case "$host_os" in
15277 # Handle native Windows specially, because there setlocale() interprets
15278 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
15279 # "fr" or "fra" as "French" or "French_France.1252",
15280 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
15281 # "ja" as "Japanese" or "Japanese_Japan.932",
15282 # and similar.
15283 mingw*)
15284 # Test for the native Windows locale name.
15285 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15286 gt_cv_locale_fr=French_France.1252
15287 else
15288 # None found.
15289 gt_cv_locale_fr=none
15290 fi
15291 ;;
15292 *)
15293 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
15294 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
15295 # configure script would override the LC_ALL setting. Likewise for
15296 # LC_CTYPE, which is also set at the beginning of the configure script.
15297 # Test for the usual locale name.
15298 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15299 gt_cv_locale_fr=fr_FR
15300 else
15301 # Test for the locale name with explicit encoding suffix.
15302 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15303 gt_cv_locale_fr=fr_FR.ISO-8859-1
15304 else
15305 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
15306 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15307 gt_cv_locale_fr=fr_FR.ISO8859-1
15308 else
15309 # Test for the HP-UX locale name.
15310 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15311 gt_cv_locale_fr=fr_FR.iso88591
15312 else
15313 # Test for the Solaris 7 locale name.
15314 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15315 gt_cv_locale_fr=fr
15316 else
15317 # None found.
15318 gt_cv_locale_fr=none
15319 fi
15320 fi
15321 fi
15322 fi
15323 fi
15324 ;;
15325 esac
15326 fi
15327 rm -fr conftest*
15328
15329 fi
15330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
15331 $as_echo "$gt_cv_locale_fr" >&6; }
15332 LOCALE_FR=$gt_cv_locale_fr
15333
15334
15335
15336
15337
15338
15339
15340 GNULIB_EXPLICIT_BZERO=0;
15341 GNULIB_FFSL=0;
15342 GNULIB_FFSLL=0;
15343 GNULIB_MEMCHR=0;
15344 GNULIB_MEMMEM=0;
15345 GNULIB_MEMPCPY=0;
15346 GNULIB_MEMRCHR=0;
15347 GNULIB_RAWMEMCHR=0;
15348 GNULIB_STPCPY=0;
15349 GNULIB_STPNCPY=0;
15350 GNULIB_STRCHRNUL=0;
15351 GNULIB_STRDUP=0;
15352 GNULIB_STRNCAT=0;
15353 GNULIB_STRNDUP=0;
15354 GNULIB_STRNLEN=0;
15355 GNULIB_STRPBRK=0;
15356 GNULIB_STRSEP=0;
15357 GNULIB_STRSTR=0;
15358 GNULIB_STRCASESTR=0;
15359 GNULIB_STRTOK_R=0;
15360 GNULIB_MBSLEN=0;
15361 GNULIB_MBSNLEN=0;
15362 GNULIB_MBSCHR=0;
15363 GNULIB_MBSRCHR=0;
15364 GNULIB_MBSSTR=0;
15365 GNULIB_MBSCASECMP=0;
15366 GNULIB_MBSNCASECMP=0;
15367 GNULIB_MBSPCASECMP=0;
15368 GNULIB_MBSCASESTR=0;
15369 GNULIB_MBSCSPN=0;
15370 GNULIB_MBSPBRK=0;
15371 GNULIB_MBSSPN=0;
15372 GNULIB_MBSSEP=0;
15373 GNULIB_MBSTOK_R=0;
15374 GNULIB_STRERROR=0;
15375 GNULIB_STRERROR_R=0;
15376 GNULIB_STRSIGNAL=0;
15377 GNULIB_STRVERSCMP=0;
15378 HAVE_MBSLEN=0;
15379 HAVE_EXPLICIT_BZERO=1;
15380 HAVE_FFSL=1;
15381 HAVE_FFSLL=1;
15382 HAVE_MEMCHR=1;
15383 HAVE_DECL_MEMMEM=1;
15384 HAVE_MEMPCPY=1;
15385 HAVE_DECL_MEMRCHR=1;
15386 HAVE_RAWMEMCHR=1;
15387 HAVE_STPCPY=1;
15388 HAVE_STPNCPY=1;
15389 HAVE_STRCHRNUL=1;
15390 HAVE_DECL_STRDUP=1;
15391 HAVE_DECL_STRNDUP=1;
15392 HAVE_DECL_STRNLEN=1;
15393 HAVE_STRPBRK=1;
15394 HAVE_STRSEP=1;
15395 HAVE_STRCASESTR=1;
15396 HAVE_DECL_STRTOK_R=1;
15397 HAVE_DECL_STRERROR_R=1;
15398 HAVE_DECL_STRSIGNAL=1;
15399 HAVE_STRVERSCMP=1;
15400 REPLACE_MEMCHR=0;
15401 REPLACE_MEMMEM=0;
15402 REPLACE_STPNCPY=0;
15403 REPLACE_STRCHRNUL=0;
15404 REPLACE_STRDUP=0;
15405 REPLACE_STRNCAT=0;
15406 REPLACE_STRNDUP=0;
15407 REPLACE_STRNLEN=0;
15408 REPLACE_STRSTR=0;
15409 REPLACE_STRCASESTR=0;
15410 REPLACE_STRTOK_R=0;
15411 REPLACE_STRERROR=0;
15412 REPLACE_STRERROR_R=0;
15413 REPLACE_STRSIGNAL=0;
15414 UNDEFINE_STRTOK_R=0;
15415
15416
15417
15418
15419
15420
15421 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
15422 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
15423 # irrelevant for anonymous mappings.
15424 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
15425 if test "x$ac_cv_func_mmap" = xyes; then :
15426 gl_have_mmap=yes
15427 else
15428 gl_have_mmap=no
15429 fi
15430
15431
15432 # Try to allow MAP_ANONYMOUS.
15433 gl_have_mmap_anonymous=no
15434 if test $gl_have_mmap = yes; then
15435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
15436 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
15437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15438 /* end confdefs.h. */
15439
15440 #include <sys/mman.h>
15441 #ifdef MAP_ANONYMOUS
15442 I cannot identify this map
15443 #endif
15444
15445 _ACEOF
15446 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15447 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
15448 gl_have_mmap_anonymous=yes
15449 fi
15450 rm -f conftest*
15451
15452 if test $gl_have_mmap_anonymous != yes; then
15453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15454 /* end confdefs.h. */
15455
15456 #include <sys/mman.h>
15457 #ifdef MAP_ANON
15458 I cannot identify this map
15459 #endif
15460
15461 _ACEOF
15462 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15463 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
15464
15465 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
15466
15467 gl_have_mmap_anonymous=yes
15468 fi
15469 rm -f conftest*
15470
15471 fi
15472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
15473 $as_echo "$gl_have_mmap_anonymous" >&6; }
15474 if test $gl_have_mmap_anonymous = yes; then
15475
15476 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
15477
15478 fi
15479 fi
15480
15481
15482
15483
15484
15485
15486 if test $HAVE_MEMCHR = 1; then
15487 # Detect platform-specific bugs in some versions of glibc:
15488 # memchr should not dereference anything with length 0
15489 # https://bugzilla.redhat.com/show_bug.cgi?id=499689
15490 # memchr should not dereference overestimated length after a match
15491 # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
15492 # https://sourceware.org/bugzilla/show_bug.cgi?id=10162
15493 # memchr should cast the second argument to 'unsigned char'.
15494 # This bug exists in Android 4.3.
15495 # Assume that memchr works on platforms that lack mprotect.
15496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
15497 $as_echo_n "checking whether memchr works... " >&6; }
15498 if ${gl_cv_func_memchr_works+:} false; then :
15499 $as_echo_n "(cached) " >&6
15500 else
15501 if test "$cross_compiling" = yes; then :
15502 case "$host_os" in
15503 # Guess no on Android.
15504 linux*-android*) gl_cv_func_memchr_works="guessing no" ;;
15505 # Guess yes on native Windows.
15506 mingw*) gl_cv_func_memchr_works="guessing yes" ;;
15507 # If we don't know, obey --enable-cross-guesses.
15508 *) gl_cv_func_memchr_works="$gl_cross_guess_normal" ;;
15509 esac
15510
15511 else
15512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15513 /* end confdefs.h. */
15514
15515 #include <string.h>
15516 #if HAVE_SYS_MMAN_H
15517 # include <fcntl.h>
15518 # include <unistd.h>
15519 # include <sys/types.h>
15520 # include <sys/mman.h>
15521 # ifndef MAP_FILE
15522 # define MAP_FILE 0
15523 # endif
15524 #endif
15525
15526 int
15527 main ()
15528 {
15529
15530 int result = 0;
15531 char *fence = NULL;
15532 #if HAVE_SYS_MMAN_H && HAVE_MPROTECT
15533 # if HAVE_MAP_ANONYMOUS
15534 const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
15535 const int fd = -1;
15536 # else /* !HAVE_MAP_ANONYMOUS */
15537 const int flags = MAP_FILE | MAP_PRIVATE;
15538 int fd = open ("/dev/zero", O_RDONLY, 0666);
15539 if (fd >= 0)
15540 # endif
15541 {
15542 int pagesize = getpagesize ();
15543 char *two_pages =
15544 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
15545 flags, fd, 0);
15546 if (two_pages != (char *)(-1)
15547 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
15548 fence = two_pages + pagesize;
15549 }
15550 #endif
15551 if (fence)
15552 {
15553 if (memchr (fence, 0, 0))
15554 result |= 1;
15555 strcpy (fence - 9, "12345678");
15556 if (memchr (fence - 9, 0, 79) != fence - 1)
15557 result |= 2;
15558 if (memchr (fence - 1, 0, 3) != fence - 1)
15559 result |= 4;
15560 }
15561 /* Test against bug on Android 4.3. */
15562 {
15563 char input[3];
15564 input[0] = 'a';
15565 input[1] = 'b';
15566 input[2] = 'c';
15567 if (memchr (input, 0x789abc00 | 'b', 3) != input + 1)
15568 result |= 8;
15569 }
15570 return result;
15571
15572 ;
15573 return 0;
15574 }
15575 _ACEOF
15576 if ac_fn_c_try_run "$LINENO"; then :
15577 gl_cv_func_memchr_works=yes
15578 else
15579 gl_cv_func_memchr_works=no
15580 fi
15581 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15582 conftest.$ac_objext conftest.beam conftest.$ac_ext
15583 fi
15584
15585
15586 fi
15587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
15588 $as_echo "$gl_cv_func_memchr_works" >&6; }
15589 case "$gl_cv_func_memchr_works" in
15590 *yes) ;;
15591 *) REPLACE_MEMCHR=1 ;;
15592 esac
15593 fi
15594
15595 ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default"
15596 if test "x$ac_cv_have_decl_memmem" = xyes; then :
15597 ac_have_decl=1
15598 else
15599 ac_have_decl=0
15600 fi
15601
15602 cat >>confdefs.h <<_ACEOF
15603 #define HAVE_DECL_MEMMEM $ac_have_decl
15604 _ACEOF
15605
15606
15607
15608
15609
15610 for ac_func in memmem
15611 do :
15612 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
15613 if test "x$ac_cv_func_memmem" = xyes; then :
15614 cat >>confdefs.h <<_ACEOF
15615 #define HAVE_MEMMEM 1
15616 _ACEOF
15617
15618 fi
15619 done
15620
15621 if test $ac_cv_func_memmem = yes; then
15622 HAVE_MEMMEM=1
15623 else
15624 HAVE_MEMMEM=0
15625 fi
15626
15627 if test $ac_cv_have_decl_memmem = no; then
15628 HAVE_DECL_MEMMEM=0
15629 else
15630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
15631 $as_echo_n "checking whether memmem works... " >&6; }
15632 if ${gl_cv_func_memmem_works_always+:} false; then :
15633 $as_echo_n "(cached) " >&6
15634 else
15635 if test "$cross_compiling" = yes; then :
15636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15637 /* end confdefs.h. */
15638
15639 #ifdef __GNU_LIBRARY__
15640 #include <features.h>
15641 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
15642 || __GLIBC_MINOR__ > 12)) \
15643 || (__GLIBC__ > 2)) \
15644 || defined __UCLIBC__
15645 Lucky user
15646 #endif
15647 #elif defined __CYGWIN__
15648 #include <cygwin/version.h>
15649 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
15650 Lucky user
15651 #endif
15652 #else
15653 Lucky user
15654 #endif
15655
15656 _ACEOF
15657 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15658 $EGREP "Lucky user" >/dev/null 2>&1; then :
15659 gl_cv_func_memmem_works_always="guessing yes"
15660 else
15661 gl_cv_func_memmem_works_always="$gl_cross_guess_normal"
15662 fi
15663 rm -f conftest*
15664
15665
15666 else
15667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15668 /* end confdefs.h. */
15669
15670 #include <string.h> /* for memmem */
15671 #define P "_EF_BF_BD"
15672 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
15673 #define NEEDLE P P P P P
15674
15675 int
15676 main ()
15677 {
15678
15679 int result = 0;
15680 if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
15681 result |= 1;
15682 /* Check for empty needle behavior. */
15683 {
15684 const char *haystack = "AAA";
15685 if (memmem (haystack, 3, NULL, 0) != haystack)
15686 result |= 2;
15687 }
15688 return result;
15689
15690 ;
15691 return 0;
15692 }
15693 _ACEOF
15694 if ac_fn_c_try_run "$LINENO"; then :
15695 gl_cv_func_memmem_works_always=yes
15696 else
15697 gl_cv_func_memmem_works_always=no
15698 fi
15699 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15700 conftest.$ac_objext conftest.beam conftest.$ac_ext
15701 fi
15702
15703
15704 fi
15705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
15706 $as_echo "$gl_cv_func_memmem_works_always" >&6; }
15707 case "$gl_cv_func_memmem_works_always" in
15708 *yes) ;;
15709 *)
15710 REPLACE_MEMMEM=1
15711 ;;
15712 esac
15713 fi
15714 :
15715
15716 ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
15717 if test "x$ac_cv_have_decl_memrchr" = xyes; then :
15718 ac_have_decl=1
15719 else
15720 ac_have_decl=0
15721 fi
15722
15723 cat >>confdefs.h <<_ACEOF
15724 #define HAVE_DECL_MEMRCHR $ac_have_decl
15725 _ACEOF
15726
15727
15728
15729
15730
15731
15732
15733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for O_CLOEXEC" >&5
15734 $as_echo_n "checking for O_CLOEXEC... " >&6; }
15735 if ${gl_cv_macro_O_CLOEXEC+:} false; then :
15736 $as_echo_n "(cached) " >&6
15737 else
15738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15739 /* end confdefs.h. */
15740 #include <fcntl.h>
15741 #ifndef O_CLOEXEC
15742 choke me;
15743 #endif
15744
15745 int
15746 main ()
15747 {
15748 return O_CLOEXEC;
15749 ;
15750 return 0;
15751 }
15752 _ACEOF
15753 if ac_fn_c_try_compile "$LINENO"; then :
15754 gl_cv_macro_O_CLOEXEC=yes
15755 else
15756 gl_cv_macro_O_CLOEXEC=no
15757 fi
15758 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15759 fi
15760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_macro_O_CLOEXEC" >&5
15761 $as_echo "$gl_cv_macro_O_CLOEXEC" >&6; }
15762
15763
15764
15765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
15766 $as_echo_n "checking for promoted mode_t type... " >&6; }
15767 if ${gl_cv_promoted_mode_t+:} false; then :
15768 $as_echo_n "(cached) " >&6
15769 else
15770
15771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15772 /* end confdefs.h. */
15773 #include <sys/types.h>
15774 int
15775 main ()
15776 {
15777 typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
15778 ;
15779 return 0;
15780 }
15781 _ACEOF
15782 if ac_fn_c_try_compile "$LINENO"; then :
15783 gl_cv_promoted_mode_t='int'
15784 else
15785 gl_cv_promoted_mode_t='mode_t'
15786 fi
15787 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15788
15789 fi
15790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
15791 $as_echo "$gl_cv_promoted_mode_t" >&6; }
15792
15793 cat >>confdefs.h <<_ACEOF
15794 #define PROMOTED_MODE_T $gl_cv_promoted_mode_t
15795 _ACEOF
15796
15797
15798
15799
15800
15801 GNULIB_DPRINTF=0;
15802 GNULIB_FCLOSE=0;
15803 GNULIB_FDOPEN=0;
15804 GNULIB_FFLUSH=0;
15805 GNULIB_FGETC=0;
15806 GNULIB_FGETS=0;
15807 GNULIB_FOPEN=0;
15808 GNULIB_FPRINTF=0;
15809 GNULIB_FPRINTF_POSIX=0;
15810 GNULIB_FPURGE=0;
15811 GNULIB_FPUTC=0;
15812 GNULIB_FPUTS=0;
15813 GNULIB_FREAD=0;
15814 GNULIB_FREOPEN=0;
15815 GNULIB_FSCANF=0;
15816 GNULIB_FSEEK=0;
15817 GNULIB_FSEEKO=0;
15818 GNULIB_FTELL=0;
15819 GNULIB_FTELLO=0;
15820 GNULIB_FWRITE=0;
15821 GNULIB_GETC=0;
15822 GNULIB_GETCHAR=0;
15823 GNULIB_GETDELIM=0;
15824 GNULIB_GETLINE=0;
15825 GNULIB_OBSTACK_PRINTF=0;
15826 GNULIB_OBSTACK_PRINTF_POSIX=0;
15827 GNULIB_PCLOSE=0;
15828 GNULIB_PERROR=0;
15829 GNULIB_POPEN=0;
15830 GNULIB_PRINTF=0;
15831 GNULIB_PRINTF_POSIX=0;
15832 GNULIB_PUTC=0;
15833 GNULIB_PUTCHAR=0;
15834 GNULIB_PUTS=0;
15835 GNULIB_REMOVE=0;
15836 GNULIB_RENAME=0;
15837 GNULIB_RENAMEAT=0;
15838 GNULIB_SCANF=0;
15839 GNULIB_SNPRINTF=0;
15840 GNULIB_SPRINTF_POSIX=0;
15841 GNULIB_STDIO_H_NONBLOCKING=0;
15842 GNULIB_STDIO_H_SIGPIPE=0;
15843 GNULIB_TMPFILE=0;
15844 GNULIB_VASPRINTF=0;
15845 GNULIB_VFSCANF=0;
15846 GNULIB_VSCANF=0;
15847 GNULIB_VDPRINTF=0;
15848 GNULIB_VFPRINTF=0;
15849 GNULIB_VFPRINTF_POSIX=0;
15850 GNULIB_VPRINTF=0;
15851 GNULIB_VPRINTF_POSIX=0;
15852 GNULIB_VSNPRINTF=0;
15853 GNULIB_VSPRINTF_POSIX=0;
15854 HAVE_DECL_FPURGE=1;
15855 HAVE_DECL_FSEEKO=1;
15856 HAVE_DECL_FTELLO=1;
15857 HAVE_DECL_GETDELIM=1;
15858 HAVE_DECL_GETLINE=1;
15859 HAVE_DECL_OBSTACK_PRINTF=1;
15860 HAVE_DECL_SNPRINTF=1;
15861 HAVE_DECL_VSNPRINTF=1;
15862 HAVE_DPRINTF=1;
15863 HAVE_FSEEKO=1;
15864 HAVE_FTELLO=1;
15865 HAVE_PCLOSE=1;
15866 HAVE_POPEN=1;
15867 HAVE_RENAMEAT=1;
15868 HAVE_VASPRINTF=1;
15869 HAVE_VDPRINTF=1;
15870 REPLACE_DPRINTF=0;
15871 REPLACE_FCLOSE=0;
15872 REPLACE_FDOPEN=0;
15873 REPLACE_FFLUSH=0;
15874 REPLACE_FOPEN=0;
15875 REPLACE_FPRINTF=0;
15876 REPLACE_FPURGE=0;
15877 REPLACE_FREOPEN=0;
15878 REPLACE_FSEEK=0;
15879 REPLACE_FSEEKO=0;
15880 REPLACE_FTELL=0;
15881 REPLACE_FTELLO=0;
15882 REPLACE_GETDELIM=0;
15883 REPLACE_GETLINE=0;
15884 REPLACE_OBSTACK_PRINTF=0;
15885 REPLACE_PERROR=0;
15886 REPLACE_POPEN=0;
15887 REPLACE_PRINTF=0;
15888 REPLACE_REMOVE=0;
15889 REPLACE_RENAME=0;
15890 REPLACE_RENAMEAT=0;
15891 REPLACE_SNPRINTF=0;
15892 REPLACE_SPRINTF=0;
15893 REPLACE_STDIO_READ_FUNCS=0;
15894 REPLACE_STDIO_WRITE_FUNCS=0;
15895 REPLACE_TMPFILE=0;
15896 REPLACE_VASPRINTF=0;
15897 REPLACE_VDPRINTF=0;
15898 REPLACE_VFPRINTF=0;
15899 REPLACE_VPRINTF=0;
15900 REPLACE_VSNPRINTF=0;
15901 REPLACE_VSPRINTF=0;
15902
15903
15904
15905 ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default"
15906 if test "x$ac_cv_have_decl_setenv" = xyes; then :
15907 ac_have_decl=1
15908 else
15909 ac_have_decl=0
15910 fi
15911
15912 cat >>confdefs.h <<_ACEOF
15913 #define HAVE_DECL_SETENV $ac_have_decl
15914 _ACEOF
15915
15916
15917
15918
15919
15920
15921 if test $ac_cv_have_decl_setenv = no; then
15922 HAVE_DECL_SETENV=0
15923 fi
15924
15925
15926
15927
15928
15929 for ac_header in search.h
15930 do :
15931 ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
15932 if test "x$ac_cv_header_search_h" = xyes; then :
15933 cat >>confdefs.h <<_ACEOF
15934 #define HAVE_SEARCH_H 1
15935 _ACEOF
15936
15937 fi
15938
15939 done
15940
15941 for ac_func in tsearch
15942 do :
15943 ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
15944 if test "x$ac_cv_func_tsearch" = xyes; then :
15945 cat >>confdefs.h <<_ACEOF
15946 #define HAVE_TSEARCH 1
15947 _ACEOF
15948
15949 fi
15950 done
15951
15952
15953
15954
15955 GNULIB_PTHREAD_SIGMASK=0;
15956 GNULIB_RAISE=0;
15957 GNULIB_SIGNAL_H_SIGPIPE=0;
15958 GNULIB_SIGPROCMASK=0;
15959 GNULIB_SIGACTION=0;
15960 HAVE_POSIX_SIGNALBLOCKING=1;
15961 HAVE_PTHREAD_SIGMASK=1;
15962 HAVE_RAISE=1;
15963 HAVE_SIGSET_T=1;
15964 HAVE_SIGINFO_T=1;
15965 HAVE_SIGACTION=1;
15966 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
15967
15968 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
15969
15970 HAVE_SIGHANDLER_T=1;
15971 REPLACE_PTHREAD_SIGMASK=0;
15972 REPLACE_RAISE=0;
15973
15974
15975 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
15976 #include <signal.h>
15977 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
15978 #include <sys/types.h>
15979
15980 "
15981 if test "x$ac_cv_type_sigset_t" = xyes; then :
15982
15983 cat >>confdefs.h <<_ACEOF
15984 #define HAVE_SIGSET_T 1
15985 _ACEOF
15986
15987 gl_cv_type_sigset_t=yes
15988 else
15989 gl_cv_type_sigset_t=no
15990 fi
15991
15992 if test $gl_cv_type_sigset_t != yes; then
15993 HAVE_SIGSET_T=0
15994 fi
15995
15996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
15997 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
15998 if ${ac_cv_type_uid_t+:} false; then :
15999 $as_echo_n "(cached) " >&6
16000 else
16001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16002 /* end confdefs.h. */
16003 #include <sys/types.h>
16004
16005 _ACEOF
16006 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16007 $EGREP "uid_t" >/dev/null 2>&1; then :
16008 ac_cv_type_uid_t=yes
16009 else
16010 ac_cv_type_uid_t=no
16011 fi
16012 rm -f conftest*
16013
16014 fi
16015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
16016 $as_echo "$ac_cv_type_uid_t" >&6; }
16017 if test $ac_cv_type_uid_t = no; then
16018
16019 $as_echo "#define uid_t int" >>confdefs.h
16020
16021
16022 $as_echo "#define gid_t int" >>confdefs.h
16023
16024 fi
16025
16026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
16027 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
16028 if ${ac_cv_header_stdbool_h+:} false; then :
16029 $as_echo_n "(cached) " >&6
16030 else
16031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16032 /* end confdefs.h. */
16033
16034 #include <stdbool.h>
16035
16036 #ifdef __cplusplus
16037 typedef bool Bool;
16038 #else
16039 typedef _Bool Bool;
16040 #ifndef bool
16041 "error: bool is not defined"
16042 #endif
16043 #ifndef false
16044 "error: false is not defined"
16045 #endif
16046 #if false
16047 "error: false is not 0"
16048 #endif
16049 #ifndef true
16050 "error: true is not defined"
16051 #endif
16052 #if true != 1
16053 "error: true is not 1"
16054 #endif
16055 #endif
16056
16057 #ifndef __bool_true_false_are_defined
16058 "error: __bool_true_false_are_defined is not defined"
16059 #endif
16060
16061 struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
16062
16063 char a[true == 1 ? 1 : -1];
16064 char b[false == 0 ? 1 : -1];
16065 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
16066 char d[(bool) 0.5 == true ? 1 : -1];
16067 /* See body of main program for 'e'. */
16068 char f[(Bool) 0.0 == false ? 1 : -1];
16069 char g[true];
16070 char h[sizeof (Bool)];
16071 char i[sizeof s.t];
16072 enum { j = false, k = true, l = false * true, m = true * 256 };
16073 /* The following fails for
16074 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
16075 Bool n[m];
16076 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
16077 char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
16078 /* Catch a bug in an HP-UX C compiler. See
16079 https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
16080 https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html
16081 */
16082 Bool q = true;
16083 Bool *pq = &q;
16084 bool *qq = &q;
16085
16086 int
16087 main ()
16088 {
16089
16090 bool e = &s;
16091 *pq |= q; *pq |= ! q;
16092 *qq |= q; *qq |= ! q;
16093 /* Refer to every declared value, to avoid compiler optimizations. */
16094 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
16095 + !m + !n + !o + !p + !q + !pq + !qq);
16096
16097 ;
16098 return 0;
16099 }
16100 _ACEOF
16101 if ac_fn_c_try_compile "$LINENO"; then :
16102 ac_cv_header_stdbool_h=yes
16103 else
16104 ac_cv_header_stdbool_h=no
16105 fi
16106 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16107 fi
16108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
16109 $as_echo "$ac_cv_header_stdbool_h" >&6; }
16110 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
16111 if test "x$ac_cv_type__Bool" = xyes; then :
16112
16113 cat >>confdefs.h <<_ACEOF
16114 #define HAVE__BOOL 1
16115 _ACEOF
16116
16117
16118 fi
16119
16120
16121
16122
16123 ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
16124 if test "x$ac_cv_have_decl_strdup" = xyes; then :
16125 ac_have_decl=1
16126 else
16127 ac_have_decl=0
16128 fi
16129
16130 cat >>confdefs.h <<_ACEOF
16131 #define HAVE_DECL_STRDUP $ac_have_decl
16132 _ACEOF
16133
16134
16135 REPLACE_STRERROR_0=0
16136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
16137 $as_echo_n "checking whether strerror(0) succeeds... " >&6; }
16138 if ${gl_cv_func_strerror_0_works+:} false; then :
16139 $as_echo_n "(cached) " >&6
16140 else
16141 if test "$cross_compiling" = yes; then :
16142 case "$host_os" in
16143 # Guess yes on glibc systems.
16144 *-gnu* | gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
16145 # Guess yes on musl systems.
16146 *-musl*) gl_cv_func_strerror_0_works="guessing yes" ;;
16147 # Guess yes on native Windows.
16148 mingw*) gl_cv_func_strerror_0_works="guessing yes" ;;
16149 # If we don't know, obey --enable-cross-guesses.
16150 *) gl_cv_func_strerror_0_works="$gl_cross_guess_normal" ;;
16151 esac
16152
16153 else
16154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16155 /* end confdefs.h. */
16156 #include <string.h>
16157 #include <errno.h>
16158
16159 int
16160 main ()
16161 {
16162 int result = 0;
16163 char *str;
16164 errno = 0;
16165 str = strerror (0);
16166 if (!*str) result |= 1;
16167 if (errno) result |= 2;
16168 if (strstr (str, "nknown") || strstr (str, "ndefined"))
16169 result |= 4;
16170 return result;
16171 ;
16172 return 0;
16173 }
16174 _ACEOF
16175 if ac_fn_c_try_run "$LINENO"; then :
16176 gl_cv_func_strerror_0_works=yes
16177 else
16178 gl_cv_func_strerror_0_works=no
16179 fi
16180 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16181 conftest.$ac_objext conftest.beam conftest.$ac_ext
16182 fi
16183
16184
16185 fi
16186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
16187 $as_echo "$gl_cv_func_strerror_0_works" >&6; }
16188 case "$gl_cv_func_strerror_0_works" in
16189 *yes) ;;
16190 *)
16191 REPLACE_STRERROR_0=1
16192
16193 $as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h
16194
16195 ;;
16196 esac
16197
16198
16199
16200
16201
16202
16203
16204
16205
16206
16207 if test $ac_cv_func_strerror_r = yes; then
16208 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
16209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strerror_r with POSIX signature" >&5
16210 $as_echo_n "checking for strerror_r with POSIX signature... " >&6; }
16211 if ${gl_cv_func_strerror_r_posix_signature+:} false; then :
16212 $as_echo_n "(cached) " >&6
16213 else
16214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16215 /* end confdefs.h. */
16216 #include <string.h>
16217 int strerror_r (int, char *, size_t);
16218
16219 int
16220 main ()
16221 {
16222
16223 ;
16224 return 0;
16225 }
16226 _ACEOF
16227 if ac_fn_c_try_compile "$LINENO"; then :
16228 gl_cv_func_strerror_r_posix_signature=yes
16229 else
16230 gl_cv_func_strerror_r_posix_signature=no
16231 fi
16232 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16233
16234 fi
16235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_posix_signature" >&5
16236 $as_echo "$gl_cv_func_strerror_r_posix_signature" >&6; }
16237 if test $gl_cv_func_strerror_r_posix_signature = yes; then
16238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r works" >&5
16239 $as_echo_n "checking whether strerror_r works... " >&6; }
16240 if ${gl_cv_func_strerror_r_works+:} false; then :
16241 $as_echo_n "(cached) " >&6
16242 else
16243 if test "$cross_compiling" = yes; then :
16244
16245 case "$host_os" in
16246 # Guess no on AIX.
16247 aix*) gl_cv_func_strerror_r_works="guessing no";;
16248 # Guess no on HP-UX.
16249 hpux*) gl_cv_func_strerror_r_works="guessing no";;
16250 # Guess no on BSD variants.
16251 *bsd*) gl_cv_func_strerror_r_works="guessing no";;
16252 # Guess yes otherwise.
16253 *) gl_cv_func_strerror_r_works="guessing yes";;
16254 esac
16255
16256 else
16257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16258 /* end confdefs.h. */
16259 #include <errno.h>
16260 #include <string.h>
16261
16262 int
16263 main ()
16264 {
16265 int result = 0;
16266 char buf[79];
16267 if (strerror_r (EACCES, buf, 0) < 0)
16268 result |= 1;
16269 errno = 0;
16270 if (strerror_r (EACCES, buf, sizeof buf) != 0)
16271 result |= 2;
16272 strcpy (buf, "Unknown");
16273 if (strerror_r (0, buf, sizeof buf) != 0)
16274 result |= 4;
16275 if (errno)
16276 result |= 8;
16277 if (strstr (buf, "nknown") || strstr (buf, "ndefined"))
16278 result |= 0x10;
16279 errno = 0;
16280 *buf = 0;
16281 if (strerror_r (-3, buf, sizeof buf) < 0)
16282 result |= 0x20;
16283 if (errno)
16284 result |= 0x40;
16285 if (!*buf)
16286 result |= 0x80;
16287 return result;
16288
16289 ;
16290 return 0;
16291 }
16292 _ACEOF
16293 if ac_fn_c_try_run "$LINENO"; then :
16294 gl_cv_func_strerror_r_works=yes
16295 else
16296 gl_cv_func_strerror_r_works=no
16297 fi
16298 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16299 conftest.$ac_objext conftest.beam conftest.$ac_ext
16300 fi
16301
16302
16303 fi
16304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
16305 $as_echo "$gl_cv_func_strerror_r_works" >&6; }
16306 else
16307
16308 if test $ac_cv_func___xpg_strerror_r = yes; then
16309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __xpg_strerror_r works" >&5
16310 $as_echo_n "checking whether __xpg_strerror_r works... " >&6; }
16311 if ${gl_cv_func_strerror_r_works+:} false; then :
16312 $as_echo_n "(cached) " >&6
16313 else
16314 if test "$cross_compiling" = yes; then :
16315 gl_cv_func_strerror_r_works="$gl_cross_guess_normal"
16316
16317 else
16318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16319 /* end confdefs.h. */
16320 #include <errno.h>
16321 #include <string.h>
16322 extern
16323 #ifdef __cplusplus
16324 "C"
16325 #endif
16326 int __xpg_strerror_r(int, char *, size_t);
16327
16328 int
16329 main ()
16330 {
16331 int result = 0;
16332 char buf[256] = "^";
16333 char copy[256];
16334 char *str = strerror (-1);
16335 strcpy (copy, str);
16336 if (__xpg_strerror_r (-2, buf, 1) == 0)
16337 result |= 1;
16338 if (*buf)
16339 result |= 2;
16340 __xpg_strerror_r (-2, buf, 256);
16341 if (strcmp (str, copy))
16342 result |= 4;
16343 return result;
16344
16345 ;
16346 return 0;
16347 }
16348 _ACEOF
16349 if ac_fn_c_try_run "$LINENO"; then :
16350 gl_cv_func_strerror_r_works=yes
16351 else
16352 gl_cv_func_strerror_r_works=no
16353 fi
16354 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16355 conftest.$ac_objext conftest.beam conftest.$ac_ext
16356 fi
16357
16358
16359 fi
16360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
16361 $as_echo "$gl_cv_func_strerror_r_works" >&6; }
16362 fi
16363 fi
16364 fi
16365 fi
16366
16367 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
16368 if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
16369 ac_have_decl=1
16370 else
16371 ac_have_decl=0
16372 fi
16373
16374 cat >>confdefs.h <<_ACEOF
16375 #define HAVE_DECL_STRERROR_R $ac_have_decl
16376 _ACEOF
16377
16378
16379
16380
16381
16382
16383
16384
16385
16386
16387
16388
16389
16390
16391
16392
16393 if test $gl_cv_have_include_next = yes; then
16394 gl_cv_next_string_h='<'string.h'>'
16395 else
16396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
16397 $as_echo_n "checking absolute name of <string.h>... " >&6; }
16398 if ${gl_cv_next_string_h+:} false; then :
16399 $as_echo_n "(cached) " >&6
16400 else
16401
16402
16403
16404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16405 /* end confdefs.h. */
16406 #include <string.h>
16407 _ACEOF
16408 case "$host_os" in
16409 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16410 *) gl_absname_cpp="$ac_cpp" ;;
16411 esac
16412
16413 case "$host_os" in
16414 mingw*)
16415 gl_dirsep_regex='[/\\]'
16416 ;;
16417 *)
16418 gl_dirsep_regex='\/'
16419 ;;
16420 esac
16421 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16422 gl_header_literal_regex=`echo 'string.h' \
16423 | sed -e "$gl_make_literal_regex_sed"`
16424 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16425 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16426 s|^/[^/]|//&|
16427 p
16428 q
16429 }'
16430
16431 gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16432 sed -n "$gl_absolute_header_sed"`
16433
16434 gl_header=$gl_cv_absolute_string_h
16435 gl_cv_next_string_h='"'$gl_header'"'
16436
16437
16438 fi
16439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
16440 $as_echo "$gl_cv_next_string_h" >&6; }
16441 fi
16442 NEXT_STRING_H=$gl_cv_next_string_h
16443
16444 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16445 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16446 gl_next_as_first_directive='<'string.h'>'
16447 else
16448 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
16449 gl_next_as_first_directive=$gl_cv_next_string_h
16450 fi
16451 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
16452
16453
16454
16455
16456
16457
16458
16459
16460
16461
16462
16463
16464 if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
16465 REPLACE_STRSTR=1
16466 else
16467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
16468 $as_echo_n "checking whether strstr works... " >&6; }
16469 if ${gl_cv_func_strstr_works_always+:} false; then :
16470 $as_echo_n "(cached) " >&6
16471 else
16472 if test "$cross_compiling" = yes; then :
16473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16474 /* end confdefs.h. */
16475
16476 #ifdef __GNU_LIBRARY__
16477 #include <features.h>
16478 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
16479 || defined __UCLIBC__
16480 Lucky user
16481 #endif
16482 #elif defined __CYGWIN__
16483 #include <cygwin/version.h>
16484 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
16485 Lucky user
16486 #endif
16487 #else
16488 Lucky user
16489 #endif
16490
16491 _ACEOF
16492 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16493 $EGREP "Lucky user" >/dev/null 2>&1; then :
16494 gl_cv_func_strstr_works_always="guessing yes"
16495 else
16496 gl_cv_func_strstr_works_always="$gl_cross_guess_normal"
16497 fi
16498 rm -f conftest*
16499
16500
16501 else
16502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16503 /* end confdefs.h. */
16504
16505 #include <string.h> /* for strstr */
16506 #ifdef __GNU_LIBRARY__
16507 #include <features.h>
16508 #if __GLIBC__ == 2 && __GLIBC_MINOR__ == 28
16509 Unlucky user
16510 #endif
16511 #endif
16512 #define P "_EF_BF_BD"
16513 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
16514 #define NEEDLE P P P P P
16515
16516 int
16517 main ()
16518 {
16519 return !!strstr (HAYSTACK, NEEDLE);
16520
16521 ;
16522 return 0;
16523 }
16524 _ACEOF
16525 if ac_fn_c_try_run "$LINENO"; then :
16526 gl_cv_func_strstr_works_always=yes
16527 else
16528 gl_cv_func_strstr_works_always=no
16529 fi
16530 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16531 conftest.$ac_objext conftest.beam conftest.$ac_ext
16532 fi
16533
16534
16535 fi
16536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
16537 $as_echo "$gl_cv_func_strstr_works_always" >&6; }
16538 case "$gl_cv_func_strstr_works_always" in
16539 *yes) ;;
16540 *)
16541 REPLACE_STRSTR=1
16542 ;;
16543 esac
16544 fi
16545
16546 ac_fn_c_check_decl "$LINENO" "strtok_r" "ac_cv_have_decl_strtok_r" "$ac_includes_default"
16547 if test "x$ac_cv_have_decl_strtok_r" = xyes; then :
16548 ac_have_decl=1
16549 else
16550 ac_have_decl=0
16551 fi
16552
16553 cat >>confdefs.h <<_ACEOF
16554 #define HAVE_DECL_STRTOK_R $ac_have_decl
16555 _ACEOF
16556
16557
16558
16559
16560
16561
16562
16563
16564
16565
16566
16567 $as_echo "#define _USE_STD_STAT 1" >>confdefs.h
16568
16569
16570
16571
16572
16573
16574
16575
16576
16577
16578
16579 if test $gl_cv_have_include_next = yes; then
16580 gl_cv_next_sys_types_h='<'sys/types.h'>'
16581 else
16582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
16583 $as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
16584 if ${gl_cv_next_sys_types_h+:} false; then :
16585 $as_echo_n "(cached) " >&6
16586 else
16587
16588
16589
16590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16591 /* end confdefs.h. */
16592 #include <sys/types.h>
16593 _ACEOF
16594 case "$host_os" in
16595 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16596 *) gl_absname_cpp="$ac_cpp" ;;
16597 esac
16598
16599 case "$host_os" in
16600 mingw*)
16601 gl_dirsep_regex='[/\\]'
16602 ;;
16603 *)
16604 gl_dirsep_regex='\/'
16605 ;;
16606 esac
16607 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16608 gl_header_literal_regex=`echo 'sys/types.h' \
16609 | sed -e "$gl_make_literal_regex_sed"`
16610 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16611 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16612 s|^/[^/]|//&|
16613 p
16614 q
16615 }'
16616
16617 gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16618 sed -n "$gl_absolute_header_sed"`
16619
16620 gl_header=$gl_cv_absolute_sys_types_h
16621 gl_cv_next_sys_types_h='"'$gl_header'"'
16622
16623
16624 fi
16625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
16626 $as_echo "$gl_cv_next_sys_types_h" >&6; }
16627 fi
16628 NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
16629
16630 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16631 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16632 gl_next_as_first_directive='<'sys/types.h'>'
16633 else
16634 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
16635 gl_next_as_first_directive=$gl_cv_next_sys_types_h
16636 fi
16637 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
16638
16639
16640
16641
16642
16643
16644
16645
16646
16647
16648
16649
16650 WINDOWS_STAT_INODES=0
16651
16652
16653
16654
16655
16656
16657
16658
16659
16660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
16661 $as_echo_n "checking for struct timespec in <time.h>... " >&6; }
16662 if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then :
16663 $as_echo_n "(cached) " >&6
16664 else
16665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16666 /* end confdefs.h. */
16667 #include <time.h>
16668
16669 int
16670 main ()
16671 {
16672 static struct timespec x; x.tv_sec = x.tv_nsec;
16673 ;
16674 return 0;
16675 }
16676 _ACEOF
16677 if ac_fn_c_try_compile "$LINENO"; then :
16678 gl_cv_sys_struct_timespec_in_time_h=yes
16679 else
16680 gl_cv_sys_struct_timespec_in_time_h=no
16681 fi
16682 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16683 fi
16684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
16685 $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
16686
16687 TIME_H_DEFINES_STRUCT_TIMESPEC=0
16688 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
16689 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
16690 UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
16691 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
16692 TIME_H_DEFINES_STRUCT_TIMESPEC=1
16693 else
16694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
16695 $as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
16696 if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then :
16697 $as_echo_n "(cached) " >&6
16698 else
16699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16700 /* end confdefs.h. */
16701 #include <sys/time.h>
16702
16703 int
16704 main ()
16705 {
16706 static struct timespec x; x.tv_sec = x.tv_nsec;
16707 ;
16708 return 0;
16709 }
16710 _ACEOF
16711 if ac_fn_c_try_compile "$LINENO"; then :
16712 gl_cv_sys_struct_timespec_in_sys_time_h=yes
16713 else
16714 gl_cv_sys_struct_timespec_in_sys_time_h=no
16715 fi
16716 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16717 fi
16718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
16719 $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
16720 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
16721 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
16722 else
16723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
16724 $as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
16725 if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then :
16726 $as_echo_n "(cached) " >&6
16727 else
16728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16729 /* end confdefs.h. */
16730 #include <pthread.h>
16731
16732 int
16733 main ()
16734 {
16735 static struct timespec x; x.tv_sec = x.tv_nsec;
16736 ;
16737 return 0;
16738 }
16739 _ACEOF
16740 if ac_fn_c_try_compile "$LINENO"; then :
16741 gl_cv_sys_struct_timespec_in_pthread_h=yes
16742 else
16743 gl_cv_sys_struct_timespec_in_pthread_h=no
16744 fi
16745 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16746 fi
16747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
16748 $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
16749 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
16750 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
16751 else
16752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
16753 $as_echo_n "checking for struct timespec in <unistd.h>... " >&6; }
16754 if ${gl_cv_sys_struct_timespec_in_unistd_h+:} false; then :
16755 $as_echo_n "(cached) " >&6
16756 else
16757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16758 /* end confdefs.h. */
16759 #include <unistd.h>
16760
16761 int
16762 main ()
16763 {
16764 static struct timespec x; x.tv_sec = x.tv_nsec;
16765 ;
16766 return 0;
16767 }
16768 _ACEOF
16769 if ac_fn_c_try_compile "$LINENO"; then :
16770 gl_cv_sys_struct_timespec_in_unistd_h=yes
16771 else
16772 gl_cv_sys_struct_timespec_in_unistd_h=no
16773 fi
16774 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16775 fi
16776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5
16777 $as_echo "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
16778 if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
16779 UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
16780 fi
16781 fi
16782 fi
16783 fi
16784
16785
16786
16787
16788
16789
16790
16791
16792
16793
16794
16795
16796
16797
16798
16799
16800 if test $gl_cv_have_include_next = yes; then
16801 gl_cv_next_time_h='<'time.h'>'
16802 else
16803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
16804 $as_echo_n "checking absolute name of <time.h>... " >&6; }
16805 if ${gl_cv_next_time_h+:} false; then :
16806 $as_echo_n "(cached) " >&6
16807 else
16808
16809
16810
16811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16812 /* end confdefs.h. */
16813 #include <time.h>
16814 _ACEOF
16815 case "$host_os" in
16816 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16817 *) gl_absname_cpp="$ac_cpp" ;;
16818 esac
16819
16820 case "$host_os" in
16821 mingw*)
16822 gl_dirsep_regex='[/\\]'
16823 ;;
16824 *)
16825 gl_dirsep_regex='\/'
16826 ;;
16827 esac
16828 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16829 gl_header_literal_regex=`echo 'time.h' \
16830 | sed -e "$gl_make_literal_regex_sed"`
16831 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16832 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16833 s|^/[^/]|//&|
16834 p
16835 q
16836 }'
16837
16838 gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16839 sed -n "$gl_absolute_header_sed"`
16840
16841 gl_header=$gl_cv_absolute_time_h
16842 gl_cv_next_time_h='"'$gl_header'"'
16843
16844
16845 fi
16846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
16847 $as_echo "$gl_cv_next_time_h" >&6; }
16848 fi
16849 NEXT_TIME_H=$gl_cv_next_time_h
16850
16851 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16852 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16853 gl_next_as_first_directive='<'time.h'>'
16854 else
16855 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
16856 gl_next_as_first_directive=$gl_cv_next_time_h
16857 fi
16858 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
16859
16860
16861
16862
16863
16864
16865
16866
16867
16868
16869 ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
16870 if test "x$ac_cv_have_decl_unsetenv" = xyes; then :
16871 ac_have_decl=1
16872 else
16873 ac_have_decl=0
16874 fi
16875
16876 cat >>confdefs.h <<_ACEOF
16877 #define HAVE_DECL_UNSETENV $ac_have_decl
16878 _ACEOF
16879
16880
16881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
16882 $as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
16883 if ${gl_cv_header_wchar_h_correct_inline+:} false; then :
16884 $as_echo_n "(cached) " >&6
16885 else
16886 gl_cv_header_wchar_h_correct_inline=yes
16887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16888 /* end confdefs.h. */
16889
16890 #define wcstod renamed_wcstod
16891 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
16892 <wchar.h>.
16893 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16894 included before <wchar.h>. */
16895 #include <stddef.h>
16896 #include <stdio.h>
16897 #include <time.h>
16898 #include <wchar.h>
16899 extern int zero (void);
16900 int main () { return zero(); }
16901
16902 _ACEOF
16903 save_ac_compile="$ac_compile"
16904 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
16905 if echo '#include "conftest.c"' >conftest1.c &&
16906 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
16907 (eval $ac_compile) 2>&5
16908 ac_status=$?
16909 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16910 test $ac_status = 0; }; then
16911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16912 /* end confdefs.h. */
16913
16914 #define wcstod renamed_wcstod
16915 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
16916 <wchar.h>.
16917 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16918 included before <wchar.h>. */
16919 #include <stddef.h>
16920 #include <stdio.h>
16921 #include <time.h>
16922 #include <wchar.h>
16923 int zero (void) { return 0; }
16924
16925 _ACEOF
16926 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
16927 if echo '#include "conftest.c"' >conftest2.c &&
16928 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
16929 (eval $ac_compile) 2>&5
16930 ac_status=$?
16931 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16932 test $ac_status = 0; }; then
16933 if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
16934 :
16935 else
16936 gl_cv_header_wchar_h_correct_inline=no
16937 fi
16938 fi
16939 fi
16940 ac_compile="$save_ac_compile"
16941 rm -f conftest12.c conftest12.$ac_objext conftest$ac_exeext
16942
16943 fi
16944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
16945 $as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
16946 if test $gl_cv_header_wchar_h_correct_inline = no; then
16947 as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
16948 This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
16949 C99 mode. You have four options:
16950 - Add the flag -fgnu89-inline to CC and reconfigure, or
16951 - Fix your include files, using parts of
16952 <https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
16953 - Use a gcc version older than 4.3, or
16954 - Don't use the flags -std=c99 or -std=gnu99.
16955 Configuration aborted." "$LINENO" 5
16956 fi
16957
16958
16959
16960
16961
16962 if test $ac_cv_header_crtdefs_h = yes; then
16963 HAVE_CRTDEFS_H=1
16964 else
16965 HAVE_CRTDEFS_H=0
16966 fi
16967
16968
16969
16970 GNULIB_ISWBLANK=0;
16971 GNULIB_ISWDIGIT=0;
16972 GNULIB_ISWXDIGIT=0;
16973 GNULIB_WCTYPE=0;
16974 GNULIB_ISWCTYPE=0;
16975 GNULIB_WCTRANS=0;
16976 GNULIB_TOWCTRANS=0;
16977 HAVE_ISWBLANK=1;
16978 HAVE_WCTYPE_T=1;
16979 HAVE_WCTRANS_T=1;
16980 REPLACE_ISWBLANK=0;
16981 REPLACE_ISWDIGIT=0;
16982 REPLACE_ISWXDIGIT=0;
16983
16984
16985
16986
16987 if false; then
16988 GL_COND_LIBTOOL_TRUE=
16989 GL_COND_LIBTOOL_FALSE='#'
16990 else
16991 GL_COND_LIBTOOL_TRUE='#'
16992 GL_COND_LIBTOOL_FALSE=
16993 fi
16994
16995 gl_cond_libtool=false
16996 gl_libdeps=
16997 gl_ltlibdeps=
16998 gl_m4_base='import/m4'
16999
17000
17001
17002
17003
17004
17005
17006
17007
17008
17009 gl_source_base='import'
17010
17011
17012 if test $ac_cv_func_alloca_works = no; then
17013 :
17014 fi
17015
17016 # Define an additional variable used in the Makefile substitution.
17017 if test $ac_cv_working_alloca_h = yes; then
17018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
17019 $as_echo_n "checking for alloca as a compiler built-in... " >&6; }
17020 if ${gl_cv_rpl_alloca+:} false; then :
17021 $as_echo_n "(cached) " >&6
17022 else
17023
17024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17025 /* end confdefs.h. */
17026
17027 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
17028 Need own alloca
17029 #endif
17030
17031 _ACEOF
17032 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17033 $EGREP "Need own alloca" >/dev/null 2>&1; then :
17034 gl_cv_rpl_alloca=yes
17035 else
17036 gl_cv_rpl_alloca=no
17037 fi
17038 rm -f conftest*
17039
17040
17041 fi
17042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
17043 $as_echo "$gl_cv_rpl_alloca" >&6; }
17044 if test $gl_cv_rpl_alloca = yes; then
17045
17046 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
17047
17048 ALLOCA_H=alloca.h
17049 else
17050 ALLOCA_H=
17051 fi
17052 else
17053 ALLOCA_H=alloca.h
17054 fi
17055
17056 if test -n "$ALLOCA_H"; then
17057 GL_GENERATE_ALLOCA_H_TRUE=
17058 GL_GENERATE_ALLOCA_H_FALSE='#'
17059 else
17060 GL_GENERATE_ALLOCA_H_TRUE='#'
17061 GL_GENERATE_ALLOCA_H_FALSE=
17062 fi
17063
17064
17065 if test $ac_cv_working_alloca_h = yes; then
17066 HAVE_ALLOCA_H=1
17067 else
17068 HAVE_ALLOCA_H=0
17069 fi
17070
17071
17072
17073
17074
17075
17076 if test $ac_cv_header_arpa_inet_h = yes; then
17077 HAVE_ARPA_INET_H=1
17078 else
17079 HAVE_ARPA_INET_H=0
17080 fi
17081
17082
17083
17084
17085
17086
17087
17088
17089
17090
17091 if test $gl_cv_have_include_next = yes; then
17092 gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
17093 else
17094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <arpa/inet.h>" >&5
17095 $as_echo_n "checking absolute name of <arpa/inet.h>... " >&6; }
17096 if ${gl_cv_next_arpa_inet_h+:} false; then :
17097 $as_echo_n "(cached) " >&6
17098 else
17099
17100 if test $ac_cv_header_arpa_inet_h = yes; then
17101
17102
17103
17104
17105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17106 /* end confdefs.h. */
17107 #include <arpa/inet.h>
17108 _ACEOF
17109 case "$host_os" in
17110 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17111 *) gl_absname_cpp="$ac_cpp" ;;
17112 esac
17113
17114 case "$host_os" in
17115 mingw*)
17116 gl_dirsep_regex='[/\\]'
17117 ;;
17118 *)
17119 gl_dirsep_regex='\/'
17120 ;;
17121 esac
17122 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17123 gl_header_literal_regex=`echo 'arpa/inet.h' \
17124 | sed -e "$gl_make_literal_regex_sed"`
17125 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17126 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17127 s|^/[^/]|//&|
17128 p
17129 q
17130 }'
17131
17132 gl_cv_absolute_arpa_inet_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17133 sed -n "$gl_absolute_header_sed"`
17134
17135 gl_header=$gl_cv_absolute_arpa_inet_h
17136 gl_cv_next_arpa_inet_h='"'$gl_header'"'
17137 else
17138 gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
17139 fi
17140
17141
17142 fi
17143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_arpa_inet_h" >&5
17144 $as_echo "$gl_cv_next_arpa_inet_h" >&6; }
17145 fi
17146 NEXT_ARPA_INET_H=$gl_cv_next_arpa_inet_h
17147
17148 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17149 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17150 gl_next_as_first_directive='<'arpa/inet.h'>'
17151 else
17152 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17153 gl_next_as_first_directive=$gl_cv_next_arpa_inet_h
17154 fi
17155 NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H=$gl_next_as_first_directive
17156
17157
17158
17159
17160
17161
17162
17163
17164
17165 if test $ac_cv_header_sys_socket_h = yes; then
17166 HAVE_WS2TCPIP_H=0
17167 else
17168 if test $ac_cv_header_ws2tcpip_h = yes; then
17169 HAVE_WS2TCPIP_H=1
17170 else
17171 HAVE_WS2TCPIP_H=0
17172 fi
17173 fi
17174
17175
17176
17177
17178
17179
17180
17181
17182
17183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_expect" >&5
17184 $as_echo_n "checking for __builtin_expect... " >&6; }
17185 if ${gl_cv___builtin_expect+:} false; then :
17186 $as_echo_n "(cached) " >&6
17187 else
17188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17189 /* end confdefs.h. */
17190
17191 int
17192 main (int argc, char **argv)
17193 {
17194 argc = __builtin_expect (argc, 100);
17195 return argv[argc != 100][0];
17196 }
17197 _ACEOF
17198 if ac_fn_c_try_link "$LINENO"; then :
17199 gl_cv___builtin_expect=yes
17200 else
17201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17202 /* end confdefs.h. */
17203
17204 #include <builtins.h>
17205 int
17206 main (int argc, char **argv)
17207 {
17208 argc = __builtin_expect (argc, 100);
17209 return argv[argc != 100][0];
17210 }
17211 _ACEOF
17212 if ac_fn_c_try_link "$LINENO"; then :
17213 gl_cv___builtin_expect="in <builtins.h>"
17214 else
17215 gl_cv___builtin_expect=no
17216 fi
17217 rm -f core conftest.err conftest.$ac_objext \
17218 conftest$ac_exeext conftest.$ac_ext
17219 fi
17220 rm -f core conftest.err conftest.$ac_objext \
17221 conftest$ac_exeext conftest.$ac_ext
17222 fi
17223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv___builtin_expect" >&5
17224 $as_echo "$gl_cv___builtin_expect" >&6; }
17225 if test "$gl_cv___builtin_expect" = yes; then
17226 $as_echo "#define HAVE___BUILTIN_EXPECT 1" >>confdefs.h
17227
17228 elif test "$gl_cv___builtin_expect" = "in <builtins.h>"; then
17229 $as_echo "#define HAVE___BUILTIN_EXPECT 2" >>confdefs.h
17230
17231 fi
17232
17233
17234
17235
17236
17237 if test $ac_cv_func_canonicalize_file_name = no; then
17238 HAVE_CANONICALIZE_FILE_NAME=0
17239 if test $ac_cv_func_realpath = no; then
17240 HAVE_REALPATH=0
17241 else
17242 case "$gl_cv_func_realpath_works" in
17243 *yes) ;;
17244 *) REPLACE_REALPATH=1 ;;
17245 esac
17246 fi
17247 else
17248 case "$gl_cv_func_realpath_works" in
17249 *yes)
17250 ;;
17251 *)
17252 REPLACE_CANONICALIZE_FILE_NAME=1
17253 REPLACE_REALPATH=1
17254 ;;
17255 esac
17256 fi
17257
17258 if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
17259
17260
17261
17262
17263
17264
17265
17266
17267 gl_LIBOBJS="$gl_LIBOBJS canonicalize-lgpl.$ac_objext"
17268
17269 fi
17270
17271
17272 cat >>confdefs.h <<_ACEOF
17273 #define GNULIB_CANONICALIZE_LGPL 1
17274 _ACEOF
17275
17276
17277
17278
17279
17280
17281
17282 GNULIB_CANONICALIZE_FILE_NAME=1
17283
17284
17285
17286
17287
17288 $as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
17289
17290
17291
17292
17293
17294
17295
17296
17297 GNULIB_REALPATH=1
17298
17299
17300
17301
17302
17303 $as_echo "#define GNULIB_TEST_REALPATH 1" >>confdefs.h
17304
17305
17306
17307
17308
17309
17310
17311
17312 GNULIB_CHDIR=1
17313
17314
17315
17316
17317
17318 $as_echo "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
17319
17320
17321
17322
17323
17324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this system has an arbitrary file name length limit" >&5
17325 $as_echo_n "checking whether this system has an arbitrary file name length limit... " >&6; }
17326 if ${gl_cv_have_arbitrary_file_name_length_limit+:} false; then :
17327 $as_echo_n "(cached) " >&6
17328 else
17329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17330 /* end confdefs.h. */
17331
17332 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
17333 #if HAVE_UNISTD_H
17334 # include <unistd.h>
17335 #endif
17336 #include <limits.h>
17337 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
17338 # include <sys/param.h>
17339 #endif
17340 #if !defined PATH_MAX && defined MAXPATHLEN
17341 # define PATH_MAX MAXPATHLEN
17342 #endif
17343 #ifdef __hpux
17344 # undef PATH_MAX
17345 # define PATH_MAX 1024
17346 #endif
17347 #if defined _WIN32 && ! defined __CYGWIN__
17348 # undef PATH_MAX
17349 # define PATH_MAX 260
17350 #endif
17351
17352 #ifdef PATH_MAX
17353 have_arbitrary_file_name_length_limit
17354 #endif
17355 _ACEOF
17356 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17357 $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1; then :
17358 gl_cv_have_arbitrary_file_name_length_limit=yes
17359 else
17360 gl_cv_have_arbitrary_file_name_length_limit=no
17361 fi
17362 rm -f conftest*
17363
17364 fi
17365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_arbitrary_file_name_length_limit" >&5
17366 $as_echo "$gl_cv_have_arbitrary_file_name_length_limit" >&6; }
17367
17368 if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then
17369
17370
17371
17372
17373
17374
17375
17376
17377 gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext"
17378
17379 :
17380 fi
17381
17382
17383 $as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
17384
17385
17386
17387
17388
17389
17390 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
17391 REPLACE_CLOSE=1
17392 fi
17393
17394
17395
17396
17397
17398
17399 if test $ac_cv_header_sys_socket_h != yes; then
17400 for ac_header in winsock2.h
17401 do :
17402 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
17403 if test "x$ac_cv_header_winsock2_h" = xyes; then :
17404 cat >>confdefs.h <<_ACEOF
17405 #define HAVE_WINSOCK2_H 1
17406 _ACEOF
17407
17408 fi
17409
17410 done
17411
17412 fi
17413 if test "$ac_cv_header_winsock2_h" = yes; then
17414 HAVE_WINSOCK2_H=1
17415 UNISTD_H_HAVE_WINSOCK2_H=1
17416 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
17417 else
17418 HAVE_WINSOCK2_H=0
17419 fi
17420
17421
17422 if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
17423 REPLACE_CLOSE=1
17424 fi
17425
17426
17427 if test $REPLACE_CLOSE = 0; then
17428
17429
17430
17431 if test $ac_cv_func_fchdir = no; then
17432 HAVE_FCHDIR=0
17433 fi
17434
17435 if test $HAVE_FCHDIR = 0; then
17436 REPLACE_CLOSE=1
17437 fi
17438 fi
17439
17440
17441 if test $REPLACE_CLOSE = 1; then
17442
17443
17444
17445
17446
17447
17448
17449
17450 gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
17451
17452 fi
17453
17454
17455
17456
17457
17458 GNULIB_CLOSE=1
17459
17460
17461
17462
17463
17464 $as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
17465
17466
17467
17468
17469
17470
17471 for ac_func in closedir
17472 do :
17473 ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir"
17474 if test "x$ac_cv_func_closedir" = xyes; then :
17475 cat >>confdefs.h <<_ACEOF
17476 #define HAVE_CLOSEDIR 1
17477 _ACEOF
17478
17479 fi
17480 done
17481
17482 if test $ac_cv_func_closedir = no; then
17483 HAVE_CLOSEDIR=0
17484 fi
17485
17486
17487
17488
17489 if test $ac_cv_func_fchdir = no; then
17490 HAVE_FCHDIR=0
17491 fi
17492
17493 if test $HAVE_FCHDIR = 0; then
17494 if test $HAVE_CLOSEDIR = 1; then
17495 REPLACE_CLOSEDIR=1
17496 fi
17497 fi
17498
17499 case $host_os,$HAVE_CLOSEDIR in
17500 os2*,1)
17501 REPLACE_CLOSEDIR=1;;
17502 esac
17503
17504 if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
17505
17506
17507
17508
17509
17510
17511
17512
17513 gl_LIBOBJS="$gl_LIBOBJS closedir.$ac_objext"
17514
17515 fi
17516
17517
17518
17519
17520
17521 GNULIB_CLOSEDIR=1
17522
17523
17524
17525
17526
17527 $as_echo "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
17528
17529
17530
17531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
17532 $as_echo_n "checking for d_ino member in directory struct... " >&6; }
17533 if ${gl_cv_struct_dirent_d_ino+:} false; then :
17534 $as_echo_n "(cached) " >&6
17535 else
17536 if test "$cross_compiling" = yes; then :
17537 case "$host_os" in
17538 # Guess yes on glibc systems with Linux kernel.
17539 linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
17540 # Guess yes on musl systems with Linux kernel.
17541 linux*-musl*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
17542 # Guess no on native Windows.
17543 mingw*) gl_cv_struct_dirent_d_ino="guessing no" ;;
17544 # If we don't know, obey --enable-cross-guesses.
17545 *) gl_cv_struct_dirent_d_ino="$gl_cross_guess_normal" ;;
17546 esac
17547
17548 else
17549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17550 /* end confdefs.h. */
17551 #include <sys/types.h>
17552 #include <sys/stat.h>
17553 #include <dirent.h>
17554
17555 int
17556 main ()
17557 {
17558 DIR *dp = opendir (".");
17559 struct dirent *e;
17560 struct stat st;
17561 if (! dp)
17562 return 1;
17563 e = readdir (dp);
17564 if (! e)
17565 { closedir (dp); return 2; }
17566 if (lstat (e->d_name, &st) != 0)
17567 { closedir (dp); return 3; }
17568 if (e->d_ino != st.st_ino)
17569 { closedir (dp); return 4; }
17570 closedir (dp);
17571 return 0;
17572
17573 ;
17574 return 0;
17575 }
17576 _ACEOF
17577 if ac_fn_c_try_run "$LINENO"; then :
17578 gl_cv_struct_dirent_d_ino=yes
17579 else
17580 gl_cv_struct_dirent_d_ino=no
17581 fi
17582 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17583 conftest.$ac_objext conftest.beam conftest.$ac_ext
17584 fi
17585
17586 fi
17587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5
17588 $as_echo "$gl_cv_struct_dirent_d_ino" >&6; }
17589 case "$gl_cv_struct_dirent_d_ino" in
17590 *yes)
17591
17592 $as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h
17593
17594 ;;
17595 esac
17596
17597
17598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_type member in directory struct" >&5
17599 $as_echo_n "checking for d_type member in directory struct... " >&6; }
17600 if ${gl_cv_struct_dirent_d_type+:} false; then :
17601 $as_echo_n "(cached) " >&6
17602 else
17603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17604 /* end confdefs.h. */
17605
17606 #include <sys/types.h>
17607 #include <dirent.h>
17608
17609 int
17610 main ()
17611 {
17612 struct dirent dp; dp.d_type = 0;
17613 ;
17614 return 0;
17615 }
17616 _ACEOF
17617 if ac_fn_c_try_link "$LINENO"; then :
17618 gl_cv_struct_dirent_d_type=yes
17619 else
17620 gl_cv_struct_dirent_d_type=no
17621 fi
17622 rm -f core conftest.err conftest.$ac_objext \
17623 conftest$ac_exeext conftest.$ac_ext
17624
17625
17626 fi
17627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_type" >&5
17628 $as_echo "$gl_cv_struct_dirent_d_type" >&6; }
17629 if test $gl_cv_struct_dirent_d_type = yes; then
17630
17631 $as_echo "#define HAVE_STRUCT_DIRENT_D_TYPE 1" >>confdefs.h
17632
17633 fi
17634
17635
17636
17637
17638
17639
17640
17641
17642
17643
17644
17645
17646
17647
17648 if test $gl_cv_have_include_next = yes; then
17649 gl_cv_next_dirent_h='<'dirent.h'>'
17650 else
17651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
17652 $as_echo_n "checking absolute name of <dirent.h>... " >&6; }
17653 if ${gl_cv_next_dirent_h+:} false; then :
17654 $as_echo_n "(cached) " >&6
17655 else
17656
17657 if test $ac_cv_header_dirent_h = yes; then
17658
17659
17660
17661
17662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17663 /* end confdefs.h. */
17664 #include <dirent.h>
17665 _ACEOF
17666 case "$host_os" in
17667 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17668 *) gl_absname_cpp="$ac_cpp" ;;
17669 esac
17670
17671 case "$host_os" in
17672 mingw*)
17673 gl_dirsep_regex='[/\\]'
17674 ;;
17675 *)
17676 gl_dirsep_regex='\/'
17677 ;;
17678 esac
17679 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17680 gl_header_literal_regex=`echo 'dirent.h' \
17681 | sed -e "$gl_make_literal_regex_sed"`
17682 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17683 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17684 s|^/[^/]|//&|
17685 p
17686 q
17687 }'
17688
17689 gl_cv_absolute_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17690 sed -n "$gl_absolute_header_sed"`
17691
17692 gl_header=$gl_cv_absolute_dirent_h
17693 gl_cv_next_dirent_h='"'$gl_header'"'
17694 else
17695 gl_cv_next_dirent_h='<'dirent.h'>'
17696 fi
17697
17698
17699 fi
17700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
17701 $as_echo "$gl_cv_next_dirent_h" >&6; }
17702 fi
17703 NEXT_DIRENT_H=$gl_cv_next_dirent_h
17704
17705 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17706 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17707 gl_next_as_first_directive='<'dirent.h'>'
17708 else
17709 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17710 gl_next_as_first_directive=$gl_cv_next_dirent_h
17711 fi
17712 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
17713
17714
17715
17716
17717 if test $ac_cv_header_dirent_h = yes; then
17718 HAVE_DIRENT_H=1
17719 else
17720 HAVE_DIRENT_H=0
17721 fi
17722
17723
17724
17725
17726
17727
17728
17729
17730
17731
17732
17733 for ac_func in dirfd
17734 do :
17735 ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
17736 if test "x$ac_cv_func_dirfd" = xyes; then :
17737 cat >>confdefs.h <<_ACEOF
17738 #define HAVE_DIRFD 1
17739 _ACEOF
17740
17741 fi
17742 done
17743
17744 ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
17745 #include <dirent.h>
17746 "
17747 if test "x$ac_cv_have_decl_dirfd" = xyes; then :
17748 ac_have_decl=1
17749 else
17750 ac_have_decl=0
17751 fi
17752
17753 cat >>confdefs.h <<_ACEOF
17754 #define HAVE_DECL_DIRFD $ac_have_decl
17755 _ACEOF
17756
17757 if test $ac_cv_have_decl_dirfd = no; then
17758 HAVE_DECL_DIRFD=0
17759 fi
17760
17761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
17762 $as_echo_n "checking whether dirfd is a macro... " >&6; }
17763 if ${gl_cv_func_dirfd_macro+:} false; then :
17764 $as_echo_n "(cached) " >&6
17765 else
17766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17767 /* end confdefs.h. */
17768
17769 #include <sys/types.h>
17770 #include <dirent.h>
17771 #ifdef dirfd
17772 dirent_header_defines_dirfd
17773 #endif
17774 _ACEOF
17775 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17776 $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1; then :
17777 gl_cv_func_dirfd_macro=yes
17778 else
17779 gl_cv_func_dirfd_macro=no
17780 fi
17781 rm -f conftest*
17782
17783 fi
17784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
17785 $as_echo "$gl_cv_func_dirfd_macro" >&6; }
17786
17787 # Use the replacement if we have no function or macro with that name,
17788 # or if OS/2 kLIBC whose dirfd() does not work.
17789 # Replace only if the system declares dirfd already.
17790 case $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro,$host_os,$ac_cv_have_decl_dirfd in
17791 no,no,*,yes | *,*,os2*,yes)
17792 REPLACE_DIRFD=1
17793
17794 $as_echo "#define REPLACE_DIRFD 1" >>confdefs.h
17795 ;;
17796 esac
17797
17798 if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \
17799 || test $REPLACE_DIRFD = 1; then
17800
17801
17802
17803
17804
17805
17806
17807
17808 gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext"
17809
17810
17811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
17812 $as_echo_n "checking how to get the file descriptor associated with an open DIR*... " >&6; }
17813 if ${gl_cv_sys_dir_fd_member_name+:} false; then :
17814 $as_echo_n "(cached) " >&6
17815 else
17816
17817 dirfd_save_CFLAGS=$CFLAGS
17818 for ac_expr in d_fd dd_fd; do
17819
17820 CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
17821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17822 /* end confdefs.h. */
17823
17824 #include <sys/types.h>
17825 #include <dirent.h>
17826 int
17827 main ()
17828 {
17829 DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
17830 ;
17831 return 0;
17832 }
17833 _ACEOF
17834 if ac_fn_c_try_compile "$LINENO"; then :
17835 dir_fd_found=yes
17836
17837 fi
17838 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17839 CFLAGS=$dirfd_save_CFLAGS
17840 test "$dir_fd_found" = yes && break
17841 done
17842 test "$dir_fd_found" = yes || ac_expr=no_such_member
17843
17844 gl_cv_sys_dir_fd_member_name=$ac_expr
17845
17846
17847 fi
17848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
17849 $as_echo "$gl_cv_sys_dir_fd_member_name" >&6; }
17850 if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
17851
17852 cat >>confdefs.h <<_ACEOF
17853 #define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name
17854 _ACEOF
17855
17856 fi
17857
17858
17859 fi
17860
17861
17862
17863
17864
17865 GNULIB_DIRFD=1
17866
17867
17868
17869
17870
17871 $as_echo "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
17872
17873
17874
17875
17876
17877
17878
17879
17880
17881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
17882 $as_echo_n "checking whether // is distinct from /... " >&6; }
17883 if ${gl_cv_double_slash_root+:} false; then :
17884 $as_echo_n "(cached) " >&6
17885 else
17886 if test x"$cross_compiling" = xyes ; then
17887 # When cross-compiling, there is no way to tell whether // is special
17888 # short of a list of hosts. However, the only known hosts to date
17889 # that have a distinct // are Apollo DomainOS (too old to port to),
17890 # Cygwin, and z/OS. If anyone knows of another system for which // has
17891 # special semantics and is distinct from /, please report it to
17892 # <bug-gnulib@gnu.org>.
17893 case $host in
17894 *-cygwin | i370-ibm-openedition)
17895 gl_cv_double_slash_root=yes ;;
17896 *)
17897 # Be optimistic and assume that / and // are the same when we
17898 # don't know.
17899 gl_cv_double_slash_root='unknown, assuming no' ;;
17900 esac
17901 else
17902 set x `ls -di / // 2>/dev/null`
17903 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
17904 gl_cv_double_slash_root=no
17905 else
17906 gl_cv_double_slash_root=yes
17907 fi
17908 fi
17909 fi
17910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
17911 $as_echo "$gl_cv_double_slash_root" >&6; }
17912 if test "$gl_cv_double_slash_root" = yes; then
17913
17914 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
17915
17916 fi
17917
17918
17919
17920
17921
17922 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
17923 REPLACE_DUP=1
17924 fi
17925
17926
17927
17928
17929
17930 if test $ac_cv_func_fchdir = no; then
17931 HAVE_FCHDIR=0
17932 fi
17933
17934 if test $HAVE_FCHDIR = 0; then
17935 REPLACE_DUP=1
17936 fi
17937
17938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup works" >&5
17939 $as_echo_n "checking whether dup works... " >&6; }
17940 if ${gl_cv_func_dup_works+:} false; then :
17941 $as_echo_n "(cached) " >&6
17942 else
17943 if test "$cross_compiling" = yes; then :
17944 case "$host_os" in
17945 # Guess no on native Windows.
17946 mingw*) gl_cv_func_dup_works="guessing no" ;;
17947 *) gl_cv_func_dup_works="guessing yes" ;;
17948 esac
17949
17950 else
17951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17952 /* end confdefs.h. */
17953 #include <unistd.h>
17954 #include <fcntl.h>
17955 #include <errno.h>
17956 int
17957 main ()
17958 {
17959 /* On OS/2 kLIBC, dup does not work on a directory fd. */
17960 int fd = open (".", O_RDONLY);
17961 return fd < 0 ? 1 : dup (fd) < 0 ? 2 : 0;
17962
17963 ;
17964 return 0;
17965 }
17966
17967 _ACEOF
17968 if ac_fn_c_try_run "$LINENO"; then :
17969 gl_cv_func_dup_works=yes
17970 else
17971 gl_cv_func_dup_works=no
17972 fi
17973 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17974 conftest.$ac_objext conftest.beam conftest.$ac_ext
17975 fi
17976
17977
17978 fi
17979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup_works" >&5
17980 $as_echo "$gl_cv_func_dup_works" >&6; }
17981 case "$gl_cv_func_dup_works" in
17982 *yes) ;;
17983 *)
17984 REPLACE_DUP=1
17985 ;;
17986 esac
17987
17988 if test $REPLACE_DUP = 1; then
17989
17990
17991
17992
17993
17994
17995
17996
17997 gl_LIBOBJS="$gl_LIBOBJS dup.$ac_objext"
17998
17999 :
18000 fi
18001
18002
18003
18004
18005
18006 GNULIB_DUP=1
18007
18008
18009
18010
18011
18012 $as_echo "#define GNULIB_TEST_DUP 1" >>confdefs.h
18013
18014
18015
18016
18017
18018
18019
18020
18021 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
18022
18023
18024 if test $HAVE_DUP2 = 1; then
18025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
18026 $as_echo_n "checking whether dup2 works... " >&6; }
18027 if ${gl_cv_func_dup2_works+:} false; then :
18028 $as_echo_n "(cached) " >&6
18029 else
18030 if test "$cross_compiling" = yes; then :
18031 case "$host_os" in
18032 mingw*) # on this platform, dup2 always returns 0 for success
18033 gl_cv_func_dup2_works="guessing no" ;;
18034 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
18035 gl_cv_func_dup2_works="guessing no" ;;
18036 aix* | freebsd*)
18037 # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
18038 # not EBADF.
18039 gl_cv_func_dup2_works="guessing no" ;;
18040 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
18041 gl_cv_func_dup2_works="guessing no" ;;
18042 *-android*) # implemented using dup3(), which fails if oldfd == newfd
18043 gl_cv_func_dup2_works="guessing no" ;;
18044 os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
18045 gl_cv_func_dup2_works="guessing no" ;;
18046 *) gl_cv_func_dup2_works="guessing yes" ;;
18047 esac
18048 else
18049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18050 /* end confdefs.h. */
18051
18052 #include <errno.h>
18053 #include <fcntl.h>
18054 #include <limits.h>
18055 #include <sys/resource.h>
18056 #include <unistd.h>
18057 #ifndef RLIM_SAVED_CUR
18058 # define RLIM_SAVED_CUR RLIM_INFINITY
18059 #endif
18060 #ifndef RLIM_SAVED_MAX
18061 # define RLIM_SAVED_MAX RLIM_INFINITY
18062 #endif
18063
18064 int
18065 main ()
18066 {
18067 int result = 0;
18068 int bad_fd = INT_MAX;
18069 struct rlimit rlim;
18070 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
18071 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
18072 && rlim.rlim_cur != RLIM_INFINITY
18073 && rlim.rlim_cur != RLIM_SAVED_MAX
18074 && rlim.rlim_cur != RLIM_SAVED_CUR)
18075 bad_fd = rlim.rlim_cur;
18076 #ifdef FD_CLOEXEC
18077 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
18078 result |= 1;
18079 #endif
18080 if (dup2 (1, 1) != 1)
18081 result |= 2;
18082 #ifdef FD_CLOEXEC
18083 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
18084 result |= 4;
18085 #endif
18086 close (0);
18087 if (dup2 (0, 0) != -1)
18088 result |= 8;
18089 /* Many gnulib modules require POSIX conformance of EBADF. */
18090 if (dup2 (2, bad_fd) == -1 && errno != EBADF)
18091 result |= 16;
18092 /* Flush out some cygwin core dumps. */
18093 if (dup2 (2, -1) != -1 || errno != EBADF)
18094 result |= 32;
18095 dup2 (2, 255);
18096 dup2 (2, 256);
18097 /* On OS/2 kLIBC, dup2() does not work on a directory fd. */
18098 {
18099 int fd = open (".", O_RDONLY);
18100 if (fd == -1)
18101 result |= 64;
18102 else if (dup2 (fd, fd + 1) == -1)
18103 result |= 128;
18104
18105 close (fd);
18106 }
18107 return result;
18108 ;
18109 return 0;
18110 }
18111
18112 _ACEOF
18113 if ac_fn_c_try_run "$LINENO"; then :
18114 gl_cv_func_dup2_works=yes
18115 else
18116 gl_cv_func_dup2_works=no
18117 fi
18118 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18119 conftest.$ac_objext conftest.beam conftest.$ac_ext
18120 fi
18121
18122
18123 fi
18124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
18125 $as_echo "$gl_cv_func_dup2_works" >&6; }
18126 case "$gl_cv_func_dup2_works" in
18127 *yes) ;;
18128 *)
18129 REPLACE_DUP2=1
18130 for ac_func in setdtablesize
18131 do :
18132 ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
18133 if test "x$ac_cv_func_setdtablesize" = xyes; then :
18134 cat >>confdefs.h <<_ACEOF
18135 #define HAVE_SETDTABLESIZE 1
18136 _ACEOF
18137
18138 fi
18139 done
18140
18141 ;;
18142 esac
18143 fi
18144
18145
18146
18147
18148 if test $ac_cv_func_fchdir = no; then
18149 HAVE_FCHDIR=0
18150 fi
18151
18152 if test $HAVE_FCHDIR = 0; then
18153 if test $HAVE_DUP2 = 1; then
18154 REPLACE_DUP2=1
18155 fi
18156 fi
18157
18158
18159 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
18160
18161
18162
18163
18164
18165
18166
18167
18168 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
18169
18170
18171 fi
18172
18173
18174
18175
18176
18177 GNULIB_DUP2=1
18178
18179
18180
18181
18182
18183 $as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h
18184
18185
18186
18187
18188
18189
18190
18191
18192
18193 GNULIB_ENVIRON=1
18194
18195
18196
18197
18198
18199 $as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
18200
18201
18202
18203
18204
18205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
18206 $as_echo_n "checking for error_at_line... " >&6; }
18207 if ${ac_cv_lib_error_at_line+:} false; then :
18208 $as_echo_n "(cached) " >&6
18209 else
18210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18211 /* end confdefs.h. */
18212 #include <error.h>
18213 int
18214 main ()
18215 {
18216 error_at_line (0, 0, "", 0, "an error occurred");
18217 ;
18218 return 0;
18219 }
18220 _ACEOF
18221 if ac_fn_c_try_link "$LINENO"; then :
18222 ac_cv_lib_error_at_line=yes
18223 else
18224 ac_cv_lib_error_at_line=no
18225 fi
18226 rm -f core conftest.err conftest.$ac_objext \
18227 conftest$ac_exeext conftest.$ac_ext
18228 fi
18229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
18230 $as_echo "$ac_cv_lib_error_at_line" >&6; }
18231
18232 if test $ac_cv_lib_error_at_line = no; then
18233
18234
18235
18236
18237
18238
18239
18240
18241 gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
18242
18243
18244
18245 :
18246
18247 fi
18248
18249
18250
18251
18252
18253
18254
18255 if test $ac_cv_have_decl_fchdir = no; then
18256 HAVE_DECL_FCHDIR=0
18257 fi
18258
18259
18260 if test $HAVE_FCHDIR = 0; then
18261
18262
18263
18264
18265
18266
18267
18268
18269 gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext"
18270
18271 :
18272
18273 $as_echo "#define REPLACE_FCHDIR 1" >>confdefs.h
18274
18275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5
18276 $as_echo_n "checking whether open can visit directories... " >&6; }
18277 if ${gl_cv_func_open_directory_works+:} false; then :
18278 $as_echo_n "(cached) " >&6
18279 else
18280 if test "$cross_compiling" = yes; then :
18281 case "$host_os" in
18282 # Guess yes on Linux systems.
18283 linux-* | linux) gl_cv_func_open_directory_works="guessing yes" ;;
18284 # Guess yes on glibc systems.
18285 *-gnu* | gnu*) gl_cv_func_open_directory_works="guessing yes" ;;
18286 # Guess no on native Windows.
18287 mingw*) gl_cv_func_open_directory_works="guessing no" ;;
18288 # If we don't know, obey --enable-cross-guesses.
18289 *) gl_cv_func_open_directory_works="$gl_cross_guess_normal" ;;
18290 esac
18291
18292 else
18293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18294 /* end confdefs.h. */
18295 #include <fcntl.h>
18296
18297 int
18298 main ()
18299 {
18300 return open(".", O_RDONLY) < 0;
18301 ;
18302 return 0;
18303 }
18304 _ACEOF
18305 if ac_fn_c_try_run "$LINENO"; then :
18306 gl_cv_func_open_directory_works=yes
18307 else
18308 gl_cv_func_open_directory_works=no
18309 fi
18310 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18311 conftest.$ac_objext conftest.beam conftest.$ac_ext
18312 fi
18313
18314 fi
18315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5
18316 $as_echo "$gl_cv_func_open_directory_works" >&6; }
18317 case "$gl_cv_func_open_directory_works" in
18318 *yes) ;;
18319 *)
18320
18321 $as_echo "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h
18322
18323 ;;
18324 esac
18325 fi
18326
18327
18328
18329
18330
18331
18332 GNULIB_FCHDIR=1
18333
18334
18335
18336
18337
18338 $as_echo "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h
18339
18340
18341
18342
18343
18344
18345
18346
18347 if test $ac_cv_func_fcntl = no; then
18348
18349
18350
18351 if test $ac_cv_func_fcntl = no; then
18352 HAVE_FCNTL=0
18353 else
18354 REPLACE_FCNTL=1
18355 fi
18356
18357 else
18358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
18359 $as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
18360 if ${gl_cv_func_fcntl_f_dupfd_works+:} false; then :
18361 $as_echo_n "(cached) " >&6
18362 else
18363 if test "$cross_compiling" = yes; then :
18364 case $host_os in
18365 aix* | cygwin* | haiku*)
18366 gl_cv_func_fcntl_f_dupfd_works="guessing no" ;;
18367 *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;;
18368 esac
18369 else
18370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18371 /* end confdefs.h. */
18372 #include <errno.h>
18373 #include <fcntl.h>
18374 #include <limits.h>
18375 #include <sys/resource.h>
18376 #include <unistd.h>
18377 #ifndef RLIM_SAVED_CUR
18378 # define RLIM_SAVED_CUR RLIM_INFINITY
18379 #endif
18380 #ifndef RLIM_SAVED_MAX
18381 # define RLIM_SAVED_MAX RLIM_INFINITY
18382 #endif
18383
18384 int
18385 main ()
18386 {
18387 int result = 0;
18388 int bad_fd = INT_MAX;
18389 struct rlimit rlim;
18390 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
18391 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
18392 && rlim.rlim_cur != RLIM_INFINITY
18393 && rlim.rlim_cur != RLIM_SAVED_MAX
18394 && rlim.rlim_cur != RLIM_SAVED_CUR)
18395 bad_fd = rlim.rlim_cur;
18396 if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
18397 if (errno != EINVAL) result |= 2;
18398 if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
18399 if (errno != EINVAL) result |= 8;
18400 /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */
18401 {
18402 int fd;
18403 fd = open (".", O_RDONLY);
18404 if (fd == -1)
18405 result |= 16;
18406 else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1)
18407 result |= 32;
18408
18409 close (fd);
18410 }
18411 return result;
18412 ;
18413 return 0;
18414 }
18415 _ACEOF
18416 if ac_fn_c_try_run "$LINENO"; then :
18417 gl_cv_func_fcntl_f_dupfd_works=yes
18418 else
18419 gl_cv_func_fcntl_f_dupfd_works=no
18420 fi
18421 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18422 conftest.$ac_objext conftest.beam conftest.$ac_ext
18423 fi
18424
18425 fi
18426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
18427 $as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
18428 case $gl_cv_func_fcntl_f_dupfd_works in
18429 *yes) ;;
18430 *)
18431
18432
18433 if test $ac_cv_func_fcntl = no; then
18434 HAVE_FCNTL=0
18435 else
18436 REPLACE_FCNTL=1
18437 fi
18438
18439
18440 $as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
18441 ;;
18442 esac
18443
18444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
18445 $as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
18446 if ${gl_cv_func_fcntl_f_dupfd_cloexec+:} false; then :
18447 $as_echo_n "(cached) " >&6
18448 else
18449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18450 /* end confdefs.h. */
18451
18452 #include <fcntl.h>
18453 #ifndef F_DUPFD_CLOEXEC
18454 choke me
18455 #endif
18456
18457 int
18458 main ()
18459 {
18460
18461 ;
18462 return 0;
18463 }
18464 _ACEOF
18465 if ac_fn_c_try_compile "$LINENO"; then :
18466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18467 /* end confdefs.h. */
18468
18469 #ifdef __linux__
18470 /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
18471 it to support the semantics on older kernels that failed with EINVAL. */
18472 choke me
18473 #endif
18474
18475 int
18476 main ()
18477 {
18478
18479 ;
18480 return 0;
18481 }
18482 _ACEOF
18483 if ac_fn_c_try_compile "$LINENO"; then :
18484 gl_cv_func_fcntl_f_dupfd_cloexec=yes
18485 else
18486 gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
18487 fi
18488 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18489 else
18490 gl_cv_func_fcntl_f_dupfd_cloexec=no
18491 fi
18492 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18493 fi
18494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
18495 $as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
18496 if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
18497
18498
18499
18500 if test $ac_cv_func_fcntl = no; then
18501 HAVE_FCNTL=0
18502 else
18503 REPLACE_FCNTL=1
18504 fi
18505
18506 fi
18507 fi
18508
18509
18510
18511
18512 if test $ac_cv_func_fchdir = no; then
18513 HAVE_FCHDIR=0
18514 fi
18515
18516 if test $HAVE_FCHDIR = 0; then
18517
18518
18519
18520 if test $ac_cv_func_fcntl = no; then
18521 HAVE_FCNTL=0
18522 else
18523 REPLACE_FCNTL=1
18524 fi
18525
18526 fi
18527
18528
18529 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
18530
18531
18532
18533
18534
18535
18536
18537
18538 gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
18539
18540 fi
18541
18542
18543
18544
18545
18546 GNULIB_FCNTL=1
18547
18548
18549
18550
18551
18552 $as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
18553
18554
18555
18556
18557
18558
18559
18560
18561
18562
18563
18564
18565
18566
18567 if test $gl_cv_have_include_next = yes; then
18568 gl_cv_next_fcntl_h='<'fcntl.h'>'
18569 else
18570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
18571 $as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
18572 if ${gl_cv_next_fcntl_h+:} false; then :
18573 $as_echo_n "(cached) " >&6
18574 else
18575
18576
18577
18578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18579 /* end confdefs.h. */
18580 #include <fcntl.h>
18581 _ACEOF
18582 case "$host_os" in
18583 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18584 *) gl_absname_cpp="$ac_cpp" ;;
18585 esac
18586
18587 case "$host_os" in
18588 mingw*)
18589 gl_dirsep_regex='[/\\]'
18590 ;;
18591 *)
18592 gl_dirsep_regex='\/'
18593 ;;
18594 esac
18595 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18596 gl_header_literal_regex=`echo 'fcntl.h' \
18597 | sed -e "$gl_make_literal_regex_sed"`
18598 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18599 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18600 s|^/[^/]|//&|
18601 p
18602 q
18603 }'
18604
18605 gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18606 sed -n "$gl_absolute_header_sed"`
18607
18608 gl_header=$gl_cv_absolute_fcntl_h
18609 gl_cv_next_fcntl_h='"'$gl_header'"'
18610
18611
18612 fi
18613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
18614 $as_echo "$gl_cv_next_fcntl_h" >&6; }
18615 fi
18616 NEXT_FCNTL_H=$gl_cv_next_fcntl_h
18617
18618 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18619 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18620 gl_next_as_first_directive='<'fcntl.h'>'
18621 else
18622 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18623 gl_next_as_first_directive=$gl_cv_next_fcntl_h
18624 fi
18625 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
18626
18627
18628
18629
18630
18631
18632
18633
18634
18635
18636
18637
18638
18639
18640
18641 cat >>confdefs.h <<_ACEOF
18642 #define GNULIB_FD_SAFER_FLAG 1
18643 _ACEOF
18644
18645
18646
18647
18648
18649
18650
18651 ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
18652 #include <dirent.h>
18653
18654 "
18655 if test "x$ac_cv_have_decl_fdopendir" = xyes; then :
18656 ac_have_decl=1
18657 else
18658 ac_have_decl=0
18659 fi
18660
18661 cat >>confdefs.h <<_ACEOF
18662 #define HAVE_DECL_FDOPENDIR $ac_have_decl
18663 _ACEOF
18664 if test $ac_have_decl = 1; then :
18665
18666 else
18667 HAVE_DECL_FDOPENDIR=0
18668 fi
18669
18670
18671 if test $ac_cv_func_fdopendir = no; then
18672 HAVE_FDOPENDIR=0
18673 else
18674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
18675 $as_echo_n "checking whether fdopendir works... " >&6; }
18676 if ${gl_cv_func_fdopendir_works+:} false; then :
18677 $as_echo_n "(cached) " >&6
18678 else
18679 if test "$cross_compiling" = yes; then :
18680 case "$host_os" in
18681 # Guess yes on glibc systems.
18682 *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
18683 # Guess yes on musl systems.
18684 *-musl*) gl_cv_func_fdopendir_works="guessing yes" ;;
18685 # If we don't know, obey --enable-cross-guesses.
18686 *) gl_cv_func_fdopendir_works="$gl_cross_guess_normal" ;;
18687 esac
18688
18689 else
18690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18691 /* end confdefs.h. */
18692
18693 #include <dirent.h>
18694 #include <fcntl.h>
18695 #include <unistd.h>
18696 #if !HAVE_DECL_FDOPENDIR
18697 extern
18698 # ifdef __cplusplus
18699 "C"
18700 # endif
18701 DIR *fdopendir (int);
18702 #endif
18703
18704 int
18705 main ()
18706 {
18707 int result = 0;
18708 int fd = open ("conftest.c", O_RDONLY);
18709 if (fd < 0) result |= 1;
18710 if (fdopendir (fd)) result |= 2;
18711 if (close (fd)) result |= 4;
18712 return result;
18713 ;
18714 return 0;
18715 }
18716 _ACEOF
18717 if ac_fn_c_try_run "$LINENO"; then :
18718 gl_cv_func_fdopendir_works=yes
18719 else
18720 gl_cv_func_fdopendir_works=no
18721 fi
18722 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18723 conftest.$ac_objext conftest.beam conftest.$ac_ext
18724 fi
18725
18726 fi
18727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
18728 $as_echo "$gl_cv_func_fdopendir_works" >&6; }
18729 case "$gl_cv_func_fdopendir_works" in
18730 *yes) ;;
18731 *)
18732 REPLACE_FDOPENDIR=1
18733 ;;
18734 esac
18735 fi
18736
18737 if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
18738
18739
18740
18741
18742
18743
18744
18745
18746 gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
18747
18748 fi
18749
18750
18751
18752
18753
18754 GNULIB_FDOPENDIR=1
18755
18756
18757
18758
18759
18760 $as_echo "#define GNULIB_TEST_FDOPENDIR 1" >>confdefs.h
18761
18762
18763
18764
18765
18766 cat >>confdefs.h <<_ACEOF
18767 #define GNULIB_FDOPENDIR 1
18768 _ACEOF
18769
18770
18771
18772
18773
18774
18775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
18776 $as_echo_n "checking for flexible array member... " >&6; }
18777 if ${ac_cv_c_flexmember+:} false; then :
18778 $as_echo_n "(cached) " >&6
18779 else
18780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18781 /* end confdefs.h. */
18782 #include <stdlib.h>
18783 #include <stdio.h>
18784 #include <stddef.h>
18785 struct m { struct m *next, **list; char name[]; };
18786 struct s { struct s *p; struct m *m; int n; double d[]; };
18787 int
18788 main ()
18789 {
18790 int m = getchar ();
18791 size_t nbytes = offsetof (struct s, d) + m * sizeof (double);
18792 nbytes += sizeof (struct s) - 1;
18793 nbytes -= nbytes % sizeof (struct s);
18794 struct s *p = malloc (nbytes);
18795 p->p = p;
18796 p->m = NULL;
18797 p->d[0] = 0.0;
18798 return p->d != (double *) NULL;
18799 ;
18800 return 0;
18801 }
18802 _ACEOF
18803 if ac_fn_c_try_compile "$LINENO"; then :
18804 ac_cv_c_flexmember=yes
18805 else
18806 ac_cv_c_flexmember=no
18807 fi
18808 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18809 fi
18810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
18811 $as_echo "$ac_cv_c_flexmember" >&6; }
18812 if test $ac_cv_c_flexmember = yes; then
18813
18814 $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
18815
18816 else
18817 $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
18818
18819 fi
18820
18821
18822
18823
18824 FLOAT_H=
18825 REPLACE_FLOAT_LDBL=0
18826 case "$host_os" in
18827 aix* | beos* | openbsd* | mirbsd* | irix*)
18828 FLOAT_H=float.h
18829 ;;
18830 freebsd* | dragonfly*)
18831 case "$host_cpu" in
18832 i[34567]86 )
18833 FLOAT_H=float.h
18834 ;;
18835 x86_64 )
18836 # On x86_64 systems, the C compiler may still be generating
18837 # 32-bit code.
18838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18839 /* end confdefs.h. */
18840 #if defined __LP64__ || defined __x86_64__ || defined __amd64__
18841 int ok;
18842 #else
18843 error fail
18844 #endif
18845
18846 _ACEOF
18847 if ac_fn_c_try_compile "$LINENO"; then :
18848
18849 else
18850 FLOAT_H=float.h
18851 fi
18852 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18853 ;;
18854 esac
18855 ;;
18856 linux*)
18857 case "$host_cpu" in
18858 powerpc*)
18859 FLOAT_H=float.h
18860 ;;
18861 esac
18862 ;;
18863 esac
18864 case "$host_os" in
18865 aix* | freebsd* | dragonfly* | linux*)
18866 if test -n "$FLOAT_H"; then
18867 REPLACE_FLOAT_LDBL=1
18868 fi
18869 ;;
18870 esac
18871
18872 REPLACE_ITOLD=0
18873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
18874 $as_echo_n "checking whether conversion from 'int' to 'long double' works... " >&6; }
18875 if ${gl_cv_func_itold_works+:} false; then :
18876 $as_echo_n "(cached) " >&6
18877 else
18878
18879 if test "$cross_compiling" = yes; then :
18880 case "$host" in
18881 sparc*-*-linux*)
18882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18883 /* end confdefs.h. */
18884 #if defined __LP64__ || defined __arch64__
18885 int ok;
18886 #else
18887 error fail
18888 #endif
18889
18890 _ACEOF
18891 if ac_fn_c_try_compile "$LINENO"; then :
18892 gl_cv_func_itold_works="guessing no"
18893 else
18894 gl_cv_func_itold_works="guessing yes"
18895 fi
18896 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18897 ;;
18898 # Guess yes on native Windows.
18899 mingw*) gl_cv_func_itold_works="guessing yes" ;;
18900 *) gl_cv_func_itold_works="guessing yes" ;;
18901 esac
18902
18903 else
18904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18905 /* end confdefs.h. */
18906
18907 int i = -1;
18908 volatile long double ld;
18909 int main ()
18910 {
18911 ld += i * 1.0L;
18912 if (ld > 0)
18913 return 1;
18914 return 0;
18915 }
18916 _ACEOF
18917 if ac_fn_c_try_run "$LINENO"; then :
18918 gl_cv_func_itold_works=yes
18919 else
18920 gl_cv_func_itold_works=no
18921 fi
18922 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18923 conftest.$ac_objext conftest.beam conftest.$ac_ext
18924 fi
18925
18926
18927 fi
18928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
18929 $as_echo "$gl_cv_func_itold_works" >&6; }
18930 case "$gl_cv_func_itold_works" in
18931 *no)
18932 REPLACE_ITOLD=1
18933 FLOAT_H=float.h
18934 ;;
18935 esac
18936
18937 if test -n "$FLOAT_H"; then
18938
18939
18940
18941
18942
18943
18944
18945
18946 if test $gl_cv_have_include_next = yes; then
18947 gl_cv_next_float_h='<'float.h'>'
18948 else
18949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
18950 $as_echo_n "checking absolute name of <float.h>... " >&6; }
18951 if ${gl_cv_next_float_h+:} false; then :
18952 $as_echo_n "(cached) " >&6
18953 else
18954
18955
18956
18957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18958 /* end confdefs.h. */
18959 #include <float.h>
18960 _ACEOF
18961 case "$host_os" in
18962 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18963 *) gl_absname_cpp="$ac_cpp" ;;
18964 esac
18965
18966 case "$host_os" in
18967 mingw*)
18968 gl_dirsep_regex='[/\\]'
18969 ;;
18970 *)
18971 gl_dirsep_regex='\/'
18972 ;;
18973 esac
18974 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18975 gl_header_literal_regex=`echo 'float.h' \
18976 | sed -e "$gl_make_literal_regex_sed"`
18977 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18978 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18979 s|^/[^/]|//&|
18980 p
18981 q
18982 }'
18983
18984 gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18985 sed -n "$gl_absolute_header_sed"`
18986
18987 gl_header=$gl_cv_absolute_float_h
18988 gl_cv_next_float_h='"'$gl_header'"'
18989
18990
18991 fi
18992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
18993 $as_echo "$gl_cv_next_float_h" >&6; }
18994 fi
18995 NEXT_FLOAT_H=$gl_cv_next_float_h
18996
18997 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18998 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18999 gl_next_as_first_directive='<'float.h'>'
19000 else
19001 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19002 gl_next_as_first_directive=$gl_cv_next_float_h
19003 fi
19004 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
19005
19006
19007
19008
19009 fi
19010
19011 if test -n "$FLOAT_H"; then
19012 GL_GENERATE_FLOAT_H_TRUE=
19013 GL_GENERATE_FLOAT_H_FALSE='#'
19014 else
19015 GL_GENERATE_FLOAT_H_TRUE='#'
19016 GL_GENERATE_FLOAT_H_FALSE=
19017 fi
19018
19019
19020
19021 if test $REPLACE_FLOAT_LDBL = 1; then
19022
19023
19024
19025
19026
19027
19028
19029
19030 gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
19031
19032 fi
19033 if test $REPLACE_ITOLD = 1; then
19034
19035
19036
19037
19038
19039
19040
19041
19042 gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
19043
19044 fi
19045
19046
19047
19048
19049 gl_fnmatch_required_lowercase=`
19050 echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]'
19051 `
19052
19053 if test $ac_cv_func_fnmatch = no; then
19054 HAVE_FNMATCH=0
19055 else
19056 gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}"
19057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5
19058 $as_echo_n "checking for working $gl_fnmatch_required fnmatch... " >&6; }
19059 if eval \${$gl_fnmatch_cache_var+:} false; then :
19060 $as_echo_n "(cached) " >&6
19061 else
19062 if test $gl_fnmatch_required = GNU; then
19063 gl_fnmatch_gnu_start=
19064 gl_fnmatch_gnu_end=
19065 else
19066 gl_fnmatch_gnu_start='#if 0'
19067 gl_fnmatch_gnu_end='#endif'
19068 fi
19069 if test "$cross_compiling" = yes; then :
19070 case "$host_os" in
19071 # Guess yes on musl systems.
19072 *-musl*) eval "$gl_fnmatch_cache_var=\"guessing yes\"" ;;
19073 # Guess no otherwise, even on glibc systems.
19074 *) eval "$gl_fnmatch_cache_var=\"guessing no\"" ;;
19075 esac
19076
19077 else
19078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19079 /* end confdefs.h. */
19080 #include <fnmatch.h>
19081 static int
19082 y (char const *pattern, char const *string, int flags)
19083 {
19084 return fnmatch (pattern, string, flags) == 0;
19085 }
19086 static int
19087 n (char const *pattern, char const *string, int flags)
19088 {
19089 return fnmatch (pattern, string, flags) == FNM_NOMATCH;
19090 }
19091
19092 int
19093 main ()
19094 {
19095 char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]";
19096 char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]";
19097 static char const A_1[] = { 'A' - 1, 0 };
19098 static char const A01[] = { 'A' + 1, 0 };
19099 static char const a_1[] = { 'a' - 1, 0 };
19100 static char const a01[] = { 'a' + 1, 0 };
19101 static char const bs_1[] = { '\\\\' - 1, 0 };
19102 static char const bs01[] = { '\\\\' + 1, 0 };
19103 int result = 0;
19104 if (!n ("a*", "", 0))
19105 return 1;
19106 if (!y ("a*", "abc", 0))
19107 return 1;
19108 if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */
19109 return 1;
19110 if (!n ("d*/*1", "d/s/1", FNM_PATHNAME))
19111 return 2;
19112 if (!y ("a\\\\bc", "abc", 0))
19113 return 3;
19114 if (!n ("a\\\\bc", "abc", FNM_NOESCAPE))
19115 return 3;
19116 if (!y ("*x", ".x", 0))
19117 return 4;
19118 if (!n ("*x", ".x", FNM_PERIOD))
19119 return 4;
19120 if (!y (Apat, "\\\\", 0))
19121 return 5;
19122 if (!y (Apat, "A", 0))
19123 return 5;
19124 if (!y (apat, "\\\\", 0))
19125 return 5;
19126 if (!y (apat, "a", 0))
19127 return 5;
19128 if (!(n (Apat, A_1, 0) == ('A' < '\\\\')))
19129 return 5;
19130 if (!(n (apat, a_1, 0) == ('a' < '\\\\')))
19131 return 5;
19132 if (!(y (Apat, A01, 0) == ('A' < '\\\\')))
19133 return 5;
19134 if (!(y (apat, a01, 0) == ('a' < '\\\\')))
19135 return 5;
19136 if (!(y (Apat, bs_1, 0) == ('A' < '\\\\')))
19137 return 5;
19138 if (!(y (apat, bs_1, 0) == ('a' < '\\\\')))
19139 return 5;
19140 if (!(n (Apat, bs01, 0) == ('A' < '\\\\')))
19141 return 5;
19142 if (!(n (apat, bs01, 0) == ('a' < '\\\\')))
19143 return 5;
19144 $gl_fnmatch_gnu_start
19145 if (!y ("xxXX", "xXxX", FNM_CASEFOLD))
19146 result |= 8;
19147 if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH))
19148 result |= 16;
19149 if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME))
19150 result |= 32;
19151 if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR))
19152 result |= 64;
19153 if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR))
19154 result |= 64;
19155 if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR))
19156 result |= 64;
19157 $gl_fnmatch_gnu_end
19158 return result;
19159
19160 ;
19161 return 0;
19162 }
19163 _ACEOF
19164 if ac_fn_c_try_run "$LINENO"; then :
19165 eval "$gl_fnmatch_cache_var=yes"
19166 else
19167 eval "$gl_fnmatch_cache_var=no"
19168 fi
19169 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19170 conftest.$ac_objext conftest.beam conftest.$ac_ext
19171 fi
19172
19173
19174 fi
19175 eval ac_res=\$$gl_fnmatch_cache_var
19176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19177 $as_echo "$ac_res" >&6; }
19178 eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\""
19179 case "$gl_fnmatch_result" in
19180 *yes) ;;
19181 *) REPLACE_FNMATCH=1 ;;
19182 esac
19183 fi
19184 if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
19185
19186
19187 FNMATCH_H='fnmatch.h'
19188 if test -n "$FNMATCH_H"; then
19189 GL_GENERATE_FNMATCH_H_TRUE=
19190 GL_GENERATE_FNMATCH_H_FALSE='#'
19191 else
19192 GL_GENERATE_FNMATCH_H_TRUE='#'
19193 GL_GENERATE_FNMATCH_H_FALSE=
19194 fi
19195
19196
19197 fi
19198
19199 if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
19200
19201
19202
19203
19204
19205
19206
19207
19208 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
19209
19210
19211
19212 ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
19213 "
19214 if test "x$ac_cv_have_decl_isblank" = xyes; then :
19215 ac_have_decl=1
19216 else
19217 ac_have_decl=0
19218 fi
19219
19220 cat >>confdefs.h <<_ACEOF
19221 #define HAVE_DECL_ISBLANK $ac_have_decl
19222 _ACEOF
19223
19224
19225
19226
19227 fi
19228
19229
19230
19231
19232
19233 GNULIB_FNMATCH=1
19234
19235
19236
19237
19238
19239 $as_echo "#define GNULIB_TEST_FNMATCH 1" >>confdefs.h
19240
19241
19242
19243
19244
19245
19246
19247
19248 if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
19249
19250
19251
19252
19253
19254
19255
19256
19257 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
19258
19259
19260
19261 ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
19262 "
19263 if test "x$ac_cv_have_decl_isblank" = xyes; then :
19264 ac_have_decl=1
19265 else
19266 ac_have_decl=0
19267 fi
19268
19269 cat >>confdefs.h <<_ACEOF
19270 #define HAVE_DECL_ISBLANK $ac_have_decl
19271 _ACEOF
19272
19273
19274
19275
19276 fi
19277
19278
19279 cat >>confdefs.h <<_ACEOF
19280 #define GNULIB_FNMATCH_GNU 1
19281 _ACEOF
19282
19283
19284
19285
19286 if test $gl_func_frexp != yes; then
19287
19288
19289
19290
19291
19292
19293
19294
19295 gl_LIBOBJS="$gl_LIBOBJS frexp.$ac_objext"
19296
19297 fi
19298
19299
19300
19301
19302
19303 GNULIB_FREXP=1
19304
19305
19306
19307
19308
19309 $as_echo "#define GNULIB_TEST_FREXP 1" >>confdefs.h
19310
19311
19312
19313
19314 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
19315
19316
19317
19318
19319
19320
19321
19322
19323 gl_LIBOBJS="$gl_LIBOBJS frexpl.$ac_objext"
19324
19325 fi
19326
19327
19328
19329
19330
19331 GNULIB_FREXPL=1
19332
19333
19334
19335
19336
19337 $as_echo "#define GNULIB_TEST_FREXPL 1" >>confdefs.h
19338
19339
19340
19341
19342
19343
19344
19345 case "$host_os" in
19346 mingw* | solaris*)
19347 REPLACE_FSTAT=1
19348 ;;
19349 esac
19350
19351
19352
19353
19354
19355 if test $ac_cv_func_fchdir = no; then
19356 HAVE_FCHDIR=0
19357 fi
19358
19359 if test $HAVE_FCHDIR = 0; then
19360 case "$gl_cv_func_open_directory_works" in
19361 *yes) ;;
19362 *)
19363 REPLACE_FSTAT=1
19364 ;;
19365 esac
19366 fi
19367
19368
19369 if test $REPLACE_FSTAT = 1; then
19370
19371
19372
19373
19374
19375
19376
19377
19378 gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
19379
19380 case "$host_os" in
19381 mingw*)
19382
19383
19384
19385
19386
19387
19388
19389
19390 gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
19391
19392 ;;
19393 esac
19394
19395
19396 :
19397
19398 fi
19399
19400
19401
19402
19403
19404 GNULIB_FSTAT=1
19405
19406
19407
19408
19409
19410 $as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
19411
19412
19413
19414
19415
19416
19417
19418
19419
19420
19421 if test $ac_cv_func_fstatat = no; then
19422 HAVE_FSTATAT=0
19423 else
19424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
19425 $as_echo_n "checking whether fstatat (..., 0) works... " >&6; }
19426 if ${gl_cv_func_fstatat_zero_flag+:} false; then :
19427 $as_echo_n "(cached) " >&6
19428 else
19429 if test "$cross_compiling" = yes; then :
19430 case "$host_os" in
19431 aix*) gl_cv_func_fstatat_zero_flag="guessing no";;
19432 *) gl_cv_func_fstatat_zero_flag="guessing yes";;
19433 esac
19434
19435 else
19436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19437 /* end confdefs.h. */
19438
19439 #include <fcntl.h>
19440 #include <sys/stat.h>
19441 int
19442 main (void)
19443 {
19444 struct stat a;
19445 return fstatat (AT_FDCWD, ".", &a, 0) != 0;
19446 }
19447
19448 _ACEOF
19449 if ac_fn_c_try_run "$LINENO"; then :
19450 gl_cv_func_fstatat_zero_flag=yes
19451 else
19452 gl_cv_func_fstatat_zero_flag=no
19453 fi
19454 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19455 conftest.$ac_objext conftest.beam conftest.$ac_ext
19456 fi
19457
19458
19459 fi
19460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
19461 $as_echo "$gl_cv_func_fstatat_zero_flag" >&6; }
19462
19463 case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
19464 *yes+*yes) ;;
19465 *) REPLACE_FSTATAT=1 ;;
19466 esac
19467
19468 case $host_os in
19469 solaris*)
19470 REPLACE_FSTATAT=1 ;;
19471 esac
19472
19473 case $REPLACE_FSTATAT,$gl_cv_func_fstatat_zero_flag in
19474 1,*yes)
19475
19476 $as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
19477
19478 ;;
19479 esac
19480 fi
19481
19482 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
19483
19484
19485
19486
19487
19488
19489
19490
19491 gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
19492
19493 fi
19494
19495
19496
19497
19498
19499 GNULIB_FSTATAT=1
19500
19501
19502
19503
19504
19505 $as_echo "#define GNULIB_TEST_FSTATAT 1" >>confdefs.h
19506
19507
19508
19509
19510
19511
19512
19513
19514 gl_abort_bug=no
19515 case "$host_os" in
19516 mingw*)
19517 gl_cv_func_getcwd_path_max=yes
19518 ;;
19519 *)
19520
19521
19522
19523
19524
19525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd handles long file names properly" >&5
19526 $as_echo_n "checking whether getcwd handles long file names properly... " >&6; }
19527 if ${gl_cv_func_getcwd_path_max+:} false; then :
19528 $as_echo_n "(cached) " >&6
19529 else
19530 # Arrange for deletion of the temporary directory this test creates.
19531 ac_clean_files="$ac_clean_files confdir3"
19532 if test "$cross_compiling" = yes; then :
19533 # Cross-compilation guesses:
19534 case "$host_os" in
19535 aix*) # On AIX, it has the AIX bug.
19536 gl_cv_func_getcwd_path_max='guessing no, it has the AIX bug' ;;
19537 gnu*) # On Hurd, it is 'yes'.
19538 gl_cv_func_getcwd_path_max='guessing yes' ;;
19539 linux* | kfreebsd*)
19540 # On older Linux+glibc it's 'no, but it is partly working',
19541 # on newer Linux+glibc it's 'yes'.
19542 # On Linux+musl libc, it's 'no, but it is partly working'.
19543 # On kFreeBSD+glibc, it's 'no, but it is partly working'.
19544 gl_cv_func_getcwd_path_max='guessing no, but it is partly working' ;;
19545 *) # If we don't know, obey --enable-cross-guesses.
19546 gl_cv_func_getcwd_path_max="$gl_cross_guess_normal" ;;
19547 esac
19548
19549 else
19550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19551 /* end confdefs.h. */
19552
19553 #include <errno.h>
19554 #include <stdlib.h>
19555 #if HAVE_UNISTD_H
19556 # include <unistd.h>
19557 #else
19558 # include <direct.h>
19559 #endif
19560 #include <string.h>
19561 #include <limits.h>
19562 #include <sys/stat.h>
19563 #include <sys/types.h>
19564 #include <fcntl.h>
19565
19566
19567 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
19568 #if HAVE_UNISTD_H
19569 # include <unistd.h>
19570 #endif
19571 #include <limits.h>
19572 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
19573 # include <sys/param.h>
19574 #endif
19575 #if !defined PATH_MAX && defined MAXPATHLEN
19576 # define PATH_MAX MAXPATHLEN
19577 #endif
19578 #ifdef __hpux
19579 # undef PATH_MAX
19580 # define PATH_MAX 1024
19581 #endif
19582 #if defined _WIN32 && ! defined __CYGWIN__
19583 # undef PATH_MAX
19584 # define PATH_MAX 260
19585 #endif
19586
19587
19588 #ifndef AT_FDCWD
19589 # define AT_FDCWD 0
19590 #endif
19591 #ifdef ENAMETOOLONG
19592 # define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG)
19593 #else
19594 # define is_ENAMETOOLONG(x) 0
19595 #endif
19596
19597 /* Use the getcwd function, not any macro. */
19598 #undef getcwd
19599
19600 /* Don't get link errors because mkdir is redefined to rpl_mkdir. */
19601 #undef mkdir
19602
19603 #ifndef S_IRWXU
19604 # define S_IRWXU 0700
19605 #endif
19606
19607 /* The length of this name must be 8. */
19608 #define DIR_NAME "confdir3"
19609 #define DIR_NAME_LEN 8
19610 #define DIR_NAME_SIZE (DIR_NAME_LEN + 1)
19611
19612 /* The length of "../". */
19613 #define DOTDOTSLASH_LEN 3
19614
19615 /* Leftover bytes in the buffer, to work around library or OS bugs. */
19616 #define BUF_SLOP 20
19617
19618 int
19619 main ()
19620 {
19621 #ifndef PATH_MAX
19622 /* The Hurd doesn't define this, so getcwd can't exhibit the bug --
19623 at least not on a local file system. And if we were to start worrying
19624 about remote file systems, we'd have to enable the wrapper function
19625 all of the time, just to be safe. That's not worth the cost. */
19626 exit (0);
19627 #elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \
19628 - DIR_NAME_SIZE - BUF_SLOP) \
19629 <= PATH_MAX)
19630 /* FIXME: Assuming there's a system for which this is true,
19631 this should be done in a compile test. */
19632 exit (0);
19633 #else
19634 char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1)
19635 + DIR_NAME_SIZE + BUF_SLOP];
19636 char *cwd = getcwd (buf, PATH_MAX);
19637 size_t initial_cwd_len;
19638 size_t cwd_len;
19639 int fail = 0;
19640 size_t n_chdirs = 0;
19641
19642 if (cwd == NULL)
19643 exit (10);
19644
19645 cwd_len = initial_cwd_len = strlen (cwd);
19646
19647 while (1)
19648 {
19649 size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN);
19650 char *c = NULL;
19651
19652 cwd_len += DIR_NAME_SIZE;
19653 /* If mkdir or chdir fails, it could be that this system cannot create
19654 any file with an absolute name longer than PATH_MAX, such as cygwin.
19655 If so, leave fail as 0, because the current working directory can't
19656 be too long for getcwd if it can't even be created. On Linux with
19657 the 9p file system, mkdir fails with error EINVAL when cwd_len gets
19658 too long; ignore this failure because the getcwd() system call
19659 produces good results whereas the gnulib substitute calls getdents64
19660 which fails with error EPROTO.
19661 For other errors, be pessimistic and consider that as a failure,
19662 too. */
19663 if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0)
19664 {
19665 if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
19666 #ifdef __linux__
19667 if (! (errno == EINVAL))
19668 #endif
19669 fail = 20;
19670 break;
19671 }
19672
19673 if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE)
19674 {
19675 struct stat sb;
19676
19677 c = getcwd (buf, PATH_MAX);
19678 if (!c && errno == ENOENT)
19679 {
19680 fail = 11;
19681 break;
19682 }
19683 if (c)
19684 {
19685 fail = 31;
19686 break;
19687 }
19688 if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
19689 {
19690 fail = 21;
19691 break;
19692 }
19693
19694 /* Our replacement needs to be able to stat() long ../../paths,
19695 so generate a path larger than PATH_MAX to check,
19696 avoiding the replacement if we can't stat(). */
19697 c = getcwd (buf, cwd_len + 1);
19698 if (c && !AT_FDCWD && stat (c, &sb) != 0 && is_ENAMETOOLONG (errno))
19699 {
19700 fail = 32;
19701 break;
19702 }
19703 }
19704
19705 if (dotdot_max <= cwd_len - initial_cwd_len)
19706 {
19707 if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len)
19708 break;
19709 c = getcwd (buf, cwd_len + 1);
19710 if (!c)
19711 {
19712 if (! (errno == ERANGE || errno == ENOENT
19713 || is_ENAMETOOLONG (errno)))
19714 {
19715 fail = 22;
19716 break;
19717 }
19718 if (AT_FDCWD || errno == ERANGE || errno == ENOENT)
19719 {
19720 fail = 12;
19721 break;
19722 }
19723 }
19724 }
19725
19726 if (c && strlen (c) != cwd_len)
19727 {
19728 fail = 23;
19729 break;
19730 }
19731 ++n_chdirs;
19732 }
19733
19734 /* Leaving behind such a deep directory is not polite.
19735 So clean up here, right away, even though the driving
19736 shell script would also clean up. */
19737 {
19738 size_t i;
19739
19740 /* Try rmdir first, in case the chdir failed. */
19741 rmdir (DIR_NAME);
19742 for (i = 0; i <= n_chdirs; i++)
19743 {
19744 if (chdir ("..") < 0)
19745 break;
19746 if (rmdir (DIR_NAME) != 0)
19747 break;
19748 }
19749 }
19750
19751 exit (fail);
19752 #endif
19753 }
19754
19755 _ACEOF
19756 if ac_fn_c_try_run "$LINENO"; then :
19757 gl_cv_func_getcwd_path_max=yes
19758 else
19759 case $? in
19760 10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';;
19761 31) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
19762 32) gl_cv_func_getcwd_path_max='yes, but with shorter paths';;
19763 *) gl_cv_func_getcwd_path_max=no;;
19764 esac
19765 fi
19766 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19767 conftest.$ac_objext conftest.beam conftest.$ac_ext
19768 fi
19769
19770
19771 fi
19772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_path_max" >&5
19773 $as_echo "$gl_cv_func_getcwd_path_max" >&6; }
19774
19775 case "$gl_cv_func_getcwd_null" in
19776 *yes)
19777
19778
19779
19780
19781
19782
19783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
19784 $as_echo_n "checking for getpagesize... " >&6; }
19785 if ${gl_cv_func_getpagesize+:} false; then :
19786 $as_echo_n "(cached) " >&6
19787 else
19788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19789 /* end confdefs.h. */
19790 #include <unistd.h>
19791 int
19792 main ()
19793 {
19794 return getpagesize();
19795 ;
19796 return 0;
19797 }
19798
19799 _ACEOF
19800 if ac_fn_c_try_link "$LINENO"; then :
19801 gl_cv_func_getpagesize=yes
19802 else
19803 gl_cv_func_getpagesize=no
19804 fi
19805 rm -f core conftest.err conftest.$ac_objext \
19806 conftest$ac_exeext conftest.$ac_ext
19807
19808 fi
19809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getpagesize" >&5
19810 $as_echo "$gl_cv_func_getpagesize" >&6; }
19811
19812 if test $gl_cv_func_getpagesize = yes; then
19813
19814 cat >>confdefs.h <<_ACEOF
19815 #define HAVE_GETPAGESIZE 1
19816 _ACEOF
19817
19818 fi
19819
19820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd aborts when 4k < cwd_length < 16k" >&5
19821 $as_echo_n "checking whether getcwd aborts when 4k < cwd_length < 16k... " >&6; }
19822 if ${gl_cv_func_getcwd_abort_bug+:} false; then :
19823 $as_echo_n "(cached) " >&6
19824 else
19825 # Remove any remnants of a previous test.
19826 rm -rf confdir-14B---
19827 # Arrange for deletion of the temporary directory this test creates.
19828 ac_clean_files="$ac_clean_files confdir-14B---"
19829 if test "$cross_compiling" = yes; then :
19830 case "$host_os" in
19831 # Guess no on musl systems.
19832 *-musl*) gl_cv_func_getcwd_abort_bug="guessing no" ;;
19833 # Guess yes otherwise, even on glibc systems.
19834 *) gl_cv_func_getcwd_abort_bug="guessing yes"
19835 esac
19836
19837 else
19838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19839 /* end confdefs.h. */
19840
19841 #include <errno.h>
19842 #include <stdlib.h>
19843 #if HAVE_UNISTD_H
19844 # include <unistd.h>
19845 #else /* on Windows with MSVC */
19846 # include <direct.h>
19847 #endif
19848 #include <string.h>
19849 #include <sys/stat.h>
19850
19851
19852 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
19853 #if HAVE_UNISTD_H
19854 # include <unistd.h>
19855 #endif
19856 #include <limits.h>
19857 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
19858 # include <sys/param.h>
19859 #endif
19860 #if !defined PATH_MAX && defined MAXPATHLEN
19861 # define PATH_MAX MAXPATHLEN
19862 #endif
19863 #ifdef __hpux
19864 # undef PATH_MAX
19865 # define PATH_MAX 1024
19866 #endif
19867 #if defined _WIN32 && ! defined __CYGWIN__
19868 # undef PATH_MAX
19869 # define PATH_MAX 260
19870 #endif
19871
19872
19873 /* Don't get link errors because mkdir is redefined to rpl_mkdir. */
19874 #undef mkdir
19875
19876 #ifndef S_IRWXU
19877 # define S_IRWXU 0700
19878 #endif
19879
19880 /* FIXME: skip the run-test altogether on systems without getpagesize. */
19881 #if ! HAVE_GETPAGESIZE
19882 # define getpagesize() 0
19883 #endif
19884
19885 /* This size is chosen to be larger than PATH_MAX (4k), yet smaller than
19886 the 16kB pagesize on ia64 linux. Those conditions make the code below
19887 trigger a bug in glibc's getcwd implementation before 2.4.90-10. */
19888 #define TARGET_LEN (5 * 1024)
19889
19890 int
19891 main ()
19892 {
19893 char *cwd;
19894 size_t initial_cwd_len;
19895 int fail = 0;
19896
19897 /* The bug is triggered when PATH_MAX < getpagesize (), so skip
19898 this relatively expensive and invasive test if that's not true. */
19899 #ifdef PATH_MAX
19900 int bug_possible = PATH_MAX < getpagesize ();
19901 #else
19902 int bug_possible = 0;
19903 #endif
19904 if (! bug_possible)
19905 return 0;
19906
19907 cwd = getcwd (NULL, 0);
19908 if (cwd == NULL)
19909 return 2;
19910
19911 initial_cwd_len = strlen (cwd);
19912 free (cwd);
19913
19914 if (1)
19915 {
19916 static char const dir_name[] = "confdir-14B---";
19917 size_t desired_depth = ((TARGET_LEN - 1 - initial_cwd_len)
19918 / sizeof dir_name);
19919 size_t d;
19920 for (d = 0; d < desired_depth; d++)
19921 {
19922 if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0)
19923 {
19924 if (! (errno == ERANGE || errno == ENAMETOOLONG
19925 || errno == ENOENT))
19926 fail = 3; /* Unable to construct deep hierarchy. */
19927 break;
19928 }
19929 }
19930
19931 /* If libc has the bug in question, this invocation of getcwd
19932 results in a failed assertion. */
19933 cwd = getcwd (NULL, 0);
19934 if (cwd == NULL)
19935 fail = 4; /* getcwd didn't assert, but it failed for a long name
19936 where the answer could have been learned. */
19937 free (cwd);
19938
19939 /* Call rmdir first, in case the above chdir failed. */
19940 rmdir (dir_name);
19941 while (0 < d--)
19942 {
19943 if (chdir ("..") < 0)
19944 {
19945 fail = 5;
19946 break;
19947 }
19948 rmdir (dir_name);
19949 }
19950 }
19951
19952 return fail;
19953 }
19954
19955 _ACEOF
19956 if ac_fn_c_try_run "$LINENO"; then :
19957 gl_cv_func_getcwd_abort_bug=no
19958 else
19959 ret=$?
19960 if test $ret -ge 128 || test $ret = 4; then
19961 gl_cv_func_getcwd_abort_bug=yes
19962 else
19963 gl_cv_func_getcwd_abort_bug=no
19964 fi
19965
19966 fi
19967 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19968 conftest.$ac_objext conftest.beam conftest.$ac_ext
19969 fi
19970
19971
19972 fi
19973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_abort_bug" >&5
19974 $as_echo "$gl_cv_func_getcwd_abort_bug" >&6; }
19975 case "$gl_cv_func_getcwd_abort_bug" in
19976 *yes)
19977 gl_abort_bug=yes
19978 ;;
19979 *)
19980
19981 ;;
19982 esac
19983
19984 ;;
19985 esac
19986 ;;
19987 esac
19988 case "$gl_cv_func_getcwd_path_max" in
19989 *"no" | *"no, it has the AIX bug") ;;
19990 *)
19991
19992 $as_echo "#define HAVE_MINIMALLY_WORKING_GETCWD 1" >>confdefs.h
19993
19994 ;;
19995 esac
19996 case "$gl_cv_func_getcwd_path_max" in
19997 *"no, but it is partly working")
19998
19999 $as_echo "#define HAVE_PARTLY_WORKING_GETCWD 1" >>confdefs.h
20000
20001 ;;
20002 *"yes, but with shorter paths")
20003
20004 $as_echo "#define HAVE_GETCWD_SHORTER 1" >>confdefs.h
20005
20006 ;;
20007 esac
20008
20009 if { case "$gl_cv_func_getcwd_null" in *yes) false;; *) true;; esac; } \
20010 || test $gl_cv_func_getcwd_posix_signature != yes \
20011 || { case "$gl_cv_func_getcwd_path_max" in *yes*) false;; *) true;; esac; } \
20012 || test $gl_abort_bug = yes; then
20013 REPLACE_GETCWD=1
20014 fi
20015
20016 if test $REPLACE_GETCWD = 1; then
20017
20018
20019
20020
20021
20022
20023
20024
20025 gl_LIBOBJS="$gl_LIBOBJS getcwd.$ac_objext"
20026
20027
20028
20029
20030 :
20031
20032 fi
20033
20034
20035 cat >>confdefs.h <<_ACEOF
20036 #define GNULIB_GETCWD 1
20037 _ACEOF
20038
20039
20040
20041
20042
20043
20044
20045 GNULIB_GETCWD=1
20046
20047
20048
20049
20050
20051 $as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
20052
20053
20054
20055
20056
20057
20058
20059
20060 case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
20061 *yes,yes) ;;
20062 *)
20063 REPLACE_GETCWD=1
20064 ;;
20065 esac
20066
20067 if test $REPLACE_GETCWD = 1; then
20068
20069
20070
20071
20072
20073
20074
20075
20076 gl_LIBOBJS="$gl_LIBOBJS getcwd-lgpl.$ac_objext"
20077
20078 fi
20079
20080
20081
20082
20083
20084 GNULIB_GETCWD=1
20085
20086
20087
20088
20089
20090 $as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
20091
20092
20093
20094
20095
20096
20097
20098
20099 if test $ac_cv_func_getdtablesize = yes &&
20100 test $ac_cv_have_decl_getdtablesize = yes; then
20101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
20102 $as_echo_n "checking whether getdtablesize works... " >&6; }
20103 if ${gl_cv_func_getdtablesize_works+:} false; then :
20104 $as_echo_n "(cached) " >&6
20105 else
20106 case "$host_os" in
20107 vms*) gl_cv_func_getdtablesize_works="no (limitation)" ;;
20108 *)
20109 if test "$cross_compiling" = yes; then :
20110 case "$host_os" in
20111 cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
20112 gl_cv_func_getdtablesize_works="guessing no" ;;
20113 *) gl_cv_func_getdtablesize_works="guessing yes" ;;
20114 esac
20115
20116 else
20117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20118 /* end confdefs.h. */
20119
20120 #include <unistd.h>
20121 int
20122 main ()
20123 {
20124 int size = getdtablesize();
20125 if (dup2 (0, getdtablesize()) != -1)
20126 return 1;
20127 if (size != getdtablesize())
20128 return 2;
20129
20130 ;
20131 return 0;
20132 }
20133 _ACEOF
20134 if ac_fn_c_try_run "$LINENO"; then :
20135 gl_cv_func_getdtablesize_works=yes
20136 else
20137 gl_cv_func_getdtablesize_works=no
20138 fi
20139 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20140 conftest.$ac_objext conftest.beam conftest.$ac_ext
20141 fi
20142
20143 ;;
20144 esac
20145
20146 fi
20147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
20148 $as_echo "$gl_cv_func_getdtablesize_works" >&6; }
20149 case "$gl_cv_func_getdtablesize_works" in
20150 *yes | "no (limitation)") ;;
20151 *) REPLACE_GETDTABLESIZE=1 ;;
20152 esac
20153 else
20154 HAVE_GETDTABLESIZE=0
20155 fi
20156
20157 if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
20158
20159
20160
20161
20162
20163
20164
20165
20166 gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
20167
20168 :
20169 fi
20170
20171
20172
20173
20174
20175 GNULIB_GETDTABLESIZE=1
20176
20177
20178
20179
20180
20181 $as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
20182
20183
20184
20185
20186
20187
20188
20189
20190
20191 if test $ac_cv_have_decl_getlogin_r = no; then
20192 HAVE_DECL_GETLOGIN_R=0
20193 fi
20194
20195
20196 if test $ac_cv_func_getlogin_r = no; then
20197 HAVE_GETLOGIN_R=0
20198 else
20199 HAVE_GETLOGIN_R=1
20200
20201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getlogin_r works with small buffers" >&5
20202 $as_echo_n "checking whether getlogin_r works with small buffers... " >&6; }
20203 if ${gl_cv_func_getlogin_r_works+:} false; then :
20204 $as_echo_n "(cached) " >&6
20205 else
20206
20207 case "$host_os" in
20208 # Guess no on Mac OS X, OSF/1.
20209 darwin* | osf*) gl_cv_func_getlogin_r_works="guessing no" ;;
20210 # Guess yes otherwise.
20211 *) gl_cv_func_getlogin_r_works="guessing yes" ;;
20212 esac
20213 if test "$cross_compiling" = yes; then :
20214 :
20215 else
20216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20217 /* end confdefs.h. */
20218
20219 #include <stddef.h>
20220 #include <string.h>
20221 #include <unistd.h>
20222 #if !HAVE_DECL_GETLOGIN_R
20223 extern
20224 # ifdef __cplusplus
20225 "C"
20226 # endif
20227 int getlogin_r (char *, size_t);
20228 #endif
20229 int
20230 main (void)
20231 {
20232 int result = 0;
20233 char buf[100];
20234
20235 if (getlogin_r (buf, 0) == 0)
20236 result |= 1;
20237 if (getlogin_r (buf, 1) == 0)
20238 result |= 2;
20239 if (getlogin_r (buf, 100) == 0)
20240 {
20241 size_t n = strlen (buf);
20242 if (getlogin_r (buf, n) == 0)
20243 result |= 4;
20244 }
20245 return result;
20246 }
20247 _ACEOF
20248 if ac_fn_c_try_run "$LINENO"; then :
20249 gl_cv_func_getlogin_r_works=yes
20250 else
20251 gl_cv_func_getlogin_r_works=no
20252 fi
20253 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20254 conftest.$ac_objext conftest.beam conftest.$ac_ext
20255 fi
20256
20257
20258 fi
20259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getlogin_r_works" >&5
20260 $as_echo "$gl_cv_func_getlogin_r_works" >&6; }
20261 case "$gl_cv_func_getlogin_r_works" in
20262 *yes) ;;
20263 *) REPLACE_GETLOGIN_R=1 ;;
20264 esac
20265 fi
20266
20267 if test $HAVE_GETLOGIN_R = 0 || test $REPLACE_GETLOGIN_R = 1; then
20268
20269
20270
20271
20272
20273
20274
20275
20276 gl_LIBOBJS="$gl_LIBOBJS getlogin_r.$ac_objext"
20277
20278
20279
20280
20281 fi
20282
20283
20284
20285
20286
20287 GNULIB_GETLOGIN_R=1
20288
20289
20290
20291
20292
20293 $as_echo "#define GNULIB_TEST_GETLOGIN_R 1" >>confdefs.h
20294
20295
20296
20297
20298
20299
20300
20301 ac_found=0
20302 ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
20303 "
20304 if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
20305 ac_have_decl=1
20306 else
20307 ac_have_decl=0
20308 fi
20309
20310 cat >>confdefs.h <<_ACEOF
20311 #define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
20312 _ACEOF
20313 if test $ac_have_decl = 1; then :
20314 ac_found=1
20315 fi
20316
20317 ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
20318 "
20319 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
20320 ac_have_decl=1
20321 else
20322 ac_have_decl=0
20323 fi
20324
20325 cat >>confdefs.h <<_ACEOF
20326 #define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
20327 _ACEOF
20328 if test $ac_have_decl = 1; then :
20329 ac_found=1
20330 fi
20331
20332 ac_fn_c_check_decl "$LINENO" "__argv" "ac_cv_have_decl___argv" "#include <stdlib.h>
20333 "
20334 if test "x$ac_cv_have_decl___argv" = xyes; then :
20335 ac_have_decl=1
20336 else
20337 ac_have_decl=0
20338 fi
20339
20340 cat >>confdefs.h <<_ACEOF
20341 #define HAVE_DECL___ARGV $ac_have_decl
20342 _ACEOF
20343 if test $ac_have_decl = 1; then :
20344 ac_found=1
20345 fi
20346
20347
20348 # Incur the cost of this test only if none of the above worked.
20349 if test $ac_found = 0; then
20350 # On OpenBSD 5.1, using the global __progname variable appears to be
20351 # the only way to implement getprogname.
20352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __progname is defined in default libraries" >&5
20353 $as_echo_n "checking whether __progname is defined in default libraries... " >&6; }
20354 if ${gl_cv_var___progname+:} false; then :
20355 $as_echo_n "(cached) " >&6
20356 else
20357
20358 gl_cv_var___progname=
20359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20360 /* end confdefs.h. */
20361 extern char *__progname;
20362 int
20363 main ()
20364 {
20365 return *__progname;
20366
20367 ;
20368 return 0;
20369 }
20370 _ACEOF
20371 if ac_fn_c_try_link "$LINENO"; then :
20372 gl_cv_var___progname=yes
20373
20374 fi
20375 rm -f core conftest.err conftest.$ac_objext \
20376 conftest$ac_exeext conftest.$ac_ext
20377
20378
20379 fi
20380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var___progname" >&5
20381 $as_echo "$gl_cv_var___progname" >&6; }
20382 if test "$gl_cv_var___progname" = yes; then
20383
20384 $as_echo "#define HAVE_VAR___PROGNAME 1" >>confdefs.h
20385
20386 fi
20387 fi
20388
20389
20390
20391
20392
20393
20394
20395
20396
20397
20398 gl_gettimeofday_timezone=void
20399 if test $ac_cv_func_gettimeofday != yes; then
20400 HAVE_GETTIMEOFDAY=0
20401 else
20402
20403
20404
20405
20406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
20407 $as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
20408 if ${gl_cv_func_gettimeofday_clobber+:} false; then :
20409 $as_echo_n "(cached) " >&6
20410 else
20411 if test "$cross_compiling" = yes; then :
20412 # When cross-compiling:
20413 case "$host_os" in
20414 # Guess all is fine on glibc systems.
20415 *-gnu* | gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
20416 # Guess all is fine on musl systems.
20417 *-musl*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
20418 # Guess no on native Windows.
20419 mingw*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
20420 # If we don't know, obey --enable-cross-guesses.
20421 *) gl_cv_func_gettimeofday_clobber="$gl_cross_guess_inverted" ;;
20422 esac
20423
20424 else
20425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20426 /* end confdefs.h. */
20427 #include <string.h>
20428 #include <sys/time.h>
20429 #include <time.h>
20430 #include <stdlib.h>
20431
20432 int
20433 main ()
20434 {
20435
20436 time_t t = 0;
20437 struct tm *lt;
20438 struct tm saved_lt;
20439 struct timeval tv;
20440 lt = localtime (&t);
20441 saved_lt = *lt;
20442 gettimeofday (&tv, NULL);
20443 return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
20444
20445 ;
20446 return 0;
20447 }
20448 _ACEOF
20449 if ac_fn_c_try_run "$LINENO"; then :
20450 gl_cv_func_gettimeofday_clobber=no
20451 else
20452 gl_cv_func_gettimeofday_clobber=yes
20453 fi
20454 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20455 conftest.$ac_objext conftest.beam conftest.$ac_ext
20456 fi
20457
20458 fi
20459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
20460 $as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
20461
20462 case "$gl_cv_func_gettimeofday_clobber" in
20463 *yes)
20464 REPLACE_GETTIMEOFDAY=1
20465
20466 $as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
20467
20468
20469
20470
20471 NEED_LOCALTIME_BUFFER=1
20472 REPLACE_GMTIME=1
20473 REPLACE_LOCALTIME=1
20474
20475 ;;
20476 esac
20477
20478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
20479 $as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
20480 if ${gl_cv_func_gettimeofday_posix_signature+:} false; then :
20481 $as_echo_n "(cached) " >&6
20482 else
20483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20484 /* end confdefs.h. */
20485 #include <sys/time.h>
20486 struct timeval c;
20487 int gettimeofday (struct timeval *restrict, void *restrict);
20488
20489 int
20490 main ()
20491 {
20492 /* glibc uses struct timezone * rather than the POSIX void *
20493 if _GNU_SOURCE is defined. However, since the only portable
20494 use of gettimeofday uses NULL as the second parameter, and
20495 since the glibc definition is actually more typesafe, it is
20496 not worth wrapping this to get a compliant signature. */
20497 int (*f) (struct timeval *restrict, void *restrict)
20498 = gettimeofday;
20499 int x = f (&c, 0);
20500 return !(x | c.tv_sec | c.tv_usec);
20501
20502 ;
20503 return 0;
20504 }
20505 _ACEOF
20506 if ac_fn_c_try_compile "$LINENO"; then :
20507 gl_cv_func_gettimeofday_posix_signature=yes
20508 else
20509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20510 /* end confdefs.h. */
20511 #include <sys/time.h>
20512 int gettimeofday (struct timeval *restrict, struct timezone *restrict);
20513
20514 int
20515 main ()
20516 {
20517
20518 ;
20519 return 0;
20520 }
20521 _ACEOF
20522 if ac_fn_c_try_compile "$LINENO"; then :
20523 gl_cv_func_gettimeofday_posix_signature=almost
20524 else
20525 gl_cv_func_gettimeofday_posix_signature=no
20526 fi
20527 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20528 fi
20529 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20530 fi
20531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
20532 $as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
20533 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
20534 gl_gettimeofday_timezone='struct timezone'
20535 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
20536 REPLACE_GETTIMEOFDAY=1
20537 fi
20538 if test $REPLACE_STRUCT_TIMEVAL = 1; then
20539 REPLACE_GETTIMEOFDAY=1
20540 fi
20541 case "$host_os" in
20542 mingw*) REPLACE_GETTIMEOFDAY=1 ;;
20543 esac
20544 fi
20545
20546 cat >>confdefs.h <<_ACEOF
20547 #define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
20548 _ACEOF
20549
20550
20551 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
20552
20553
20554
20555
20556
20557
20558
20559
20560 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
20561
20562 :
20563 fi
20564
20565
20566
20567
20568
20569 GNULIB_GETTIMEOFDAY=1
20570
20571
20572
20573
20574
20575 $as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
20576
20577
20578
20579
20580
20581
20582
20583 if test $ac_cv_func_glob = no; then
20584 HAVE_GLOB=0
20585 else
20586
20587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU glob interface version 1 or 2" >&5
20588 $as_echo_n "checking for GNU glob interface version 1 or 2... " >&6; }
20589 if ${gl_cv_gnu_glob_interface_version_1_2+:} false; then :
20590 $as_echo_n "(cached) " >&6
20591 else
20592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20593 /* end confdefs.h. */
20594 #include <gnu-versions.h>
20595 char a[_GNU_GLOB_INTERFACE_VERSION == 1 || _GNU_GLOB_INTERFACE_VERSION == 2 ? 1 : -1];
20596 _ACEOF
20597 if ac_fn_c_try_compile "$LINENO"; then :
20598 gl_cv_gnu_glob_interface_version_1_2=yes
20599 else
20600 gl_cv_gnu_glob_interface_version_1_2=no
20601 fi
20602 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20603 fi
20604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_gnu_glob_interface_version_1_2" >&5
20605 $as_echo "$gl_cv_gnu_glob_interface_version_1_2" >&6; }
20606 if test "$gl_cv_gnu_glob_interface_version_1_2" = "no"; then
20607 REPLACE_GLOB=1
20608 fi
20609
20610 if test $REPLACE_GLOB = 0; then
20611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether glob lists broken symlinks" >&5
20612 $as_echo_n "checking whether glob lists broken symlinks... " >&6; }
20613 if ${gl_cv_glob_lists_symlinks+:} false; then :
20614 $as_echo_n "(cached) " >&6
20615 else
20616 if test $cross_compiling != yes; then
20617 if ln -s conf-doesntexist conf$$-globtest 2>/dev/null; then
20618 gl_cv_glob_lists_symlinks=maybe
20619 else
20620 # If we can't make a symlink, then we cannot test this issue. Be
20621 # pessimistic about this.
20622 gl_cv_glob_lists_symlinks=no
20623 fi
20624 if test $gl_cv_glob_lists_symlinks = maybe; then
20625 if test "$cross_compiling" = yes; then :
20626 :
20627
20628 else
20629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20630 /* end confdefs.h. */
20631 #include <stddef.h>
20632 #include <glob.h>
20633 int
20634 main ()
20635 {
20636 glob_t found;
20637 if (glob ("conf*-globtest", 0, NULL, &found) == GLOB_NOMATCH)
20638 return 1;
20639
20640 ;
20641 return 0;
20642 }
20643 _ACEOF
20644 if ac_fn_c_try_run "$LINENO"; then :
20645 gl_cv_glob_lists_symlinks=yes
20646 else
20647 gl_cv_glob_lists_symlinks=no
20648 fi
20649 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20650 conftest.$ac_objext conftest.beam conftest.$ac_ext
20651 fi
20652
20653 fi
20654 rm -f conf$$-globtest
20655 else
20656 gl_cv_glob_lists_symlinks="$gl_cross_guess_normal"
20657 fi
20658
20659 fi
20660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_glob_lists_symlinks" >&5
20661 $as_echo "$gl_cv_glob_lists_symlinks" >&6; }
20662 case "$gl_cv_glob_lists_symlinks" in
20663 *yes) ;;
20664 *) REPLACE_GLOB=1 ;;
20665 esac
20666 fi
20667
20668 fi
20669
20670 if test $ac_cv_func_glob_pattern_p = no; then
20671 HAVE_GLOB_PATTERN_P=0
20672 else
20673 if test $REPLACE_GLOB = 1; then
20674 REPLACE_GLOB_PATTERN_P=1
20675 fi
20676 fi
20677
20678 if test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1; then
20679
20680
20681 GLOB_H='glob.h'
20682 if test -n "$GLOB_H"; then
20683 GL_GENERATE_GLOB_H_TRUE=
20684 GL_GENERATE_GLOB_H_FALSE='#'
20685 else
20686 GL_GENERATE_GLOB_H_TRUE='#'
20687 GL_GENERATE_GLOB_H_FALSE=
20688 fi
20689
20690
20691 fi
20692
20693 if test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1; then
20694
20695
20696
20697
20698
20699
20700
20701
20702 gl_LIBOBJS="$gl_LIBOBJS glob.$ac_objext"
20703
20704
20705
20706
20707
20708
20709
20710
20711
20712 gl_LIBOBJS="$gl_LIBOBJS globfree.$ac_objext"
20713
20714
20715
20716
20717
20718
20719 fi
20720 if test $HAVE_GLOB_PATTERN_P = 0 || test $REPLACE_GLOB_PATTERN_P = 1; then
20721
20722
20723
20724
20725
20726
20727
20728
20729 gl_LIBOBJS="$gl_LIBOBJS glob_pattern_p.$ac_objext"
20730
20731 fi
20732
20733
20734
20735
20736
20737 GNULIB_GLOB=1
20738
20739
20740
20741
20742
20743 $as_echo "#define GNULIB_TEST_GLOB 1" >>confdefs.h
20744
20745
20746
20747
20748
20749 LIB_HARD_LOCALE="$LIB_SETLOCALE_NULL"
20750
20751
20752
20753
20754
20755
20756
20757
20758 HAVE_INET_NTOP=1
20759 INET_NTOP_LIB=
20760
20761
20762
20763
20764 if test $ac_cv_header_sys_socket_h != yes; then
20765 for ac_header in winsock2.h
20766 do :
20767 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
20768 if test "x$ac_cv_header_winsock2_h" = xyes; then :
20769 cat >>confdefs.h <<_ACEOF
20770 #define HAVE_WINSOCK2_H 1
20771 _ACEOF
20772
20773 fi
20774
20775 done
20776
20777 fi
20778 if test "$ac_cv_header_winsock2_h" = yes; then
20779 HAVE_WINSOCK2_H=1
20780 UNISTD_H_HAVE_WINSOCK2_H=1
20781 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
20782 else
20783 HAVE_WINSOCK2_H=0
20784 fi
20785
20786
20787 if test $HAVE_WINSOCK2_H = 1; then
20788 REPLACE_INET_NTOP=1
20789 ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <ws2tcpip.h>
20790 "
20791 if test "x$ac_cv_have_decl_inet_ntop" = xyes; then :
20792 ac_have_decl=1
20793 else
20794 ac_have_decl=0
20795 fi
20796
20797 cat >>confdefs.h <<_ACEOF
20798 #define HAVE_DECL_INET_NTOP $ac_have_decl
20799 _ACEOF
20800
20801 if test $ac_cv_have_decl_inet_ntop = yes; then
20802 INET_NTOP_LIB="-lws2_32"
20803 else
20804 HAVE_DECL_INET_NTOP=0
20805 fi
20806 else
20807 gl_save_LIBS=$LIBS
20808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5
20809 $as_echo_n "checking for library containing inet_ntop... " >&6; }
20810 if ${ac_cv_search_inet_ntop+:} false; then :
20811 $as_echo_n "(cached) " >&6
20812 else
20813 ac_func_search_save_LIBS=$LIBS
20814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20815 /* end confdefs.h. */
20816
20817 /* Override any GCC internal prototype to avoid an error.
20818 Use char because int might match the return type of a GCC
20819 builtin and then its argument prototype would still apply. */
20820 #ifdef __cplusplus
20821 extern "C"
20822 #endif
20823 char inet_ntop ();
20824 int
20825 main ()
20826 {
20827 return inet_ntop ();
20828 ;
20829 return 0;
20830 }
20831 _ACEOF
20832 for ac_lib in '' nsl resolv network; do
20833 if test -z "$ac_lib"; then
20834 ac_res="none required"
20835 else
20836 ac_res=-l$ac_lib
20837 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
20838 fi
20839 if ac_fn_c_try_link "$LINENO"; then :
20840 ac_cv_search_inet_ntop=$ac_res
20841 fi
20842 rm -f core conftest.err conftest.$ac_objext \
20843 conftest$ac_exeext
20844 if ${ac_cv_search_inet_ntop+:} false; then :
20845 break
20846 fi
20847 done
20848 if ${ac_cv_search_inet_ntop+:} false; then :
20849
20850 else
20851 ac_cv_search_inet_ntop=no
20852 fi
20853 rm conftest.$ac_ext
20854 LIBS=$ac_func_search_save_LIBS
20855 fi
20856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5
20857 $as_echo "$ac_cv_search_inet_ntop" >&6; }
20858 ac_res=$ac_cv_search_inet_ntop
20859 if test "$ac_res" != no; then :
20860 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20861
20862 else
20863 for ac_func in inet_ntop
20864 do :
20865 ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
20866 if test "x$ac_cv_func_inet_ntop" = xyes; then :
20867 cat >>confdefs.h <<_ACEOF
20868 #define HAVE_INET_NTOP 1
20869 _ACEOF
20870
20871 fi
20872 done
20873
20874 if test $ac_cv_func_inet_ntop = no; then
20875 HAVE_INET_NTOP=0
20876 fi
20877
20878 fi
20879
20880 LIBS=$gl_save_LIBS
20881
20882 if test "$ac_cv_search_inet_ntop" != "no" \
20883 && test "$ac_cv_search_inet_ntop" != "none required"; then
20884 INET_NTOP_LIB="$ac_cv_search_inet_ntop"
20885 fi
20886
20887
20888 ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <arpa/inet.h>
20889 #if HAVE_NETDB_H
20890 # include <netdb.h>
20891 #endif
20892
20893 "
20894 if test "x$ac_cv_have_decl_inet_ntop" = xyes; then :
20895 ac_have_decl=1
20896 else
20897 ac_have_decl=0
20898 fi
20899
20900 cat >>confdefs.h <<_ACEOF
20901 #define HAVE_DECL_INET_NTOP $ac_have_decl
20902 _ACEOF
20903
20904 if test $ac_cv_have_decl_inet_ntop = no; then
20905 HAVE_DECL_INET_NTOP=0
20906 fi
20907 fi
20908
20909
20910 if test $HAVE_INET_NTOP = 0 || test $REPLACE_INET_NTOP = 1; then
20911
20912
20913
20914
20915
20916
20917
20918
20919 gl_LIBOBJS="$gl_LIBOBJS inet_ntop.$ac_objext"
20920
20921
20922
20923
20924 fi
20925
20926
20927
20928
20929
20930 GNULIB_INET_NTOP=1
20931
20932
20933
20934
20935
20936
20937
20938
20939
20940 PRIPTR_PREFIX=
20941 if test -n "$STDINT_H"; then
20942 PRIPTR_PREFIX='"l"'
20943 else
20944 for glpfx in '' l ll I64; do
20945 case $glpfx in
20946 '') gltype1='int';;
20947 l) gltype1='long int';;
20948 ll) gltype1='long long int';;
20949 I64) gltype1='__int64';;
20950 esac
20951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20952 /* end confdefs.h. */
20953 #include <stdint.h>
20954 extern intptr_t foo;
20955 extern $gltype1 foo;
20956 int
20957 main ()
20958 {
20959
20960 ;
20961 return 0;
20962 }
20963 _ACEOF
20964 if ac_fn_c_try_compile "$LINENO"; then :
20965 PRIPTR_PREFIX='"'$glpfx'"'
20966 fi
20967 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20968 test -n "$PRIPTR_PREFIX" && break
20969 done
20970 fi
20971
20972
20973
20974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
20975 $as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
20976 if ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+:} false; then :
20977 $as_echo_n "(cached) " >&6
20978 else
20979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20980 /* end confdefs.h. */
20981 /* Work also in C++ mode. */
20982 #define __STDC_LIMIT_MACROS 1
20983
20984 /* Work if build is not clean. */
20985 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
20986
20987 #include <limits.h>
20988 #if HAVE_STDINT_H
20989 #include <stdint.h>
20990 #endif
20991
20992 #if defined INT32_MAX && defined INTMAX_MAX
20993 #define CONDITION (INT32_MAX < INTMAX_MAX)
20994 #else
20995 #define CONDITION (sizeof (int) < sizeof (long long int))
20996 #endif
20997 int test[CONDITION ? 1 : -1];
20998 int
20999 main ()
21000 {
21001
21002 ;
21003 return 0;
21004 }
21005 _ACEOF
21006 if ac_fn_c_try_compile "$LINENO"; then :
21007 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
21008 else
21009 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
21010 fi
21011 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21012 fi
21013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
21014 $as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
21015 if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
21016 INT32_MAX_LT_INTMAX_MAX=1;
21017 else
21018 INT32_MAX_LT_INTMAX_MAX=0;
21019 fi
21020
21021
21022 if test $APPLE_UNIVERSAL_BUILD = 0; then
21023
21024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
21025 $as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; }
21026 if ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+:} false; then :
21027 $as_echo_n "(cached) " >&6
21028 else
21029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21030 /* end confdefs.h. */
21031 /* Work also in C++ mode. */
21032 #define __STDC_LIMIT_MACROS 1
21033
21034 /* Work if build is not clean. */
21035 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
21036
21037 #include <limits.h>
21038 #if HAVE_STDINT_H
21039 #include <stdint.h>
21040 #endif
21041
21042 #if defined INT64_MAX
21043 #define CONDITION (INT64_MAX == LONG_MAX)
21044 #else
21045 #define CONDITION (sizeof (long long int) == sizeof (long int))
21046 #endif
21047 int test[CONDITION ? 1 : -1];
21048 int
21049 main ()
21050 {
21051
21052 ;
21053 return 0;
21054 }
21055 _ACEOF
21056 if ac_fn_c_try_compile "$LINENO"; then :
21057 gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
21058 else
21059 gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
21060 fi
21061 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21062 fi
21063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
21064 $as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
21065 if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
21066 INT64_MAX_EQ_LONG_MAX=1;
21067 else
21068 INT64_MAX_EQ_LONG_MAX=0;
21069 fi
21070
21071
21072 else
21073 INT64_MAX_EQ_LONG_MAX=-1
21074 fi
21075
21076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
21077 $as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
21078 if ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+:} false; then :
21079 $as_echo_n "(cached) " >&6
21080 else
21081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21082 /* end confdefs.h. */
21083 /* Work also in C++ mode. */
21084 #define __STDC_LIMIT_MACROS 1
21085
21086 /* Work if build is not clean. */
21087 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
21088
21089 #include <limits.h>
21090 #if HAVE_STDINT_H
21091 #include <stdint.h>
21092 #endif
21093
21094 #if defined UINT32_MAX && defined UINTMAX_MAX
21095 #define CONDITION (UINT32_MAX < UINTMAX_MAX)
21096 #else
21097 #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
21098 #endif
21099 int test[CONDITION ? 1 : -1];
21100 int
21101 main ()
21102 {
21103
21104 ;
21105 return 0;
21106 }
21107 _ACEOF
21108 if ac_fn_c_try_compile "$LINENO"; then :
21109 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
21110 else
21111 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
21112 fi
21113 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21114 fi
21115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
21116 $as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
21117 if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
21118 UINT32_MAX_LT_UINTMAX_MAX=1;
21119 else
21120 UINT32_MAX_LT_UINTMAX_MAX=0;
21121 fi
21122
21123
21124 if test $APPLE_UNIVERSAL_BUILD = 0; then
21125
21126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
21127 $as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
21128 if ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+:} false; then :
21129 $as_echo_n "(cached) " >&6
21130 else
21131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21132 /* end confdefs.h. */
21133 /* Work also in C++ mode. */
21134 #define __STDC_LIMIT_MACROS 1
21135
21136 /* Work if build is not clean. */
21137 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
21138
21139 #include <limits.h>
21140 #if HAVE_STDINT_H
21141 #include <stdint.h>
21142 #endif
21143
21144 #if defined UINT64_MAX
21145 #define CONDITION (UINT64_MAX == ULONG_MAX)
21146 #else
21147 #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
21148 #endif
21149 int test[CONDITION ? 1 : -1];
21150 int
21151 main ()
21152 {
21153
21154 ;
21155 return 0;
21156 }
21157 _ACEOF
21158 if ac_fn_c_try_compile "$LINENO"; then :
21159 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
21160 else
21161 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
21162 fi
21163 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21164 fi
21165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
21166 $as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
21167 if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
21168 UINT64_MAX_EQ_ULONG_MAX=1;
21169 else
21170 UINT64_MAX_EQ_ULONG_MAX=0;
21171 fi
21172
21173
21174 else
21175 UINT64_MAX_EQ_ULONG_MAX=-1
21176 fi
21177
21178
21179
21180
21181
21182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
21183 $as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; }
21184 if ${gl_cv_func_isnand_no_libm+:} false; then :
21185 $as_echo_n "(cached) " >&6
21186 else
21187
21188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21189 /* end confdefs.h. */
21190 #include <math.h>
21191 #if __GNUC__ >= 4
21192 # undef isnand
21193 # define isnand(x) __builtin_isnan ((double)(x))
21194 #else
21195 # undef isnand
21196 # define isnand(x) isnan ((double)(x))
21197 #endif
21198 double x;
21199 int
21200 main ()
21201 {
21202 return isnand (x);
21203 ;
21204 return 0;
21205 }
21206 _ACEOF
21207 if ac_fn_c_try_link "$LINENO"; then :
21208 gl_cv_func_isnand_no_libm=yes
21209 else
21210 gl_cv_func_isnand_no_libm=no
21211 fi
21212 rm -f core conftest.err conftest.$ac_objext \
21213 conftest$ac_exeext conftest.$ac_ext
21214
21215 fi
21216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
21217 $as_echo "$gl_cv_func_isnand_no_libm" >&6; }
21218
21219 gl_func_isnand_no_libm=$gl_cv_func_isnand_no_libm
21220 if test $gl_cv_func_isnand_no_libm = yes; then
21221
21222 $as_echo "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h
21223
21224 fi
21225
21226 if test $gl_func_isnand_no_libm != yes; then
21227
21228
21229
21230
21231
21232
21233
21234
21235 gl_LIBOBJS="$gl_LIBOBJS isnand.$ac_objext"
21236
21237
21238
21239
21240 fi
21241
21242
21243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
21244 $as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; }
21245 if ${gl_cv_func_isnanl_no_libm+:} false; then :
21246 $as_echo_n "(cached) " >&6
21247 else
21248
21249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21250 /* end confdefs.h. */
21251 #include <math.h>
21252 #if __GNUC__ >= 4
21253 # undef isnanl
21254 # define isnanl(x) __builtin_isnanl ((long double)(x))
21255 #elif defined isnan
21256 # undef isnanl
21257 # define isnanl(x) isnan ((long double)(x))
21258 #endif
21259 long double x;
21260 int
21261 main ()
21262 {
21263 return isnanl (x);
21264 ;
21265 return 0;
21266 }
21267 _ACEOF
21268 if ac_fn_c_try_link "$LINENO"; then :
21269 gl_cv_func_isnanl_no_libm=yes
21270 else
21271 gl_cv_func_isnanl_no_libm=no
21272 fi
21273 rm -f core conftest.err conftest.$ac_objext \
21274 conftest$ac_exeext conftest.$ac_ext
21275
21276 fi
21277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
21278 $as_echo "$gl_cv_func_isnanl_no_libm" >&6; }
21279
21280 gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm
21281 if test $gl_func_isnanl_no_libm = yes; then
21282
21283
21284
21285
21286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
21287 $as_echo_n "checking whether isnanl works... " >&6; }
21288 if ${gl_cv_func_isnanl_works+:} false; then :
21289 $as_echo_n "(cached) " >&6
21290 else
21291
21292 if test "$cross_compiling" = yes; then :
21293 case "$host_os" in
21294 mingw*) # Guess yes on mingw, no on MSVC.
21295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21296 /* end confdefs.h. */
21297
21298 #ifdef __MINGW32__
21299 Known
21300 #endif
21301
21302 _ACEOF
21303 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21304 $EGREP "Known" >/dev/null 2>&1; then :
21305 gl_cv_func_isnanl_works="guessing yes"
21306 else
21307 gl_cv_func_isnanl_works="guessing no"
21308 fi
21309 rm -f conftest*
21310
21311 ;;
21312 *) gl_cv_func_isnanl_works="guessing yes" ;;
21313 esac
21314
21315 else
21316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21317 /* end confdefs.h. */
21318
21319 #include <float.h>
21320 #include <limits.h>
21321 #include <math.h>
21322 #if __GNUC__ >= 4
21323 # undef isnanl
21324 # define isnanl(x) __builtin_isnanl ((long double)(x))
21325 #elif defined isnan
21326 # undef isnanl
21327 # define isnanl(x) isnan ((long double)(x))
21328 #endif
21329 #define NWORDS \
21330 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
21331 typedef union { unsigned int word[NWORDS]; long double value; }
21332 memory_long_double;
21333 /* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
21334 runtime type conversion. */
21335 #ifdef __sgi
21336 static long double NaNl ()
21337 {
21338 double zero = 0.0;
21339 return zero / zero;
21340 }
21341 #else
21342 # define NaNl() (0.0L / 0.0L)
21343 #endif
21344 int main ()
21345 {
21346 int result = 0;
21347
21348 if (!isnanl (NaNl ()))
21349 result |= 1;
21350
21351 {
21352 memory_long_double m;
21353 unsigned int i;
21354
21355 /* The isnanl function should be immune against changes in the sign bit and
21356 in the mantissa bits. The xor operation twiddles a bit that can only be
21357 a sign bit or a mantissa bit (since the exponent never extends to
21358 bit 31). */
21359 m.value = NaNl ();
21360 m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
21361 for (i = 0; i < NWORDS; i++)
21362 m.word[i] |= 1;
21363 if (!isnanl (m.value))
21364 result |= 1;
21365 }
21366
21367 #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
21368 /* Representation of an 80-bit 'long double' as an initializer for a sequence
21369 of 'unsigned int' words. */
21370 # ifdef WORDS_BIGENDIAN
21371 # define LDBL80_WORDS(exponent,manthi,mantlo) \
21372 { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
21373 ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \
21374 (unsigned int) (mantlo) << 16 \
21375 }
21376 # else
21377 # define LDBL80_WORDS(exponent,manthi,mantlo) \
21378 { mantlo, manthi, exponent }
21379 # endif
21380 { /* Quiet NaN. */
21381 static memory_long_double x =
21382 { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
21383 if (!isnanl (x.value))
21384 result |= 2;
21385 }
21386 {
21387 /* Signalling NaN. */
21388 static memory_long_double x =
21389 { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
21390 if (!isnanl (x.value))
21391 result |= 2;
21392 }
21393 /* isnanl should return something even for noncanonical values. */
21394 { /* Pseudo-NaN. */
21395 static memory_long_double x =
21396 { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
21397 if (isnanl (x.value) && !isnanl (x.value))
21398 result |= 4;
21399 }
21400 { /* Pseudo-Infinity. */
21401 static memory_long_double x =
21402 { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
21403 if (isnanl (x.value) && !isnanl (x.value))
21404 result |= 8;
21405 }
21406 { /* Pseudo-Zero. */
21407 static memory_long_double x =
21408 { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
21409 if (isnanl (x.value) && !isnanl (x.value))
21410 result |= 16;
21411 }
21412 { /* Unnormalized number. */
21413 static memory_long_double x =
21414 { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
21415 if (isnanl (x.value) && !isnanl (x.value))
21416 result |= 32;
21417 }
21418 { /* Pseudo-Denormal. */
21419 static memory_long_double x =
21420 { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
21421 if (isnanl (x.value) && !isnanl (x.value))
21422 result |= 64;
21423 }
21424 #endif
21425
21426 return result;
21427 }
21428 _ACEOF
21429 if ac_fn_c_try_run "$LINENO"; then :
21430 gl_cv_func_isnanl_works=yes
21431 else
21432 gl_cv_func_isnanl_works=no
21433 fi
21434 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21435 conftest.$ac_objext conftest.beam conftest.$ac_ext
21436 fi
21437
21438
21439 fi
21440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
21441 $as_echo "$gl_cv_func_isnanl_works" >&6; }
21442
21443 case "$gl_cv_func_isnanl_works" in
21444 *yes) ;;
21445 *) gl_func_isnanl_no_libm=no ;;
21446 esac
21447 fi
21448 if test $gl_func_isnanl_no_libm = yes; then
21449
21450 $as_echo "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h
21451
21452 fi
21453
21454 if test $gl_func_isnanl_no_libm != yes; then
21455
21456
21457
21458
21459
21460
21461
21462
21463 gl_LIBOBJS="$gl_LIBOBJS isnanl.$ac_objext"
21464
21465
21466
21467
21468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
21469 $as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
21470 if ${gl_cv_cc_long_double_expbit0+:} false; then :
21471 $as_echo_n "(cached) " >&6
21472 else
21473
21474 if test "$cross_compiling" = yes; then :
21475
21476 gl_cv_cc_long_double_expbit0="unknown"
21477 case "$host_os" in
21478 mingw*) # On native Windows (little-endian), we know the result
21479 # in two cases: mingw, MSVC.
21480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21481 /* end confdefs.h. */
21482
21483 #ifdef __MINGW32__
21484 Known
21485 #endif
21486
21487 _ACEOF
21488 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21489 $EGREP "Known" >/dev/null 2>&1; then :
21490 gl_cv_cc_long_double_expbit0="word 2 bit 0"
21491 fi
21492 rm -f conftest*
21493
21494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21495 /* end confdefs.h. */
21496
21497 #ifdef _MSC_VER
21498 Known
21499 #endif
21500
21501 _ACEOF
21502 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21503 $EGREP "Known" >/dev/null 2>&1; then :
21504 gl_cv_cc_long_double_expbit0="word 1 bit 20"
21505 fi
21506 rm -f conftest*
21507
21508 ;;
21509 esac
21510
21511 else
21512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21513 /* end confdefs.h. */
21514
21515 #include <float.h>
21516 #include <stddef.h>
21517 #include <stdio.h>
21518 #include <string.h>
21519 #define NWORDS \
21520 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
21521 typedef union { long double value; unsigned int word[NWORDS]; }
21522 memory_long_double;
21523 static unsigned int ored_words[NWORDS];
21524 static unsigned int anded_words[NWORDS];
21525 static void add_to_ored_words (long double x)
21526 {
21527 memory_long_double m;
21528 size_t i;
21529 /* Clear it first, in case
21530 sizeof (long double) < sizeof (memory_long_double). */
21531 memset (&m, 0, sizeof (memory_long_double));
21532 m.value = x;
21533 for (i = 0; i < NWORDS; i++)
21534 {
21535 ored_words[i] |= m.word[i];
21536 anded_words[i] &= m.word[i];
21537 }
21538 }
21539 int main ()
21540 {
21541 size_t j;
21542 FILE *fp = fopen ("conftest.out", "w");
21543 if (fp == NULL)
21544 return 1;
21545 for (j = 0; j < NWORDS; j++)
21546 anded_words[j] = ~ (unsigned int) 0;
21547 add_to_ored_words (0.25L);
21548 add_to_ored_words (0.5L);
21549 add_to_ored_words (1.0L);
21550 add_to_ored_words (2.0L);
21551 add_to_ored_words (4.0L);
21552 /* Remove bits that are common (e.g. if representation of the first mantissa
21553 bit is explicit). */
21554 for (j = 0; j < NWORDS; j++)
21555 ored_words[j] &= ~anded_words[j];
21556 /* Now find the nonzero word. */
21557 for (j = 0; j < NWORDS; j++)
21558 if (ored_words[j] != 0)
21559 break;
21560 if (j < NWORDS)
21561 {
21562 size_t i;
21563 for (i = j + 1; i < NWORDS; i++)
21564 if (ored_words[i] != 0)
21565 {
21566 fprintf (fp, "unknown");
21567 return (fclose (fp) != 0);
21568 }
21569 for (i = 0; ; i++)
21570 if ((ored_words[j] >> i) & 1)
21571 {
21572 fprintf (fp, "word %d bit %d", (int) j, (int) i);
21573 return (fclose (fp) != 0);
21574 }
21575 }
21576 fprintf (fp, "unknown");
21577 return (fclose (fp) != 0);
21578 }
21579
21580 _ACEOF
21581 if ac_fn_c_try_run "$LINENO"; then :
21582 gl_cv_cc_long_double_expbit0=`cat conftest.out`
21583 else
21584 gl_cv_cc_long_double_expbit0="unknown"
21585 fi
21586 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21587 conftest.$ac_objext conftest.beam conftest.$ac_ext
21588 fi
21589
21590 rm -f conftest.out
21591
21592 fi
21593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
21594 $as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
21595 case "$gl_cv_cc_long_double_expbit0" in
21596 word*bit*)
21597 word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
21598 bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
21599
21600 cat >>confdefs.h <<_ACEOF
21601 #define LDBL_EXPBIT0_WORD $word
21602 _ACEOF
21603
21604
21605 cat >>confdefs.h <<_ACEOF
21606 #define LDBL_EXPBIT0_BIT $bit
21607 _ACEOF
21608
21609 ;;
21610 esac
21611
21612
21613
21614 fi
21615
21616
21617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the __inline keyword" >&5
21618 $as_echo_n "checking whether the compiler supports the __inline keyword... " >&6; }
21619 if ${gl_cv_c___inline+:} false; then :
21620 $as_echo_n "(cached) " >&6
21621 else
21622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21623 /* end confdefs.h. */
21624 typedef int foo_t;
21625 static __inline foo_t foo (void) { return 0; }
21626 int
21627 main ()
21628 {
21629 return foo ();
21630 ;
21631 return 0;
21632 }
21633 _ACEOF
21634 if ac_fn_c_try_compile "$LINENO"; then :
21635 gl_cv_c___inline=yes
21636 else
21637 gl_cv_c___inline=no
21638 fi
21639 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21640 fi
21641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c___inline" >&5
21642 $as_echo "$gl_cv_c___inline" >&6; }
21643 if test $gl_cv_c___inline = yes; then
21644
21645 $as_echo "#define HAVE___INLINE 1" >>confdefs.h
21646
21647 fi
21648
21649
21650
21651
21652
21653 LOCALCHARSET_TESTS_ENVIRONMENT=
21654
21655
21656
21657
21658
21659
21660
21661
21662
21663
21664
21665 case "$host_os" in
21666 solaris*)
21667
21668 $as_echo "#define _LCONV_C99 1" >>confdefs.h
21669
21670 ;;
21671 esac
21672
21673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5
21674 $as_echo_n "checking whether locale.h conforms to POSIX:2001... " >&6; }
21675 if ${gl_cv_header_locale_h_posix2001+:} false; then :
21676 $as_echo_n "(cached) " >&6
21677 else
21678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21679 /* end confdefs.h. */
21680 #include <locale.h>
21681 int x = LC_MESSAGES;
21682 int y = sizeof (((struct lconv *) 0)->decimal_point);
21683 int
21684 main ()
21685 {
21686
21687 ;
21688 return 0;
21689 }
21690 _ACEOF
21691 if ac_fn_c_try_compile "$LINENO"; then :
21692 gl_cv_header_locale_h_posix2001=yes
21693 else
21694 gl_cv_header_locale_h_posix2001=no
21695 fi
21696 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21697 fi
21698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_h_posix2001" >&5
21699 $as_echo "$gl_cv_header_locale_h_posix2001" >&6; }
21700
21701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct lconv is properly defined" >&5
21702 $as_echo_n "checking whether struct lconv is properly defined... " >&6; }
21703 if ${gl_cv_sys_struct_lconv_ok+:} false; then :
21704 $as_echo_n "(cached) " >&6
21705 else
21706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21707 /* end confdefs.h. */
21708 #include <locale.h>
21709 struct lconv l;
21710 int x = sizeof (l.decimal_point);
21711 int y = sizeof (l.int_p_cs_precedes);
21712 int
21713 main ()
21714 {
21715
21716 ;
21717 return 0;
21718 }
21719 _ACEOF
21720 if ac_fn_c_try_compile "$LINENO"; then :
21721 gl_cv_sys_struct_lconv_ok=yes
21722 else
21723 gl_cv_sys_struct_lconv_ok=no
21724 fi
21725 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21726
21727 fi
21728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_lconv_ok" >&5
21729 $as_echo "$gl_cv_sys_struct_lconv_ok" >&6; }
21730 if test $gl_cv_sys_struct_lconv_ok = no; then
21731 case "$host_os" in
21732 mingw*)
21733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21734 /* end confdefs.h. */
21735
21736 #ifdef _MSC_VER
21737 Special
21738 #endif
21739
21740 _ACEOF
21741 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21742 $EGREP "Special" >/dev/null 2>&1; then :
21743
21744 else
21745 REPLACE_STRUCT_LCONV=1
21746 fi
21747 rm -f conftest*
21748
21749 ;;
21750 *) REPLACE_STRUCT_LCONV=1 ;;
21751 esac
21752 fi
21753
21754
21755
21756
21757
21758
21759
21760
21761
21762 if test $gl_cv_have_include_next = yes; then
21763 gl_cv_next_locale_h='<'locale.h'>'
21764 else
21765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <locale.h>" >&5
21766 $as_echo_n "checking absolute name of <locale.h>... " >&6; }
21767 if ${gl_cv_next_locale_h+:} false; then :
21768 $as_echo_n "(cached) " >&6
21769 else
21770
21771
21772
21773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21774 /* end confdefs.h. */
21775 #include <locale.h>
21776 _ACEOF
21777 case "$host_os" in
21778 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21779 *) gl_absname_cpp="$ac_cpp" ;;
21780 esac
21781
21782 case "$host_os" in
21783 mingw*)
21784 gl_dirsep_regex='[/\\]'
21785 ;;
21786 *)
21787 gl_dirsep_regex='\/'
21788 ;;
21789 esac
21790 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21791 gl_header_literal_regex=`echo 'locale.h' \
21792 | sed -e "$gl_make_literal_regex_sed"`
21793 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21794 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21795 s|^/[^/]|//&|
21796 p
21797 q
21798 }'
21799
21800 gl_cv_absolute_locale_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21801 sed -n "$gl_absolute_header_sed"`
21802
21803 gl_header=$gl_cv_absolute_locale_h
21804 gl_cv_next_locale_h='"'$gl_header'"'
21805
21806
21807 fi
21808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_locale_h" >&5
21809 $as_echo "$gl_cv_next_locale_h" >&6; }
21810 fi
21811 NEXT_LOCALE_H=$gl_cv_next_locale_h
21812
21813 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21814 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21815 gl_next_as_first_directive='<'locale.h'>'
21816 else
21817 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21818 gl_next_as_first_directive=$gl_cv_next_locale_h
21819 fi
21820 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H=$gl_next_as_first_directive
21821
21822
21823
21824
21825
21826
21827
21828
21829
21830
21831
21832
21833
21834
21835
21836
21837
21838
21839 gl_LIBOBJS="$gl_LIBOBJS localtime-buffer.$ac_objext"
21840
21841
21842
21843 if test "$gl_threads_api" = posix; then
21844 # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
21845 # pthread_rwlock_* functions.
21846 has_rwlock=false
21847 ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
21848 "
21849 if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then :
21850 has_rwlock=true
21851
21852 $as_echo "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
21853
21854 fi
21855
21856 if $has_rwlock; then
21857
21858
21859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_rwlock_rdlock prefers a writer to a reader" >&5
21860 $as_echo_n "checking whether pthread_rwlock_rdlock prefers a writer to a reader... " >&6; }
21861 if ${gl_cv_pthread_rwlock_rdlock_prefer_writer+:} false; then :
21862 $as_echo_n "(cached) " >&6
21863 else
21864 save_LIBS="$LIBS"
21865 LIBS="$LIBS $LIBMULTITHREAD"
21866 if test "$cross_compiling" = yes; then :
21867 case "$host_os" in
21868 # Guess no on glibc systems.
21869 *-gnu* | gnu*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
21870 # Guess no on musl systems.
21871 *-musl*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
21872 # Guess no on bionic systems.
21873 *-android*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
21874 # Guess yes on native Windows with the mingw-w64 winpthreads library.
21875 # Guess no on native Windows with the gnulib windows-rwlock module.
21876 mingw*) if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
21877 gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing yes"
21878 else
21879 gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no"
21880 fi
21881 ;;
21882 # If we don't know, obey --enable-cross-guesses.
21883 *) gl_cv_pthread_rwlock_rdlock_prefer_writer="$gl_cross_guess_normal" ;;
21884 esac
21885
21886 else
21887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21888 /* end confdefs.h. */
21889
21890 #include <errno.h>
21891 #include <pthread.h>
21892 #include <stdlib.h>
21893 #include <unistd.h>
21894
21895 #define SUCCEED() exit (0)
21896 #define FAILURE() exit (1)
21897 #define UNEXPECTED(n) (exit (10 + (n)))
21898
21899 /* The main thread creates the waiting writer and the requesting reader threads
21900 in the default way; this guarantees that they have the same priority.
21901 We can reuse the main thread as first reader thread. */
21902
21903 static pthread_rwlock_t lock;
21904 static pthread_t reader1;
21905 static pthread_t writer;
21906 static pthread_t reader2;
21907 static pthread_t timer;
21908 /* Used to pass control from writer to reader2 and from reader2 to timer,
21909 as in a relay race.
21910 Passing control from one running thread to another running thread
21911 is most likely faster than to create the second thread. */
21912 static pthread_mutex_t baton;
21913
21914 static void *
21915 timer_func (void *ignored)
21916 {
21917 /* Step 13 (can be before or after step 12):
21918 The timer thread takes the baton, then waits a moment to make sure
21919 it can tell whether the second reader thread is blocked at step 12. */
21920 if (pthread_mutex_lock (&baton))
21921 UNEXPECTED (13);
21922 usleep (100000);
21923 /* By the time we get here, it's clear that the second reader thread is
21924 blocked at step 12. This is the desired behaviour. */
21925 SUCCEED ();
21926 }
21927
21928 static void *
21929 reader2_func (void *ignored)
21930 {
21931 int err;
21932
21933 /* Step 8 (can be before or after step 7):
21934 The second reader thread takes the baton, then waits a moment to make sure
21935 the writer thread has reached step 7. */
21936 if (pthread_mutex_lock (&baton))
21937 UNEXPECTED (8);
21938 usleep (100000);
21939 /* Step 9: The second reader thread requests the lock. */
21940 err = pthread_rwlock_tryrdlock (&lock);
21941 if (err == 0)
21942 FAILURE ();
21943 else if (err != EBUSY)
21944 UNEXPECTED (9);
21945 /* Step 10: Launch a timer, to test whether the next call blocks. */
21946 if (pthread_create (&timer, NULL, timer_func, NULL))
21947 UNEXPECTED (10);
21948 /* Step 11: Release the baton. */
21949 if (pthread_mutex_unlock (&baton))
21950 UNEXPECTED (11);
21951 /* Step 12: The second reader thread requests the lock. */
21952 err = pthread_rwlock_rdlock (&lock);
21953 if (err == 0)
21954 FAILURE ();
21955 else
21956 UNEXPECTED (12);
21957 }
21958
21959 static void *
21960 writer_func (void *ignored)
21961 {
21962 /* Step 4: Take the baton, so that the second reader thread does not go ahead
21963 too early. */
21964 if (pthread_mutex_lock (&baton))
21965 UNEXPECTED (4);
21966 /* Step 5: Create the second reader thread. */
21967 if (pthread_create (&reader2, NULL, reader2_func, NULL))
21968 UNEXPECTED (5);
21969 /* Step 6: Release the baton. */
21970 if (pthread_mutex_unlock (&baton))
21971 UNEXPECTED (6);
21972 /* Step 7: The writer thread requests the lock. */
21973 if (pthread_rwlock_wrlock (&lock))
21974 UNEXPECTED (7);
21975 return NULL;
21976 }
21977
21978 int
21979 main ()
21980 {
21981 reader1 = pthread_self ();
21982
21983 /* Step 1: The main thread initializes the lock and the baton. */
21984 if (pthread_rwlock_init (&lock, NULL))
21985 UNEXPECTED (1);
21986 if (pthread_mutex_init (&baton, NULL))
21987 UNEXPECTED (1);
21988 /* Step 2: The main thread acquires the lock as a reader. */
21989 if (pthread_rwlock_rdlock (&lock))
21990 UNEXPECTED (2);
21991 /* Step 3: Create the writer thread. */
21992 if (pthread_create (&writer, NULL, writer_func, NULL))
21993 UNEXPECTED (3);
21994 /* Job done. Go to sleep. */
21995 for (;;)
21996 {
21997 sleep (1);
21998 }
21999 }
22000
22001 _ACEOF
22002 if ac_fn_c_try_run "$LINENO"; then :
22003 gl_cv_pthread_rwlock_rdlock_prefer_writer=yes
22004 else
22005 gl_cv_pthread_rwlock_rdlock_prefer_writer=no
22006 fi
22007 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22008 conftest.$ac_objext conftest.beam conftest.$ac_ext
22009 fi
22010
22011 LIBS="$save_LIBS"
22012
22013 fi
22014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pthread_rwlock_rdlock_prefer_writer" >&5
22015 $as_echo "$gl_cv_pthread_rwlock_rdlock_prefer_writer" >&6; }
22016 case "$gl_cv_pthread_rwlock_rdlock_prefer_writer" in
22017 *yes)
22018
22019 $as_echo "#define HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER 1" >>confdefs.h
22020
22021 ;;
22022 esac
22023
22024 fi
22025 # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
22026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22027 /* end confdefs.h. */
22028
22029 #include <pthread.h>
22030 int
22031 main ()
22032 {
22033
22034 #if __FreeBSD__ == 4
22035 error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
22036 #elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \
22037 && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
22038 error "No, in Mac OS X < 10.7 recursive mutexes actually don't work."
22039 #else
22040 int x = (int)PTHREAD_MUTEX_RECURSIVE;
22041 return !x;
22042 #endif
22043
22044 ;
22045 return 0;
22046 }
22047 _ACEOF
22048 if ac_fn_c_try_compile "$LINENO"; then :
22049
22050 $as_echo "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h
22051
22052 fi
22053 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22054 fi
22055 :
22056
22057
22058
22059 cat >>confdefs.h <<_ACEOF
22060 #define GNULIB_LOCK 1
22061 _ACEOF
22062
22063
22064
22065
22066
22067
22068 if test $ac_cv_func_lstat = yes; then
22069
22070 case $host_os,$gl_cv_func_lstat_dereferences_slashed_symlink in
22071 solaris* | *no)
22072 REPLACE_LSTAT=1
22073 ;;
22074 esac
22075 else
22076 HAVE_LSTAT=0
22077 fi
22078
22079 if test $REPLACE_LSTAT = 1; then
22080
22081
22082
22083
22084
22085
22086
22087
22088 gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
22089
22090 :
22091 fi
22092
22093
22094
22095
22096
22097 GNULIB_LSTAT=1
22098
22099
22100
22101
22102
22103 $as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
22104
22105
22106
22107
22108
22109
22110 if test $gl_cv_func_malloc_posix = yes; then
22111
22112 $as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
22113
22114 else
22115 REPLACE_MALLOC=1
22116 fi
22117
22118 if test $REPLACE_MALLOC = 1; then
22119
22120
22121
22122
22123
22124
22125
22126
22127 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
22128
22129 fi
22130
22131
22132
22133
22134
22135 GNULIB_MALLOC_POSIX=1
22136
22137
22138
22139
22140
22141 $as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
22142
22143
22144
22145
22146
22147
22148
22149
22150
22151
22152
22153
22154
22155
22156
22157
22158
22159 if test $gl_cv_have_include_next = yes; then
22160 gl_cv_next_math_h='<'math.h'>'
22161 else
22162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
22163 $as_echo_n "checking absolute name of <math.h>... " >&6; }
22164 if ${gl_cv_next_math_h+:} false; then :
22165 $as_echo_n "(cached) " >&6
22166 else
22167
22168 if test $ac_cv_header_math_h = yes; then
22169
22170
22171
22172
22173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22174 /* end confdefs.h. */
22175 #include <math.h>
22176 _ACEOF
22177 case "$host_os" in
22178 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22179 *) gl_absname_cpp="$ac_cpp" ;;
22180 esac
22181
22182 case "$host_os" in
22183 mingw*)
22184 gl_dirsep_regex='[/\\]'
22185 ;;
22186 *)
22187 gl_dirsep_regex='\/'
22188 ;;
22189 esac
22190 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22191 gl_header_literal_regex=`echo 'math.h' \
22192 | sed -e "$gl_make_literal_regex_sed"`
22193 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22194 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22195 s|^/[^/]|//&|
22196 p
22197 q
22198 }'
22199
22200 gl_cv_absolute_math_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22201 sed -n "$gl_absolute_header_sed"`
22202
22203 gl_header=$gl_cv_absolute_math_h
22204 gl_cv_next_math_h='"'$gl_header'"'
22205 else
22206 gl_cv_next_math_h='<'math.h'>'
22207 fi
22208
22209
22210 fi
22211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
22212 $as_echo "$gl_cv_next_math_h" >&6; }
22213 fi
22214 NEXT_MATH_H=$gl_cv_next_math_h
22215
22216 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22217 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22218 gl_next_as_first_directive='<'math.h'>'
22219 else
22220 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22221 gl_next_as_first_directive=$gl_cv_next_math_h
22222 fi
22223 NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive
22224
22225
22226
22227
22228
22229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
22230 $as_echo_n "checking whether NAN macro works... " >&6; }
22231 if ${gl_cv_header_math_nan_works+:} false; then :
22232 $as_echo_n "(cached) " >&6
22233 else
22234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22235 /* end confdefs.h. */
22236 #include <math.h>
22237 int
22238 main ()
22239 {
22240 /* Solaris 10 has a broken definition of NAN. Other platforms
22241 fail to provide NAN, or provide it only in C99 mode; this
22242 test only needs to fail when NAN is provided but wrong. */
22243 float f = 1.0f;
22244 #ifdef NAN
22245 f = NAN;
22246 #endif
22247 return f == 0;
22248 ;
22249 return 0;
22250 }
22251 _ACEOF
22252 if ac_fn_c_try_compile "$LINENO"; then :
22253 gl_cv_header_math_nan_works=yes
22254 else
22255 gl_cv_header_math_nan_works=no
22256 fi
22257 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22258 fi
22259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5
22260 $as_echo "$gl_cv_header_math_nan_works" >&6; }
22261 if test $gl_cv_header_math_nan_works = no; then
22262 REPLACE_NAN=1
22263 fi
22264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
22265 $as_echo_n "checking whether HUGE_VAL works... " >&6; }
22266 if ${gl_cv_header_math_huge_val_works+:} false; then :
22267 $as_echo_n "(cached) " >&6
22268 else
22269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22270 /* end confdefs.h. */
22271 #include <math.h>
22272 int
22273 main ()
22274 {
22275 /* Solaris 10 has a broken definition of HUGE_VAL. */
22276 double d = HUGE_VAL;
22277 return d == 0;
22278 ;
22279 return 0;
22280 }
22281 _ACEOF
22282 if ac_fn_c_try_compile "$LINENO"; then :
22283 gl_cv_header_math_huge_val_works=yes
22284 else
22285 gl_cv_header_math_huge_val_works=no
22286 fi
22287 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22288 fi
22289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5
22290 $as_echo "$gl_cv_header_math_huge_val_works" >&6; }
22291 if test $gl_cv_header_math_huge_val_works = no; then
22292 REPLACE_HUGE_VAL=1
22293 fi
22294
22295
22296
22297
22298
22299
22300
22301
22302
22303
22304
22305
22306
22307
22308
22309
22310
22311
22312 if case "$host_os" in
22313 mingw*) true ;;
22314 *) test $ac_cv_func_mbsinit = yes ;;
22315 esac \
22316 && test $ac_cv_func_mbrtowc = yes; then
22317
22318
22319
22320
22321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
22322 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
22323 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
22324 $as_echo_n "(cached) " >&6
22325 else
22326
22327 case "$host_os" in
22328 # Guess no on AIX and OSF/1.
22329 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
22330 # Guess yes otherwise.
22331 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
22332 esac
22333 if test $LOCALE_JA != none; then
22334 if test "$cross_compiling" = yes; then :
22335 :
22336 else
22337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22338 /* end confdefs.h. */
22339
22340 #include <locale.h>
22341 #include <string.h>
22342 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22343 <wchar.h>.
22344 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22345 included before <wchar.h>. */
22346 #include <stddef.h>
22347 #include <stdio.h>
22348 #include <time.h>
22349 #include <wchar.h>
22350 int main ()
22351 {
22352 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
22353 {
22354 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
22355 mbstate_t state;
22356 wchar_t wc;
22357
22358 memset (&state, '\0', sizeof (mbstate_t));
22359 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
22360 if (mbsinit (&state))
22361 return 2;
22362 }
22363 return 0;
22364 }
22365 _ACEOF
22366 if ac_fn_c_try_run "$LINENO"; then :
22367 gl_cv_func_mbrtowc_incomplete_state=yes
22368 else
22369 gl_cv_func_mbrtowc_incomplete_state=no
22370 fi
22371 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22372 conftest.$ac_objext conftest.beam conftest.$ac_ext
22373 fi
22374
22375 else
22376 if test $LOCALE_FR_UTF8 != none; then
22377 if test "$cross_compiling" = yes; then :
22378 :
22379 else
22380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22381 /* end confdefs.h. */
22382
22383 #include <locale.h>
22384 #include <string.h>
22385 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22386 <wchar.h>.
22387 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22388 included before <wchar.h>. */
22389 #include <stddef.h>
22390 #include <stdio.h>
22391 #include <time.h>
22392 #include <wchar.h>
22393 int main ()
22394 {
22395 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
22396 {
22397 const char input[] = "B\303\274\303\237er"; /* "Büßer" */
22398 mbstate_t state;
22399 wchar_t wc;
22400
22401 memset (&state, '\0', sizeof (mbstate_t));
22402 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
22403 if (mbsinit (&state))
22404 return 2;
22405 }
22406 return 0;
22407 }
22408 _ACEOF
22409 if ac_fn_c_try_run "$LINENO"; then :
22410 gl_cv_func_mbrtowc_incomplete_state=yes
22411 else
22412 gl_cv_func_mbrtowc_incomplete_state=no
22413 fi
22414 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22415 conftest.$ac_objext conftest.beam conftest.$ac_ext
22416 fi
22417
22418 fi
22419 fi
22420
22421 fi
22422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
22423 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
22424
22425
22426
22427
22428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
22429 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
22430 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
22431 $as_echo_n "(cached) " >&6
22432 else
22433
22434 case "$host_os" in
22435 # Guess no on Solaris 8.
22436 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
22437 # Guess yes otherwise.
22438 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
22439 esac
22440 if test $LOCALE_ZH_CN != none; then
22441 if test "$cross_compiling" = yes; then :
22442 :
22443 else
22444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22445 /* end confdefs.h. */
22446
22447 #include <locale.h>
22448 #include <stdlib.h>
22449 #include <string.h>
22450 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22451 <wchar.h>.
22452 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22453 included before <wchar.h>. */
22454 #include <stddef.h>
22455 #include <stdio.h>
22456 #include <time.h>
22457 #include <wchar.h>
22458 int main ()
22459 {
22460 /* This fails on Solaris 8:
22461 mbrtowc returns 2, and sets wc to 0x00F0.
22462 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
22463 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
22464 {
22465 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
22466 mbstate_t state;
22467 wchar_t wc;
22468
22469 memset (&state, '\0', sizeof (mbstate_t));
22470 if (mbrtowc (&wc, input + 3, 6, &state) != 4
22471 && mbtowc (&wc, input + 3, 6) == 4)
22472 return 2;
22473 }
22474 return 0;
22475 }
22476 _ACEOF
22477 if ac_fn_c_try_run "$LINENO"; then :
22478 gl_cv_func_mbrtowc_sanitycheck=yes
22479 else
22480 gl_cv_func_mbrtowc_sanitycheck=no
22481 fi
22482 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22483 conftest.$ac_objext conftest.beam conftest.$ac_ext
22484 fi
22485
22486 fi
22487
22488 fi
22489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
22490 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
22491
22492 REPLACE_MBSTATE_T=0
22493 case "$gl_cv_func_mbrtowc_incomplete_state" in
22494 *yes) ;;
22495 *) REPLACE_MBSTATE_T=1 ;;
22496 esac
22497 case "$gl_cv_func_mbrtowc_sanitycheck" in
22498 *yes) ;;
22499 *) REPLACE_MBSTATE_T=1 ;;
22500 esac
22501 else
22502 REPLACE_MBSTATE_T=1
22503 fi
22504
22505
22506
22507 if test $ac_cv_func_mbrtowc = no; then
22508 HAVE_MBRTOWC=0
22509 ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
22510 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22511 <wchar.h>.
22512 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22513 included before <wchar.h>. */
22514 #include <stddef.h>
22515 #include <stdio.h>
22516 #include <time.h>
22517 #include <wchar.h>
22518
22519 "
22520 if test "x$ac_cv_have_decl_mbrtowc" = xyes; then :
22521 ac_have_decl=1
22522 else
22523 ac_have_decl=0
22524 fi
22525
22526 cat >>confdefs.h <<_ACEOF
22527 #define HAVE_DECL_MBRTOWC $ac_have_decl
22528 _ACEOF
22529
22530 if test $ac_cv_have_decl_mbrtowc = yes; then
22531 REPLACE_MBRTOWC=1
22532 fi
22533 else
22534 if test $REPLACE_MBSTATE_T = 1; then
22535 REPLACE_MBRTOWC=1
22536 else
22537
22538
22539
22540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
22541 $as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
22542 if ${gl_cv_func_mbrtowc_null_arg1+:} false; then :
22543 $as_echo_n "(cached) " >&6
22544 else
22545
22546 case "$host_os" in
22547 # Guess no on Solaris.
22548 solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
22549 # Guess yes otherwise.
22550 *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
22551 esac
22552 if test $LOCALE_FR_UTF8 != none; then
22553 if test "$cross_compiling" = yes; then :
22554 :
22555 else
22556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22557 /* end confdefs.h. */
22558
22559 #include <locale.h>
22560 #include <stdlib.h>
22561 #include <string.h>
22562 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22563 <wchar.h>.
22564 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22565 included before <wchar.h>. */
22566 #include <stddef.h>
22567 #include <stdio.h>
22568 #include <time.h>
22569 #include <wchar.h>
22570 int main ()
22571 {
22572 int result = 0;
22573
22574 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
22575 {
22576 char input[] = "\303\237er";
22577 mbstate_t state;
22578 wchar_t wc;
22579 size_t ret;
22580
22581 memset (&state, '\0', sizeof (mbstate_t));
22582 wc = (wchar_t) 0xBADFACE;
22583 ret = mbrtowc (&wc, input, 5, &state);
22584 if (ret != 2)
22585 result |= 1;
22586 if (!mbsinit (&state))
22587 result |= 2;
22588
22589 memset (&state, '\0', sizeof (mbstate_t));
22590 ret = mbrtowc (NULL, input, 5, &state);
22591 if (ret != 2) /* Solaris 7 fails here: ret is -1. */
22592 result |= 4;
22593 if (!mbsinit (&state))
22594 result |= 8;
22595 }
22596 return result;
22597 }
22598 _ACEOF
22599 if ac_fn_c_try_run "$LINENO"; then :
22600 gl_cv_func_mbrtowc_null_arg1=yes
22601 else
22602 gl_cv_func_mbrtowc_null_arg1=no
22603 fi
22604 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22605 conftest.$ac_objext conftest.beam conftest.$ac_ext
22606 fi
22607
22608 fi
22609
22610 fi
22611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
22612 $as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; }
22613
22614
22615
22616
22617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
22618 $as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
22619 if ${gl_cv_func_mbrtowc_null_arg2+:} false; then :
22620 $as_echo_n "(cached) " >&6
22621 else
22622
22623 case "$host_os" in
22624 # Guess no on OSF/1.
22625 osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
22626 # Guess yes otherwise.
22627 *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
22628 esac
22629 if test $LOCALE_FR_UTF8 != none; then
22630 if test "$cross_compiling" = yes; then :
22631 :
22632 else
22633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22634 /* end confdefs.h. */
22635
22636 #include <locale.h>
22637 #include <string.h>
22638 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22639 <wchar.h>.
22640 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22641 included before <wchar.h>. */
22642 #include <stddef.h>
22643 #include <stdio.h>
22644 #include <time.h>
22645 #include <wchar.h>
22646 int main ()
22647 {
22648 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
22649 {
22650 mbstate_t state;
22651 wchar_t wc;
22652 int ret;
22653
22654 memset (&state, '\0', sizeof (mbstate_t));
22655 wc = (wchar_t) 0xBADFACE;
22656 mbrtowc (&wc, NULL, 5, &state);
22657 /* Check that wc was not modified. */
22658 if (wc != (wchar_t) 0xBADFACE)
22659 return 2;
22660 }
22661 return 0;
22662 }
22663 _ACEOF
22664 if ac_fn_c_try_run "$LINENO"; then :
22665 gl_cv_func_mbrtowc_null_arg2=yes
22666 else
22667 gl_cv_func_mbrtowc_null_arg2=no
22668 fi
22669 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22670 conftest.$ac_objext conftest.beam conftest.$ac_ext
22671 fi
22672
22673 fi
22674
22675 fi
22676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
22677 $as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; }
22678
22679
22680
22681
22682
22683
22684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
22685 $as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
22686 if ${gl_cv_func_mbrtowc_retval+:} false; then :
22687 $as_echo_n "(cached) " >&6
22688 else
22689
22690 case "$host_os" in
22691 # Guess no on HP-UX, Solaris, native Windows.
22692 hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
22693 # Guess yes otherwise.
22694 *) gl_cv_func_mbrtowc_retval="guessing yes" ;;
22695 esac
22696 if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
22697 || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
22698 if test "$cross_compiling" = yes; then :
22699 :
22700 else
22701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22702 /* end confdefs.h. */
22703
22704 #include <locale.h>
22705 #include <string.h>
22706 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22707 <wchar.h>.
22708 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22709 included before <wchar.h>. */
22710 #include <stddef.h>
22711 #include <stdio.h>
22712 #include <time.h>
22713 #include <wchar.h>
22714 int main ()
22715 {
22716 int result = 0;
22717 int found_some_locale = 0;
22718 /* This fails on Solaris. */
22719 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
22720 {
22721 char input[] = "B\303\274\303\237er"; /* "Büßer" */
22722 mbstate_t state;
22723 wchar_t wc;
22724
22725 memset (&state, '\0', sizeof (mbstate_t));
22726 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
22727 {
22728 input[1] = '\0';
22729 if (mbrtowc (&wc, input + 2, 5, &state) != 1)
22730 result |= 1;
22731 }
22732 found_some_locale = 1;
22733 }
22734 /* This fails on HP-UX 11.11. */
22735 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
22736 {
22737 char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
22738 mbstate_t state;
22739 wchar_t wc;
22740
22741 memset (&state, '\0', sizeof (mbstate_t));
22742 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
22743 {
22744 input[1] = '\0';
22745 if (mbrtowc (&wc, input + 2, 5, &state) != 2)
22746 result |= 2;
22747 }
22748 found_some_locale = 1;
22749 }
22750 /* This fails on native Windows. */
22751 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
22752 {
22753 char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
22754 mbstate_t state;
22755 wchar_t wc;
22756
22757 memset (&state, '\0', sizeof (mbstate_t));
22758 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
22759 {
22760 input[3] = '\0';
22761 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
22762 result |= 4;
22763 }
22764 found_some_locale = 1;
22765 }
22766 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
22767 {
22768 char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
22769 mbstate_t state;
22770 wchar_t wc;
22771
22772 memset (&state, '\0', sizeof (mbstate_t));
22773 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
22774 {
22775 input[3] = '\0';
22776 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
22777 result |= 8;
22778 }
22779 found_some_locale = 1;
22780 }
22781 if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
22782 {
22783 char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
22784 mbstate_t state;
22785 wchar_t wc;
22786
22787 memset (&state, '\0', sizeof (mbstate_t));
22788 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
22789 {
22790 input[3] = '\0';
22791 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
22792 result |= 16;
22793 }
22794 found_some_locale = 1;
22795 }
22796 return (found_some_locale ? result : 77);
22797 }
22798 _ACEOF
22799 if ac_fn_c_try_run "$LINENO"; then :
22800 gl_cv_func_mbrtowc_retval=yes
22801 else
22802 if test $? != 77; then
22803 gl_cv_func_mbrtowc_retval=no
22804 fi
22805
22806 fi
22807 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22808 conftest.$ac_objext conftest.beam conftest.$ac_ext
22809 fi
22810
22811 fi
22812
22813 fi
22814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
22815 $as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
22816
22817
22818
22819
22820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
22821 $as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
22822 if ${gl_cv_func_mbrtowc_nul_retval+:} false; then :
22823 $as_echo_n "(cached) " >&6
22824 else
22825
22826 case "$host_os" in
22827 # Guess no on Solaris 8 and 9.
22828 solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
22829 # Guess yes otherwise.
22830 *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
22831 esac
22832 if test $LOCALE_ZH_CN != none; then
22833 if test "$cross_compiling" = yes; then :
22834 :
22835 else
22836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22837 /* end confdefs.h. */
22838
22839 #include <locale.h>
22840 #include <string.h>
22841 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22842 <wchar.h>.
22843 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22844 included before <wchar.h>. */
22845 #include <stddef.h>
22846 #include <stdio.h>
22847 #include <time.h>
22848 #include <wchar.h>
22849 int main ()
22850 {
22851 /* This fails on Solaris 8 and 9. */
22852 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
22853 {
22854 mbstate_t state;
22855 wchar_t wc;
22856
22857 memset (&state, '\0', sizeof (mbstate_t));
22858 if (mbrtowc (&wc, "", 1, &state) != 0)
22859 return 2;
22860 }
22861 return 0;
22862 }
22863 _ACEOF
22864 if ac_fn_c_try_run "$LINENO"; then :
22865 gl_cv_func_mbrtowc_nul_retval=yes
22866 else
22867 gl_cv_func_mbrtowc_nul_retval=no
22868 fi
22869 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22870 conftest.$ac_objext conftest.beam conftest.$ac_ext
22871 fi
22872
22873 fi
22874
22875 fi
22876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
22877 $as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
22878
22879
22880
22881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc stores incomplete characters" >&5
22882 $as_echo_n "checking whether mbrtowc stores incomplete characters... " >&6; }
22883 if ${gl_cv_func_mbrtowc_stores_incomplete+:} false; then :
22884 $as_echo_n "(cached) " >&6
22885 else
22886
22887 case "$host_os" in
22888 # Guess yes on native Windows.
22889 mingw*) gl_cv_func_mbrtowc_stores_incomplete="guessing yes" ;;
22890 *) gl_cv_func_mbrtowc_stores_incomplete="guessing no" ;;
22891 esac
22892 case "$host_os" in
22893 mingw*)
22894 if test "$cross_compiling" = yes; then :
22895 :
22896 else
22897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22898 /* end confdefs.h. */
22899
22900 #include <locale.h>
22901 #include <string.h>
22902 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22903 <wchar.h>.
22904 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22905 included before <wchar.h>. */
22906 #include <stddef.h>
22907 #include <stdio.h>
22908 #include <time.h>
22909 #include <wchar.h>
22910 int main ()
22911 {
22912 int result = 0;
22913 if (setlocale (LC_ALL, "French_France.65001") != NULL)
22914 {
22915 wchar_t wc = (wchar_t) 0xBADFACE;
22916 mbstate_t state;
22917
22918 memset (&state, '\0', sizeof (mbstate_t));
22919 if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2)
22920 && wc != (wchar_t) 0xBADFACE)
22921 result |= 1;
22922 }
22923 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
22924 {
22925 wchar_t wc = (wchar_t) 0xBADFACE;
22926 mbstate_t state;
22927
22928 memset (&state, '\0', sizeof (mbstate_t));
22929 if (mbrtowc (&wc, "\226", 1, &state) == (size_t)(-2)
22930 && wc != (wchar_t) 0xBADFACE)
22931 result |= 2;
22932 }
22933 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
22934 {
22935 wchar_t wc = (wchar_t) 0xBADFACE;
22936 mbstate_t state;
22937
22938 memset (&state, '\0', sizeof (mbstate_t));
22939 if (mbrtowc (&wc, "\245", 1, &state) == (size_t)(-2)
22940 && wc != (wchar_t) 0xBADFACE)
22941 result |= 4;
22942 }
22943 if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
22944 {
22945 wchar_t wc = (wchar_t) 0xBADFACE;
22946 mbstate_t state;
22947
22948 memset (&state, '\0', sizeof (mbstate_t));
22949 if (mbrtowc (&wc, "\261", 1, &state) == (size_t)(-2)
22950 && wc != (wchar_t) 0xBADFACE)
22951 result |= 8;
22952 }
22953 return result;
22954 }
22955 _ACEOF
22956 if ac_fn_c_try_run "$LINENO"; then :
22957 gl_cv_func_mbrtowc_stores_incomplete=no
22958 else
22959 gl_cv_func_mbrtowc_stores_incomplete=yes
22960 fi
22961 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22962 conftest.$ac_objext conftest.beam conftest.$ac_ext
22963 fi
22964
22965 ;;
22966 *)
22967
22968 if test $LOCALE_FR_UTF8 != none; then
22969 if test "$cross_compiling" = yes; then :
22970 :
22971 else
22972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22973 /* end confdefs.h. */
22974
22975 #include <locale.h>
22976 #include <string.h>
22977 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22978 <wchar.h>.
22979 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22980 included before <wchar.h>. */
22981 #include <stddef.h>
22982 #include <stdio.h>
22983 #include <time.h>
22984 #include <wchar.h>
22985 int main ()
22986 {
22987 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
22988 {
22989 wchar_t wc = (wchar_t) 0xBADFACE;
22990 mbstate_t state;
22991
22992 memset (&state, '\0', sizeof (mbstate_t));
22993 if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2)
22994 && wc != (wchar_t) 0xBADFACE)
22995 return 1;
22996 }
22997 return 0;
22998 }
22999 _ACEOF
23000 if ac_fn_c_try_run "$LINENO"; then :
23001 gl_cv_func_mbrtowc_stores_incomplete=no
23002 else
23003 gl_cv_func_mbrtowc_stores_incomplete=yes
23004 fi
23005 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23006 conftest.$ac_objext conftest.beam conftest.$ac_ext
23007 fi
23008
23009 fi
23010 ;;
23011 esac
23012
23013 fi
23014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_stores_incomplete" >&5
23015 $as_echo "$gl_cv_func_mbrtowc_stores_incomplete" >&6; }
23016
23017
23018
23019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5
23020 $as_echo_n "checking whether mbrtowc works on empty input... " >&6; }
23021 if ${gl_cv_func_mbrtowc_empty_input+:} false; then :
23022 $as_echo_n "(cached) " >&6
23023 else
23024
23025 case "$host_os" in
23026 # Guess no on AIX and glibc systems.
23027 aix* | *-gnu* | gnu*) gl_cv_func_mbrtowc_empty_input="guessing no" ;;
23028 # Guess yes on native Windows.
23029 mingw*) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
23030 *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
23031 esac
23032 if test "$cross_compiling" = yes; then :
23033 :
23034 else
23035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23036 /* end confdefs.h. */
23037
23038 #include <wchar.h>
23039 static wchar_t wc;
23040 static mbstate_t mbs;
23041 int
23042 main (void)
23043 {
23044 return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
23045 }
23046 _ACEOF
23047 if ac_fn_c_try_run "$LINENO"; then :
23048 gl_cv_func_mbrtowc_empty_input=yes
23049 else
23050 gl_cv_func_mbrtowc_empty_input=no
23051 fi
23052 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23053 conftest.$ac_objext conftest.beam conftest.$ac_ext
23054 fi
23055
23056
23057 fi
23058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5
23059 $as_echo "$gl_cv_func_mbrtowc_empty_input" >&6; }
23060
23061
23062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
23063 $as_echo_n "checking whether the C locale is free of encoding errors... " >&6; }
23064 if ${gl_cv_func_mbrtowc_C_locale_sans_EILSEQ+:} false; then :
23065 $as_echo_n "(cached) " >&6
23066 else
23067
23068 gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="$gl_cross_guess_normal"
23069
23070 if test "$cross_compiling" = yes; then :
23071 case "$host_os" in
23072 # Guess yes on native Windows.
23073 mingw*) gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="guessing yes" ;;
23074 esac
23075
23076 else
23077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23078 /* end confdefs.h. */
23079 #include <limits.h>
23080 #include <locale.h>
23081 #include <wchar.h>
23082
23083 int
23084 main ()
23085 {
23086
23087 int i;
23088 char *locale = setlocale (LC_ALL, "C");
23089 if (! locale)
23090 return 2;
23091 for (i = CHAR_MIN; i <= CHAR_MAX; i++)
23092 {
23093 char c = i;
23094 wchar_t wc;
23095 mbstate_t mbs = { 0, };
23096 size_t ss = mbrtowc (&wc, &c, 1, &mbs);
23097 if (1 < ss)
23098 return 3;
23099 }
23100 return 0;
23101
23102 ;
23103 return 0;
23104 }
23105 _ACEOF
23106 if ac_fn_c_try_run "$LINENO"; then :
23107 gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=yes
23108 else
23109 gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=no
23110 fi
23111 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23112 conftest.$ac_objext conftest.beam conftest.$ac_ext
23113 fi
23114
23115
23116 fi
23117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&5
23118 $as_echo "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&6; }
23119
23120 case "$gl_cv_func_mbrtowc_null_arg1" in
23121 *yes) ;;
23122 *)
23123 $as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
23124
23125 REPLACE_MBRTOWC=1
23126 ;;
23127 esac
23128 case "$gl_cv_func_mbrtowc_null_arg2" in
23129 *yes) ;;
23130 *)
23131 $as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
23132
23133 REPLACE_MBRTOWC=1
23134 ;;
23135 esac
23136 case "$gl_cv_func_mbrtowc_retval" in
23137 *yes) ;;
23138 *)
23139 $as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
23140
23141 REPLACE_MBRTOWC=1
23142 ;;
23143 esac
23144 case "$gl_cv_func_mbrtowc_nul_retval" in
23145 *yes) ;;
23146 *)
23147 $as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
23148
23149 REPLACE_MBRTOWC=1
23150 ;;
23151 esac
23152 case "$gl_cv_func_mbrtowc_stores_incomplete" in
23153 *no) ;;
23154 *)
23155 $as_echo "#define MBRTOWC_STORES_INCOMPLETE_BUG 1" >>confdefs.h
23156
23157 REPLACE_MBRTOWC=1
23158 ;;
23159 esac
23160 case "$gl_cv_func_mbrtowc_empty_input" in
23161 *yes) ;;
23162 *)
23163 $as_echo "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h
23164
23165 REPLACE_MBRTOWC=1
23166 ;;
23167 esac
23168 case "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" in
23169 *yes) ;;
23170 *)
23171 $as_echo "#define MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
23172
23173 REPLACE_MBRTOWC=1
23174 ;;
23175 esac
23176 fi
23177 fi
23178 if test $REPLACE_MBSTATE_T = 1; then
23179 case "$host_os" in
23180 mingw*) LIB_MBRTOWC= ;;
23181 *)
23182
23183
23184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
23185 $as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
23186 if ${gl_cv_have_weak+:} false; then :
23187 $as_echo_n "(cached) " >&6
23188 else
23189 gl_cv_have_weak=no
23190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23191 /* end confdefs.h. */
23192 extern void xyzzy ();
23193 #pragma weak xyzzy
23194 int
23195 main ()
23196 {
23197 xyzzy();
23198 ;
23199 return 0;
23200 }
23201 _ACEOF
23202 if ac_fn_c_try_link "$LINENO"; then :
23203 gl_cv_have_weak=maybe
23204 fi
23205 rm -f core conftest.err conftest.$ac_objext \
23206 conftest$ac_exeext conftest.$ac_ext
23207 if test $gl_cv_have_weak = maybe; then
23208 if test "$cross_compiling" = yes; then :
23209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23210 /* end confdefs.h. */
23211 #ifdef __ELF__
23212 Extensible Linking Format
23213 #endif
23214
23215 _ACEOF
23216 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23217 $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
23218 gl_cv_have_weak="guessing yes"
23219 else
23220 gl_cv_have_weak="guessing no"
23221 fi
23222 rm -f conftest*
23223
23224
23225 else
23226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23227 /* end confdefs.h. */
23228
23229 #include <stdio.h>
23230 #pragma weak fputs
23231 int main ()
23232 {
23233 return (fputs == NULL);
23234 }
23235 _ACEOF
23236 if ac_fn_c_try_run "$LINENO"; then :
23237 gl_cv_have_weak=yes
23238 else
23239 gl_cv_have_weak=no
23240 fi
23241 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23242 conftest.$ac_objext conftest.beam conftest.$ac_ext
23243 fi
23244
23245 fi
23246 case " $LDFLAGS " in
23247 *" -static "*) gl_cv_have_weak=no ;;
23248 esac
23249 case "$gl_cv_have_weak" in
23250 *yes)
23251 case "$host_os" in
23252 freebsd* | dragonfly*)
23253 : > conftest1.c
23254 $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
23255 cat <<EOF > conftest2.c
23256 #include <pthread.h>
23257 #pragma weak pthread_mutexattr_gettype
23258 int main ()
23259 {
23260 return (pthread_mutexattr_gettype != NULL);
23261 }
23262 EOF
23263 $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
23264 || gl_cv_have_weak=no
23265 rm -f conftest1.c libempty.so conftest2.c conftest
23266 ;;
23267 esac
23268 ;;
23269 esac
23270
23271 fi
23272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
23273 $as_echo "$gl_cv_have_weak" >&6; }
23274 case "$gl_cv_have_weak" in
23275 *yes)
23276
23277 $as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
23278
23279 ;;
23280 esac
23281
23282 case "$gl_cv_have_weak" in
23283 *yes) LIB_MBRTOWC= ;;
23284 *) LIB_MBRTOWC="$LIBPTHREAD" ;;
23285 esac
23286 ;;
23287 esac
23288 else
23289 LIB_MBRTOWC=
23290 fi
23291
23292
23293 if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
23294
23295
23296
23297
23298
23299
23300
23301
23302 gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
23303
23304 if test $REPLACE_MBSTATE_T = 1; then
23305
23306
23307
23308
23309
23310
23311
23312
23313 gl_LIBOBJS="$gl_LIBOBJS lc-charset-dispatch.$ac_objext"
23314
23315
23316
23317
23318
23319
23320
23321
23322
23323 gl_LIBOBJS="$gl_LIBOBJS mbtowc-lock.$ac_objext"
23324
23325
23326
23327
23328 CFLAG_VISIBILITY=
23329 HAVE_VISIBILITY=0
23330 if test -n "$GCC"; then
23331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
23332 $as_echo_n "checking whether the -Werror option is usable... " >&6; }
23333 if ${gl_cv_cc_vis_werror+:} false; then :
23334 $as_echo_n "(cached) " >&6
23335 else
23336 gl_save_CFLAGS="$CFLAGS"
23337 CFLAGS="$CFLAGS -Werror"
23338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23339 /* end confdefs.h. */
23340
23341 int
23342 main ()
23343 {
23344
23345 ;
23346 return 0;
23347 }
23348 _ACEOF
23349 if ac_fn_c_try_compile "$LINENO"; then :
23350 gl_cv_cc_vis_werror=yes
23351 else
23352 gl_cv_cc_vis_werror=no
23353 fi
23354 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23355 CFLAGS="$gl_save_CFLAGS"
23356
23357 fi
23358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
23359 $as_echo "$gl_cv_cc_vis_werror" >&6; }
23360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
23361 $as_echo_n "checking for simple visibility declarations... " >&6; }
23362 if ${gl_cv_cc_visibility+:} false; then :
23363 $as_echo_n "(cached) " >&6
23364 else
23365 gl_save_CFLAGS="$CFLAGS"
23366 CFLAGS="$CFLAGS -fvisibility=hidden"
23367 if test $gl_cv_cc_vis_werror = yes; then
23368 CFLAGS="$CFLAGS -Werror"
23369 fi
23370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23371 /* end confdefs.h. */
23372 extern __attribute__((__visibility__("hidden"))) int hiddenvar;
23373 extern __attribute__((__visibility__("default"))) int exportedvar;
23374 extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
23375 extern __attribute__((__visibility__("default"))) int exportedfunc (void);
23376 void dummyfunc (void) {}
23377
23378 int
23379 main ()
23380 {
23381
23382 ;
23383 return 0;
23384 }
23385 _ACEOF
23386 if ac_fn_c_try_compile "$LINENO"; then :
23387 gl_cv_cc_visibility=yes
23388 else
23389 gl_cv_cc_visibility=no
23390 fi
23391 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23392 CFLAGS="$gl_save_CFLAGS"
23393
23394 fi
23395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
23396 $as_echo "$gl_cv_cc_visibility" >&6; }
23397 if test $gl_cv_cc_visibility = yes; then
23398 CFLAG_VISIBILITY="-fvisibility=hidden"
23399 HAVE_VISIBILITY=1
23400 fi
23401 fi
23402
23403
23404
23405 cat >>confdefs.h <<_ACEOF
23406 #define HAVE_VISIBILITY $HAVE_VISIBILITY
23407 _ACEOF
23408
23409
23410
23411 fi
23412
23413
23414 :
23415
23416 fi
23417
23418
23419
23420
23421
23422 GNULIB_MBRTOWC=1
23423
23424
23425
23426
23427
23428 $as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
23429
23430
23431
23432
23433
23434
23435
23436
23437
23438
23439
23440
23441
23442
23443
23444 if case "$host_os" in
23445 mingw*) true ;;
23446 *) test $ac_cv_func_mbsinit = yes ;;
23447 esac \
23448 && test $ac_cv_func_mbrtowc = yes; then
23449
23450
23451
23452
23453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
23454 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
23455 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
23456 $as_echo_n "(cached) " >&6
23457 else
23458
23459 case "$host_os" in
23460 # Guess no on AIX and OSF/1.
23461 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
23462 # Guess yes otherwise.
23463 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
23464 esac
23465 if test $LOCALE_JA != none; then
23466 if test "$cross_compiling" = yes; then :
23467 :
23468 else
23469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23470 /* end confdefs.h. */
23471
23472 #include <locale.h>
23473 #include <string.h>
23474 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23475 <wchar.h>.
23476 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23477 included before <wchar.h>. */
23478 #include <stddef.h>
23479 #include <stdio.h>
23480 #include <time.h>
23481 #include <wchar.h>
23482 int main ()
23483 {
23484 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
23485 {
23486 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
23487 mbstate_t state;
23488 wchar_t wc;
23489
23490 memset (&state, '\0', sizeof (mbstate_t));
23491 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
23492 if (mbsinit (&state))
23493 return 2;
23494 }
23495 return 0;
23496 }
23497 _ACEOF
23498 if ac_fn_c_try_run "$LINENO"; then :
23499 gl_cv_func_mbrtowc_incomplete_state=yes
23500 else
23501 gl_cv_func_mbrtowc_incomplete_state=no
23502 fi
23503 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23504 conftest.$ac_objext conftest.beam conftest.$ac_ext
23505 fi
23506
23507 else
23508 if test $LOCALE_FR_UTF8 != none; then
23509 if test "$cross_compiling" = yes; then :
23510 :
23511 else
23512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23513 /* end confdefs.h. */
23514
23515 #include <locale.h>
23516 #include <string.h>
23517 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23518 <wchar.h>.
23519 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23520 included before <wchar.h>. */
23521 #include <stddef.h>
23522 #include <stdio.h>
23523 #include <time.h>
23524 #include <wchar.h>
23525 int main ()
23526 {
23527 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
23528 {
23529 const char input[] = "B\303\274\303\237er"; /* "Büßer" */
23530 mbstate_t state;
23531 wchar_t wc;
23532
23533 memset (&state, '\0', sizeof (mbstate_t));
23534 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
23535 if (mbsinit (&state))
23536 return 2;
23537 }
23538 return 0;
23539 }
23540 _ACEOF
23541 if ac_fn_c_try_run "$LINENO"; then :
23542 gl_cv_func_mbrtowc_incomplete_state=yes
23543 else
23544 gl_cv_func_mbrtowc_incomplete_state=no
23545 fi
23546 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23547 conftest.$ac_objext conftest.beam conftest.$ac_ext
23548 fi
23549
23550 fi
23551 fi
23552
23553 fi
23554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
23555 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
23556
23557
23558
23559
23560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
23561 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
23562 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
23563 $as_echo_n "(cached) " >&6
23564 else
23565
23566 case "$host_os" in
23567 # Guess no on Solaris 8.
23568 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
23569 # Guess yes otherwise.
23570 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
23571 esac
23572 if test $LOCALE_ZH_CN != none; then
23573 if test "$cross_compiling" = yes; then :
23574 :
23575 else
23576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23577 /* end confdefs.h. */
23578
23579 #include <locale.h>
23580 #include <stdlib.h>
23581 #include <string.h>
23582 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23583 <wchar.h>.
23584 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23585 included before <wchar.h>. */
23586 #include <stddef.h>
23587 #include <stdio.h>
23588 #include <time.h>
23589 #include <wchar.h>
23590 int main ()
23591 {
23592 /* This fails on Solaris 8:
23593 mbrtowc returns 2, and sets wc to 0x00F0.
23594 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
23595 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
23596 {
23597 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
23598 mbstate_t state;
23599 wchar_t wc;
23600
23601 memset (&state, '\0', sizeof (mbstate_t));
23602 if (mbrtowc (&wc, input + 3, 6, &state) != 4
23603 && mbtowc (&wc, input + 3, 6) == 4)
23604 return 2;
23605 }
23606 return 0;
23607 }
23608 _ACEOF
23609 if ac_fn_c_try_run "$LINENO"; then :
23610 gl_cv_func_mbrtowc_sanitycheck=yes
23611 else
23612 gl_cv_func_mbrtowc_sanitycheck=no
23613 fi
23614 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23615 conftest.$ac_objext conftest.beam conftest.$ac_ext
23616 fi
23617
23618 fi
23619
23620 fi
23621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
23622 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
23623
23624 REPLACE_MBSTATE_T=0
23625 case "$gl_cv_func_mbrtowc_incomplete_state" in
23626 *yes) ;;
23627 *) REPLACE_MBSTATE_T=1 ;;
23628 esac
23629 case "$gl_cv_func_mbrtowc_sanitycheck" in
23630 *yes) ;;
23631 *) REPLACE_MBSTATE_T=1 ;;
23632 esac
23633 else
23634 REPLACE_MBSTATE_T=1
23635 fi
23636
23637
23638
23639 if test $ac_cv_func_mbsinit = no; then
23640 HAVE_MBSINIT=0
23641 ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
23642 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23643 <wchar.h>.
23644 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23645 included before <wchar.h>. */
23646 #include <stddef.h>
23647 #include <stdio.h>
23648 #include <time.h>
23649 #include <wchar.h>
23650
23651 "
23652 if test "x$ac_cv_have_decl_mbsinit" = xyes; then :
23653 ac_have_decl=1
23654 else
23655 ac_have_decl=0
23656 fi
23657
23658 cat >>confdefs.h <<_ACEOF
23659 #define HAVE_DECL_MBSINIT $ac_have_decl
23660 _ACEOF
23661
23662 if test $ac_cv_have_decl_mbsinit = yes; then
23663 REPLACE_MBSINIT=1
23664 fi
23665 else
23666 if test $REPLACE_MBSTATE_T = 1; then
23667 REPLACE_MBSINIT=1
23668 else
23669 case "$host_os" in
23670 mingw*) REPLACE_MBSINIT=1 ;;
23671 esac
23672 fi
23673 fi
23674
23675 if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
23676
23677
23678
23679
23680
23681
23682
23683
23684 gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
23685
23686
23687 :
23688
23689 fi
23690
23691
23692
23693
23694
23695 GNULIB_MBSINIT=1
23696
23697
23698
23699
23700
23701 $as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
23702
23703
23704
23705
23706
23707
23708
23709
23710
23711
23712
23713
23714
23715
23716 if case "$host_os" in
23717 mingw*) true ;;
23718 *) test $ac_cv_func_mbsinit = yes ;;
23719 esac \
23720 && test $ac_cv_func_mbrtowc = yes; then
23721
23722
23723
23724
23725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
23726 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
23727 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
23728 $as_echo_n "(cached) " >&6
23729 else
23730
23731 case "$host_os" in
23732 # Guess no on AIX and OSF/1.
23733 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
23734 # Guess yes otherwise.
23735 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
23736 esac
23737 if test $LOCALE_JA != none; then
23738 if test "$cross_compiling" = yes; then :
23739 :
23740 else
23741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23742 /* end confdefs.h. */
23743
23744 #include <locale.h>
23745 #include <string.h>
23746 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23747 <wchar.h>.
23748 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23749 included before <wchar.h>. */
23750 #include <stddef.h>
23751 #include <stdio.h>
23752 #include <time.h>
23753 #include <wchar.h>
23754 int main ()
23755 {
23756 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
23757 {
23758 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
23759 mbstate_t state;
23760 wchar_t wc;
23761
23762 memset (&state, '\0', sizeof (mbstate_t));
23763 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
23764 if (mbsinit (&state))
23765 return 2;
23766 }
23767 return 0;
23768 }
23769 _ACEOF
23770 if ac_fn_c_try_run "$LINENO"; then :
23771 gl_cv_func_mbrtowc_incomplete_state=yes
23772 else
23773 gl_cv_func_mbrtowc_incomplete_state=no
23774 fi
23775 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23776 conftest.$ac_objext conftest.beam conftest.$ac_ext
23777 fi
23778
23779 else
23780 if test $LOCALE_FR_UTF8 != none; then
23781 if test "$cross_compiling" = yes; then :
23782 :
23783 else
23784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23785 /* end confdefs.h. */
23786
23787 #include <locale.h>
23788 #include <string.h>
23789 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23790 <wchar.h>.
23791 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23792 included before <wchar.h>. */
23793 #include <stddef.h>
23794 #include <stdio.h>
23795 #include <time.h>
23796 #include <wchar.h>
23797 int main ()
23798 {
23799 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
23800 {
23801 const char input[] = "B\303\274\303\237er"; /* "Büßer" */
23802 mbstate_t state;
23803 wchar_t wc;
23804
23805 memset (&state, '\0', sizeof (mbstate_t));
23806 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
23807 if (mbsinit (&state))
23808 return 2;
23809 }
23810 return 0;
23811 }
23812 _ACEOF
23813 if ac_fn_c_try_run "$LINENO"; then :
23814 gl_cv_func_mbrtowc_incomplete_state=yes
23815 else
23816 gl_cv_func_mbrtowc_incomplete_state=no
23817 fi
23818 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23819 conftest.$ac_objext conftest.beam conftest.$ac_ext
23820 fi
23821
23822 fi
23823 fi
23824
23825 fi
23826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
23827 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
23828
23829
23830
23831
23832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
23833 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
23834 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
23835 $as_echo_n "(cached) " >&6
23836 else
23837
23838 case "$host_os" in
23839 # Guess no on Solaris 8.
23840 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
23841 # Guess yes otherwise.
23842 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
23843 esac
23844 if test $LOCALE_ZH_CN != none; then
23845 if test "$cross_compiling" = yes; then :
23846 :
23847 else
23848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23849 /* end confdefs.h. */
23850
23851 #include <locale.h>
23852 #include <stdlib.h>
23853 #include <string.h>
23854 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23855 <wchar.h>.
23856 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23857 included before <wchar.h>. */
23858 #include <stddef.h>
23859 #include <stdio.h>
23860 #include <time.h>
23861 #include <wchar.h>
23862 int main ()
23863 {
23864 /* This fails on Solaris 8:
23865 mbrtowc returns 2, and sets wc to 0x00F0.
23866 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
23867 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
23868 {
23869 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
23870 mbstate_t state;
23871 wchar_t wc;
23872
23873 memset (&state, '\0', sizeof (mbstate_t));
23874 if (mbrtowc (&wc, input + 3, 6, &state) != 4
23875 && mbtowc (&wc, input + 3, 6) == 4)
23876 return 2;
23877 }
23878 return 0;
23879 }
23880 _ACEOF
23881 if ac_fn_c_try_run "$LINENO"; then :
23882 gl_cv_func_mbrtowc_sanitycheck=yes
23883 else
23884 gl_cv_func_mbrtowc_sanitycheck=no
23885 fi
23886 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23887 conftest.$ac_objext conftest.beam conftest.$ac_ext
23888 fi
23889
23890 fi
23891
23892 fi
23893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
23894 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
23895
23896 REPLACE_MBSTATE_T=0
23897 case "$gl_cv_func_mbrtowc_incomplete_state" in
23898 *yes) ;;
23899 *) REPLACE_MBSTATE_T=1 ;;
23900 esac
23901 case "$gl_cv_func_mbrtowc_sanitycheck" in
23902 *yes) ;;
23903 *) REPLACE_MBSTATE_T=1 ;;
23904 esac
23905 else
23906 REPLACE_MBSTATE_T=1
23907 fi
23908
23909
23910
23911 if test $ac_cv_func_mbsrtowcs = no; then
23912 HAVE_MBSRTOWCS=0
23913 ac_fn_c_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" "
23914 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23915 <wchar.h>.
23916 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23917 included before <wchar.h>. */
23918 #include <stddef.h>
23919 #include <stdio.h>
23920 #include <time.h>
23921 #include <wchar.h>
23922
23923 "
23924 if test "x$ac_cv_have_decl_mbsrtowcs" = xyes; then :
23925 ac_have_decl=1
23926 else
23927 ac_have_decl=0
23928 fi
23929
23930 cat >>confdefs.h <<_ACEOF
23931 #define HAVE_DECL_MBSRTOWCS $ac_have_decl
23932 _ACEOF
23933
23934 if test $ac_cv_have_decl_mbsrtowcs = yes; then
23935 REPLACE_MBSRTOWCS=1
23936 fi
23937 else
23938 if test $REPLACE_MBSTATE_T = 1; then
23939 REPLACE_MBSRTOWCS=1
23940 else
23941
23942
23943
23944
23945
23946
23947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5
23948 $as_echo_n "checking whether mbsrtowcs works... " >&6; }
23949 if ${gl_cv_func_mbsrtowcs_works+:} false; then :
23950 $as_echo_n "(cached) " >&6
23951 else
23952
23953 case "$host_os" in
23954 # Guess no on HP-UX, Solaris, mingw.
23955 hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;;
23956 # Guess yes otherwise.
23957 *) gl_cv_func_mbsrtowcs_works="guessing yes" ;;
23958 esac
23959 if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
23960 if test "$cross_compiling" = yes; then :
23961 :
23962 else
23963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23964 /* end confdefs.h. */
23965
23966 #include <locale.h>
23967 #include <string.h>
23968 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23969 <wchar.h>.
23970 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23971 included before <wchar.h>. */
23972 #include <stddef.h>
23973 #include <stdio.h>
23974 #include <time.h>
23975 #include <wchar.h>
23976 int main ()
23977 {
23978 int result = 0;
23979 /* Test whether the function supports a NULL destination argument.
23980 This fails on native Windows. */
23981 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
23982 {
23983 const char input[] = "\337er";
23984 const char *src = input;
23985 mbstate_t state;
23986
23987 memset (&state, '\0', sizeof (mbstate_t));
23988 if (mbsrtowcs (NULL, &src, 1, &state) != 3
23989 || src != input)
23990 result |= 1;
23991 }
23992 /* Test whether the function works when started with a conversion state
23993 in non-initial state. This fails on HP-UX 11.11 and Solaris 10. */
23994 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
23995 {
23996 const char input[] = "B\303\274\303\237er";
23997 mbstate_t state;
23998
23999 memset (&state, '\0', sizeof (mbstate_t));
24000 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
24001 if (!mbsinit (&state))
24002 {
24003 const char *src = input + 2;
24004 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
24005 result |= 2;
24006 }
24007 }
24008 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
24009 {
24010 const char input[] = "<\306\374\313\334\270\354>";
24011 mbstate_t state;
24012
24013 memset (&state, '\0', sizeof (mbstate_t));
24014 if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2))
24015 if (!mbsinit (&state))
24016 {
24017 const char *src = input + 4;
24018 if (mbsrtowcs (NULL, &src, 10, &state) != 3)
24019 result |= 4;
24020 }
24021 }
24022 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
24023 {
24024 const char input[] = "B\250\271\201\060\211\070er";
24025 mbstate_t state;
24026
24027 memset (&state, '\0', sizeof (mbstate_t));
24028 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
24029 if (!mbsinit (&state))
24030 {
24031 const char *src = input + 2;
24032 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
24033 result |= 8;
24034 }
24035 }
24036 return result;
24037 }
24038 _ACEOF
24039 if ac_fn_c_try_run "$LINENO"; then :
24040 gl_cv_func_mbsrtowcs_works=yes
24041 else
24042 gl_cv_func_mbsrtowcs_works=no
24043 fi
24044 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24045 conftest.$ac_objext conftest.beam conftest.$ac_ext
24046 fi
24047
24048 fi
24049
24050 fi
24051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5
24052 $as_echo "$gl_cv_func_mbsrtowcs_works" >&6; }
24053
24054 case "$gl_cv_func_mbsrtowcs_works" in
24055 *yes) ;;
24056 *) REPLACE_MBSRTOWCS=1 ;;
24057 esac
24058 fi
24059 fi
24060
24061 if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
24062
24063
24064
24065
24066
24067
24068
24069
24070 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs.$ac_objext"
24071
24072
24073
24074
24075
24076
24077
24078
24079
24080 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext"
24081
24082
24083 :
24084
24085 fi
24086
24087
24088
24089
24090
24091 GNULIB_MBSRTOWCS=1
24092
24093
24094
24095
24096
24097 $as_echo "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h
24098
24099
24100
24101
24102 if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
24103
24104
24105
24106
24107
24108
24109
24110
24111 gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
24112
24113
24114 for ac_header in bp-sym.h
24115 do :
24116 ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
24117 if test "x$ac_cv_header_bp_sym_h" = xyes; then :
24118 cat >>confdefs.h <<_ACEOF
24119 #define HAVE_BP_SYM_H 1
24120 _ACEOF
24121
24122 fi
24123
24124 done
24125
24126
24127 fi
24128
24129
24130
24131
24132
24133 GNULIB_MEMCHR=1
24134
24135
24136
24137
24138
24139 $as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
24140
24141
24142
24143
24144
24145 if test $HAVE_DECL_MEMMEM = 1 && test $REPLACE_MEMMEM = 0; then
24146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works in linear time" >&5
24147 $as_echo_n "checking whether memmem works in linear time... " >&6; }
24148 if ${gl_cv_func_memmem_works_fast+:} false; then :
24149 $as_echo_n "(cached) " >&6
24150 else
24151 if test "$cross_compiling" = yes; then :
24152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24153 /* end confdefs.h. */
24154
24155 #include <features.h>
24156 #ifdef __GNU_LIBRARY__
24157 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2)) \
24158 && !defined __UCLIBC__
24159 Lucky user
24160 #endif
24161 #endif
24162 #ifdef __CYGWIN__
24163 #include <cygwin/version.h>
24164 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 0)
24165 Lucky user
24166 #endif
24167 #endif
24168
24169 _ACEOF
24170 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24171 $EGREP "Lucky user" >/dev/null 2>&1; then :
24172 gl_cv_func_memmem_works_fast="guessing yes"
24173 else
24174 gl_cv_func_memmem_works_fast="$gl_cross_guess_normal"
24175 fi
24176 rm -f conftest*
24177
24178
24179 else
24180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24181 /* end confdefs.h. */
24182
24183 #include <signal.h> /* for signal */
24184 #include <string.h> /* for memmem */
24185 #include <stdlib.h> /* for malloc */
24186 #include <unistd.h> /* for alarm */
24187 static void quit (int sig) { _exit (sig + 128); }
24188
24189 int
24190 main ()
24191 {
24192
24193 int result = 0;
24194 size_t m = 1000000;
24195 char *haystack = (char *) malloc (2 * m + 1);
24196 char *needle = (char *) malloc (m + 1);
24197 /* Failure to compile this test due to missing alarm is okay,
24198 since all such platforms (mingw) also lack memmem. */
24199 signal (SIGALRM, quit);
24200 alarm (5);
24201 /* Check for quadratic performance. */
24202 if (haystack && needle)
24203 {
24204 memset (haystack, 'A', 2 * m);
24205 haystack[2 * m] = 'B';
24206 memset (needle, 'A', m);
24207 needle[m] = 'B';
24208 if (!memmem (haystack, 2 * m + 1, needle, m + 1))
24209 result |= 1;
24210 }
24211 /* Free allocated memory, in case some sanitizer is watching. */
24212 free (haystack);
24213 free (needle);
24214 return result;
24215
24216 ;
24217 return 0;
24218 }
24219 _ACEOF
24220 if ac_fn_c_try_run "$LINENO"; then :
24221 gl_cv_func_memmem_works_fast=yes
24222 else
24223 gl_cv_func_memmem_works_fast=no
24224 fi
24225 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24226 conftest.$ac_objext conftest.beam conftest.$ac_ext
24227 fi
24228
24229
24230 fi
24231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_fast" >&5
24232 $as_echo "$gl_cv_func_memmem_works_fast" >&6; }
24233 case "$gl_cv_func_memmem_works_fast" in
24234 *yes) ;;
24235 *)
24236 REPLACE_MEMMEM=1
24237 ;;
24238 esac
24239 fi
24240
24241 if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
24242
24243
24244
24245
24246
24247
24248
24249
24250 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
24251
24252 fi
24253
24254
24255
24256
24257 for ac_func in memmem
24258 do :
24259 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
24260 if test "x$ac_cv_func_memmem" = xyes; then :
24261 cat >>confdefs.h <<_ACEOF
24262 #define HAVE_MEMMEM 1
24263 _ACEOF
24264
24265 fi
24266 done
24267
24268 if test $ac_cv_func_memmem = yes; then
24269 HAVE_MEMMEM=1
24270 else
24271 HAVE_MEMMEM=0
24272 fi
24273
24274 if test $ac_cv_have_decl_memmem = no; then
24275 HAVE_DECL_MEMMEM=0
24276 else
24277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
24278 $as_echo_n "checking whether memmem works... " >&6; }
24279 if ${gl_cv_func_memmem_works_always+:} false; then :
24280 $as_echo_n "(cached) " >&6
24281 else
24282 if test "$cross_compiling" = yes; then :
24283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24284 /* end confdefs.h. */
24285
24286 #ifdef __GNU_LIBRARY__
24287 #include <features.h>
24288 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
24289 || __GLIBC_MINOR__ > 12)) \
24290 || (__GLIBC__ > 2)) \
24291 || defined __UCLIBC__
24292 Lucky user
24293 #endif
24294 #elif defined __CYGWIN__
24295 #include <cygwin/version.h>
24296 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
24297 Lucky user
24298 #endif
24299 #else
24300 Lucky user
24301 #endif
24302
24303 _ACEOF
24304 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24305 $EGREP "Lucky user" >/dev/null 2>&1; then :
24306 gl_cv_func_memmem_works_always="guessing yes"
24307 else
24308 gl_cv_func_memmem_works_always="$gl_cross_guess_normal"
24309 fi
24310 rm -f conftest*
24311
24312
24313 else
24314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24315 /* end confdefs.h. */
24316
24317 #include <string.h> /* for memmem */
24318 #define P "_EF_BF_BD"
24319 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
24320 #define NEEDLE P P P P P
24321
24322 int
24323 main ()
24324 {
24325
24326 int result = 0;
24327 if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
24328 result |= 1;
24329 /* Check for empty needle behavior. */
24330 {
24331 const char *haystack = "AAA";
24332 if (memmem (haystack, 3, NULL, 0) != haystack)
24333 result |= 2;
24334 }
24335 return result;
24336
24337 ;
24338 return 0;
24339 }
24340 _ACEOF
24341 if ac_fn_c_try_run "$LINENO"; then :
24342 gl_cv_func_memmem_works_always=yes
24343 else
24344 gl_cv_func_memmem_works_always=no
24345 fi
24346 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24347 conftest.$ac_objext conftest.beam conftest.$ac_ext
24348 fi
24349
24350
24351 fi
24352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
24353 $as_echo "$gl_cv_func_memmem_works_always" >&6; }
24354 case "$gl_cv_func_memmem_works_always" in
24355 *yes) ;;
24356 *)
24357 REPLACE_MEMMEM=1
24358 ;;
24359 esac
24360 fi
24361 :
24362
24363 if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
24364
24365
24366
24367
24368
24369
24370
24371
24372 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
24373
24374 fi
24375
24376
24377
24378
24379
24380 GNULIB_MEMMEM=1
24381
24382
24383
24384
24385
24386 $as_echo "#define GNULIB_TEST_MEMMEM 1" >>confdefs.h
24387
24388
24389
24390
24391
24392
24393
24394
24395
24396 for ac_func in mempcpy
24397 do :
24398 ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
24399 if test "x$ac_cv_func_mempcpy" = xyes; then :
24400 cat >>confdefs.h <<_ACEOF
24401 #define HAVE_MEMPCPY 1
24402 _ACEOF
24403
24404 fi
24405 done
24406
24407 if test $ac_cv_func_mempcpy = no; then
24408 HAVE_MEMPCPY=0
24409 fi
24410
24411 if test $HAVE_MEMPCPY = 0; then
24412
24413
24414
24415
24416
24417
24418
24419
24420 gl_LIBOBJS="$gl_LIBOBJS mempcpy.$ac_objext"
24421
24422
24423 :
24424
24425 fi
24426
24427
24428
24429
24430
24431 GNULIB_MEMPCPY=1
24432
24433
24434
24435
24436
24437 $as_echo "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h
24438
24439
24440
24441
24442
24443
24444
24445
24446 if test $ac_cv_have_decl_memrchr = no; then
24447 HAVE_DECL_MEMRCHR=0
24448 fi
24449
24450 for ac_func in memrchr
24451 do :
24452 ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
24453 if test "x$ac_cv_func_memrchr" = xyes; then :
24454 cat >>confdefs.h <<_ACEOF
24455 #define HAVE_MEMRCHR 1
24456 _ACEOF
24457
24458 fi
24459 done
24460
24461
24462 if test $ac_cv_func_memrchr = no; then
24463
24464
24465
24466
24467
24468
24469
24470
24471 gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
24472
24473 :
24474 fi
24475
24476
24477
24478
24479
24480 GNULIB_MEMRCHR=1
24481
24482
24483
24484
24485
24486 $as_echo "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h
24487
24488
24489
24490
24491
24492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing slash" >&5
24493 $as_echo_n "checking whether mkdir handles trailing slash... " >&6; }
24494 if ${gl_cv_func_mkdir_trailing_slash_works+:} false; then :
24495 $as_echo_n "(cached) " >&6
24496 else
24497 rm -rf conftest.dir
24498 if test "$cross_compiling" = yes; then :
24499 case "$host_os" in
24500 # Guess yes on Linux systems.
24501 linux-* | linux) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
24502 # Guess yes on glibc systems.
24503 *-gnu* | gnu*) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
24504 # Guess yes on MSVC, no on mingw.
24505 mingw*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24506 /* end confdefs.h. */
24507
24508 #ifdef _MSC_VER
24509 Known
24510 #endif
24511
24512 _ACEOF
24513 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24514 $EGREP "Known" >/dev/null 2>&1; then :
24515 gl_cv_func_mkdir_trailing_slash_works="guessing yes"
24516 else
24517 gl_cv_func_mkdir_trailing_slash_works="guessing no"
24518 fi
24519 rm -f conftest*
24520
24521 ;;
24522 # If we don't know, obey --enable-cross-guesses.
24523 *) gl_cv_func_mkdir_trailing_slash_works="$gl_cross_guess_normal" ;;
24524 esac
24525
24526 else
24527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24528 /* end confdefs.h. */
24529
24530 # include <sys/types.h>
24531 # include <sys/stat.h>
24532
24533 int
24534 main ()
24535 {
24536 return mkdir ("conftest.dir/", 0700);
24537 ;
24538 return 0;
24539 }
24540 _ACEOF
24541 if ac_fn_c_try_run "$LINENO"; then :
24542 gl_cv_func_mkdir_trailing_slash_works=yes
24543 else
24544 gl_cv_func_mkdir_trailing_slash_works=no
24545 fi
24546 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24547 conftest.$ac_objext conftest.beam conftest.$ac_ext
24548 fi
24549
24550 rm -rf conftest.dir
24551
24552
24553 fi
24554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_slash_works" >&5
24555 $as_echo "$gl_cv_func_mkdir_trailing_slash_works" >&6; }
24556 case "$gl_cv_func_mkdir_trailing_slash_works" in
24557 *yes) ;;
24558 *)
24559 REPLACE_MKDIR=1
24560 ;;
24561 esac
24562
24563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing dot" >&5
24564 $as_echo_n "checking whether mkdir handles trailing dot... " >&6; }
24565 if ${gl_cv_func_mkdir_trailing_dot_works+:} false; then :
24566 $as_echo_n "(cached) " >&6
24567 else
24568 rm -rf conftest.dir
24569 if test "$cross_compiling" = yes; then :
24570 case "$host_os" in
24571 # Guess yes on glibc systems.
24572 *-gnu* | gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
24573 # Guess yes on musl systems.
24574 *-musl*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
24575 # Guess no on native Windows.
24576 mingw*) gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
24577 # If we don't know, obey --enable-cross-guesses.
24578 *) gl_cv_func_mkdir_trailing_dot_works="$gl_cross_guess_normal" ;;
24579 esac
24580
24581 else
24582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24583 /* end confdefs.h. */
24584
24585 # include <sys/types.h>
24586 # include <sys/stat.h>
24587
24588 int
24589 main ()
24590 {
24591 return !mkdir ("conftest.dir/./", 0700);
24592 ;
24593 return 0;
24594 }
24595 _ACEOF
24596 if ac_fn_c_try_run "$LINENO"; then :
24597 gl_cv_func_mkdir_trailing_dot_works=yes
24598 else
24599 gl_cv_func_mkdir_trailing_dot_works=no
24600 fi
24601 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24602 conftest.$ac_objext conftest.beam conftest.$ac_ext
24603 fi
24604
24605 rm -rf conftest.dir
24606
24607
24608 fi
24609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_dot_works" >&5
24610 $as_echo "$gl_cv_func_mkdir_trailing_dot_works" >&6; }
24611 case "$gl_cv_func_mkdir_trailing_dot_works" in
24612 *yes) ;;
24613 *)
24614 REPLACE_MKDIR=1
24615
24616 $as_echo "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h
24617
24618 ;;
24619 esac
24620
24621 if test $REPLACE_MKDIR = 1; then
24622
24623
24624
24625
24626
24627
24628
24629
24630 gl_LIBOBJS="$gl_LIBOBJS mkdir.$ac_objext"
24631
24632 fi
24633
24634
24635 for ac_func in mkdtemp
24636 do :
24637 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
24638 if test "x$ac_cv_func_mkdtemp" = xyes; then :
24639 cat >>confdefs.h <<_ACEOF
24640 #define HAVE_MKDTEMP 1
24641 _ACEOF
24642
24643 fi
24644 done
24645
24646 if test $ac_cv_func_mkdtemp = no; then
24647 HAVE_MKDTEMP=0
24648 fi
24649
24650 if test $HAVE_MKDTEMP = 0; then
24651
24652
24653
24654
24655
24656
24657
24658
24659 gl_LIBOBJS="$gl_LIBOBJS mkdtemp.$ac_objext"
24660
24661 :
24662
24663 fi
24664
24665
24666
24667
24668
24669 GNULIB_MKDTEMP=1
24670
24671
24672
24673
24674
24675 $as_echo "#define GNULIB_TEST_MKDTEMP 1" >>confdefs.h
24676
24677
24678
24679
24680
24681
24682
24683
24684
24685 if test $ac_cv_func_mkostemp != yes; then
24686 HAVE_MKOSTEMP=0
24687 fi
24688
24689 if test $HAVE_MKOSTEMP = 0; then
24690
24691
24692
24693
24694
24695
24696
24697
24698 gl_LIBOBJS="$gl_LIBOBJS mkostemp.$ac_objext"
24699
24700
24701
24702 fi
24703
24704
24705 cat >>confdefs.h <<_ACEOF
24706 #define GNULIB_MKOSTEMP 1
24707 _ACEOF
24708
24709
24710
24711
24712
24713
24714
24715 GNULIB_MKOSTEMP=1
24716
24717
24718
24719
24720
24721 $as_echo "#define GNULIB_TEST_MKOSTEMP 1" >>confdefs.h
24722
24723
24724
24725
24726 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
24727
24728
24729
24730
24731
24732
24733
24734
24735 gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
24736
24737 fi
24738
24739 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
24740
24741
24742
24743
24744
24745
24746
24747
24748 gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
24749
24750 fi
24751
24752
24753 cat >>confdefs.h <<_ACEOF
24754 #define GNULIB_MSVC_NOTHROW 1
24755 _ACEOF
24756
24757
24758
24759
24760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <netinet/in.h> is self-contained" >&5
24761 $as_echo_n "checking whether <netinet/in.h> is self-contained... " >&6; }
24762 if ${gl_cv_header_netinet_in_h_selfcontained+:} false; then :
24763 $as_echo_n "(cached) " >&6
24764 else
24765
24766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24767 /* end confdefs.h. */
24768 #include <netinet/in.h>
24769 int
24770 main ()
24771 {
24772
24773 ;
24774 return 0;
24775 }
24776 _ACEOF
24777 if ac_fn_c_try_compile "$LINENO"; then :
24778 gl_cv_header_netinet_in_h_selfcontained=yes
24779 else
24780 gl_cv_header_netinet_in_h_selfcontained=no
24781 fi
24782 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24783
24784 fi
24785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_netinet_in_h_selfcontained" >&5
24786 $as_echo "$gl_cv_header_netinet_in_h_selfcontained" >&6; }
24787 if test $gl_cv_header_netinet_in_h_selfcontained = yes; then
24788 NETINET_IN_H=''
24789 else
24790 NETINET_IN_H='netinet/in.h'
24791 for ac_header in netinet/in.h
24792 do :
24793 ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
24794 if test "x$ac_cv_header_netinet_in_h" = xyes; then :
24795 cat >>confdefs.h <<_ACEOF
24796 #define HAVE_NETINET_IN_H 1
24797 _ACEOF
24798
24799 fi
24800
24801 done
24802
24803
24804
24805
24806
24807
24808
24809
24810
24811
24812 if test $gl_cv_have_include_next = yes; then
24813 gl_cv_next_netinet_in_h='<'netinet/in.h'>'
24814 else
24815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <netinet/in.h>" >&5
24816 $as_echo_n "checking absolute name of <netinet/in.h>... " >&6; }
24817 if ${gl_cv_next_netinet_in_h+:} false; then :
24818 $as_echo_n "(cached) " >&6
24819 else
24820
24821 if test $ac_cv_header_netinet_in_h = yes; then
24822
24823
24824
24825
24826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24827 /* end confdefs.h. */
24828 #include <netinet/in.h>
24829 _ACEOF
24830 case "$host_os" in
24831 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24832 *) gl_absname_cpp="$ac_cpp" ;;
24833 esac
24834
24835 case "$host_os" in
24836 mingw*)
24837 gl_dirsep_regex='[/\\]'
24838 ;;
24839 *)
24840 gl_dirsep_regex='\/'
24841 ;;
24842 esac
24843 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24844 gl_header_literal_regex=`echo 'netinet/in.h' \
24845 | sed -e "$gl_make_literal_regex_sed"`
24846 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24847 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24848 s|^/[^/]|//&|
24849 p
24850 q
24851 }'
24852
24853 gl_cv_absolute_netinet_in_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24854 sed -n "$gl_absolute_header_sed"`
24855
24856 gl_header=$gl_cv_absolute_netinet_in_h
24857 gl_cv_next_netinet_in_h='"'$gl_header'"'
24858 else
24859 gl_cv_next_netinet_in_h='<'netinet/in.h'>'
24860 fi
24861
24862
24863 fi
24864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_netinet_in_h" >&5
24865 $as_echo "$gl_cv_next_netinet_in_h" >&6; }
24866 fi
24867 NEXT_NETINET_IN_H=$gl_cv_next_netinet_in_h
24868
24869 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24870 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24871 gl_next_as_first_directive='<'netinet/in.h'>'
24872 else
24873 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24874 gl_next_as_first_directive=$gl_cv_next_netinet_in_h
24875 fi
24876 NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H=$gl_next_as_first_directive
24877
24878
24879
24880
24881 if test $ac_cv_header_netinet_in_h = yes; then
24882 HAVE_NETINET_IN_H=1
24883 else
24884 HAVE_NETINET_IN_H=0
24885 fi
24886
24887 fi
24888
24889 if test -n "$NETINET_IN_H"; then
24890 GL_GENERATE_NETINET_IN_H_TRUE=
24891 GL_GENERATE_NETINET_IN_H_FALSE='#'
24892 else
24893 GL_GENERATE_NETINET_IN_H_TRUE='#'
24894 GL_GENERATE_NETINET_IN_H_FALSE=
24895 fi
24896
24897
24898
24899
24900
24901
24902 case "$host_os" in
24903 mingw* | pw*)
24904 REPLACE_OPEN=1
24905 ;;
24906 *)
24907
24908 if test "$gl_cv_macro_O_CLOEXEC" != yes; then
24909 REPLACE_OPEN=1
24910 fi
24911
24912
24913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
24914 $as_echo_n "checking whether open recognizes a trailing slash... " >&6; }
24915 if ${gl_cv_func_open_slash+:} false; then :
24916 $as_echo_n "(cached) " >&6
24917 else
24918 # Assume that if we have lstat, we can also check symlinks.
24919 if test $ac_cv_func_lstat = yes; then
24920 touch conftest.tmp
24921 ln -s conftest.tmp conftest.lnk
24922 fi
24923 if test "$cross_compiling" = yes; then :
24924
24925 case "$host_os" in
24926 freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
24927 gl_cv_func_open_slash="guessing no" ;;
24928 *)
24929 gl_cv_func_open_slash="guessing yes" ;;
24930 esac
24931
24932 else
24933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24934 /* end confdefs.h. */
24935
24936 #include <fcntl.h>
24937 #if HAVE_UNISTD_H
24938 # include <unistd.h>
24939 #endif
24940 int main ()
24941 {
24942 int result = 0;
24943 #if HAVE_LSTAT
24944 if (open ("conftest.lnk/", O_RDONLY) != -1)
24945 result |= 1;
24946 #endif
24947 if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
24948 result |= 2;
24949 return result;
24950 }
24951 _ACEOF
24952 if ac_fn_c_try_run "$LINENO"; then :
24953 gl_cv_func_open_slash=yes
24954 else
24955 gl_cv_func_open_slash=no
24956 fi
24957 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24958 conftest.$ac_objext conftest.beam conftest.$ac_ext
24959 fi
24960
24961 rm -f conftest.sl conftest.tmp conftest.lnk
24962
24963 fi
24964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
24965 $as_echo "$gl_cv_func_open_slash" >&6; }
24966 case "$gl_cv_func_open_slash" in
24967 *no)
24968
24969 $as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
24970
24971 ;;
24972 esac
24973
24974 case "$gl_cv_func_open_slash" in
24975 *no)
24976 REPLACE_OPEN=1
24977 ;;
24978 esac
24979 ;;
24980 esac
24981
24982 if test $REPLACE_OPEN = 0; then
24983
24984
24985
24986 if test $ac_cv_func_fchdir = no; then
24987 HAVE_FCHDIR=0
24988 fi
24989
24990 if test $HAVE_FCHDIR = 0; then
24991 REPLACE_OPEN=1
24992 fi
24993 fi
24994
24995
24996
24997 if test $REPLACE_OPEN = 1; then
24998
24999
25000
25001
25002
25003
25004
25005
25006 gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
25007
25008
25009
25010 :
25011
25012 fi
25013
25014
25015
25016
25017
25018 GNULIB_OPEN=1
25019
25020
25021
25022
25023
25024 $as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h
25025
25026
25027
25028
25029
25030
25031
25032
25033
25034 case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink+$gl_cv_macro_O_CLOEXEC in
25035 yes+*yes+yes)
25036 ;;
25037 yes+*)
25038 # Solaris 10 lacks O_CLOEXEC.
25039 # Solaris 9 has *at functions, but uniformly mishandles trailing
25040 # slash in all of them.
25041 REPLACE_OPENAT=1
25042 ;;
25043 *)
25044 HAVE_OPENAT=0
25045 ;;
25046 esac
25047
25048 if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then
25049
25050
25051
25052
25053
25054
25055
25056
25057 gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext"
25058
25059
25060
25061 :
25062
25063 fi
25064
25065
25066 cat >>confdefs.h <<_ACEOF
25067 #define GNULIB_OPENAT 1
25068 _ACEOF
25069
25070
25071
25072
25073
25074
25075 GNULIB_OPENAT=1
25076
25077
25078
25079
25080
25081 $as_echo "#define GNULIB_TEST_OPENAT 1" >>confdefs.h
25082
25083
25084
25085
25086
25087
25088 for ac_func in opendir
25089 do :
25090 ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
25091 if test "x$ac_cv_func_opendir" = xyes; then :
25092 cat >>confdefs.h <<_ACEOF
25093 #define HAVE_OPENDIR 1
25094 _ACEOF
25095
25096 fi
25097 done
25098
25099 if test $ac_cv_func_opendir = no; then
25100 HAVE_OPENDIR=0
25101 fi
25102
25103
25104
25105
25106 if test $ac_cv_func_fchdir = no; then
25107 HAVE_FCHDIR=0
25108 fi
25109
25110 if test $HAVE_FCHDIR = 0; then
25111 if test $HAVE_OPENDIR = 1; then
25112 REPLACE_OPENDIR=1
25113 fi
25114 fi
25115
25116 case $host_os,$HAVE_OPENDIR in
25117 os2*,1)
25118 REPLACE_OPENDIR=1;;
25119 esac
25120
25121 if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
25122
25123
25124
25125
25126
25127
25128
25129
25130 gl_LIBOBJS="$gl_LIBOBJS opendir.$ac_objext"
25131
25132 fi
25133
25134
25135
25136
25137
25138 GNULIB_OPENDIR=1
25139
25140
25141
25142
25143
25144 $as_echo "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
25145
25146
25147
25148
25149
25150
25151
25152
25153
25154
25155 for ac_func in rawmemchr
25156 do :
25157 ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
25158 if test "x$ac_cv_func_rawmemchr" = xyes; then :
25159 cat >>confdefs.h <<_ACEOF
25160 #define HAVE_RAWMEMCHR 1
25161 _ACEOF
25162
25163 fi
25164 done
25165
25166 if test $ac_cv_func_rawmemchr = no; then
25167 HAVE_RAWMEMCHR=0
25168 fi
25169
25170 if test $HAVE_RAWMEMCHR = 0; then
25171
25172
25173
25174
25175
25176
25177
25178
25179 gl_LIBOBJS="$gl_LIBOBJS rawmemchr.$ac_objext"
25180
25181 :
25182 fi
25183
25184
25185
25186
25187
25188 GNULIB_RAWMEMCHR=1
25189
25190
25191
25192
25193
25194 $as_echo "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
25195
25196
25197
25198
25199
25200
25201 for ac_func in readdir
25202 do :
25203 ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir"
25204 if test "x$ac_cv_func_readdir" = xyes; then :
25205 cat >>confdefs.h <<_ACEOF
25206 #define HAVE_READDIR 1
25207 _ACEOF
25208
25209 fi
25210 done
25211
25212 if test $ac_cv_func_readdir = no; then
25213 HAVE_READDIR=0
25214 fi
25215
25216 if test $HAVE_READDIR = 0; then
25217
25218
25219
25220
25221
25222
25223
25224
25225 gl_LIBOBJS="$gl_LIBOBJS readdir.$ac_objext"
25226
25227 fi
25228
25229
25230
25231
25232
25233 GNULIB_READDIR=1
25234
25235
25236
25237
25238
25239 $as_echo "#define GNULIB_TEST_READDIR 1" >>confdefs.h
25240
25241
25242
25243
25244
25245
25246 if test $ac_cv_func_readlink = no; then
25247 HAVE_READLINK=0
25248 else
25249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
25250 $as_echo_n "checking whether readlink signature is correct... " >&6; }
25251 if ${gl_cv_decl_readlink_works+:} false; then :
25252 $as_echo_n "(cached) " >&6
25253 else
25254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25255 /* end confdefs.h. */
25256 #include <unistd.h>
25257 /* Cause compilation failure if original declaration has wrong type. */
25258 ssize_t readlink (const char *, char *, size_t);
25259 int
25260 main ()
25261 {
25262
25263 ;
25264 return 0;
25265 }
25266 _ACEOF
25267 if ac_fn_c_try_compile "$LINENO"; then :
25268 gl_cv_decl_readlink_works=yes
25269 else
25270 gl_cv_decl_readlink_works=no
25271 fi
25272 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25273 fi
25274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
25275 $as_echo "$gl_cv_decl_readlink_works" >&6; }
25276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
25277 $as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
25278 if ${gl_cv_func_readlink_works+:} false; then :
25279 $as_echo_n "(cached) " >&6
25280 else
25281 # We have readlink, so assume ln -s works.
25282 ln -s conftest.no-such conftest.link
25283 ln -s conftest.link conftest.lnk2
25284 if test "$cross_compiling" = yes; then :
25285 case "$host_os" in
25286 # Guess yes on Linux systems.
25287 linux-* | linux) gl_cv_func_readlink_works="guessing yes" ;;
25288 # Guess yes on glibc systems.
25289 *-gnu* | gnu*) gl_cv_func_readlink_works="guessing yes" ;;
25290 # If we don't know, obey --enable-cross-guesses.
25291 *) gl_cv_func_readlink_works="$gl_cross_guess_normal" ;;
25292 esac
25293
25294 else
25295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25296 /* end confdefs.h. */
25297 #include <unistd.h>
25298
25299 int
25300 main ()
25301 {
25302 char buf[20];
25303 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
25304 ;
25305 return 0;
25306 }
25307 _ACEOF
25308 if ac_fn_c_try_run "$LINENO"; then :
25309 gl_cv_func_readlink_works=yes
25310 else
25311 gl_cv_func_readlink_works=no
25312 fi
25313 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25314 conftest.$ac_objext conftest.beam conftest.$ac_ext
25315 fi
25316
25317 rm -f conftest.link conftest.lnk2
25318 fi
25319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
25320 $as_echo "$gl_cv_func_readlink_works" >&6; }
25321 case "$gl_cv_func_readlink_works" in
25322 *yes)
25323 if test "$gl_cv_decl_readlink_works" != yes; then
25324 REPLACE_READLINK=1
25325 fi
25326 ;;
25327 *)
25328
25329 $as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
25330
25331 REPLACE_READLINK=1
25332 ;;
25333 esac
25334 fi
25335
25336 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
25337
25338
25339
25340
25341
25342
25343
25344
25345 gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
25346
25347
25348 :
25349
25350 fi
25351
25352
25353
25354
25355
25356 GNULIB_READLINK=1
25357
25358
25359
25360
25361
25362 $as_echo "#define GNULIB_TEST_READLINK 1" >>confdefs.h
25363
25364
25365
25366
25367
25368
25369 if test $gl_cv_func_malloc_posix = yes; then
25370
25371 $as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h
25372
25373 else
25374 REPLACE_REALLOC=1
25375 fi
25376
25377 if test $REPLACE_REALLOC = 1; then
25378
25379
25380
25381
25382
25383
25384
25385
25386 gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
25387
25388 fi
25389
25390
25391
25392
25393
25394 GNULIB_REALLOC_POSIX=1
25395
25396
25397
25398
25399
25400 $as_echo "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
25401
25402
25403
25404
25405
25406
25407
25408
25409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on destination" >&5
25410 $as_echo_n "checking whether rename honors trailing slash on destination... " >&6; }
25411 if ${gl_cv_func_rename_slash_dst_works+:} false; then :
25412 $as_echo_n "(cached) " >&6
25413 else
25414 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
25415 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
25416 as_fn_error $? "cannot create temporary files" "$LINENO" 5
25417 # Assume that if we have lstat, we can also check symlinks.
25418 if test $ac_cv_func_lstat = yes; then
25419 ln -s conftest.f conftest.lnk
25420 fi
25421 if test "$cross_compiling" = yes; then :
25422 case "$host_os" in
25423 # Guess yes on Linux systems.
25424 linux-* | linux) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
25425 # Guess yes on glibc systems.
25426 *-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
25427 # Guess no on native Windows.
25428 mingw*) gl_cv_func_rename_slash_dst_works="guessing no" ;;
25429 # If we don't know, obey --enable-cross-guesses.
25430 *) gl_cv_func_rename_slash_dst_works="$gl_cross_guess_normal" ;;
25431 esac
25432
25433 else
25434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25435 /* end confdefs.h. */
25436
25437 # include <stdio.h>
25438 # include <stdlib.h>
25439
25440 int
25441 main ()
25442 {
25443 int result = 0;
25444 if (rename ("conftest.f1", "conftest.f2/") == 0)
25445 result |= 1;
25446 if (rename ("conftest.d1", "conftest.d2/") != 0)
25447 result |= 2;
25448 #if HAVE_LSTAT
25449 if (rename ("conftest.f", "conftest.lnk/") == 0)
25450 result |= 4;
25451 #endif
25452 return result;
25453
25454 ;
25455 return 0;
25456 }
25457 _ACEOF
25458 if ac_fn_c_try_run "$LINENO"; then :
25459 gl_cv_func_rename_slash_dst_works=yes
25460 else
25461 gl_cv_func_rename_slash_dst_works=no
25462 fi
25463 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25464 conftest.$ac_objext conftest.beam conftest.$ac_ext
25465 fi
25466
25467 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
25468
25469 fi
25470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_dst_works" >&5
25471 $as_echo "$gl_cv_func_rename_slash_dst_works" >&6; }
25472 case "$gl_cv_func_rename_slash_dst_works" in
25473 *yes) ;;
25474 *)
25475 REPLACE_RENAME=1
25476
25477 $as_echo "#define RENAME_TRAILING_SLASH_DEST_BUG 1" >>confdefs.h
25478
25479 ;;
25480 esac
25481
25482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on source" >&5
25483 $as_echo_n "checking whether rename honors trailing slash on source... " >&6; }
25484 if ${gl_cv_func_rename_slash_src_works+:} false; then :
25485 $as_echo_n "(cached) " >&6
25486 else
25487 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
25488 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
25489 as_fn_error $? "cannot create temporary files" "$LINENO" 5
25490 # Assume that if we have lstat, we can also check symlinks.
25491 if test $ac_cv_func_lstat = yes; then
25492 ln -s conftest.f conftest.lnk
25493 fi
25494 if test "$cross_compiling" = yes; then :
25495 case "$host_os" in
25496 # Guess yes on Linux systems.
25497 linux-* | linux) gl_cv_func_rename_slash_src_works="guessing yes" ;;
25498 # Guess yes on glibc systems.
25499 *-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
25500 # Guess yes on native Windows.
25501 mingw*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
25502 # If we don't know, obey --enable-cross-guesses.
25503 *) gl_cv_func_rename_slash_src_works="$gl_cross_guess_normal" ;;
25504 esac
25505
25506 else
25507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25508 /* end confdefs.h. */
25509
25510 # include <stdio.h>
25511 # include <stdlib.h>
25512
25513 int
25514 main ()
25515 {
25516 int result = 0;
25517 if (rename ("conftest.f1/", "conftest.d3") == 0)
25518 result |= 1;
25519 if (rename ("conftest.d1/", "conftest.d2") != 0)
25520 result |= 2;
25521 #if HAVE_LSTAT
25522 if (rename ("conftest.lnk/", "conftest.f") == 0)
25523 result |= 4;
25524 #endif
25525 return result;
25526
25527 ;
25528 return 0;
25529 }
25530 _ACEOF
25531 if ac_fn_c_try_run "$LINENO"; then :
25532 gl_cv_func_rename_slash_src_works=yes
25533 else
25534 gl_cv_func_rename_slash_src_works=no
25535 fi
25536 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25537 conftest.$ac_objext conftest.beam conftest.$ac_ext
25538 fi
25539
25540 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
25541
25542 fi
25543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_src_works" >&5
25544 $as_echo "$gl_cv_func_rename_slash_src_works" >&6; }
25545 case "$gl_cv_func_rename_slash_src_works" in
25546 *yes) ;;
25547 *)
25548 REPLACE_RENAME=1
25549
25550 $as_echo "#define RENAME_TRAILING_SLASH_SOURCE_BUG 1" >>confdefs.h
25551
25552 ;;
25553 esac
25554
25555
25556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5
25557 $as_echo_n "checking whether rename manages hard links correctly... " >&6; }
25558 if ${gl_cv_func_rename_link_works+:} false; then :
25559 $as_echo_n "(cached) " >&6
25560 else
25561 if test $ac_cv_func_link = yes; then
25562 if test $cross_compiling != yes; then
25563 rm -rf conftest.f conftest.f1 conftest.f2
25564 if touch conftest.f conftest.f2 && ln conftest.f conftest.f1 &&
25565 set x `ls -i conftest.f conftest.f1` && test "" = ""; then
25566 if test "$cross_compiling" = yes; then :
25567 :
25568
25569 else
25570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25571 /* end confdefs.h. */
25572
25573 # include <errno.h>
25574 # include <stdio.h>
25575 # include <stdlib.h>
25576 # include <unistd.h>
25577
25578 int
25579 main ()
25580 {
25581 int result = 0;
25582 if (rename ("conftest.f", "conftest.f1"))
25583 result |= 1;
25584 if (unlink ("conftest.f1"))
25585 result |= 2;
25586
25587 /* Allow either the POSIX-required behavior, where the
25588 previous rename kept conftest.f, or the (better) NetBSD
25589 behavior, where it removed conftest.f. */
25590 if (rename ("conftest.f", "conftest.f") != 0
25591 && errno != ENOENT)
25592 result |= 4;
25593
25594 if (rename ("conftest.f1", "conftest.f1") == 0)
25595 result |= 8;
25596 if (rename ("conftest.f2", "conftest.f2") != 0)
25597 result |= 16;
25598 return result;
25599
25600 ;
25601 return 0;
25602 }
25603 _ACEOF
25604 if ac_fn_c_try_run "$LINENO"; then :
25605 gl_cv_func_rename_link_works=yes
25606 else
25607 gl_cv_func_rename_link_works=no
25608 fi
25609 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25610 conftest.$ac_objext conftest.beam conftest.$ac_ext
25611 fi
25612
25613 else
25614 gl_cv_func_rename_link_works="guessing no"
25615 fi
25616 rm -rf conftest.f conftest.f1 conftest.f2
25617 else
25618 case "$host_os" in
25619 # Guess yes on Linux systems.
25620 linux-* | linux) gl_cv_func_rename_link_works="guessing yes" ;;
25621 # Guess yes on glibc systems.
25622 *-gnu*) gl_cv_func_rename_link_works="guessing yes" ;;
25623 # Guess yes on native Windows.
25624 mingw*) gl_cv_func_rename_link_works="guessing yes" ;;
25625 # If we don't know, obey --enable-cross-guesses.
25626 *) gl_cv_func_rename_link_works="$gl_cross_guess_normal" ;;
25627 esac
25628 fi
25629 else
25630 gl_cv_func_rename_link_works=yes
25631 fi
25632
25633 fi
25634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_link_works" >&5
25635 $as_echo "$gl_cv_func_rename_link_works" >&6; }
25636 case "$gl_cv_func_rename_link_works" in
25637 *yes) ;;
25638 *)
25639 REPLACE_RENAME=1
25640
25641 $as_echo "#define RENAME_HARD_LINK_BUG 1" >>confdefs.h
25642
25643 ;;
25644 esac
25645
25646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages existing destinations correctly" >&5
25647 $as_echo_n "checking whether rename manages existing destinations correctly... " >&6; }
25648 if ${gl_cv_func_rename_dest_works+:} false; then :
25649 $as_echo_n "(cached) " >&6
25650 else
25651 rm -rf conftest.f conftest.d1 conftest.d2
25652 touch conftest.f && mkdir conftest.d1 conftest.d2 ||
25653 as_fn_error $? "cannot create temporary files" "$LINENO" 5
25654 if test "$cross_compiling" = yes; then :
25655 case "$host_os" in
25656 # Guess yes on Linux systems.
25657 linux-* | linux) gl_cv_func_rename_dest_works="guessing yes" ;;
25658 # Guess yes on glibc systems.
25659 *-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;;
25660 # Guess no on native Windows.
25661 mingw*) gl_cv_func_rename_dest_works="guessing no" ;;
25662 # If we don't know, obey --enable-cross-guesses.
25663 *) gl_cv_func_rename_dest_works="$gl_cross_guess_normal" ;;
25664 esac
25665
25666 else
25667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25668 /* end confdefs.h. */
25669
25670 # include <stdio.h>
25671 # include <stdlib.h>
25672
25673 int
25674 main ()
25675 {
25676 int result = 0;
25677 if (rename ("conftest.d1", "conftest.d2") != 0)
25678 result |= 1;
25679 if (rename ("conftest.d2", "conftest.f") == 0)
25680 result |= 2;
25681 return result;
25682
25683 ;
25684 return 0;
25685 }
25686 _ACEOF
25687 if ac_fn_c_try_run "$LINENO"; then :
25688 gl_cv_func_rename_dest_works=yes
25689 else
25690 gl_cv_func_rename_dest_works=no
25691 fi
25692 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25693 conftest.$ac_objext conftest.beam conftest.$ac_ext
25694 fi
25695
25696 rm -rf conftest.f conftest.d1 conftest.d2
25697
25698 fi
25699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_dest_works" >&5
25700 $as_echo "$gl_cv_func_rename_dest_works" >&6; }
25701 case "$gl_cv_func_rename_dest_works" in
25702 *yes) ;;
25703 *)
25704 REPLACE_RENAME=1
25705
25706 $as_echo "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h
25707
25708 ;;
25709 esac
25710
25711 if test $REPLACE_RENAME = 1; then
25712
25713
25714
25715
25716
25717
25718
25719
25720 gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext"
25721
25722 fi
25723
25724
25725
25726
25727
25728 GNULIB_RENAME=1
25729
25730
25731
25732
25733
25734 $as_echo "#define GNULIB_TEST_RENAME 1" >>confdefs.h
25735
25736
25737
25738
25739
25740
25741 for ac_func in rewinddir
25742 do :
25743 ac_fn_c_check_func "$LINENO" "rewinddir" "ac_cv_func_rewinddir"
25744 if test "x$ac_cv_func_rewinddir" = xyes; then :
25745 cat >>confdefs.h <<_ACEOF
25746 #define HAVE_REWINDDIR 1
25747 _ACEOF
25748
25749 fi
25750 done
25751
25752 if test $ac_cv_func_rewinddir = no; then
25753 HAVE_REWINDDIR=0
25754 fi
25755
25756 if test $HAVE_REWINDDIR = 0; then
25757
25758
25759
25760
25761
25762
25763
25764
25765 gl_LIBOBJS="$gl_LIBOBJS rewinddir.$ac_objext"
25766
25767 fi
25768
25769
25770
25771
25772
25773 GNULIB_REWINDDIR=1
25774
25775
25776
25777
25778
25779 $as_echo "#define GNULIB_TEST_REWINDDIR 1" >>confdefs.h
25780
25781
25782
25783
25784
25785
25786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
25787 $as_echo_n "checking whether rmdir works... " >&6; }
25788 if ${gl_cv_func_rmdir_works+:} false; then :
25789 $as_echo_n "(cached) " >&6
25790 else
25791 mkdir conftest.dir
25792 touch conftest.file
25793 if test "$cross_compiling" = yes; then :
25794 case "$host_os" in
25795 # Guess yes on Linux systems.
25796 linux-* | linux) gl_cv_func_rmdir_works="guessing yes" ;;
25797 # Guess yes on glibc systems.
25798 *-gnu* | gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
25799 # Guess no on native Windows.
25800 mingw*) gl_cv_func_rmdir_works="guessing no" ;;
25801 # If we don't know, obey --enable-cross-guesses.
25802 *) gl_cv_func_rmdir_works="$gl_cross_guess_normal" ;;
25803 esac
25804
25805 else
25806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25807 /* end confdefs.h. */
25808 #include <stdio.h>
25809 #include <errno.h>
25810 #if HAVE_UNISTD_H
25811 # include <unistd.h>
25812 #else /* on Windows with MSVC */
25813 # include <direct.h>
25814 #endif
25815
25816 int
25817 main ()
25818 {
25819 int result = 0;
25820 if (!rmdir ("conftest.file/"))
25821 result |= 1;
25822 else if (errno != ENOTDIR)
25823 result |= 2;
25824 if (!rmdir ("conftest.dir/./"))
25825 result |= 4;
25826 return result;
25827
25828 ;
25829 return 0;
25830 }
25831 _ACEOF
25832 if ac_fn_c_try_run "$LINENO"; then :
25833 gl_cv_func_rmdir_works=yes
25834 else
25835 gl_cv_func_rmdir_works=no
25836 fi
25837 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25838 conftest.$ac_objext conftest.beam conftest.$ac_ext
25839 fi
25840
25841 rm -rf conftest.dir conftest.file
25842 fi
25843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
25844 $as_echo "$gl_cv_func_rmdir_works" >&6; }
25845 case "$gl_cv_func_rmdir_works" in
25846 *yes) ;;
25847 *)
25848 REPLACE_RMDIR=1
25849 ;;
25850 esac
25851
25852 if test $REPLACE_RMDIR = 1; then
25853
25854
25855
25856
25857
25858
25859
25860
25861 gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext"
25862
25863 fi
25864
25865
25866
25867
25868
25869 GNULIB_RMDIR=1
25870
25871
25872
25873
25874
25875 $as_echo "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
25876
25877
25878
25879
25880
25881
25882
25883
25884 if test $ac_cv_func_setenv = no; then
25885 HAVE_SETENV=0
25886 else
25887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
25888 $as_echo_n "checking whether setenv validates arguments... " >&6; }
25889 if ${gl_cv_func_setenv_works+:} false; then :
25890 $as_echo_n "(cached) " >&6
25891 else
25892 if test "$cross_compiling" = yes; then :
25893 case "$host_os" in
25894 # Guess yes on glibc systems.
25895 *-gnu* | gnu*) gl_cv_func_setenv_works="guessing yes" ;;
25896 # Guess yes on musl systems.
25897 *-musl*) gl_cv_func_setenv_works="guessing yes" ;;
25898 # If we don't know, obey --enable-cross-guesses.
25899 *) gl_cv_func_setenv_works="$gl_cross_guess_normal" ;;
25900 esac
25901
25902 else
25903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25904 /* end confdefs.h. */
25905
25906 #include <stdlib.h>
25907 #include <errno.h>
25908 #include <string.h>
25909
25910 int
25911 main ()
25912 {
25913
25914 int result = 0;
25915 {
25916 if (setenv ("", "", 0) != -1)
25917 result |= 1;
25918 else if (errno != EINVAL)
25919 result |= 2;
25920 }
25921 {
25922 if (setenv ("a", "=", 1) != 0)
25923 result |= 4;
25924 else if (strcmp (getenv ("a"), "=") != 0)
25925 result |= 8;
25926 }
25927 return result;
25928
25929 ;
25930 return 0;
25931 }
25932 _ACEOF
25933 if ac_fn_c_try_run "$LINENO"; then :
25934 gl_cv_func_setenv_works=yes
25935 else
25936 gl_cv_func_setenv_works=no
25937 fi
25938 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25939 conftest.$ac_objext conftest.beam conftest.$ac_ext
25940 fi
25941
25942 fi
25943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
25944 $as_echo "$gl_cv_func_setenv_works" >&6; }
25945 case "$gl_cv_func_setenv_works" in
25946 *yes) ;;
25947 *)
25948 REPLACE_SETENV=1
25949 ;;
25950 esac
25951 fi
25952
25953 if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
25954
25955
25956
25957
25958
25959
25960
25961
25962 gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext"
25963
25964 fi
25965
25966
25967
25968
25969
25970 GNULIB_SETENV=1
25971
25972
25973
25974
25975
25976 $as_echo "#define GNULIB_TEST_SETENV 1" >>confdefs.h
25977
25978
25979
25980
25981
25982
25983
25984
25985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (LC_ALL, NULL) is multithread-safe" >&5
25986 $as_echo_n "checking whether setlocale (LC_ALL, NULL) is multithread-safe... " >&6; }
25987 if ${gl_cv_func_setlocale_null_all_mtsafe+:} false; then :
25988 $as_echo_n "(cached) " >&6
25989 else
25990 case "$host_os" in
25991 # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin.
25992 *-musl* | darwin* | freebsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*)
25993 gl_cv_func_setlocale_null_all_mtsafe=no ;;
25994 # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows.
25995 *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*)
25996 gl_cv_func_setlocale_null_all_mtsafe=yes ;;
25997 # If we don't know, obey --enable-cross-guesses.
25998 *)
25999 gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;;
26000 esac
26001
26002 fi
26003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_all_mtsafe" >&5
26004 $as_echo "$gl_cv_func_setlocale_null_all_mtsafe" >&6; }
26005 case "$host_os" in
26006 mingw*) ;;
26007 *)
26008 if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
26009 gl_cv_func_setlocale_null_all_mtsafe="trivially yes"
26010 fi
26011 ;;
26012 esac
26013 case "$gl_cv_func_setlocale_null_all_mtsafe" in
26014 *yes) SETLOCALE_NULL_ALL_MTSAFE=1 ;;
26015 *) SETLOCALE_NULL_ALL_MTSAFE=0 ;;
26016 esac
26017
26018 cat >>confdefs.h <<_ACEOF
26019 #define SETLOCALE_NULL_ALL_MTSAFE $SETLOCALE_NULL_ALL_MTSAFE
26020 _ACEOF
26021
26022
26023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (category, NULL) is multithread-safe" >&5
26024 $as_echo_n "checking whether setlocale (category, NULL) is multithread-safe... " >&6; }
26025 if ${gl_cv_func_setlocale_null_one_mtsafe+:} false; then :
26026 $as_echo_n "(cached) " >&6
26027 else
26028 case "$host_os" in
26029 # Guess no on OpenBSD, AIX.
26030 openbsd* | aix*)
26031 gl_cv_func_setlocale_null_one_mtsafe=no ;;
26032 # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows.
26033 *-gnu* | gnu* | *-musl* | darwin* | freebsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
26034 gl_cv_func_setlocale_null_one_mtsafe=yes ;;
26035 # If we don't know, obey --enable-cross-guesses.
26036 *)
26037 gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;;
26038 esac
26039
26040 fi
26041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_one_mtsafe" >&5
26042 $as_echo "$gl_cv_func_setlocale_null_one_mtsafe" >&6; }
26043 case "$host_os" in
26044 mingw*) ;;
26045 *)
26046 if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
26047 gl_cv_func_setlocale_null_one_mtsafe="trivially yes"
26048 fi
26049 ;;
26050 esac
26051 case "$gl_cv_func_setlocale_null_one_mtsafe" in
26052 *yes) SETLOCALE_NULL_ONE_MTSAFE=1 ;;
26053 *) SETLOCALE_NULL_ONE_MTSAFE=0 ;;
26054 esac
26055
26056 cat >>confdefs.h <<_ACEOF
26057 #define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE
26058 _ACEOF
26059
26060
26061 if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
26062 case "$host_os" in
26063 mingw*) LIB_SETLOCALE_NULL= ;;
26064 *)
26065
26066
26067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
26068 $as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
26069 if ${gl_cv_have_weak+:} false; then :
26070 $as_echo_n "(cached) " >&6
26071 else
26072 gl_cv_have_weak=no
26073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26074 /* end confdefs.h. */
26075 extern void xyzzy ();
26076 #pragma weak xyzzy
26077 int
26078 main ()
26079 {
26080 xyzzy();
26081 ;
26082 return 0;
26083 }
26084 _ACEOF
26085 if ac_fn_c_try_link "$LINENO"; then :
26086 gl_cv_have_weak=maybe
26087 fi
26088 rm -f core conftest.err conftest.$ac_objext \
26089 conftest$ac_exeext conftest.$ac_ext
26090 if test $gl_cv_have_weak = maybe; then
26091 if test "$cross_compiling" = yes; then :
26092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26093 /* end confdefs.h. */
26094 #ifdef __ELF__
26095 Extensible Linking Format
26096 #endif
26097
26098 _ACEOF
26099 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26100 $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
26101 gl_cv_have_weak="guessing yes"
26102 else
26103 gl_cv_have_weak="guessing no"
26104 fi
26105 rm -f conftest*
26106
26107
26108 else
26109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26110 /* end confdefs.h. */
26111
26112 #include <stdio.h>
26113 #pragma weak fputs
26114 int main ()
26115 {
26116 return (fputs == NULL);
26117 }
26118 _ACEOF
26119 if ac_fn_c_try_run "$LINENO"; then :
26120 gl_cv_have_weak=yes
26121 else
26122 gl_cv_have_weak=no
26123 fi
26124 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26125 conftest.$ac_objext conftest.beam conftest.$ac_ext
26126 fi
26127
26128 fi
26129 case " $LDFLAGS " in
26130 *" -static "*) gl_cv_have_weak=no ;;
26131 esac
26132 case "$gl_cv_have_weak" in
26133 *yes)
26134 case "$host_os" in
26135 freebsd* | dragonfly*)
26136 : > conftest1.c
26137 $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
26138 cat <<EOF > conftest2.c
26139 #include <pthread.h>
26140 #pragma weak pthread_mutexattr_gettype
26141 int main ()
26142 {
26143 return (pthread_mutexattr_gettype != NULL);
26144 }
26145 EOF
26146 $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
26147 || gl_cv_have_weak=no
26148 rm -f conftest1.c libempty.so conftest2.c conftest
26149 ;;
26150 esac
26151 ;;
26152 esac
26153
26154 fi
26155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
26156 $as_echo "$gl_cv_have_weak" >&6; }
26157 case "$gl_cv_have_weak" in
26158 *yes)
26159
26160 $as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
26161
26162 ;;
26163 esac
26164
26165 case "$gl_cv_have_weak" in
26166 *yes) LIB_SETLOCALE_NULL= ;;
26167 *) LIB_SETLOCALE_NULL="$LIBPTHREAD" ;;
26168 esac
26169 ;;
26170 esac
26171 else
26172 LIB_SETLOCALE_NULL=
26173 fi
26174
26175
26176 if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
26177
26178
26179
26180
26181
26182
26183
26184
26185 gl_LIBOBJS="$gl_LIBOBJS setlocale-lock.$ac_objext"
26186
26187
26188
26189
26190 CFLAG_VISIBILITY=
26191 HAVE_VISIBILITY=0
26192 if test -n "$GCC"; then
26193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
26194 $as_echo_n "checking whether the -Werror option is usable... " >&6; }
26195 if ${gl_cv_cc_vis_werror+:} false; then :
26196 $as_echo_n "(cached) " >&6
26197 else
26198 gl_save_CFLAGS="$CFLAGS"
26199 CFLAGS="$CFLAGS -Werror"
26200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26201 /* end confdefs.h. */
26202
26203 int
26204 main ()
26205 {
26206
26207 ;
26208 return 0;
26209 }
26210 _ACEOF
26211 if ac_fn_c_try_compile "$LINENO"; then :
26212 gl_cv_cc_vis_werror=yes
26213 else
26214 gl_cv_cc_vis_werror=no
26215 fi
26216 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26217 CFLAGS="$gl_save_CFLAGS"
26218
26219 fi
26220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
26221 $as_echo "$gl_cv_cc_vis_werror" >&6; }
26222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
26223 $as_echo_n "checking for simple visibility declarations... " >&6; }
26224 if ${gl_cv_cc_visibility+:} false; then :
26225 $as_echo_n "(cached) " >&6
26226 else
26227 gl_save_CFLAGS="$CFLAGS"
26228 CFLAGS="$CFLAGS -fvisibility=hidden"
26229 if test $gl_cv_cc_vis_werror = yes; then
26230 CFLAGS="$CFLAGS -Werror"
26231 fi
26232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26233 /* end confdefs.h. */
26234 extern __attribute__((__visibility__("hidden"))) int hiddenvar;
26235 extern __attribute__((__visibility__("default"))) int exportedvar;
26236 extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
26237 extern __attribute__((__visibility__("default"))) int exportedfunc (void);
26238 void dummyfunc (void) {}
26239
26240 int
26241 main ()
26242 {
26243
26244 ;
26245 return 0;
26246 }
26247 _ACEOF
26248 if ac_fn_c_try_compile "$LINENO"; then :
26249 gl_cv_cc_visibility=yes
26250 else
26251 gl_cv_cc_visibility=no
26252 fi
26253 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26254 CFLAGS="$gl_save_CFLAGS"
26255
26256 fi
26257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
26258 $as_echo "$gl_cv_cc_visibility" >&6; }
26259 if test $gl_cv_cc_visibility = yes; then
26260 CFLAG_VISIBILITY="-fvisibility=hidden"
26261 HAVE_VISIBILITY=1
26262 fi
26263 fi
26264
26265
26266
26267 cat >>confdefs.h <<_ACEOF
26268 #define HAVE_VISIBILITY $HAVE_VISIBILITY
26269 _ACEOF
26270
26271
26272
26273 fi
26274
26275
26276
26277
26278
26279 GNULIB_SETLOCALE_NULL=1
26280
26281
26282
26283
26284
26285 $as_echo "#define GNULIB_TEST_SETLOCALE_NULL 1" >>confdefs.h
26286
26287
26288
26289
26290
26291
26292
26293
26294
26295
26296
26297
26298
26299
26300 if test $gl_cv_have_include_next = yes; then
26301 gl_cv_next_signal_h='<'signal.h'>'
26302 else
26303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
26304 $as_echo_n "checking absolute name of <signal.h>... " >&6; }
26305 if ${gl_cv_next_signal_h+:} false; then :
26306 $as_echo_n "(cached) " >&6
26307 else
26308
26309
26310
26311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26312 /* end confdefs.h. */
26313 #include <signal.h>
26314 _ACEOF
26315 case "$host_os" in
26316 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26317 *) gl_absname_cpp="$ac_cpp" ;;
26318 esac
26319
26320 case "$host_os" in
26321 mingw*)
26322 gl_dirsep_regex='[/\\]'
26323 ;;
26324 *)
26325 gl_dirsep_regex='\/'
26326 ;;
26327 esac
26328 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26329 gl_header_literal_regex=`echo 'signal.h' \
26330 | sed -e "$gl_make_literal_regex_sed"`
26331 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26332 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26333 s|^/[^/]|//&|
26334 p
26335 q
26336 }'
26337
26338 gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26339 sed -n "$gl_absolute_header_sed"`
26340
26341 gl_header=$gl_cv_absolute_signal_h
26342 gl_cv_next_signal_h='"'$gl_header'"'
26343
26344
26345 fi
26346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
26347 $as_echo "$gl_cv_next_signal_h" >&6; }
26348 fi
26349 NEXT_SIGNAL_H=$gl_cv_next_signal_h
26350
26351 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26352 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26353 gl_next_as_first_directive='<'signal.h'>'
26354 else
26355 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26356 gl_next_as_first_directive=$gl_cv_next_signal_h
26357 fi
26358 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
26359
26360
26361
26362
26363
26364 # AIX declares sig_atomic_t to already include volatile, and C89 compilers
26365 # then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
26366 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
26367 #include <signal.h>
26368
26369 "
26370 if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes; then :
26371
26372 else
26373 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
26374 fi
26375
26376
26377
26378
26379
26380
26381
26382 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
26383 #include <signal.h>
26384
26385 "
26386 if test "x$ac_cv_type_sighandler_t" = xyes; then :
26387
26388 else
26389 HAVE_SIGHANDLER_T=0
26390 fi
26391
26392
26393
26394
26395
26396
26397 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
26398 /* <sys/types.h> is not needed according to POSIX, but the
26399 <sys/socket.h> in i386-unknown-freebsd4.10 and
26400 powerpc-apple-darwin5.5 required it. */
26401 #include <sys/types.h>
26402 #if HAVE_SYS_SOCKET_H
26403 # include <sys/socket.h>
26404 #elif HAVE_WS2TCPIP_H
26405 # include <ws2tcpip.h>
26406 #endif
26407
26408 "
26409 if test "x$ac_cv_type_socklen_t" = xyes; then :
26410
26411 else
26412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
26413 $as_echo_n "checking for socklen_t equivalent... " >&6; }
26414 if ${gl_cv_socklen_t_equiv+:} false; then :
26415 $as_echo_n "(cached) " >&6
26416 else
26417 # Systems have either "struct sockaddr *" or
26418 # "void *" as the second argument to getpeername
26419 gl_cv_socklen_t_equiv=
26420 for arg2 in "struct sockaddr" void; do
26421 for t in int size_t "unsigned int" "long int" "unsigned long int"; do
26422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26423 /* end confdefs.h. */
26424 #include <sys/types.h>
26425 #include <sys/socket.h>
26426
26427 int getpeername (int, $arg2 *, $t *);
26428 int
26429 main ()
26430 {
26431 $t len;
26432 getpeername (0, 0, &len);
26433 ;
26434 return 0;
26435 }
26436 _ACEOF
26437 if ac_fn_c_try_compile "$LINENO"; then :
26438 gl_cv_socklen_t_equiv="$t"
26439 fi
26440 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26441 test "$gl_cv_socklen_t_equiv" != "" && break
26442 done
26443 test "$gl_cv_socklen_t_equiv" != "" && break
26444 done
26445 if test "$gl_cv_socklen_t_equiv" = ""; then
26446 as_fn_error $? "Cannot find a type to use in place of socklen_t" "$LINENO" 5
26447 fi
26448
26449 fi
26450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
26451 $as_echo "$gl_cv_socklen_t_equiv" >&6; }
26452
26453 cat >>confdefs.h <<_ACEOF
26454 #define socklen_t $gl_cv_socklen_t_equiv
26455 _ACEOF
26456
26457 fi
26458
26459
26460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
26461 $as_echo_n "checking for ssize_t... " >&6; }
26462 if ${gt_cv_ssize_t+:} false; then :
26463 $as_echo_n "(cached) " >&6
26464 else
26465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26466 /* end confdefs.h. */
26467 #include <sys/types.h>
26468 int
26469 main ()
26470 {
26471 int x = sizeof (ssize_t *) + sizeof (ssize_t);
26472 return !x;
26473 ;
26474 return 0;
26475 }
26476 _ACEOF
26477 if ac_fn_c_try_compile "$LINENO"; then :
26478 gt_cv_ssize_t=yes
26479 else
26480 gt_cv_ssize_t=no
26481 fi
26482 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26483 fi
26484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
26485 $as_echo "$gt_cv_ssize_t" >&6; }
26486 if test $gt_cv_ssize_t = no; then
26487
26488 $as_echo "#define ssize_t int" >>confdefs.h
26489
26490 fi
26491
26492
26493
26494
26495
26496 case "$host_os" in
26497 mingw*)
26498 REPLACE_STAT=1
26499 ;;
26500 *)
26501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
26502 $as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
26503 if ${gl_cv_func_stat_file_slash+:} false; then :
26504 $as_echo_n "(cached) " >&6
26505 else
26506 touch conftest.tmp
26507 # Assume that if we have lstat, we can also check symlinks.
26508 if test $ac_cv_func_lstat = yes; then
26509 ln -s conftest.tmp conftest.lnk
26510 fi
26511 if test "$cross_compiling" = yes; then :
26512 case "$host_os" in
26513 # Guess yes on Linux systems.
26514 linux-* | linux) gl_cv_func_stat_file_slash="guessing yes" ;;
26515 # Guess yes on glibc systems.
26516 *-gnu* | gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
26517 # If we don't know, obey --enable-cross-guesses.
26518 *) gl_cv_func_stat_file_slash="$gl_cross_guess_normal" ;;
26519 esac
26520
26521 else
26522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26523 /* end confdefs.h. */
26524 #include <sys/stat.h>
26525
26526 int
26527 main ()
26528 {
26529 int result = 0;
26530 struct stat st;
26531 if (!stat ("conftest.tmp/", &st))
26532 result |= 1;
26533 #if HAVE_LSTAT
26534 if (!stat ("conftest.lnk/", &st))
26535 result |= 2;
26536 #endif
26537 return result;
26538
26539 ;
26540 return 0;
26541 }
26542 _ACEOF
26543 if ac_fn_c_try_run "$LINENO"; then :
26544 gl_cv_func_stat_file_slash=yes
26545 else
26546 gl_cv_func_stat_file_slash=no
26547 fi
26548 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26549 conftest.$ac_objext conftest.beam conftest.$ac_ext
26550 fi
26551
26552 rm -f conftest.tmp conftest.lnk
26553 fi
26554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
26555 $as_echo "$gl_cv_func_stat_file_slash" >&6; }
26556 case $gl_cv_func_stat_file_slash in
26557 *no)
26558 REPLACE_STAT=1
26559
26560 $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
26561 ;;
26562 esac
26563 case $host_os in
26564 solaris*)
26565 REPLACE_FSTAT=1 ;;
26566 esac
26567 ;;
26568 esac
26569
26570 if test $REPLACE_STAT = 1; then
26571
26572
26573
26574
26575
26576
26577
26578
26579 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
26580
26581 case "$host_os" in
26582 mingw*)
26583
26584
26585
26586
26587
26588
26589
26590
26591 gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
26592
26593 ;;
26594 esac
26595
26596
26597 :
26598
26599 fi
26600
26601
26602
26603
26604
26605 GNULIB_STAT=1
26606
26607
26608
26609
26610
26611 $as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h
26612
26613
26614
26615
26616
26617
26618
26619 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>
26620 #include <sys/stat.h>
26621 "
26622 if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes; then :
26623
26624 cat >>confdefs.h <<_ACEOF
26625 #define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
26626 _ACEOF
26627
26628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
26629 $as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
26630 if ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+:} false; then :
26631 $as_echo_n "(cached) " >&6
26632 else
26633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26634 /* end confdefs.h. */
26635
26636 #include <sys/types.h>
26637 #include <sys/stat.h>
26638 #if HAVE_SYS_TIME_H
26639 # include <sys/time.h>
26640 #endif
26641 #include <time.h>
26642 struct timespec ts;
26643 struct stat st;
26644
26645 int
26646 main ()
26647 {
26648
26649 st.st_atim = ts;
26650
26651 ;
26652 return 0;
26653 }
26654 _ACEOF
26655 if ac_fn_c_try_compile "$LINENO"; then :
26656 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
26657 else
26658 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
26659 fi
26660 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26661 fi
26662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
26663 $as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
26664 if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
26665
26666 $as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
26667
26668 fi
26669 else
26670 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>
26671 #include <sys/stat.h>
26672 "
26673 if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes; then :
26674
26675 cat >>confdefs.h <<_ACEOF
26676 #define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
26677 _ACEOF
26678
26679
26680 else
26681 ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
26682 #include <sys/stat.h>
26683 "
26684 if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes; then :
26685
26686 cat >>confdefs.h <<_ACEOF
26687 #define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
26688 _ACEOF
26689
26690
26691 else
26692 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>
26693 #include <sys/stat.h>
26694 "
26695 if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes; then :
26696
26697 cat >>confdefs.h <<_ACEOF
26698 #define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
26699 _ACEOF
26700
26701
26702 fi
26703
26704 fi
26705
26706 fi
26707
26708 fi
26709
26710
26711
26712
26713
26714 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>
26715 #include <sys/stat.h>
26716 "
26717 if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes; then :
26718
26719 cat >>confdefs.h <<_ACEOF
26720 #define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
26721 _ACEOF
26722
26723
26724 else
26725 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
26726 #include <sys/stat.h>
26727 "
26728 if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes; then :
26729
26730 cat >>confdefs.h <<_ACEOF
26731 #define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
26732 _ACEOF
26733
26734
26735 else
26736 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>
26737 #include <sys/stat.h>
26738 "
26739 if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes; then :
26740
26741 cat >>confdefs.h <<_ACEOF
26742 #define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
26743 _ACEOF
26744
26745
26746 fi
26747
26748 fi
26749
26750 fi
26751
26752
26753
26754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
26755 $as_echo_n "checking for working stdalign.h... " >&6; }
26756 if ${gl_cv_header_working_stdalign_h+:} false; then :
26757 $as_echo_n "(cached) " >&6
26758 else
26759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26760 /* end confdefs.h. */
26761 #include <stdalign.h>
26762 #include <stddef.h>
26763
26764 /* Test that alignof yields a result consistent with offsetof.
26765 This catches GCC bug 52023
26766 <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
26767 #ifdef __cplusplus
26768 template <class t> struct alignof_helper { char a; t b; };
26769 # define ao(type) offsetof (alignof_helper<type>, b)
26770 #else
26771 # define ao(type) offsetof (struct { char a; type b; }, b)
26772 #endif
26773 char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
26774 char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
26775 char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
26776
26777 /* Test _Alignas only on platforms where gnulib can help. */
26778 #if \
26779 ((defined __cplusplus && 201103 <= __cplusplus) \
26780 || (defined __APPLE__ && defined __MACH__ \
26781 ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
26782 : __GNUC__) \
26783 || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \
26784 || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__ \
26785 || 1300 <= _MSC_VER)
26786 struct alignas_test { char c; char alignas (8) alignas_8; };
26787 char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
26788 ? 1 : -1];
26789 #endif
26790
26791 int
26792 main ()
26793 {
26794
26795 ;
26796 return 0;
26797 }
26798 _ACEOF
26799 if ac_fn_c_try_compile "$LINENO"; then :
26800 gl_cv_header_working_stdalign_h=yes
26801 else
26802 gl_cv_header_working_stdalign_h=no
26803 fi
26804 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26805 fi
26806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
26807 $as_echo "$gl_cv_header_working_stdalign_h" >&6; }
26808
26809 if test $gl_cv_header_working_stdalign_h = yes; then
26810 STDALIGN_H=''
26811 else
26812 STDALIGN_H='stdalign.h'
26813 fi
26814
26815
26816 if test -n "$STDALIGN_H"; then
26817 GL_GENERATE_STDALIGN_H_TRUE=
26818 GL_GENERATE_STDALIGN_H_FALSE='#'
26819 else
26820 GL_GENERATE_STDALIGN_H_TRUE='#'
26821 GL_GENERATE_STDALIGN_H_FALSE=
26822 fi
26823
26824
26825
26826
26827
26828
26829 if test "$ac_cv_header_stdbool_h" = yes; then
26830 case "$host_os" in
26831 solaris*)
26832 if test -z "$GCC"; then
26833 STDBOOL_H='stdbool.h'
26834 else
26835 STDBOOL_H=''
26836 fi
26837 ;;
26838 *)
26839 STDBOOL_H=''
26840 ;;
26841 esac
26842 else
26843 STDBOOL_H='stdbool.h'
26844 fi
26845
26846 if test -n "$STDBOOL_H"; then
26847 GL_GENERATE_STDBOOL_H_TRUE=
26848 GL_GENERATE_STDBOOL_H_FALSE='#'
26849 else
26850 GL_GENERATE_STDBOOL_H_TRUE='#'
26851 GL_GENERATE_STDBOOL_H_FALSE=
26852 fi
26853
26854
26855 if test "$ac_cv_type__Bool" = yes; then
26856 HAVE__BOOL=1
26857 else
26858 HAVE__BOOL=0
26859 fi
26860
26861
26862
26863
26864
26865 STDDEF_H=
26866
26867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5
26868 $as_echo_n "checking for good max_align_t... " >&6; }
26869 if ${gl_cv_type_max_align_t+:} false; then :
26870 $as_echo_n "(cached) " >&6
26871 else
26872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26873 /* end confdefs.h. */
26874 #include <stddef.h>
26875 unsigned int s = sizeof (max_align_t);
26876 #if defined __GNUC__ || defined __IBM__ALIGNOF__
26877 int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
26878 int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1];
26879 #endif
26880
26881 int
26882 main ()
26883 {
26884
26885 ;
26886 return 0;
26887 }
26888 _ACEOF
26889 if ac_fn_c_try_compile "$LINENO"; then :
26890 gl_cv_type_max_align_t=yes
26891 else
26892 gl_cv_type_max_align_t=no
26893 fi
26894 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26895
26896 fi
26897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5
26898 $as_echo "$gl_cv_type_max_align_t" >&6; }
26899 if test $gl_cv_type_max_align_t = no; then
26900 HAVE_MAX_ALIGN_T=0
26901 STDDEF_H=stddef.h
26902 fi
26903
26904 if test $gt_cv_c_wchar_t = no; then
26905 HAVE_WCHAR_T=0
26906 STDDEF_H=stddef.h
26907 fi
26908
26909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
26910 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
26911 if ${gl_cv_decl_null_works+:} false; then :
26912 $as_echo_n "(cached) " >&6
26913 else
26914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26915 /* end confdefs.h. */
26916 #include <stddef.h>
26917 int test[2 * (sizeof NULL == sizeof (void *)) -1];
26918
26919 int
26920 main ()
26921 {
26922
26923 ;
26924 return 0;
26925 }
26926 _ACEOF
26927 if ac_fn_c_try_compile "$LINENO"; then :
26928 gl_cv_decl_null_works=yes
26929 else
26930 gl_cv_decl_null_works=no
26931 fi
26932 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26933 fi
26934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
26935 $as_echo "$gl_cv_decl_null_works" >&6; }
26936 if test $gl_cv_decl_null_works = no; then
26937 REPLACE_NULL=1
26938 STDDEF_H=stddef.h
26939 fi
26940
26941
26942 if test -n "$STDDEF_H"; then
26943 GL_GENERATE_STDDEF_H_TRUE=
26944 GL_GENERATE_STDDEF_H_FALSE='#'
26945 else
26946 GL_GENERATE_STDDEF_H_TRUE='#'
26947 GL_GENERATE_STDDEF_H_FALSE=
26948 fi
26949
26950 if test -n "$STDDEF_H"; then
26951
26952
26953
26954
26955
26956
26957
26958
26959 if test $gl_cv_have_include_next = yes; then
26960 gl_cv_next_stddef_h='<'stddef.h'>'
26961 else
26962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
26963 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
26964 if ${gl_cv_next_stddef_h+:} false; then :
26965 $as_echo_n "(cached) " >&6
26966 else
26967
26968
26969
26970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26971 /* end confdefs.h. */
26972 #include <stddef.h>
26973 _ACEOF
26974 case "$host_os" in
26975 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26976 *) gl_absname_cpp="$ac_cpp" ;;
26977 esac
26978
26979 case "$host_os" in
26980 mingw*)
26981 gl_dirsep_regex='[/\\]'
26982 ;;
26983 *)
26984 gl_dirsep_regex='\/'
26985 ;;
26986 esac
26987 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26988 gl_header_literal_regex=`echo 'stddef.h' \
26989 | sed -e "$gl_make_literal_regex_sed"`
26990 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26991 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26992 s|^/[^/]|//&|
26993 p
26994 q
26995 }'
26996
26997 gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26998 sed -n "$gl_absolute_header_sed"`
26999
27000 gl_header=$gl_cv_absolute_stddef_h
27001 gl_cv_next_stddef_h='"'$gl_header'"'
27002
27003
27004 fi
27005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
27006 $as_echo "$gl_cv_next_stddef_h" >&6; }
27007 fi
27008 NEXT_STDDEF_H=$gl_cv_next_stddef_h
27009
27010 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27011 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27012 gl_next_as_first_directive='<'stddef.h'>'
27013 else
27014 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27015 gl_next_as_first_directive=$gl_cv_next_stddef_h
27016 fi
27017 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
27018
27019
27020
27021
27022 fi
27023
27024
27025
27026
27027 $as_echo "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
27028
27029
27030
27031
27032
27033
27034
27035
27036
27037
27038 if test $gl_cv_have_include_next = yes; then
27039 gl_cv_next_stdio_h='<'stdio.h'>'
27040 else
27041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
27042 $as_echo_n "checking absolute name of <stdio.h>... " >&6; }
27043 if ${gl_cv_next_stdio_h+:} false; then :
27044 $as_echo_n "(cached) " >&6
27045 else
27046
27047
27048
27049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27050 /* end confdefs.h. */
27051 #include <stdio.h>
27052 _ACEOF
27053 case "$host_os" in
27054 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27055 *) gl_absname_cpp="$ac_cpp" ;;
27056 esac
27057
27058 case "$host_os" in
27059 mingw*)
27060 gl_dirsep_regex='[/\\]'
27061 ;;
27062 *)
27063 gl_dirsep_regex='\/'
27064 ;;
27065 esac
27066 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27067 gl_header_literal_regex=`echo 'stdio.h' \
27068 | sed -e "$gl_make_literal_regex_sed"`
27069 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27070 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27071 s|^/[^/]|//&|
27072 p
27073 q
27074 }'
27075
27076 gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27077 sed -n "$gl_absolute_header_sed"`
27078
27079 gl_header=$gl_cv_absolute_stdio_h
27080 gl_cv_next_stdio_h='"'$gl_header'"'
27081
27082
27083 fi
27084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
27085 $as_echo "$gl_cv_next_stdio_h" >&6; }
27086 fi
27087 NEXT_STDIO_H=$gl_cv_next_stdio_h
27088
27089 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27090 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27091 gl_next_as_first_directive='<'stdio.h'>'
27092 else
27093 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27094 gl_next_as_first_directive=$gl_cv_next_stdio_h
27095 fi
27096 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
27097
27098
27099
27100
27101
27102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
27103 $as_echo_n "checking which flavor of printf attribute matches inttypes macros... " >&6; }
27104 if ${gl_cv_func_printf_attribute_flavor+:} false; then :
27105 $as_echo_n "(cached) " >&6
27106 else
27107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27108 /* end confdefs.h. */
27109
27110 #define __STDC_FORMAT_MACROS 1
27111 #include <stdio.h>
27112 #include <inttypes.h>
27113 /* For non-mingw systems, compilation will trivially succeed.
27114 For mingw, compilation will succeed for older mingw (system
27115 printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
27116 #if (defined _WIN32 && ! defined __CYGWIN__) && \
27117 (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
27118 extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
27119 #endif
27120
27121 int
27122 main ()
27123 {
27124
27125 ;
27126 return 0;
27127 }
27128 _ACEOF
27129 if ac_fn_c_try_compile "$LINENO"; then :
27130 gl_cv_func_printf_attribute_flavor=system
27131 else
27132 gl_cv_func_printf_attribute_flavor=gnu
27133 fi
27134 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27135 fi
27136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
27137 $as_echo "$gl_cv_func_printf_attribute_flavor" >&6; }
27138 if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
27139
27140 $as_echo "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
27141
27142 fi
27143
27144 GNULIB_FSCANF=1
27145
27146
27147 cat >>confdefs.h <<_ACEOF
27148 #define GNULIB_FSCANF 1
27149 _ACEOF
27150
27151
27152 GNULIB_SCANF=1
27153
27154
27155 cat >>confdefs.h <<_ACEOF
27156 #define GNULIB_SCANF 1
27157 _ACEOF
27158
27159
27160 GNULIB_FGETC=1
27161 GNULIB_GETC=1
27162 GNULIB_GETCHAR=1
27163 GNULIB_FGETS=1
27164 GNULIB_FREAD=1
27165
27166
27167 GNULIB_FPRINTF=1
27168 GNULIB_PRINTF=1
27169 GNULIB_VFPRINTF=1
27170 GNULIB_VPRINTF=1
27171 GNULIB_FPUTC=1
27172 GNULIB_PUTC=1
27173 GNULIB_PUTCHAR=1
27174 GNULIB_FPUTS=1
27175 GNULIB_PUTS=1
27176 GNULIB_FWRITE=1
27177
27178
27179
27180
27181
27182
27183
27184
27185
27186
27187
27188
27189
27190
27191
27192
27193
27194 if test $gl_cv_have_include_next = yes; then
27195 gl_cv_next_stdlib_h='<'stdlib.h'>'
27196 else
27197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
27198 $as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
27199 if ${gl_cv_next_stdlib_h+:} false; then :
27200 $as_echo_n "(cached) " >&6
27201 else
27202
27203
27204
27205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27206 /* end confdefs.h. */
27207 #include <stdlib.h>
27208 _ACEOF
27209 case "$host_os" in
27210 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27211 *) gl_absname_cpp="$ac_cpp" ;;
27212 esac
27213
27214 case "$host_os" in
27215 mingw*)
27216 gl_dirsep_regex='[/\\]'
27217 ;;
27218 *)
27219 gl_dirsep_regex='\/'
27220 ;;
27221 esac
27222 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27223 gl_header_literal_regex=`echo 'stdlib.h' \
27224 | sed -e "$gl_make_literal_regex_sed"`
27225 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27226 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27227 s|^/[^/]|//&|
27228 p
27229 q
27230 }'
27231
27232 gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27233 sed -n "$gl_absolute_header_sed"`
27234
27235 gl_header=$gl_cv_absolute_stdlib_h
27236 gl_cv_next_stdlib_h='"'$gl_header'"'
27237
27238
27239 fi
27240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
27241 $as_echo "$gl_cv_next_stdlib_h" >&6; }
27242 fi
27243 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
27244
27245 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27246 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27247 gl_next_as_first_directive='<'stdlib.h'>'
27248 else
27249 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27250 gl_next_as_first_directive=$gl_cv_next_stdlib_h
27251 fi
27252 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
27253
27254
27255
27256
27257
27258
27259
27260
27261
27262
27263
27264
27265
27266 for ac_func in strchrnul
27267 do :
27268 ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
27269 if test "x$ac_cv_func_strchrnul" = xyes; then :
27270 cat >>confdefs.h <<_ACEOF
27271 #define HAVE_STRCHRNUL 1
27272 _ACEOF
27273
27274 fi
27275 done
27276
27277 if test $ac_cv_func_strchrnul = no; then
27278 HAVE_STRCHRNUL=0
27279 else
27280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5
27281 $as_echo_n "checking whether strchrnul works... " >&6; }
27282 if ${gl_cv_func_strchrnul_works+:} false; then :
27283 $as_echo_n "(cached) " >&6
27284 else
27285 if test "$cross_compiling" = yes; then :
27286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27287 /* end confdefs.h. */
27288
27289 #if defined __CYGWIN__
27290 #include <cygwin/version.h>
27291 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9)
27292 Lucky user
27293 #endif
27294 #else
27295 Lucky user
27296 #endif
27297
27298 _ACEOF
27299 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27300 $EGREP "Lucky user" >/dev/null 2>&1; then :
27301 gl_cv_func_strchrnul_works="guessing yes"
27302 else
27303 gl_cv_func_strchrnul_works="guessing no"
27304 fi
27305 rm -f conftest*
27306
27307
27308 else
27309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27310 /* end confdefs.h. */
27311
27312 #include <string.h> /* for strchrnul */
27313
27314 int
27315 main ()
27316 {
27317 const char *buf = "a";
27318 return strchrnul (buf, 'b') != buf + 1;
27319
27320 ;
27321 return 0;
27322 }
27323 _ACEOF
27324 if ac_fn_c_try_run "$LINENO"; then :
27325 gl_cv_func_strchrnul_works=yes
27326 else
27327 gl_cv_func_strchrnul_works=no
27328 fi
27329 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27330 conftest.$ac_objext conftest.beam conftest.$ac_ext
27331 fi
27332
27333
27334 fi
27335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strchrnul_works" >&5
27336 $as_echo "$gl_cv_func_strchrnul_works" >&6; }
27337 case "$gl_cv_func_strchrnul_works" in
27338 *yes) ;;
27339 *) REPLACE_STRCHRNUL=1 ;;
27340 esac
27341 fi
27342
27343 if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
27344
27345
27346
27347
27348
27349
27350
27351
27352 gl_LIBOBJS="$gl_LIBOBJS strchrnul.$ac_objext"
27353
27354 :
27355 fi
27356
27357
27358
27359
27360
27361 GNULIB_STRCHRNUL=1
27362
27363
27364
27365
27366
27367 $as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
27368
27369
27370
27371
27372
27373
27374
27375 if test $ac_cv_func_strdup = yes; then
27376 if test $gl_cv_func_malloc_posix != yes; then
27377 REPLACE_STRDUP=1
27378 fi
27379 fi
27380
27381 if test $ac_cv_have_decl_strdup = no; then
27382 HAVE_DECL_STRDUP=0
27383 fi
27384
27385 if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
27386
27387
27388
27389
27390
27391
27392
27393
27394 gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext"
27395
27396 :
27397 fi
27398
27399
27400
27401
27402
27403 GNULIB_STRDUP=1
27404
27405
27406
27407
27408
27409 $as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
27410
27411
27412
27413
27414
27415
27416
27417
27418
27419
27420 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
27421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
27422 $as_echo_n "checking for working strerror function... " >&6; }
27423 if ${gl_cv_func_working_strerror+:} false; then :
27424 $as_echo_n "(cached) " >&6
27425 else
27426 if test "$cross_compiling" = yes; then :
27427 case "$host_os" in
27428 # Guess yes on glibc systems.
27429 *-gnu* | gnu*) gl_cv_func_working_strerror="guessing yes" ;;
27430 # Guess yes on musl systems.
27431 *-musl*) gl_cv_func_working_strerror="guessing yes" ;;
27432 # If we don't know, obey --enable-cross-guesses.
27433 *) gl_cv_func_working_strerror="$gl_cross_guess_normal" ;;
27434 esac
27435
27436 else
27437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27438 /* end confdefs.h. */
27439 #include <string.h>
27440
27441 int
27442 main ()
27443 {
27444 if (!*strerror (-2)) return 1;
27445 ;
27446 return 0;
27447 }
27448 _ACEOF
27449 if ac_fn_c_try_run "$LINENO"; then :
27450 gl_cv_func_working_strerror=yes
27451 else
27452 gl_cv_func_working_strerror=no
27453 fi
27454 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27455 conftest.$ac_objext conftest.beam conftest.$ac_ext
27456 fi
27457
27458
27459 fi
27460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
27461 $as_echo "$gl_cv_func_working_strerror" >&6; }
27462 case "$gl_cv_func_working_strerror" in
27463 *yes) ;;
27464 *)
27465 REPLACE_STRERROR=1
27466 ;;
27467 esac
27468
27469 case "$gl_cv_func_strerror_r_works" in
27470 *no) REPLACE_STRERROR=1 ;;
27471 esac
27472
27473 else
27474 REPLACE_STRERROR=1
27475 fi
27476
27477 if test $REPLACE_STRERROR = 1; then
27478
27479
27480
27481
27482
27483
27484
27485
27486 gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
27487
27488 fi
27489
27490
27491 cat >>confdefs.h <<_ACEOF
27492 #define GNULIB_STRERROR 1
27493 _ACEOF
27494
27495
27496
27497
27498
27499
27500
27501 GNULIB_STRERROR=1
27502
27503
27504
27505
27506
27507 $as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
27508
27509
27510
27511
27512
27513 if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
27514
27515
27516
27517
27518
27519
27520
27521
27522 gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
27523
27524
27525
27526
27527
27528 if test $ac_cv_header_sys_socket_h != yes; then
27529 for ac_header in winsock2.h
27530 do :
27531 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
27532 if test "x$ac_cv_header_winsock2_h" = xyes; then :
27533 cat >>confdefs.h <<_ACEOF
27534 #define HAVE_WINSOCK2_H 1
27535 _ACEOF
27536
27537 fi
27538
27539 done
27540
27541 fi
27542 if test "$ac_cv_header_winsock2_h" = yes; then
27543 HAVE_WINSOCK2_H=1
27544 UNISTD_H_HAVE_WINSOCK2_H=1
27545 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
27546 else
27547 HAVE_WINSOCK2_H=0
27548 fi
27549
27550
27551 fi
27552
27553
27554
27555
27556
27557
27558
27559 if test $ac_cv_have_decl_strerror_r = no; then
27560 HAVE_DECL_STRERROR_R=0
27561 fi
27562
27563 if test $ac_cv_func_strerror_r = yes; then
27564 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
27565 if test $gl_cv_func_strerror_r_posix_signature = yes; then
27566 case "$gl_cv_func_strerror_r_works" in
27567 *no) REPLACE_STRERROR_R=1 ;;
27568 esac
27569 else
27570 REPLACE_STRERROR_R=1
27571 fi
27572 else
27573 REPLACE_STRERROR_R=1
27574 fi
27575 fi
27576
27577 if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then
27578
27579
27580
27581
27582
27583
27584
27585
27586 gl_LIBOBJS="$gl_LIBOBJS strerror_r.$ac_objext"
27587
27588
27589
27590
27591
27592
27593 fi
27594
27595
27596
27597
27598
27599 GNULIB_STRERROR_R=1
27600
27601
27602
27603
27604
27605 $as_echo "#define GNULIB_TEST_STRERROR_R 1" >>confdefs.h
27606
27607
27608
27609
27610
27611 cat >>confdefs.h <<_ACEOF
27612 #define GNULIB_STRERROR_R_POSIX 1
27613 _ACEOF
27614
27615
27616
27617
27618
27619
27620
27621 if test $REPLACE_STRSTR = 0; then
27622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works in linear time" >&5
27623 $as_echo_n "checking whether strstr works in linear time... " >&6; }
27624 if ${gl_cv_func_strstr_linear+:} false; then :
27625 $as_echo_n "(cached) " >&6
27626 else
27627 if test "$cross_compiling" = yes; then :
27628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27629 /* end confdefs.h. */
27630
27631 #include <features.h>
27632 #ifdef __GNU_LIBRARY__
27633 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
27634 && !(defined __i386__ || defined __x86_64__) \
27635 && !defined __UCLIBC__
27636 Lucky user
27637 #endif
27638 #endif
27639 #ifdef __CYGWIN__
27640 #include <cygwin/version.h>
27641 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
27642 Lucky user
27643 #endif
27644 #endif
27645
27646 _ACEOF
27647 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27648 $EGREP "Lucky user" >/dev/null 2>&1; then :
27649 gl_cv_func_strstr_linear="guessing yes"
27650 else
27651 gl_cv_func_strstr_linear="$gl_cross_guess_normal"
27652 fi
27653 rm -f conftest*
27654
27655
27656 else
27657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27658 /* end confdefs.h. */
27659
27660 #ifdef __MVS__
27661 /* z/OS does not deliver signals while strstr() is running (thanks to
27662 restrictions on its LE runtime), which prevents us from limiting the
27663 running time of this test. */
27664 # error "This test does not work properly on z/OS"
27665 #endif
27666 #include <signal.h> /* for signal */
27667 #include <string.h> /* for strstr */
27668 #include <stdlib.h> /* for malloc */
27669 #include <unistd.h> /* for alarm */
27670 static void quit (int sig) { _exit (sig + 128); }
27671
27672 int
27673 main ()
27674 {
27675
27676 int result = 0;
27677 size_t m = 1000000;
27678 char *haystack = (char *) malloc (2 * m + 2);
27679 char *needle = (char *) malloc (m + 2);
27680 /* Failure to compile this test due to missing alarm is okay,
27681 since all such platforms (mingw) also have quadratic strstr. */
27682 signal (SIGALRM, quit);
27683 alarm (5);
27684 /* Check for quadratic performance. */
27685 if (haystack && needle)
27686 {
27687 memset (haystack, 'A', 2 * m);
27688 haystack[2 * m] = 'B';
27689 haystack[2 * m + 1] = 0;
27690 memset (needle, 'A', m);
27691 needle[m] = 'B';
27692 needle[m + 1] = 0;
27693 if (!strstr (haystack, needle))
27694 result |= 1;
27695 }
27696 /* Free allocated memory, in case some sanitizer is watching. */
27697 free (haystack);
27698 free (needle);
27699 return result;
27700
27701 ;
27702 return 0;
27703 }
27704 _ACEOF
27705 if ac_fn_c_try_run "$LINENO"; then :
27706 gl_cv_func_strstr_linear=yes
27707 else
27708 gl_cv_func_strstr_linear=no
27709 fi
27710 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27711 conftest.$ac_objext conftest.beam conftest.$ac_ext
27712 fi
27713
27714
27715 fi
27716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_linear" >&5
27717 $as_echo "$gl_cv_func_strstr_linear" >&6; }
27718 case "$gl_cv_func_strstr_linear" in
27719 *yes) ;;
27720 *)
27721 REPLACE_STRSTR=1
27722 ;;
27723 esac
27724 fi
27725
27726 if test $REPLACE_STRSTR = 1; then
27727
27728
27729
27730
27731
27732
27733
27734
27735 gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
27736
27737 fi
27738
27739
27740
27741 if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
27742 REPLACE_STRSTR=1
27743 else
27744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
27745 $as_echo_n "checking whether strstr works... " >&6; }
27746 if ${gl_cv_func_strstr_works_always+:} false; then :
27747 $as_echo_n "(cached) " >&6
27748 else
27749 if test "$cross_compiling" = yes; then :
27750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27751 /* end confdefs.h. */
27752
27753 #ifdef __GNU_LIBRARY__
27754 #include <features.h>
27755 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
27756 || defined __UCLIBC__
27757 Lucky user
27758 #endif
27759 #elif defined __CYGWIN__
27760 #include <cygwin/version.h>
27761 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
27762 Lucky user
27763 #endif
27764 #else
27765 Lucky user
27766 #endif
27767
27768 _ACEOF
27769 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27770 $EGREP "Lucky user" >/dev/null 2>&1; then :
27771 gl_cv_func_strstr_works_always="guessing yes"
27772 else
27773 gl_cv_func_strstr_works_always="$gl_cross_guess_normal"
27774 fi
27775 rm -f conftest*
27776
27777
27778 else
27779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27780 /* end confdefs.h. */
27781
27782 #include <string.h> /* for strstr */
27783 #ifdef __GNU_LIBRARY__
27784 #include <features.h>
27785 #if __GLIBC__ == 2 && __GLIBC_MINOR__ == 28
27786 Unlucky user
27787 #endif
27788 #endif
27789 #define P "_EF_BF_BD"
27790 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
27791 #define NEEDLE P P P P P
27792
27793 int
27794 main ()
27795 {
27796 return !!strstr (HAYSTACK, NEEDLE);
27797
27798 ;
27799 return 0;
27800 }
27801 _ACEOF
27802 if ac_fn_c_try_run "$LINENO"; then :
27803 gl_cv_func_strstr_works_always=yes
27804 else
27805 gl_cv_func_strstr_works_always=no
27806 fi
27807 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27808 conftest.$ac_objext conftest.beam conftest.$ac_ext
27809 fi
27810
27811
27812 fi
27813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
27814 $as_echo "$gl_cv_func_strstr_works_always" >&6; }
27815 case "$gl_cv_func_strstr_works_always" in
27816 *yes) ;;
27817 *)
27818 REPLACE_STRSTR=1
27819 ;;
27820 esac
27821 fi
27822
27823 if test $REPLACE_STRSTR = 1; then
27824
27825
27826
27827
27828
27829
27830
27831
27832 gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
27833
27834 fi
27835
27836
27837
27838
27839
27840 GNULIB_STRSTR=1
27841
27842
27843
27844
27845
27846 $as_echo "#define GNULIB_TEST_STRSTR 1" >>confdefs.h
27847
27848
27849
27850
27851
27852
27853
27854 for ac_func in strtok_r
27855 do :
27856 ac_fn_c_check_func "$LINENO" "strtok_r" "ac_cv_func_strtok_r"
27857 if test "x$ac_cv_func_strtok_r" = xyes; then :
27858 cat >>confdefs.h <<_ACEOF
27859 #define HAVE_STRTOK_R 1
27860 _ACEOF
27861
27862 fi
27863 done
27864
27865 if test $ac_cv_func_strtok_r = yes; then
27866 HAVE_STRTOK_R=1
27867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtok_r works" >&5
27868 $as_echo_n "checking whether strtok_r works... " >&6; }
27869 if ${gl_cv_func_strtok_r_works+:} false; then :
27870 $as_echo_n "(cached) " >&6
27871 else
27872 if test "$cross_compiling" = yes; then :
27873 case "$host_os" in
27874 # Guess no on glibc systems.
27875 *-gnu* | gnu*) gl_cv_func_strtok_r_works="guessing no" ;;
27876 # Guess yes on native Windows.
27877 mingw*) gl_cv_func_strtok_r_works="guessing yes" ;;
27878 *) gl_cv_func_strtok_r_works="guessing yes" ;;
27879 esac
27880
27881 else
27882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27883 /* end confdefs.h. */
27884
27885 #ifndef __OPTIMIZE__
27886 # define __OPTIMIZE__ 1
27887 #endif
27888 #undef __OPTIMIZE_SIZE__
27889 #undef __NO_INLINE__
27890 #include <stdlib.h>
27891 #include <string.h>
27892
27893 int
27894 main ()
27895 {
27896 static const char dummy[] = "\177\01a";
27897 char delimiters[] = "xxxxxxxx";
27898 char *save_ptr = (char *) dummy;
27899 strtok_r (delimiters, "x", &save_ptr);
27900 strtok_r (NULL, "x", &save_ptr);
27901 return 0;
27902
27903 ;
27904 return 0;
27905 }
27906
27907 _ACEOF
27908 if ac_fn_c_try_run "$LINENO"; then :
27909 gl_cv_func_strtok_r_works=yes
27910 else
27911 gl_cv_func_strtok_r_works=no
27912 fi
27913 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27914 conftest.$ac_objext conftest.beam conftest.$ac_ext
27915 fi
27916
27917
27918 fi
27919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtok_r_works" >&5
27920 $as_echo "$gl_cv_func_strtok_r_works" >&6; }
27921 case "$gl_cv_func_strtok_r_works" in
27922 *no)
27923 UNDEFINE_STRTOK_R=1
27924 ;;
27925 esac
27926 else
27927 HAVE_STRTOK_R=0
27928 fi
27929
27930 if test $ac_cv_have_decl_strtok_r = no; then
27931 HAVE_DECL_STRTOK_R=0
27932 fi
27933
27934 if test $HAVE_STRTOK_R = 0 || test $REPLACE_STRTOK_R = 1; then
27935
27936
27937
27938
27939
27940
27941
27942
27943 gl_LIBOBJS="$gl_LIBOBJS strtok_r.$ac_objext"
27944
27945
27946 :
27947
27948 fi
27949
27950
27951
27952
27953
27954 GNULIB_STRTOK_R=1
27955
27956
27957
27958
27959
27960 $as_echo "#define GNULIB_TEST_STRTOK_R 1" >>confdefs.h
27961
27962
27963
27964
27965
27966
27967
27968
27969
27970
27971
27972
27973
27974
27975
27976
27977
27978
27979
27980 if test $gl_cv_have_include_next = yes; then
27981 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
27982 else
27983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
27984 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
27985 if ${gl_cv_next_sys_stat_h+:} false; then :
27986 $as_echo_n "(cached) " >&6
27987 else
27988
27989 if test $ac_cv_header_sys_stat_h = yes; then
27990
27991
27992
27993
27994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27995 /* end confdefs.h. */
27996 #include <sys/stat.h>
27997 _ACEOF
27998 case "$host_os" in
27999 aix*) gl_absname_cpp="$ac_cpp -C" ;;
28000 *) gl_absname_cpp="$ac_cpp" ;;
28001 esac
28002
28003 case "$host_os" in
28004 mingw*)
28005 gl_dirsep_regex='[/\\]'
28006 ;;
28007 *)
28008 gl_dirsep_regex='\/'
28009 ;;
28010 esac
28011 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28012 gl_header_literal_regex=`echo 'sys/stat.h' \
28013 | sed -e "$gl_make_literal_regex_sed"`
28014 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28015 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28016 s|^/[^/]|//&|
28017 p
28018 q
28019 }'
28020
28021 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28022 sed -n "$gl_absolute_header_sed"`
28023
28024 gl_header=$gl_cv_absolute_sys_stat_h
28025 gl_cv_next_sys_stat_h='"'$gl_header'"'
28026 else
28027 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
28028 fi
28029
28030
28031 fi
28032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
28033 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
28034 fi
28035 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
28036
28037 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28038 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28039 gl_next_as_first_directive='<'sys/stat.h'>'
28040 else
28041 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28042 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
28043 fi
28044 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
28045
28046
28047
28048
28049
28050
28051
28052
28053 WINDOWS_STAT_TIMESPEC=0
28054
28055
28056
28057
28058
28059
28060
28061
28062 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
28063 #include <sys/stat.h>
28064 "
28065 if test "x$ac_cv_type_nlink_t" = xyes; then :
28066
28067 else
28068
28069 $as_echo "#define nlink_t int" >>confdefs.h
28070
28071 fi
28072
28073
28074
28075
28076
28077
28078
28079
28080
28081
28082
28083
28084
28085
28086
28087
28088
28089
28090
28091
28092
28093
28094
28095
28096 if test $gl_cv_have_include_next = yes; then
28097 gl_cv_next_sys_uio_h='<'sys/uio.h'>'
28098 else
28099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/uio.h>" >&5
28100 $as_echo_n "checking absolute name of <sys/uio.h>... " >&6; }
28101 if ${gl_cv_next_sys_uio_h+:} false; then :
28102 $as_echo_n "(cached) " >&6
28103 else
28104
28105 if test $ac_cv_header_sys_uio_h = yes; then
28106
28107
28108
28109
28110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28111 /* end confdefs.h. */
28112 #include <sys/uio.h>
28113 _ACEOF
28114 case "$host_os" in
28115 aix*) gl_absname_cpp="$ac_cpp -C" ;;
28116 *) gl_absname_cpp="$ac_cpp" ;;
28117 esac
28118
28119 case "$host_os" in
28120 mingw*)
28121 gl_dirsep_regex='[/\\]'
28122 ;;
28123 *)
28124 gl_dirsep_regex='\/'
28125 ;;
28126 esac
28127 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28128 gl_header_literal_regex=`echo 'sys/uio.h' \
28129 | sed -e "$gl_make_literal_regex_sed"`
28130 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28131 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28132 s|^/[^/]|//&|
28133 p
28134 q
28135 }'
28136
28137 gl_cv_absolute_sys_uio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28138 sed -n "$gl_absolute_header_sed"`
28139
28140 gl_header=$gl_cv_absolute_sys_uio_h
28141 gl_cv_next_sys_uio_h='"'$gl_header'"'
28142 else
28143 gl_cv_next_sys_uio_h='<'sys/uio.h'>'
28144 fi
28145
28146
28147 fi
28148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_uio_h" >&5
28149 $as_echo "$gl_cv_next_sys_uio_h" >&6; }
28150 fi
28151 NEXT_SYS_UIO_H=$gl_cv_next_sys_uio_h
28152
28153 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28154 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28155 gl_next_as_first_directive='<'sys/uio.h'>'
28156 else
28157 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28158 gl_next_as_first_directive=$gl_cv_next_sys_uio_h
28159 fi
28160 NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H=$gl_next_as_first_directive
28161
28162
28163
28164
28165 if test $ac_cv_header_sys_uio_h = yes; then
28166 HAVE_SYS_UIO_H=1
28167 else
28168 HAVE_SYS_UIO_H=0
28169 fi
28170
28171
28172
28173
28174
28175 :
28176
28177
28178
28179
28180
28181
28182
28183
28184
28185
28186
28187
28188 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,
28189 gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
28190 been included before. */
28191 #if defined __MINGW32__
28192 # include <unistd.h>
28193 #endif
28194 #include <time.h>
28195
28196 "
28197 if test "x$ac_cv_have_decl_localtime_r" = xyes; then :
28198 ac_have_decl=1
28199 else
28200 ac_have_decl=0
28201 fi
28202
28203 cat >>confdefs.h <<_ACEOF
28204 #define HAVE_DECL_LOCALTIME_R $ac_have_decl
28205 _ACEOF
28206
28207 if test $ac_cv_have_decl_localtime_r = no; then
28208 HAVE_DECL_LOCALTIME_R=0
28209 fi
28210
28211
28212 if test $ac_cv_func_localtime_r = yes; then
28213 HAVE_LOCALTIME_R=1
28214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
28215 $as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
28216 if ${gl_cv_time_r_posix+:} false; then :
28217 $as_echo_n "(cached) " >&6
28218 else
28219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28220 /* end confdefs.h. */
28221 /* mingw's <time.h> provides the functions asctime_r, ctime_r,
28222 gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
28223 been included before. */
28224 #if defined __MINGW32__
28225 # include <unistd.h>
28226 #endif
28227 #include <time.h>
28228
28229 int
28230 main ()
28231 {
28232 /* We don't need to append 'restrict's to the argument types,
28233 even though the POSIX signature has the 'restrict's,
28234 since C99 says they can't affect type compatibility. */
28235 struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
28236 if (ptr) return 0;
28237 /* Check the return type is a pointer.
28238 On HP-UX 10 it is 'int'. */
28239 *localtime_r (0, 0);
28240 ;
28241 return 0;
28242 }
28243
28244 _ACEOF
28245 if ac_fn_c_try_compile "$LINENO"; then :
28246 gl_cv_time_r_posix=yes
28247 else
28248 gl_cv_time_r_posix=no
28249 fi
28250 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28251
28252 fi
28253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
28254 $as_echo "$gl_cv_time_r_posix" >&6; }
28255 if test $gl_cv_time_r_posix = yes; then
28256 REPLACE_LOCALTIME_R=0
28257 else
28258 REPLACE_LOCALTIME_R=1
28259 fi
28260 else
28261 HAVE_LOCALTIME_R=0
28262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r exists as an inline function" >&5
28263 $as_echo_n "checking whether localtime_r exists as an inline function... " >&6; }
28264 if ${gl_cv_func_localtime_r_inline+:} false; then :
28265 $as_echo_n "(cached) " >&6
28266 else
28267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28268 /* end confdefs.h. */
28269 /* mingw's <time.h> provides the functions asctime_r, ctime_r,
28270 gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
28271 been included before. */
28272 #if defined __MINGW32__
28273 # include <unistd.h>
28274 #endif
28275 #include <time.h>
28276
28277 int
28278 main ()
28279 {
28280 time_t a;
28281 struct tm r;
28282 localtime_r (&a, &r);
28283
28284 ;
28285 return 0;
28286 }
28287
28288 _ACEOF
28289 if ac_fn_c_try_link "$LINENO"; then :
28290 gl_cv_func_localtime_r_inline=yes
28291 else
28292 gl_cv_func_localtime_r_inline=no
28293 fi
28294 rm -f core conftest.err conftest.$ac_objext \
28295 conftest$ac_exeext conftest.$ac_ext
28296
28297 fi
28298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_localtime_r_inline" >&5
28299 $as_echo "$gl_cv_func_localtime_r_inline" >&6; }
28300 if test $gl_cv_func_localtime_r_inline = yes; then
28301 REPLACE_LOCALTIME_R=1
28302 fi
28303 fi
28304
28305 if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
28306
28307
28308
28309
28310
28311
28312
28313
28314 gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext"
28315
28316
28317 :
28318
28319 fi
28320
28321
28322
28323
28324
28325 GNULIB_TIME_R=1
28326
28327
28328
28329
28330
28331 $as_echo "#define GNULIB_TEST_TIME_R 1" >>confdefs.h
28332
28333
28334
28335
28336
28337
28338
28339
28340
28341
28342
28343
28344
28345
28346
28347 if test $gl_cv_have_include_next = yes; then
28348 gl_cv_next_unistd_h='<'unistd.h'>'
28349 else
28350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
28351 $as_echo_n "checking absolute name of <unistd.h>... " >&6; }
28352 if ${gl_cv_next_unistd_h+:} false; then :
28353 $as_echo_n "(cached) " >&6
28354 else
28355
28356 if test $ac_cv_header_unistd_h = yes; then
28357
28358
28359
28360
28361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28362 /* end confdefs.h. */
28363 #include <unistd.h>
28364 _ACEOF
28365 case "$host_os" in
28366 aix*) gl_absname_cpp="$ac_cpp -C" ;;
28367 *) gl_absname_cpp="$ac_cpp" ;;
28368 esac
28369
28370 case "$host_os" in
28371 mingw*)
28372 gl_dirsep_regex='[/\\]'
28373 ;;
28374 *)
28375 gl_dirsep_regex='\/'
28376 ;;
28377 esac
28378 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28379 gl_header_literal_regex=`echo 'unistd.h' \
28380 | sed -e "$gl_make_literal_regex_sed"`
28381 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28382 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28383 s|^/[^/]|//&|
28384 p
28385 q
28386 }'
28387
28388 gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28389 sed -n "$gl_absolute_header_sed"`
28390
28391 gl_header=$gl_cv_absolute_unistd_h
28392 gl_cv_next_unistd_h='"'$gl_header'"'
28393 else
28394 gl_cv_next_unistd_h='<'unistd.h'>'
28395 fi
28396
28397
28398 fi
28399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
28400 $as_echo "$gl_cv_next_unistd_h" >&6; }
28401 fi
28402 NEXT_UNISTD_H=$gl_cv_next_unistd_h
28403
28404 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28405 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28406 gl_next_as_first_directive='<'unistd.h'>'
28407 else
28408 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28409 gl_next_as_first_directive=$gl_cv_next_unistd_h
28410 fi
28411 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
28412
28413
28414
28415
28416 if test $ac_cv_header_unistd_h = yes; then
28417 HAVE_UNISTD_H=1
28418 else
28419 HAVE_UNISTD_H=0
28420 fi
28421
28422
28423
28424
28425
28426
28427
28428
28429
28430
28431
28432
28433
28434
28435
28436
28437 if test $ac_cv_have_decl_unsetenv = no; then
28438 HAVE_DECL_UNSETENV=0
28439 fi
28440 for ac_func in unsetenv
28441 do :
28442 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
28443 if test "x$ac_cv_func_unsetenv" = xyes; then :
28444 cat >>confdefs.h <<_ACEOF
28445 #define HAVE_UNSETENV 1
28446 _ACEOF
28447
28448 fi
28449 done
28450
28451 if test $ac_cv_func_unsetenv = no; then
28452 HAVE_UNSETENV=0
28453 else
28454 HAVE_UNSETENV=1
28455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
28456 $as_echo_n "checking for unsetenv() return type... " >&6; }
28457 if ${gt_cv_func_unsetenv_ret+:} false; then :
28458 $as_echo_n "(cached) " >&6
28459 else
28460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28461 /* end confdefs.h. */
28462
28463 #undef _BSD
28464 #define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
28465 #include <stdlib.h>
28466 extern
28467 #ifdef __cplusplus
28468 "C"
28469 #endif
28470 int unsetenv (const char *name);
28471
28472 int
28473 main ()
28474 {
28475
28476 ;
28477 return 0;
28478 }
28479 _ACEOF
28480 if ac_fn_c_try_compile "$LINENO"; then :
28481 gt_cv_func_unsetenv_ret='int'
28482 else
28483 gt_cv_func_unsetenv_ret='void'
28484 fi
28485 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28486 fi
28487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
28488 $as_echo "$gt_cv_func_unsetenv_ret" >&6; }
28489 if test $gt_cv_func_unsetenv_ret = 'void'; then
28490
28491 $as_echo "#define VOID_UNSETENV 1" >>confdefs.h
28492
28493 REPLACE_UNSETENV=1
28494 fi
28495
28496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
28497 $as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
28498 if ${gl_cv_func_unsetenv_works+:} false; then :
28499 $as_echo_n "(cached) " >&6
28500 else
28501 if test "$cross_compiling" = yes; then :
28502 case "$host_os" in
28503 # Guess yes on glibc systems.
28504 *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
28505 # If we don't know, obey --enable-cross-guesses.
28506 *) gl_cv_func_unsetenv_works="$gl_cross_guess_normal" ;;
28507 esac
28508
28509 else
28510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28511 /* end confdefs.h. */
28512
28513 #include <stdlib.h>
28514 #include <errno.h>
28515 extern char **environ;
28516
28517 int
28518 main ()
28519 {
28520
28521 char entry1[] = "a=1";
28522 char entry2[] = "b=2";
28523 char *env[] = { entry1, entry2, NULL };
28524 if (putenv ((char *) "a=1")) return 1;
28525 if (putenv (entry2)) return 2;
28526 entry2[0] = 'a';
28527 unsetenv ("a");
28528 if (getenv ("a")) return 3;
28529 if (!unsetenv ("") || errno != EINVAL) return 4;
28530 entry2[0] = 'b';
28531 environ = env;
28532 if (!getenv ("a")) return 5;
28533 entry2[0] = 'a';
28534 unsetenv ("a");
28535 if (getenv ("a")) return 6;
28536
28537 ;
28538 return 0;
28539 }
28540 _ACEOF
28541 if ac_fn_c_try_run "$LINENO"; then :
28542 gl_cv_func_unsetenv_works=yes
28543 else
28544 gl_cv_func_unsetenv_works=no
28545 fi
28546 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28547 conftest.$ac_objext conftest.beam conftest.$ac_ext
28548 fi
28549
28550 fi
28551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
28552 $as_echo "$gl_cv_func_unsetenv_works" >&6; }
28553 case "$gl_cv_func_unsetenv_works" in
28554 *yes) ;;
28555 *)
28556 REPLACE_UNSETENV=1
28557 ;;
28558 esac
28559 fi
28560
28561 if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
28562
28563
28564
28565
28566
28567
28568
28569
28570 gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
28571
28572
28573
28574
28575
28576 fi
28577
28578
28579
28580
28581
28582 GNULIB_UNSETENV=1
28583
28584
28585
28586
28587
28588 $as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
28589
28590
28591
28592
28593
28594
28595
28596
28597
28598
28599
28600
28601
28602
28603
28604 if test $gl_cv_have_include_next = yes; then
28605 gl_cv_next_wchar_h='<'wchar.h'>'
28606 else
28607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
28608 $as_echo_n "checking absolute name of <wchar.h>... " >&6; }
28609 if ${gl_cv_next_wchar_h+:} false; then :
28610 $as_echo_n "(cached) " >&6
28611 else
28612
28613 if test $ac_cv_header_wchar_h = yes; then
28614
28615
28616
28617
28618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28619 /* end confdefs.h. */
28620 #include <wchar.h>
28621 _ACEOF
28622 case "$host_os" in
28623 aix*) gl_absname_cpp="$ac_cpp -C" ;;
28624 *) gl_absname_cpp="$ac_cpp" ;;
28625 esac
28626
28627 case "$host_os" in
28628 mingw*)
28629 gl_dirsep_regex='[/\\]'
28630 ;;
28631 *)
28632 gl_dirsep_regex='\/'
28633 ;;
28634 esac
28635 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28636 gl_header_literal_regex=`echo 'wchar.h' \
28637 | sed -e "$gl_make_literal_regex_sed"`
28638 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28639 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28640 s|^/[^/]|//&|
28641 p
28642 q
28643 }'
28644
28645 gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28646 sed -n "$gl_absolute_header_sed"`
28647
28648 gl_header=$gl_cv_absolute_wchar_h
28649 gl_cv_next_wchar_h='"'$gl_header'"'
28650 else
28651 gl_cv_next_wchar_h='<'wchar.h'>'
28652 fi
28653
28654
28655 fi
28656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
28657 $as_echo "$gl_cv_next_wchar_h" >&6; }
28658 fi
28659 NEXT_WCHAR_H=$gl_cv_next_wchar_h
28660
28661 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28662 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28663 gl_next_as_first_directive='<'wchar.h'>'
28664 else
28665 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28666 gl_next_as_first_directive=$gl_cv_next_wchar_h
28667 fi
28668 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
28669
28670
28671
28672
28673 if test $ac_cv_header_wchar_h = yes; then
28674 HAVE_WCHAR_H=1
28675 else
28676 HAVE_WCHAR_H=0
28677 fi
28678
28679
28680
28681
28682
28683 if test $gt_cv_c_wint_t = yes; then
28684 HAVE_WINT_T=1
28685 else
28686 HAVE_WINT_T=0
28687 fi
28688
28689
28690
28691
28692
28693
28694
28695
28696
28697
28698
28699
28700
28701 if test $ac_cv_func_iswcntrl = yes; then
28702 HAVE_ISWCNTRL=1
28703 else
28704 HAVE_ISWCNTRL=0
28705 fi
28706
28707
28708
28709 if test $gt_cv_c_wint_t = yes; then
28710 HAVE_WINT_T=1
28711 else
28712 HAVE_WINT_T=0
28713 fi
28714
28715
28716
28717
28718
28719
28720
28721
28722
28723
28724
28725
28726
28727 if test $gl_cv_have_include_next = yes; then
28728 gl_cv_next_wctype_h='<'wctype.h'>'
28729 else
28730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
28731 $as_echo_n "checking absolute name of <wctype.h>... " >&6; }
28732 if ${gl_cv_next_wctype_h+:} false; then :
28733 $as_echo_n "(cached) " >&6
28734 else
28735
28736 if test $ac_cv_header_wctype_h = yes; then
28737
28738
28739
28740
28741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28742 /* end confdefs.h. */
28743 #include <wctype.h>
28744 _ACEOF
28745 case "$host_os" in
28746 aix*) gl_absname_cpp="$ac_cpp -C" ;;
28747 *) gl_absname_cpp="$ac_cpp" ;;
28748 esac
28749
28750 case "$host_os" in
28751 mingw*)
28752 gl_dirsep_regex='[/\\]'
28753 ;;
28754 *)
28755 gl_dirsep_regex='\/'
28756 ;;
28757 esac
28758 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28759 gl_header_literal_regex=`echo 'wctype.h' \
28760 | sed -e "$gl_make_literal_regex_sed"`
28761 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28762 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28763 s|^/[^/]|//&|
28764 p
28765 q
28766 }'
28767
28768 gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28769 sed -n "$gl_absolute_header_sed"`
28770
28771 gl_header=$gl_cv_absolute_wctype_h
28772 gl_cv_next_wctype_h='"'$gl_header'"'
28773 else
28774 gl_cv_next_wctype_h='<'wctype.h'>'
28775 fi
28776
28777
28778 fi
28779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
28780 $as_echo "$gl_cv_next_wctype_h" >&6; }
28781 fi
28782 NEXT_WCTYPE_H=$gl_cv_next_wctype_h
28783
28784 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28785 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28786 gl_next_as_first_directive='<'wctype.h'>'
28787 else
28788 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28789 gl_next_as_first_directive=$gl_cv_next_wctype_h
28790 fi
28791 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
28792
28793
28794
28795
28796 if test $ac_cv_header_wctype_h = yes; then
28797 if test $ac_cv_func_iswcntrl = yes; then
28798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
28799 $as_echo_n "checking whether iswcntrl works... " >&6; }
28800 if ${gl_cv_func_iswcntrl_works+:} false; then :
28801 $as_echo_n "(cached) " >&6
28802 else
28803
28804 if test "$cross_compiling" = yes; then :
28805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28806 /* end confdefs.h. */
28807 #include <stdlib.h>
28808 #if __GNU_LIBRARY__ == 1
28809 Linux libc5 i18n is broken.
28810 #endif
28811 int
28812 main ()
28813 {
28814
28815 ;
28816 return 0;
28817 }
28818 _ACEOF
28819 if ac_fn_c_try_compile "$LINENO"; then :
28820 gl_cv_func_iswcntrl_works="guessing yes"
28821 else
28822 gl_cv_func_iswcntrl_works="guessing no"
28823 fi
28824 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28825
28826 else
28827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28828 /* end confdefs.h. */
28829
28830 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
28831 included before <wchar.h>.
28832 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
28833 must be included before <wchar.h>. */
28834 #include <stddef.h>
28835 #include <stdio.h>
28836 #include <time.h>
28837 #include <wchar.h>
28838 #include <wctype.h>
28839 int main () { return iswprint ('x') == 0; }
28840
28841 _ACEOF
28842 if ac_fn_c_try_run "$LINENO"; then :
28843 gl_cv_func_iswcntrl_works=yes
28844 else
28845 gl_cv_func_iswcntrl_works=no
28846 fi
28847 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28848 conftest.$ac_objext conftest.beam conftest.$ac_ext
28849 fi
28850
28851
28852 fi
28853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
28854 $as_echo "$gl_cv_func_iswcntrl_works" >&6; }
28855 fi
28856 HAVE_WCTYPE_H=1
28857 else
28858 HAVE_WCTYPE_H=0
28859 fi
28860
28861
28862 if test $GNULIB_OVERRIDES_WINT_T = 1; then
28863 REPLACE_ISWCNTRL=1
28864 else
28865 case "$gl_cv_func_iswcntrl_works" in
28866 *yes) REPLACE_ISWCNTRL=0 ;;
28867 *) REPLACE_ISWCNTRL=1 ;;
28868 esac
28869 fi
28870
28871
28872 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
28873 :
28874 fi
28875
28876 if test $REPLACE_ISWCNTRL = 1; then
28877 REPLACE_TOWLOWER=1
28878 else
28879 for ac_func in towlower
28880 do :
28881 ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
28882 if test "x$ac_cv_func_towlower" = xyes; then :
28883 cat >>confdefs.h <<_ACEOF
28884 #define HAVE_TOWLOWER 1
28885 _ACEOF
28886
28887 fi
28888 done
28889
28890 if test $ac_cv_func_towlower = yes; then
28891 REPLACE_TOWLOWER=0
28892 else
28893 ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
28894 included before <wchar.h>.
28895 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
28896 must be included before <wchar.h>. */
28897 #include <stddef.h>
28898 #include <stdio.h>
28899 #include <time.h>
28900 #include <wchar.h>
28901 #if HAVE_WCTYPE_H
28902 # include <wctype.h>
28903 #endif
28904
28905 "
28906 if test "x$ac_cv_have_decl_towlower" = xyes; then :
28907 ac_have_decl=1
28908 else
28909 ac_have_decl=0
28910 fi
28911
28912 cat >>confdefs.h <<_ACEOF
28913 #define HAVE_DECL_TOWLOWER $ac_have_decl
28914 _ACEOF
28915
28916 if test $ac_cv_have_decl_towlower = yes; then
28917 REPLACE_TOWLOWER=1
28918 else
28919 REPLACE_TOWLOWER=0
28920 fi
28921 fi
28922 fi
28923
28924
28925 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
28926 :
28927 fi
28928
28929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
28930 $as_echo_n "checking for wctype_t... " >&6; }
28931 if ${gl_cv_type_wctype_t+:} false; then :
28932 $as_echo_n "(cached) " >&6
28933 else
28934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28935 /* end confdefs.h. */
28936 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
28937 included before <wchar.h>.
28938 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
28939 must be included before <wchar.h>. */
28940 #include <stddef.h>
28941 #include <stdio.h>
28942 #include <time.h>
28943 #include <wchar.h>
28944 #if HAVE_WCTYPE_H
28945 # include <wctype.h>
28946 #endif
28947 wctype_t a;
28948
28949 int
28950 main ()
28951 {
28952
28953 ;
28954 return 0;
28955 }
28956 _ACEOF
28957 if ac_fn_c_try_compile "$LINENO"; then :
28958 gl_cv_type_wctype_t=yes
28959 else
28960 gl_cv_type_wctype_t=no
28961 fi
28962 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28963
28964 fi
28965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
28966 $as_echo "$gl_cv_type_wctype_t" >&6; }
28967 if test $gl_cv_type_wctype_t = no; then
28968 HAVE_WCTYPE_T=0
28969 fi
28970
28971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
28972 $as_echo_n "checking for wctrans_t... " >&6; }
28973 if ${gl_cv_type_wctrans_t+:} false; then :
28974 $as_echo_n "(cached) " >&6
28975 else
28976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28977 /* end confdefs.h. */
28978 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
28979 included before <wchar.h>.
28980 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
28981 must be included before <wchar.h>. */
28982 #include <stddef.h>
28983 #include <stdio.h>
28984 #include <time.h>
28985 #include <wchar.h>
28986 #include <wctype.h>
28987 wctrans_t a;
28988
28989 int
28990 main ()
28991 {
28992
28993 ;
28994 return 0;
28995 }
28996 _ACEOF
28997 if ac_fn_c_try_compile "$LINENO"; then :
28998 gl_cv_type_wctrans_t=yes
28999 else
29000 gl_cv_type_wctrans_t=no
29001 fi
29002 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29003
29004 fi
29005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
29006 $as_echo "$gl_cv_type_wctrans_t" >&6; }
29007 if test $gl_cv_type_wctrans_t = no; then
29008 HAVE_WCTRANS_T=0
29009 fi
29010
29011
29012
29013
29014
29015
29016 case "$host_os" in
29017 mingw*)
29018
29019
29020
29021
29022
29023
29024
29025
29026 gl_LIBOBJS="$gl_LIBOBJS windows-mutex.$ac_objext"
29027
29028 ;;
29029 esac
29030
29031 case "$host_os" in
29032 mingw*)
29033
29034
29035
29036
29037
29038
29039
29040
29041 gl_LIBOBJS="$gl_LIBOBJS windows-once.$ac_objext"
29042
29043 ;;
29044 esac
29045
29046 case "$host_os" in
29047 mingw*)
29048
29049
29050
29051
29052
29053
29054
29055
29056 gl_LIBOBJS="$gl_LIBOBJS windows-recmutex.$ac_objext"
29057
29058 ;;
29059 esac
29060
29061 case "$host_os" in
29062 mingw*)
29063
29064
29065
29066
29067
29068
29069
29070
29071 gl_LIBOBJS="$gl_LIBOBJS windows-rwlock.$ac_objext"
29072
29073 ;;
29074 esac
29075 # End of code from modules
29076
29077
29078
29079
29080
29081
29082
29083
29084
29085 gltests_libdeps=
29086 gltests_ltlibdeps=
29087
29088
29089
29090
29091
29092
29093
29094
29095
29096
29097 gl_source_base='tests'
29098 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
29099
29100 gl_module_indicator_condition=$gltests_WITNESS
29101
29102
29103
29104
29105
29106
29107
29108
29109
29110 LIBGNU_LIBDEPS="$gl_libdeps"
29111
29112 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
29113
29114
29115
29116 am__api_version='1.15'
29117
29118 # Find a good install program. We prefer a C program (faster),
29119 # so one script is as good as another. But avoid the broken or
29120 # incompatible versions:
29121 # SysV /etc/install, /usr/sbin/install
29122 # SunOS /usr/etc/install
29123 # IRIX /sbin/install
29124 # AIX /bin/install
29125 # AmigaOS /C/install, which installs bootblocks on floppy discs
29126 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
29127 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
29128 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
29129 # OS/2's system install, which has a completely different semantic
29130 # ./install, which can be erroneously created by make from ./install.sh.
29131 # Reject install programs that cannot install multiple files.
29132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
29133 $as_echo_n "checking for a BSD-compatible install... " >&6; }
29134 if test -z "$INSTALL"; then
29135 if ${ac_cv_path_install+:} false; then :
29136 $as_echo_n "(cached) " >&6
29137 else
29138 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29139 for as_dir in $PATH
29140 do
29141 IFS=$as_save_IFS
29142 test -z "$as_dir" && as_dir=.
29143 # Account for people who put trailing slashes in PATH elements.
29144 case $as_dir/ in #((
29145 ./ | .// | /[cC]/* | \
29146 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
29147 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
29148 /usr/ucb/* ) ;;
29149 *)
29150 # OSF1 and SCO ODT 3.0 have their own names for install.
29151 # Don't use installbsd from OSF since it installs stuff as root
29152 # by default.
29153 for ac_prog in ginstall scoinst install; do
29154 for ac_exec_ext in '' $ac_executable_extensions; do
29155 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
29156 if test $ac_prog = install &&
29157 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
29158 # AIX install. It has an incompatible calling convention.
29159 :
29160 elif test $ac_prog = install &&
29161 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
29162 # program-specific install script used by HP pwplus--don't use.
29163 :
29164 else
29165 rm -rf conftest.one conftest.two conftest.dir
29166 echo one > conftest.one
29167 echo two > conftest.two
29168 mkdir conftest.dir
29169 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
29170 test -s conftest.one && test -s conftest.two &&
29171 test -s conftest.dir/conftest.one &&
29172 test -s conftest.dir/conftest.two
29173 then
29174 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
29175 break 3
29176 fi
29177 fi
29178 fi
29179 done
29180 done
29181 ;;
29182 esac
29183
29184 done
29185 IFS=$as_save_IFS
29186
29187 rm -rf conftest.one conftest.two conftest.dir
29188
29189 fi
29190 if test "${ac_cv_path_install+set}" = set; then
29191 INSTALL=$ac_cv_path_install
29192 else
29193 # As a last resort, use the slow shell script. Don't cache a
29194 # value for INSTALL within a source directory, because that will
29195 # break other packages using the cache if that directory is
29196 # removed, or if the value is a relative name.
29197 INSTALL=$ac_install_sh
29198 fi
29199 fi
29200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
29201 $as_echo "$INSTALL" >&6; }
29202
29203 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
29204 # It thinks the first close brace ends the variable substitution.
29205 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
29206
29207 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
29208
29209 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
29210
29211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
29212 $as_echo_n "checking whether build environment is sane... " >&6; }
29213 # Reject unsafe characters in $srcdir or the absolute working directory
29214 # name. Accept space and tab only in the latter.
29215 am_lf='
29216 '
29217 case `pwd` in
29218 *[\\\"\#\$\&\'\`$am_lf]*)
29219 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
29220 esac
29221 case $srcdir in
29222 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
29223 as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
29224 esac
29225
29226 # Do 'set' in a subshell so we don't clobber the current shell's
29227 # arguments. Must try -L first in case configure is actually a
29228 # symlink; some systems play weird games with the mod time of symlinks
29229 # (eg FreeBSD returns the mod time of the symlink's containing
29230 # directory).
29231 if (
29232 am_has_slept=no
29233 for am_try in 1 2; do
29234 echo "timestamp, slept: $am_has_slept" > conftest.file
29235 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
29236 if test "$*" = "X"; then
29237 # -L didn't work.
29238 set X `ls -t "$srcdir/configure" conftest.file`
29239 fi
29240 if test "$*" != "X $srcdir/configure conftest.file" \
29241 && test "$*" != "X conftest.file $srcdir/configure"; then
29242
29243 # If neither matched, then we have a broken ls. This can happen
29244 # if, for instance, CONFIG_SHELL is bash and it inherits a
29245 # broken ls alias from the environment. This has actually
29246 # happened. Such a system could not be considered "sane".
29247 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
29248 alias in your environment" "$LINENO" 5
29249 fi
29250 if test "$2" = conftest.file || test $am_try -eq 2; then
29251 break
29252 fi
29253 # Just in case.
29254 sleep 1
29255 am_has_slept=yes
29256 done
29257 test "$2" = conftest.file
29258 )
29259 then
29260 # Ok.
29261 :
29262 else
29263 as_fn_error $? "newly created file is older than distributed files!
29264 Check your system clock" "$LINENO" 5
29265 fi
29266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29267 $as_echo "yes" >&6; }
29268 # If we didn't sleep, we still need to ensure time stamps of config.status and
29269 # generated files are strictly newer.
29270 am_sleep_pid=
29271 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
29272 ( sleep 1 ) &
29273 am_sleep_pid=$!
29274 fi
29275
29276 rm -f conftest.file
29277
29278 test "$program_prefix" != NONE &&
29279 program_transform_name="s&^&$program_prefix&;$program_transform_name"
29280 # Use a double $ so make ignores it.
29281 test "$program_suffix" != NONE &&
29282 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
29283 # Double any \ or $.
29284 # By default was `s,x,x', remove it if useless.
29285 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
29286 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
29287
29288 # Expand $ac_aux_dir to an absolute path.
29289 am_aux_dir=`cd "$ac_aux_dir" && pwd`
29290
29291 if test x"${MISSING+set}" != xset; then
29292 case $am_aux_dir in
29293 *\ * | *\ *)
29294 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
29295 *)
29296 MISSING="\${SHELL} $am_aux_dir/missing" ;;
29297 esac
29298 fi
29299 # Use eval to expand $SHELL
29300 if eval "$MISSING --is-lightweight"; then
29301 am_missing_run="$MISSING "
29302 else
29303 am_missing_run=
29304 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
29305 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
29306 fi
29307
29308 if test x"${install_sh+set}" != xset; then
29309 case $am_aux_dir in
29310 *\ * | *\ *)
29311 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
29312 *)
29313 install_sh="\${SHELL} $am_aux_dir/install-sh"
29314 esac
29315 fi
29316
29317 # Installed binaries are usually stripped using 'strip' when the user
29318 # run "make install-strip". However 'strip' might not be the right
29319 # tool to use in cross-compilation environments, therefore Automake
29320 # will honor the 'STRIP' environment variable to overrule this program.
29321 if test "$cross_compiling" != no; then
29322 if test -n "$ac_tool_prefix"; then
29323 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
29324 set dummy ${ac_tool_prefix}strip; ac_word=$2
29325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29326 $as_echo_n "checking for $ac_word... " >&6; }
29327 if ${ac_cv_prog_STRIP+:} false; then :
29328 $as_echo_n "(cached) " >&6
29329 else
29330 if test -n "$STRIP"; then
29331 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
29332 else
29333 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29334 for as_dir in $PATH
29335 do
29336 IFS=$as_save_IFS
29337 test -z "$as_dir" && as_dir=.
29338 for ac_exec_ext in '' $ac_executable_extensions; do
29339 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29340 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
29341 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29342 break 2
29343 fi
29344 done
29345 done
29346 IFS=$as_save_IFS
29347
29348 fi
29349 fi
29350 STRIP=$ac_cv_prog_STRIP
29351 if test -n "$STRIP"; then
29352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
29353 $as_echo "$STRIP" >&6; }
29354 else
29355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29356 $as_echo "no" >&6; }
29357 fi
29358
29359
29360 fi
29361 if test -z "$ac_cv_prog_STRIP"; then
29362 ac_ct_STRIP=$STRIP
29363 # Extract the first word of "strip", so it can be a program name with args.
29364 set dummy strip; ac_word=$2
29365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29366 $as_echo_n "checking for $ac_word... " >&6; }
29367 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
29368 $as_echo_n "(cached) " >&6
29369 else
29370 if test -n "$ac_ct_STRIP"; then
29371 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
29372 else
29373 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29374 for as_dir in $PATH
29375 do
29376 IFS=$as_save_IFS
29377 test -z "$as_dir" && as_dir=.
29378 for ac_exec_ext in '' $ac_executable_extensions; do
29379 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29380 ac_cv_prog_ac_ct_STRIP="strip"
29381 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29382 break 2
29383 fi
29384 done
29385 done
29386 IFS=$as_save_IFS
29387
29388 fi
29389 fi
29390 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
29391 if test -n "$ac_ct_STRIP"; then
29392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
29393 $as_echo "$ac_ct_STRIP" >&6; }
29394 else
29395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29396 $as_echo "no" >&6; }
29397 fi
29398
29399 if test "x$ac_ct_STRIP" = x; then
29400 STRIP=":"
29401 else
29402 case $cross_compiling:$ac_tool_warned in
29403 yes:)
29404 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29405 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29406 ac_tool_warned=yes ;;
29407 esac
29408 STRIP=$ac_ct_STRIP
29409 fi
29410 else
29411 STRIP="$ac_cv_prog_STRIP"
29412 fi
29413
29414 fi
29415 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
29416
29417 for ac_prog in gawk mawk nawk awk
29418 do
29419 # Extract the first word of "$ac_prog", so it can be a program name with args.
29420 set dummy $ac_prog; ac_word=$2
29421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29422 $as_echo_n "checking for $ac_word... " >&6; }
29423 if ${ac_cv_prog_AWK+:} false; then :
29424 $as_echo_n "(cached) " >&6
29425 else
29426 if test -n "$AWK"; then
29427 ac_cv_prog_AWK="$AWK" # Let the user override the test.
29428 else
29429 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29430 for as_dir in $PATH
29431 do
29432 IFS=$as_save_IFS
29433 test -z "$as_dir" && as_dir=.
29434 for ac_exec_ext in '' $ac_executable_extensions; do
29435 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29436 ac_cv_prog_AWK="$ac_prog"
29437 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29438 break 2
29439 fi
29440 done
29441 done
29442 IFS=$as_save_IFS
29443
29444 fi
29445 fi
29446 AWK=$ac_cv_prog_AWK
29447 if test -n "$AWK"; then
29448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
29449 $as_echo "$AWK" >&6; }
29450 else
29451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29452 $as_echo "no" >&6; }
29453 fi
29454
29455
29456 test -n "$AWK" && break
29457 done
29458
29459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
29460 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
29461 set x ${MAKE-make}
29462 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
29463 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
29464 $as_echo_n "(cached) " >&6
29465 else
29466 cat >conftest.make <<\_ACEOF
29467 SHELL = /bin/sh
29468 all:
29469 @echo '@@@%%%=$(MAKE)=@@@%%%'
29470 _ACEOF
29471 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
29472 case `${MAKE-make} -f conftest.make 2>/dev/null` in
29473 *@@@%%%=?*=@@@%%%*)
29474 eval ac_cv_prog_make_${ac_make}_set=yes;;
29475 *)
29476 eval ac_cv_prog_make_${ac_make}_set=no;;
29477 esac
29478 rm -f conftest.make
29479 fi
29480 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
29481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29482 $as_echo "yes" >&6; }
29483 SET_MAKE=
29484 else
29485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29486 $as_echo "no" >&6; }
29487 SET_MAKE="MAKE=${MAKE-make}"
29488 fi
29489
29490 rm -rf .tst 2>/dev/null
29491 mkdir .tst 2>/dev/null
29492 if test -d .tst; then
29493 am__leading_dot=.
29494 else
29495 am__leading_dot=_
29496 fi
29497 rmdir .tst 2>/dev/null
29498
29499 DEPDIR="${am__leading_dot}deps"
29500
29501 ac_config_commands="$ac_config_commands depfiles"
29502
29503
29504 am_make=${MAKE-make}
29505 cat > confinc << 'END'
29506 am__doit:
29507 @echo this is the am__doit target
29508 .PHONY: am__doit
29509 END
29510 # If we don't find an include directive, just comment out the code.
29511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
29512 $as_echo_n "checking for style of include used by $am_make... " >&6; }
29513 am__include="#"
29514 am__quote=
29515 _am_result=none
29516 # First try GNU make style include.
29517 echo "include confinc" > confmf
29518 # Ignore all kinds of additional output from 'make'.
29519 case `$am_make -s -f confmf 2> /dev/null` in #(
29520 *the\ am__doit\ target*)
29521 am__include=include
29522 am__quote=
29523 _am_result=GNU
29524 ;;
29525 esac
29526 # Now try BSD make style include.
29527 if test "$am__include" = "#"; then
29528 echo '.include "confinc"' > confmf
29529 case `$am_make -s -f confmf 2> /dev/null` in #(
29530 *the\ am__doit\ target*)
29531 am__include=.include
29532 am__quote="\""
29533 _am_result=BSD
29534 ;;
29535 esac
29536 fi
29537
29538
29539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
29540 $as_echo "$_am_result" >&6; }
29541 rm -f confinc confmf
29542
29543 # Check whether --enable-dependency-tracking was given.
29544 if test "${enable_dependency_tracking+set}" = set; then :
29545 enableval=$enable_dependency_tracking;
29546 fi
29547
29548 if test "x$enable_dependency_tracking" != xno; then
29549 am_depcomp="$ac_aux_dir/depcomp"
29550 AMDEPBACKSLASH='\'
29551 am__nodep='_no'
29552 fi
29553 if test "x$enable_dependency_tracking" != xno; then
29554 AMDEP_TRUE=
29555 AMDEP_FALSE='#'
29556 else
29557 AMDEP_TRUE='#'
29558 AMDEP_FALSE=
29559 fi
29560
29561
29562 # Check whether --enable-silent-rules was given.
29563 if test "${enable_silent_rules+set}" = set; then :
29564 enableval=$enable_silent_rules;
29565 fi
29566
29567 case $enable_silent_rules in # (((
29568 yes) AM_DEFAULT_VERBOSITY=0;;
29569 no) AM_DEFAULT_VERBOSITY=1;;
29570 *) AM_DEFAULT_VERBOSITY=1;;
29571 esac
29572 am_make=${MAKE-make}
29573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
29574 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
29575 if ${am_cv_make_support_nested_variables+:} false; then :
29576 $as_echo_n "(cached) " >&6
29577 else
29578 if $as_echo 'TRUE=$(BAR$(V))
29579 BAR0=false
29580 BAR1=true
29581 V=1
29582 am__doit:
29583 @$(TRUE)
29584 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
29585 am_cv_make_support_nested_variables=yes
29586 else
29587 am_cv_make_support_nested_variables=no
29588 fi
29589 fi
29590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
29591 $as_echo "$am_cv_make_support_nested_variables" >&6; }
29592 if test $am_cv_make_support_nested_variables = yes; then
29593 AM_V='$(V)'
29594 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
29595 else
29596 AM_V=$AM_DEFAULT_VERBOSITY
29597 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
29598 fi
29599 AM_BACKSLASH='\'
29600
29601 if test "`cd $srcdir && pwd`" != "`pwd`"; then
29602 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
29603 # is not polluted with repeated "-I."
29604 am__isrc=' -I$(srcdir)'
29605 # test to see if srcdir already configured
29606 if test -f $srcdir/config.status; then
29607 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
29608 fi
29609 fi
29610
29611 # test whether we have cygpath
29612 if test -z "$CYGPATH_W"; then
29613 if (cygpath --version) >/dev/null 2>/dev/null; then
29614 CYGPATH_W='cygpath -w'
29615 else
29616 CYGPATH_W=echo
29617 fi
29618 fi
29619
29620
29621 # Define the identity of the package.
29622 PACKAGE='libgnu'
29623 VERSION='UNUSED-VERSION'
29624
29625
29626 # Some tools Automake needs.
29627
29628 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
29629
29630
29631 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
29632
29633
29634 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
29635
29636
29637 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
29638
29639
29640 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
29641
29642 # For better backward compatibility. To be removed once Automake 1.9.x
29643 # dies out for good. For more background, see:
29644 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
29645 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
29646 mkdir_p='$(MKDIR_P)'
29647
29648 # We need awk for the "check" target (and possibly the TAP driver). The
29649 # system "awk" is bad on some platforms.
29650 # Always define AMTAR for backward compatibility. Yes, it's still used
29651 # in the wild :-( We should find a proper way to deprecate it ...
29652 AMTAR='$${TAR-tar}'
29653
29654
29655 # We'll loop over all known methods to create a tar archive until one works.
29656 _am_tools='gnutar pax cpio none'
29657
29658 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
29659
29660
29661
29662
29663
29664 depcc="$CC" am_compiler_list=
29665
29666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
29667 $as_echo_n "checking dependency style of $depcc... " >&6; }
29668 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
29669 $as_echo_n "(cached) " >&6
29670 else
29671 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
29672 # We make a subdir and do the tests there. Otherwise we can end up
29673 # making bogus files that we don't know about and never remove. For
29674 # instance it was reported that on HP-UX the gcc test will end up
29675 # making a dummy file named 'D' -- because '-MD' means "put the output
29676 # in D".
29677 rm -rf conftest.dir
29678 mkdir conftest.dir
29679 # Copy depcomp to subdir because otherwise we won't find it if we're
29680 # using a relative directory.
29681 cp "$am_depcomp" conftest.dir
29682 cd conftest.dir
29683 # We will build objects and dependencies in a subdirectory because
29684 # it helps to detect inapplicable dependency modes. For instance
29685 # both Tru64's cc and ICC support -MD to output dependencies as a
29686 # side effect of compilation, but ICC will put the dependencies in
29687 # the current directory while Tru64 will put them in the object
29688 # directory.
29689 mkdir sub
29690
29691 am_cv_CC_dependencies_compiler_type=none
29692 if test "$am_compiler_list" = ""; then
29693 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
29694 fi
29695 am__universal=false
29696 case " $depcc " in #(
29697 *\ -arch\ *\ -arch\ *) am__universal=true ;;
29698 esac
29699
29700 for depmode in $am_compiler_list; do
29701 # Setup a source with many dependencies, because some compilers
29702 # like to wrap large dependency lists on column 80 (with \), and
29703 # we should not choose a depcomp mode which is confused by this.
29704 #
29705 # We need to recreate these files for each test, as the compiler may
29706 # overwrite some of them when testing with obscure command lines.
29707 # This happens at least with the AIX C compiler.
29708 : > sub/conftest.c
29709 for i in 1 2 3 4 5 6; do
29710 echo '#include "conftst'$i'.h"' >> sub/conftest.c
29711 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
29712 # Solaris 10 /bin/sh.
29713 echo '/* dummy */' > sub/conftst$i.h
29714 done
29715 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
29716
29717 # We check with '-c' and '-o' for the sake of the "dashmstdout"
29718 # mode. It turns out that the SunPro C++ compiler does not properly
29719 # handle '-M -o', and we need to detect this. Also, some Intel
29720 # versions had trouble with output in subdirs.
29721 am__obj=sub/conftest.${OBJEXT-o}
29722 am__minus_obj="-o $am__obj"
29723 case $depmode in
29724 gcc)
29725 # This depmode causes a compiler race in universal mode.
29726 test "$am__universal" = false || continue
29727 ;;
29728 nosideeffect)
29729 # After this tag, mechanisms are not by side-effect, so they'll
29730 # only be used when explicitly requested.
29731 if test "x$enable_dependency_tracking" = xyes; then
29732 continue
29733 else
29734 break
29735 fi
29736 ;;
29737 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
29738 # This compiler won't grok '-c -o', but also, the minuso test has
29739 # not run yet. These depmodes are late enough in the game, and
29740 # so weak that their functioning should not be impacted.
29741 am__obj=conftest.${OBJEXT-o}
29742 am__minus_obj=
29743 ;;
29744 none) break ;;
29745 esac
29746 if depmode=$depmode \
29747 source=sub/conftest.c object=$am__obj \
29748 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
29749 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
29750 >/dev/null 2>conftest.err &&
29751 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
29752 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
29753 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
29754 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
29755 # icc doesn't choke on unknown options, it will just issue warnings
29756 # or remarks (even with -Werror). So we grep stderr for any message
29757 # that says an option was ignored or not supported.
29758 # When given -MP, icc 7.0 and 7.1 complain thusly:
29759 # icc: Command line warning: ignoring option '-M'; no argument required
29760 # The diagnosis changed in icc 8.0:
29761 # icc: Command line remark: option '-MP' not supported
29762 if (grep 'ignoring option' conftest.err ||
29763 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
29764 am_cv_CC_dependencies_compiler_type=$depmode
29765 break
29766 fi
29767 fi
29768 done
29769
29770 cd ..
29771 rm -rf conftest.dir
29772 else
29773 am_cv_CC_dependencies_compiler_type=none
29774 fi
29775
29776 fi
29777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
29778 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
29779 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
29780
29781 if
29782 test "x$enable_dependency_tracking" != xno \
29783 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
29784 am__fastdepCC_TRUE=
29785 am__fastdepCC_FALSE='#'
29786 else
29787 am__fastdepCC_TRUE='#'
29788 am__fastdepCC_FALSE=
29789 fi
29790
29791
29792
29793 # POSIX will say in a future version that running "rm -f" with no argument
29794 # is OK; and we want to be able to make that assumption in our Makefile
29795 # recipes. So use an aggressive probe to check that the usage we want is
29796 # actually supported "in the wild" to an acceptable degree.
29797 # See automake bug#10828.
29798 # To make any issue more visible, cause the running configure to be aborted
29799 # by default if the 'rm' program in use doesn't match our expectations; the
29800 # user can still override this though.
29801 if rm -f && rm -fr && rm -rf; then : OK; else
29802 cat >&2 <<'END'
29803 Oops!
29804
29805 Your 'rm' program seems unable to run without file operands specified
29806 on the command line, even when the '-f' option is present. This is contrary
29807 to the behaviour of most rm programs out there, and not conforming with
29808 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
29809
29810 Please tell bug-automake@gnu.org about your system, including the value
29811 of your $PATH and any error possibly output before this message. This
29812 can help us improve future automake versions.
29813
29814 END
29815 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
29816 echo 'Configuration will proceed anyway, since you have set the' >&2
29817 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
29818 echo >&2
29819 else
29820 cat >&2 <<'END'
29821 Aborting the configuration process, to ensure you take notice of the issue.
29822
29823 You can download and install GNU coreutils to get an 'rm' implementation
29824 that behaves properly: <http://www.gnu.org/software/coreutils/>.
29825
29826 If you want to complete the configuration process using your problematic
29827 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
29828 to "yes", and re-run configure.
29829
29830 END
29831 as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
29832 fi
29833 fi
29834
29835
29836 # Check whether --enable-silent-rules was given.
29837 if test "${enable_silent_rules+set}" = set; then :
29838 enableval=$enable_silent_rules;
29839 fi
29840
29841 case $enable_silent_rules in # (((
29842 yes) AM_DEFAULT_VERBOSITY=0;;
29843 no) AM_DEFAULT_VERBOSITY=1;;
29844 *) AM_DEFAULT_VERBOSITY=0;;
29845 esac
29846 am_make=${MAKE-make}
29847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
29848 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
29849 if ${am_cv_make_support_nested_variables+:} false; then :
29850 $as_echo_n "(cached) " >&6
29851 else
29852 if $as_echo 'TRUE=$(BAR$(V))
29853 BAR0=false
29854 BAR1=true
29855 V=1
29856 am__doit:
29857 @$(TRUE)
29858 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
29859 am_cv_make_support_nested_variables=yes
29860 else
29861 am_cv_make_support_nested_variables=no
29862 fi
29863 fi
29864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
29865 $as_echo "$am_cv_make_support_nested_variables" >&6; }
29866 if test $am_cv_make_support_nested_variables = yes; then
29867 AM_V='$(V)'
29868 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
29869 else
29870 AM_V=$AM_DEFAULT_VERBOSITY
29871 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
29872 fi
29873 AM_BACKSLASH='\'
29874
29875
29876 # --------------------- #
29877 # Checks for programs. #
29878 # --------------------- #
29879
29880
29881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
29882 $as_echo_n "checking whether ln -s works... " >&6; }
29883 LN_S=$as_ln_s
29884 if test "$LN_S" = "ln -s"; then
29885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29886 $as_echo "yes" >&6; }
29887 else
29888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
29889 $as_echo "no, using $LN_S" >&6; }
29890 fi
29891
29892 if test -n "$ac_tool_prefix"; then
29893 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
29894 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
29895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29896 $as_echo_n "checking for $ac_word... " >&6; }
29897 if ${ac_cv_prog_RANLIB+:} false; then :
29898 $as_echo_n "(cached) " >&6
29899 else
29900 if test -n "$RANLIB"; then
29901 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
29902 else
29903 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29904 for as_dir in $PATH
29905 do
29906 IFS=$as_save_IFS
29907 test -z "$as_dir" && as_dir=.
29908 for ac_exec_ext in '' $ac_executable_extensions; do
29909 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29910 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
29911 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29912 break 2
29913 fi
29914 done
29915 done
29916 IFS=$as_save_IFS
29917
29918 fi
29919 fi
29920 RANLIB=$ac_cv_prog_RANLIB
29921 if test -n "$RANLIB"; then
29922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
29923 $as_echo "$RANLIB" >&6; }
29924 else
29925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29926 $as_echo "no" >&6; }
29927 fi
29928
29929
29930 fi
29931 if test -z "$ac_cv_prog_RANLIB"; then
29932 ac_ct_RANLIB=$RANLIB
29933 # Extract the first word of "ranlib", so it can be a program name with args.
29934 set dummy ranlib; ac_word=$2
29935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29936 $as_echo_n "checking for $ac_word... " >&6; }
29937 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
29938 $as_echo_n "(cached) " >&6
29939 else
29940 if test -n "$ac_ct_RANLIB"; then
29941 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
29942 else
29943 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29944 for as_dir in $PATH
29945 do
29946 IFS=$as_save_IFS
29947 test -z "$as_dir" && as_dir=.
29948 for ac_exec_ext in '' $ac_executable_extensions; do
29949 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29950 ac_cv_prog_ac_ct_RANLIB="ranlib"
29951 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29952 break 2
29953 fi
29954 done
29955 done
29956 IFS=$as_save_IFS
29957
29958 fi
29959 fi
29960 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
29961 if test -n "$ac_ct_RANLIB"; then
29962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
29963 $as_echo "$ac_ct_RANLIB" >&6; }
29964 else
29965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29966 $as_echo "no" >&6; }
29967 fi
29968
29969 if test "x$ac_ct_RANLIB" = x; then
29970 RANLIB=":"
29971 else
29972 case $cross_compiling:$ac_tool_warned in
29973 yes:)
29974 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29975 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29976 ac_tool_warned=yes ;;
29977 esac
29978 RANLIB=$ac_ct_RANLIB
29979 fi
29980 else
29981 RANLIB="$ac_cv_prog_RANLIB"
29982 fi
29983
29984
29985 if test -n "$ac_tool_prefix"; then
29986 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
29987 set dummy ${ac_tool_prefix}ar; ac_word=$2
29988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29989 $as_echo_n "checking for $ac_word... " >&6; }
29990 if ${ac_cv_prog_AR+:} false; then :
29991 $as_echo_n "(cached) " >&6
29992 else
29993 if test -n "$AR"; then
29994 ac_cv_prog_AR="$AR" # Let the user override the test.
29995 else
29996 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29997 for as_dir in $PATH
29998 do
29999 IFS=$as_save_IFS
30000 test -z "$as_dir" && as_dir=.
30001 for ac_exec_ext in '' $ac_executable_extensions; do
30002 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30003 ac_cv_prog_AR="${ac_tool_prefix}ar"
30004 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30005 break 2
30006 fi
30007 done
30008 done
30009 IFS=$as_save_IFS
30010
30011 fi
30012 fi
30013 AR=$ac_cv_prog_AR
30014 if test -n "$AR"; then
30015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
30016 $as_echo "$AR" >&6; }
30017 else
30018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30019 $as_echo "no" >&6; }
30020 fi
30021
30022
30023 fi
30024 if test -z "$ac_cv_prog_AR"; then
30025 ac_ct_AR=$AR
30026 # Extract the first word of "ar", so it can be a program name with args.
30027 set dummy ar; ac_word=$2
30028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30029 $as_echo_n "checking for $ac_word... " >&6; }
30030 if ${ac_cv_prog_ac_ct_AR+:} false; then :
30031 $as_echo_n "(cached) " >&6
30032 else
30033 if test -n "$ac_ct_AR"; then
30034 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
30035 else
30036 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30037 for as_dir in $PATH
30038 do
30039 IFS=$as_save_IFS
30040 test -z "$as_dir" && as_dir=.
30041 for ac_exec_ext in '' $ac_executable_extensions; do
30042 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30043 ac_cv_prog_ac_ct_AR="ar"
30044 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30045 break 2
30046 fi
30047 done
30048 done
30049 IFS=$as_save_IFS
30050
30051 fi
30052 fi
30053 ac_ct_AR=$ac_cv_prog_ac_ct_AR
30054 if test -n "$ac_ct_AR"; then
30055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
30056 $as_echo "$ac_ct_AR" >&6; }
30057 else
30058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30059 $as_echo "no" >&6; }
30060 fi
30061
30062 if test "x$ac_ct_AR" = x; then
30063 AR=""
30064 else
30065 case $cross_compiling:$ac_tool_warned in
30066 yes:)
30067 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30068 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30069 ac_tool_warned=yes ;;
30070 esac
30071 AR=$ac_ct_AR
30072 fi
30073 else
30074 AR="$ac_cv_prog_AR"
30075 fi
30076
30077
30078 # ---------------------- #
30079 # Checks for libraries. #
30080 # ---------------------- #
30081
30082 ac_config_files="$ac_config_files Makefile import/Makefile"
30083
30084 ac_config_commands="$ac_config_commands default"
30085
30086 cat >confcache <<\_ACEOF
30087 # This file is a shell script that caches the results of configure
30088 # tests run on this system so they can be shared between configure
30089 # scripts and configure runs, see configure's option --config-cache.
30090 # It is not useful on other systems. If it contains results you don't
30091 # want to keep, you may remove or edit it.
30092 #
30093 # config.status only pays attention to the cache file if you give it
30094 # the --recheck option to rerun configure.
30095 #
30096 # `ac_cv_env_foo' variables (set or unset) will be overridden when
30097 # loading this file, other *unset* `ac_cv_foo' will be assigned the
30098 # following values.
30099
30100 _ACEOF
30101
30102 # The following way of writing the cache mishandles newlines in values,
30103 # but we know of no workaround that is simple, portable, and efficient.
30104 # So, we kill variables containing newlines.
30105 # Ultrix sh set writes to stderr and can't be redirected directly,
30106 # and sets the high bit in the cache file unless we assign to the vars.
30107 (
30108 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
30109 eval ac_val=\$$ac_var
30110 case $ac_val in #(
30111 *${as_nl}*)
30112 case $ac_var in #(
30113 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
30114 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
30115 esac
30116 case $ac_var in #(
30117 _ | IFS | as_nl) ;; #(
30118 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
30119 *) { eval $ac_var=; unset $ac_var;} ;;
30120 esac ;;
30121 esac
30122 done
30123
30124 (set) 2>&1 |
30125 case $as_nl`(ac_space=' '; set) 2>&1` in #(
30126 *${as_nl}ac_space=\ *)
30127 # `set' does not quote correctly, so add quotes: double-quote
30128 # substitution turns \\\\ into \\, and sed turns \\ into \.
30129 sed -n \
30130 "s/'/'\\\\''/g;
30131 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
30132 ;; #(
30133 *)
30134 # `set' quotes correctly as required by POSIX, so do not add quotes.
30135 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
30136 ;;
30137 esac |
30138 sort
30139 ) |
30140 sed '
30141 /^ac_cv_env_/b end
30142 t clear
30143 :clear
30144 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
30145 t end
30146 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
30147 :end' >>confcache
30148 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
30149 if test -w "$cache_file"; then
30150 if test "x$cache_file" != "x/dev/null"; then
30151 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
30152 $as_echo "$as_me: updating cache $cache_file" >&6;}
30153 if test ! -f "$cache_file" || test -h "$cache_file"; then
30154 cat confcache >"$cache_file"
30155 else
30156 case $cache_file in #(
30157 */* | ?:*)
30158 mv -f confcache "$cache_file"$$ &&
30159 mv -f "$cache_file"$$ "$cache_file" ;; #(
30160 *)
30161 mv -f confcache "$cache_file" ;;
30162 esac
30163 fi
30164 fi
30165 else
30166 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
30167 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
30168 fi
30169 fi
30170 rm -f confcache
30171
30172 test "x$prefix" = xNONE && prefix=$ac_default_prefix
30173 # Let make expand exec_prefix.
30174 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
30175
30176 DEFS=-DHAVE_CONFIG_H
30177
30178 ac_libobjs=
30179 ac_ltlibobjs=
30180 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
30181 # 1. Remove the extension, and $U if already installed.
30182 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
30183 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
30184 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
30185 # will be set to the directory where LIBOBJS objects are built.
30186 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
30187 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
30188 done
30189 LIBOBJS=$ac_libobjs
30190
30191 LTLIBOBJS=$ac_ltlibobjs
30192
30193
30194 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
30195 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
30196 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30197 fi
30198 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
30199 as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
30200 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30201 fi
30202 if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
30203 as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
30204 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30205 fi
30206 if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
30207 as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
30208 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30209 fi
30210 if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
30211 as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
30212 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30213 fi
30214 if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
30215 as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
30216 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30217 fi
30218 if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
30219 as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
30220 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30221 fi
30222 if test -z "${GL_GENERATE_GLOB_H_TRUE}" && test -z "${GL_GENERATE_GLOB_H_FALSE}"; then
30223 as_fn_error $? "conditional \"GL_GENERATE_GLOB_H\" was never defined.
30224 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30225 fi
30226 if test -z "${GL_GENERATE_GLOB_H_TRUE}" && test -z "${GL_GENERATE_GLOB_H_FALSE}"; then
30227 as_fn_error $? "conditional \"GL_GENERATE_GLOB_H\" was never defined.
30228 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30229 fi
30230 if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
30231 as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
30232 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30233 fi
30234 if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
30235 as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
30236 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30237 fi
30238 if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
30239 as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
30240 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30241 fi
30242
30243
30244 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
30245 as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
30246 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30247 fi
30248 if test -z "${GL_GENERATE_NETINET_IN_H_TRUE}" && test -z "${GL_GENERATE_NETINET_IN_H_FALSE}"; then
30249 as_fn_error $? "conditional \"GL_GENERATE_NETINET_IN_H\" was never defined.
30250 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30251 fi
30252 if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
30253 as_fn_error $? "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
30254 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30255 fi
30256 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
30257 as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
30258 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30259 fi
30260 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
30261 as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
30262 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30263 fi
30264
30265 gl_libobjs=
30266 gl_ltlibobjs=
30267 if test -n "$gl_LIBOBJS"; then
30268 # Remove the extension.
30269 sed_drop_objext='s/\.o$//;s/\.obj$//'
30270 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
30271 gl_libobjs="$gl_libobjs $i.$ac_objext"
30272 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
30273 done
30274 fi
30275 gl_LIBOBJS=$gl_libobjs
30276
30277 gl_LTLIBOBJS=$gl_ltlibobjs
30278
30279
30280
30281 gltests_libobjs=
30282 gltests_ltlibobjs=
30283 if test -n "$gltests_LIBOBJS"; then
30284 # Remove the extension.
30285 sed_drop_objext='s/\.o$//;s/\.obj$//'
30286 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
30287 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
30288 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
30289 done
30290 fi
30291 gltests_LIBOBJS=$gltests_libobjs
30292
30293 gltests_LTLIBOBJS=$gltests_ltlibobjs
30294
30295
30296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
30297 $as_echo_n "checking that generated files are newer than configure... " >&6; }
30298 if test -n "$am_sleep_pid"; then
30299 # Hide warnings about reused PIDs.
30300 wait $am_sleep_pid 2>/dev/null
30301 fi
30302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
30303 $as_echo "done" >&6; }
30304 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
30305 as_fn_error $? "conditional \"AMDEP\" was never defined.
30306 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30307 fi
30308 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
30309 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
30310 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30311 fi
30312 if test -n "$EXEEXT"; then
30313 am__EXEEXT_TRUE=
30314 am__EXEEXT_FALSE='#'
30315 else
30316 am__EXEEXT_TRUE='#'
30317 am__EXEEXT_FALSE=
30318 fi
30319
30320
30321 : "${CONFIG_STATUS=./config.status}"
30322 ac_write_fail=0
30323 ac_clean_files_save=$ac_clean_files
30324 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
30325 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
30326 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
30327 as_write_fail=0
30328 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
30329 #! $SHELL
30330 # Generated by $as_me.
30331 # Run this file to recreate the current configuration.
30332 # Compiler output produced by configure, useful for debugging
30333 # configure, is in config.log if it exists.
30334
30335 debug=false
30336 ac_cs_recheck=false
30337 ac_cs_silent=false
30338
30339 SHELL=\${CONFIG_SHELL-$SHELL}
30340 export SHELL
30341 _ASEOF
30342 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
30343 ## -------------------- ##
30344 ## M4sh Initialization. ##
30345 ## -------------------- ##
30346
30347 # Be more Bourne compatible
30348 DUALCASE=1; export DUALCASE # for MKS sh
30349 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
30350 emulate sh
30351 NULLCMD=:
30352 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
30353 # is contrary to our usage. Disable this feature.
30354 alias -g '${1+"$@"}'='"$@"'
30355 setopt NO_GLOB_SUBST
30356 else
30357 case `(set -o) 2>/dev/null` in #(
30358 *posix*) :
30359 set -o posix ;; #(
30360 *) :
30361 ;;
30362 esac
30363 fi
30364
30365
30366 as_nl='
30367 '
30368 export as_nl
30369 # Printing a long string crashes Solaris 7 /usr/bin/printf.
30370 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
30371 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
30372 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
30373 # Prefer a ksh shell builtin over an external printf program on Solaris,
30374 # but without wasting forks for bash or zsh.
30375 if test -z "$BASH_VERSION$ZSH_VERSION" \
30376 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
30377 as_echo='print -r --'
30378 as_echo_n='print -rn --'
30379 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
30380 as_echo='printf %s\n'
30381 as_echo_n='printf %s'
30382 else
30383 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
30384 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
30385 as_echo_n='/usr/ucb/echo -n'
30386 else
30387 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
30388 as_echo_n_body='eval
30389 arg=$1;
30390 case $arg in #(
30391 *"$as_nl"*)
30392 expr "X$arg" : "X\\(.*\\)$as_nl";
30393 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
30394 esac;
30395 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
30396 '
30397 export as_echo_n_body
30398 as_echo_n='sh -c $as_echo_n_body as_echo'
30399 fi
30400 export as_echo_body
30401 as_echo='sh -c $as_echo_body as_echo'
30402 fi
30403
30404 # The user is always right.
30405 if test "${PATH_SEPARATOR+set}" != set; then
30406 PATH_SEPARATOR=:
30407 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
30408 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
30409 PATH_SEPARATOR=';'
30410 }
30411 fi
30412
30413
30414 # IFS
30415 # We need space, tab and new line, in precisely that order. Quoting is
30416 # there to prevent editors from complaining about space-tab.
30417 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
30418 # splitting by setting IFS to empty value.)
30419 IFS=" "" $as_nl"
30420
30421 # Find who we are. Look in the path if we contain no directory separator.
30422 as_myself=
30423 case $0 in #((
30424 *[\\/]* ) as_myself=$0 ;;
30425 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30426 for as_dir in $PATH
30427 do
30428 IFS=$as_save_IFS
30429 test -z "$as_dir" && as_dir=.
30430 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
30431 done
30432 IFS=$as_save_IFS
30433
30434 ;;
30435 esac
30436 # We did not find ourselves, most probably we were run as `sh COMMAND'
30437 # in which case we are not to be found in the path.
30438 if test "x$as_myself" = x; then
30439 as_myself=$0
30440 fi
30441 if test ! -f "$as_myself"; then
30442 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
30443 exit 1
30444 fi
30445
30446 # Unset variables that we do not need and which cause bugs (e.g. in
30447 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
30448 # suppresses any "Segmentation fault" message there. '((' could
30449 # trigger a bug in pdksh 5.2.14.
30450 for as_var in BASH_ENV ENV MAIL MAILPATH
30451 do eval test x\${$as_var+set} = xset \
30452 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
30453 done
30454 PS1='$ '
30455 PS2='> '
30456 PS4='+ '
30457
30458 # NLS nuisances.
30459 LC_ALL=C
30460 export LC_ALL
30461 LANGUAGE=C
30462 export LANGUAGE
30463
30464 # CDPATH.
30465 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
30466
30467
30468 # as_fn_error STATUS ERROR [LINENO LOG_FD]
30469 # ----------------------------------------
30470 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
30471 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
30472 # script with STATUS, using 1 if that was 0.
30473 as_fn_error ()
30474 {
30475 as_status=$1; test $as_status -eq 0 && as_status=1
30476 if test "$4"; then
30477 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
30478 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
30479 fi
30480 $as_echo "$as_me: error: $2" >&2
30481 as_fn_exit $as_status
30482 } # as_fn_error
30483
30484
30485 # as_fn_set_status STATUS
30486 # -----------------------
30487 # Set $? to STATUS, without forking.
30488 as_fn_set_status ()
30489 {
30490 return $1
30491 } # as_fn_set_status
30492
30493 # as_fn_exit STATUS
30494 # -----------------
30495 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
30496 as_fn_exit ()
30497 {
30498 set +e
30499 as_fn_set_status $1
30500 exit $1
30501 } # as_fn_exit
30502
30503 # as_fn_unset VAR
30504 # ---------------
30505 # Portably unset VAR.
30506 as_fn_unset ()
30507 {
30508 { eval $1=; unset $1;}
30509 }
30510 as_unset=as_fn_unset
30511 # as_fn_append VAR VALUE
30512 # ----------------------
30513 # Append the text in VALUE to the end of the definition contained in VAR. Take
30514 # advantage of any shell optimizations that allow amortized linear growth over
30515 # repeated appends, instead of the typical quadratic growth present in naive
30516 # implementations.
30517 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
30518 eval 'as_fn_append ()
30519 {
30520 eval $1+=\$2
30521 }'
30522 else
30523 as_fn_append ()
30524 {
30525 eval $1=\$$1\$2
30526 }
30527 fi # as_fn_append
30528
30529 # as_fn_arith ARG...
30530 # ------------------
30531 # Perform arithmetic evaluation on the ARGs, and store the result in the
30532 # global $as_val. Take advantage of shells that can avoid forks. The arguments
30533 # must be portable across $(()) and expr.
30534 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
30535 eval 'as_fn_arith ()
30536 {
30537 as_val=$(( $* ))
30538 }'
30539 else
30540 as_fn_arith ()
30541 {
30542 as_val=`expr "$@" || test $? -eq 1`
30543 }
30544 fi # as_fn_arith
30545
30546
30547 if expr a : '\(a\)' >/dev/null 2>&1 &&
30548 test "X`expr 00001 : '.*\(...\)'`" = X001; then
30549 as_expr=expr
30550 else
30551 as_expr=false
30552 fi
30553
30554 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
30555 as_basename=basename
30556 else
30557 as_basename=false
30558 fi
30559
30560 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
30561 as_dirname=dirname
30562 else
30563 as_dirname=false
30564 fi
30565
30566 as_me=`$as_basename -- "$0" ||
30567 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
30568 X"$0" : 'X\(//\)$' \| \
30569 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
30570 $as_echo X/"$0" |
30571 sed '/^.*\/\([^/][^/]*\)\/*$/{
30572 s//\1/
30573 q
30574 }
30575 /^X\/\(\/\/\)$/{
30576 s//\1/
30577 q
30578 }
30579 /^X\/\(\/\).*/{
30580 s//\1/
30581 q
30582 }
30583 s/.*/./; q'`
30584
30585 # Avoid depending upon Character Ranges.
30586 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
30587 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
30588 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
30589 as_cr_digits='0123456789'
30590 as_cr_alnum=$as_cr_Letters$as_cr_digits
30591
30592 ECHO_C= ECHO_N= ECHO_T=
30593 case `echo -n x` in #(((((
30594 -n*)
30595 case `echo 'xy\c'` in
30596 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
30597 xy) ECHO_C='\c';;
30598 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
30599 ECHO_T=' ';;
30600 esac;;
30601 *)
30602 ECHO_N='-n';;
30603 esac
30604
30605 rm -f conf$$ conf$$.exe conf$$.file
30606 if test -d conf$$.dir; then
30607 rm -f conf$$.dir/conf$$.file
30608 else
30609 rm -f conf$$.dir
30610 mkdir conf$$.dir 2>/dev/null
30611 fi
30612 if (echo >conf$$.file) 2>/dev/null; then
30613 if ln -s conf$$.file conf$$ 2>/dev/null; then
30614 as_ln_s='ln -s'
30615 # ... but there are two gotchas:
30616 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
30617 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
30618 # In both cases, we have to default to `cp -pR'.
30619 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
30620 as_ln_s='cp -pR'
30621 elif ln conf$$.file conf$$ 2>/dev/null; then
30622 as_ln_s=ln
30623 else
30624 as_ln_s='cp -pR'
30625 fi
30626 else
30627 as_ln_s='cp -pR'
30628 fi
30629 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
30630 rmdir conf$$.dir 2>/dev/null
30631
30632
30633 # as_fn_mkdir_p
30634 # -------------
30635 # Create "$as_dir" as a directory, including parents if necessary.
30636 as_fn_mkdir_p ()
30637 {
30638
30639 case $as_dir in #(
30640 -*) as_dir=./$as_dir;;
30641 esac
30642 test -d "$as_dir" || eval $as_mkdir_p || {
30643 as_dirs=
30644 while :; do
30645 case $as_dir in #(
30646 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
30647 *) as_qdir=$as_dir;;
30648 esac
30649 as_dirs="'$as_qdir' $as_dirs"
30650 as_dir=`$as_dirname -- "$as_dir" ||
30651 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30652 X"$as_dir" : 'X\(//\)[^/]' \| \
30653 X"$as_dir" : 'X\(//\)$' \| \
30654 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
30655 $as_echo X"$as_dir" |
30656 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30657 s//\1/
30658 q
30659 }
30660 /^X\(\/\/\)[^/].*/{
30661 s//\1/
30662 q
30663 }
30664 /^X\(\/\/\)$/{
30665 s//\1/
30666 q
30667 }
30668 /^X\(\/\).*/{
30669 s//\1/
30670 q
30671 }
30672 s/.*/./; q'`
30673 test -d "$as_dir" && break
30674 done
30675 test -z "$as_dirs" || eval "mkdir $as_dirs"
30676 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
30677
30678
30679 } # as_fn_mkdir_p
30680 if mkdir -p . 2>/dev/null; then
30681 as_mkdir_p='mkdir -p "$as_dir"'
30682 else
30683 test -d ./-p && rmdir ./-p
30684 as_mkdir_p=false
30685 fi
30686
30687
30688 # as_fn_executable_p FILE
30689 # -----------------------
30690 # Test if FILE is an executable regular file.
30691 as_fn_executable_p ()
30692 {
30693 test -f "$1" && test -x "$1"
30694 } # as_fn_executable_p
30695 as_test_x='test -x'
30696 as_executable_p=as_fn_executable_p
30697
30698 # Sed expression to map a string onto a valid CPP name.
30699 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
30700
30701 # Sed expression to map a string onto a valid variable name.
30702 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
30703
30704
30705 exec 6>&1
30706 ## ----------------------------------- ##
30707 ## Main body of $CONFIG_STATUS script. ##
30708 ## ----------------------------------- ##
30709 _ASEOF
30710 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
30711
30712 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30713 # Save the log message, to keep $0 and so on meaningful, and to
30714 # report actual input values of CONFIG_FILES etc. instead of their
30715 # values after options handling.
30716 ac_log="
30717 This file was extended by libgnu $as_me UNUSED-VERSION, which was
30718 generated by GNU Autoconf 2.69. Invocation command line was
30719
30720 CONFIG_FILES = $CONFIG_FILES
30721 CONFIG_HEADERS = $CONFIG_HEADERS
30722 CONFIG_LINKS = $CONFIG_LINKS
30723 CONFIG_COMMANDS = $CONFIG_COMMANDS
30724 $ $0 $@
30725
30726 on `(hostname || uname -n) 2>/dev/null | sed 1q`
30727 "
30728
30729 _ACEOF
30730
30731 case $ac_config_files in *"
30732 "*) set x $ac_config_files; shift; ac_config_files=$*;;
30733 esac
30734
30735 case $ac_config_headers in *"
30736 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
30737 esac
30738
30739
30740 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30741 # Files that config.status was made for.
30742 config_files="$ac_config_files"
30743 config_headers="$ac_config_headers"
30744 config_commands="$ac_config_commands"
30745
30746 _ACEOF
30747
30748 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30749 ac_cs_usage="\
30750 \`$as_me' instantiates files and other configuration actions
30751 from templates according to the current configuration. Unless the files
30752 and actions are specified as TAGs, all are instantiated by default.
30753
30754 Usage: $0 [OPTION]... [TAG]...
30755
30756 -h, --help print this help, then exit
30757 -V, --version print version number and configuration settings, then exit
30758 --config print configuration, then exit
30759 -q, --quiet, --silent
30760 do not print progress messages
30761 -d, --debug don't remove temporary files
30762 --recheck update $as_me by reconfiguring in the same conditions
30763 --file=FILE[:TEMPLATE]
30764 instantiate the configuration file FILE
30765 --header=FILE[:TEMPLATE]
30766 instantiate the configuration header FILE
30767
30768 Configuration files:
30769 $config_files
30770
30771 Configuration headers:
30772 $config_headers
30773
30774 Configuration commands:
30775 $config_commands
30776
30777 Report bugs to the package provider."
30778
30779 _ACEOF
30780 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30781 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
30782 ac_cs_version="\\
30783 libgnu config.status UNUSED-VERSION
30784 configured by $0, generated by GNU Autoconf 2.69,
30785 with options \\"\$ac_cs_config\\"
30786
30787 Copyright (C) 2012 Free Software Foundation, Inc.
30788 This config.status script is free software; the Free Software Foundation
30789 gives unlimited permission to copy, distribute and modify it."
30790
30791 ac_pwd='$ac_pwd'
30792 srcdir='$srcdir'
30793 INSTALL='$INSTALL'
30794 MKDIR_P='$MKDIR_P'
30795 AWK='$AWK'
30796 test -n "\$AWK" || AWK=awk
30797 _ACEOF
30798
30799 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30800 # The default lists apply if the user does not specify any file.
30801 ac_need_defaults=:
30802 while test $# != 0
30803 do
30804 case $1 in
30805 --*=?*)
30806 ac_option=`expr "X$1" : 'X\([^=]*\)='`
30807 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
30808 ac_shift=:
30809 ;;
30810 --*=)
30811 ac_option=`expr "X$1" : 'X\([^=]*\)='`
30812 ac_optarg=
30813 ac_shift=:
30814 ;;
30815 *)
30816 ac_option=$1
30817 ac_optarg=$2
30818 ac_shift=shift
30819 ;;
30820 esac
30821
30822 case $ac_option in
30823 # Handling of the options.
30824 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
30825 ac_cs_recheck=: ;;
30826 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
30827 $as_echo "$ac_cs_version"; exit ;;
30828 --config | --confi | --conf | --con | --co | --c )
30829 $as_echo "$ac_cs_config"; exit ;;
30830 --debug | --debu | --deb | --de | --d | -d )
30831 debug=: ;;
30832 --file | --fil | --fi | --f )
30833 $ac_shift
30834 case $ac_optarg in
30835 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
30836 '') as_fn_error $? "missing file argument" ;;
30837 esac
30838 as_fn_append CONFIG_FILES " '$ac_optarg'"
30839 ac_need_defaults=false;;
30840 --header | --heade | --head | --hea )
30841 $ac_shift
30842 case $ac_optarg in
30843 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
30844 esac
30845 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
30846 ac_need_defaults=false;;
30847 --he | --h)
30848 # Conflict between --help and --header
30849 as_fn_error $? "ambiguous option: \`$1'
30850 Try \`$0 --help' for more information.";;
30851 --help | --hel | -h )
30852 $as_echo "$ac_cs_usage"; exit ;;
30853 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
30854 | -silent | --silent | --silen | --sile | --sil | --si | --s)
30855 ac_cs_silent=: ;;
30856
30857 # This is an error.
30858 -*) as_fn_error $? "unrecognized option: \`$1'
30859 Try \`$0 --help' for more information." ;;
30860
30861 *) as_fn_append ac_config_targets " $1"
30862 ac_need_defaults=false ;;
30863
30864 esac
30865 shift
30866 done
30867
30868 ac_configure_extra_args=
30869
30870 if $ac_cs_silent; then
30871 exec 6>/dev/null
30872 ac_configure_extra_args="$ac_configure_extra_args --silent"
30873 fi
30874
30875 _ACEOF
30876 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30877 if \$ac_cs_recheck; then
30878 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
30879 shift
30880 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
30881 CONFIG_SHELL='$SHELL'
30882 export CONFIG_SHELL
30883 exec "\$@"
30884 fi
30885
30886 _ACEOF
30887 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30888 exec 5>>config.log
30889 {
30890 echo
30891 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
30892 ## Running $as_me. ##
30893 _ASBOX
30894 $as_echo "$ac_log"
30895 } >&5
30896
30897 _ACEOF
30898 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30899 #
30900 # INIT-COMMANDS
30901 #
30902 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
30903
30904 _ACEOF
30905
30906 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30907
30908 # Handling of arguments.
30909 for ac_config_target in $ac_config_targets
30910 do
30911 case $ac_config_target in
30912 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
30913 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
30914 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
30915 "import/Makefile") CONFIG_FILES="$CONFIG_FILES import/Makefile" ;;
30916 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
30917
30918 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
30919 esac
30920 done
30921
30922
30923 # If the user did not use the arguments to specify the items to instantiate,
30924 # then the envvar interface is used. Set only those that are not.
30925 # We use the long form for the default assignment because of an extremely
30926 # bizarre bug on SunOS 4.1.3.
30927 if $ac_need_defaults; then
30928 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
30929 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
30930 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
30931 fi
30932
30933 # Have a temporary directory for convenience. Make it in the build tree
30934 # simply because there is no reason against having it here, and in addition,
30935 # creating and moving files from /tmp can sometimes cause problems.
30936 # Hook for its removal unless debugging.
30937 # Note that there is a small window in which the directory will not be cleaned:
30938 # after its creation but before its name has been assigned to `$tmp'.
30939 $debug ||
30940 {
30941 tmp= ac_tmp=
30942 trap 'exit_status=$?
30943 : "${ac_tmp:=$tmp}"
30944 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
30945 ' 0
30946 trap 'as_fn_exit 1' 1 2 13 15
30947 }
30948 # Create a (secure) tmp directory for tmp files.
30949
30950 {
30951 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
30952 test -d "$tmp"
30953 } ||
30954 {
30955 tmp=./conf$$-$RANDOM
30956 (umask 077 && mkdir "$tmp")
30957 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
30958 ac_tmp=$tmp
30959
30960 # Set up the scripts for CONFIG_FILES section.
30961 # No need to generate them if there are no CONFIG_FILES.
30962 # This happens for instance with `./config.status config.h'.
30963 if test -n "$CONFIG_FILES"; then
30964
30965
30966 ac_cr=`echo X | tr X '\015'`
30967 # On cygwin, bash can eat \r inside `` if the user requested igncr.
30968 # But we know of no other shell where ac_cr would be empty at this
30969 # point, so we can use a bashism as a fallback.
30970 if test "x$ac_cr" = x; then
30971 eval ac_cr=\$\'\\r\'
30972 fi
30973 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
30974 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
30975 ac_cs_awk_cr='\\r'
30976 else
30977 ac_cs_awk_cr=$ac_cr
30978 fi
30979
30980 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
30981 _ACEOF
30982
30983
30984 {
30985 echo "cat >conf$$subs.awk <<_ACEOF" &&
30986 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
30987 echo "_ACEOF"
30988 } >conf$$subs.sh ||
30989 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
30990 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
30991 ac_delim='%!_!# '
30992 for ac_last_try in false false false false false :; do
30993 . ./conf$$subs.sh ||
30994 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
30995
30996 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
30997 if test $ac_delim_n = $ac_delim_num; then
30998 break
30999 elif $ac_last_try; then
31000 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
31001 else
31002 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
31003 fi
31004 done
31005 rm -f conf$$subs.sh
31006
31007 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31008 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
31009 _ACEOF
31010 sed -n '
31011 h
31012 s/^/S["/; s/!.*/"]=/
31013 p
31014 g
31015 s/^[^!]*!//
31016 :repl
31017 t repl
31018 s/'"$ac_delim"'$//
31019 t delim
31020 :nl
31021 h
31022 s/\(.\{148\}\)..*/\1/
31023 t more1
31024 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
31025 p
31026 n
31027 b repl
31028 :more1
31029 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
31030 p
31031 g
31032 s/.\{148\}//
31033 t nl
31034 :delim
31035 h
31036 s/\(.\{148\}\)..*/\1/
31037 t more2
31038 s/["\\]/\\&/g; s/^/"/; s/$/"/
31039 p
31040 b
31041 :more2
31042 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
31043 p
31044 g
31045 s/.\{148\}//
31046 t delim
31047 ' <conf$$subs.awk | sed '
31048 /^[^""]/{
31049 N
31050 s/\n//
31051 }
31052 ' >>$CONFIG_STATUS || ac_write_fail=1
31053 rm -f conf$$subs.awk
31054 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31055 _ACAWK
31056 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
31057 for (key in S) S_is_set[key] = 1
31058 FS = "\a"
31059
31060 }
31061 {
31062 line = $ 0
31063 nfields = split(line, field, "@")
31064 substed = 0
31065 len = length(field[1])
31066 for (i = 2; i < nfields; i++) {
31067 key = field[i]
31068 keylen = length(key)
31069 if (S_is_set[key]) {
31070 value = S[key]
31071 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
31072 len += length(value) + length(field[++i])
31073 substed = 1
31074 } else
31075 len += 1 + keylen
31076 }
31077
31078 print line
31079 }
31080
31081 _ACAWK
31082 _ACEOF
31083 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31084 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
31085 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
31086 else
31087 cat
31088 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
31089 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
31090 _ACEOF
31091
31092 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
31093 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
31094 # trailing colons and then remove the whole line if VPATH becomes empty
31095 # (actually we leave an empty line to preserve line numbers).
31096 if test "x$srcdir" = x.; then
31097 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
31098 h
31099 s///
31100 s/^/:/
31101 s/[ ]*$/:/
31102 s/:\$(srcdir):/:/g
31103 s/:\${srcdir}:/:/g
31104 s/:@srcdir@:/:/g
31105 s/^:*//
31106 s/:*$//
31107 x
31108 s/\(=[ ]*\).*/\1/
31109 G
31110 s/\n//
31111 s/^[^=]*=[ ]*$//
31112 }'
31113 fi
31114
31115 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31116 fi # test -n "$CONFIG_FILES"
31117
31118 # Set up the scripts for CONFIG_HEADERS section.
31119 # No need to generate them if there are no CONFIG_HEADERS.
31120 # This happens for instance with `./config.status Makefile'.
31121 if test -n "$CONFIG_HEADERS"; then
31122 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
31123 BEGIN {
31124 _ACEOF
31125
31126 # Transform confdefs.h into an awk script `defines.awk', embedded as
31127 # here-document in config.status, that substitutes the proper values into
31128 # config.h.in to produce config.h.
31129
31130 # Create a delimiter string that does not exist in confdefs.h, to ease
31131 # handling of long lines.
31132 ac_delim='%!_!# '
31133 for ac_last_try in false false :; do
31134 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
31135 if test -z "$ac_tt"; then
31136 break
31137 elif $ac_last_try; then
31138 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
31139 else
31140 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
31141 fi
31142 done
31143
31144 # For the awk script, D is an array of macro values keyed by name,
31145 # likewise P contains macro parameters if any. Preserve backslash
31146 # newline sequences.
31147
31148 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
31149 sed -n '
31150 s/.\{148\}/&'"$ac_delim"'/g
31151 t rset
31152 :rset
31153 s/^[ ]*#[ ]*define[ ][ ]*/ /
31154 t def
31155 d
31156 :def
31157 s/\\$//
31158 t bsnl
31159 s/["\\]/\\&/g
31160 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
31161 D["\1"]=" \3"/p
31162 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
31163 d
31164 :bsnl
31165 s/["\\]/\\&/g
31166 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
31167 D["\1"]=" \3\\\\\\n"\\/p
31168 t cont
31169 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
31170 t cont
31171 d
31172 :cont
31173 n
31174 s/.\{148\}/&'"$ac_delim"'/g
31175 t clear
31176 :clear
31177 s/\\$//
31178 t bsnlc
31179 s/["\\]/\\&/g; s/^/"/; s/$/"/p
31180 d
31181 :bsnlc
31182 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
31183 b cont
31184 ' <confdefs.h | sed '
31185 s/'"$ac_delim"'/"\\\
31186 "/g' >>$CONFIG_STATUS || ac_write_fail=1
31187
31188 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31189 for (key in D) D_is_set[key] = 1
31190 FS = "\a"
31191 }
31192 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
31193 line = \$ 0
31194 split(line, arg, " ")
31195 if (arg[1] == "#") {
31196 defundef = arg[2]
31197 mac1 = arg[3]
31198 } else {
31199 defundef = substr(arg[1], 2)
31200 mac1 = arg[2]
31201 }
31202 split(mac1, mac2, "(") #)
31203 macro = mac2[1]
31204 prefix = substr(line, 1, index(line, defundef) - 1)
31205 if (D_is_set[macro]) {
31206 # Preserve the white space surrounding the "#".
31207 print prefix "define", macro P[macro] D[macro]
31208 next
31209 } else {
31210 # Replace #undef with comments. This is necessary, for example,
31211 # in the case of _POSIX_SOURCE, which is predefined and required
31212 # on some systems where configure will not decide to define it.
31213 if (defundef == "undef") {
31214 print "/*", prefix defundef, macro, "*/"
31215 next
31216 }
31217 }
31218 }
31219 { print }
31220 _ACAWK
31221 _ACEOF
31222 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31223 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
31224 fi # test -n "$CONFIG_HEADERS"
31225
31226
31227 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
31228 shift
31229 for ac_tag
31230 do
31231 case $ac_tag in
31232 :[FHLC]) ac_mode=$ac_tag; continue;;
31233 esac
31234 case $ac_mode$ac_tag in
31235 :[FHL]*:*);;
31236 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
31237 :[FH]-) ac_tag=-:-;;
31238 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
31239 esac
31240 ac_save_IFS=$IFS
31241 IFS=:
31242 set x $ac_tag
31243 IFS=$ac_save_IFS
31244 shift
31245 ac_file=$1
31246 shift
31247
31248 case $ac_mode in
31249 :L) ac_source=$1;;
31250 :[FH])
31251 ac_file_inputs=
31252 for ac_f
31253 do
31254 case $ac_f in
31255 -) ac_f="$ac_tmp/stdin";;
31256 *) # Look for the file first in the build tree, then in the source tree
31257 # (if the path is not absolute). The absolute path cannot be DOS-style,
31258 # because $ac_f cannot contain `:'.
31259 test -f "$ac_f" ||
31260 case $ac_f in
31261 [\\/$]*) false;;
31262 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
31263 esac ||
31264 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
31265 esac
31266 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
31267 as_fn_append ac_file_inputs " '$ac_f'"
31268 done
31269
31270 # Let's still pretend it is `configure' which instantiates (i.e., don't
31271 # use $as_me), people would be surprised to read:
31272 # /* config.h. Generated by config.status. */
31273 configure_input='Generated from '`
31274 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
31275 `' by configure.'
31276 if test x"$ac_file" != x-; then
31277 configure_input="$ac_file. $configure_input"
31278 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
31279 $as_echo "$as_me: creating $ac_file" >&6;}
31280 fi
31281 # Neutralize special characters interpreted by sed in replacement strings.
31282 case $configure_input in #(
31283 *\&* | *\|* | *\\* )
31284 ac_sed_conf_input=`$as_echo "$configure_input" |
31285 sed 's/[\\\\&|]/\\\\&/g'`;; #(
31286 *) ac_sed_conf_input=$configure_input;;
31287 esac
31288
31289 case $ac_tag in
31290 *:-:* | *:-) cat >"$ac_tmp/stdin" \
31291 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
31292 esac
31293 ;;
31294 esac
31295
31296 ac_dir=`$as_dirname -- "$ac_file" ||
31297 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
31298 X"$ac_file" : 'X\(//\)[^/]' \| \
31299 X"$ac_file" : 'X\(//\)$' \| \
31300 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
31301 $as_echo X"$ac_file" |
31302 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
31303 s//\1/
31304 q
31305 }
31306 /^X\(\/\/\)[^/].*/{
31307 s//\1/
31308 q
31309 }
31310 /^X\(\/\/\)$/{
31311 s//\1/
31312 q
31313 }
31314 /^X\(\/\).*/{
31315 s//\1/
31316 q
31317 }
31318 s/.*/./; q'`
31319 as_dir="$ac_dir"; as_fn_mkdir_p
31320 ac_builddir=.
31321
31322 case "$ac_dir" in
31323 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
31324 *)
31325 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
31326 # A ".." for each directory in $ac_dir_suffix.
31327 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
31328 case $ac_top_builddir_sub in
31329 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
31330 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
31331 esac ;;
31332 esac
31333 ac_abs_top_builddir=$ac_pwd
31334 ac_abs_builddir=$ac_pwd$ac_dir_suffix
31335 # for backward compatibility:
31336 ac_top_builddir=$ac_top_build_prefix
31337
31338 case $srcdir in
31339 .) # We are building in place.
31340 ac_srcdir=.
31341 ac_top_srcdir=$ac_top_builddir_sub
31342 ac_abs_top_srcdir=$ac_pwd ;;
31343 [\\/]* | ?:[\\/]* ) # Absolute name.
31344 ac_srcdir=$srcdir$ac_dir_suffix;
31345 ac_top_srcdir=$srcdir
31346 ac_abs_top_srcdir=$srcdir ;;
31347 *) # Relative name.
31348 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
31349 ac_top_srcdir=$ac_top_build_prefix$srcdir
31350 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
31351 esac
31352 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
31353
31354
31355 case $ac_mode in
31356 :F)
31357 #
31358 # CONFIG_FILE
31359 #
31360
31361 case $INSTALL in
31362 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
31363 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
31364 esac
31365 ac_MKDIR_P=$MKDIR_P
31366 case $MKDIR_P in
31367 [\\/$]* | ?:[\\/]* ) ;;
31368 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
31369 esac
31370 _ACEOF
31371
31372 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31373 # If the template does not know about datarootdir, expand it.
31374 # FIXME: This hack should be removed a few years after 2.60.
31375 ac_datarootdir_hack=; ac_datarootdir_seen=
31376 ac_sed_dataroot='
31377 /datarootdir/ {
31378 p
31379 q
31380 }
31381 /@datadir@/p
31382 /@docdir@/p
31383 /@infodir@/p
31384 /@localedir@/p
31385 /@mandir@/p'
31386 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
31387 *datarootdir*) ac_datarootdir_seen=yes;;
31388 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
31389 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
31390 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
31391 _ACEOF
31392 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31393 ac_datarootdir_hack='
31394 s&@datadir@&$datadir&g
31395 s&@docdir@&$docdir&g
31396 s&@infodir@&$infodir&g
31397 s&@localedir@&$localedir&g
31398 s&@mandir@&$mandir&g
31399 s&\\\${datarootdir}&$datarootdir&g' ;;
31400 esac
31401 _ACEOF
31402
31403 # Neutralize VPATH when `$srcdir' = `.'.
31404 # Shell code in configure.ac might set extrasub.
31405 # FIXME: do we really want to maintain this feature?
31406 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31407 ac_sed_extra="$ac_vpsub
31408 $extrasub
31409 _ACEOF
31410 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31411 :t
31412 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
31413 s|@configure_input@|$ac_sed_conf_input|;t t
31414 s&@top_builddir@&$ac_top_builddir_sub&;t t
31415 s&@top_build_prefix@&$ac_top_build_prefix&;t t
31416 s&@srcdir@&$ac_srcdir&;t t
31417 s&@abs_srcdir@&$ac_abs_srcdir&;t t
31418 s&@top_srcdir@&$ac_top_srcdir&;t t
31419 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
31420 s&@builddir@&$ac_builddir&;t t
31421 s&@abs_builddir@&$ac_abs_builddir&;t t
31422 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
31423 s&@INSTALL@&$ac_INSTALL&;t t
31424 s&@MKDIR_P@&$ac_MKDIR_P&;t t
31425 $ac_datarootdir_hack
31426 "
31427 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
31428 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
31429
31430 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
31431 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
31432 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
31433 "$ac_tmp/out"`; test -z "$ac_out"; } &&
31434 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
31435 which seems to be undefined. Please make sure it is defined" >&5
31436 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
31437 which seems to be undefined. Please make sure it is defined" >&2;}
31438
31439 rm -f "$ac_tmp/stdin"
31440 case $ac_file in
31441 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
31442 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
31443 esac \
31444 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
31445 ;;
31446 :H)
31447 #
31448 # CONFIG_HEADER
31449 #
31450 if test x"$ac_file" != x-; then
31451 {
31452 $as_echo "/* $configure_input */" \
31453 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
31454 } >"$ac_tmp/config.h" \
31455 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
31456 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
31457 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
31458 $as_echo "$as_me: $ac_file is unchanged" >&6;}
31459 else
31460 rm -f "$ac_file"
31461 mv "$ac_tmp/config.h" "$ac_file" \
31462 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
31463 fi
31464 else
31465 $as_echo "/* $configure_input */" \
31466 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
31467 || as_fn_error $? "could not create -" "$LINENO" 5
31468 fi
31469 # Compute "$ac_file"'s index in $config_headers.
31470 _am_arg="$ac_file"
31471 _am_stamp_count=1
31472 for _am_header in $config_headers :; do
31473 case $_am_header in
31474 $_am_arg | $_am_arg:* )
31475 break ;;
31476 * )
31477 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
31478 esac
31479 done
31480 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
31481 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
31482 X"$_am_arg" : 'X\(//\)[^/]' \| \
31483 X"$_am_arg" : 'X\(//\)$' \| \
31484 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
31485 $as_echo X"$_am_arg" |
31486 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
31487 s//\1/
31488 q
31489 }
31490 /^X\(\/\/\)[^/].*/{
31491 s//\1/
31492 q
31493 }
31494 /^X\(\/\/\)$/{
31495 s//\1/
31496 q
31497 }
31498 /^X\(\/\).*/{
31499 s//\1/
31500 q
31501 }
31502 s/.*/./; q'`/stamp-h$_am_stamp_count
31503 ;;
31504
31505 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
31506 $as_echo "$as_me: executing $ac_file commands" >&6;}
31507 ;;
31508 esac
31509
31510
31511 case $ac_file$ac_mode in
31512 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
31513 # Older Autoconf quotes --file arguments for eval, but not when files
31514 # are listed without --file. Let's play safe and only enable the eval
31515 # if we detect the quoting.
31516 case $CONFIG_FILES in
31517 *\'*) eval set x "$CONFIG_FILES" ;;
31518 *) set x $CONFIG_FILES ;;
31519 esac
31520 shift
31521 for mf
31522 do
31523 # Strip MF so we end up with the name of the file.
31524 mf=`echo "$mf" | sed -e 's/:.*$//'`
31525 # Check whether this is an Automake generated Makefile or not.
31526 # We used to match only the files named 'Makefile.in', but
31527 # some people rename them; so instead we look at the file content.
31528 # Grep'ing the first line is not enough: some people post-process
31529 # each Makefile.in and add a new line on top of each file to say so.
31530 # Grep'ing the whole file is not good either: AIX grep has a line
31531 # limit of 2048, but all sed's we know have understand at least 4000.
31532 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
31533 dirpart=`$as_dirname -- "$mf" ||
31534 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
31535 X"$mf" : 'X\(//\)[^/]' \| \
31536 X"$mf" : 'X\(//\)$' \| \
31537 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
31538 $as_echo X"$mf" |
31539 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
31540 s//\1/
31541 q
31542 }
31543 /^X\(\/\/\)[^/].*/{
31544 s//\1/
31545 q
31546 }
31547 /^X\(\/\/\)$/{
31548 s//\1/
31549 q
31550 }
31551 /^X\(\/\).*/{
31552 s//\1/
31553 q
31554 }
31555 s/.*/./; q'`
31556 else
31557 continue
31558 fi
31559 # Extract the definition of DEPDIR, am__include, and am__quote
31560 # from the Makefile without running 'make'.
31561 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
31562 test -z "$DEPDIR" && continue
31563 am__include=`sed -n 's/^am__include = //p' < "$mf"`
31564 test -z "$am__include" && continue
31565 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
31566 # Find all dependency output files, they are included files with
31567 # $(DEPDIR) in their names. We invoke sed twice because it is the
31568 # simplest approach to changing $(DEPDIR) to its actual value in the
31569 # expansion.
31570 for file in `sed -n "
31571 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
31572 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
31573 # Make sure the directory exists.
31574 test -f "$dirpart/$file" && continue
31575 fdir=`$as_dirname -- "$file" ||
31576 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
31577 X"$file" : 'X\(//\)[^/]' \| \
31578 X"$file" : 'X\(//\)$' \| \
31579 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
31580 $as_echo X"$file" |
31581 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
31582 s//\1/
31583 q
31584 }
31585 /^X\(\/\/\)[^/].*/{
31586 s//\1/
31587 q
31588 }
31589 /^X\(\/\/\)$/{
31590 s//\1/
31591 q
31592 }
31593 /^X\(\/\).*/{
31594 s//\1/
31595 q
31596 }
31597 s/.*/./; q'`
31598 as_dir=$dirpart/$fdir; as_fn_mkdir_p
31599 # echo "creating $dirpart/$file"
31600 echo '# dummy' > "$dirpart/$file"
31601 done
31602 done
31603 }
31604 ;;
31605 "default":C)
31606 case x$CONFIG_HEADERS in
31607 xconfig.h:config.in)
31608 echo > stamp-h ;;
31609 esac
31610 ;;
31611
31612 esac
31613 done # for ac_tag
31614
31615
31616 as_fn_exit 0
31617 _ACEOF
31618 ac_clean_files=$ac_clean_files_save
31619
31620 test $ac_write_fail = 0 ||
31621 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
31622
31623
31624 # configure is writing to config.log, and then calls config.status.
31625 # config.status does its own redirection, appending to config.log.
31626 # Unfortunately, on DOS this fails, as config.log is still kept open
31627 # by configure, so config.status won't be able to write to it; its
31628 # output is simply discarded. So we exec the FD to /dev/null,
31629 # effectively closing config.log, so it can be properly (re)opened and
31630 # appended to by config.status. When coming back to configure, we
31631 # need to make the FD available again.
31632 if test "$no_create" != yes; then
31633 ac_cs_success=:
31634 ac_config_status_args=
31635 test "$silent" = yes &&
31636 ac_config_status_args="$ac_config_status_args --quiet"
31637 exec 5>/dev/null
31638 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
31639 exec 5>>config.log
31640 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
31641 # would make configure fail if this is the last instruction.
31642 $ac_cs_success || as_fn_exit 1
31643 fi
31644 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
31645 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
31646 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
31647 fi
31648
31649
31650 exit 0
This page took 0.755419 seconds and 4 git commands to generate.