Import the time_r gnulib module
[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_header_list=
624 gl_func_list=
625 gl_fnmatch_required=POSIX
626 ac_subst_vars='am__EXEEXT_FALSE
627 am__EXEEXT_TRUE
628 gltests_LTLIBOBJS
629 gltests_LIBOBJS
630 gl_LTLIBOBJS
631 gl_LIBOBJS
632 LTLIBOBJS
633 LIBOBJS
634 LN_S
635 AM_BACKSLASH
636 AM_DEFAULT_VERBOSITY
637 AM_DEFAULT_V
638 AM_V
639 am__fastdepCC_FALSE
640 am__fastdepCC_TRUE
641 CCDEPMODE
642 am__nodep
643 AMDEPBACKSLASH
644 AMDEP_FALSE
645 AMDEP_TRUE
646 am__quote
647 am__include
648 DEPDIR
649 am__untar
650 am__tar
651 AMTAR
652 am__leading_dot
653 SET_MAKE
654 AWK
655 mkdir_p
656 INSTALL_STRIP_PROGRAM
657 STRIP
658 install_sh
659 MAKEINFO
660 AUTOHEADER
661 AUTOMAKE
662 AUTOCONF
663 ACLOCAL
664 VERSION
665 PACKAGE
666 CYGPATH_W
667 am__isrc
668 INSTALL_DATA
669 INSTALL_SCRIPT
670 INSTALL_PROGRAM
671 LIBGNU_LTLIBDEPS
672 LIBGNU_LIBDEPS
673 gltests_WITNESS
674 REPLACE_TOWLOWER
675 REPLACE_ISWCNTRL
676 HAVE_WCTYPE_H
677 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
678 NEXT_WCTYPE_H
679 HAVE_ISWCNTRL
680 REPLACE_ISWBLANK
681 HAVE_WCTRANS_T
682 HAVE_WCTYPE_T
683 HAVE_ISWBLANK
684 GNULIB_TOWCTRANS
685 GNULIB_WCTRANS
686 GNULIB_ISWCTYPE
687 GNULIB_WCTYPE
688 GNULIB_ISWBLANK
689 HAVE_WINT_T
690 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
691 NEXT_WCHAR_H
692 HAVE_UNISTD_H
693 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
694 NEXT_UNISTD_H
695 UNISTD_H_DEFINES_STRUCT_TIMESPEC
696 PTHREAD_H_DEFINES_STRUCT_TIMESPEC
697 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
698 TIME_H_DEFINES_STRUCT_TIMESPEC
699 NEXT_AS_FIRST_DIRECTIVE_TIME_H
700 NEXT_TIME_H
701 REPLACE_LOCALTIME
702 REPLACE_GMTIME
703 REPLACE_TIMEGM
704 REPLACE_NANOSLEEP
705 REPLACE_MKTIME
706 REPLACE_LOCALTIME_R
707 HAVE_TIMEGM
708 HAVE_STRPTIME
709 HAVE_NANOSLEEP
710 HAVE_DECL_LOCALTIME_R
711 GNULIB_TIME_RZ
712 GNULIB_TIME_R
713 GNULIB_TIMEGM
714 GNULIB_STRPTIME
715 GNULIB_NANOSLEEP
716 GNULIB_MKTIME
717 HAVE_SYS_UIO_H
718 NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H
719 NEXT_SYS_UIO_H
720 WINDOWS_64_BIT_OFF_T
721 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
722 NEXT_SYS_TYPES_H
723 NEXT_AS_FIRST_DIRECTIVE_STRING_H
724 NEXT_STRING_H
725 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
726 NEXT_STDLIB_H
727 NEXT_AS_FIRST_DIRECTIVE_STDIO_H
728 NEXT_STDIO_H
729 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
730 NEXT_STDDEF_H
731 GL_GENERATE_STDDEF_H_FALSE
732 GL_GENERATE_STDDEF_H_TRUE
733 STDDEF_H
734 HAVE_WCHAR_T
735 HAVE_MAX_ALIGN_T
736 REPLACE_NULL
737 HAVE__BOOL
738 GL_GENERATE_STDBOOL_H_FALSE
739 GL_GENERATE_STDBOOL_H_TRUE
740 STDBOOL_H
741 GL_GENERATE_STDALIGN_H_FALSE
742 GL_GENERATE_STDALIGN_H_TRUE
743 STDALIGN_H
744 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
745 NEXT_SIGNAL_H
746 REPLACE_RAISE
747 REPLACE_PTHREAD_SIGMASK
748 HAVE_SIGHANDLER_T
749 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
750 HAVE_STRUCT_SIGACTION_SA_SIGACTION
751 HAVE_SIGACTION
752 HAVE_SIGINFO_T
753 HAVE_SIGSET_T
754 HAVE_RAISE
755 HAVE_PTHREAD_SIGMASK
756 HAVE_POSIX_SIGNALBLOCKING
757 GNULIB_SIGACTION
758 GNULIB_SIGPROCMASK
759 GNULIB_SIGNAL_H_SIGPIPE
760 GNULIB_RAISE
761 GNULIB_PTHREAD_SIGMASK
762 REPLACE_VSPRINTF
763 REPLACE_VSNPRINTF
764 REPLACE_VPRINTF
765 REPLACE_VFPRINTF
766 REPLACE_VDPRINTF
767 REPLACE_VASPRINTF
768 REPLACE_TMPFILE
769 REPLACE_STDIO_WRITE_FUNCS
770 REPLACE_STDIO_READ_FUNCS
771 REPLACE_SPRINTF
772 REPLACE_SNPRINTF
773 REPLACE_RENAMEAT
774 REPLACE_RENAME
775 REPLACE_REMOVE
776 REPLACE_PRINTF
777 REPLACE_POPEN
778 REPLACE_PERROR
779 REPLACE_OBSTACK_PRINTF
780 REPLACE_GETLINE
781 REPLACE_GETDELIM
782 REPLACE_FTELLO
783 REPLACE_FTELL
784 REPLACE_FSEEKO
785 REPLACE_FSEEK
786 REPLACE_FREOPEN
787 REPLACE_FPURGE
788 REPLACE_FPRINTF
789 REPLACE_FOPEN
790 REPLACE_FFLUSH
791 REPLACE_FDOPEN
792 REPLACE_FCLOSE
793 REPLACE_DPRINTF
794 HAVE_VDPRINTF
795 HAVE_VASPRINTF
796 HAVE_RENAMEAT
797 HAVE_POPEN
798 HAVE_PCLOSE
799 HAVE_FTELLO
800 HAVE_FSEEKO
801 HAVE_DPRINTF
802 HAVE_DECL_VSNPRINTF
803 HAVE_DECL_SNPRINTF
804 HAVE_DECL_OBSTACK_PRINTF
805 HAVE_DECL_GETLINE
806 HAVE_DECL_GETDELIM
807 HAVE_DECL_FTELLO
808 HAVE_DECL_FSEEKO
809 HAVE_DECL_FPURGE
810 GNULIB_VSPRINTF_POSIX
811 GNULIB_VSNPRINTF
812 GNULIB_VPRINTF_POSIX
813 GNULIB_VPRINTF
814 GNULIB_VFPRINTF_POSIX
815 GNULIB_VFPRINTF
816 GNULIB_VDPRINTF
817 GNULIB_VSCANF
818 GNULIB_VFSCANF
819 GNULIB_VASPRINTF
820 GNULIB_TMPFILE
821 GNULIB_STDIO_H_SIGPIPE
822 GNULIB_STDIO_H_NONBLOCKING
823 GNULIB_SPRINTF_POSIX
824 GNULIB_SNPRINTF
825 GNULIB_SCANF
826 GNULIB_RENAMEAT
827 GNULIB_RENAME
828 GNULIB_REMOVE
829 GNULIB_PUTS
830 GNULIB_PUTCHAR
831 GNULIB_PUTC
832 GNULIB_PRINTF_POSIX
833 GNULIB_PRINTF
834 GNULIB_POPEN
835 GNULIB_PERROR
836 GNULIB_PCLOSE
837 GNULIB_OBSTACK_PRINTF_POSIX
838 GNULIB_OBSTACK_PRINTF
839 GNULIB_GETLINE
840 GNULIB_GETDELIM
841 GNULIB_GETCHAR
842 GNULIB_GETC
843 GNULIB_FWRITE
844 GNULIB_FTELLO
845 GNULIB_FTELL
846 GNULIB_FSEEKO
847 GNULIB_FSEEK
848 GNULIB_FSCANF
849 GNULIB_FREOPEN
850 GNULIB_FREAD
851 GNULIB_FPUTS
852 GNULIB_FPUTC
853 GNULIB_FPURGE
854 GNULIB_FPRINTF_POSIX
855 GNULIB_FPRINTF
856 GNULIB_FOPEN
857 GNULIB_FGETS
858 GNULIB_FGETC
859 GNULIB_FFLUSH
860 GNULIB_FDOPEN
861 GNULIB_FCLOSE
862 GNULIB_DPRINTF
863 GL_GENERATE_NETINET_IN_H_FALSE
864 GL_GENERATE_NETINET_IN_H_TRUE
865 NETINET_IN_H
866 HAVE_NETINET_IN_H
867 NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H
868 NEXT_NETINET_IN_H
869 UNDEFINE_STRTOK_R
870 REPLACE_STRTOK_R
871 REPLACE_STRSIGNAL
872 REPLACE_STRNLEN
873 REPLACE_STRNDUP
874 REPLACE_STRNCAT
875 REPLACE_STRERROR_R
876 REPLACE_STRERROR
877 REPLACE_STRCHRNUL
878 REPLACE_STRCASESTR
879 REPLACE_STRSTR
880 REPLACE_STRDUP
881 REPLACE_STPNCPY
882 REPLACE_MEMMEM
883 REPLACE_MEMCHR
884 HAVE_STRVERSCMP
885 HAVE_DECL_STRSIGNAL
886 HAVE_DECL_STRERROR_R
887 HAVE_DECL_STRTOK_R
888 HAVE_STRCASESTR
889 HAVE_STRSEP
890 HAVE_STRPBRK
891 HAVE_DECL_STRNLEN
892 HAVE_DECL_STRNDUP
893 HAVE_DECL_STRDUP
894 HAVE_STRCHRNUL
895 HAVE_STPNCPY
896 HAVE_STPCPY
897 HAVE_RAWMEMCHR
898 HAVE_DECL_MEMRCHR
899 HAVE_MEMPCPY
900 HAVE_DECL_MEMMEM
901 HAVE_MEMCHR
902 HAVE_FFSLL
903 HAVE_FFSL
904 HAVE_MBSLEN
905 GNULIB_STRVERSCMP
906 GNULIB_STRSIGNAL
907 GNULIB_STRERROR_R
908 GNULIB_STRERROR
909 GNULIB_MBSTOK_R
910 GNULIB_MBSSEP
911 GNULIB_MBSSPN
912 GNULIB_MBSPBRK
913 GNULIB_MBSCSPN
914 GNULIB_MBSCASESTR
915 GNULIB_MBSPCASECMP
916 GNULIB_MBSNCASECMP
917 GNULIB_MBSCASECMP
918 GNULIB_MBSSTR
919 GNULIB_MBSRCHR
920 GNULIB_MBSCHR
921 GNULIB_MBSNLEN
922 GNULIB_MBSLEN
923 GNULIB_STRTOK_R
924 GNULIB_STRCASESTR
925 GNULIB_STRSTR
926 GNULIB_STRSEP
927 GNULIB_STRPBRK
928 GNULIB_STRNLEN
929 GNULIB_STRNDUP
930 GNULIB_STRNCAT
931 GNULIB_STRDUP
932 GNULIB_STRCHRNUL
933 GNULIB_STPNCPY
934 GNULIB_STPCPY
935 GNULIB_RAWMEMCHR
936 GNULIB_MEMRCHR
937 GNULIB_MEMPCPY
938 GNULIB_MEMMEM
939 GNULIB_MEMCHR
940 GNULIB_FFSLL
941 GNULIB_FFSL
942 LOCALE_FR
943 LOCALE_FR_UTF8
944 LOCALE_ZH_CN
945 LOCALE_JA
946 REPLACE_WCSWIDTH
947 REPLACE_WCWIDTH
948 REPLACE_WCSNRTOMBS
949 REPLACE_WCSRTOMBS
950 REPLACE_WCRTOMB
951 REPLACE_MBSNRTOWCS
952 REPLACE_MBSRTOWCS
953 REPLACE_MBRLEN
954 REPLACE_MBRTOWC
955 REPLACE_MBSINIT
956 REPLACE_WCTOB
957 REPLACE_BTOWC
958 REPLACE_MBSTATE_T
959 HAVE_DECL_WCWIDTH
960 HAVE_DECL_WCTOB
961 HAVE_WCSWIDTH
962 HAVE_WCSTOK
963 HAVE_WCSSTR
964 HAVE_WCSPBRK
965 HAVE_WCSSPN
966 HAVE_WCSCSPN
967 HAVE_WCSRCHR
968 HAVE_WCSCHR
969 HAVE_WCSDUP
970 HAVE_WCSXFRM
971 HAVE_WCSCOLL
972 HAVE_WCSNCASECMP
973 HAVE_WCSCASECMP
974 HAVE_WCSNCMP
975 HAVE_WCSCMP
976 HAVE_WCSNCAT
977 HAVE_WCSCAT
978 HAVE_WCPNCPY
979 HAVE_WCSNCPY
980 HAVE_WCPCPY
981 HAVE_WCSCPY
982 HAVE_WCSNLEN
983 HAVE_WCSLEN
984 HAVE_WMEMSET
985 HAVE_WMEMMOVE
986 HAVE_WMEMCPY
987 HAVE_WMEMCMP
988 HAVE_WMEMCHR
989 HAVE_WCSNRTOMBS
990 HAVE_WCSRTOMBS
991 HAVE_WCRTOMB
992 HAVE_MBSNRTOWCS
993 HAVE_MBSRTOWCS
994 HAVE_MBRLEN
995 HAVE_MBRTOWC
996 HAVE_MBSINIT
997 HAVE_BTOWC
998 GNULIB_WCSWIDTH
999 GNULIB_WCSTOK
1000 GNULIB_WCSSTR
1001 GNULIB_WCSPBRK
1002 GNULIB_WCSSPN
1003 GNULIB_WCSCSPN
1004 GNULIB_WCSRCHR
1005 GNULIB_WCSCHR
1006 GNULIB_WCSDUP
1007 GNULIB_WCSXFRM
1008 GNULIB_WCSCOLL
1009 GNULIB_WCSNCASECMP
1010 GNULIB_WCSCASECMP
1011 GNULIB_WCSNCMP
1012 GNULIB_WCSCMP
1013 GNULIB_WCSNCAT
1014 GNULIB_WCSCAT
1015 GNULIB_WCPNCPY
1016 GNULIB_WCSNCPY
1017 GNULIB_WCPCPY
1018 GNULIB_WCSCPY
1019 GNULIB_WCSNLEN
1020 GNULIB_WCSLEN
1021 GNULIB_WMEMSET
1022 GNULIB_WMEMMOVE
1023 GNULIB_WMEMCPY
1024 GNULIB_WMEMCMP
1025 GNULIB_WMEMCHR
1026 GNULIB_WCWIDTH
1027 GNULIB_WCSNRTOMBS
1028 GNULIB_WCSRTOMBS
1029 GNULIB_WCRTOMB
1030 GNULIB_MBSNRTOWCS
1031 GNULIB_MBSRTOWCS
1032 GNULIB_MBRLEN
1033 GNULIB_MBRTOWC
1034 GNULIB_MBSINIT
1035 GNULIB_WCTOB
1036 GNULIB_BTOWC
1037 NEXT_AS_FIRST_DIRECTIVE_MATH_H
1038 NEXT_MATH_H
1039 LTLIBMULTITHREAD
1040 LIBMULTITHREAD
1041 LTLIBTHREAD
1042 LIBTHREAD
1043 LIBPTH_PREFIX
1044 LTLIBPTH
1045 LIBPTH
1046 LOCALCHARSET_TESTS_ENVIRONMENT
1047 GLIBC21
1048 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
1049 NEXT_INTTYPES_H
1050 UINT64_MAX_EQ_ULONG_MAX
1051 UINT32_MAX_LT_UINTMAX_MAX
1052 PRIPTR_PREFIX
1053 PRI_MACROS_BROKEN
1054 INT64_MAX_EQ_LONG_MAX
1055 INT32_MAX_LT_INTMAX_MAX
1056 REPLACE_STRTOUMAX
1057 REPLACE_STRTOIMAX
1058 HAVE_DECL_STRTOUMAX
1059 HAVE_DECL_STRTOIMAX
1060 HAVE_DECL_IMAXDIV
1061 HAVE_DECL_IMAXABS
1062 GNULIB_STRTOUMAX
1063 GNULIB_STRTOIMAX
1064 GNULIB_IMAXDIV
1065 GNULIB_IMAXABS
1066 GL_GENERATE_STDINT_H_FALSE
1067 GL_GENERATE_STDINT_H_TRUE
1068 STDINT_H
1069 HAVE_SYS_INTTYPES_H
1070 HAVE_SYS_BITYPES_H
1071 HAVE_C99_STDINT_H
1072 WINT_T_SUFFIX
1073 WCHAR_T_SUFFIX
1074 SIG_ATOMIC_T_SUFFIX
1075 SIZE_T_SUFFIX
1076 PTRDIFF_T_SUFFIX
1077 HAVE_SIGNED_WINT_T
1078 HAVE_SIGNED_WCHAR_T
1079 HAVE_SIGNED_SIG_ATOMIC_T
1080 BITSIZEOF_WINT_T
1081 BITSIZEOF_WCHAR_T
1082 BITSIZEOF_SIG_ATOMIC_T
1083 BITSIZEOF_SIZE_T
1084 BITSIZEOF_PTRDIFF_T
1085 APPLE_UNIVERSAL_BUILD
1086 HAVE_STDINT_H
1087 NEXT_AS_FIRST_DIRECTIVE_STDINT_H
1088 NEXT_STDINT_H
1089 HAVE_SYS_TYPES_H
1090 HAVE_INTTYPES_H
1091 HAVE_WCHAR_H
1092 HAVE_UNSIGNED_LONG_LONG_INT
1093 HAVE_LONG_LONG_INT
1094 GL_GENERATE_LIMITS_H_FALSE
1095 GL_GENERATE_LIMITS_H_TRUE
1096 LIMITS_H
1097 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H
1098 NEXT_LIMITS_H
1099 HAVE_WS2TCPIP_H
1100 HAVE_SYS_SOCKET_H
1101 NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H
1102 NEXT_SYS_SOCKET_H
1103 HAVE_ACCEPT4
1104 HAVE_SA_FAMILY_T
1105 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY
1106 HAVE_STRUCT_SOCKADDR_STORAGE
1107 GNULIB_ACCEPT4
1108 GNULIB_SHUTDOWN
1109 GNULIB_SETSOCKOPT
1110 GNULIB_SENDTO
1111 GNULIB_RECVFROM
1112 GNULIB_SEND
1113 GNULIB_RECV
1114 GNULIB_LISTEN
1115 GNULIB_GETSOCKOPT
1116 GNULIB_GETSOCKNAME
1117 GNULIB_GETPEERNAME
1118 GNULIB_BIND
1119 GNULIB_ACCEPT
1120 GNULIB_CONNECT
1121 GNULIB_SOCKET
1122 INET_NTOP_LIB
1123 HAVE_SYS_CDEFS_H
1124 GL_GENERATE_GLOB_H_FALSE
1125 GL_GENERATE_GLOB_H_TRUE
1126 GLOB_H
1127 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
1128 NEXT_SYS_TIME_H
1129 REPLACE_STRUCT_TIMEVAL
1130 REPLACE_GETTIMEOFDAY
1131 HAVE_TIMEZONE_T
1132 HAVE_SYS_TIME_H
1133 HAVE_STRUCT_TIMEVAL
1134 HAVE_GETTIMEOFDAY
1135 GNULIB_GETTIMEOFDAY
1136 LTLIBINTL
1137 LIBINTL
1138 WINDOWS_64_BIT_ST_SIZE
1139 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
1140 NEXT_SYS_STAT_H
1141 REPLACE_UTIMENSAT
1142 REPLACE_STAT
1143 REPLACE_MKNOD
1144 REPLACE_MKFIFO
1145 REPLACE_MKDIR
1146 REPLACE_LSTAT
1147 REPLACE_FUTIMENS
1148 REPLACE_FSTATAT
1149 REPLACE_FSTAT
1150 HAVE_UTIMENSAT
1151 HAVE_MKNODAT
1152 HAVE_MKNOD
1153 HAVE_MKFIFOAT
1154 HAVE_MKFIFO
1155 HAVE_MKDIRAT
1156 HAVE_LSTAT
1157 HAVE_LCHMOD
1158 HAVE_FUTIMENS
1159 HAVE_FSTATAT
1160 HAVE_FCHMODAT
1161 GNULIB_UTIMENSAT
1162 GNULIB_STAT
1163 GNULIB_MKNODAT
1164 GNULIB_MKNOD
1165 GNULIB_MKFIFOAT
1166 GNULIB_MKFIFO
1167 GNULIB_MKDIRAT
1168 GNULIB_LSTAT
1169 GNULIB_LCHMOD
1170 GNULIB_FUTIMENS
1171 GNULIB_FSTATAT
1172 GNULIB_FSTAT
1173 GNULIB_FCHMODAT
1174 FREXPL_LIBM
1175 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
1176 FREXP_LIBM
1177 REPLACE_TRUNCL
1178 REPLACE_TRUNCF
1179 REPLACE_TRUNC
1180 REPLACE_SQRTL
1181 REPLACE_SIGNBIT_USING_GCC
1182 REPLACE_SIGNBIT
1183 REPLACE_ROUNDL
1184 REPLACE_ROUNDF
1185 REPLACE_ROUND
1186 REPLACE_REMAINDERL
1187 REPLACE_REMAINDERF
1188 REPLACE_REMAINDER
1189 REPLACE_NAN
1190 REPLACE_MODFL
1191 REPLACE_MODFF
1192 REPLACE_MODF
1193 REPLACE_LOGBL
1194 REPLACE_LOGBF
1195 REPLACE_LOGB
1196 REPLACE_LOG2L
1197 REPLACE_LOG2F
1198 REPLACE_LOG2
1199 REPLACE_LOG1PL
1200 REPLACE_LOG1PF
1201 REPLACE_LOG1P
1202 REPLACE_LOG10L
1203 REPLACE_LOG10F
1204 REPLACE_LOG10
1205 REPLACE_LOGL
1206 REPLACE_LOGF
1207 REPLACE_LOG
1208 REPLACE_LDEXPL
1209 REPLACE_ISNAN
1210 REPLACE_ISINF
1211 REPLACE_ISFINITE
1212 REPLACE_ILOGBF
1213 REPLACE_ILOGB
1214 REPLACE_HYPOTL
1215 REPLACE_HYPOTF
1216 REPLACE_HYPOT
1217 REPLACE_HUGE_VAL
1218 REPLACE_FREXPL
1219 REPLACE_FREXP
1220 REPLACE_FREXPF
1221 REPLACE_FMODL
1222 REPLACE_FMODF
1223 REPLACE_FMOD
1224 REPLACE_FMAL
1225 REPLACE_FMAF
1226 REPLACE_FMA
1227 REPLACE_FLOORL
1228 REPLACE_FLOORF
1229 REPLACE_FLOOR
1230 REPLACE_FABSL
1231 REPLACE_EXP2L
1232 REPLACE_EXP2
1233 REPLACE_EXPM1F
1234 REPLACE_EXPM1
1235 REPLACE_CEILL
1236 REPLACE_CEILF
1237 REPLACE_CEIL
1238 REPLACE_CBRTL
1239 REPLACE_CBRTF
1240 HAVE_DECL_TRUNCL
1241 HAVE_DECL_TRUNCF
1242 HAVE_DECL_TRUNC
1243 HAVE_DECL_TANL
1244 HAVE_DECL_SQRTL
1245 HAVE_DECL_SINL
1246 HAVE_DECL_ROUNDL
1247 HAVE_DECL_ROUNDF
1248 HAVE_DECL_ROUND
1249 HAVE_DECL_RINTF
1250 HAVE_DECL_REMAINDERL
1251 HAVE_DECL_REMAINDER
1252 HAVE_DECL_LOGB
1253 HAVE_DECL_LOG2L
1254 HAVE_DECL_LOG2F
1255 HAVE_DECL_LOG2
1256 HAVE_DECL_LOG10L
1257 HAVE_DECL_LOGL
1258 HAVE_DECL_LDEXPL
1259 HAVE_DECL_FREXPL
1260 HAVE_DECL_FLOORL
1261 HAVE_DECL_FLOORF
1262 HAVE_DECL_EXPM1L
1263 HAVE_DECL_EXP2L
1264 HAVE_DECL_EXP2F
1265 HAVE_DECL_EXP2
1266 HAVE_DECL_EXPL
1267 HAVE_DECL_COSL
1268 HAVE_DECL_COPYSIGNF
1269 HAVE_DECL_CEILL
1270 HAVE_DECL_CEILF
1271 HAVE_DECL_CBRTL
1272 HAVE_DECL_CBRTF
1273 HAVE_DECL_ATANL
1274 HAVE_DECL_ASINL
1275 HAVE_DECL_ACOSL
1276 HAVE_TANHF
1277 HAVE_TANL
1278 HAVE_TANF
1279 HAVE_SQRTL
1280 HAVE_SQRTF
1281 HAVE_SINHF
1282 HAVE_SINL
1283 HAVE_SINF
1284 HAVE_RINTL
1285 HAVE_RINT
1286 HAVE_REMAINDERF
1287 HAVE_REMAINDER
1288 HAVE_POWF
1289 HAVE_MODFL
1290 HAVE_MODFF
1291 HAVE_LOGBL
1292 HAVE_LOGBF
1293 HAVE_LOG1PL
1294 HAVE_LOG1PF
1295 HAVE_LOG1P
1296 HAVE_LOG10L
1297 HAVE_LOG10F
1298 HAVE_LOGL
1299 HAVE_LOGF
1300 HAVE_LDEXPF
1301 HAVE_ISNANL
1302 HAVE_ISNAND
1303 HAVE_ISNANF
1304 HAVE_ILOGBL
1305 HAVE_ILOGBF
1306 HAVE_ILOGB
1307 HAVE_HYPOTL
1308 HAVE_HYPOTF
1309 HAVE_FREXPF
1310 HAVE_FMODL
1311 HAVE_FMODF
1312 HAVE_FMAL
1313 HAVE_FMAF
1314 HAVE_FMA
1315 HAVE_FABSL
1316 HAVE_FABSF
1317 HAVE_EXPM1F
1318 HAVE_EXPM1
1319 HAVE_EXPL
1320 HAVE_EXPF
1321 HAVE_COSHF
1322 HAVE_COSL
1323 HAVE_COSF
1324 HAVE_COPYSIGNL
1325 HAVE_COPYSIGN
1326 HAVE_CBRTL
1327 HAVE_CBRTF
1328 HAVE_CBRT
1329 HAVE_ATAN2F
1330 HAVE_ATANL
1331 HAVE_ATANF
1332 HAVE_ASINL
1333 HAVE_ASINF
1334 HAVE_ACOSL
1335 HAVE_ACOSF
1336 GNULIB_TRUNCL
1337 GNULIB_TRUNCF
1338 GNULIB_TRUNC
1339 GNULIB_TANHF
1340 GNULIB_TANL
1341 GNULIB_TANF
1342 GNULIB_SQRTL
1343 GNULIB_SQRTF
1344 GNULIB_SINHF
1345 GNULIB_SINL
1346 GNULIB_SINF
1347 GNULIB_SIGNBIT
1348 GNULIB_ROUNDL
1349 GNULIB_ROUNDF
1350 GNULIB_ROUND
1351 GNULIB_RINTL
1352 GNULIB_RINTF
1353 GNULIB_RINT
1354 GNULIB_REMAINDERL
1355 GNULIB_REMAINDERF
1356 GNULIB_REMAINDER
1357 GNULIB_POWF
1358 GNULIB_MODFL
1359 GNULIB_MODFF
1360 GNULIB_MODF
1361 GNULIB_LOGBL
1362 GNULIB_LOGBF
1363 GNULIB_LOGB
1364 GNULIB_LOG2L
1365 GNULIB_LOG2F
1366 GNULIB_LOG2
1367 GNULIB_LOG1PL
1368 GNULIB_LOG1PF
1369 GNULIB_LOG1P
1370 GNULIB_LOG10L
1371 GNULIB_LOG10F
1372 GNULIB_LOG10
1373 GNULIB_LOGL
1374 GNULIB_LOGF
1375 GNULIB_LOG
1376 GNULIB_LDEXPL
1377 GNULIB_LDEXPF
1378 GNULIB_ISNANL
1379 GNULIB_ISNAND
1380 GNULIB_ISNANF
1381 GNULIB_ISNAN
1382 GNULIB_ISINF
1383 GNULIB_ISFINITE
1384 GNULIB_ILOGBL
1385 GNULIB_ILOGBF
1386 GNULIB_ILOGB
1387 GNULIB_HYPOTL
1388 GNULIB_HYPOTF
1389 GNULIB_HYPOT
1390 GNULIB_FREXPL
1391 GNULIB_FREXP
1392 GNULIB_FREXPF
1393 GNULIB_FMODL
1394 GNULIB_FMODF
1395 GNULIB_FMOD
1396 GNULIB_FMAL
1397 GNULIB_FMAF
1398 GNULIB_FMA
1399 GNULIB_FLOORL
1400 GNULIB_FLOORF
1401 GNULIB_FLOOR
1402 GNULIB_FABSL
1403 GNULIB_FABSF
1404 GNULIB_EXPM1L
1405 GNULIB_EXPM1F
1406 GNULIB_EXPM1
1407 GNULIB_EXP2L
1408 GNULIB_EXP2F
1409 GNULIB_EXP2
1410 GNULIB_EXPL
1411 GNULIB_EXPF
1412 GNULIB_COSHF
1413 GNULIB_COSL
1414 GNULIB_COSF
1415 GNULIB_COPYSIGNL
1416 GNULIB_COPYSIGNF
1417 GNULIB_COPYSIGN
1418 GNULIB_CEILL
1419 GNULIB_CEILF
1420 GNULIB_CEIL
1421 GNULIB_CBRTL
1422 GNULIB_CBRTF
1423 GNULIB_CBRT
1424 GNULIB_ATAN2F
1425 GNULIB_ATANL
1426 GNULIB_ATANF
1427 GNULIB_ASINL
1428 GNULIB_ASINF
1429 GNULIB_ACOSL
1430 GNULIB_ACOSF
1431 GL_GENERATE_FNMATCH_H_FALSE
1432 GL_GENERATE_FNMATCH_H_TRUE
1433 FNMATCH_H
1434 REPLACE_ITOLD
1435 GL_GENERATE_FLOAT_H_FALSE
1436 GL_GENERATE_FLOAT_H_TRUE
1437 FLOAT_H
1438 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1439 NEXT_FLOAT_H
1440 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1441 NEXT_FCNTL_H
1442 REPLACE_OPENAT
1443 REPLACE_OPEN
1444 REPLACE_FCNTL
1445 HAVE_OPENAT
1446 HAVE_FCNTL
1447 GNULIB_OPENAT
1448 GNULIB_OPEN
1449 GNULIB_NONBLOCKING
1450 GNULIB_FCNTL
1451 EOVERFLOW_VALUE
1452 EOVERFLOW_HIDDEN
1453 ENOLINK_VALUE
1454 ENOLINK_HIDDEN
1455 EMULTIHOP_VALUE
1456 EMULTIHOP_HIDDEN
1457 GL_GENERATE_ERRNO_H_FALSE
1458 GL_GENERATE_ERRNO_H_TRUE
1459 ERRNO_H
1460 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1461 NEXT_ERRNO_H
1462 HAVE_DIRENT_H
1463 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1464 NEXT_DIRENT_H
1465 pkglibexecdir
1466 runstatedir
1467 lispdir
1468 REPLACE_FDOPENDIR
1469 REPLACE_DIRFD
1470 REPLACE_CLOSEDIR
1471 REPLACE_OPENDIR
1472 HAVE_ALPHASORT
1473 HAVE_SCANDIR
1474 HAVE_FDOPENDIR
1475 HAVE_DECL_FDOPENDIR
1476 HAVE_DECL_DIRFD
1477 HAVE_CLOSEDIR
1478 HAVE_REWINDDIR
1479 HAVE_READDIR
1480 HAVE_OPENDIR
1481 GNULIB_ALPHASORT
1482 GNULIB_SCANDIR
1483 GNULIB_FDOPENDIR
1484 GNULIB_DIRFD
1485 GNULIB_CLOSEDIR
1486 GNULIB_REWINDDIR
1487 GNULIB_READDIR
1488 GNULIB_OPENDIR
1489 HAVE_WINSOCK2_H
1490 HAVE_MSVC_INVALID_PARAMETER_HANDLER
1491 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1492 UNISTD_H_HAVE_WINSOCK2_H
1493 REPLACE_WRITE
1494 REPLACE_USLEEP
1495 REPLACE_UNLINKAT
1496 REPLACE_UNLINK
1497 REPLACE_TTYNAME_R
1498 REPLACE_SYMLINKAT
1499 REPLACE_SYMLINK
1500 REPLACE_SLEEP
1501 REPLACE_RMDIR
1502 REPLACE_READLINKAT
1503 REPLACE_READLINK
1504 REPLACE_READ
1505 REPLACE_PWRITE
1506 REPLACE_PREAD
1507 REPLACE_LSEEK
1508 REPLACE_LINKAT
1509 REPLACE_LINK
1510 REPLACE_LCHOWN
1511 REPLACE_ISATTY
1512 REPLACE_GETPAGESIZE
1513 REPLACE_GETGROUPS
1514 REPLACE_GETLOGIN_R
1515 REPLACE_GETDTABLESIZE
1516 REPLACE_GETDOMAINNAME
1517 REPLACE_GETCWD
1518 REPLACE_FTRUNCATE
1519 REPLACE_FCHOWNAT
1520 REPLACE_DUP2
1521 REPLACE_DUP
1522 REPLACE_CLOSE
1523 REPLACE_CHOWN
1524 HAVE_SYS_PARAM_H
1525 HAVE_OS_H
1526 HAVE_DECL_TTYNAME_R
1527 HAVE_DECL_SETHOSTNAME
1528 HAVE_DECL_GETUSERSHELL
1529 HAVE_DECL_GETPAGESIZE
1530 HAVE_DECL_GETLOGIN_R
1531 HAVE_DECL_GETDOMAINNAME
1532 HAVE_DECL_FDATASYNC
1533 HAVE_DECL_FCHDIR
1534 HAVE_DECL_ENVIRON
1535 HAVE_USLEEP
1536 HAVE_UNLINKAT
1537 HAVE_SYMLINKAT
1538 HAVE_SYMLINK
1539 HAVE_SLEEP
1540 HAVE_SETHOSTNAME
1541 HAVE_READLINKAT
1542 HAVE_READLINK
1543 HAVE_PWRITE
1544 HAVE_PREAD
1545 HAVE_PIPE2
1546 HAVE_PIPE
1547 HAVE_LINKAT
1548 HAVE_LINK
1549 HAVE_LCHOWN
1550 HAVE_GROUP_MEMBER
1551 HAVE_GETPAGESIZE
1552 HAVE_GETLOGIN
1553 HAVE_GETHOSTNAME
1554 HAVE_GETGROUPS
1555 HAVE_GETDTABLESIZE
1556 HAVE_FTRUNCATE
1557 HAVE_FSYNC
1558 HAVE_FDATASYNC
1559 HAVE_FCHOWNAT
1560 HAVE_FCHDIR
1561 HAVE_FACCESSAT
1562 HAVE_EUIDACCESS
1563 HAVE_DUP3
1564 HAVE_DUP2
1565 HAVE_CHOWN
1566 GNULIB_WRITE
1567 GNULIB_USLEEP
1568 GNULIB_UNLINKAT
1569 GNULIB_UNLINK
1570 GNULIB_UNISTD_H_SIGPIPE
1571 GNULIB_UNISTD_H_NONBLOCKING
1572 GNULIB_TTYNAME_R
1573 GNULIB_SYMLINKAT
1574 GNULIB_SYMLINK
1575 GNULIB_SLEEP
1576 GNULIB_SETHOSTNAME
1577 GNULIB_RMDIR
1578 GNULIB_READLINKAT
1579 GNULIB_READLINK
1580 GNULIB_READ
1581 GNULIB_PWRITE
1582 GNULIB_PREAD
1583 GNULIB_PIPE2
1584 GNULIB_PIPE
1585 GNULIB_LSEEK
1586 GNULIB_LINKAT
1587 GNULIB_LINK
1588 GNULIB_LCHOWN
1589 GNULIB_ISATTY
1590 GNULIB_GROUP_MEMBER
1591 GNULIB_GETUSERSHELL
1592 GNULIB_GETPAGESIZE
1593 GNULIB_GETLOGIN_R
1594 GNULIB_GETLOGIN
1595 GNULIB_GETHOSTNAME
1596 GNULIB_GETGROUPS
1597 GNULIB_GETDTABLESIZE
1598 GNULIB_GETDOMAINNAME
1599 GNULIB_GETCWD
1600 GNULIB_FTRUNCATE
1601 GNULIB_FSYNC
1602 GNULIB_FDATASYNC
1603 GNULIB_FCHOWNAT
1604 GNULIB_FCHDIR
1605 GNULIB_FACCESSAT
1606 GNULIB_EUIDACCESS
1607 GNULIB_ENVIRON
1608 GNULIB_DUP3
1609 GNULIB_DUP2
1610 GNULIB_DUP
1611 GNULIB_CLOSE
1612 GNULIB_CHOWN
1613 GNULIB_CHDIR
1614 REPLACE_WCTOMB
1615 REPLACE_UNSETENV
1616 REPLACE_STRTOD
1617 REPLACE_SETENV
1618 REPLACE_REALPATH
1619 REPLACE_REALLOC
1620 REPLACE_RANDOM_R
1621 REPLACE_QSORT_R
1622 REPLACE_PUTENV
1623 REPLACE_PTSNAME_R
1624 REPLACE_PTSNAME
1625 REPLACE_MKSTEMP
1626 REPLACE_MBTOWC
1627 REPLACE_MALLOC
1628 REPLACE_CANONICALIZE_FILE_NAME
1629 REPLACE_CALLOC
1630 HAVE_DECL_UNSETENV
1631 HAVE_UNLOCKPT
1632 HAVE_SYS_LOADAVG_H
1633 HAVE_STRUCT_RANDOM_DATA
1634 HAVE_STRTOULL
1635 HAVE_STRTOLL
1636 HAVE_STRTOD
1637 HAVE_DECL_SETENV
1638 HAVE_SETENV
1639 HAVE_SECURE_GETENV
1640 HAVE_RPMATCH
1641 HAVE_REALPATH
1642 HAVE_RANDOM_R
1643 HAVE_RANDOM_H
1644 HAVE_RANDOM
1645 HAVE_QSORT_R
1646 HAVE_PTSNAME_R
1647 HAVE_PTSNAME
1648 HAVE_POSIX_OPENPT
1649 HAVE_MKSTEMPS
1650 HAVE_MKSTEMP
1651 HAVE_MKOSTEMPS
1652 HAVE_MKOSTEMP
1653 HAVE_MKDTEMP
1654 HAVE_GRANTPT
1655 HAVE_GETSUBOPT
1656 HAVE_DECL_GETLOADAVG
1657 HAVE_CANONICALIZE_FILE_NAME
1658 HAVE_ATOLL
1659 HAVE__EXIT
1660 GNULIB_WCTOMB
1661 GNULIB_UNSETENV
1662 GNULIB_UNLOCKPT
1663 GNULIB_SYSTEM_POSIX
1664 GNULIB_STRTOULL
1665 GNULIB_STRTOLL
1666 GNULIB_STRTOD
1667 GNULIB_SETENV
1668 GNULIB_SECURE_GETENV
1669 GNULIB_RPMATCH
1670 GNULIB_REALPATH
1671 GNULIB_REALLOC_POSIX
1672 GNULIB_RANDOM_R
1673 GNULIB_RANDOM
1674 GNULIB_QSORT_R
1675 GNULIB_PUTENV
1676 GNULIB_PTSNAME_R
1677 GNULIB_PTSNAME
1678 GNULIB_POSIX_OPENPT
1679 GNULIB_MKSTEMPS
1680 GNULIB_MKSTEMP
1681 GNULIB_MKOSTEMPS
1682 GNULIB_MKOSTEMP
1683 GNULIB_MKDTEMP
1684 GNULIB_MBTOWC
1685 GNULIB_MALLOC_POSIX
1686 GNULIB_GRANTPT
1687 GNULIB_GETSUBOPT
1688 GNULIB_GETLOADAVG
1689 GNULIB_CANONICALIZE_FILE_NAME
1690 GNULIB_CALLOC_POSIX
1691 GNULIB_ATOLL
1692 GNULIB__EXIT
1693 MKDIR_P
1694 HAVE_FEATURES_H
1695 NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H
1696 NEXT_ARPA_INET_H
1697 PRAGMA_COLUMNS
1698 PRAGMA_SYSTEM_HEADER
1699 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1700 INCLUDE_NEXT
1701 HAVE_ARPA_INET_H
1702 REPLACE_INET_PTON
1703 REPLACE_INET_NTOP
1704 HAVE_DECL_INET_PTON
1705 HAVE_DECL_INET_NTOP
1706 GNULIB_INET_PTON
1707 GNULIB_INET_NTOP
1708 GL_GENERATE_ALLOCA_H_FALSE
1709 GL_GENERATE_ALLOCA_H_TRUE
1710 ALLOCA_H
1711 ALLOCA
1712 GL_COND_LIBTOOL_FALSE
1713 GL_COND_LIBTOOL_TRUE
1714 target_os
1715 target_vendor
1716 target_cpu
1717 target
1718 host_os
1719 host_vendor
1720 host_cpu
1721 host
1722 build_os
1723 build_vendor
1724 build_cpu
1725 build
1726 RANLIB
1727 ARFLAGS
1728 ac_ct_AR
1729 AR
1730 EGREP
1731 GREP
1732 CPP
1733 OBJEXT
1734 EXEEXT
1735 ac_ct_CC
1736 CPPFLAGS
1737 LDFLAGS
1738 CFLAGS
1739 CC
1740 MAINT
1741 MAINTAINER_MODE_FALSE
1742 MAINTAINER_MODE_TRUE
1743 target_alias
1744 host_alias
1745 build_alias
1746 LIBS
1747 ECHO_T
1748 ECHO_N
1749 ECHO_C
1750 DEFS
1751 mandir
1752 localedir
1753 libdir
1754 psdir
1755 pdfdir
1756 dvidir
1757 htmldir
1758 infodir
1759 docdir
1760 oldincludedir
1761 includedir
1762 localstatedir
1763 sharedstatedir
1764 sysconfdir
1765 datadir
1766 datarootdir
1767 libexecdir
1768 sbindir
1769 bindir
1770 program_transform_name
1771 prefix
1772 exec_prefix
1773 PACKAGE_URL
1774 PACKAGE_BUGREPORT
1775 PACKAGE_STRING
1776 PACKAGE_VERSION
1777 PACKAGE_TARNAME
1778 PACKAGE_NAME
1779 PATH_SEPARATOR
1780 SHELL'
1781 ac_subst_files=''
1782 ac_user_opts='
1783 enable_option_checking
1784 enable_maintainer_mode
1785 enable_largefile
1786 enable_threads
1787 enable_plugins
1788 with_gnu_ld
1789 enable_rpath
1790 with_libpth_prefix
1791 enable_dependency_tracking
1792 enable_silent_rules
1793 '
1794 ac_precious_vars='build_alias
1795 host_alias
1796 target_alias
1797 CC
1798 CFLAGS
1799 LDFLAGS
1800 LIBS
1801 CPPFLAGS
1802 CPP'
1803
1804
1805 # Initialize some variables set by options.
1806 ac_init_help=
1807 ac_init_version=false
1808 ac_unrecognized_opts=
1809 ac_unrecognized_sep=
1810 # The variables have the same names as the options, with
1811 # dashes changed to underlines.
1812 cache_file=/dev/null
1813 exec_prefix=NONE
1814 no_create=
1815 no_recursion=
1816 prefix=NONE
1817 program_prefix=NONE
1818 program_suffix=NONE
1819 program_transform_name=s,x,x,
1820 silent=
1821 site=
1822 srcdir=
1823 verbose=
1824 x_includes=NONE
1825 x_libraries=NONE
1826
1827 # Installation directory options.
1828 # These are left unexpanded so users can "make install exec_prefix=/foo"
1829 # and all the variables that are supposed to be based on exec_prefix
1830 # by default will actually change.
1831 # Use braces instead of parens because sh, perl, etc. also accept them.
1832 # (The list follows the same order as the GNU Coding Standards.)
1833 bindir='${exec_prefix}/bin'
1834 sbindir='${exec_prefix}/sbin'
1835 libexecdir='${exec_prefix}/libexec'
1836 datarootdir='${prefix}/share'
1837 datadir='${datarootdir}'
1838 sysconfdir='${prefix}/etc'
1839 sharedstatedir='${prefix}/com'
1840 localstatedir='${prefix}/var'
1841 includedir='${prefix}/include'
1842 oldincludedir='/usr/include'
1843 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1844 infodir='${datarootdir}/info'
1845 htmldir='${docdir}'
1846 dvidir='${docdir}'
1847 pdfdir='${docdir}'
1848 psdir='${docdir}'
1849 libdir='${exec_prefix}/lib'
1850 localedir='${datarootdir}/locale'
1851 mandir='${datarootdir}/man'
1852
1853 ac_prev=
1854 ac_dashdash=
1855 for ac_option
1856 do
1857 # If the previous option needs an argument, assign it.
1858 if test -n "$ac_prev"; then
1859 eval $ac_prev=\$ac_option
1860 ac_prev=
1861 continue
1862 fi
1863
1864 case $ac_option in
1865 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1866 *=) ac_optarg= ;;
1867 *) ac_optarg=yes ;;
1868 esac
1869
1870 # Accept the important Cygnus configure options, so we can diagnose typos.
1871
1872 case $ac_dashdash$ac_option in
1873 --)
1874 ac_dashdash=yes ;;
1875
1876 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1877 ac_prev=bindir ;;
1878 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1879 bindir=$ac_optarg ;;
1880
1881 -build | --build | --buil | --bui | --bu)
1882 ac_prev=build_alias ;;
1883 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1884 build_alias=$ac_optarg ;;
1885
1886 -cache-file | --cache-file | --cache-fil | --cache-fi \
1887 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1888 ac_prev=cache_file ;;
1889 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1890 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1891 cache_file=$ac_optarg ;;
1892
1893 --config-cache | -C)
1894 cache_file=config.cache ;;
1895
1896 -datadir | --datadir | --datadi | --datad)
1897 ac_prev=datadir ;;
1898 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1899 datadir=$ac_optarg ;;
1900
1901 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1902 | --dataroo | --dataro | --datar)
1903 ac_prev=datarootdir ;;
1904 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1905 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1906 datarootdir=$ac_optarg ;;
1907
1908 -disable-* | --disable-*)
1909 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1910 # Reject names that are not valid shell variable names.
1911 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1912 as_fn_error $? "invalid feature name: $ac_useropt"
1913 ac_useropt_orig=$ac_useropt
1914 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1915 case $ac_user_opts in
1916 *"
1917 "enable_$ac_useropt"
1918 "*) ;;
1919 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1920 ac_unrecognized_sep=', ';;
1921 esac
1922 eval enable_$ac_useropt=no ;;
1923
1924 -docdir | --docdir | --docdi | --doc | --do)
1925 ac_prev=docdir ;;
1926 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1927 docdir=$ac_optarg ;;
1928
1929 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1930 ac_prev=dvidir ;;
1931 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1932 dvidir=$ac_optarg ;;
1933
1934 -enable-* | --enable-*)
1935 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1936 # Reject names that are not valid shell variable names.
1937 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1938 as_fn_error $? "invalid feature name: $ac_useropt"
1939 ac_useropt_orig=$ac_useropt
1940 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1941 case $ac_user_opts in
1942 *"
1943 "enable_$ac_useropt"
1944 "*) ;;
1945 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1946 ac_unrecognized_sep=', ';;
1947 esac
1948 eval enable_$ac_useropt=\$ac_optarg ;;
1949
1950 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1951 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1952 | --exec | --exe | --ex)
1953 ac_prev=exec_prefix ;;
1954 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1955 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1956 | --exec=* | --exe=* | --ex=*)
1957 exec_prefix=$ac_optarg ;;
1958
1959 -gas | --gas | --ga | --g)
1960 # Obsolete; use --with-gas.
1961 with_gas=yes ;;
1962
1963 -help | --help | --hel | --he | -h)
1964 ac_init_help=long ;;
1965 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1966 ac_init_help=recursive ;;
1967 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1968 ac_init_help=short ;;
1969
1970 -host | --host | --hos | --ho)
1971 ac_prev=host_alias ;;
1972 -host=* | --host=* | --hos=* | --ho=*)
1973 host_alias=$ac_optarg ;;
1974
1975 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1976 ac_prev=htmldir ;;
1977 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1978 | --ht=*)
1979 htmldir=$ac_optarg ;;
1980
1981 -includedir | --includedir | --includedi | --included | --include \
1982 | --includ | --inclu | --incl | --inc)
1983 ac_prev=includedir ;;
1984 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1985 | --includ=* | --inclu=* | --incl=* | --inc=*)
1986 includedir=$ac_optarg ;;
1987
1988 -infodir | --infodir | --infodi | --infod | --info | --inf)
1989 ac_prev=infodir ;;
1990 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1991 infodir=$ac_optarg ;;
1992
1993 -libdir | --libdir | --libdi | --libd)
1994 ac_prev=libdir ;;
1995 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1996 libdir=$ac_optarg ;;
1997
1998 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1999 | --libexe | --libex | --libe)
2000 ac_prev=libexecdir ;;
2001 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
2002 | --libexe=* | --libex=* | --libe=*)
2003 libexecdir=$ac_optarg ;;
2004
2005 -localedir | --localedir | --localedi | --localed | --locale)
2006 ac_prev=localedir ;;
2007 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
2008 localedir=$ac_optarg ;;
2009
2010 -localstatedir | --localstatedir | --localstatedi | --localstated \
2011 | --localstate | --localstat | --localsta | --localst | --locals)
2012 ac_prev=localstatedir ;;
2013 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
2014 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
2015 localstatedir=$ac_optarg ;;
2016
2017 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
2018 ac_prev=mandir ;;
2019 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
2020 mandir=$ac_optarg ;;
2021
2022 -nfp | --nfp | --nf)
2023 # Obsolete; use --without-fp.
2024 with_fp=no ;;
2025
2026 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
2027 | --no-cr | --no-c | -n)
2028 no_create=yes ;;
2029
2030 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
2031 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
2032 no_recursion=yes ;;
2033
2034 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
2035 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
2036 | --oldin | --oldi | --old | --ol | --o)
2037 ac_prev=oldincludedir ;;
2038 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
2039 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
2040 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
2041 oldincludedir=$ac_optarg ;;
2042
2043 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
2044 ac_prev=prefix ;;
2045 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
2046 prefix=$ac_optarg ;;
2047
2048 -program-prefix | --program-prefix | --program-prefi | --program-pref \
2049 | --program-pre | --program-pr | --program-p)
2050 ac_prev=program_prefix ;;
2051 -program-prefix=* | --program-prefix=* | --program-prefi=* \
2052 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
2053 program_prefix=$ac_optarg ;;
2054
2055 -program-suffix | --program-suffix | --program-suffi | --program-suff \
2056 | --program-suf | --program-su | --program-s)
2057 ac_prev=program_suffix ;;
2058 -program-suffix=* | --program-suffix=* | --program-suffi=* \
2059 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
2060 program_suffix=$ac_optarg ;;
2061
2062 -program-transform-name | --program-transform-name \
2063 | --program-transform-nam | --program-transform-na \
2064 | --program-transform-n | --program-transform- \
2065 | --program-transform | --program-transfor \
2066 | --program-transfo | --program-transf \
2067 | --program-trans | --program-tran \
2068 | --progr-tra | --program-tr | --program-t)
2069 ac_prev=program_transform_name ;;
2070 -program-transform-name=* | --program-transform-name=* \
2071 | --program-transform-nam=* | --program-transform-na=* \
2072 | --program-transform-n=* | --program-transform-=* \
2073 | --program-transform=* | --program-transfor=* \
2074 | --program-transfo=* | --program-transf=* \
2075 | --program-trans=* | --program-tran=* \
2076 | --progr-tra=* | --program-tr=* | --program-t=*)
2077 program_transform_name=$ac_optarg ;;
2078
2079 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
2080 ac_prev=pdfdir ;;
2081 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
2082 pdfdir=$ac_optarg ;;
2083
2084 -psdir | --psdir | --psdi | --psd | --ps)
2085 ac_prev=psdir ;;
2086 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
2087 psdir=$ac_optarg ;;
2088
2089 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2090 | -silent | --silent | --silen | --sile | --sil)
2091 silent=yes ;;
2092
2093 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
2094 ac_prev=sbindir ;;
2095 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
2096 | --sbi=* | --sb=*)
2097 sbindir=$ac_optarg ;;
2098
2099 -sharedstatedir | --sharedstatedir | --sharedstatedi \
2100 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
2101 | --sharedst | --shareds | --shared | --share | --shar \
2102 | --sha | --sh)
2103 ac_prev=sharedstatedir ;;
2104 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
2105 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
2106 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
2107 | --sha=* | --sh=*)
2108 sharedstatedir=$ac_optarg ;;
2109
2110 -site | --site | --sit)
2111 ac_prev=site ;;
2112 -site=* | --site=* | --sit=*)
2113 site=$ac_optarg ;;
2114
2115 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2116 ac_prev=srcdir ;;
2117 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2118 srcdir=$ac_optarg ;;
2119
2120 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
2121 | --syscon | --sysco | --sysc | --sys | --sy)
2122 ac_prev=sysconfdir ;;
2123 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
2124 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
2125 sysconfdir=$ac_optarg ;;
2126
2127 -target | --target | --targe | --targ | --tar | --ta | --t)
2128 ac_prev=target_alias ;;
2129 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
2130 target_alias=$ac_optarg ;;
2131
2132 -v | -verbose | --verbose | --verbos | --verbo | --verb)
2133 verbose=yes ;;
2134
2135 -version | --version | --versio | --versi | --vers | -V)
2136 ac_init_version=: ;;
2137
2138 -with-* | --with-*)
2139 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
2140 # Reject names that are not valid shell variable names.
2141 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2142 as_fn_error $? "invalid package name: $ac_useropt"
2143 ac_useropt_orig=$ac_useropt
2144 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2145 case $ac_user_opts in
2146 *"
2147 "with_$ac_useropt"
2148 "*) ;;
2149 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
2150 ac_unrecognized_sep=', ';;
2151 esac
2152 eval with_$ac_useropt=\$ac_optarg ;;
2153
2154 -without-* | --without-*)
2155 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
2156 # Reject names that are not valid shell variable names.
2157 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2158 as_fn_error $? "invalid package name: $ac_useropt"
2159 ac_useropt_orig=$ac_useropt
2160 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2161 case $ac_user_opts in
2162 *"
2163 "with_$ac_useropt"
2164 "*) ;;
2165 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
2166 ac_unrecognized_sep=', ';;
2167 esac
2168 eval with_$ac_useropt=no ;;
2169
2170 --x)
2171 # Obsolete; use --with-x.
2172 with_x=yes ;;
2173
2174 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
2175 | --x-incl | --x-inc | --x-in | --x-i)
2176 ac_prev=x_includes ;;
2177 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
2178 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
2179 x_includes=$ac_optarg ;;
2180
2181 -x-libraries | --x-libraries | --x-librarie | --x-librari \
2182 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
2183 ac_prev=x_libraries ;;
2184 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
2185 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
2186 x_libraries=$ac_optarg ;;
2187
2188 -*) as_fn_error $? "unrecognized option: \`$ac_option'
2189 Try \`$0 --help' for more information"
2190 ;;
2191
2192 *=*)
2193 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
2194 # Reject names that are not valid shell variable names.
2195 case $ac_envvar in #(
2196 '' | [0-9]* | *[!_$as_cr_alnum]* )
2197 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
2198 esac
2199 eval $ac_envvar=\$ac_optarg
2200 export $ac_envvar ;;
2201
2202 *)
2203 # FIXME: should be removed in autoconf 3.0.
2204 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
2205 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
2206 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
2207 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
2208 ;;
2209
2210 esac
2211 done
2212
2213 if test -n "$ac_prev"; then
2214 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
2215 as_fn_error $? "missing argument to $ac_option"
2216 fi
2217
2218 if test -n "$ac_unrecognized_opts"; then
2219 case $enable_option_checking in
2220 no) ;;
2221 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
2222 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2223 esac
2224 fi
2225
2226 # Check all directory arguments for consistency.
2227 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
2228 datadir sysconfdir sharedstatedir localstatedir includedir \
2229 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2230 libdir localedir mandir
2231 do
2232 eval ac_val=\$$ac_var
2233 # Remove trailing slashes.
2234 case $ac_val in
2235 */ )
2236 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2237 eval $ac_var=\$ac_val;;
2238 esac
2239 # Be sure to have absolute directory names.
2240 case $ac_val in
2241 [\\/$]* | ?:[\\/]* ) continue;;
2242 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2243 esac
2244 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
2245 done
2246
2247 # There might be people who depend on the old broken behavior: `$host'
2248 # used to hold the argument of --host etc.
2249 # FIXME: To remove some day.
2250 build=$build_alias
2251 host=$host_alias
2252 target=$target_alias
2253
2254 # FIXME: To remove some day.
2255 if test "x$host_alias" != x; then
2256 if test "x$build_alias" = x; then
2257 cross_compiling=maybe
2258 elif test "x$build_alias" != "x$host_alias"; then
2259 cross_compiling=yes
2260 fi
2261 fi
2262
2263 ac_tool_prefix=
2264 test -n "$host_alias" && ac_tool_prefix=$host_alias-
2265
2266 test "$silent" = yes && exec 6>/dev/null
2267
2268
2269 ac_pwd=`pwd` && test -n "$ac_pwd" &&
2270 ac_ls_di=`ls -di .` &&
2271 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2272 as_fn_error $? "working directory cannot be determined"
2273 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2274 as_fn_error $? "pwd does not report name of working directory"
2275
2276
2277 # Find the source files, if location was not specified.
2278 if test -z "$srcdir"; then
2279 ac_srcdir_defaulted=yes
2280 # Try the directory containing this script, then the parent directory.
2281 ac_confdir=`$as_dirname -- "$as_myself" ||
2282 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2283 X"$as_myself" : 'X\(//\)[^/]' \| \
2284 X"$as_myself" : 'X\(//\)$' \| \
2285 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2286 $as_echo X"$as_myself" |
2287 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2288 s//\1/
2289 q
2290 }
2291 /^X\(\/\/\)[^/].*/{
2292 s//\1/
2293 q
2294 }
2295 /^X\(\/\/\)$/{
2296 s//\1/
2297 q
2298 }
2299 /^X\(\/\).*/{
2300 s//\1/
2301 q
2302 }
2303 s/.*/./; q'`
2304 srcdir=$ac_confdir
2305 if test ! -r "$srcdir/$ac_unique_file"; then
2306 srcdir=..
2307 fi
2308 else
2309 ac_srcdir_defaulted=no
2310 fi
2311 if test ! -r "$srcdir/$ac_unique_file"; then
2312 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2313 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
2314 fi
2315 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2316 ac_abs_confdir=`(
2317 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
2318 pwd)`
2319 # When building in place, set srcdir=.
2320 if test "$ac_abs_confdir" = "$ac_pwd"; then
2321 srcdir=.
2322 fi
2323 # Remove unnecessary trailing slashes from srcdir.
2324 # Double slashes in file names in object file debugging info
2325 # mess up M-x gdb in Emacs.
2326 case $srcdir in
2327 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2328 esac
2329 for ac_var in $ac_precious_vars; do
2330 eval ac_env_${ac_var}_set=\${${ac_var}+set}
2331 eval ac_env_${ac_var}_value=\$${ac_var}
2332 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2333 eval ac_cv_env_${ac_var}_value=\$${ac_var}
2334 done
2335
2336 #
2337 # Report the --help message.
2338 #
2339 if test "$ac_init_help" = "long"; then
2340 # Omit some internal or obsolete options to make the list less imposing.
2341 # This message is too long to be a string in the A/UX 3.1 sh.
2342 cat <<_ACEOF
2343 \`configure' configures libgnu UNUSED-VERSION to adapt to many kinds of systems.
2344
2345 Usage: $0 [OPTION]... [VAR=VALUE]...
2346
2347 To assign environment variables (e.g., CC, CFLAGS...), specify them as
2348 VAR=VALUE. See below for descriptions of some of the useful variables.
2349
2350 Defaults for the options are specified in brackets.
2351
2352 Configuration:
2353 -h, --help display this help and exit
2354 --help=short display options specific to this package
2355 --help=recursive display the short help of all the included packages
2356 -V, --version display version information and exit
2357 -q, --quiet, --silent do not print \`checking ...' messages
2358 --cache-file=FILE cache test results in FILE [disabled]
2359 -C, --config-cache alias for \`--cache-file=config.cache'
2360 -n, --no-create do not create output files
2361 --srcdir=DIR find the sources in DIR [configure dir or \`..']
2362
2363 Installation directories:
2364 --prefix=PREFIX install architecture-independent files in PREFIX
2365 [$ac_default_prefix]
2366 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
2367 [PREFIX]
2368
2369 By default, \`make install' will install all the files in
2370 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
2371 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2372 for instance \`--prefix=\$HOME'.
2373
2374 For better control, use the options below.
2375
2376 Fine tuning of the installation directories:
2377 --bindir=DIR user executables [EPREFIX/bin]
2378 --sbindir=DIR system admin executables [EPREFIX/sbin]
2379 --libexecdir=DIR program executables [EPREFIX/libexec]
2380 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
2381 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
2382 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
2383 --libdir=DIR object code libraries [EPREFIX/lib]
2384 --includedir=DIR C header files [PREFIX/include]
2385 --oldincludedir=DIR C header files for non-gcc [/usr/include]
2386 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
2387 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
2388 --infodir=DIR info documentation [DATAROOTDIR/info]
2389 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
2390 --mandir=DIR man documentation [DATAROOTDIR/man]
2391 --docdir=DIR documentation root [DATAROOTDIR/doc/libgnu]
2392 --htmldir=DIR html documentation [DOCDIR]
2393 --dvidir=DIR dvi documentation [DOCDIR]
2394 --pdfdir=DIR pdf documentation [DOCDIR]
2395 --psdir=DIR ps documentation [DOCDIR]
2396 _ACEOF
2397
2398 cat <<\_ACEOF
2399
2400 Program names:
2401 --program-prefix=PREFIX prepend PREFIX to installed program names
2402 --program-suffix=SUFFIX append SUFFIX to installed program names
2403 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
2404
2405 System types:
2406 --build=BUILD configure for building on BUILD [guessed]
2407 --host=HOST cross-compile to build programs to run on HOST [BUILD]
2408 --target=TARGET configure for building compilers for TARGET [HOST]
2409 _ACEOF
2410 fi
2411
2412 if test -n "$ac_init_help"; then
2413 case $ac_init_help in
2414 short | recursive ) echo "Configuration of libgnu UNUSED-VERSION:";;
2415 esac
2416 cat <<\_ACEOF
2417
2418 Optional Features:
2419 --disable-option-checking ignore unrecognized --enable/--with options
2420 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
2421 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
2422 --enable-maintainer-mode
2423 enable make rules and dependencies not useful (and
2424 sometimes confusing) to the casual installer
2425 --disable-largefile omit support for large files
2426 --enable-threads={posix|solaris|pth|windows}
2427 specify multithreading API
2428 --disable-threads build without multithread safety
2429 --enable-plugins Enable support for plugins
2430 --disable-rpath do not hardcode runtime library paths
2431 --enable-dependency-tracking
2432 do not reject slow dependency extractors
2433 --disable-dependency-tracking
2434 speeds up one-time build
2435 --enable-silent-rules less verbose build output (undo: "make V=1")
2436 --disable-silent-rules verbose build output (undo: "make V=0")
2437
2438 Optional Packages:
2439 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
2440 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
2441 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
2442 --with-libpth-prefix[=DIR] search for libpth in DIR/include and DIR/lib
2443 --without-libpth-prefix don't search for libpth in includedir and libdir
2444
2445 Some influential environment variables:
2446 CC C compiler command
2447 CFLAGS C compiler flags
2448 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2449 nonstandard directory <lib dir>
2450 LIBS libraries to pass to the linker, e.g. -l<library>
2451 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2452 you have headers in a nonstandard directory <include dir>
2453 CPP C preprocessor
2454
2455 Use these variables to override the choices made by `configure' or to help
2456 it to find libraries and programs with nonstandard names/locations.
2457
2458 Report bugs to the package provider.
2459 _ACEOF
2460 ac_status=$?
2461 fi
2462
2463 if test "$ac_init_help" = "recursive"; then
2464 # If there are subdirs, report their specific --help.
2465 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2466 test -d "$ac_dir" ||
2467 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2468 continue
2469 ac_builddir=.
2470
2471 case "$ac_dir" in
2472 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2473 *)
2474 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2475 # A ".." for each directory in $ac_dir_suffix.
2476 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2477 case $ac_top_builddir_sub in
2478 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2479 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2480 esac ;;
2481 esac
2482 ac_abs_top_builddir=$ac_pwd
2483 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2484 # for backward compatibility:
2485 ac_top_builddir=$ac_top_build_prefix
2486
2487 case $srcdir in
2488 .) # We are building in place.
2489 ac_srcdir=.
2490 ac_top_srcdir=$ac_top_builddir_sub
2491 ac_abs_top_srcdir=$ac_pwd ;;
2492 [\\/]* | ?:[\\/]* ) # Absolute name.
2493 ac_srcdir=$srcdir$ac_dir_suffix;
2494 ac_top_srcdir=$srcdir
2495 ac_abs_top_srcdir=$srcdir ;;
2496 *) # Relative name.
2497 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2498 ac_top_srcdir=$ac_top_build_prefix$srcdir
2499 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2500 esac
2501 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2502
2503 cd "$ac_dir" || { ac_status=$?; continue; }
2504 # Check for guested configure.
2505 if test -f "$ac_srcdir/configure.gnu"; then
2506 echo &&
2507 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2508 elif test -f "$ac_srcdir/configure"; then
2509 echo &&
2510 $SHELL "$ac_srcdir/configure" --help=recursive
2511 else
2512 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2513 fi || ac_status=$?
2514 cd "$ac_pwd" || { ac_status=$?; break; }
2515 done
2516 fi
2517
2518 test -n "$ac_init_help" && exit $ac_status
2519 if $ac_init_version; then
2520 cat <<\_ACEOF
2521 libgnu configure UNUSED-VERSION
2522 generated by GNU Autoconf 2.69
2523
2524 Copyright (C) 2012 Free Software Foundation, Inc.
2525 This configure script is free software; the Free Software Foundation
2526 gives unlimited permission to copy, distribute and modify it.
2527 _ACEOF
2528 exit
2529 fi
2530
2531 ## ------------------------ ##
2532 ## Autoconf initialization. ##
2533 ## ------------------------ ##
2534
2535 # ac_fn_c_try_compile LINENO
2536 # --------------------------
2537 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2538 ac_fn_c_try_compile ()
2539 {
2540 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2541 rm -f conftest.$ac_objext
2542 if { { ac_try="$ac_compile"
2543 case "(($ac_try" in
2544 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2545 *) ac_try_echo=$ac_try;;
2546 esac
2547 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2548 $as_echo "$ac_try_echo"; } >&5
2549 (eval "$ac_compile") 2>conftest.err
2550 ac_status=$?
2551 if test -s conftest.err; then
2552 grep -v '^ *+' conftest.err >conftest.er1
2553 cat conftest.er1 >&5
2554 mv -f conftest.er1 conftest.err
2555 fi
2556 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2557 test $ac_status = 0; } && {
2558 test -z "$ac_c_werror_flag" ||
2559 test ! -s conftest.err
2560 } && test -s conftest.$ac_objext; then :
2561 ac_retval=0
2562 else
2563 $as_echo "$as_me: failed program was:" >&5
2564 sed 's/^/| /' conftest.$ac_ext >&5
2565
2566 ac_retval=1
2567 fi
2568 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2569 as_fn_set_status $ac_retval
2570
2571 } # ac_fn_c_try_compile
2572
2573 # ac_fn_c_try_cpp LINENO
2574 # ----------------------
2575 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2576 ac_fn_c_try_cpp ()
2577 {
2578 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2579 if { { ac_try="$ac_cpp conftest.$ac_ext"
2580 case "(($ac_try" in
2581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2582 *) ac_try_echo=$ac_try;;
2583 esac
2584 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2585 $as_echo "$ac_try_echo"; } >&5
2586 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2587 ac_status=$?
2588 if test -s conftest.err; then
2589 grep -v '^ *+' conftest.err >conftest.er1
2590 cat conftest.er1 >&5
2591 mv -f conftest.er1 conftest.err
2592 fi
2593 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2594 test $ac_status = 0; } > conftest.i && {
2595 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2596 test ! -s conftest.err
2597 }; then :
2598 ac_retval=0
2599 else
2600 $as_echo "$as_me: failed program was:" >&5
2601 sed 's/^/| /' conftest.$ac_ext >&5
2602
2603 ac_retval=1
2604 fi
2605 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2606 as_fn_set_status $ac_retval
2607
2608 } # ac_fn_c_try_cpp
2609
2610 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2611 # -------------------------------------------------------
2612 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2613 # the include files in INCLUDES and setting the cache variable VAR
2614 # accordingly.
2615 ac_fn_c_check_header_mongrel ()
2616 {
2617 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2618 if eval \${$3+:} false; then :
2619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2620 $as_echo_n "checking for $2... " >&6; }
2621 if eval \${$3+:} false; then :
2622 $as_echo_n "(cached) " >&6
2623 fi
2624 eval ac_res=\$$3
2625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2626 $as_echo "$ac_res" >&6; }
2627 else
2628 # Is the header compilable?
2629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2630 $as_echo_n "checking $2 usability... " >&6; }
2631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2632 /* end confdefs.h. */
2633 $4
2634 #include <$2>
2635 _ACEOF
2636 if ac_fn_c_try_compile "$LINENO"; then :
2637 ac_header_compiler=yes
2638 else
2639 ac_header_compiler=no
2640 fi
2641 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2643 $as_echo "$ac_header_compiler" >&6; }
2644
2645 # Is the header present?
2646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2647 $as_echo_n "checking $2 presence... " >&6; }
2648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2649 /* end confdefs.h. */
2650 #include <$2>
2651 _ACEOF
2652 if ac_fn_c_try_cpp "$LINENO"; then :
2653 ac_header_preproc=yes
2654 else
2655 ac_header_preproc=no
2656 fi
2657 rm -f conftest.err conftest.i conftest.$ac_ext
2658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2659 $as_echo "$ac_header_preproc" >&6; }
2660
2661 # So? What about this header?
2662 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2663 yes:no: )
2664 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2665 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2666 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2667 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2668 ;;
2669 no:yes:* )
2670 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2671 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2672 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2673 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2674 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2675 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2676 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2677 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2678 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2679 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2680 ;;
2681 esac
2682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2683 $as_echo_n "checking for $2... " >&6; }
2684 if eval \${$3+:} false; then :
2685 $as_echo_n "(cached) " >&6
2686 else
2687 eval "$3=\$ac_header_compiler"
2688 fi
2689 eval ac_res=\$$3
2690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2691 $as_echo "$ac_res" >&6; }
2692 fi
2693 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2694
2695 } # ac_fn_c_check_header_mongrel
2696
2697 # ac_fn_c_try_run LINENO
2698 # ----------------------
2699 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2700 # that executables *can* be run.
2701 ac_fn_c_try_run ()
2702 {
2703 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2704 if { { ac_try="$ac_link"
2705 case "(($ac_try" in
2706 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2707 *) ac_try_echo=$ac_try;;
2708 esac
2709 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2710 $as_echo "$ac_try_echo"; } >&5
2711 (eval "$ac_link") 2>&5
2712 ac_status=$?
2713 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2714 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2715 { { case "(($ac_try" in
2716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2717 *) ac_try_echo=$ac_try;;
2718 esac
2719 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2720 $as_echo "$ac_try_echo"; } >&5
2721 (eval "$ac_try") 2>&5
2722 ac_status=$?
2723 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2724 test $ac_status = 0; }; }; then :
2725 ac_retval=0
2726 else
2727 $as_echo "$as_me: program exited with status $ac_status" >&5
2728 $as_echo "$as_me: failed program was:" >&5
2729 sed 's/^/| /' conftest.$ac_ext >&5
2730
2731 ac_retval=$ac_status
2732 fi
2733 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2734 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2735 as_fn_set_status $ac_retval
2736
2737 } # ac_fn_c_try_run
2738
2739 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2740 # -------------------------------------------------------
2741 # Tests whether HEADER exists and can be compiled using the include files in
2742 # INCLUDES, setting the cache variable VAR accordingly.
2743 ac_fn_c_check_header_compile ()
2744 {
2745 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2747 $as_echo_n "checking for $2... " >&6; }
2748 if eval \${$3+:} false; then :
2749 $as_echo_n "(cached) " >&6
2750 else
2751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2752 /* end confdefs.h. */
2753 $4
2754 #include <$2>
2755 _ACEOF
2756 if ac_fn_c_try_compile "$LINENO"; then :
2757 eval "$3=yes"
2758 else
2759 eval "$3=no"
2760 fi
2761 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2762 fi
2763 eval ac_res=\$$3
2764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2765 $as_echo "$ac_res" >&6; }
2766 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2767
2768 } # ac_fn_c_check_header_compile
2769
2770 # ac_fn_c_try_link LINENO
2771 # -----------------------
2772 # Try to link conftest.$ac_ext, and return whether this succeeded.
2773 ac_fn_c_try_link ()
2774 {
2775 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2776 rm -f conftest.$ac_objext conftest$ac_exeext
2777 if { { ac_try="$ac_link"
2778 case "(($ac_try" in
2779 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2780 *) ac_try_echo=$ac_try;;
2781 esac
2782 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2783 $as_echo "$ac_try_echo"; } >&5
2784 (eval "$ac_link") 2>conftest.err
2785 ac_status=$?
2786 if test -s conftest.err; then
2787 grep -v '^ *+' conftest.err >conftest.er1
2788 cat conftest.er1 >&5
2789 mv -f conftest.er1 conftest.err
2790 fi
2791 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2792 test $ac_status = 0; } && {
2793 test -z "$ac_c_werror_flag" ||
2794 test ! -s conftest.err
2795 } && test -s conftest$ac_exeext && {
2796 test "$cross_compiling" = yes ||
2797 test -x conftest$ac_exeext
2798 }; then :
2799 ac_retval=0
2800 else
2801 $as_echo "$as_me: failed program was:" >&5
2802 sed 's/^/| /' conftest.$ac_ext >&5
2803
2804 ac_retval=1
2805 fi
2806 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2807 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2808 # interfere with the next link command; also delete a directory that is
2809 # left behind by Apple's compiler. We do this before executing the actions.
2810 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2811 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2812 as_fn_set_status $ac_retval
2813
2814 } # ac_fn_c_try_link
2815
2816 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2817 # -------------------------------------------
2818 # Tests whether TYPE exists after having included INCLUDES, setting cache
2819 # variable VAR accordingly.
2820 ac_fn_c_check_type ()
2821 {
2822 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2824 $as_echo_n "checking for $2... " >&6; }
2825 if eval \${$3+:} false; then :
2826 $as_echo_n "(cached) " >&6
2827 else
2828 eval "$3=no"
2829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2830 /* end confdefs.h. */
2831 $4
2832 int
2833 main ()
2834 {
2835 if (sizeof ($2))
2836 return 0;
2837 ;
2838 return 0;
2839 }
2840 _ACEOF
2841 if ac_fn_c_try_compile "$LINENO"; then :
2842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2843 /* end confdefs.h. */
2844 $4
2845 int
2846 main ()
2847 {
2848 if (sizeof (($2)))
2849 return 0;
2850 ;
2851 return 0;
2852 }
2853 _ACEOF
2854 if ac_fn_c_try_compile "$LINENO"; then :
2855
2856 else
2857 eval "$3=yes"
2858 fi
2859 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2860 fi
2861 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2862 fi
2863 eval ac_res=\$$3
2864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2865 $as_echo "$ac_res" >&6; }
2866 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2867
2868 } # ac_fn_c_check_type
2869
2870 # ac_fn_c_check_func LINENO FUNC VAR
2871 # ----------------------------------
2872 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2873 ac_fn_c_check_func ()
2874 {
2875 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2877 $as_echo_n "checking for $2... " >&6; }
2878 if eval \${$3+:} false; then :
2879 $as_echo_n "(cached) " >&6
2880 else
2881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2882 /* end confdefs.h. */
2883 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2884 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2885 #define $2 innocuous_$2
2886
2887 /* System header to define __stub macros and hopefully few prototypes,
2888 which can conflict with char $2 (); below.
2889 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2890 <limits.h> exists even on freestanding compilers. */
2891
2892 #ifdef __STDC__
2893 # include <limits.h>
2894 #else
2895 # include <assert.h>
2896 #endif
2897
2898 #undef $2
2899
2900 /* Override any GCC internal prototype to avoid an error.
2901 Use char because int might match the return type of a GCC
2902 builtin and then its argument prototype would still apply. */
2903 #ifdef __cplusplus
2904 extern "C"
2905 #endif
2906 char $2 ();
2907 /* The GNU C library defines this for functions which it implements
2908 to always fail with ENOSYS. Some functions are actually named
2909 something starting with __ and the normal name is an alias. */
2910 #if defined __stub_$2 || defined __stub___$2
2911 choke me
2912 #endif
2913
2914 int
2915 main ()
2916 {
2917 return $2 ();
2918 ;
2919 return 0;
2920 }
2921 _ACEOF
2922 if ac_fn_c_try_link "$LINENO"; then :
2923 eval "$3=yes"
2924 else
2925 eval "$3=no"
2926 fi
2927 rm -f core conftest.err conftest.$ac_objext \
2928 conftest$ac_exeext conftest.$ac_ext
2929 fi
2930 eval ac_res=\$$3
2931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2932 $as_echo "$ac_res" >&6; }
2933 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2934
2935 } # ac_fn_c_check_func
2936
2937 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2938 # ---------------------------------------------
2939 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2940 # accordingly.
2941 ac_fn_c_check_decl ()
2942 {
2943 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2944 as_decl_name=`echo $2|sed 's/ *(.*//'`
2945 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2947 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2948 if eval \${$3+:} false; then :
2949 $as_echo_n "(cached) " >&6
2950 else
2951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2952 /* end confdefs.h. */
2953 $4
2954 int
2955 main ()
2956 {
2957 #ifndef $as_decl_name
2958 #ifdef __cplusplus
2959 (void) $as_decl_use;
2960 #else
2961 (void) $as_decl_name;
2962 #endif
2963 #endif
2964
2965 ;
2966 return 0;
2967 }
2968 _ACEOF
2969 if ac_fn_c_try_compile "$LINENO"; then :
2970 eval "$3=yes"
2971 else
2972 eval "$3=no"
2973 fi
2974 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2975 fi
2976 eval ac_res=\$$3
2977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2978 $as_echo "$ac_res" >&6; }
2979 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2980
2981 } # ac_fn_c_check_decl
2982
2983 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2984 # --------------------------------------------
2985 # Tries to find the compile-time value of EXPR in a program that includes
2986 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2987 # computed
2988 ac_fn_c_compute_int ()
2989 {
2990 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2991 if test "$cross_compiling" = yes; then
2992 # Depending upon the size, compute the lo and hi bounds.
2993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2994 /* end confdefs.h. */
2995 $4
2996 int
2997 main ()
2998 {
2999 static int test_array [1 - 2 * !(($2) >= 0)];
3000 test_array [0] = 0;
3001 return test_array [0];
3002
3003 ;
3004 return 0;
3005 }
3006 _ACEOF
3007 if ac_fn_c_try_compile "$LINENO"; then :
3008 ac_lo=0 ac_mid=0
3009 while :; do
3010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3011 /* end confdefs.h. */
3012 $4
3013 int
3014 main ()
3015 {
3016 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3017 test_array [0] = 0;
3018 return test_array [0];
3019
3020 ;
3021 return 0;
3022 }
3023 _ACEOF
3024 if ac_fn_c_try_compile "$LINENO"; then :
3025 ac_hi=$ac_mid; break
3026 else
3027 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
3028 if test $ac_lo -le $ac_mid; then
3029 ac_lo= ac_hi=
3030 break
3031 fi
3032 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
3033 fi
3034 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3035 done
3036 else
3037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3038 /* end confdefs.h. */
3039 $4
3040 int
3041 main ()
3042 {
3043 static int test_array [1 - 2 * !(($2) < 0)];
3044 test_array [0] = 0;
3045 return test_array [0];
3046
3047 ;
3048 return 0;
3049 }
3050 _ACEOF
3051 if ac_fn_c_try_compile "$LINENO"; then :
3052 ac_hi=-1 ac_mid=-1
3053 while :; do
3054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3055 /* end confdefs.h. */
3056 $4
3057 int
3058 main ()
3059 {
3060 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
3061 test_array [0] = 0;
3062 return test_array [0];
3063
3064 ;
3065 return 0;
3066 }
3067 _ACEOF
3068 if ac_fn_c_try_compile "$LINENO"; then :
3069 ac_lo=$ac_mid; break
3070 else
3071 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
3072 if test $ac_mid -le $ac_hi; then
3073 ac_lo= ac_hi=
3074 break
3075 fi
3076 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
3077 fi
3078 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3079 done
3080 else
3081 ac_lo= ac_hi=
3082 fi
3083 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3084 fi
3085 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3086 # Binary search between lo and hi bounds.
3087 while test "x$ac_lo" != "x$ac_hi"; do
3088 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
3089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3090 /* end confdefs.h. */
3091 $4
3092 int
3093 main ()
3094 {
3095 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3096 test_array [0] = 0;
3097 return test_array [0];
3098
3099 ;
3100 return 0;
3101 }
3102 _ACEOF
3103 if ac_fn_c_try_compile "$LINENO"; then :
3104 ac_hi=$ac_mid
3105 else
3106 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
3107 fi
3108 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3109 done
3110 case $ac_lo in #((
3111 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
3112 '') ac_retval=1 ;;
3113 esac
3114 else
3115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3116 /* end confdefs.h. */
3117 $4
3118 static long int longval () { return $2; }
3119 static unsigned long int ulongval () { return $2; }
3120 #include <stdio.h>
3121 #include <stdlib.h>
3122 int
3123 main ()
3124 {
3125
3126 FILE *f = fopen ("conftest.val", "w");
3127 if (! f)
3128 return 1;
3129 if (($2) < 0)
3130 {
3131 long int i = longval ();
3132 if (i != ($2))
3133 return 1;
3134 fprintf (f, "%ld", i);
3135 }
3136 else
3137 {
3138 unsigned long int i = ulongval ();
3139 if (i != ($2))
3140 return 1;
3141 fprintf (f, "%lu", i);
3142 }
3143 /* Do not output a trailing newline, as this causes \r\n confusion
3144 on some platforms. */
3145 return ferror (f) || fclose (f) != 0;
3146
3147 ;
3148 return 0;
3149 }
3150 _ACEOF
3151 if ac_fn_c_try_run "$LINENO"; then :
3152 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
3153 else
3154 ac_retval=1
3155 fi
3156 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3157 conftest.$ac_objext conftest.beam conftest.$ac_ext
3158 rm -f conftest.val
3159
3160 fi
3161 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3162 as_fn_set_status $ac_retval
3163
3164 } # ac_fn_c_compute_int
3165
3166 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
3167 # ----------------------------------------------------
3168 # Tries to find if the field MEMBER exists in type AGGR, after including
3169 # INCLUDES, setting cache variable VAR accordingly.
3170 ac_fn_c_check_member ()
3171 {
3172 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
3174 $as_echo_n "checking for $2.$3... " >&6; }
3175 if eval \${$4+:} false; then :
3176 $as_echo_n "(cached) " >&6
3177 else
3178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3179 /* end confdefs.h. */
3180 $5
3181 int
3182 main ()
3183 {
3184 static $2 ac_aggr;
3185 if (ac_aggr.$3)
3186 return 0;
3187 ;
3188 return 0;
3189 }
3190 _ACEOF
3191 if ac_fn_c_try_compile "$LINENO"; then :
3192 eval "$4=yes"
3193 else
3194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3195 /* end confdefs.h. */
3196 $5
3197 int
3198 main ()
3199 {
3200 static $2 ac_aggr;
3201 if (sizeof ac_aggr.$3)
3202 return 0;
3203 ;
3204 return 0;
3205 }
3206 _ACEOF
3207 if ac_fn_c_try_compile "$LINENO"; then :
3208 eval "$4=yes"
3209 else
3210 eval "$4=no"
3211 fi
3212 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3213 fi
3214 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3215 fi
3216 eval ac_res=\$$4
3217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3218 $as_echo "$ac_res" >&6; }
3219 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3220
3221 } # ac_fn_c_check_member
3222 cat >config.log <<_ACEOF
3223 This file contains any messages produced by compilers while
3224 running configure, to aid debugging if configure makes a mistake.
3225
3226 It was created by libgnu $as_me UNUSED-VERSION, which was
3227 generated by GNU Autoconf 2.69. Invocation command line was
3228
3229 $ $0 $@
3230
3231 _ACEOF
3232 exec 5>>config.log
3233 {
3234 cat <<_ASUNAME
3235 ## --------- ##
3236 ## Platform. ##
3237 ## --------- ##
3238
3239 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3240 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3241 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3242 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3243 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3244
3245 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3246 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
3247
3248 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
3249 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
3250 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3251 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
3252 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
3253 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
3254 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
3255
3256 _ASUNAME
3257
3258 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3259 for as_dir in $PATH
3260 do
3261 IFS=$as_save_IFS
3262 test -z "$as_dir" && as_dir=.
3263 $as_echo "PATH: $as_dir"
3264 done
3265 IFS=$as_save_IFS
3266
3267 } >&5
3268
3269 cat >&5 <<_ACEOF
3270
3271
3272 ## ----------- ##
3273 ## Core tests. ##
3274 ## ----------- ##
3275
3276 _ACEOF
3277
3278
3279 # Keep a trace of the command line.
3280 # Strip out --no-create and --no-recursion so they do not pile up.
3281 # Strip out --silent because we don't want to record it for future runs.
3282 # Also quote any args containing shell meta-characters.
3283 # Make two passes to allow for proper duplicate-argument suppression.
3284 ac_configure_args=
3285 ac_configure_args0=
3286 ac_configure_args1=
3287 ac_must_keep_next=false
3288 for ac_pass in 1 2
3289 do
3290 for ac_arg
3291 do
3292 case $ac_arg in
3293 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3294 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3295 | -silent | --silent | --silen | --sile | --sil)
3296 continue ;;
3297 *\'*)
3298 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3299 esac
3300 case $ac_pass in
3301 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3302 2)
3303 as_fn_append ac_configure_args1 " '$ac_arg'"
3304 if test $ac_must_keep_next = true; then
3305 ac_must_keep_next=false # Got value, back to normal.
3306 else
3307 case $ac_arg in
3308 *=* | --config-cache | -C | -disable-* | --disable-* \
3309 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3310 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3311 | -with-* | --with-* | -without-* | --without-* | --x)
3312 case "$ac_configure_args0 " in
3313 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3314 esac
3315 ;;
3316 -* ) ac_must_keep_next=true ;;
3317 esac
3318 fi
3319 as_fn_append ac_configure_args " '$ac_arg'"
3320 ;;
3321 esac
3322 done
3323 done
3324 { ac_configure_args0=; unset ac_configure_args0;}
3325 { ac_configure_args1=; unset ac_configure_args1;}
3326
3327 # When interrupted or exit'd, cleanup temporary files, and complete
3328 # config.log. We remove comments because anyway the quotes in there
3329 # would cause problems or look ugly.
3330 # WARNING: Use '\'' to represent an apostrophe within the trap.
3331 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3332 trap 'exit_status=$?
3333 # Save into config.log some information that might help in debugging.
3334 {
3335 echo
3336
3337 $as_echo "## ---------------- ##
3338 ## Cache variables. ##
3339 ## ---------------- ##"
3340 echo
3341 # The following way of writing the cache mishandles newlines in values,
3342 (
3343 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3344 eval ac_val=\$$ac_var
3345 case $ac_val in #(
3346 *${as_nl}*)
3347 case $ac_var in #(
3348 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3349 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3350 esac
3351 case $ac_var in #(
3352 _ | IFS | as_nl) ;; #(
3353 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3354 *) { eval $ac_var=; unset $ac_var;} ;;
3355 esac ;;
3356 esac
3357 done
3358 (set) 2>&1 |
3359 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3360 *${as_nl}ac_space=\ *)
3361 sed -n \
3362 "s/'\''/'\''\\\\'\'''\''/g;
3363 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3364 ;; #(
3365 *)
3366 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3367 ;;
3368 esac |
3369 sort
3370 )
3371 echo
3372
3373 $as_echo "## ----------------- ##
3374 ## Output variables. ##
3375 ## ----------------- ##"
3376 echo
3377 for ac_var in $ac_subst_vars
3378 do
3379 eval ac_val=\$$ac_var
3380 case $ac_val in
3381 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3382 esac
3383 $as_echo "$ac_var='\''$ac_val'\''"
3384 done | sort
3385 echo
3386
3387 if test -n "$ac_subst_files"; then
3388 $as_echo "## ------------------- ##
3389 ## File substitutions. ##
3390 ## ------------------- ##"
3391 echo
3392 for ac_var in $ac_subst_files
3393 do
3394 eval ac_val=\$$ac_var
3395 case $ac_val in
3396 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3397 esac
3398 $as_echo "$ac_var='\''$ac_val'\''"
3399 done | sort
3400 echo
3401 fi
3402
3403 if test -s confdefs.h; then
3404 $as_echo "## ----------- ##
3405 ## confdefs.h. ##
3406 ## ----------- ##"
3407 echo
3408 cat confdefs.h
3409 echo
3410 fi
3411 test "$ac_signal" != 0 &&
3412 $as_echo "$as_me: caught signal $ac_signal"
3413 $as_echo "$as_me: exit $exit_status"
3414 } >&5
3415 rm -f core *.core core.conftest.* &&
3416 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3417 exit $exit_status
3418 ' 0
3419 for ac_signal in 1 2 13 15; do
3420 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3421 done
3422 ac_signal=0
3423
3424 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3425 rm -f -r conftest* confdefs.h
3426
3427 $as_echo "/* confdefs.h */" > confdefs.h
3428
3429 # Predefined preprocessor variables.
3430
3431 cat >>confdefs.h <<_ACEOF
3432 #define PACKAGE_NAME "$PACKAGE_NAME"
3433 _ACEOF
3434
3435 cat >>confdefs.h <<_ACEOF
3436 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3437 _ACEOF
3438
3439 cat >>confdefs.h <<_ACEOF
3440 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3441 _ACEOF
3442
3443 cat >>confdefs.h <<_ACEOF
3444 #define PACKAGE_STRING "$PACKAGE_STRING"
3445 _ACEOF
3446
3447 cat >>confdefs.h <<_ACEOF
3448 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3449 _ACEOF
3450
3451 cat >>confdefs.h <<_ACEOF
3452 #define PACKAGE_URL "$PACKAGE_URL"
3453 _ACEOF
3454
3455
3456 # Let the site file select an alternate cache file if it wants to.
3457 # Prefer an explicitly selected file to automatically selected ones.
3458 ac_site_file1=NONE
3459 ac_site_file2=NONE
3460 if test -n "$CONFIG_SITE"; then
3461 # We do not want a PATH search for config.site.
3462 case $CONFIG_SITE in #((
3463 -*) ac_site_file1=./$CONFIG_SITE;;
3464 */*) ac_site_file1=$CONFIG_SITE;;
3465 *) ac_site_file1=./$CONFIG_SITE;;
3466 esac
3467 elif test "x$prefix" != xNONE; then
3468 ac_site_file1=$prefix/share/config.site
3469 ac_site_file2=$prefix/etc/config.site
3470 else
3471 ac_site_file1=$ac_default_prefix/share/config.site
3472 ac_site_file2=$ac_default_prefix/etc/config.site
3473 fi
3474 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3475 do
3476 test "x$ac_site_file" = xNONE && continue
3477 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3478 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3479 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3480 sed 's/^/| /' "$ac_site_file" >&5
3481 . "$ac_site_file" \
3482 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3483 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3484 as_fn_error $? "failed to load site script $ac_site_file
3485 See \`config.log' for more details" "$LINENO" 5; }
3486 fi
3487 done
3488
3489 if test -r "$cache_file"; then
3490 # Some versions of bash will fail to source /dev/null (special files
3491 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
3492 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3493 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3494 $as_echo "$as_me: loading cache $cache_file" >&6;}
3495 case $cache_file in
3496 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3497 *) . "./$cache_file";;
3498 esac
3499 fi
3500 else
3501 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3502 $as_echo "$as_me: creating cache $cache_file" >&6;}
3503 >$cache_file
3504 fi
3505
3506 gl_header_list="$gl_header_list arpa/inet.h"
3507 gl_header_list="$gl_header_list features.h"
3508 gl_func_list="$gl_func_list canonicalize_file_name"
3509 gl_func_list="$gl_func_list getcwd"
3510 gl_func_list="$gl_func_list readlink"
3511 gl_func_list="$gl_func_list realpath"
3512 gl_header_list="$gl_header_list sys/param.h"
3513 gl_header_list="$gl_header_list unistd.h"
3514 gl_func_list="$gl_func_list _set_invalid_parameter_handler"
3515 gl_header_list="$gl_header_list sys/socket.h"
3516 gl_func_list="$gl_func_list fchdir"
3517 gl_header_list="$gl_header_list dirent.h"
3518 gl_func_list="$gl_func_list fcntl"
3519 gl_func_list="$gl_func_list symlink"
3520 gl_func_list="$gl_func_list fdopendir"
3521 gl_func_list="$gl_func_list mempcpy"
3522 gl_func_list="$gl_func_list btowc"
3523 gl_func_list="$gl_func_list isblank"
3524 gl_func_list="$gl_func_list iswctype"
3525 gl_func_list="$gl_func_list mbsrtowcs"
3526 gl_func_list="$gl_func_list wmemchr"
3527 gl_func_list="$gl_func_list wmemcpy"
3528 gl_func_list="$gl_func_list wmempcpy"
3529 gl_header_list="$gl_header_list wctype.h"
3530 gl_fnmatch_required=GNU
3531 gl_header_list="$gl_header_list sys/stat.h"
3532 gl_func_list="$gl_func_list fstatat"
3533 gl_func_list="$gl_func_list getdtablesize"
3534 gl_func_list="$gl_func_list getlogin_r"
3535 gl_func_list="$gl_func_list getprogname"
3536 gl_func_list="$gl_func_list getexecname"
3537 gl_header_list="$gl_header_list sys/time.h"
3538 gl_func_list="$gl_func_list gettimeofday"
3539 gl_header_list="$gl_header_list sys/cdefs.h"
3540 gl_func_list="$gl_func_list getpwnam_r"
3541 gl_header_list="$gl_header_list netdb.h"
3542 gl_header_list="$gl_header_list netinet/in.h"
3543 gl_header_list="$gl_header_list limits.h"
3544 gl_header_list="$gl_header_list wchar.h"
3545 gl_header_list="$gl_header_list stdint.h"
3546 gl_header_list="$gl_header_list inttypes.h"
3547 gl_func_list="$gl_func_list lstat"
3548 gl_header_list="$gl_header_list math.h"
3549 gl_func_list="$gl_func_list mbsinit"
3550 gl_func_list="$gl_func_list mbrtowc"
3551 gl_header_list="$gl_header_list sys/mman.h"
3552 gl_func_list="$gl_func_list mprotect"
3553 gl_func_list="$gl_func_list mkostemp"
3554 gl_func_list="$gl_func_list openat"
3555 gl_func_list="$gl_func_list link"
3556 gl_func_list="$gl_func_list secure_getenv"
3557 gl_func_list="$gl_func_list getuid"
3558 gl_func_list="$gl_func_list geteuid"
3559 gl_func_list="$gl_func_list getgid"
3560 gl_func_list="$gl_func_list getegid"
3561 gl_func_list="$gl_func_list setenv"
3562 gl_func_list="$gl_func_list strdup"
3563 gl_func_list="$gl_func_list __xpg_strerror_r"
3564 gl_func_list="$gl_func_list catgets"
3565 gl_func_list="$gl_func_list snprintf"
3566 gl_header_list="$gl_header_list sys/uio.h"
3567 gl_func_list="$gl_func_list localtime_r"
3568 gl_func_list="$gl_func_list pipe"
3569 gl_func_list="$gl_func_list iswcntrl"
3570 # Check that the precious variables saved in the cache have kept the same
3571 # value.
3572 ac_cache_corrupted=false
3573 for ac_var in $ac_precious_vars; do
3574 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3575 eval ac_new_set=\$ac_env_${ac_var}_set
3576 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3577 eval ac_new_val=\$ac_env_${ac_var}_value
3578 case $ac_old_set,$ac_new_set in
3579 set,)
3580 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3581 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3582 ac_cache_corrupted=: ;;
3583 ,set)
3584 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3585 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3586 ac_cache_corrupted=: ;;
3587 ,);;
3588 *)
3589 if test "x$ac_old_val" != "x$ac_new_val"; then
3590 # differences in whitespace do not lead to failure.
3591 ac_old_val_w=`echo x $ac_old_val`
3592 ac_new_val_w=`echo x $ac_new_val`
3593 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3594 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3595 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3596 ac_cache_corrupted=:
3597 else
3598 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3599 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3600 eval $ac_var=\$ac_old_val
3601 fi
3602 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3603 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3604 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3605 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
3606 fi;;
3607 esac
3608 # Pass precious variables to config.status.
3609 if test "$ac_new_set" = set; then
3610 case $ac_new_val in
3611 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3612 *) ac_arg=$ac_var=$ac_new_val ;;
3613 esac
3614 case " $ac_configure_args " in
3615 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3616 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3617 esac
3618 fi
3619 done
3620 if $ac_cache_corrupted; then
3621 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3622 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3623 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3624 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3625 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3626 fi
3627 ## -------------------- ##
3628 ## Main body of script. ##
3629 ## -------------------- ##
3630
3631 ac_ext=c
3632 ac_cpp='$CPP $CPPFLAGS'
3633 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3634 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3635 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3636
3637
3638
3639
3640
3641
3642 ac_config_headers="$ac_config_headers config.h:config.in"
3643
3644
3645
3646
3647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
3648 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
3649 # Check whether --enable-maintainer-mode was given.
3650 if test "${enable_maintainer_mode+set}" = set; then :
3651 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
3652 else
3653 USE_MAINTAINER_MODE=no
3654 fi
3655
3656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
3657 $as_echo "$USE_MAINTAINER_MODE" >&6; }
3658 if test $USE_MAINTAINER_MODE = yes; then
3659 MAINTAINER_MODE_TRUE=
3660 MAINTAINER_MODE_FALSE='#'
3661 else
3662 MAINTAINER_MODE_TRUE='#'
3663 MAINTAINER_MODE_FALSE=
3664 fi
3665
3666 MAINT=$MAINTAINER_MODE_TRUE
3667
3668
3669
3670 ac_ext=c
3671 ac_cpp='$CPP $CPPFLAGS'
3672 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3673 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3674 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3675 if test -n "$ac_tool_prefix"; then
3676 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3677 set dummy ${ac_tool_prefix}gcc; ac_word=$2
3678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3679 $as_echo_n "checking for $ac_word... " >&6; }
3680 if ${ac_cv_prog_CC+:} false; then :
3681 $as_echo_n "(cached) " >&6
3682 else
3683 if test -n "$CC"; then
3684 ac_cv_prog_CC="$CC" # Let the user override the test.
3685 else
3686 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3687 for as_dir in $PATH
3688 do
3689 IFS=$as_save_IFS
3690 test -z "$as_dir" && as_dir=.
3691 for ac_exec_ext in '' $ac_executable_extensions; do
3692 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3693 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3694 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3695 break 2
3696 fi
3697 done
3698 done
3699 IFS=$as_save_IFS
3700
3701 fi
3702 fi
3703 CC=$ac_cv_prog_CC
3704 if test -n "$CC"; then
3705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3706 $as_echo "$CC" >&6; }
3707 else
3708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3709 $as_echo "no" >&6; }
3710 fi
3711
3712
3713 fi
3714 if test -z "$ac_cv_prog_CC"; then
3715 ac_ct_CC=$CC
3716 # Extract the first word of "gcc", so it can be a program name with args.
3717 set dummy gcc; ac_word=$2
3718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3719 $as_echo_n "checking for $ac_word... " >&6; }
3720 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3721 $as_echo_n "(cached) " >&6
3722 else
3723 if test -n "$ac_ct_CC"; then
3724 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3725 else
3726 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3727 for as_dir in $PATH
3728 do
3729 IFS=$as_save_IFS
3730 test -z "$as_dir" && as_dir=.
3731 for ac_exec_ext in '' $ac_executable_extensions; do
3732 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3733 ac_cv_prog_ac_ct_CC="gcc"
3734 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3735 break 2
3736 fi
3737 done
3738 done
3739 IFS=$as_save_IFS
3740
3741 fi
3742 fi
3743 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3744 if test -n "$ac_ct_CC"; then
3745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3746 $as_echo "$ac_ct_CC" >&6; }
3747 else
3748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3749 $as_echo "no" >&6; }
3750 fi
3751
3752 if test "x$ac_ct_CC" = x; then
3753 CC=""
3754 else
3755 case $cross_compiling:$ac_tool_warned in
3756 yes:)
3757 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3758 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3759 ac_tool_warned=yes ;;
3760 esac
3761 CC=$ac_ct_CC
3762 fi
3763 else
3764 CC="$ac_cv_prog_CC"
3765 fi
3766
3767 if test -z "$CC"; then
3768 if test -n "$ac_tool_prefix"; then
3769 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3770 set dummy ${ac_tool_prefix}cc; ac_word=$2
3771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3772 $as_echo_n "checking for $ac_word... " >&6; }
3773 if ${ac_cv_prog_CC+:} false; then :
3774 $as_echo_n "(cached) " >&6
3775 else
3776 if test -n "$CC"; then
3777 ac_cv_prog_CC="$CC" # Let the user override the test.
3778 else
3779 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3780 for as_dir in $PATH
3781 do
3782 IFS=$as_save_IFS
3783 test -z "$as_dir" && as_dir=.
3784 for ac_exec_ext in '' $ac_executable_extensions; do
3785 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3786 ac_cv_prog_CC="${ac_tool_prefix}cc"
3787 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3788 break 2
3789 fi
3790 done
3791 done
3792 IFS=$as_save_IFS
3793
3794 fi
3795 fi
3796 CC=$ac_cv_prog_CC
3797 if test -n "$CC"; then
3798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3799 $as_echo "$CC" >&6; }
3800 else
3801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3802 $as_echo "no" >&6; }
3803 fi
3804
3805
3806 fi
3807 fi
3808 if test -z "$CC"; then
3809 # Extract the first word of "cc", so it can be a program name with args.
3810 set dummy cc; ac_word=$2
3811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3812 $as_echo_n "checking for $ac_word... " >&6; }
3813 if ${ac_cv_prog_CC+:} false; then :
3814 $as_echo_n "(cached) " >&6
3815 else
3816 if test -n "$CC"; then
3817 ac_cv_prog_CC="$CC" # Let the user override the test.
3818 else
3819 ac_prog_rejected=no
3820 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3821 for as_dir in $PATH
3822 do
3823 IFS=$as_save_IFS
3824 test -z "$as_dir" && as_dir=.
3825 for ac_exec_ext in '' $ac_executable_extensions; do
3826 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3827 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3828 ac_prog_rejected=yes
3829 continue
3830 fi
3831 ac_cv_prog_CC="cc"
3832 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3833 break 2
3834 fi
3835 done
3836 done
3837 IFS=$as_save_IFS
3838
3839 if test $ac_prog_rejected = yes; then
3840 # We found a bogon in the path, so make sure we never use it.
3841 set dummy $ac_cv_prog_CC
3842 shift
3843 if test $# != 0; then
3844 # We chose a different compiler from the bogus one.
3845 # However, it has the same basename, so the bogon will be chosen
3846 # first if we set CC to just the basename; use the full file name.
3847 shift
3848 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3849 fi
3850 fi
3851 fi
3852 fi
3853 CC=$ac_cv_prog_CC
3854 if test -n "$CC"; then
3855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3856 $as_echo "$CC" >&6; }
3857 else
3858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3859 $as_echo "no" >&6; }
3860 fi
3861
3862
3863 fi
3864 if test -z "$CC"; then
3865 if test -n "$ac_tool_prefix"; then
3866 for ac_prog in cl.exe
3867 do
3868 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3869 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3871 $as_echo_n "checking for $ac_word... " >&6; }
3872 if ${ac_cv_prog_CC+:} false; then :
3873 $as_echo_n "(cached) " >&6
3874 else
3875 if test -n "$CC"; then
3876 ac_cv_prog_CC="$CC" # Let the user override the test.
3877 else
3878 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3879 for as_dir in $PATH
3880 do
3881 IFS=$as_save_IFS
3882 test -z "$as_dir" && as_dir=.
3883 for ac_exec_ext in '' $ac_executable_extensions; do
3884 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3885 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3886 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3887 break 2
3888 fi
3889 done
3890 done
3891 IFS=$as_save_IFS
3892
3893 fi
3894 fi
3895 CC=$ac_cv_prog_CC
3896 if test -n "$CC"; then
3897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3898 $as_echo "$CC" >&6; }
3899 else
3900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3901 $as_echo "no" >&6; }
3902 fi
3903
3904
3905 test -n "$CC" && break
3906 done
3907 fi
3908 if test -z "$CC"; then
3909 ac_ct_CC=$CC
3910 for ac_prog in cl.exe
3911 do
3912 # Extract the first word of "$ac_prog", so it can be a program name with args.
3913 set dummy $ac_prog; ac_word=$2
3914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3915 $as_echo_n "checking for $ac_word... " >&6; }
3916 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3917 $as_echo_n "(cached) " >&6
3918 else
3919 if test -n "$ac_ct_CC"; then
3920 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3921 else
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 ac_cv_prog_ac_ct_CC="$ac_prog"
3930 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3931 break 2
3932 fi
3933 done
3934 done
3935 IFS=$as_save_IFS
3936
3937 fi
3938 fi
3939 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3940 if test -n "$ac_ct_CC"; then
3941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3942 $as_echo "$ac_ct_CC" >&6; }
3943 else
3944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3945 $as_echo "no" >&6; }
3946 fi
3947
3948
3949 test -n "$ac_ct_CC" && break
3950 done
3951
3952 if test "x$ac_ct_CC" = x; then
3953 CC=""
3954 else
3955 case $cross_compiling:$ac_tool_warned in
3956 yes:)
3957 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3958 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3959 ac_tool_warned=yes ;;
3960 esac
3961 CC=$ac_ct_CC
3962 fi
3963 fi
3964
3965 fi
3966
3967
3968 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3969 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3970 as_fn_error $? "no acceptable C compiler found in \$PATH
3971 See \`config.log' for more details" "$LINENO" 5; }
3972
3973 # Provide some information about the compiler.
3974 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3975 set X $ac_compile
3976 ac_compiler=$2
3977 for ac_option in --version -v -V -qversion; do
3978 { { ac_try="$ac_compiler $ac_option >&5"
3979 case "(($ac_try" in
3980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3981 *) ac_try_echo=$ac_try;;
3982 esac
3983 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3984 $as_echo "$ac_try_echo"; } >&5
3985 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3986 ac_status=$?
3987 if test -s conftest.err; then
3988 sed '10a\
3989 ... rest of stderr output deleted ...
3990 10q' conftest.err >conftest.er1
3991 cat conftest.er1 >&5
3992 fi
3993 rm -f conftest.er1 conftest.err
3994 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3995 test $ac_status = 0; }
3996 done
3997
3998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3999 /* end confdefs.h. */
4000
4001 int
4002 main ()
4003 {
4004
4005 ;
4006 return 0;
4007 }
4008 _ACEOF
4009 ac_clean_files_save=$ac_clean_files
4010 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4011 # Try to create an executable without -o first, disregard a.out.
4012 # It will help us diagnose broken compilers, and finding out an intuition
4013 # of exeext.
4014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4015 $as_echo_n "checking whether the C compiler works... " >&6; }
4016 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4017
4018 # The possible output files:
4019 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4020
4021 ac_rmfiles=
4022 for ac_file in $ac_files
4023 do
4024 case $ac_file in
4025 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4026 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4027 esac
4028 done
4029 rm -f $ac_rmfiles
4030
4031 if { { ac_try="$ac_link_default"
4032 case "(($ac_try" in
4033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4034 *) ac_try_echo=$ac_try;;
4035 esac
4036 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4037 $as_echo "$ac_try_echo"; } >&5
4038 (eval "$ac_link_default") 2>&5
4039 ac_status=$?
4040 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4041 test $ac_status = 0; }; then :
4042 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4043 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4044 # in a Makefile. We should not override ac_cv_exeext if it was cached,
4045 # so that the user can short-circuit this test for compilers unknown to
4046 # Autoconf.
4047 for ac_file in $ac_files ''
4048 do
4049 test -f "$ac_file" || continue
4050 case $ac_file in
4051 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4052 ;;
4053 [ab].out )
4054 # We found the default executable, but exeext='' is most
4055 # certainly right.
4056 break;;
4057 *.* )
4058 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4059 then :; else
4060 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4061 fi
4062 # We set ac_cv_exeext here because the later test for it is not
4063 # safe: cross compilers may not add the suffix if given an `-o'
4064 # argument, so we may need to know it at that point already.
4065 # Even if this section looks crufty: it has the advantage of
4066 # actually working.
4067 break;;
4068 * )
4069 break;;
4070 esac
4071 done
4072 test "$ac_cv_exeext" = no && ac_cv_exeext=
4073
4074 else
4075 ac_file=''
4076 fi
4077 if test -z "$ac_file"; then :
4078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4079 $as_echo "no" >&6; }
4080 $as_echo "$as_me: failed program was:" >&5
4081 sed 's/^/| /' conftest.$ac_ext >&5
4082
4083 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4084 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4085 as_fn_error 77 "C compiler cannot create executables
4086 See \`config.log' for more details" "$LINENO" 5; }
4087 else
4088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4089 $as_echo "yes" >&6; }
4090 fi
4091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4092 $as_echo_n "checking for C compiler default output file name... " >&6; }
4093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4094 $as_echo "$ac_file" >&6; }
4095 ac_exeext=$ac_cv_exeext
4096
4097 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4098 ac_clean_files=$ac_clean_files_save
4099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4100 $as_echo_n "checking for suffix of executables... " >&6; }
4101 if { { ac_try="$ac_link"
4102 case "(($ac_try" in
4103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4104 *) ac_try_echo=$ac_try;;
4105 esac
4106 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4107 $as_echo "$ac_try_echo"; } >&5
4108 (eval "$ac_link") 2>&5
4109 ac_status=$?
4110 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4111 test $ac_status = 0; }; then :
4112 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4113 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4114 # work properly (i.e., refer to `conftest.exe'), while it won't with
4115 # `rm'.
4116 for ac_file in conftest.exe conftest conftest.*; do
4117 test -f "$ac_file" || continue
4118 case $ac_file in
4119 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4120 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4121 break;;
4122 * ) break;;
4123 esac
4124 done
4125 else
4126 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4127 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4128 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4129 See \`config.log' for more details" "$LINENO" 5; }
4130 fi
4131 rm -f conftest conftest$ac_cv_exeext
4132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4133 $as_echo "$ac_cv_exeext" >&6; }
4134
4135 rm -f conftest.$ac_ext
4136 EXEEXT=$ac_cv_exeext
4137 ac_exeext=$EXEEXT
4138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4139 /* end confdefs.h. */
4140 #include <stdio.h>
4141 int
4142 main ()
4143 {
4144 FILE *f = fopen ("conftest.out", "w");
4145 return ferror (f) || fclose (f) != 0;
4146
4147 ;
4148 return 0;
4149 }
4150 _ACEOF
4151 ac_clean_files="$ac_clean_files conftest.out"
4152 # Check that the compiler produces executables we can run. If not, either
4153 # the compiler is broken, or we cross compile.
4154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4155 $as_echo_n "checking whether we are cross compiling... " >&6; }
4156 if test "$cross_compiling" != yes; then
4157 { { ac_try="$ac_link"
4158 case "(($ac_try" in
4159 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4160 *) ac_try_echo=$ac_try;;
4161 esac
4162 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4163 $as_echo "$ac_try_echo"; } >&5
4164 (eval "$ac_link") 2>&5
4165 ac_status=$?
4166 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4167 test $ac_status = 0; }
4168 if { ac_try='./conftest$ac_cv_exeext'
4169 { { case "(($ac_try" in
4170 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4171 *) ac_try_echo=$ac_try;;
4172 esac
4173 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4174 $as_echo "$ac_try_echo"; } >&5
4175 (eval "$ac_try") 2>&5
4176 ac_status=$?
4177 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4178 test $ac_status = 0; }; }; then
4179 cross_compiling=no
4180 else
4181 if test "$cross_compiling" = maybe; then
4182 cross_compiling=yes
4183 else
4184 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4185 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4186 as_fn_error $? "cannot run C compiled programs.
4187 If you meant to cross compile, use \`--host'.
4188 See \`config.log' for more details" "$LINENO" 5; }
4189 fi
4190 fi
4191 fi
4192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4193 $as_echo "$cross_compiling" >&6; }
4194
4195 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4196 ac_clean_files=$ac_clean_files_save
4197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4198 $as_echo_n "checking for suffix of object files... " >&6; }
4199 if ${ac_cv_objext+:} false; then :
4200 $as_echo_n "(cached) " >&6
4201 else
4202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4203 /* end confdefs.h. */
4204
4205 int
4206 main ()
4207 {
4208
4209 ;
4210 return 0;
4211 }
4212 _ACEOF
4213 rm -f conftest.o conftest.obj
4214 if { { ac_try="$ac_compile"
4215 case "(($ac_try" in
4216 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4217 *) ac_try_echo=$ac_try;;
4218 esac
4219 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4220 $as_echo "$ac_try_echo"; } >&5
4221 (eval "$ac_compile") 2>&5
4222 ac_status=$?
4223 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4224 test $ac_status = 0; }; then :
4225 for ac_file in conftest.o conftest.obj conftest.*; do
4226 test -f "$ac_file" || continue;
4227 case $ac_file in
4228 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4229 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4230 break;;
4231 esac
4232 done
4233 else
4234 $as_echo "$as_me: failed program was:" >&5
4235 sed 's/^/| /' conftest.$ac_ext >&5
4236
4237 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4238 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4239 as_fn_error $? "cannot compute suffix of object files: cannot compile
4240 See \`config.log' for more details" "$LINENO" 5; }
4241 fi
4242 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4243 fi
4244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4245 $as_echo "$ac_cv_objext" >&6; }
4246 OBJEXT=$ac_cv_objext
4247 ac_objext=$OBJEXT
4248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4249 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4250 if ${ac_cv_c_compiler_gnu+:} false; then :
4251 $as_echo_n "(cached) " >&6
4252 else
4253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4254 /* end confdefs.h. */
4255
4256 int
4257 main ()
4258 {
4259 #ifndef __GNUC__
4260 choke me
4261 #endif
4262
4263 ;
4264 return 0;
4265 }
4266 _ACEOF
4267 if ac_fn_c_try_compile "$LINENO"; then :
4268 ac_compiler_gnu=yes
4269 else
4270 ac_compiler_gnu=no
4271 fi
4272 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4273 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4274
4275 fi
4276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4277 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4278 if test $ac_compiler_gnu = yes; then
4279 GCC=yes
4280 else
4281 GCC=
4282 fi
4283 ac_test_CFLAGS=${CFLAGS+set}
4284 ac_save_CFLAGS=$CFLAGS
4285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4286 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4287 if ${ac_cv_prog_cc_g+:} false; then :
4288 $as_echo_n "(cached) " >&6
4289 else
4290 ac_save_c_werror_flag=$ac_c_werror_flag
4291 ac_c_werror_flag=yes
4292 ac_cv_prog_cc_g=no
4293 CFLAGS="-g"
4294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4295 /* end confdefs.h. */
4296
4297 int
4298 main ()
4299 {
4300
4301 ;
4302 return 0;
4303 }
4304 _ACEOF
4305 if ac_fn_c_try_compile "$LINENO"; then :
4306 ac_cv_prog_cc_g=yes
4307 else
4308 CFLAGS=""
4309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4310 /* end confdefs.h. */
4311
4312 int
4313 main ()
4314 {
4315
4316 ;
4317 return 0;
4318 }
4319 _ACEOF
4320 if ac_fn_c_try_compile "$LINENO"; then :
4321
4322 else
4323 ac_c_werror_flag=$ac_save_c_werror_flag
4324 CFLAGS="-g"
4325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4326 /* end confdefs.h. */
4327
4328 int
4329 main ()
4330 {
4331
4332 ;
4333 return 0;
4334 }
4335 _ACEOF
4336 if ac_fn_c_try_compile "$LINENO"; then :
4337 ac_cv_prog_cc_g=yes
4338 fi
4339 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4340 fi
4341 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4342 fi
4343 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4344 ac_c_werror_flag=$ac_save_c_werror_flag
4345 fi
4346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4347 $as_echo "$ac_cv_prog_cc_g" >&6; }
4348 if test "$ac_test_CFLAGS" = set; then
4349 CFLAGS=$ac_save_CFLAGS
4350 elif test $ac_cv_prog_cc_g = yes; then
4351 if test "$GCC" = yes; then
4352 CFLAGS="-g -O2"
4353 else
4354 CFLAGS="-g"
4355 fi
4356 else
4357 if test "$GCC" = yes; then
4358 CFLAGS="-O2"
4359 else
4360 CFLAGS=
4361 fi
4362 fi
4363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4364 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4365 if ${ac_cv_prog_cc_c89+:} false; then :
4366 $as_echo_n "(cached) " >&6
4367 else
4368 ac_cv_prog_cc_c89=no
4369 ac_save_CC=$CC
4370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4371 /* end confdefs.h. */
4372 #include <stdarg.h>
4373 #include <stdio.h>
4374 struct stat;
4375 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4376 struct buf { int x; };
4377 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4378 static char *e (p, i)
4379 char **p;
4380 int i;
4381 {
4382 return p[i];
4383 }
4384 static char *f (char * (*g) (char **, int), char **p, ...)
4385 {
4386 char *s;
4387 va_list v;
4388 va_start (v,p);
4389 s = g (p, va_arg (v,int));
4390 va_end (v);
4391 return s;
4392 }
4393
4394 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4395 function prototypes and stuff, but not '\xHH' hex character constants.
4396 These don't provoke an error unfortunately, instead are silently treated
4397 as 'x'. The following induces an error, until -std is added to get
4398 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4399 array size at least. It's necessary to write '\x00'==0 to get something
4400 that's true only with -std. */
4401 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4402
4403 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4404 inside strings and character constants. */
4405 #define FOO(x) 'x'
4406 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4407
4408 int test (int i, double x);
4409 struct s1 {int (*f) (int a);};
4410 struct s2 {int (*f) (double a);};
4411 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4412 int argc;
4413 char **argv;
4414 int
4415 main ()
4416 {
4417 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4418 ;
4419 return 0;
4420 }
4421 _ACEOF
4422 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4423 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4424 do
4425 CC="$ac_save_CC $ac_arg"
4426 if ac_fn_c_try_compile "$LINENO"; then :
4427 ac_cv_prog_cc_c89=$ac_arg
4428 fi
4429 rm -f core conftest.err conftest.$ac_objext
4430 test "x$ac_cv_prog_cc_c89" != "xno" && break
4431 done
4432 rm -f conftest.$ac_ext
4433 CC=$ac_save_CC
4434
4435 fi
4436 # AC_CACHE_VAL
4437 case "x$ac_cv_prog_cc_c89" in
4438 x)
4439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4440 $as_echo "none needed" >&6; } ;;
4441 xno)
4442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4443 $as_echo "unsupported" >&6; } ;;
4444 *)
4445 CC="$CC $ac_cv_prog_cc_c89"
4446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4447 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4448 esac
4449 if test "x$ac_cv_prog_cc_c89" != xno; then :
4450
4451 fi
4452
4453 ac_ext=c
4454 ac_cpp='$CPP $CPPFLAGS'
4455 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4456 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4457 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4458
4459 ac_aux_dir=
4460 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4461 if test -f "$ac_dir/install-sh"; then
4462 ac_aux_dir=$ac_dir
4463 ac_install_sh="$ac_aux_dir/install-sh -c"
4464 break
4465 elif test -f "$ac_dir/install.sh"; then
4466 ac_aux_dir=$ac_dir
4467 ac_install_sh="$ac_aux_dir/install.sh -c"
4468 break
4469 elif test -f "$ac_dir/shtool"; then
4470 ac_aux_dir=$ac_dir
4471 ac_install_sh="$ac_aux_dir/shtool install -c"
4472 break
4473 fi
4474 done
4475 if test -z "$ac_aux_dir"; then
4476 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
4477 fi
4478
4479 # These three variables are undocumented and unsupported,
4480 # and are intended to be withdrawn in a future Autoconf release.
4481 # They can cause serious problems if a builder's source tree is in a directory
4482 # whose full name contains unusual characters.
4483 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4484 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4485 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4486
4487
4488 # Expand $ac_aux_dir to an absolute path.
4489 am_aux_dir=`cd "$ac_aux_dir" && pwd`
4490
4491 ac_ext=c
4492 ac_cpp='$CPP $CPPFLAGS'
4493 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4494 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4495 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
4497 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
4498 if ${am_cv_prog_cc_c_o+:} false; then :
4499 $as_echo_n "(cached) " >&6
4500 else
4501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4502 /* end confdefs.h. */
4503
4504 int
4505 main ()
4506 {
4507
4508 ;
4509 return 0;
4510 }
4511 _ACEOF
4512 # Make sure it works both with $CC and with simple cc.
4513 # Following AC_PROG_CC_C_O, we do the test twice because some
4514 # compilers refuse to overwrite an existing .o file with -o,
4515 # though they will create one.
4516 am_cv_prog_cc_c_o=yes
4517 for am_i in 1 2; do
4518 if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
4519 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
4520 ac_status=$?
4521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4522 (exit $ac_status); } \
4523 && test -f conftest2.$ac_objext; then
4524 : OK
4525 else
4526 am_cv_prog_cc_c_o=no
4527 break
4528 fi
4529 done
4530 rm -f core conftest*
4531 unset am_i
4532 fi
4533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
4534 $as_echo "$am_cv_prog_cc_c_o" >&6; }
4535 if test "$am_cv_prog_cc_c_o" != yes; then
4536 # Losing compiler, so override with the script.
4537 # FIXME: It is wrong to rewrite CC.
4538 # But if we don't then we get into trouble of one sort or another.
4539 # A longer-term fix would be to have automake use am__CC in this case,
4540 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
4541 CC="$am_aux_dir/compile $CC"
4542 fi
4543 ac_ext=c
4544 ac_cpp='$CPP $CPPFLAGS'
4545 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4546 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4547 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4548
4549
4550
4551 ac_ext=c
4552 ac_cpp='$CPP $CPPFLAGS'
4553 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4554 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4555 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4557 $as_echo_n "checking how to run the C preprocessor... " >&6; }
4558 # On Suns, sometimes $CPP names a directory.
4559 if test -n "$CPP" && test -d "$CPP"; then
4560 CPP=
4561 fi
4562 if test -z "$CPP"; then
4563 if ${ac_cv_prog_CPP+:} false; then :
4564 $as_echo_n "(cached) " >&6
4565 else
4566 # Double quotes because CPP needs to be expanded
4567 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4568 do
4569 ac_preproc_ok=false
4570 for ac_c_preproc_warn_flag in '' yes
4571 do
4572 # Use a header file that comes with gcc, so configuring glibc
4573 # with a fresh cross-compiler works.
4574 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4575 # <limits.h> exists even on freestanding compilers.
4576 # On the NeXT, cc -E runs the code through the compiler's parser,
4577 # not just through cpp. "Syntax error" is here to catch this case.
4578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4579 /* end confdefs.h. */
4580 #ifdef __STDC__
4581 # include <limits.h>
4582 #else
4583 # include <assert.h>
4584 #endif
4585 Syntax error
4586 _ACEOF
4587 if ac_fn_c_try_cpp "$LINENO"; then :
4588
4589 else
4590 # Broken: fails on valid input.
4591 continue
4592 fi
4593 rm -f conftest.err conftest.i conftest.$ac_ext
4594
4595 # OK, works on sane cases. Now check whether nonexistent headers
4596 # can be detected and how.
4597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4598 /* end confdefs.h. */
4599 #include <ac_nonexistent.h>
4600 _ACEOF
4601 if ac_fn_c_try_cpp "$LINENO"; then :
4602 # Broken: success on invalid input.
4603 continue
4604 else
4605 # Passes both tests.
4606 ac_preproc_ok=:
4607 break
4608 fi
4609 rm -f conftest.err conftest.i conftest.$ac_ext
4610
4611 done
4612 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4613 rm -f conftest.i conftest.err conftest.$ac_ext
4614 if $ac_preproc_ok; then :
4615 break
4616 fi
4617
4618 done
4619 ac_cv_prog_CPP=$CPP
4620
4621 fi
4622 CPP=$ac_cv_prog_CPP
4623 else
4624 ac_cv_prog_CPP=$CPP
4625 fi
4626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4627 $as_echo "$CPP" >&6; }
4628 ac_preproc_ok=false
4629 for ac_c_preproc_warn_flag in '' yes
4630 do
4631 # Use a header file that comes with gcc, so configuring glibc
4632 # with a fresh cross-compiler works.
4633 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4634 # <limits.h> exists even on freestanding compilers.
4635 # On the NeXT, cc -E runs the code through the compiler's parser,
4636 # not just through cpp. "Syntax error" is here to catch this case.
4637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4638 /* end confdefs.h. */
4639 #ifdef __STDC__
4640 # include <limits.h>
4641 #else
4642 # include <assert.h>
4643 #endif
4644 Syntax error
4645 _ACEOF
4646 if ac_fn_c_try_cpp "$LINENO"; then :
4647
4648 else
4649 # Broken: fails on valid input.
4650 continue
4651 fi
4652 rm -f conftest.err conftest.i conftest.$ac_ext
4653
4654 # OK, works on sane cases. Now check whether nonexistent headers
4655 # can be detected and how.
4656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4657 /* end confdefs.h. */
4658 #include <ac_nonexistent.h>
4659 _ACEOF
4660 if ac_fn_c_try_cpp "$LINENO"; then :
4661 # Broken: success on invalid input.
4662 continue
4663 else
4664 # Passes both tests.
4665 ac_preproc_ok=:
4666 break
4667 fi
4668 rm -f conftest.err conftest.i conftest.$ac_ext
4669
4670 done
4671 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4672 rm -f conftest.i conftest.err conftest.$ac_ext
4673 if $ac_preproc_ok; then :
4674
4675 else
4676 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4677 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4678 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4679 See \`config.log' for more details" "$LINENO" 5; }
4680 fi
4681
4682 ac_ext=c
4683 ac_cpp='$CPP $CPPFLAGS'
4684 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4685 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4686 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4687
4688
4689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4690 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4691 if ${ac_cv_path_GREP+:} false; then :
4692 $as_echo_n "(cached) " >&6
4693 else
4694 if test -z "$GREP"; then
4695 ac_path_GREP_found=false
4696 # Loop through the user's path and test for each of PROGNAME-LIST
4697 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4698 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4699 do
4700 IFS=$as_save_IFS
4701 test -z "$as_dir" && as_dir=.
4702 for ac_prog in grep ggrep; do
4703 for ac_exec_ext in '' $ac_executable_extensions; do
4704 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4705 as_fn_executable_p "$ac_path_GREP" || continue
4706 # Check for GNU ac_path_GREP and select it if it is found.
4707 # Check for GNU $ac_path_GREP
4708 case `"$ac_path_GREP" --version 2>&1` in
4709 *GNU*)
4710 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4711 *)
4712 ac_count=0
4713 $as_echo_n 0123456789 >"conftest.in"
4714 while :
4715 do
4716 cat "conftest.in" "conftest.in" >"conftest.tmp"
4717 mv "conftest.tmp" "conftest.in"
4718 cp "conftest.in" "conftest.nl"
4719 $as_echo 'GREP' >> "conftest.nl"
4720 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4721 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4722 as_fn_arith $ac_count + 1 && ac_count=$as_val
4723 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4724 # Best one so far, save it but keep looking for a better one
4725 ac_cv_path_GREP="$ac_path_GREP"
4726 ac_path_GREP_max=$ac_count
4727 fi
4728 # 10*(2^10) chars as input seems more than enough
4729 test $ac_count -gt 10 && break
4730 done
4731 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4732 esac
4733
4734 $ac_path_GREP_found && break 3
4735 done
4736 done
4737 done
4738 IFS=$as_save_IFS
4739 if test -z "$ac_cv_path_GREP"; then
4740 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4741 fi
4742 else
4743 ac_cv_path_GREP=$GREP
4744 fi
4745
4746 fi
4747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4748 $as_echo "$ac_cv_path_GREP" >&6; }
4749 GREP="$ac_cv_path_GREP"
4750
4751
4752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4753 $as_echo_n "checking for egrep... " >&6; }
4754 if ${ac_cv_path_EGREP+:} false; then :
4755 $as_echo_n "(cached) " >&6
4756 else
4757 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4758 then ac_cv_path_EGREP="$GREP -E"
4759 else
4760 if test -z "$EGREP"; then
4761 ac_path_EGREP_found=false
4762 # Loop through the user's path and test for each of PROGNAME-LIST
4763 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4764 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4765 do
4766 IFS=$as_save_IFS
4767 test -z "$as_dir" && as_dir=.
4768 for ac_prog in egrep; do
4769 for ac_exec_ext in '' $ac_executable_extensions; do
4770 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4771 as_fn_executable_p "$ac_path_EGREP" || continue
4772 # Check for GNU ac_path_EGREP and select it if it is found.
4773 # Check for GNU $ac_path_EGREP
4774 case `"$ac_path_EGREP" --version 2>&1` in
4775 *GNU*)
4776 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4777 *)
4778 ac_count=0
4779 $as_echo_n 0123456789 >"conftest.in"
4780 while :
4781 do
4782 cat "conftest.in" "conftest.in" >"conftest.tmp"
4783 mv "conftest.tmp" "conftest.in"
4784 cp "conftest.in" "conftest.nl"
4785 $as_echo 'EGREP' >> "conftest.nl"
4786 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4787 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4788 as_fn_arith $ac_count + 1 && ac_count=$as_val
4789 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4790 # Best one so far, save it but keep looking for a better one
4791 ac_cv_path_EGREP="$ac_path_EGREP"
4792 ac_path_EGREP_max=$ac_count
4793 fi
4794 # 10*(2^10) chars as input seems more than enough
4795 test $ac_count -gt 10 && break
4796 done
4797 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4798 esac
4799
4800 $ac_path_EGREP_found && break 3
4801 done
4802 done
4803 done
4804 IFS=$as_save_IFS
4805 if test -z "$ac_cv_path_EGREP"; then
4806 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4807 fi
4808 else
4809 ac_cv_path_EGREP=$EGREP
4810 fi
4811
4812 fi
4813 fi
4814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4815 $as_echo "$ac_cv_path_EGREP" >&6; }
4816 EGREP="$ac_cv_path_EGREP"
4817
4818
4819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4820 $as_echo_n "checking for ANSI C header files... " >&6; }
4821 if ${ac_cv_header_stdc+:} false; then :
4822 $as_echo_n "(cached) " >&6
4823 else
4824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4825 /* end confdefs.h. */
4826 #include <stdlib.h>
4827 #include <stdarg.h>
4828 #include <string.h>
4829 #include <float.h>
4830
4831 int
4832 main ()
4833 {
4834
4835 ;
4836 return 0;
4837 }
4838 _ACEOF
4839 if ac_fn_c_try_compile "$LINENO"; then :
4840 ac_cv_header_stdc=yes
4841 else
4842 ac_cv_header_stdc=no
4843 fi
4844 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4845
4846 if test $ac_cv_header_stdc = yes; then
4847 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4849 /* end confdefs.h. */
4850 #include <string.h>
4851
4852 _ACEOF
4853 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4854 $EGREP "memchr" >/dev/null 2>&1; then :
4855
4856 else
4857 ac_cv_header_stdc=no
4858 fi
4859 rm -f conftest*
4860
4861 fi
4862
4863 if test $ac_cv_header_stdc = yes; then
4864 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4866 /* end confdefs.h. */
4867 #include <stdlib.h>
4868
4869 _ACEOF
4870 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4871 $EGREP "free" >/dev/null 2>&1; then :
4872
4873 else
4874 ac_cv_header_stdc=no
4875 fi
4876 rm -f conftest*
4877
4878 fi
4879
4880 if test $ac_cv_header_stdc = yes; then
4881 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4882 if test "$cross_compiling" = yes; then :
4883 :
4884 else
4885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4886 /* end confdefs.h. */
4887 #include <ctype.h>
4888 #include <stdlib.h>
4889 #if ((' ' & 0x0FF) == 0x020)
4890 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4891 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4892 #else
4893 # define ISLOWER(c) \
4894 (('a' <= (c) && (c) <= 'i') \
4895 || ('j' <= (c) && (c) <= 'r') \
4896 || ('s' <= (c) && (c) <= 'z'))
4897 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4898 #endif
4899
4900 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4901 int
4902 main ()
4903 {
4904 int i;
4905 for (i = 0; i < 256; i++)
4906 if (XOR (islower (i), ISLOWER (i))
4907 || toupper (i) != TOUPPER (i))
4908 return 2;
4909 return 0;
4910 }
4911 _ACEOF
4912 if ac_fn_c_try_run "$LINENO"; then :
4913
4914 else
4915 ac_cv_header_stdc=no
4916 fi
4917 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4918 conftest.$ac_objext conftest.beam conftest.$ac_ext
4919 fi
4920
4921 fi
4922 fi
4923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4924 $as_echo "$ac_cv_header_stdc" >&6; }
4925 if test $ac_cv_header_stdc = yes; then
4926
4927 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
4928
4929 fi
4930
4931 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4932 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4933 inttypes.h stdint.h unistd.h
4934 do :
4935 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4936 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4937 "
4938 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4939 cat >>confdefs.h <<_ACEOF
4940 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4941 _ACEOF
4942
4943 fi
4944
4945 done
4946
4947
4948
4949 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4950 if test "x$ac_cv_header_minix_config_h" = xyes; then :
4951 MINIX=yes
4952 else
4953 MINIX=
4954 fi
4955
4956
4957 if test "$MINIX" = yes; then
4958
4959 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4960
4961
4962 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4963
4964
4965 $as_echo "#define _MINIX 1" >>confdefs.h
4966
4967
4968 $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
4969
4970 fi
4971
4972
4973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4974 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4975 if ${ac_cv_safe_to_define___extensions__+:} false; then :
4976 $as_echo_n "(cached) " >&6
4977 else
4978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4979 /* end confdefs.h. */
4980
4981 # define __EXTENSIONS__ 1
4982 $ac_includes_default
4983 int
4984 main ()
4985 {
4986
4987 ;
4988 return 0;
4989 }
4990 _ACEOF
4991 if ac_fn_c_try_compile "$LINENO"; then :
4992 ac_cv_safe_to_define___extensions__=yes
4993 else
4994 ac_cv_safe_to_define___extensions__=no
4995 fi
4996 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4997 fi
4998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4999 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5000 test $ac_cv_safe_to_define___extensions__ = yes &&
5001 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5002
5003 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5004
5005 $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
5006
5007 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5008
5009 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5010
5011 $as_echo "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
5012
5013 $as_echo "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
5014
5015 $as_echo "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
5016
5017 $as_echo "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
5018
5019 $as_echo "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
5020
5021 $as_echo "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
5022
5023 $as_echo "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
5024
5025 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5026
5027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
5028 $as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; }
5029 if ${ac_cv_should_define__xopen_source+:} false; then :
5030 $as_echo_n "(cached) " >&6
5031 else
5032 ac_cv_should_define__xopen_source=no
5033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5034 /* end confdefs.h. */
5035
5036 #include <wchar.h>
5037 mbstate_t x;
5038 int
5039 main ()
5040 {
5041
5042 ;
5043 return 0;
5044 }
5045 _ACEOF
5046 if ac_fn_c_try_compile "$LINENO"; then :
5047
5048 else
5049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5050 /* end confdefs.h. */
5051
5052 #define _XOPEN_SOURCE 500
5053 #include <wchar.h>
5054 mbstate_t x;
5055 int
5056 main ()
5057 {
5058
5059 ;
5060 return 0;
5061 }
5062 _ACEOF
5063 if ac_fn_c_try_compile "$LINENO"; then :
5064 ac_cv_should_define__xopen_source=yes
5065 fi
5066 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5067 fi
5068 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5069 fi
5070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
5071 $as_echo "$ac_cv_should_define__xopen_source" >&6; }
5072 test $ac_cv_should_define__xopen_source = yes &&
5073 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
5086 $as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
5087 if ${gl_cv_c_amsterdam_compiler+:} false; then :
5088 $as_echo_n "(cached) " >&6
5089 else
5090
5091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5092 /* end confdefs.h. */
5093
5094 #ifdef __ACK__
5095 Amsterdam
5096 #endif
5097
5098 _ACEOF
5099 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5100 $EGREP "Amsterdam" >/dev/null 2>&1; then :
5101 gl_cv_c_amsterdam_compiler=yes
5102 else
5103 gl_cv_c_amsterdam_compiler=no
5104 fi
5105 rm -f conftest*
5106
5107
5108 fi
5109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
5110 $as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
5111
5112 if test $gl_cv_c_amsterdam_compiler = yes; then
5113 if test -z "$AR"; then
5114 AR='cc -c.a'
5115 fi
5116 if test -z "$ARFLAGS"; then
5117 ARFLAGS='-o'
5118 fi
5119 else
5120 if test -n "$ac_tool_prefix"; then
5121 for ac_prog in ar lib "link -lib"
5122 do
5123 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5124 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5126 $as_echo_n "checking for $ac_word... " >&6; }
5127 if ${ac_cv_prog_AR+:} false; then :
5128 $as_echo_n "(cached) " >&6
5129 else
5130 if test -n "$AR"; then
5131 ac_cv_prog_AR="$AR" # Let the user override the test.
5132 else
5133 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5134 for as_dir in $PATH
5135 do
5136 IFS=$as_save_IFS
5137 test -z "$as_dir" && as_dir=.
5138 for ac_exec_ext in '' $ac_executable_extensions; do
5139 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5140 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
5141 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5142 break 2
5143 fi
5144 done
5145 done
5146 IFS=$as_save_IFS
5147
5148 fi
5149 fi
5150 AR=$ac_cv_prog_AR
5151 if test -n "$AR"; then
5152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5153 $as_echo "$AR" >&6; }
5154 else
5155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5156 $as_echo "no" >&6; }
5157 fi
5158
5159
5160 test -n "$AR" && break
5161 done
5162 fi
5163 if test -z "$AR"; then
5164 ac_ct_AR=$AR
5165 for ac_prog in ar lib "link -lib"
5166 do
5167 # Extract the first word of "$ac_prog", so it can be a program name with args.
5168 set dummy $ac_prog; ac_word=$2
5169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5170 $as_echo_n "checking for $ac_word... " >&6; }
5171 if ${ac_cv_prog_ac_ct_AR+:} false; then :
5172 $as_echo_n "(cached) " >&6
5173 else
5174 if test -n "$ac_ct_AR"; then
5175 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5176 else
5177 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5178 for as_dir in $PATH
5179 do
5180 IFS=$as_save_IFS
5181 test -z "$as_dir" && as_dir=.
5182 for ac_exec_ext in '' $ac_executable_extensions; do
5183 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5184 ac_cv_prog_ac_ct_AR="$ac_prog"
5185 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5186 break 2
5187 fi
5188 done
5189 done
5190 IFS=$as_save_IFS
5191
5192 fi
5193 fi
5194 ac_ct_AR=$ac_cv_prog_ac_ct_AR
5195 if test -n "$ac_ct_AR"; then
5196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5197 $as_echo "$ac_ct_AR" >&6; }
5198 else
5199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5200 $as_echo "no" >&6; }
5201 fi
5202
5203
5204 test -n "$ac_ct_AR" && break
5205 done
5206
5207 if test "x$ac_ct_AR" = x; then
5208 AR="false"
5209 else
5210 case $cross_compiling:$ac_tool_warned in
5211 yes:)
5212 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5213 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5214 ac_tool_warned=yes ;;
5215 esac
5216 AR=$ac_ct_AR
5217 fi
5218 fi
5219
5220 : ${AR=ar}
5221
5222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5
5223 $as_echo_n "checking the archiver ($AR) interface... " >&6; }
5224 if ${am_cv_ar_interface+:} false; then :
5225 $as_echo_n "(cached) " >&6
5226 else
5227 ac_ext=c
5228 ac_cpp='$CPP $CPPFLAGS'
5229 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5230 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5231 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5232
5233 am_cv_ar_interface=ar
5234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5235 /* end confdefs.h. */
5236 int some_variable = 0;
5237 _ACEOF
5238 if ac_fn_c_try_compile "$LINENO"; then :
5239 am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5'
5240 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
5241 (eval $am_ar_try) 2>&5
5242 ac_status=$?
5243 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5244 test $ac_status = 0; }
5245 if test "$ac_status" -eq 0; then
5246 am_cv_ar_interface=ar
5247 else
5248 am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5'
5249 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
5250 (eval $am_ar_try) 2>&5
5251 ac_status=$?
5252 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5253 test $ac_status = 0; }
5254 if test "$ac_status" -eq 0; then
5255 am_cv_ar_interface=lib
5256 else
5257 am_cv_ar_interface=unknown
5258 fi
5259 fi
5260 rm -f conftest.lib libconftest.a
5261
5262 fi
5263 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5264 ac_ext=c
5265 ac_cpp='$CPP $CPPFLAGS'
5266 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5267 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5268 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5269
5270 fi
5271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5
5272 $as_echo "$am_cv_ar_interface" >&6; }
5273
5274 case $am_cv_ar_interface in
5275 ar)
5276 ;;
5277 lib)
5278 # Microsoft lib, so override with the ar-lib wrapper script.
5279 # FIXME: It is wrong to rewrite AR.
5280 # But if we don't then we get into trouble of one sort or another.
5281 # A longer-term fix would be to have automake use am__AR in this case,
5282 # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
5283 # similar.
5284 AR="$am_aux_dir/ar-lib $AR"
5285 ;;
5286 unknown)
5287 as_fn_error $? "could not determine $AR interface" "$LINENO" 5
5288 ;;
5289 esac
5290
5291 fi
5292
5293 if test -n "$ac_tool_prefix"; then
5294 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5295 set dummy ${ac_tool_prefix}ar; ac_word=$2
5296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5297 $as_echo_n "checking for $ac_word... " >&6; }
5298 if ${ac_cv_prog_AR+:} false; then :
5299 $as_echo_n "(cached) " >&6
5300 else
5301 if test -n "$AR"; then
5302 ac_cv_prog_AR="$AR" # Let the user override the test.
5303 else
5304 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5305 for as_dir in $PATH
5306 do
5307 IFS=$as_save_IFS
5308 test -z "$as_dir" && as_dir=.
5309 for ac_exec_ext in '' $ac_executable_extensions; do
5310 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5311 ac_cv_prog_AR="${ac_tool_prefix}ar"
5312 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5313 break 2
5314 fi
5315 done
5316 done
5317 IFS=$as_save_IFS
5318
5319 fi
5320 fi
5321 AR=$ac_cv_prog_AR
5322 if test -n "$AR"; then
5323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5324 $as_echo "$AR" >&6; }
5325 else
5326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5327 $as_echo "no" >&6; }
5328 fi
5329
5330
5331 fi
5332 if test -z "$ac_cv_prog_AR"; then
5333 ac_ct_AR=$AR
5334 # Extract the first word of "ar", so it can be a program name with args.
5335 set dummy ar; ac_word=$2
5336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5337 $as_echo_n "checking for $ac_word... " >&6; }
5338 if ${ac_cv_prog_ac_ct_AR+:} false; then :
5339 $as_echo_n "(cached) " >&6
5340 else
5341 if test -n "$ac_ct_AR"; then
5342 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5343 else
5344 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5345 for as_dir in $PATH
5346 do
5347 IFS=$as_save_IFS
5348 test -z "$as_dir" && as_dir=.
5349 for ac_exec_ext in '' $ac_executable_extensions; do
5350 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5351 ac_cv_prog_ac_ct_AR="ar"
5352 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5353 break 2
5354 fi
5355 done
5356 done
5357 IFS=$as_save_IFS
5358
5359 fi
5360 fi
5361 ac_ct_AR=$ac_cv_prog_ac_ct_AR
5362 if test -n "$ac_ct_AR"; then
5363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5364 $as_echo "$ac_ct_AR" >&6; }
5365 else
5366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5367 $as_echo "no" >&6; }
5368 fi
5369
5370 if test "x$ac_ct_AR" = x; then
5371 AR="ar"
5372 else
5373 case $cross_compiling:$ac_tool_warned in
5374 yes:)
5375 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5376 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5377 ac_tool_warned=yes ;;
5378 esac
5379 AR=$ac_ct_AR
5380 fi
5381 else
5382 AR="$ac_cv_prog_AR"
5383 fi
5384
5385 if test -z "$ARFLAGS"; then
5386 ARFLAGS='cr'
5387 fi
5388
5389
5390
5391 if test -z "$RANLIB"; then
5392 if test $gl_cv_c_amsterdam_compiler = yes; then
5393 RANLIB=':'
5394 else
5395 if test -n "$ac_tool_prefix"; then
5396 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5397 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5399 $as_echo_n "checking for $ac_word... " >&6; }
5400 if ${ac_cv_prog_RANLIB+:} false; then :
5401 $as_echo_n "(cached) " >&6
5402 else
5403 if test -n "$RANLIB"; then
5404 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5405 else
5406 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5407 for as_dir in $PATH
5408 do
5409 IFS=$as_save_IFS
5410 test -z "$as_dir" && as_dir=.
5411 for ac_exec_ext in '' $ac_executable_extensions; do
5412 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5413 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5414 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5415 break 2
5416 fi
5417 done
5418 done
5419 IFS=$as_save_IFS
5420
5421 fi
5422 fi
5423 RANLIB=$ac_cv_prog_RANLIB
5424 if test -n "$RANLIB"; then
5425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5426 $as_echo "$RANLIB" >&6; }
5427 else
5428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5429 $as_echo "no" >&6; }
5430 fi
5431
5432
5433 fi
5434 if test -z "$ac_cv_prog_RANLIB"; then
5435 ac_ct_RANLIB=$RANLIB
5436 # Extract the first word of "ranlib", so it can be a program name with args.
5437 set dummy ranlib; ac_word=$2
5438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5439 $as_echo_n "checking for $ac_word... " >&6; }
5440 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
5441 $as_echo_n "(cached) " >&6
5442 else
5443 if test -n "$ac_ct_RANLIB"; then
5444 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5445 else
5446 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5447 for as_dir in $PATH
5448 do
5449 IFS=$as_save_IFS
5450 test -z "$as_dir" && as_dir=.
5451 for ac_exec_ext in '' $ac_executable_extensions; do
5452 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5453 ac_cv_prog_ac_ct_RANLIB="ranlib"
5454 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5455 break 2
5456 fi
5457 done
5458 done
5459 IFS=$as_save_IFS
5460
5461 fi
5462 fi
5463 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5464 if test -n "$ac_ct_RANLIB"; then
5465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5466 $as_echo "$ac_ct_RANLIB" >&6; }
5467 else
5468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5469 $as_echo "no" >&6; }
5470 fi
5471
5472 if test "x$ac_ct_RANLIB" = x; then
5473 RANLIB=":"
5474 else
5475 case $cross_compiling:$ac_tool_warned in
5476 yes:)
5477 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5478 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5479 ac_tool_warned=yes ;;
5480 esac
5481 RANLIB=$ac_ct_RANLIB
5482 fi
5483 else
5484 RANLIB="$ac_cv_prog_RANLIB"
5485 fi
5486
5487 fi
5488 fi
5489
5490
5491
5492 # Make sure we can run config.sub.
5493 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
5494 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
5495
5496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
5497 $as_echo_n "checking build system type... " >&6; }
5498 if ${ac_cv_build+:} false; then :
5499 $as_echo_n "(cached) " >&6
5500 else
5501 ac_build_alias=$build_alias
5502 test "x$ac_build_alias" = x &&
5503 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
5504 test "x$ac_build_alias" = x &&
5505 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
5506 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
5507 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
5508
5509 fi
5510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
5511 $as_echo "$ac_cv_build" >&6; }
5512 case $ac_cv_build in
5513 *-*-*) ;;
5514 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
5515 esac
5516 build=$ac_cv_build
5517 ac_save_IFS=$IFS; IFS='-'
5518 set x $ac_cv_build
5519 shift
5520 build_cpu=$1
5521 build_vendor=$2
5522 shift; shift
5523 # Remember, the first character of IFS is used to create $*,
5524 # except with old shells:
5525 build_os=$*
5526 IFS=$ac_save_IFS
5527 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
5528
5529
5530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
5531 $as_echo_n "checking host system type... " >&6; }
5532 if ${ac_cv_host+:} false; then :
5533 $as_echo_n "(cached) " >&6
5534 else
5535 if test "x$host_alias" = x; then
5536 ac_cv_host=$ac_cv_build
5537 else
5538 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
5539 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
5540 fi
5541
5542 fi
5543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
5544 $as_echo "$ac_cv_host" >&6; }
5545 case $ac_cv_host in
5546 *-*-*) ;;
5547 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
5548 esac
5549 host=$ac_cv_host
5550 ac_save_IFS=$IFS; IFS='-'
5551 set x $ac_cv_host
5552 shift
5553 host_cpu=$1
5554 host_vendor=$2
5555 shift; shift
5556 # Remember, the first character of IFS is used to create $*,
5557 # except with old shells:
5558 host_os=$*
5559 IFS=$ac_save_IFS
5560 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
5561
5562
5563
5564
5565
5566 # IEEE behaviour is the default on all CPUs except Alpha and SH
5567 # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
5568 # and the GCC 4.1.2 manual).
5569 case "$host_cpu" in
5570 alpha*)
5571 # On Alpha systems, a compiler option provides the behaviour.
5572 # See the ieee(3) manual page, also available at
5573 # <http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V51B_HTML/MAN/MAN3/0600____.HTM>
5574 if test -n "$GCC"; then
5575 # GCC has the option -mieee.
5576 # For full IEEE compliance (rarely needed), use option -mieee-with-inexact.
5577 CPPFLAGS="$CPPFLAGS -mieee"
5578 else
5579 # Compaq (ex-DEC) C has the option -ieee, equivalent to -ieee_with_no_inexact.
5580 # For full IEEE compliance (rarely needed), use option -ieee_with_inexact.
5581 CPPFLAGS="$CPPFLAGS -ieee"
5582 fi
5583 ;;
5584 sh*)
5585 if test -n "$GCC"; then
5586 # GCC has the option -mieee.
5587 CPPFLAGS="$CPPFLAGS -mieee"
5588 fi
5589 ;;
5590 esac
5591
5592 # Check whether --enable-largefile was given.
5593 if test "${enable_largefile+set}" = set; then :
5594 enableval=$enable_largefile;
5595 fi
5596
5597 if test "$enable_largefile" != no; then
5598
5599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
5600 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
5601 if ${ac_cv_sys_largefile_CC+:} false; then :
5602 $as_echo_n "(cached) " >&6
5603 else
5604 ac_cv_sys_largefile_CC=no
5605 if test "$GCC" != yes; then
5606 ac_save_CC=$CC
5607 while :; do
5608 # IRIX 6.2 and later do not support large files by default,
5609 # so use the C compiler's -n32 option if that helps.
5610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5611 /* end confdefs.h. */
5612 #include <sys/types.h>
5613 /* Check that off_t can represent 2**63 - 1 correctly.
5614 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5615 since some C++ compilers masquerading as C compilers
5616 incorrectly reject 9223372036854775807. */
5617 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5618 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5619 && LARGE_OFF_T % 2147483647 == 1)
5620 ? 1 : -1];
5621 int
5622 main ()
5623 {
5624
5625 ;
5626 return 0;
5627 }
5628 _ACEOF
5629 if ac_fn_c_try_compile "$LINENO"; then :
5630 break
5631 fi
5632 rm -f core conftest.err conftest.$ac_objext
5633 CC="$CC -n32"
5634 if ac_fn_c_try_compile "$LINENO"; then :
5635 ac_cv_sys_largefile_CC=' -n32'; break
5636 fi
5637 rm -f core conftest.err conftest.$ac_objext
5638 break
5639 done
5640 CC=$ac_save_CC
5641 rm -f conftest.$ac_ext
5642 fi
5643 fi
5644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
5645 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
5646 if test "$ac_cv_sys_largefile_CC" != no; then
5647 CC=$CC$ac_cv_sys_largefile_CC
5648 fi
5649
5650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5651 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
5652 if ${ac_cv_sys_file_offset_bits+:} false; then :
5653 $as_echo_n "(cached) " >&6
5654 else
5655 while :; do
5656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5657 /* end confdefs.h. */
5658 #include <sys/types.h>
5659 /* Check that off_t can represent 2**63 - 1 correctly.
5660 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5661 since some C++ compilers masquerading as C compilers
5662 incorrectly reject 9223372036854775807. */
5663 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5664 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5665 && LARGE_OFF_T % 2147483647 == 1)
5666 ? 1 : -1];
5667 int
5668 main ()
5669 {
5670
5671 ;
5672 return 0;
5673 }
5674 _ACEOF
5675 if ac_fn_c_try_compile "$LINENO"; then :
5676 ac_cv_sys_file_offset_bits=no; break
5677 fi
5678 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5680 /* end confdefs.h. */
5681 #define _FILE_OFFSET_BITS 64
5682 #include <sys/types.h>
5683 /* Check that off_t can represent 2**63 - 1 correctly.
5684 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5685 since some C++ compilers masquerading as C compilers
5686 incorrectly reject 9223372036854775807. */
5687 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5688 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5689 && LARGE_OFF_T % 2147483647 == 1)
5690 ? 1 : -1];
5691 int
5692 main ()
5693 {
5694
5695 ;
5696 return 0;
5697 }
5698 _ACEOF
5699 if ac_fn_c_try_compile "$LINENO"; then :
5700 ac_cv_sys_file_offset_bits=64; break
5701 fi
5702 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5703 ac_cv_sys_file_offset_bits=unknown
5704 break
5705 done
5706 fi
5707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
5708 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
5709 case $ac_cv_sys_file_offset_bits in #(
5710 no | unknown) ;;
5711 *)
5712 cat >>confdefs.h <<_ACEOF
5713 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
5714 _ACEOF
5715 ;;
5716 esac
5717 rm -rf conftest*
5718 if test $ac_cv_sys_file_offset_bits = unknown; then
5719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
5720 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
5721 if ${ac_cv_sys_large_files+:} false; then :
5722 $as_echo_n "(cached) " >&6
5723 else
5724 while :; do
5725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5726 /* end confdefs.h. */
5727 #include <sys/types.h>
5728 /* Check that off_t can represent 2**63 - 1 correctly.
5729 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5730 since some C++ compilers masquerading as C compilers
5731 incorrectly reject 9223372036854775807. */
5732 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5733 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5734 && LARGE_OFF_T % 2147483647 == 1)
5735 ? 1 : -1];
5736 int
5737 main ()
5738 {
5739
5740 ;
5741 return 0;
5742 }
5743 _ACEOF
5744 if ac_fn_c_try_compile "$LINENO"; then :
5745 ac_cv_sys_large_files=no; break
5746 fi
5747 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5749 /* end confdefs.h. */
5750 #define _LARGE_FILES 1
5751 #include <sys/types.h>
5752 /* Check that off_t can represent 2**63 - 1 correctly.
5753 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5754 since some C++ compilers masquerading as C compilers
5755 incorrectly reject 9223372036854775807. */
5756 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5757 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5758 && LARGE_OFF_T % 2147483647 == 1)
5759 ? 1 : -1];
5760 int
5761 main ()
5762 {
5763
5764 ;
5765 return 0;
5766 }
5767 _ACEOF
5768 if ac_fn_c_try_compile "$LINENO"; then :
5769 ac_cv_sys_large_files=1; break
5770 fi
5771 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5772 ac_cv_sys_large_files=unknown
5773 break
5774 done
5775 fi
5776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
5777 $as_echo "$ac_cv_sys_large_files" >&6; }
5778 case $ac_cv_sys_large_files in #(
5779 no | unknown) ;;
5780 *)
5781 cat >>confdefs.h <<_ACEOF
5782 #define _LARGE_FILES $ac_cv_sys_large_files
5783 _ACEOF
5784 ;;
5785 esac
5786 rm -rf conftest*
5787 fi
5788
5789
5790 $as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
5791
5792 fi
5793
5794
5795
5796
5797
5798
5799 # Check whether --enable-threads was given.
5800 if test "${enable_threads+set}" = set; then :
5801 enableval=$enable_threads; gl_use_threads=$enableval
5802 else
5803 if test -n "$gl_use_threads_default"; then
5804 gl_use_threads="$gl_use_threads_default"
5805 else
5806 case "$host_os" in
5807 osf*) gl_use_threads=no ;;
5808 cygwin*)
5809 case `uname -r` in
5810 1.[0-5].*) gl_use_threads=no ;;
5811 *) gl_use_threads=yes ;;
5812 esac
5813 ;;
5814 *) gl_use_threads=yes ;;
5815 esac
5816 fi
5817
5818 fi
5819
5820 if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
5821 # For using <pthread.h>:
5822 case "$host_os" in
5823 osf*)
5824 # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
5825 # groks <pthread.h>. cc also understands the flag -pthread, but
5826 # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
5827 # 2. putting a flag into CPPFLAGS that has an effect on the linker
5828 # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
5829 # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
5830 CPPFLAGS="$CPPFLAGS -D_REENTRANT"
5831 ;;
5832 esac
5833 # Some systems optimize for single-threaded programs by default, and
5834 # need special flags to disable these optimizations. For example, the
5835 # definition of 'errno' in <errno.h>.
5836 case "$host_os" in
5837 aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
5838 solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
5839 esac
5840 fi
5841
5842
5843
5844 # Pre-early section.
5845
5846
5847
5848
5849 # Code from module absolute-header:
5850 # Code from module alloca:
5851 # Code from module alloca-opt:
5852 # Code from module arpa_inet:
5853 # Code from module assure:
5854 # Code from module at-internal:
5855 # Code from module canonicalize-lgpl:
5856 # Code from module chdir:
5857 # Code from module chdir-long:
5858 # Code from module cloexec:
5859 # Code from module close:
5860 # Code from module closedir:
5861 # Code from module configmake:
5862 # Code from module d-ino:
5863 # Code from module d-type:
5864 # Code from module dirent:
5865 # Code from module dirfd:
5866 # Code from module dirname-lgpl:
5867 # Code from module dosname:
5868 # Code from module double-slash-root:
5869 # Code from module dup:
5870 # Code from module dup2:
5871 # Code from module environ:
5872 # Code from module errno:
5873 # Code from module error:
5874 # Code from module exitfail:
5875 # Code from module extensions:
5876 # Code from module extern-inline:
5877 # Code from module fchdir:
5878 # Code from module fcntl:
5879 # Code from module fcntl-h:
5880 # Code from module fd-hook:
5881 # Code from module fdopendir:
5882 # Code from module filename:
5883 # Code from module filenamecat-lgpl:
5884 # Code from module flexmember:
5885 # Code from module float:
5886 # Code from module fnmatch:
5887 # Code from module fnmatch-gnu:
5888 # Code from module fpieee:
5889
5890 # Code from module fpucw:
5891 # Code from module frexp:
5892 # Code from module frexpl:
5893 # Code from module fstat:
5894 # Code from module fstatat:
5895 # Code from module getcwd:
5896 # Code from module getcwd-lgpl:
5897 # Code from module getdtablesize:
5898 # Code from module getlogin_r:
5899 # Code from module getprogname:
5900 # Code from module gettext-h:
5901 # Code from module gettimeofday:
5902 # Code from module glob:
5903 # Code from module hard-locale:
5904 # Code from module havelib:
5905 # Code from module include_next:
5906 # Code from module inet_ntop:
5907 # Code from module intprops:
5908 # Code from module inttypes:
5909 # Code from module inttypes-incomplete:
5910 # Code from module isnand-nolibm:
5911 # Code from module isnanl-nolibm:
5912 # Code from module largefile:
5913
5914 # Code from module limits-h:
5915 # Code from module localcharset:
5916 # Code from module lock:
5917 # Code from module lstat:
5918 # Code from module malloc-posix:
5919 # Code from module malloca:
5920 # Code from module math:
5921 # Code from module mbrtowc:
5922 # Code from module mbsinit:
5923 # Code from module mbsrtowcs:
5924 # Code from module memchr:
5925 # Code from module memmem:
5926 # Code from module memmem-simple:
5927 # Code from module mempcpy:
5928 # Code from module memrchr:
5929 # Code from module mkdir:
5930 # Code from module mkdtemp:
5931 # Code from module mkostemp:
5932 # Code from module msvc-inval:
5933 # Code from module msvc-nothrow:
5934 # Code from module multiarch:
5935 # Code from module netinet_in:
5936 # Code from module nocrash:
5937 # Code from module open:
5938 # Code from module openat:
5939 # Code from module openat-die:
5940 # Code from module openat-h:
5941 # Code from module opendir:
5942 # Code from module pathmax:
5943 # Code from module rawmemchr:
5944 # Code from module readdir:
5945 # Code from module readlink:
5946 # Code from module realloc-posix:
5947 # Code from module rename:
5948 # Code from module rewinddir:
5949 # Code from module rmdir:
5950 # Code from module same-inode:
5951 # Code from module save-cwd:
5952 # Code from module secure_getenv:
5953 # Code from module setenv:
5954 # Code from module signal-h:
5955 # Code from module snippet/_Noreturn:
5956 # Code from module snippet/arg-nonnull:
5957 # Code from module snippet/c++defs:
5958 # Code from module snippet/warn-on-use:
5959 # Code from module socklen:
5960 # Code from module ssize_t:
5961 # Code from module stat:
5962 # Code from module stdalign:
5963 # Code from module stdbool:
5964 # Code from module stddef:
5965 # Code from module stdint:
5966 # Code from module stdio:
5967 # Code from module stdlib:
5968 # Code from module strchrnul:
5969 # Code from module strdup-posix:
5970 # Code from module streq:
5971 # Code from module strerror:
5972 # Code from module strerror-override:
5973 # Code from module strerror_r-posix:
5974 # Code from module string:
5975 # Code from module strnlen1:
5976 # Code from module strstr:
5977 # Code from module strstr-simple:
5978 # Code from module strtok_r:
5979 # Code from module sys_socket:
5980 # Code from module sys_stat:
5981 # Code from module sys_time:
5982 # Code from module sys_types:
5983 # Code from module sys_uio:
5984 # Code from module tempname:
5985 # Code from module threadlib:
5986
5987
5988
5989 # Code from module time:
5990 # Code from module time_r:
5991 # Code from module unistd:
5992 # Code from module unistd-safer:
5993 # Code from module unsetenv:
5994 # Code from module update-copyright:
5995 # Code from module verify:
5996 # Code from module wchar:
5997 # Code from module wctype-h:
5998
5999 ac_ext=c
6000 ac_cpp='$CPP $CPPFLAGS'
6001 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6002 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6003 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6004 if test -n "$ac_tool_prefix"; then
6005 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
6006 set dummy ${ac_tool_prefix}gcc; ac_word=$2
6007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6008 $as_echo_n "checking for $ac_word... " >&6; }
6009 if ${ac_cv_prog_CC+:} false; then :
6010 $as_echo_n "(cached) " >&6
6011 else
6012 if test -n "$CC"; then
6013 ac_cv_prog_CC="$CC" # Let the user override the test.
6014 else
6015 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6016 for as_dir in $PATH
6017 do
6018 IFS=$as_save_IFS
6019 test -z "$as_dir" && as_dir=.
6020 for ac_exec_ext in '' $ac_executable_extensions; do
6021 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6022 ac_cv_prog_CC="${ac_tool_prefix}gcc"
6023 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6024 break 2
6025 fi
6026 done
6027 done
6028 IFS=$as_save_IFS
6029
6030 fi
6031 fi
6032 CC=$ac_cv_prog_CC
6033 if test -n "$CC"; then
6034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6035 $as_echo "$CC" >&6; }
6036 else
6037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6038 $as_echo "no" >&6; }
6039 fi
6040
6041
6042 fi
6043 if test -z "$ac_cv_prog_CC"; then
6044 ac_ct_CC=$CC
6045 # Extract the first word of "gcc", so it can be a program name with args.
6046 set dummy gcc; ac_word=$2
6047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6048 $as_echo_n "checking for $ac_word... " >&6; }
6049 if ${ac_cv_prog_ac_ct_CC+:} false; then :
6050 $as_echo_n "(cached) " >&6
6051 else
6052 if test -n "$ac_ct_CC"; then
6053 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
6054 else
6055 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6056 for as_dir in $PATH
6057 do
6058 IFS=$as_save_IFS
6059 test -z "$as_dir" && as_dir=.
6060 for ac_exec_ext in '' $ac_executable_extensions; do
6061 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6062 ac_cv_prog_ac_ct_CC="gcc"
6063 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6064 break 2
6065 fi
6066 done
6067 done
6068 IFS=$as_save_IFS
6069
6070 fi
6071 fi
6072 ac_ct_CC=$ac_cv_prog_ac_ct_CC
6073 if test -n "$ac_ct_CC"; then
6074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
6075 $as_echo "$ac_ct_CC" >&6; }
6076 else
6077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6078 $as_echo "no" >&6; }
6079 fi
6080
6081 if test "x$ac_ct_CC" = x; then
6082 CC=""
6083 else
6084 case $cross_compiling:$ac_tool_warned in
6085 yes:)
6086 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6087 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6088 ac_tool_warned=yes ;;
6089 esac
6090 CC=$ac_ct_CC
6091 fi
6092 else
6093 CC="$ac_cv_prog_CC"
6094 fi
6095
6096 if test -z "$CC"; then
6097 if test -n "$ac_tool_prefix"; then
6098 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
6099 set dummy ${ac_tool_prefix}cc; ac_word=$2
6100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6101 $as_echo_n "checking for $ac_word... " >&6; }
6102 if ${ac_cv_prog_CC+:} false; then :
6103 $as_echo_n "(cached) " >&6
6104 else
6105 if test -n "$CC"; then
6106 ac_cv_prog_CC="$CC" # Let the user override the test.
6107 else
6108 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6109 for as_dir in $PATH
6110 do
6111 IFS=$as_save_IFS
6112 test -z "$as_dir" && as_dir=.
6113 for ac_exec_ext in '' $ac_executable_extensions; do
6114 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6115 ac_cv_prog_CC="${ac_tool_prefix}cc"
6116 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6117 break 2
6118 fi
6119 done
6120 done
6121 IFS=$as_save_IFS
6122
6123 fi
6124 fi
6125 CC=$ac_cv_prog_CC
6126 if test -n "$CC"; then
6127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6128 $as_echo "$CC" >&6; }
6129 else
6130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6131 $as_echo "no" >&6; }
6132 fi
6133
6134
6135 fi
6136 fi
6137 if test -z "$CC"; then
6138 # Extract the first word of "cc", so it can be a program name with args.
6139 set dummy cc; ac_word=$2
6140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6141 $as_echo_n "checking for $ac_word... " >&6; }
6142 if ${ac_cv_prog_CC+:} false; then :
6143 $as_echo_n "(cached) " >&6
6144 else
6145 if test -n "$CC"; then
6146 ac_cv_prog_CC="$CC" # Let the user override the test.
6147 else
6148 ac_prog_rejected=no
6149 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6150 for as_dir in $PATH
6151 do
6152 IFS=$as_save_IFS
6153 test -z "$as_dir" && as_dir=.
6154 for ac_exec_ext in '' $ac_executable_extensions; do
6155 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6156 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
6157 ac_prog_rejected=yes
6158 continue
6159 fi
6160 ac_cv_prog_CC="cc"
6161 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6162 break 2
6163 fi
6164 done
6165 done
6166 IFS=$as_save_IFS
6167
6168 if test $ac_prog_rejected = yes; then
6169 # We found a bogon in the path, so make sure we never use it.
6170 set dummy $ac_cv_prog_CC
6171 shift
6172 if test $# != 0; then
6173 # We chose a different compiler from the bogus one.
6174 # However, it has the same basename, so the bogon will be chosen
6175 # first if we set CC to just the basename; use the full file name.
6176 shift
6177 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
6178 fi
6179 fi
6180 fi
6181 fi
6182 CC=$ac_cv_prog_CC
6183 if test -n "$CC"; then
6184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6185 $as_echo "$CC" >&6; }
6186 else
6187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6188 $as_echo "no" >&6; }
6189 fi
6190
6191
6192 fi
6193 if test -z "$CC"; then
6194 if test -n "$ac_tool_prefix"; then
6195 for ac_prog in cl.exe
6196 do
6197 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6198 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6200 $as_echo_n "checking for $ac_word... " >&6; }
6201 if ${ac_cv_prog_CC+:} false; then :
6202 $as_echo_n "(cached) " >&6
6203 else
6204 if test -n "$CC"; then
6205 ac_cv_prog_CC="$CC" # Let the user override the test.
6206 else
6207 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6208 for as_dir in $PATH
6209 do
6210 IFS=$as_save_IFS
6211 test -z "$as_dir" && as_dir=.
6212 for ac_exec_ext in '' $ac_executable_extensions; do
6213 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6214 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
6215 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6216 break 2
6217 fi
6218 done
6219 done
6220 IFS=$as_save_IFS
6221
6222 fi
6223 fi
6224 CC=$ac_cv_prog_CC
6225 if test -n "$CC"; then
6226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6227 $as_echo "$CC" >&6; }
6228 else
6229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6230 $as_echo "no" >&6; }
6231 fi
6232
6233
6234 test -n "$CC" && break
6235 done
6236 fi
6237 if test -z "$CC"; then
6238 ac_ct_CC=$CC
6239 for ac_prog in cl.exe
6240 do
6241 # Extract the first word of "$ac_prog", so it can be a program name with args.
6242 set dummy $ac_prog; ac_word=$2
6243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6244 $as_echo_n "checking for $ac_word... " >&6; }
6245 if ${ac_cv_prog_ac_ct_CC+:} false; then :
6246 $as_echo_n "(cached) " >&6
6247 else
6248 if test -n "$ac_ct_CC"; then
6249 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
6250 else
6251 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6252 for as_dir in $PATH
6253 do
6254 IFS=$as_save_IFS
6255 test -z "$as_dir" && as_dir=.
6256 for ac_exec_ext in '' $ac_executable_extensions; do
6257 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6258 ac_cv_prog_ac_ct_CC="$ac_prog"
6259 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6260 break 2
6261 fi
6262 done
6263 done
6264 IFS=$as_save_IFS
6265
6266 fi
6267 fi
6268 ac_ct_CC=$ac_cv_prog_ac_ct_CC
6269 if test -n "$ac_ct_CC"; then
6270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
6271 $as_echo "$ac_ct_CC" >&6; }
6272 else
6273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6274 $as_echo "no" >&6; }
6275 fi
6276
6277
6278 test -n "$ac_ct_CC" && break
6279 done
6280
6281 if test "x$ac_ct_CC" = x; then
6282 CC=""
6283 else
6284 case $cross_compiling:$ac_tool_warned in
6285 yes:)
6286 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6287 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6288 ac_tool_warned=yes ;;
6289 esac
6290 CC=$ac_ct_CC
6291 fi
6292 fi
6293
6294 fi
6295
6296
6297 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6298 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6299 as_fn_error $? "no acceptable C compiler found in \$PATH
6300 See \`config.log' for more details" "$LINENO" 5; }
6301
6302 # Provide some information about the compiler.
6303 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
6304 set X $ac_compile
6305 ac_compiler=$2
6306 for ac_option in --version -v -V -qversion; do
6307 { { ac_try="$ac_compiler $ac_option >&5"
6308 case "(($ac_try" in
6309 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6310 *) ac_try_echo=$ac_try;;
6311 esac
6312 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
6313 $as_echo "$ac_try_echo"; } >&5
6314 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
6315 ac_status=$?
6316 if test -s conftest.err; then
6317 sed '10a\
6318 ... rest of stderr output deleted ...
6319 10q' conftest.err >conftest.er1
6320 cat conftest.er1 >&5
6321 fi
6322 rm -f conftest.er1 conftest.err
6323 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6324 test $ac_status = 0; }
6325 done
6326
6327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
6328 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
6329 if ${ac_cv_c_compiler_gnu+:} false; then :
6330 $as_echo_n "(cached) " >&6
6331 else
6332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6333 /* end confdefs.h. */
6334
6335 int
6336 main ()
6337 {
6338 #ifndef __GNUC__
6339 choke me
6340 #endif
6341
6342 ;
6343 return 0;
6344 }
6345 _ACEOF
6346 if ac_fn_c_try_compile "$LINENO"; then :
6347 ac_compiler_gnu=yes
6348 else
6349 ac_compiler_gnu=no
6350 fi
6351 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6352 ac_cv_c_compiler_gnu=$ac_compiler_gnu
6353
6354 fi
6355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
6356 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
6357 if test $ac_compiler_gnu = yes; then
6358 GCC=yes
6359 else
6360 GCC=
6361 fi
6362 ac_test_CFLAGS=${CFLAGS+set}
6363 ac_save_CFLAGS=$CFLAGS
6364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
6365 $as_echo_n "checking whether $CC accepts -g... " >&6; }
6366 if ${ac_cv_prog_cc_g+:} false; then :
6367 $as_echo_n "(cached) " >&6
6368 else
6369 ac_save_c_werror_flag=$ac_c_werror_flag
6370 ac_c_werror_flag=yes
6371 ac_cv_prog_cc_g=no
6372 CFLAGS="-g"
6373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6374 /* end confdefs.h. */
6375
6376 int
6377 main ()
6378 {
6379
6380 ;
6381 return 0;
6382 }
6383 _ACEOF
6384 if ac_fn_c_try_compile "$LINENO"; then :
6385 ac_cv_prog_cc_g=yes
6386 else
6387 CFLAGS=""
6388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6389 /* end confdefs.h. */
6390
6391 int
6392 main ()
6393 {
6394
6395 ;
6396 return 0;
6397 }
6398 _ACEOF
6399 if ac_fn_c_try_compile "$LINENO"; then :
6400
6401 else
6402 ac_c_werror_flag=$ac_save_c_werror_flag
6403 CFLAGS="-g"
6404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6405 /* end confdefs.h. */
6406
6407 int
6408 main ()
6409 {
6410
6411 ;
6412 return 0;
6413 }
6414 _ACEOF
6415 if ac_fn_c_try_compile "$LINENO"; then :
6416 ac_cv_prog_cc_g=yes
6417 fi
6418 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6419 fi
6420 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6421 fi
6422 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6423 ac_c_werror_flag=$ac_save_c_werror_flag
6424 fi
6425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
6426 $as_echo "$ac_cv_prog_cc_g" >&6; }
6427 if test "$ac_test_CFLAGS" = set; then
6428 CFLAGS=$ac_save_CFLAGS
6429 elif test $ac_cv_prog_cc_g = yes; then
6430 if test "$GCC" = yes; then
6431 CFLAGS="-g -O2"
6432 else
6433 CFLAGS="-g"
6434 fi
6435 else
6436 if test "$GCC" = yes; then
6437 CFLAGS="-O2"
6438 else
6439 CFLAGS=
6440 fi
6441 fi
6442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
6443 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
6444 if ${ac_cv_prog_cc_c89+:} false; then :
6445 $as_echo_n "(cached) " >&6
6446 else
6447 ac_cv_prog_cc_c89=no
6448 ac_save_CC=$CC
6449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6450 /* end confdefs.h. */
6451 #include <stdarg.h>
6452 #include <stdio.h>
6453 struct stat;
6454 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
6455 struct buf { int x; };
6456 FILE * (*rcsopen) (struct buf *, struct stat *, int);
6457 static char *e (p, i)
6458 char **p;
6459 int i;
6460 {
6461 return p[i];
6462 }
6463 static char *f (char * (*g) (char **, int), char **p, ...)
6464 {
6465 char *s;
6466 va_list v;
6467 va_start (v,p);
6468 s = g (p, va_arg (v,int));
6469 va_end (v);
6470 return s;
6471 }
6472
6473 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
6474 function prototypes and stuff, but not '\xHH' hex character constants.
6475 These don't provoke an error unfortunately, instead are silently treated
6476 as 'x'. The following induces an error, until -std is added to get
6477 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
6478 array size at least. It's necessary to write '\x00'==0 to get something
6479 that's true only with -std. */
6480 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
6481
6482 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
6483 inside strings and character constants. */
6484 #define FOO(x) 'x'
6485 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
6486
6487 int test (int i, double x);
6488 struct s1 {int (*f) (int a);};
6489 struct s2 {int (*f) (double a);};
6490 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
6491 int argc;
6492 char **argv;
6493 int
6494 main ()
6495 {
6496 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
6497 ;
6498 return 0;
6499 }
6500 _ACEOF
6501 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
6502 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6503 do
6504 CC="$ac_save_CC $ac_arg"
6505 if ac_fn_c_try_compile "$LINENO"; then :
6506 ac_cv_prog_cc_c89=$ac_arg
6507 fi
6508 rm -f core conftest.err conftest.$ac_objext
6509 test "x$ac_cv_prog_cc_c89" != "xno" && break
6510 done
6511 rm -f conftest.$ac_ext
6512 CC=$ac_save_CC
6513
6514 fi
6515 # AC_CACHE_VAL
6516 case "x$ac_cv_prog_cc_c89" in
6517 x)
6518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6519 $as_echo "none needed" >&6; } ;;
6520 xno)
6521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6522 $as_echo "unsupported" >&6; } ;;
6523 *)
6524 CC="$CC $ac_cv_prog_cc_c89"
6525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
6526 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
6527 esac
6528 if test "x$ac_cv_prog_cc_c89" != xno; then :
6529
6530 fi
6531
6532 ac_ext=c
6533 ac_cpp='$CPP $CPPFLAGS'
6534 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6535 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6536 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6537
6538 ac_ext=c
6539 ac_cpp='$CPP $CPPFLAGS'
6540 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6541 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6542 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
6544 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
6545 if ${am_cv_prog_cc_c_o+:} false; then :
6546 $as_echo_n "(cached) " >&6
6547 else
6548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6549 /* end confdefs.h. */
6550
6551 int
6552 main ()
6553 {
6554
6555 ;
6556 return 0;
6557 }
6558 _ACEOF
6559 # Make sure it works both with $CC and with simple cc.
6560 # Following AC_PROG_CC_C_O, we do the test twice because some
6561 # compilers refuse to overwrite an existing .o file with -o,
6562 # though they will create one.
6563 am_cv_prog_cc_c_o=yes
6564 for am_i in 1 2; do
6565 if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
6566 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
6567 ac_status=$?
6568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6569 (exit $ac_status); } \
6570 && test -f conftest2.$ac_objext; then
6571 : OK
6572 else
6573 am_cv_prog_cc_c_o=no
6574 break
6575 fi
6576 done
6577 rm -f core conftest*
6578 unset am_i
6579 fi
6580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
6581 $as_echo "$am_cv_prog_cc_c_o" >&6; }
6582 if test "$am_cv_prog_cc_c_o" != yes; then
6583 # Losing compiler, so override with the script.
6584 # FIXME: It is wrong to rewrite CC.
6585 # But if we don't then we get into trouble of one sort or another.
6586 # A longer-term fix would be to have automake use am__CC in this case,
6587 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
6588 CC="$am_aux_dir/compile $CC"
6589 fi
6590 ac_ext=c
6591 ac_cpp='$CPP $CPPFLAGS'
6592 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6593 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6594 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6595
6596
6597 am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
6598
6599
6600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6601 $as_echo_n "checking target system type... " >&6; }
6602 if ${ac_cv_target+:} false; then :
6603 $as_echo_n "(cached) " >&6
6604 else
6605 if test "x$target_alias" = x; then
6606 ac_cv_target=$ac_cv_host
6607 else
6608 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6609 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6610 fi
6611
6612 fi
6613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6614 $as_echo "$ac_cv_target" >&6; }
6615 case $ac_cv_target in
6616 *-*-*) ;;
6617 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6618 esac
6619 target=$ac_cv_target
6620 ac_save_IFS=$IFS; IFS='-'
6621 set x $ac_cv_target
6622 shift
6623 target_cpu=$1
6624 target_vendor=$2
6625 shift; shift
6626 # Remember, the first character of IFS is used to create $*,
6627 # except with old shells:
6628 target_os=$*
6629 IFS=$ac_save_IFS
6630 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6631
6632
6633 # The aliases save the names the user supplied, while $host etc.
6634 # will get canonicalized.
6635 test -n "$target_alias" &&
6636 test "$program_prefix$program_suffix$program_transform_name" = \
6637 NONENONEs,x,x, &&
6638 program_prefix=${target_alias}-
6639
6640 # The tests for host and target for $enable_largefile require
6641 # canonical names.
6642
6643
6644
6645 # As the $enable_largefile decision depends on --enable-plugins we must set it
6646 # even in directories otherwise not depending on the $plugins option.
6647
6648
6649 maybe_plugins=no
6650 for ac_header in dlfcn.h
6651 do :
6652 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
6653 "
6654 if test "x$ac_cv_header_dlfcn_h" = xyes; then :
6655 cat >>confdefs.h <<_ACEOF
6656 #define HAVE_DLFCN_H 1
6657 _ACEOF
6658 maybe_plugins=yes
6659 fi
6660
6661 done
6662
6663 for ac_header in windows.h
6664 do :
6665 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
6666 "
6667 if test "x$ac_cv_header_windows_h" = xyes; then :
6668 cat >>confdefs.h <<_ACEOF
6669 #define HAVE_WINDOWS_H 1
6670 _ACEOF
6671 maybe_plugins=yes
6672 fi
6673
6674 done
6675
6676
6677 # Check whether --enable-plugins was given.
6678 if test "${enable_plugins+set}" = set; then :
6679 enableval=$enable_plugins; case "${enableval}" in
6680 no) plugins=no ;;
6681 *) plugins=yes
6682 if test "$maybe_plugins" != "yes" ; then
6683 as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
6684 fi ;;
6685 esac
6686 else
6687 plugins=$maybe_plugins
6688
6689 fi
6690
6691 if test "$plugins" = "yes"; then
6692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
6693 $as_echo_n "checking for library containing dlsym... " >&6; }
6694 if ${ac_cv_search_dlsym+:} false; then :
6695 $as_echo_n "(cached) " >&6
6696 else
6697 ac_func_search_save_LIBS=$LIBS
6698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6699 /* end confdefs.h. */
6700
6701 /* Override any GCC internal prototype to avoid an error.
6702 Use char because int might match the return type of a GCC
6703 builtin and then its argument prototype would still apply. */
6704 #ifdef __cplusplus
6705 extern "C"
6706 #endif
6707 char dlsym ();
6708 int
6709 main ()
6710 {
6711 return dlsym ();
6712 ;
6713 return 0;
6714 }
6715 _ACEOF
6716 for ac_lib in '' dl; do
6717 if test -z "$ac_lib"; then
6718 ac_res="none required"
6719 else
6720 ac_res=-l$ac_lib
6721 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
6722 fi
6723 if ac_fn_c_try_link "$LINENO"; then :
6724 ac_cv_search_dlsym=$ac_res
6725 fi
6726 rm -f core conftest.err conftest.$ac_objext \
6727 conftest$ac_exeext
6728 if ${ac_cv_search_dlsym+:} false; then :
6729 break
6730 fi
6731 done
6732 if ${ac_cv_search_dlsym+:} false; then :
6733
6734 else
6735 ac_cv_search_dlsym=no
6736 fi
6737 rm conftest.$ac_ext
6738 LIBS=$ac_func_search_save_LIBS
6739 fi
6740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
6741 $as_echo "$ac_cv_search_dlsym" >&6; }
6742 ac_res=$ac_cv_search_dlsym
6743 if test "$ac_res" != no; then :
6744 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6745
6746 fi
6747
6748 fi
6749
6750
6751 case "${host}" in
6752 sparc-*-solaris*|i[3-7]86-*-solaris*)
6753 # On native 32bit sparc and ia32 solaris, large-file and procfs support
6754 # are mutually exclusive; and without procfs support, the bfd/ elf module
6755 # cannot provide certain routines such as elfcore_write_prpsinfo
6756 # or elfcore_write_prstatus. So unless the user explicitly requested
6757 # large-file support through the --enable-largefile switch, disable
6758 # large-file support in favor of procfs support.
6759 test "${target}" = "${host}" -a "x$plugins" = xno \
6760 && : ${enable_largefile="no"}
6761 ;;
6762 esac
6763
6764 # Check whether --enable-largefile was given.
6765 if test "${enable_largefile+set}" = set; then :
6766 enableval=$enable_largefile;
6767 fi
6768
6769 if test "$enable_largefile" != no; then
6770
6771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
6772 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
6773 if ${ac_cv_sys_largefile_CC+:} false; then :
6774 $as_echo_n "(cached) " >&6
6775 else
6776 ac_cv_sys_largefile_CC=no
6777 if test "$GCC" != yes; then
6778 ac_save_CC=$CC
6779 while :; do
6780 # IRIX 6.2 and later do not support large files by default,
6781 # so use the C compiler's -n32 option if that helps.
6782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6783 /* end confdefs.h. */
6784 #include <sys/types.h>
6785 /* Check that off_t can represent 2**63 - 1 correctly.
6786 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6787 since some C++ compilers masquerading as C compilers
6788 incorrectly reject 9223372036854775807. */
6789 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6790 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6791 && LARGE_OFF_T % 2147483647 == 1)
6792 ? 1 : -1];
6793 int
6794 main ()
6795 {
6796
6797 ;
6798 return 0;
6799 }
6800 _ACEOF
6801 if ac_fn_c_try_compile "$LINENO"; then :
6802 break
6803 fi
6804 rm -f core conftest.err conftest.$ac_objext
6805 CC="$CC -n32"
6806 if ac_fn_c_try_compile "$LINENO"; then :
6807 ac_cv_sys_largefile_CC=' -n32'; break
6808 fi
6809 rm -f core conftest.err conftest.$ac_objext
6810 break
6811 done
6812 CC=$ac_save_CC
6813 rm -f conftest.$ac_ext
6814 fi
6815 fi
6816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
6817 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
6818 if test "$ac_cv_sys_largefile_CC" != no; then
6819 CC=$CC$ac_cv_sys_largefile_CC
6820 fi
6821
6822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
6823 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
6824 if ${ac_cv_sys_file_offset_bits+:} false; then :
6825 $as_echo_n "(cached) " >&6
6826 else
6827 while :; do
6828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6829 /* end confdefs.h. */
6830 #include <sys/types.h>
6831 /* Check that off_t can represent 2**63 - 1 correctly.
6832 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6833 since some C++ compilers masquerading as C compilers
6834 incorrectly reject 9223372036854775807. */
6835 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6836 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6837 && LARGE_OFF_T % 2147483647 == 1)
6838 ? 1 : -1];
6839 int
6840 main ()
6841 {
6842
6843 ;
6844 return 0;
6845 }
6846 _ACEOF
6847 if ac_fn_c_try_compile "$LINENO"; then :
6848 ac_cv_sys_file_offset_bits=no; break
6849 fi
6850 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6852 /* end confdefs.h. */
6853 #define _FILE_OFFSET_BITS 64
6854 #include <sys/types.h>
6855 /* Check that off_t can represent 2**63 - 1 correctly.
6856 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6857 since some C++ compilers masquerading as C compilers
6858 incorrectly reject 9223372036854775807. */
6859 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6860 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6861 && LARGE_OFF_T % 2147483647 == 1)
6862 ? 1 : -1];
6863 int
6864 main ()
6865 {
6866
6867 ;
6868 return 0;
6869 }
6870 _ACEOF
6871 if ac_fn_c_try_compile "$LINENO"; then :
6872 ac_cv_sys_file_offset_bits=64; break
6873 fi
6874 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6875 ac_cv_sys_file_offset_bits=unknown
6876 break
6877 done
6878 fi
6879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
6880 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
6881 case $ac_cv_sys_file_offset_bits in #(
6882 no | unknown) ;;
6883 *)
6884 cat >>confdefs.h <<_ACEOF
6885 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
6886 _ACEOF
6887 ;;
6888 esac
6889 rm -rf conftest*
6890 if test $ac_cv_sys_file_offset_bits = unknown; then
6891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
6892 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
6893 if ${ac_cv_sys_large_files+:} false; then :
6894 $as_echo_n "(cached) " >&6
6895 else
6896 while :; do
6897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6898 /* end confdefs.h. */
6899 #include <sys/types.h>
6900 /* Check that off_t can represent 2**63 - 1 correctly.
6901 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6902 since some C++ compilers masquerading as C compilers
6903 incorrectly reject 9223372036854775807. */
6904 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6905 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6906 && LARGE_OFF_T % 2147483647 == 1)
6907 ? 1 : -1];
6908 int
6909 main ()
6910 {
6911
6912 ;
6913 return 0;
6914 }
6915 _ACEOF
6916 if ac_fn_c_try_compile "$LINENO"; then :
6917 ac_cv_sys_large_files=no; break
6918 fi
6919 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6921 /* end confdefs.h. */
6922 #define _LARGE_FILES 1
6923 #include <sys/types.h>
6924 /* Check that off_t can represent 2**63 - 1 correctly.
6925 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6926 since some C++ compilers masquerading as C compilers
6927 incorrectly reject 9223372036854775807. */
6928 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6929 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6930 && LARGE_OFF_T % 2147483647 == 1)
6931 ? 1 : -1];
6932 int
6933 main ()
6934 {
6935
6936 ;
6937 return 0;
6938 }
6939 _ACEOF
6940 if ac_fn_c_try_compile "$LINENO"; then :
6941 ac_cv_sys_large_files=1; break
6942 fi
6943 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6944 ac_cv_sys_large_files=unknown
6945 break
6946 done
6947 fi
6948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
6949 $as_echo "$ac_cv_sys_large_files" >&6; }
6950 case $ac_cv_sys_large_files in #(
6951 no | unknown) ;;
6952 *)
6953 cat >>confdefs.h <<_ACEOF
6954 #define _LARGE_FILES $ac_cv_sys_large_files
6955 _ACEOF
6956 ;;
6957 esac
6958 rm -rf conftest*
6959 fi
6960
6961
6962 $as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
6963
6964 fi
6965
6966
6967
6968 ac_aux_dir=
6969 for ac_dir in .. "$srcdir"/..; do
6970 if test -f "$ac_dir/install-sh"; then
6971 ac_aux_dir=$ac_dir
6972 ac_install_sh="$ac_aux_dir/install-sh -c"
6973 break
6974 elif test -f "$ac_dir/install.sh"; then
6975 ac_aux_dir=$ac_dir
6976 ac_install_sh="$ac_aux_dir/install.sh -c"
6977 break
6978 elif test -f "$ac_dir/shtool"; then
6979 ac_aux_dir=$ac_dir
6980 ac_install_sh="$ac_aux_dir/shtool install -c"
6981 break
6982 fi
6983 done
6984 if test -z "$ac_aux_dir"; then
6985 as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
6986 fi
6987
6988 # These three variables are undocumented and unsupported,
6989 # and are intended to be withdrawn in a future Autoconf release.
6990 # They can cause serious problems if a builder's source tree is in a directory
6991 # whose full name contains unusual characters.
6992 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
6993 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
6994 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004 LIBC_FATAL_STDERR_=1
7005 export LIBC_FATAL_STDERR_
7006
7007 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
7008 if test "x$ac_cv_type_size_t" = xyes; then :
7009
7010 else
7011
7012 cat >>confdefs.h <<_ACEOF
7013 #define size_t unsigned int
7014 _ACEOF
7015
7016 fi
7017
7018 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
7019 # for constant arguments. Useless!
7020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
7021 $as_echo_n "checking for working alloca.h... " >&6; }
7022 if ${ac_cv_working_alloca_h+:} false; then :
7023 $as_echo_n "(cached) " >&6
7024 else
7025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7026 /* end confdefs.h. */
7027 #include <alloca.h>
7028 int
7029 main ()
7030 {
7031 char *p = (char *) alloca (2 * sizeof (int));
7032 if (p) return 0;
7033 ;
7034 return 0;
7035 }
7036 _ACEOF
7037 if ac_fn_c_try_link "$LINENO"; then :
7038 ac_cv_working_alloca_h=yes
7039 else
7040 ac_cv_working_alloca_h=no
7041 fi
7042 rm -f core conftest.err conftest.$ac_objext \
7043 conftest$ac_exeext conftest.$ac_ext
7044 fi
7045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
7046 $as_echo "$ac_cv_working_alloca_h" >&6; }
7047 if test $ac_cv_working_alloca_h = yes; then
7048
7049 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
7050
7051 fi
7052
7053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
7054 $as_echo_n "checking for alloca... " >&6; }
7055 if ${ac_cv_func_alloca_works+:} false; then :
7056 $as_echo_n "(cached) " >&6
7057 else
7058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7059 /* end confdefs.h. */
7060 #ifdef __GNUC__
7061 # define alloca __builtin_alloca
7062 #else
7063 # ifdef _MSC_VER
7064 # include <malloc.h>
7065 # define alloca _alloca
7066 # else
7067 # ifdef HAVE_ALLOCA_H
7068 # include <alloca.h>
7069 # else
7070 # ifdef _AIX
7071 #pragma alloca
7072 # else
7073 # ifndef alloca /* predefined by HP cc +Olibcalls */
7074 void *alloca (size_t);
7075 # endif
7076 # endif
7077 # endif
7078 # endif
7079 #endif
7080
7081 int
7082 main ()
7083 {
7084 char *p = (char *) alloca (1);
7085 if (p) return 0;
7086 ;
7087 return 0;
7088 }
7089 _ACEOF
7090 if ac_fn_c_try_link "$LINENO"; then :
7091 ac_cv_func_alloca_works=yes
7092 else
7093 ac_cv_func_alloca_works=no
7094 fi
7095 rm -f core conftest.err conftest.$ac_objext \
7096 conftest$ac_exeext conftest.$ac_ext
7097 fi
7098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
7099 $as_echo "$ac_cv_func_alloca_works" >&6; }
7100
7101 if test $ac_cv_func_alloca_works = yes; then
7102
7103 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
7104
7105 else
7106 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
7107 # that cause trouble. Some versions do not even contain alloca or
7108 # contain a buggy version. If you still want to use their alloca,
7109 # use ar to extract alloca.o from them instead of compiling alloca.c.
7110
7111
7112
7113
7114
7115 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
7116
7117 $as_echo "#define C_ALLOCA 1" >>confdefs.h
7118
7119
7120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
7121 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
7122 if ${ac_cv_os_cray+:} false; then :
7123 $as_echo_n "(cached) " >&6
7124 else
7125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7126 /* end confdefs.h. */
7127 #if defined CRAY && ! defined CRAY2
7128 webecray
7129 #else
7130 wenotbecray
7131 #endif
7132
7133 _ACEOF
7134 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7135 $EGREP "webecray" >/dev/null 2>&1; then :
7136 ac_cv_os_cray=yes
7137 else
7138 ac_cv_os_cray=no
7139 fi
7140 rm -f conftest*
7141
7142 fi
7143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
7144 $as_echo "$ac_cv_os_cray" >&6; }
7145 if test $ac_cv_os_cray = yes; then
7146 for ac_func in _getb67 GETB67 getb67; do
7147 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7148 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7149 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7150
7151 cat >>confdefs.h <<_ACEOF
7152 #define CRAY_STACKSEG_END $ac_func
7153 _ACEOF
7154
7155 break
7156 fi
7157
7158 done
7159 fi
7160
7161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
7162 $as_echo_n "checking stack direction for C alloca... " >&6; }
7163 if ${ac_cv_c_stack_direction+:} false; then :
7164 $as_echo_n "(cached) " >&6
7165 else
7166 if test "$cross_compiling" = yes; then :
7167 ac_cv_c_stack_direction=0
7168 else
7169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7170 /* end confdefs.h. */
7171 $ac_includes_default
7172 int
7173 find_stack_direction (int *addr, int depth)
7174 {
7175 int dir, dummy = 0;
7176 if (! addr)
7177 addr = &dummy;
7178 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
7179 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
7180 return dir + dummy;
7181 }
7182
7183 int
7184 main (int argc, char **argv)
7185 {
7186 return find_stack_direction (0, argc + !argv + 20) < 0;
7187 }
7188 _ACEOF
7189 if ac_fn_c_try_run "$LINENO"; then :
7190 ac_cv_c_stack_direction=1
7191 else
7192 ac_cv_c_stack_direction=-1
7193 fi
7194 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7195 conftest.$ac_objext conftest.beam conftest.$ac_ext
7196 fi
7197
7198 fi
7199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
7200 $as_echo "$ac_cv_c_stack_direction" >&6; }
7201 cat >>confdefs.h <<_ACEOF
7202 #define STACK_DIRECTION $ac_cv_c_stack_direction
7203 _ACEOF
7204
7205
7206 fi
7207
7208
7209 GNULIB_INET_NTOP=0;
7210 GNULIB_INET_PTON=0;
7211 HAVE_DECL_INET_NTOP=1;
7212 HAVE_DECL_INET_PTON=1;
7213 REPLACE_INET_NTOP=0;
7214 REPLACE_INET_PTON=0;
7215
7216
7217
7218
7219
7220 for ac_header in $gl_header_list
7221 do :
7222 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7223 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
7224 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7225 cat >>confdefs.h <<_ACEOF
7226 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7227 _ACEOF
7228
7229 fi
7230
7231 done
7232
7233
7234
7235
7236
7237
7238
7239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
7240 $as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
7241 if ${gl_cv_have_include_next+:} false; then :
7242 $as_echo_n "(cached) " >&6
7243 else
7244 rm -rf conftestd1a conftestd1b conftestd2
7245 mkdir conftestd1a conftestd1b conftestd2
7246 cat <<EOF > conftestd1a/conftest.h
7247 #define DEFINED_IN_CONFTESTD1
7248 #include_next <conftest.h>
7249 #ifdef DEFINED_IN_CONFTESTD2
7250 int foo;
7251 #else
7252 #error "include_next doesn't work"
7253 #endif
7254 EOF
7255 cat <<EOF > conftestd1b/conftest.h
7256 #define DEFINED_IN_CONFTESTD1
7257 #include <stdio.h>
7258 #include_next <conftest.h>
7259 #ifdef DEFINED_IN_CONFTESTD2
7260 int foo;
7261 #else
7262 #error "include_next doesn't work"
7263 #endif
7264 EOF
7265 cat <<EOF > conftestd2/conftest.h
7266 #ifndef DEFINED_IN_CONFTESTD1
7267 #error "include_next test doesn't work"
7268 #endif
7269 #define DEFINED_IN_CONFTESTD2
7270 EOF
7271 gl_save_CPPFLAGS="$CPPFLAGS"
7272 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
7273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7274 /* end confdefs.h. */
7275 #include <conftest.h>
7276 _ACEOF
7277 if ac_fn_c_try_compile "$LINENO"; then :
7278 gl_cv_have_include_next=yes
7279 else
7280 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
7281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7282 /* end confdefs.h. */
7283 #include <conftest.h>
7284 _ACEOF
7285 if ac_fn_c_try_compile "$LINENO"; then :
7286 gl_cv_have_include_next=buggy
7287 else
7288 gl_cv_have_include_next=no
7289 fi
7290 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7291
7292 fi
7293 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7294 CPPFLAGS="$gl_save_CPPFLAGS"
7295 rm -rf conftestd1a conftestd1b conftestd2
7296
7297 fi
7298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
7299 $as_echo "$gl_cv_have_include_next" >&6; }
7300 PRAGMA_SYSTEM_HEADER=
7301 if test $gl_cv_have_include_next = yes; then
7302 INCLUDE_NEXT=include_next
7303 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
7304 if test -n "$GCC"; then
7305 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
7306 fi
7307 else
7308 if test $gl_cv_have_include_next = buggy; then
7309 INCLUDE_NEXT=include
7310 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
7311 else
7312 INCLUDE_NEXT=include
7313 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
7314 fi
7315 fi
7316
7317
7318
7319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
7320 $as_echo_n "checking whether system header files limit the line length... " >&6; }
7321 if ${gl_cv_pragma_columns+:} false; then :
7322 $as_echo_n "(cached) " >&6
7323 else
7324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7325 /* end confdefs.h. */
7326
7327 #ifdef __TANDEM
7328 choke me
7329 #endif
7330
7331 _ACEOF
7332 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7333 $EGREP "choke me" >/dev/null 2>&1; then :
7334 gl_cv_pragma_columns=yes
7335 else
7336 gl_cv_pragma_columns=no
7337 fi
7338 rm -f conftest*
7339
7340
7341 fi
7342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
7343 $as_echo "$gl_cv_pragma_columns" >&6; }
7344 if test $gl_cv_pragma_columns = yes; then
7345 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
7346 else
7347 PRAGMA_COLUMNS=
7348 fi
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358 :
7359
7360
7361
7362
7363
7364 if test $ac_cv_header_features_h = yes; then
7365 HAVE_FEATURES_H=1
7366 else
7367 HAVE_FEATURES_H=0
7368 fi
7369
7370
7371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
7372 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
7373 if test -z "$MKDIR_P"; then
7374 if ${ac_cv_path_mkdir+:} false; then :
7375 $as_echo_n "(cached) " >&6
7376 else
7377 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7378 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
7379 do
7380 IFS=$as_save_IFS
7381 test -z "$as_dir" && as_dir=.
7382 for ac_prog in mkdir gmkdir; do
7383 for ac_exec_ext in '' $ac_executable_extensions; do
7384 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
7385 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
7386 'mkdir (GNU coreutils) '* | \
7387 'mkdir (coreutils) '* | \
7388 'mkdir (fileutils) '4.1*)
7389 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
7390 break 3;;
7391 esac
7392 done
7393 done
7394 done
7395 IFS=$as_save_IFS
7396
7397 fi
7398
7399 test -d ./--version && rmdir ./--version
7400 if test "${ac_cv_path_mkdir+set}" = set; then
7401 MKDIR_P="$ac_cv_path_mkdir -p"
7402 else
7403 # As a last resort, use the slow shell script. Don't cache a
7404 # value for MKDIR_P within a source directory, because that will
7405 # break other packages using the cache if that directory is
7406 # removed, or if the value is a relative name.
7407 MKDIR_P="$ac_install_sh -d"
7408 fi
7409 fi
7410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
7411 $as_echo "$MKDIR_P" >&6; }
7412
7413
7414 GNULIB__EXIT=0;
7415 GNULIB_ATOLL=0;
7416 GNULIB_CALLOC_POSIX=0;
7417 GNULIB_CANONICALIZE_FILE_NAME=0;
7418 GNULIB_GETLOADAVG=0;
7419 GNULIB_GETSUBOPT=0;
7420 GNULIB_GRANTPT=0;
7421 GNULIB_MALLOC_POSIX=0;
7422 GNULIB_MBTOWC=0;
7423 GNULIB_MKDTEMP=0;
7424 GNULIB_MKOSTEMP=0;
7425 GNULIB_MKOSTEMPS=0;
7426 GNULIB_MKSTEMP=0;
7427 GNULIB_MKSTEMPS=0;
7428 GNULIB_POSIX_OPENPT=0;
7429 GNULIB_PTSNAME=0;
7430 GNULIB_PTSNAME_R=0;
7431 GNULIB_PUTENV=0;
7432 GNULIB_QSORT_R=0;
7433 GNULIB_RANDOM=0;
7434 GNULIB_RANDOM_R=0;
7435 GNULIB_REALLOC_POSIX=0;
7436 GNULIB_REALPATH=0;
7437 GNULIB_RPMATCH=0;
7438 GNULIB_SECURE_GETENV=0;
7439 GNULIB_SETENV=0;
7440 GNULIB_STRTOD=0;
7441 GNULIB_STRTOLL=0;
7442 GNULIB_STRTOULL=0;
7443 GNULIB_SYSTEM_POSIX=0;
7444 GNULIB_UNLOCKPT=0;
7445 GNULIB_UNSETENV=0;
7446 GNULIB_WCTOMB=0;
7447 HAVE__EXIT=1;
7448 HAVE_ATOLL=1;
7449 HAVE_CANONICALIZE_FILE_NAME=1;
7450 HAVE_DECL_GETLOADAVG=1;
7451 HAVE_GETSUBOPT=1;
7452 HAVE_GRANTPT=1;
7453 HAVE_MKDTEMP=1;
7454 HAVE_MKOSTEMP=1;
7455 HAVE_MKOSTEMPS=1;
7456 HAVE_MKSTEMP=1;
7457 HAVE_MKSTEMPS=1;
7458 HAVE_POSIX_OPENPT=1;
7459 HAVE_PTSNAME=1;
7460 HAVE_PTSNAME_R=1;
7461 HAVE_QSORT_R=1;
7462 HAVE_RANDOM=1;
7463 HAVE_RANDOM_H=1;
7464 HAVE_RANDOM_R=1;
7465 HAVE_REALPATH=1;
7466 HAVE_RPMATCH=1;
7467 HAVE_SECURE_GETENV=1;
7468 HAVE_SETENV=1;
7469 HAVE_DECL_SETENV=1;
7470 HAVE_STRTOD=1;
7471 HAVE_STRTOLL=1;
7472 HAVE_STRTOULL=1;
7473 HAVE_STRUCT_RANDOM_DATA=1;
7474 HAVE_SYS_LOADAVG_H=0;
7475 HAVE_UNLOCKPT=1;
7476 HAVE_DECL_UNSETENV=1;
7477 REPLACE_CALLOC=0;
7478 REPLACE_CANONICALIZE_FILE_NAME=0;
7479 REPLACE_MALLOC=0;
7480 REPLACE_MBTOWC=0;
7481 REPLACE_MKSTEMP=0;
7482 REPLACE_PTSNAME=0;
7483 REPLACE_PTSNAME_R=0;
7484 REPLACE_PUTENV=0;
7485 REPLACE_QSORT_R=0;
7486 REPLACE_RANDOM_R=0;
7487 REPLACE_REALLOC=0;
7488 REPLACE_REALPATH=0;
7489 REPLACE_SETENV=0;
7490 REPLACE_STRTOD=0;
7491 REPLACE_UNSETENV=0;
7492 REPLACE_WCTOMB=0;
7493
7494
7495
7496
7497
7498 for ac_func in $gl_func_list
7499 do :
7500 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7501 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7502 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7503 cat >>confdefs.h <<_ACEOF
7504 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7505 _ACEOF
7506
7507 fi
7508 done
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
7527 $as_echo_n "checking whether // is distinct from /... " >&6; }
7528 if ${gl_cv_double_slash_root+:} false; then :
7529 $as_echo_n "(cached) " >&6
7530 else
7531 if test x"$cross_compiling" = xyes ; then
7532 # When cross-compiling, there is no way to tell whether // is special
7533 # short of a list of hosts. However, the only known hosts to date
7534 # that have a distinct // are Apollo DomainOS (too old to port to),
7535 # Cygwin, and z/OS. If anyone knows of another system for which // has
7536 # special semantics and is distinct from /, please report it to
7537 # <bug-gnulib@gnu.org>.
7538 case $host in
7539 *-cygwin | i370-ibm-openedition)
7540 gl_cv_double_slash_root=yes ;;
7541 *)
7542 # Be optimistic and assume that / and // are the same when we
7543 # don't know.
7544 gl_cv_double_slash_root='unknown, assuming no' ;;
7545 esac
7546 else
7547 set x `ls -di / // 2>/dev/null`
7548 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
7549 gl_cv_double_slash_root=no
7550 else
7551 gl_cv_double_slash_root=yes
7552 fi
7553 fi
7554 fi
7555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
7556 $as_echo "$gl_cv_double_slash_root" >&6; }
7557 if test "$gl_cv_double_slash_root" = yes; then
7558
7559 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
7560
7561 fi
7562
7563
7564
7565
7566
7567
7568
7569
7570 :
7571
7572
7573
7574
7575
7576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
7577 $as_echo_n "checking whether realpath works... " >&6; }
7578 if ${gl_cv_func_realpath_works+:} false; then :
7579 $as_echo_n "(cached) " >&6
7580 else
7581
7582 touch conftest.a
7583 mkdir conftest.d
7584 if test "$cross_compiling" = yes; then :
7585 case "$host_os" in
7586 # Guess yes on glibc systems.
7587 *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
7588 # If we don't know, assume the worst.
7589 *) gl_cv_func_realpath_works="guessing no" ;;
7590 esac
7591
7592 else
7593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7594 /* end confdefs.h. */
7595
7596
7597
7598 #include <stdlib.h>
7599 #if defined __MACH__ && defined __APPLE__
7600 /* Avoid a crash on Mac OS X. */
7601 #include <mach/mach.h>
7602 #include <mach/mach_error.h>
7603 #include <mach/thread_status.h>
7604 #include <mach/exception.h>
7605 #include <mach/task.h>
7606 #include <pthread.h>
7607 /* The exception port on which our thread listens. */
7608 static mach_port_t our_exception_port;
7609 /* The main function of the thread listening for exceptions of type
7610 EXC_BAD_ACCESS. */
7611 static void *
7612 mach_exception_thread (void *arg)
7613 {
7614 /* Buffer for a message to be received. */
7615 struct {
7616 mach_msg_header_t head;
7617 mach_msg_body_t msgh_body;
7618 char data[1024];
7619 } msg;
7620 mach_msg_return_t retval;
7621 /* Wait for a message on the exception port. */
7622 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
7623 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
7624 if (retval != MACH_MSG_SUCCESS)
7625 abort ();
7626 exit (1);
7627 }
7628 static void
7629 nocrash_init (void)
7630 {
7631 mach_port_t self = mach_task_self ();
7632 /* Allocate a port on which the thread shall listen for exceptions. */
7633 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
7634 == KERN_SUCCESS) {
7635 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
7636 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
7637 MACH_MSG_TYPE_MAKE_SEND)
7638 == KERN_SUCCESS) {
7639 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
7640 for us. */
7641 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
7642 /* Create the thread listening on the exception port. */
7643 pthread_attr_t attr;
7644 pthread_t thread;
7645 if (pthread_attr_init (&attr) == 0
7646 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
7647 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
7648 pthread_attr_destroy (&attr);
7649 /* Replace the exception port info for these exceptions with our own.
7650 Note that we replace the exception port for the entire task, not only
7651 for a particular thread. This has the effect that when our exception
7652 port gets the message, the thread specific exception port has already
7653 been asked, and we don't need to bother about it.
7654 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
7655 task_set_exception_ports (self, mask, our_exception_port,
7656 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
7657 }
7658 }
7659 }
7660 }
7661 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
7662 /* Avoid a crash on native Windows. */
7663 #define WIN32_LEAN_AND_MEAN
7664 #include <windows.h>
7665 #include <winerror.h>
7666 static LONG WINAPI
7667 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
7668 {
7669 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
7670 {
7671 case EXCEPTION_ACCESS_VIOLATION:
7672 case EXCEPTION_IN_PAGE_ERROR:
7673 case EXCEPTION_STACK_OVERFLOW:
7674 case EXCEPTION_GUARD_PAGE:
7675 case EXCEPTION_PRIV_INSTRUCTION:
7676 case EXCEPTION_ILLEGAL_INSTRUCTION:
7677 case EXCEPTION_DATATYPE_MISALIGNMENT:
7678 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
7679 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
7680 exit (1);
7681 }
7682 return EXCEPTION_CONTINUE_SEARCH;
7683 }
7684 static void
7685 nocrash_init (void)
7686 {
7687 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
7688 }
7689 #else
7690 /* Avoid a crash on POSIX systems. */
7691 #include <signal.h>
7692 #include <unistd.h>
7693 /* A POSIX signal handler. */
7694 static void
7695 exception_handler (int sig)
7696 {
7697 _exit (1);
7698 }
7699 static void
7700 nocrash_init (void)
7701 {
7702 #ifdef SIGSEGV
7703 signal (SIGSEGV, exception_handler);
7704 #endif
7705 #ifdef SIGBUS
7706 signal (SIGBUS, exception_handler);
7707 #endif
7708 }
7709 #endif
7710
7711 #include <stdlib.h>
7712 #include <string.h>
7713
7714 int
7715 main ()
7716 {
7717
7718 int result = 0;
7719 {
7720 char *name = realpath ("conftest.a", NULL);
7721 if (!(name && *name == '/'))
7722 result |= 1;
7723 free (name);
7724 }
7725 {
7726 char *name = realpath ("conftest.b/../conftest.a", NULL);
7727 if (name != NULL)
7728 result |= 2;
7729 free (name);
7730 }
7731 {
7732 char *name = realpath ("conftest.a/", NULL);
7733 if (name != NULL)
7734 result |= 4;
7735 free (name);
7736 }
7737 {
7738 char *name1 = realpath (".", NULL);
7739 char *name2 = realpath ("conftest.d//./..", NULL);
7740 if (! name1 || ! name2 || strcmp (name1, name2))
7741 result |= 8;
7742 free (name1);
7743 free (name2);
7744 }
7745 return result;
7746
7747 ;
7748 return 0;
7749 }
7750
7751 _ACEOF
7752 if ac_fn_c_try_run "$LINENO"; then :
7753 gl_cv_func_realpath_works=yes
7754 else
7755 gl_cv_func_realpath_works=no
7756 fi
7757 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7758 conftest.$ac_objext conftest.beam conftest.$ac_ext
7759 fi
7760
7761 rm -rf conftest.a conftest.d
7762
7763 fi
7764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
7765 $as_echo "$gl_cv_func_realpath_works" >&6; }
7766 case "$gl_cv_func_realpath_works" in
7767 *yes)
7768
7769 $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
7770
7771 ;;
7772 esac
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782 :
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797 :
7798
7799
7800
7801
7802
7803
7804
7805 GNULIB_CHDIR=0;
7806 GNULIB_CHOWN=0;
7807 GNULIB_CLOSE=0;
7808 GNULIB_DUP=0;
7809 GNULIB_DUP2=0;
7810 GNULIB_DUP3=0;
7811 GNULIB_ENVIRON=0;
7812 GNULIB_EUIDACCESS=0;
7813 GNULIB_FACCESSAT=0;
7814 GNULIB_FCHDIR=0;
7815 GNULIB_FCHOWNAT=0;
7816 GNULIB_FDATASYNC=0;
7817 GNULIB_FSYNC=0;
7818 GNULIB_FTRUNCATE=0;
7819 GNULIB_GETCWD=0;
7820 GNULIB_GETDOMAINNAME=0;
7821 GNULIB_GETDTABLESIZE=0;
7822 GNULIB_GETGROUPS=0;
7823 GNULIB_GETHOSTNAME=0;
7824 GNULIB_GETLOGIN=0;
7825 GNULIB_GETLOGIN_R=0;
7826 GNULIB_GETPAGESIZE=0;
7827 GNULIB_GETUSERSHELL=0;
7828 GNULIB_GROUP_MEMBER=0;
7829 GNULIB_ISATTY=0;
7830 GNULIB_LCHOWN=0;
7831 GNULIB_LINK=0;
7832 GNULIB_LINKAT=0;
7833 GNULIB_LSEEK=0;
7834 GNULIB_PIPE=0;
7835 GNULIB_PIPE2=0;
7836 GNULIB_PREAD=0;
7837 GNULIB_PWRITE=0;
7838 GNULIB_READ=0;
7839 GNULIB_READLINK=0;
7840 GNULIB_READLINKAT=0;
7841 GNULIB_RMDIR=0;
7842 GNULIB_SETHOSTNAME=0;
7843 GNULIB_SLEEP=0;
7844 GNULIB_SYMLINK=0;
7845 GNULIB_SYMLINKAT=0;
7846 GNULIB_TTYNAME_R=0;
7847 GNULIB_UNISTD_H_NONBLOCKING=0;
7848 GNULIB_UNISTD_H_SIGPIPE=0;
7849 GNULIB_UNLINK=0;
7850 GNULIB_UNLINKAT=0;
7851 GNULIB_USLEEP=0;
7852 GNULIB_WRITE=0;
7853 HAVE_CHOWN=1;
7854 HAVE_DUP2=1;
7855 HAVE_DUP3=1;
7856 HAVE_EUIDACCESS=1;
7857 HAVE_FACCESSAT=1;
7858 HAVE_FCHDIR=1;
7859 HAVE_FCHOWNAT=1;
7860 HAVE_FDATASYNC=1;
7861 HAVE_FSYNC=1;
7862 HAVE_FTRUNCATE=1;
7863 HAVE_GETDTABLESIZE=1;
7864 HAVE_GETGROUPS=1;
7865 HAVE_GETHOSTNAME=1;
7866 HAVE_GETLOGIN=1;
7867 HAVE_GETPAGESIZE=1;
7868 HAVE_GROUP_MEMBER=1;
7869 HAVE_LCHOWN=1;
7870 HAVE_LINK=1;
7871 HAVE_LINKAT=1;
7872 HAVE_PIPE=1;
7873 HAVE_PIPE2=1;
7874 HAVE_PREAD=1;
7875 HAVE_PWRITE=1;
7876 HAVE_READLINK=1;
7877 HAVE_READLINKAT=1;
7878 HAVE_SETHOSTNAME=1;
7879 HAVE_SLEEP=1;
7880 HAVE_SYMLINK=1;
7881 HAVE_SYMLINKAT=1;
7882 HAVE_UNLINKAT=1;
7883 HAVE_USLEEP=1;
7884 HAVE_DECL_ENVIRON=1;
7885 HAVE_DECL_FCHDIR=1;
7886 HAVE_DECL_FDATASYNC=1;
7887 HAVE_DECL_GETDOMAINNAME=1;
7888 HAVE_DECL_GETLOGIN_R=1;
7889 HAVE_DECL_GETPAGESIZE=1;
7890 HAVE_DECL_GETUSERSHELL=1;
7891 HAVE_DECL_SETHOSTNAME=1;
7892 HAVE_DECL_TTYNAME_R=1;
7893 HAVE_OS_H=0;
7894 HAVE_SYS_PARAM_H=0;
7895 REPLACE_CHOWN=0;
7896 REPLACE_CLOSE=0;
7897 REPLACE_DUP=0;
7898 REPLACE_DUP2=0;
7899 REPLACE_FCHOWNAT=0;
7900 REPLACE_FTRUNCATE=0;
7901 REPLACE_GETCWD=0;
7902 REPLACE_GETDOMAINNAME=0;
7903 REPLACE_GETDTABLESIZE=0;
7904 REPLACE_GETLOGIN_R=0;
7905 REPLACE_GETGROUPS=0;
7906 REPLACE_GETPAGESIZE=0;
7907 REPLACE_ISATTY=0;
7908 REPLACE_LCHOWN=0;
7909 REPLACE_LINK=0;
7910 REPLACE_LINKAT=0;
7911 REPLACE_LSEEK=0;
7912 REPLACE_PREAD=0;
7913 REPLACE_PWRITE=0;
7914 REPLACE_READ=0;
7915 REPLACE_READLINK=0;
7916 REPLACE_READLINKAT=0;
7917 REPLACE_RMDIR=0;
7918 REPLACE_SLEEP=0;
7919 REPLACE_SYMLINK=0;
7920 REPLACE_SYMLINKAT=0;
7921 REPLACE_TTYNAME_R=0;
7922 REPLACE_UNLINK=0;
7923 REPLACE_UNLINKAT=0;
7924 REPLACE_USLEEP=0;
7925 REPLACE_WRITE=0;
7926 UNISTD_H_HAVE_WINSOCK2_H=0;
7927 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937 :
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954 :
7955
7956
7957
7958
7959
7960 if test $ac_cv_func__set_invalid_parameter_handler = yes; then
7961 HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
7962
7963 $as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
7964
7965 else
7966 HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
7967 fi
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981 GNULIB_OPENDIR=0;
7982 GNULIB_READDIR=0;
7983 GNULIB_REWINDDIR=0;
7984 GNULIB_CLOSEDIR=0;
7985 GNULIB_DIRFD=0;
7986 GNULIB_FDOPENDIR=0;
7987 GNULIB_SCANDIR=0;
7988 GNULIB_ALPHASORT=0;
7989 HAVE_OPENDIR=1;
7990 HAVE_READDIR=1;
7991 HAVE_REWINDDIR=1;
7992 HAVE_CLOSEDIR=1;
7993 HAVE_DECL_DIRFD=1;
7994 HAVE_DECL_FDOPENDIR=1;
7995 HAVE_FDOPENDIR=1;
7996 HAVE_SCANDIR=1;
7997 HAVE_ALPHASORT=1;
7998 REPLACE_OPENDIR=0;
7999 REPLACE_CLOSEDIR=0;
8000 REPLACE_DIRFD=0;
8001 REPLACE_FDOPENDIR=0;
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013 :
8014
8015
8016
8017
8018
8019
8020
8021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
8022 $as_echo_n "checking if environ is properly declared... " >&6; }
8023 if ${gt_cv_var_environ_declaration+:} false; then :
8024 $as_echo_n "(cached) " >&6
8025 else
8026
8027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8028 /* end confdefs.h. */
8029 #if HAVE_UNISTD_H
8030 #include <unistd.h>
8031 #endif
8032 /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
8033 #include <stdlib.h>
8034
8035 extern struct { int foo; } environ;
8036 int
8037 main ()
8038 {
8039 environ.foo = 1;
8040 ;
8041 return 0;
8042 }
8043 _ACEOF
8044 if ac_fn_c_try_compile "$LINENO"; then :
8045 gt_cv_var_environ_declaration=no
8046 else
8047 gt_cv_var_environ_declaration=yes
8048 fi
8049 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8050 fi
8051
8052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
8053 $as_echo "$gt_cv_var_environ_declaration" >&6; }
8054 if test $gt_cv_var_environ_declaration = yes; then
8055
8056 $as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
8057
8058 fi
8059
8060
8061 if test $gt_cv_var_environ_declaration != yes; then
8062 HAVE_DECL_ENVIRON=0
8063 fi
8064
8065
8066
8067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
8068 $as_echo_n "checking for complete errno.h... " >&6; }
8069 if ${gl_cv_header_errno_h_complete+:} false; then :
8070 $as_echo_n "(cached) " >&6
8071 else
8072
8073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8074 /* end confdefs.h. */
8075
8076 #include <errno.h>
8077 #if !defined ETXTBSY
8078 booboo
8079 #endif
8080 #if !defined ENOMSG
8081 booboo
8082 #endif
8083 #if !defined EIDRM
8084 booboo
8085 #endif
8086 #if !defined ENOLINK
8087 booboo
8088 #endif
8089 #if !defined EPROTO
8090 booboo
8091 #endif
8092 #if !defined EMULTIHOP
8093 booboo
8094 #endif
8095 #if !defined EBADMSG
8096 booboo
8097 #endif
8098 #if !defined EOVERFLOW
8099 booboo
8100 #endif
8101 #if !defined ENOTSUP
8102 booboo
8103 #endif
8104 #if !defined ENETRESET
8105 booboo
8106 #endif
8107 #if !defined ECONNABORTED
8108 booboo
8109 #endif
8110 #if !defined ESTALE
8111 booboo
8112 #endif
8113 #if !defined EDQUOT
8114 booboo
8115 #endif
8116 #if !defined ECANCELED
8117 booboo
8118 #endif
8119 #if !defined EOWNERDEAD
8120 booboo
8121 #endif
8122 #if !defined ENOTRECOVERABLE
8123 booboo
8124 #endif
8125 #if !defined EILSEQ
8126 booboo
8127 #endif
8128
8129 _ACEOF
8130 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8131 $EGREP "booboo" >/dev/null 2>&1; then :
8132 gl_cv_header_errno_h_complete=no
8133 else
8134 gl_cv_header_errno_h_complete=yes
8135 fi
8136 rm -f conftest*
8137
8138
8139 fi
8140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
8141 $as_echo "$gl_cv_header_errno_h_complete" >&6; }
8142 if test $gl_cv_header_errno_h_complete = yes; then
8143 ERRNO_H=''
8144 else
8145
8146
8147
8148
8149
8150
8151
8152
8153 if test $gl_cv_have_include_next = yes; then
8154 gl_cv_next_errno_h='<'errno.h'>'
8155 else
8156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
8157 $as_echo_n "checking absolute name of <errno.h>... " >&6; }
8158 if ${gl_cv_next_errno_h+:} false; then :
8159 $as_echo_n "(cached) " >&6
8160 else
8161
8162
8163
8164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8165 /* end confdefs.h. */
8166 #include <errno.h>
8167 _ACEOF
8168 case "$host_os" in
8169 aix*) gl_absname_cpp="$ac_cpp -C" ;;
8170 *) gl_absname_cpp="$ac_cpp" ;;
8171 esac
8172
8173 case "$host_os" in
8174 mingw*)
8175 gl_dirsep_regex='[/\\]'
8176 ;;
8177 *)
8178 gl_dirsep_regex='\/'
8179 ;;
8180 esac
8181 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
8182 gl_header_literal_regex=`echo 'errno.h' \
8183 | sed -e "$gl_make_literal_regex_sed"`
8184 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
8185 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
8186 s|^/[^/]|//&|
8187 p
8188 q
8189 }'
8190
8191 gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
8192 sed -n "$gl_absolute_header_sed"`
8193
8194 gl_header=$gl_cv_absolute_errno_h
8195 gl_cv_next_errno_h='"'$gl_header'"'
8196
8197
8198 fi
8199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
8200 $as_echo "$gl_cv_next_errno_h" >&6; }
8201 fi
8202 NEXT_ERRNO_H=$gl_cv_next_errno_h
8203
8204 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
8205 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
8206 gl_next_as_first_directive='<'errno.h'>'
8207 else
8208 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
8209 gl_next_as_first_directive=$gl_cv_next_errno_h
8210 fi
8211 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
8212
8213
8214
8215
8216 ERRNO_H='errno.h'
8217 fi
8218
8219 if test -n "$ERRNO_H"; then
8220 GL_GENERATE_ERRNO_H_TRUE=
8221 GL_GENERATE_ERRNO_H_FALSE='#'
8222 else
8223 GL_GENERATE_ERRNO_H_TRUE='#'
8224 GL_GENERATE_ERRNO_H_FALSE=
8225 fi
8226
8227
8228 if test -n "$ERRNO_H"; then
8229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
8230 $as_echo_n "checking for EMULTIHOP value... " >&6; }
8231 if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then :
8232 $as_echo_n "(cached) " >&6
8233 else
8234
8235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8236 /* end confdefs.h. */
8237
8238 #include <errno.h>
8239 #ifdef EMULTIHOP
8240 yes
8241 #endif
8242
8243 _ACEOF
8244 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8245 $EGREP "yes" >/dev/null 2>&1; then :
8246 gl_cv_header_errno_h_EMULTIHOP=yes
8247 else
8248 gl_cv_header_errno_h_EMULTIHOP=no
8249 fi
8250 rm -f conftest*
8251
8252 if test $gl_cv_header_errno_h_EMULTIHOP = no; then
8253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8254 /* end confdefs.h. */
8255
8256 #define _XOPEN_SOURCE_EXTENDED 1
8257 #include <errno.h>
8258 #ifdef EMULTIHOP
8259 yes
8260 #endif
8261
8262 _ACEOF
8263 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8264 $EGREP "yes" >/dev/null 2>&1; then :
8265 gl_cv_header_errno_h_EMULTIHOP=hidden
8266 fi
8267 rm -f conftest*
8268
8269 if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
8270 if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
8271 #define _XOPEN_SOURCE_EXTENDED 1
8272 #include <errno.h>
8273 /* The following two lines are a workaround against an autoconf-2.52 bug. */
8274 #include <stdio.h>
8275 #include <stdlib.h>
8276 "; then :
8277
8278 fi
8279
8280 fi
8281 fi
8282
8283 fi
8284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
8285 $as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
8286 case $gl_cv_header_errno_h_EMULTIHOP in
8287 yes | no)
8288 EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
8289 ;;
8290 *)
8291 EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
8292 ;;
8293 esac
8294
8295
8296 fi
8297
8298
8299 if test -n "$ERRNO_H"; then
8300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
8301 $as_echo_n "checking for ENOLINK value... " >&6; }
8302 if ${gl_cv_header_errno_h_ENOLINK+:} false; then :
8303 $as_echo_n "(cached) " >&6
8304 else
8305
8306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8307 /* end confdefs.h. */
8308
8309 #include <errno.h>
8310 #ifdef ENOLINK
8311 yes
8312 #endif
8313
8314 _ACEOF
8315 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8316 $EGREP "yes" >/dev/null 2>&1; then :
8317 gl_cv_header_errno_h_ENOLINK=yes
8318 else
8319 gl_cv_header_errno_h_ENOLINK=no
8320 fi
8321 rm -f conftest*
8322
8323 if test $gl_cv_header_errno_h_ENOLINK = no; then
8324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8325 /* end confdefs.h. */
8326
8327 #define _XOPEN_SOURCE_EXTENDED 1
8328 #include <errno.h>
8329 #ifdef ENOLINK
8330 yes
8331 #endif
8332
8333 _ACEOF
8334 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8335 $EGREP "yes" >/dev/null 2>&1; then :
8336 gl_cv_header_errno_h_ENOLINK=hidden
8337 fi
8338 rm -f conftest*
8339
8340 if test $gl_cv_header_errno_h_ENOLINK = hidden; then
8341 if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
8342 #define _XOPEN_SOURCE_EXTENDED 1
8343 #include <errno.h>
8344 /* The following two lines are a workaround against an autoconf-2.52 bug. */
8345 #include <stdio.h>
8346 #include <stdlib.h>
8347 "; then :
8348
8349 fi
8350
8351 fi
8352 fi
8353
8354 fi
8355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
8356 $as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
8357 case $gl_cv_header_errno_h_ENOLINK in
8358 yes | no)
8359 ENOLINK_HIDDEN=0; ENOLINK_VALUE=
8360 ;;
8361 *)
8362 ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
8363 ;;
8364 esac
8365
8366
8367 fi
8368
8369
8370 if test -n "$ERRNO_H"; then
8371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
8372 $as_echo_n "checking for EOVERFLOW value... " >&6; }
8373 if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then :
8374 $as_echo_n "(cached) " >&6
8375 else
8376
8377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8378 /* end confdefs.h. */
8379
8380 #include <errno.h>
8381 #ifdef EOVERFLOW
8382 yes
8383 #endif
8384
8385 _ACEOF
8386 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8387 $EGREP "yes" >/dev/null 2>&1; then :
8388 gl_cv_header_errno_h_EOVERFLOW=yes
8389 else
8390 gl_cv_header_errno_h_EOVERFLOW=no
8391 fi
8392 rm -f conftest*
8393
8394 if test $gl_cv_header_errno_h_EOVERFLOW = no; then
8395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8396 /* end confdefs.h. */
8397
8398 #define _XOPEN_SOURCE_EXTENDED 1
8399 #include <errno.h>
8400 #ifdef EOVERFLOW
8401 yes
8402 #endif
8403
8404 _ACEOF
8405 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8406 $EGREP "yes" >/dev/null 2>&1; then :
8407 gl_cv_header_errno_h_EOVERFLOW=hidden
8408 fi
8409 rm -f conftest*
8410
8411 if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
8412 if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
8413 #define _XOPEN_SOURCE_EXTENDED 1
8414 #include <errno.h>
8415 /* The following two lines are a workaround against an autoconf-2.52 bug. */
8416 #include <stdio.h>
8417 #include <stdlib.h>
8418 "; then :
8419
8420 fi
8421
8422 fi
8423 fi
8424
8425 fi
8426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
8427 $as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
8428 case $gl_cv_header_errno_h_EOVERFLOW in
8429 yes | no)
8430 EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
8431 ;;
8432 *)
8433 EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
8434 ;;
8435 esac
8436
8437
8438 fi
8439
8440
8441
8442
8443 $as_echo "#define HAVE_DECL_STRERROR_R 1" >>confdefs.h
8444
8445
8446 $as_echo "#define HAVE_STRERROR_R 1" >>confdefs.h
8447
8448
8449 $as_echo "#define STRERROR_R_CHAR_P 0" >>confdefs.h
8450
8451
8452
8453 XGETTEXT_EXTRA_OPTIONS=
8454
8455
8456
8457
8458
8459 ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default"
8460 if test "x$ac_cv_have_decl_fchdir" = xyes; then :
8461 ac_have_decl=1
8462 else
8463 ac_have_decl=0
8464 fi
8465
8466 cat >>confdefs.h <<_ACEOF
8467 #define HAVE_DECL_FCHDIR $ac_have_decl
8468 _ACEOF
8469
8470
8471
8472 GNULIB_FCNTL=0;
8473 GNULIB_NONBLOCKING=0;
8474 GNULIB_OPEN=0;
8475 GNULIB_OPENAT=0;
8476 HAVE_FCNTL=1;
8477 HAVE_OPENAT=1;
8478 REPLACE_FCNTL=0;
8479 REPLACE_OPEN=0;
8480 REPLACE_OPENAT=0;
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496 :
8497
8498
8499
8500
8501
8502
8503 :
8504
8505
8506
8507
8508
8509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
8510 $as_echo_n "checking for working fcntl.h... " >&6; }
8511 if ${gl_cv_header_working_fcntl_h+:} false; then :
8512 $as_echo_n "(cached) " >&6
8513 else
8514 if test "$cross_compiling" = yes; then :
8515 gl_cv_header_working_fcntl_h=cross-compiling
8516 else
8517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8518 /* end confdefs.h. */
8519 #include <sys/types.h>
8520 #include <sys/stat.h>
8521 #if HAVE_UNISTD_H
8522 # include <unistd.h>
8523 #else /* on Windows with MSVC */
8524 # include <io.h>
8525 # include <stdlib.h>
8526 # defined sleep(n) _sleep ((n) * 1000)
8527 #endif
8528 #include <fcntl.h>
8529 #ifndef O_NOATIME
8530 #define O_NOATIME 0
8531 #endif
8532 #ifndef O_NOFOLLOW
8533 #define O_NOFOLLOW 0
8534 #endif
8535 static int const constants[] =
8536 {
8537 O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
8538 O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
8539 };
8540
8541 int
8542 main ()
8543 {
8544
8545 int result = !constants;
8546 #if HAVE_SYMLINK
8547 {
8548 static char const sym[] = "conftest.sym";
8549 if (symlink ("/dev/null", sym) != 0)
8550 result |= 2;
8551 else
8552 {
8553 int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
8554 if (fd >= 0)
8555 {
8556 close (fd);
8557 result |= 4;
8558 }
8559 }
8560 if (unlink (sym) != 0 || symlink (".", sym) != 0)
8561 result |= 2;
8562 else
8563 {
8564 int fd = open (sym, O_RDONLY | O_NOFOLLOW);
8565 if (fd >= 0)
8566 {
8567 close (fd);
8568 result |= 4;
8569 }
8570 }
8571 unlink (sym);
8572 }
8573 #endif
8574 {
8575 static char const file[] = "confdefs.h";
8576 int fd = open (file, O_RDONLY | O_NOATIME);
8577 if (fd < 0)
8578 result |= 8;
8579 else
8580 {
8581 struct stat st0;
8582 if (fstat (fd, &st0) != 0)
8583 result |= 16;
8584 else
8585 {
8586 char c;
8587 sleep (1);
8588 if (read (fd, &c, 1) != 1)
8589 result |= 24;
8590 else
8591 {
8592 if (close (fd) != 0)
8593 result |= 32;
8594 else
8595 {
8596 struct stat st1;
8597 if (stat (file, &st1) != 0)
8598 result |= 40;
8599 else
8600 if (st0.st_atime != st1.st_atime)
8601 result |= 64;
8602 }
8603 }
8604 }
8605 }
8606 }
8607 return result;
8608 ;
8609 return 0;
8610 }
8611 _ACEOF
8612 if ac_fn_c_try_run "$LINENO"; then :
8613 gl_cv_header_working_fcntl_h=yes
8614 else
8615 case $? in #(
8616 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
8617 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
8618 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
8619 *) gl_cv_header_working_fcntl_h='no';;
8620 esac
8621 fi
8622 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8623 conftest.$ac_objext conftest.beam conftest.$ac_ext
8624 fi
8625
8626 fi
8627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
8628 $as_echo "$gl_cv_header_working_fcntl_h" >&6; }
8629
8630 case $gl_cv_header_working_fcntl_h in #(
8631 *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
8632 *) ac_val=1;;
8633 esac
8634
8635 cat >>confdefs.h <<_ACEOF
8636 #define HAVE_WORKING_O_NOATIME $ac_val
8637 _ACEOF
8638
8639
8640 case $gl_cv_header_working_fcntl_h in #(
8641 *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
8642 *) ac_val=1;;
8643 esac
8644
8645 cat >>confdefs.h <<_ACEOF
8646 #define HAVE_WORKING_O_NOFOLLOW $ac_val
8647 _ACEOF
8648
8649
8650 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
8651 if test "x$ac_cv_type_pid_t" = xyes; then :
8652
8653 else
8654
8655 cat >>confdefs.h <<_ACEOF
8656 #define pid_t int
8657 _ACEOF
8658
8659 fi
8660
8661 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
8662 if test "x$ac_cv_type_mode_t" = xyes; then :
8663
8664 else
8665
8666 cat >>confdefs.h <<_ACEOF
8667 #define mode_t int
8668 _ACEOF
8669
8670 fi
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
8685 $as_echo_n "checking for mbstate_t... " >&6; }
8686 if ${ac_cv_type_mbstate_t+:} false; then :
8687 $as_echo_n "(cached) " >&6
8688 else
8689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690 /* end confdefs.h. */
8691 $ac_includes_default
8692 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
8693 <wchar.h>.
8694 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8695 included before <wchar.h>. */
8696 #include <stddef.h>
8697 #include <stdio.h>
8698 #include <time.h>
8699 #include <wchar.h>
8700 int
8701 main ()
8702 {
8703 mbstate_t x; return sizeof x;
8704 ;
8705 return 0;
8706 }
8707 _ACEOF
8708 if ac_fn_c_try_compile "$LINENO"; then :
8709 ac_cv_type_mbstate_t=yes
8710 else
8711 ac_cv_type_mbstate_t=no
8712 fi
8713 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8714 fi
8715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
8716 $as_echo "$ac_cv_type_mbstate_t" >&6; }
8717 if test $ac_cv_type_mbstate_t = yes; then
8718
8719 $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
8720
8721 else
8722
8723 $as_echo "#define mbstate_t int" >>confdefs.h
8724
8725 fi
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768 GNULIB_ACOSF=0;
8769 GNULIB_ACOSL=0;
8770 GNULIB_ASINF=0;
8771 GNULIB_ASINL=0;
8772 GNULIB_ATANF=0;
8773 GNULIB_ATANL=0;
8774 GNULIB_ATAN2F=0;
8775 GNULIB_CBRT=0;
8776 GNULIB_CBRTF=0;
8777 GNULIB_CBRTL=0;
8778 GNULIB_CEIL=0;
8779 GNULIB_CEILF=0;
8780 GNULIB_CEILL=0;
8781 GNULIB_COPYSIGN=0;
8782 GNULIB_COPYSIGNF=0;
8783 GNULIB_COPYSIGNL=0;
8784 GNULIB_COSF=0;
8785 GNULIB_COSL=0;
8786 GNULIB_COSHF=0;
8787 GNULIB_EXPF=0;
8788 GNULIB_EXPL=0;
8789 GNULIB_EXP2=0;
8790 GNULIB_EXP2F=0;
8791 GNULIB_EXP2L=0;
8792 GNULIB_EXPM1=0;
8793 GNULIB_EXPM1F=0;
8794 GNULIB_EXPM1L=0;
8795 GNULIB_FABSF=0;
8796 GNULIB_FABSL=0;
8797 GNULIB_FLOOR=0;
8798 GNULIB_FLOORF=0;
8799 GNULIB_FLOORL=0;
8800 GNULIB_FMA=0;
8801 GNULIB_FMAF=0;
8802 GNULIB_FMAL=0;
8803 GNULIB_FMOD=0;
8804 GNULIB_FMODF=0;
8805 GNULIB_FMODL=0;
8806 GNULIB_FREXPF=0;
8807 GNULIB_FREXP=0;
8808 GNULIB_FREXPL=0;
8809 GNULIB_HYPOT=0;
8810 GNULIB_HYPOTF=0;
8811 GNULIB_HYPOTL=0;
8812 GNULIB_ILOGB=0;
8813 GNULIB_ILOGBF=0;
8814 GNULIB_ILOGBL=0;
8815 GNULIB_ISFINITE=0;
8816 GNULIB_ISINF=0;
8817 GNULIB_ISNAN=0;
8818 GNULIB_ISNANF=0;
8819 GNULIB_ISNAND=0;
8820 GNULIB_ISNANL=0;
8821 GNULIB_LDEXPF=0;
8822 GNULIB_LDEXPL=0;
8823 GNULIB_LOG=0;
8824 GNULIB_LOGF=0;
8825 GNULIB_LOGL=0;
8826 GNULIB_LOG10=0;
8827 GNULIB_LOG10F=0;
8828 GNULIB_LOG10L=0;
8829 GNULIB_LOG1P=0;
8830 GNULIB_LOG1PF=0;
8831 GNULIB_LOG1PL=0;
8832 GNULIB_LOG2=0;
8833 GNULIB_LOG2F=0;
8834 GNULIB_LOG2L=0;
8835 GNULIB_LOGB=0;
8836 GNULIB_LOGBF=0;
8837 GNULIB_LOGBL=0;
8838 GNULIB_MODF=0;
8839 GNULIB_MODFF=0;
8840 GNULIB_MODFL=0;
8841 GNULIB_POWF=0;
8842 GNULIB_REMAINDER=0;
8843 GNULIB_REMAINDERF=0;
8844 GNULIB_REMAINDERL=0;
8845 GNULIB_RINT=0;
8846 GNULIB_RINTF=0;
8847 GNULIB_RINTL=0;
8848 GNULIB_ROUND=0;
8849 GNULIB_ROUNDF=0;
8850 GNULIB_ROUNDL=0;
8851 GNULIB_SIGNBIT=0;
8852 GNULIB_SINF=0;
8853 GNULIB_SINL=0;
8854 GNULIB_SINHF=0;
8855 GNULIB_SQRTF=0;
8856 GNULIB_SQRTL=0;
8857 GNULIB_TANF=0;
8858 GNULIB_TANL=0;
8859 GNULIB_TANHF=0;
8860 GNULIB_TRUNC=0;
8861 GNULIB_TRUNCF=0;
8862 GNULIB_TRUNCL=0;
8863 HAVE_ACOSF=1;
8864 HAVE_ACOSL=1;
8865 HAVE_ASINF=1;
8866 HAVE_ASINL=1;
8867 HAVE_ATANF=1;
8868 HAVE_ATANL=1;
8869 HAVE_ATAN2F=1;
8870 HAVE_CBRT=1;
8871 HAVE_CBRTF=1;
8872 HAVE_CBRTL=1;
8873 HAVE_COPYSIGN=1;
8874 HAVE_COPYSIGNL=1;
8875 HAVE_COSF=1;
8876 HAVE_COSL=1;
8877 HAVE_COSHF=1;
8878 HAVE_EXPF=1;
8879 HAVE_EXPL=1;
8880 HAVE_EXPM1=1;
8881 HAVE_EXPM1F=1;
8882 HAVE_FABSF=1;
8883 HAVE_FABSL=1;
8884 HAVE_FMA=1;
8885 HAVE_FMAF=1;
8886 HAVE_FMAL=1;
8887 HAVE_FMODF=1;
8888 HAVE_FMODL=1;
8889 HAVE_FREXPF=1;
8890 HAVE_HYPOTF=1;
8891 HAVE_HYPOTL=1;
8892 HAVE_ILOGB=1;
8893 HAVE_ILOGBF=1;
8894 HAVE_ILOGBL=1;
8895 HAVE_ISNANF=1;
8896 HAVE_ISNAND=1;
8897 HAVE_ISNANL=1;
8898 HAVE_LDEXPF=1;
8899 HAVE_LOGF=1;
8900 HAVE_LOGL=1;
8901 HAVE_LOG10F=1;
8902 HAVE_LOG10L=1;
8903 HAVE_LOG1P=1;
8904 HAVE_LOG1PF=1;
8905 HAVE_LOG1PL=1;
8906 HAVE_LOGBF=1;
8907 HAVE_LOGBL=1;
8908 HAVE_MODFF=1;
8909 HAVE_MODFL=1;
8910 HAVE_POWF=1;
8911 HAVE_REMAINDER=1;
8912 HAVE_REMAINDERF=1;
8913 HAVE_RINT=1;
8914 HAVE_RINTL=1;
8915 HAVE_SINF=1;
8916 HAVE_SINL=1;
8917 HAVE_SINHF=1;
8918 HAVE_SQRTF=1;
8919 HAVE_SQRTL=1;
8920 HAVE_TANF=1;
8921 HAVE_TANL=1;
8922 HAVE_TANHF=1;
8923 HAVE_DECL_ACOSL=1;
8924 HAVE_DECL_ASINL=1;
8925 HAVE_DECL_ATANL=1;
8926 HAVE_DECL_CBRTF=1;
8927 HAVE_DECL_CBRTL=1;
8928 HAVE_DECL_CEILF=1;
8929 HAVE_DECL_CEILL=1;
8930 HAVE_DECL_COPYSIGNF=1;
8931 HAVE_DECL_COSL=1;
8932 HAVE_DECL_EXPL=1;
8933 HAVE_DECL_EXP2=1;
8934 HAVE_DECL_EXP2F=1;
8935 HAVE_DECL_EXP2L=1;
8936 HAVE_DECL_EXPM1L=1;
8937 HAVE_DECL_FLOORF=1;
8938 HAVE_DECL_FLOORL=1;
8939 HAVE_DECL_FREXPL=1;
8940 HAVE_DECL_LDEXPL=1;
8941 HAVE_DECL_LOGL=1;
8942 HAVE_DECL_LOG10L=1;
8943 HAVE_DECL_LOG2=1;
8944 HAVE_DECL_LOG2F=1;
8945 HAVE_DECL_LOG2L=1;
8946 HAVE_DECL_LOGB=1;
8947 HAVE_DECL_REMAINDER=1;
8948 HAVE_DECL_REMAINDERL=1;
8949 HAVE_DECL_RINTF=1;
8950 HAVE_DECL_ROUND=1;
8951 HAVE_DECL_ROUNDF=1;
8952 HAVE_DECL_ROUNDL=1;
8953 HAVE_DECL_SINL=1;
8954 HAVE_DECL_SQRTL=1;
8955 HAVE_DECL_TANL=1;
8956 HAVE_DECL_TRUNC=1;
8957 HAVE_DECL_TRUNCF=1;
8958 HAVE_DECL_TRUNCL=1;
8959 REPLACE_CBRTF=0;
8960 REPLACE_CBRTL=0;
8961 REPLACE_CEIL=0;
8962 REPLACE_CEILF=0;
8963 REPLACE_CEILL=0;
8964 REPLACE_EXPM1=0;
8965 REPLACE_EXPM1F=0;
8966 REPLACE_EXP2=0;
8967 REPLACE_EXP2L=0;
8968 REPLACE_FABSL=0;
8969 REPLACE_FLOOR=0;
8970 REPLACE_FLOORF=0;
8971 REPLACE_FLOORL=0;
8972 REPLACE_FMA=0;
8973 REPLACE_FMAF=0;
8974 REPLACE_FMAL=0;
8975 REPLACE_FMOD=0;
8976 REPLACE_FMODF=0;
8977 REPLACE_FMODL=0;
8978 REPLACE_FREXPF=0;
8979 REPLACE_FREXP=0;
8980 REPLACE_FREXPL=0;
8981 REPLACE_HUGE_VAL=0;
8982 REPLACE_HYPOT=0;
8983 REPLACE_HYPOTF=0;
8984 REPLACE_HYPOTL=0;
8985 REPLACE_ILOGB=0;
8986 REPLACE_ILOGBF=0;
8987 REPLACE_ISFINITE=0;
8988 REPLACE_ISINF=0;
8989 REPLACE_ISNAN=0;
8990 REPLACE_LDEXPL=0;
8991 REPLACE_LOG=0;
8992 REPLACE_LOGF=0;
8993 REPLACE_LOGL=0;
8994 REPLACE_LOG10=0;
8995 REPLACE_LOG10F=0;
8996 REPLACE_LOG10L=0;
8997 REPLACE_LOG1P=0;
8998 REPLACE_LOG1PF=0;
8999 REPLACE_LOG1PL=0;
9000 REPLACE_LOG2=0;
9001 REPLACE_LOG2F=0;
9002 REPLACE_LOG2L=0;
9003 REPLACE_LOGB=0;
9004 REPLACE_LOGBF=0;
9005 REPLACE_LOGBL=0;
9006 REPLACE_MODF=0;
9007 REPLACE_MODFF=0;
9008 REPLACE_MODFL=0;
9009 REPLACE_NAN=0;
9010 REPLACE_REMAINDER=0;
9011 REPLACE_REMAINDERF=0;
9012 REPLACE_REMAINDERL=0;
9013 REPLACE_ROUND=0;
9014 REPLACE_ROUNDF=0;
9015 REPLACE_ROUNDL=0;
9016 REPLACE_SIGNBIT=0;
9017 REPLACE_SIGNBIT_USING_GCC=0;
9018 REPLACE_SQRTL=0;
9019 REPLACE_TRUNC=0;
9020 REPLACE_TRUNCF=0;
9021 REPLACE_TRUNCL=0;
9022
9023
9024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5
9025 $as_echo_n "checking whether frexp() can be used without linking with libm... " >&6; }
9026 if ${gl_cv_func_frexp_no_libm+:} false; then :
9027 $as_echo_n "(cached) " >&6
9028 else
9029
9030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9031 /* end confdefs.h. */
9032 #include <math.h>
9033 double x;
9034 int
9035 main ()
9036 {
9037 int e; return frexp (x, &e) > 0;
9038 ;
9039 return 0;
9040 }
9041 _ACEOF
9042 if ac_fn_c_try_link "$LINENO"; then :
9043 gl_cv_func_frexp_no_libm=yes
9044 else
9045 gl_cv_func_frexp_no_libm=no
9046 fi
9047 rm -f core conftest.err conftest.$ac_objext \
9048 conftest$ac_exeext conftest.$ac_ext
9049
9050 fi
9051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
9052 $as_echo "$gl_cv_func_frexp_no_libm" >&6; }
9053
9054
9055 ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
9056 if test "x$ac_cv_have_decl_alarm" = xyes; then :
9057 ac_have_decl=1
9058 else
9059 ac_have_decl=0
9060 fi
9061
9062 cat >>confdefs.h <<_ACEOF
9063 #define HAVE_DECL_ALARM $ac_have_decl
9064 _ACEOF
9065
9066
9067
9068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5
9069 $as_echo_n "checking whether long double and double are the same... " >&6; }
9070 if ${gl_cv_long_double_equals_double+:} false; then :
9071 $as_echo_n "(cached) " >&6
9072 else
9073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9074 /* end confdefs.h. */
9075 #include <float.h>
9076 int
9077 main ()
9078 {
9079 typedef int check[sizeof (long double) == sizeof (double)
9080 && LDBL_MANT_DIG == DBL_MANT_DIG
9081 && LDBL_MAX_EXP == DBL_MAX_EXP
9082 && LDBL_MIN_EXP == DBL_MIN_EXP
9083 ? 1 : -1];
9084
9085 ;
9086 return 0;
9087 }
9088 _ACEOF
9089 if ac_fn_c_try_compile "$LINENO"; then :
9090 gl_cv_long_double_equals_double=yes
9091 else
9092 gl_cv_long_double_equals_double=no
9093 fi
9094 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9095
9096 fi
9097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_long_double_equals_double" >&5
9098 $as_echo "$gl_cv_long_double_equals_double" >&6; }
9099 if test $gl_cv_long_double_equals_double = yes; then
9100
9101 $as_echo "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h
9102
9103 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1
9104 else
9105 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0
9106 fi
9107
9108
9109
9110 GNULIB_FCHMODAT=0;
9111 GNULIB_FSTAT=0;
9112 GNULIB_FSTATAT=0;
9113 GNULIB_FUTIMENS=0;
9114 GNULIB_LCHMOD=0;
9115 GNULIB_LSTAT=0;
9116 GNULIB_MKDIRAT=0;
9117 GNULIB_MKFIFO=0;
9118 GNULIB_MKFIFOAT=0;
9119 GNULIB_MKNOD=0;
9120 GNULIB_MKNODAT=0;
9121 GNULIB_STAT=0;
9122 GNULIB_UTIMENSAT=0;
9123 HAVE_FCHMODAT=1;
9124 HAVE_FSTATAT=1;
9125 HAVE_FUTIMENS=1;
9126 HAVE_LCHMOD=1;
9127 HAVE_LSTAT=1;
9128 HAVE_MKDIRAT=1;
9129 HAVE_MKFIFO=1;
9130 HAVE_MKFIFOAT=1;
9131 HAVE_MKNOD=1;
9132 HAVE_MKNODAT=1;
9133 HAVE_UTIMENSAT=1;
9134 REPLACE_FSTAT=0;
9135 REPLACE_FSTATAT=0;
9136 REPLACE_FUTIMENS=0;
9137 REPLACE_LSTAT=0;
9138 REPLACE_MKDIR=0;
9139 REPLACE_MKFIFO=0;
9140 REPLACE_MKNOD=0;
9141 REPLACE_STAT=0;
9142 REPLACE_UTIMENSAT=0;
9143
9144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
9145 $as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
9146 if ${ac_cv_header_stat_broken+:} false; then :
9147 $as_echo_n "(cached) " >&6
9148 else
9149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9150 /* end confdefs.h. */
9151 #include <sys/types.h>
9152 #include <sys/stat.h>
9153
9154 #if defined S_ISBLK && defined S_IFDIR
9155 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
9156 #endif
9157
9158 #if defined S_ISBLK && defined S_IFCHR
9159 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
9160 #endif
9161
9162 #if defined S_ISLNK && defined S_IFREG
9163 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
9164 #endif
9165
9166 #if defined S_ISSOCK && defined S_IFREG
9167 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
9168 #endif
9169
9170 _ACEOF
9171 if ac_fn_c_try_compile "$LINENO"; then :
9172 ac_cv_header_stat_broken=no
9173 else
9174 ac_cv_header_stat_broken=yes
9175 fi
9176 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9177 fi
9178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
9179 $as_echo "$ac_cv_header_stat_broken" >&6; }
9180 if test $ac_cv_header_stat_broken = yes; then
9181
9182 $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
9183
9184 fi
9185
9186
9187
9188
9189
9190
9191
9192
9193 case "$host_os" in
9194 mingw*)
9195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
9196 $as_echo_n "checking for 64-bit off_t... " >&6; }
9197 if ${gl_cv_type_off_t_64+:} false; then :
9198 $as_echo_n "(cached) " >&6
9199 else
9200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9201 /* end confdefs.h. */
9202 #include <sys/types.h>
9203 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
9204
9205 int
9206 main ()
9207 {
9208
9209 ;
9210 return 0;
9211 }
9212 _ACEOF
9213 if ac_fn_c_try_compile "$LINENO"; then :
9214 gl_cv_type_off_t_64=yes
9215 else
9216 gl_cv_type_off_t_64=no
9217 fi
9218 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9219
9220 fi
9221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
9222 $as_echo "$gl_cv_type_off_t_64" >&6; }
9223 if test $gl_cv_type_off_t_64 = no; then
9224 WINDOWS_64_BIT_OFF_T=1
9225 else
9226 WINDOWS_64_BIT_OFF_T=0
9227 fi
9228 WINDOWS_64_BIT_ST_SIZE=1
9229 ;;
9230 *)
9231 WINDOWS_64_BIT_OFF_T=0
9232 WINDOWS_64_BIT_ST_SIZE=0
9233 ;;
9234 esac
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244
9245
9246
9247 :
9248
9249
9250
9251
9252
9253
9254
9255
9256 if test $gl_cv_have_include_next = yes; then
9257 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
9258 else
9259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
9260 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
9261 if ${gl_cv_next_sys_stat_h+:} false; then :
9262 $as_echo_n "(cached) " >&6
9263 else
9264
9265 if test $ac_cv_header_sys_stat_h = yes; then
9266
9267
9268
9269
9270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9271 /* end confdefs.h. */
9272 #include <sys/stat.h>
9273 _ACEOF
9274 case "$host_os" in
9275 aix*) gl_absname_cpp="$ac_cpp -C" ;;
9276 *) gl_absname_cpp="$ac_cpp" ;;
9277 esac
9278
9279 case "$host_os" in
9280 mingw*)
9281 gl_dirsep_regex='[/\\]'
9282 ;;
9283 *)
9284 gl_dirsep_regex='\/'
9285 ;;
9286 esac
9287 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
9288 gl_header_literal_regex=`echo 'sys/stat.h' \
9289 | sed -e "$gl_make_literal_regex_sed"`
9290 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
9291 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
9292 s|^/[^/]|//&|
9293 p
9294 q
9295 }'
9296
9297 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
9298 sed -n "$gl_absolute_header_sed"`
9299
9300 gl_header=$gl_cv_absolute_sys_stat_h
9301 gl_cv_next_sys_stat_h='"'$gl_header'"'
9302 else
9303 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
9304 fi
9305
9306
9307 fi
9308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
9309 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
9310 fi
9311 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
9312
9313 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
9314 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
9315 gl_next_as_first_directive='<'sys/stat.h'>'
9316 else
9317 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
9318 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
9319 fi
9320 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
9321
9322
9323
9324
9325
9326
9327
9328
9329
9330
9331
9332 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
9333
9334 $as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
9335
9336 fi
9337
9338 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
9339 #include <sys/stat.h>
9340 "
9341 if test "x$ac_cv_type_nlink_t" = xyes; then :
9342
9343 else
9344
9345 $as_echo "#define nlink_t int" >>confdefs.h
9346
9347 fi
9348
9349
9350
9351 for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do
9352 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
9353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
9354 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
9355 if eval \${$as_gl_Symbol+:} false; then :
9356 $as_echo_n "(cached) " >&6
9357 else
9358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9359 /* end confdefs.h. */
9360 #include <sys/stat.h>
9361
9362 int
9363 main ()
9364 {
9365 #undef $gl_func
9366 (void) $gl_func;
9367 ;
9368 return 0;
9369 }
9370 _ACEOF
9371 if ac_fn_c_try_compile "$LINENO"; then :
9372 eval "$as_gl_Symbol=yes"
9373 else
9374 eval "$as_gl_Symbol=no"
9375 fi
9376 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9377 fi
9378 eval ac_res=\$$as_gl_Symbol
9379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9380 $as_echo "$ac_res" >&6; }
9381 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
9382 cat >>confdefs.h <<_ACEOF
9383 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
9384 _ACEOF
9385
9386 eval ac_cv_have_decl_$gl_func=yes
9387 fi
9388 done
9389
9390
9391
9392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
9393 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
9394 if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
9395 $as_echo_n "(cached) " >&6
9396 else
9397 rm -f conftest.sym conftest.file
9398 echo >conftest.file
9399 if test "$cross_compiling" = yes; then :
9400 case "$host_os" in
9401 *-gnu*)
9402 # Guess yes on glibc systems.
9403 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
9404 *)
9405 # If we don't know, assume the worst.
9406 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
9407 esac
9408
9409 else
9410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9411 /* end confdefs.h. */
9412 $ac_includes_default
9413 int
9414 main ()
9415 {
9416 struct stat sbuf;
9417 if (symlink ("conftest.file", "conftest.sym") != 0)
9418 return 1;
9419 /* Linux will dereference the symlink and fail, as required by
9420 POSIX. That is better in the sense that it means we will not
9421 have to compile and use the lstat wrapper. */
9422 return lstat ("conftest.sym/", &sbuf) == 0;
9423
9424 ;
9425 return 0;
9426 }
9427 _ACEOF
9428 if ac_fn_c_try_run "$LINENO"; then :
9429 gl_cv_func_lstat_dereferences_slashed_symlink=yes
9430 else
9431 gl_cv_func_lstat_dereferences_slashed_symlink=no
9432 fi
9433 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9434 conftest.$ac_objext conftest.beam conftest.$ac_ext
9435 fi
9436
9437 rm -f conftest.sym conftest.file
9438
9439 fi
9440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
9441 $as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
9442 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
9443 *yes)
9444
9445 cat >>confdefs.h <<_ACEOF
9446 #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
9447 _ACEOF
9448
9449 ;;
9450 esac
9451
9452
9453
9454
9455
9456
9457
9458
9459 :
9460
9461
9462
9463
9464
9465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
9466 $as_echo_n "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
9467 if ${gl_cv_func_getcwd_null+:} false; then :
9468 $as_echo_n "(cached) " >&6
9469 else
9470 if test "$cross_compiling" = yes; then :
9471 case "$host_os" in
9472 # Guess yes on glibc systems.
9473 *-gnu*) gl_cv_func_getcwd_null="guessing yes";;
9474 # Guess yes on Cygwin.
9475 cygwin*) gl_cv_func_getcwd_null="guessing yes";;
9476 # If we don't know, assume the worst.
9477 *) gl_cv_func_getcwd_null="guessing no";;
9478 esac
9479
9480 else
9481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9482 /* end confdefs.h. */
9483
9484 # include <stdlib.h>
9485 # if HAVE_UNISTD_H
9486 # include <unistd.h>
9487 # else /* on Windows with MSVC */
9488 # include <direct.h>
9489 # endif
9490 # ifndef getcwd
9491 char *getcwd ();
9492 # endif
9493
9494 int
9495 main ()
9496 {
9497
9498 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
9499 /* mingw cwd does not start with '/', but getcwd does allocate.
9500 However, mingw fails to honor non-zero size. */
9501 #else
9502 if (chdir ("/") != 0)
9503 return 1;
9504 else
9505 {
9506 char *f = getcwd (NULL, 0);
9507 if (! f)
9508 return 2;
9509 if (f[0] != '/')
9510 return 3;
9511 if (f[1] != '\0')
9512 return 4;
9513 free (f);
9514 return 0;
9515 }
9516 #endif
9517
9518 ;
9519 return 0;
9520 }
9521 _ACEOF
9522 if ac_fn_c_try_run "$LINENO"; then :
9523 gl_cv_func_getcwd_null=yes
9524 else
9525 gl_cv_func_getcwd_null=no
9526 fi
9527 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9528 conftest.$ac_objext conftest.beam conftest.$ac_ext
9529 fi
9530
9531 fi
9532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
9533 $as_echo "$gl_cv_func_getcwd_null" >&6; }
9534
9535
9536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
9537 $as_echo_n "checking for getcwd with POSIX signature... " >&6; }
9538 if ${gl_cv_func_getcwd_posix_signature+:} false; then :
9539 $as_echo_n "(cached) " >&6
9540 else
9541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9542 /* end confdefs.h. */
9543 #include <unistd.h>
9544 int
9545 main ()
9546 {
9547 extern
9548 #ifdef __cplusplus
9549 "C"
9550 #endif
9551 char *getcwd (char *, size_t);
9552
9553 ;
9554 return 0;
9555 }
9556
9557 _ACEOF
9558 if ac_fn_c_try_compile "$LINENO"; then :
9559 gl_cv_func_getcwd_posix_signature=yes
9560 else
9561 gl_cv_func_getcwd_posix_signature=no
9562 fi
9563 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9564
9565 fi
9566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
9567 $as_echo "$gl_cv_func_getcwd_posix_signature" >&6; }
9568
9569
9570 ac_fn_c_check_decl "$LINENO" "getcwd" "ac_cv_have_decl_getcwd" "$ac_includes_default"
9571 if test "x$ac_cv_have_decl_getcwd" = xyes; then :
9572 ac_have_decl=1
9573 else
9574 ac_have_decl=0
9575 fi
9576
9577 cat >>confdefs.h <<_ACEOF
9578 #define HAVE_DECL_GETCWD $ac_have_decl
9579 _ACEOF
9580
9581
9582
9583
9584
9585
9586
9587
9588 ac_fn_c_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default"
9589 if test "x$ac_cv_have_decl_getdtablesize" = xyes; then :
9590 ac_have_decl=1
9591 else
9592 ac_have_decl=0
9593 fi
9594
9595 cat >>confdefs.h <<_ACEOF
9596 #define HAVE_DECL_GETDTABLESIZE $ac_have_decl
9597 _ACEOF
9598
9599
9600
9601 ac_fn_c_check_decl "$LINENO" "getlogin_r" "ac_cv_have_decl_getlogin_r" "$ac_includes_default"
9602 if test "x$ac_cv_have_decl_getlogin_r" = xyes; then :
9603 ac_have_decl=1
9604 else
9605 ac_have_decl=0
9606 fi
9607
9608 cat >>confdefs.h <<_ACEOF
9609 #define HAVE_DECL_GETLOGIN_R $ac_have_decl
9610 _ACEOF
9611
9612
9613
9614
9615
9616
9617
9618
9619 ac_fn_c_check_decl "$LINENO" "getlogin" "ac_cv_have_decl_getlogin" "$ac_includes_default"
9620 if test "x$ac_cv_have_decl_getlogin" = xyes; then :
9621 ac_have_decl=1
9622 else
9623 ac_have_decl=0
9624 fi
9625
9626 cat >>confdefs.h <<_ACEOF
9627 #define HAVE_DECL_GETLOGIN $ac_have_decl
9628 _ACEOF
9629
9630
9631
9632
9633
9634
9635
9636
9637
9638
9639
9640
9641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
9642 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
9643 if ${ac_cv_c_restrict+:} false; then :
9644 $as_echo_n "(cached) " >&6
9645 else
9646 ac_cv_c_restrict=no
9647 # The order here caters to the fact that C++ does not require restrict.
9648 for ac_kw in __restrict __restrict__ _Restrict restrict; do
9649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9650 /* end confdefs.h. */
9651 typedef int *int_ptr;
9652 int foo (int_ptr $ac_kw ip) { return ip[0]; }
9653 int bar (int [$ac_kw]); /* Catch GCC bug 14050. */
9654 int bar (int ip[$ac_kw]) { return ip[0]; }
9655
9656 int
9657 main ()
9658 {
9659 int s[1];
9660 int *$ac_kw t = s;
9661 t[0] = 0;
9662 return foo (t) + bar (t);
9663
9664 ;
9665 return 0;
9666 }
9667 _ACEOF
9668 if ac_fn_c_try_compile "$LINENO"; then :
9669 ac_cv_c_restrict=$ac_kw
9670 fi
9671 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9672 test "$ac_cv_c_restrict" != no && break
9673 done
9674
9675 fi
9676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
9677 $as_echo "$ac_cv_c_restrict" >&6; }
9678
9679 case $ac_cv_c_restrict in
9680 restrict) ;;
9681 no) $as_echo "#define restrict /**/" >>confdefs.h
9682 ;;
9683 *) cat >>confdefs.h <<_ACEOF
9684 #define restrict $ac_cv_c_restrict
9685 _ACEOF
9686 ;;
9687 esac
9688
9689
9690 GNULIB_GETTIMEOFDAY=0;
9691 HAVE_GETTIMEOFDAY=1;
9692 HAVE_STRUCT_TIMEVAL=1;
9693 HAVE_SYS_TIME_H=1;
9694 HAVE_TIMEZONE_T=0;
9695 REPLACE_GETTIMEOFDAY=0;
9696 REPLACE_STRUCT_TIMEVAL=0;
9697
9698
9699
9700
9701
9702
9703
9704
9705
9706
9707 :
9708
9709
9710
9711
9712
9713
9714
9715
9716
9717
9718
9719 :
9720
9721
9722
9723
9724
9725
9726
9727
9728 if test $gl_cv_have_include_next = yes; then
9729 gl_cv_next_sys_time_h='<'sys/time.h'>'
9730 else
9731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
9732 $as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
9733 if ${gl_cv_next_sys_time_h+:} false; then :
9734 $as_echo_n "(cached) " >&6
9735 else
9736
9737 if test $ac_cv_header_sys_time_h = yes; then
9738
9739
9740
9741
9742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9743 /* end confdefs.h. */
9744 #include <sys/time.h>
9745 _ACEOF
9746 case "$host_os" in
9747 aix*) gl_absname_cpp="$ac_cpp -C" ;;
9748 *) gl_absname_cpp="$ac_cpp" ;;
9749 esac
9750
9751 case "$host_os" in
9752 mingw*)
9753 gl_dirsep_regex='[/\\]'
9754 ;;
9755 *)
9756 gl_dirsep_regex='\/'
9757 ;;
9758 esac
9759 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
9760 gl_header_literal_regex=`echo 'sys/time.h' \
9761 | sed -e "$gl_make_literal_regex_sed"`
9762 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
9763 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
9764 s|^/[^/]|//&|
9765 p
9766 q
9767 }'
9768
9769 gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
9770 sed -n "$gl_absolute_header_sed"`
9771
9772 gl_header=$gl_cv_absolute_sys_time_h
9773 gl_cv_next_sys_time_h='"'$gl_header'"'
9774 else
9775 gl_cv_next_sys_time_h='<'sys/time.h'>'
9776 fi
9777
9778
9779 fi
9780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
9781 $as_echo "$gl_cv_next_sys_time_h" >&6; }
9782 fi
9783 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
9784
9785 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
9786 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
9787 gl_next_as_first_directive='<'sys/time.h'>'
9788 else
9789 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
9790 gl_next_as_first_directive=$gl_cv_next_sys_time_h
9791 fi
9792 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
9793
9794
9795
9796
9797
9798 if test $ac_cv_header_sys_time_h != yes; then
9799 HAVE_SYS_TIME_H=0
9800 fi
9801
9802
9803
9804
9805
9806 :
9807
9808
9809
9810
9811
9812 if test $ac_cv_header_sys_socket_h != yes; then
9813 for ac_header in winsock2.h
9814 do :
9815 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
9816 if test "x$ac_cv_header_winsock2_h" = xyes; then :
9817 cat >>confdefs.h <<_ACEOF
9818 #define HAVE_WINSOCK2_H 1
9819 _ACEOF
9820
9821 fi
9822
9823 done
9824
9825 fi
9826 if test "$ac_cv_header_winsock2_h" = yes; then
9827 HAVE_WINSOCK2_H=1
9828 UNISTD_H_HAVE_WINSOCK2_H=1
9829 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
9830 else
9831 HAVE_WINSOCK2_H=0
9832 fi
9833
9834
9835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
9836 $as_echo_n "checking for struct timeval... " >&6; }
9837 if ${gl_cv_sys_struct_timeval+:} false; then :
9838 $as_echo_n "(cached) " >&6
9839 else
9840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9841 /* end confdefs.h. */
9842 #if HAVE_SYS_TIME_H
9843 #include <sys/time.h>
9844 #endif
9845 #include <time.h>
9846 #if HAVE_WINSOCK2_H
9847 # include <winsock2.h>
9848 #endif
9849
9850 int
9851 main ()
9852 {
9853 static struct timeval x; x.tv_sec = x.tv_usec;
9854 ;
9855 return 0;
9856 }
9857 _ACEOF
9858 if ac_fn_c_try_compile "$LINENO"; then :
9859 gl_cv_sys_struct_timeval=yes
9860 else
9861 gl_cv_sys_struct_timeval=no
9862 fi
9863 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9864
9865 fi
9866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
9867 $as_echo "$gl_cv_sys_struct_timeval" >&6; }
9868 if test $gl_cv_sys_struct_timeval != yes; then
9869 HAVE_STRUCT_TIMEVAL=0
9870 else
9871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
9872 $as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
9873 if ${gl_cv_sys_struct_timeval_tv_sec+:} false; then :
9874 $as_echo_n "(cached) " >&6
9875 else
9876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9877 /* end confdefs.h. */
9878 #if HAVE_SYS_TIME_H
9879 #include <sys/time.h>
9880 #endif
9881 #include <time.h>
9882 #if HAVE_WINSOCK2_H
9883 # include <winsock2.h>
9884 #endif
9885
9886 int
9887 main ()
9888 {
9889 static struct timeval x;
9890 typedef int verify_tv_sec_type[
9891 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
9892 ];
9893
9894 ;
9895 return 0;
9896 }
9897 _ACEOF
9898 if ac_fn_c_try_compile "$LINENO"; then :
9899 gl_cv_sys_struct_timeval_tv_sec=yes
9900 else
9901 gl_cv_sys_struct_timeval_tv_sec=no
9902 fi
9903 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9904
9905 fi
9906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
9907 $as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
9908 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
9909 REPLACE_STRUCT_TIMEVAL=1
9910 fi
9911 fi
9912
9913
9914 for gl_func in gettimeofday; do
9915 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
9916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
9917 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
9918 if eval \${$as_gl_Symbol+:} false; then :
9919 $as_echo_n "(cached) " >&6
9920 else
9921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9922 /* end confdefs.h. */
9923
9924 #if HAVE_SYS_TIME_H
9925 # include <sys/time.h>
9926 #endif
9927 #include <time.h>
9928
9929 int
9930 main ()
9931 {
9932 #undef $gl_func
9933 (void) $gl_func;
9934 ;
9935 return 0;
9936 }
9937 _ACEOF
9938 if ac_fn_c_try_compile "$LINENO"; then :
9939 eval "$as_gl_Symbol=yes"
9940 else
9941 eval "$as_gl_Symbol=no"
9942 fi
9943 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9944 fi
9945 eval ac_res=\$$as_gl_Symbol
9946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9947 $as_echo "$ac_res" >&6; }
9948 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
9949 cat >>confdefs.h <<_ACEOF
9950 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
9951 _ACEOF
9952
9953 eval ac_cv_have_decl_$gl_func=yes
9954 fi
9955 done
9956
9957
9958
9959
9960
9961
9962
9963
9964
9965
9966
9967
9968
9969
9970
9971
9972
9973
9974
9975
9976
9977
9978
9979
9980
9981
9982 GNULIB_SOCKET=0;
9983 GNULIB_CONNECT=0;
9984 GNULIB_ACCEPT=0;
9985 GNULIB_BIND=0;
9986 GNULIB_GETPEERNAME=0;
9987 GNULIB_GETSOCKNAME=0;
9988 GNULIB_GETSOCKOPT=0;
9989 GNULIB_LISTEN=0;
9990 GNULIB_RECV=0;
9991 GNULIB_SEND=0;
9992 GNULIB_RECVFROM=0;
9993 GNULIB_SENDTO=0;
9994 GNULIB_SETSOCKOPT=0;
9995 GNULIB_SHUTDOWN=0;
9996 GNULIB_ACCEPT4=0;
9997 HAVE_STRUCT_SOCKADDR_STORAGE=1;
9998 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1;
9999
10000 HAVE_SA_FAMILY_T=1;
10001 HAVE_ACCEPT4=1;
10002
10003
10004 :
10005
10006
10007
10008
10009
10010 if test $ac_cv_header_sys_socket_h = no; then
10011 for ac_header in ws2tcpip.h
10012 do :
10013 ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
10014 if test "x$ac_cv_header_ws2tcpip_h" = xyes; then :
10015 cat >>confdefs.h <<_ACEOF
10016 #define HAVE_WS2TCPIP_H 1
10017 _ACEOF
10018
10019 fi
10020
10021 done
10022
10023 fi
10024
10025
10026
10027
10028
10029 case "$host_os" in
10030 osf*)
10031
10032 $as_echo "#define _POSIX_PII_SOCKET 1" >>confdefs.h
10033
10034 ;;
10035 esac
10036
10037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> is self-contained" >&5
10038 $as_echo_n "checking whether <sys/socket.h> is self-contained... " >&6; }
10039 if ${gl_cv_header_sys_socket_h_selfcontained+:} false; then :
10040 $as_echo_n "(cached) " >&6
10041 else
10042
10043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10044 /* end confdefs.h. */
10045 #include <sys/socket.h>
10046 int
10047 main ()
10048 {
10049
10050 ;
10051 return 0;
10052 }
10053 _ACEOF
10054 if ac_fn_c_try_compile "$LINENO"; then :
10055 gl_cv_header_sys_socket_h_selfcontained=yes
10056 else
10057 gl_cv_header_sys_socket_h_selfcontained=no
10058 fi
10059 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10060
10061 fi
10062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_selfcontained" >&5
10063 $as_echo "$gl_cv_header_sys_socket_h_selfcontained" >&6; }
10064 if test $gl_cv_header_sys_socket_h_selfcontained = yes; then
10065 for ac_func in shutdown
10066 do :
10067 ac_fn_c_check_func "$LINENO" "shutdown" "ac_cv_func_shutdown"
10068 if test "x$ac_cv_func_shutdown" = xyes; then :
10069 cat >>confdefs.h <<_ACEOF
10070 #define HAVE_SHUTDOWN 1
10071 _ACEOF
10072
10073 fi
10074 done
10075
10076 if test $ac_cv_func_shutdown = yes; then
10077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> defines the SHUT_* macros" >&5
10078 $as_echo_n "checking whether <sys/socket.h> defines the SHUT_* macros... " >&6; }
10079 if ${gl_cv_header_sys_socket_h_shut+:} false; then :
10080 $as_echo_n "(cached) " >&6
10081 else
10082
10083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10084 /* end confdefs.h. */
10085 #include <sys/socket.h>
10086 int
10087 main ()
10088 {
10089 int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };
10090 ;
10091 return 0;
10092 }
10093 _ACEOF
10094 if ac_fn_c_try_compile "$LINENO"; then :
10095 gl_cv_header_sys_socket_h_shut=yes
10096 else
10097 gl_cv_header_sys_socket_h_shut=no
10098 fi
10099 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10100
10101 fi
10102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_shut" >&5
10103 $as_echo "$gl_cv_header_sys_socket_h_shut" >&6; }
10104 if test $gl_cv_header_sys_socket_h_shut = no; then
10105 SYS_SOCKET_H='sys/socket.h'
10106 fi
10107 fi
10108 fi
10109 # We need to check for ws2tcpip.h now.
10110
10111
10112
10113
10114
10115
10116
10117
10118 :
10119
10120
10121
10122
10123
10124
10125
10126
10127 if test $gl_cv_have_include_next = yes; then
10128 gl_cv_next_sys_socket_h='<'sys/socket.h'>'
10129 else
10130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/socket.h>" >&5
10131 $as_echo_n "checking absolute name of <sys/socket.h>... " >&6; }
10132 if ${gl_cv_next_sys_socket_h+:} false; then :
10133 $as_echo_n "(cached) " >&6
10134 else
10135
10136 if test $ac_cv_header_sys_socket_h = yes; then
10137
10138
10139
10140
10141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10142 /* end confdefs.h. */
10143 #include <sys/socket.h>
10144 _ACEOF
10145 case "$host_os" in
10146 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10147 *) gl_absname_cpp="$ac_cpp" ;;
10148 esac
10149
10150 case "$host_os" in
10151 mingw*)
10152 gl_dirsep_regex='[/\\]'
10153 ;;
10154 *)
10155 gl_dirsep_regex='\/'
10156 ;;
10157 esac
10158 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10159 gl_header_literal_regex=`echo 'sys/socket.h' \
10160 | sed -e "$gl_make_literal_regex_sed"`
10161 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10162 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10163 s|^/[^/]|//&|
10164 p
10165 q
10166 }'
10167
10168 gl_cv_absolute_sys_socket_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10169 sed -n "$gl_absolute_header_sed"`
10170
10171 gl_header=$gl_cv_absolute_sys_socket_h
10172 gl_cv_next_sys_socket_h='"'$gl_header'"'
10173 else
10174 gl_cv_next_sys_socket_h='<'sys/socket.h'>'
10175 fi
10176
10177
10178 fi
10179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_socket_h" >&5
10180 $as_echo "$gl_cv_next_sys_socket_h" >&6; }
10181 fi
10182 NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_h
10183
10184 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10185 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10186 gl_next_as_first_directive='<'sys/socket.h'>'
10187 else
10188 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10189 gl_next_as_first_directive=$gl_cv_next_sys_socket_h
10190 fi
10191 NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H=$gl_next_as_first_directive
10192
10193
10194
10195
10196 if test $ac_cv_header_sys_socket_h = yes; then
10197 HAVE_SYS_SOCKET_H=1
10198 HAVE_WS2TCPIP_H=0
10199 else
10200 HAVE_SYS_SOCKET_H=0
10201 if test $ac_cv_header_ws2tcpip_h = yes; then
10202 HAVE_WS2TCPIP_H=1
10203 else
10204 HAVE_WS2TCPIP_H=0
10205 fi
10206 fi
10207
10208
10209
10210 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "
10211 /* sys/types.h is not needed according to POSIX, but the
10212 sys/socket.h in i386-unknown-freebsd4.10 and
10213 powerpc-apple-darwin5.5 required it. */
10214 #include <sys/types.h>
10215 #ifdef HAVE_SYS_SOCKET_H
10216 #include <sys/socket.h>
10217 #endif
10218 #ifdef HAVE_WS2TCPIP_H
10219 #include <ws2tcpip.h>
10220 #endif
10221
10222 "
10223 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
10224
10225 cat >>confdefs.h <<_ACEOF
10226 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
10227 _ACEOF
10228
10229
10230 fi
10231 ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" "
10232 /* sys/types.h is not needed according to POSIX, but the
10233 sys/socket.h in i386-unknown-freebsd4.10 and
10234 powerpc-apple-darwin5.5 required it. */
10235 #include <sys/types.h>
10236 #ifdef HAVE_SYS_SOCKET_H
10237 #include <sys/socket.h>
10238 #endif
10239 #ifdef HAVE_WS2TCPIP_H
10240 #include <ws2tcpip.h>
10241 #endif
10242
10243 "
10244 if test "x$ac_cv_type_sa_family_t" = xyes; then :
10245
10246 cat >>confdefs.h <<_ACEOF
10247 #define HAVE_SA_FAMILY_T 1
10248 _ACEOF
10249
10250
10251 fi
10252
10253 if test $ac_cv_type_struct_sockaddr_storage = no; then
10254 HAVE_STRUCT_SOCKADDR_STORAGE=0
10255 fi
10256 if test $ac_cv_type_sa_family_t = no; then
10257 HAVE_SA_FAMILY_T=0
10258 fi
10259 if test $ac_cv_type_struct_sockaddr_storage != no; then
10260 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
10261 #ifdef HAVE_SYS_SOCKET_H
10262 #include <sys/socket.h>
10263 #endif
10264 #ifdef HAVE_WS2TCPIP_H
10265 #include <ws2tcpip.h>
10266 #endif
10267
10268 "
10269 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
10270
10271 cat >>confdefs.h <<_ACEOF
10272 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
10273 _ACEOF
10274
10275
10276 else
10277 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0
10278 fi
10279
10280 fi
10281 if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \
10282 || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then
10283 SYS_SOCKET_H='sys/socket.h'
10284 fi
10285
10286
10287
10288
10289 :
10290
10291
10292
10293
10294
10295 if test $ac_cv_header_sys_socket_h != yes; then
10296 for ac_header in winsock2.h
10297 do :
10298 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
10299 if test "x$ac_cv_header_winsock2_h" = xyes; then :
10300 cat >>confdefs.h <<_ACEOF
10301 #define HAVE_WINSOCK2_H 1
10302 _ACEOF
10303
10304 fi
10305
10306 done
10307
10308 fi
10309 if test "$ac_cv_header_winsock2_h" = yes; then
10310 HAVE_WINSOCK2_H=1
10311 UNISTD_H_HAVE_WINSOCK2_H=1
10312 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
10313 else
10314 HAVE_WINSOCK2_H=0
10315 fi
10316
10317
10318
10319
10320 for gl_func in socket connect accept bind getpeername getsockname getsockopt listen recv send recvfrom sendto setsockopt shutdown accept4; do
10321 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
10322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
10323 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
10324 if eval \${$as_gl_Symbol+:} false; then :
10325 $as_echo_n "(cached) " >&6
10326 else
10327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10328 /* end confdefs.h. */
10329
10330 /* Some systems require prerequisite headers. */
10331 #include <sys/types.h>
10332 #include <sys/socket.h>
10333
10334 int
10335 main ()
10336 {
10337 #undef $gl_func
10338 (void) $gl_func;
10339 ;
10340 return 0;
10341 }
10342 _ACEOF
10343 if ac_fn_c_try_compile "$LINENO"; then :
10344 eval "$as_gl_Symbol=yes"
10345 else
10346 eval "$as_gl_Symbol=no"
10347 fi
10348 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10349 fi
10350 eval ac_res=\$$as_gl_Symbol
10351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10352 $as_echo "$ac_res" >&6; }
10353 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
10354 cat >>confdefs.h <<_ACEOF
10355 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
10356 _ACEOF
10357
10358 eval ac_cv_have_decl_$gl_func=yes
10359 fi
10360 done
10361
10362
10363
10364
10365
10366
10367
10368
10369
10370
10371 :
10372
10373
10374
10375
10376
10377
10378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv4 sockets" >&5
10379 $as_echo_n "checking for IPv4 sockets... " >&6; }
10380 if ${gl_cv_socket_ipv4+:} false; then :
10381 $as_echo_n "(cached) " >&6
10382 else
10383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10384 /* end confdefs.h. */
10385 #include <sys/types.h>
10386 #ifdef HAVE_SYS_SOCKET_H
10387 #include <sys/socket.h>
10388 #endif
10389 #ifdef HAVE_NETINET_IN_H
10390 #include <netinet/in.h>
10391 #endif
10392 #ifdef HAVE_WINSOCK2_H
10393 #include <winsock2.h>
10394 #endif
10395 int
10396 main ()
10397 {
10398 int x = AF_INET; struct in_addr y; struct sockaddr_in z;
10399 if (&x && &y && &z) return 0;
10400 ;
10401 return 0;
10402 }
10403 _ACEOF
10404 if ac_fn_c_try_compile "$LINENO"; then :
10405 gl_cv_socket_ipv4=yes
10406 else
10407 gl_cv_socket_ipv4=no
10408 fi
10409 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10410 fi
10411
10412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv4" >&5
10413 $as_echo "$gl_cv_socket_ipv4" >&6; }
10414 if test $gl_cv_socket_ipv4 = yes; then
10415
10416 $as_echo "#define HAVE_IPV4 1" >>confdefs.h
10417
10418 fi
10419
10420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv6 sockets" >&5
10421 $as_echo_n "checking for IPv6 sockets... " >&6; }
10422 if ${gl_cv_socket_ipv6+:} false; then :
10423 $as_echo_n "(cached) " >&6
10424 else
10425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10426 /* end confdefs.h. */
10427 #include <sys/types.h>
10428 #ifdef HAVE_SYS_SOCKET_H
10429 #include <sys/socket.h>
10430 #endif
10431 #ifdef HAVE_NETINET_IN_H
10432 #include <netinet/in.h>
10433 #endif
10434 #ifdef HAVE_WINSOCK2_H
10435 #include <winsock2.h>
10436 #endif
10437 #ifdef HAVE_WS2TCPIP_H
10438 #include <ws2tcpip.h>
10439 #endif
10440 int
10441 main ()
10442 {
10443 int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z;
10444 if (&x && &y && &z) return 0;
10445 ;
10446 return 0;
10447 }
10448 _ACEOF
10449 if ac_fn_c_try_compile "$LINENO"; then :
10450 gl_cv_socket_ipv6=yes
10451 else
10452 gl_cv_socket_ipv6=no
10453 fi
10454 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10455 fi
10456
10457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv6" >&5
10458 $as_echo "$gl_cv_socket_ipv6" >&6; }
10459 if test $gl_cv_socket_ipv6 = yes; then
10460
10461 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
10462
10463 fi
10464
10465
10466
10467
10468
10469
10470
10471
10472
10473
10474
10475
10476
10477 :
10478
10479
10480
10481
10482
10483
10484
10485
10486 if test $gl_cv_have_include_next = yes; then
10487 gl_cv_next_limits_h='<'limits.h'>'
10488 else
10489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5
10490 $as_echo_n "checking absolute name of <limits.h>... " >&6; }
10491 if ${gl_cv_next_limits_h+:} false; then :
10492 $as_echo_n "(cached) " >&6
10493 else
10494
10495 if test $ac_cv_header_limits_h = yes; then
10496
10497
10498
10499
10500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10501 /* end confdefs.h. */
10502 #include <limits.h>
10503 _ACEOF
10504 case "$host_os" in
10505 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10506 *) gl_absname_cpp="$ac_cpp" ;;
10507 esac
10508
10509 case "$host_os" in
10510 mingw*)
10511 gl_dirsep_regex='[/\\]'
10512 ;;
10513 *)
10514 gl_dirsep_regex='\/'
10515 ;;
10516 esac
10517 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10518 gl_header_literal_regex=`echo 'limits.h' \
10519 | sed -e "$gl_make_literal_regex_sed"`
10520 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10521 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10522 s|^/[^/]|//&|
10523 p
10524 q
10525 }'
10526
10527 gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10528 sed -n "$gl_absolute_header_sed"`
10529
10530 gl_header=$gl_cv_absolute_limits_h
10531 gl_cv_next_limits_h='"'$gl_header'"'
10532 else
10533 gl_cv_next_limits_h='<'limits.h'>'
10534 fi
10535
10536
10537 fi
10538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
10539 $as_echo "$gl_cv_next_limits_h" >&6; }
10540 fi
10541 NEXT_LIMITS_H=$gl_cv_next_limits_h
10542
10543 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10544 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10545 gl_next_as_first_directive='<'limits.h'>'
10546 else
10547 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10548 gl_next_as_first_directive=$gl_cv_next_limits_h
10549 fi
10550 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive
10551
10552
10553
10554
10555
10556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether limits.h has ULLONG_WIDTH etc." >&5
10557 $as_echo_n "checking whether limits.h has ULLONG_WIDTH etc.... " >&6; }
10558 if ${gl_cv_header_limits_width+:} false; then :
10559 $as_echo_n "(cached) " >&6
10560 else
10561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10562 /* end confdefs.h. */
10563 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
10564 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
10565 #endif
10566 #include <limits.h>
10567 int ullw = ULLONG_WIDTH;
10568 int
10569 main ()
10570 {
10571
10572 ;
10573 return 0;
10574 }
10575 _ACEOF
10576 if ac_fn_c_try_compile "$LINENO"; then :
10577 gl_cv_header_limits_width=yes
10578 else
10579 gl_cv_header_limits_width=no
10580 fi
10581 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10582 fi
10583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5
10584 $as_echo "$gl_cv_header_limits_width" >&6; }
10585 if test "$gl_cv_header_limits_width" = yes; then
10586 LIMITS_H=
10587 else
10588 LIMITS_H=limits.h
10589 fi
10590
10591 if test -n "$LIMITS_H"; then
10592 GL_GENERATE_LIMITS_H_TRUE=
10593 GL_GENERATE_LIMITS_H_FALSE='#'
10594 else
10595 GL_GENERATE_LIMITS_H_TRUE='#'
10596 GL_GENERATE_LIMITS_H_FALSE=
10597 fi
10598
10599
10600
10601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
10602 $as_echo_n "checking for unsigned long long int... " >&6; }
10603 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
10604 $as_echo_n "(cached) " >&6
10605 else
10606 ac_cv_type_unsigned_long_long_int=yes
10607 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
10608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10609 /* end confdefs.h. */
10610
10611 /* For now, do not test the preprocessor; as of 2007 there are too many
10612 implementations with broken preprocessors. Perhaps this can
10613 be revisited in 2012. In the meantime, code should not expect
10614 #if to work with literals wider than 32 bits. */
10615 /* Test literals. */
10616 long long int ll = 9223372036854775807ll;
10617 long long int nll = -9223372036854775807LL;
10618 unsigned long long int ull = 18446744073709551615ULL;
10619 /* Test constant expressions. */
10620 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
10621 ? 1 : -1)];
10622 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
10623 ? 1 : -1)];
10624 int i = 63;
10625 int
10626 main ()
10627 {
10628 /* Test availability of runtime routines for shift and division. */
10629 long long int llmax = 9223372036854775807ll;
10630 unsigned long long int ullmax = 18446744073709551615ull;
10631 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
10632 | (llmax / ll) | (llmax % ll)
10633 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
10634 | (ullmax / ull) | (ullmax % ull));
10635 ;
10636 return 0;
10637 }
10638
10639 _ACEOF
10640 if ac_fn_c_try_link "$LINENO"; then :
10641
10642 else
10643 ac_cv_type_unsigned_long_long_int=no
10644 fi
10645 rm -f core conftest.err conftest.$ac_objext \
10646 conftest$ac_exeext conftest.$ac_ext
10647 fi
10648 fi
10649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
10650 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
10651 if test $ac_cv_type_unsigned_long_long_int = yes; then
10652
10653 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
10654
10655 fi
10656
10657
10658
10659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
10660 $as_echo_n "checking for long long int... " >&6; }
10661 if ${ac_cv_type_long_long_int+:} false; then :
10662 $as_echo_n "(cached) " >&6
10663 else
10664 ac_cv_type_long_long_int=yes
10665 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
10666 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
10667 if test $ac_cv_type_long_long_int = yes; then
10668 if test "$cross_compiling" = yes; then :
10669 :
10670 else
10671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10672 /* end confdefs.h. */
10673 #include <limits.h>
10674 #ifndef LLONG_MAX
10675 # define HALF \
10676 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
10677 # define LLONG_MAX (HALF - 1 + HALF)
10678 #endif
10679 int
10680 main ()
10681 {
10682 long long int n = 1;
10683 int i;
10684 for (i = 0; ; i++)
10685 {
10686 long long int m = n << i;
10687 if (m >> i != n)
10688 return 1;
10689 if (LLONG_MAX / 2 < m)
10690 break;
10691 }
10692 return 0;
10693 ;
10694 return 0;
10695 }
10696 _ACEOF
10697 if ac_fn_c_try_run "$LINENO"; then :
10698
10699 else
10700 ac_cv_type_long_long_int=no
10701 fi
10702 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10703 conftest.$ac_objext conftest.beam conftest.$ac_ext
10704 fi
10705
10706 fi
10707 fi
10708 fi
10709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
10710 $as_echo "$ac_cv_type_long_long_int" >&6; }
10711 if test $ac_cv_type_long_long_int = yes; then
10712
10713 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
10714
10715 fi
10716
10717
10718
10719
10720
10721
10722
10723
10724
10725
10726
10727
10728 gl_cv_c_multiarch=no
10729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10730 /* end confdefs.h. */
10731 #ifndef __APPLE_CC__
10732 not a universal capable compiler
10733 #endif
10734 typedef int dummy;
10735
10736 _ACEOF
10737 if ac_fn_c_try_compile "$LINENO"; then :
10738
10739 arch=
10740 prev=
10741 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
10742 if test -n "$prev"; then
10743 case $word in
10744 i?86 | x86_64 | ppc | ppc64)
10745 if test -z "$arch" || test "$arch" = "$word"; then
10746 arch="$word"
10747 else
10748 gl_cv_c_multiarch=yes
10749 fi
10750 ;;
10751 esac
10752 prev=
10753 else
10754 if test "x$word" = "x-arch"; then
10755 prev=arch
10756 fi
10757 fi
10758 done
10759
10760 fi
10761 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10762 if test $gl_cv_c_multiarch = yes; then
10763 APPLE_UNIVERSAL_BUILD=1
10764 else
10765 APPLE_UNIVERSAL_BUILD=0
10766 fi
10767
10768
10769
10770
10771
10772
10773
10774 if test $ac_cv_type_long_long_int = yes; then
10775 HAVE_LONG_LONG_INT=1
10776 else
10777 HAVE_LONG_LONG_INT=0
10778 fi
10779
10780
10781 if test $ac_cv_type_unsigned_long_long_int = yes; then
10782 HAVE_UNSIGNED_LONG_LONG_INT=1
10783 else
10784 HAVE_UNSIGNED_LONG_LONG_INT=0
10785 fi
10786
10787
10788
10789 :
10790
10791
10792
10793
10794
10795 if test $ac_cv_header_wchar_h = yes; then
10796 HAVE_WCHAR_H=1
10797 else
10798 HAVE_WCHAR_H=0
10799 fi
10800
10801
10802 if test $ac_cv_header_inttypes_h = yes; then
10803 HAVE_INTTYPES_H=1
10804 else
10805 HAVE_INTTYPES_H=0
10806 fi
10807
10808
10809 if test $ac_cv_header_sys_types_h = yes; then
10810 HAVE_SYS_TYPES_H=1
10811 else
10812 HAVE_SYS_TYPES_H=0
10813 fi
10814
10815
10816
10817
10818
10819
10820
10821
10822 :
10823
10824
10825
10826
10827
10828
10829
10830
10831 if test $gl_cv_have_include_next = yes; then
10832 gl_cv_next_stdint_h='<'stdint.h'>'
10833 else
10834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
10835 $as_echo_n "checking absolute name of <stdint.h>... " >&6; }
10836 if ${gl_cv_next_stdint_h+:} false; then :
10837 $as_echo_n "(cached) " >&6
10838 else
10839
10840 if test $ac_cv_header_stdint_h = yes; then
10841
10842
10843
10844
10845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10846 /* end confdefs.h. */
10847 #include <stdint.h>
10848 _ACEOF
10849 case "$host_os" in
10850 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10851 *) gl_absname_cpp="$ac_cpp" ;;
10852 esac
10853
10854 case "$host_os" in
10855 mingw*)
10856 gl_dirsep_regex='[/\\]'
10857 ;;
10858 *)
10859 gl_dirsep_regex='\/'
10860 ;;
10861 esac
10862 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10863 gl_header_literal_regex=`echo 'stdint.h' \
10864 | sed -e "$gl_make_literal_regex_sed"`
10865 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10866 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10867 s|^/[^/]|//&|
10868 p
10869 q
10870 }'
10871
10872 gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10873 sed -n "$gl_absolute_header_sed"`
10874
10875 gl_header=$gl_cv_absolute_stdint_h
10876 gl_cv_next_stdint_h='"'$gl_header'"'
10877 else
10878 gl_cv_next_stdint_h='<'stdint.h'>'
10879 fi
10880
10881
10882 fi
10883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
10884 $as_echo "$gl_cv_next_stdint_h" >&6; }
10885 fi
10886 NEXT_STDINT_H=$gl_cv_next_stdint_h
10887
10888 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10889 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10890 gl_next_as_first_directive='<'stdint.h'>'
10891 else
10892 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10893 gl_next_as_first_directive=$gl_cv_next_stdint_h
10894 fi
10895 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
10896
10897
10898
10899
10900 if test $ac_cv_header_stdint_h = yes; then
10901 HAVE_STDINT_H=1
10902 else
10903 HAVE_STDINT_H=0
10904 fi
10905
10906
10907 if test $ac_cv_header_stdint_h = yes; then
10908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
10909 $as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
10910 if ${gl_cv_header_working_stdint_h+:} false; then :
10911 $as_echo_n "(cached) " >&6
10912 else
10913 gl_cv_header_working_stdint_h=no
10914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10915 /* end confdefs.h. */
10916
10917
10918 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
10919 #define __STDC_CONSTANT_MACROS 1
10920 #define __STDC_LIMIT_MACROS 1
10921 #include <stdint.h>
10922 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
10923 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
10924 #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
10925 #endif
10926
10927
10928 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10929 included before <wchar.h>. */
10930 #include <stddef.h>
10931 #include <signal.h>
10932 #if HAVE_WCHAR_H
10933 # include <stdio.h>
10934 # include <time.h>
10935 # include <wchar.h>
10936 #endif
10937
10938
10939 #ifdef INT8_MAX
10940 int8_t a1 = INT8_MAX;
10941 int8_t a1min = INT8_MIN;
10942 #endif
10943 #ifdef INT16_MAX
10944 int16_t a2 = INT16_MAX;
10945 int16_t a2min = INT16_MIN;
10946 #endif
10947 #ifdef INT32_MAX
10948 int32_t a3 = INT32_MAX;
10949 int32_t a3min = INT32_MIN;
10950 #endif
10951 #ifdef INT64_MAX
10952 int64_t a4 = INT64_MAX;
10953 int64_t a4min = INT64_MIN;
10954 #endif
10955 #ifdef UINT8_MAX
10956 uint8_t b1 = UINT8_MAX;
10957 #else
10958 typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
10959 #endif
10960 #ifdef UINT16_MAX
10961 uint16_t b2 = UINT16_MAX;
10962 #endif
10963 #ifdef UINT32_MAX
10964 uint32_t b3 = UINT32_MAX;
10965 #endif
10966 #ifdef UINT64_MAX
10967 uint64_t b4 = UINT64_MAX;
10968 #endif
10969 int_least8_t c1 = INT8_C (0x7f);
10970 int_least8_t c1max = INT_LEAST8_MAX;
10971 int_least8_t c1min = INT_LEAST8_MIN;
10972 int_least16_t c2 = INT16_C (0x7fff);
10973 int_least16_t c2max = INT_LEAST16_MAX;
10974 int_least16_t c2min = INT_LEAST16_MIN;
10975 int_least32_t c3 = INT32_C (0x7fffffff);
10976 int_least32_t c3max = INT_LEAST32_MAX;
10977 int_least32_t c3min = INT_LEAST32_MIN;
10978 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
10979 int_least64_t c4max = INT_LEAST64_MAX;
10980 int_least64_t c4min = INT_LEAST64_MIN;
10981 uint_least8_t d1 = UINT8_C (0xff);
10982 uint_least8_t d1max = UINT_LEAST8_MAX;
10983 uint_least16_t d2 = UINT16_C (0xffff);
10984 uint_least16_t d2max = UINT_LEAST16_MAX;
10985 uint_least32_t d3 = UINT32_C (0xffffffff);
10986 uint_least32_t d3max = UINT_LEAST32_MAX;
10987 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
10988 uint_least64_t d4max = UINT_LEAST64_MAX;
10989 int_fast8_t e1 = INT_FAST8_MAX;
10990 int_fast8_t e1min = INT_FAST8_MIN;
10991 int_fast16_t e2 = INT_FAST16_MAX;
10992 int_fast16_t e2min = INT_FAST16_MIN;
10993 int_fast32_t e3 = INT_FAST32_MAX;
10994 int_fast32_t e3min = INT_FAST32_MIN;
10995 int_fast64_t e4 = INT_FAST64_MAX;
10996 int_fast64_t e4min = INT_FAST64_MIN;
10997 uint_fast8_t f1 = UINT_FAST8_MAX;
10998 uint_fast16_t f2 = UINT_FAST16_MAX;
10999 uint_fast32_t f3 = UINT_FAST32_MAX;
11000 uint_fast64_t f4 = UINT_FAST64_MAX;
11001 #ifdef INTPTR_MAX
11002 intptr_t g = INTPTR_MAX;
11003 intptr_t gmin = INTPTR_MIN;
11004 #endif
11005 #ifdef UINTPTR_MAX
11006 uintptr_t h = UINTPTR_MAX;
11007 #endif
11008 intmax_t i = INTMAX_MAX;
11009 uintmax_t j = UINTMAX_MAX;
11010
11011 /* Check that SIZE_MAX has the correct type, if possible. */
11012 #if 201112 <= __STDC_VERSION__
11013 int k = _Generic (SIZE_MAX, size_t: 0);
11014 #elif (2 <= __GNUC__ || defined __IBM__TYPEOF__ \
11015 || (0x5110 <= __SUNPRO_C && !__STDC__))
11016 extern size_t k;
11017 extern __typeof__ (SIZE_MAX) k;
11018 #endif
11019
11020 #include <limits.h> /* for CHAR_BIT */
11021 #define TYPE_MINIMUM(t) \
11022 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
11023 #define TYPE_MAXIMUM(t) \
11024 ((t) ((t) 0 < (t) -1 \
11025 ? (t) -1 \
11026 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
11027 struct s {
11028 int check_PTRDIFF:
11029 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
11030 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
11031 ? 1 : -1;
11032 /* Detect bug in FreeBSD 6.0 / ia64. */
11033 int check_SIG_ATOMIC:
11034 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
11035 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
11036 ? 1 : -1;
11037 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
11038 int check_WCHAR:
11039 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
11040 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
11041 ? 1 : -1;
11042 /* Detect bug in mingw. */
11043 int check_WINT:
11044 WINT_MIN == TYPE_MINIMUM (wint_t)
11045 && WINT_MAX == TYPE_MAXIMUM (wint_t)
11046 ? 1 : -1;
11047
11048 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
11049 int check_UINT8_C:
11050 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
11051 int check_UINT16_C:
11052 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
11053
11054 /* Detect bugs in OpenBSD 3.9 stdint.h. */
11055 #ifdef UINT8_MAX
11056 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
11057 #endif
11058 #ifdef UINT16_MAX
11059 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
11060 #endif
11061 #ifdef UINT32_MAX
11062 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
11063 #endif
11064 #ifdef UINT64_MAX
11065 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
11066 #endif
11067 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
11068 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
11069 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
11070 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
11071 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
11072 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
11073 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
11074 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
11075 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
11076 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
11077 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
11078 };
11079
11080 int
11081 main ()
11082 {
11083
11084 ;
11085 return 0;
11086 }
11087 _ACEOF
11088 if ac_fn_c_try_compile "$LINENO"; then :
11089 if test "$cross_compiling" = yes; then :
11090 gl_cv_header_working_stdint_h=yes
11091
11092 else
11093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11094 /* end confdefs.h. */
11095
11096
11097 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
11098 #define __STDC_CONSTANT_MACROS 1
11099 #define __STDC_LIMIT_MACROS 1
11100 #include <stdint.h>
11101
11102
11103 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11104 included before <wchar.h>. */
11105 #include <stddef.h>
11106 #include <signal.h>
11107 #if HAVE_WCHAR_H
11108 # include <stdio.h>
11109 # include <time.h>
11110 # include <wchar.h>
11111 #endif
11112
11113
11114 #include <stdio.h>
11115 #include <string.h>
11116 #define MVAL(macro) MVAL1(macro)
11117 #define MVAL1(expression) #expression
11118 static const char *macro_values[] =
11119 {
11120 #ifdef INT8_MAX
11121 MVAL (INT8_MAX),
11122 #endif
11123 #ifdef INT16_MAX
11124 MVAL (INT16_MAX),
11125 #endif
11126 #ifdef INT32_MAX
11127 MVAL (INT32_MAX),
11128 #endif
11129 #ifdef INT64_MAX
11130 MVAL (INT64_MAX),
11131 #endif
11132 #ifdef UINT8_MAX
11133 MVAL (UINT8_MAX),
11134 #endif
11135 #ifdef UINT16_MAX
11136 MVAL (UINT16_MAX),
11137 #endif
11138 #ifdef UINT32_MAX
11139 MVAL (UINT32_MAX),
11140 #endif
11141 #ifdef UINT64_MAX
11142 MVAL (UINT64_MAX),
11143 #endif
11144 NULL
11145 };
11146
11147 int
11148 main ()
11149 {
11150
11151 const char **mv;
11152 for (mv = macro_values; *mv != NULL; mv++)
11153 {
11154 const char *value = *mv;
11155 /* Test whether it looks like a cast expression. */
11156 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
11157 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
11158 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
11159 || strncmp (value, "((int)"/*)*/, 6) == 0
11160 || strncmp (value, "((signed short)"/*)*/, 15) == 0
11161 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
11162 return mv - macro_values + 1;
11163 }
11164 return 0;
11165
11166 ;
11167 return 0;
11168 }
11169 _ACEOF
11170 if ac_fn_c_try_run "$LINENO"; then :
11171 gl_cv_header_working_stdint_h=yes
11172 fi
11173 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11174 conftest.$ac_objext conftest.beam conftest.$ac_ext
11175 fi
11176
11177
11178 fi
11179 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11180
11181 fi
11182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
11183 $as_echo "$gl_cv_header_working_stdint_h" >&6; }
11184 fi
11185
11186 HAVE_C99_STDINT_H=0
11187 HAVE_SYS_BITYPES_H=0
11188 HAVE_SYS_INTTYPES_H=0
11189 STDINT_H=stdint.h
11190 if test "$gl_cv_header_working_stdint_h" = yes; then
11191 HAVE_C99_STDINT_H=1
11192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h predates C++11" >&5
11193 $as_echo_n "checking whether stdint.h predates C++11... " >&6; }
11194 if ${gl_cv_header_stdint_predates_cxx11_h+:} false; then :
11195 $as_echo_n "(cached) " >&6
11196 else
11197 gl_cv_header_stdint_predates_cxx11_h=yes
11198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11199 /* end confdefs.h. */
11200
11201
11202 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
11203 #include <stdint.h>
11204
11205
11206 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11207 included before <wchar.h>. */
11208 #include <stddef.h>
11209 #include <signal.h>
11210 #if HAVE_WCHAR_H
11211 # include <stdio.h>
11212 # include <time.h>
11213 # include <wchar.h>
11214 #endif
11215
11216
11217 intmax_t im = INTMAX_MAX;
11218 int32_t i32 = INT32_C (0x7fffffff);
11219
11220 int
11221 main ()
11222 {
11223
11224 ;
11225 return 0;
11226 }
11227 _ACEOF
11228 if ac_fn_c_try_compile "$LINENO"; then :
11229 gl_cv_header_stdint_predates_cxx11_h=no
11230 fi
11231 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11232 fi
11233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_predates_cxx11_h" >&5
11234 $as_echo "$gl_cv_header_stdint_predates_cxx11_h" >&6; }
11235
11236 if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then
11237
11238 $as_echo "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
11239
11240
11241 $as_echo "#define __STDC_LIMIT_MACROS 1" >>confdefs.h
11242
11243 fi
11244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5
11245 $as_echo_n "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; }
11246 if ${gl_cv_header_stdint_width+:} false; then :
11247 $as_echo_n "(cached) " >&6
11248 else
11249 gl_cv_header_stdint_width=no
11250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11251 /* end confdefs.h. */
11252
11253 /* Work if build is not clean. */
11254 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
11255 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
11256 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
11257 #endif
11258 #include <stdint.h>
11259
11260 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11261 included before <wchar.h>. */
11262 #include <stddef.h>
11263 #include <signal.h>
11264 #if HAVE_WCHAR_H
11265 # include <stdio.h>
11266 # include <time.h>
11267 # include <wchar.h>
11268 #endif
11269
11270 int iw = UINTMAX_WIDTH;
11271
11272 int
11273 main ()
11274 {
11275
11276 ;
11277 return 0;
11278 }
11279 _ACEOF
11280 if ac_fn_c_try_compile "$LINENO"; then :
11281 gl_cv_header_stdint_width=yes
11282 fi
11283 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11284 fi
11285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5
11286 $as_echo "$gl_cv_header_stdint_width" >&6; }
11287 if test "$gl_cv_header_stdint_width" = yes; then
11288 STDINT_H=
11289 fi
11290 else
11291 for ac_header in sys/inttypes.h sys/bitypes.h
11292 do :
11293 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11294 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11295 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
11296 cat >>confdefs.h <<_ACEOF
11297 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11298 _ACEOF
11299
11300 fi
11301
11302 done
11303
11304 if test $ac_cv_header_sys_inttypes_h = yes; then
11305 HAVE_SYS_INTTYPES_H=1
11306 fi
11307 if test $ac_cv_header_sys_bitypes_h = yes; then
11308 HAVE_SYS_BITYPES_H=1
11309 fi
11310
11311
11312 if test $APPLE_UNIVERSAL_BUILD = 0; then
11313
11314
11315 for gltype in ptrdiff_t size_t ; do
11316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
11317 $as_echo_n "checking for bit size of $gltype... " >&6; }
11318 if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
11319 $as_echo_n "(cached) " >&6
11320 else
11321 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
11322 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11323 included before <wchar.h>. */
11324 #include <stddef.h>
11325 #include <signal.h>
11326 #if HAVE_WCHAR_H
11327 # include <stdio.h>
11328 # include <time.h>
11329 # include <wchar.h>
11330 #endif
11331
11332 #include <limits.h>"; then :
11333
11334 else
11335 result=unknown
11336 fi
11337
11338 eval gl_cv_bitsizeof_${gltype}=\$result
11339
11340 fi
11341 eval ac_res=\$gl_cv_bitsizeof_${gltype}
11342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11343 $as_echo "$ac_res" >&6; }
11344 eval result=\$gl_cv_bitsizeof_${gltype}
11345 if test $result = unknown; then
11346 result=0
11347 fi
11348 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
11349 cat >>confdefs.h <<_ACEOF
11350 #define BITSIZEOF_${GLTYPE} $result
11351 _ACEOF
11352
11353 eval BITSIZEOF_${GLTYPE}=\$result
11354 done
11355
11356
11357 fi
11358
11359
11360 for gltype in sig_atomic_t wchar_t wint_t ; do
11361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
11362 $as_echo_n "checking for bit size of $gltype... " >&6; }
11363 if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
11364 $as_echo_n "(cached) " >&6
11365 else
11366 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
11367 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11368 included before <wchar.h>. */
11369 #include <stddef.h>
11370 #include <signal.h>
11371 #if HAVE_WCHAR_H
11372 # include <stdio.h>
11373 # include <time.h>
11374 # include <wchar.h>
11375 #endif
11376
11377 #include <limits.h>"; then :
11378
11379 else
11380 result=unknown
11381 fi
11382
11383 eval gl_cv_bitsizeof_${gltype}=\$result
11384
11385 fi
11386 eval ac_res=\$gl_cv_bitsizeof_${gltype}
11387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11388 $as_echo "$ac_res" >&6; }
11389 eval result=\$gl_cv_bitsizeof_${gltype}
11390 if test $result = unknown; then
11391 result=0
11392 fi
11393 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
11394 cat >>confdefs.h <<_ACEOF
11395 #define BITSIZEOF_${GLTYPE} $result
11396 _ACEOF
11397
11398 eval BITSIZEOF_${GLTYPE}=\$result
11399 done
11400
11401
11402
11403
11404 for gltype in sig_atomic_t wchar_t wint_t ; do
11405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
11406 $as_echo_n "checking whether $gltype is signed... " >&6; }
11407 if eval \${gl_cv_type_${gltype}_signed+:} false; then :
11408 $as_echo_n "(cached) " >&6
11409 else
11410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11411 /* end confdefs.h. */
11412
11413 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11414 included before <wchar.h>. */
11415 #include <stddef.h>
11416 #include <signal.h>
11417 #if HAVE_WCHAR_H
11418 # include <stdio.h>
11419 # include <time.h>
11420 # include <wchar.h>
11421 #endif
11422
11423 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
11424 int
11425 main ()
11426 {
11427
11428 ;
11429 return 0;
11430 }
11431 _ACEOF
11432 if ac_fn_c_try_compile "$LINENO"; then :
11433 result=yes
11434 else
11435 result=no
11436 fi
11437 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11438 eval gl_cv_type_${gltype}_signed=\$result
11439
11440 fi
11441 eval ac_res=\$gl_cv_type_${gltype}_signed
11442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11443 $as_echo "$ac_res" >&6; }
11444 eval result=\$gl_cv_type_${gltype}_signed
11445 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
11446 if test "$result" = yes; then
11447 cat >>confdefs.h <<_ACEOF
11448 #define HAVE_SIGNED_${GLTYPE} 1
11449 _ACEOF
11450
11451 eval HAVE_SIGNED_${GLTYPE}=1
11452 else
11453 eval HAVE_SIGNED_${GLTYPE}=0
11454 fi
11455 done
11456
11457
11458 gl_cv_type_ptrdiff_t_signed=yes
11459 gl_cv_type_size_t_signed=no
11460 if test $APPLE_UNIVERSAL_BUILD = 0; then
11461
11462
11463 for gltype in ptrdiff_t size_t ; do
11464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
11465 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
11466 if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
11467 $as_echo_n "(cached) " >&6
11468 else
11469 eval gl_cv_type_${gltype}_suffix=no
11470 eval result=\$gl_cv_type_${gltype}_signed
11471 if test "$result" = yes; then
11472 glsufu=
11473 else
11474 glsufu=u
11475 fi
11476 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
11477 case $glsuf in
11478 '') gltype1='int';;
11479 l) gltype1='long int';;
11480 ll) gltype1='long long int';;
11481 i64) gltype1='__int64';;
11482 u) gltype1='unsigned int';;
11483 ul) gltype1='unsigned long int';;
11484 ull) gltype1='unsigned long long int';;
11485 ui64)gltype1='unsigned __int64';;
11486 esac
11487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11488 /* end confdefs.h. */
11489
11490 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11491 included before <wchar.h>. */
11492 #include <stddef.h>
11493 #include <signal.h>
11494 #if HAVE_WCHAR_H
11495 # include <stdio.h>
11496 # include <time.h>
11497 # include <wchar.h>
11498 #endif
11499
11500 extern $gltype foo;
11501 extern $gltype1 foo;
11502 int
11503 main ()
11504 {
11505
11506 ;
11507 return 0;
11508 }
11509 _ACEOF
11510 if ac_fn_c_try_compile "$LINENO"; then :
11511 eval gl_cv_type_${gltype}_suffix=\$glsuf
11512 fi
11513 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11514 eval result=\$gl_cv_type_${gltype}_suffix
11515 test "$result" != no && break
11516 done
11517 fi
11518 eval ac_res=\$gl_cv_type_${gltype}_suffix
11519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11520 $as_echo "$ac_res" >&6; }
11521 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
11522 eval result=\$gl_cv_type_${gltype}_suffix
11523 test "$result" = no && result=
11524 eval ${GLTYPE}_SUFFIX=\$result
11525 cat >>confdefs.h <<_ACEOF
11526 #define ${GLTYPE}_SUFFIX $result
11527 _ACEOF
11528
11529 done
11530
11531
11532 fi
11533
11534
11535 for gltype in sig_atomic_t wchar_t wint_t ; do
11536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
11537 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
11538 if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
11539 $as_echo_n "(cached) " >&6
11540 else
11541 eval gl_cv_type_${gltype}_suffix=no
11542 eval result=\$gl_cv_type_${gltype}_signed
11543 if test "$result" = yes; then
11544 glsufu=
11545 else
11546 glsufu=u
11547 fi
11548 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
11549 case $glsuf in
11550 '') gltype1='int';;
11551 l) gltype1='long int';;
11552 ll) gltype1='long long int';;
11553 i64) gltype1='__int64';;
11554 u) gltype1='unsigned int';;
11555 ul) gltype1='unsigned long int';;
11556 ull) gltype1='unsigned long long int';;
11557 ui64)gltype1='unsigned __int64';;
11558 esac
11559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11560 /* end confdefs.h. */
11561
11562 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11563 included before <wchar.h>. */
11564 #include <stddef.h>
11565 #include <signal.h>
11566 #if HAVE_WCHAR_H
11567 # include <stdio.h>
11568 # include <time.h>
11569 # include <wchar.h>
11570 #endif
11571
11572 extern $gltype foo;
11573 extern $gltype1 foo;
11574 int
11575 main ()
11576 {
11577
11578 ;
11579 return 0;
11580 }
11581 _ACEOF
11582 if ac_fn_c_try_compile "$LINENO"; then :
11583 eval gl_cv_type_${gltype}_suffix=\$glsuf
11584 fi
11585 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11586 eval result=\$gl_cv_type_${gltype}_suffix
11587 test "$result" != no && break
11588 done
11589 fi
11590 eval ac_res=\$gl_cv_type_${gltype}_suffix
11591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11592 $as_echo "$ac_res" >&6; }
11593 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
11594 eval result=\$gl_cv_type_${gltype}_suffix
11595 test "$result" = no && result=
11596 eval ${GLTYPE}_SUFFIX=\$result
11597 cat >>confdefs.h <<_ACEOF
11598 #define ${GLTYPE}_SUFFIX $result
11599 _ACEOF
11600
11601 done
11602
11603
11604
11605 if test $BITSIZEOF_WINT_T -lt 32; then
11606 BITSIZEOF_WINT_T=32
11607 fi
11608
11609 fi
11610
11611 # The substitute stdint.h needs the substitute limit.h's _GL_INTEGER_WIDTH.
11612 LIMITS_H=limits.h
11613 if test -n "$LIMITS_H"; then
11614 GL_GENERATE_LIMITS_H_TRUE=
11615 GL_GENERATE_LIMITS_H_FALSE='#'
11616 else
11617 GL_GENERATE_LIMITS_H_TRUE='#'
11618 GL_GENERATE_LIMITS_H_FALSE=
11619 fi
11620
11621
11622
11623
11624
11625
11626 if test -n "$STDINT_H"; then
11627 GL_GENERATE_STDINT_H_TRUE=
11628 GL_GENERATE_STDINT_H_FALSE='#'
11629 else
11630 GL_GENERATE_STDINT_H_TRUE='#'
11631 GL_GENERATE_STDINT_H_FALSE=
11632 fi
11633
11634
11635
11636
11637
11638
11639
11640
11641 GNULIB_IMAXABS=0;
11642 GNULIB_IMAXDIV=0;
11643 GNULIB_STRTOIMAX=0;
11644 GNULIB_STRTOUMAX=0;
11645 HAVE_DECL_IMAXABS=1;
11646 HAVE_DECL_IMAXDIV=1;
11647 HAVE_DECL_STRTOIMAX=1;
11648 HAVE_DECL_STRTOUMAX=1;
11649 REPLACE_STRTOIMAX=0;
11650 REPLACE_STRTOUMAX=0;
11651 INT32_MAX_LT_INTMAX_MAX=1;
11652 INT64_MAX_EQ_LONG_MAX='defined _LP64';
11653 PRI_MACROS_BROKEN=0;
11654 PRIPTR_PREFIX=__PRIPTR_PREFIX;
11655 UINT32_MAX_LT_UINTMAX_MAX=1;
11656 UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
11657
11658
11659
11660
11661 :
11662
11663
11664
11665
11666
11667
11668
11669
11670
11671
11672
11673
11674
11675 :
11676
11677
11678
11679
11680
11681
11682
11683
11684 if test $gl_cv_have_include_next = yes; then
11685 gl_cv_next_inttypes_h='<'inttypes.h'>'
11686 else
11687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
11688 $as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
11689 if ${gl_cv_next_inttypes_h+:} false; then :
11690 $as_echo_n "(cached) " >&6
11691 else
11692
11693 if test $ac_cv_header_inttypes_h = yes; then
11694
11695
11696
11697
11698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11699 /* end confdefs.h. */
11700 #include <inttypes.h>
11701 _ACEOF
11702 case "$host_os" in
11703 aix*) gl_absname_cpp="$ac_cpp -C" ;;
11704 *) gl_absname_cpp="$ac_cpp" ;;
11705 esac
11706
11707 case "$host_os" in
11708 mingw*)
11709 gl_dirsep_regex='[/\\]'
11710 ;;
11711 *)
11712 gl_dirsep_regex='\/'
11713 ;;
11714 esac
11715 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11716 gl_header_literal_regex=`echo 'inttypes.h' \
11717 | sed -e "$gl_make_literal_regex_sed"`
11718 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11719 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11720 s|^/[^/]|//&|
11721 p
11722 q
11723 }'
11724
11725 gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11726 sed -n "$gl_absolute_header_sed"`
11727
11728 gl_header=$gl_cv_absolute_inttypes_h
11729 gl_cv_next_inttypes_h='"'$gl_header'"'
11730 else
11731 gl_cv_next_inttypes_h='<'inttypes.h'>'
11732 fi
11733
11734
11735 fi
11736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
11737 $as_echo "$gl_cv_next_inttypes_h" >&6; }
11738 fi
11739 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
11740
11741 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11742 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11743 gl_next_as_first_directive='<'inttypes.h'>'
11744 else
11745 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11746 gl_next_as_first_directive=$gl_cv_next_inttypes_h
11747 fi
11748 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
11749
11750
11751
11752
11753
11754
11755
11756
11757 for gl_func in imaxabs imaxdiv strtoimax strtoumax; do
11758 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
11759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
11760 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
11761 if eval \${$as_gl_Symbol+:} false; then :
11762 $as_echo_n "(cached) " >&6
11763 else
11764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11765 /* end confdefs.h. */
11766 #include <inttypes.h>
11767
11768 int
11769 main ()
11770 {
11771 #undef $gl_func
11772 (void) $gl_func;
11773 ;
11774 return 0;
11775 }
11776 _ACEOF
11777 if ac_fn_c_try_compile "$LINENO"; then :
11778 eval "$as_gl_Symbol=yes"
11779 else
11780 eval "$as_gl_Symbol=no"
11781 fi
11782 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11783 fi
11784 eval ac_res=\$$as_gl_Symbol
11785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11786 $as_echo "$ac_res" >&6; }
11787 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
11788 cat >>confdefs.h <<_ACEOF
11789 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
11790 _ACEOF
11791
11792 eval ac_cv_have_decl_$gl_func=yes
11793 fi
11794 done
11795
11796
11797
11798 for ac_header in inttypes.h
11799 do :
11800 ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
11801 if test "x$ac_cv_header_inttypes_h" = xyes; then :
11802 cat >>confdefs.h <<_ACEOF
11803 #define HAVE_INTTYPES_H 1
11804 _ACEOF
11805
11806 fi
11807
11808 done
11809
11810 if test $ac_cv_header_inttypes_h = yes; then
11811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5
11812 $as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; }
11813 if ${gt_cv_inttypes_pri_broken+:} false; then :
11814 $as_echo_n "(cached) " >&6
11815 else
11816
11817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11818 /* end confdefs.h. */
11819
11820 #include <inttypes.h>
11821 #ifdef PRId32
11822 char *p = PRId32;
11823 #endif
11824
11825 int
11826 main ()
11827 {
11828
11829 ;
11830 return 0;
11831 }
11832 _ACEOF
11833 if ac_fn_c_try_compile "$LINENO"; then :
11834 gt_cv_inttypes_pri_broken=no
11835 else
11836 gt_cv_inttypes_pri_broken=yes
11837 fi
11838 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11839
11840 fi
11841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5
11842 $as_echo "$gt_cv_inttypes_pri_broken" >&6; }
11843 fi
11844 if test "$gt_cv_inttypes_pri_broken" = yes; then
11845
11846 cat >>confdefs.h <<_ACEOF
11847 #define PRI_MACROS_BROKEN 1
11848 _ACEOF
11849
11850 PRI_MACROS_BROKEN=1
11851 else
11852 PRI_MACROS_BROKEN=0
11853 fi
11854
11855
11856
11857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
11858 $as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
11859 if ${gl_cv_cc_double_expbit0+:} false; then :
11860 $as_echo_n "(cached) " >&6
11861 else
11862
11863 if test "$cross_compiling" = yes; then :
11864
11865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11866 /* end confdefs.h. */
11867
11868 #if defined arm || defined __arm || defined __arm__
11869 mixed_endianness
11870 #endif
11871
11872 _ACEOF
11873 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11874 $EGREP "mixed_endianness" >/dev/null 2>&1; then :
11875 gl_cv_cc_double_expbit0="unknown"
11876 else
11877
11878 :
11879 if ${ac_cv_c_bigendian+:} false; then :
11880 $as_echo_n "(cached) " >&6
11881 else
11882 ac_cv_c_bigendian=unknown
11883 # See if we're dealing with a universal compiler.
11884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11885 /* end confdefs.h. */
11886 #ifndef __APPLE_CC__
11887 not a universal capable compiler
11888 #endif
11889 typedef int dummy;
11890
11891 _ACEOF
11892 if ac_fn_c_try_compile "$LINENO"; then :
11893
11894 # Check for potential -arch flags. It is not universal unless
11895 # there are at least two -arch flags with different values.
11896 ac_arch=
11897 ac_prev=
11898 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
11899 if test -n "$ac_prev"; then
11900 case $ac_word in
11901 i?86 | x86_64 | ppc | ppc64)
11902 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
11903 ac_arch=$ac_word
11904 else
11905 ac_cv_c_bigendian=universal
11906 break
11907 fi
11908 ;;
11909 esac
11910 ac_prev=
11911 elif test "x$ac_word" = "x-arch"; then
11912 ac_prev=arch
11913 fi
11914 done
11915 fi
11916 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11917 if test $ac_cv_c_bigendian = unknown; then
11918 # See if sys/param.h defines the BYTE_ORDER macro.
11919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11920 /* end confdefs.h. */
11921 #include <sys/types.h>
11922 #include <sys/param.h>
11923
11924 int
11925 main ()
11926 {
11927 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
11928 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
11929 && LITTLE_ENDIAN)
11930 bogus endian macros
11931 #endif
11932
11933 ;
11934 return 0;
11935 }
11936 _ACEOF
11937 if ac_fn_c_try_compile "$LINENO"; then :
11938 # It does; now see whether it defined to BIG_ENDIAN or not.
11939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11940 /* end confdefs.h. */
11941 #include <sys/types.h>
11942 #include <sys/param.h>
11943
11944 int
11945 main ()
11946 {
11947 #if BYTE_ORDER != BIG_ENDIAN
11948 not big endian
11949 #endif
11950
11951 ;
11952 return 0;
11953 }
11954 _ACEOF
11955 if ac_fn_c_try_compile "$LINENO"; then :
11956 ac_cv_c_bigendian=yes
11957 else
11958 ac_cv_c_bigendian=no
11959 fi
11960 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11961 fi
11962 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11963 fi
11964 if test $ac_cv_c_bigendian = unknown; then
11965 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
11966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11967 /* end confdefs.h. */
11968 #include <limits.h>
11969
11970 int
11971 main ()
11972 {
11973 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
11974 bogus endian macros
11975 #endif
11976
11977 ;
11978 return 0;
11979 }
11980 _ACEOF
11981 if ac_fn_c_try_compile "$LINENO"; then :
11982 # It does; now see whether it defined to _BIG_ENDIAN or not.
11983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11984 /* end confdefs.h. */
11985 #include <limits.h>
11986
11987 int
11988 main ()
11989 {
11990 #ifndef _BIG_ENDIAN
11991 not big endian
11992 #endif
11993
11994 ;
11995 return 0;
11996 }
11997 _ACEOF
11998 if ac_fn_c_try_compile "$LINENO"; then :
11999 ac_cv_c_bigendian=yes
12000 else
12001 ac_cv_c_bigendian=no
12002 fi
12003 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12004 fi
12005 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12006 fi
12007 if test $ac_cv_c_bigendian = unknown; then
12008 # Compile a test program.
12009 if test "$cross_compiling" = yes; then :
12010 # Try to guess by grepping values from an object file.
12011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12012 /* end confdefs.h. */
12013 short int ascii_mm[] =
12014 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12015 short int ascii_ii[] =
12016 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12017 int use_ascii (int i) {
12018 return ascii_mm[i] + ascii_ii[i];
12019 }
12020 short int ebcdic_ii[] =
12021 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12022 short int ebcdic_mm[] =
12023 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12024 int use_ebcdic (int i) {
12025 return ebcdic_mm[i] + ebcdic_ii[i];
12026 }
12027 extern int foo;
12028
12029 int
12030 main ()
12031 {
12032 return use_ascii (foo) == use_ebcdic (foo);
12033 ;
12034 return 0;
12035 }
12036 _ACEOF
12037 if ac_fn_c_try_compile "$LINENO"; then :
12038 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12039 ac_cv_c_bigendian=yes
12040 fi
12041 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12042 if test "$ac_cv_c_bigendian" = unknown; then
12043 ac_cv_c_bigendian=no
12044 else
12045 # finding both strings is unlikely to happen, but who knows?
12046 ac_cv_c_bigendian=unknown
12047 fi
12048 fi
12049 fi
12050 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12051 else
12052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12053 /* end confdefs.h. */
12054 $ac_includes_default
12055 int
12056 main ()
12057 {
12058
12059 /* Are we little or big endian? From Harbison&Steele. */
12060 union
12061 {
12062 long int l;
12063 char c[sizeof (long int)];
12064 } u;
12065 u.l = 1;
12066 return u.c[sizeof (long int) - 1] == 1;
12067
12068 ;
12069 return 0;
12070 }
12071 _ACEOF
12072 if ac_fn_c_try_run "$LINENO"; then :
12073 ac_cv_c_bigendian=no
12074 else
12075 ac_cv_c_bigendian=yes
12076 fi
12077 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12078 conftest.$ac_objext conftest.beam conftest.$ac_ext
12079 fi
12080
12081 fi
12082 fi
12083 :
12084 case $ac_cv_c_bigendian in #(
12085 yes)
12086 gl_cv_cc_double_expbit0="word 0 bit 20";; #(
12087 no)
12088 gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
12089 universal)
12090
12091 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12092
12093 ;; #(
12094 *)
12095 gl_cv_cc_double_expbit0="unknown" ;;
12096 esac
12097
12098
12099 fi
12100 rm -f conftest*
12101
12102
12103 else
12104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12105 /* end confdefs.h. */
12106
12107 #include <float.h>
12108 #include <stddef.h>
12109 #include <stdio.h>
12110 #include <string.h>
12111 #define NWORDS \
12112 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
12113 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
12114 static unsigned int ored_words[NWORDS];
12115 static unsigned int anded_words[NWORDS];
12116 static void add_to_ored_words (double x)
12117 {
12118 memory_double m;
12119 size_t i;
12120 /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
12121 memset (&m, 0, sizeof (memory_double));
12122 m.value = x;
12123 for (i = 0; i < NWORDS; i++)
12124 {
12125 ored_words[i] |= m.word[i];
12126 anded_words[i] &= m.word[i];
12127 }
12128 }
12129 int main ()
12130 {
12131 size_t j;
12132 FILE *fp = fopen ("conftest.out", "w");
12133 if (fp == NULL)
12134 return 1;
12135 for (j = 0; j < NWORDS; j++)
12136 anded_words[j] = ~ (unsigned int) 0;
12137 add_to_ored_words (0.25);
12138 add_to_ored_words (0.5);
12139 add_to_ored_words (1.0);
12140 add_to_ored_words (2.0);
12141 add_to_ored_words (4.0);
12142 /* Remove bits that are common (e.g. if representation of the first mantissa
12143 bit is explicit). */
12144 for (j = 0; j < NWORDS; j++)
12145 ored_words[j] &= ~anded_words[j];
12146 /* Now find the nonzero word. */
12147 for (j = 0; j < NWORDS; j++)
12148 if (ored_words[j] != 0)
12149 break;
12150 if (j < NWORDS)
12151 {
12152 size_t i;
12153 for (i = j + 1; i < NWORDS; i++)
12154 if (ored_words[i] != 0)
12155 {
12156 fprintf (fp, "unknown");
12157 return (fclose (fp) != 0);
12158 }
12159 for (i = 0; ; i++)
12160 if ((ored_words[j] >> i) & 1)
12161 {
12162 fprintf (fp, "word %d bit %d", (int) j, (int) i);
12163 return (fclose (fp) != 0);
12164 }
12165 }
12166 fprintf (fp, "unknown");
12167 return (fclose (fp) != 0);
12168 }
12169
12170 _ACEOF
12171 if ac_fn_c_try_run "$LINENO"; then :
12172 gl_cv_cc_double_expbit0=`cat conftest.out`
12173 else
12174 gl_cv_cc_double_expbit0="unknown"
12175 fi
12176 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12177 conftest.$ac_objext conftest.beam conftest.$ac_ext
12178 fi
12179
12180 rm -f conftest.out
12181
12182 fi
12183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
12184 $as_echo "$gl_cv_cc_double_expbit0" >&6; }
12185 case "$gl_cv_cc_double_expbit0" in
12186 word*bit*)
12187 word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
12188 bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
12189
12190 cat >>confdefs.h <<_ACEOF
12191 #define DBL_EXPBIT0_WORD $word
12192 _ACEOF
12193
12194
12195 cat >>confdefs.h <<_ACEOF
12196 #define DBL_EXPBIT0_BIT $bit
12197 _ACEOF
12198
12199 ;;
12200 esac
12201
12202
12203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12204 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12205 if ${ac_cv_c_bigendian+:} false; then :
12206 $as_echo_n "(cached) " >&6
12207 else
12208 ac_cv_c_bigendian=unknown
12209 # See if we're dealing with a universal compiler.
12210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12211 /* end confdefs.h. */
12212 #ifndef __APPLE_CC__
12213 not a universal capable compiler
12214 #endif
12215 typedef int dummy;
12216
12217 _ACEOF
12218 if ac_fn_c_try_compile "$LINENO"; then :
12219
12220 # Check for potential -arch flags. It is not universal unless
12221 # there are at least two -arch flags with different values.
12222 ac_arch=
12223 ac_prev=
12224 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12225 if test -n "$ac_prev"; then
12226 case $ac_word in
12227 i?86 | x86_64 | ppc | ppc64)
12228 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12229 ac_arch=$ac_word
12230 else
12231 ac_cv_c_bigendian=universal
12232 break
12233 fi
12234 ;;
12235 esac
12236 ac_prev=
12237 elif test "x$ac_word" = "x-arch"; then
12238 ac_prev=arch
12239 fi
12240 done
12241 fi
12242 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12243 if test $ac_cv_c_bigendian = unknown; then
12244 # See if sys/param.h defines the BYTE_ORDER macro.
12245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12246 /* end confdefs.h. */
12247 #include <sys/types.h>
12248 #include <sys/param.h>
12249
12250 int
12251 main ()
12252 {
12253 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12254 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12255 && LITTLE_ENDIAN)
12256 bogus endian macros
12257 #endif
12258
12259 ;
12260 return 0;
12261 }
12262 _ACEOF
12263 if ac_fn_c_try_compile "$LINENO"; then :
12264 # It does; now see whether it defined to BIG_ENDIAN or not.
12265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12266 /* end confdefs.h. */
12267 #include <sys/types.h>
12268 #include <sys/param.h>
12269
12270 int
12271 main ()
12272 {
12273 #if BYTE_ORDER != BIG_ENDIAN
12274 not big endian
12275 #endif
12276
12277 ;
12278 return 0;
12279 }
12280 _ACEOF
12281 if ac_fn_c_try_compile "$LINENO"; then :
12282 ac_cv_c_bigendian=yes
12283 else
12284 ac_cv_c_bigendian=no
12285 fi
12286 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12287 fi
12288 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12289 fi
12290 if test $ac_cv_c_bigendian = unknown; then
12291 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12293 /* end confdefs.h. */
12294 #include <limits.h>
12295
12296 int
12297 main ()
12298 {
12299 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12300 bogus endian macros
12301 #endif
12302
12303 ;
12304 return 0;
12305 }
12306 _ACEOF
12307 if ac_fn_c_try_compile "$LINENO"; then :
12308 # It does; now see whether it defined to _BIG_ENDIAN or not.
12309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12310 /* end confdefs.h. */
12311 #include <limits.h>
12312
12313 int
12314 main ()
12315 {
12316 #ifndef _BIG_ENDIAN
12317 not big endian
12318 #endif
12319
12320 ;
12321 return 0;
12322 }
12323 _ACEOF
12324 if ac_fn_c_try_compile "$LINENO"; then :
12325 ac_cv_c_bigendian=yes
12326 else
12327 ac_cv_c_bigendian=no
12328 fi
12329 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12330 fi
12331 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12332 fi
12333 if test $ac_cv_c_bigendian = unknown; then
12334 # Compile a test program.
12335 if test "$cross_compiling" = yes; then :
12336 # Try to guess by grepping values from an object file.
12337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12338 /* end confdefs.h. */
12339 short int ascii_mm[] =
12340 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12341 short int ascii_ii[] =
12342 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12343 int use_ascii (int i) {
12344 return ascii_mm[i] + ascii_ii[i];
12345 }
12346 short int ebcdic_ii[] =
12347 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12348 short int ebcdic_mm[] =
12349 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12350 int use_ebcdic (int i) {
12351 return ebcdic_mm[i] + ebcdic_ii[i];
12352 }
12353 extern int foo;
12354
12355 int
12356 main ()
12357 {
12358 return use_ascii (foo) == use_ebcdic (foo);
12359 ;
12360 return 0;
12361 }
12362 _ACEOF
12363 if ac_fn_c_try_compile "$LINENO"; then :
12364 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12365 ac_cv_c_bigendian=yes
12366 fi
12367 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12368 if test "$ac_cv_c_bigendian" = unknown; then
12369 ac_cv_c_bigendian=no
12370 else
12371 # finding both strings is unlikely to happen, but who knows?
12372 ac_cv_c_bigendian=unknown
12373 fi
12374 fi
12375 fi
12376 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12377 else
12378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12379 /* end confdefs.h. */
12380 $ac_includes_default
12381 int
12382 main ()
12383 {
12384
12385 /* Are we little or big endian? From Harbison&Steele. */
12386 union
12387 {
12388 long int l;
12389 char c[sizeof (long int)];
12390 } u;
12391 u.l = 1;
12392 return u.c[sizeof (long int) - 1] == 1;
12393
12394 ;
12395 return 0;
12396 }
12397 _ACEOF
12398 if ac_fn_c_try_run "$LINENO"; then :
12399 ac_cv_c_bigendian=no
12400 else
12401 ac_cv_c_bigendian=yes
12402 fi
12403 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12404 conftest.$ac_objext conftest.beam conftest.$ac_ext
12405 fi
12406
12407 fi
12408 fi
12409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12410 $as_echo "$ac_cv_c_bigendian" >&6; }
12411 case $ac_cv_c_bigendian in #(
12412 yes)
12413 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12414 ;; #(
12415 no)
12416 ;; #(
12417 universal)
12418
12419 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12420
12421 ;; #(
12422 *)
12423 as_fn_error $? "unknown endianness
12424 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12425 esac
12426
12427
12428
12429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12430 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12431 if ${am_cv_langinfo_codeset+:} false; then :
12432 $as_echo_n "(cached) " >&6
12433 else
12434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12435 /* end confdefs.h. */
12436 #include <langinfo.h>
12437 int
12438 main ()
12439 {
12440 char* cs = nl_langinfo(CODESET); return !cs;
12441 ;
12442 return 0;
12443 }
12444 _ACEOF
12445 if ac_fn_c_try_link "$LINENO"; then :
12446 am_cv_langinfo_codeset=yes
12447 else
12448 am_cv_langinfo_codeset=no
12449 fi
12450 rm -f core conftest.err conftest.$ac_objext \
12451 conftest$ac_exeext conftest.$ac_ext
12452
12453 fi
12454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12455 $as_echo "$am_cv_langinfo_codeset" >&6; }
12456 if test $am_cv_langinfo_codeset = yes; then
12457
12458 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
12459
12460 fi
12461
12462
12463 ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
12464 if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
12465 ac_have_decl=1
12466 else
12467 ac_have_decl=0
12468 fi
12469
12470 cat >>confdefs.h <<_ACEOF
12471 #define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
12472 _ACEOF
12473
12474
12475
12476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5
12477 $as_echo_n "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; }
12478 if ${ac_cv_gnu_library_2_1+:} false; then :
12479 $as_echo_n "(cached) " >&6
12480 else
12481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12482 /* end confdefs.h. */
12483
12484 #include <features.h>
12485 #ifdef __GNU_LIBRARY__
12486 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
12487 Lucky GNU user
12488 #endif
12489 #endif
12490 #ifdef __UCLIBC__
12491 Lucky user
12492 #endif
12493
12494 _ACEOF
12495 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12496 $EGREP "Lucky" >/dev/null 2>&1; then :
12497 ac_cv_gnu_library_2_1=yes
12498 else
12499 ac_cv_gnu_library_2_1=no
12500 fi
12501 rm -f conftest*
12502
12503
12504
12505 fi
12506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
12507 $as_echo "$ac_cv_gnu_library_2_1" >&6; }
12508
12509 GLIBC21="$ac_cv_gnu_library_2_1"
12510
12511
12512
12513 if test "X$prefix" = "XNONE"; then
12514 acl_final_prefix="$ac_default_prefix"
12515 else
12516 acl_final_prefix="$prefix"
12517 fi
12518 if test "X$exec_prefix" = "XNONE"; then
12519 acl_final_exec_prefix='${prefix}'
12520 else
12521 acl_final_exec_prefix="$exec_prefix"
12522 fi
12523 acl_save_prefix="$prefix"
12524 prefix="$acl_final_prefix"
12525 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
12526 prefix="$acl_save_prefix"
12527
12528
12529
12530 # Check whether --with-gnu-ld was given.
12531 if test "${with_gnu_ld+set}" = set; then :
12532 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
12533 else
12534 with_gnu_ld=no
12535 fi
12536
12537 # Prepare PATH_SEPARATOR.
12538 # The user is always right.
12539 if test "${PATH_SEPARATOR+set}" != set; then
12540 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
12541 # contains only /bin. Note that ksh looks also at the FPATH variable,
12542 # so we have to set that as well for the test.
12543 PATH_SEPARATOR=:
12544 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
12545 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
12546 || PATH_SEPARATOR=';'
12547 }
12548 fi
12549
12550 ac_prog=ld
12551 if test "$GCC" = yes; then
12552 # Check if gcc -print-prog-name=ld gives a path.
12553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
12554 $as_echo_n "checking for ld used by $CC... " >&6; }
12555 case $host in
12556 *-*-mingw*)
12557 # gcc leaves a trailing carriage return which upsets mingw
12558 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
12559 *)
12560 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
12561 esac
12562 case $ac_prog in
12563 # Accept absolute paths.
12564 [\\/]* | ?:[\\/]*)
12565 re_direlt='/[^/][^/]*/\.\./'
12566 # Canonicalize the pathname of ld
12567 ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
12568 while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
12569 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
12570 done
12571 test -z "$LD" && LD="$ac_prog"
12572 ;;
12573 "")
12574 # If it fails, then pretend we aren't using GCC.
12575 ac_prog=ld
12576 ;;
12577 *)
12578 # If it is relative, then search for the first ld in PATH.
12579 with_gnu_ld=unknown
12580 ;;
12581 esac
12582 elif test "$with_gnu_ld" = yes; then
12583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
12584 $as_echo_n "checking for GNU ld... " >&6; }
12585 else
12586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
12587 $as_echo_n "checking for non-GNU ld... " >&6; }
12588 fi
12589 if ${acl_cv_path_LD+:} false; then :
12590 $as_echo_n "(cached) " >&6
12591 else
12592 if test -z "$LD"; then
12593 acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
12594 for ac_dir in $PATH; do
12595 IFS="$acl_save_ifs"
12596 test -z "$ac_dir" && ac_dir=.
12597 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
12598 acl_cv_path_LD="$ac_dir/$ac_prog"
12599 # Check to see if the program is GNU ld. I'd rather use --version,
12600 # but apparently some variants of GNU ld only accept -v.
12601 # Break only if it was the GNU/non-GNU ld that we prefer.
12602 case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
12603 *GNU* | *'with BFD'*)
12604 test "$with_gnu_ld" != no && break
12605 ;;
12606 *)
12607 test "$with_gnu_ld" != yes && break
12608 ;;
12609 esac
12610 fi
12611 done
12612 IFS="$acl_save_ifs"
12613 else
12614 acl_cv_path_LD="$LD" # Let the user override the test with a path.
12615 fi
12616 fi
12617
12618 LD="$acl_cv_path_LD"
12619 if test -n "$LD"; then
12620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
12621 $as_echo "$LD" >&6; }
12622 else
12623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12624 $as_echo "no" >&6; }
12625 fi
12626 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
12627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
12628 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
12629 if ${acl_cv_prog_gnu_ld+:} false; then :
12630 $as_echo_n "(cached) " >&6
12631 else
12632 # I'd rather use --version here, but apparently some GNU lds only accept -v.
12633 case `$LD -v 2>&1 </dev/null` in
12634 *GNU* | *'with BFD'*)
12635 acl_cv_prog_gnu_ld=yes
12636 ;;
12637 *)
12638 acl_cv_prog_gnu_ld=no
12639 ;;
12640 esac
12641 fi
12642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
12643 $as_echo "$acl_cv_prog_gnu_ld" >&6; }
12644 with_gnu_ld=$acl_cv_prog_gnu_ld
12645
12646
12647
12648
12649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
12650 $as_echo_n "checking for shared library run path origin... " >&6; }
12651 if ${acl_cv_rpath+:} false; then :
12652 $as_echo_n "(cached) " >&6
12653 else
12654
12655 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
12656 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
12657 . ./conftest.sh
12658 rm -f ./conftest.sh
12659 acl_cv_rpath=done
12660
12661 fi
12662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
12663 $as_echo "$acl_cv_rpath" >&6; }
12664 wl="$acl_cv_wl"
12665 acl_libext="$acl_cv_libext"
12666 acl_shlibext="$acl_cv_shlibext"
12667 acl_libname_spec="$acl_cv_libname_spec"
12668 acl_library_names_spec="$acl_cv_library_names_spec"
12669 acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
12670 acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
12671 acl_hardcode_direct="$acl_cv_hardcode_direct"
12672 acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
12673 # Check whether --enable-rpath was given.
12674 if test "${enable_rpath+set}" = set; then :
12675 enableval=$enable_rpath; :
12676 else
12677 enable_rpath=yes
12678 fi
12679
12680
12681
12682
12683 acl_libdirstem=lib
12684 acl_libdirstem2=
12685 case "$host_os" in
12686 solaris*)
12687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
12688 $as_echo_n "checking for 64-bit host... " >&6; }
12689 if ${gl_cv_solaris_64bit+:} false; then :
12690 $as_echo_n "(cached) " >&6
12691 else
12692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12693 /* end confdefs.h. */
12694
12695 #ifdef _LP64
12696 sixtyfour bits
12697 #endif
12698
12699 _ACEOF
12700 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12701 $EGREP "sixtyfour bits" >/dev/null 2>&1; then :
12702 gl_cv_solaris_64bit=yes
12703 else
12704 gl_cv_solaris_64bit=no
12705 fi
12706 rm -f conftest*
12707
12708
12709 fi
12710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5
12711 $as_echo "$gl_cv_solaris_64bit" >&6; }
12712 if test $gl_cv_solaris_64bit = yes; then
12713 acl_libdirstem=lib/64
12714 case "$host_cpu" in
12715 sparc*) acl_libdirstem2=lib/sparcv9 ;;
12716 i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
12717 esac
12718 fi
12719 ;;
12720 *)
12721 searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
12722 if test -n "$searchpath"; then
12723 acl_save_IFS="${IFS= }"; IFS=":"
12724 for searchdir in $searchpath; do
12725 if test -d "$searchdir"; then
12726 case "$searchdir" in
12727 */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
12728 */../ | */.. )
12729 # Better ignore directories of this form. They are misleading.
12730 ;;
12731 *) searchdir=`cd "$searchdir" && pwd`
12732 case "$searchdir" in
12733 */lib64 ) acl_libdirstem=lib64 ;;
12734 esac ;;
12735 esac
12736 fi
12737 done
12738 IFS="$acl_save_IFS"
12739 fi
12740 ;;
12741 esac
12742 test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
12743
12744
12745
12746 gl_threads_api=none
12747 LIBTHREAD=
12748 LTLIBTHREAD=
12749 LIBMULTITHREAD=
12750 LTLIBMULTITHREAD=
12751 if test "$gl_use_threads" != no; then
12752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
12753 $as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
12754 if ${gl_cv_have_weak+:} false; then :
12755 $as_echo_n "(cached) " >&6
12756 else
12757 gl_cv_have_weak=no
12758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12759 /* end confdefs.h. */
12760 extern void xyzzy ();
12761 #pragma weak xyzzy
12762 int
12763 main ()
12764 {
12765 xyzzy();
12766 ;
12767 return 0;
12768 }
12769 _ACEOF
12770 if ac_fn_c_try_link "$LINENO"; then :
12771 gl_cv_have_weak=maybe
12772 fi
12773 rm -f core conftest.err conftest.$ac_objext \
12774 conftest$ac_exeext conftest.$ac_ext
12775 if test $gl_cv_have_weak = maybe; then
12776 if test "$cross_compiling" = yes; then :
12777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12778 /* end confdefs.h. */
12779 #ifdef __ELF__
12780 Extensible Linking Format
12781 #endif
12782
12783 _ACEOF
12784 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12785 $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
12786 gl_cv_have_weak="guessing yes"
12787 else
12788 gl_cv_have_weak="guessing no"
12789 fi
12790 rm -f conftest*
12791
12792
12793 else
12794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12795 /* end confdefs.h. */
12796
12797 #include <stdio.h>
12798 #pragma weak fputs
12799 int main ()
12800 {
12801 return (fputs == NULL);
12802 }
12803 _ACEOF
12804 if ac_fn_c_try_run "$LINENO"; then :
12805 gl_cv_have_weak=yes
12806 else
12807 gl_cv_have_weak=no
12808 fi
12809 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12810 conftest.$ac_objext conftest.beam conftest.$ac_ext
12811 fi
12812
12813 fi
12814
12815 fi
12816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
12817 $as_echo "$gl_cv_have_weak" >&6; }
12818 if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
12819 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
12820 # it groks <pthread.h>. It's added above, in gl_THREADLIB_EARLY_BODY.
12821 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
12822 if test "x$ac_cv_header_pthread_h" = xyes; then :
12823 gl_have_pthread_h=yes
12824 else
12825 gl_have_pthread_h=no
12826 fi
12827
12828
12829 if test "$gl_have_pthread_h" = yes; then
12830 # Other possible tests:
12831 # -lpthreads (FSU threads, PCthreads)
12832 # -lgthreads
12833 gl_have_pthread=
12834 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
12835 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
12836 # the second one only in libpthread, and lock.c needs it.
12837 #
12838 # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
12839 # needs -pthread for some reason. See:
12840 # http://lists.gnu.org/archive/html/bug-gnulib/2014-09/msg00023.html
12841 save_LIBS=$LIBS
12842 for gl_pthread in '' '-pthread'; do
12843 LIBS="$LIBS $gl_pthread"
12844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12845 /* end confdefs.h. */
12846 #include <pthread.h>
12847 pthread_mutex_t m;
12848 pthread_mutexattr_t ma;
12849
12850 int
12851 main ()
12852 {
12853 pthread_mutex_lock (&m);
12854 pthread_mutexattr_init (&ma);
12855 ;
12856 return 0;
12857 }
12858 _ACEOF
12859 if ac_fn_c_try_link "$LINENO"; then :
12860 gl_have_pthread=yes
12861 LIBTHREAD=$gl_pthread LTLIBTHREAD=$gl_pthread
12862 LIBMULTITHREAD=$gl_pthread LTLIBMULTITHREAD=$gl_pthread
12863 fi
12864 rm -f core conftest.err conftest.$ac_objext \
12865 conftest$ac_exeext conftest.$ac_ext
12866 LIBS=$save_LIBS
12867 test -n "$gl_have_pthread" && break
12868 done
12869
12870 # Test for libpthread by looking for pthread_kill. (Not pthread_self,
12871 # since it is defined as a macro on OSF/1.)
12872 if test -n "$gl_have_pthread" && test -z "$LIBTHREAD"; then
12873 # The program links fine without libpthread. But it may actually
12874 # need to link with libpthread in order to create multiple threads.
12875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
12876 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
12877 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
12878 $as_echo_n "(cached) " >&6
12879 else
12880 ac_check_lib_save_LIBS=$LIBS
12881 LIBS="-lpthread $LIBS"
12882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12883 /* end confdefs.h. */
12884
12885 /* Override any GCC internal prototype to avoid an error.
12886 Use char because int might match the return type of a GCC
12887 builtin and then its argument prototype would still apply. */
12888 #ifdef __cplusplus
12889 extern "C"
12890 #endif
12891 char pthread_kill ();
12892 int
12893 main ()
12894 {
12895 return pthread_kill ();
12896 ;
12897 return 0;
12898 }
12899 _ACEOF
12900 if ac_fn_c_try_link "$LINENO"; then :
12901 ac_cv_lib_pthread_pthread_kill=yes
12902 else
12903 ac_cv_lib_pthread_pthread_kill=no
12904 fi
12905 rm -f core conftest.err conftest.$ac_objext \
12906 conftest$ac_exeext conftest.$ac_ext
12907 LIBS=$ac_check_lib_save_LIBS
12908 fi
12909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
12910 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
12911 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
12912 LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
12913 # On Solaris and HP-UX, most pthread functions exist also in libc.
12914 # Therefore pthread_in_use() needs to actually try to create a
12915 # thread: pthread_create from libc will fail, whereas
12916 # pthread_create will actually create a thread.
12917 case "$host_os" in
12918 solaris* | hpux*)
12919
12920 $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
12921
12922 esac
12923
12924 fi
12925
12926 elif test -z "$gl_have_pthread"; then
12927 # Some library is needed. Try libpthread and libc_r.
12928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
12929 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
12930 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
12931 $as_echo_n "(cached) " >&6
12932 else
12933 ac_check_lib_save_LIBS=$LIBS
12934 LIBS="-lpthread $LIBS"
12935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12936 /* end confdefs.h. */
12937
12938 /* Override any GCC internal prototype to avoid an error.
12939 Use char because int might match the return type of a GCC
12940 builtin and then its argument prototype would still apply. */
12941 #ifdef __cplusplus
12942 extern "C"
12943 #endif
12944 char pthread_kill ();
12945 int
12946 main ()
12947 {
12948 return pthread_kill ();
12949 ;
12950 return 0;
12951 }
12952 _ACEOF
12953 if ac_fn_c_try_link "$LINENO"; then :
12954 ac_cv_lib_pthread_pthread_kill=yes
12955 else
12956 ac_cv_lib_pthread_pthread_kill=no
12957 fi
12958 rm -f core conftest.err conftest.$ac_objext \
12959 conftest$ac_exeext conftest.$ac_ext
12960 LIBS=$ac_check_lib_save_LIBS
12961 fi
12962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
12963 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
12964 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
12965 gl_have_pthread=yes
12966 LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread
12967 LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
12968 fi
12969
12970 if test -z "$gl_have_pthread"; then
12971 # For FreeBSD 4.
12972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
12973 $as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
12974 if ${ac_cv_lib_c_r_pthread_kill+:} false; then :
12975 $as_echo_n "(cached) " >&6
12976 else
12977 ac_check_lib_save_LIBS=$LIBS
12978 LIBS="-lc_r $LIBS"
12979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12980 /* end confdefs.h. */
12981
12982 /* Override any GCC internal prototype to avoid an error.
12983 Use char because int might match the return type of a GCC
12984 builtin and then its argument prototype would still apply. */
12985 #ifdef __cplusplus
12986 extern "C"
12987 #endif
12988 char pthread_kill ();
12989 int
12990 main ()
12991 {
12992 return pthread_kill ();
12993 ;
12994 return 0;
12995 }
12996 _ACEOF
12997 if ac_fn_c_try_link "$LINENO"; then :
12998 ac_cv_lib_c_r_pthread_kill=yes
12999 else
13000 ac_cv_lib_c_r_pthread_kill=no
13001 fi
13002 rm -f core conftest.err conftest.$ac_objext \
13003 conftest$ac_exeext conftest.$ac_ext
13004 LIBS=$ac_check_lib_save_LIBS
13005 fi
13006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
13007 $as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
13008 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then :
13009 gl_have_pthread=yes
13010 LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r
13011 LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r
13012 fi
13013
13014 fi
13015 fi
13016 if test -n "$gl_have_pthread"; then
13017 gl_threads_api=posix
13018
13019 $as_echo "#define USE_POSIX_THREADS 1" >>confdefs.h
13020
13021 if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
13022 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
13023
13024 $as_echo "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h
13025
13026 LIBTHREAD=
13027 LTLIBTHREAD=
13028 fi
13029 fi
13030 fi
13031 fi
13032 fi
13033 if test -z "$gl_have_pthread"; then
13034 if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then
13035 gl_have_solaristhread=
13036 gl_save_LIBS="$LIBS"
13037 LIBS="$LIBS -lthread"
13038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13039 /* end confdefs.h. */
13040
13041 #include <thread.h>
13042 #include <synch.h>
13043
13044 int
13045 main ()
13046 {
13047 thr_self();
13048 ;
13049 return 0;
13050 }
13051 _ACEOF
13052 if ac_fn_c_try_link "$LINENO"; then :
13053 gl_have_solaristhread=yes
13054 fi
13055 rm -f core conftest.err conftest.$ac_objext \
13056 conftest$ac_exeext conftest.$ac_ext
13057 LIBS="$gl_save_LIBS"
13058 if test -n "$gl_have_solaristhread"; then
13059 gl_threads_api=solaris
13060 LIBTHREAD=-lthread
13061 LTLIBTHREAD=-lthread
13062 LIBMULTITHREAD="$LIBTHREAD"
13063 LTLIBMULTITHREAD="$LTLIBTHREAD"
13064
13065 $as_echo "#define USE_SOLARIS_THREADS 1" >>confdefs.h
13066
13067 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
13068
13069 $as_echo "#define USE_SOLARIS_THREADS_WEAK 1" >>confdefs.h
13070
13071 LIBTHREAD=
13072 LTLIBTHREAD=
13073 fi
13074 fi
13075 fi
13076 fi
13077 if test "$gl_use_threads" = pth; then
13078 gl_save_CPPFLAGS="$CPPFLAGS"
13079
13080
13081
13082
13083
13084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libpth" >&5
13085 $as_echo_n "checking how to link with libpth... " >&6; }
13086 if ${ac_cv_libpth_libs+:} false; then :
13087 $as_echo_n "(cached) " >&6
13088 else
13089
13090
13091
13092
13093
13094
13095
13096
13097 use_additional=yes
13098
13099 acl_save_prefix="$prefix"
13100 prefix="$acl_final_prefix"
13101 acl_save_exec_prefix="$exec_prefix"
13102 exec_prefix="$acl_final_exec_prefix"
13103
13104 eval additional_includedir=\"$includedir\"
13105 eval additional_libdir=\"$libdir\"
13106
13107 exec_prefix="$acl_save_exec_prefix"
13108 prefix="$acl_save_prefix"
13109
13110
13111 # Check whether --with-libpth-prefix was given.
13112 if test "${with_libpth_prefix+set}" = set; then :
13113 withval=$with_libpth_prefix;
13114 if test "X$withval" = "Xno"; then
13115 use_additional=no
13116 else
13117 if test "X$withval" = "X"; then
13118
13119 acl_save_prefix="$prefix"
13120 prefix="$acl_final_prefix"
13121 acl_save_exec_prefix="$exec_prefix"
13122 exec_prefix="$acl_final_exec_prefix"
13123
13124 eval additional_includedir=\"$includedir\"
13125 eval additional_libdir=\"$libdir\"
13126
13127 exec_prefix="$acl_save_exec_prefix"
13128 prefix="$acl_save_prefix"
13129
13130 else
13131 additional_includedir="$withval/include"
13132 additional_libdir="$withval/$acl_libdirstem"
13133 if test "$acl_libdirstem2" != "$acl_libdirstem" \
13134 && ! test -d "$withval/$acl_libdirstem"; then
13135 additional_libdir="$withval/$acl_libdirstem2"
13136 fi
13137 fi
13138 fi
13139
13140 fi
13141
13142 LIBPTH=
13143 LTLIBPTH=
13144 INCPTH=
13145 LIBPTH_PREFIX=
13146 HAVE_LIBPTH=
13147 rpathdirs=
13148 ltrpathdirs=
13149 names_already_handled=
13150 names_next_round='pth '
13151 while test -n "$names_next_round"; do
13152 names_this_round="$names_next_round"
13153 names_next_round=
13154 for name in $names_this_round; do
13155 already_handled=
13156 for n in $names_already_handled; do
13157 if test "$n" = "$name"; then
13158 already_handled=yes
13159 break
13160 fi
13161 done
13162 if test -z "$already_handled"; then
13163 names_already_handled="$names_already_handled $name"
13164 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
13165 eval value=\"\$HAVE_LIB$uppername\"
13166 if test -n "$value"; then
13167 if test "$value" = yes; then
13168 eval value=\"\$LIB$uppername\"
13169 test -z "$value" || LIBPTH="${LIBPTH}${LIBPTH:+ }$value"
13170 eval value=\"\$LTLIB$uppername\"
13171 test -z "$value" || LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$value"
13172 else
13173 :
13174 fi
13175 else
13176 found_dir=
13177 found_la=
13178 found_so=
13179 found_a=
13180 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
13181 if test -n "$acl_shlibext"; then
13182 shrext=".$acl_shlibext" # typically: shrext=.so
13183 else
13184 shrext=
13185 fi
13186 if test $use_additional = yes; then
13187 dir="$additional_libdir"
13188 if test -n "$acl_shlibext"; then
13189 if test -f "$dir/$libname$shrext"; then
13190 found_dir="$dir"
13191 found_so="$dir/$libname$shrext"
13192 else
13193 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
13194 ver=`(cd "$dir" && \
13195 for f in "$libname$shrext".*; do echo "$f"; done \
13196 | sed -e "s,^$libname$shrext\\\\.,," \
13197 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
13198 | sed 1q ) 2>/dev/null`
13199 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
13200 found_dir="$dir"
13201 found_so="$dir/$libname$shrext.$ver"
13202 fi
13203 else
13204 eval library_names=\"$acl_library_names_spec\"
13205 for f in $library_names; do
13206 if test -f "$dir/$f"; then
13207 found_dir="$dir"
13208 found_so="$dir/$f"
13209 break
13210 fi
13211 done
13212 fi
13213 fi
13214 fi
13215 if test "X$found_dir" = "X"; then
13216 if test -f "$dir/$libname.$acl_libext"; then
13217 found_dir="$dir"
13218 found_a="$dir/$libname.$acl_libext"
13219 fi
13220 fi
13221 if test "X$found_dir" != "X"; then
13222 if test -f "$dir/$libname.la"; then
13223 found_la="$dir/$libname.la"
13224 fi
13225 fi
13226 fi
13227 if test "X$found_dir" = "X"; then
13228 for x in $LDFLAGS $LTLIBPTH; do
13229
13230 acl_save_prefix="$prefix"
13231 prefix="$acl_final_prefix"
13232 acl_save_exec_prefix="$exec_prefix"
13233 exec_prefix="$acl_final_exec_prefix"
13234 eval x=\"$x\"
13235 exec_prefix="$acl_save_exec_prefix"
13236 prefix="$acl_save_prefix"
13237
13238 case "$x" in
13239 -L*)
13240 dir=`echo "X$x" | sed -e 's/^X-L//'`
13241 if test -n "$acl_shlibext"; then
13242 if test -f "$dir/$libname$shrext"; then
13243 found_dir="$dir"
13244 found_so="$dir/$libname$shrext"
13245 else
13246 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
13247 ver=`(cd "$dir" && \
13248 for f in "$libname$shrext".*; do echo "$f"; done \
13249 | sed -e "s,^$libname$shrext\\\\.,," \
13250 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
13251 | sed 1q ) 2>/dev/null`
13252 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
13253 found_dir="$dir"
13254 found_so="$dir/$libname$shrext.$ver"
13255 fi
13256 else
13257 eval library_names=\"$acl_library_names_spec\"
13258 for f in $library_names; do
13259 if test -f "$dir/$f"; then
13260 found_dir="$dir"
13261 found_so="$dir/$f"
13262 break
13263 fi
13264 done
13265 fi
13266 fi
13267 fi
13268 if test "X$found_dir" = "X"; then
13269 if test -f "$dir/$libname.$acl_libext"; then
13270 found_dir="$dir"
13271 found_a="$dir/$libname.$acl_libext"
13272 fi
13273 fi
13274 if test "X$found_dir" != "X"; then
13275 if test -f "$dir/$libname.la"; then
13276 found_la="$dir/$libname.la"
13277 fi
13278 fi
13279 ;;
13280 esac
13281 if test "X$found_dir" != "X"; then
13282 break
13283 fi
13284 done
13285 fi
13286 if test "X$found_dir" != "X"; then
13287 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$found_dir -l$name"
13288 if test "X$found_so" != "X"; then
13289 if test "$enable_rpath" = no \
13290 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
13291 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
13292 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
13293 else
13294 haveit=
13295 for x in $ltrpathdirs; do
13296 if test "X$x" = "X$found_dir"; then
13297 haveit=yes
13298 break
13299 fi
13300 done
13301 if test -z "$haveit"; then
13302 ltrpathdirs="$ltrpathdirs $found_dir"
13303 fi
13304 if test "$acl_hardcode_direct" = yes; then
13305 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
13306 else
13307 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
13308 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
13309 haveit=
13310 for x in $rpathdirs; do
13311 if test "X$x" = "X$found_dir"; then
13312 haveit=yes
13313 break
13314 fi
13315 done
13316 if test -z "$haveit"; then
13317 rpathdirs="$rpathdirs $found_dir"
13318 fi
13319 else
13320 haveit=
13321 for x in $LDFLAGS $LIBPTH; do
13322
13323 acl_save_prefix="$prefix"
13324 prefix="$acl_final_prefix"
13325 acl_save_exec_prefix="$exec_prefix"
13326 exec_prefix="$acl_final_exec_prefix"
13327 eval x=\"$x\"
13328 exec_prefix="$acl_save_exec_prefix"
13329 prefix="$acl_save_prefix"
13330
13331 if test "X$x" = "X-L$found_dir"; then
13332 haveit=yes
13333 break
13334 fi
13335 done
13336 if test -z "$haveit"; then
13337 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir"
13338 fi
13339 if test "$acl_hardcode_minus_L" != no; then
13340 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
13341 else
13342 LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
13343 fi
13344 fi
13345 fi
13346 fi
13347 else
13348 if test "X$found_a" != "X"; then
13349 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_a"
13350 else
13351 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir -l$name"
13352 fi
13353 fi
13354 additional_includedir=
13355 case "$found_dir" in
13356 */$acl_libdirstem | */$acl_libdirstem/)
13357 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
13358 if test "$name" = 'pth'; then
13359 LIBPTH_PREFIX="$basedir"
13360 fi
13361 additional_includedir="$basedir/include"
13362 ;;
13363 */$acl_libdirstem2 | */$acl_libdirstem2/)
13364 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
13365 if test "$name" = 'pth'; then
13366 LIBPTH_PREFIX="$basedir"
13367 fi
13368 additional_includedir="$basedir/include"
13369 ;;
13370 esac
13371 if test "X$additional_includedir" != "X"; then
13372 if test "X$additional_includedir" != "X/usr/include"; then
13373 haveit=
13374 if test "X$additional_includedir" = "X/usr/local/include"; then
13375 if test -n "$GCC"; then
13376 case $host_os in
13377 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
13378 esac
13379 fi
13380 fi
13381 if test -z "$haveit"; then
13382 for x in $CPPFLAGS $INCPTH; do
13383
13384 acl_save_prefix="$prefix"
13385 prefix="$acl_final_prefix"
13386 acl_save_exec_prefix="$exec_prefix"
13387 exec_prefix="$acl_final_exec_prefix"
13388 eval x=\"$x\"
13389 exec_prefix="$acl_save_exec_prefix"
13390 prefix="$acl_save_prefix"
13391
13392 if test "X$x" = "X-I$additional_includedir"; then
13393 haveit=yes
13394 break
13395 fi
13396 done
13397 if test -z "$haveit"; then
13398 if test -d "$additional_includedir"; then
13399 INCPTH="${INCPTH}${INCPTH:+ }-I$additional_includedir"
13400 fi
13401 fi
13402 fi
13403 fi
13404 fi
13405 if test -n "$found_la"; then
13406 save_libdir="$libdir"
13407 case "$found_la" in
13408 */* | *\\*) . "$found_la" ;;
13409 *) . "./$found_la" ;;
13410 esac
13411 libdir="$save_libdir"
13412 for dep in $dependency_libs; do
13413 case "$dep" in
13414 -L*)
13415 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
13416 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
13417 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
13418 haveit=
13419 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
13420 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
13421 if test -n "$GCC"; then
13422 case $host_os in
13423 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
13424 esac
13425 fi
13426 fi
13427 if test -z "$haveit"; then
13428 haveit=
13429 for x in $LDFLAGS $LIBPTH; do
13430
13431 acl_save_prefix="$prefix"
13432 prefix="$acl_final_prefix"
13433 acl_save_exec_prefix="$exec_prefix"
13434 exec_prefix="$acl_final_exec_prefix"
13435 eval x=\"$x\"
13436 exec_prefix="$acl_save_exec_prefix"
13437 prefix="$acl_save_prefix"
13438
13439 if test "X$x" = "X-L$additional_libdir"; then
13440 haveit=yes
13441 break
13442 fi
13443 done
13444 if test -z "$haveit"; then
13445 if test -d "$additional_libdir"; then
13446 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$additional_libdir"
13447 fi
13448 fi
13449 haveit=
13450 for x in $LDFLAGS $LTLIBPTH; do
13451
13452 acl_save_prefix="$prefix"
13453 prefix="$acl_final_prefix"
13454 acl_save_exec_prefix="$exec_prefix"
13455 exec_prefix="$acl_final_exec_prefix"
13456 eval x=\"$x\"
13457 exec_prefix="$acl_save_exec_prefix"
13458 prefix="$acl_save_prefix"
13459
13460 if test "X$x" = "X-L$additional_libdir"; then
13461 haveit=yes
13462 break
13463 fi
13464 done
13465 if test -z "$haveit"; then
13466 if test -d "$additional_libdir"; then
13467 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$additional_libdir"
13468 fi
13469 fi
13470 fi
13471 fi
13472 ;;
13473 -R*)
13474 dir=`echo "X$dep" | sed -e 's/^X-R//'`
13475 if test "$enable_rpath" != no; then
13476 haveit=
13477 for x in $rpathdirs; do
13478 if test "X$x" = "X$dir"; then
13479 haveit=yes
13480 break
13481 fi
13482 done
13483 if test -z "$haveit"; then
13484 rpathdirs="$rpathdirs $dir"
13485 fi
13486 haveit=
13487 for x in $ltrpathdirs; do
13488 if test "X$x" = "X$dir"; then
13489 haveit=yes
13490 break
13491 fi
13492 done
13493 if test -z "$haveit"; then
13494 ltrpathdirs="$ltrpathdirs $dir"
13495 fi
13496 fi
13497 ;;
13498 -l*)
13499 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
13500 ;;
13501 *.la)
13502 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
13503 ;;
13504 *)
13505 LIBPTH="${LIBPTH}${LIBPTH:+ }$dep"
13506 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$dep"
13507 ;;
13508 esac
13509 done
13510 fi
13511 else
13512 LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
13513 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-l$name"
13514 fi
13515 fi
13516 fi
13517 done
13518 done
13519 if test "X$rpathdirs" != "X"; then
13520 if test -n "$acl_hardcode_libdir_separator"; then
13521 alldirs=
13522 for found_dir in $rpathdirs; do
13523 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
13524 done
13525 acl_save_libdir="$libdir"
13526 libdir="$alldirs"
13527 eval flag=\"$acl_hardcode_libdir_flag_spec\"
13528 libdir="$acl_save_libdir"
13529 LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
13530 else
13531 for found_dir in $rpathdirs; do
13532 acl_save_libdir="$libdir"
13533 libdir="$found_dir"
13534 eval flag=\"$acl_hardcode_libdir_flag_spec\"
13535 libdir="$acl_save_libdir"
13536 LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
13537 done
13538 fi
13539 fi
13540 if test "X$ltrpathdirs" != "X"; then
13541 for found_dir in $ltrpathdirs; do
13542 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-R$found_dir"
13543 done
13544 fi
13545
13546
13547
13548
13549
13550
13551 ac_cv_libpth_libs="$LIBPTH"
13552 ac_cv_libpth_ltlibs="$LTLIBPTH"
13553 ac_cv_libpth_cppflags="$INCPTH"
13554 ac_cv_libpth_prefix="$LIBPTH_PREFIX"
13555
13556 fi
13557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libpth_libs" >&5
13558 $as_echo "$ac_cv_libpth_libs" >&6; }
13559 LIBPTH="$ac_cv_libpth_libs"
13560 LTLIBPTH="$ac_cv_libpth_ltlibs"
13561 INCPTH="$ac_cv_libpth_cppflags"
13562 LIBPTH_PREFIX="$ac_cv_libpth_prefix"
13563
13564 for element in $INCPTH; do
13565 haveit=
13566 for x in $CPPFLAGS; do
13567
13568 acl_save_prefix="$prefix"
13569 prefix="$acl_final_prefix"
13570 acl_save_exec_prefix="$exec_prefix"
13571 exec_prefix="$acl_final_exec_prefix"
13572 eval x=\"$x\"
13573 exec_prefix="$acl_save_exec_prefix"
13574 prefix="$acl_save_prefix"
13575
13576 if test "X$x" = "X$element"; then
13577 haveit=yes
13578 break
13579 fi
13580 done
13581 if test -z "$haveit"; then
13582 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
13583 fi
13584 done
13585
13586
13587
13588
13589 HAVE_LIBPTH=yes
13590
13591
13592
13593 gl_have_pth=
13594 gl_save_LIBS="$LIBS"
13595 LIBS="$LIBS $LIBPTH"
13596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13597 /* end confdefs.h. */
13598 #include <pth.h>
13599 int
13600 main ()
13601 {
13602 pth_self();
13603 ;
13604 return 0;
13605 }
13606 _ACEOF
13607 if ac_fn_c_try_link "$LINENO"; then :
13608 gl_have_pth=yes
13609 fi
13610 rm -f core conftest.err conftest.$ac_objext \
13611 conftest$ac_exeext conftest.$ac_ext
13612 LIBS="$gl_save_LIBS"
13613 if test -n "$gl_have_pth"; then
13614 gl_threads_api=pth
13615 LIBTHREAD="$LIBPTH"
13616 LTLIBTHREAD="$LTLIBPTH"
13617 LIBMULTITHREAD="$LIBTHREAD"
13618 LTLIBMULTITHREAD="$LTLIBTHREAD"
13619
13620 $as_echo "#define USE_PTH_THREADS 1" >>confdefs.h
13621
13622 if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
13623 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
13624
13625 $as_echo "#define USE_PTH_THREADS_WEAK 1" >>confdefs.h
13626
13627 LIBTHREAD=
13628 LTLIBTHREAD=
13629 fi
13630 fi
13631 else
13632 CPPFLAGS="$gl_save_CPPFLAGS"
13633 fi
13634 fi
13635 if test -z "$gl_have_pthread"; then
13636 case "$gl_use_threads" in
13637 yes | windows | win32) # The 'win32' is for backward compatibility.
13638 if { case "$host_os" in
13639 mingw*) true;;
13640 *) false;;
13641 esac
13642 }; then
13643 gl_threads_api=windows
13644
13645 $as_echo "#define USE_WINDOWS_THREADS 1" >>confdefs.h
13646
13647 fi
13648 ;;
13649 esac
13650 fi
13651 fi
13652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5
13653 $as_echo_n "checking for multithread API to use... " >&6; }
13654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5
13655 $as_echo "$gl_threads_api" >&6; }
13656
13657
13658
13659
13660
13661
13662
13663
13664
13665
13666
13667
13668
13669
13670
13671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
13672 $as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
13673 if ${gl_cv_func_malloc_posix+:} false; then :
13674 $as_echo_n "(cached) " >&6
13675 else
13676
13677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13678 /* end confdefs.h. */
13679
13680 int
13681 main ()
13682 {
13683 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
13684 choke me
13685 #endif
13686
13687 ;
13688 return 0;
13689 }
13690 _ACEOF
13691 if ac_fn_c_try_compile "$LINENO"; then :
13692 gl_cv_func_malloc_posix=yes
13693 else
13694 gl_cv_func_malloc_posix=no
13695 fi
13696 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13697
13698 fi
13699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
13700 $as_echo "$gl_cv_func_malloc_posix" >&6; }
13701
13702
13703
13704 for ac_header in stdlib.h
13705 do :
13706 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
13707 if test "x$ac_cv_header_stdlib_h" = xyes; then :
13708 cat >>confdefs.h <<_ACEOF
13709 #define HAVE_STDLIB_H 1
13710 _ACEOF
13711
13712 fi
13713
13714 done
13715
13716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
13717 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
13718 if ${ac_cv_func_malloc_0_nonnull+:} false; then :
13719 $as_echo_n "(cached) " >&6
13720 else
13721 if test "$cross_compiling" = yes; then :
13722 case "$host_os" in
13723 # Guess yes on platforms where we know the result.
13724 *-gnu* | freebsd* | netbsd* | openbsd* \
13725 | hpux* | solaris* | cygwin* | mingw*)
13726 ac_cv_func_malloc_0_nonnull=yes ;;
13727 # If we don't know, assume the worst.
13728 *) ac_cv_func_malloc_0_nonnull=no ;;
13729 esac
13730
13731 else
13732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13733 /* end confdefs.h. */
13734 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
13735 # include <stdlib.h>
13736 #else
13737 char *malloc ();
13738 #endif
13739
13740 int
13741 main ()
13742 {
13743 char *p = malloc (0);
13744 int result = !p;
13745 free (p);
13746 return result;
13747 ;
13748 return 0;
13749 }
13750
13751 _ACEOF
13752 if ac_fn_c_try_run "$LINENO"; then :
13753 ac_cv_func_malloc_0_nonnull=yes
13754 else
13755 ac_cv_func_malloc_0_nonnull=no
13756 fi
13757 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13758 conftest.$ac_objext conftest.beam conftest.$ac_ext
13759 fi
13760
13761
13762 fi
13763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
13764 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
13765 if test $ac_cv_func_malloc_0_nonnull = yes; then :
13766 gl_cv_func_malloc_0_nonnull=1
13767 else
13768 gl_cv_func_malloc_0_nonnull=0
13769 fi
13770
13771
13772 cat >>confdefs.h <<_ACEOF
13773 #define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
13774 _ACEOF
13775
13776
13777
13778
13779
13780
13781
13782
13783 GNULIB_BTOWC=0;
13784 GNULIB_WCTOB=0;
13785 GNULIB_MBSINIT=0;
13786 GNULIB_MBRTOWC=0;
13787 GNULIB_MBRLEN=0;
13788 GNULIB_MBSRTOWCS=0;
13789 GNULIB_MBSNRTOWCS=0;
13790 GNULIB_WCRTOMB=0;
13791 GNULIB_WCSRTOMBS=0;
13792 GNULIB_WCSNRTOMBS=0;
13793 GNULIB_WCWIDTH=0;
13794 GNULIB_WMEMCHR=0;
13795 GNULIB_WMEMCMP=0;
13796 GNULIB_WMEMCPY=0;
13797 GNULIB_WMEMMOVE=0;
13798 GNULIB_WMEMSET=0;
13799 GNULIB_WCSLEN=0;
13800 GNULIB_WCSNLEN=0;
13801 GNULIB_WCSCPY=0;
13802 GNULIB_WCPCPY=0;
13803 GNULIB_WCSNCPY=0;
13804 GNULIB_WCPNCPY=0;
13805 GNULIB_WCSCAT=0;
13806 GNULIB_WCSNCAT=0;
13807 GNULIB_WCSCMP=0;
13808 GNULIB_WCSNCMP=0;
13809 GNULIB_WCSCASECMP=0;
13810 GNULIB_WCSNCASECMP=0;
13811 GNULIB_WCSCOLL=0;
13812 GNULIB_WCSXFRM=0;
13813 GNULIB_WCSDUP=0;
13814 GNULIB_WCSCHR=0;
13815 GNULIB_WCSRCHR=0;
13816 GNULIB_WCSCSPN=0;
13817 GNULIB_WCSSPN=0;
13818 GNULIB_WCSPBRK=0;
13819 GNULIB_WCSSTR=0;
13820 GNULIB_WCSTOK=0;
13821 GNULIB_WCSWIDTH=0;
13822 HAVE_BTOWC=1;
13823 HAVE_MBSINIT=1;
13824 HAVE_MBRTOWC=1;
13825 HAVE_MBRLEN=1;
13826 HAVE_MBSRTOWCS=1;
13827 HAVE_MBSNRTOWCS=1;
13828 HAVE_WCRTOMB=1;
13829 HAVE_WCSRTOMBS=1;
13830 HAVE_WCSNRTOMBS=1;
13831 HAVE_WMEMCHR=1;
13832 HAVE_WMEMCMP=1;
13833 HAVE_WMEMCPY=1;
13834 HAVE_WMEMMOVE=1;
13835 HAVE_WMEMSET=1;
13836 HAVE_WCSLEN=1;
13837 HAVE_WCSNLEN=1;
13838 HAVE_WCSCPY=1;
13839 HAVE_WCPCPY=1;
13840 HAVE_WCSNCPY=1;
13841 HAVE_WCPNCPY=1;
13842 HAVE_WCSCAT=1;
13843 HAVE_WCSNCAT=1;
13844 HAVE_WCSCMP=1;
13845 HAVE_WCSNCMP=1;
13846 HAVE_WCSCASECMP=1;
13847 HAVE_WCSNCASECMP=1;
13848 HAVE_WCSCOLL=1;
13849 HAVE_WCSXFRM=1;
13850 HAVE_WCSDUP=1;
13851 HAVE_WCSCHR=1;
13852 HAVE_WCSRCHR=1;
13853 HAVE_WCSCSPN=1;
13854 HAVE_WCSSPN=1;
13855 HAVE_WCSPBRK=1;
13856 HAVE_WCSSTR=1;
13857 HAVE_WCSTOK=1;
13858 HAVE_WCSWIDTH=1;
13859 HAVE_DECL_WCTOB=1;
13860 HAVE_DECL_WCWIDTH=1;
13861 REPLACE_MBSTATE_T=0;
13862 REPLACE_BTOWC=0;
13863 REPLACE_WCTOB=0;
13864 REPLACE_MBSINIT=0;
13865 REPLACE_MBRTOWC=0;
13866 REPLACE_MBRLEN=0;
13867 REPLACE_MBSRTOWCS=0;
13868 REPLACE_MBSNRTOWCS=0;
13869 REPLACE_WCRTOMB=0;
13870 REPLACE_WCSRTOMBS=0;
13871 REPLACE_WCSNRTOMBS=0;
13872 REPLACE_WCWIDTH=0;
13873 REPLACE_WCSWIDTH=0;
13874
13875
13876
13877
13878
13879
13880
13881
13882
13883
13884
13885
13886
13887
13888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
13889 $as_echo_n "checking for a traditional japanese locale... " >&6; }
13890 if ${gt_cv_locale_ja+:} false; then :
13891 $as_echo_n "(cached) " >&6
13892 else
13893
13894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13895 /* end confdefs.h. */
13896
13897 #include <locale.h>
13898 #include <time.h>
13899 #if HAVE_LANGINFO_CODESET
13900 # include <langinfo.h>
13901 #endif
13902 #include <stdlib.h>
13903 #include <string.h>
13904 struct tm t;
13905 char buf[16];
13906 int main ()
13907 {
13908 const char *p;
13909 /* Check whether the given locale name is recognized by the system. */
13910 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
13911 /* On native Windows, setlocale(category, "") looks at the system settings,
13912 not at the environment variables. Also, when an encoding suffix such
13913 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
13914 category of the locale to "C". */
13915 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
13916 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
13917 return 1;
13918 #else
13919 if (setlocale (LC_ALL, "") == NULL) return 1;
13920 #endif
13921 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
13922 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
13923 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
13924 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
13925 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
13926 some unit tests fail.
13927 On MirBSD 10, when an unsupported locale is specified, setlocale()
13928 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
13929 #if HAVE_LANGINFO_CODESET
13930 {
13931 const char *cs = nl_langinfo (CODESET);
13932 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
13933 || strcmp (cs, "UTF-8") == 0)
13934 return 1;
13935 }
13936 #endif
13937 #ifdef __CYGWIN__
13938 /* On Cygwin, avoid locale names without encoding suffix, because the
13939 locale_charset() function relies on the encoding suffix. Note that
13940 LC_ALL is set on the command line. */
13941 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
13942 #endif
13943 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
13944 on Cygwin 1.5.x. */
13945 if (MB_CUR_MAX == 1)
13946 return 1;
13947 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
13948 This excludes the UTF-8 encoding (except on MirBSD). */
13949 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
13950 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
13951 for (p = buf; *p != '\0'; p++)
13952 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
13953 return 1;
13954 return 0;
13955 }
13956
13957 _ACEOF
13958 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
13959 (eval $ac_link) 2>&5
13960 ac_status=$?
13961 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13962 test $ac_status = 0; } && test -s conftest$ac_exeext; then
13963 case "$host_os" in
13964 # Handle native Windows specially, because there setlocale() interprets
13965 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
13966 # "fr" or "fra" as "French" or "French_France.1252",
13967 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
13968 # "ja" as "Japanese" or "Japanese_Japan.932",
13969 # and similar.
13970 mingw*)
13971 # Note that on native Windows, the Japanese locale is
13972 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
13973 # cannot use it here.
13974 gt_cv_locale_ja=none
13975 ;;
13976 *)
13977 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
13978 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
13979 # configure script would override the LC_ALL setting. Likewise for
13980 # LC_CTYPE, which is also set at the beginning of the configure script.
13981 # Test for the AIX locale name.
13982 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
13983 gt_cv_locale_ja=ja_JP
13984 else
13985 # Test for the locale name with explicit encoding suffix.
13986 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
13987 gt_cv_locale_ja=ja_JP.EUC-JP
13988 else
13989 # Test for the HP-UX, OSF/1, NetBSD locale name.
13990 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
13991 gt_cv_locale_ja=ja_JP.eucJP
13992 else
13993 # Test for the IRIX, FreeBSD locale name.
13994 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
13995 gt_cv_locale_ja=ja_JP.EUC
13996 else
13997 # Test for the Solaris 7 locale name.
13998 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
13999 gt_cv_locale_ja=ja
14000 else
14001 # Special test for NetBSD 1.6.
14002 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
14003 gt_cv_locale_ja=ja_JP.eucJP
14004 else
14005 # None found.
14006 gt_cv_locale_ja=none
14007 fi
14008 fi
14009 fi
14010 fi
14011 fi
14012 fi
14013 ;;
14014 esac
14015 fi
14016 rm -fr conftest*
14017
14018 fi
14019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
14020 $as_echo "$gt_cv_locale_ja" >&6; }
14021 LOCALE_JA=$gt_cv_locale_ja
14022
14023
14024
14025
14026
14027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
14028 $as_echo_n "checking for a transitional chinese locale... " >&6; }
14029 if ${gt_cv_locale_zh_CN+:} false; then :
14030 $as_echo_n "(cached) " >&6
14031 else
14032
14033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14034 /* end confdefs.h. */
14035
14036 #include <locale.h>
14037 #include <stdlib.h>
14038 #include <time.h>
14039 #if HAVE_LANGINFO_CODESET
14040 # include <langinfo.h>
14041 #endif
14042 #include <stdlib.h>
14043 #include <string.h>
14044 struct tm t;
14045 char buf[16];
14046 int main ()
14047 {
14048 const char *p;
14049 /* Check whether the given locale name is recognized by the system. */
14050 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
14051 /* On native Windows, setlocale(category, "") looks at the system settings,
14052 not at the environment variables. Also, when an encoding suffix such
14053 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
14054 category of the locale to "C". */
14055 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
14056 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
14057 return 1;
14058 #else
14059 if (setlocale (LC_ALL, "") == NULL) return 1;
14060 #endif
14061 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
14062 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
14063 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
14064 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
14065 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
14066 some unit tests fail.
14067 On MirBSD 10, when an unsupported locale is specified, setlocale()
14068 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
14069 #if HAVE_LANGINFO_CODESET
14070 {
14071 const char *cs = nl_langinfo (CODESET);
14072 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
14073 || strcmp (cs, "UTF-8") == 0)
14074 return 1;
14075 }
14076 #endif
14077 #ifdef __CYGWIN__
14078 /* On Cygwin, avoid locale names without encoding suffix, because the
14079 locale_charset() function relies on the encoding suffix. Note that
14080 LC_ALL is set on the command line. */
14081 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
14082 #endif
14083 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
14084 This excludes the UTF-8 encoding (except on MirBSD). */
14085 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
14086 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
14087 for (p = buf; *p != '\0'; p++)
14088 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
14089 return 1;
14090 /* Check whether a typical GB18030 multibyte sequence is recognized as a
14091 single wide character. This excludes the GB2312 and GBK encodings. */
14092 if (mblen ("\203\062\332\066", 5) != 4)
14093 return 1;
14094 return 0;
14095 }
14096
14097 _ACEOF
14098 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14099 (eval $ac_link) 2>&5
14100 ac_status=$?
14101 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14102 test $ac_status = 0; } && test -s conftest$ac_exeext; then
14103 case "$host_os" in
14104 # Handle native Windows specially, because there setlocale() interprets
14105 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
14106 # "fr" or "fra" as "French" or "French_France.1252",
14107 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
14108 # "ja" as "Japanese" or "Japanese_Japan.932",
14109 # and similar.
14110 mingw*)
14111 # Test for the hypothetical native Windows locale name.
14112 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14113 gt_cv_locale_zh_CN=Chinese_China.54936
14114 else
14115 # None found.
14116 gt_cv_locale_zh_CN=none
14117 fi
14118 ;;
14119 solaris2.8)
14120 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
14121 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
14122 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
14123 gt_cv_locale_zh_CN=none
14124 ;;
14125 *)
14126 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
14127 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
14128 # configure script would override the LC_ALL setting. Likewise for
14129 # LC_CTYPE, which is also set at the beginning of the configure script.
14130 # Test for the locale name without encoding suffix.
14131 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14132 gt_cv_locale_zh_CN=zh_CN
14133 else
14134 # Test for the locale name with explicit encoding suffix.
14135 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14136 gt_cv_locale_zh_CN=zh_CN.GB18030
14137 else
14138 # None found.
14139 gt_cv_locale_zh_CN=none
14140 fi
14141 fi
14142 ;;
14143 esac
14144 else
14145 # If there was a link error, due to mblen(), the system is so old that
14146 # it certainly doesn't have a chinese locale.
14147 gt_cv_locale_zh_CN=none
14148 fi
14149 rm -fr conftest*
14150
14151 fi
14152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
14153 $as_echo "$gt_cv_locale_zh_CN" >&6; }
14154 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
14155
14156
14157
14158
14159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
14160 $as_echo_n "checking for a french Unicode locale... " >&6; }
14161 if ${gt_cv_locale_fr_utf8+:} false; then :
14162 $as_echo_n "(cached) " >&6
14163 else
14164
14165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14166 /* end confdefs.h. */
14167
14168 #include <locale.h>
14169 #include <time.h>
14170 #if HAVE_LANGINFO_CODESET
14171 # include <langinfo.h>
14172 #endif
14173 #include <stdlib.h>
14174 #include <string.h>
14175 struct tm t;
14176 char buf[16];
14177 int main () {
14178 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
14179 imitates locale dependent behaviour by looking at the environment
14180 variables, and all locales use the UTF-8 encoding. */
14181 #if !(defined __BEOS__ || defined __HAIKU__)
14182 /* Check whether the given locale name is recognized by the system. */
14183 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
14184 /* On native Windows, setlocale(category, "") looks at the system settings,
14185 not at the environment variables. Also, when an encoding suffix such
14186 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
14187 category of the locale to "C". */
14188 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
14189 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
14190 return 1;
14191 # else
14192 if (setlocale (LC_ALL, "") == NULL) return 1;
14193 # endif
14194 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
14195 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
14196 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
14197 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
14198 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
14199 some unit tests fail. */
14200 # if HAVE_LANGINFO_CODESET
14201 {
14202 const char *cs = nl_langinfo (CODESET);
14203 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
14204 return 1;
14205 }
14206 # endif
14207 # ifdef __CYGWIN__
14208 /* On Cygwin, avoid locale names without encoding suffix, because the
14209 locale_charset() function relies on the encoding suffix. Note that
14210 LC_ALL is set on the command line. */
14211 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
14212 # endif
14213 /* Check whether in the abbreviation of the second month, the second
14214 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
14215 two bytes long, with UTF-8 encoding. */
14216 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
14217 if (strftime (buf, sizeof (buf), "%b", &t) < 4
14218 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
14219 return 1;
14220 #endif
14221 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
14222 /* Check whether the decimal separator is a comma.
14223 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
14224 are nl_langinfo(RADIXCHAR) are both ".". */
14225 if (localeconv () ->decimal_point[0] != ',') return 1;
14226 #endif
14227 return 0;
14228 }
14229
14230 _ACEOF
14231 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14232 (eval $ac_link) 2>&5
14233 ac_status=$?
14234 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14235 test $ac_status = 0; } && test -s conftest$ac_exeext; then
14236 case "$host_os" in
14237 # Handle native Windows specially, because there setlocale() interprets
14238 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
14239 # "fr" or "fra" as "French" or "French_France.1252",
14240 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
14241 # "ja" as "Japanese" or "Japanese_Japan.932",
14242 # and similar.
14243 mingw*)
14244 # Test for the hypothetical native Windows locale name.
14245 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14246 gt_cv_locale_fr_utf8=French_France.65001
14247 else
14248 # None found.
14249 gt_cv_locale_fr_utf8=none
14250 fi
14251 ;;
14252 *)
14253 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
14254 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
14255 # configure script would override the LC_ALL setting. Likewise for
14256 # LC_CTYPE, which is also set at the beginning of the configure script.
14257 # Test for the usual locale name.
14258 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14259 gt_cv_locale_fr_utf8=fr_FR
14260 else
14261 # Test for the locale name with explicit encoding suffix.
14262 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14263 gt_cv_locale_fr_utf8=fr_FR.UTF-8
14264 else
14265 # Test for the Solaris 7 locale name.
14266 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14267 gt_cv_locale_fr_utf8=fr.UTF-8
14268 else
14269 # None found.
14270 gt_cv_locale_fr_utf8=none
14271 fi
14272 fi
14273 fi
14274 ;;
14275 esac
14276 fi
14277 rm -fr conftest*
14278
14279 fi
14280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
14281 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
14282 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
14283
14284
14285
14286
14287
14288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
14289 $as_echo_n "checking for a traditional french locale... " >&6; }
14290 if ${gt_cv_locale_fr+:} false; then :
14291 $as_echo_n "(cached) " >&6
14292 else
14293
14294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14295 /* end confdefs.h. */
14296
14297 #include <locale.h>
14298 #include <time.h>
14299 #if HAVE_LANGINFO_CODESET
14300 # include <langinfo.h>
14301 #endif
14302 #include <stdlib.h>
14303 #include <string.h>
14304 struct tm t;
14305 char buf[16];
14306 int main () {
14307 /* Check whether the given locale name is recognized by the system. */
14308 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
14309 /* On native Windows, setlocale(category, "") looks at the system settings,
14310 not at the environment variables. Also, when an encoding suffix such
14311 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
14312 category of the locale to "C". */
14313 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
14314 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
14315 return 1;
14316 #else
14317 if (setlocale (LC_ALL, "") == NULL) return 1;
14318 #endif
14319 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
14320 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
14321 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
14322 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
14323 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
14324 some unit tests fail.
14325 On MirBSD 10, when an unsupported locale is specified, setlocale()
14326 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
14327 #if HAVE_LANGINFO_CODESET
14328 {
14329 const char *cs = nl_langinfo (CODESET);
14330 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
14331 || strcmp (cs, "UTF-8") == 0)
14332 return 1;
14333 }
14334 #endif
14335 #ifdef __CYGWIN__
14336 /* On Cygwin, avoid locale names without encoding suffix, because the
14337 locale_charset() function relies on the encoding suffix. Note that
14338 LC_ALL is set on the command line. */
14339 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
14340 #endif
14341 /* Check whether in the abbreviation of the second month, the second
14342 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
14343 one byte long. This excludes the UTF-8 encoding. */
14344 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
14345 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
14346 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
14347 /* Check whether the decimal separator is a comma.
14348 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
14349 are nl_langinfo(RADIXCHAR) are both ".". */
14350 if (localeconv () ->decimal_point[0] != ',') return 1;
14351 #endif
14352 return 0;
14353 }
14354
14355 _ACEOF
14356 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14357 (eval $ac_link) 2>&5
14358 ac_status=$?
14359 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14360 test $ac_status = 0; } && test -s conftest$ac_exeext; then
14361 case "$host_os" in
14362 # Handle native Windows specially, because there setlocale() interprets
14363 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
14364 # "fr" or "fra" as "French" or "French_France.1252",
14365 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
14366 # "ja" as "Japanese" or "Japanese_Japan.932",
14367 # and similar.
14368 mingw*)
14369 # Test for the native Windows locale name.
14370 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14371 gt_cv_locale_fr=French_France.1252
14372 else
14373 # None found.
14374 gt_cv_locale_fr=none
14375 fi
14376 ;;
14377 *)
14378 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
14379 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
14380 # configure script would override the LC_ALL setting. Likewise for
14381 # LC_CTYPE, which is also set at the beginning of the configure script.
14382 # Test for the usual locale name.
14383 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14384 gt_cv_locale_fr=fr_FR
14385 else
14386 # Test for the locale name with explicit encoding suffix.
14387 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14388 gt_cv_locale_fr=fr_FR.ISO-8859-1
14389 else
14390 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
14391 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14392 gt_cv_locale_fr=fr_FR.ISO8859-1
14393 else
14394 # Test for the HP-UX locale name.
14395 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14396 gt_cv_locale_fr=fr_FR.iso88591
14397 else
14398 # Test for the Solaris 7 locale name.
14399 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14400 gt_cv_locale_fr=fr
14401 else
14402 # None found.
14403 gt_cv_locale_fr=none
14404 fi
14405 fi
14406 fi
14407 fi
14408 fi
14409 ;;
14410 esac
14411 fi
14412 rm -fr conftest*
14413
14414 fi
14415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
14416 $as_echo "$gt_cv_locale_fr" >&6; }
14417 LOCALE_FR=$gt_cv_locale_fr
14418
14419
14420
14421
14422
14423
14424
14425
14426
14427
14428
14429
14430
14431 GNULIB_FFSL=0;
14432 GNULIB_FFSLL=0;
14433 GNULIB_MEMCHR=0;
14434 GNULIB_MEMMEM=0;
14435 GNULIB_MEMPCPY=0;
14436 GNULIB_MEMRCHR=0;
14437 GNULIB_RAWMEMCHR=0;
14438 GNULIB_STPCPY=0;
14439 GNULIB_STPNCPY=0;
14440 GNULIB_STRCHRNUL=0;
14441 GNULIB_STRDUP=0;
14442 GNULIB_STRNCAT=0;
14443 GNULIB_STRNDUP=0;
14444 GNULIB_STRNLEN=0;
14445 GNULIB_STRPBRK=0;
14446 GNULIB_STRSEP=0;
14447 GNULIB_STRSTR=0;
14448 GNULIB_STRCASESTR=0;
14449 GNULIB_STRTOK_R=0;
14450 GNULIB_MBSLEN=0;
14451 GNULIB_MBSNLEN=0;
14452 GNULIB_MBSCHR=0;
14453 GNULIB_MBSRCHR=0;
14454 GNULIB_MBSSTR=0;
14455 GNULIB_MBSCASECMP=0;
14456 GNULIB_MBSNCASECMP=0;
14457 GNULIB_MBSPCASECMP=0;
14458 GNULIB_MBSCASESTR=0;
14459 GNULIB_MBSCSPN=0;
14460 GNULIB_MBSPBRK=0;
14461 GNULIB_MBSSPN=0;
14462 GNULIB_MBSSEP=0;
14463 GNULIB_MBSTOK_R=0;
14464 GNULIB_STRERROR=0;
14465 GNULIB_STRERROR_R=0;
14466 GNULIB_STRSIGNAL=0;
14467 GNULIB_STRVERSCMP=0;
14468 HAVE_MBSLEN=0;
14469 HAVE_FFSL=1;
14470 HAVE_FFSLL=1;
14471 HAVE_MEMCHR=1;
14472 HAVE_DECL_MEMMEM=1;
14473 HAVE_MEMPCPY=1;
14474 HAVE_DECL_MEMRCHR=1;
14475 HAVE_RAWMEMCHR=1;
14476 HAVE_STPCPY=1;
14477 HAVE_STPNCPY=1;
14478 HAVE_STRCHRNUL=1;
14479 HAVE_DECL_STRDUP=1;
14480 HAVE_DECL_STRNDUP=1;
14481 HAVE_DECL_STRNLEN=1;
14482 HAVE_STRPBRK=1;
14483 HAVE_STRSEP=1;
14484 HAVE_STRCASESTR=1;
14485 HAVE_DECL_STRTOK_R=1;
14486 HAVE_DECL_STRERROR_R=1;
14487 HAVE_DECL_STRSIGNAL=1;
14488 HAVE_STRVERSCMP=1;
14489 REPLACE_MEMCHR=0;
14490 REPLACE_MEMMEM=0;
14491 REPLACE_STPNCPY=0;
14492 REPLACE_STRDUP=0;
14493 REPLACE_STRSTR=0;
14494 REPLACE_STRCASESTR=0;
14495 REPLACE_STRCHRNUL=0;
14496 REPLACE_STRERROR=0;
14497 REPLACE_STRERROR_R=0;
14498 REPLACE_STRNCAT=0;
14499 REPLACE_STRNDUP=0;
14500 REPLACE_STRNLEN=0;
14501 REPLACE_STRSIGNAL=0;
14502 REPLACE_STRTOK_R=0;
14503 UNDEFINE_STRTOK_R=0;
14504
14505
14506
14507
14508
14509 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
14510 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
14511 # irrelevant for anonymous mappings.
14512 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
14513 if test "x$ac_cv_func_mmap" = xyes; then :
14514 gl_have_mmap=yes
14515 else
14516 gl_have_mmap=no
14517 fi
14518
14519
14520 # Try to allow MAP_ANONYMOUS.
14521 gl_have_mmap_anonymous=no
14522 if test $gl_have_mmap = yes; then
14523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
14524 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
14525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14526 /* end confdefs.h. */
14527
14528 #include <sys/mman.h>
14529 #ifdef MAP_ANONYMOUS
14530 I cannot identify this map
14531 #endif
14532
14533 _ACEOF
14534 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14535 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
14536 gl_have_mmap_anonymous=yes
14537 fi
14538 rm -f conftest*
14539
14540 if test $gl_have_mmap_anonymous != yes; then
14541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14542 /* end confdefs.h. */
14543
14544 #include <sys/mman.h>
14545 #ifdef MAP_ANON
14546 I cannot identify this map
14547 #endif
14548
14549 _ACEOF
14550 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14551 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
14552
14553 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
14554
14555 gl_have_mmap_anonymous=yes
14556 fi
14557 rm -f conftest*
14558
14559 fi
14560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
14561 $as_echo "$gl_have_mmap_anonymous" >&6; }
14562 if test $gl_have_mmap_anonymous = yes; then
14563
14564 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
14565
14566 fi
14567 fi
14568
14569
14570 :
14571
14572
14573
14574
14575
14576
14577 :
14578
14579
14580
14581
14582
14583
14584
14585
14586 if test $HAVE_MEMCHR = 1; then
14587 # Detect platform-specific bugs in some versions of glibc:
14588 # memchr should not dereference anything with length 0
14589 # http://bugzilla.redhat.com/499689
14590 # memchr should not dereference overestimated length after a match
14591 # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
14592 # http://sourceware.org/bugzilla/show_bug.cgi?id=10162
14593 # Assume that memchr works on platforms that lack mprotect.
14594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
14595 $as_echo_n "checking whether memchr works... " >&6; }
14596 if ${gl_cv_func_memchr_works+:} false; then :
14597 $as_echo_n "(cached) " >&6
14598 else
14599 if test "$cross_compiling" = yes; then :
14600 gl_cv_func_memchr_works="guessing no"
14601 else
14602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14603 /* end confdefs.h. */
14604
14605 #include <string.h>
14606 #if HAVE_SYS_MMAN_H
14607 # include <fcntl.h>
14608 # include <unistd.h>
14609 # include <sys/types.h>
14610 # include <sys/mman.h>
14611 # ifndef MAP_FILE
14612 # define MAP_FILE 0
14613 # endif
14614 #endif
14615
14616 int
14617 main ()
14618 {
14619
14620 int result = 0;
14621 char *fence = NULL;
14622 #if HAVE_SYS_MMAN_H && HAVE_MPROTECT
14623 # if HAVE_MAP_ANONYMOUS
14624 const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
14625 const int fd = -1;
14626 # else /* !HAVE_MAP_ANONYMOUS */
14627 const int flags = MAP_FILE | MAP_PRIVATE;
14628 int fd = open ("/dev/zero", O_RDONLY, 0666);
14629 if (fd >= 0)
14630 # endif
14631 {
14632 int pagesize = getpagesize ();
14633 char *two_pages =
14634 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
14635 flags, fd, 0);
14636 if (two_pages != (char *)(-1)
14637 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
14638 fence = two_pages + pagesize;
14639 }
14640 #endif
14641 if (fence)
14642 {
14643 if (memchr (fence, 0, 0))
14644 result |= 1;
14645 strcpy (fence - 9, "12345678");
14646 if (memchr (fence - 9, 0, 79) != fence - 1)
14647 result |= 2;
14648 if (memchr (fence - 1, 0, 3) != fence - 1)
14649 result |= 4;
14650 }
14651 return result;
14652
14653 ;
14654 return 0;
14655 }
14656 _ACEOF
14657 if ac_fn_c_try_run "$LINENO"; then :
14658 gl_cv_func_memchr_works=yes
14659 else
14660 gl_cv_func_memchr_works=no
14661 fi
14662 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14663 conftest.$ac_objext conftest.beam conftest.$ac_ext
14664 fi
14665
14666 fi
14667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
14668 $as_echo "$gl_cv_func_memchr_works" >&6; }
14669 if test "$gl_cv_func_memchr_works" != yes; then
14670 REPLACE_MEMCHR=1
14671 fi
14672 fi
14673
14674
14675 ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default"
14676 if test "x$ac_cv_have_decl_memmem" = xyes; then :
14677 ac_have_decl=1
14678 else
14679 ac_have_decl=0
14680 fi
14681
14682 cat >>confdefs.h <<_ACEOF
14683 #define HAVE_DECL_MEMMEM $ac_have_decl
14684 _ACEOF
14685
14686
14687
14688
14689
14690
14691 for ac_func in memmem
14692 do :
14693 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
14694 if test "x$ac_cv_func_memmem" = xyes; then :
14695 cat >>confdefs.h <<_ACEOF
14696 #define HAVE_MEMMEM 1
14697 _ACEOF
14698
14699 fi
14700 done
14701
14702 if test $ac_cv_func_memmem = yes; then
14703 HAVE_MEMMEM=1
14704 else
14705 HAVE_MEMMEM=0
14706 fi
14707
14708 :
14709
14710
14711
14712
14713
14714 if test $ac_cv_have_decl_memmem = no; then
14715 HAVE_DECL_MEMMEM=0
14716 else
14717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
14718 $as_echo_n "checking whether memmem works... " >&6; }
14719 if ${gl_cv_func_memmem_works_always+:} false; then :
14720 $as_echo_n "(cached) " >&6
14721 else
14722 if test "$cross_compiling" = yes; then :
14723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14724 /* end confdefs.h. */
14725
14726 #ifdef __GNU_LIBRARY__
14727 #include <features.h>
14728 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
14729 || __GLIBC_MINOR__ > 12)) \
14730 || (__GLIBC__ > 2)) \
14731 || defined __UCLIBC__
14732 Lucky user
14733 #endif
14734 #elif defined __CYGWIN__
14735 #include <cygwin/version.h>
14736 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
14737 Lucky user
14738 #endif
14739 #else
14740 Lucky user
14741 #endif
14742
14743 _ACEOF
14744 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14745 $EGREP "Lucky user" >/dev/null 2>&1; then :
14746 gl_cv_func_memmem_works_always="guessing yes"
14747 else
14748 gl_cv_func_memmem_works_always="guessing no"
14749 fi
14750 rm -f conftest*
14751
14752
14753 else
14754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14755 /* end confdefs.h. */
14756
14757 #include <string.h> /* for memmem */
14758 #define P "_EF_BF_BD"
14759 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
14760 #define NEEDLE P P P P P
14761
14762 int
14763 main ()
14764 {
14765
14766 int result = 0;
14767 if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
14768 result |= 1;
14769 /* Check for empty needle behavior. */
14770 {
14771 const char *haystack = "AAA";
14772 if (memmem (haystack, 3, NULL, 0) != haystack)
14773 result |= 2;
14774 }
14775 return result;
14776
14777 ;
14778 return 0;
14779 }
14780 _ACEOF
14781 if ac_fn_c_try_run "$LINENO"; then :
14782 gl_cv_func_memmem_works_always=yes
14783 else
14784 gl_cv_func_memmem_works_always=no
14785 fi
14786 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14787 conftest.$ac_objext conftest.beam conftest.$ac_ext
14788 fi
14789
14790
14791 fi
14792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
14793 $as_echo "$gl_cv_func_memmem_works_always" >&6; }
14794 case "$gl_cv_func_memmem_works_always" in
14795 *yes) ;;
14796 *)
14797 REPLACE_MEMMEM=1
14798 ;;
14799 esac
14800 fi
14801 :
14802
14803
14804 ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
14805 if test "x$ac_cv_have_decl_memrchr" = xyes; then :
14806 ac_have_decl=1
14807 else
14808 ac_have_decl=0
14809 fi
14810
14811 cat >>confdefs.h <<_ACEOF
14812 #define HAVE_DECL_MEMRCHR $ac_have_decl
14813 _ACEOF
14814
14815
14816
14817
14818
14819
14820
14821
14822
14823
14824
14825
14826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
14827 $as_echo_n "checking for promoted mode_t type... " >&6; }
14828 if ${gl_cv_promoted_mode_t+:} false; then :
14829 $as_echo_n "(cached) " >&6
14830 else
14831
14832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14833 /* end confdefs.h. */
14834 #include <sys/types.h>
14835 int
14836 main ()
14837 {
14838 typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
14839 ;
14840 return 0;
14841 }
14842 _ACEOF
14843 if ac_fn_c_try_compile "$LINENO"; then :
14844 gl_cv_promoted_mode_t='int'
14845 else
14846 gl_cv_promoted_mode_t='mode_t'
14847 fi
14848 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14849
14850 fi
14851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
14852 $as_echo "$gl_cv_promoted_mode_t" >&6; }
14853
14854 cat >>confdefs.h <<_ACEOF
14855 #define PROMOTED_MODE_T $gl_cv_promoted_mode_t
14856 _ACEOF
14857
14858
14859
14860
14861
14862
14863
14864
14865 GNULIB_DPRINTF=0;
14866 GNULIB_FCLOSE=0;
14867 GNULIB_FDOPEN=0;
14868 GNULIB_FFLUSH=0;
14869 GNULIB_FGETC=0;
14870 GNULIB_FGETS=0;
14871 GNULIB_FOPEN=0;
14872 GNULIB_FPRINTF=0;
14873 GNULIB_FPRINTF_POSIX=0;
14874 GNULIB_FPURGE=0;
14875 GNULIB_FPUTC=0;
14876 GNULIB_FPUTS=0;
14877 GNULIB_FREAD=0;
14878 GNULIB_FREOPEN=0;
14879 GNULIB_FSCANF=0;
14880 GNULIB_FSEEK=0;
14881 GNULIB_FSEEKO=0;
14882 GNULIB_FTELL=0;
14883 GNULIB_FTELLO=0;
14884 GNULIB_FWRITE=0;
14885 GNULIB_GETC=0;
14886 GNULIB_GETCHAR=0;
14887 GNULIB_GETDELIM=0;
14888 GNULIB_GETLINE=0;
14889 GNULIB_OBSTACK_PRINTF=0;
14890 GNULIB_OBSTACK_PRINTF_POSIX=0;
14891 GNULIB_PCLOSE=0;
14892 GNULIB_PERROR=0;
14893 GNULIB_POPEN=0;
14894 GNULIB_PRINTF=0;
14895 GNULIB_PRINTF_POSIX=0;
14896 GNULIB_PUTC=0;
14897 GNULIB_PUTCHAR=0;
14898 GNULIB_PUTS=0;
14899 GNULIB_REMOVE=0;
14900 GNULIB_RENAME=0;
14901 GNULIB_RENAMEAT=0;
14902 GNULIB_SCANF=0;
14903 GNULIB_SNPRINTF=0;
14904 GNULIB_SPRINTF_POSIX=0;
14905 GNULIB_STDIO_H_NONBLOCKING=0;
14906 GNULIB_STDIO_H_SIGPIPE=0;
14907 GNULIB_TMPFILE=0;
14908 GNULIB_VASPRINTF=0;
14909 GNULIB_VFSCANF=0;
14910 GNULIB_VSCANF=0;
14911 GNULIB_VDPRINTF=0;
14912 GNULIB_VFPRINTF=0;
14913 GNULIB_VFPRINTF_POSIX=0;
14914 GNULIB_VPRINTF=0;
14915 GNULIB_VPRINTF_POSIX=0;
14916 GNULIB_VSNPRINTF=0;
14917 GNULIB_VSPRINTF_POSIX=0;
14918 HAVE_DECL_FPURGE=1;
14919 HAVE_DECL_FSEEKO=1;
14920 HAVE_DECL_FTELLO=1;
14921 HAVE_DECL_GETDELIM=1;
14922 HAVE_DECL_GETLINE=1;
14923 HAVE_DECL_OBSTACK_PRINTF=1;
14924 HAVE_DECL_SNPRINTF=1;
14925 HAVE_DECL_VSNPRINTF=1;
14926 HAVE_DPRINTF=1;
14927 HAVE_FSEEKO=1;
14928 HAVE_FTELLO=1;
14929 HAVE_PCLOSE=1;
14930 HAVE_POPEN=1;
14931 HAVE_RENAMEAT=1;
14932 HAVE_VASPRINTF=1;
14933 HAVE_VDPRINTF=1;
14934 REPLACE_DPRINTF=0;
14935 REPLACE_FCLOSE=0;
14936 REPLACE_FDOPEN=0;
14937 REPLACE_FFLUSH=0;
14938 REPLACE_FOPEN=0;
14939 REPLACE_FPRINTF=0;
14940 REPLACE_FPURGE=0;
14941 REPLACE_FREOPEN=0;
14942 REPLACE_FSEEK=0;
14943 REPLACE_FSEEKO=0;
14944 REPLACE_FTELL=0;
14945 REPLACE_FTELLO=0;
14946 REPLACE_GETDELIM=0;
14947 REPLACE_GETLINE=0;
14948 REPLACE_OBSTACK_PRINTF=0;
14949 REPLACE_PERROR=0;
14950 REPLACE_POPEN=0;
14951 REPLACE_PRINTF=0;
14952 REPLACE_REMOVE=0;
14953 REPLACE_RENAME=0;
14954 REPLACE_RENAMEAT=0;
14955 REPLACE_SNPRINTF=0;
14956 REPLACE_SPRINTF=0;
14957 REPLACE_STDIO_READ_FUNCS=0;
14958 REPLACE_STDIO_WRITE_FUNCS=0;
14959 REPLACE_TMPFILE=0;
14960 REPLACE_VASPRINTF=0;
14961 REPLACE_VDPRINTF=0;
14962 REPLACE_VFPRINTF=0;
14963 REPLACE_VPRINTF=0;
14964 REPLACE_VSNPRINTF=0;
14965 REPLACE_VSPRINTF=0;
14966
14967
14968
14969
14970
14971
14972
14973
14974
14975
14976
14977
14978
14979
14980
14981
14982
14983
14984
14985
14986
14987
14988
14989
14990
14991
14992
14993
14994
14995
14996
14997
14998 ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default"
14999 if test "x$ac_cv_have_decl_setenv" = xyes; then :
15000 ac_have_decl=1
15001 else
15002 ac_have_decl=0
15003 fi
15004
15005 cat >>confdefs.h <<_ACEOF
15006 #define HAVE_DECL_SETENV $ac_have_decl
15007 _ACEOF
15008
15009
15010
15011
15012
15013
15014
15015
15016
15017
15018 :
15019
15020
15021
15022
15023
15024 if test $ac_cv_have_decl_setenv = no; then
15025 HAVE_DECL_SETENV=0
15026 fi
15027
15028 :
15029
15030
15031
15032
15033
15034
15035
15036
15037
15038 :
15039
15040
15041
15042
15043
15044 for ac_header in search.h
15045 do :
15046 ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
15047 if test "x$ac_cv_header_search_h" = xyes; then :
15048 cat >>confdefs.h <<_ACEOF
15049 #define HAVE_SEARCH_H 1
15050 _ACEOF
15051
15052 fi
15053
15054 done
15055
15056 for ac_func in tsearch
15057 do :
15058 ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
15059 if test "x$ac_cv_func_tsearch" = xyes; then :
15060 cat >>confdefs.h <<_ACEOF
15061 #define HAVE_TSEARCH 1
15062 _ACEOF
15063
15064 fi
15065 done
15066
15067
15068
15069
15070 GNULIB_PTHREAD_SIGMASK=0;
15071 GNULIB_RAISE=0;
15072 GNULIB_SIGNAL_H_SIGPIPE=0;
15073 GNULIB_SIGPROCMASK=0;
15074 GNULIB_SIGACTION=0;
15075 HAVE_POSIX_SIGNALBLOCKING=1;
15076 HAVE_PTHREAD_SIGMASK=1;
15077 HAVE_RAISE=1;
15078 HAVE_SIGSET_T=1;
15079 HAVE_SIGINFO_T=1;
15080 HAVE_SIGACTION=1;
15081 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
15082
15083 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
15084
15085 HAVE_SIGHANDLER_T=1;
15086 REPLACE_PTHREAD_SIGMASK=0;
15087 REPLACE_RAISE=0;
15088
15089
15090 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
15091 #include <signal.h>
15092 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
15093 #include <sys/types.h>
15094
15095 "
15096 if test "x$ac_cv_type_sigset_t" = xyes; then :
15097
15098 cat >>confdefs.h <<_ACEOF
15099 #define HAVE_SIGSET_T 1
15100 _ACEOF
15101
15102 gl_cv_type_sigset_t=yes
15103 else
15104 gl_cv_type_sigset_t=no
15105 fi
15106
15107 if test $gl_cv_type_sigset_t != yes; then
15108 HAVE_SIGSET_T=0
15109 fi
15110
15111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
15112 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
15113 if ${ac_cv_type_uid_t+:} false; then :
15114 $as_echo_n "(cached) " >&6
15115 else
15116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15117 /* end confdefs.h. */
15118 #include <sys/types.h>
15119
15120 _ACEOF
15121 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15122 $EGREP "uid_t" >/dev/null 2>&1; then :
15123 ac_cv_type_uid_t=yes
15124 else
15125 ac_cv_type_uid_t=no
15126 fi
15127 rm -f conftest*
15128
15129 fi
15130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
15131 $as_echo "$ac_cv_type_uid_t" >&6; }
15132 if test $ac_cv_type_uid_t = no; then
15133
15134 $as_echo "#define uid_t int" >>confdefs.h
15135
15136
15137 $as_echo "#define gid_t int" >>confdefs.h
15138
15139 fi
15140
15141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
15142 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
15143 if ${ac_cv_header_stdbool_h+:} false; then :
15144 $as_echo_n "(cached) " >&6
15145 else
15146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15147 /* end confdefs.h. */
15148
15149 #include <stdbool.h>
15150
15151 #ifdef __cplusplus
15152 typedef bool Bool;
15153 #else
15154 typedef _Bool Bool;
15155 #ifndef bool
15156 "error: bool is not defined"
15157 #endif
15158 #ifndef false
15159 "error: false is not defined"
15160 #endif
15161 #if false
15162 "error: false is not 0"
15163 #endif
15164 #ifndef true
15165 "error: true is not defined"
15166 #endif
15167 #if true != 1
15168 "error: true is not 1"
15169 #endif
15170 #endif
15171
15172 #ifndef __bool_true_false_are_defined
15173 "error: __bool_true_false_are_defined is not defined"
15174 #endif
15175
15176 struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
15177
15178 char a[true == 1 ? 1 : -1];
15179 char b[false == 0 ? 1 : -1];
15180 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
15181 char d[(bool) 0.5 == true ? 1 : -1];
15182 /* See body of main program for 'e'. */
15183 char f[(Bool) 0.0 == false ? 1 : -1];
15184 char g[true];
15185 char h[sizeof (Bool)];
15186 char i[sizeof s.t];
15187 enum { j = false, k = true, l = false * true, m = true * 256 };
15188 /* The following fails for
15189 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
15190 Bool n[m];
15191 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
15192 char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
15193 /* Catch a bug in an HP-UX C compiler. See
15194 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
15195 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
15196 */
15197 Bool q = true;
15198 Bool *pq = &q;
15199 bool *qq = &q;
15200
15201 int
15202 main ()
15203 {
15204
15205 bool e = &s;
15206 *pq |= q; *pq |= ! q;
15207 *qq |= q; *qq |= ! q;
15208 /* Refer to every declared value, to avoid compiler optimizations. */
15209 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
15210 + !m + !n + !o + !p + !q + !pq + !qq);
15211
15212 ;
15213 return 0;
15214 }
15215 _ACEOF
15216 if ac_fn_c_try_compile "$LINENO"; then :
15217 ac_cv_header_stdbool_h=yes
15218 else
15219 ac_cv_header_stdbool_h=no
15220 fi
15221 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15222 fi
15223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
15224 $as_echo "$ac_cv_header_stdbool_h" >&6; }
15225 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
15226 if test "x$ac_cv_type__Bool" = xyes; then :
15227
15228 cat >>confdefs.h <<_ACEOF
15229 #define HAVE__BOOL 1
15230 _ACEOF
15231
15232
15233 fi
15234
15235
15236
15237 REPLACE_NULL=0;
15238 HAVE_MAX_ALIGN_T=1;
15239 HAVE_WCHAR_T=1;
15240
15241
15242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
15243 $as_echo_n "checking for wchar_t... " >&6; }
15244 if ${gt_cv_c_wchar_t+:} false; then :
15245 $as_echo_n "(cached) " >&6
15246 else
15247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15248 /* end confdefs.h. */
15249 #include <stddef.h>
15250 wchar_t foo = (wchar_t)'\0';
15251 int
15252 main ()
15253 {
15254
15255 ;
15256 return 0;
15257 }
15258 _ACEOF
15259 if ac_fn_c_try_compile "$LINENO"; then :
15260 gt_cv_c_wchar_t=yes
15261 else
15262 gt_cv_c_wchar_t=no
15263 fi
15264 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15265 fi
15266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
15267 $as_echo "$gt_cv_c_wchar_t" >&6; }
15268 if test $gt_cv_c_wchar_t = yes; then
15269
15270 $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
15271
15272 fi
15273
15274
15275
15276
15277
15278
15279
15280 ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
15281 if test "x$ac_cv_have_decl_strdup" = xyes; then :
15282 ac_have_decl=1
15283 else
15284 ac_have_decl=0
15285 fi
15286
15287 cat >>confdefs.h <<_ACEOF
15288 #define HAVE_DECL_STRDUP $ac_have_decl
15289 _ACEOF
15290
15291
15292
15293 REPLACE_STRERROR_0=0
15294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
15295 $as_echo_n "checking whether strerror(0) succeeds... " >&6; }
15296 if ${gl_cv_func_strerror_0_works+:} false; then :
15297 $as_echo_n "(cached) " >&6
15298 else
15299 if test "$cross_compiling" = yes; then :
15300 case "$host_os" in
15301 # Guess yes on glibc systems.
15302 *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
15303 # If we don't know, assume the worst.
15304 *) gl_cv_func_strerror_0_works="guessing no" ;;
15305 esac
15306
15307 else
15308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15309 /* end confdefs.h. */
15310 #include <string.h>
15311 #include <errno.h>
15312
15313 int
15314 main ()
15315 {
15316 int result = 0;
15317 char *str;
15318 errno = 0;
15319 str = strerror (0);
15320 if (!*str) result |= 1;
15321 if (errno) result |= 2;
15322 if (strstr (str, "nknown") || strstr (str, "ndefined"))
15323 result |= 4;
15324 return result;
15325 ;
15326 return 0;
15327 }
15328 _ACEOF
15329 if ac_fn_c_try_run "$LINENO"; then :
15330 gl_cv_func_strerror_0_works=yes
15331 else
15332 gl_cv_func_strerror_0_works=no
15333 fi
15334 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15335 conftest.$ac_objext conftest.beam conftest.$ac_ext
15336 fi
15337
15338
15339 fi
15340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
15341 $as_echo "$gl_cv_func_strerror_0_works" >&6; }
15342 case "$gl_cv_func_strerror_0_works" in
15343 *yes) ;;
15344 *)
15345 REPLACE_STRERROR_0=1
15346
15347 $as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h
15348
15349 ;;
15350 esac
15351
15352
15353
15354
15355
15356
15357
15358
15359
15360
15361 ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
15362 if test "x$ac_cv_func_strerror_r" = xyes; then :
15363
15364 fi
15365
15366 if test $ac_cv_func_strerror_r = yes; then
15367 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
15368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strerror_r with POSIX signature" >&5
15369 $as_echo_n "checking for strerror_r with POSIX signature... " >&6; }
15370 if ${gl_cv_func_strerror_r_posix_signature+:} false; then :
15371 $as_echo_n "(cached) " >&6
15372 else
15373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15374 /* end confdefs.h. */
15375 #include <string.h>
15376 int strerror_r (int, char *, size_t);
15377
15378 int
15379 main ()
15380 {
15381
15382 ;
15383 return 0;
15384 }
15385 _ACEOF
15386 if ac_fn_c_try_compile "$LINENO"; then :
15387 gl_cv_func_strerror_r_posix_signature=yes
15388 else
15389 gl_cv_func_strerror_r_posix_signature=no
15390 fi
15391 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15392
15393 fi
15394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_posix_signature" >&5
15395 $as_echo "$gl_cv_func_strerror_r_posix_signature" >&6; }
15396 if test $gl_cv_func_strerror_r_posix_signature = yes; then
15397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r works" >&5
15398 $as_echo_n "checking whether strerror_r works... " >&6; }
15399 if ${gl_cv_func_strerror_r_works+:} false; then :
15400 $as_echo_n "(cached) " >&6
15401 else
15402 if test "$cross_compiling" = yes; then :
15403
15404 case "$host_os" in
15405 # Guess no on AIX.
15406 aix*) gl_cv_func_strerror_r_works="guessing no";;
15407 # Guess no on HP-UX.
15408 hpux*) gl_cv_func_strerror_r_works="guessing no";;
15409 # Guess no on BSD variants.
15410 *bsd*) gl_cv_func_strerror_r_works="guessing no";;
15411 # Guess yes otherwise.
15412 *) gl_cv_func_strerror_r_works="guessing yes";;
15413 esac
15414
15415 else
15416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15417 /* end confdefs.h. */
15418 #include <errno.h>
15419 #include <string.h>
15420
15421 int
15422 main ()
15423 {
15424 int result = 0;
15425 char buf[79];
15426 if (strerror_r (EACCES, buf, 0) < 0)
15427 result |= 1;
15428 errno = 0;
15429 if (strerror_r (EACCES, buf, sizeof buf) != 0)
15430 result |= 2;
15431 strcpy (buf, "Unknown");
15432 if (strerror_r (0, buf, sizeof buf) != 0)
15433 result |= 4;
15434 if (errno)
15435 result |= 8;
15436 if (strstr (buf, "nknown") || strstr (buf, "ndefined"))
15437 result |= 0x10;
15438 errno = 0;
15439 *buf = 0;
15440 if (strerror_r (-3, buf, sizeof buf) < 0)
15441 result |= 0x20;
15442 if (errno)
15443 result |= 0x40;
15444 if (!*buf)
15445 result |= 0x80;
15446 return result;
15447
15448 ;
15449 return 0;
15450 }
15451 _ACEOF
15452 if ac_fn_c_try_run "$LINENO"; then :
15453 gl_cv_func_strerror_r_works=yes
15454 else
15455 gl_cv_func_strerror_r_works=no
15456 fi
15457 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15458 conftest.$ac_objext conftest.beam conftest.$ac_ext
15459 fi
15460
15461
15462 fi
15463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
15464 $as_echo "$gl_cv_func_strerror_r_works" >&6; }
15465 else
15466
15467 :
15468
15469
15470
15471
15472
15473 if test $ac_cv_func___xpg_strerror_r = yes; then
15474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __xpg_strerror_r works" >&5
15475 $as_echo_n "checking whether __xpg_strerror_r works... " >&6; }
15476 if ${gl_cv_func_strerror_r_works+:} false; then :
15477 $as_echo_n "(cached) " >&6
15478 else
15479 if test "$cross_compiling" = yes; then :
15480 gl_cv_func_strerror_r_works="guessing no"
15481
15482 else
15483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15484 /* end confdefs.h. */
15485 #include <errno.h>
15486 #include <string.h>
15487 extern
15488 #ifdef __cplusplus
15489 "C"
15490 #endif
15491 int __xpg_strerror_r(int, char *, size_t);
15492
15493 int
15494 main ()
15495 {
15496 int result = 0;
15497 char buf[256] = "^";
15498 char copy[256];
15499 char *str = strerror (-1);
15500 strcpy (copy, str);
15501 if (__xpg_strerror_r (-2, buf, 1) == 0)
15502 result |= 1;
15503 if (*buf)
15504 result |= 2;
15505 __xpg_strerror_r (-2, buf, 256);
15506 if (strcmp (str, copy))
15507 result |= 4;
15508 return result;
15509
15510 ;
15511 return 0;
15512 }
15513 _ACEOF
15514 if ac_fn_c_try_run "$LINENO"; then :
15515 gl_cv_func_strerror_r_works=yes
15516 else
15517 gl_cv_func_strerror_r_works=no
15518 fi
15519 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15520 conftest.$ac_objext conftest.beam conftest.$ac_ext
15521 fi
15522
15523
15524 fi
15525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
15526 $as_echo "$gl_cv_func_strerror_r_works" >&6; }
15527 fi
15528 fi
15529 fi
15530 fi
15531
15532
15533
15534
15535
15536
15537
15538
15539
15540
15541
15542
15543
15544
15545
15546
15547
15548
15549
15550
15551
15552
15553 if test $gl_cv_have_include_next = yes; then
15554 gl_cv_next_string_h='<'string.h'>'
15555 else
15556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
15557 $as_echo_n "checking absolute name of <string.h>... " >&6; }
15558 if ${gl_cv_next_string_h+:} false; then :
15559 $as_echo_n "(cached) " >&6
15560 else
15561
15562
15563
15564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15565 /* end confdefs.h. */
15566 #include <string.h>
15567 _ACEOF
15568 case "$host_os" in
15569 aix*) gl_absname_cpp="$ac_cpp -C" ;;
15570 *) gl_absname_cpp="$ac_cpp" ;;
15571 esac
15572
15573 case "$host_os" in
15574 mingw*)
15575 gl_dirsep_regex='[/\\]'
15576 ;;
15577 *)
15578 gl_dirsep_regex='\/'
15579 ;;
15580 esac
15581 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15582 gl_header_literal_regex=`echo 'string.h' \
15583 | sed -e "$gl_make_literal_regex_sed"`
15584 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15585 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15586 s|^/[^/]|//&|
15587 p
15588 q
15589 }'
15590
15591 gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15592 sed -n "$gl_absolute_header_sed"`
15593
15594 gl_header=$gl_cv_absolute_string_h
15595 gl_cv_next_string_h='"'$gl_header'"'
15596
15597
15598 fi
15599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
15600 $as_echo "$gl_cv_next_string_h" >&6; }
15601 fi
15602 NEXT_STRING_H=$gl_cv_next_string_h
15603
15604 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15605 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15606 gl_next_as_first_directive='<'string.h'>'
15607 else
15608 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15609 gl_next_as_first_directive=$gl_cv_next_string_h
15610 fi
15611 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
15612
15613
15614
15615
15616
15617
15618 for gl_func in ffsl ffsll memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r strerror_r strsignal strverscmp; do
15619 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
15620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
15621 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
15622 if eval \${$as_gl_Symbol+:} false; then :
15623 $as_echo_n "(cached) " >&6
15624 else
15625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15626 /* end confdefs.h. */
15627 #include <string.h>
15628
15629 int
15630 main ()
15631 {
15632 #undef $gl_func
15633 (void) $gl_func;
15634 ;
15635 return 0;
15636 }
15637 _ACEOF
15638 if ac_fn_c_try_compile "$LINENO"; then :
15639 eval "$as_gl_Symbol=yes"
15640 else
15641 eval "$as_gl_Symbol=no"
15642 fi
15643 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15644 fi
15645 eval ac_res=\$$as_gl_Symbol
15646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15647 $as_echo "$ac_res" >&6; }
15648 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
15649 cat >>confdefs.h <<_ACEOF
15650 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
15651 _ACEOF
15652
15653 eval ac_cv_have_decl_$gl_func=yes
15654 fi
15655 done
15656
15657
15658
15659
15660
15661 if test "$gl_cv_func_memchr_works" != yes; then
15662 REPLACE_STRSTR=1
15663 else
15664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
15665 $as_echo_n "checking whether strstr works... " >&6; }
15666 if ${gl_cv_func_strstr_works_always+:} false; then :
15667 $as_echo_n "(cached) " >&6
15668 else
15669 if test "$cross_compiling" = yes; then :
15670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15671 /* end confdefs.h. */
15672
15673 #ifdef __GNU_LIBRARY__
15674 #include <features.h>
15675 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
15676 || defined __UCLIBC__
15677 Lucky user
15678 #endif
15679 #elif defined __CYGWIN__
15680 #include <cygwin/version.h>
15681 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
15682 Lucky user
15683 #endif
15684 #else
15685 Lucky user
15686 #endif
15687
15688 _ACEOF
15689 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15690 $EGREP "Lucky user" >/dev/null 2>&1; then :
15691 gl_cv_func_strstr_works_always="guessing yes"
15692 else
15693 gl_cv_func_strstr_works_always="guessing no"
15694 fi
15695 rm -f conftest*
15696
15697
15698 else
15699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15700 /* end confdefs.h. */
15701
15702 #include <string.h> /* for strstr */
15703 #define P "_EF_BF_BD"
15704 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
15705 #define NEEDLE P P P P P
15706
15707 int
15708 main ()
15709 {
15710 return !!strstr (HAYSTACK, NEEDLE);
15711
15712 ;
15713 return 0;
15714 }
15715 _ACEOF
15716 if ac_fn_c_try_run "$LINENO"; then :
15717 gl_cv_func_strstr_works_always=yes
15718 else
15719 gl_cv_func_strstr_works_always=no
15720 fi
15721 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15722 conftest.$ac_objext conftest.beam conftest.$ac_ext
15723 fi
15724
15725
15726 fi
15727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
15728 $as_echo "$gl_cv_func_strstr_works_always" >&6; }
15729 case "$gl_cv_func_strstr_works_always" in
15730 *yes) ;;
15731 *)
15732 REPLACE_STRSTR=1
15733 ;;
15734 esac
15735 fi
15736
15737
15738 ac_fn_c_check_decl "$LINENO" "strtok_r" "ac_cv_have_decl_strtok_r" "$ac_includes_default"
15739 if test "x$ac_cv_have_decl_strtok_r" = xyes; then :
15740 ac_have_decl=1
15741 else
15742 ac_have_decl=0
15743 fi
15744
15745 cat >>confdefs.h <<_ACEOF
15746 #define HAVE_DECL_STRTOK_R $ac_have_decl
15747 _ACEOF
15748
15749
15750
15751
15752
15753
15754
15755
15756
15757
15758
15759
15760
15761
15762
15763
15764
15765
15766
15767
15768 if test $gl_cv_have_include_next = yes; then
15769 gl_cv_next_sys_types_h='<'sys/types.h'>'
15770 else
15771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
15772 $as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
15773 if ${gl_cv_next_sys_types_h+:} false; then :
15774 $as_echo_n "(cached) " >&6
15775 else
15776
15777
15778
15779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15780 /* end confdefs.h. */
15781 #include <sys/types.h>
15782 _ACEOF
15783 case "$host_os" in
15784 aix*) gl_absname_cpp="$ac_cpp -C" ;;
15785 *) gl_absname_cpp="$ac_cpp" ;;
15786 esac
15787
15788 case "$host_os" in
15789 mingw*)
15790 gl_dirsep_regex='[/\\]'
15791 ;;
15792 *)
15793 gl_dirsep_regex='\/'
15794 ;;
15795 esac
15796 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15797 gl_header_literal_regex=`echo 'sys/types.h' \
15798 | sed -e "$gl_make_literal_regex_sed"`
15799 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15800 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15801 s|^/[^/]|//&|
15802 p
15803 q
15804 }'
15805
15806 gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15807 sed -n "$gl_absolute_header_sed"`
15808
15809 gl_header=$gl_cv_absolute_sys_types_h
15810 gl_cv_next_sys_types_h='"'$gl_header'"'
15811
15812
15813 fi
15814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
15815 $as_echo "$gl_cv_next_sys_types_h" >&6; }
15816 fi
15817 NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
15818
15819 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15820 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15821 gl_next_as_first_directive='<'sys/types.h'>'
15822 else
15823 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15824 gl_next_as_first_directive=$gl_cv_next_sys_types_h
15825 fi
15826 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
15827
15828
15829
15830
15831
15832
15833
15834
15835
15836
15837
15838
15839
15840
15841
15842
15843
15844
15845
15846 GNULIB_MKTIME=0;
15847 GNULIB_NANOSLEEP=0;
15848 GNULIB_STRPTIME=0;
15849 GNULIB_TIMEGM=0;
15850 GNULIB_TIME_R=0;
15851 GNULIB_TIME_RZ=0;
15852 HAVE_DECL_LOCALTIME_R=1;
15853 HAVE_NANOSLEEP=1;
15854 HAVE_STRPTIME=1;
15855 HAVE_TIMEGM=1;
15856 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
15857 REPLACE_MKTIME=GNULIB_PORTCHECK;
15858 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
15859 REPLACE_TIMEGM=GNULIB_PORTCHECK;
15860
15861 : ${GNULIB_GETTIMEOFDAY=0};
15862 REPLACE_GMTIME=0;
15863 REPLACE_LOCALTIME=0;
15864
15865
15866
15867 :
15868
15869
15870
15871
15872
15873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
15874 $as_echo_n "checking for struct timespec in <time.h>... " >&6; }
15875 if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then :
15876 $as_echo_n "(cached) " >&6
15877 else
15878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15879 /* end confdefs.h. */
15880 #include <time.h>
15881
15882 int
15883 main ()
15884 {
15885 static struct timespec x; x.tv_sec = x.tv_nsec;
15886 ;
15887 return 0;
15888 }
15889 _ACEOF
15890 if ac_fn_c_try_compile "$LINENO"; then :
15891 gl_cv_sys_struct_timespec_in_time_h=yes
15892 else
15893 gl_cv_sys_struct_timespec_in_time_h=no
15894 fi
15895 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15896 fi
15897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
15898 $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
15899
15900 TIME_H_DEFINES_STRUCT_TIMESPEC=0
15901 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
15902 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
15903 UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
15904 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
15905 TIME_H_DEFINES_STRUCT_TIMESPEC=1
15906 else
15907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
15908 $as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
15909 if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then :
15910 $as_echo_n "(cached) " >&6
15911 else
15912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15913 /* end confdefs.h. */
15914 #include <sys/time.h>
15915
15916 int
15917 main ()
15918 {
15919 static struct timespec x; x.tv_sec = x.tv_nsec;
15920 ;
15921 return 0;
15922 }
15923 _ACEOF
15924 if ac_fn_c_try_compile "$LINENO"; then :
15925 gl_cv_sys_struct_timespec_in_sys_time_h=yes
15926 else
15927 gl_cv_sys_struct_timespec_in_sys_time_h=no
15928 fi
15929 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15930 fi
15931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
15932 $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
15933 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
15934 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
15935 else
15936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
15937 $as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
15938 if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then :
15939 $as_echo_n "(cached) " >&6
15940 else
15941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15942 /* end confdefs.h. */
15943 #include <pthread.h>
15944
15945 int
15946 main ()
15947 {
15948 static struct timespec x; x.tv_sec = x.tv_nsec;
15949 ;
15950 return 0;
15951 }
15952 _ACEOF
15953 if ac_fn_c_try_compile "$LINENO"; then :
15954 gl_cv_sys_struct_timespec_in_pthread_h=yes
15955 else
15956 gl_cv_sys_struct_timespec_in_pthread_h=no
15957 fi
15958 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15959 fi
15960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
15961 $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
15962 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
15963 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
15964 else
15965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
15966 $as_echo_n "checking for struct timespec in <unistd.h>... " >&6; }
15967 if ${gl_cv_sys_struct_timespec_in_unistd_h+:} false; then :
15968 $as_echo_n "(cached) " >&6
15969 else
15970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15971 /* end confdefs.h. */
15972 #include <unistd.h>
15973
15974 int
15975 main ()
15976 {
15977 static struct timespec x; x.tv_sec = x.tv_nsec;
15978 ;
15979 return 0;
15980 }
15981 _ACEOF
15982 if ac_fn_c_try_compile "$LINENO"; then :
15983 gl_cv_sys_struct_timespec_in_unistd_h=yes
15984 else
15985 gl_cv_sys_struct_timespec_in_unistd_h=no
15986 fi
15987 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15988 fi
15989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5
15990 $as_echo "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
15991 if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
15992 UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
15993 fi
15994 fi
15995 fi
15996 fi
15997
15998
15999
16000
16001
16002
16003
16004
16005
16006
16007
16008
16009
16010
16011
16012
16013 if test $gl_cv_have_include_next = yes; then
16014 gl_cv_next_time_h='<'time.h'>'
16015 else
16016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
16017 $as_echo_n "checking absolute name of <time.h>... " >&6; }
16018 if ${gl_cv_next_time_h+:} false; then :
16019 $as_echo_n "(cached) " >&6
16020 else
16021
16022
16023
16024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16025 /* end confdefs.h. */
16026 #include <time.h>
16027 _ACEOF
16028 case "$host_os" in
16029 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16030 *) gl_absname_cpp="$ac_cpp" ;;
16031 esac
16032
16033 case "$host_os" in
16034 mingw*)
16035 gl_dirsep_regex='[/\\]'
16036 ;;
16037 *)
16038 gl_dirsep_regex='\/'
16039 ;;
16040 esac
16041 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16042 gl_header_literal_regex=`echo 'time.h' \
16043 | sed -e "$gl_make_literal_regex_sed"`
16044 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16045 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16046 s|^/[^/]|//&|
16047 p
16048 q
16049 }'
16050
16051 gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16052 sed -n "$gl_absolute_header_sed"`
16053
16054 gl_header=$gl_cv_absolute_time_h
16055 gl_cv_next_time_h='"'$gl_header'"'
16056
16057
16058 fi
16059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
16060 $as_echo "$gl_cv_next_time_h" >&6; }
16061 fi
16062 NEXT_TIME_H=$gl_cv_next_time_h
16063
16064 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16065 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16066 gl_next_as_first_directive='<'time.h'>'
16067 else
16068 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
16069 gl_next_as_first_directive=$gl_cv_next_time_h
16070 fi
16071 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
16072
16073
16074
16075
16076
16077
16078
16079
16080
16081
16082
16083
16084
16085
16086
16087
16088
16089 ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
16090 if test "x$ac_cv_have_decl_unsetenv" = xyes; then :
16091 ac_have_decl=1
16092 else
16093 ac_have_decl=0
16094 fi
16095
16096 cat >>confdefs.h <<_ACEOF
16097 #define HAVE_DECL_UNSETENV $ac_have_decl
16098 _ACEOF
16099
16100
16101
16102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
16103 $as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
16104 if ${gl_cv_header_wchar_h_correct_inline+:} false; then :
16105 $as_echo_n "(cached) " >&6
16106 else
16107 gl_cv_header_wchar_h_correct_inline=yes
16108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16109 /* end confdefs.h. */
16110
16111 #define wcstod renamed_wcstod
16112 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
16113 <wchar.h>.
16114 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16115 included before <wchar.h>. */
16116 #include <stddef.h>
16117 #include <stdio.h>
16118 #include <time.h>
16119 #include <wchar.h>
16120 extern int zero (void);
16121 int main () { return zero(); }
16122
16123 _ACEOF
16124 save_ac_compile="$ac_compile"
16125 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
16126 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
16127 (eval $ac_compile) 2>&5
16128 ac_status=$?
16129 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16130 test $ac_status = 0; }; then
16131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16132 /* end confdefs.h. */
16133
16134 #define wcstod renamed_wcstod
16135 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
16136 <wchar.h>.
16137 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16138 included before <wchar.h>. */
16139 #include <stddef.h>
16140 #include <stdio.h>
16141 #include <time.h>
16142 #include <wchar.h>
16143 int zero (void) { return 0; }
16144
16145 _ACEOF
16146 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
16147 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
16148 (eval $ac_compile) 2>&5
16149 ac_status=$?
16150 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16151 test $ac_status = 0; }; then
16152 if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
16153 :
16154 else
16155 gl_cv_header_wchar_h_correct_inline=no
16156 fi
16157 fi
16158 fi
16159 ac_compile="$save_ac_compile"
16160 rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
16161
16162 fi
16163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
16164 $as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
16165 if test $gl_cv_header_wchar_h_correct_inline = no; then
16166 as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
16167 This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
16168 C99 mode. You have four options:
16169 - Add the flag -fgnu89-inline to CC and reconfigure, or
16170 - Fix your include files, using parts of
16171 <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
16172 - Use a gcc version older than 4.3, or
16173 - Don't use the flags -std=c99 or -std=gnu99.
16174 Configuration aborted." "$LINENO" 5
16175 fi
16176
16177
16178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
16179 $as_echo_n "checking for wint_t... " >&6; }
16180 if ${gt_cv_c_wint_t+:} false; then :
16181 $as_echo_n "(cached) " >&6
16182 else
16183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16184 /* end confdefs.h. */
16185
16186 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
16187 <wchar.h>.
16188 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
16189 before <wchar.h>. */
16190 #include <stddef.h>
16191 #include <stdio.h>
16192 #include <time.h>
16193 #include <wchar.h>
16194 wint_t foo = (wchar_t)'\0';
16195 int
16196 main ()
16197 {
16198
16199 ;
16200 return 0;
16201 }
16202 _ACEOF
16203 if ac_fn_c_try_compile "$LINENO"; then :
16204 gt_cv_c_wint_t=yes
16205 else
16206 gt_cv_c_wint_t=no
16207 fi
16208 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16209 fi
16210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
16211 $as_echo "$gt_cv_c_wint_t" >&6; }
16212 if test $gt_cv_c_wint_t = yes; then
16213
16214 $as_echo "#define HAVE_WINT_T 1" >>confdefs.h
16215
16216 fi
16217
16218
16219 GNULIB_ISWBLANK=0;
16220 GNULIB_WCTYPE=0;
16221 GNULIB_ISWCTYPE=0;
16222 GNULIB_WCTRANS=0;
16223 GNULIB_TOWCTRANS=0;
16224 HAVE_ISWBLANK=1;
16225 HAVE_WCTYPE_T=1;
16226 HAVE_WCTRANS_T=1;
16227 REPLACE_ISWBLANK=0;
16228
16229
16230
16231
16232
16233
16234
16235 if false; then
16236 GL_COND_LIBTOOL_TRUE=
16237 GL_COND_LIBTOOL_FALSE='#'
16238 else
16239 GL_COND_LIBTOOL_TRUE='#'
16240 GL_COND_LIBTOOL_FALSE=
16241 fi
16242
16243 gl_cond_libtool=false
16244 gl_libdeps=
16245 gl_ltlibdeps=
16246 gl_m4_base='import/m4'
16247
16248
16249
16250
16251
16252
16253
16254
16255
16256 gl_source_base='import'
16257
16258
16259 if test $ac_cv_func_alloca_works = no; then
16260 :
16261 fi
16262
16263 # Define an additional variable used in the Makefile substitution.
16264 if test $ac_cv_working_alloca_h = yes; then
16265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
16266 $as_echo_n "checking for alloca as a compiler built-in... " >&6; }
16267 if ${gl_cv_rpl_alloca+:} false; then :
16268 $as_echo_n "(cached) " >&6
16269 else
16270
16271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16272 /* end confdefs.h. */
16273
16274 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
16275 Need own alloca
16276 #endif
16277
16278 _ACEOF
16279 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16280 $EGREP "Need own alloca" >/dev/null 2>&1; then :
16281 gl_cv_rpl_alloca=yes
16282 else
16283 gl_cv_rpl_alloca=no
16284 fi
16285 rm -f conftest*
16286
16287
16288 fi
16289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
16290 $as_echo "$gl_cv_rpl_alloca" >&6; }
16291 if test $gl_cv_rpl_alloca = yes; then
16292
16293 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
16294
16295 ALLOCA_H=alloca.h
16296 else
16297 ALLOCA_H=
16298 fi
16299 else
16300 ALLOCA_H=alloca.h
16301 fi
16302
16303 if test -n "$ALLOCA_H"; then
16304 GL_GENERATE_ALLOCA_H_TRUE=
16305 GL_GENERATE_ALLOCA_H_FALSE='#'
16306 else
16307 GL_GENERATE_ALLOCA_H_TRUE='#'
16308 GL_GENERATE_ALLOCA_H_FALSE=
16309 fi
16310
16311
16312
16313
16314
16315
16316 :
16317
16318
16319
16320
16321
16322 if test $ac_cv_header_arpa_inet_h = yes; then
16323 HAVE_ARPA_INET_H=1
16324 else
16325 HAVE_ARPA_INET_H=0
16326 fi
16327
16328
16329
16330
16331
16332
16333
16334 :
16335
16336
16337
16338
16339
16340
16341
16342
16343 if test $gl_cv_have_include_next = yes; then
16344 gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
16345 else
16346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <arpa/inet.h>" >&5
16347 $as_echo_n "checking absolute name of <arpa/inet.h>... " >&6; }
16348 if ${gl_cv_next_arpa_inet_h+:} false; then :
16349 $as_echo_n "(cached) " >&6
16350 else
16351
16352 if test $ac_cv_header_arpa_inet_h = yes; then
16353
16354
16355
16356
16357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16358 /* end confdefs.h. */
16359 #include <arpa/inet.h>
16360 _ACEOF
16361 case "$host_os" in
16362 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16363 *) gl_absname_cpp="$ac_cpp" ;;
16364 esac
16365
16366 case "$host_os" in
16367 mingw*)
16368 gl_dirsep_regex='[/\\]'
16369 ;;
16370 *)
16371 gl_dirsep_regex='\/'
16372 ;;
16373 esac
16374 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16375 gl_header_literal_regex=`echo 'arpa/inet.h' \
16376 | sed -e "$gl_make_literal_regex_sed"`
16377 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16378 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16379 s|^/[^/]|//&|
16380 p
16381 q
16382 }'
16383
16384 gl_cv_absolute_arpa_inet_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16385 sed -n "$gl_absolute_header_sed"`
16386
16387 gl_header=$gl_cv_absolute_arpa_inet_h
16388 gl_cv_next_arpa_inet_h='"'$gl_header'"'
16389 else
16390 gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
16391 fi
16392
16393
16394 fi
16395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_arpa_inet_h" >&5
16396 $as_echo "$gl_cv_next_arpa_inet_h" >&6; }
16397 fi
16398 NEXT_ARPA_INET_H=$gl_cv_next_arpa_inet_h
16399
16400 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16401 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16402 gl_next_as_first_directive='<'arpa/inet.h'>'
16403 else
16404 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
16405 gl_next_as_first_directive=$gl_cv_next_arpa_inet_h
16406 fi
16407 NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H=$gl_next_as_first_directive
16408
16409
16410
16411
16412
16413
16414
16415
16416 for gl_func in inet_ntop inet_pton; do
16417 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
16418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
16419 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
16420 if eval \${$as_gl_Symbol+:} false; then :
16421 $as_echo_n "(cached) " >&6
16422 else
16423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16424 /* end confdefs.h. */
16425
16426 /* On some systems, this header is not self-consistent. */
16427 #if !(defined __GLIBC__ || defined __UCLIBC__)
16428 # include <sys/socket.h>
16429 #endif
16430 #ifdef __TANDEM
16431 # include <netdb.h>
16432 #endif
16433 #include <arpa/inet.h>
16434
16435 int
16436 main ()
16437 {
16438 #undef $gl_func
16439 (void) $gl_func;
16440 ;
16441 return 0;
16442 }
16443 _ACEOF
16444 if ac_fn_c_try_compile "$LINENO"; then :
16445 eval "$as_gl_Symbol=yes"
16446 else
16447 eval "$as_gl_Symbol=no"
16448 fi
16449 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16450 fi
16451 eval ac_res=\$$as_gl_Symbol
16452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16453 $as_echo "$ac_res" >&6; }
16454 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
16455 cat >>confdefs.h <<_ACEOF
16456 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
16457 _ACEOF
16458
16459 eval ac_cv_have_decl_$gl_func=yes
16460 fi
16461 done
16462
16463
16464
16465
16466
16467
16468
16469
16470
16471
16472
16473 gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
16474
16475
16476
16477
16478 if test $ac_cv_func_canonicalize_file_name = no; then
16479 HAVE_CANONICALIZE_FILE_NAME=0
16480 if test $ac_cv_func_realpath = no; then
16481 HAVE_REALPATH=0
16482 else
16483 case "$gl_cv_func_realpath_works" in
16484 *yes) ;;
16485 *) REPLACE_REALPATH=1 ;;
16486 esac
16487 fi
16488 else
16489 case "$gl_cv_func_realpath_works" in
16490 *yes)
16491 ;;
16492 *)
16493 REPLACE_CANONICALIZE_FILE_NAME=1
16494 REPLACE_REALPATH=1
16495 ;;
16496 esac
16497 fi
16498
16499 if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
16500
16501
16502
16503
16504
16505
16506
16507
16508 gl_LIBOBJS="$gl_LIBOBJS canonicalize-lgpl.$ac_objext"
16509
16510 fi
16511
16512
16513 cat >>confdefs.h <<_ACEOF
16514 #define GNULIB_CANONICALIZE_LGPL 1
16515 _ACEOF
16516
16517
16518
16519
16520
16521
16522
16523 GNULIB_CANONICALIZE_FILE_NAME=1
16524
16525
16526
16527
16528
16529 $as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
16530
16531
16532
16533
16534
16535
16536
16537
16538 GNULIB_REALPATH=1
16539
16540
16541
16542
16543
16544 $as_echo "#define GNULIB_TEST_REALPATH 1" >>confdefs.h
16545
16546
16547
16548
16549
16550
16551
16552
16553 GNULIB_CHDIR=1
16554
16555
16556
16557
16558
16559 $as_echo "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
16560
16561
16562
16563
16564
16565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this system has an arbitrary file name length limit" >&5
16566 $as_echo_n "checking whether this system has an arbitrary file name length limit... " >&6; }
16567 if ${gl_cv_have_arbitrary_file_name_length_limit+:} false; then :
16568 $as_echo_n "(cached) " >&6
16569 else
16570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16571 /* end confdefs.h. */
16572
16573 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
16574 #if HAVE_UNISTD_H
16575 # include <unistd.h>
16576 #endif
16577 #include <limits.h>
16578 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
16579 # include <sys/param.h>
16580 #endif
16581 #if !defined PATH_MAX && defined MAXPATHLEN
16582 # define PATH_MAX MAXPATHLEN
16583 #endif
16584 #ifdef __hpux
16585 # undef PATH_MAX
16586 # define PATH_MAX 1024
16587 #endif
16588 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
16589 # undef PATH_MAX
16590 # define PATH_MAX 260
16591 #endif
16592
16593 #ifdef PATH_MAX
16594 have_arbitrary_file_name_length_limit
16595 #endif
16596 _ACEOF
16597 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16598 $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1; then :
16599 gl_cv_have_arbitrary_file_name_length_limit=yes
16600 else
16601 gl_cv_have_arbitrary_file_name_length_limit=no
16602 fi
16603 rm -f conftest*
16604
16605 fi
16606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_arbitrary_file_name_length_limit" >&5
16607 $as_echo "$gl_cv_have_arbitrary_file_name_length_limit" >&6; }
16608
16609 if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then
16610
16611
16612
16613
16614
16615
16616
16617
16618 gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext"
16619
16620 :
16621 fi
16622
16623
16624 $as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
16625
16626
16627
16628
16629
16630 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
16631 REPLACE_CLOSE=1
16632 fi
16633
16634
16635
16636
16637
16638 :
16639
16640
16641
16642
16643
16644 if test $ac_cv_header_sys_socket_h != yes; then
16645 for ac_header in winsock2.h
16646 do :
16647 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
16648 if test "x$ac_cv_header_winsock2_h" = xyes; then :
16649 cat >>confdefs.h <<_ACEOF
16650 #define HAVE_WINSOCK2_H 1
16651 _ACEOF
16652
16653 fi
16654
16655 done
16656
16657 fi
16658 if test "$ac_cv_header_winsock2_h" = yes; then
16659 HAVE_WINSOCK2_H=1
16660 UNISTD_H_HAVE_WINSOCK2_H=1
16661 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
16662 else
16663 HAVE_WINSOCK2_H=0
16664 fi
16665
16666
16667 if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
16668 REPLACE_CLOSE=1
16669 fi
16670
16671
16672 if test $REPLACE_CLOSE = 0; then
16673
16674
16675
16676 :
16677
16678
16679
16680
16681
16682 if test $ac_cv_func_fchdir = no; then
16683 HAVE_FCHDIR=0
16684 fi
16685
16686 if test $HAVE_FCHDIR = 0; then
16687 REPLACE_CLOSE=1
16688 fi
16689 fi
16690
16691
16692 if test $REPLACE_CLOSE = 1; then
16693
16694
16695
16696
16697
16698
16699
16700
16701 gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
16702
16703 fi
16704
16705
16706
16707
16708
16709 GNULIB_CLOSE=1
16710
16711
16712
16713
16714
16715 $as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
16716
16717
16718
16719
16720
16721
16722 for ac_func in closedir
16723 do :
16724 ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir"
16725 if test "x$ac_cv_func_closedir" = xyes; then :
16726 cat >>confdefs.h <<_ACEOF
16727 #define HAVE_CLOSEDIR 1
16728 _ACEOF
16729
16730 fi
16731 done
16732
16733 if test $ac_cv_func_closedir = no; then
16734 HAVE_CLOSEDIR=0
16735 fi
16736
16737
16738
16739
16740 :
16741
16742
16743
16744
16745
16746 if test $ac_cv_func_fchdir = no; then
16747 HAVE_FCHDIR=0
16748 fi
16749
16750 if test $HAVE_FCHDIR = 0; then
16751 if test $HAVE_CLOSEDIR = 1; then
16752 REPLACE_CLOSEDIR=1
16753 fi
16754 fi
16755
16756 case $host_os,$HAVE_CLOSEDIR in
16757 os2*,1)
16758 REPLACE_CLOSEDIR=1;;
16759 esac
16760
16761 if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
16762
16763
16764
16765
16766
16767
16768
16769
16770 gl_LIBOBJS="$gl_LIBOBJS closedir.$ac_objext"
16771
16772 fi
16773
16774
16775
16776
16777
16778 GNULIB_CLOSEDIR=1
16779
16780
16781
16782
16783
16784 $as_echo "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
16785
16786
16787
16788
16789 if test "x$datarootdir" = x; then
16790 datarootdir='${datadir}'
16791
16792 fi
16793 if test "x$docdir" = x; then
16794 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
16795
16796 fi
16797 if test "x$htmldir" = x; then
16798 htmldir='${docdir}'
16799
16800 fi
16801 if test "x$dvidir" = x; then
16802 dvidir='${docdir}'
16803
16804 fi
16805 if test "x$pdfdir" = x; then
16806 pdfdir='${docdir}'
16807
16808 fi
16809 if test "x$psdir" = x; then
16810 psdir='${docdir}'
16811
16812 fi
16813 if test "x$lispdir" = x; then
16814 lispdir='${datarootdir}/emacs/site-lisp'
16815
16816 fi
16817 if test "x$localedir" = x; then
16818 localedir='${datarootdir}/locale'
16819
16820 fi
16821 if test "x$runstatedir" = x; then
16822 runstatedir='${localstatedir}/run'
16823
16824 fi
16825
16826 pkglibexecdir='${libexecdir}/${PACKAGE}'
16827
16828
16829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
16830 $as_echo_n "checking for d_ino member in directory struct... " >&6; }
16831 if ${gl_cv_struct_dirent_d_ino+:} false; then :
16832 $as_echo_n "(cached) " >&6
16833 else
16834 if test "$cross_compiling" = yes; then :
16835 case "$host_os" in
16836 # Guess yes on glibc systems with Linux kernel.
16837 linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
16838 # If we don't know, assume the worst.
16839 *) gl_cv_struct_dirent_d_ino="guessing no" ;;
16840 esac
16841
16842 else
16843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16844 /* end confdefs.h. */
16845 #include <sys/types.h>
16846 #include <sys/stat.h>
16847 #include <dirent.h>
16848
16849 int
16850 main ()
16851 {
16852 DIR *dp = opendir (".");
16853 struct dirent *e;
16854 struct stat st;
16855 if (! dp)
16856 return 1;
16857 e = readdir (dp);
16858 if (! e)
16859 return 2;
16860 if (lstat (e->d_name, &st) != 0)
16861 return 3;
16862 if (e->d_ino != st.st_ino)
16863 return 4;
16864 closedir (dp);
16865 return 0;
16866
16867 ;
16868 return 0;
16869 }
16870 _ACEOF
16871 if ac_fn_c_try_run "$LINENO"; then :
16872 gl_cv_struct_dirent_d_ino=yes
16873 else
16874 gl_cv_struct_dirent_d_ino=no
16875 fi
16876 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16877 conftest.$ac_objext conftest.beam conftest.$ac_ext
16878 fi
16879
16880 fi
16881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5
16882 $as_echo "$gl_cv_struct_dirent_d_ino" >&6; }
16883 case "$gl_cv_struct_dirent_d_ino" in
16884 *yes)
16885
16886 $as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h
16887
16888 ;;
16889 esac
16890
16891
16892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_type member in directory struct" >&5
16893 $as_echo_n "checking for d_type member in directory struct... " >&6; }
16894 if ${gl_cv_struct_dirent_d_type+:} false; then :
16895 $as_echo_n "(cached) " >&6
16896 else
16897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16898 /* end confdefs.h. */
16899
16900 #include <sys/types.h>
16901 #include <dirent.h>
16902
16903 int
16904 main ()
16905 {
16906 struct dirent dp; dp.d_type = 0;
16907 ;
16908 return 0;
16909 }
16910 _ACEOF
16911 if ac_fn_c_try_link "$LINENO"; then :
16912 gl_cv_struct_dirent_d_type=yes
16913 else
16914 gl_cv_struct_dirent_d_type=no
16915 fi
16916 rm -f core conftest.err conftest.$ac_objext \
16917 conftest$ac_exeext conftest.$ac_ext
16918
16919
16920 fi
16921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_type" >&5
16922 $as_echo "$gl_cv_struct_dirent_d_type" >&6; }
16923 if test $gl_cv_struct_dirent_d_type = yes; then
16924
16925 $as_echo "#define HAVE_STRUCT_DIRENT_D_TYPE 1" >>confdefs.h
16926
16927 fi
16928
16929
16930
16931
16932
16933
16934
16935
16936
16937
16938
16939 :
16940
16941
16942
16943
16944
16945
16946
16947
16948 if test $gl_cv_have_include_next = yes; then
16949 gl_cv_next_dirent_h='<'dirent.h'>'
16950 else
16951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
16952 $as_echo_n "checking absolute name of <dirent.h>... " >&6; }
16953 if ${gl_cv_next_dirent_h+:} false; then :
16954 $as_echo_n "(cached) " >&6
16955 else
16956
16957 if test $ac_cv_header_dirent_h = yes; then
16958
16959
16960
16961
16962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16963 /* end confdefs.h. */
16964 #include <dirent.h>
16965 _ACEOF
16966 case "$host_os" in
16967 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16968 *) gl_absname_cpp="$ac_cpp" ;;
16969 esac
16970
16971 case "$host_os" in
16972 mingw*)
16973 gl_dirsep_regex='[/\\]'
16974 ;;
16975 *)
16976 gl_dirsep_regex='\/'
16977 ;;
16978 esac
16979 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16980 gl_header_literal_regex=`echo 'dirent.h' \
16981 | sed -e "$gl_make_literal_regex_sed"`
16982 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16983 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16984 s|^/[^/]|//&|
16985 p
16986 q
16987 }'
16988
16989 gl_cv_absolute_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16990 sed -n "$gl_absolute_header_sed"`
16991
16992 gl_header=$gl_cv_absolute_dirent_h
16993 gl_cv_next_dirent_h='"'$gl_header'"'
16994 else
16995 gl_cv_next_dirent_h='<'dirent.h'>'
16996 fi
16997
16998
16999 fi
17000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
17001 $as_echo "$gl_cv_next_dirent_h" >&6; }
17002 fi
17003 NEXT_DIRENT_H=$gl_cv_next_dirent_h
17004
17005 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17006 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17007 gl_next_as_first_directive='<'dirent.h'>'
17008 else
17009 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17010 gl_next_as_first_directive=$gl_cv_next_dirent_h
17011 fi
17012 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
17013
17014
17015
17016
17017 if test $ac_cv_header_dirent_h = yes; then
17018 HAVE_DIRENT_H=1
17019 else
17020 HAVE_DIRENT_H=0
17021 fi
17022
17023
17024
17025 for gl_func in alphasort closedir dirfd fdopendir opendir readdir rewinddir scandir; do
17026 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
17027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
17028 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
17029 if eval \${$as_gl_Symbol+:} false; then :
17030 $as_echo_n "(cached) " >&6
17031 else
17032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17033 /* end confdefs.h. */
17034 #include <dirent.h>
17035
17036 int
17037 main ()
17038 {
17039 #undef $gl_func
17040 (void) $gl_func;
17041 ;
17042 return 0;
17043 }
17044 _ACEOF
17045 if ac_fn_c_try_compile "$LINENO"; then :
17046 eval "$as_gl_Symbol=yes"
17047 else
17048 eval "$as_gl_Symbol=no"
17049 fi
17050 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17051 fi
17052 eval ac_res=\$$as_gl_Symbol
17053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17054 $as_echo "$ac_res" >&6; }
17055 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
17056 cat >>confdefs.h <<_ACEOF
17057 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
17058 _ACEOF
17059
17060 eval ac_cv_have_decl_$gl_func=yes
17061 fi
17062 done
17063
17064
17065
17066
17067
17068
17069
17070 for ac_func in dirfd
17071 do :
17072 ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
17073 if test "x$ac_cv_func_dirfd" = xyes; then :
17074 cat >>confdefs.h <<_ACEOF
17075 #define HAVE_DIRFD 1
17076 _ACEOF
17077
17078 fi
17079 done
17080
17081 ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
17082 #include <dirent.h>
17083 "
17084 if test "x$ac_cv_have_decl_dirfd" = xyes; then :
17085 ac_have_decl=1
17086 else
17087 ac_have_decl=0
17088 fi
17089
17090 cat >>confdefs.h <<_ACEOF
17091 #define HAVE_DECL_DIRFD $ac_have_decl
17092 _ACEOF
17093
17094 if test $ac_cv_have_decl_dirfd = no; then
17095 HAVE_DECL_DIRFD=0
17096 fi
17097
17098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
17099 $as_echo_n "checking whether dirfd is a macro... " >&6; }
17100 if ${gl_cv_func_dirfd_macro+:} false; then :
17101 $as_echo_n "(cached) " >&6
17102 else
17103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17104 /* end confdefs.h. */
17105
17106 #include <sys/types.h>
17107 #include <dirent.h>
17108 #ifdef dirfd
17109 dirent_header_defines_dirfd
17110 #endif
17111 _ACEOF
17112 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17113 $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1; then :
17114 gl_cv_func_dirfd_macro=yes
17115 else
17116 gl_cv_func_dirfd_macro=no
17117 fi
17118 rm -f conftest*
17119
17120 fi
17121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
17122 $as_echo "$gl_cv_func_dirfd_macro" >&6; }
17123
17124 # Use the replacement if we have no function or macro with that name,
17125 # or if OS/2 kLIBC whose dirfd() does not work.
17126 # Replace only if the system declares dirfd already.
17127 case $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro,$host_os,$ac_cv_have_decl_dirfd in
17128 no,no,*,yes | *,*,os2*,yes)
17129 REPLACE_DIRFD=1
17130
17131 $as_echo "#define REPLACE_DIRFD 1" >>confdefs.h
17132 ;;
17133 esac
17134
17135 if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \
17136 || test $REPLACE_DIRFD = 1; then
17137
17138
17139
17140
17141
17142
17143
17144
17145 gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext"
17146
17147
17148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
17149 $as_echo_n "checking how to get the file descriptor associated with an open DIR*... " >&6; }
17150 if ${gl_cv_sys_dir_fd_member_name+:} false; then :
17151 $as_echo_n "(cached) " >&6
17152 else
17153
17154 dirfd_save_CFLAGS=$CFLAGS
17155 for ac_expr in d_fd dd_fd; do
17156
17157 CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
17158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17159 /* end confdefs.h. */
17160
17161 #include <sys/types.h>
17162 #include <dirent.h>
17163 int
17164 main ()
17165 {
17166 DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
17167 ;
17168 return 0;
17169 }
17170 _ACEOF
17171 if ac_fn_c_try_compile "$LINENO"; then :
17172 dir_fd_found=yes
17173
17174 fi
17175 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17176 CFLAGS=$dirfd_save_CFLAGS
17177 test "$dir_fd_found" = yes && break
17178 done
17179 test "$dir_fd_found" = yes || ac_expr=no_such_member
17180
17181 gl_cv_sys_dir_fd_member_name=$ac_expr
17182
17183
17184 fi
17185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
17186 $as_echo "$gl_cv_sys_dir_fd_member_name" >&6; }
17187 if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
17188
17189 cat >>confdefs.h <<_ACEOF
17190 #define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name
17191 _ACEOF
17192
17193 fi
17194
17195
17196 fi
17197
17198
17199
17200
17201
17202 GNULIB_DIRFD=1
17203
17204
17205
17206
17207
17208 $as_echo "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
17209
17210
17211
17212
17213
17214
17215
17216
17217
17218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
17219 $as_echo_n "checking whether // is distinct from /... " >&6; }
17220 if ${gl_cv_double_slash_root+:} false; then :
17221 $as_echo_n "(cached) " >&6
17222 else
17223 if test x"$cross_compiling" = xyes ; then
17224 # When cross-compiling, there is no way to tell whether // is special
17225 # short of a list of hosts. However, the only known hosts to date
17226 # that have a distinct // are Apollo DomainOS (too old to port to),
17227 # Cygwin, and z/OS. If anyone knows of another system for which // has
17228 # special semantics and is distinct from /, please report it to
17229 # <bug-gnulib@gnu.org>.
17230 case $host in
17231 *-cygwin | i370-ibm-openedition)
17232 gl_cv_double_slash_root=yes ;;
17233 *)
17234 # Be optimistic and assume that / and // are the same when we
17235 # don't know.
17236 gl_cv_double_slash_root='unknown, assuming no' ;;
17237 esac
17238 else
17239 set x `ls -di / // 2>/dev/null`
17240 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
17241 gl_cv_double_slash_root=no
17242 else
17243 gl_cv_double_slash_root=yes
17244 fi
17245 fi
17246 fi
17247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
17248 $as_echo "$gl_cv_double_slash_root" >&6; }
17249 if test "$gl_cv_double_slash_root" = yes; then
17250
17251 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
17252
17253 fi
17254
17255
17256
17257
17258 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
17259 REPLACE_DUP=1
17260 fi
17261
17262
17263
17264
17265 :
17266
17267
17268
17269
17270
17271 if test $ac_cv_func_fchdir = no; then
17272 HAVE_FCHDIR=0
17273 fi
17274
17275 if test $HAVE_FCHDIR = 0; then
17276 REPLACE_DUP=1
17277 fi
17278
17279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup works" >&5
17280 $as_echo_n "checking whether dup works... " >&6; }
17281 if ${gl_cv_func_dup_works+:} false; then :
17282 $as_echo_n "(cached) " >&6
17283 else
17284 if test "$cross_compiling" = yes; then :
17285 gl_cv_func_dup_works='guessing yes'
17286 else
17287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17288 /* end confdefs.h. */
17289 #include <unistd.h>
17290 #include <fcntl.h>
17291 #include <errno.h>
17292 int
17293 main ()
17294 {
17295 /* On OS/2 kLIBC, dup does not work on a directory fd. */
17296 int fd = open (".", O_RDONLY);
17297 return fd < 0 ? 1 : dup (fd) < 0 ? 2 : 0;
17298
17299 ;
17300 return 0;
17301 }
17302
17303 _ACEOF
17304 if ac_fn_c_try_run "$LINENO"; then :
17305 gl_cv_func_dup_works=yes
17306 else
17307 gl_cv_func_dup_works=no
17308 fi
17309 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17310 conftest.$ac_objext conftest.beam conftest.$ac_ext
17311 fi
17312
17313
17314 fi
17315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup_works" >&5
17316 $as_echo "$gl_cv_func_dup_works" >&6; }
17317 case "$gl_cv_func_dup_works" in
17318 *yes) ;;
17319 *)
17320 REPLACE_DUP=1
17321 ;;
17322 esac
17323
17324 if test $REPLACE_DUP = 1; then
17325
17326
17327
17328
17329
17330
17331
17332
17333 gl_LIBOBJS="$gl_LIBOBJS dup.$ac_objext"
17334
17335 :
17336 fi
17337
17338
17339
17340
17341
17342 GNULIB_DUP=1
17343
17344
17345
17346
17347
17348 $as_echo "#define GNULIB_TEST_DUP 1" >>confdefs.h
17349
17350
17351
17352
17353
17354
17355
17356
17357 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
17358
17359
17360 if test $HAVE_DUP2 = 1; then
17361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
17362 $as_echo_n "checking whether dup2 works... " >&6; }
17363 if ${gl_cv_func_dup2_works+:} false; then :
17364 $as_echo_n "(cached) " >&6
17365 else
17366 if test "$cross_compiling" = yes; then :
17367 case "$host_os" in
17368 mingw*) # on this platform, dup2 always returns 0 for success
17369 gl_cv_func_dup2_works="guessing no" ;;
17370 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
17371 gl_cv_func_dup2_works="guessing no" ;;
17372 aix* | freebsd*)
17373 # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
17374 # not EBADF.
17375 gl_cv_func_dup2_works="guessing no" ;;
17376 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
17377 gl_cv_func_dup2_works="guessing no" ;;
17378 *-android*) # implemented using dup3(), which fails if oldfd == newfd
17379 gl_cv_func_dup2_works="guessing no" ;;
17380 os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
17381 gl_cv_func_dup2_works="guessing no" ;;
17382 *) gl_cv_func_dup2_works="guessing yes" ;;
17383 esac
17384 else
17385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17386 /* end confdefs.h. */
17387
17388 #include <errno.h>
17389 #include <fcntl.h>
17390 #include <limits.h>
17391 #include <sys/resource.h>
17392 #include <unistd.h>
17393 #ifndef RLIM_SAVED_CUR
17394 # define RLIM_SAVED_CUR RLIM_INFINITY
17395 #endif
17396 #ifndef RLIM_SAVED_MAX
17397 # define RLIM_SAVED_MAX RLIM_INFINITY
17398 #endif
17399
17400 int
17401 main ()
17402 {
17403 int result = 0;
17404 int bad_fd = INT_MAX;
17405 struct rlimit rlim;
17406 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
17407 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
17408 && rlim.rlim_cur != RLIM_INFINITY
17409 && rlim.rlim_cur != RLIM_SAVED_MAX
17410 && rlim.rlim_cur != RLIM_SAVED_CUR)
17411 bad_fd = rlim.rlim_cur;
17412 #ifdef FD_CLOEXEC
17413 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
17414 result |= 1;
17415 #endif
17416 if (dup2 (1, 1) != 1)
17417 result |= 2;
17418 #ifdef FD_CLOEXEC
17419 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
17420 result |= 4;
17421 #endif
17422 close (0);
17423 if (dup2 (0, 0) != -1)
17424 result |= 8;
17425 /* Many gnulib modules require POSIX conformance of EBADF. */
17426 if (dup2 (2, bad_fd) == -1 && errno != EBADF)
17427 result |= 16;
17428 /* Flush out some cygwin core dumps. */
17429 if (dup2 (2, -1) != -1 || errno != EBADF)
17430 result |= 32;
17431 dup2 (2, 255);
17432 dup2 (2, 256);
17433 /* On OS/2 kLIBC, dup2() does not work on a directory fd. */
17434 {
17435 int fd = open (".", O_RDONLY);
17436 if (fd == -1)
17437 result |= 64;
17438 else if (dup2 (fd, fd + 1) == -1)
17439 result |= 128;
17440
17441 close (fd);
17442 }
17443 return result;
17444 ;
17445 return 0;
17446 }
17447
17448 _ACEOF
17449 if ac_fn_c_try_run "$LINENO"; then :
17450 gl_cv_func_dup2_works=yes
17451 else
17452 gl_cv_func_dup2_works=no
17453 fi
17454 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17455 conftest.$ac_objext conftest.beam conftest.$ac_ext
17456 fi
17457
17458
17459 fi
17460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
17461 $as_echo "$gl_cv_func_dup2_works" >&6; }
17462 case "$gl_cv_func_dup2_works" in
17463 *yes) ;;
17464 *)
17465 REPLACE_DUP2=1
17466 for ac_func in setdtablesize
17467 do :
17468 ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
17469 if test "x$ac_cv_func_setdtablesize" = xyes; then :
17470 cat >>confdefs.h <<_ACEOF
17471 #define HAVE_SETDTABLESIZE 1
17472 _ACEOF
17473
17474 fi
17475 done
17476
17477 ;;
17478 esac
17479 fi
17480
17481
17482
17483
17484 :
17485
17486
17487
17488
17489
17490 if test $ac_cv_func_fchdir = no; then
17491 HAVE_FCHDIR=0
17492 fi
17493
17494 if test $HAVE_FCHDIR = 0; then
17495 if test $HAVE_DUP2 = 1; then
17496 REPLACE_DUP2=1
17497 fi
17498 fi
17499
17500
17501 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
17502
17503
17504
17505
17506
17507
17508
17509
17510 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
17511
17512
17513 fi
17514
17515
17516
17517
17518
17519 GNULIB_DUP2=1
17520
17521
17522
17523
17524
17525 $as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h
17526
17527
17528
17529
17530
17531
17532
17533
17534
17535 GNULIB_ENVIRON=1
17536
17537
17538
17539
17540
17541 $as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
17542
17543
17544
17545
17546
17547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
17548 $as_echo_n "checking for error_at_line... " >&6; }
17549 if ${ac_cv_lib_error_at_line+:} false; then :
17550 $as_echo_n "(cached) " >&6
17551 else
17552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17553 /* end confdefs.h. */
17554 #include <error.h>
17555 int
17556 main ()
17557 {
17558 error_at_line (0, 0, "", 0, "an error occurred");
17559 ;
17560 return 0;
17561 }
17562 _ACEOF
17563 if ac_fn_c_try_link "$LINENO"; then :
17564 ac_cv_lib_error_at_line=yes
17565 else
17566 ac_cv_lib_error_at_line=no
17567 fi
17568 rm -f core conftest.err conftest.$ac_objext \
17569 conftest$ac_exeext conftest.$ac_ext
17570 fi
17571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
17572 $as_echo "$ac_cv_lib_error_at_line" >&6; }
17573
17574 if test $ac_cv_lib_error_at_line = no; then
17575
17576
17577
17578
17579
17580
17581
17582
17583 gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
17584
17585
17586
17587 :
17588
17589 fi
17590
17591
17592 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format"
17593
17594
17595
17596 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format"
17597
17598
17599
17600
17601
17602
17603
17604 :
17605
17606
17607
17608
17609
17610 if test $ac_cv_have_decl_fchdir = no; then
17611 HAVE_DECL_FCHDIR=0
17612 fi
17613
17614
17615 if test $HAVE_FCHDIR = 0; then
17616
17617
17618
17619
17620
17621
17622
17623
17624 gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext"
17625
17626 :
17627
17628 $as_echo "#define REPLACE_FCHDIR 1" >>confdefs.h
17629
17630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5
17631 $as_echo_n "checking whether open can visit directories... " >&6; }
17632 if ${gl_cv_func_open_directory_works+:} false; then :
17633 $as_echo_n "(cached) " >&6
17634 else
17635 if test "$cross_compiling" = yes; then :
17636 case "$host_os" in
17637 # Guess yes on glibc systems.
17638 *-gnu*) gl_cv_func_open_directory_works="guessing yes" ;;
17639 # If we don't know, assume the worst.
17640 *) gl_cv_func_open_directory_works="guessing no" ;;
17641 esac
17642
17643 else
17644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17645 /* end confdefs.h. */
17646 #include <fcntl.h>
17647
17648 int
17649 main ()
17650 {
17651 return open(".", O_RDONLY) < 0;
17652 ;
17653 return 0;
17654 }
17655 _ACEOF
17656 if ac_fn_c_try_run "$LINENO"; then :
17657 gl_cv_func_open_directory_works=yes
17658 else
17659 gl_cv_func_open_directory_works=no
17660 fi
17661 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17662 conftest.$ac_objext conftest.beam conftest.$ac_ext
17663 fi
17664
17665 fi
17666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5
17667 $as_echo "$gl_cv_func_open_directory_works" >&6; }
17668 case "$gl_cv_func_open_directory_works" in
17669 *yes) ;;
17670 *)
17671
17672 $as_echo "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h
17673
17674 ;;
17675 esac
17676 fi
17677
17678
17679
17680
17681
17682
17683 GNULIB_FCHDIR=1
17684
17685
17686
17687
17688
17689 $as_echo "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h
17690
17691
17692
17693
17694
17695
17696
17697
17698 :
17699
17700
17701
17702
17703
17704 if test $ac_cv_func_fcntl = no; then
17705
17706
17707
17708 :
17709
17710
17711
17712
17713
17714 if test $ac_cv_func_fcntl = no; then
17715 HAVE_FCNTL=0
17716 else
17717 REPLACE_FCNTL=1
17718 fi
17719
17720 else
17721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
17722 $as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
17723 if ${gl_cv_func_fcntl_f_dupfd_works+:} false; then :
17724 $as_echo_n "(cached) " >&6
17725 else
17726 if test "$cross_compiling" = yes; then :
17727 case $host_os in
17728 aix* | cygwin* | haiku*)
17729 gl_cv_func_fcntl_f_dupfd_works="guessing no" ;;
17730 *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;;
17731 esac
17732 else
17733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17734 /* end confdefs.h. */
17735 #include <errno.h>
17736 #include <fcntl.h>
17737 #include <limits.h>
17738 #include <sys/resource.h>
17739 #include <unistd.h>
17740 #ifndef RLIM_SAVED_CUR
17741 # define RLIM_SAVED_CUR RLIM_INFINITY
17742 #endif
17743 #ifndef RLIM_SAVED_MAX
17744 # define RLIM_SAVED_MAX RLIM_INFINITY
17745 #endif
17746
17747 int
17748 main ()
17749 {
17750 int result = 0;
17751 int bad_fd = INT_MAX;
17752 struct rlimit rlim;
17753 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
17754 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
17755 && rlim.rlim_cur != RLIM_INFINITY
17756 && rlim.rlim_cur != RLIM_SAVED_MAX
17757 && rlim.rlim_cur != RLIM_SAVED_CUR)
17758 bad_fd = rlim.rlim_cur;
17759 if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
17760 if (errno != EINVAL) result |= 2;
17761 if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
17762 if (errno != EINVAL) result |= 8;
17763 /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */
17764 {
17765 int fd;
17766 fd = open (".", O_RDONLY);
17767 if (fd == -1)
17768 result |= 16;
17769 else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1)
17770 result |= 32;
17771
17772 close (fd);
17773 }
17774 return result;
17775 ;
17776 return 0;
17777 }
17778 _ACEOF
17779 if ac_fn_c_try_run "$LINENO"; then :
17780 gl_cv_func_fcntl_f_dupfd_works=yes
17781 else
17782 gl_cv_func_fcntl_f_dupfd_works=no
17783 fi
17784 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17785 conftest.$ac_objext conftest.beam conftest.$ac_ext
17786 fi
17787
17788 fi
17789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
17790 $as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
17791 case $gl_cv_func_fcntl_f_dupfd_works in
17792 *yes) ;;
17793 *)
17794
17795
17796 :
17797
17798
17799
17800
17801
17802 if test $ac_cv_func_fcntl = no; then
17803 HAVE_FCNTL=0
17804 else
17805 REPLACE_FCNTL=1
17806 fi
17807
17808
17809 $as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
17810 ;;
17811 esac
17812
17813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
17814 $as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
17815 if ${gl_cv_func_fcntl_f_dupfd_cloexec+:} false; then :
17816 $as_echo_n "(cached) " >&6
17817 else
17818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17819 /* end confdefs.h. */
17820
17821 #include <fcntl.h>
17822 #ifndef F_DUPFD_CLOEXEC
17823 choke me
17824 #endif
17825
17826 int
17827 main ()
17828 {
17829
17830 ;
17831 return 0;
17832 }
17833 _ACEOF
17834 if ac_fn_c_try_compile "$LINENO"; then :
17835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17836 /* end confdefs.h. */
17837
17838 #ifdef __linux__
17839 /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
17840 it to support the semantics on older kernels that failed with EINVAL. */
17841 choke me
17842 #endif
17843
17844 int
17845 main ()
17846 {
17847
17848 ;
17849 return 0;
17850 }
17851 _ACEOF
17852 if ac_fn_c_try_compile "$LINENO"; then :
17853 gl_cv_func_fcntl_f_dupfd_cloexec=yes
17854 else
17855 gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
17856 fi
17857 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17858 else
17859 gl_cv_func_fcntl_f_dupfd_cloexec=no
17860 fi
17861 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17862 fi
17863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
17864 $as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
17865 if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
17866
17867
17868
17869 :
17870
17871
17872
17873
17874
17875 if test $ac_cv_func_fcntl = no; then
17876 HAVE_FCNTL=0
17877 else
17878 REPLACE_FCNTL=1
17879 fi
17880
17881 fi
17882 fi
17883
17884
17885
17886
17887 :
17888
17889
17890
17891
17892
17893 if test $ac_cv_func_fchdir = no; then
17894 HAVE_FCHDIR=0
17895 fi
17896
17897 if test $HAVE_FCHDIR = 0; then
17898
17899
17900
17901 :
17902
17903
17904
17905
17906
17907 if test $ac_cv_func_fcntl = no; then
17908 HAVE_FCNTL=0
17909 else
17910 REPLACE_FCNTL=1
17911 fi
17912
17913 fi
17914
17915
17916 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
17917
17918
17919
17920
17921
17922
17923
17924
17925 gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
17926
17927 fi
17928
17929
17930
17931
17932
17933 GNULIB_FCNTL=1
17934
17935
17936
17937
17938
17939 $as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
17940
17941
17942
17943
17944
17945
17946
17947
17948
17949
17950
17951
17952
17953
17954 if test $gl_cv_have_include_next = yes; then
17955 gl_cv_next_fcntl_h='<'fcntl.h'>'
17956 else
17957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
17958 $as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
17959 if ${gl_cv_next_fcntl_h+:} false; then :
17960 $as_echo_n "(cached) " >&6
17961 else
17962
17963
17964
17965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17966 /* end confdefs.h. */
17967 #include <fcntl.h>
17968 _ACEOF
17969 case "$host_os" in
17970 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17971 *) gl_absname_cpp="$ac_cpp" ;;
17972 esac
17973
17974 case "$host_os" in
17975 mingw*)
17976 gl_dirsep_regex='[/\\]'
17977 ;;
17978 *)
17979 gl_dirsep_regex='\/'
17980 ;;
17981 esac
17982 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17983 gl_header_literal_regex=`echo 'fcntl.h' \
17984 | sed -e "$gl_make_literal_regex_sed"`
17985 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17986 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17987 s|^/[^/]|//&|
17988 p
17989 q
17990 }'
17991
17992 gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17993 sed -n "$gl_absolute_header_sed"`
17994
17995 gl_header=$gl_cv_absolute_fcntl_h
17996 gl_cv_next_fcntl_h='"'$gl_header'"'
17997
17998
17999 fi
18000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
18001 $as_echo "$gl_cv_next_fcntl_h" >&6; }
18002 fi
18003 NEXT_FCNTL_H=$gl_cv_next_fcntl_h
18004
18005 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18006 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18007 gl_next_as_first_directive='<'fcntl.h'>'
18008 else
18009 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18010 gl_next_as_first_directive=$gl_cv_next_fcntl_h
18011 fi
18012 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
18013
18014
18015
18016
18017
18018
18019
18020
18021
18022
18023 for gl_func in fcntl openat; do
18024 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
18025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
18026 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
18027 if eval \${$as_gl_Symbol+:} false; then :
18028 $as_echo_n "(cached) " >&6
18029 else
18030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18031 /* end confdefs.h. */
18032 #include <fcntl.h>
18033
18034 int
18035 main ()
18036 {
18037 #undef $gl_func
18038 (void) $gl_func;
18039 ;
18040 return 0;
18041 }
18042 _ACEOF
18043 if ac_fn_c_try_compile "$LINENO"; then :
18044 eval "$as_gl_Symbol=yes"
18045 else
18046 eval "$as_gl_Symbol=no"
18047 fi
18048 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18049 fi
18050 eval ac_res=\$$as_gl_Symbol
18051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18052 $as_echo "$ac_res" >&6; }
18053 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
18054 cat >>confdefs.h <<_ACEOF
18055 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
18056 _ACEOF
18057
18058 eval ac_cv_have_decl_$gl_func=yes
18059 fi
18060 done
18061
18062
18063
18064
18065
18066
18067
18068 ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
18069 #include <dirent.h>
18070
18071 "
18072 if test "x$ac_cv_have_decl_fdopendir" = xyes; then :
18073 ac_have_decl=1
18074 else
18075 ac_have_decl=0
18076 fi
18077
18078 cat >>confdefs.h <<_ACEOF
18079 #define HAVE_DECL_FDOPENDIR $ac_have_decl
18080 _ACEOF
18081 if test $ac_have_decl = 1; then :
18082
18083 else
18084 HAVE_DECL_FDOPENDIR=0
18085 fi
18086
18087
18088 :
18089
18090
18091
18092
18093
18094 if test $ac_cv_func_fdopendir = no; then
18095 HAVE_FDOPENDIR=0
18096 else
18097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
18098 $as_echo_n "checking whether fdopendir works... " >&6; }
18099 if ${gl_cv_func_fdopendir_works+:} false; then :
18100 $as_echo_n "(cached) " >&6
18101 else
18102 if test "$cross_compiling" = yes; then :
18103 case "$host_os" in
18104 # Guess yes on glibc systems.
18105 *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
18106 # If we don't know, assume the worst.
18107 *) gl_cv_func_fdopendir_works="guessing no" ;;
18108 esac
18109
18110 else
18111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18112 /* end confdefs.h. */
18113
18114 #include <dirent.h>
18115 #include <fcntl.h>
18116 #include <unistd.h>
18117 #if !HAVE_DECL_FDOPENDIR
18118 extern
18119 # ifdef __cplusplus
18120 "C"
18121 # endif
18122 DIR *fdopendir (int);
18123 #endif
18124
18125 int
18126 main ()
18127 {
18128 int result = 0;
18129 int fd = open ("conftest.c", O_RDONLY);
18130 if (fd < 0) result |= 1;
18131 if (fdopendir (fd)) result |= 2;
18132 if (close (fd)) result |= 4;
18133 return result;
18134 ;
18135 return 0;
18136 }
18137 _ACEOF
18138 if ac_fn_c_try_run "$LINENO"; then :
18139 gl_cv_func_fdopendir_works=yes
18140 else
18141 gl_cv_func_fdopendir_works=no
18142 fi
18143 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18144 conftest.$ac_objext conftest.beam conftest.$ac_ext
18145 fi
18146
18147 fi
18148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
18149 $as_echo "$gl_cv_func_fdopendir_works" >&6; }
18150 case "$gl_cv_func_fdopendir_works" in
18151 *yes) ;;
18152 *)
18153 REPLACE_FDOPENDIR=1
18154 ;;
18155 esac
18156 fi
18157
18158 if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
18159
18160
18161
18162
18163
18164
18165
18166
18167 gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
18168
18169 fi
18170
18171
18172
18173
18174
18175 GNULIB_FDOPENDIR=1
18176
18177
18178
18179
18180
18181 $as_echo "#define GNULIB_TEST_FDOPENDIR 1" >>confdefs.h
18182
18183
18184
18185
18186
18187 cat >>confdefs.h <<_ACEOF
18188 #define GNULIB_FDOPENDIR 1
18189 _ACEOF
18190
18191
18192
18193
18194 :
18195
18196
18197
18198
18199
18200
18201
18202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
18203 $as_echo_n "checking for flexible array member... " >&6; }
18204 if ${ac_cv_c_flexmember+:} false; then :
18205 $as_echo_n "(cached) " >&6
18206 else
18207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18208 /* end confdefs.h. */
18209 #include <stdlib.h>
18210 #include <stdio.h>
18211 #include <stddef.h>
18212 struct s { int n; double d[]; };
18213 int
18214 main ()
18215 {
18216 int m = getchar ();
18217 size_t nbytes = offsetof (struct s, d) + m * sizeof (double);
18218 nbytes += sizeof (struct s) - 1;
18219 nbytes -= nbytes % sizeof (struct s);
18220 struct s *p = malloc (nbytes);
18221 p->d[0] = 0.0;
18222 return p->d != (double *) NULL;
18223 ;
18224 return 0;
18225 }
18226 _ACEOF
18227 if ac_fn_c_try_compile "$LINENO"; then :
18228 ac_cv_c_flexmember=yes
18229 else
18230 ac_cv_c_flexmember=no
18231 fi
18232 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18233 fi
18234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
18235 $as_echo "$ac_cv_c_flexmember" >&6; }
18236 if test $ac_cv_c_flexmember = yes; then
18237
18238 $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
18239
18240 else
18241 $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
18242
18243 fi
18244
18245
18246
18247
18248 FLOAT_H=
18249 REPLACE_FLOAT_LDBL=0
18250 case "$host_os" in
18251 aix* | beos* | openbsd* | mirbsd* | irix*)
18252 FLOAT_H=float.h
18253 ;;
18254 freebsd*)
18255 case "$host_cpu" in
18256 i[34567]86 )
18257 FLOAT_H=float.h
18258 ;;
18259 x86_64 )
18260 # On x86_64 systems, the C compiler may still be generating
18261 # 32-bit code.
18262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18263 /* end confdefs.h. */
18264 #if defined __LP64__ || defined __x86_64__ || defined __amd64__
18265 yes
18266 #endif
18267 _ACEOF
18268 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18269 $EGREP "yes" >/dev/null 2>&1; then :
18270
18271 else
18272 FLOAT_H=float.h
18273 fi
18274 rm -f conftest*
18275
18276 ;;
18277 esac
18278 ;;
18279 linux*)
18280 case "$host_cpu" in
18281 powerpc*)
18282 FLOAT_H=float.h
18283 ;;
18284 esac
18285 ;;
18286 esac
18287 case "$host_os" in
18288 aix* | freebsd* | linux*)
18289 if test -n "$FLOAT_H"; then
18290 REPLACE_FLOAT_LDBL=1
18291 fi
18292 ;;
18293 esac
18294
18295 REPLACE_ITOLD=0
18296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
18297 $as_echo_n "checking whether conversion from 'int' to 'long double' works... " >&6; }
18298 if ${gl_cv_func_itold_works+:} false; then :
18299 $as_echo_n "(cached) " >&6
18300 else
18301
18302 if test "$cross_compiling" = yes; then :
18303 case "$host" in
18304 sparc*-*-linux*)
18305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18306 /* end confdefs.h. */
18307 #if defined __LP64__ || defined __arch64__
18308 yes
18309 #endif
18310 _ACEOF
18311 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18312 $EGREP "yes" >/dev/null 2>&1; then :
18313 gl_cv_func_itold_works="guessing no"
18314 else
18315 gl_cv_func_itold_works="guessing yes"
18316 fi
18317 rm -f conftest*
18318
18319 ;;
18320 *) gl_cv_func_itold_works="guessing yes" ;;
18321 esac
18322
18323 else
18324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18325 /* end confdefs.h. */
18326
18327 int i = -1;
18328 volatile long double ld;
18329 int main ()
18330 {
18331 ld += i * 1.0L;
18332 if (ld > 0)
18333 return 1;
18334 return 0;
18335 }
18336 _ACEOF
18337 if ac_fn_c_try_run "$LINENO"; then :
18338 gl_cv_func_itold_works=yes
18339 else
18340 gl_cv_func_itold_works=no
18341 fi
18342 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18343 conftest.$ac_objext conftest.beam conftest.$ac_ext
18344 fi
18345
18346
18347 fi
18348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
18349 $as_echo "$gl_cv_func_itold_works" >&6; }
18350 case "$gl_cv_func_itold_works" in
18351 *no)
18352 REPLACE_ITOLD=1
18353 FLOAT_H=float.h
18354 ;;
18355 esac
18356
18357 if test -n "$FLOAT_H"; then
18358
18359
18360
18361
18362
18363
18364
18365
18366 if test $gl_cv_have_include_next = yes; then
18367 gl_cv_next_float_h='<'float.h'>'
18368 else
18369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
18370 $as_echo_n "checking absolute name of <float.h>... " >&6; }
18371 if ${gl_cv_next_float_h+:} false; then :
18372 $as_echo_n "(cached) " >&6
18373 else
18374
18375
18376
18377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18378 /* end confdefs.h. */
18379 #include <float.h>
18380 _ACEOF
18381 case "$host_os" in
18382 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18383 *) gl_absname_cpp="$ac_cpp" ;;
18384 esac
18385
18386 case "$host_os" in
18387 mingw*)
18388 gl_dirsep_regex='[/\\]'
18389 ;;
18390 *)
18391 gl_dirsep_regex='\/'
18392 ;;
18393 esac
18394 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18395 gl_header_literal_regex=`echo 'float.h' \
18396 | sed -e "$gl_make_literal_regex_sed"`
18397 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18398 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18399 s|^/[^/]|//&|
18400 p
18401 q
18402 }'
18403
18404 gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18405 sed -n "$gl_absolute_header_sed"`
18406
18407 gl_header=$gl_cv_absolute_float_h
18408 gl_cv_next_float_h='"'$gl_header'"'
18409
18410
18411 fi
18412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
18413 $as_echo "$gl_cv_next_float_h" >&6; }
18414 fi
18415 NEXT_FLOAT_H=$gl_cv_next_float_h
18416
18417 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18418 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18419 gl_next_as_first_directive='<'float.h'>'
18420 else
18421 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18422 gl_next_as_first_directive=$gl_cv_next_float_h
18423 fi
18424 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
18425
18426
18427
18428
18429 fi
18430
18431 if test -n "$FLOAT_H"; then
18432 GL_GENERATE_FLOAT_H_TRUE=
18433 GL_GENERATE_FLOAT_H_FALSE='#'
18434 else
18435 GL_GENERATE_FLOAT_H_TRUE='#'
18436 GL_GENERATE_FLOAT_H_FALSE=
18437 fi
18438
18439
18440
18441 if test $REPLACE_FLOAT_LDBL = 1; then
18442
18443
18444
18445
18446
18447
18448
18449
18450 gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
18451
18452 fi
18453 if test $REPLACE_ITOLD = 1; then
18454
18455
18456
18457
18458
18459
18460
18461
18462 gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
18463
18464 fi
18465
18466
18467
18468
18469
18470 FNMATCH_H=
18471 gl_fnmatch_required_lowercase=`
18472 echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]'
18473 `
18474 gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}"
18475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5
18476 $as_echo_n "checking for working $gl_fnmatch_required fnmatch... " >&6; }
18477 if eval \${$gl_fnmatch_cache_var+:} false; then :
18478 $as_echo_n "(cached) " >&6
18479 else
18480 if test $gl_fnmatch_required = GNU; then
18481 gl_fnmatch_gnu_start=
18482 gl_fnmatch_gnu_end=
18483 else
18484 gl_fnmatch_gnu_start='#if 0'
18485 gl_fnmatch_gnu_end='#endif'
18486 fi
18487 if test "$cross_compiling" = yes; then :
18488 eval "$gl_fnmatch_cache_var=\"guessing no\""
18489 else
18490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18491 /* end confdefs.h. */
18492 #include <fnmatch.h>
18493 static int
18494 y (char const *pattern, char const *string, int flags)
18495 {
18496 return fnmatch (pattern, string, flags) == 0;
18497 }
18498 static int
18499 n (char const *pattern, char const *string, int flags)
18500 {
18501 return fnmatch (pattern, string, flags) == FNM_NOMATCH;
18502 }
18503
18504 int
18505 main ()
18506 {
18507 char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]";
18508 char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]";
18509 static char const A_1[] = { 'A' - 1, 0 };
18510 static char const A01[] = { 'A' + 1, 0 };
18511 static char const a_1[] = { 'a' - 1, 0 };
18512 static char const a01[] = { 'a' + 1, 0 };
18513 static char const bs_1[] = { '\\\\' - 1, 0 };
18514 static char const bs01[] = { '\\\\' + 1, 0 };
18515 int result = 0;
18516 if (!n ("a*", "", 0))
18517 return 1;
18518 if (!y ("a*", "abc", 0))
18519 return 1;
18520 if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */
18521 return 1;
18522 if (!n ("d*/*1", "d/s/1", FNM_PATHNAME))
18523 return 2;
18524 if (!y ("a\\\\bc", "abc", 0))
18525 return 3;
18526 if (!n ("a\\\\bc", "abc", FNM_NOESCAPE))
18527 return 3;
18528 if (!y ("*x", ".x", 0))
18529 return 4;
18530 if (!n ("*x", ".x", FNM_PERIOD))
18531 return 4;
18532 if (!y (Apat, "\\\\", 0))
18533 return 5;
18534 if (!y (Apat, "A", 0))
18535 return 5;
18536 if (!y (apat, "\\\\", 0))
18537 return 5;
18538 if (!y (apat, "a", 0))
18539 return 5;
18540 if (!(n (Apat, A_1, 0) == ('A' < '\\\\')))
18541 return 5;
18542 if (!(n (apat, a_1, 0) == ('a' < '\\\\')))
18543 return 5;
18544 if (!(y (Apat, A01, 0) == ('A' < '\\\\')))
18545 return 5;
18546 if (!(y (apat, a01, 0) == ('a' < '\\\\')))
18547 return 5;
18548 if (!(y (Apat, bs_1, 0) == ('A' < '\\\\')))
18549 return 5;
18550 if (!(y (apat, bs_1, 0) == ('a' < '\\\\')))
18551 return 5;
18552 if (!(n (Apat, bs01, 0) == ('A' < '\\\\')))
18553 return 5;
18554 if (!(n (apat, bs01, 0) == ('a' < '\\\\')))
18555 return 5;
18556 $gl_fnmatch_gnu_start
18557 if (!y ("xxXX", "xXxX", FNM_CASEFOLD))
18558 result |= 8;
18559 if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH))
18560 result |= 16;
18561 if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME))
18562 result |= 32;
18563 if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR))
18564 result |= 64;
18565 if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR))
18566 result |= 64;
18567 if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR))
18568 result |= 64;
18569 $gl_fnmatch_gnu_end
18570 return result;
18571
18572 ;
18573 return 0;
18574 }
18575 _ACEOF
18576 if ac_fn_c_try_run "$LINENO"; then :
18577 eval "$gl_fnmatch_cache_var=yes"
18578 else
18579 eval "$gl_fnmatch_cache_var=no"
18580 fi
18581 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18582 conftest.$ac_objext conftest.beam conftest.$ac_ext
18583 fi
18584
18585
18586 fi
18587 eval ac_res=\$$gl_fnmatch_cache_var
18588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18589 $as_echo "$ac_res" >&6; }
18590 eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\""
18591 if test "$gl_fnmatch_result" = yes; then
18592 rm -f "$gl_source_base/fnmatch.h"
18593 else
18594 FNMATCH_H=fnmatch.h
18595 fi
18596
18597 if test -n "$FNMATCH_H"; then
18598 GL_GENERATE_FNMATCH_H_TRUE=
18599 GL_GENERATE_FNMATCH_H_FALSE='#'
18600 else
18601 GL_GENERATE_FNMATCH_H_TRUE='#'
18602 GL_GENERATE_FNMATCH_H_FALSE=
18603 fi
18604
18605
18606 if test -n "$FNMATCH_H"; then
18607
18608
18609
18610
18611
18612
18613
18614
18615 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
18616
18617
18618
18619 cat >>confdefs.h <<_ACEOF
18620 #define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
18621 _ACEOF
18622
18623
18624 ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
18625 "
18626 if test "x$ac_cv_have_decl_isblank" = xyes; then :
18627 ac_have_decl=1
18628 else
18629 ac_have_decl=0
18630 fi
18631
18632 cat >>confdefs.h <<_ACEOF
18633 #define HAVE_DECL_ISBLANK $ac_have_decl
18634 _ACEOF
18635
18636
18637 :
18638
18639
18640
18641
18642
18643
18644
18645
18646
18647
18648
18649
18650
18651
18652
18653
18654
18655
18656
18657
18658
18659
18660
18661
18662
18663
18664
18665 :
18666
18667
18668
18669
18670
18671
18672 fi
18673
18674
18675
18676
18677
18678 if test -n "$FNMATCH_H"; then
18679
18680
18681
18682
18683
18684
18685
18686
18687 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
18688
18689
18690
18691 cat >>confdefs.h <<_ACEOF
18692 #define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
18693 _ACEOF
18694
18695
18696 ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
18697 "
18698 if test "x$ac_cv_have_decl_isblank" = xyes; then :
18699 ac_have_decl=1
18700 else
18701 ac_have_decl=0
18702 fi
18703
18704 cat >>confdefs.h <<_ACEOF
18705 #define HAVE_DECL_ISBLANK $ac_have_decl
18706 _ACEOF
18707
18708
18709 :
18710
18711
18712
18713
18714
18715
18716
18717
18718
18719
18720
18721
18722
18723
18724
18725
18726
18727
18728
18729
18730
18731
18732
18733
18734
18735
18736
18737 :
18738
18739
18740
18741
18742
18743
18744 fi
18745
18746
18747
18748 FREXP_LIBM=
18749 if test $gl_cv_func_frexp_no_libm = no; then
18750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used with libm" >&5
18751 $as_echo_n "checking whether frexp() can be used with libm... " >&6; }
18752 if ${gl_cv_func_frexp_in_libm+:} false; then :
18753 $as_echo_n "(cached) " >&6
18754 else
18755
18756 save_LIBS="$LIBS"
18757 LIBS="$LIBS -lm"
18758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18759 /* end confdefs.h. */
18760 #include <math.h>
18761 double x;
18762 int
18763 main ()
18764 {
18765 int e; return frexp (x, &e) > 0;
18766 ;
18767 return 0;
18768 }
18769 _ACEOF
18770 if ac_fn_c_try_link "$LINENO"; then :
18771 gl_cv_func_frexp_in_libm=yes
18772 else
18773 gl_cv_func_frexp_in_libm=no
18774 fi
18775 rm -f core conftest.err conftest.$ac_objext \
18776 conftest$ac_exeext conftest.$ac_ext
18777 LIBS="$save_LIBS"
18778
18779 fi
18780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_in_libm" >&5
18781 $as_echo "$gl_cv_func_frexp_in_libm" >&6; }
18782 if test $gl_cv_func_frexp_in_libm = yes; then
18783 FREXP_LIBM=-lm
18784 fi
18785 fi
18786 if test $gl_cv_func_frexp_no_libm = yes \
18787 || test $gl_cv_func_frexp_in_libm = yes; then
18788 save_LIBS="$LIBS"
18789 LIBS="$LIBS $FREXP_LIBM"
18790
18791
18792
18793 :
18794
18795
18796
18797
18798
18799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
18800 $as_echo_n "checking whether frexp works... " >&6; }
18801 if ${gl_cv_func_frexp_works+:} false; then :
18802 $as_echo_n "(cached) " >&6
18803 else
18804
18805 if test "$cross_compiling" = yes; then :
18806 case "$host_os" in
18807 netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";;
18808 *) gl_cv_func_frexp_works="guessing yes";;
18809 esac
18810
18811 else
18812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18813 /* end confdefs.h. */
18814
18815 #include <float.h>
18816 #include <math.h>
18817 #include <string.h>
18818 #if HAVE_DECL_ALARM
18819 # include <signal.h>
18820 # include <unistd.h>
18821 #endif
18822 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
18823 ICC 10.0 has a bug when optimizing the expression -zero.
18824 The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
18825 to PowerPC on Mac OS X 10.5. */
18826 #if defined __hpux || defined __sgi || defined __ICC
18827 static double
18828 compute_minus_zero (void)
18829 {
18830 return -DBL_MIN * DBL_MIN;
18831 }
18832 # define minus_zero compute_minus_zero ()
18833 #else
18834 double minus_zero = -0.0;
18835 #endif
18836 int main()
18837 {
18838 int result = 0;
18839 int i;
18840 volatile double x;
18841 double zero = 0.0;
18842 #if HAVE_DECL_ALARM
18843 /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
18844 number. Let the test fail in this case. */
18845 signal (SIGALRM, SIG_DFL);
18846 alarm (5);
18847 #endif
18848 /* Test on denormalized numbers. */
18849 for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
18850 ;
18851 if (x > 0.0)
18852 {
18853 int exp;
18854 double y = frexp (x, &exp);
18855 /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
18856 On NetBSD: y = 0.75. Correct: y = 0.5. */
18857 if (y != 0.5)
18858 result |= 1;
18859 }
18860 /* Test on infinite numbers. */
18861 x = 1.0 / zero;
18862 {
18863 int exp;
18864 double y = frexp (x, &exp);
18865 if (y != x)
18866 result |= 2;
18867 }
18868 /* Test on negative zero. */
18869 x = minus_zero;
18870 {
18871 int exp;
18872 double y = frexp (x, &exp);
18873 if (memcmp (&y, &x, sizeof x))
18874 result |= 4;
18875 }
18876 return result;
18877 }
18878 _ACEOF
18879 if ac_fn_c_try_run "$LINENO"; then :
18880 gl_cv_func_frexp_works=yes
18881 else
18882 gl_cv_func_frexp_works=no
18883 fi
18884 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18885 conftest.$ac_objext conftest.beam conftest.$ac_ext
18886 fi
18887
18888
18889 fi
18890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
18891 $as_echo "$gl_cv_func_frexp_works" >&6; }
18892
18893 LIBS="$save_LIBS"
18894 case "$gl_cv_func_frexp_works" in
18895 *yes) gl_func_frexp=yes ;;
18896 *) gl_func_frexp=no; REPLACE_FREXP=1; FREXP_LIBM= ;;
18897 esac
18898 else
18899 gl_func_frexp=no
18900 fi
18901 if test $gl_func_frexp = yes; then
18902
18903 $as_echo "#define HAVE_FREXP 1" >>confdefs.h
18904
18905 fi
18906
18907
18908 if test $gl_func_frexp != yes; then
18909
18910
18911
18912
18913
18914
18915
18916
18917 gl_LIBOBJS="$gl_LIBOBJS frexp.$ac_objext"
18918
18919 fi
18920
18921
18922
18923
18924
18925 GNULIB_FREXP=1
18926
18927
18928
18929
18930
18931 $as_echo "#define GNULIB_TEST_FREXP 1" >>confdefs.h
18932
18933
18934
18935
18936
18937
18938
18939
18940
18941 ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
18942 "
18943 if test "x$ac_cv_have_decl_frexpl" = xyes; then :
18944
18945 else
18946 HAVE_DECL_FREXPL=0
18947 fi
18948
18949
18950 FREXPL_LIBM=
18951 if test $HAVE_DECL_FREXPL = 1; then
18952
18953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
18954 $as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; }
18955 if ${gl_cv_func_frexpl_no_libm+:} false; then :
18956 $as_echo_n "(cached) " >&6
18957 else
18958
18959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18960 /* end confdefs.h. */
18961 #include <math.h>
18962 long double x;
18963 int
18964 main ()
18965 {
18966 int e; return frexpl (x, &e) > 0;
18967 ;
18968 return 0;
18969 }
18970 _ACEOF
18971 if ac_fn_c_try_link "$LINENO"; then :
18972 gl_cv_func_frexpl_no_libm=yes
18973 else
18974 gl_cv_func_frexpl_no_libm=no
18975 fi
18976 rm -f core conftest.err conftest.$ac_objext \
18977 conftest$ac_exeext conftest.$ac_ext
18978
18979 fi
18980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
18981 $as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
18982
18983 if test $gl_cv_func_frexpl_no_libm = no; then
18984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used with libm" >&5
18985 $as_echo_n "checking whether frexpl() can be used with libm... " >&6; }
18986 if ${gl_cv_func_frexpl_in_libm+:} false; then :
18987 $as_echo_n "(cached) " >&6
18988 else
18989
18990 save_LIBS="$LIBS"
18991 LIBS="$LIBS -lm"
18992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18993 /* end confdefs.h. */
18994 #include <math.h>
18995 long double x;
18996 int
18997 main ()
18998 {
18999 int e; return frexpl (x, &e) > 0;
19000 ;
19001 return 0;
19002 }
19003 _ACEOF
19004 if ac_fn_c_try_link "$LINENO"; then :
19005 gl_cv_func_frexpl_in_libm=yes
19006 else
19007 gl_cv_func_frexpl_in_libm=no
19008 fi
19009 rm -f core conftest.err conftest.$ac_objext \
19010 conftest$ac_exeext conftest.$ac_ext
19011 LIBS="$save_LIBS"
19012
19013 fi
19014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_in_libm" >&5
19015 $as_echo "$gl_cv_func_frexpl_in_libm" >&6; }
19016 if test $gl_cv_func_frexpl_in_libm = yes; then
19017 FREXPL_LIBM=-lm
19018 fi
19019 fi
19020 if test $gl_cv_func_frexpl_no_libm = yes \
19021 || test $gl_cv_func_frexpl_in_libm = yes; then
19022 save_LIBS="$LIBS"
19023 LIBS="$LIBS $FREXPL_LIBM"
19024
19025
19026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
19027 $as_echo_n "checking whether frexpl works... " >&6; }
19028 if ${gl_cv_func_frexpl_works+:} false; then :
19029 $as_echo_n "(cached) " >&6
19030 else
19031
19032 if test "$cross_compiling" = yes; then :
19033
19034 case "$host_os" in
19035 aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
19036 gl_cv_func_frexpl_works="guessing no";;
19037 *) gl_cv_func_frexpl_works="guessing yes";;
19038 esac
19039
19040 else
19041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19042 /* end confdefs.h. */
19043
19044 #include <float.h>
19045 #include <math.h>
19046 /* Override the values of <float.h>, like done in float.in.h. */
19047 #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
19048 # undef LDBL_MIN_EXP
19049 # define LDBL_MIN_EXP (-16381)
19050 #endif
19051 #if defined __i386__ && defined __FreeBSD__
19052 # undef LDBL_MIN_EXP
19053 # define LDBL_MIN_EXP (-16381)
19054 #endif
19055 #if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
19056 # undef LDBL_MIN_EXP
19057 # define LDBL_MIN_EXP DBL_MIN_EXP
19058 #endif
19059 #if defined __sgi && (LDBL_MANT_DIG >= 106)
19060 # if defined __GNUC__
19061 # undef LDBL_MIN_EXP
19062 # define LDBL_MIN_EXP DBL_MIN_EXP
19063 # endif
19064 #endif
19065 extern
19066 #ifdef __cplusplus
19067 "C"
19068 #endif
19069 long double frexpl (long double, int *);
19070 int main()
19071 {
19072 int result = 0;
19073 volatile long double x;
19074 /* Test on finite numbers that fails on AIX 5.1. */
19075 x = 16.0L;
19076 {
19077 int exp = -9999;
19078 frexpl (x, &exp);
19079 if (exp != 5)
19080 result |= 1;
19081 }
19082 /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
19083 function returns an invalid (incorrectly normalized) value: it returns
19084 y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
19085 but the correct result is
19086 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */
19087 x = 1.01L;
19088 {
19089 int exp = -9999;
19090 long double y = frexpl (x, &exp);
19091 if (!(exp == 1 && y == 0.505L))
19092 result |= 2;
19093 }
19094 /* Test on large finite numbers. This fails on BeOS at i = 16322, while
19095 LDBL_MAX_EXP = 16384.
19096 In the loop end test, we test x against Infinity, rather than comparing
19097 i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */
19098 {
19099 int i;
19100 for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
19101 {
19102 int exp = -9999;
19103 frexpl (x, &exp);
19104 if (exp != i)
19105 {
19106 result |= 4;
19107 break;
19108 }
19109 }
19110 }
19111 /* Test on denormalized numbers. */
19112 {
19113 int i;
19114 for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
19115 ;
19116 if (x > 0.0L)
19117 {
19118 int exp;
19119 long double y = frexpl (x, &exp);
19120 /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
19121 exp = -16382, y = 0.5. On Mac OS X 10.5: exp = -16384, y = 0.5. */
19122 if (exp != LDBL_MIN_EXP - 1)
19123 result |= 8;
19124 }
19125 }
19126 /* Test on infinite numbers. */
19127 x = 1.0L / 0.0L;
19128 {
19129 int exp;
19130 long double y = frexpl (x, &exp);
19131 if (y != x)
19132 result |= 16;
19133 }
19134 return result;
19135 }
19136 _ACEOF
19137 if ac_fn_c_try_run "$LINENO"; then :
19138 gl_cv_func_frexpl_works=yes
19139 else
19140 gl_cv_func_frexpl_works=no
19141 fi
19142 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19143 conftest.$ac_objext conftest.beam conftest.$ac_ext
19144 fi
19145
19146
19147 fi
19148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
19149 $as_echo "$gl_cv_func_frexpl_works" >&6; }
19150
19151 LIBS="$save_LIBS"
19152 case "$gl_cv_func_frexpl_works" in
19153 *yes) gl_func_frexpl=yes ;;
19154 *) gl_func_frexpl=no; REPLACE_FREXPL=1 ;;
19155 esac
19156 else
19157 gl_func_frexpl=no
19158 fi
19159 if test $gl_func_frexpl = yes; then
19160
19161 $as_echo "#define HAVE_FREXPL 1" >>confdefs.h
19162
19163 fi
19164 fi
19165 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
19166 if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then
19167
19168 FREXPL_LIBM="$FREXP_LIBM"
19169 else
19170 FREXPL_LIBM=
19171 fi
19172 fi
19173
19174
19175 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
19176
19177
19178
19179
19180
19181
19182
19183
19184 gl_LIBOBJS="$gl_LIBOBJS frexpl.$ac_objext"
19185
19186 fi
19187
19188
19189
19190
19191
19192 GNULIB_FREXPL=1
19193
19194
19195
19196
19197
19198 $as_echo "#define GNULIB_TEST_FREXPL 1" >>confdefs.h
19199
19200
19201
19202
19203
19204
19205
19206 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
19207 REPLACE_FSTAT=1
19208 fi
19209
19210
19211 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
19212 REPLACE_FSTAT=1
19213 fi
19214
19215
19216
19217
19218
19219 :
19220
19221
19222
19223
19224
19225 if test $ac_cv_func_fchdir = no; then
19226 HAVE_FCHDIR=0
19227 fi
19228
19229 if test $HAVE_FCHDIR = 0; then
19230 case "$gl_cv_func_open_directory_works" in
19231 *yes) ;;
19232 *)
19233 REPLACE_FSTAT=1
19234 ;;
19235 esac
19236 fi
19237
19238
19239 if test $REPLACE_FSTAT = 1; then
19240
19241
19242
19243
19244
19245
19246
19247
19248 gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
19249
19250 :
19251 fi
19252
19253
19254
19255
19256
19257 GNULIB_FSTAT=1
19258
19259
19260
19261
19262
19263 $as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
19264
19265
19266
19267
19268
19269
19270
19271
19272 :
19273
19274
19275
19276
19277
19278
19279 if test $ac_cv_func_fstatat = no; then
19280 HAVE_FSTATAT=0
19281 else
19282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
19283 $as_echo_n "checking whether fstatat (..., 0) works... " >&6; }
19284 if ${gl_cv_func_fstatat_zero_flag+:} false; then :
19285 $as_echo_n "(cached) " >&6
19286 else
19287 if test "$cross_compiling" = yes; then :
19288 case "$host_os" in
19289 aix*) gl_cv_func_fstatat_zero_flag="guessing no";;
19290 *) gl_cv_func_fstatat_zero_flag="guessing yes";;
19291 esac
19292
19293 else
19294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19295 /* end confdefs.h. */
19296
19297 #include <fcntl.h>
19298 #include <sys/stat.h>
19299 int
19300 main (void)
19301 {
19302 struct stat a;
19303 return fstatat (AT_FDCWD, ".", &a, 0) != 0;
19304 }
19305
19306 _ACEOF
19307 if ac_fn_c_try_run "$LINENO"; then :
19308 gl_cv_func_fstatat_zero_flag=yes
19309 else
19310 gl_cv_func_fstatat_zero_flag=no
19311 fi
19312 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19313 conftest.$ac_objext conftest.beam conftest.$ac_ext
19314 fi
19315
19316
19317 fi
19318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
19319 $as_echo "$gl_cv_func_fstatat_zero_flag" >&6; }
19320
19321 case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
19322 *yes+*yes) ;;
19323 *) REPLACE_FSTATAT=1
19324 case $gl_cv_func_fstatat_zero_flag in
19325 *yes)
19326
19327 $as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
19328
19329 ;;
19330 esac
19331 ;;
19332 esac
19333 fi
19334
19335 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
19336
19337
19338
19339
19340
19341
19342
19343
19344 gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
19345
19346 fi
19347
19348
19349
19350
19351
19352 GNULIB_FSTATAT=1
19353
19354
19355
19356
19357
19358 $as_echo "#define GNULIB_TEST_FSTATAT 1" >>confdefs.h
19359
19360
19361
19362
19363
19364
19365
19366
19367 gl_abort_bug=no
19368 case "$host_os" in
19369 mingw*)
19370 gl_cv_func_getcwd_path_max=yes
19371 ;;
19372 *)
19373
19374
19375 :
19376
19377
19378
19379
19380
19381
19382
19383 :
19384
19385
19386
19387
19388
19389
19390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd handles long file names properly" >&5
19391 $as_echo_n "checking whether getcwd handles long file names properly... " >&6; }
19392 if ${gl_cv_func_getcwd_path_max+:} false; then :
19393 $as_echo_n "(cached) " >&6
19394 else
19395 # Arrange for deletion of the temporary directory this test creates.
19396 ac_clean_files="$ac_clean_files confdir3"
19397 if test "$cross_compiling" = yes; then :
19398 # Cross-compilation guesses:
19399 case "$host_os" in
19400 aix*) # On AIX, it has the AIX bug.
19401 gl_cv_func_getcwd_path_max='no, it has the AIX bug' ;;
19402 gnu*) # On Hurd, it is 'yes'.
19403 gl_cv_func_getcwd_path_max=yes ;;
19404 linux* | kfreebsd*)
19405 # On older Linux+glibc it's 'no, but it is partly working',
19406 # on newer Linux+glibc it's 'yes'.
19407 # On Linux+musl libc, it's 'no, but it is partly working'.
19408 # On kFreeBSD+glibc, it's 'no, but it is partly working'.
19409 gl_cv_func_getcwd_path_max='no, but it is partly working' ;;
19410 *) # If we don't know, assume the worst.
19411 gl_cv_func_getcwd_path_max=no ;;
19412 esac
19413
19414 else
19415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19416 /* end confdefs.h. */
19417
19418 #include <errno.h>
19419 #include <stdlib.h>
19420 #if HAVE_UNISTD_H
19421 # include <unistd.h>
19422 #else
19423 # include <direct.h>
19424 #endif
19425 #include <string.h>
19426 #include <limits.h>
19427 #include <sys/stat.h>
19428 #include <sys/types.h>
19429 #include <fcntl.h>
19430
19431
19432 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
19433 #if HAVE_UNISTD_H
19434 # include <unistd.h>
19435 #endif
19436 #include <limits.h>
19437 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
19438 # include <sys/param.h>
19439 #endif
19440 #if !defined PATH_MAX && defined MAXPATHLEN
19441 # define PATH_MAX MAXPATHLEN
19442 #endif
19443 #ifdef __hpux
19444 # undef PATH_MAX
19445 # define PATH_MAX 1024
19446 #endif
19447 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
19448 # undef PATH_MAX
19449 # define PATH_MAX 260
19450 #endif
19451
19452
19453 #ifndef AT_FDCWD
19454 # define AT_FDCWD 0
19455 #endif
19456 #ifdef ENAMETOOLONG
19457 # define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG)
19458 #else
19459 # define is_ENAMETOOLONG(x) 0
19460 #endif
19461
19462 /* Use the getcwd function, not any macro. */
19463 #undef getcwd
19464
19465 /* Don't get link errors because mkdir is redefined to rpl_mkdir. */
19466 #undef mkdir
19467
19468 #ifndef S_IRWXU
19469 # define S_IRWXU 0700
19470 #endif
19471
19472 /* The length of this name must be 8. */
19473 #define DIR_NAME "confdir3"
19474 #define DIR_NAME_LEN 8
19475 #define DIR_NAME_SIZE (DIR_NAME_LEN + 1)
19476
19477 /* The length of "../". */
19478 #define DOTDOTSLASH_LEN 3
19479
19480 /* Leftover bytes in the buffer, to work around library or OS bugs. */
19481 #define BUF_SLOP 20
19482
19483 int
19484 main ()
19485 {
19486 #ifndef PATH_MAX
19487 /* The Hurd doesn't define this, so getcwd can't exhibit the bug --
19488 at least not on a local file system. And if we were to start worrying
19489 about remote file systems, we'd have to enable the wrapper function
19490 all of the time, just to be safe. That's not worth the cost. */
19491 exit (0);
19492 #elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \
19493 - DIR_NAME_SIZE - BUF_SLOP) \
19494 <= PATH_MAX)
19495 /* FIXME: Assuming there's a system for which this is true,
19496 this should be done in a compile test. */
19497 exit (0);
19498 #else
19499 char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1)
19500 + DIR_NAME_SIZE + BUF_SLOP];
19501 char *cwd = getcwd (buf, PATH_MAX);
19502 size_t initial_cwd_len;
19503 size_t cwd_len;
19504 int fail = 0;
19505 size_t n_chdirs = 0;
19506
19507 if (cwd == NULL)
19508 exit (10);
19509
19510 cwd_len = initial_cwd_len = strlen (cwd);
19511
19512 while (1)
19513 {
19514 size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN);
19515 char *c = NULL;
19516
19517 cwd_len += DIR_NAME_SIZE;
19518 /* If mkdir or chdir fails, it could be that this system cannot create
19519 any file with an absolute name longer than PATH_MAX, such as cygwin.
19520 If so, leave fail as 0, because the current working directory can't
19521 be too long for getcwd if it can't even be created. For other
19522 errors, be pessimistic and consider that as a failure, too. */
19523 if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0)
19524 {
19525 if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
19526 fail = 20;
19527 break;
19528 }
19529
19530 if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE)
19531 {
19532 struct stat sb;
19533
19534 c = getcwd (buf, PATH_MAX);
19535 if (!c && errno == ENOENT)
19536 {
19537 fail = 11;
19538 break;
19539 }
19540 if (c)
19541 {
19542 fail = 31;
19543 break;
19544 }
19545 if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
19546 {
19547 fail = 21;
19548 break;
19549 }
19550
19551 /* Our replacement needs to be able to stat() long ../../paths,
19552 so generate a path larger than PATH_MAX to check,
19553 avoiding the replacement if we can't stat(). */
19554 c = getcwd (buf, cwd_len + 1);
19555 if (c && !AT_FDCWD && stat (c, &sb) != 0 && is_ENAMETOOLONG (errno))
19556 {
19557 fail = 32;
19558 break;
19559 }
19560 }
19561
19562 if (dotdot_max <= cwd_len - initial_cwd_len)
19563 {
19564 if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len)
19565 break;
19566 c = getcwd (buf, cwd_len + 1);
19567 if (!c)
19568 {
19569 if (! (errno == ERANGE || errno == ENOENT
19570 || is_ENAMETOOLONG (errno)))
19571 {
19572 fail = 22;
19573 break;
19574 }
19575 if (AT_FDCWD || errno == ERANGE || errno == ENOENT)
19576 {
19577 fail = 12;
19578 break;
19579 }
19580 }
19581 }
19582
19583 if (c && strlen (c) != cwd_len)
19584 {
19585 fail = 23;
19586 break;
19587 }
19588 ++n_chdirs;
19589 }
19590
19591 /* Leaving behind such a deep directory is not polite.
19592 So clean up here, right away, even though the driving
19593 shell script would also clean up. */
19594 {
19595 size_t i;
19596
19597 /* Try rmdir first, in case the chdir failed. */
19598 rmdir (DIR_NAME);
19599 for (i = 0; i <= n_chdirs; i++)
19600 {
19601 if (chdir ("..") < 0)
19602 break;
19603 if (rmdir (DIR_NAME) != 0)
19604 break;
19605 }
19606 }
19607
19608 exit (fail);
19609 #endif
19610 }
19611
19612 _ACEOF
19613 if ac_fn_c_try_run "$LINENO"; then :
19614 gl_cv_func_getcwd_path_max=yes
19615 else
19616 case $? in
19617 10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';;
19618 31) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
19619 32) gl_cv_func_getcwd_path_max='yes, but with shorter paths';;
19620 *) gl_cv_func_getcwd_path_max=no;;
19621 esac
19622 fi
19623 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19624 conftest.$ac_objext conftest.beam conftest.$ac_ext
19625 fi
19626
19627
19628 fi
19629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_path_max" >&5
19630 $as_echo "$gl_cv_func_getcwd_path_max" >&6; }
19631
19632 case "$gl_cv_func_getcwd_null" in
19633 *yes)
19634
19635
19636 :
19637
19638
19639
19640
19641
19642
19643 :
19644
19645
19646
19647
19648
19649
19650 for ac_func in getpagesize
19651 do :
19652 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
19653 if test "x$ac_cv_func_getpagesize" = xyes; then :
19654 cat >>confdefs.h <<_ACEOF
19655 #define HAVE_GETPAGESIZE 1
19656 _ACEOF
19657
19658 fi
19659 done
19660
19661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd aborts when 4k < cwd_length < 16k" >&5
19662 $as_echo_n "checking whether getcwd aborts when 4k < cwd_length < 16k... " >&6; }
19663 if ${gl_cv_func_getcwd_abort_bug+:} false; then :
19664 $as_echo_n "(cached) " >&6
19665 else
19666 # Remove any remnants of a previous test.
19667 rm -rf confdir-14B---
19668 # Arrange for deletion of the temporary directory this test creates.
19669 ac_clean_files="$ac_clean_files confdir-14B---"
19670 if test "$cross_compiling" = yes; then :
19671 gl_cv_func_getcwd_abort_bug=yes
19672 else
19673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19674 /* end confdefs.h. */
19675
19676 #include <errno.h>
19677 #include <stdlib.h>
19678 #if HAVE_UNISTD_H
19679 # include <unistd.h>
19680 #else /* on Windows with MSVC */
19681 # include <direct.h>
19682 #endif
19683 #include <string.h>
19684 #include <sys/stat.h>
19685
19686
19687 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
19688 #if HAVE_UNISTD_H
19689 # include <unistd.h>
19690 #endif
19691 #include <limits.h>
19692 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
19693 # include <sys/param.h>
19694 #endif
19695 #if !defined PATH_MAX && defined MAXPATHLEN
19696 # define PATH_MAX MAXPATHLEN
19697 #endif
19698 #ifdef __hpux
19699 # undef PATH_MAX
19700 # define PATH_MAX 1024
19701 #endif
19702 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
19703 # undef PATH_MAX
19704 # define PATH_MAX 260
19705 #endif
19706
19707
19708 /* Don't get link errors because mkdir is redefined to rpl_mkdir. */
19709 #undef mkdir
19710
19711 #ifndef S_IRWXU
19712 # define S_IRWXU 0700
19713 #endif
19714
19715 /* FIXME: skip the run-test altogether on systems without getpagesize. */
19716 #if ! HAVE_GETPAGESIZE
19717 # define getpagesize() 0
19718 #endif
19719
19720 /* This size is chosen to be larger than PATH_MAX (4k), yet smaller than
19721 the 16kB pagesize on ia64 linux. Those conditions make the code below
19722 trigger a bug in glibc's getcwd implementation before 2.4.90-10. */
19723 #define TARGET_LEN (5 * 1024)
19724
19725 int
19726 main ()
19727 {
19728 char *cwd;
19729 size_t initial_cwd_len;
19730 int fail = 0;
19731
19732 /* The bug is triggered when PATH_MAX < getpagesize (), so skip
19733 this relatively expensive and invasive test if that's not true. */
19734 #ifdef PATH_MAX
19735 int bug_possible = PATH_MAX < getpagesize ();
19736 #else
19737 int bug_possible = 0;
19738 #endif
19739 if (! bug_possible)
19740 return 0;
19741
19742 cwd = getcwd (NULL, 0);
19743 if (cwd == NULL)
19744 return 2;
19745
19746 initial_cwd_len = strlen (cwd);
19747 free (cwd);
19748
19749 if (1)
19750 {
19751 static char const dir_name[] = "confdir-14B---";
19752 size_t desired_depth = ((TARGET_LEN - 1 - initial_cwd_len)
19753 / sizeof dir_name);
19754 size_t d;
19755 for (d = 0; d < desired_depth; d++)
19756 {
19757 if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0)
19758 {
19759 if (! (errno == ERANGE || errno == ENAMETOOLONG
19760 || errno == ENOENT))
19761 fail = 3; /* Unable to construct deep hierarchy. */
19762 break;
19763 }
19764 }
19765
19766 /* If libc has the bug in question, this invocation of getcwd
19767 results in a failed assertion. */
19768 cwd = getcwd (NULL, 0);
19769 if (cwd == NULL)
19770 fail = 4; /* getcwd didn't assert, but it failed for a long name
19771 where the answer could have been learned. */
19772 free (cwd);
19773
19774 /* Call rmdir first, in case the above chdir failed. */
19775 rmdir (dir_name);
19776 while (0 < d--)
19777 {
19778 if (chdir ("..") < 0)
19779 {
19780 fail = 5;
19781 break;
19782 }
19783 rmdir (dir_name);
19784 }
19785 }
19786
19787 return fail;
19788 }
19789
19790 _ACEOF
19791 if ac_fn_c_try_run "$LINENO"; then :
19792 gl_cv_func_getcwd_abort_bug=no
19793 else
19794 ret=$?
19795 if test $ret -ge 128 || test $ret = 4; then
19796 gl_cv_func_getcwd_abort_bug=yes
19797 else
19798 gl_cv_func_getcwd_abort_bug=no
19799 fi
19800 fi
19801 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19802 conftest.$ac_objext conftest.beam conftest.$ac_ext
19803 fi
19804
19805
19806 fi
19807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_abort_bug" >&5
19808 $as_echo "$gl_cv_func_getcwd_abort_bug" >&6; }
19809 if test $gl_cv_func_getcwd_abort_bug = yes; then :
19810 gl_abort_bug=yes
19811 fi
19812
19813 ;;
19814 esac
19815 ;;
19816 esac
19817 case "$gl_cv_func_getcwd_path_max" in
19818 "no"|"no, it has the AIX bug") ;;
19819 *)
19820
19821 $as_echo "#define HAVE_MINIMALLY_WORKING_GETCWD 1" >>confdefs.h
19822
19823 ;;
19824 esac
19825 case "$gl_cv_func_getcwd_path_max" in
19826 "no, but it is partly working")
19827
19828 $as_echo "#define HAVE_PARTLY_WORKING_GETCWD 1" >>confdefs.h
19829
19830 ;;
19831 "yes, but with shorter paths")
19832
19833 $as_echo "#define HAVE_GETCWD_SHORTER 1" >>confdefs.h
19834
19835 ;;
19836 esac
19837
19838 if { case "$gl_cv_func_getcwd_null" in *yes) false;; *) true;; esac; } \
19839 || test $gl_cv_func_getcwd_posix_signature != yes \
19840 || { case "$gl_cv_func_getcwd_path_max" in *yes*) false;; *) true;; esac; } \
19841 || test $gl_abort_bug = yes; then
19842 REPLACE_GETCWD=1
19843 fi
19844
19845 if test $REPLACE_GETCWD = 1; then
19846
19847
19848
19849
19850
19851
19852
19853
19854 gl_LIBOBJS="$gl_LIBOBJS getcwd.$ac_objext"
19855
19856
19857
19858
19859 :
19860
19861 fi
19862
19863
19864 cat >>confdefs.h <<_ACEOF
19865 #define GNULIB_GETCWD 1
19866 _ACEOF
19867
19868
19869
19870
19871
19872
19873
19874 GNULIB_GETCWD=1
19875
19876
19877
19878
19879
19880 $as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
19881
19882
19883
19884
19885
19886
19887
19888
19889 case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
19890 *yes,yes) ;;
19891 *)
19892 REPLACE_GETCWD=1
19893 ;;
19894 esac
19895
19896 if test $REPLACE_GETCWD = 1; then
19897
19898
19899
19900
19901
19902
19903
19904
19905 gl_LIBOBJS="$gl_LIBOBJS getcwd-lgpl.$ac_objext"
19906
19907 fi
19908
19909
19910
19911
19912
19913 GNULIB_GETCWD=1
19914
19915
19916
19917
19918
19919 $as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
19920
19921
19922
19923
19924
19925
19926
19927 :
19928
19929
19930
19931
19932
19933
19934 :
19935
19936
19937
19938
19939
19940 if test $ac_cv_func_getdtablesize = yes &&
19941 test $ac_cv_have_decl_getdtablesize = yes; then
19942 # Cygwin 1.7.25 automatically increases the RLIMIT_NOFILE soft limit
19943 # up to an unchangeable hard limit; all other platforms correctly
19944 # require setrlimit before getdtablesize() can report a larger value.
19945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
19946 $as_echo_n "checking whether getdtablesize works... " >&6; }
19947 if ${gl_cv_func_getdtablesize_works+:} false; then :
19948 $as_echo_n "(cached) " >&6
19949 else
19950 if test "$cross_compiling" = yes; then :
19951 case "$host_os" in
19952 cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
19953 gl_cv_func_getdtablesize_works="guessing no" ;;
19954 *) gl_cv_func_getdtablesize_works="guessing yes" ;;
19955 esac
19956 else
19957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19958 /* end confdefs.h. */
19959
19960 #include <unistd.h>
19961 int
19962 main ()
19963 {
19964 int size = getdtablesize();
19965 if (dup2 (0, getdtablesize()) != -1)
19966 return 1;
19967 if (size != getdtablesize())
19968 return 2;
19969
19970 ;
19971 return 0;
19972 }
19973 _ACEOF
19974 if ac_fn_c_try_run "$LINENO"; then :
19975 gl_cv_func_getdtablesize_works=yes
19976 else
19977 gl_cv_func_getdtablesize_works=no
19978 fi
19979 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19980 conftest.$ac_objext conftest.beam conftest.$ac_ext
19981 fi
19982
19983
19984 fi
19985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
19986 $as_echo "$gl_cv_func_getdtablesize_works" >&6; }
19987 case "$gl_cv_func_getdtablesize_works" in
19988 *yes) ;;
19989 *) REPLACE_GETDTABLESIZE=1 ;;
19990 esac
19991 else
19992 HAVE_GETDTABLESIZE=0
19993 fi
19994
19995 if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
19996
19997
19998
19999
20000
20001
20002
20003
20004 gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
20005
20006 :
20007 fi
20008
20009
20010
20011
20012
20013 GNULIB_GETDTABLESIZE=1
20014
20015
20016
20017
20018
20019 $as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
20020
20021
20022
20023
20024
20025
20026
20027
20028
20029 :
20030
20031
20032
20033
20034
20035 if test $ac_cv_have_decl_getlogin_r = no; then
20036 HAVE_DECL_GETLOGIN_R=0
20037 fi
20038
20039
20040 :
20041
20042
20043
20044
20045
20046 if test $ac_cv_func_getlogin_r = no; then
20047 HAVE_GETLOGIN_R=0
20048 else
20049 HAVE_GETLOGIN_R=1
20050
20051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getlogin_r works with small buffers" >&5
20052 $as_echo_n "checking whether getlogin_r works with small buffers... " >&6; }
20053 if ${gl_cv_func_getlogin_r_works+:} false; then :
20054 $as_echo_n "(cached) " >&6
20055 else
20056
20057 case "$host_os" in
20058 # Guess no on OSF/1.
20059 osf*) gl_cv_func_getlogin_r_works="guessing no" ;;
20060 # Guess yes otherwise.
20061 *) gl_cv_func_getlogin_r_works="guessing yes" ;;
20062 esac
20063 if test "$cross_compiling" = yes; then :
20064 :
20065 else
20066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20067 /* end confdefs.h. */
20068
20069 #include <stddef.h>
20070 #include <unistd.h>
20071 #if !HAVE_DECL_GETLOGIN_R
20072 extern
20073 # ifdef __cplusplus
20074 "C"
20075 # endif
20076 int getlogin_r (char *, size_t);
20077 #endif
20078 int
20079 main (void)
20080 {
20081 int result = 0;
20082 char buf[100];
20083
20084 if (getlogin_r (buf, 0) == 0)
20085 result |= 16;
20086 if (getlogin_r (buf, 1) == 0)
20087 result |= 17;
20088 return result;
20089 }
20090 _ACEOF
20091 if ac_fn_c_try_run "$LINENO"; then :
20092 gl_cv_func_getlogin_r_works=yes
20093 else
20094 case $? in
20095 16 | 17) gl_cv_func_getlogin_r_works=no ;;
20096 esac
20097
20098 fi
20099 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20100 conftest.$ac_objext conftest.beam conftest.$ac_ext
20101 fi
20102
20103
20104 fi
20105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getlogin_r_works" >&5
20106 $as_echo "$gl_cv_func_getlogin_r_works" >&6; }
20107 case "$gl_cv_func_getlogin_r_works" in
20108 *yes) ;;
20109 *) REPLACE_GETLOGIN_R=1 ;;
20110 esac
20111 fi
20112
20113 if test $HAVE_GETLOGIN_R = 0 || test $REPLACE_GETLOGIN_R = 1; then
20114
20115
20116
20117
20118
20119
20120
20121
20122 gl_LIBOBJS="$gl_LIBOBJS getlogin_r.$ac_objext"
20123
20124
20125
20126 :
20127
20128
20129
20130
20131
20132
20133 fi
20134
20135
20136
20137
20138
20139 GNULIB_GETLOGIN_R=1
20140
20141
20142
20143
20144
20145 $as_echo "#define GNULIB_TEST_GETLOGIN_R 1" >>confdefs.h
20146
20147
20148
20149
20150
20151 :
20152
20153
20154
20155
20156
20157
20158
20159
20160
20161 ac_found=0
20162 ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
20163 "
20164 if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
20165 ac_have_decl=1
20166 else
20167 ac_have_decl=0
20168 fi
20169
20170 cat >>confdefs.h <<_ACEOF
20171 #define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
20172 _ACEOF
20173 if test $ac_have_decl = 1; then :
20174 ac_found=1
20175 fi
20176
20177 ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
20178 "
20179 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
20180 ac_have_decl=1
20181 else
20182 ac_have_decl=0
20183 fi
20184
20185 cat >>confdefs.h <<_ACEOF
20186 #define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
20187 _ACEOF
20188 if test $ac_have_decl = 1; then :
20189 ac_found=1
20190 fi
20191
20192 ac_fn_c_check_decl "$LINENO" "__argv" "ac_cv_have_decl___argv" "#include <stdlib.h>
20193 "
20194 if test "x$ac_cv_have_decl___argv" = xyes; then :
20195 ac_have_decl=1
20196 else
20197 ac_have_decl=0
20198 fi
20199
20200 cat >>confdefs.h <<_ACEOF
20201 #define HAVE_DECL___ARGV $ac_have_decl
20202 _ACEOF
20203 if test $ac_have_decl = 1; then :
20204 ac_found=1
20205 fi
20206
20207
20208 # Incur the cost of this test only if none of the above worked.
20209 if test $ac_found = 0; then
20210 # On OpenBSD 5.1, using the global __progname variable appears to be
20211 # the only way to implement getprogname.
20212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __progname is defined in default libraries" >&5
20213 $as_echo_n "checking whether __progname is defined in default libraries... " >&6; }
20214 if ${gl_cv_var___progname+:} false; then :
20215 $as_echo_n "(cached) " >&6
20216 else
20217
20218 gl_cv_var___progname=
20219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20220 /* end confdefs.h. */
20221 extern char *__progname;
20222 int
20223 main ()
20224 {
20225 return *__progname;
20226
20227 ;
20228 return 0;
20229 }
20230 _ACEOF
20231 if ac_fn_c_try_link "$LINENO"; then :
20232 gl_cv_var___progname=yes
20233
20234 fi
20235 rm -f core conftest.err conftest.$ac_objext \
20236 conftest$ac_exeext conftest.$ac_ext
20237
20238
20239 fi
20240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var___progname" >&5
20241 $as_echo "$gl_cv_var___progname" >&6; }
20242 if test "$gl_cv_var___progname" = yes; then
20243
20244 $as_echo "#define HAVE_VAR___PROGNAME 1" >>confdefs.h
20245
20246 fi
20247 fi
20248
20249
20250
20251
20252
20253
20254
20255
20256 :
20257
20258
20259
20260
20261
20262
20263 gl_gettimeofday_timezone=void
20264 if test $ac_cv_func_gettimeofday != yes; then
20265 HAVE_GETTIMEOFDAY=0
20266 else
20267
20268
20269
20270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
20271 $as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
20272 if ${gl_cv_func_gettimeofday_clobber+:} false; then :
20273 $as_echo_n "(cached) " >&6
20274 else
20275 if test "$cross_compiling" = yes; then :
20276 # When cross-compiling:
20277 case "$host_os" in
20278 # Guess all is fine on glibc systems.
20279 *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
20280 # If we don't know, assume the worst.
20281 *) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
20282 esac
20283
20284 else
20285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20286 /* end confdefs.h. */
20287 #include <string.h>
20288 #include <sys/time.h>
20289 #include <time.h>
20290 #include <stdlib.h>
20291
20292 int
20293 main ()
20294 {
20295
20296 time_t t = 0;
20297 struct tm *lt;
20298 struct tm saved_lt;
20299 struct timeval tv;
20300 lt = localtime (&t);
20301 saved_lt = *lt;
20302 gettimeofday (&tv, NULL);
20303 return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
20304
20305 ;
20306 return 0;
20307 }
20308 _ACEOF
20309 if ac_fn_c_try_run "$LINENO"; then :
20310 gl_cv_func_gettimeofday_clobber=no
20311 else
20312 gl_cv_func_gettimeofday_clobber=yes
20313 fi
20314 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20315 conftest.$ac_objext conftest.beam conftest.$ac_ext
20316 fi
20317
20318 fi
20319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
20320 $as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
20321
20322 case "$gl_cv_func_gettimeofday_clobber" in
20323 *yes)
20324 REPLACE_GETTIMEOFDAY=1
20325
20326 REPLACE_GMTIME=1
20327 REPLACE_LOCALTIME=1
20328
20329
20330 $as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
20331
20332 ;;
20333 esac
20334
20335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
20336 $as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
20337 if ${gl_cv_func_gettimeofday_posix_signature+:} false; then :
20338 $as_echo_n "(cached) " >&6
20339 else
20340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20341 /* end confdefs.h. */
20342 #include <sys/time.h>
20343 struct timeval c;
20344 int gettimeofday (struct timeval *restrict, void *restrict);
20345
20346 int
20347 main ()
20348 {
20349 /* glibc uses struct timezone * rather than the POSIX void *
20350 if _GNU_SOURCE is defined. However, since the only portable
20351 use of gettimeofday uses NULL as the second parameter, and
20352 since the glibc definition is actually more typesafe, it is
20353 not worth wrapping this to get a compliant signature. */
20354 int (*f) (struct timeval *restrict, void *restrict)
20355 = gettimeofday;
20356 int x = f (&c, 0);
20357 return !(x | c.tv_sec | c.tv_usec);
20358
20359 ;
20360 return 0;
20361 }
20362 _ACEOF
20363 if ac_fn_c_try_compile "$LINENO"; then :
20364 gl_cv_func_gettimeofday_posix_signature=yes
20365 else
20366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20367 /* end confdefs.h. */
20368 #include <sys/time.h>
20369 int gettimeofday (struct timeval *restrict, struct timezone *restrict);
20370
20371 int
20372 main ()
20373 {
20374
20375 ;
20376 return 0;
20377 }
20378 _ACEOF
20379 if ac_fn_c_try_compile "$LINENO"; then :
20380 gl_cv_func_gettimeofday_posix_signature=almost
20381 else
20382 gl_cv_func_gettimeofday_posix_signature=no
20383 fi
20384 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20385 fi
20386 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20387 fi
20388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
20389 $as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
20390 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
20391 gl_gettimeofday_timezone='struct timezone'
20392 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
20393 REPLACE_GETTIMEOFDAY=1
20394 fi
20395 if test $REPLACE_STRUCT_TIMEVAL = 1; then
20396 REPLACE_GETTIMEOFDAY=1
20397 fi
20398
20399 fi
20400
20401 cat >>confdefs.h <<_ACEOF
20402 #define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
20403 _ACEOF
20404
20405
20406 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
20407
20408
20409
20410
20411
20412
20413
20414
20415 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
20416
20417
20418 for ac_header in sys/timeb.h
20419 do :
20420 ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
20421 if test "x$ac_cv_header_sys_timeb_h" = xyes; then :
20422 cat >>confdefs.h <<_ACEOF
20423 #define HAVE_SYS_TIMEB_H 1
20424 _ACEOF
20425
20426 fi
20427
20428 done
20429
20430 for ac_func in _ftime
20431 do :
20432 ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
20433 if test "x$ac_cv_func__ftime" = xyes; then :
20434 cat >>confdefs.h <<_ACEOF
20435 #define HAVE__FTIME 1
20436 _ACEOF
20437
20438 fi
20439 done
20440
20441
20442 fi
20443
20444
20445
20446
20447
20448 GNULIB_GETTIMEOFDAY=1
20449
20450
20451
20452
20453
20454 $as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
20455
20456
20457
20458 GLOB_H=
20459 for ac_header in glob.h
20460 do :
20461 ac_fn_c_check_header_mongrel "$LINENO" "glob.h" "ac_cv_header_glob_h" "$ac_includes_default"
20462 if test "x$ac_cv_header_glob_h" = xyes; then :
20463 cat >>confdefs.h <<_ACEOF
20464 #define HAVE_GLOB_H 1
20465 _ACEOF
20466
20467 else
20468 GLOB_H=glob.h
20469 fi
20470
20471 done
20472
20473
20474 if test -z "$GLOB_H"; then
20475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU glob interface version 1" >&5
20476 $as_echo_n "checking for GNU glob interface version 1... " >&6; }
20477 if ${gl_cv_gnu_glob_interface_version_1+:} false; then :
20478 $as_echo_n "(cached) " >&6
20479 else
20480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20481 /* end confdefs.h. */
20482 #include <gnu-versions.h>
20483 char a[_GNU_GLOB_INTERFACE_VERSION == 1 ? 1 : -1];
20484 _ACEOF
20485 if ac_fn_c_try_compile "$LINENO"; then :
20486 gl_cv_gnu_glob_interface_version_1=yes
20487 else
20488 gl_cv_gnu_glob_interface_version_1=no
20489 fi
20490 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20491 fi
20492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_gnu_glob_interface_version_1" >&5
20493 $as_echo "$gl_cv_gnu_glob_interface_version_1" >&6; }
20494
20495 if test "$gl_cv_gnu_glob_interface_version_1" = "no"; then
20496 GLOB_H=glob.h
20497 fi
20498 fi
20499
20500 if test -z "$GLOB_H"; then
20501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether glob lists broken symlinks" >&5
20502 $as_echo_n "checking whether glob lists broken symlinks... " >&6; }
20503 if ${gl_cv_glob_lists_symlinks+:} false; then :
20504 $as_echo_n "(cached) " >&6
20505 else
20506 if ln -s conf-doesntexist conf$$-globtest 2>/dev/null; then
20507 gl_cv_glob_lists_symlinks=maybe
20508 else
20509 # If we can't make a symlink, then we cannot test this issue. Be
20510 # pessimistic about this.
20511 gl_cv_glob_lists_symlinks=no
20512 fi
20513
20514 if test $gl_cv_glob_lists_symlinks = maybe; then
20515 if test "$cross_compiling" = yes; then :
20516 gl_cv_glob_lists_symlinks=no
20517 else
20518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20519 /* end confdefs.h. */
20520
20521 #include <stddef.h>
20522 #include <glob.h>
20523 int
20524 main ()
20525 {
20526 glob_t found;
20527 if (glob ("conf*-globtest", 0, NULL, &found) == GLOB_NOMATCH) return 1;
20528 ;
20529 return 0;
20530 }
20531 _ACEOF
20532 if ac_fn_c_try_run "$LINENO"; then :
20533 gl_cv_glob_lists_symlinks=yes
20534 else
20535 gl_cv_glob_lists_symlinks=no
20536 fi
20537 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20538 conftest.$ac_objext conftest.beam conftest.$ac_ext
20539 fi
20540
20541 fi
20542 fi
20543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_glob_lists_symlinks" >&5
20544 $as_echo "$gl_cv_glob_lists_symlinks" >&6; }
20545
20546 if test $gl_cv_glob_lists_symlinks = no; then
20547 GLOB_H=glob.h
20548 fi
20549 fi
20550
20551 rm -f conf$$-globtest
20552
20553
20554 if test -n "$GLOB_H"; then
20555 GL_GENERATE_GLOB_H_TRUE=
20556 GL_GENERATE_GLOB_H_FALSE='#'
20557 else
20558 GL_GENERATE_GLOB_H_TRUE='#'
20559 GL_GENERATE_GLOB_H_FALSE=
20560 fi
20561
20562
20563 if test -n "$GLOB_H"; then
20564
20565
20566
20567
20568
20569
20570
20571
20572 gl_LIBOBJS="$gl_LIBOBJS glob.$ac_objext"
20573
20574
20575
20576 :
20577
20578
20579
20580
20581
20582
20583
20584 if test $ac_cv_header_sys_cdefs_h = yes; then
20585 HAVE_SYS_CDEFS_H=1
20586 else
20587 HAVE_SYS_CDEFS_H=0
20588 fi
20589
20590
20591 :
20592
20593
20594
20595
20596
20597
20598
20599
20600
20601
20602
20603 fi
20604
20605 :
20606
20607
20608
20609
20610
20611
20612
20613
20614 HAVE_INET_NTOP=1
20615 INET_NTOP_LIB=
20616
20617
20618
20619
20620 :
20621
20622
20623
20624
20625
20626 if test $ac_cv_header_sys_socket_h != yes; then
20627 for ac_header in winsock2.h
20628 do :
20629 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
20630 if test "x$ac_cv_header_winsock2_h" = xyes; then :
20631 cat >>confdefs.h <<_ACEOF
20632 #define HAVE_WINSOCK2_H 1
20633 _ACEOF
20634
20635 fi
20636
20637 done
20638
20639 fi
20640 if test "$ac_cv_header_winsock2_h" = yes; then
20641 HAVE_WINSOCK2_H=1
20642 UNISTD_H_HAVE_WINSOCK2_H=1
20643 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
20644 else
20645 HAVE_WINSOCK2_H=0
20646 fi
20647
20648
20649 if test $HAVE_WINSOCK2_H = 1; then
20650 ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <ws2tcpip.h>
20651 "
20652 if test "x$ac_cv_have_decl_inet_ntop" = xyes; then :
20653 ac_have_decl=1
20654 else
20655 ac_have_decl=0
20656 fi
20657
20658 cat >>confdefs.h <<_ACEOF
20659 #define HAVE_DECL_INET_NTOP $ac_have_decl
20660 _ACEOF
20661
20662 if test $ac_cv_have_decl_inet_ntop = yes; then
20663 REPLACE_INET_NTOP=1
20664 INET_NTOP_LIB="-lws2_32"
20665 else
20666 HAVE_DECL_INET_NTOP=0
20667 HAVE_INET_NTOP=0
20668 fi
20669 else
20670 gl_save_LIBS=$LIBS
20671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5
20672 $as_echo_n "checking for library containing inet_ntop... " >&6; }
20673 if ${ac_cv_search_inet_ntop+:} false; then :
20674 $as_echo_n "(cached) " >&6
20675 else
20676 ac_func_search_save_LIBS=$LIBS
20677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20678 /* end confdefs.h. */
20679
20680 /* Override any GCC internal prototype to avoid an error.
20681 Use char because int might match the return type of a GCC
20682 builtin and then its argument prototype would still apply. */
20683 #ifdef __cplusplus
20684 extern "C"
20685 #endif
20686 char inet_ntop ();
20687 int
20688 main ()
20689 {
20690 return inet_ntop ();
20691 ;
20692 return 0;
20693 }
20694 _ACEOF
20695 for ac_lib in '' nsl resolv; do
20696 if test -z "$ac_lib"; then
20697 ac_res="none required"
20698 else
20699 ac_res=-l$ac_lib
20700 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
20701 fi
20702 if ac_fn_c_try_link "$LINENO"; then :
20703 ac_cv_search_inet_ntop=$ac_res
20704 fi
20705 rm -f core conftest.err conftest.$ac_objext \
20706 conftest$ac_exeext
20707 if ${ac_cv_search_inet_ntop+:} false; then :
20708 break
20709 fi
20710 done
20711 if ${ac_cv_search_inet_ntop+:} false; then :
20712
20713 else
20714 ac_cv_search_inet_ntop=no
20715 fi
20716 rm conftest.$ac_ext
20717 LIBS=$ac_func_search_save_LIBS
20718 fi
20719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5
20720 $as_echo "$ac_cv_search_inet_ntop" >&6; }
20721 ac_res=$ac_cv_search_inet_ntop
20722 if test "$ac_res" != no; then :
20723 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20724
20725 else
20726 for ac_func in inet_ntop
20727 do :
20728 ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
20729 if test "x$ac_cv_func_inet_ntop" = xyes; then :
20730 cat >>confdefs.h <<_ACEOF
20731 #define HAVE_INET_NTOP 1
20732 _ACEOF
20733
20734 fi
20735 done
20736
20737 if test $ac_cv_func_inet_ntop = no; then
20738 HAVE_INET_NTOP=0
20739 fi
20740
20741 fi
20742
20743 LIBS=$gl_save_LIBS
20744
20745 if test "$ac_cv_search_inet_ntop" != "no" \
20746 && test "$ac_cv_search_inet_ntop" != "none required"; then
20747 INET_NTOP_LIB="$ac_cv_search_inet_ntop"
20748 fi
20749
20750
20751 :
20752
20753
20754
20755
20756
20757 ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <arpa/inet.h>
20758 #if HAVE_NETDB_H
20759 # include <netdb.h>
20760 #endif
20761
20762 "
20763 if test "x$ac_cv_have_decl_inet_ntop" = xyes; then :
20764 ac_have_decl=1
20765 else
20766 ac_have_decl=0
20767 fi
20768
20769 cat >>confdefs.h <<_ACEOF
20770 #define HAVE_DECL_INET_NTOP $ac_have_decl
20771 _ACEOF
20772
20773 if test $ac_cv_have_decl_inet_ntop = no; then
20774 HAVE_DECL_INET_NTOP=0
20775 fi
20776 fi
20777
20778
20779 if test $HAVE_INET_NTOP = 0 || test $REPLACE_INET_NTOP = 1; then
20780
20781
20782
20783
20784
20785
20786
20787
20788 gl_LIBOBJS="$gl_LIBOBJS inet_ntop.$ac_objext"
20789
20790
20791
20792
20793 fi
20794
20795
20796
20797
20798
20799 GNULIB_INET_NTOP=1
20800
20801
20802
20803
20804
20805
20806
20807
20808
20809 PRIPTR_PREFIX=
20810 if test -n "$STDINT_H"; then
20811 PRIPTR_PREFIX='"l"'
20812 else
20813 for glpfx in '' l ll I64; do
20814 case $glpfx in
20815 '') gltype1='int';;
20816 l) gltype1='long int';;
20817 ll) gltype1='long long int';;
20818 I64) gltype1='__int64';;
20819 esac
20820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20821 /* end confdefs.h. */
20822 #include <stdint.h>
20823 extern intptr_t foo;
20824 extern $gltype1 foo;
20825 int
20826 main ()
20827 {
20828
20829 ;
20830 return 0;
20831 }
20832 _ACEOF
20833 if ac_fn_c_try_compile "$LINENO"; then :
20834 PRIPTR_PREFIX='"'$glpfx'"'
20835 fi
20836 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20837 test -n "$PRIPTR_PREFIX" && break
20838 done
20839 fi
20840
20841
20842
20843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
20844 $as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
20845 if ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+:} false; then :
20846 $as_echo_n "(cached) " >&6
20847 else
20848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20849 /* end confdefs.h. */
20850 /* Work also in C++ mode. */
20851 #define __STDC_LIMIT_MACROS 1
20852
20853 /* Work if build is not clean. */
20854 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
20855
20856 #include <limits.h>
20857 #if HAVE_STDINT_H
20858 #include <stdint.h>
20859 #endif
20860
20861 #if defined INT32_MAX && defined INTMAX_MAX
20862 #define CONDITION (INT32_MAX < INTMAX_MAX)
20863 #elif HAVE_LONG_LONG_INT
20864 #define CONDITION (sizeof (int) < sizeof (long long int))
20865 #else
20866 #define CONDITION 0
20867 #endif
20868 int test[CONDITION ? 1 : -1];
20869 int
20870 main ()
20871 {
20872
20873 ;
20874 return 0;
20875 }
20876 _ACEOF
20877 if ac_fn_c_try_compile "$LINENO"; then :
20878 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
20879 else
20880 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
20881 fi
20882 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20883 fi
20884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
20885 $as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
20886 if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
20887 INT32_MAX_LT_INTMAX_MAX=1;
20888 else
20889 INT32_MAX_LT_INTMAX_MAX=0;
20890 fi
20891
20892
20893 if test $APPLE_UNIVERSAL_BUILD = 0; then
20894
20895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
20896 $as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; }
20897 if ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+:} false; then :
20898 $as_echo_n "(cached) " >&6
20899 else
20900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20901 /* end confdefs.h. */
20902 /* Work also in C++ mode. */
20903 #define __STDC_LIMIT_MACROS 1
20904
20905 /* Work if build is not clean. */
20906 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
20907
20908 #include <limits.h>
20909 #if HAVE_STDINT_H
20910 #include <stdint.h>
20911 #endif
20912
20913 #if defined INT64_MAX
20914 #define CONDITION (INT64_MAX == LONG_MAX)
20915 #elif HAVE_LONG_LONG_INT
20916 #define CONDITION (sizeof (long long int) == sizeof (long int))
20917 #else
20918 #define CONDITION 0
20919 #endif
20920 int test[CONDITION ? 1 : -1];
20921 int
20922 main ()
20923 {
20924
20925 ;
20926 return 0;
20927 }
20928 _ACEOF
20929 if ac_fn_c_try_compile "$LINENO"; then :
20930 gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
20931 else
20932 gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
20933 fi
20934 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20935 fi
20936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
20937 $as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
20938 if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
20939 INT64_MAX_EQ_LONG_MAX=1;
20940 else
20941 INT64_MAX_EQ_LONG_MAX=0;
20942 fi
20943
20944
20945 else
20946 INT64_MAX_EQ_LONG_MAX=-1
20947 fi
20948
20949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
20950 $as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
20951 if ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+:} false; then :
20952 $as_echo_n "(cached) " >&6
20953 else
20954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20955 /* end confdefs.h. */
20956 /* Work also in C++ mode. */
20957 #define __STDC_LIMIT_MACROS 1
20958
20959 /* Work if build is not clean. */
20960 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
20961
20962 #include <limits.h>
20963 #if HAVE_STDINT_H
20964 #include <stdint.h>
20965 #endif
20966
20967 #if defined UINT32_MAX && defined UINTMAX_MAX
20968 #define CONDITION (UINT32_MAX < UINTMAX_MAX)
20969 #elif HAVE_LONG_LONG_INT
20970 #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
20971 #else
20972 #define CONDITION 0
20973 #endif
20974 int test[CONDITION ? 1 : -1];
20975 int
20976 main ()
20977 {
20978
20979 ;
20980 return 0;
20981 }
20982 _ACEOF
20983 if ac_fn_c_try_compile "$LINENO"; then :
20984 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
20985 else
20986 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
20987 fi
20988 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20989 fi
20990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
20991 $as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
20992 if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
20993 UINT32_MAX_LT_UINTMAX_MAX=1;
20994 else
20995 UINT32_MAX_LT_UINTMAX_MAX=0;
20996 fi
20997
20998
20999 if test $APPLE_UNIVERSAL_BUILD = 0; then
21000
21001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
21002 $as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
21003 if ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+:} false; then :
21004 $as_echo_n "(cached) " >&6
21005 else
21006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21007 /* end confdefs.h. */
21008 /* Work also in C++ mode. */
21009 #define __STDC_LIMIT_MACROS 1
21010
21011 /* Work if build is not clean. */
21012 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
21013
21014 #include <limits.h>
21015 #if HAVE_STDINT_H
21016 #include <stdint.h>
21017 #endif
21018
21019 #if defined UINT64_MAX
21020 #define CONDITION (UINT64_MAX == ULONG_MAX)
21021 #elif HAVE_LONG_LONG_INT
21022 #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
21023 #else
21024 #define CONDITION 0
21025 #endif
21026 int test[CONDITION ? 1 : -1];
21027 int
21028 main ()
21029 {
21030
21031 ;
21032 return 0;
21033 }
21034 _ACEOF
21035 if ac_fn_c_try_compile "$LINENO"; then :
21036 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
21037 else
21038 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
21039 fi
21040 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21041 fi
21042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
21043 $as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
21044 if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
21045 UINT64_MAX_EQ_ULONG_MAX=1;
21046 else
21047 UINT64_MAX_EQ_ULONG_MAX=0;
21048 fi
21049
21050
21051 else
21052 UINT64_MAX_EQ_ULONG_MAX=-1
21053 fi
21054
21055
21056
21057
21058
21059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
21060 $as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; }
21061 if ${gl_cv_func_isnand_no_libm+:} false; then :
21062 $as_echo_n "(cached) " >&6
21063 else
21064
21065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21066 /* end confdefs.h. */
21067 #include <math.h>
21068 #if __GNUC__ >= 4
21069 # undef isnand
21070 # define isnand(x) __builtin_isnan ((double)(x))
21071 #else
21072 # undef isnand
21073 # define isnand(x) isnan ((double)(x))
21074 #endif
21075 double x;
21076 int
21077 main ()
21078 {
21079 return isnand (x);
21080 ;
21081 return 0;
21082 }
21083 _ACEOF
21084 if ac_fn_c_try_link "$LINENO"; then :
21085 gl_cv_func_isnand_no_libm=yes
21086 else
21087 gl_cv_func_isnand_no_libm=no
21088 fi
21089 rm -f core conftest.err conftest.$ac_objext \
21090 conftest$ac_exeext conftest.$ac_ext
21091
21092 fi
21093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
21094 $as_echo "$gl_cv_func_isnand_no_libm" >&6; }
21095
21096 gl_func_isnand_no_libm=$gl_cv_func_isnand_no_libm
21097 if test $gl_cv_func_isnand_no_libm = yes; then
21098
21099 $as_echo "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h
21100
21101 fi
21102
21103 if test $gl_func_isnand_no_libm != yes; then
21104
21105
21106
21107
21108
21109
21110
21111
21112 gl_LIBOBJS="$gl_LIBOBJS isnand.$ac_objext"
21113
21114
21115
21116
21117 fi
21118
21119
21120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
21121 $as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; }
21122 if ${gl_cv_func_isnanl_no_libm+:} false; then :
21123 $as_echo_n "(cached) " >&6
21124 else
21125
21126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21127 /* end confdefs.h. */
21128 #include <math.h>
21129 #if __GNUC__ >= 4
21130 # undef isnanl
21131 # define isnanl(x) __builtin_isnanl ((long double)(x))
21132 #elif defined isnan
21133 # undef isnanl
21134 # define isnanl(x) isnan ((long double)(x))
21135 #endif
21136 long double x;
21137 int
21138 main ()
21139 {
21140 return isnanl (x);
21141 ;
21142 return 0;
21143 }
21144 _ACEOF
21145 if ac_fn_c_try_link "$LINENO"; then :
21146 gl_cv_func_isnanl_no_libm=yes
21147 else
21148 gl_cv_func_isnanl_no_libm=no
21149 fi
21150 rm -f core conftest.err conftest.$ac_objext \
21151 conftest$ac_exeext conftest.$ac_ext
21152
21153 fi
21154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
21155 $as_echo "$gl_cv_func_isnanl_no_libm" >&6; }
21156
21157 gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm
21158 if test $gl_func_isnanl_no_libm = yes; then
21159
21160
21161
21162
21163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
21164 $as_echo_n "checking whether isnanl works... " >&6; }
21165 if ${gl_cv_func_isnanl_works+:} false; then :
21166 $as_echo_n "(cached) " >&6
21167 else
21168
21169 if test "$cross_compiling" = yes; then :
21170 gl_cv_func_isnanl_works="guessing yes"
21171 else
21172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21173 /* end confdefs.h. */
21174
21175 #include <float.h>
21176 #include <limits.h>
21177 #include <math.h>
21178 #if __GNUC__ >= 4
21179 # undef isnanl
21180 # define isnanl(x) __builtin_isnanl ((long double)(x))
21181 #elif defined isnan
21182 # undef isnanl
21183 # define isnanl(x) isnan ((long double)(x))
21184 #endif
21185 #define NWORDS \
21186 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
21187 typedef union { unsigned int word[NWORDS]; long double value; }
21188 memory_long_double;
21189 /* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
21190 runtime type conversion. */
21191 #ifdef __sgi
21192 static long double NaNl ()
21193 {
21194 double zero = 0.0;
21195 return zero / zero;
21196 }
21197 #else
21198 # define NaNl() (0.0L / 0.0L)
21199 #endif
21200 int main ()
21201 {
21202 int result = 0;
21203
21204 if (!isnanl (NaNl ()))
21205 result |= 1;
21206
21207 {
21208 memory_long_double m;
21209 unsigned int i;
21210
21211 /* The isnanl function should be immune against changes in the sign bit and
21212 in the mantissa bits. The xor operation twiddles a bit that can only be
21213 a sign bit or a mantissa bit (since the exponent never extends to
21214 bit 31). */
21215 m.value = NaNl ();
21216 m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
21217 for (i = 0; i < NWORDS; i++)
21218 m.word[i] |= 1;
21219 if (!isnanl (m.value))
21220 result |= 1;
21221 }
21222
21223 #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
21224 /* Representation of an 80-bit 'long double' as an initializer for a sequence
21225 of 'unsigned int' words. */
21226 # ifdef WORDS_BIGENDIAN
21227 # define LDBL80_WORDS(exponent,manthi,mantlo) \
21228 { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
21229 ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \
21230 (unsigned int) (mantlo) << 16 \
21231 }
21232 # else
21233 # define LDBL80_WORDS(exponent,manthi,mantlo) \
21234 { mantlo, manthi, exponent }
21235 # endif
21236 { /* Quiet NaN. */
21237 static memory_long_double x =
21238 { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
21239 if (!isnanl (x.value))
21240 result |= 2;
21241 }
21242 {
21243 /* Signalling NaN. */
21244 static memory_long_double x =
21245 { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
21246 if (!isnanl (x.value))
21247 result |= 2;
21248 }
21249 /* isnanl should return something even for noncanonical values. */
21250 { /* Pseudo-NaN. */
21251 static memory_long_double x =
21252 { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
21253 if (isnanl (x.value) && !isnanl (x.value))
21254 result |= 4;
21255 }
21256 { /* Pseudo-Infinity. */
21257 static memory_long_double x =
21258 { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
21259 if (isnanl (x.value) && !isnanl (x.value))
21260 result |= 8;
21261 }
21262 { /* Pseudo-Zero. */
21263 static memory_long_double x =
21264 { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
21265 if (isnanl (x.value) && !isnanl (x.value))
21266 result |= 16;
21267 }
21268 { /* Unnormalized number. */
21269 static memory_long_double x =
21270 { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
21271 if (isnanl (x.value) && !isnanl (x.value))
21272 result |= 32;
21273 }
21274 { /* Pseudo-Denormal. */
21275 static memory_long_double x =
21276 { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
21277 if (isnanl (x.value) && !isnanl (x.value))
21278 result |= 64;
21279 }
21280 #endif
21281
21282 return result;
21283 }
21284 _ACEOF
21285 if ac_fn_c_try_run "$LINENO"; then :
21286 gl_cv_func_isnanl_works=yes
21287 else
21288 gl_cv_func_isnanl_works=no
21289 fi
21290 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21291 conftest.$ac_objext conftest.beam conftest.$ac_ext
21292 fi
21293
21294
21295 fi
21296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
21297 $as_echo "$gl_cv_func_isnanl_works" >&6; }
21298
21299 case "$gl_cv_func_isnanl_works" in
21300 *yes) ;;
21301 *) gl_func_isnanl_no_libm=no ;;
21302 esac
21303 fi
21304 if test $gl_func_isnanl_no_libm = yes; then
21305
21306 $as_echo "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h
21307
21308 fi
21309
21310 if test $gl_func_isnanl_no_libm != yes; then
21311
21312
21313
21314
21315
21316
21317
21318
21319 gl_LIBOBJS="$gl_LIBOBJS isnanl.$ac_objext"
21320
21321
21322
21323
21324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
21325 $as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
21326 if ${gl_cv_cc_long_double_expbit0+:} false; then :
21327 $as_echo_n "(cached) " >&6
21328 else
21329
21330 if test "$cross_compiling" = yes; then :
21331
21332 gl_cv_cc_long_double_expbit0="unknown"
21333
21334 else
21335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21336 /* end confdefs.h. */
21337
21338 #include <float.h>
21339 #include <stddef.h>
21340 #include <stdio.h>
21341 #include <string.h>
21342 #define NWORDS \
21343 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
21344 typedef union { long double value; unsigned int word[NWORDS]; }
21345 memory_long_double;
21346 static unsigned int ored_words[NWORDS];
21347 static unsigned int anded_words[NWORDS];
21348 static void add_to_ored_words (long double x)
21349 {
21350 memory_long_double m;
21351 size_t i;
21352 /* Clear it first, in case
21353 sizeof (long double) < sizeof (memory_long_double). */
21354 memset (&m, 0, sizeof (memory_long_double));
21355 m.value = x;
21356 for (i = 0; i < NWORDS; i++)
21357 {
21358 ored_words[i] |= m.word[i];
21359 anded_words[i] &= m.word[i];
21360 }
21361 }
21362 int main ()
21363 {
21364 size_t j;
21365 FILE *fp = fopen ("conftest.out", "w");
21366 if (fp == NULL)
21367 return 1;
21368 for (j = 0; j < NWORDS; j++)
21369 anded_words[j] = ~ (unsigned int) 0;
21370 add_to_ored_words (0.25L);
21371 add_to_ored_words (0.5L);
21372 add_to_ored_words (1.0L);
21373 add_to_ored_words (2.0L);
21374 add_to_ored_words (4.0L);
21375 /* Remove bits that are common (e.g. if representation of the first mantissa
21376 bit is explicit). */
21377 for (j = 0; j < NWORDS; j++)
21378 ored_words[j] &= ~anded_words[j];
21379 /* Now find the nonzero word. */
21380 for (j = 0; j < NWORDS; j++)
21381 if (ored_words[j] != 0)
21382 break;
21383 if (j < NWORDS)
21384 {
21385 size_t i;
21386 for (i = j + 1; i < NWORDS; i++)
21387 if (ored_words[i] != 0)
21388 {
21389 fprintf (fp, "unknown");
21390 return (fclose (fp) != 0);
21391 }
21392 for (i = 0; ; i++)
21393 if ((ored_words[j] >> i) & 1)
21394 {
21395 fprintf (fp, "word %d bit %d", (int) j, (int) i);
21396 return (fclose (fp) != 0);
21397 }
21398 }
21399 fprintf (fp, "unknown");
21400 return (fclose (fp) != 0);
21401 }
21402
21403 _ACEOF
21404 if ac_fn_c_try_run "$LINENO"; then :
21405 gl_cv_cc_long_double_expbit0=`cat conftest.out`
21406 else
21407 gl_cv_cc_long_double_expbit0="unknown"
21408 fi
21409 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21410 conftest.$ac_objext conftest.beam conftest.$ac_ext
21411 fi
21412
21413 rm -f conftest.out
21414
21415 fi
21416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
21417 $as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
21418 case "$gl_cv_cc_long_double_expbit0" in
21419 word*bit*)
21420 word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
21421 bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
21422
21423 cat >>confdefs.h <<_ACEOF
21424 #define LDBL_EXPBIT0_WORD $word
21425 _ACEOF
21426
21427
21428 cat >>confdefs.h <<_ACEOF
21429 #define LDBL_EXPBIT0_BIT $bit
21430 _ACEOF
21431
21432 ;;
21433 esac
21434
21435
21436
21437 fi
21438
21439
21440
21441
21442
21443
21444 :
21445
21446
21447
21448
21449
21450
21451
21452
21453
21454 LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
21455
21456
21457
21458 if test "$gl_threads_api" = posix; then
21459 # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
21460 # pthread_rwlock_* functions.
21461 ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
21462 "
21463 if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then :
21464
21465 $as_echo "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
21466
21467 fi
21468
21469 # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
21470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21471 /* end confdefs.h. */
21472
21473 #include <pthread.h>
21474 int
21475 main ()
21476 {
21477
21478 #if __FreeBSD__ == 4
21479 error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
21480 #elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \
21481 && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
21482 error "No, in Mac OS X < 10.7 recursive mutexes actually don't work."
21483 #else
21484 int x = (int)PTHREAD_MUTEX_RECURSIVE;
21485 return !x;
21486 #endif
21487
21488 ;
21489 return 0;
21490 }
21491 _ACEOF
21492 if ac_fn_c_try_compile "$LINENO"; then :
21493
21494 $as_echo "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h
21495
21496 fi
21497 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21498 fi
21499 :
21500
21501
21502
21503 cat >>confdefs.h <<_ACEOF
21504 #define GNULIB_LOCK 1
21505 _ACEOF
21506
21507
21508
21509
21510
21511 :
21512
21513
21514
21515
21516
21517 if test $ac_cv_func_lstat = yes; then
21518
21519 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
21520 *no)
21521 REPLACE_LSTAT=1
21522 ;;
21523 esac
21524 else
21525 HAVE_LSTAT=0
21526 fi
21527
21528 if test $REPLACE_LSTAT = 1; then
21529
21530
21531
21532
21533
21534
21535
21536
21537 gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
21538
21539 :
21540 fi
21541
21542
21543
21544
21545
21546 GNULIB_LSTAT=1
21547
21548
21549
21550
21551
21552 $as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
21553
21554
21555
21556
21557
21558
21559 if test $gl_cv_func_malloc_posix = yes; then
21560
21561 $as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
21562
21563 else
21564 REPLACE_MALLOC=1
21565 fi
21566
21567 if test $REPLACE_MALLOC = 1; then
21568
21569
21570
21571
21572
21573
21574
21575
21576 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
21577
21578 fi
21579
21580
21581
21582
21583
21584 GNULIB_MALLOC_POSIX=1
21585
21586
21587
21588
21589
21590 $as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
21591
21592
21593
21594
21595
21596
21597
21598
21599
21600
21601
21602
21603
21604
21605
21606 :
21607
21608
21609
21610
21611
21612
21613
21614
21615 if test $gl_cv_have_include_next = yes; then
21616 gl_cv_next_math_h='<'math.h'>'
21617 else
21618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
21619 $as_echo_n "checking absolute name of <math.h>... " >&6; }
21620 if ${gl_cv_next_math_h+:} false; then :
21621 $as_echo_n "(cached) " >&6
21622 else
21623
21624 if test $ac_cv_header_math_h = yes; then
21625
21626
21627
21628
21629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21630 /* end confdefs.h. */
21631 #include <math.h>
21632 _ACEOF
21633 case "$host_os" in
21634 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21635 *) gl_absname_cpp="$ac_cpp" ;;
21636 esac
21637
21638 case "$host_os" in
21639 mingw*)
21640 gl_dirsep_regex='[/\\]'
21641 ;;
21642 *)
21643 gl_dirsep_regex='\/'
21644 ;;
21645 esac
21646 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21647 gl_header_literal_regex=`echo 'math.h' \
21648 | sed -e "$gl_make_literal_regex_sed"`
21649 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21650 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21651 s|^/[^/]|//&|
21652 p
21653 q
21654 }'
21655
21656 gl_cv_absolute_math_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21657 sed -n "$gl_absolute_header_sed"`
21658
21659 gl_header=$gl_cv_absolute_math_h
21660 gl_cv_next_math_h='"'$gl_header'"'
21661 else
21662 gl_cv_next_math_h='<'math.h'>'
21663 fi
21664
21665
21666 fi
21667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
21668 $as_echo "$gl_cv_next_math_h" >&6; }
21669 fi
21670 NEXT_MATH_H=$gl_cv_next_math_h
21671
21672 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21673 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21674 gl_next_as_first_directive='<'math.h'>'
21675 else
21676 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21677 gl_next_as_first_directive=$gl_cv_next_math_h
21678 fi
21679 NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive
21680
21681
21682
21683
21684
21685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
21686 $as_echo_n "checking whether NAN macro works... " >&6; }
21687 if ${gl_cv_header_math_nan_works+:} false; then :
21688 $as_echo_n "(cached) " >&6
21689 else
21690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21691 /* end confdefs.h. */
21692 #include <math.h>
21693 int
21694 main ()
21695 {
21696 /* Solaris 10 has a broken definition of NAN. Other platforms
21697 fail to provide NAN, or provide it only in C99 mode; this
21698 test only needs to fail when NAN is provided but wrong. */
21699 float f = 1.0f;
21700 #ifdef NAN
21701 f = NAN;
21702 #endif
21703 return f == 0;
21704 ;
21705 return 0;
21706 }
21707 _ACEOF
21708 if ac_fn_c_try_compile "$LINENO"; then :
21709 gl_cv_header_math_nan_works=yes
21710 else
21711 gl_cv_header_math_nan_works=no
21712 fi
21713 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21714 fi
21715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5
21716 $as_echo "$gl_cv_header_math_nan_works" >&6; }
21717 if test $gl_cv_header_math_nan_works = no; then
21718 REPLACE_NAN=1
21719 fi
21720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
21721 $as_echo_n "checking whether HUGE_VAL works... " >&6; }
21722 if ${gl_cv_header_math_huge_val_works+:} false; then :
21723 $as_echo_n "(cached) " >&6
21724 else
21725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21726 /* end confdefs.h. */
21727 #include <math.h>
21728 int
21729 main ()
21730 {
21731 /* Solaris 10 has a broken definition of HUGE_VAL. */
21732 double d = HUGE_VAL;
21733 return d == 0;
21734 ;
21735 return 0;
21736 }
21737 _ACEOF
21738 if ac_fn_c_try_compile "$LINENO"; then :
21739 gl_cv_header_math_huge_val_works=yes
21740 else
21741 gl_cv_header_math_huge_val_works=no
21742 fi
21743 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21744 fi
21745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5
21746 $as_echo "$gl_cv_header_math_huge_val_works" >&6; }
21747 if test $gl_cv_header_math_huge_val_works = no; then
21748 REPLACE_HUGE_VAL=1
21749 fi
21750
21751
21752 for gl_func in acosf acosl asinf asinl atanf atanl cbrt cbrtf cbrtl ceilf ceill copysign copysignf copysignl cosf cosl coshf expf expl exp2 exp2f exp2l expm1 expm1f expm1l fabsf fabsl floorf floorl fma fmaf fmal fmod fmodf fmodl frexpf frexpl hypotf hypotl ilogb ilogbf ilogbl ldexpf ldexpl log logf logl log10 log10f log10l log1p log1pf log1pl log2 log2f log2l logb logbf logbl modf modff modfl powf remainder remainderf remainderl rint rintf rintl round roundf roundl sinf sinl sinhf sqrtf sqrtl tanf tanl tanhf trunc truncf truncl; do
21753 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
21754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
21755 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
21756 if eval \${$as_gl_Symbol+:} false; then :
21757 $as_echo_n "(cached) " >&6
21758 else
21759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21760 /* end confdefs.h. */
21761 #include <math.h>
21762 int
21763 main ()
21764 {
21765 #undef $gl_func
21766 (void) $gl_func;
21767 ;
21768 return 0;
21769 }
21770 _ACEOF
21771 if ac_fn_c_try_compile "$LINENO"; then :
21772 eval "$as_gl_Symbol=yes"
21773 else
21774 eval "$as_gl_Symbol=no"
21775 fi
21776 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21777 fi
21778 eval ac_res=\$$as_gl_Symbol
21779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
21780 $as_echo "$ac_res" >&6; }
21781 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
21782 cat >>confdefs.h <<_ACEOF
21783 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
21784 _ACEOF
21785
21786 eval ac_cv_have_decl_$gl_func=yes
21787 fi
21788 done
21789
21790
21791
21792
21793
21794
21795
21796
21797
21798
21799
21800 :
21801
21802
21803
21804
21805
21806
21807 :
21808
21809
21810
21811
21812
21813 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
21814
21815
21816
21817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
21818 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
21819 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
21820 $as_echo_n "(cached) " >&6
21821 else
21822
21823 case "$host_os" in
21824 # Guess no on AIX and OSF/1.
21825 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
21826 # Guess yes otherwise.
21827 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
21828 esac
21829 if test $LOCALE_JA != none; then
21830 if test "$cross_compiling" = yes; then :
21831 :
21832 else
21833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21834 /* end confdefs.h. */
21835
21836 #include <locale.h>
21837 #include <string.h>
21838 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21839 <wchar.h>.
21840 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21841 included before <wchar.h>. */
21842 #include <stddef.h>
21843 #include <stdio.h>
21844 #include <time.h>
21845 #include <wchar.h>
21846 int main ()
21847 {
21848 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
21849 {
21850 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
21851 mbstate_t state;
21852 wchar_t wc;
21853
21854 memset (&state, '\0', sizeof (mbstate_t));
21855 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
21856 if (mbsinit (&state))
21857 return 1;
21858 }
21859 return 0;
21860 }
21861 _ACEOF
21862 if ac_fn_c_try_run "$LINENO"; then :
21863 gl_cv_func_mbrtowc_incomplete_state=yes
21864 else
21865 gl_cv_func_mbrtowc_incomplete_state=no
21866 fi
21867 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21868 conftest.$ac_objext conftest.beam conftest.$ac_ext
21869 fi
21870
21871 fi
21872
21873 fi
21874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
21875 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
21876
21877
21878
21879
21880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
21881 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
21882 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
21883 $as_echo_n "(cached) " >&6
21884 else
21885
21886 case "$host_os" in
21887 # Guess no on Solaris 8.
21888 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
21889 # Guess yes otherwise.
21890 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
21891 esac
21892 if test $LOCALE_ZH_CN != none; then
21893 if test "$cross_compiling" = yes; then :
21894 :
21895 else
21896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21897 /* end confdefs.h. */
21898
21899 #include <locale.h>
21900 #include <stdlib.h>
21901 #include <string.h>
21902 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21903 <wchar.h>.
21904 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21905 included before <wchar.h>. */
21906 #include <stddef.h>
21907 #include <stdio.h>
21908 #include <time.h>
21909 #include <wchar.h>
21910 int main ()
21911 {
21912 /* This fails on Solaris 8:
21913 mbrtowc returns 2, and sets wc to 0x00F0.
21914 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
21915 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
21916 {
21917 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
21918 mbstate_t state;
21919 wchar_t wc;
21920
21921 memset (&state, '\0', sizeof (mbstate_t));
21922 if (mbrtowc (&wc, input + 3, 6, &state) != 4
21923 && mbtowc (&wc, input + 3, 6) == 4)
21924 return 1;
21925 }
21926 return 0;
21927 }
21928 _ACEOF
21929 if ac_fn_c_try_run "$LINENO"; then :
21930 gl_cv_func_mbrtowc_sanitycheck=yes
21931 else
21932 gl_cv_func_mbrtowc_sanitycheck=no
21933 fi
21934 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21935 conftest.$ac_objext conftest.beam conftest.$ac_ext
21936 fi
21937
21938 fi
21939
21940 fi
21941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
21942 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
21943
21944 REPLACE_MBSTATE_T=0
21945 case "$gl_cv_func_mbrtowc_incomplete_state" in
21946 *yes) ;;
21947 *) REPLACE_MBSTATE_T=1 ;;
21948 esac
21949 case "$gl_cv_func_mbrtowc_sanitycheck" in
21950 *yes) ;;
21951 *) REPLACE_MBSTATE_T=1 ;;
21952 esac
21953 else
21954 REPLACE_MBSTATE_T=1
21955 fi
21956
21957
21958
21959 :
21960
21961
21962
21963
21964
21965 if test $ac_cv_func_mbrtowc = no; then
21966 HAVE_MBRTOWC=0
21967 ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
21968 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21969 <wchar.h>.
21970 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21971 included before <wchar.h>. */
21972 #include <stddef.h>
21973 #include <stdio.h>
21974 #include <time.h>
21975 #include <wchar.h>
21976
21977 "
21978 if test "x$ac_cv_have_decl_mbrtowc" = xyes; then :
21979 ac_have_decl=1
21980 else
21981 ac_have_decl=0
21982 fi
21983
21984 cat >>confdefs.h <<_ACEOF
21985 #define HAVE_DECL_MBRTOWC $ac_have_decl
21986 _ACEOF
21987
21988 if test $ac_cv_have_decl_mbrtowc = yes; then
21989 REPLACE_MBRTOWC=1
21990 fi
21991 else
21992 if test $REPLACE_MBSTATE_T = 1; then
21993 REPLACE_MBRTOWC=1
21994 else
21995
21996
21997
21998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
21999 $as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
22000 if ${gl_cv_func_mbrtowc_null_arg1+:} false; then :
22001 $as_echo_n "(cached) " >&6
22002 else
22003
22004 case "$host_os" in
22005 # Guess no on Solaris.
22006 solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
22007 # Guess yes otherwise.
22008 *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
22009 esac
22010 if test $LOCALE_FR_UTF8 != none; then
22011 if test "$cross_compiling" = yes; then :
22012 :
22013 else
22014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22015 /* end confdefs.h. */
22016
22017 #include <locale.h>
22018 #include <stdlib.h>
22019 #include <string.h>
22020 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22021 <wchar.h>.
22022 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22023 included before <wchar.h>. */
22024 #include <stddef.h>
22025 #include <stdio.h>
22026 #include <time.h>
22027 #include <wchar.h>
22028 int main ()
22029 {
22030 int result = 0;
22031
22032 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
22033 {
22034 char input[] = "\303\237er";
22035 mbstate_t state;
22036 wchar_t wc;
22037 size_t ret;
22038
22039 memset (&state, '\0', sizeof (mbstate_t));
22040 wc = (wchar_t) 0xBADFACE;
22041 ret = mbrtowc (&wc, input, 5, &state);
22042 if (ret != 2)
22043 result |= 1;
22044 if (!mbsinit (&state))
22045 result |= 2;
22046
22047 memset (&state, '\0', sizeof (mbstate_t));
22048 ret = mbrtowc (NULL, input, 5, &state);
22049 if (ret != 2) /* Solaris 7 fails here: ret is -1. */
22050 result |= 4;
22051 if (!mbsinit (&state))
22052 result |= 8;
22053 }
22054 return result;
22055 }
22056 _ACEOF
22057 if ac_fn_c_try_run "$LINENO"; then :
22058 gl_cv_func_mbrtowc_null_arg1=yes
22059 else
22060 gl_cv_func_mbrtowc_null_arg1=no
22061 fi
22062 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22063 conftest.$ac_objext conftest.beam conftest.$ac_ext
22064 fi
22065
22066 fi
22067
22068 fi
22069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
22070 $as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; }
22071
22072
22073
22074
22075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
22076 $as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
22077 if ${gl_cv_func_mbrtowc_null_arg2+:} false; then :
22078 $as_echo_n "(cached) " >&6
22079 else
22080
22081 case "$host_os" in
22082 # Guess no on OSF/1.
22083 osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
22084 # Guess yes otherwise.
22085 *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
22086 esac
22087 if test $LOCALE_FR_UTF8 != none; then
22088 if test "$cross_compiling" = yes; then :
22089 :
22090 else
22091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22092 /* end confdefs.h. */
22093
22094 #include <locale.h>
22095 #include <string.h>
22096 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22097 <wchar.h>.
22098 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22099 included before <wchar.h>. */
22100 #include <stddef.h>
22101 #include <stdio.h>
22102 #include <time.h>
22103 #include <wchar.h>
22104 int main ()
22105 {
22106 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
22107 {
22108 mbstate_t state;
22109 wchar_t wc;
22110 int ret;
22111
22112 memset (&state, '\0', sizeof (mbstate_t));
22113 wc = (wchar_t) 0xBADFACE;
22114 mbrtowc (&wc, NULL, 5, &state);
22115 /* Check that wc was not modified. */
22116 if (wc != (wchar_t) 0xBADFACE)
22117 return 1;
22118 }
22119 return 0;
22120 }
22121 _ACEOF
22122 if ac_fn_c_try_run "$LINENO"; then :
22123 gl_cv_func_mbrtowc_null_arg2=yes
22124 else
22125 gl_cv_func_mbrtowc_null_arg2=no
22126 fi
22127 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22128 conftest.$ac_objext conftest.beam conftest.$ac_ext
22129 fi
22130
22131 fi
22132
22133 fi
22134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
22135 $as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; }
22136
22137
22138
22139
22140
22141
22142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
22143 $as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
22144 if ${gl_cv_func_mbrtowc_retval+:} false; then :
22145 $as_echo_n "(cached) " >&6
22146 else
22147
22148 case "$host_os" in
22149 # Guess no on HP-UX, Solaris, native Windows.
22150 hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
22151 # Guess yes otherwise.
22152 *) gl_cv_func_mbrtowc_retval="guessing yes" ;;
22153 esac
22154 if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
22155 || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
22156 if test "$cross_compiling" = yes; then :
22157 :
22158 else
22159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22160 /* end confdefs.h. */
22161
22162 #include <locale.h>
22163 #include <string.h>
22164 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22165 <wchar.h>.
22166 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22167 included before <wchar.h>. */
22168 #include <stddef.h>
22169 #include <stdio.h>
22170 #include <time.h>
22171 #include <wchar.h>
22172 int main ()
22173 {
22174 int result = 0;
22175 int found_some_locale = 0;
22176 /* This fails on Solaris. */
22177 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
22178 {
22179 char input[] = "B\303\274\303\237er"; /* "Büßer" */
22180 mbstate_t state;
22181 wchar_t wc;
22182
22183 memset (&state, '\0', sizeof (mbstate_t));
22184 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
22185 {
22186 input[1] = '\0';
22187 if (mbrtowc (&wc, input + 2, 5, &state) != 1)
22188 result |= 1;
22189 }
22190 found_some_locale = 1;
22191 }
22192 /* This fails on HP-UX 11.11. */
22193 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
22194 {
22195 char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
22196 mbstate_t state;
22197 wchar_t wc;
22198
22199 memset (&state, '\0', sizeof (mbstate_t));
22200 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
22201 {
22202 input[1] = '\0';
22203 if (mbrtowc (&wc, input + 2, 5, &state) != 2)
22204 result |= 2;
22205 }
22206 found_some_locale = 1;
22207 }
22208 /* This fails on native Windows. */
22209 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
22210 {
22211 char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
22212 mbstate_t state;
22213 wchar_t wc;
22214
22215 memset (&state, '\0', sizeof (mbstate_t));
22216 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
22217 {
22218 input[3] = '\0';
22219 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
22220 result |= 4;
22221 }
22222 found_some_locale = 1;
22223 }
22224 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
22225 {
22226 char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
22227 mbstate_t state;
22228 wchar_t wc;
22229
22230 memset (&state, '\0', sizeof (mbstate_t));
22231 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
22232 {
22233 input[3] = '\0';
22234 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
22235 result |= 8;
22236 }
22237 found_some_locale = 1;
22238 }
22239 if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
22240 {
22241 char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
22242 mbstate_t state;
22243 wchar_t wc;
22244
22245 memset (&state, '\0', sizeof (mbstate_t));
22246 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
22247 {
22248 input[3] = '\0';
22249 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
22250 result |= 16;
22251 }
22252 found_some_locale = 1;
22253 }
22254 return (found_some_locale ? result : 77);
22255 }
22256 _ACEOF
22257 if ac_fn_c_try_run "$LINENO"; then :
22258 gl_cv_func_mbrtowc_retval=yes
22259 else
22260 if test $? != 77; then
22261 gl_cv_func_mbrtowc_retval=no
22262 fi
22263
22264 fi
22265 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22266 conftest.$ac_objext conftest.beam conftest.$ac_ext
22267 fi
22268
22269 fi
22270
22271 fi
22272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
22273 $as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
22274
22275
22276
22277
22278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
22279 $as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
22280 if ${gl_cv_func_mbrtowc_nul_retval+:} false; then :
22281 $as_echo_n "(cached) " >&6
22282 else
22283
22284 case "$host_os" in
22285 # Guess no on Solaris 8 and 9.
22286 solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
22287 # Guess yes otherwise.
22288 *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
22289 esac
22290 if test $LOCALE_ZH_CN != none; then
22291 if test "$cross_compiling" = yes; then :
22292 :
22293 else
22294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22295 /* end confdefs.h. */
22296
22297 #include <locale.h>
22298 #include <string.h>
22299 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22300 <wchar.h>.
22301 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22302 included before <wchar.h>. */
22303 #include <stddef.h>
22304 #include <stdio.h>
22305 #include <time.h>
22306 #include <wchar.h>
22307 int main ()
22308 {
22309 /* This fails on Solaris 8 and 9. */
22310 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
22311 {
22312 mbstate_t state;
22313 wchar_t wc;
22314
22315 memset (&state, '\0', sizeof (mbstate_t));
22316 if (mbrtowc (&wc, "", 1, &state) != 0)
22317 return 1;
22318 }
22319 return 0;
22320 }
22321 _ACEOF
22322 if ac_fn_c_try_run "$LINENO"; then :
22323 gl_cv_func_mbrtowc_nul_retval=yes
22324 else
22325 gl_cv_func_mbrtowc_nul_retval=no
22326 fi
22327 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22328 conftest.$ac_objext conftest.beam conftest.$ac_ext
22329 fi
22330
22331 fi
22332
22333 fi
22334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
22335 $as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
22336
22337
22338
22339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5
22340 $as_echo_n "checking whether mbrtowc works on empty input... " >&6; }
22341 if ${gl_cv_func_mbrtowc_empty_input+:} false; then :
22342 $as_echo_n "(cached) " >&6
22343 else
22344
22345 case "$host_os" in
22346 # Guess no on AIX and glibc systems.
22347 aix* | *-gnu*)
22348 gl_cv_func_mbrtowc_empty_input="guessing no" ;;
22349 *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
22350 esac
22351 if test "$cross_compiling" = yes; then :
22352 :
22353 else
22354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22355 /* end confdefs.h. */
22356
22357 #include <wchar.h>
22358 static wchar_t wc;
22359 static mbstate_t mbs;
22360 int
22361 main (void)
22362 {
22363 return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
22364 }
22365 _ACEOF
22366 if ac_fn_c_try_run "$LINENO"; then :
22367 gl_cv_func_mbrtowc_empty_input=yes
22368 else
22369 gl_cv_func_mbrtowc_empty_input=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
22376 fi
22377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5
22378 $as_echo "$gl_cv_func_mbrtowc_empty_input" >&6; }
22379
22380
22381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
22382 $as_echo_n "checking whether the C locale is free of encoding errors... " >&6; }
22383 if ${gl_cv_C_locale_sans_EILSEQ+:} false; then :
22384 $as_echo_n "(cached) " >&6
22385 else
22386
22387 gl_cv_C_locale_sans_EILSEQ="guessing no"
22388
22389 if test "$cross_compiling" = yes; then :
22390 :
22391 else
22392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22393 /* end confdefs.h. */
22394 #include <limits.h>
22395 #include <locale.h>
22396 #include <wchar.h>
22397
22398 int
22399 main ()
22400 {
22401
22402 int i;
22403 char *locale = setlocale (LC_ALL, "C");
22404 if (! locale)
22405 return 1;
22406 for (i = CHAR_MIN; i <= CHAR_MAX; i++)
22407 {
22408 char c = i;
22409 wchar_t wc;
22410 mbstate_t mbs = { 0, };
22411 size_t ss = mbrtowc (&wc, &c, 1, &mbs);
22412 if (1 < ss)
22413 return 1;
22414 }
22415 return 0;
22416
22417 ;
22418 return 0;
22419 }
22420 _ACEOF
22421 if ac_fn_c_try_run "$LINENO"; then :
22422 gl_cv_C_locale_sans_EILSEQ=yes
22423 else
22424 gl_cv_C_locale_sans_EILSEQ=no
22425 fi
22426 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22427 conftest.$ac_objext conftest.beam conftest.$ac_ext
22428 fi
22429
22430 fi
22431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_C_locale_sans_EILSEQ" >&5
22432 $as_echo "$gl_cv_C_locale_sans_EILSEQ" >&6; }
22433
22434 case "$gl_cv_func_mbrtowc_null_arg1" in
22435 *yes) ;;
22436 *)
22437 $as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
22438
22439 REPLACE_MBRTOWC=1
22440 ;;
22441 esac
22442 case "$gl_cv_func_mbrtowc_null_arg2" in
22443 *yes) ;;
22444 *)
22445 $as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
22446
22447 REPLACE_MBRTOWC=1
22448 ;;
22449 esac
22450 case "$gl_cv_func_mbrtowc_retval" in
22451 *yes) ;;
22452 *)
22453 $as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
22454
22455 REPLACE_MBRTOWC=1
22456 ;;
22457 esac
22458 case "$gl_cv_func_mbrtowc_nul_retval" in
22459 *yes) ;;
22460 *)
22461 $as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
22462
22463 REPLACE_MBRTOWC=1
22464 ;;
22465 esac
22466 case "$gl_cv_func_mbrtowc_empty_input" in
22467 *yes) ;;
22468 *)
22469 $as_echo "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h
22470
22471 REPLACE_MBRTOWC=1
22472 ;;
22473 esac
22474 case $gl_cv_C_locale_sans_EILSEQ in
22475 *yes) ;;
22476 *)
22477 $as_echo "#define C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
22478
22479 REPLACE_MBRTOWC=1
22480 ;;
22481 esac
22482 fi
22483 fi
22484
22485 if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
22486
22487
22488
22489
22490
22491
22492
22493
22494 gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
22495
22496
22497 :
22498
22499 fi
22500
22501
22502
22503
22504
22505 GNULIB_MBRTOWC=1
22506
22507
22508
22509
22510
22511 $as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
22512
22513
22514
22515
22516
22517
22518
22519
22520
22521
22522
22523
22524
22525 :
22526
22527
22528
22529
22530
22531
22532 :
22533
22534
22535
22536
22537
22538 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
22539
22540
22541
22542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
22543 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
22544 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
22545 $as_echo_n "(cached) " >&6
22546 else
22547
22548 case "$host_os" in
22549 # Guess no on AIX and OSF/1.
22550 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
22551 # Guess yes otherwise.
22552 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
22553 esac
22554 if test $LOCALE_JA != none; then
22555 if test "$cross_compiling" = yes; then :
22556 :
22557 else
22558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22559 /* end confdefs.h. */
22560
22561 #include <locale.h>
22562 #include <string.h>
22563 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22564 <wchar.h>.
22565 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22566 included before <wchar.h>. */
22567 #include <stddef.h>
22568 #include <stdio.h>
22569 #include <time.h>
22570 #include <wchar.h>
22571 int main ()
22572 {
22573 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
22574 {
22575 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
22576 mbstate_t state;
22577 wchar_t wc;
22578
22579 memset (&state, '\0', sizeof (mbstate_t));
22580 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
22581 if (mbsinit (&state))
22582 return 1;
22583 }
22584 return 0;
22585 }
22586 _ACEOF
22587 if ac_fn_c_try_run "$LINENO"; then :
22588 gl_cv_func_mbrtowc_incomplete_state=yes
22589 else
22590 gl_cv_func_mbrtowc_incomplete_state=no
22591 fi
22592 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22593 conftest.$ac_objext conftest.beam conftest.$ac_ext
22594 fi
22595
22596 fi
22597
22598 fi
22599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
22600 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
22601
22602
22603
22604
22605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
22606 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
22607 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
22608 $as_echo_n "(cached) " >&6
22609 else
22610
22611 case "$host_os" in
22612 # Guess no on Solaris 8.
22613 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
22614 # Guess yes otherwise.
22615 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
22616 esac
22617 if test $LOCALE_ZH_CN != none; then
22618 if test "$cross_compiling" = yes; then :
22619 :
22620 else
22621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22622 /* end confdefs.h. */
22623
22624 #include <locale.h>
22625 #include <stdlib.h>
22626 #include <string.h>
22627 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22628 <wchar.h>.
22629 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22630 included before <wchar.h>. */
22631 #include <stddef.h>
22632 #include <stdio.h>
22633 #include <time.h>
22634 #include <wchar.h>
22635 int main ()
22636 {
22637 /* This fails on Solaris 8:
22638 mbrtowc returns 2, and sets wc to 0x00F0.
22639 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
22640 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
22641 {
22642 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
22643 mbstate_t state;
22644 wchar_t wc;
22645
22646 memset (&state, '\0', sizeof (mbstate_t));
22647 if (mbrtowc (&wc, input + 3, 6, &state) != 4
22648 && mbtowc (&wc, input + 3, 6) == 4)
22649 return 1;
22650 }
22651 return 0;
22652 }
22653 _ACEOF
22654 if ac_fn_c_try_run "$LINENO"; then :
22655 gl_cv_func_mbrtowc_sanitycheck=yes
22656 else
22657 gl_cv_func_mbrtowc_sanitycheck=no
22658 fi
22659 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22660 conftest.$ac_objext conftest.beam conftest.$ac_ext
22661 fi
22662
22663 fi
22664
22665 fi
22666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
22667 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
22668
22669 REPLACE_MBSTATE_T=0
22670 case "$gl_cv_func_mbrtowc_incomplete_state" in
22671 *yes) ;;
22672 *) REPLACE_MBSTATE_T=1 ;;
22673 esac
22674 case "$gl_cv_func_mbrtowc_sanitycheck" in
22675 *yes) ;;
22676 *) REPLACE_MBSTATE_T=1 ;;
22677 esac
22678 else
22679 REPLACE_MBSTATE_T=1
22680 fi
22681
22682
22683
22684 :
22685
22686
22687
22688
22689
22690 if test $ac_cv_func_mbsinit = no; then
22691 HAVE_MBSINIT=0
22692 ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
22693 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22694 <wchar.h>.
22695 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22696 included before <wchar.h>. */
22697 #include <stddef.h>
22698 #include <stdio.h>
22699 #include <time.h>
22700 #include <wchar.h>
22701
22702 "
22703 if test "x$ac_cv_have_decl_mbsinit" = xyes; then :
22704 ac_have_decl=1
22705 else
22706 ac_have_decl=0
22707 fi
22708
22709 cat >>confdefs.h <<_ACEOF
22710 #define HAVE_DECL_MBSINIT $ac_have_decl
22711 _ACEOF
22712
22713 if test $ac_cv_have_decl_mbsinit = yes; then
22714 REPLACE_MBSINIT=1
22715 fi
22716 else
22717 if test $REPLACE_MBSTATE_T = 1; then
22718 REPLACE_MBSINIT=1
22719 else
22720 case "$host_os" in
22721 mingw*) REPLACE_MBSINIT=1 ;;
22722 esac
22723 fi
22724 fi
22725
22726 if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
22727
22728
22729
22730
22731
22732
22733
22734
22735 gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
22736
22737
22738 :
22739
22740 fi
22741
22742
22743
22744
22745
22746 GNULIB_MBSINIT=1
22747
22748
22749
22750
22751
22752 $as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
22753
22754
22755
22756
22757
22758
22759
22760
22761
22762
22763
22764
22765 :
22766
22767
22768
22769
22770
22771
22772 :
22773
22774
22775
22776
22777
22778 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
22779
22780
22781
22782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
22783 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
22784 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
22785 $as_echo_n "(cached) " >&6
22786 else
22787
22788 case "$host_os" in
22789 # Guess no on AIX and OSF/1.
22790 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
22791 # Guess yes otherwise.
22792 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
22793 esac
22794 if test $LOCALE_JA != none; then
22795 if test "$cross_compiling" = yes; then :
22796 :
22797 else
22798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22799 /* end confdefs.h. */
22800
22801 #include <locale.h>
22802 #include <string.h>
22803 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22804 <wchar.h>.
22805 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22806 included before <wchar.h>. */
22807 #include <stddef.h>
22808 #include <stdio.h>
22809 #include <time.h>
22810 #include <wchar.h>
22811 int main ()
22812 {
22813 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
22814 {
22815 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
22816 mbstate_t state;
22817 wchar_t wc;
22818
22819 memset (&state, '\0', sizeof (mbstate_t));
22820 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
22821 if (mbsinit (&state))
22822 return 1;
22823 }
22824 return 0;
22825 }
22826 _ACEOF
22827 if ac_fn_c_try_run "$LINENO"; then :
22828 gl_cv_func_mbrtowc_incomplete_state=yes
22829 else
22830 gl_cv_func_mbrtowc_incomplete_state=no
22831 fi
22832 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22833 conftest.$ac_objext conftest.beam conftest.$ac_ext
22834 fi
22835
22836 fi
22837
22838 fi
22839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
22840 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
22841
22842
22843
22844
22845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
22846 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
22847 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
22848 $as_echo_n "(cached) " >&6
22849 else
22850
22851 case "$host_os" in
22852 # Guess no on Solaris 8.
22853 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
22854 # Guess yes otherwise.
22855 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
22856 esac
22857 if test $LOCALE_ZH_CN != none; then
22858 if test "$cross_compiling" = yes; then :
22859 :
22860 else
22861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22862 /* end confdefs.h. */
22863
22864 #include <locale.h>
22865 #include <stdlib.h>
22866 #include <string.h>
22867 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22868 <wchar.h>.
22869 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22870 included before <wchar.h>. */
22871 #include <stddef.h>
22872 #include <stdio.h>
22873 #include <time.h>
22874 #include <wchar.h>
22875 int main ()
22876 {
22877 /* This fails on Solaris 8:
22878 mbrtowc returns 2, and sets wc to 0x00F0.
22879 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
22880 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
22881 {
22882 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
22883 mbstate_t state;
22884 wchar_t wc;
22885
22886 memset (&state, '\0', sizeof (mbstate_t));
22887 if (mbrtowc (&wc, input + 3, 6, &state) != 4
22888 && mbtowc (&wc, input + 3, 6) == 4)
22889 return 1;
22890 }
22891 return 0;
22892 }
22893 _ACEOF
22894 if ac_fn_c_try_run "$LINENO"; then :
22895 gl_cv_func_mbrtowc_sanitycheck=yes
22896 else
22897 gl_cv_func_mbrtowc_sanitycheck=no
22898 fi
22899 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22900 conftest.$ac_objext conftest.beam conftest.$ac_ext
22901 fi
22902
22903 fi
22904
22905 fi
22906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
22907 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
22908
22909 REPLACE_MBSTATE_T=0
22910 case "$gl_cv_func_mbrtowc_incomplete_state" in
22911 *yes) ;;
22912 *) REPLACE_MBSTATE_T=1 ;;
22913 esac
22914 case "$gl_cv_func_mbrtowc_sanitycheck" in
22915 *yes) ;;
22916 *) REPLACE_MBSTATE_T=1 ;;
22917 esac
22918 else
22919 REPLACE_MBSTATE_T=1
22920 fi
22921
22922
22923
22924 :
22925
22926
22927
22928
22929
22930 if test $ac_cv_func_mbsrtowcs = no; then
22931 HAVE_MBSRTOWCS=0
22932 ac_fn_c_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" "
22933 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22934 <wchar.h>.
22935 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22936 included before <wchar.h>. */
22937 #include <stddef.h>
22938 #include <stdio.h>
22939 #include <time.h>
22940 #include <wchar.h>
22941
22942 "
22943 if test "x$ac_cv_have_decl_mbsrtowcs" = xyes; then :
22944 ac_have_decl=1
22945 else
22946 ac_have_decl=0
22947 fi
22948
22949 cat >>confdefs.h <<_ACEOF
22950 #define HAVE_DECL_MBSRTOWCS $ac_have_decl
22951 _ACEOF
22952
22953 if test $ac_cv_have_decl_mbsrtowcs = yes; then
22954 REPLACE_MBSRTOWCS=1
22955 fi
22956 else
22957 if test $REPLACE_MBSTATE_T = 1; then
22958 REPLACE_MBSRTOWCS=1
22959 else
22960
22961
22962
22963
22964
22965
22966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5
22967 $as_echo_n "checking whether mbsrtowcs works... " >&6; }
22968 if ${gl_cv_func_mbsrtowcs_works+:} false; then :
22969 $as_echo_n "(cached) " >&6
22970 else
22971
22972 case "$host_os" in
22973 # Guess no on HP-UX, Solaris, mingw.
22974 hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;;
22975 # Guess yes otherwise.
22976 *) gl_cv_func_mbsrtowcs_works="guessing yes" ;;
22977 esac
22978 if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
22979 if test "$cross_compiling" = yes; then :
22980 :
22981 else
22982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22983 /* end confdefs.h. */
22984
22985 #include <locale.h>
22986 #include <string.h>
22987 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22988 <wchar.h>.
22989 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22990 included before <wchar.h>. */
22991 #include <stddef.h>
22992 #include <stdio.h>
22993 #include <time.h>
22994 #include <wchar.h>
22995 int main ()
22996 {
22997 int result = 0;
22998 /* Test whether the function supports a NULL destination argument.
22999 This fails on native Windows. */
23000 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
23001 {
23002 const char input[] = "\337er";
23003 const char *src = input;
23004 mbstate_t state;
23005
23006 memset (&state, '\0', sizeof (mbstate_t));
23007 if (mbsrtowcs (NULL, &src, 1, &state) != 3
23008 || src != input)
23009 result |= 1;
23010 }
23011 /* Test whether the function works when started with a conversion state
23012 in non-initial state. This fails on HP-UX 11.11 and Solaris 10. */
23013 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
23014 {
23015 const char input[] = "B\303\274\303\237er";
23016 mbstate_t state;
23017
23018 memset (&state, '\0', sizeof (mbstate_t));
23019 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
23020 if (!mbsinit (&state))
23021 {
23022 const char *src = input + 2;
23023 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
23024 result |= 2;
23025 }
23026 }
23027 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
23028 {
23029 const char input[] = "<\306\374\313\334\270\354>";
23030 mbstate_t state;
23031
23032 memset (&state, '\0', sizeof (mbstate_t));
23033 if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2))
23034 if (!mbsinit (&state))
23035 {
23036 const char *src = input + 4;
23037 if (mbsrtowcs (NULL, &src, 10, &state) != 3)
23038 result |= 4;
23039 }
23040 }
23041 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
23042 {
23043 const char input[] = "B\250\271\201\060\211\070er";
23044 mbstate_t state;
23045
23046 memset (&state, '\0', sizeof (mbstate_t));
23047 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
23048 if (!mbsinit (&state))
23049 {
23050 const char *src = input + 2;
23051 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
23052 result |= 8;
23053 }
23054 }
23055 return result;
23056 }
23057 _ACEOF
23058 if ac_fn_c_try_run "$LINENO"; then :
23059 gl_cv_func_mbsrtowcs_works=yes
23060 else
23061 gl_cv_func_mbsrtowcs_works=no
23062 fi
23063 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23064 conftest.$ac_objext conftest.beam conftest.$ac_ext
23065 fi
23066
23067 fi
23068
23069 fi
23070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5
23071 $as_echo "$gl_cv_func_mbsrtowcs_works" >&6; }
23072
23073 case "$gl_cv_func_mbsrtowcs_works" in
23074 *yes) ;;
23075 *) REPLACE_MBSRTOWCS=1 ;;
23076 esac
23077 fi
23078 fi
23079
23080 if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
23081
23082
23083
23084
23085
23086
23087
23088
23089 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs.$ac_objext"
23090
23091
23092
23093
23094
23095
23096
23097
23098
23099 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext"
23100
23101
23102 :
23103
23104 fi
23105
23106
23107
23108
23109
23110 GNULIB_MBSRTOWCS=1
23111
23112
23113
23114
23115
23116 $as_echo "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h
23117
23118
23119
23120
23121 if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
23122
23123
23124
23125
23126
23127
23128
23129
23130 gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
23131
23132
23133 for ac_header in bp-sym.h
23134 do :
23135 ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
23136 if test "x$ac_cv_header_bp_sym_h" = xyes; then :
23137 cat >>confdefs.h <<_ACEOF
23138 #define HAVE_BP_SYM_H 1
23139 _ACEOF
23140
23141 fi
23142
23143 done
23144
23145
23146 fi
23147
23148
23149
23150
23151
23152 GNULIB_MEMCHR=1
23153
23154
23155
23156
23157
23158 $as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
23159
23160
23161
23162
23163
23164 if test $HAVE_DECL_MEMMEM = 1 && test $REPLACE_MEMMEM = 0; then
23165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works in linear time" >&5
23166 $as_echo_n "checking whether memmem works in linear time... " >&6; }
23167 if ${gl_cv_func_memmem_works_fast+:} false; then :
23168 $as_echo_n "(cached) " >&6
23169 else
23170 if test "$cross_compiling" = yes; then :
23171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23172 /* end confdefs.h. */
23173
23174 #include <features.h>
23175 #ifdef __GNU_LIBRARY__
23176 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2)) \
23177 && !defined __UCLIBC__
23178 Lucky user
23179 #endif
23180 #endif
23181 #ifdef __CYGWIN__
23182 #include <cygwin/version.h>
23183 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 0)
23184 Lucky user
23185 #endif
23186 #endif
23187
23188 _ACEOF
23189 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23190 $EGREP "Lucky user" >/dev/null 2>&1; then :
23191 gl_cv_func_memmem_works_fast="guessing yes"
23192 else
23193 gl_cv_func_memmem_works_fast="guessing no"
23194 fi
23195 rm -f conftest*
23196
23197
23198 else
23199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23200 /* end confdefs.h. */
23201
23202 #include <signal.h> /* for signal */
23203 #include <string.h> /* for memmem */
23204 #include <stdlib.h> /* for malloc */
23205 #include <unistd.h> /* for alarm */
23206 static void quit (int sig) { _exit (sig + 128); }
23207
23208 int
23209 main ()
23210 {
23211
23212 int result = 0;
23213 size_t m = 1000000;
23214 char *haystack = (char *) malloc (2 * m + 1);
23215 char *needle = (char *) malloc (m + 1);
23216 /* Failure to compile this test due to missing alarm is okay,
23217 since all such platforms (mingw) also lack memmem. */
23218 signal (SIGALRM, quit);
23219 alarm (5);
23220 /* Check for quadratic performance. */
23221 if (haystack && needle)
23222 {
23223 memset (haystack, 'A', 2 * m);
23224 haystack[2 * m] = 'B';
23225 memset (needle, 'A', m);
23226 needle[m] = 'B';
23227 if (!memmem (haystack, 2 * m + 1, needle, m + 1))
23228 result |= 1;
23229 }
23230 return result;
23231
23232 ;
23233 return 0;
23234 }
23235 _ACEOF
23236 if ac_fn_c_try_run "$LINENO"; then :
23237 gl_cv_func_memmem_works_fast=yes
23238 else
23239 gl_cv_func_memmem_works_fast=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
23246 fi
23247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_fast" >&5
23248 $as_echo "$gl_cv_func_memmem_works_fast" >&6; }
23249 case "$gl_cv_func_memmem_works_fast" in
23250 *yes) ;;
23251 *)
23252 REPLACE_MEMMEM=1
23253 ;;
23254 esac
23255 fi
23256
23257 if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
23258
23259
23260
23261
23262
23263
23264
23265
23266 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
23267
23268 fi
23269
23270
23271
23272
23273 for ac_func in memmem
23274 do :
23275 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
23276 if test "x$ac_cv_func_memmem" = xyes; then :
23277 cat >>confdefs.h <<_ACEOF
23278 #define HAVE_MEMMEM 1
23279 _ACEOF
23280
23281 fi
23282 done
23283
23284 if test $ac_cv_func_memmem = yes; then
23285 HAVE_MEMMEM=1
23286 else
23287 HAVE_MEMMEM=0
23288 fi
23289
23290 :
23291
23292
23293
23294
23295
23296 if test $ac_cv_have_decl_memmem = no; then
23297 HAVE_DECL_MEMMEM=0
23298 else
23299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
23300 $as_echo_n "checking whether memmem works... " >&6; }
23301 if ${gl_cv_func_memmem_works_always+:} false; then :
23302 $as_echo_n "(cached) " >&6
23303 else
23304 if test "$cross_compiling" = yes; then :
23305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23306 /* end confdefs.h. */
23307
23308 #ifdef __GNU_LIBRARY__
23309 #include <features.h>
23310 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
23311 || __GLIBC_MINOR__ > 12)) \
23312 || (__GLIBC__ > 2)) \
23313 || defined __UCLIBC__
23314 Lucky user
23315 #endif
23316 #elif defined __CYGWIN__
23317 #include <cygwin/version.h>
23318 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
23319 Lucky user
23320 #endif
23321 #else
23322 Lucky user
23323 #endif
23324
23325 _ACEOF
23326 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23327 $EGREP "Lucky user" >/dev/null 2>&1; then :
23328 gl_cv_func_memmem_works_always="guessing yes"
23329 else
23330 gl_cv_func_memmem_works_always="guessing no"
23331 fi
23332 rm -f conftest*
23333
23334
23335 else
23336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23337 /* end confdefs.h. */
23338
23339 #include <string.h> /* for memmem */
23340 #define P "_EF_BF_BD"
23341 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
23342 #define NEEDLE P P P P P
23343
23344 int
23345 main ()
23346 {
23347
23348 int result = 0;
23349 if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
23350 result |= 1;
23351 /* Check for empty needle behavior. */
23352 {
23353 const char *haystack = "AAA";
23354 if (memmem (haystack, 3, NULL, 0) != haystack)
23355 result |= 2;
23356 }
23357 return result;
23358
23359 ;
23360 return 0;
23361 }
23362 _ACEOF
23363 if ac_fn_c_try_run "$LINENO"; then :
23364 gl_cv_func_memmem_works_always=yes
23365 else
23366 gl_cv_func_memmem_works_always=no
23367 fi
23368 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23369 conftest.$ac_objext conftest.beam conftest.$ac_ext
23370 fi
23371
23372
23373 fi
23374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
23375 $as_echo "$gl_cv_func_memmem_works_always" >&6; }
23376 case "$gl_cv_func_memmem_works_always" in
23377 *yes) ;;
23378 *)
23379 REPLACE_MEMMEM=1
23380 ;;
23381 esac
23382 fi
23383 :
23384
23385 if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
23386
23387
23388
23389
23390
23391
23392
23393
23394 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
23395
23396 fi
23397
23398
23399
23400
23401
23402 GNULIB_MEMMEM=1
23403
23404
23405
23406
23407
23408 $as_echo "#define GNULIB_TEST_MEMMEM 1" >>confdefs.h
23409
23410
23411
23412
23413
23414
23415
23416
23417
23418 for ac_func in mempcpy
23419 do :
23420 ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
23421 if test "x$ac_cv_func_mempcpy" = xyes; then :
23422 cat >>confdefs.h <<_ACEOF
23423 #define HAVE_MEMPCPY 1
23424 _ACEOF
23425
23426 fi
23427 done
23428
23429 if test $ac_cv_func_mempcpy = no; then
23430 HAVE_MEMPCPY=0
23431 fi
23432
23433 if test $HAVE_MEMPCPY = 0; then
23434
23435
23436
23437
23438
23439
23440
23441
23442 gl_LIBOBJS="$gl_LIBOBJS mempcpy.$ac_objext"
23443
23444
23445 :
23446
23447 fi
23448
23449
23450
23451
23452
23453 GNULIB_MEMPCPY=1
23454
23455
23456
23457
23458
23459 $as_echo "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h
23460
23461
23462
23463
23464
23465
23466
23467
23468 :
23469
23470
23471
23472
23473
23474 if test $ac_cv_have_decl_memrchr = no; then
23475 HAVE_DECL_MEMRCHR=0
23476 fi
23477
23478 for ac_func in memrchr
23479 do :
23480 ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
23481 if test "x$ac_cv_func_memrchr" = xyes; then :
23482 cat >>confdefs.h <<_ACEOF
23483 #define HAVE_MEMRCHR 1
23484 _ACEOF
23485
23486 fi
23487 done
23488
23489
23490 if test $ac_cv_func_memrchr = no; then
23491
23492
23493
23494
23495
23496
23497
23498
23499 gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
23500
23501 :
23502 fi
23503
23504
23505
23506
23507
23508 GNULIB_MEMRCHR=1
23509
23510
23511
23512
23513
23514 $as_echo "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h
23515
23516
23517
23518
23519
23520 :
23521
23522
23523
23524
23525
23526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing slash" >&5
23527 $as_echo_n "checking whether mkdir handles trailing slash... " >&6; }
23528 if ${gl_cv_func_mkdir_trailing_slash_works+:} false; then :
23529 $as_echo_n "(cached) " >&6
23530 else
23531 rm -rf conftest.dir
23532 if test "$cross_compiling" = yes; then :
23533 case "$host_os" in
23534 # Guess yes on glibc systems.
23535 *-gnu*) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
23536 # If we don't know, assume the worst.
23537 *) gl_cv_func_mkdir_trailing_slash_works="guessing no" ;;
23538 esac
23539
23540 else
23541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23542 /* end confdefs.h. */
23543
23544 # include <sys/types.h>
23545 # include <sys/stat.h>
23546
23547 int
23548 main ()
23549 {
23550 return mkdir ("conftest.dir/", 0700);
23551 ;
23552 return 0;
23553 }
23554 _ACEOF
23555 if ac_fn_c_try_run "$LINENO"; then :
23556 gl_cv_func_mkdir_trailing_slash_works=yes
23557 else
23558 gl_cv_func_mkdir_trailing_slash_works=no
23559 fi
23560 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23561 conftest.$ac_objext conftest.beam conftest.$ac_ext
23562 fi
23563
23564 rm -rf conftest.dir
23565
23566
23567 fi
23568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_slash_works" >&5
23569 $as_echo "$gl_cv_func_mkdir_trailing_slash_works" >&6; }
23570 case "$gl_cv_func_mkdir_trailing_slash_works" in
23571 *yes) ;;
23572 *)
23573 REPLACE_MKDIR=1
23574 ;;
23575 esac
23576
23577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing dot" >&5
23578 $as_echo_n "checking whether mkdir handles trailing dot... " >&6; }
23579 if ${gl_cv_func_mkdir_trailing_dot_works+:} false; then :
23580 $as_echo_n "(cached) " >&6
23581 else
23582 rm -rf conftest.dir
23583 if test "$cross_compiling" = yes; then :
23584 case "$host_os" in
23585 # Guess yes on glibc systems.
23586 *-gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
23587 # If we don't know, assume the worst.
23588 *) gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
23589 esac
23590
23591 else
23592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23593 /* end confdefs.h. */
23594
23595 # include <sys/types.h>
23596 # include <sys/stat.h>
23597
23598 int
23599 main ()
23600 {
23601 return !mkdir ("conftest.dir/./", 0700);
23602 ;
23603 return 0;
23604 }
23605 _ACEOF
23606 if ac_fn_c_try_run "$LINENO"; then :
23607 gl_cv_func_mkdir_trailing_dot_works=yes
23608 else
23609 gl_cv_func_mkdir_trailing_dot_works=no
23610 fi
23611 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23612 conftest.$ac_objext conftest.beam conftest.$ac_ext
23613 fi
23614
23615 rm -rf conftest.dir
23616
23617
23618 fi
23619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_dot_works" >&5
23620 $as_echo "$gl_cv_func_mkdir_trailing_dot_works" >&6; }
23621 case "$gl_cv_func_mkdir_trailing_dot_works" in
23622 *yes) ;;
23623 *)
23624 REPLACE_MKDIR=1
23625
23626 $as_echo "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h
23627
23628 ;;
23629 esac
23630
23631 if test $REPLACE_MKDIR = 1; then
23632
23633
23634
23635
23636
23637
23638
23639
23640 gl_LIBOBJS="$gl_LIBOBJS mkdir.$ac_objext"
23641
23642 fi
23643
23644
23645 for ac_func in mkdtemp
23646 do :
23647 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
23648 if test "x$ac_cv_func_mkdtemp" = xyes; then :
23649 cat >>confdefs.h <<_ACEOF
23650 #define HAVE_MKDTEMP 1
23651 _ACEOF
23652
23653 fi
23654 done
23655
23656 if test $ac_cv_func_mkdtemp = no; then
23657 HAVE_MKDTEMP=0
23658 fi
23659
23660 if test $HAVE_MKDTEMP = 0; then
23661
23662
23663
23664
23665
23666
23667
23668
23669 gl_LIBOBJS="$gl_LIBOBJS mkdtemp.$ac_objext"
23670
23671 :
23672
23673 fi
23674
23675
23676
23677
23678
23679 GNULIB_MKDTEMP=1
23680
23681
23682
23683
23684
23685 $as_echo "#define GNULIB_TEST_MKDTEMP 1" >>confdefs.h
23686
23687
23688
23689
23690
23691
23692
23693
23694
23695 :
23696
23697
23698
23699
23700
23701 if test $ac_cv_func_mkostemp != yes; then
23702 HAVE_MKOSTEMP=0
23703 fi
23704
23705 if test $HAVE_MKOSTEMP = 0; then
23706
23707
23708
23709
23710
23711
23712
23713
23714 gl_LIBOBJS="$gl_LIBOBJS mkostemp.$ac_objext"
23715
23716
23717
23718 fi
23719
23720
23721 cat >>confdefs.h <<_ACEOF
23722 #define GNULIB_MKOSTEMP 1
23723 _ACEOF
23724
23725
23726
23727
23728
23729
23730
23731 GNULIB_MKOSTEMP=1
23732
23733
23734
23735
23736
23737 $as_echo "#define GNULIB_TEST_MKOSTEMP 1" >>confdefs.h
23738
23739
23740
23741
23742 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
23743
23744
23745
23746
23747
23748
23749
23750
23751 gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
23752
23753 fi
23754
23755 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
23756
23757
23758
23759
23760
23761
23762
23763
23764 gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
23765
23766 fi
23767
23768
23769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <netinet/in.h> is self-contained" >&5
23770 $as_echo_n "checking whether <netinet/in.h> is self-contained... " >&6; }
23771 if ${gl_cv_header_netinet_in_h_selfcontained+:} false; then :
23772 $as_echo_n "(cached) " >&6
23773 else
23774
23775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23776 /* end confdefs.h. */
23777 #include <netinet/in.h>
23778 int
23779 main ()
23780 {
23781
23782 ;
23783 return 0;
23784 }
23785 _ACEOF
23786 if ac_fn_c_try_compile "$LINENO"; then :
23787 gl_cv_header_netinet_in_h_selfcontained=yes
23788 else
23789 gl_cv_header_netinet_in_h_selfcontained=no
23790 fi
23791 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23792
23793 fi
23794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_netinet_in_h_selfcontained" >&5
23795 $as_echo "$gl_cv_header_netinet_in_h_selfcontained" >&6; }
23796 if test $gl_cv_header_netinet_in_h_selfcontained = yes; then
23797 NETINET_IN_H=''
23798 else
23799 NETINET_IN_H='netinet/in.h'
23800 for ac_header in netinet/in.h
23801 do :
23802 ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
23803 if test "x$ac_cv_header_netinet_in_h" = xyes; then :
23804 cat >>confdefs.h <<_ACEOF
23805 #define HAVE_NETINET_IN_H 1
23806 _ACEOF
23807
23808 fi
23809
23810 done
23811
23812
23813
23814
23815
23816
23817
23818 :
23819
23820
23821
23822
23823
23824
23825
23826
23827 if test $gl_cv_have_include_next = yes; then
23828 gl_cv_next_netinet_in_h='<'netinet/in.h'>'
23829 else
23830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <netinet/in.h>" >&5
23831 $as_echo_n "checking absolute name of <netinet/in.h>... " >&6; }
23832 if ${gl_cv_next_netinet_in_h+:} false; then :
23833 $as_echo_n "(cached) " >&6
23834 else
23835
23836 if test $ac_cv_header_netinet_in_h = yes; then
23837
23838
23839
23840
23841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23842 /* end confdefs.h. */
23843 #include <netinet/in.h>
23844 _ACEOF
23845 case "$host_os" in
23846 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23847 *) gl_absname_cpp="$ac_cpp" ;;
23848 esac
23849
23850 case "$host_os" in
23851 mingw*)
23852 gl_dirsep_regex='[/\\]'
23853 ;;
23854 *)
23855 gl_dirsep_regex='\/'
23856 ;;
23857 esac
23858 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23859 gl_header_literal_regex=`echo 'netinet/in.h' \
23860 | sed -e "$gl_make_literal_regex_sed"`
23861 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23862 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23863 s|^/[^/]|//&|
23864 p
23865 q
23866 }'
23867
23868 gl_cv_absolute_netinet_in_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23869 sed -n "$gl_absolute_header_sed"`
23870
23871 gl_header=$gl_cv_absolute_netinet_in_h
23872 gl_cv_next_netinet_in_h='"'$gl_header'"'
23873 else
23874 gl_cv_next_netinet_in_h='<'netinet/in.h'>'
23875 fi
23876
23877
23878 fi
23879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_netinet_in_h" >&5
23880 $as_echo "$gl_cv_next_netinet_in_h" >&6; }
23881 fi
23882 NEXT_NETINET_IN_H=$gl_cv_next_netinet_in_h
23883
23884 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23885 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23886 gl_next_as_first_directive='<'netinet/in.h'>'
23887 else
23888 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23889 gl_next_as_first_directive=$gl_cv_next_netinet_in_h
23890 fi
23891 NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H=$gl_next_as_first_directive
23892
23893
23894
23895
23896 if test $ac_cv_header_netinet_in_h = yes; then
23897 HAVE_NETINET_IN_H=1
23898 else
23899 HAVE_NETINET_IN_H=0
23900 fi
23901
23902 fi
23903
23904 if test -n "$NETINET_IN_H"; then
23905 GL_GENERATE_NETINET_IN_H_TRUE=
23906 GL_GENERATE_NETINET_IN_H_FALSE='#'
23907 else
23908 GL_GENERATE_NETINET_IN_H_TRUE='#'
23909 GL_GENERATE_NETINET_IN_H_FALSE=
23910 fi
23911
23912
23913
23914
23915
23916 case "$host_os" in
23917 mingw* | pw*)
23918 REPLACE_OPEN=1
23919 ;;
23920 *)
23921
23922 :
23923
23924
23925
23926
23927
23928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
23929 $as_echo_n "checking whether open recognizes a trailing slash... " >&6; }
23930 if ${gl_cv_func_open_slash+:} false; then :
23931 $as_echo_n "(cached) " >&6
23932 else
23933 # Assume that if we have lstat, we can also check symlinks.
23934 if test $ac_cv_func_lstat = yes; then
23935 touch conftest.tmp
23936 ln -s conftest.tmp conftest.lnk
23937 fi
23938 if test "$cross_compiling" = yes; then :
23939
23940 case "$host_os" in
23941 freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
23942 gl_cv_func_open_slash="guessing no" ;;
23943 *)
23944 gl_cv_func_open_slash="guessing yes" ;;
23945 esac
23946
23947 else
23948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23949 /* end confdefs.h. */
23950
23951 #include <fcntl.h>
23952 #if HAVE_UNISTD_H
23953 # include <unistd.h>
23954 #endif
23955 int main ()
23956 {
23957 int result = 0;
23958 #if HAVE_LSTAT
23959 if (open ("conftest.lnk/", O_RDONLY) != -1)
23960 result |= 1;
23961 #endif
23962 if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
23963 result |= 2;
23964 return result;
23965 }
23966 _ACEOF
23967 if ac_fn_c_try_run "$LINENO"; then :
23968 gl_cv_func_open_slash=yes
23969 else
23970 gl_cv_func_open_slash=no
23971 fi
23972 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23973 conftest.$ac_objext conftest.beam conftest.$ac_ext
23974 fi
23975
23976 rm -f conftest.sl conftest.tmp conftest.lnk
23977
23978 fi
23979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
23980 $as_echo "$gl_cv_func_open_slash" >&6; }
23981 case "$gl_cv_func_open_slash" in
23982 *no)
23983
23984 $as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
23985
23986 REPLACE_OPEN=1
23987 ;;
23988 esac
23989 ;;
23990 esac
23991
23992 if test $REPLACE_OPEN = 0; then
23993
23994
23995
23996 :
23997
23998
23999
24000
24001
24002 if test $ac_cv_func_fchdir = no; then
24003 HAVE_FCHDIR=0
24004 fi
24005
24006 if test $HAVE_FCHDIR = 0; then
24007 REPLACE_OPEN=1
24008 fi
24009 fi
24010
24011
24012
24013 if test $REPLACE_OPEN = 1; then
24014
24015
24016
24017
24018
24019
24020
24021
24022 gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
24023
24024
24025
24026 :
24027
24028 fi
24029
24030
24031
24032
24033
24034 GNULIB_OPEN=1
24035
24036
24037
24038
24039
24040 $as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h
24041
24042
24043
24044
24045
24046
24047
24048 :
24049
24050
24051
24052
24053
24054
24055 case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in
24056 yes+*yes)
24057 ;;
24058 yes+*)
24059 # Solaris 9 has *at functions, but uniformly mishandles trailing
24060 # slash in all of them.
24061 REPLACE_OPENAT=1
24062 ;;
24063 *)
24064 HAVE_OPENAT=0
24065 ;;
24066 esac
24067
24068 if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then
24069
24070
24071
24072
24073
24074
24075
24076
24077 gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext"
24078
24079
24080
24081 :
24082
24083 fi
24084
24085
24086 cat >>confdefs.h <<_ACEOF
24087 #define GNULIB_OPENAT 1
24088 _ACEOF
24089
24090
24091
24092
24093
24094
24095 GNULIB_OPENAT=1
24096
24097
24098
24099
24100
24101 $as_echo "#define GNULIB_TEST_OPENAT 1" >>confdefs.h
24102
24103
24104
24105
24106
24107
24108 for ac_func in opendir
24109 do :
24110 ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
24111 if test "x$ac_cv_func_opendir" = xyes; then :
24112 cat >>confdefs.h <<_ACEOF
24113 #define HAVE_OPENDIR 1
24114 _ACEOF
24115
24116 fi
24117 done
24118
24119 if test $ac_cv_func_opendir = no; then
24120 HAVE_OPENDIR=0
24121 fi
24122
24123
24124
24125
24126 :
24127
24128
24129
24130
24131
24132 if test $ac_cv_func_fchdir = no; then
24133 HAVE_FCHDIR=0
24134 fi
24135
24136 if test $HAVE_FCHDIR = 0; then
24137 if test $HAVE_OPENDIR = 1; then
24138 REPLACE_OPENDIR=1
24139 fi
24140 fi
24141
24142 case $host_os,$HAVE_OPENDIR in
24143 os2*,1)
24144 REPLACE_OPENDIR=1;;
24145 esac
24146
24147 if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
24148
24149
24150
24151
24152
24153
24154
24155
24156 gl_LIBOBJS="$gl_LIBOBJS opendir.$ac_objext"
24157
24158 fi
24159
24160
24161
24162
24163
24164 GNULIB_OPENDIR=1
24165
24166
24167
24168
24169
24170 $as_echo "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
24171
24172
24173
24174
24175
24176 :
24177
24178
24179
24180
24181
24182
24183
24184
24185
24186
24187 for ac_func in rawmemchr
24188 do :
24189 ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
24190 if test "x$ac_cv_func_rawmemchr" = xyes; then :
24191 cat >>confdefs.h <<_ACEOF
24192 #define HAVE_RAWMEMCHR 1
24193 _ACEOF
24194
24195 fi
24196 done
24197
24198 if test $ac_cv_func_rawmemchr = no; then
24199 HAVE_RAWMEMCHR=0
24200 fi
24201
24202 if test $HAVE_RAWMEMCHR = 0; then
24203
24204
24205
24206
24207
24208
24209
24210
24211 gl_LIBOBJS="$gl_LIBOBJS rawmemchr.$ac_objext"
24212
24213 :
24214 fi
24215
24216
24217
24218
24219
24220 GNULIB_RAWMEMCHR=1
24221
24222
24223
24224
24225
24226 $as_echo "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
24227
24228
24229
24230
24231
24232
24233 for ac_func in readdir
24234 do :
24235 ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir"
24236 if test "x$ac_cv_func_readdir" = xyes; then :
24237 cat >>confdefs.h <<_ACEOF
24238 #define HAVE_READDIR 1
24239 _ACEOF
24240
24241 fi
24242 done
24243
24244 if test $ac_cv_func_readdir = no; then
24245 HAVE_READDIR=0
24246 fi
24247
24248 if test $HAVE_READDIR = 0; then
24249
24250
24251
24252
24253
24254
24255
24256
24257 gl_LIBOBJS="$gl_LIBOBJS readdir.$ac_objext"
24258
24259 fi
24260
24261
24262
24263
24264
24265 GNULIB_READDIR=1
24266
24267
24268
24269
24270
24271 $as_echo "#define GNULIB_TEST_READDIR 1" >>confdefs.h
24272
24273
24274
24275
24276
24277
24278 :
24279
24280
24281
24282
24283
24284 if test $ac_cv_func_readlink = no; then
24285 HAVE_READLINK=0
24286 else
24287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
24288 $as_echo_n "checking whether readlink signature is correct... " >&6; }
24289 if ${gl_cv_decl_readlink_works+:} false; then :
24290 $as_echo_n "(cached) " >&6
24291 else
24292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24293 /* end confdefs.h. */
24294 #include <unistd.h>
24295 /* Cause compilation failure if original declaration has wrong type. */
24296 ssize_t readlink (const char *, char *, size_t);
24297 int
24298 main ()
24299 {
24300
24301 ;
24302 return 0;
24303 }
24304 _ACEOF
24305 if ac_fn_c_try_compile "$LINENO"; then :
24306 gl_cv_decl_readlink_works=yes
24307 else
24308 gl_cv_decl_readlink_works=no
24309 fi
24310 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24311 fi
24312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
24313 $as_echo "$gl_cv_decl_readlink_works" >&6; }
24314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
24315 $as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
24316 if ${gl_cv_func_readlink_works+:} false; then :
24317 $as_echo_n "(cached) " >&6
24318 else
24319 # We have readlink, so assume ln -s works.
24320 ln -s conftest.no-such conftest.link
24321 ln -s conftest.link conftest.lnk2
24322 if test "$cross_compiling" = yes; then :
24323 case "$host_os" in
24324 # Guess yes on glibc systems.
24325 *-gnu*) gl_cv_func_readlink_works="guessing yes" ;;
24326 # If we don't know, assume the worst.
24327 *) gl_cv_func_readlink_works="guessing no" ;;
24328 esac
24329
24330 else
24331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24332 /* end confdefs.h. */
24333 #include <unistd.h>
24334
24335 int
24336 main ()
24337 {
24338 char buf[20];
24339 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
24340 ;
24341 return 0;
24342 }
24343 _ACEOF
24344 if ac_fn_c_try_run "$LINENO"; then :
24345 gl_cv_func_readlink_works=yes
24346 else
24347 gl_cv_func_readlink_works=no
24348 fi
24349 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24350 conftest.$ac_objext conftest.beam conftest.$ac_ext
24351 fi
24352
24353 rm -f conftest.link conftest.lnk2
24354 fi
24355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
24356 $as_echo "$gl_cv_func_readlink_works" >&6; }
24357 case "$gl_cv_func_readlink_works" in
24358 *yes)
24359 if test "$gl_cv_decl_readlink_works" != yes; then
24360 REPLACE_READLINK=1
24361 fi
24362 ;;
24363 *)
24364
24365 $as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
24366
24367 REPLACE_READLINK=1
24368 ;;
24369 esac
24370 fi
24371
24372 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
24373
24374
24375
24376
24377
24378
24379
24380
24381 gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
24382
24383
24384 :
24385
24386 fi
24387
24388
24389
24390
24391
24392 GNULIB_READLINK=1
24393
24394
24395
24396
24397
24398 $as_echo "#define GNULIB_TEST_READLINK 1" >>confdefs.h
24399
24400
24401
24402
24403
24404
24405 if test $gl_cv_func_malloc_posix = yes; then
24406
24407 $as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h
24408
24409 else
24410 REPLACE_REALLOC=1
24411 fi
24412
24413 if test $REPLACE_REALLOC = 1; then
24414
24415
24416
24417
24418
24419
24420
24421
24422 gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
24423
24424 fi
24425
24426
24427
24428
24429
24430 GNULIB_REALLOC_POSIX=1
24431
24432
24433
24434
24435
24436 $as_echo "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
24437
24438
24439
24440
24441
24442
24443
24444 :
24445
24446
24447
24448
24449
24450
24451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on destination" >&5
24452 $as_echo_n "checking whether rename honors trailing slash on destination... " >&6; }
24453 if ${gl_cv_func_rename_slash_dst_works+:} false; then :
24454 $as_echo_n "(cached) " >&6
24455 else
24456 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
24457 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
24458 as_fn_error $? "cannot create temporary files" "$LINENO" 5
24459 # Assume that if we have lstat, we can also check symlinks.
24460 if test $ac_cv_func_lstat = yes; then
24461 ln -s conftest.f conftest.lnk
24462 fi
24463 if test "$cross_compiling" = yes; then :
24464 case "$host_os" in
24465 # Guess yes on glibc systems.
24466 *-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
24467 # If we don't know, assume the worst.
24468 *) gl_cv_func_rename_slash_dst_works="guessing no" ;;
24469 esac
24470
24471 else
24472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24473 /* end confdefs.h. */
24474
24475 # include <stdio.h>
24476 # include <stdlib.h>
24477
24478 int
24479 main ()
24480 {
24481 int result = 0;
24482 if (rename ("conftest.f1", "conftest.f2/") == 0)
24483 result |= 1;
24484 if (rename ("conftest.d1", "conftest.d2/") != 0)
24485 result |= 2;
24486 #if HAVE_LSTAT
24487 if (rename ("conftest.f", "conftest.lnk/") == 0)
24488 result |= 4;
24489 #endif
24490 return result;
24491
24492 ;
24493 return 0;
24494 }
24495 _ACEOF
24496 if ac_fn_c_try_run "$LINENO"; then :
24497 gl_cv_func_rename_slash_dst_works=yes
24498 else
24499 gl_cv_func_rename_slash_dst_works=no
24500 fi
24501 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24502 conftest.$ac_objext conftest.beam conftest.$ac_ext
24503 fi
24504
24505 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
24506
24507 fi
24508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_dst_works" >&5
24509 $as_echo "$gl_cv_func_rename_slash_dst_works" >&6; }
24510 case "$gl_cv_func_rename_slash_dst_works" in
24511 *yes) ;;
24512 *)
24513 REPLACE_RENAME=1
24514
24515 $as_echo "#define RENAME_TRAILING_SLASH_DEST_BUG 1" >>confdefs.h
24516
24517 ;;
24518 esac
24519
24520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on source" >&5
24521 $as_echo_n "checking whether rename honors trailing slash on source... " >&6; }
24522 if ${gl_cv_func_rename_slash_src_works+:} false; then :
24523 $as_echo_n "(cached) " >&6
24524 else
24525 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
24526 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
24527 as_fn_error $? "cannot create temporary files" "$LINENO" 5
24528 # Assume that if we have lstat, we can also check symlinks.
24529 if test $ac_cv_func_lstat = yes; then
24530 ln -s conftest.f conftest.lnk
24531 fi
24532 if test "$cross_compiling" = yes; then :
24533 case "$host_os" in
24534 # Guess yes on glibc systems.
24535 *-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
24536 # If we don't know, assume the worst.
24537 *) gl_cv_func_rename_slash_src_works="guessing no" ;;
24538 esac
24539
24540 else
24541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24542 /* end confdefs.h. */
24543
24544 # include <stdio.h>
24545 # include <stdlib.h>
24546
24547 int
24548 main ()
24549 {
24550 int result = 0;
24551 if (rename ("conftest.f1/", "conftest.d3") == 0)
24552 result |= 1;
24553 if (rename ("conftest.d1/", "conftest.d2") != 0)
24554 result |= 2;
24555 #if HAVE_LSTAT
24556 if (rename ("conftest.lnk/", "conftest.f") == 0)
24557 result |= 4;
24558 #endif
24559 return result;
24560
24561 ;
24562 return 0;
24563 }
24564 _ACEOF
24565 if ac_fn_c_try_run "$LINENO"; then :
24566 gl_cv_func_rename_slash_src_works=yes
24567 else
24568 gl_cv_func_rename_slash_src_works=no
24569 fi
24570 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24571 conftest.$ac_objext conftest.beam conftest.$ac_ext
24572 fi
24573
24574 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
24575
24576 fi
24577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_src_works" >&5
24578 $as_echo "$gl_cv_func_rename_slash_src_works" >&6; }
24579 case "$gl_cv_func_rename_slash_src_works" in
24580 *yes) ;;
24581 *)
24582 REPLACE_RENAME=1
24583
24584 $as_echo "#define RENAME_TRAILING_SLASH_SOURCE_BUG 1" >>confdefs.h
24585
24586 ;;
24587 esac
24588
24589
24590 :
24591
24592
24593
24594
24595
24596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5
24597 $as_echo_n "checking whether rename manages hard links correctly... " >&6; }
24598 if ${gl_cv_func_rename_link_works+:} false; then :
24599 $as_echo_n "(cached) " >&6
24600 else
24601 if test $ac_cv_func_link = yes; then
24602 rm -rf conftest.f conftest.f1
24603 if touch conftest.f && ln conftest.f conftest.f1 &&
24604 set x `ls -i conftest.f conftest.f1` && test "" = ""; then
24605 if test "$cross_compiling" = yes; then :
24606 case "$host_os" in
24607 # Guess yes on glibc systems.
24608 *-gnu*) gl_cv_func_rename_link_works="guessing yes" ;;
24609 # If we don't know, assume the worst.
24610 *) gl_cv_func_rename_link_works="guessing no" ;;
24611 esac
24612
24613 else
24614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24615 /* end confdefs.h. */
24616
24617 # include <stdio.h>
24618 # include <stdlib.h>
24619 # include <unistd.h>
24620
24621 int
24622 main ()
24623 {
24624 int result = 0;
24625 if (rename ("conftest.f", "conftest.f1"))
24626 result |= 1;
24627 if (unlink ("conftest.f1"))
24628 result |= 2;
24629 if (rename ("conftest.f", "conftest.f"))
24630 result |= 4;
24631 if (rename ("conftest.f1", "conftest.f1") == 0)
24632 result |= 8;
24633 return result;
24634
24635 ;
24636 return 0;
24637 }
24638 _ACEOF
24639 if ac_fn_c_try_run "$LINENO"; then :
24640 gl_cv_func_rename_link_works=yes
24641 else
24642 gl_cv_func_rename_link_works=no
24643 fi
24644 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24645 conftest.$ac_objext conftest.beam conftest.$ac_ext
24646 fi
24647
24648 else
24649 gl_cv_func_rename_link_works="guessing no"
24650 fi
24651 rm -rf conftest.f conftest.f1
24652 else
24653 gl_cv_func_rename_link_works=yes
24654 fi
24655
24656 fi
24657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_link_works" >&5
24658 $as_echo "$gl_cv_func_rename_link_works" >&6; }
24659 case "$gl_cv_func_rename_link_works" in
24660 *yes) ;;
24661 *)
24662 REPLACE_RENAME=1
24663
24664 $as_echo "#define RENAME_HARD_LINK_BUG 1" >>confdefs.h
24665
24666 ;;
24667 esac
24668
24669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages existing destinations correctly" >&5
24670 $as_echo_n "checking whether rename manages existing destinations correctly... " >&6; }
24671 if ${gl_cv_func_rename_dest_works+:} false; then :
24672 $as_echo_n "(cached) " >&6
24673 else
24674 rm -rf conftest.f conftest.d1 conftest.d2
24675 touch conftest.f && mkdir conftest.d1 conftest.d2 ||
24676 as_fn_error $? "cannot create temporary files" "$LINENO" 5
24677 if test "$cross_compiling" = yes; then :
24678 case "$host_os" in
24679 # Guess yes on glibc systems.
24680 *-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;;
24681 # If we don't know, assume the worst.
24682 *) gl_cv_func_rename_dest_works="guessing no" ;;
24683 esac
24684
24685 else
24686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24687 /* end confdefs.h. */
24688
24689 # include <stdio.h>
24690 # include <stdlib.h>
24691
24692 int
24693 main ()
24694 {
24695 int result = 0;
24696 if (rename ("conftest.d1", "conftest.d2") != 0)
24697 result |= 1;
24698 if (rename ("conftest.d2", "conftest.f") == 0)
24699 result |= 2;
24700 return result;
24701
24702 ;
24703 return 0;
24704 }
24705 _ACEOF
24706 if ac_fn_c_try_run "$LINENO"; then :
24707 gl_cv_func_rename_dest_works=yes
24708 else
24709 gl_cv_func_rename_dest_works=no
24710 fi
24711 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24712 conftest.$ac_objext conftest.beam conftest.$ac_ext
24713 fi
24714
24715 rm -rf conftest.f conftest.d1 conftest.d2
24716
24717 fi
24718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_dest_works" >&5
24719 $as_echo "$gl_cv_func_rename_dest_works" >&6; }
24720 case "$gl_cv_func_rename_dest_works" in
24721 *yes) ;;
24722 *)
24723 REPLACE_RENAME=1
24724
24725 $as_echo "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h
24726
24727 ;;
24728 esac
24729
24730 if test $REPLACE_RENAME = 1; then
24731
24732
24733
24734
24735
24736
24737
24738
24739 gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext"
24740
24741 fi
24742
24743
24744
24745
24746
24747 GNULIB_RENAME=1
24748
24749
24750
24751
24752
24753 $as_echo "#define GNULIB_TEST_RENAME 1" >>confdefs.h
24754
24755
24756
24757
24758
24759
24760 for ac_func in rewinddir
24761 do :
24762 ac_fn_c_check_func "$LINENO" "rewinddir" "ac_cv_func_rewinddir"
24763 if test "x$ac_cv_func_rewinddir" = xyes; then :
24764 cat >>confdefs.h <<_ACEOF
24765 #define HAVE_REWINDDIR 1
24766 _ACEOF
24767
24768 fi
24769 done
24770
24771 if test $ac_cv_func_rewinddir = no; then
24772 HAVE_REWINDDIR=0
24773 fi
24774
24775 if test $HAVE_REWINDDIR = 0; then
24776
24777
24778
24779
24780
24781
24782
24783
24784 gl_LIBOBJS="$gl_LIBOBJS rewinddir.$ac_objext"
24785
24786 fi
24787
24788
24789
24790
24791
24792 GNULIB_REWINDDIR=1
24793
24794
24795
24796
24797
24798 $as_echo "#define GNULIB_TEST_REWINDDIR 1" >>confdefs.h
24799
24800
24801
24802
24803
24804
24805 :
24806
24807
24808
24809
24810
24811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
24812 $as_echo_n "checking whether rmdir works... " >&6; }
24813 if ${gl_cv_func_rmdir_works+:} false; then :
24814 $as_echo_n "(cached) " >&6
24815 else
24816 mkdir conftest.dir
24817 touch conftest.file
24818 if test "$cross_compiling" = yes; then :
24819 case "$host_os" in
24820 # Guess yes on glibc systems.
24821 *-gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
24822 # If we don't know, assume the worst.
24823 *) gl_cv_func_rmdir_works="guessing no" ;;
24824 esac
24825
24826 else
24827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24828 /* end confdefs.h. */
24829 #include <stdio.h>
24830 #include <errno.h>
24831 #if HAVE_UNISTD_H
24832 # include <unistd.h>
24833 #else /* on Windows with MSVC */
24834 # include <direct.h>
24835 #endif
24836
24837 int
24838 main ()
24839 {
24840 int result = 0;
24841 if (!rmdir ("conftest.file/"))
24842 result |= 1;
24843 else if (errno != ENOTDIR)
24844 result |= 2;
24845 if (!rmdir ("conftest.dir/./"))
24846 result |= 4;
24847 return result;
24848
24849 ;
24850 return 0;
24851 }
24852 _ACEOF
24853 if ac_fn_c_try_run "$LINENO"; then :
24854 gl_cv_func_rmdir_works=yes
24855 else
24856 gl_cv_func_rmdir_works=no
24857 fi
24858 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24859 conftest.$ac_objext conftest.beam conftest.$ac_ext
24860 fi
24861
24862 rm -rf conftest.dir conftest.file
24863 fi
24864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
24865 $as_echo "$gl_cv_func_rmdir_works" >&6; }
24866 case "$gl_cv_func_rmdir_works" in
24867 *yes) ;;
24868 *)
24869 REPLACE_RMDIR=1
24870 ;;
24871 esac
24872
24873 if test $REPLACE_RMDIR = 1; then
24874
24875
24876
24877
24878
24879
24880
24881
24882 gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext"
24883
24884 fi
24885
24886
24887
24888
24889
24890 GNULIB_RMDIR=1
24891
24892
24893
24894
24895
24896 $as_echo "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
24897
24898
24899
24900
24901
24902 :
24903
24904
24905
24906
24907
24908
24909
24910
24911
24912
24913
24914 :
24915
24916
24917
24918
24919
24920 if test $ac_cv_func_secure_getenv = no; then
24921 HAVE_SECURE_GETENV=0
24922 fi
24923
24924 if test $HAVE_SECURE_GETENV = 0; then
24925
24926
24927
24928
24929
24930
24931
24932
24933 gl_LIBOBJS="$gl_LIBOBJS secure_getenv.$ac_objext"
24934
24935
24936 for ac_func in __secure_getenv
24937 do :
24938 ac_fn_c_check_func "$LINENO" "__secure_getenv" "ac_cv_func___secure_getenv"
24939 if test "x$ac_cv_func___secure_getenv" = xyes; then :
24940 cat >>confdefs.h <<_ACEOF
24941 #define HAVE___SECURE_GETENV 1
24942 _ACEOF
24943
24944 fi
24945 done
24946
24947 if test $ac_cv_func___secure_getenv = no; then
24948 for ac_func in issetugid
24949 do :
24950 ac_fn_c_check_func "$LINENO" "issetugid" "ac_cv_func_issetugid"
24951 if test "x$ac_cv_func_issetugid" = xyes; then :
24952 cat >>confdefs.h <<_ACEOF
24953 #define HAVE_ISSETUGID 1
24954 _ACEOF
24955
24956 fi
24957 done
24958
24959 fi
24960
24961 :
24962
24963
24964
24965
24966
24967
24968
24969
24970
24971
24972
24973
24974
24975
24976
24977 fi
24978
24979
24980
24981
24982
24983 GNULIB_SECURE_GETENV=1
24984
24985
24986
24987
24988
24989 $as_echo "#define GNULIB_TEST_SECURE_GETENV 1" >>confdefs.h
24990
24991
24992
24993
24994
24995 if test $ac_cv_func_setenv = no; then
24996 HAVE_SETENV=0
24997 else
24998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
24999 $as_echo_n "checking whether setenv validates arguments... " >&6; }
25000 if ${gl_cv_func_setenv_works+:} false; then :
25001 $as_echo_n "(cached) " >&6
25002 else
25003 if test "$cross_compiling" = yes; then :
25004 case "$host_os" in
25005 # Guess yes on glibc systems.
25006 *-gnu*) gl_cv_func_setenv_works="guessing yes" ;;
25007 # If we don't know, assume the worst.
25008 *) gl_cv_func_setenv_works="guessing no" ;;
25009 esac
25010
25011 else
25012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25013 /* end confdefs.h. */
25014
25015 #include <stdlib.h>
25016 #include <errno.h>
25017 #include <string.h>
25018
25019 int
25020 main ()
25021 {
25022
25023 int result = 0;
25024 {
25025 if (setenv ("", "", 0) != -1)
25026 result |= 1;
25027 else if (errno != EINVAL)
25028 result |= 2;
25029 }
25030 {
25031 if (setenv ("a", "=", 1) != 0)
25032 result |= 4;
25033 else if (strcmp (getenv ("a"), "=") != 0)
25034 result |= 8;
25035 }
25036 return result;
25037
25038 ;
25039 return 0;
25040 }
25041 _ACEOF
25042 if ac_fn_c_try_run "$LINENO"; then :
25043 gl_cv_func_setenv_works=yes
25044 else
25045 gl_cv_func_setenv_works=no
25046 fi
25047 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25048 conftest.$ac_objext conftest.beam conftest.$ac_ext
25049 fi
25050
25051 fi
25052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
25053 $as_echo "$gl_cv_func_setenv_works" >&6; }
25054 case "$gl_cv_func_setenv_works" in
25055 *yes) ;;
25056 *)
25057 REPLACE_SETENV=1
25058 ;;
25059 esac
25060 fi
25061
25062 if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
25063
25064
25065
25066
25067
25068
25069
25070
25071 gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext"
25072
25073 fi
25074
25075
25076
25077
25078
25079 GNULIB_SETENV=1
25080
25081
25082
25083
25084
25085 $as_echo "#define GNULIB_TEST_SETENV 1" >>confdefs.h
25086
25087
25088
25089
25090
25091
25092
25093
25094
25095
25096
25097
25098
25099
25100 if test $gl_cv_have_include_next = yes; then
25101 gl_cv_next_signal_h='<'signal.h'>'
25102 else
25103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
25104 $as_echo_n "checking absolute name of <signal.h>... " >&6; }
25105 if ${gl_cv_next_signal_h+:} false; then :
25106 $as_echo_n "(cached) " >&6
25107 else
25108
25109
25110
25111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25112 /* end confdefs.h. */
25113 #include <signal.h>
25114 _ACEOF
25115 case "$host_os" in
25116 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25117 *) gl_absname_cpp="$ac_cpp" ;;
25118 esac
25119
25120 case "$host_os" in
25121 mingw*)
25122 gl_dirsep_regex='[/\\]'
25123 ;;
25124 *)
25125 gl_dirsep_regex='\/'
25126 ;;
25127 esac
25128 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25129 gl_header_literal_regex=`echo 'signal.h' \
25130 | sed -e "$gl_make_literal_regex_sed"`
25131 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25132 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25133 s|^/[^/]|//&|
25134 p
25135 q
25136 }'
25137
25138 gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25139 sed -n "$gl_absolute_header_sed"`
25140
25141 gl_header=$gl_cv_absolute_signal_h
25142 gl_cv_next_signal_h='"'$gl_header'"'
25143
25144
25145 fi
25146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
25147 $as_echo "$gl_cv_next_signal_h" >&6; }
25148 fi
25149 NEXT_SIGNAL_H=$gl_cv_next_signal_h
25150
25151 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25152 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25153 gl_next_as_first_directive='<'signal.h'>'
25154 else
25155 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25156 gl_next_as_first_directive=$gl_cv_next_signal_h
25157 fi
25158 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
25159
25160
25161
25162
25163
25164 # AIX declares sig_atomic_t to already include volatile, and C89 compilers
25165 # then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
25166 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
25167 #include <signal.h>
25168
25169 "
25170 if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes; then :
25171
25172 else
25173 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
25174 fi
25175
25176
25177
25178
25179
25180
25181
25182 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
25183 #include <signal.h>
25184
25185 "
25186 if test "x$ac_cv_type_sighandler_t" = xyes; then :
25187
25188 else
25189 HAVE_SIGHANDLER_T=0
25190 fi
25191
25192
25193
25194 for gl_func in pthread_sigmask sigaction sigaddset sigdelset sigemptyset sigfillset sigismember sigpending sigprocmask; do
25195 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
25196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
25197 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
25198 if eval \${$as_gl_Symbol+:} false; then :
25199 $as_echo_n "(cached) " >&6
25200 else
25201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25202 /* end confdefs.h. */
25203 #include <signal.h>
25204
25205 int
25206 main ()
25207 {
25208 #undef $gl_func
25209 (void) $gl_func;
25210 ;
25211 return 0;
25212 }
25213 _ACEOF
25214 if ac_fn_c_try_compile "$LINENO"; then :
25215 eval "$as_gl_Symbol=yes"
25216 else
25217 eval "$as_gl_Symbol=no"
25218 fi
25219 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25220 fi
25221 eval ac_res=\$$as_gl_Symbol
25222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
25223 $as_echo "$ac_res" >&6; }
25224 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
25225 cat >>confdefs.h <<_ACEOF
25226 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
25227 _ACEOF
25228
25229 eval ac_cv_have_decl_$gl_func=yes
25230 fi
25231 done
25232
25233
25234 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
25235 /* <sys/types.h> is not needed according to POSIX, but the
25236 <sys/socket.h> in i386-unknown-freebsd4.10 and
25237 powerpc-apple-darwin5.5 required it. */
25238 #include <sys/types.h>
25239 #if HAVE_SYS_SOCKET_H
25240 # include <sys/socket.h>
25241 #elif HAVE_WS2TCPIP_H
25242 # include <ws2tcpip.h>
25243 #endif
25244
25245 "
25246 if test "x$ac_cv_type_socklen_t" = xyes; then :
25247
25248 else
25249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
25250 $as_echo_n "checking for socklen_t equivalent... " >&6; }
25251 if ${gl_cv_socklen_t_equiv+:} false; then :
25252 $as_echo_n "(cached) " >&6
25253 else
25254 # Systems have either "struct sockaddr *" or
25255 # "void *" as the second argument to getpeername
25256 gl_cv_socklen_t_equiv=
25257 for arg2 in "struct sockaddr" void; do
25258 for t in int size_t "unsigned int" "long int" "unsigned long int"; do
25259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25260 /* end confdefs.h. */
25261 #include <sys/types.h>
25262 #include <sys/socket.h>
25263
25264 int getpeername (int, $arg2 *, $t *);
25265 int
25266 main ()
25267 {
25268 $t len;
25269 getpeername (0, 0, &len);
25270 ;
25271 return 0;
25272 }
25273 _ACEOF
25274 if ac_fn_c_try_compile "$LINENO"; then :
25275 gl_cv_socklen_t_equiv="$t"
25276 fi
25277 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25278 test "$gl_cv_socklen_t_equiv" != "" && break
25279 done
25280 test "$gl_cv_socklen_t_equiv" != "" && break
25281 done
25282
25283 fi
25284
25285 if test "$gl_cv_socklen_t_equiv" = ""; then
25286 as_fn_error $? "Cannot find a type to use in place of socklen_t" "$LINENO" 5
25287 fi
25288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
25289 $as_echo "$gl_cv_socklen_t_equiv" >&6; }
25290
25291 cat >>confdefs.h <<_ACEOF
25292 #define socklen_t $gl_cv_socklen_t_equiv
25293 _ACEOF
25294
25295 fi
25296
25297
25298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
25299 $as_echo_n "checking for ssize_t... " >&6; }
25300 if ${gt_cv_ssize_t+:} false; then :
25301 $as_echo_n "(cached) " >&6
25302 else
25303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25304 /* end confdefs.h. */
25305 #include <sys/types.h>
25306 int
25307 main ()
25308 {
25309 int x = sizeof (ssize_t *) + sizeof (ssize_t);
25310 return !x;
25311 ;
25312 return 0;
25313 }
25314 _ACEOF
25315 if ac_fn_c_try_compile "$LINENO"; then :
25316 gt_cv_ssize_t=yes
25317 else
25318 gt_cv_ssize_t=no
25319 fi
25320 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25321 fi
25322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
25323 $as_echo "$gt_cv_ssize_t" >&6; }
25324 if test $gt_cv_ssize_t = no; then
25325
25326 $as_echo "#define ssize_t int" >>confdefs.h
25327
25328 fi
25329
25330
25331
25332
25333 :
25334
25335
25336
25337
25338
25339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
25340 $as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
25341 if ${gl_cv_func_stat_dir_slash+:} false; then :
25342 $as_echo_n "(cached) " >&6
25343 else
25344 if test "$cross_compiling" = yes; then :
25345 case $host_os in
25346 mingw*) gl_cv_func_stat_dir_slash="guessing no";;
25347 *) gl_cv_func_stat_dir_slash="guessing yes";;
25348 esac
25349 else
25350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25351 /* end confdefs.h. */
25352 #include <sys/stat.h>
25353
25354 int
25355 main ()
25356 {
25357 struct stat st; return stat (".", &st) != stat ("./", &st);
25358 ;
25359 return 0;
25360 }
25361 _ACEOF
25362 if ac_fn_c_try_run "$LINENO"; then :
25363 gl_cv_func_stat_dir_slash=yes
25364 else
25365 gl_cv_func_stat_dir_slash=no
25366 fi
25367 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25368 conftest.$ac_objext conftest.beam conftest.$ac_ext
25369 fi
25370
25371 fi
25372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
25373 $as_echo "$gl_cv_func_stat_dir_slash" >&6; }
25374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
25375 $as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
25376 if ${gl_cv_func_stat_file_slash+:} false; then :
25377 $as_echo_n "(cached) " >&6
25378 else
25379 touch conftest.tmp
25380 # Assume that if we have lstat, we can also check symlinks.
25381 if test $ac_cv_func_lstat = yes; then
25382 ln -s conftest.tmp conftest.lnk
25383 fi
25384 if test "$cross_compiling" = yes; then :
25385 case "$host_os" in
25386 # Guess yes on glibc systems.
25387 *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
25388 # If we don't know, assume the worst.
25389 *) gl_cv_func_stat_file_slash="guessing no" ;;
25390 esac
25391
25392 else
25393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25394 /* end confdefs.h. */
25395 #include <sys/stat.h>
25396
25397 int
25398 main ()
25399 {
25400 int result = 0;
25401 struct stat st;
25402 if (!stat ("conftest.tmp/", &st))
25403 result |= 1;
25404 #if HAVE_LSTAT
25405 if (!stat ("conftest.lnk/", &st))
25406 result |= 2;
25407 #endif
25408 return result;
25409
25410 ;
25411 return 0;
25412 }
25413 _ACEOF
25414 if ac_fn_c_try_run "$LINENO"; then :
25415 gl_cv_func_stat_file_slash=yes
25416 else
25417 gl_cv_func_stat_file_slash=no
25418 fi
25419 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25420 conftest.$ac_objext conftest.beam conftest.$ac_ext
25421 fi
25422
25423 rm -f conftest.tmp conftest.lnk
25424 fi
25425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
25426 $as_echo "$gl_cv_func_stat_file_slash" >&6; }
25427 case $gl_cv_func_stat_dir_slash in
25428 *no) REPLACE_STAT=1
25429
25430 $as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
25431 ;;
25432 esac
25433 case $gl_cv_func_stat_file_slash in
25434 *no) REPLACE_STAT=1
25435
25436 $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
25437 ;;
25438 esac
25439
25440 if test $REPLACE_STAT = 1; then
25441
25442
25443
25444
25445
25446
25447
25448
25449 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
25450
25451 :
25452 fi
25453
25454
25455
25456
25457
25458 GNULIB_STAT=1
25459
25460
25461
25462
25463
25464 $as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h
25465
25466
25467
25468
25469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
25470 $as_echo_n "checking for working stdalign.h... " >&6; }
25471 if ${gl_cv_header_working_stdalign_h+:} false; then :
25472 $as_echo_n "(cached) " >&6
25473 else
25474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25475 /* end confdefs.h. */
25476 #include <stdalign.h>
25477 #include <stddef.h>
25478
25479 /* Test that alignof yields a result consistent with offsetof.
25480 This catches GCC bug 52023
25481 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
25482 #ifdef __cplusplus
25483 template <class t> struct alignof_helper { char a; t b; };
25484 # define ao(type) offsetof (alignof_helper<type>, b)
25485 #else
25486 # define ao(type) offsetof (struct { char a; type b; }, b)
25487 #endif
25488 char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
25489 char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
25490 char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
25491
25492 /* Test _Alignas only on platforms where gnulib can help. */
25493 #if \
25494 ((defined __cplusplus && 201103 <= __cplusplus) \
25495 || (defined __APPLE__ && defined __MACH__ \
25496 ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
25497 : __GNUC__) \
25498 || __HP_cc || __HP_aCC || __IBMC__ || __IBMCPP__ \
25499 || __ICC || 0x5110 <= __SUNPRO_C \
25500 || 1300 <= _MSC_VER)
25501 struct alignas_test { char c; char alignas (8) alignas_8; };
25502 char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
25503 ? 1 : -1];
25504 #endif
25505
25506 int
25507 main ()
25508 {
25509
25510 ;
25511 return 0;
25512 }
25513 _ACEOF
25514 if ac_fn_c_try_compile "$LINENO"; then :
25515 gl_cv_header_working_stdalign_h=yes
25516 else
25517 gl_cv_header_working_stdalign_h=no
25518 fi
25519 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25520 fi
25521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
25522 $as_echo "$gl_cv_header_working_stdalign_h" >&6; }
25523
25524 if test $gl_cv_header_working_stdalign_h = yes; then
25525 STDALIGN_H=''
25526 else
25527 STDALIGN_H='stdalign.h'
25528 fi
25529
25530
25531 if test -n "$STDALIGN_H"; then
25532 GL_GENERATE_STDALIGN_H_TRUE=
25533 GL_GENERATE_STDALIGN_H_FALSE='#'
25534 else
25535 GL_GENERATE_STDALIGN_H_TRUE='#'
25536 GL_GENERATE_STDALIGN_H_FALSE=
25537 fi
25538
25539
25540
25541
25542
25543 # Define two additional variables used in the Makefile substitution.
25544
25545 if test "$ac_cv_header_stdbool_h" = yes; then
25546 STDBOOL_H=''
25547 else
25548 STDBOOL_H='stdbool.h'
25549 fi
25550
25551 if test -n "$STDBOOL_H"; then
25552 GL_GENERATE_STDBOOL_H_TRUE=
25553 GL_GENERATE_STDBOOL_H_FALSE='#'
25554 else
25555 GL_GENERATE_STDBOOL_H_TRUE='#'
25556 GL_GENERATE_STDBOOL_H_FALSE=
25557 fi
25558
25559
25560 if test "$ac_cv_type__Bool" = yes; then
25561 HAVE__BOOL=1
25562 else
25563 HAVE__BOOL=0
25564 fi
25565
25566
25567
25568
25569
25570 STDDEF_H=
25571 ac_fn_c_check_type "$LINENO" "max_align_t" "ac_cv_type_max_align_t" "#include <stddef.h>
25572
25573 "
25574 if test "x$ac_cv_type_max_align_t" = xyes; then :
25575
25576 else
25577 HAVE_MAX_ALIGN_T=0; STDDEF_H=stddef.h
25578 fi
25579
25580 if test $gt_cv_c_wchar_t = no; then
25581 HAVE_WCHAR_T=0
25582 STDDEF_H=stddef.h
25583 fi
25584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
25585 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
25586 if ${gl_cv_decl_null_works+:} false; then :
25587 $as_echo_n "(cached) " >&6
25588 else
25589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25590 /* end confdefs.h. */
25591 #include <stddef.h>
25592 int test[2 * (sizeof NULL == sizeof (void *)) -1];
25593
25594 int
25595 main ()
25596 {
25597
25598 ;
25599 return 0;
25600 }
25601 _ACEOF
25602 if ac_fn_c_try_compile "$LINENO"; then :
25603 gl_cv_decl_null_works=yes
25604 else
25605 gl_cv_decl_null_works=no
25606 fi
25607 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25608 fi
25609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
25610 $as_echo "$gl_cv_decl_null_works" >&6; }
25611 if test $gl_cv_decl_null_works = no; then
25612 REPLACE_NULL=1
25613 STDDEF_H=stddef.h
25614 fi
25615
25616 if test -n "$STDDEF_H"; then
25617 GL_GENERATE_STDDEF_H_TRUE=
25618 GL_GENERATE_STDDEF_H_FALSE='#'
25619 else
25620 GL_GENERATE_STDDEF_H_TRUE='#'
25621 GL_GENERATE_STDDEF_H_FALSE=
25622 fi
25623
25624 if test -n "$STDDEF_H"; then
25625
25626
25627
25628
25629
25630
25631
25632
25633 if test $gl_cv_have_include_next = yes; then
25634 gl_cv_next_stddef_h='<'stddef.h'>'
25635 else
25636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
25637 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
25638 if ${gl_cv_next_stddef_h+:} false; then :
25639 $as_echo_n "(cached) " >&6
25640 else
25641
25642
25643
25644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25645 /* end confdefs.h. */
25646 #include <stddef.h>
25647 _ACEOF
25648 case "$host_os" in
25649 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25650 *) gl_absname_cpp="$ac_cpp" ;;
25651 esac
25652
25653 case "$host_os" in
25654 mingw*)
25655 gl_dirsep_regex='[/\\]'
25656 ;;
25657 *)
25658 gl_dirsep_regex='\/'
25659 ;;
25660 esac
25661 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25662 gl_header_literal_regex=`echo 'stddef.h' \
25663 | sed -e "$gl_make_literal_regex_sed"`
25664 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25665 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25666 s|^/[^/]|//&|
25667 p
25668 q
25669 }'
25670
25671 gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25672 sed -n "$gl_absolute_header_sed"`
25673
25674 gl_header=$gl_cv_absolute_stddef_h
25675 gl_cv_next_stddef_h='"'$gl_header'"'
25676
25677
25678 fi
25679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
25680 $as_echo "$gl_cv_next_stddef_h" >&6; }
25681 fi
25682 NEXT_STDDEF_H=$gl_cv_next_stddef_h
25683
25684 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25685 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25686 gl_next_as_first_directive='<'stddef.h'>'
25687 else
25688 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25689 gl_next_as_first_directive=$gl_cv_next_stddef_h
25690 fi
25691 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
25692
25693
25694
25695
25696 fi
25697
25698
25699
25700
25701 $as_echo "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
25702
25703
25704
25705
25706
25707
25708
25709
25710
25711
25712 if test $gl_cv_have_include_next = yes; then
25713 gl_cv_next_stdio_h='<'stdio.h'>'
25714 else
25715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
25716 $as_echo_n "checking absolute name of <stdio.h>... " >&6; }
25717 if ${gl_cv_next_stdio_h+:} false; then :
25718 $as_echo_n "(cached) " >&6
25719 else
25720
25721
25722
25723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25724 /* end confdefs.h. */
25725 #include <stdio.h>
25726 _ACEOF
25727 case "$host_os" in
25728 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25729 *) gl_absname_cpp="$ac_cpp" ;;
25730 esac
25731
25732 case "$host_os" in
25733 mingw*)
25734 gl_dirsep_regex='[/\\]'
25735 ;;
25736 *)
25737 gl_dirsep_regex='\/'
25738 ;;
25739 esac
25740 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25741 gl_header_literal_regex=`echo 'stdio.h' \
25742 | sed -e "$gl_make_literal_regex_sed"`
25743 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25744 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25745 s|^/[^/]|//&|
25746 p
25747 q
25748 }'
25749
25750 gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25751 sed -n "$gl_absolute_header_sed"`
25752
25753 gl_header=$gl_cv_absolute_stdio_h
25754 gl_cv_next_stdio_h='"'$gl_header'"'
25755
25756
25757 fi
25758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
25759 $as_echo "$gl_cv_next_stdio_h" >&6; }
25760 fi
25761 NEXT_STDIO_H=$gl_cv_next_stdio_h
25762
25763 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25764 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25765 gl_next_as_first_directive='<'stdio.h'>'
25766 else
25767 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25768 gl_next_as_first_directive=$gl_cv_next_stdio_h
25769 fi
25770 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
25771
25772
25773
25774
25775
25776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
25777 $as_echo_n "checking which flavor of printf attribute matches inttypes macros... " >&6; }
25778 if ${gl_cv_func_printf_attribute_flavor+:} false; then :
25779 $as_echo_n "(cached) " >&6
25780 else
25781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25782 /* end confdefs.h. */
25783
25784 #define __STDC_FORMAT_MACROS 1
25785 #include <stdio.h>
25786 #include <inttypes.h>
25787 /* For non-mingw systems, compilation will trivially succeed.
25788 For mingw, compilation will succeed for older mingw (system
25789 printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
25790 #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) && \
25791 (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
25792 extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
25793 #endif
25794
25795 int
25796 main ()
25797 {
25798
25799 ;
25800 return 0;
25801 }
25802 _ACEOF
25803 if ac_fn_c_try_compile "$LINENO"; then :
25804 gl_cv_func_printf_attribute_flavor=system
25805 else
25806 gl_cv_func_printf_attribute_flavor=gnu
25807 fi
25808 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25809 fi
25810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
25811 $as_echo "$gl_cv_func_printf_attribute_flavor" >&6; }
25812 if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
25813
25814 $as_echo "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
25815
25816 fi
25817
25818 GNULIB_FSCANF=1
25819
25820
25821 cat >>confdefs.h <<_ACEOF
25822 #define GNULIB_FSCANF 1
25823 _ACEOF
25824
25825
25826 GNULIB_SCANF=1
25827
25828
25829 cat >>confdefs.h <<_ACEOF
25830 #define GNULIB_SCANF 1
25831 _ACEOF
25832
25833
25834 GNULIB_FGETC=1
25835 GNULIB_GETC=1
25836 GNULIB_GETCHAR=1
25837 GNULIB_FGETS=1
25838 GNULIB_FREAD=1
25839
25840
25841 GNULIB_FPRINTF=1
25842 GNULIB_PRINTF=1
25843 GNULIB_VFPRINTF=1
25844 GNULIB_VPRINTF=1
25845 GNULIB_FPUTC=1
25846 GNULIB_PUTC=1
25847 GNULIB_PUTCHAR=1
25848 GNULIB_FPUTS=1
25849 GNULIB_PUTS=1
25850 GNULIB_FWRITE=1
25851
25852
25853
25854
25855 for gl_func in dprintf fpurge fseeko ftello getdelim getline gets pclose popen renameat snprintf tmpfile vdprintf vsnprintf; do
25856 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
25857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
25858 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
25859 if eval \${$as_gl_Symbol+:} false; then :
25860 $as_echo_n "(cached) " >&6
25861 else
25862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25863 /* end confdefs.h. */
25864 #include <stdio.h>
25865
25866 int
25867 main ()
25868 {
25869 #undef $gl_func
25870 (void) $gl_func;
25871 ;
25872 return 0;
25873 }
25874 _ACEOF
25875 if ac_fn_c_try_compile "$LINENO"; then :
25876 eval "$as_gl_Symbol=yes"
25877 else
25878 eval "$as_gl_Symbol=no"
25879 fi
25880 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25881 fi
25882 eval ac_res=\$$as_gl_Symbol
25883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
25884 $as_echo "$ac_res" >&6; }
25885 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
25886 cat >>confdefs.h <<_ACEOF
25887 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
25888 _ACEOF
25889
25890 eval ac_cv_have_decl_$gl_func=yes
25891 fi
25892 done
25893
25894
25895
25896
25897
25898
25899
25900
25901
25902
25903
25904
25905 if test $gl_cv_have_include_next = yes; then
25906 gl_cv_next_stdlib_h='<'stdlib.h'>'
25907 else
25908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
25909 $as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
25910 if ${gl_cv_next_stdlib_h+:} false; then :
25911 $as_echo_n "(cached) " >&6
25912 else
25913
25914
25915
25916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25917 /* end confdefs.h. */
25918 #include <stdlib.h>
25919 _ACEOF
25920 case "$host_os" in
25921 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25922 *) gl_absname_cpp="$ac_cpp" ;;
25923 esac
25924
25925 case "$host_os" in
25926 mingw*)
25927 gl_dirsep_regex='[/\\]'
25928 ;;
25929 *)
25930 gl_dirsep_regex='\/'
25931 ;;
25932 esac
25933 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25934 gl_header_literal_regex=`echo 'stdlib.h' \
25935 | sed -e "$gl_make_literal_regex_sed"`
25936 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25937 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25938 s|^/[^/]|//&|
25939 p
25940 q
25941 }'
25942
25943 gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25944 sed -n "$gl_absolute_header_sed"`
25945
25946 gl_header=$gl_cv_absolute_stdlib_h
25947 gl_cv_next_stdlib_h='"'$gl_header'"'
25948
25949
25950 fi
25951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
25952 $as_echo "$gl_cv_next_stdlib_h" >&6; }
25953 fi
25954 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
25955
25956 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25957 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25958 gl_next_as_first_directive='<'stdlib.h'>'
25959 else
25960 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25961 gl_next_as_first_directive=$gl_cv_next_stdlib_h
25962 fi
25963 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
25964
25965
25966
25967
25968
25969
25970 for gl_func in _Exit atoll canonicalize_file_name getloadavg getsubopt grantpt initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps posix_openpt ptsname ptsname_r qsort_r random random_r realpath rpmatch secure_getenv setenv setstate setstate_r srandom srandom_r strtod strtoll strtoull unlockpt unsetenv; do
25971 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
25972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
25973 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
25974 if eval \${$as_gl_Symbol+:} false; then :
25975 $as_echo_n "(cached) " >&6
25976 else
25977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25978 /* end confdefs.h. */
25979 #include <stdlib.h>
25980 #if HAVE_SYS_LOADAVG_H
25981 # include <sys/loadavg.h>
25982 #endif
25983 #if HAVE_RANDOM_H
25984 # include <random.h>
25985 #endif
25986
25987 int
25988 main ()
25989 {
25990 #undef $gl_func
25991 (void) $gl_func;
25992 ;
25993 return 0;
25994 }
25995 _ACEOF
25996 if ac_fn_c_try_compile "$LINENO"; then :
25997 eval "$as_gl_Symbol=yes"
25998 else
25999 eval "$as_gl_Symbol=no"
26000 fi
26001 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26002 fi
26003 eval ac_res=\$$as_gl_Symbol
26004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
26005 $as_echo "$ac_res" >&6; }
26006 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
26007 cat >>confdefs.h <<_ACEOF
26008 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
26009 _ACEOF
26010
26011 eval ac_cv_have_decl_$gl_func=yes
26012 fi
26013 done
26014
26015
26016
26017
26018
26019
26020 for ac_func in strchrnul
26021 do :
26022 ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
26023 if test "x$ac_cv_func_strchrnul" = xyes; then :
26024 cat >>confdefs.h <<_ACEOF
26025 #define HAVE_STRCHRNUL 1
26026 _ACEOF
26027
26028 fi
26029 done
26030
26031 if test $ac_cv_func_strchrnul = no; then
26032 HAVE_STRCHRNUL=0
26033 else
26034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5
26035 $as_echo_n "checking whether strchrnul works... " >&6; }
26036 if ${gl_cv_func_strchrnul_works+:} false; then :
26037 $as_echo_n "(cached) " >&6
26038 else
26039 if test "$cross_compiling" = yes; then :
26040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26041 /* end confdefs.h. */
26042
26043 #if defined __CYGWIN__
26044 #include <cygwin/version.h>
26045 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9)
26046 Lucky user
26047 #endif
26048 #else
26049 Lucky user
26050 #endif
26051
26052 _ACEOF
26053 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26054 $EGREP "Lucky user" >/dev/null 2>&1; then :
26055 gl_cv_func_strchrnul_works="guessing yes"
26056 else
26057 gl_cv_func_strchrnul_works="guessing no"
26058 fi
26059 rm -f conftest*
26060
26061
26062 else
26063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26064 /* end confdefs.h. */
26065
26066 #include <string.h> /* for strchrnul */
26067
26068 int
26069 main ()
26070 {
26071 const char *buf = "a";
26072 return strchrnul (buf, 'b') != buf + 1;
26073
26074 ;
26075 return 0;
26076 }
26077 _ACEOF
26078 if ac_fn_c_try_run "$LINENO"; then :
26079 gl_cv_func_strchrnul_works=yes
26080 else
26081 gl_cv_func_strchrnul_works=no
26082 fi
26083 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26084 conftest.$ac_objext conftest.beam conftest.$ac_ext
26085 fi
26086
26087
26088 fi
26089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strchrnul_works" >&5
26090 $as_echo "$gl_cv_func_strchrnul_works" >&6; }
26091 case "$gl_cv_func_strchrnul_works" in
26092 *yes) ;;
26093 *) REPLACE_STRCHRNUL=1 ;;
26094 esac
26095 fi
26096
26097 if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
26098
26099
26100
26101
26102
26103
26104
26105
26106 gl_LIBOBJS="$gl_LIBOBJS strchrnul.$ac_objext"
26107
26108 :
26109 fi
26110
26111
26112
26113
26114
26115 GNULIB_STRCHRNUL=1
26116
26117
26118
26119
26120
26121 $as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
26122
26123
26124
26125
26126
26127
26128
26129 :
26130
26131
26132
26133
26134
26135 if test $ac_cv_func_strdup = yes; then
26136 if test $gl_cv_func_malloc_posix != yes; then
26137 REPLACE_STRDUP=1
26138 fi
26139 fi
26140
26141 :
26142
26143
26144
26145
26146
26147 if test $ac_cv_have_decl_strdup = no; then
26148 HAVE_DECL_STRDUP=0
26149 fi
26150
26151 if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
26152
26153
26154
26155
26156
26157
26158
26159
26160 gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext"
26161
26162 :
26163 fi
26164
26165
26166
26167
26168
26169 GNULIB_STRDUP=1
26170
26171
26172
26173
26174
26175 $as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
26176
26177
26178
26179
26180
26181
26182
26183
26184
26185
26186 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
26187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
26188 $as_echo_n "checking for working strerror function... " >&6; }
26189 if ${gl_cv_func_working_strerror+:} false; then :
26190 $as_echo_n "(cached) " >&6
26191 else
26192 if test "$cross_compiling" = yes; then :
26193 case "$host_os" in
26194 # Guess yes on glibc systems.
26195 *-gnu*) gl_cv_func_working_strerror="guessing yes" ;;
26196 # If we don't know, assume the worst.
26197 *) gl_cv_func_working_strerror="guessing no" ;;
26198 esac
26199
26200 else
26201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26202 /* end confdefs.h. */
26203 #include <string.h>
26204
26205 int
26206 main ()
26207 {
26208 if (!*strerror (-2)) return 1;
26209 ;
26210 return 0;
26211 }
26212 _ACEOF
26213 if ac_fn_c_try_run "$LINENO"; then :
26214 gl_cv_func_working_strerror=yes
26215 else
26216 gl_cv_func_working_strerror=no
26217 fi
26218 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26219 conftest.$ac_objext conftest.beam conftest.$ac_ext
26220 fi
26221
26222
26223 fi
26224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
26225 $as_echo "$gl_cv_func_working_strerror" >&6; }
26226 case "$gl_cv_func_working_strerror" in
26227 *yes) ;;
26228 *)
26229 REPLACE_STRERROR=1
26230 ;;
26231 esac
26232
26233 case "$gl_cv_func_strerror_r_works" in
26234 *no) REPLACE_STRERROR=1 ;;
26235 esac
26236
26237 else
26238 REPLACE_STRERROR=1
26239 fi
26240
26241 if test $REPLACE_STRERROR = 1; then
26242
26243
26244
26245
26246
26247
26248
26249
26250 gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
26251
26252 fi
26253
26254
26255 cat >>confdefs.h <<_ACEOF
26256 #define GNULIB_STRERROR 1
26257 _ACEOF
26258
26259
26260
26261
26262
26263
26264
26265 GNULIB_STRERROR=1
26266
26267
26268
26269
26270
26271 $as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
26272
26273
26274
26275
26276
26277 if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
26278
26279
26280
26281
26282
26283
26284
26285
26286 gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
26287
26288
26289
26290
26291
26292 :
26293
26294
26295
26296
26297
26298 if test $ac_cv_header_sys_socket_h != yes; then
26299 for ac_header in winsock2.h
26300 do :
26301 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
26302 if test "x$ac_cv_header_winsock2_h" = xyes; then :
26303 cat >>confdefs.h <<_ACEOF
26304 #define HAVE_WINSOCK2_H 1
26305 _ACEOF
26306
26307 fi
26308
26309 done
26310
26311 fi
26312 if test "$ac_cv_header_winsock2_h" = yes; then
26313 HAVE_WINSOCK2_H=1
26314 UNISTD_H_HAVE_WINSOCK2_H=1
26315 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
26316 else
26317 HAVE_WINSOCK2_H=0
26318 fi
26319
26320
26321 fi
26322
26323
26324
26325
26326
26327
26328 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
26329 if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
26330 HAVE_DECL_STRERROR_R=1
26331 else
26332 HAVE_DECL_STRERROR_R=0
26333 fi
26334
26335
26336 cat >>confdefs.h <<_ACEOF
26337 #define HAVE_DECL_STRERROR_R_ORIG $HAVE_DECL_STRERROR_R
26338 _ACEOF
26339
26340
26341 if test $ac_cv_func_strerror_r = yes; then
26342 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
26343 if test $gl_cv_func_strerror_r_posix_signature = yes; then
26344 case "$gl_cv_func_strerror_r_works" in
26345 *no) REPLACE_STRERROR_R=1 ;;
26346 esac
26347 else
26348 REPLACE_STRERROR_R=1
26349 fi
26350 else
26351 REPLACE_STRERROR_R=1
26352 fi
26353 fi
26354
26355 # Overwrite the findings of AC_FUNC_STRERROR_R (for code that uses that).
26356
26357
26358 if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then
26359
26360
26361
26362
26363
26364
26365
26366
26367 gl_LIBOBJS="$gl_LIBOBJS strerror_r.$ac_objext"
26368
26369
26370
26371 :
26372
26373
26374
26375
26376
26377
26378 :
26379
26380
26381
26382
26383
26384
26385 :
26386
26387
26388
26389
26390
26391
26392 fi
26393
26394
26395
26396
26397
26398 GNULIB_STRERROR_R=1
26399
26400
26401
26402
26403
26404 $as_echo "#define GNULIB_TEST_STRERROR_R 1" >>confdefs.h
26405
26406
26407
26408
26409
26410
26411
26412
26413 if test $REPLACE_STRSTR = 0; then
26414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works in linear time" >&5
26415 $as_echo_n "checking whether strstr works in linear time... " >&6; }
26416 if ${gl_cv_func_strstr_linear+:} false; then :
26417 $as_echo_n "(cached) " >&6
26418 else
26419 if test "$cross_compiling" = yes; then :
26420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26421 /* end confdefs.h. */
26422
26423 #include <features.h>
26424 #ifdef __GNU_LIBRARY__
26425 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
26426 && !(defined __i386__ || defined __x86_64__) \
26427 && !defined __UCLIBC__
26428 Lucky user
26429 #endif
26430 #endif
26431 #ifdef __CYGWIN__
26432 #include <cygwin/version.h>
26433 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
26434 Lucky user
26435 #endif
26436 #endif
26437
26438 _ACEOF
26439 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26440 $EGREP "Lucky user" >/dev/null 2>&1; then :
26441 gl_cv_func_strstr_linear="guessing yes"
26442 else
26443 gl_cv_func_strstr_linear="guessing no"
26444 fi
26445 rm -f conftest*
26446
26447
26448 else
26449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26450 /* end confdefs.h. */
26451
26452 #ifdef __MVS__
26453 /* z/OS does not deliver signals while strstr() is running (thanks to
26454 restrictions on its LE runtime), which prevents us from limiting the
26455 running time of this test. */
26456 # error "This test does not work properly on z/OS"
26457 #endif
26458 #include <signal.h> /* for signal */
26459 #include <string.h> /* for strstr */
26460 #include <stdlib.h> /* for malloc */
26461 #include <unistd.h> /* for alarm */
26462 static void quit (int sig) { _exit (sig + 128); }
26463
26464 int
26465 main ()
26466 {
26467
26468 int result = 0;
26469 size_t m = 1000000;
26470 char *haystack = (char *) malloc (2 * m + 2);
26471 char *needle = (char *) malloc (m + 2);
26472 /* Failure to compile this test due to missing alarm is okay,
26473 since all such platforms (mingw) also have quadratic strstr. */
26474 signal (SIGALRM, quit);
26475 alarm (5);
26476 /* Check for quadratic performance. */
26477 if (haystack && needle)
26478 {
26479 memset (haystack, 'A', 2 * m);
26480 haystack[2 * m] = 'B';
26481 haystack[2 * m + 1] = 0;
26482 memset (needle, 'A', m);
26483 needle[m] = 'B';
26484 needle[m + 1] = 0;
26485 if (!strstr (haystack, needle))
26486 result |= 1;
26487 }
26488 return result;
26489
26490 ;
26491 return 0;
26492 }
26493 _ACEOF
26494 if ac_fn_c_try_run "$LINENO"; then :
26495 gl_cv_func_strstr_linear=yes
26496 else
26497 gl_cv_func_strstr_linear=no
26498 fi
26499 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26500 conftest.$ac_objext conftest.beam conftest.$ac_ext
26501 fi
26502
26503
26504 fi
26505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_linear" >&5
26506 $as_echo "$gl_cv_func_strstr_linear" >&6; }
26507 case "$gl_cv_func_strstr_linear" in
26508 *yes) ;;
26509 *)
26510 REPLACE_STRSTR=1
26511 ;;
26512 esac
26513 fi
26514
26515 if test $REPLACE_STRSTR = 1; then
26516
26517
26518
26519
26520
26521
26522
26523
26524 gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
26525
26526 fi
26527
26528
26529
26530 if test "$gl_cv_func_memchr_works" != yes; then
26531 REPLACE_STRSTR=1
26532 else
26533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
26534 $as_echo_n "checking whether strstr works... " >&6; }
26535 if ${gl_cv_func_strstr_works_always+:} false; then :
26536 $as_echo_n "(cached) " >&6
26537 else
26538 if test "$cross_compiling" = yes; then :
26539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26540 /* end confdefs.h. */
26541
26542 #ifdef __GNU_LIBRARY__
26543 #include <features.h>
26544 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
26545 || defined __UCLIBC__
26546 Lucky user
26547 #endif
26548 #elif defined __CYGWIN__
26549 #include <cygwin/version.h>
26550 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
26551 Lucky user
26552 #endif
26553 #else
26554 Lucky user
26555 #endif
26556
26557 _ACEOF
26558 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26559 $EGREP "Lucky user" >/dev/null 2>&1; then :
26560 gl_cv_func_strstr_works_always="guessing yes"
26561 else
26562 gl_cv_func_strstr_works_always="guessing no"
26563 fi
26564 rm -f conftest*
26565
26566
26567 else
26568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26569 /* end confdefs.h. */
26570
26571 #include <string.h> /* for strstr */
26572 #define P "_EF_BF_BD"
26573 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
26574 #define NEEDLE P P P P P
26575
26576 int
26577 main ()
26578 {
26579 return !!strstr (HAYSTACK, NEEDLE);
26580
26581 ;
26582 return 0;
26583 }
26584 _ACEOF
26585 if ac_fn_c_try_run "$LINENO"; then :
26586 gl_cv_func_strstr_works_always=yes
26587 else
26588 gl_cv_func_strstr_works_always=no
26589 fi
26590 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26591 conftest.$ac_objext conftest.beam conftest.$ac_ext
26592 fi
26593
26594
26595 fi
26596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
26597 $as_echo "$gl_cv_func_strstr_works_always" >&6; }
26598 case "$gl_cv_func_strstr_works_always" in
26599 *yes) ;;
26600 *)
26601 REPLACE_STRSTR=1
26602 ;;
26603 esac
26604 fi
26605
26606 if test $REPLACE_STRSTR = 1; then
26607
26608
26609
26610
26611
26612
26613
26614
26615 gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
26616
26617 fi
26618
26619
26620
26621
26622
26623 GNULIB_STRSTR=1
26624
26625
26626
26627
26628
26629 $as_echo "#define GNULIB_TEST_STRSTR 1" >>confdefs.h
26630
26631
26632
26633
26634
26635
26636
26637 for ac_func in strtok_r
26638 do :
26639 ac_fn_c_check_func "$LINENO" "strtok_r" "ac_cv_func_strtok_r"
26640 if test "x$ac_cv_func_strtok_r" = xyes; then :
26641 cat >>confdefs.h <<_ACEOF
26642 #define HAVE_STRTOK_R 1
26643 _ACEOF
26644
26645 fi
26646 done
26647
26648 if test $ac_cv_func_strtok_r = yes; then
26649 HAVE_STRTOK_R=1
26650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtok_r works" >&5
26651 $as_echo_n "checking whether strtok_r works... " >&6; }
26652 if ${gl_cv_func_strtok_r_works+:} false; then :
26653 $as_echo_n "(cached) " >&6
26654 else
26655 if test "$cross_compiling" = yes; then :
26656
26657 case "$host_os" in
26658 # Guess no on glibc systems.
26659 *-gnu*) gl_cv_func_strtok_r_works="guessing no";;
26660 *) gl_cv_func_strtok_r_works="guessing yes";;
26661 esac
26662
26663 else
26664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26665 /* end confdefs.h. */
26666
26667 #ifndef __OPTIMIZE__
26668 # define __OPTIMIZE__ 1
26669 #endif
26670 #undef __OPTIMIZE_SIZE__
26671 #undef __NO_INLINE__
26672 #include <stdlib.h>
26673 #include <string.h>
26674
26675 int
26676 main ()
26677 {
26678 static const char dummy[] = "\177\01a";
26679 char delimiters[] = "xxxxxxxx";
26680 char *save_ptr = (char *) dummy;
26681 strtok_r (delimiters, "x", &save_ptr);
26682 strtok_r (NULL, "x", &save_ptr);
26683 return 0;
26684
26685 ;
26686 return 0;
26687 }
26688
26689 _ACEOF
26690 if ac_fn_c_try_run "$LINENO"; then :
26691 gl_cv_func_strtok_r_works=yes
26692 else
26693 gl_cv_func_strtok_r_works=no
26694 fi
26695 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26696 conftest.$ac_objext conftest.beam conftest.$ac_ext
26697 fi
26698
26699
26700 fi
26701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtok_r_works" >&5
26702 $as_echo "$gl_cv_func_strtok_r_works" >&6; }
26703 case "$gl_cv_func_strtok_r_works" in
26704 *no)
26705 UNDEFINE_STRTOK_R=1
26706 ;;
26707 esac
26708 else
26709 HAVE_STRTOK_R=0
26710 fi
26711
26712 :
26713
26714
26715
26716
26717
26718 if test $ac_cv_have_decl_strtok_r = no; then
26719 HAVE_DECL_STRTOK_R=0
26720 fi
26721
26722 if test $HAVE_STRTOK_R = 0 || test $REPLACE_STRTOK_R = 1; then
26723
26724
26725
26726
26727
26728
26729
26730
26731 gl_LIBOBJS="$gl_LIBOBJS strtok_r.$ac_objext"
26732
26733
26734 :
26735
26736 fi
26737
26738
26739
26740
26741
26742 GNULIB_STRTOK_R=1
26743
26744
26745
26746
26747
26748 $as_echo "#define GNULIB_TEST_STRTOK_R 1" >>confdefs.h
26749
26750
26751
26752
26753
26754
26755
26756
26757
26758
26759
26760
26761
26762
26763
26764
26765 :
26766
26767
26768
26769
26770
26771
26772
26773
26774 if test $gl_cv_have_include_next = yes; then
26775 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
26776 else
26777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
26778 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
26779 if ${gl_cv_next_sys_stat_h+:} false; then :
26780 $as_echo_n "(cached) " >&6
26781 else
26782
26783 if test $ac_cv_header_sys_stat_h = yes; then
26784
26785
26786
26787
26788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26789 /* end confdefs.h. */
26790 #include <sys/stat.h>
26791 _ACEOF
26792 case "$host_os" in
26793 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26794 *) gl_absname_cpp="$ac_cpp" ;;
26795 esac
26796
26797 case "$host_os" in
26798 mingw*)
26799 gl_dirsep_regex='[/\\]'
26800 ;;
26801 *)
26802 gl_dirsep_regex='\/'
26803 ;;
26804 esac
26805 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26806 gl_header_literal_regex=`echo 'sys/stat.h' \
26807 | sed -e "$gl_make_literal_regex_sed"`
26808 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26809 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26810 s|^/[^/]|//&|
26811 p
26812 q
26813 }'
26814
26815 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26816 sed -n "$gl_absolute_header_sed"`
26817
26818 gl_header=$gl_cv_absolute_sys_stat_h
26819 gl_cv_next_sys_stat_h='"'$gl_header'"'
26820 else
26821 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
26822 fi
26823
26824
26825 fi
26826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
26827 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
26828 fi
26829 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
26830
26831 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26832 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26833 gl_next_as_first_directive='<'sys/stat.h'>'
26834 else
26835 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26836 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
26837 fi
26838 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
26839
26840
26841
26842
26843
26844
26845
26846
26847
26848
26849
26850 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
26851
26852 $as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
26853
26854 fi
26855
26856 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
26857 #include <sys/stat.h>
26858 "
26859 if test "x$ac_cv_type_nlink_t" = xyes; then :
26860
26861 else
26862
26863 $as_echo "#define nlink_t int" >>confdefs.h
26864
26865 fi
26866
26867
26868
26869 for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do
26870 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
26871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
26872 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
26873 if eval \${$as_gl_Symbol+:} false; then :
26874 $as_echo_n "(cached) " >&6
26875 else
26876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26877 /* end confdefs.h. */
26878 #include <sys/stat.h>
26879
26880 int
26881 main ()
26882 {
26883 #undef $gl_func
26884 (void) $gl_func;
26885 ;
26886 return 0;
26887 }
26888 _ACEOF
26889 if ac_fn_c_try_compile "$LINENO"; then :
26890 eval "$as_gl_Symbol=yes"
26891 else
26892 eval "$as_gl_Symbol=no"
26893 fi
26894 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26895 fi
26896 eval ac_res=\$$as_gl_Symbol
26897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
26898 $as_echo "$ac_res" >&6; }
26899 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
26900 cat >>confdefs.h <<_ACEOF
26901 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
26902 _ACEOF
26903
26904 eval ac_cv_have_decl_$gl_func=yes
26905 fi
26906 done
26907
26908
26909
26910
26911
26912
26913
26914
26915
26916
26917
26918
26919
26920
26921
26922
26923
26924 :
26925
26926
26927
26928
26929
26930
26931
26932
26933 if test $gl_cv_have_include_next = yes; then
26934 gl_cv_next_sys_uio_h='<'sys/uio.h'>'
26935 else
26936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/uio.h>" >&5
26937 $as_echo_n "checking absolute name of <sys/uio.h>... " >&6; }
26938 if ${gl_cv_next_sys_uio_h+:} false; then :
26939 $as_echo_n "(cached) " >&6
26940 else
26941
26942 if test $ac_cv_header_sys_uio_h = yes; then
26943
26944
26945
26946
26947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26948 /* end confdefs.h. */
26949 #include <sys/uio.h>
26950 _ACEOF
26951 case "$host_os" in
26952 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26953 *) gl_absname_cpp="$ac_cpp" ;;
26954 esac
26955
26956 case "$host_os" in
26957 mingw*)
26958 gl_dirsep_regex='[/\\]'
26959 ;;
26960 *)
26961 gl_dirsep_regex='\/'
26962 ;;
26963 esac
26964 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26965 gl_header_literal_regex=`echo 'sys/uio.h' \
26966 | sed -e "$gl_make_literal_regex_sed"`
26967 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26968 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26969 s|^/[^/]|//&|
26970 p
26971 q
26972 }'
26973
26974 gl_cv_absolute_sys_uio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26975 sed -n "$gl_absolute_header_sed"`
26976
26977 gl_header=$gl_cv_absolute_sys_uio_h
26978 gl_cv_next_sys_uio_h='"'$gl_header'"'
26979 else
26980 gl_cv_next_sys_uio_h='<'sys/uio.h'>'
26981 fi
26982
26983
26984 fi
26985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_uio_h" >&5
26986 $as_echo "$gl_cv_next_sys_uio_h" >&6; }
26987 fi
26988 NEXT_SYS_UIO_H=$gl_cv_next_sys_uio_h
26989
26990 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26991 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26992 gl_next_as_first_directive='<'sys/uio.h'>'
26993 else
26994 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26995 gl_next_as_first_directive=$gl_cv_next_sys_uio_h
26996 fi
26997 NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H=$gl_next_as_first_directive
26998
26999
27000
27001
27002 if test $ac_cv_header_sys_uio_h = yes; then
27003 HAVE_SYS_UIO_H=1
27004 else
27005 HAVE_SYS_UIO_H=0
27006 fi
27007
27008
27009
27010
27011
27012 :
27013
27014
27015
27016
27017
27018
27019
27020
27021
27022
27023
27024
27025
27026
27027
27028 ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "#include <time.h>
27029 "
27030 if test "x$ac_cv_have_decl_localtime_r" = xyes; then :
27031 ac_have_decl=1
27032 else
27033 ac_have_decl=0
27034 fi
27035
27036 cat >>confdefs.h <<_ACEOF
27037 #define HAVE_DECL_LOCALTIME_R $ac_have_decl
27038 _ACEOF
27039
27040 if test $ac_cv_have_decl_localtime_r = no; then
27041 HAVE_DECL_LOCALTIME_R=0
27042 fi
27043
27044
27045 :
27046
27047
27048
27049
27050
27051 if test $ac_cv_func_localtime_r = yes; then
27052 HAVE_LOCALTIME_R=1
27053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
27054 $as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
27055 if ${gl_cv_time_r_posix+:} false; then :
27056 $as_echo_n "(cached) " >&6
27057 else
27058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27059 /* end confdefs.h. */
27060 #include <time.h>
27061 int
27062 main ()
27063 {
27064 /* We don't need to append 'restrict's to the argument types,
27065 even though the POSIX signature has the 'restrict's,
27066 since C99 says they can't affect type compatibility. */
27067 struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
27068 if (ptr) return 0;
27069 /* Check the return type is a pointer.
27070 On HP-UX 10 it is 'int'. */
27071 *localtime_r (0, 0);
27072 ;
27073 return 0;
27074 }
27075
27076 _ACEOF
27077 if ac_fn_c_try_compile "$LINENO"; then :
27078 gl_cv_time_r_posix=yes
27079 else
27080 gl_cv_time_r_posix=no
27081 fi
27082 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27083
27084 fi
27085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
27086 $as_echo "$gl_cv_time_r_posix" >&6; }
27087 if test $gl_cv_time_r_posix = yes; then
27088 REPLACE_LOCALTIME_R=0
27089 else
27090 REPLACE_LOCALTIME_R=1
27091 fi
27092 else
27093 HAVE_LOCALTIME_R=0
27094 fi
27095
27096 if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
27097
27098
27099
27100
27101
27102
27103
27104
27105 gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext"
27106
27107
27108 :
27109
27110 fi
27111
27112
27113
27114
27115
27116 GNULIB_TIME_R=1
27117
27118
27119
27120
27121
27122 $as_echo "#define GNULIB_TEST_TIME_R 1" >>confdefs.h
27123
27124
27125
27126
27127
27128
27129
27130
27131
27132
27133
27134
27135 :
27136
27137
27138
27139
27140
27141
27142
27143
27144 if test $gl_cv_have_include_next = yes; then
27145 gl_cv_next_unistd_h='<'unistd.h'>'
27146 else
27147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
27148 $as_echo_n "checking absolute name of <unistd.h>... " >&6; }
27149 if ${gl_cv_next_unistd_h+:} false; then :
27150 $as_echo_n "(cached) " >&6
27151 else
27152
27153 if test $ac_cv_header_unistd_h = yes; then
27154
27155
27156
27157
27158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27159 /* end confdefs.h. */
27160 #include <unistd.h>
27161 _ACEOF
27162 case "$host_os" in
27163 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27164 *) gl_absname_cpp="$ac_cpp" ;;
27165 esac
27166
27167 case "$host_os" in
27168 mingw*)
27169 gl_dirsep_regex='[/\\]'
27170 ;;
27171 *)
27172 gl_dirsep_regex='\/'
27173 ;;
27174 esac
27175 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27176 gl_header_literal_regex=`echo 'unistd.h' \
27177 | sed -e "$gl_make_literal_regex_sed"`
27178 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27179 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27180 s|^/[^/]|//&|
27181 p
27182 q
27183 }'
27184
27185 gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27186 sed -n "$gl_absolute_header_sed"`
27187
27188 gl_header=$gl_cv_absolute_unistd_h
27189 gl_cv_next_unistd_h='"'$gl_header'"'
27190 else
27191 gl_cv_next_unistd_h='<'unistd.h'>'
27192 fi
27193
27194
27195 fi
27196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
27197 $as_echo "$gl_cv_next_unistd_h" >&6; }
27198 fi
27199 NEXT_UNISTD_H=$gl_cv_next_unistd_h
27200
27201 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27202 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27203 gl_next_as_first_directive='<'unistd.h'>'
27204 else
27205 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27206 gl_next_as_first_directive=$gl_cv_next_unistd_h
27207 fi
27208 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
27209
27210
27211
27212
27213 if test $ac_cv_header_unistd_h = yes; then
27214 HAVE_UNISTD_H=1
27215 else
27216 HAVE_UNISTD_H=0
27217 fi
27218
27219
27220
27221
27222
27223
27224
27225 for gl_func in chdir chown dup dup2 dup3 environ euidaccess faccessat fchdir fchownat fdatasync fsync ftruncate getcwd getdomainname getdtablesize getgroups gethostname getlogin getlogin_r getpagesize getusershell setusershell endusershell group_member isatty lchown link linkat lseek pipe pipe2 pread pwrite readlink readlinkat rmdir sethostname sleep symlink symlinkat ttyname_r unlink unlinkat usleep; do
27226 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
27227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
27228 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
27229 if eval \${$as_gl_Symbol+:} false; then :
27230 $as_echo_n "(cached) " >&6
27231 else
27232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27233 /* end confdefs.h. */
27234
27235 #if HAVE_UNISTD_H
27236 # include <unistd.h>
27237 #endif
27238 /* Some systems declare various items in the wrong headers. */
27239 #if !(defined __GLIBC__ && !defined __UCLIBC__)
27240 # include <fcntl.h>
27241 # include <stdio.h>
27242 # include <stdlib.h>
27243 # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
27244 # include <io.h>
27245 # endif
27246 #endif
27247
27248 int
27249 main ()
27250 {
27251 #undef $gl_func
27252 (void) $gl_func;
27253 ;
27254 return 0;
27255 }
27256 _ACEOF
27257 if ac_fn_c_try_compile "$LINENO"; then :
27258 eval "$as_gl_Symbol=yes"
27259 else
27260 eval "$as_gl_Symbol=no"
27261 fi
27262 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27263 fi
27264 eval ac_res=\$$as_gl_Symbol
27265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
27266 $as_echo "$ac_res" >&6; }
27267 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
27268 cat >>confdefs.h <<_ACEOF
27269 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
27270 _ACEOF
27271
27272 eval ac_cv_have_decl_$gl_func=yes
27273 fi
27274 done
27275
27276
27277
27278
27279 :
27280
27281
27282
27283
27284
27285
27286
27287
27288
27289 :
27290
27291
27292
27293
27294
27295 if test $ac_cv_have_decl_unsetenv = no; then
27296 HAVE_DECL_UNSETENV=0
27297 fi
27298 for ac_func in unsetenv
27299 do :
27300 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
27301 if test "x$ac_cv_func_unsetenv" = xyes; then :
27302 cat >>confdefs.h <<_ACEOF
27303 #define HAVE_UNSETENV 1
27304 _ACEOF
27305
27306 fi
27307 done
27308
27309 if test $ac_cv_func_unsetenv = no; then
27310 HAVE_UNSETENV=0
27311 else
27312 HAVE_UNSETENV=1
27313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
27314 $as_echo_n "checking for unsetenv() return type... " >&6; }
27315 if ${gt_cv_func_unsetenv_ret+:} false; then :
27316 $as_echo_n "(cached) " >&6
27317 else
27318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27319 /* end confdefs.h. */
27320
27321 #undef _BSD
27322 #define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
27323 #include <stdlib.h>
27324 extern
27325 #ifdef __cplusplus
27326 "C"
27327 #endif
27328 int unsetenv (const char *name);
27329
27330 int
27331 main ()
27332 {
27333
27334 ;
27335 return 0;
27336 }
27337 _ACEOF
27338 if ac_fn_c_try_compile "$LINENO"; then :
27339 gt_cv_func_unsetenv_ret='int'
27340 else
27341 gt_cv_func_unsetenv_ret='void'
27342 fi
27343 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27344 fi
27345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
27346 $as_echo "$gt_cv_func_unsetenv_ret" >&6; }
27347 if test $gt_cv_func_unsetenv_ret = 'void'; then
27348
27349 $as_echo "#define VOID_UNSETENV 1" >>confdefs.h
27350
27351 REPLACE_UNSETENV=1
27352 fi
27353
27354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
27355 $as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
27356 if ${gl_cv_func_unsetenv_works+:} false; then :
27357 $as_echo_n "(cached) " >&6
27358 else
27359 if test "$cross_compiling" = yes; then :
27360 case "$host_os" in
27361 # Guess yes on glibc systems.
27362 *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
27363 # If we don't know, assume the worst.
27364 *) gl_cv_func_unsetenv_works="guessing no" ;;
27365 esac
27366
27367 else
27368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27369 /* end confdefs.h. */
27370
27371 #include <stdlib.h>
27372 #include <errno.h>
27373 extern char **environ;
27374
27375 int
27376 main ()
27377 {
27378
27379 char entry1[] = "a=1";
27380 char entry2[] = "b=2";
27381 char *env[] = { entry1, entry2, NULL };
27382 if (putenv ((char *) "a=1")) return 1;
27383 if (putenv (entry2)) return 2;
27384 entry2[0] = 'a';
27385 unsetenv ("a");
27386 if (getenv ("a")) return 3;
27387 if (!unsetenv ("") || errno != EINVAL) return 4;
27388 entry2[0] = 'b';
27389 environ = env;
27390 if (!getenv ("a")) return 5;
27391 entry2[0] = 'a';
27392 unsetenv ("a");
27393 if (getenv ("a")) return 6;
27394
27395 ;
27396 return 0;
27397 }
27398 _ACEOF
27399 if ac_fn_c_try_run "$LINENO"; then :
27400 gl_cv_func_unsetenv_works=yes
27401 else
27402 gl_cv_func_unsetenv_works=no
27403 fi
27404 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27405 conftest.$ac_objext conftest.beam conftest.$ac_ext
27406 fi
27407
27408 fi
27409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
27410 $as_echo "$gl_cv_func_unsetenv_works" >&6; }
27411 case "$gl_cv_func_unsetenv_works" in
27412 *yes) ;;
27413 *)
27414 REPLACE_UNSETENV=1
27415 ;;
27416 esac
27417 fi
27418
27419 if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
27420
27421
27422
27423
27424
27425
27426
27427
27428 gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
27429
27430
27431
27432
27433 :
27434
27435
27436
27437
27438
27439
27440 fi
27441
27442
27443
27444
27445
27446 GNULIB_UNSETENV=1
27447
27448
27449
27450
27451
27452 $as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
27453
27454
27455
27456
27457
27458
27459
27460
27461
27462
27463
27464
27465 :
27466
27467
27468
27469
27470
27471
27472
27473
27474 if test $gl_cv_have_include_next = yes; then
27475 gl_cv_next_wchar_h='<'wchar.h'>'
27476 else
27477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
27478 $as_echo_n "checking absolute name of <wchar.h>... " >&6; }
27479 if ${gl_cv_next_wchar_h+:} false; then :
27480 $as_echo_n "(cached) " >&6
27481 else
27482
27483 if test $ac_cv_header_wchar_h = yes; then
27484
27485
27486
27487
27488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27489 /* end confdefs.h. */
27490 #include <wchar.h>
27491 _ACEOF
27492 case "$host_os" in
27493 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27494 *) gl_absname_cpp="$ac_cpp" ;;
27495 esac
27496
27497 case "$host_os" in
27498 mingw*)
27499 gl_dirsep_regex='[/\\]'
27500 ;;
27501 *)
27502 gl_dirsep_regex='\/'
27503 ;;
27504 esac
27505 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27506 gl_header_literal_regex=`echo 'wchar.h' \
27507 | sed -e "$gl_make_literal_regex_sed"`
27508 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27509 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27510 s|^/[^/]|//&|
27511 p
27512 q
27513 }'
27514
27515 gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27516 sed -n "$gl_absolute_header_sed"`
27517
27518 gl_header=$gl_cv_absolute_wchar_h
27519 gl_cv_next_wchar_h='"'$gl_header'"'
27520 else
27521 gl_cv_next_wchar_h='<'wchar.h'>'
27522 fi
27523
27524
27525 fi
27526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
27527 $as_echo "$gl_cv_next_wchar_h" >&6; }
27528 fi
27529 NEXT_WCHAR_H=$gl_cv_next_wchar_h
27530
27531 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27532 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27533 gl_next_as_first_directive='<'wchar.h'>'
27534 else
27535 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27536 gl_next_as_first_directive=$gl_cv_next_wchar_h
27537 fi
27538 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
27539
27540
27541
27542
27543 if test $ac_cv_header_wchar_h = yes; then
27544 HAVE_WCHAR_H=1
27545 else
27546 HAVE_WCHAR_H=0
27547 fi
27548
27549
27550
27551
27552
27553 if test $gt_cv_c_wint_t = yes; then
27554 HAVE_WINT_T=1
27555 else
27556 HAVE_WINT_T=0
27557 fi
27558
27559
27560
27561 for gl_func in btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb wcsrtombs wcsnrtombs wcwidth wmemchr wmemcmp wmemcpy wmemmove wmemset wcslen wcsnlen wcscpy wcpcpy wcsncpy wcpncpy wcscat wcsncat wcscmp wcsncmp wcscasecmp wcsncasecmp wcscoll wcsxfrm wcsdup wcschr wcsrchr wcscspn wcsspn wcspbrk wcsstr wcstok wcswidth ; do
27562 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
27563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
27564 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
27565 if eval \${$as_gl_Symbol+:} false; then :
27566 $as_echo_n "(cached) " >&6
27567 else
27568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27569 /* end confdefs.h. */
27570
27571 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
27572 <wchar.h>.
27573 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
27574 included before <wchar.h>. */
27575 #if !(defined __GLIBC__ && !defined __UCLIBC__)
27576 # include <stddef.h>
27577 # include <stdio.h>
27578 # include <time.h>
27579 #endif
27580 #include <wchar.h>
27581
27582 int
27583 main ()
27584 {
27585 #undef $gl_func
27586 (void) $gl_func;
27587 ;
27588 return 0;
27589 }
27590 _ACEOF
27591 if ac_fn_c_try_compile "$LINENO"; then :
27592 eval "$as_gl_Symbol=yes"
27593 else
27594 eval "$as_gl_Symbol=no"
27595 fi
27596 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27597 fi
27598 eval ac_res=\$$as_gl_Symbol
27599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
27600 $as_echo "$ac_res" >&6; }
27601 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
27602 cat >>confdefs.h <<_ACEOF
27603 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
27604 _ACEOF
27605
27606 eval ac_cv_have_decl_$gl_func=yes
27607 fi
27608 done
27609
27610
27611
27612
27613
27614
27615
27616 :
27617
27618
27619
27620
27621
27622 if test $ac_cv_func_iswcntrl = yes; then
27623 HAVE_ISWCNTRL=1
27624 else
27625 HAVE_ISWCNTRL=0
27626 fi
27627
27628
27629
27630 if test $gt_cv_c_wint_t = yes; then
27631 HAVE_WINT_T=1
27632 else
27633 HAVE_WINT_T=0
27634 fi
27635
27636
27637
27638
27639
27640
27641
27642
27643 :
27644
27645
27646
27647
27648
27649
27650
27651
27652 if test $gl_cv_have_include_next = yes; then
27653 gl_cv_next_wctype_h='<'wctype.h'>'
27654 else
27655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
27656 $as_echo_n "checking absolute name of <wctype.h>... " >&6; }
27657 if ${gl_cv_next_wctype_h+:} false; then :
27658 $as_echo_n "(cached) " >&6
27659 else
27660
27661 if test $ac_cv_header_wctype_h = yes; then
27662
27663
27664
27665
27666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27667 /* end confdefs.h. */
27668 #include <wctype.h>
27669 _ACEOF
27670 case "$host_os" in
27671 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27672 *) gl_absname_cpp="$ac_cpp" ;;
27673 esac
27674
27675 case "$host_os" in
27676 mingw*)
27677 gl_dirsep_regex='[/\\]'
27678 ;;
27679 *)
27680 gl_dirsep_regex='\/'
27681 ;;
27682 esac
27683 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27684 gl_header_literal_regex=`echo 'wctype.h' \
27685 | sed -e "$gl_make_literal_regex_sed"`
27686 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27687 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27688 s|^/[^/]|//&|
27689 p
27690 q
27691 }'
27692
27693 gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27694 sed -n "$gl_absolute_header_sed"`
27695
27696 gl_header=$gl_cv_absolute_wctype_h
27697 gl_cv_next_wctype_h='"'$gl_header'"'
27698 else
27699 gl_cv_next_wctype_h='<'wctype.h'>'
27700 fi
27701
27702
27703 fi
27704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
27705 $as_echo "$gl_cv_next_wctype_h" >&6; }
27706 fi
27707 NEXT_WCTYPE_H=$gl_cv_next_wctype_h
27708
27709 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27710 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27711 gl_next_as_first_directive='<'wctype.h'>'
27712 else
27713 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27714 gl_next_as_first_directive=$gl_cv_next_wctype_h
27715 fi
27716 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
27717
27718
27719
27720
27721 if test $ac_cv_header_wctype_h = yes; then
27722 if test $ac_cv_func_iswcntrl = yes; then
27723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
27724 $as_echo_n "checking whether iswcntrl works... " >&6; }
27725 if ${gl_cv_func_iswcntrl_works+:} false; then :
27726 $as_echo_n "(cached) " >&6
27727 else
27728
27729 if test "$cross_compiling" = yes; then :
27730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27731 /* end confdefs.h. */
27732 #include <stdlib.h>
27733 #if __GNU_LIBRARY__ == 1
27734 Linux libc5 i18n is broken.
27735 #endif
27736 int
27737 main ()
27738 {
27739
27740 ;
27741 return 0;
27742 }
27743 _ACEOF
27744 if ac_fn_c_try_compile "$LINENO"; then :
27745 gl_cv_func_iswcntrl_works="guessing yes"
27746 else
27747 gl_cv_func_iswcntrl_works="guessing no"
27748 fi
27749 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27750
27751 else
27752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27753 /* end confdefs.h. */
27754
27755 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
27756 included before <wchar.h>.
27757 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
27758 must be included before <wchar.h>. */
27759 #include <stddef.h>
27760 #include <stdio.h>
27761 #include <time.h>
27762 #include <wchar.h>
27763 #include <wctype.h>
27764 int main () { return iswprint ('x') == 0; }
27765
27766 _ACEOF
27767 if ac_fn_c_try_run "$LINENO"; then :
27768 gl_cv_func_iswcntrl_works=yes
27769 else
27770 gl_cv_func_iswcntrl_works=no
27771 fi
27772 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27773 conftest.$ac_objext conftest.beam conftest.$ac_ext
27774 fi
27775
27776
27777 fi
27778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
27779 $as_echo "$gl_cv_func_iswcntrl_works" >&6; }
27780 fi
27781 HAVE_WCTYPE_H=1
27782 else
27783 HAVE_WCTYPE_H=0
27784 fi
27785
27786
27787 case "$gl_cv_func_iswcntrl_works" in
27788 *yes) REPLACE_ISWCNTRL=0 ;;
27789 *) REPLACE_ISWCNTRL=1 ;;
27790 esac
27791
27792
27793 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
27794 :
27795 fi
27796
27797 if test $REPLACE_ISWCNTRL = 1; then
27798 REPLACE_TOWLOWER=1
27799 else
27800 for ac_func in towlower
27801 do :
27802 ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
27803 if test "x$ac_cv_func_towlower" = xyes; then :
27804 cat >>confdefs.h <<_ACEOF
27805 #define HAVE_TOWLOWER 1
27806 _ACEOF
27807
27808 fi
27809 done
27810
27811 if test $ac_cv_func_towlower = yes; then
27812 REPLACE_TOWLOWER=0
27813 else
27814 ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
27815 included before <wchar.h>.
27816 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
27817 must be included before <wchar.h>. */
27818 #include <stddef.h>
27819 #include <stdio.h>
27820 #include <time.h>
27821 #include <wchar.h>
27822 #if HAVE_WCTYPE_H
27823 # include <wctype.h>
27824 #endif
27825
27826 "
27827 if test "x$ac_cv_have_decl_towlower" = xyes; then :
27828 ac_have_decl=1
27829 else
27830 ac_have_decl=0
27831 fi
27832
27833 cat >>confdefs.h <<_ACEOF
27834 #define HAVE_DECL_TOWLOWER $ac_have_decl
27835 _ACEOF
27836
27837 if test $ac_cv_have_decl_towlower = yes; then
27838 REPLACE_TOWLOWER=1
27839 else
27840 REPLACE_TOWLOWER=0
27841 fi
27842 fi
27843 fi
27844
27845
27846 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
27847 :
27848 fi
27849
27850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
27851 $as_echo_n "checking for wctype_t... " >&6; }
27852 if ${gl_cv_type_wctype_t+:} false; then :
27853 $as_echo_n "(cached) " >&6
27854 else
27855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27856 /* end confdefs.h. */
27857 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
27858 included before <wchar.h>.
27859 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
27860 must be included before <wchar.h>. */
27861 #include <stddef.h>
27862 #include <stdio.h>
27863 #include <time.h>
27864 #include <wchar.h>
27865 #if HAVE_WCTYPE_H
27866 # include <wctype.h>
27867 #endif
27868 wctype_t a;
27869
27870 int
27871 main ()
27872 {
27873
27874 ;
27875 return 0;
27876 }
27877 _ACEOF
27878 if ac_fn_c_try_compile "$LINENO"; then :
27879 gl_cv_type_wctype_t=yes
27880 else
27881 gl_cv_type_wctype_t=no
27882 fi
27883 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27884
27885 fi
27886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
27887 $as_echo "$gl_cv_type_wctype_t" >&6; }
27888 if test $gl_cv_type_wctype_t = no; then
27889 HAVE_WCTYPE_T=0
27890 fi
27891
27892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
27893 $as_echo_n "checking for wctrans_t... " >&6; }
27894 if ${gl_cv_type_wctrans_t+:} false; then :
27895 $as_echo_n "(cached) " >&6
27896 else
27897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27898 /* end confdefs.h. */
27899 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
27900 included before <wchar.h>.
27901 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
27902 must be included before <wchar.h>. */
27903 #include <stddef.h>
27904 #include <stdio.h>
27905 #include <time.h>
27906 #include <wchar.h>
27907 #include <wctype.h>
27908 wctrans_t a;
27909
27910 int
27911 main ()
27912 {
27913
27914 ;
27915 return 0;
27916 }
27917 _ACEOF
27918 if ac_fn_c_try_compile "$LINENO"; then :
27919 gl_cv_type_wctrans_t=yes
27920 else
27921 gl_cv_type_wctrans_t=no
27922 fi
27923 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27924
27925 fi
27926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
27927 $as_echo "$gl_cv_type_wctrans_t" >&6; }
27928 if test $gl_cv_type_wctrans_t = no; then
27929 HAVE_WCTRANS_T=0
27930 fi
27931
27932
27933 for gl_func in wctype iswctype wctrans towctrans ; do
27934 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
27935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
27936 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
27937 if eval \${$as_gl_Symbol+:} false; then :
27938 $as_echo_n "(cached) " >&6
27939 else
27940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27941 /* end confdefs.h. */
27942
27943 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
27944 <wchar.h>.
27945 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
27946 included before <wchar.h>. */
27947 #if !(defined __GLIBC__ && !defined __UCLIBC__)
27948 # include <stddef.h>
27949 # include <stdio.h>
27950 # include <time.h>
27951 # include <wchar.h>
27952 #endif
27953 #include <wctype.h>
27954
27955 int
27956 main ()
27957 {
27958 #undef $gl_func
27959 (void) $gl_func;
27960 ;
27961 return 0;
27962 }
27963 _ACEOF
27964 if ac_fn_c_try_compile "$LINENO"; then :
27965 eval "$as_gl_Symbol=yes"
27966 else
27967 eval "$as_gl_Symbol=no"
27968 fi
27969 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27970 fi
27971 eval ac_res=\$$as_gl_Symbol
27972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
27973 $as_echo "$ac_res" >&6; }
27974 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
27975 cat >>confdefs.h <<_ACEOF
27976 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
27977 _ACEOF
27978
27979 eval ac_cv_have_decl_$gl_func=yes
27980 fi
27981 done
27982
27983
27984 # End of code from modules
27985
27986
27987
27988
27989
27990
27991
27992
27993
27994 gltests_libdeps=
27995 gltests_ltlibdeps=
27996
27997
27998
27999
28000
28001
28002
28003
28004
28005 gl_source_base='tests'
28006 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
28007
28008 gl_module_indicator_condition=$gltests_WITNESS
28009
28010
28011
28012
28013
28014
28015
28016
28017
28018 LIBGNU_LIBDEPS="$gl_libdeps"
28019
28020 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
28021
28022
28023
28024 # We don't use automake, but gnulib does. This line lets us generate
28025 # its Makefile.in.
28026 am__api_version='1.15'
28027
28028 # Find a good install program. We prefer a C program (faster),
28029 # so one script is as good as another. But avoid the broken or
28030 # incompatible versions:
28031 # SysV /etc/install, /usr/sbin/install
28032 # SunOS /usr/etc/install
28033 # IRIX /sbin/install
28034 # AIX /bin/install
28035 # AmigaOS /C/install, which installs bootblocks on floppy discs
28036 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
28037 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
28038 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
28039 # OS/2's system install, which has a completely different semantic
28040 # ./install, which can be erroneously created by make from ./install.sh.
28041 # Reject install programs that cannot install multiple files.
28042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
28043 $as_echo_n "checking for a BSD-compatible install... " >&6; }
28044 if test -z "$INSTALL"; then
28045 if ${ac_cv_path_install+:} false; then :
28046 $as_echo_n "(cached) " >&6
28047 else
28048 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28049 for as_dir in $PATH
28050 do
28051 IFS=$as_save_IFS
28052 test -z "$as_dir" && as_dir=.
28053 # Account for people who put trailing slashes in PATH elements.
28054 case $as_dir/ in #((
28055 ./ | .// | /[cC]/* | \
28056 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
28057 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
28058 /usr/ucb/* ) ;;
28059 *)
28060 # OSF1 and SCO ODT 3.0 have their own names for install.
28061 # Don't use installbsd from OSF since it installs stuff as root
28062 # by default.
28063 for ac_prog in ginstall scoinst install; do
28064 for ac_exec_ext in '' $ac_executable_extensions; do
28065 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
28066 if test $ac_prog = install &&
28067 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
28068 # AIX install. It has an incompatible calling convention.
28069 :
28070 elif test $ac_prog = install &&
28071 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
28072 # program-specific install script used by HP pwplus--don't use.
28073 :
28074 else
28075 rm -rf conftest.one conftest.two conftest.dir
28076 echo one > conftest.one
28077 echo two > conftest.two
28078 mkdir conftest.dir
28079 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
28080 test -s conftest.one && test -s conftest.two &&
28081 test -s conftest.dir/conftest.one &&
28082 test -s conftest.dir/conftest.two
28083 then
28084 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
28085 break 3
28086 fi
28087 fi
28088 fi
28089 done
28090 done
28091 ;;
28092 esac
28093
28094 done
28095 IFS=$as_save_IFS
28096
28097 rm -rf conftest.one conftest.two conftest.dir
28098
28099 fi
28100 if test "${ac_cv_path_install+set}" = set; then
28101 INSTALL=$ac_cv_path_install
28102 else
28103 # As a last resort, use the slow shell script. Don't cache a
28104 # value for INSTALL within a source directory, because that will
28105 # break other packages using the cache if that directory is
28106 # removed, or if the value is a relative name.
28107 INSTALL=$ac_install_sh
28108 fi
28109 fi
28110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
28111 $as_echo "$INSTALL" >&6; }
28112
28113 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
28114 # It thinks the first close brace ends the variable substitution.
28115 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
28116
28117 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
28118
28119 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
28120
28121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
28122 $as_echo_n "checking whether build environment is sane... " >&6; }
28123 # Reject unsafe characters in $srcdir or the absolute working directory
28124 # name. Accept space and tab only in the latter.
28125 am_lf='
28126 '
28127 case `pwd` in
28128 *[\\\"\#\$\&\'\`$am_lf]*)
28129 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
28130 esac
28131 case $srcdir in
28132 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
28133 as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
28134 esac
28135
28136 # Do 'set' in a subshell so we don't clobber the current shell's
28137 # arguments. Must try -L first in case configure is actually a
28138 # symlink; some systems play weird games with the mod time of symlinks
28139 # (eg FreeBSD returns the mod time of the symlink's containing
28140 # directory).
28141 if (
28142 am_has_slept=no
28143 for am_try in 1 2; do
28144 echo "timestamp, slept: $am_has_slept" > conftest.file
28145 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
28146 if test "$*" = "X"; then
28147 # -L didn't work.
28148 set X `ls -t "$srcdir/configure" conftest.file`
28149 fi
28150 if test "$*" != "X $srcdir/configure conftest.file" \
28151 && test "$*" != "X conftest.file $srcdir/configure"; then
28152
28153 # If neither matched, then we have a broken ls. This can happen
28154 # if, for instance, CONFIG_SHELL is bash and it inherits a
28155 # broken ls alias from the environment. This has actually
28156 # happened. Such a system could not be considered "sane".
28157 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
28158 alias in your environment" "$LINENO" 5
28159 fi
28160 if test "$2" = conftest.file || test $am_try -eq 2; then
28161 break
28162 fi
28163 # Just in case.
28164 sleep 1
28165 am_has_slept=yes
28166 done
28167 test "$2" = conftest.file
28168 )
28169 then
28170 # Ok.
28171 :
28172 else
28173 as_fn_error $? "newly created file is older than distributed files!
28174 Check your system clock" "$LINENO" 5
28175 fi
28176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28177 $as_echo "yes" >&6; }
28178 # If we didn't sleep, we still need to ensure time stamps of config.status and
28179 # generated files are strictly newer.
28180 am_sleep_pid=
28181 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
28182 ( sleep 1 ) &
28183 am_sleep_pid=$!
28184 fi
28185
28186 rm -f conftest.file
28187
28188 test "$program_prefix" != NONE &&
28189 program_transform_name="s&^&$program_prefix&;$program_transform_name"
28190 # Use a double $ so make ignores it.
28191 test "$program_suffix" != NONE &&
28192 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
28193 # Double any \ or $.
28194 # By default was `s,x,x', remove it if useless.
28195 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
28196 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
28197
28198 if test x"${MISSING+set}" != xset; then
28199 case $am_aux_dir in
28200 *\ * | *\ *)
28201 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
28202 *)
28203 MISSING="\${SHELL} $am_aux_dir/missing" ;;
28204 esac
28205 fi
28206 # Use eval to expand $SHELL
28207 if eval "$MISSING --is-lightweight"; then
28208 am_missing_run="$MISSING "
28209 else
28210 am_missing_run=
28211 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
28212 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
28213 fi
28214
28215 if test x"${install_sh+set}" != xset; then
28216 case $am_aux_dir in
28217 *\ * | *\ *)
28218 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
28219 *)
28220 install_sh="\${SHELL} $am_aux_dir/install-sh"
28221 esac
28222 fi
28223
28224 # Installed binaries are usually stripped using 'strip' when the user
28225 # run "make install-strip". However 'strip' might not be the right
28226 # tool to use in cross-compilation environments, therefore Automake
28227 # will honor the 'STRIP' environment variable to overrule this program.
28228 if test "$cross_compiling" != no; then
28229 if test -n "$ac_tool_prefix"; then
28230 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
28231 set dummy ${ac_tool_prefix}strip; ac_word=$2
28232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28233 $as_echo_n "checking for $ac_word... " >&6; }
28234 if ${ac_cv_prog_STRIP+:} false; then :
28235 $as_echo_n "(cached) " >&6
28236 else
28237 if test -n "$STRIP"; then
28238 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
28239 else
28240 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28241 for as_dir in $PATH
28242 do
28243 IFS=$as_save_IFS
28244 test -z "$as_dir" && as_dir=.
28245 for ac_exec_ext in '' $ac_executable_extensions; do
28246 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28247 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
28248 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28249 break 2
28250 fi
28251 done
28252 done
28253 IFS=$as_save_IFS
28254
28255 fi
28256 fi
28257 STRIP=$ac_cv_prog_STRIP
28258 if test -n "$STRIP"; then
28259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
28260 $as_echo "$STRIP" >&6; }
28261 else
28262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28263 $as_echo "no" >&6; }
28264 fi
28265
28266
28267 fi
28268 if test -z "$ac_cv_prog_STRIP"; then
28269 ac_ct_STRIP=$STRIP
28270 # Extract the first word of "strip", so it can be a program name with args.
28271 set dummy strip; ac_word=$2
28272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28273 $as_echo_n "checking for $ac_word... " >&6; }
28274 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
28275 $as_echo_n "(cached) " >&6
28276 else
28277 if test -n "$ac_ct_STRIP"; then
28278 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
28279 else
28280 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28281 for as_dir in $PATH
28282 do
28283 IFS=$as_save_IFS
28284 test -z "$as_dir" && as_dir=.
28285 for ac_exec_ext in '' $ac_executable_extensions; do
28286 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28287 ac_cv_prog_ac_ct_STRIP="strip"
28288 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28289 break 2
28290 fi
28291 done
28292 done
28293 IFS=$as_save_IFS
28294
28295 fi
28296 fi
28297 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
28298 if test -n "$ac_ct_STRIP"; then
28299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
28300 $as_echo "$ac_ct_STRIP" >&6; }
28301 else
28302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28303 $as_echo "no" >&6; }
28304 fi
28305
28306 if test "x$ac_ct_STRIP" = x; then
28307 STRIP=":"
28308 else
28309 case $cross_compiling:$ac_tool_warned in
28310 yes:)
28311 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28312 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28313 ac_tool_warned=yes ;;
28314 esac
28315 STRIP=$ac_ct_STRIP
28316 fi
28317 else
28318 STRIP="$ac_cv_prog_STRIP"
28319 fi
28320
28321 fi
28322 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
28323
28324 for ac_prog in gawk mawk nawk awk
28325 do
28326 # Extract the first word of "$ac_prog", so it can be a program name with args.
28327 set dummy $ac_prog; ac_word=$2
28328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28329 $as_echo_n "checking for $ac_word... " >&6; }
28330 if ${ac_cv_prog_AWK+:} false; then :
28331 $as_echo_n "(cached) " >&6
28332 else
28333 if test -n "$AWK"; then
28334 ac_cv_prog_AWK="$AWK" # Let the user override the test.
28335 else
28336 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28337 for as_dir in $PATH
28338 do
28339 IFS=$as_save_IFS
28340 test -z "$as_dir" && as_dir=.
28341 for ac_exec_ext in '' $ac_executable_extensions; do
28342 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28343 ac_cv_prog_AWK="$ac_prog"
28344 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28345 break 2
28346 fi
28347 done
28348 done
28349 IFS=$as_save_IFS
28350
28351 fi
28352 fi
28353 AWK=$ac_cv_prog_AWK
28354 if test -n "$AWK"; then
28355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
28356 $as_echo "$AWK" >&6; }
28357 else
28358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28359 $as_echo "no" >&6; }
28360 fi
28361
28362
28363 test -n "$AWK" && break
28364 done
28365
28366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
28367 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
28368 set x ${MAKE-make}
28369 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
28370 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
28371 $as_echo_n "(cached) " >&6
28372 else
28373 cat >conftest.make <<\_ACEOF
28374 SHELL = /bin/sh
28375 all:
28376 @echo '@@@%%%=$(MAKE)=@@@%%%'
28377 _ACEOF
28378 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
28379 case `${MAKE-make} -f conftest.make 2>/dev/null` in
28380 *@@@%%%=?*=@@@%%%*)
28381 eval ac_cv_prog_make_${ac_make}_set=yes;;
28382 *)
28383 eval ac_cv_prog_make_${ac_make}_set=no;;
28384 esac
28385 rm -f conftest.make
28386 fi
28387 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
28388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28389 $as_echo "yes" >&6; }
28390 SET_MAKE=
28391 else
28392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28393 $as_echo "no" >&6; }
28394 SET_MAKE="MAKE=${MAKE-make}"
28395 fi
28396
28397 rm -rf .tst 2>/dev/null
28398 mkdir .tst 2>/dev/null
28399 if test -d .tst; then
28400 am__leading_dot=.
28401 else
28402 am__leading_dot=_
28403 fi
28404 rmdir .tst 2>/dev/null
28405
28406 DEPDIR="${am__leading_dot}deps"
28407
28408 ac_config_commands="$ac_config_commands depfiles"
28409
28410
28411 am_make=${MAKE-make}
28412 cat > confinc << 'END'
28413 am__doit:
28414 @echo this is the am__doit target
28415 .PHONY: am__doit
28416 END
28417 # If we don't find an include directive, just comment out the code.
28418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
28419 $as_echo_n "checking for style of include used by $am_make... " >&6; }
28420 am__include="#"
28421 am__quote=
28422 _am_result=none
28423 # First try GNU make style include.
28424 echo "include confinc" > confmf
28425 # Ignore all kinds of additional output from 'make'.
28426 case `$am_make -s -f confmf 2> /dev/null` in #(
28427 *the\ am__doit\ target*)
28428 am__include=include
28429 am__quote=
28430 _am_result=GNU
28431 ;;
28432 esac
28433 # Now try BSD make style include.
28434 if test "$am__include" = "#"; then
28435 echo '.include "confinc"' > confmf
28436 case `$am_make -s -f confmf 2> /dev/null` in #(
28437 *the\ am__doit\ target*)
28438 am__include=.include
28439 am__quote="\""
28440 _am_result=BSD
28441 ;;
28442 esac
28443 fi
28444
28445
28446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
28447 $as_echo "$_am_result" >&6; }
28448 rm -f confinc confmf
28449
28450 # Check whether --enable-dependency-tracking was given.
28451 if test "${enable_dependency_tracking+set}" = set; then :
28452 enableval=$enable_dependency_tracking;
28453 fi
28454
28455 if test "x$enable_dependency_tracking" != xno; then
28456 am_depcomp="$ac_aux_dir/depcomp"
28457 AMDEPBACKSLASH='\'
28458 am__nodep='_no'
28459 fi
28460 if test "x$enable_dependency_tracking" != xno; then
28461 AMDEP_TRUE=
28462 AMDEP_FALSE='#'
28463 else
28464 AMDEP_TRUE='#'
28465 AMDEP_FALSE=
28466 fi
28467
28468
28469 # Check whether --enable-silent-rules was given.
28470 if test "${enable_silent_rules+set}" = set; then :
28471 enableval=$enable_silent_rules;
28472 fi
28473
28474 case $enable_silent_rules in # (((
28475 yes) AM_DEFAULT_VERBOSITY=0;;
28476 no) AM_DEFAULT_VERBOSITY=1;;
28477 *) AM_DEFAULT_VERBOSITY=1;;
28478 esac
28479 am_make=${MAKE-make}
28480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
28481 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
28482 if ${am_cv_make_support_nested_variables+:} false; then :
28483 $as_echo_n "(cached) " >&6
28484 else
28485 if $as_echo 'TRUE=$(BAR$(V))
28486 BAR0=false
28487 BAR1=true
28488 V=1
28489 am__doit:
28490 @$(TRUE)
28491 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
28492 am_cv_make_support_nested_variables=yes
28493 else
28494 am_cv_make_support_nested_variables=no
28495 fi
28496 fi
28497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
28498 $as_echo "$am_cv_make_support_nested_variables" >&6; }
28499 if test $am_cv_make_support_nested_variables = yes; then
28500 AM_V='$(V)'
28501 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
28502 else
28503 AM_V=$AM_DEFAULT_VERBOSITY
28504 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
28505 fi
28506 AM_BACKSLASH='\'
28507
28508 if test "`cd $srcdir && pwd`" != "`pwd`"; then
28509 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
28510 # is not polluted with repeated "-I."
28511 am__isrc=' -I$(srcdir)'
28512 # test to see if srcdir already configured
28513 if test -f $srcdir/config.status; then
28514 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
28515 fi
28516 fi
28517
28518 # test whether we have cygpath
28519 if test -z "$CYGPATH_W"; then
28520 if (cygpath --version) >/dev/null 2>/dev/null; then
28521 CYGPATH_W='cygpath -w'
28522 else
28523 CYGPATH_W=echo
28524 fi
28525 fi
28526
28527
28528 # Define the identity of the package.
28529 PACKAGE='libgnu'
28530 VERSION='UNUSED-VERSION'
28531
28532
28533 # Some tools Automake needs.
28534
28535 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
28536
28537
28538 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
28539
28540
28541 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
28542
28543
28544 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
28545
28546
28547 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
28548
28549 # For better backward compatibility. To be removed once Automake 1.9.x
28550 # dies out for good. For more background, see:
28551 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
28552 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
28553 mkdir_p='$(MKDIR_P)'
28554
28555 # We need awk for the "check" target (and possibly the TAP driver). The
28556 # system "awk" is bad on some platforms.
28557 # Always define AMTAR for backward compatibility. Yes, it's still used
28558 # in the wild :-( We should find a proper way to deprecate it ...
28559 AMTAR='$${TAR-tar}'
28560
28561
28562 # We'll loop over all known methods to create a tar archive until one works.
28563 _am_tools='gnutar pax cpio none'
28564
28565 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
28566
28567
28568
28569
28570
28571 depcc="$CC" am_compiler_list=
28572
28573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
28574 $as_echo_n "checking dependency style of $depcc... " >&6; }
28575 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
28576 $as_echo_n "(cached) " >&6
28577 else
28578 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
28579 # We make a subdir and do the tests there. Otherwise we can end up
28580 # making bogus files that we don't know about and never remove. For
28581 # instance it was reported that on HP-UX the gcc test will end up
28582 # making a dummy file named 'D' -- because '-MD' means "put the output
28583 # in D".
28584 rm -rf conftest.dir
28585 mkdir conftest.dir
28586 # Copy depcomp to subdir because otherwise we won't find it if we're
28587 # using a relative directory.
28588 cp "$am_depcomp" conftest.dir
28589 cd conftest.dir
28590 # We will build objects and dependencies in a subdirectory because
28591 # it helps to detect inapplicable dependency modes. For instance
28592 # both Tru64's cc and ICC support -MD to output dependencies as a
28593 # side effect of compilation, but ICC will put the dependencies in
28594 # the current directory while Tru64 will put them in the object
28595 # directory.
28596 mkdir sub
28597
28598 am_cv_CC_dependencies_compiler_type=none
28599 if test "$am_compiler_list" = ""; then
28600 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
28601 fi
28602 am__universal=false
28603 case " $depcc " in #(
28604 *\ -arch\ *\ -arch\ *) am__universal=true ;;
28605 esac
28606
28607 for depmode in $am_compiler_list; do
28608 # Setup a source with many dependencies, because some compilers
28609 # like to wrap large dependency lists on column 80 (with \), and
28610 # we should not choose a depcomp mode which is confused by this.
28611 #
28612 # We need to recreate these files for each test, as the compiler may
28613 # overwrite some of them when testing with obscure command lines.
28614 # This happens at least with the AIX C compiler.
28615 : > sub/conftest.c
28616 for i in 1 2 3 4 5 6; do
28617 echo '#include "conftst'$i'.h"' >> sub/conftest.c
28618 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
28619 # Solaris 10 /bin/sh.
28620 echo '/* dummy */' > sub/conftst$i.h
28621 done
28622 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
28623
28624 # We check with '-c' and '-o' for the sake of the "dashmstdout"
28625 # mode. It turns out that the SunPro C++ compiler does not properly
28626 # handle '-M -o', and we need to detect this. Also, some Intel
28627 # versions had trouble with output in subdirs.
28628 am__obj=sub/conftest.${OBJEXT-o}
28629 am__minus_obj="-o $am__obj"
28630 case $depmode in
28631 gcc)
28632 # This depmode causes a compiler race in universal mode.
28633 test "$am__universal" = false || continue
28634 ;;
28635 nosideeffect)
28636 # After this tag, mechanisms are not by side-effect, so they'll
28637 # only be used when explicitly requested.
28638 if test "x$enable_dependency_tracking" = xyes; then
28639 continue
28640 else
28641 break
28642 fi
28643 ;;
28644 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
28645 # This compiler won't grok '-c -o', but also, the minuso test has
28646 # not run yet. These depmodes are late enough in the game, and
28647 # so weak that their functioning should not be impacted.
28648 am__obj=conftest.${OBJEXT-o}
28649 am__minus_obj=
28650 ;;
28651 none) break ;;
28652 esac
28653 if depmode=$depmode \
28654 source=sub/conftest.c object=$am__obj \
28655 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
28656 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
28657 >/dev/null 2>conftest.err &&
28658 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
28659 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
28660 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
28661 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
28662 # icc doesn't choke on unknown options, it will just issue warnings
28663 # or remarks (even with -Werror). So we grep stderr for any message
28664 # that says an option was ignored or not supported.
28665 # When given -MP, icc 7.0 and 7.1 complain thusly:
28666 # icc: Command line warning: ignoring option '-M'; no argument required
28667 # The diagnosis changed in icc 8.0:
28668 # icc: Command line remark: option '-MP' not supported
28669 if (grep 'ignoring option' conftest.err ||
28670 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
28671 am_cv_CC_dependencies_compiler_type=$depmode
28672 break
28673 fi
28674 fi
28675 done
28676
28677 cd ..
28678 rm -rf conftest.dir
28679 else
28680 am_cv_CC_dependencies_compiler_type=none
28681 fi
28682
28683 fi
28684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
28685 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
28686 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
28687
28688 if
28689 test "x$enable_dependency_tracking" != xno \
28690 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
28691 am__fastdepCC_TRUE=
28692 am__fastdepCC_FALSE='#'
28693 else
28694 am__fastdepCC_TRUE='#'
28695 am__fastdepCC_FALSE=
28696 fi
28697
28698
28699
28700 # POSIX will say in a future version that running "rm -f" with no argument
28701 # is OK; and we want to be able to make that assumption in our Makefile
28702 # recipes. So use an aggressive probe to check that the usage we want is
28703 # actually supported "in the wild" to an acceptable degree.
28704 # See automake bug#10828.
28705 # To make any issue more visible, cause the running configure to be aborted
28706 # by default if the 'rm' program in use doesn't match our expectations; the
28707 # user can still override this though.
28708 if rm -f && rm -fr && rm -rf; then : OK; else
28709 cat >&2 <<'END'
28710 Oops!
28711
28712 Your 'rm' program seems unable to run without file operands specified
28713 on the command line, even when the '-f' option is present. This is contrary
28714 to the behaviour of most rm programs out there, and not conforming with
28715 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
28716
28717 Please tell bug-automake@gnu.org about your system, including the value
28718 of your $PATH and any error possibly output before this message. This
28719 can help us improve future automake versions.
28720
28721 END
28722 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
28723 echo 'Configuration will proceed anyway, since you have set the' >&2
28724 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
28725 echo >&2
28726 else
28727 cat >&2 <<'END'
28728 Aborting the configuration process, to ensure you take notice of the issue.
28729
28730 You can download and install GNU coreutils to get an 'rm' implementation
28731 that behaves properly: <http://www.gnu.org/software/coreutils/>.
28732
28733 If you want to complete the configuration process using your problematic
28734 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
28735 to "yes", and re-run configure.
28736
28737 END
28738 as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
28739 fi
28740 fi
28741
28742
28743 # Check whether --enable-silent-rules was given.
28744 if test "${enable_silent_rules+set}" = set; then :
28745 enableval=$enable_silent_rules;
28746 fi
28747
28748 case $enable_silent_rules in # (((
28749 yes) AM_DEFAULT_VERBOSITY=0;;
28750 no) AM_DEFAULT_VERBOSITY=1;;
28751 *) AM_DEFAULT_VERBOSITY=0;;
28752 esac
28753 am_make=${MAKE-make}
28754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
28755 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
28756 if ${am_cv_make_support_nested_variables+:} false; then :
28757 $as_echo_n "(cached) " >&6
28758 else
28759 if $as_echo 'TRUE=$(BAR$(V))
28760 BAR0=false
28761 BAR1=true
28762 V=1
28763 am__doit:
28764 @$(TRUE)
28765 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
28766 am_cv_make_support_nested_variables=yes
28767 else
28768 am_cv_make_support_nested_variables=no
28769 fi
28770 fi
28771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
28772 $as_echo "$am_cv_make_support_nested_variables" >&6; }
28773 if test $am_cv_make_support_nested_variables = yes; then
28774 AM_V='$(V)'
28775 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
28776 else
28777 AM_V=$AM_DEFAULT_VERBOSITY
28778 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
28779 fi
28780 AM_BACKSLASH='\'
28781
28782
28783 # --------------------- #
28784 # Checks for programs. #
28785 # --------------------- #
28786
28787
28788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
28789 $as_echo_n "checking whether ln -s works... " >&6; }
28790 LN_S=$as_ln_s
28791 if test "$LN_S" = "ln -s"; then
28792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28793 $as_echo "yes" >&6; }
28794 else
28795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
28796 $as_echo "no, using $LN_S" >&6; }
28797 fi
28798
28799 if test -n "$ac_tool_prefix"; then
28800 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
28801 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
28802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28803 $as_echo_n "checking for $ac_word... " >&6; }
28804 if ${ac_cv_prog_RANLIB+:} false; then :
28805 $as_echo_n "(cached) " >&6
28806 else
28807 if test -n "$RANLIB"; then
28808 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
28809 else
28810 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28811 for as_dir in $PATH
28812 do
28813 IFS=$as_save_IFS
28814 test -z "$as_dir" && as_dir=.
28815 for ac_exec_ext in '' $ac_executable_extensions; do
28816 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28817 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
28818 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28819 break 2
28820 fi
28821 done
28822 done
28823 IFS=$as_save_IFS
28824
28825 fi
28826 fi
28827 RANLIB=$ac_cv_prog_RANLIB
28828 if test -n "$RANLIB"; then
28829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
28830 $as_echo "$RANLIB" >&6; }
28831 else
28832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28833 $as_echo "no" >&6; }
28834 fi
28835
28836
28837 fi
28838 if test -z "$ac_cv_prog_RANLIB"; then
28839 ac_ct_RANLIB=$RANLIB
28840 # Extract the first word of "ranlib", so it can be a program name with args.
28841 set dummy ranlib; ac_word=$2
28842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28843 $as_echo_n "checking for $ac_word... " >&6; }
28844 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
28845 $as_echo_n "(cached) " >&6
28846 else
28847 if test -n "$ac_ct_RANLIB"; then
28848 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
28849 else
28850 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28851 for as_dir in $PATH
28852 do
28853 IFS=$as_save_IFS
28854 test -z "$as_dir" && as_dir=.
28855 for ac_exec_ext in '' $ac_executable_extensions; do
28856 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28857 ac_cv_prog_ac_ct_RANLIB="ranlib"
28858 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28859 break 2
28860 fi
28861 done
28862 done
28863 IFS=$as_save_IFS
28864
28865 fi
28866 fi
28867 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
28868 if test -n "$ac_ct_RANLIB"; then
28869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
28870 $as_echo "$ac_ct_RANLIB" >&6; }
28871 else
28872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28873 $as_echo "no" >&6; }
28874 fi
28875
28876 if test "x$ac_ct_RANLIB" = x; then
28877 RANLIB=":"
28878 else
28879 case $cross_compiling:$ac_tool_warned in
28880 yes:)
28881 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28882 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28883 ac_tool_warned=yes ;;
28884 esac
28885 RANLIB=$ac_ct_RANLIB
28886 fi
28887 else
28888 RANLIB="$ac_cv_prog_RANLIB"
28889 fi
28890
28891
28892 if test -n "$ac_tool_prefix"; then
28893 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
28894 set dummy ${ac_tool_prefix}ar; ac_word=$2
28895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28896 $as_echo_n "checking for $ac_word... " >&6; }
28897 if ${ac_cv_prog_AR+:} false; then :
28898 $as_echo_n "(cached) " >&6
28899 else
28900 if test -n "$AR"; then
28901 ac_cv_prog_AR="$AR" # Let the user override the test.
28902 else
28903 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28904 for as_dir in $PATH
28905 do
28906 IFS=$as_save_IFS
28907 test -z "$as_dir" && as_dir=.
28908 for ac_exec_ext in '' $ac_executable_extensions; do
28909 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28910 ac_cv_prog_AR="${ac_tool_prefix}ar"
28911 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28912 break 2
28913 fi
28914 done
28915 done
28916 IFS=$as_save_IFS
28917
28918 fi
28919 fi
28920 AR=$ac_cv_prog_AR
28921 if test -n "$AR"; then
28922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
28923 $as_echo "$AR" >&6; }
28924 else
28925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28926 $as_echo "no" >&6; }
28927 fi
28928
28929
28930 fi
28931 if test -z "$ac_cv_prog_AR"; then
28932 ac_ct_AR=$AR
28933 # Extract the first word of "ar", so it can be a program name with args.
28934 set dummy ar; ac_word=$2
28935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28936 $as_echo_n "checking for $ac_word... " >&6; }
28937 if ${ac_cv_prog_ac_ct_AR+:} false; then :
28938 $as_echo_n "(cached) " >&6
28939 else
28940 if test -n "$ac_ct_AR"; then
28941 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
28942 else
28943 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28944 for as_dir in $PATH
28945 do
28946 IFS=$as_save_IFS
28947 test -z "$as_dir" && as_dir=.
28948 for ac_exec_ext in '' $ac_executable_extensions; do
28949 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28950 ac_cv_prog_ac_ct_AR="ar"
28951 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28952 break 2
28953 fi
28954 done
28955 done
28956 IFS=$as_save_IFS
28957
28958 fi
28959 fi
28960 ac_ct_AR=$ac_cv_prog_ac_ct_AR
28961 if test -n "$ac_ct_AR"; then
28962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
28963 $as_echo "$ac_ct_AR" >&6; }
28964 else
28965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28966 $as_echo "no" >&6; }
28967 fi
28968
28969 if test "x$ac_ct_AR" = x; then
28970 AR=""
28971 else
28972 case $cross_compiling:$ac_tool_warned in
28973 yes:)
28974 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28975 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28976 ac_tool_warned=yes ;;
28977 esac
28978 AR=$ac_ct_AR
28979 fi
28980 else
28981 AR="$ac_cv_prog_AR"
28982 fi
28983
28984
28985 # ---------------------- #
28986 # Checks for libraries. #
28987 # ---------------------- #
28988
28989 ac_config_files="$ac_config_files Makefile import/Makefile"
28990
28991 ac_config_commands="$ac_config_commands default"
28992
28993 cat >confcache <<\_ACEOF
28994 # This file is a shell script that caches the results of configure
28995 # tests run on this system so they can be shared between configure
28996 # scripts and configure runs, see configure's option --config-cache.
28997 # It is not useful on other systems. If it contains results you don't
28998 # want to keep, you may remove or edit it.
28999 #
29000 # config.status only pays attention to the cache file if you give it
29001 # the --recheck option to rerun configure.
29002 #
29003 # `ac_cv_env_foo' variables (set or unset) will be overridden when
29004 # loading this file, other *unset* `ac_cv_foo' will be assigned the
29005 # following values.
29006
29007 _ACEOF
29008
29009 # The following way of writing the cache mishandles newlines in values,
29010 # but we know of no workaround that is simple, portable, and efficient.
29011 # So, we kill variables containing newlines.
29012 # Ultrix sh set writes to stderr and can't be redirected directly,
29013 # and sets the high bit in the cache file unless we assign to the vars.
29014 (
29015 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
29016 eval ac_val=\$$ac_var
29017 case $ac_val in #(
29018 *${as_nl}*)
29019 case $ac_var in #(
29020 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
29021 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
29022 esac
29023 case $ac_var in #(
29024 _ | IFS | as_nl) ;; #(
29025 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
29026 *) { eval $ac_var=; unset $ac_var;} ;;
29027 esac ;;
29028 esac
29029 done
29030
29031 (set) 2>&1 |
29032 case $as_nl`(ac_space=' '; set) 2>&1` in #(
29033 *${as_nl}ac_space=\ *)
29034 # `set' does not quote correctly, so add quotes: double-quote
29035 # substitution turns \\\\ into \\, and sed turns \\ into \.
29036 sed -n \
29037 "s/'/'\\\\''/g;
29038 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
29039 ;; #(
29040 *)
29041 # `set' quotes correctly as required by POSIX, so do not add quotes.
29042 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
29043 ;;
29044 esac |
29045 sort
29046 ) |
29047 sed '
29048 /^ac_cv_env_/b end
29049 t clear
29050 :clear
29051 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
29052 t end
29053 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
29054 :end' >>confcache
29055 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
29056 if test -w "$cache_file"; then
29057 if test "x$cache_file" != "x/dev/null"; then
29058 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
29059 $as_echo "$as_me: updating cache $cache_file" >&6;}
29060 if test ! -f "$cache_file" || test -h "$cache_file"; then
29061 cat confcache >"$cache_file"
29062 else
29063 case $cache_file in #(
29064 */* | ?:*)
29065 mv -f confcache "$cache_file"$$ &&
29066 mv -f "$cache_file"$$ "$cache_file" ;; #(
29067 *)
29068 mv -f confcache "$cache_file" ;;
29069 esac
29070 fi
29071 fi
29072 else
29073 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
29074 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
29075 fi
29076 fi
29077 rm -f confcache
29078
29079 test "x$prefix" = xNONE && prefix=$ac_default_prefix
29080 # Let make expand exec_prefix.
29081 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
29082
29083 DEFS=-DHAVE_CONFIG_H
29084
29085 ac_libobjs=
29086 ac_ltlibobjs=
29087 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
29088 # 1. Remove the extension, and $U if already installed.
29089 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
29090 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
29091 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
29092 # will be set to the directory where LIBOBJS objects are built.
29093 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
29094 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
29095 done
29096 LIBOBJS=$ac_libobjs
29097
29098 LTLIBOBJS=$ac_ltlibobjs
29099
29100
29101 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
29102 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
29103 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29104 fi
29105 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
29106 as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
29107 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29108 fi
29109 if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
29110 as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
29111 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29112 fi
29113 if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
29114 as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
29115 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29116 fi
29117 if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
29118 as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
29119 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29120 fi
29121 if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
29122 as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
29123 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29124 fi
29125 if test -z "${GL_GENERATE_GLOB_H_TRUE}" && test -z "${GL_GENERATE_GLOB_H_FALSE}"; then
29126 as_fn_error $? "conditional \"GL_GENERATE_GLOB_H\" was never defined.
29127 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29128 fi
29129 if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
29130 as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
29131 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29132 fi
29133 if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
29134 as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
29135 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29136 fi
29137 if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
29138 as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
29139 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29140 fi
29141
29142
29143 if test -z "${GL_GENERATE_NETINET_IN_H_TRUE}" && test -z "${GL_GENERATE_NETINET_IN_H_FALSE}"; then
29144 as_fn_error $? "conditional \"GL_GENERATE_NETINET_IN_H\" was never defined.
29145 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29146 fi
29147 if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
29148 as_fn_error $? "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
29149 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29150 fi
29151 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
29152 as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
29153 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29154 fi
29155 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
29156 as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
29157 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29158 fi
29159
29160 gl_libobjs=
29161 gl_ltlibobjs=
29162 if test -n "$gl_LIBOBJS"; then
29163 # Remove the extension.
29164 sed_drop_objext='s/\.o$//;s/\.obj$//'
29165 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
29166 gl_libobjs="$gl_libobjs $i.$ac_objext"
29167 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
29168 done
29169 fi
29170 gl_LIBOBJS=$gl_libobjs
29171
29172 gl_LTLIBOBJS=$gl_ltlibobjs
29173
29174
29175
29176 gltests_libobjs=
29177 gltests_ltlibobjs=
29178 if test -n "$gltests_LIBOBJS"; then
29179 # Remove the extension.
29180 sed_drop_objext='s/\.o$//;s/\.obj$//'
29181 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
29182 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
29183 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
29184 done
29185 fi
29186 gltests_LIBOBJS=$gltests_libobjs
29187
29188 gltests_LTLIBOBJS=$gltests_ltlibobjs
29189
29190
29191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
29192 $as_echo_n "checking that generated files are newer than configure... " >&6; }
29193 if test -n "$am_sleep_pid"; then
29194 # Hide warnings about reused PIDs.
29195 wait $am_sleep_pid 2>/dev/null
29196 fi
29197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
29198 $as_echo "done" >&6; }
29199 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
29200 as_fn_error $? "conditional \"AMDEP\" was never defined.
29201 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29202 fi
29203 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
29204 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
29205 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29206 fi
29207 if test -n "$EXEEXT"; then
29208 am__EXEEXT_TRUE=
29209 am__EXEEXT_FALSE='#'
29210 else
29211 am__EXEEXT_TRUE='#'
29212 am__EXEEXT_FALSE=
29213 fi
29214
29215
29216 : "${CONFIG_STATUS=./config.status}"
29217 ac_write_fail=0
29218 ac_clean_files_save=$ac_clean_files
29219 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
29220 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
29221 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
29222 as_write_fail=0
29223 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
29224 #! $SHELL
29225 # Generated by $as_me.
29226 # Run this file to recreate the current configuration.
29227 # Compiler output produced by configure, useful for debugging
29228 # configure, is in config.log if it exists.
29229
29230 debug=false
29231 ac_cs_recheck=false
29232 ac_cs_silent=false
29233
29234 SHELL=\${CONFIG_SHELL-$SHELL}
29235 export SHELL
29236 _ASEOF
29237 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
29238 ## -------------------- ##
29239 ## M4sh Initialization. ##
29240 ## -------------------- ##
29241
29242 # Be more Bourne compatible
29243 DUALCASE=1; export DUALCASE # for MKS sh
29244 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
29245 emulate sh
29246 NULLCMD=:
29247 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29248 # is contrary to our usage. Disable this feature.
29249 alias -g '${1+"$@"}'='"$@"'
29250 setopt NO_GLOB_SUBST
29251 else
29252 case `(set -o) 2>/dev/null` in #(
29253 *posix*) :
29254 set -o posix ;; #(
29255 *) :
29256 ;;
29257 esac
29258 fi
29259
29260
29261 as_nl='
29262 '
29263 export as_nl
29264 # Printing a long string crashes Solaris 7 /usr/bin/printf.
29265 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
29266 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
29267 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
29268 # Prefer a ksh shell builtin over an external printf program on Solaris,
29269 # but without wasting forks for bash or zsh.
29270 if test -z "$BASH_VERSION$ZSH_VERSION" \
29271 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
29272 as_echo='print -r --'
29273 as_echo_n='print -rn --'
29274 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
29275 as_echo='printf %s\n'
29276 as_echo_n='printf %s'
29277 else
29278 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
29279 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
29280 as_echo_n='/usr/ucb/echo -n'
29281 else
29282 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
29283 as_echo_n_body='eval
29284 arg=$1;
29285 case $arg in #(
29286 *"$as_nl"*)
29287 expr "X$arg" : "X\\(.*\\)$as_nl";
29288 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
29289 esac;
29290 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
29291 '
29292 export as_echo_n_body
29293 as_echo_n='sh -c $as_echo_n_body as_echo'
29294 fi
29295 export as_echo_body
29296 as_echo='sh -c $as_echo_body as_echo'
29297 fi
29298
29299 # The user is always right.
29300 if test "${PATH_SEPARATOR+set}" != set; then
29301 PATH_SEPARATOR=:
29302 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
29303 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
29304 PATH_SEPARATOR=';'
29305 }
29306 fi
29307
29308
29309 # IFS
29310 # We need space, tab and new line, in precisely that order. Quoting is
29311 # there to prevent editors from complaining about space-tab.
29312 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
29313 # splitting by setting IFS to empty value.)
29314 IFS=" "" $as_nl"
29315
29316 # Find who we are. Look in the path if we contain no directory separator.
29317 as_myself=
29318 case $0 in #((
29319 *[\\/]* ) as_myself=$0 ;;
29320 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29321 for as_dir in $PATH
29322 do
29323 IFS=$as_save_IFS
29324 test -z "$as_dir" && as_dir=.
29325 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
29326 done
29327 IFS=$as_save_IFS
29328
29329 ;;
29330 esac
29331 # We did not find ourselves, most probably we were run as `sh COMMAND'
29332 # in which case we are not to be found in the path.
29333 if test "x$as_myself" = x; then
29334 as_myself=$0
29335 fi
29336 if test ! -f "$as_myself"; then
29337 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
29338 exit 1
29339 fi
29340
29341 # Unset variables that we do not need and which cause bugs (e.g. in
29342 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
29343 # suppresses any "Segmentation fault" message there. '((' could
29344 # trigger a bug in pdksh 5.2.14.
29345 for as_var in BASH_ENV ENV MAIL MAILPATH
29346 do eval test x\${$as_var+set} = xset \
29347 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
29348 done
29349 PS1='$ '
29350 PS2='> '
29351 PS4='+ '
29352
29353 # NLS nuisances.
29354 LC_ALL=C
29355 export LC_ALL
29356 LANGUAGE=C
29357 export LANGUAGE
29358
29359 # CDPATH.
29360 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
29361
29362
29363 # as_fn_error STATUS ERROR [LINENO LOG_FD]
29364 # ----------------------------------------
29365 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
29366 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
29367 # script with STATUS, using 1 if that was 0.
29368 as_fn_error ()
29369 {
29370 as_status=$1; test $as_status -eq 0 && as_status=1
29371 if test "$4"; then
29372 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
29373 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
29374 fi
29375 $as_echo "$as_me: error: $2" >&2
29376 as_fn_exit $as_status
29377 } # as_fn_error
29378
29379
29380 # as_fn_set_status STATUS
29381 # -----------------------
29382 # Set $? to STATUS, without forking.
29383 as_fn_set_status ()
29384 {
29385 return $1
29386 } # as_fn_set_status
29387
29388 # as_fn_exit STATUS
29389 # -----------------
29390 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
29391 as_fn_exit ()
29392 {
29393 set +e
29394 as_fn_set_status $1
29395 exit $1
29396 } # as_fn_exit
29397
29398 # as_fn_unset VAR
29399 # ---------------
29400 # Portably unset VAR.
29401 as_fn_unset ()
29402 {
29403 { eval $1=; unset $1;}
29404 }
29405 as_unset=as_fn_unset
29406 # as_fn_append VAR VALUE
29407 # ----------------------
29408 # Append the text in VALUE to the end of the definition contained in VAR. Take
29409 # advantage of any shell optimizations that allow amortized linear growth over
29410 # repeated appends, instead of the typical quadratic growth present in naive
29411 # implementations.
29412 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
29413 eval 'as_fn_append ()
29414 {
29415 eval $1+=\$2
29416 }'
29417 else
29418 as_fn_append ()
29419 {
29420 eval $1=\$$1\$2
29421 }
29422 fi # as_fn_append
29423
29424 # as_fn_arith ARG...
29425 # ------------------
29426 # Perform arithmetic evaluation on the ARGs, and store the result in the
29427 # global $as_val. Take advantage of shells that can avoid forks. The arguments
29428 # must be portable across $(()) and expr.
29429 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
29430 eval 'as_fn_arith ()
29431 {
29432 as_val=$(( $* ))
29433 }'
29434 else
29435 as_fn_arith ()
29436 {
29437 as_val=`expr "$@" || test $? -eq 1`
29438 }
29439 fi # as_fn_arith
29440
29441
29442 if expr a : '\(a\)' >/dev/null 2>&1 &&
29443 test "X`expr 00001 : '.*\(...\)'`" = X001; then
29444 as_expr=expr
29445 else
29446 as_expr=false
29447 fi
29448
29449 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
29450 as_basename=basename
29451 else
29452 as_basename=false
29453 fi
29454
29455 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
29456 as_dirname=dirname
29457 else
29458 as_dirname=false
29459 fi
29460
29461 as_me=`$as_basename -- "$0" ||
29462 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
29463 X"$0" : 'X\(//\)$' \| \
29464 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
29465 $as_echo X/"$0" |
29466 sed '/^.*\/\([^/][^/]*\)\/*$/{
29467 s//\1/
29468 q
29469 }
29470 /^X\/\(\/\/\)$/{
29471 s//\1/
29472 q
29473 }
29474 /^X\/\(\/\).*/{
29475 s//\1/
29476 q
29477 }
29478 s/.*/./; q'`
29479
29480 # Avoid depending upon Character Ranges.
29481 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
29482 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
29483 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
29484 as_cr_digits='0123456789'
29485 as_cr_alnum=$as_cr_Letters$as_cr_digits
29486
29487 ECHO_C= ECHO_N= ECHO_T=
29488 case `echo -n x` in #(((((
29489 -n*)
29490 case `echo 'xy\c'` in
29491 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
29492 xy) ECHO_C='\c';;
29493 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
29494 ECHO_T=' ';;
29495 esac;;
29496 *)
29497 ECHO_N='-n';;
29498 esac
29499
29500 rm -f conf$$ conf$$.exe conf$$.file
29501 if test -d conf$$.dir; then
29502 rm -f conf$$.dir/conf$$.file
29503 else
29504 rm -f conf$$.dir
29505 mkdir conf$$.dir 2>/dev/null
29506 fi
29507 if (echo >conf$$.file) 2>/dev/null; then
29508 if ln -s conf$$.file conf$$ 2>/dev/null; then
29509 as_ln_s='ln -s'
29510 # ... but there are two gotchas:
29511 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
29512 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
29513 # In both cases, we have to default to `cp -pR'.
29514 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
29515 as_ln_s='cp -pR'
29516 elif ln conf$$.file conf$$ 2>/dev/null; then
29517 as_ln_s=ln
29518 else
29519 as_ln_s='cp -pR'
29520 fi
29521 else
29522 as_ln_s='cp -pR'
29523 fi
29524 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
29525 rmdir conf$$.dir 2>/dev/null
29526
29527
29528 # as_fn_mkdir_p
29529 # -------------
29530 # Create "$as_dir" as a directory, including parents if necessary.
29531 as_fn_mkdir_p ()
29532 {
29533
29534 case $as_dir in #(
29535 -*) as_dir=./$as_dir;;
29536 esac
29537 test -d "$as_dir" || eval $as_mkdir_p || {
29538 as_dirs=
29539 while :; do
29540 case $as_dir in #(
29541 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
29542 *) as_qdir=$as_dir;;
29543 esac
29544 as_dirs="'$as_qdir' $as_dirs"
29545 as_dir=`$as_dirname -- "$as_dir" ||
29546 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29547 X"$as_dir" : 'X\(//\)[^/]' \| \
29548 X"$as_dir" : 'X\(//\)$' \| \
29549 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
29550 $as_echo X"$as_dir" |
29551 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
29552 s//\1/
29553 q
29554 }
29555 /^X\(\/\/\)[^/].*/{
29556 s//\1/
29557 q
29558 }
29559 /^X\(\/\/\)$/{
29560 s//\1/
29561 q
29562 }
29563 /^X\(\/\).*/{
29564 s//\1/
29565 q
29566 }
29567 s/.*/./; q'`
29568 test -d "$as_dir" && break
29569 done
29570 test -z "$as_dirs" || eval "mkdir $as_dirs"
29571 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
29572
29573
29574 } # as_fn_mkdir_p
29575 if mkdir -p . 2>/dev/null; then
29576 as_mkdir_p='mkdir -p "$as_dir"'
29577 else
29578 test -d ./-p && rmdir ./-p
29579 as_mkdir_p=false
29580 fi
29581
29582
29583 # as_fn_executable_p FILE
29584 # -----------------------
29585 # Test if FILE is an executable regular file.
29586 as_fn_executable_p ()
29587 {
29588 test -f "$1" && test -x "$1"
29589 } # as_fn_executable_p
29590 as_test_x='test -x'
29591 as_executable_p=as_fn_executable_p
29592
29593 # Sed expression to map a string onto a valid CPP name.
29594 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
29595
29596 # Sed expression to map a string onto a valid variable name.
29597 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
29598
29599
29600 exec 6>&1
29601 ## ----------------------------------- ##
29602 ## Main body of $CONFIG_STATUS script. ##
29603 ## ----------------------------------- ##
29604 _ASEOF
29605 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
29606
29607 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29608 # Save the log message, to keep $0 and so on meaningful, and to
29609 # report actual input values of CONFIG_FILES etc. instead of their
29610 # values after options handling.
29611 ac_log="
29612 This file was extended by libgnu $as_me UNUSED-VERSION, which was
29613 generated by GNU Autoconf 2.69. Invocation command line was
29614
29615 CONFIG_FILES = $CONFIG_FILES
29616 CONFIG_HEADERS = $CONFIG_HEADERS
29617 CONFIG_LINKS = $CONFIG_LINKS
29618 CONFIG_COMMANDS = $CONFIG_COMMANDS
29619 $ $0 $@
29620
29621 on `(hostname || uname -n) 2>/dev/null | sed 1q`
29622 "
29623
29624 _ACEOF
29625
29626 case $ac_config_files in *"
29627 "*) set x $ac_config_files; shift; ac_config_files=$*;;
29628 esac
29629
29630 case $ac_config_headers in *"
29631 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
29632 esac
29633
29634
29635 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29636 # Files that config.status was made for.
29637 config_files="$ac_config_files"
29638 config_headers="$ac_config_headers"
29639 config_commands="$ac_config_commands"
29640
29641 _ACEOF
29642
29643 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29644 ac_cs_usage="\
29645 \`$as_me' instantiates files and other configuration actions
29646 from templates according to the current configuration. Unless the files
29647 and actions are specified as TAGs, all are instantiated by default.
29648
29649 Usage: $0 [OPTION]... [TAG]...
29650
29651 -h, --help print this help, then exit
29652 -V, --version print version number and configuration settings, then exit
29653 --config print configuration, then exit
29654 -q, --quiet, --silent
29655 do not print progress messages
29656 -d, --debug don't remove temporary files
29657 --recheck update $as_me by reconfiguring in the same conditions
29658 --file=FILE[:TEMPLATE]
29659 instantiate the configuration file FILE
29660 --header=FILE[:TEMPLATE]
29661 instantiate the configuration header FILE
29662
29663 Configuration files:
29664 $config_files
29665
29666 Configuration headers:
29667 $config_headers
29668
29669 Configuration commands:
29670 $config_commands
29671
29672 Report bugs to the package provider."
29673
29674 _ACEOF
29675 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29676 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
29677 ac_cs_version="\\
29678 libgnu config.status UNUSED-VERSION
29679 configured by $0, generated by GNU Autoconf 2.69,
29680 with options \\"\$ac_cs_config\\"
29681
29682 Copyright (C) 2012 Free Software Foundation, Inc.
29683 This config.status script is free software; the Free Software Foundation
29684 gives unlimited permission to copy, distribute and modify it."
29685
29686 ac_pwd='$ac_pwd'
29687 srcdir='$srcdir'
29688 INSTALL='$INSTALL'
29689 MKDIR_P='$MKDIR_P'
29690 AWK='$AWK'
29691 test -n "\$AWK" || AWK=awk
29692 _ACEOF
29693
29694 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29695 # The default lists apply if the user does not specify any file.
29696 ac_need_defaults=:
29697 while test $# != 0
29698 do
29699 case $1 in
29700 --*=?*)
29701 ac_option=`expr "X$1" : 'X\([^=]*\)='`
29702 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
29703 ac_shift=:
29704 ;;
29705 --*=)
29706 ac_option=`expr "X$1" : 'X\([^=]*\)='`
29707 ac_optarg=
29708 ac_shift=:
29709 ;;
29710 *)
29711 ac_option=$1
29712 ac_optarg=$2
29713 ac_shift=shift
29714 ;;
29715 esac
29716
29717 case $ac_option in
29718 # Handling of the options.
29719 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
29720 ac_cs_recheck=: ;;
29721 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
29722 $as_echo "$ac_cs_version"; exit ;;
29723 --config | --confi | --conf | --con | --co | --c )
29724 $as_echo "$ac_cs_config"; exit ;;
29725 --debug | --debu | --deb | --de | --d | -d )
29726 debug=: ;;
29727 --file | --fil | --fi | --f )
29728 $ac_shift
29729 case $ac_optarg in
29730 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
29731 '') as_fn_error $? "missing file argument" ;;
29732 esac
29733 as_fn_append CONFIG_FILES " '$ac_optarg'"
29734 ac_need_defaults=false;;
29735 --header | --heade | --head | --hea )
29736 $ac_shift
29737 case $ac_optarg in
29738 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
29739 esac
29740 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
29741 ac_need_defaults=false;;
29742 --he | --h)
29743 # Conflict between --help and --header
29744 as_fn_error $? "ambiguous option: \`$1'
29745 Try \`$0 --help' for more information.";;
29746 --help | --hel | -h )
29747 $as_echo "$ac_cs_usage"; exit ;;
29748 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
29749 | -silent | --silent | --silen | --sile | --sil | --si | --s)
29750 ac_cs_silent=: ;;
29751
29752 # This is an error.
29753 -*) as_fn_error $? "unrecognized option: \`$1'
29754 Try \`$0 --help' for more information." ;;
29755
29756 *) as_fn_append ac_config_targets " $1"
29757 ac_need_defaults=false ;;
29758
29759 esac
29760 shift
29761 done
29762
29763 ac_configure_extra_args=
29764
29765 if $ac_cs_silent; then
29766 exec 6>/dev/null
29767 ac_configure_extra_args="$ac_configure_extra_args --silent"
29768 fi
29769
29770 _ACEOF
29771 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29772 if \$ac_cs_recheck; then
29773 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
29774 shift
29775 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
29776 CONFIG_SHELL='$SHELL'
29777 export CONFIG_SHELL
29778 exec "\$@"
29779 fi
29780
29781 _ACEOF
29782 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29783 exec 5>>config.log
29784 {
29785 echo
29786 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
29787 ## Running $as_me. ##
29788 _ASBOX
29789 $as_echo "$ac_log"
29790 } >&5
29791
29792 _ACEOF
29793 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29794 #
29795 # INIT-COMMANDS
29796 #
29797 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
29798
29799 _ACEOF
29800
29801 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29802
29803 # Handling of arguments.
29804 for ac_config_target in $ac_config_targets
29805 do
29806 case $ac_config_target in
29807 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
29808 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
29809 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
29810 "import/Makefile") CONFIG_FILES="$CONFIG_FILES import/Makefile" ;;
29811 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
29812
29813 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
29814 esac
29815 done
29816
29817
29818 # If the user did not use the arguments to specify the items to instantiate,
29819 # then the envvar interface is used. Set only those that are not.
29820 # We use the long form for the default assignment because of an extremely
29821 # bizarre bug on SunOS 4.1.3.
29822 if $ac_need_defaults; then
29823 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
29824 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
29825 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
29826 fi
29827
29828 # Have a temporary directory for convenience. Make it in the build tree
29829 # simply because there is no reason against having it here, and in addition,
29830 # creating and moving files from /tmp can sometimes cause problems.
29831 # Hook for its removal unless debugging.
29832 # Note that there is a small window in which the directory will not be cleaned:
29833 # after its creation but before its name has been assigned to `$tmp'.
29834 $debug ||
29835 {
29836 tmp= ac_tmp=
29837 trap 'exit_status=$?
29838 : "${ac_tmp:=$tmp}"
29839 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
29840 ' 0
29841 trap 'as_fn_exit 1' 1 2 13 15
29842 }
29843 # Create a (secure) tmp directory for tmp files.
29844
29845 {
29846 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
29847 test -d "$tmp"
29848 } ||
29849 {
29850 tmp=./conf$$-$RANDOM
29851 (umask 077 && mkdir "$tmp")
29852 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
29853 ac_tmp=$tmp
29854
29855 # Set up the scripts for CONFIG_FILES section.
29856 # No need to generate them if there are no CONFIG_FILES.
29857 # This happens for instance with `./config.status config.h'.
29858 if test -n "$CONFIG_FILES"; then
29859
29860
29861 ac_cr=`echo X | tr X '\015'`
29862 # On cygwin, bash can eat \r inside `` if the user requested igncr.
29863 # But we know of no other shell where ac_cr would be empty at this
29864 # point, so we can use a bashism as a fallback.
29865 if test "x$ac_cr" = x; then
29866 eval ac_cr=\$\'\\r\'
29867 fi
29868 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
29869 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
29870 ac_cs_awk_cr='\\r'
29871 else
29872 ac_cs_awk_cr=$ac_cr
29873 fi
29874
29875 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
29876 _ACEOF
29877
29878
29879 {
29880 echo "cat >conf$$subs.awk <<_ACEOF" &&
29881 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
29882 echo "_ACEOF"
29883 } >conf$$subs.sh ||
29884 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
29885 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
29886 ac_delim='%!_!# '
29887 for ac_last_try in false false false false false :; do
29888 . ./conf$$subs.sh ||
29889 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
29890
29891 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
29892 if test $ac_delim_n = $ac_delim_num; then
29893 break
29894 elif $ac_last_try; then
29895 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
29896 else
29897 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
29898 fi
29899 done
29900 rm -f conf$$subs.sh
29901
29902 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29903 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
29904 _ACEOF
29905 sed -n '
29906 h
29907 s/^/S["/; s/!.*/"]=/
29908 p
29909 g
29910 s/^[^!]*!//
29911 :repl
29912 t repl
29913 s/'"$ac_delim"'$//
29914 t delim
29915 :nl
29916 h
29917 s/\(.\{148\}\)..*/\1/
29918 t more1
29919 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
29920 p
29921 n
29922 b repl
29923 :more1
29924 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
29925 p
29926 g
29927 s/.\{148\}//
29928 t nl
29929 :delim
29930 h
29931 s/\(.\{148\}\)..*/\1/
29932 t more2
29933 s/["\\]/\\&/g; s/^/"/; s/$/"/
29934 p
29935 b
29936 :more2
29937 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
29938 p
29939 g
29940 s/.\{148\}//
29941 t delim
29942 ' <conf$$subs.awk | sed '
29943 /^[^""]/{
29944 N
29945 s/\n//
29946 }
29947 ' >>$CONFIG_STATUS || ac_write_fail=1
29948 rm -f conf$$subs.awk
29949 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29950 _ACAWK
29951 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
29952 for (key in S) S_is_set[key] = 1
29953 FS = "\a"
29954
29955 }
29956 {
29957 line = $ 0
29958 nfields = split(line, field, "@")
29959 substed = 0
29960 len = length(field[1])
29961 for (i = 2; i < nfields; i++) {
29962 key = field[i]
29963 keylen = length(key)
29964 if (S_is_set[key]) {
29965 value = S[key]
29966 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
29967 len += length(value) + length(field[++i])
29968 substed = 1
29969 } else
29970 len += 1 + keylen
29971 }
29972
29973 print line
29974 }
29975
29976 _ACAWK
29977 _ACEOF
29978 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29979 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
29980 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
29981 else
29982 cat
29983 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
29984 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
29985 _ACEOF
29986
29987 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
29988 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
29989 # trailing colons and then remove the whole line if VPATH becomes empty
29990 # (actually we leave an empty line to preserve line numbers).
29991 if test "x$srcdir" = x.; then
29992 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
29993 h
29994 s///
29995 s/^/:/
29996 s/[ ]*$/:/
29997 s/:\$(srcdir):/:/g
29998 s/:\${srcdir}:/:/g
29999 s/:@srcdir@:/:/g
30000 s/^:*//
30001 s/:*$//
30002 x
30003 s/\(=[ ]*\).*/\1/
30004 G
30005 s/\n//
30006 s/^[^=]*=[ ]*$//
30007 }'
30008 fi
30009
30010 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30011 fi # test -n "$CONFIG_FILES"
30012
30013 # Set up the scripts for CONFIG_HEADERS section.
30014 # No need to generate them if there are no CONFIG_HEADERS.
30015 # This happens for instance with `./config.status Makefile'.
30016 if test -n "$CONFIG_HEADERS"; then
30017 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
30018 BEGIN {
30019 _ACEOF
30020
30021 # Transform confdefs.h into an awk script `defines.awk', embedded as
30022 # here-document in config.status, that substitutes the proper values into
30023 # config.h.in to produce config.h.
30024
30025 # Create a delimiter string that does not exist in confdefs.h, to ease
30026 # handling of long lines.
30027 ac_delim='%!_!# '
30028 for ac_last_try in false false :; do
30029 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
30030 if test -z "$ac_tt"; then
30031 break
30032 elif $ac_last_try; then
30033 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
30034 else
30035 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
30036 fi
30037 done
30038
30039 # For the awk script, D is an array of macro values keyed by name,
30040 # likewise P contains macro parameters if any. Preserve backslash
30041 # newline sequences.
30042
30043 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
30044 sed -n '
30045 s/.\{148\}/&'"$ac_delim"'/g
30046 t rset
30047 :rset
30048 s/^[ ]*#[ ]*define[ ][ ]*/ /
30049 t def
30050 d
30051 :def
30052 s/\\$//
30053 t bsnl
30054 s/["\\]/\\&/g
30055 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
30056 D["\1"]=" \3"/p
30057 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
30058 d
30059 :bsnl
30060 s/["\\]/\\&/g
30061 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
30062 D["\1"]=" \3\\\\\\n"\\/p
30063 t cont
30064 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
30065 t cont
30066 d
30067 :cont
30068 n
30069 s/.\{148\}/&'"$ac_delim"'/g
30070 t clear
30071 :clear
30072 s/\\$//
30073 t bsnlc
30074 s/["\\]/\\&/g; s/^/"/; s/$/"/p
30075 d
30076 :bsnlc
30077 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
30078 b cont
30079 ' <confdefs.h | sed '
30080 s/'"$ac_delim"'/"\\\
30081 "/g' >>$CONFIG_STATUS || ac_write_fail=1
30082
30083 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30084 for (key in D) D_is_set[key] = 1
30085 FS = "\a"
30086 }
30087 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
30088 line = \$ 0
30089 split(line, arg, " ")
30090 if (arg[1] == "#") {
30091 defundef = arg[2]
30092 mac1 = arg[3]
30093 } else {
30094 defundef = substr(arg[1], 2)
30095 mac1 = arg[2]
30096 }
30097 split(mac1, mac2, "(") #)
30098 macro = mac2[1]
30099 prefix = substr(line, 1, index(line, defundef) - 1)
30100 if (D_is_set[macro]) {
30101 # Preserve the white space surrounding the "#".
30102 print prefix "define", macro P[macro] D[macro]
30103 next
30104 } else {
30105 # Replace #undef with comments. This is necessary, for example,
30106 # in the case of _POSIX_SOURCE, which is predefined and required
30107 # on some systems where configure will not decide to define it.
30108 if (defundef == "undef") {
30109 print "/*", prefix defundef, macro, "*/"
30110 next
30111 }
30112 }
30113 }
30114 { print }
30115 _ACAWK
30116 _ACEOF
30117 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30118 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
30119 fi # test -n "$CONFIG_HEADERS"
30120
30121
30122 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
30123 shift
30124 for ac_tag
30125 do
30126 case $ac_tag in
30127 :[FHLC]) ac_mode=$ac_tag; continue;;
30128 esac
30129 case $ac_mode$ac_tag in
30130 :[FHL]*:*);;
30131 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
30132 :[FH]-) ac_tag=-:-;;
30133 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
30134 esac
30135 ac_save_IFS=$IFS
30136 IFS=:
30137 set x $ac_tag
30138 IFS=$ac_save_IFS
30139 shift
30140 ac_file=$1
30141 shift
30142
30143 case $ac_mode in
30144 :L) ac_source=$1;;
30145 :[FH])
30146 ac_file_inputs=
30147 for ac_f
30148 do
30149 case $ac_f in
30150 -) ac_f="$ac_tmp/stdin";;
30151 *) # Look for the file first in the build tree, then in the source tree
30152 # (if the path is not absolute). The absolute path cannot be DOS-style,
30153 # because $ac_f cannot contain `:'.
30154 test -f "$ac_f" ||
30155 case $ac_f in
30156 [\\/$]*) false;;
30157 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
30158 esac ||
30159 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
30160 esac
30161 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
30162 as_fn_append ac_file_inputs " '$ac_f'"
30163 done
30164
30165 # Let's still pretend it is `configure' which instantiates (i.e., don't
30166 # use $as_me), people would be surprised to read:
30167 # /* config.h. Generated by config.status. */
30168 configure_input='Generated from '`
30169 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
30170 `' by configure.'
30171 if test x"$ac_file" != x-; then
30172 configure_input="$ac_file. $configure_input"
30173 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
30174 $as_echo "$as_me: creating $ac_file" >&6;}
30175 fi
30176 # Neutralize special characters interpreted by sed in replacement strings.
30177 case $configure_input in #(
30178 *\&* | *\|* | *\\* )
30179 ac_sed_conf_input=`$as_echo "$configure_input" |
30180 sed 's/[\\\\&|]/\\\\&/g'`;; #(
30181 *) ac_sed_conf_input=$configure_input;;
30182 esac
30183
30184 case $ac_tag in
30185 *:-:* | *:-) cat >"$ac_tmp/stdin" \
30186 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
30187 esac
30188 ;;
30189 esac
30190
30191 ac_dir=`$as_dirname -- "$ac_file" ||
30192 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30193 X"$ac_file" : 'X\(//\)[^/]' \| \
30194 X"$ac_file" : 'X\(//\)$' \| \
30195 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
30196 $as_echo X"$ac_file" |
30197 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30198 s//\1/
30199 q
30200 }
30201 /^X\(\/\/\)[^/].*/{
30202 s//\1/
30203 q
30204 }
30205 /^X\(\/\/\)$/{
30206 s//\1/
30207 q
30208 }
30209 /^X\(\/\).*/{
30210 s//\1/
30211 q
30212 }
30213 s/.*/./; q'`
30214 as_dir="$ac_dir"; as_fn_mkdir_p
30215 ac_builddir=.
30216
30217 case "$ac_dir" in
30218 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
30219 *)
30220 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
30221 # A ".." for each directory in $ac_dir_suffix.
30222 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
30223 case $ac_top_builddir_sub in
30224 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
30225 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
30226 esac ;;
30227 esac
30228 ac_abs_top_builddir=$ac_pwd
30229 ac_abs_builddir=$ac_pwd$ac_dir_suffix
30230 # for backward compatibility:
30231 ac_top_builddir=$ac_top_build_prefix
30232
30233 case $srcdir in
30234 .) # We are building in place.
30235 ac_srcdir=.
30236 ac_top_srcdir=$ac_top_builddir_sub
30237 ac_abs_top_srcdir=$ac_pwd ;;
30238 [\\/]* | ?:[\\/]* ) # Absolute name.
30239 ac_srcdir=$srcdir$ac_dir_suffix;
30240 ac_top_srcdir=$srcdir
30241 ac_abs_top_srcdir=$srcdir ;;
30242 *) # Relative name.
30243 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
30244 ac_top_srcdir=$ac_top_build_prefix$srcdir
30245 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
30246 esac
30247 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
30248
30249
30250 case $ac_mode in
30251 :F)
30252 #
30253 # CONFIG_FILE
30254 #
30255
30256 case $INSTALL in
30257 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
30258 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
30259 esac
30260 ac_MKDIR_P=$MKDIR_P
30261 case $MKDIR_P in
30262 [\\/$]* | ?:[\\/]* ) ;;
30263 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
30264 esac
30265 _ACEOF
30266
30267 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30268 # If the template does not know about datarootdir, expand it.
30269 # FIXME: This hack should be removed a few years after 2.60.
30270 ac_datarootdir_hack=; ac_datarootdir_seen=
30271 ac_sed_dataroot='
30272 /datarootdir/ {
30273 p
30274 q
30275 }
30276 /@datadir@/p
30277 /@docdir@/p
30278 /@infodir@/p
30279 /@localedir@/p
30280 /@mandir@/p'
30281 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
30282 *datarootdir*) ac_datarootdir_seen=yes;;
30283 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
30284 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
30285 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
30286 _ACEOF
30287 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30288 ac_datarootdir_hack='
30289 s&@datadir@&$datadir&g
30290 s&@docdir@&$docdir&g
30291 s&@infodir@&$infodir&g
30292 s&@localedir@&$localedir&g
30293 s&@mandir@&$mandir&g
30294 s&\\\${datarootdir}&$datarootdir&g' ;;
30295 esac
30296 _ACEOF
30297
30298 # Neutralize VPATH when `$srcdir' = `.'.
30299 # Shell code in configure.ac might set extrasub.
30300 # FIXME: do we really want to maintain this feature?
30301 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30302 ac_sed_extra="$ac_vpsub
30303 $extrasub
30304 _ACEOF
30305 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30306 :t
30307 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
30308 s|@configure_input@|$ac_sed_conf_input|;t t
30309 s&@top_builddir@&$ac_top_builddir_sub&;t t
30310 s&@top_build_prefix@&$ac_top_build_prefix&;t t
30311 s&@srcdir@&$ac_srcdir&;t t
30312 s&@abs_srcdir@&$ac_abs_srcdir&;t t
30313 s&@top_srcdir@&$ac_top_srcdir&;t t
30314 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
30315 s&@builddir@&$ac_builddir&;t t
30316 s&@abs_builddir@&$ac_abs_builddir&;t t
30317 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
30318 s&@INSTALL@&$ac_INSTALL&;t t
30319 s&@MKDIR_P@&$ac_MKDIR_P&;t t
30320 $ac_datarootdir_hack
30321 "
30322 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
30323 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
30324
30325 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
30326 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
30327 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
30328 "$ac_tmp/out"`; test -z "$ac_out"; } &&
30329 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
30330 which seems to be undefined. Please make sure it is defined" >&5
30331 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
30332 which seems to be undefined. Please make sure it is defined" >&2;}
30333
30334 rm -f "$ac_tmp/stdin"
30335 case $ac_file in
30336 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
30337 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
30338 esac \
30339 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
30340 ;;
30341 :H)
30342 #
30343 # CONFIG_HEADER
30344 #
30345 if test x"$ac_file" != x-; then
30346 {
30347 $as_echo "/* $configure_input */" \
30348 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
30349 } >"$ac_tmp/config.h" \
30350 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
30351 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
30352 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
30353 $as_echo "$as_me: $ac_file is unchanged" >&6;}
30354 else
30355 rm -f "$ac_file"
30356 mv "$ac_tmp/config.h" "$ac_file" \
30357 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
30358 fi
30359 else
30360 $as_echo "/* $configure_input */" \
30361 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
30362 || as_fn_error $? "could not create -" "$LINENO" 5
30363 fi
30364 # Compute "$ac_file"'s index in $config_headers.
30365 _am_arg="$ac_file"
30366 _am_stamp_count=1
30367 for _am_header in $config_headers :; do
30368 case $_am_header in
30369 $_am_arg | $_am_arg:* )
30370 break ;;
30371 * )
30372 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
30373 esac
30374 done
30375 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
30376 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30377 X"$_am_arg" : 'X\(//\)[^/]' \| \
30378 X"$_am_arg" : 'X\(//\)$' \| \
30379 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
30380 $as_echo X"$_am_arg" |
30381 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30382 s//\1/
30383 q
30384 }
30385 /^X\(\/\/\)[^/].*/{
30386 s//\1/
30387 q
30388 }
30389 /^X\(\/\/\)$/{
30390 s//\1/
30391 q
30392 }
30393 /^X\(\/\).*/{
30394 s//\1/
30395 q
30396 }
30397 s/.*/./; q'`/stamp-h$_am_stamp_count
30398 ;;
30399
30400 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
30401 $as_echo "$as_me: executing $ac_file commands" >&6;}
30402 ;;
30403 esac
30404
30405
30406 case $ac_file$ac_mode in
30407 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
30408 # Older Autoconf quotes --file arguments for eval, but not when files
30409 # are listed without --file. Let's play safe and only enable the eval
30410 # if we detect the quoting.
30411 case $CONFIG_FILES in
30412 *\'*) eval set x "$CONFIG_FILES" ;;
30413 *) set x $CONFIG_FILES ;;
30414 esac
30415 shift
30416 for mf
30417 do
30418 # Strip MF so we end up with the name of the file.
30419 mf=`echo "$mf" | sed -e 's/:.*$//'`
30420 # Check whether this is an Automake generated Makefile or not.
30421 # We used to match only the files named 'Makefile.in', but
30422 # some people rename them; so instead we look at the file content.
30423 # Grep'ing the first line is not enough: some people post-process
30424 # each Makefile.in and add a new line on top of each file to say so.
30425 # Grep'ing the whole file is not good either: AIX grep has a line
30426 # limit of 2048, but all sed's we know have understand at least 4000.
30427 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
30428 dirpart=`$as_dirname -- "$mf" ||
30429 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30430 X"$mf" : 'X\(//\)[^/]' \| \
30431 X"$mf" : 'X\(//\)$' \| \
30432 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
30433 $as_echo X"$mf" |
30434 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30435 s//\1/
30436 q
30437 }
30438 /^X\(\/\/\)[^/].*/{
30439 s//\1/
30440 q
30441 }
30442 /^X\(\/\/\)$/{
30443 s//\1/
30444 q
30445 }
30446 /^X\(\/\).*/{
30447 s//\1/
30448 q
30449 }
30450 s/.*/./; q'`
30451 else
30452 continue
30453 fi
30454 # Extract the definition of DEPDIR, am__include, and am__quote
30455 # from the Makefile without running 'make'.
30456 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
30457 test -z "$DEPDIR" && continue
30458 am__include=`sed -n 's/^am__include = //p' < "$mf"`
30459 test -z "$am__include" && continue
30460 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
30461 # Find all dependency output files, they are included files with
30462 # $(DEPDIR) in their names. We invoke sed twice because it is the
30463 # simplest approach to changing $(DEPDIR) to its actual value in the
30464 # expansion.
30465 for file in `sed -n "
30466 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
30467 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
30468 # Make sure the directory exists.
30469 test -f "$dirpart/$file" && continue
30470 fdir=`$as_dirname -- "$file" ||
30471 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30472 X"$file" : 'X\(//\)[^/]' \| \
30473 X"$file" : 'X\(//\)$' \| \
30474 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
30475 $as_echo X"$file" |
30476 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30477 s//\1/
30478 q
30479 }
30480 /^X\(\/\/\)[^/].*/{
30481 s//\1/
30482 q
30483 }
30484 /^X\(\/\/\)$/{
30485 s//\1/
30486 q
30487 }
30488 /^X\(\/\).*/{
30489 s//\1/
30490 q
30491 }
30492 s/.*/./; q'`
30493 as_dir=$dirpart/$fdir; as_fn_mkdir_p
30494 # echo "creating $dirpart/$file"
30495 echo '# dummy' > "$dirpart/$file"
30496 done
30497 done
30498 }
30499 ;;
30500 "default":C)
30501 case x$CONFIG_HEADERS in
30502 xconfig.h:config.in)
30503 echo > stamp-h ;;
30504 esac
30505 ;;
30506
30507 esac
30508 done # for ac_tag
30509
30510
30511 as_fn_exit 0
30512 _ACEOF
30513 ac_clean_files=$ac_clean_files_save
30514
30515 test $ac_write_fail = 0 ||
30516 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
30517
30518
30519 # configure is writing to config.log, and then calls config.status.
30520 # config.status does its own redirection, appending to config.log.
30521 # Unfortunately, on DOS this fails, as config.log is still kept open
30522 # by configure, so config.status won't be able to write to it; its
30523 # output is simply discarded. So we exec the FD to /dev/null,
30524 # effectively closing config.log, so it can be properly (re)opened and
30525 # appended to by config.status. When coming back to configure, we
30526 # need to make the FD available again.
30527 if test "$no_create" != yes; then
30528 ac_cs_success=:
30529 ac_config_status_args=
30530 test "$silent" = yes &&
30531 ac_config_status_args="$ac_config_status_args --quiet"
30532 exec 5>/dev/null
30533 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
30534 exec 5>>config.log
30535 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
30536 # would make configure fail if this is the last instruction.
30537 $ac_cs_success || as_fn_exit 1
30538 fi
30539 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
30540 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
30541 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
30542 fi
30543
30544
30545 exit 0