7c74371e8f45ca726515144457d32d7392e19972
[deliverable/binutils-gdb.git] / gnulib / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for libgnu UNUSED-VERSION.
4 #
5 #
6 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
7 #
8 #
9 # This configure script is free software; the Free Software Foundation
10 # gives unlimited permission to copy, distribute and modify it.
11 ## -------------------- ##
12 ## M4sh Initialization. ##
13 ## -------------------- ##
14
15 # Be more Bourne compatible
16 DUALCASE=1; export DUALCASE # for MKS sh
17 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
18 emulate sh
19 NULLCMD=:
20 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
21 # is contrary to our usage. Disable this feature.
22 alias -g '${1+"$@"}'='"$@"'
23 setopt NO_GLOB_SUBST
24 else
25 case `(set -o) 2>/dev/null` in #(
26 *posix*) :
27 set -o posix ;; #(
28 *) :
29 ;;
30 esac
31 fi
32
33
34 as_nl='
35 '
36 export as_nl
37 # Printing a long string crashes Solaris 7 /usr/bin/printf.
38 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41 # Prefer a ksh shell builtin over an external printf program on Solaris,
42 # but without wasting forks for bash or zsh.
43 if test -z "$BASH_VERSION$ZSH_VERSION" \
44 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45 as_echo='print -r --'
46 as_echo_n='print -rn --'
47 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='printf %s\n'
49 as_echo_n='printf %s'
50 else
51 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53 as_echo_n='/usr/ucb/echo -n'
54 else
55 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56 as_echo_n_body='eval
57 arg=$1;
58 case $arg in #(
59 *"$as_nl"*)
60 expr "X$arg" : "X\\(.*\\)$as_nl";
61 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62 esac;
63 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64 '
65 export as_echo_n_body
66 as_echo_n='sh -c $as_echo_n_body as_echo'
67 fi
68 export as_echo_body
69 as_echo='sh -c $as_echo_body as_echo'
70 fi
71
72 # The user is always right.
73 if test "${PATH_SEPARATOR+set}" != set; then
74 PATH_SEPARATOR=:
75 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77 PATH_SEPARATOR=';'
78 }
79 fi
80
81
82 # IFS
83 # We need space, tab and new line, in precisely that order. Quoting is
84 # there to prevent editors from complaining about space-tab.
85 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
86 # splitting by setting IFS to empty value.)
87 IFS=" "" $as_nl"
88
89 # Find who we are. Look in the path if we contain no directory separator.
90 as_myself=
91 case $0 in #((
92 *[\\/]* ) as_myself=$0 ;;
93 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
94 for as_dir in $PATH
95 do
96 IFS=$as_save_IFS
97 test -z "$as_dir" && as_dir=.
98 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
99 done
100 IFS=$as_save_IFS
101
102 ;;
103 esac
104 # We did not find ourselves, most probably we were run as `sh COMMAND'
105 # in which case we are not to be found in the path.
106 if test "x$as_myself" = x; then
107 as_myself=$0
108 fi
109 if test ! -f "$as_myself"; then
110 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
111 exit 1
112 fi
113
114 # Unset variables that we do not need and which cause bugs (e.g. in
115 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
116 # suppresses any "Segmentation fault" message there. '((' could
117 # trigger a bug in pdksh 5.2.14.
118 for as_var in BASH_ENV ENV MAIL MAILPATH
119 do eval test x\${$as_var+set} = xset \
120 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
121 done
122 PS1='$ '
123 PS2='> '
124 PS4='+ '
125
126 # NLS nuisances.
127 LC_ALL=C
128 export LC_ALL
129 LANGUAGE=C
130 export LANGUAGE
131
132 # CDPATH.
133 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
134
135 # Use a proper internal environment variable to ensure we don't fall
136 # into an infinite loop, continuously re-executing ourselves.
137 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
138 _as_can_reexec=no; export _as_can_reexec;
139 # We cannot yet assume a decent shell, so we have to provide a
140 # neutralization value for shells without unset; and this also
141 # works around shells that cannot unset nonexistent variables.
142 # Preserve -v and -x to the replacement shell.
143 BASH_ENV=/dev/null
144 ENV=/dev/null
145 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
146 case $- in # ((((
147 *v*x* | *x*v* ) as_opts=-vx ;;
148 *v* ) as_opts=-v ;;
149 *x* ) as_opts=-x ;;
150 * ) as_opts= ;;
151 esac
152 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
153 # Admittedly, this is quite paranoid, since all the known shells bail
154 # out after a failed `exec'.
155 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
156 as_fn_exit 255
157 fi
158 # We don't want this to propagate to other subprocesses.
159 { _as_can_reexec=; unset _as_can_reexec;}
160 if test "x$CONFIG_SHELL" = x; then
161 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
162 emulate sh
163 NULLCMD=:
164 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
165 # is contrary to our usage. Disable this feature.
166 alias -g '\${1+\"\$@\"}'='\"\$@\"'
167 setopt NO_GLOB_SUBST
168 else
169 case \`(set -o) 2>/dev/null\` in #(
170 *posix*) :
171 set -o posix ;; #(
172 *) :
173 ;;
174 esac
175 fi
176 "
177 as_required="as_fn_return () { (exit \$1); }
178 as_fn_success () { as_fn_return 0; }
179 as_fn_failure () { as_fn_return 1; }
180 as_fn_ret_success () { return 0; }
181 as_fn_ret_failure () { return 1; }
182
183 exitcode=0
184 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
185 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
186 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
187 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
188 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
189
190 else
191 exitcode=1; echo positional parameters were not saved.
192 fi
193 test x\$exitcode = x0 || exit 1
194 test -x / || exit 1"
195 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
196 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
197 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
198 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
199 test \$(( 1 + 1 )) = 2 || exit 1"
200 if (eval "$as_required") 2>/dev/null; then :
201 as_have_required=yes
202 else
203 as_have_required=no
204 fi
205 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
206
207 else
208 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
209 as_found=false
210 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
211 do
212 IFS=$as_save_IFS
213 test -z "$as_dir" && as_dir=.
214 as_found=:
215 case $as_dir in #(
216 /*)
217 for as_base in sh bash ksh sh5; do
218 # Try only shells that exist, to save several forks.
219 as_shell=$as_dir/$as_base
220 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
221 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
222 CONFIG_SHELL=$as_shell as_have_required=yes
223 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 break 2
225 fi
226 fi
227 done;;
228 esac
229 as_found=false
230 done
231 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
232 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
233 CONFIG_SHELL=$SHELL as_have_required=yes
234 fi; }
235 IFS=$as_save_IFS
236
237
238 if test "x$CONFIG_SHELL" != x; then :
239 export CONFIG_SHELL
240 # We cannot yet assume a decent shell, so we have to provide a
241 # neutralization value for shells without unset; and this also
242 # works around shells that cannot unset nonexistent variables.
243 # Preserve -v and -x to the replacement shell.
244 BASH_ENV=/dev/null
245 ENV=/dev/null
246 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247 case $- in # ((((
248 *v*x* | *x*v* ) as_opts=-vx ;;
249 *v* ) as_opts=-v ;;
250 *x* ) as_opts=-x ;;
251 * ) as_opts= ;;
252 esac
253 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
254 # Admittedly, this is quite paranoid, since all the known shells bail
255 # out after a failed `exec'.
256 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
257 exit 255
258 fi
259
260 if test x$as_have_required = xno; then :
261 $as_echo "$0: This script requires a shell more modern than all"
262 $as_echo "$0: the shells that I found on your system."
263 if test x${ZSH_VERSION+set} = xset ; then
264 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
265 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
266 else
267 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
268 $0: including any error possibly output before this
269 $0: message. Then install a modern shell, or manually run
270 $0: the script under such a shell if you do have one."
271 fi
272 exit 1
273 fi
274 fi
275 fi
276 SHELL=${CONFIG_SHELL-/bin/sh}
277 export SHELL
278 # Unset more variables known to interfere with behavior of common tools.
279 CLICOLOR_FORCE= GREP_OPTIONS=
280 unset CLICOLOR_FORCE GREP_OPTIONS
281
282 ## --------------------- ##
283 ## M4sh Shell Functions. ##
284 ## --------------------- ##
285 # as_fn_unset VAR
286 # ---------------
287 # Portably unset VAR.
288 as_fn_unset ()
289 {
290 { eval $1=; unset $1;}
291 }
292 as_unset=as_fn_unset
293
294 # as_fn_set_status STATUS
295 # -----------------------
296 # Set $? to STATUS, without forking.
297 as_fn_set_status ()
298 {
299 return $1
300 } # as_fn_set_status
301
302 # as_fn_exit STATUS
303 # -----------------
304 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
305 as_fn_exit ()
306 {
307 set +e
308 as_fn_set_status $1
309 exit $1
310 } # as_fn_exit
311
312 # as_fn_mkdir_p
313 # -------------
314 # Create "$as_dir" as a directory, including parents if necessary.
315 as_fn_mkdir_p ()
316 {
317
318 case $as_dir in #(
319 -*) as_dir=./$as_dir;;
320 esac
321 test -d "$as_dir" || eval $as_mkdir_p || {
322 as_dirs=
323 while :; do
324 case $as_dir in #(
325 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
326 *) as_qdir=$as_dir;;
327 esac
328 as_dirs="'$as_qdir' $as_dirs"
329 as_dir=`$as_dirname -- "$as_dir" ||
330 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
331 X"$as_dir" : 'X\(//\)[^/]' \| \
332 X"$as_dir" : 'X\(//\)$' \| \
333 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
334 $as_echo X"$as_dir" |
335 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
336 s//\1/
337 q
338 }
339 /^X\(\/\/\)[^/].*/{
340 s//\1/
341 q
342 }
343 /^X\(\/\/\)$/{
344 s//\1/
345 q
346 }
347 /^X\(\/\).*/{
348 s//\1/
349 q
350 }
351 s/.*/./; q'`
352 test -d "$as_dir" && break
353 done
354 test -z "$as_dirs" || eval "mkdir $as_dirs"
355 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
356
357
358 } # as_fn_mkdir_p
359
360 # as_fn_executable_p FILE
361 # -----------------------
362 # Test if FILE is an executable regular file.
363 as_fn_executable_p ()
364 {
365 test -f "$1" && test -x "$1"
366 } # as_fn_executable_p
367 # as_fn_append VAR VALUE
368 # ----------------------
369 # Append the text in VALUE to the end of the definition contained in VAR. Take
370 # advantage of any shell optimizations that allow amortized linear growth over
371 # repeated appends, instead of the typical quadratic growth present in naive
372 # implementations.
373 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
374 eval 'as_fn_append ()
375 {
376 eval $1+=\$2
377 }'
378 else
379 as_fn_append ()
380 {
381 eval $1=\$$1\$2
382 }
383 fi # as_fn_append
384
385 # as_fn_arith ARG...
386 # ------------------
387 # Perform arithmetic evaluation on the ARGs, and store the result in the
388 # global $as_val. Take advantage of shells that can avoid forks. The arguments
389 # must be portable across $(()) and expr.
390 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
391 eval 'as_fn_arith ()
392 {
393 as_val=$(( $* ))
394 }'
395 else
396 as_fn_arith ()
397 {
398 as_val=`expr "$@" || test $? -eq 1`
399 }
400 fi # as_fn_arith
401
402
403 # as_fn_error STATUS ERROR [LINENO LOG_FD]
404 # ----------------------------------------
405 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
406 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
407 # script with STATUS, using 1 if that was 0.
408 as_fn_error ()
409 {
410 as_status=$1; test $as_status -eq 0 && as_status=1
411 if test "$4"; then
412 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
413 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
414 fi
415 $as_echo "$as_me: error: $2" >&2
416 as_fn_exit $as_status
417 } # as_fn_error
418
419 if expr a : '\(a\)' >/dev/null 2>&1 &&
420 test "X`expr 00001 : '.*\(...\)'`" = X001; then
421 as_expr=expr
422 else
423 as_expr=false
424 fi
425
426 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
427 as_basename=basename
428 else
429 as_basename=false
430 fi
431
432 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
433 as_dirname=dirname
434 else
435 as_dirname=false
436 fi
437
438 as_me=`$as_basename -- "$0" ||
439 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
440 X"$0" : 'X\(//\)$' \| \
441 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
442 $as_echo X/"$0" |
443 sed '/^.*\/\([^/][^/]*\)\/*$/{
444 s//\1/
445 q
446 }
447 /^X\/\(\/\/\)$/{
448 s//\1/
449 q
450 }
451 /^X\/\(\/\).*/{
452 s//\1/
453 q
454 }
455 s/.*/./; q'`
456
457 # Avoid depending upon Character Ranges.
458 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
459 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
460 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
461 as_cr_digits='0123456789'
462 as_cr_alnum=$as_cr_Letters$as_cr_digits
463
464
465 as_lineno_1=$LINENO as_lineno_1a=$LINENO
466 as_lineno_2=$LINENO as_lineno_2a=$LINENO
467 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
468 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
469 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
470 sed -n '
471 p
472 /[$]LINENO/=
473 ' <$as_myself |
474 sed '
475 s/[$]LINENO.*/&-/
476 t lineno
477 b
478 :lineno
479 N
480 :loop
481 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
482 t loop
483 s/-\n.*//
484 ' >$as_me.lineno &&
485 chmod +x "$as_me.lineno" ||
486 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
487
488 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
489 # already done that, so ensure we don't try to do so again and fall
490 # in an infinite loop. This has already happened in practice.
491 _as_can_reexec=no; export _as_can_reexec
492 # Don't try to exec as it changes $[0], causing all sort of problems
493 # (the dirname of $[0] is not the place where we might find the
494 # original and so on. Autoconf is especially sensitive to this).
495 . "./$as_me.lineno"
496 # Exit status is that of the last command.
497 exit
498 }
499
500 ECHO_C= ECHO_N= ECHO_T=
501 case `echo -n x` in #(((((
502 -n*)
503 case `echo 'xy\c'` in
504 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
505 xy) ECHO_C='\c';;
506 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
507 ECHO_T=' ';;
508 esac;;
509 *)
510 ECHO_N='-n';;
511 esac
512
513 rm -f conf$$ conf$$.exe conf$$.file
514 if test -d conf$$.dir; then
515 rm -f conf$$.dir/conf$$.file
516 else
517 rm -f conf$$.dir
518 mkdir conf$$.dir 2>/dev/null
519 fi
520 if (echo >conf$$.file) 2>/dev/null; then
521 if ln -s conf$$.file conf$$ 2>/dev/null; then
522 as_ln_s='ln -s'
523 # ... but there are two gotchas:
524 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
525 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
526 # In both cases, we have to default to `cp -pR'.
527 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
528 as_ln_s='cp -pR'
529 elif ln conf$$.file conf$$ 2>/dev/null; then
530 as_ln_s=ln
531 else
532 as_ln_s='cp -pR'
533 fi
534 else
535 as_ln_s='cp -pR'
536 fi
537 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538 rmdir conf$$.dir 2>/dev/null
539
540 if mkdir -p . 2>/dev/null; then
541 as_mkdir_p='mkdir -p "$as_dir"'
542 else
543 test -d ./-p && rmdir ./-p
544 as_mkdir_p=false
545 fi
546
547 as_test_x='test -x'
548 as_executable_p=as_fn_executable_p
549
550 # Sed expression to map a string onto a valid CPP name.
551 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
552
553 # Sed expression to map a string onto a valid variable name.
554 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
555
556
557 test -n "$DJDIR" || exec 7<&0 </dev/null
558 exec 6>&1
559
560 # Name of the host.
561 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
562 # so uname gets run too.
563 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
564
565 #
566 # Initializations.
567 #
568 ac_default_prefix=/usr/local
569 ac_clean_files=
570 ac_config_libobj_dir=.
571 LIBOBJS=
572 cross_compiling=no
573 subdirs=
574 MFLAGS=
575 MAKEFLAGS=
576
577 # Identity of this package.
578 PACKAGE_NAME='libgnu'
579 PACKAGE_TARNAME='libgnu'
580 PACKAGE_VERSION='UNUSED-VERSION'
581 PACKAGE_STRING='libgnu UNUSED-VERSION'
582 PACKAGE_BUGREPORT=''
583 PACKAGE_URL=''
584
585 ac_unique_file="import/memmem.c"
586 # Factoring default headers for most tests.
587 ac_includes_default="\
588 #include <stdio.h>
589 #ifdef HAVE_SYS_TYPES_H
590 # include <sys/types.h>
591 #endif
592 #ifdef HAVE_SYS_STAT_H
593 # include <sys/stat.h>
594 #endif
595 #ifdef STDC_HEADERS
596 # include <stdlib.h>
597 # include <stddef.h>
598 #else
599 # ifdef HAVE_STDLIB_H
600 # include <stdlib.h>
601 # endif
602 #endif
603 #ifdef HAVE_STRING_H
604 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
605 # include <memory.h>
606 # endif
607 # include <string.h>
608 #endif
609 #ifdef HAVE_STRINGS_H
610 # include <strings.h>
611 #endif
612 #ifdef HAVE_INTTYPES_H
613 # include <inttypes.h>
614 #endif
615 #ifdef HAVE_STDINT_H
616 # include <stdint.h>
617 #endif
618 #ifdef HAVE_UNISTD_H
619 # include <unistd.h>
620 #endif"
621
622 gl_use_threads_default=
623 gl_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
8454
8455
8456 ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default"
8457 if test "x$ac_cv_have_decl_fchdir" = xyes; then :
8458 ac_have_decl=1
8459 else
8460 ac_have_decl=0
8461 fi
8462
8463 cat >>confdefs.h <<_ACEOF
8464 #define HAVE_DECL_FCHDIR $ac_have_decl
8465 _ACEOF
8466
8467
8468
8469 GNULIB_FCNTL=0;
8470 GNULIB_NONBLOCKING=0;
8471 GNULIB_OPEN=0;
8472 GNULIB_OPENAT=0;
8473 HAVE_FCNTL=1;
8474 HAVE_OPENAT=1;
8475 REPLACE_FCNTL=0;
8476 REPLACE_OPEN=0;
8477 REPLACE_OPENAT=0;
8478
8479
8480
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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
8507 $as_echo_n "checking for working fcntl.h... " >&6; }
8508 if ${gl_cv_header_working_fcntl_h+:} false; then :
8509 $as_echo_n "(cached) " >&6
8510 else
8511 if test "$cross_compiling" = yes; then :
8512 gl_cv_header_working_fcntl_h=cross-compiling
8513 else
8514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8515 /* end confdefs.h. */
8516 #include <sys/types.h>
8517 #include <sys/stat.h>
8518 #if HAVE_UNISTD_H
8519 # include <unistd.h>
8520 #else /* on Windows with MSVC */
8521 # include <io.h>
8522 # include <stdlib.h>
8523 # defined sleep(n) _sleep ((n) * 1000)
8524 #endif
8525 #include <fcntl.h>
8526 #ifndef O_NOATIME
8527 #define O_NOATIME 0
8528 #endif
8529 #ifndef O_NOFOLLOW
8530 #define O_NOFOLLOW 0
8531 #endif
8532 static int const constants[] =
8533 {
8534 O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
8535 O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
8536 };
8537
8538 int
8539 main ()
8540 {
8541
8542 int result = !constants;
8543 #if HAVE_SYMLINK
8544 {
8545 static char const sym[] = "conftest.sym";
8546 if (symlink ("/dev/null", sym) != 0)
8547 result |= 2;
8548 else
8549 {
8550 int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
8551 if (fd >= 0)
8552 {
8553 close (fd);
8554 result |= 4;
8555 }
8556 }
8557 if (unlink (sym) != 0 || symlink (".", sym) != 0)
8558 result |= 2;
8559 else
8560 {
8561 int fd = open (sym, O_RDONLY | O_NOFOLLOW);
8562 if (fd >= 0)
8563 {
8564 close (fd);
8565 result |= 4;
8566 }
8567 }
8568 unlink (sym);
8569 }
8570 #endif
8571 {
8572 static char const file[] = "confdefs.h";
8573 int fd = open (file, O_RDONLY | O_NOATIME);
8574 if (fd < 0)
8575 result |= 8;
8576 else
8577 {
8578 struct stat st0;
8579 if (fstat (fd, &st0) != 0)
8580 result |= 16;
8581 else
8582 {
8583 char c;
8584 sleep (1);
8585 if (read (fd, &c, 1) != 1)
8586 result |= 24;
8587 else
8588 {
8589 if (close (fd) != 0)
8590 result |= 32;
8591 else
8592 {
8593 struct stat st1;
8594 if (stat (file, &st1) != 0)
8595 result |= 40;
8596 else
8597 if (st0.st_atime != st1.st_atime)
8598 result |= 64;
8599 }
8600 }
8601 }
8602 }
8603 }
8604 return result;
8605 ;
8606 return 0;
8607 }
8608 _ACEOF
8609 if ac_fn_c_try_run "$LINENO"; then :
8610 gl_cv_header_working_fcntl_h=yes
8611 else
8612 case $? in #(
8613 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
8614 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
8615 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
8616 *) gl_cv_header_working_fcntl_h='no';;
8617 esac
8618 fi
8619 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8620 conftest.$ac_objext conftest.beam conftest.$ac_ext
8621 fi
8622
8623 fi
8624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
8625 $as_echo "$gl_cv_header_working_fcntl_h" >&6; }
8626
8627 case $gl_cv_header_working_fcntl_h in #(
8628 *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
8629 *) ac_val=1;;
8630 esac
8631
8632 cat >>confdefs.h <<_ACEOF
8633 #define HAVE_WORKING_O_NOATIME $ac_val
8634 _ACEOF
8635
8636
8637 case $gl_cv_header_working_fcntl_h in #(
8638 *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
8639 *) ac_val=1;;
8640 esac
8641
8642 cat >>confdefs.h <<_ACEOF
8643 #define HAVE_WORKING_O_NOFOLLOW $ac_val
8644 _ACEOF
8645
8646
8647 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
8648 if test "x$ac_cv_type_pid_t" = xyes; then :
8649
8650 else
8651
8652 cat >>confdefs.h <<_ACEOF
8653 #define pid_t int
8654 _ACEOF
8655
8656 fi
8657
8658 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
8659 if test "x$ac_cv_type_mode_t" = xyes; then :
8660
8661 else
8662
8663 cat >>confdefs.h <<_ACEOF
8664 #define mode_t int
8665 _ACEOF
8666
8667 fi
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
8682 $as_echo_n "checking for mbstate_t... " >&6; }
8683 if ${ac_cv_type_mbstate_t+:} false; then :
8684 $as_echo_n "(cached) " >&6
8685 else
8686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8687 /* end confdefs.h. */
8688 $ac_includes_default
8689 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
8690 <wchar.h>.
8691 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8692 included before <wchar.h>. */
8693 #include <stddef.h>
8694 #include <stdio.h>
8695 #include <time.h>
8696 #include <wchar.h>
8697 int
8698 main ()
8699 {
8700 mbstate_t x; return sizeof x;
8701 ;
8702 return 0;
8703 }
8704 _ACEOF
8705 if ac_fn_c_try_compile "$LINENO"; then :
8706 ac_cv_type_mbstate_t=yes
8707 else
8708 ac_cv_type_mbstate_t=no
8709 fi
8710 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8711 fi
8712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
8713 $as_echo "$ac_cv_type_mbstate_t" >&6; }
8714 if test $ac_cv_type_mbstate_t = yes; then
8715
8716 $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
8717
8718 else
8719
8720 $as_echo "#define mbstate_t int" >>confdefs.h
8721
8722 fi
8723
8724
8725
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 GNULIB_ACOSF=0;
8766 GNULIB_ACOSL=0;
8767 GNULIB_ASINF=0;
8768 GNULIB_ASINL=0;
8769 GNULIB_ATANF=0;
8770 GNULIB_ATANL=0;
8771 GNULIB_ATAN2F=0;
8772 GNULIB_CBRT=0;
8773 GNULIB_CBRTF=0;
8774 GNULIB_CBRTL=0;
8775 GNULIB_CEIL=0;
8776 GNULIB_CEILF=0;
8777 GNULIB_CEILL=0;
8778 GNULIB_COPYSIGN=0;
8779 GNULIB_COPYSIGNF=0;
8780 GNULIB_COPYSIGNL=0;
8781 GNULIB_COSF=0;
8782 GNULIB_COSL=0;
8783 GNULIB_COSHF=0;
8784 GNULIB_EXPF=0;
8785 GNULIB_EXPL=0;
8786 GNULIB_EXP2=0;
8787 GNULIB_EXP2F=0;
8788 GNULIB_EXP2L=0;
8789 GNULIB_EXPM1=0;
8790 GNULIB_EXPM1F=0;
8791 GNULIB_EXPM1L=0;
8792 GNULIB_FABSF=0;
8793 GNULIB_FABSL=0;
8794 GNULIB_FLOOR=0;
8795 GNULIB_FLOORF=0;
8796 GNULIB_FLOORL=0;
8797 GNULIB_FMA=0;
8798 GNULIB_FMAF=0;
8799 GNULIB_FMAL=0;
8800 GNULIB_FMOD=0;
8801 GNULIB_FMODF=0;
8802 GNULIB_FMODL=0;
8803 GNULIB_FREXPF=0;
8804 GNULIB_FREXP=0;
8805 GNULIB_FREXPL=0;
8806 GNULIB_HYPOT=0;
8807 GNULIB_HYPOTF=0;
8808 GNULIB_HYPOTL=0;
8809 GNULIB_ILOGB=0;
8810 GNULIB_ILOGBF=0;
8811 GNULIB_ILOGBL=0;
8812 GNULIB_ISFINITE=0;
8813 GNULIB_ISINF=0;
8814 GNULIB_ISNAN=0;
8815 GNULIB_ISNANF=0;
8816 GNULIB_ISNAND=0;
8817 GNULIB_ISNANL=0;
8818 GNULIB_LDEXPF=0;
8819 GNULIB_LDEXPL=0;
8820 GNULIB_LOG=0;
8821 GNULIB_LOGF=0;
8822 GNULIB_LOGL=0;
8823 GNULIB_LOG10=0;
8824 GNULIB_LOG10F=0;
8825 GNULIB_LOG10L=0;
8826 GNULIB_LOG1P=0;
8827 GNULIB_LOG1PF=0;
8828 GNULIB_LOG1PL=0;
8829 GNULIB_LOG2=0;
8830 GNULIB_LOG2F=0;
8831 GNULIB_LOG2L=0;
8832 GNULIB_LOGB=0;
8833 GNULIB_LOGBF=0;
8834 GNULIB_LOGBL=0;
8835 GNULIB_MODF=0;
8836 GNULIB_MODFF=0;
8837 GNULIB_MODFL=0;
8838 GNULIB_POWF=0;
8839 GNULIB_REMAINDER=0;
8840 GNULIB_REMAINDERF=0;
8841 GNULIB_REMAINDERL=0;
8842 GNULIB_RINT=0;
8843 GNULIB_RINTF=0;
8844 GNULIB_RINTL=0;
8845 GNULIB_ROUND=0;
8846 GNULIB_ROUNDF=0;
8847 GNULIB_ROUNDL=0;
8848 GNULIB_SIGNBIT=0;
8849 GNULIB_SINF=0;
8850 GNULIB_SINL=0;
8851 GNULIB_SINHF=0;
8852 GNULIB_SQRTF=0;
8853 GNULIB_SQRTL=0;
8854 GNULIB_TANF=0;
8855 GNULIB_TANL=0;
8856 GNULIB_TANHF=0;
8857 GNULIB_TRUNC=0;
8858 GNULIB_TRUNCF=0;
8859 GNULIB_TRUNCL=0;
8860 HAVE_ACOSF=1;
8861 HAVE_ACOSL=1;
8862 HAVE_ASINF=1;
8863 HAVE_ASINL=1;
8864 HAVE_ATANF=1;
8865 HAVE_ATANL=1;
8866 HAVE_ATAN2F=1;
8867 HAVE_CBRT=1;
8868 HAVE_CBRTF=1;
8869 HAVE_CBRTL=1;
8870 HAVE_COPYSIGN=1;
8871 HAVE_COPYSIGNL=1;
8872 HAVE_COSF=1;
8873 HAVE_COSL=1;
8874 HAVE_COSHF=1;
8875 HAVE_EXPF=1;
8876 HAVE_EXPL=1;
8877 HAVE_EXPM1=1;
8878 HAVE_EXPM1F=1;
8879 HAVE_FABSF=1;
8880 HAVE_FABSL=1;
8881 HAVE_FMA=1;
8882 HAVE_FMAF=1;
8883 HAVE_FMAL=1;
8884 HAVE_FMODF=1;
8885 HAVE_FMODL=1;
8886 HAVE_FREXPF=1;
8887 HAVE_HYPOTF=1;
8888 HAVE_HYPOTL=1;
8889 HAVE_ILOGB=1;
8890 HAVE_ILOGBF=1;
8891 HAVE_ILOGBL=1;
8892 HAVE_ISNANF=1;
8893 HAVE_ISNAND=1;
8894 HAVE_ISNANL=1;
8895 HAVE_LDEXPF=1;
8896 HAVE_LOGF=1;
8897 HAVE_LOGL=1;
8898 HAVE_LOG10F=1;
8899 HAVE_LOG10L=1;
8900 HAVE_LOG1P=1;
8901 HAVE_LOG1PF=1;
8902 HAVE_LOG1PL=1;
8903 HAVE_LOGBF=1;
8904 HAVE_LOGBL=1;
8905 HAVE_MODFF=1;
8906 HAVE_MODFL=1;
8907 HAVE_POWF=1;
8908 HAVE_REMAINDER=1;
8909 HAVE_REMAINDERF=1;
8910 HAVE_RINT=1;
8911 HAVE_RINTL=1;
8912 HAVE_SINF=1;
8913 HAVE_SINL=1;
8914 HAVE_SINHF=1;
8915 HAVE_SQRTF=1;
8916 HAVE_SQRTL=1;
8917 HAVE_TANF=1;
8918 HAVE_TANL=1;
8919 HAVE_TANHF=1;
8920 HAVE_DECL_ACOSL=1;
8921 HAVE_DECL_ASINL=1;
8922 HAVE_DECL_ATANL=1;
8923 HAVE_DECL_CBRTF=1;
8924 HAVE_DECL_CBRTL=1;
8925 HAVE_DECL_CEILF=1;
8926 HAVE_DECL_CEILL=1;
8927 HAVE_DECL_COPYSIGNF=1;
8928 HAVE_DECL_COSL=1;
8929 HAVE_DECL_EXPL=1;
8930 HAVE_DECL_EXP2=1;
8931 HAVE_DECL_EXP2F=1;
8932 HAVE_DECL_EXP2L=1;
8933 HAVE_DECL_EXPM1L=1;
8934 HAVE_DECL_FLOORF=1;
8935 HAVE_DECL_FLOORL=1;
8936 HAVE_DECL_FREXPL=1;
8937 HAVE_DECL_LDEXPL=1;
8938 HAVE_DECL_LOGL=1;
8939 HAVE_DECL_LOG10L=1;
8940 HAVE_DECL_LOG2=1;
8941 HAVE_DECL_LOG2F=1;
8942 HAVE_DECL_LOG2L=1;
8943 HAVE_DECL_LOGB=1;
8944 HAVE_DECL_REMAINDER=1;
8945 HAVE_DECL_REMAINDERL=1;
8946 HAVE_DECL_RINTF=1;
8947 HAVE_DECL_ROUND=1;
8948 HAVE_DECL_ROUNDF=1;
8949 HAVE_DECL_ROUNDL=1;
8950 HAVE_DECL_SINL=1;
8951 HAVE_DECL_SQRTL=1;
8952 HAVE_DECL_TANL=1;
8953 HAVE_DECL_TRUNC=1;
8954 HAVE_DECL_TRUNCF=1;
8955 HAVE_DECL_TRUNCL=1;
8956 REPLACE_CBRTF=0;
8957 REPLACE_CBRTL=0;
8958 REPLACE_CEIL=0;
8959 REPLACE_CEILF=0;
8960 REPLACE_CEILL=0;
8961 REPLACE_EXPM1=0;
8962 REPLACE_EXPM1F=0;
8963 REPLACE_EXP2=0;
8964 REPLACE_EXP2L=0;
8965 REPLACE_FABSL=0;
8966 REPLACE_FLOOR=0;
8967 REPLACE_FLOORF=0;
8968 REPLACE_FLOORL=0;
8969 REPLACE_FMA=0;
8970 REPLACE_FMAF=0;
8971 REPLACE_FMAL=0;
8972 REPLACE_FMOD=0;
8973 REPLACE_FMODF=0;
8974 REPLACE_FMODL=0;
8975 REPLACE_FREXPF=0;
8976 REPLACE_FREXP=0;
8977 REPLACE_FREXPL=0;
8978 REPLACE_HUGE_VAL=0;
8979 REPLACE_HYPOT=0;
8980 REPLACE_HYPOTF=0;
8981 REPLACE_HYPOTL=0;
8982 REPLACE_ILOGB=0;
8983 REPLACE_ILOGBF=0;
8984 REPLACE_ISFINITE=0;
8985 REPLACE_ISINF=0;
8986 REPLACE_ISNAN=0;
8987 REPLACE_LDEXPL=0;
8988 REPLACE_LOG=0;
8989 REPLACE_LOGF=0;
8990 REPLACE_LOGL=0;
8991 REPLACE_LOG10=0;
8992 REPLACE_LOG10F=0;
8993 REPLACE_LOG10L=0;
8994 REPLACE_LOG1P=0;
8995 REPLACE_LOG1PF=0;
8996 REPLACE_LOG1PL=0;
8997 REPLACE_LOG2=0;
8998 REPLACE_LOG2F=0;
8999 REPLACE_LOG2L=0;
9000 REPLACE_LOGB=0;
9001 REPLACE_LOGBF=0;
9002 REPLACE_LOGBL=0;
9003 REPLACE_MODF=0;
9004 REPLACE_MODFF=0;
9005 REPLACE_MODFL=0;
9006 REPLACE_NAN=0;
9007 REPLACE_REMAINDER=0;
9008 REPLACE_REMAINDERF=0;
9009 REPLACE_REMAINDERL=0;
9010 REPLACE_ROUND=0;
9011 REPLACE_ROUNDF=0;
9012 REPLACE_ROUNDL=0;
9013 REPLACE_SIGNBIT=0;
9014 REPLACE_SIGNBIT_USING_GCC=0;
9015 REPLACE_SQRTL=0;
9016 REPLACE_TRUNC=0;
9017 REPLACE_TRUNCF=0;
9018 REPLACE_TRUNCL=0;
9019
9020
9021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5
9022 $as_echo_n "checking whether frexp() can be used without linking with libm... " >&6; }
9023 if ${gl_cv_func_frexp_no_libm+:} false; then :
9024 $as_echo_n "(cached) " >&6
9025 else
9026
9027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9028 /* end confdefs.h. */
9029 #include <math.h>
9030 double x;
9031 int
9032 main ()
9033 {
9034 int e; return frexp (x, &e) > 0;
9035 ;
9036 return 0;
9037 }
9038 _ACEOF
9039 if ac_fn_c_try_link "$LINENO"; then :
9040 gl_cv_func_frexp_no_libm=yes
9041 else
9042 gl_cv_func_frexp_no_libm=no
9043 fi
9044 rm -f core conftest.err conftest.$ac_objext \
9045 conftest$ac_exeext conftest.$ac_ext
9046
9047 fi
9048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
9049 $as_echo "$gl_cv_func_frexp_no_libm" >&6; }
9050
9051
9052 ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
9053 if test "x$ac_cv_have_decl_alarm" = xyes; then :
9054 ac_have_decl=1
9055 else
9056 ac_have_decl=0
9057 fi
9058
9059 cat >>confdefs.h <<_ACEOF
9060 #define HAVE_DECL_ALARM $ac_have_decl
9061 _ACEOF
9062
9063
9064
9065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5
9066 $as_echo_n "checking whether long double and double are the same... " >&6; }
9067 if ${gl_cv_long_double_equals_double+:} false; then :
9068 $as_echo_n "(cached) " >&6
9069 else
9070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9071 /* end confdefs.h. */
9072 #include <float.h>
9073 int
9074 main ()
9075 {
9076 typedef int check[sizeof (long double) == sizeof (double)
9077 && LDBL_MANT_DIG == DBL_MANT_DIG
9078 && LDBL_MAX_EXP == DBL_MAX_EXP
9079 && LDBL_MIN_EXP == DBL_MIN_EXP
9080 ? 1 : -1];
9081
9082 ;
9083 return 0;
9084 }
9085 _ACEOF
9086 if ac_fn_c_try_compile "$LINENO"; then :
9087 gl_cv_long_double_equals_double=yes
9088 else
9089 gl_cv_long_double_equals_double=no
9090 fi
9091 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9092
9093 fi
9094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_long_double_equals_double" >&5
9095 $as_echo "$gl_cv_long_double_equals_double" >&6; }
9096 if test $gl_cv_long_double_equals_double = yes; then
9097
9098 $as_echo "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h
9099
9100 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1
9101 else
9102 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0
9103 fi
9104
9105
9106
9107 GNULIB_FCHMODAT=0;
9108 GNULIB_FSTAT=0;
9109 GNULIB_FSTATAT=0;
9110 GNULIB_FUTIMENS=0;
9111 GNULIB_LCHMOD=0;
9112 GNULIB_LSTAT=0;
9113 GNULIB_MKDIRAT=0;
9114 GNULIB_MKFIFO=0;
9115 GNULIB_MKFIFOAT=0;
9116 GNULIB_MKNOD=0;
9117 GNULIB_MKNODAT=0;
9118 GNULIB_STAT=0;
9119 GNULIB_UTIMENSAT=0;
9120 HAVE_FCHMODAT=1;
9121 HAVE_FSTATAT=1;
9122 HAVE_FUTIMENS=1;
9123 HAVE_LCHMOD=1;
9124 HAVE_LSTAT=1;
9125 HAVE_MKDIRAT=1;
9126 HAVE_MKFIFO=1;
9127 HAVE_MKFIFOAT=1;
9128 HAVE_MKNOD=1;
9129 HAVE_MKNODAT=1;
9130 HAVE_UTIMENSAT=1;
9131 REPLACE_FSTAT=0;
9132 REPLACE_FSTATAT=0;
9133 REPLACE_FUTIMENS=0;
9134 REPLACE_LSTAT=0;
9135 REPLACE_MKDIR=0;
9136 REPLACE_MKFIFO=0;
9137 REPLACE_MKNOD=0;
9138 REPLACE_STAT=0;
9139 REPLACE_UTIMENSAT=0;
9140
9141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
9142 $as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
9143 if ${ac_cv_header_stat_broken+:} false; then :
9144 $as_echo_n "(cached) " >&6
9145 else
9146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9147 /* end confdefs.h. */
9148 #include <sys/types.h>
9149 #include <sys/stat.h>
9150
9151 #if defined S_ISBLK && defined S_IFDIR
9152 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
9153 #endif
9154
9155 #if defined S_ISBLK && defined S_IFCHR
9156 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
9157 #endif
9158
9159 #if defined S_ISLNK && defined S_IFREG
9160 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
9161 #endif
9162
9163 #if defined S_ISSOCK && defined S_IFREG
9164 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
9165 #endif
9166
9167 _ACEOF
9168 if ac_fn_c_try_compile "$LINENO"; then :
9169 ac_cv_header_stat_broken=no
9170 else
9171 ac_cv_header_stat_broken=yes
9172 fi
9173 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9174 fi
9175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
9176 $as_echo "$ac_cv_header_stat_broken" >&6; }
9177 if test $ac_cv_header_stat_broken = yes; then
9178
9179 $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
9180
9181 fi
9182
9183
9184
9185
9186
9187
9188
9189
9190 case "$host_os" in
9191 mingw*)
9192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
9193 $as_echo_n "checking for 64-bit off_t... " >&6; }
9194 if ${gl_cv_type_off_t_64+:} false; then :
9195 $as_echo_n "(cached) " >&6
9196 else
9197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9198 /* end confdefs.h. */
9199 #include <sys/types.h>
9200 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
9201
9202 int
9203 main ()
9204 {
9205
9206 ;
9207 return 0;
9208 }
9209 _ACEOF
9210 if ac_fn_c_try_compile "$LINENO"; then :
9211 gl_cv_type_off_t_64=yes
9212 else
9213 gl_cv_type_off_t_64=no
9214 fi
9215 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9216
9217 fi
9218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
9219 $as_echo "$gl_cv_type_off_t_64" >&6; }
9220 if test $gl_cv_type_off_t_64 = no; then
9221 WINDOWS_64_BIT_OFF_T=1
9222 else
9223 WINDOWS_64_BIT_OFF_T=0
9224 fi
9225 WINDOWS_64_BIT_ST_SIZE=1
9226 ;;
9227 *)
9228 WINDOWS_64_BIT_OFF_T=0
9229 WINDOWS_64_BIT_ST_SIZE=0
9230 ;;
9231 esac
9232
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244 :
9245
9246
9247
9248
9249
9250
9251
9252
9253 if test $gl_cv_have_include_next = yes; then
9254 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
9255 else
9256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
9257 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
9258 if ${gl_cv_next_sys_stat_h+:} false; then :
9259 $as_echo_n "(cached) " >&6
9260 else
9261
9262 if test $ac_cv_header_sys_stat_h = yes; then
9263
9264
9265
9266
9267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9268 /* end confdefs.h. */
9269 #include <sys/stat.h>
9270 _ACEOF
9271 case "$host_os" in
9272 aix*) gl_absname_cpp="$ac_cpp -C" ;;
9273 *) gl_absname_cpp="$ac_cpp" ;;
9274 esac
9275
9276 case "$host_os" in
9277 mingw*)
9278 gl_dirsep_regex='[/\\]'
9279 ;;
9280 *)
9281 gl_dirsep_regex='\/'
9282 ;;
9283 esac
9284 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
9285 gl_header_literal_regex=`echo 'sys/stat.h' \
9286 | sed -e "$gl_make_literal_regex_sed"`
9287 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
9288 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
9289 s|^/[^/]|//&|
9290 p
9291 q
9292 }'
9293
9294 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
9295 sed -n "$gl_absolute_header_sed"`
9296
9297 gl_header=$gl_cv_absolute_sys_stat_h
9298 gl_cv_next_sys_stat_h='"'$gl_header'"'
9299 else
9300 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
9301 fi
9302
9303
9304 fi
9305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
9306 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
9307 fi
9308 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
9309
9310 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
9311 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
9312 gl_next_as_first_directive='<'sys/stat.h'>'
9313 else
9314 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
9315 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
9316 fi
9317 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
9318
9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
9330
9331 $as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
9332
9333 fi
9334
9335 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
9336 #include <sys/stat.h>
9337 "
9338 if test "x$ac_cv_type_nlink_t" = xyes; then :
9339
9340 else
9341
9342 $as_echo "#define nlink_t int" >>confdefs.h
9343
9344 fi
9345
9346
9347
9348 for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do
9349 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
9350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
9351 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
9352 if eval \${$as_gl_Symbol+:} false; then :
9353 $as_echo_n "(cached) " >&6
9354 else
9355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9356 /* end confdefs.h. */
9357 #include <sys/stat.h>
9358
9359 int
9360 main ()
9361 {
9362 #undef $gl_func
9363 (void) $gl_func;
9364 ;
9365 return 0;
9366 }
9367 _ACEOF
9368 if ac_fn_c_try_compile "$LINENO"; then :
9369 eval "$as_gl_Symbol=yes"
9370 else
9371 eval "$as_gl_Symbol=no"
9372 fi
9373 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9374 fi
9375 eval ac_res=\$$as_gl_Symbol
9376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9377 $as_echo "$ac_res" >&6; }
9378 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
9379 cat >>confdefs.h <<_ACEOF
9380 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
9381 _ACEOF
9382
9383 eval ac_cv_have_decl_$gl_func=yes
9384 fi
9385 done
9386
9387
9388
9389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
9390 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
9391 if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
9392 $as_echo_n "(cached) " >&6
9393 else
9394 rm -f conftest.sym conftest.file
9395 echo >conftest.file
9396 if test "$cross_compiling" = yes; then :
9397 case "$host_os" in
9398 *-gnu*)
9399 # Guess yes on glibc systems.
9400 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
9401 *)
9402 # If we don't know, assume the worst.
9403 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
9404 esac
9405
9406 else
9407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9408 /* end confdefs.h. */
9409 $ac_includes_default
9410 int
9411 main ()
9412 {
9413 struct stat sbuf;
9414 if (symlink ("conftest.file", "conftest.sym") != 0)
9415 return 1;
9416 /* Linux will dereference the symlink and fail, as required by
9417 POSIX. That is better in the sense that it means we will not
9418 have to compile and use the lstat wrapper. */
9419 return lstat ("conftest.sym/", &sbuf) == 0;
9420
9421 ;
9422 return 0;
9423 }
9424 _ACEOF
9425 if ac_fn_c_try_run "$LINENO"; then :
9426 gl_cv_func_lstat_dereferences_slashed_symlink=yes
9427 else
9428 gl_cv_func_lstat_dereferences_slashed_symlink=no
9429 fi
9430 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9431 conftest.$ac_objext conftest.beam conftest.$ac_ext
9432 fi
9433
9434 rm -f conftest.sym conftest.file
9435
9436 fi
9437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
9438 $as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
9439 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
9440 *yes)
9441
9442 cat >>confdefs.h <<_ACEOF
9443 #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
9444 _ACEOF
9445
9446 ;;
9447 esac
9448
9449
9450
9451
9452
9453
9454
9455
9456 :
9457
9458
9459
9460
9461
9462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
9463 $as_echo_n "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
9464 if ${gl_cv_func_getcwd_null+:} false; then :
9465 $as_echo_n "(cached) " >&6
9466 else
9467 if test "$cross_compiling" = yes; then :
9468 case "$host_os" in
9469 # Guess yes on glibc systems.
9470 *-gnu*) gl_cv_func_getcwd_null="guessing yes";;
9471 # Guess yes on Cygwin.
9472 cygwin*) gl_cv_func_getcwd_null="guessing yes";;
9473 # If we don't know, assume the worst.
9474 *) gl_cv_func_getcwd_null="guessing no";;
9475 esac
9476
9477 else
9478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9479 /* end confdefs.h. */
9480
9481 # include <stdlib.h>
9482 # if HAVE_UNISTD_H
9483 # include <unistd.h>
9484 # else /* on Windows with MSVC */
9485 # include <direct.h>
9486 # endif
9487 # ifndef getcwd
9488 char *getcwd ();
9489 # endif
9490
9491 int
9492 main ()
9493 {
9494
9495 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
9496 /* mingw cwd does not start with '/', but getcwd does allocate.
9497 However, mingw fails to honor non-zero size. */
9498 #else
9499 if (chdir ("/") != 0)
9500 return 1;
9501 else
9502 {
9503 char *f = getcwd (NULL, 0);
9504 if (! f)
9505 return 2;
9506 if (f[0] != '/')
9507 return 3;
9508 if (f[1] != '\0')
9509 return 4;
9510 free (f);
9511 return 0;
9512 }
9513 #endif
9514
9515 ;
9516 return 0;
9517 }
9518 _ACEOF
9519 if ac_fn_c_try_run "$LINENO"; then :
9520 gl_cv_func_getcwd_null=yes
9521 else
9522 gl_cv_func_getcwd_null=no
9523 fi
9524 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9525 conftest.$ac_objext conftest.beam conftest.$ac_ext
9526 fi
9527
9528 fi
9529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
9530 $as_echo "$gl_cv_func_getcwd_null" >&6; }
9531
9532
9533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
9534 $as_echo_n "checking for getcwd with POSIX signature... " >&6; }
9535 if ${gl_cv_func_getcwd_posix_signature+:} false; then :
9536 $as_echo_n "(cached) " >&6
9537 else
9538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9539 /* end confdefs.h. */
9540 #include <unistd.h>
9541 int
9542 main ()
9543 {
9544 extern
9545 #ifdef __cplusplus
9546 "C"
9547 #endif
9548 char *getcwd (char *, size_t);
9549
9550 ;
9551 return 0;
9552 }
9553
9554 _ACEOF
9555 if ac_fn_c_try_compile "$LINENO"; then :
9556 gl_cv_func_getcwd_posix_signature=yes
9557 else
9558 gl_cv_func_getcwd_posix_signature=no
9559 fi
9560 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9561
9562 fi
9563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
9564 $as_echo "$gl_cv_func_getcwd_posix_signature" >&6; }
9565
9566
9567 ac_fn_c_check_decl "$LINENO" "getcwd" "ac_cv_have_decl_getcwd" "$ac_includes_default"
9568 if test "x$ac_cv_have_decl_getcwd" = xyes; then :
9569 ac_have_decl=1
9570 else
9571 ac_have_decl=0
9572 fi
9573
9574 cat >>confdefs.h <<_ACEOF
9575 #define HAVE_DECL_GETCWD $ac_have_decl
9576 _ACEOF
9577
9578
9579
9580
9581
9582
9583
9584
9585 ac_fn_c_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default"
9586 if test "x$ac_cv_have_decl_getdtablesize" = xyes; then :
9587 ac_have_decl=1
9588 else
9589 ac_have_decl=0
9590 fi
9591
9592 cat >>confdefs.h <<_ACEOF
9593 #define HAVE_DECL_GETDTABLESIZE $ac_have_decl
9594 _ACEOF
9595
9596
9597
9598 ac_fn_c_check_decl "$LINENO" "getlogin_r" "ac_cv_have_decl_getlogin_r" "$ac_includes_default"
9599 if test "x$ac_cv_have_decl_getlogin_r" = xyes; then :
9600 ac_have_decl=1
9601 else
9602 ac_have_decl=0
9603 fi
9604
9605 cat >>confdefs.h <<_ACEOF
9606 #define HAVE_DECL_GETLOGIN_R $ac_have_decl
9607 _ACEOF
9608
9609
9610
9611
9612
9613
9614
9615
9616 ac_fn_c_check_decl "$LINENO" "getlogin" "ac_cv_have_decl_getlogin" "$ac_includes_default"
9617 if test "x$ac_cv_have_decl_getlogin" = xyes; then :
9618 ac_have_decl=1
9619 else
9620 ac_have_decl=0
9621 fi
9622
9623 cat >>confdefs.h <<_ACEOF
9624 #define HAVE_DECL_GETLOGIN $ac_have_decl
9625 _ACEOF
9626
9627
9628
9629
9630
9631
9632
9633
9634
9635
9636
9637
9638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
9639 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
9640 if ${ac_cv_c_restrict+:} false; then :
9641 $as_echo_n "(cached) " >&6
9642 else
9643 ac_cv_c_restrict=no
9644 # The order here caters to the fact that C++ does not require restrict.
9645 for ac_kw in __restrict __restrict__ _Restrict restrict; do
9646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9647 /* end confdefs.h. */
9648 typedef int *int_ptr;
9649 int foo (int_ptr $ac_kw ip) { return ip[0]; }
9650 int bar (int [$ac_kw]); /* Catch GCC bug 14050. */
9651 int bar (int ip[$ac_kw]) { return ip[0]; }
9652
9653 int
9654 main ()
9655 {
9656 int s[1];
9657 int *$ac_kw t = s;
9658 t[0] = 0;
9659 return foo (t) + bar (t);
9660
9661 ;
9662 return 0;
9663 }
9664 _ACEOF
9665 if ac_fn_c_try_compile "$LINENO"; then :
9666 ac_cv_c_restrict=$ac_kw
9667 fi
9668 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9669 test "$ac_cv_c_restrict" != no && break
9670 done
9671
9672 fi
9673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
9674 $as_echo "$ac_cv_c_restrict" >&6; }
9675
9676 case $ac_cv_c_restrict in
9677 restrict) ;;
9678 no) $as_echo "#define restrict /**/" >>confdefs.h
9679 ;;
9680 *) cat >>confdefs.h <<_ACEOF
9681 #define restrict $ac_cv_c_restrict
9682 _ACEOF
9683 ;;
9684 esac
9685
9686
9687 GNULIB_GETTIMEOFDAY=0;
9688 HAVE_GETTIMEOFDAY=1;
9689 HAVE_STRUCT_TIMEVAL=1;
9690 HAVE_SYS_TIME_H=1;
9691 HAVE_TIMEZONE_T=0;
9692 REPLACE_GETTIMEOFDAY=0;
9693 REPLACE_STRUCT_TIMEVAL=0;
9694
9695
9696
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 if test $gl_cv_have_include_next = yes; then
9726 gl_cv_next_sys_time_h='<'sys/time.h'>'
9727 else
9728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
9729 $as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
9730 if ${gl_cv_next_sys_time_h+:} false; then :
9731 $as_echo_n "(cached) " >&6
9732 else
9733
9734 if test $ac_cv_header_sys_time_h = yes; then
9735
9736
9737
9738
9739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9740 /* end confdefs.h. */
9741 #include <sys/time.h>
9742 _ACEOF
9743 case "$host_os" in
9744 aix*) gl_absname_cpp="$ac_cpp -C" ;;
9745 *) gl_absname_cpp="$ac_cpp" ;;
9746 esac
9747
9748 case "$host_os" in
9749 mingw*)
9750 gl_dirsep_regex='[/\\]'
9751 ;;
9752 *)
9753 gl_dirsep_regex='\/'
9754 ;;
9755 esac
9756 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
9757 gl_header_literal_regex=`echo 'sys/time.h' \
9758 | sed -e "$gl_make_literal_regex_sed"`
9759 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
9760 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
9761 s|^/[^/]|//&|
9762 p
9763 q
9764 }'
9765
9766 gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
9767 sed -n "$gl_absolute_header_sed"`
9768
9769 gl_header=$gl_cv_absolute_sys_time_h
9770 gl_cv_next_sys_time_h='"'$gl_header'"'
9771 else
9772 gl_cv_next_sys_time_h='<'sys/time.h'>'
9773 fi
9774
9775
9776 fi
9777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
9778 $as_echo "$gl_cv_next_sys_time_h" >&6; }
9779 fi
9780 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
9781
9782 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
9783 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
9784 gl_next_as_first_directive='<'sys/time.h'>'
9785 else
9786 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
9787 gl_next_as_first_directive=$gl_cv_next_sys_time_h
9788 fi
9789 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
9790
9791
9792
9793
9794
9795 if test $ac_cv_header_sys_time_h != yes; then
9796 HAVE_SYS_TIME_H=0
9797 fi
9798
9799
9800
9801
9802
9803 :
9804
9805
9806
9807
9808
9809 if test $ac_cv_header_sys_socket_h != yes; then
9810 for ac_header in winsock2.h
9811 do :
9812 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
9813 if test "x$ac_cv_header_winsock2_h" = xyes; then :
9814 cat >>confdefs.h <<_ACEOF
9815 #define HAVE_WINSOCK2_H 1
9816 _ACEOF
9817
9818 fi
9819
9820 done
9821
9822 fi
9823 if test "$ac_cv_header_winsock2_h" = yes; then
9824 HAVE_WINSOCK2_H=1
9825 UNISTD_H_HAVE_WINSOCK2_H=1
9826 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
9827 else
9828 HAVE_WINSOCK2_H=0
9829 fi
9830
9831
9832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
9833 $as_echo_n "checking for struct timeval... " >&6; }
9834 if ${gl_cv_sys_struct_timeval+:} false; then :
9835 $as_echo_n "(cached) " >&6
9836 else
9837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9838 /* end confdefs.h. */
9839 #if HAVE_SYS_TIME_H
9840 #include <sys/time.h>
9841 #endif
9842 #include <time.h>
9843 #if HAVE_WINSOCK2_H
9844 # include <winsock2.h>
9845 #endif
9846
9847 int
9848 main ()
9849 {
9850 static struct timeval x; x.tv_sec = x.tv_usec;
9851 ;
9852 return 0;
9853 }
9854 _ACEOF
9855 if ac_fn_c_try_compile "$LINENO"; then :
9856 gl_cv_sys_struct_timeval=yes
9857 else
9858 gl_cv_sys_struct_timeval=no
9859 fi
9860 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9861
9862 fi
9863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
9864 $as_echo "$gl_cv_sys_struct_timeval" >&6; }
9865 if test $gl_cv_sys_struct_timeval != yes; then
9866 HAVE_STRUCT_TIMEVAL=0
9867 else
9868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
9869 $as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
9870 if ${gl_cv_sys_struct_timeval_tv_sec+:} false; then :
9871 $as_echo_n "(cached) " >&6
9872 else
9873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9874 /* end confdefs.h. */
9875 #if HAVE_SYS_TIME_H
9876 #include <sys/time.h>
9877 #endif
9878 #include <time.h>
9879 #if HAVE_WINSOCK2_H
9880 # include <winsock2.h>
9881 #endif
9882
9883 int
9884 main ()
9885 {
9886 static struct timeval x;
9887 typedef int verify_tv_sec_type[
9888 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
9889 ];
9890
9891 ;
9892 return 0;
9893 }
9894 _ACEOF
9895 if ac_fn_c_try_compile "$LINENO"; then :
9896 gl_cv_sys_struct_timeval_tv_sec=yes
9897 else
9898 gl_cv_sys_struct_timeval_tv_sec=no
9899 fi
9900 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9901
9902 fi
9903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
9904 $as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
9905 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
9906 REPLACE_STRUCT_TIMEVAL=1
9907 fi
9908 fi
9909
9910
9911 for gl_func in gettimeofday; do
9912 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
9913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
9914 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
9915 if eval \${$as_gl_Symbol+:} false; then :
9916 $as_echo_n "(cached) " >&6
9917 else
9918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9919 /* end confdefs.h. */
9920
9921 #if HAVE_SYS_TIME_H
9922 # include <sys/time.h>
9923 #endif
9924 #include <time.h>
9925
9926 int
9927 main ()
9928 {
9929 #undef $gl_func
9930 (void) $gl_func;
9931 ;
9932 return 0;
9933 }
9934 _ACEOF
9935 if ac_fn_c_try_compile "$LINENO"; then :
9936 eval "$as_gl_Symbol=yes"
9937 else
9938 eval "$as_gl_Symbol=no"
9939 fi
9940 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9941 fi
9942 eval ac_res=\$$as_gl_Symbol
9943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9944 $as_echo "$ac_res" >&6; }
9945 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
9946 cat >>confdefs.h <<_ACEOF
9947 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
9948 _ACEOF
9949
9950 eval ac_cv_have_decl_$gl_func=yes
9951 fi
9952 done
9953
9954
9955
9956
9957
9958
9959
9960
9961
9962
9963
9964
9965
9966
9967
9968
9969
9970
9971
9972
9973
9974
9975
9976
9977
9978
9979 GNULIB_SOCKET=0;
9980 GNULIB_CONNECT=0;
9981 GNULIB_ACCEPT=0;
9982 GNULIB_BIND=0;
9983 GNULIB_GETPEERNAME=0;
9984 GNULIB_GETSOCKNAME=0;
9985 GNULIB_GETSOCKOPT=0;
9986 GNULIB_LISTEN=0;
9987 GNULIB_RECV=0;
9988 GNULIB_SEND=0;
9989 GNULIB_RECVFROM=0;
9990 GNULIB_SENDTO=0;
9991 GNULIB_SETSOCKOPT=0;
9992 GNULIB_SHUTDOWN=0;
9993 GNULIB_ACCEPT4=0;
9994 HAVE_STRUCT_SOCKADDR_STORAGE=1;
9995 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1;
9996
9997 HAVE_SA_FAMILY_T=1;
9998 HAVE_ACCEPT4=1;
9999
10000
10001 :
10002
10003
10004
10005
10006
10007 if test $ac_cv_header_sys_socket_h = no; then
10008 for ac_header in ws2tcpip.h
10009 do :
10010 ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
10011 if test "x$ac_cv_header_ws2tcpip_h" = xyes; then :
10012 cat >>confdefs.h <<_ACEOF
10013 #define HAVE_WS2TCPIP_H 1
10014 _ACEOF
10015
10016 fi
10017
10018 done
10019
10020 fi
10021
10022
10023
10024
10025
10026 case "$host_os" in
10027 osf*)
10028
10029 $as_echo "#define _POSIX_PII_SOCKET 1" >>confdefs.h
10030
10031 ;;
10032 esac
10033
10034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> is self-contained" >&5
10035 $as_echo_n "checking whether <sys/socket.h> is self-contained... " >&6; }
10036 if ${gl_cv_header_sys_socket_h_selfcontained+:} false; then :
10037 $as_echo_n "(cached) " >&6
10038 else
10039
10040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10041 /* end confdefs.h. */
10042 #include <sys/socket.h>
10043 int
10044 main ()
10045 {
10046
10047 ;
10048 return 0;
10049 }
10050 _ACEOF
10051 if ac_fn_c_try_compile "$LINENO"; then :
10052 gl_cv_header_sys_socket_h_selfcontained=yes
10053 else
10054 gl_cv_header_sys_socket_h_selfcontained=no
10055 fi
10056 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10057
10058 fi
10059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_selfcontained" >&5
10060 $as_echo "$gl_cv_header_sys_socket_h_selfcontained" >&6; }
10061 if test $gl_cv_header_sys_socket_h_selfcontained = yes; then
10062 for ac_func in shutdown
10063 do :
10064 ac_fn_c_check_func "$LINENO" "shutdown" "ac_cv_func_shutdown"
10065 if test "x$ac_cv_func_shutdown" = xyes; then :
10066 cat >>confdefs.h <<_ACEOF
10067 #define HAVE_SHUTDOWN 1
10068 _ACEOF
10069
10070 fi
10071 done
10072
10073 if test $ac_cv_func_shutdown = yes; then
10074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> defines the SHUT_* macros" >&5
10075 $as_echo_n "checking whether <sys/socket.h> defines the SHUT_* macros... " >&6; }
10076 if ${gl_cv_header_sys_socket_h_shut+:} false; then :
10077 $as_echo_n "(cached) " >&6
10078 else
10079
10080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10081 /* end confdefs.h. */
10082 #include <sys/socket.h>
10083 int
10084 main ()
10085 {
10086 int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };
10087 ;
10088 return 0;
10089 }
10090 _ACEOF
10091 if ac_fn_c_try_compile "$LINENO"; then :
10092 gl_cv_header_sys_socket_h_shut=yes
10093 else
10094 gl_cv_header_sys_socket_h_shut=no
10095 fi
10096 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10097
10098 fi
10099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_shut" >&5
10100 $as_echo "$gl_cv_header_sys_socket_h_shut" >&6; }
10101 if test $gl_cv_header_sys_socket_h_shut = no; then
10102 SYS_SOCKET_H='sys/socket.h'
10103 fi
10104 fi
10105 fi
10106 # We need to check for ws2tcpip.h now.
10107
10108
10109
10110
10111
10112
10113
10114
10115 :
10116
10117
10118
10119
10120
10121
10122
10123
10124 if test $gl_cv_have_include_next = yes; then
10125 gl_cv_next_sys_socket_h='<'sys/socket.h'>'
10126 else
10127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/socket.h>" >&5
10128 $as_echo_n "checking absolute name of <sys/socket.h>... " >&6; }
10129 if ${gl_cv_next_sys_socket_h+:} false; then :
10130 $as_echo_n "(cached) " >&6
10131 else
10132
10133 if test $ac_cv_header_sys_socket_h = yes; then
10134
10135
10136
10137
10138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10139 /* end confdefs.h. */
10140 #include <sys/socket.h>
10141 _ACEOF
10142 case "$host_os" in
10143 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10144 *) gl_absname_cpp="$ac_cpp" ;;
10145 esac
10146
10147 case "$host_os" in
10148 mingw*)
10149 gl_dirsep_regex='[/\\]'
10150 ;;
10151 *)
10152 gl_dirsep_regex='\/'
10153 ;;
10154 esac
10155 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10156 gl_header_literal_regex=`echo 'sys/socket.h' \
10157 | sed -e "$gl_make_literal_regex_sed"`
10158 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10159 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10160 s|^/[^/]|//&|
10161 p
10162 q
10163 }'
10164
10165 gl_cv_absolute_sys_socket_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10166 sed -n "$gl_absolute_header_sed"`
10167
10168 gl_header=$gl_cv_absolute_sys_socket_h
10169 gl_cv_next_sys_socket_h='"'$gl_header'"'
10170 else
10171 gl_cv_next_sys_socket_h='<'sys/socket.h'>'
10172 fi
10173
10174
10175 fi
10176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_socket_h" >&5
10177 $as_echo "$gl_cv_next_sys_socket_h" >&6; }
10178 fi
10179 NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_h
10180
10181 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10182 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10183 gl_next_as_first_directive='<'sys/socket.h'>'
10184 else
10185 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10186 gl_next_as_first_directive=$gl_cv_next_sys_socket_h
10187 fi
10188 NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H=$gl_next_as_first_directive
10189
10190
10191
10192
10193 if test $ac_cv_header_sys_socket_h = yes; then
10194 HAVE_SYS_SOCKET_H=1
10195 HAVE_WS2TCPIP_H=0
10196 else
10197 HAVE_SYS_SOCKET_H=0
10198 if test $ac_cv_header_ws2tcpip_h = yes; then
10199 HAVE_WS2TCPIP_H=1
10200 else
10201 HAVE_WS2TCPIP_H=0
10202 fi
10203 fi
10204
10205
10206
10207 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "
10208 /* sys/types.h is not needed according to POSIX, but the
10209 sys/socket.h in i386-unknown-freebsd4.10 and
10210 powerpc-apple-darwin5.5 required it. */
10211 #include <sys/types.h>
10212 #ifdef HAVE_SYS_SOCKET_H
10213 #include <sys/socket.h>
10214 #endif
10215 #ifdef HAVE_WS2TCPIP_H
10216 #include <ws2tcpip.h>
10217 #endif
10218
10219 "
10220 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
10221
10222 cat >>confdefs.h <<_ACEOF
10223 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
10224 _ACEOF
10225
10226
10227 fi
10228 ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" "
10229 /* sys/types.h is not needed according to POSIX, but the
10230 sys/socket.h in i386-unknown-freebsd4.10 and
10231 powerpc-apple-darwin5.5 required it. */
10232 #include <sys/types.h>
10233 #ifdef HAVE_SYS_SOCKET_H
10234 #include <sys/socket.h>
10235 #endif
10236 #ifdef HAVE_WS2TCPIP_H
10237 #include <ws2tcpip.h>
10238 #endif
10239
10240 "
10241 if test "x$ac_cv_type_sa_family_t" = xyes; then :
10242
10243 cat >>confdefs.h <<_ACEOF
10244 #define HAVE_SA_FAMILY_T 1
10245 _ACEOF
10246
10247
10248 fi
10249
10250 if test $ac_cv_type_struct_sockaddr_storage = no; then
10251 HAVE_STRUCT_SOCKADDR_STORAGE=0
10252 fi
10253 if test $ac_cv_type_sa_family_t = no; then
10254 HAVE_SA_FAMILY_T=0
10255 fi
10256 if test $ac_cv_type_struct_sockaddr_storage != no; then
10257 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
10258 #ifdef HAVE_SYS_SOCKET_H
10259 #include <sys/socket.h>
10260 #endif
10261 #ifdef HAVE_WS2TCPIP_H
10262 #include <ws2tcpip.h>
10263 #endif
10264
10265 "
10266 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
10267
10268 cat >>confdefs.h <<_ACEOF
10269 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
10270 _ACEOF
10271
10272
10273 else
10274 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0
10275 fi
10276
10277 fi
10278 if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \
10279 || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then
10280 SYS_SOCKET_H='sys/socket.h'
10281 fi
10282
10283
10284
10285
10286 :
10287
10288
10289
10290
10291
10292 if test $ac_cv_header_sys_socket_h != yes; then
10293 for ac_header in winsock2.h
10294 do :
10295 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
10296 if test "x$ac_cv_header_winsock2_h" = xyes; then :
10297 cat >>confdefs.h <<_ACEOF
10298 #define HAVE_WINSOCK2_H 1
10299 _ACEOF
10300
10301 fi
10302
10303 done
10304
10305 fi
10306 if test "$ac_cv_header_winsock2_h" = yes; then
10307 HAVE_WINSOCK2_H=1
10308 UNISTD_H_HAVE_WINSOCK2_H=1
10309 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
10310 else
10311 HAVE_WINSOCK2_H=0
10312 fi
10313
10314
10315
10316
10317 for gl_func in socket connect accept bind getpeername getsockname getsockopt listen recv send recvfrom sendto setsockopt shutdown accept4; do
10318 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
10319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
10320 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
10321 if eval \${$as_gl_Symbol+:} false; then :
10322 $as_echo_n "(cached) " >&6
10323 else
10324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10325 /* end confdefs.h. */
10326
10327 /* Some systems require prerequisite headers. */
10328 #include <sys/types.h>
10329 #include <sys/socket.h>
10330
10331 int
10332 main ()
10333 {
10334 #undef $gl_func
10335 (void) $gl_func;
10336 ;
10337 return 0;
10338 }
10339 _ACEOF
10340 if ac_fn_c_try_compile "$LINENO"; then :
10341 eval "$as_gl_Symbol=yes"
10342 else
10343 eval "$as_gl_Symbol=no"
10344 fi
10345 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10346 fi
10347 eval ac_res=\$$as_gl_Symbol
10348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10349 $as_echo "$ac_res" >&6; }
10350 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
10351 cat >>confdefs.h <<_ACEOF
10352 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
10353 _ACEOF
10354
10355 eval ac_cv_have_decl_$gl_func=yes
10356 fi
10357 done
10358
10359
10360
10361
10362
10363
10364
10365
10366
10367
10368 :
10369
10370
10371
10372
10373
10374
10375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv4 sockets" >&5
10376 $as_echo_n "checking for IPv4 sockets... " >&6; }
10377 if ${gl_cv_socket_ipv4+:} false; then :
10378 $as_echo_n "(cached) " >&6
10379 else
10380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10381 /* end confdefs.h. */
10382 #include <sys/types.h>
10383 #ifdef HAVE_SYS_SOCKET_H
10384 #include <sys/socket.h>
10385 #endif
10386 #ifdef HAVE_NETINET_IN_H
10387 #include <netinet/in.h>
10388 #endif
10389 #ifdef HAVE_WINSOCK2_H
10390 #include <winsock2.h>
10391 #endif
10392 int
10393 main ()
10394 {
10395 int x = AF_INET; struct in_addr y; struct sockaddr_in z;
10396 if (&x && &y && &z) return 0;
10397 ;
10398 return 0;
10399 }
10400 _ACEOF
10401 if ac_fn_c_try_compile "$LINENO"; then :
10402 gl_cv_socket_ipv4=yes
10403 else
10404 gl_cv_socket_ipv4=no
10405 fi
10406 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10407 fi
10408
10409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv4" >&5
10410 $as_echo "$gl_cv_socket_ipv4" >&6; }
10411 if test $gl_cv_socket_ipv4 = yes; then
10412
10413 $as_echo "#define HAVE_IPV4 1" >>confdefs.h
10414
10415 fi
10416
10417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv6 sockets" >&5
10418 $as_echo_n "checking for IPv6 sockets... " >&6; }
10419 if ${gl_cv_socket_ipv6+:} false; then :
10420 $as_echo_n "(cached) " >&6
10421 else
10422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10423 /* end confdefs.h. */
10424 #include <sys/types.h>
10425 #ifdef HAVE_SYS_SOCKET_H
10426 #include <sys/socket.h>
10427 #endif
10428 #ifdef HAVE_NETINET_IN_H
10429 #include <netinet/in.h>
10430 #endif
10431 #ifdef HAVE_WINSOCK2_H
10432 #include <winsock2.h>
10433 #endif
10434 #ifdef HAVE_WS2TCPIP_H
10435 #include <ws2tcpip.h>
10436 #endif
10437 int
10438 main ()
10439 {
10440 int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z;
10441 if (&x && &y && &z) return 0;
10442 ;
10443 return 0;
10444 }
10445 _ACEOF
10446 if ac_fn_c_try_compile "$LINENO"; then :
10447 gl_cv_socket_ipv6=yes
10448 else
10449 gl_cv_socket_ipv6=no
10450 fi
10451 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10452 fi
10453
10454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv6" >&5
10455 $as_echo "$gl_cv_socket_ipv6" >&6; }
10456 if test $gl_cv_socket_ipv6 = yes; then
10457
10458 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
10459
10460 fi
10461
10462
10463
10464
10465
10466
10467
10468
10469
10470
10471
10472
10473
10474 :
10475
10476
10477
10478
10479
10480
10481
10482
10483 if test $gl_cv_have_include_next = yes; then
10484 gl_cv_next_limits_h='<'limits.h'>'
10485 else
10486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5
10487 $as_echo_n "checking absolute name of <limits.h>... " >&6; }
10488 if ${gl_cv_next_limits_h+:} false; then :
10489 $as_echo_n "(cached) " >&6
10490 else
10491
10492 if test $ac_cv_header_limits_h = yes; then
10493
10494
10495
10496
10497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10498 /* end confdefs.h. */
10499 #include <limits.h>
10500 _ACEOF
10501 case "$host_os" in
10502 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10503 *) gl_absname_cpp="$ac_cpp" ;;
10504 esac
10505
10506 case "$host_os" in
10507 mingw*)
10508 gl_dirsep_regex='[/\\]'
10509 ;;
10510 *)
10511 gl_dirsep_regex='\/'
10512 ;;
10513 esac
10514 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10515 gl_header_literal_regex=`echo 'limits.h' \
10516 | sed -e "$gl_make_literal_regex_sed"`
10517 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10518 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10519 s|^/[^/]|//&|
10520 p
10521 q
10522 }'
10523
10524 gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10525 sed -n "$gl_absolute_header_sed"`
10526
10527 gl_header=$gl_cv_absolute_limits_h
10528 gl_cv_next_limits_h='"'$gl_header'"'
10529 else
10530 gl_cv_next_limits_h='<'limits.h'>'
10531 fi
10532
10533
10534 fi
10535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
10536 $as_echo "$gl_cv_next_limits_h" >&6; }
10537 fi
10538 NEXT_LIMITS_H=$gl_cv_next_limits_h
10539
10540 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10541 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10542 gl_next_as_first_directive='<'limits.h'>'
10543 else
10544 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10545 gl_next_as_first_directive=$gl_cv_next_limits_h
10546 fi
10547 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive
10548
10549
10550
10551
10552
10553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether limits.h has ULLONG_WIDTH etc." >&5
10554 $as_echo_n "checking whether limits.h has ULLONG_WIDTH etc.... " >&6; }
10555 if ${gl_cv_header_limits_width+:} false; then :
10556 $as_echo_n "(cached) " >&6
10557 else
10558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10559 /* end confdefs.h. */
10560 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
10561 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
10562 #endif
10563 #include <limits.h>
10564 int ullw = ULLONG_WIDTH;
10565 int
10566 main ()
10567 {
10568
10569 ;
10570 return 0;
10571 }
10572 _ACEOF
10573 if ac_fn_c_try_compile "$LINENO"; then :
10574 gl_cv_header_limits_width=yes
10575 else
10576 gl_cv_header_limits_width=no
10577 fi
10578 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10579 fi
10580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5
10581 $as_echo "$gl_cv_header_limits_width" >&6; }
10582 if test "$gl_cv_header_limits_width" = yes; then
10583 LIMITS_H=
10584 else
10585 LIMITS_H=limits.h
10586 fi
10587
10588 if test -n "$LIMITS_H"; then
10589 GL_GENERATE_LIMITS_H_TRUE=
10590 GL_GENERATE_LIMITS_H_FALSE='#'
10591 else
10592 GL_GENERATE_LIMITS_H_TRUE='#'
10593 GL_GENERATE_LIMITS_H_FALSE=
10594 fi
10595
10596
10597
10598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
10599 $as_echo_n "checking for unsigned long long int... " >&6; }
10600 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
10601 $as_echo_n "(cached) " >&6
10602 else
10603 ac_cv_type_unsigned_long_long_int=yes
10604 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
10605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10606 /* end confdefs.h. */
10607
10608 /* For now, do not test the preprocessor; as of 2007 there are too many
10609 implementations with broken preprocessors. Perhaps this can
10610 be revisited in 2012. In the meantime, code should not expect
10611 #if to work with literals wider than 32 bits. */
10612 /* Test literals. */
10613 long long int ll = 9223372036854775807ll;
10614 long long int nll = -9223372036854775807LL;
10615 unsigned long long int ull = 18446744073709551615ULL;
10616 /* Test constant expressions. */
10617 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
10618 ? 1 : -1)];
10619 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
10620 ? 1 : -1)];
10621 int i = 63;
10622 int
10623 main ()
10624 {
10625 /* Test availability of runtime routines for shift and division. */
10626 long long int llmax = 9223372036854775807ll;
10627 unsigned long long int ullmax = 18446744073709551615ull;
10628 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
10629 | (llmax / ll) | (llmax % ll)
10630 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
10631 | (ullmax / ull) | (ullmax % ull));
10632 ;
10633 return 0;
10634 }
10635
10636 _ACEOF
10637 if ac_fn_c_try_link "$LINENO"; then :
10638
10639 else
10640 ac_cv_type_unsigned_long_long_int=no
10641 fi
10642 rm -f core conftest.err conftest.$ac_objext \
10643 conftest$ac_exeext conftest.$ac_ext
10644 fi
10645 fi
10646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
10647 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
10648 if test $ac_cv_type_unsigned_long_long_int = yes; then
10649
10650 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
10651
10652 fi
10653
10654
10655
10656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
10657 $as_echo_n "checking for long long int... " >&6; }
10658 if ${ac_cv_type_long_long_int+:} false; then :
10659 $as_echo_n "(cached) " >&6
10660 else
10661 ac_cv_type_long_long_int=yes
10662 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
10663 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
10664 if test $ac_cv_type_long_long_int = yes; then
10665 if test "$cross_compiling" = yes; then :
10666 :
10667 else
10668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10669 /* end confdefs.h. */
10670 #include <limits.h>
10671 #ifndef LLONG_MAX
10672 # define HALF \
10673 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
10674 # define LLONG_MAX (HALF - 1 + HALF)
10675 #endif
10676 int
10677 main ()
10678 {
10679 long long int n = 1;
10680 int i;
10681 for (i = 0; ; i++)
10682 {
10683 long long int m = n << i;
10684 if (m >> i != n)
10685 return 1;
10686 if (LLONG_MAX / 2 < m)
10687 break;
10688 }
10689 return 0;
10690 ;
10691 return 0;
10692 }
10693 _ACEOF
10694 if ac_fn_c_try_run "$LINENO"; then :
10695
10696 else
10697 ac_cv_type_long_long_int=no
10698 fi
10699 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10700 conftest.$ac_objext conftest.beam conftest.$ac_ext
10701 fi
10702
10703 fi
10704 fi
10705 fi
10706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
10707 $as_echo "$ac_cv_type_long_long_int" >&6; }
10708 if test $ac_cv_type_long_long_int = yes; then
10709
10710 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
10711
10712 fi
10713
10714
10715
10716
10717
10718
10719
10720
10721
10722
10723
10724
10725 gl_cv_c_multiarch=no
10726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10727 /* end confdefs.h. */
10728 #ifndef __APPLE_CC__
10729 not a universal capable compiler
10730 #endif
10731 typedef int dummy;
10732
10733 _ACEOF
10734 if ac_fn_c_try_compile "$LINENO"; then :
10735
10736 arch=
10737 prev=
10738 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
10739 if test -n "$prev"; then
10740 case $word in
10741 i?86 | x86_64 | ppc | ppc64)
10742 if test -z "$arch" || test "$arch" = "$word"; then
10743 arch="$word"
10744 else
10745 gl_cv_c_multiarch=yes
10746 fi
10747 ;;
10748 esac
10749 prev=
10750 else
10751 if test "x$word" = "x-arch"; then
10752 prev=arch
10753 fi
10754 fi
10755 done
10756
10757 fi
10758 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10759 if test $gl_cv_c_multiarch = yes; then
10760 APPLE_UNIVERSAL_BUILD=1
10761 else
10762 APPLE_UNIVERSAL_BUILD=0
10763 fi
10764
10765
10766
10767
10768
10769
10770
10771 if test $ac_cv_type_long_long_int = yes; then
10772 HAVE_LONG_LONG_INT=1
10773 else
10774 HAVE_LONG_LONG_INT=0
10775 fi
10776
10777
10778 if test $ac_cv_type_unsigned_long_long_int = yes; then
10779 HAVE_UNSIGNED_LONG_LONG_INT=1
10780 else
10781 HAVE_UNSIGNED_LONG_LONG_INT=0
10782 fi
10783
10784
10785
10786 :
10787
10788
10789
10790
10791
10792 if test $ac_cv_header_wchar_h = yes; then
10793 HAVE_WCHAR_H=1
10794 else
10795 HAVE_WCHAR_H=0
10796 fi
10797
10798
10799 if test $ac_cv_header_inttypes_h = yes; then
10800 HAVE_INTTYPES_H=1
10801 else
10802 HAVE_INTTYPES_H=0
10803 fi
10804
10805
10806 if test $ac_cv_header_sys_types_h = yes; then
10807 HAVE_SYS_TYPES_H=1
10808 else
10809 HAVE_SYS_TYPES_H=0
10810 fi
10811
10812
10813
10814
10815
10816
10817
10818
10819 :
10820
10821
10822
10823
10824
10825
10826
10827
10828 if test $gl_cv_have_include_next = yes; then
10829 gl_cv_next_stdint_h='<'stdint.h'>'
10830 else
10831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
10832 $as_echo_n "checking absolute name of <stdint.h>... " >&6; }
10833 if ${gl_cv_next_stdint_h+:} false; then :
10834 $as_echo_n "(cached) " >&6
10835 else
10836
10837 if test $ac_cv_header_stdint_h = yes; then
10838
10839
10840
10841
10842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10843 /* end confdefs.h. */
10844 #include <stdint.h>
10845 _ACEOF
10846 case "$host_os" in
10847 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10848 *) gl_absname_cpp="$ac_cpp" ;;
10849 esac
10850
10851 case "$host_os" in
10852 mingw*)
10853 gl_dirsep_regex='[/\\]'
10854 ;;
10855 *)
10856 gl_dirsep_regex='\/'
10857 ;;
10858 esac
10859 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10860 gl_header_literal_regex=`echo 'stdint.h' \
10861 | sed -e "$gl_make_literal_regex_sed"`
10862 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10863 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10864 s|^/[^/]|//&|
10865 p
10866 q
10867 }'
10868
10869 gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10870 sed -n "$gl_absolute_header_sed"`
10871
10872 gl_header=$gl_cv_absolute_stdint_h
10873 gl_cv_next_stdint_h='"'$gl_header'"'
10874 else
10875 gl_cv_next_stdint_h='<'stdint.h'>'
10876 fi
10877
10878
10879 fi
10880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
10881 $as_echo "$gl_cv_next_stdint_h" >&6; }
10882 fi
10883 NEXT_STDINT_H=$gl_cv_next_stdint_h
10884
10885 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10886 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10887 gl_next_as_first_directive='<'stdint.h'>'
10888 else
10889 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10890 gl_next_as_first_directive=$gl_cv_next_stdint_h
10891 fi
10892 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
10893
10894
10895
10896
10897 if test $ac_cv_header_stdint_h = yes; then
10898 HAVE_STDINT_H=1
10899 else
10900 HAVE_STDINT_H=0
10901 fi
10902
10903
10904 if test $ac_cv_header_stdint_h = yes; then
10905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
10906 $as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
10907 if ${gl_cv_header_working_stdint_h+:} false; then :
10908 $as_echo_n "(cached) " >&6
10909 else
10910 gl_cv_header_working_stdint_h=no
10911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10912 /* end confdefs.h. */
10913
10914
10915 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
10916 #define __STDC_CONSTANT_MACROS 1
10917 #define __STDC_LIMIT_MACROS 1
10918 #include <stdint.h>
10919 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
10920 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
10921 #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
10922 #endif
10923
10924
10925 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10926 included before <wchar.h>. */
10927 #include <stddef.h>
10928 #include <signal.h>
10929 #if HAVE_WCHAR_H
10930 # include <stdio.h>
10931 # include <time.h>
10932 # include <wchar.h>
10933 #endif
10934
10935
10936 #ifdef INT8_MAX
10937 int8_t a1 = INT8_MAX;
10938 int8_t a1min = INT8_MIN;
10939 #endif
10940 #ifdef INT16_MAX
10941 int16_t a2 = INT16_MAX;
10942 int16_t a2min = INT16_MIN;
10943 #endif
10944 #ifdef INT32_MAX
10945 int32_t a3 = INT32_MAX;
10946 int32_t a3min = INT32_MIN;
10947 #endif
10948 #ifdef INT64_MAX
10949 int64_t a4 = INT64_MAX;
10950 int64_t a4min = INT64_MIN;
10951 #endif
10952 #ifdef UINT8_MAX
10953 uint8_t b1 = UINT8_MAX;
10954 #else
10955 typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
10956 #endif
10957 #ifdef UINT16_MAX
10958 uint16_t b2 = UINT16_MAX;
10959 #endif
10960 #ifdef UINT32_MAX
10961 uint32_t b3 = UINT32_MAX;
10962 #endif
10963 #ifdef UINT64_MAX
10964 uint64_t b4 = UINT64_MAX;
10965 #endif
10966 int_least8_t c1 = INT8_C (0x7f);
10967 int_least8_t c1max = INT_LEAST8_MAX;
10968 int_least8_t c1min = INT_LEAST8_MIN;
10969 int_least16_t c2 = INT16_C (0x7fff);
10970 int_least16_t c2max = INT_LEAST16_MAX;
10971 int_least16_t c2min = INT_LEAST16_MIN;
10972 int_least32_t c3 = INT32_C (0x7fffffff);
10973 int_least32_t c3max = INT_LEAST32_MAX;
10974 int_least32_t c3min = INT_LEAST32_MIN;
10975 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
10976 int_least64_t c4max = INT_LEAST64_MAX;
10977 int_least64_t c4min = INT_LEAST64_MIN;
10978 uint_least8_t d1 = UINT8_C (0xff);
10979 uint_least8_t d1max = UINT_LEAST8_MAX;
10980 uint_least16_t d2 = UINT16_C (0xffff);
10981 uint_least16_t d2max = UINT_LEAST16_MAX;
10982 uint_least32_t d3 = UINT32_C (0xffffffff);
10983 uint_least32_t d3max = UINT_LEAST32_MAX;
10984 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
10985 uint_least64_t d4max = UINT_LEAST64_MAX;
10986 int_fast8_t e1 = INT_FAST8_MAX;
10987 int_fast8_t e1min = INT_FAST8_MIN;
10988 int_fast16_t e2 = INT_FAST16_MAX;
10989 int_fast16_t e2min = INT_FAST16_MIN;
10990 int_fast32_t e3 = INT_FAST32_MAX;
10991 int_fast32_t e3min = INT_FAST32_MIN;
10992 int_fast64_t e4 = INT_FAST64_MAX;
10993 int_fast64_t e4min = INT_FAST64_MIN;
10994 uint_fast8_t f1 = UINT_FAST8_MAX;
10995 uint_fast16_t f2 = UINT_FAST16_MAX;
10996 uint_fast32_t f3 = UINT_FAST32_MAX;
10997 uint_fast64_t f4 = UINT_FAST64_MAX;
10998 #ifdef INTPTR_MAX
10999 intptr_t g = INTPTR_MAX;
11000 intptr_t gmin = INTPTR_MIN;
11001 #endif
11002 #ifdef UINTPTR_MAX
11003 uintptr_t h = UINTPTR_MAX;
11004 #endif
11005 intmax_t i = INTMAX_MAX;
11006 uintmax_t j = UINTMAX_MAX;
11007
11008 /* Check that SIZE_MAX has the correct type, if possible. */
11009 #if 201112 <= __STDC_VERSION__
11010 int k = _Generic (SIZE_MAX, size_t: 0);
11011 #elif (2 <= __GNUC__ || defined __IBM__TYPEOF__ \
11012 || (0x5110 <= __SUNPRO_C && !__STDC__))
11013 extern size_t k;
11014 extern __typeof__ (SIZE_MAX) k;
11015 #endif
11016
11017 #include <limits.h> /* for CHAR_BIT */
11018 #define TYPE_MINIMUM(t) \
11019 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
11020 #define TYPE_MAXIMUM(t) \
11021 ((t) ((t) 0 < (t) -1 \
11022 ? (t) -1 \
11023 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
11024 struct s {
11025 int check_PTRDIFF:
11026 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
11027 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
11028 ? 1 : -1;
11029 /* Detect bug in FreeBSD 6.0 / ia64. */
11030 int check_SIG_ATOMIC:
11031 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
11032 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
11033 ? 1 : -1;
11034 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
11035 int check_WCHAR:
11036 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
11037 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
11038 ? 1 : -1;
11039 /* Detect bug in mingw. */
11040 int check_WINT:
11041 WINT_MIN == TYPE_MINIMUM (wint_t)
11042 && WINT_MAX == TYPE_MAXIMUM (wint_t)
11043 ? 1 : -1;
11044
11045 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
11046 int check_UINT8_C:
11047 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
11048 int check_UINT16_C:
11049 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
11050
11051 /* Detect bugs in OpenBSD 3.9 stdint.h. */
11052 #ifdef UINT8_MAX
11053 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
11054 #endif
11055 #ifdef UINT16_MAX
11056 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
11057 #endif
11058 #ifdef UINT32_MAX
11059 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
11060 #endif
11061 #ifdef UINT64_MAX
11062 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
11063 #endif
11064 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
11065 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
11066 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
11067 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
11068 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
11069 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
11070 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
11071 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
11072 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
11073 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
11074 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
11075 };
11076
11077 int
11078 main ()
11079 {
11080
11081 ;
11082 return 0;
11083 }
11084 _ACEOF
11085 if ac_fn_c_try_compile "$LINENO"; then :
11086 if test "$cross_compiling" = yes; then :
11087 gl_cv_header_working_stdint_h=yes
11088
11089 else
11090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11091 /* end confdefs.h. */
11092
11093
11094 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
11095 #define __STDC_CONSTANT_MACROS 1
11096 #define __STDC_LIMIT_MACROS 1
11097 #include <stdint.h>
11098
11099
11100 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11101 included before <wchar.h>. */
11102 #include <stddef.h>
11103 #include <signal.h>
11104 #if HAVE_WCHAR_H
11105 # include <stdio.h>
11106 # include <time.h>
11107 # include <wchar.h>
11108 #endif
11109
11110
11111 #include <stdio.h>
11112 #include <string.h>
11113 #define MVAL(macro) MVAL1(macro)
11114 #define MVAL1(expression) #expression
11115 static const char *macro_values[] =
11116 {
11117 #ifdef INT8_MAX
11118 MVAL (INT8_MAX),
11119 #endif
11120 #ifdef INT16_MAX
11121 MVAL (INT16_MAX),
11122 #endif
11123 #ifdef INT32_MAX
11124 MVAL (INT32_MAX),
11125 #endif
11126 #ifdef INT64_MAX
11127 MVAL (INT64_MAX),
11128 #endif
11129 #ifdef UINT8_MAX
11130 MVAL (UINT8_MAX),
11131 #endif
11132 #ifdef UINT16_MAX
11133 MVAL (UINT16_MAX),
11134 #endif
11135 #ifdef UINT32_MAX
11136 MVAL (UINT32_MAX),
11137 #endif
11138 #ifdef UINT64_MAX
11139 MVAL (UINT64_MAX),
11140 #endif
11141 NULL
11142 };
11143
11144 int
11145 main ()
11146 {
11147
11148 const char **mv;
11149 for (mv = macro_values; *mv != NULL; mv++)
11150 {
11151 const char *value = *mv;
11152 /* Test whether it looks like a cast expression. */
11153 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
11154 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
11155 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
11156 || strncmp (value, "((int)"/*)*/, 6) == 0
11157 || strncmp (value, "((signed short)"/*)*/, 15) == 0
11158 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
11159 return mv - macro_values + 1;
11160 }
11161 return 0;
11162
11163 ;
11164 return 0;
11165 }
11166 _ACEOF
11167 if ac_fn_c_try_run "$LINENO"; then :
11168 gl_cv_header_working_stdint_h=yes
11169 fi
11170 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11171 conftest.$ac_objext conftest.beam conftest.$ac_ext
11172 fi
11173
11174
11175 fi
11176 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11177
11178 fi
11179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
11180 $as_echo "$gl_cv_header_working_stdint_h" >&6; }
11181 fi
11182
11183 HAVE_C99_STDINT_H=0
11184 HAVE_SYS_BITYPES_H=0
11185 HAVE_SYS_INTTYPES_H=0
11186 STDINT_H=stdint.h
11187 if test "$gl_cv_header_working_stdint_h" = yes; then
11188 HAVE_C99_STDINT_H=1
11189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h predates C++11" >&5
11190 $as_echo_n "checking whether stdint.h predates C++11... " >&6; }
11191 if ${gl_cv_header_stdint_predates_cxx11_h+:} false; then :
11192 $as_echo_n "(cached) " >&6
11193 else
11194 gl_cv_header_stdint_predates_cxx11_h=yes
11195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11196 /* end confdefs.h. */
11197
11198
11199 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
11200 #include <stdint.h>
11201
11202
11203 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11204 included before <wchar.h>. */
11205 #include <stddef.h>
11206 #include <signal.h>
11207 #if HAVE_WCHAR_H
11208 # include <stdio.h>
11209 # include <time.h>
11210 # include <wchar.h>
11211 #endif
11212
11213
11214 intmax_t im = INTMAX_MAX;
11215 int32_t i32 = INT32_C (0x7fffffff);
11216
11217 int
11218 main ()
11219 {
11220
11221 ;
11222 return 0;
11223 }
11224 _ACEOF
11225 if ac_fn_c_try_compile "$LINENO"; then :
11226 gl_cv_header_stdint_predates_cxx11_h=no
11227 fi
11228 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11229 fi
11230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_predates_cxx11_h" >&5
11231 $as_echo "$gl_cv_header_stdint_predates_cxx11_h" >&6; }
11232
11233 if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then
11234
11235 $as_echo "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
11236
11237
11238 $as_echo "#define __STDC_LIMIT_MACROS 1" >>confdefs.h
11239
11240 fi
11241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5
11242 $as_echo_n "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; }
11243 if ${gl_cv_header_stdint_width+:} false; then :
11244 $as_echo_n "(cached) " >&6
11245 else
11246 gl_cv_header_stdint_width=no
11247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11248 /* end confdefs.h. */
11249
11250 /* Work if build is not clean. */
11251 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
11252 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
11253 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
11254 #endif
11255 #include <stdint.h>
11256
11257 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11258 included before <wchar.h>. */
11259 #include <stddef.h>
11260 #include <signal.h>
11261 #if HAVE_WCHAR_H
11262 # include <stdio.h>
11263 # include <time.h>
11264 # include <wchar.h>
11265 #endif
11266
11267 int iw = UINTMAX_WIDTH;
11268
11269 int
11270 main ()
11271 {
11272
11273 ;
11274 return 0;
11275 }
11276 _ACEOF
11277 if ac_fn_c_try_compile "$LINENO"; then :
11278 gl_cv_header_stdint_width=yes
11279 fi
11280 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11281 fi
11282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5
11283 $as_echo "$gl_cv_header_stdint_width" >&6; }
11284 if test "$gl_cv_header_stdint_width" = yes; then
11285 STDINT_H=
11286 fi
11287 else
11288 for ac_header in sys/inttypes.h sys/bitypes.h
11289 do :
11290 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11291 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11292 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
11293 cat >>confdefs.h <<_ACEOF
11294 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11295 _ACEOF
11296
11297 fi
11298
11299 done
11300
11301 if test $ac_cv_header_sys_inttypes_h = yes; then
11302 HAVE_SYS_INTTYPES_H=1
11303 fi
11304 if test $ac_cv_header_sys_bitypes_h = yes; then
11305 HAVE_SYS_BITYPES_H=1
11306 fi
11307
11308
11309 if test $APPLE_UNIVERSAL_BUILD = 0; then
11310
11311
11312 for gltype in ptrdiff_t size_t ; do
11313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
11314 $as_echo_n "checking for bit size of $gltype... " >&6; }
11315 if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
11316 $as_echo_n "(cached) " >&6
11317 else
11318 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
11319 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11320 included before <wchar.h>. */
11321 #include <stddef.h>
11322 #include <signal.h>
11323 #if HAVE_WCHAR_H
11324 # include <stdio.h>
11325 # include <time.h>
11326 # include <wchar.h>
11327 #endif
11328
11329 #include <limits.h>"; then :
11330
11331 else
11332 result=unknown
11333 fi
11334
11335 eval gl_cv_bitsizeof_${gltype}=\$result
11336
11337 fi
11338 eval ac_res=\$gl_cv_bitsizeof_${gltype}
11339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11340 $as_echo "$ac_res" >&6; }
11341 eval result=\$gl_cv_bitsizeof_${gltype}
11342 if test $result = unknown; then
11343 result=0
11344 fi
11345 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
11346 cat >>confdefs.h <<_ACEOF
11347 #define BITSIZEOF_${GLTYPE} $result
11348 _ACEOF
11349
11350 eval BITSIZEOF_${GLTYPE}=\$result
11351 done
11352
11353
11354 fi
11355
11356
11357 for gltype in sig_atomic_t wchar_t wint_t ; do
11358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
11359 $as_echo_n "checking for bit size of $gltype... " >&6; }
11360 if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
11361 $as_echo_n "(cached) " >&6
11362 else
11363 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
11364 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11365 included before <wchar.h>. */
11366 #include <stddef.h>
11367 #include <signal.h>
11368 #if HAVE_WCHAR_H
11369 # include <stdio.h>
11370 # include <time.h>
11371 # include <wchar.h>
11372 #endif
11373
11374 #include <limits.h>"; then :
11375
11376 else
11377 result=unknown
11378 fi
11379
11380 eval gl_cv_bitsizeof_${gltype}=\$result
11381
11382 fi
11383 eval ac_res=\$gl_cv_bitsizeof_${gltype}
11384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11385 $as_echo "$ac_res" >&6; }
11386 eval result=\$gl_cv_bitsizeof_${gltype}
11387 if test $result = unknown; then
11388 result=0
11389 fi
11390 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
11391 cat >>confdefs.h <<_ACEOF
11392 #define BITSIZEOF_${GLTYPE} $result
11393 _ACEOF
11394
11395 eval BITSIZEOF_${GLTYPE}=\$result
11396 done
11397
11398
11399
11400
11401 for gltype in sig_atomic_t wchar_t wint_t ; do
11402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
11403 $as_echo_n "checking whether $gltype is signed... " >&6; }
11404 if eval \${gl_cv_type_${gltype}_signed+:} false; then :
11405 $as_echo_n "(cached) " >&6
11406 else
11407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11408 /* end confdefs.h. */
11409
11410 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11411 included before <wchar.h>. */
11412 #include <stddef.h>
11413 #include <signal.h>
11414 #if HAVE_WCHAR_H
11415 # include <stdio.h>
11416 # include <time.h>
11417 # include <wchar.h>
11418 #endif
11419
11420 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
11421 int
11422 main ()
11423 {
11424
11425 ;
11426 return 0;
11427 }
11428 _ACEOF
11429 if ac_fn_c_try_compile "$LINENO"; then :
11430 result=yes
11431 else
11432 result=no
11433 fi
11434 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11435 eval gl_cv_type_${gltype}_signed=\$result
11436
11437 fi
11438 eval ac_res=\$gl_cv_type_${gltype}_signed
11439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11440 $as_echo "$ac_res" >&6; }
11441 eval result=\$gl_cv_type_${gltype}_signed
11442 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
11443 if test "$result" = yes; then
11444 cat >>confdefs.h <<_ACEOF
11445 #define HAVE_SIGNED_${GLTYPE} 1
11446 _ACEOF
11447
11448 eval HAVE_SIGNED_${GLTYPE}=1
11449 else
11450 eval HAVE_SIGNED_${GLTYPE}=0
11451 fi
11452 done
11453
11454
11455 gl_cv_type_ptrdiff_t_signed=yes
11456 gl_cv_type_size_t_signed=no
11457 if test $APPLE_UNIVERSAL_BUILD = 0; then
11458
11459
11460 for gltype in ptrdiff_t size_t ; do
11461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
11462 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
11463 if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
11464 $as_echo_n "(cached) " >&6
11465 else
11466 eval gl_cv_type_${gltype}_suffix=no
11467 eval result=\$gl_cv_type_${gltype}_signed
11468 if test "$result" = yes; then
11469 glsufu=
11470 else
11471 glsufu=u
11472 fi
11473 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
11474 case $glsuf in
11475 '') gltype1='int';;
11476 l) gltype1='long int';;
11477 ll) gltype1='long long int';;
11478 i64) gltype1='__int64';;
11479 u) gltype1='unsigned int';;
11480 ul) gltype1='unsigned long int';;
11481 ull) gltype1='unsigned long long int';;
11482 ui64)gltype1='unsigned __int64';;
11483 esac
11484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11485 /* end confdefs.h. */
11486
11487 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11488 included before <wchar.h>. */
11489 #include <stddef.h>
11490 #include <signal.h>
11491 #if HAVE_WCHAR_H
11492 # include <stdio.h>
11493 # include <time.h>
11494 # include <wchar.h>
11495 #endif
11496
11497 extern $gltype foo;
11498 extern $gltype1 foo;
11499 int
11500 main ()
11501 {
11502
11503 ;
11504 return 0;
11505 }
11506 _ACEOF
11507 if ac_fn_c_try_compile "$LINENO"; then :
11508 eval gl_cv_type_${gltype}_suffix=\$glsuf
11509 fi
11510 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11511 eval result=\$gl_cv_type_${gltype}_suffix
11512 test "$result" != no && break
11513 done
11514 fi
11515 eval ac_res=\$gl_cv_type_${gltype}_suffix
11516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11517 $as_echo "$ac_res" >&6; }
11518 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
11519 eval result=\$gl_cv_type_${gltype}_suffix
11520 test "$result" = no && result=
11521 eval ${GLTYPE}_SUFFIX=\$result
11522 cat >>confdefs.h <<_ACEOF
11523 #define ${GLTYPE}_SUFFIX $result
11524 _ACEOF
11525
11526 done
11527
11528
11529 fi
11530
11531
11532 for gltype in sig_atomic_t wchar_t wint_t ; do
11533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
11534 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
11535 if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
11536 $as_echo_n "(cached) " >&6
11537 else
11538 eval gl_cv_type_${gltype}_suffix=no
11539 eval result=\$gl_cv_type_${gltype}_signed
11540 if test "$result" = yes; then
11541 glsufu=
11542 else
11543 glsufu=u
11544 fi
11545 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
11546 case $glsuf in
11547 '') gltype1='int';;
11548 l) gltype1='long int';;
11549 ll) gltype1='long long int';;
11550 i64) gltype1='__int64';;
11551 u) gltype1='unsigned int';;
11552 ul) gltype1='unsigned long int';;
11553 ull) gltype1='unsigned long long int';;
11554 ui64)gltype1='unsigned __int64';;
11555 esac
11556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11557 /* end confdefs.h. */
11558
11559 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11560 included before <wchar.h>. */
11561 #include <stddef.h>
11562 #include <signal.h>
11563 #if HAVE_WCHAR_H
11564 # include <stdio.h>
11565 # include <time.h>
11566 # include <wchar.h>
11567 #endif
11568
11569 extern $gltype foo;
11570 extern $gltype1 foo;
11571 int
11572 main ()
11573 {
11574
11575 ;
11576 return 0;
11577 }
11578 _ACEOF
11579 if ac_fn_c_try_compile "$LINENO"; then :
11580 eval gl_cv_type_${gltype}_suffix=\$glsuf
11581 fi
11582 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11583 eval result=\$gl_cv_type_${gltype}_suffix
11584 test "$result" != no && break
11585 done
11586 fi
11587 eval ac_res=\$gl_cv_type_${gltype}_suffix
11588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11589 $as_echo "$ac_res" >&6; }
11590 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
11591 eval result=\$gl_cv_type_${gltype}_suffix
11592 test "$result" = no && result=
11593 eval ${GLTYPE}_SUFFIX=\$result
11594 cat >>confdefs.h <<_ACEOF
11595 #define ${GLTYPE}_SUFFIX $result
11596 _ACEOF
11597
11598 done
11599
11600
11601
11602 if test $BITSIZEOF_WINT_T -lt 32; then
11603 BITSIZEOF_WINT_T=32
11604 fi
11605
11606 fi
11607
11608 # The substitute stdint.h needs the substitute limit.h's _GL_INTEGER_WIDTH.
11609 LIMITS_H=limits.h
11610 if test -n "$LIMITS_H"; then
11611 GL_GENERATE_LIMITS_H_TRUE=
11612 GL_GENERATE_LIMITS_H_FALSE='#'
11613 else
11614 GL_GENERATE_LIMITS_H_TRUE='#'
11615 GL_GENERATE_LIMITS_H_FALSE=
11616 fi
11617
11618
11619
11620
11621
11622
11623 if test -n "$STDINT_H"; then
11624 GL_GENERATE_STDINT_H_TRUE=
11625 GL_GENERATE_STDINT_H_FALSE='#'
11626 else
11627 GL_GENERATE_STDINT_H_TRUE='#'
11628 GL_GENERATE_STDINT_H_FALSE=
11629 fi
11630
11631
11632
11633
11634
11635
11636
11637
11638 GNULIB_IMAXABS=0;
11639 GNULIB_IMAXDIV=0;
11640 GNULIB_STRTOIMAX=0;
11641 GNULIB_STRTOUMAX=0;
11642 HAVE_DECL_IMAXABS=1;
11643 HAVE_DECL_IMAXDIV=1;
11644 HAVE_DECL_STRTOIMAX=1;
11645 HAVE_DECL_STRTOUMAX=1;
11646 REPLACE_STRTOIMAX=0;
11647 REPLACE_STRTOUMAX=0;
11648 INT32_MAX_LT_INTMAX_MAX=1;
11649 INT64_MAX_EQ_LONG_MAX='defined _LP64';
11650 PRI_MACROS_BROKEN=0;
11651 PRIPTR_PREFIX=__PRIPTR_PREFIX;
11652 UINT32_MAX_LT_UINTMAX_MAX=1;
11653 UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
11654
11655
11656
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 if test $gl_cv_have_include_next = yes; then
11682 gl_cv_next_inttypes_h='<'inttypes.h'>'
11683 else
11684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
11685 $as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
11686 if ${gl_cv_next_inttypes_h+:} false; then :
11687 $as_echo_n "(cached) " >&6
11688 else
11689
11690 if test $ac_cv_header_inttypes_h = yes; then
11691
11692
11693
11694
11695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11696 /* end confdefs.h. */
11697 #include <inttypes.h>
11698 _ACEOF
11699 case "$host_os" in
11700 aix*) gl_absname_cpp="$ac_cpp -C" ;;
11701 *) gl_absname_cpp="$ac_cpp" ;;
11702 esac
11703
11704 case "$host_os" in
11705 mingw*)
11706 gl_dirsep_regex='[/\\]'
11707 ;;
11708 *)
11709 gl_dirsep_regex='\/'
11710 ;;
11711 esac
11712 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11713 gl_header_literal_regex=`echo 'inttypes.h' \
11714 | sed -e "$gl_make_literal_regex_sed"`
11715 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11716 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11717 s|^/[^/]|//&|
11718 p
11719 q
11720 }'
11721
11722 gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11723 sed -n "$gl_absolute_header_sed"`
11724
11725 gl_header=$gl_cv_absolute_inttypes_h
11726 gl_cv_next_inttypes_h='"'$gl_header'"'
11727 else
11728 gl_cv_next_inttypes_h='<'inttypes.h'>'
11729 fi
11730
11731
11732 fi
11733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
11734 $as_echo "$gl_cv_next_inttypes_h" >&6; }
11735 fi
11736 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
11737
11738 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11739 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11740 gl_next_as_first_directive='<'inttypes.h'>'
11741 else
11742 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11743 gl_next_as_first_directive=$gl_cv_next_inttypes_h
11744 fi
11745 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
11746
11747
11748
11749
11750
11751
11752
11753
11754 for gl_func in imaxabs imaxdiv strtoimax strtoumax; do
11755 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
11756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
11757 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
11758 if eval \${$as_gl_Symbol+:} false; then :
11759 $as_echo_n "(cached) " >&6
11760 else
11761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11762 /* end confdefs.h. */
11763 #include <inttypes.h>
11764
11765 int
11766 main ()
11767 {
11768 #undef $gl_func
11769 (void) $gl_func;
11770 ;
11771 return 0;
11772 }
11773 _ACEOF
11774 if ac_fn_c_try_compile "$LINENO"; then :
11775 eval "$as_gl_Symbol=yes"
11776 else
11777 eval "$as_gl_Symbol=no"
11778 fi
11779 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11780 fi
11781 eval ac_res=\$$as_gl_Symbol
11782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11783 $as_echo "$ac_res" >&6; }
11784 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
11785 cat >>confdefs.h <<_ACEOF
11786 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
11787 _ACEOF
11788
11789 eval ac_cv_have_decl_$gl_func=yes
11790 fi
11791 done
11792
11793
11794
11795 for ac_header in inttypes.h
11796 do :
11797 ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
11798 if test "x$ac_cv_header_inttypes_h" = xyes; then :
11799 cat >>confdefs.h <<_ACEOF
11800 #define HAVE_INTTYPES_H 1
11801 _ACEOF
11802
11803 fi
11804
11805 done
11806
11807 if test $ac_cv_header_inttypes_h = yes; then
11808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5
11809 $as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; }
11810 if ${gt_cv_inttypes_pri_broken+:} false; then :
11811 $as_echo_n "(cached) " >&6
11812 else
11813
11814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11815 /* end confdefs.h. */
11816
11817 #include <inttypes.h>
11818 #ifdef PRId32
11819 char *p = PRId32;
11820 #endif
11821
11822 int
11823 main ()
11824 {
11825
11826 ;
11827 return 0;
11828 }
11829 _ACEOF
11830 if ac_fn_c_try_compile "$LINENO"; then :
11831 gt_cv_inttypes_pri_broken=no
11832 else
11833 gt_cv_inttypes_pri_broken=yes
11834 fi
11835 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11836
11837 fi
11838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5
11839 $as_echo "$gt_cv_inttypes_pri_broken" >&6; }
11840 fi
11841 if test "$gt_cv_inttypes_pri_broken" = yes; then
11842
11843 cat >>confdefs.h <<_ACEOF
11844 #define PRI_MACROS_BROKEN 1
11845 _ACEOF
11846
11847 PRI_MACROS_BROKEN=1
11848 else
11849 PRI_MACROS_BROKEN=0
11850 fi
11851
11852
11853
11854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
11855 $as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
11856 if ${gl_cv_cc_double_expbit0+:} false; then :
11857 $as_echo_n "(cached) " >&6
11858 else
11859
11860 if test "$cross_compiling" = yes; then :
11861
11862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11863 /* end confdefs.h. */
11864
11865 #if defined arm || defined __arm || defined __arm__
11866 mixed_endianness
11867 #endif
11868
11869 _ACEOF
11870 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11871 $EGREP "mixed_endianness" >/dev/null 2>&1; then :
11872 gl_cv_cc_double_expbit0="unknown"
11873 else
11874
11875 :
11876 if ${ac_cv_c_bigendian+:} false; then :
11877 $as_echo_n "(cached) " >&6
11878 else
11879 ac_cv_c_bigendian=unknown
11880 # See if we're dealing with a universal compiler.
11881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11882 /* end confdefs.h. */
11883 #ifndef __APPLE_CC__
11884 not a universal capable compiler
11885 #endif
11886 typedef int dummy;
11887
11888 _ACEOF
11889 if ac_fn_c_try_compile "$LINENO"; then :
11890
11891 # Check for potential -arch flags. It is not universal unless
11892 # there are at least two -arch flags with different values.
11893 ac_arch=
11894 ac_prev=
11895 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
11896 if test -n "$ac_prev"; then
11897 case $ac_word in
11898 i?86 | x86_64 | ppc | ppc64)
11899 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
11900 ac_arch=$ac_word
11901 else
11902 ac_cv_c_bigendian=universal
11903 break
11904 fi
11905 ;;
11906 esac
11907 ac_prev=
11908 elif test "x$ac_word" = "x-arch"; then
11909 ac_prev=arch
11910 fi
11911 done
11912 fi
11913 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11914 if test $ac_cv_c_bigendian = unknown; then
11915 # See if sys/param.h defines the BYTE_ORDER macro.
11916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11917 /* end confdefs.h. */
11918 #include <sys/types.h>
11919 #include <sys/param.h>
11920
11921 int
11922 main ()
11923 {
11924 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
11925 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
11926 && LITTLE_ENDIAN)
11927 bogus endian macros
11928 #endif
11929
11930 ;
11931 return 0;
11932 }
11933 _ACEOF
11934 if ac_fn_c_try_compile "$LINENO"; then :
11935 # It does; now see whether it defined to BIG_ENDIAN or not.
11936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11937 /* end confdefs.h. */
11938 #include <sys/types.h>
11939 #include <sys/param.h>
11940
11941 int
11942 main ()
11943 {
11944 #if BYTE_ORDER != BIG_ENDIAN
11945 not big endian
11946 #endif
11947
11948 ;
11949 return 0;
11950 }
11951 _ACEOF
11952 if ac_fn_c_try_compile "$LINENO"; then :
11953 ac_cv_c_bigendian=yes
11954 else
11955 ac_cv_c_bigendian=no
11956 fi
11957 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11958 fi
11959 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11960 fi
11961 if test $ac_cv_c_bigendian = unknown; then
11962 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
11963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11964 /* end confdefs.h. */
11965 #include <limits.h>
11966
11967 int
11968 main ()
11969 {
11970 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
11971 bogus endian macros
11972 #endif
11973
11974 ;
11975 return 0;
11976 }
11977 _ACEOF
11978 if ac_fn_c_try_compile "$LINENO"; then :
11979 # It does; now see whether it defined to _BIG_ENDIAN or not.
11980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11981 /* end confdefs.h. */
11982 #include <limits.h>
11983
11984 int
11985 main ()
11986 {
11987 #ifndef _BIG_ENDIAN
11988 not big endian
11989 #endif
11990
11991 ;
11992 return 0;
11993 }
11994 _ACEOF
11995 if ac_fn_c_try_compile "$LINENO"; then :
11996 ac_cv_c_bigendian=yes
11997 else
11998 ac_cv_c_bigendian=no
11999 fi
12000 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12001 fi
12002 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12003 fi
12004 if test $ac_cv_c_bigendian = unknown; then
12005 # Compile a test program.
12006 if test "$cross_compiling" = yes; then :
12007 # Try to guess by grepping values from an object file.
12008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12009 /* end confdefs.h. */
12010 short int ascii_mm[] =
12011 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12012 short int ascii_ii[] =
12013 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12014 int use_ascii (int i) {
12015 return ascii_mm[i] + ascii_ii[i];
12016 }
12017 short int ebcdic_ii[] =
12018 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12019 short int ebcdic_mm[] =
12020 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12021 int use_ebcdic (int i) {
12022 return ebcdic_mm[i] + ebcdic_ii[i];
12023 }
12024 extern int foo;
12025
12026 int
12027 main ()
12028 {
12029 return use_ascii (foo) == use_ebcdic (foo);
12030 ;
12031 return 0;
12032 }
12033 _ACEOF
12034 if ac_fn_c_try_compile "$LINENO"; then :
12035 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12036 ac_cv_c_bigendian=yes
12037 fi
12038 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12039 if test "$ac_cv_c_bigendian" = unknown; then
12040 ac_cv_c_bigendian=no
12041 else
12042 # finding both strings is unlikely to happen, but who knows?
12043 ac_cv_c_bigendian=unknown
12044 fi
12045 fi
12046 fi
12047 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12048 else
12049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12050 /* end confdefs.h. */
12051 $ac_includes_default
12052 int
12053 main ()
12054 {
12055
12056 /* Are we little or big endian? From Harbison&Steele. */
12057 union
12058 {
12059 long int l;
12060 char c[sizeof (long int)];
12061 } u;
12062 u.l = 1;
12063 return u.c[sizeof (long int) - 1] == 1;
12064
12065 ;
12066 return 0;
12067 }
12068 _ACEOF
12069 if ac_fn_c_try_run "$LINENO"; then :
12070 ac_cv_c_bigendian=no
12071 else
12072 ac_cv_c_bigendian=yes
12073 fi
12074 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12075 conftest.$ac_objext conftest.beam conftest.$ac_ext
12076 fi
12077
12078 fi
12079 fi
12080 :
12081 case $ac_cv_c_bigendian in #(
12082 yes)
12083 gl_cv_cc_double_expbit0="word 0 bit 20";; #(
12084 no)
12085 gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
12086 universal)
12087
12088 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12089
12090 ;; #(
12091 *)
12092 gl_cv_cc_double_expbit0="unknown" ;;
12093 esac
12094
12095
12096 fi
12097 rm -f conftest*
12098
12099
12100 else
12101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12102 /* end confdefs.h. */
12103
12104 #include <float.h>
12105 #include <stddef.h>
12106 #include <stdio.h>
12107 #include <string.h>
12108 #define NWORDS \
12109 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
12110 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
12111 static unsigned int ored_words[NWORDS];
12112 static unsigned int anded_words[NWORDS];
12113 static void add_to_ored_words (double x)
12114 {
12115 memory_double m;
12116 size_t i;
12117 /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
12118 memset (&m, 0, sizeof (memory_double));
12119 m.value = x;
12120 for (i = 0; i < NWORDS; i++)
12121 {
12122 ored_words[i] |= m.word[i];
12123 anded_words[i] &= m.word[i];
12124 }
12125 }
12126 int main ()
12127 {
12128 size_t j;
12129 FILE *fp = fopen ("conftest.out", "w");
12130 if (fp == NULL)
12131 return 1;
12132 for (j = 0; j < NWORDS; j++)
12133 anded_words[j] = ~ (unsigned int) 0;
12134 add_to_ored_words (0.25);
12135 add_to_ored_words (0.5);
12136 add_to_ored_words (1.0);
12137 add_to_ored_words (2.0);
12138 add_to_ored_words (4.0);
12139 /* Remove bits that are common (e.g. if representation of the first mantissa
12140 bit is explicit). */
12141 for (j = 0; j < NWORDS; j++)
12142 ored_words[j] &= ~anded_words[j];
12143 /* Now find the nonzero word. */
12144 for (j = 0; j < NWORDS; j++)
12145 if (ored_words[j] != 0)
12146 break;
12147 if (j < NWORDS)
12148 {
12149 size_t i;
12150 for (i = j + 1; i < NWORDS; i++)
12151 if (ored_words[i] != 0)
12152 {
12153 fprintf (fp, "unknown");
12154 return (fclose (fp) != 0);
12155 }
12156 for (i = 0; ; i++)
12157 if ((ored_words[j] >> i) & 1)
12158 {
12159 fprintf (fp, "word %d bit %d", (int) j, (int) i);
12160 return (fclose (fp) != 0);
12161 }
12162 }
12163 fprintf (fp, "unknown");
12164 return (fclose (fp) != 0);
12165 }
12166
12167 _ACEOF
12168 if ac_fn_c_try_run "$LINENO"; then :
12169 gl_cv_cc_double_expbit0=`cat conftest.out`
12170 else
12171 gl_cv_cc_double_expbit0="unknown"
12172 fi
12173 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12174 conftest.$ac_objext conftest.beam conftest.$ac_ext
12175 fi
12176
12177 rm -f conftest.out
12178
12179 fi
12180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
12181 $as_echo "$gl_cv_cc_double_expbit0" >&6; }
12182 case "$gl_cv_cc_double_expbit0" in
12183 word*bit*)
12184 word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
12185 bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
12186
12187 cat >>confdefs.h <<_ACEOF
12188 #define DBL_EXPBIT0_WORD $word
12189 _ACEOF
12190
12191
12192 cat >>confdefs.h <<_ACEOF
12193 #define DBL_EXPBIT0_BIT $bit
12194 _ACEOF
12195
12196 ;;
12197 esac
12198
12199
12200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12201 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12202 if ${ac_cv_c_bigendian+:} false; then :
12203 $as_echo_n "(cached) " >&6
12204 else
12205 ac_cv_c_bigendian=unknown
12206 # See if we're dealing with a universal compiler.
12207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12208 /* end confdefs.h. */
12209 #ifndef __APPLE_CC__
12210 not a universal capable compiler
12211 #endif
12212 typedef int dummy;
12213
12214 _ACEOF
12215 if ac_fn_c_try_compile "$LINENO"; then :
12216
12217 # Check for potential -arch flags. It is not universal unless
12218 # there are at least two -arch flags with different values.
12219 ac_arch=
12220 ac_prev=
12221 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12222 if test -n "$ac_prev"; then
12223 case $ac_word in
12224 i?86 | x86_64 | ppc | ppc64)
12225 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12226 ac_arch=$ac_word
12227 else
12228 ac_cv_c_bigendian=universal
12229 break
12230 fi
12231 ;;
12232 esac
12233 ac_prev=
12234 elif test "x$ac_word" = "x-arch"; then
12235 ac_prev=arch
12236 fi
12237 done
12238 fi
12239 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12240 if test $ac_cv_c_bigendian = unknown; then
12241 # See if sys/param.h defines the BYTE_ORDER macro.
12242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12243 /* end confdefs.h. */
12244 #include <sys/types.h>
12245 #include <sys/param.h>
12246
12247 int
12248 main ()
12249 {
12250 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12251 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12252 && LITTLE_ENDIAN)
12253 bogus endian macros
12254 #endif
12255
12256 ;
12257 return 0;
12258 }
12259 _ACEOF
12260 if ac_fn_c_try_compile "$LINENO"; then :
12261 # It does; now see whether it defined to BIG_ENDIAN or not.
12262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12263 /* end confdefs.h. */
12264 #include <sys/types.h>
12265 #include <sys/param.h>
12266
12267 int
12268 main ()
12269 {
12270 #if BYTE_ORDER != BIG_ENDIAN
12271 not big endian
12272 #endif
12273
12274 ;
12275 return 0;
12276 }
12277 _ACEOF
12278 if ac_fn_c_try_compile "$LINENO"; then :
12279 ac_cv_c_bigendian=yes
12280 else
12281 ac_cv_c_bigendian=no
12282 fi
12283 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12284 fi
12285 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12286 fi
12287 if test $ac_cv_c_bigendian = unknown; then
12288 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12290 /* end confdefs.h. */
12291 #include <limits.h>
12292
12293 int
12294 main ()
12295 {
12296 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12297 bogus endian macros
12298 #endif
12299
12300 ;
12301 return 0;
12302 }
12303 _ACEOF
12304 if ac_fn_c_try_compile "$LINENO"; then :
12305 # It does; now see whether it defined to _BIG_ENDIAN or not.
12306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12307 /* end confdefs.h. */
12308 #include <limits.h>
12309
12310 int
12311 main ()
12312 {
12313 #ifndef _BIG_ENDIAN
12314 not big endian
12315 #endif
12316
12317 ;
12318 return 0;
12319 }
12320 _ACEOF
12321 if ac_fn_c_try_compile "$LINENO"; then :
12322 ac_cv_c_bigendian=yes
12323 else
12324 ac_cv_c_bigendian=no
12325 fi
12326 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12327 fi
12328 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12329 fi
12330 if test $ac_cv_c_bigendian = unknown; then
12331 # Compile a test program.
12332 if test "$cross_compiling" = yes; then :
12333 # Try to guess by grepping values from an object file.
12334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12335 /* end confdefs.h. */
12336 short int ascii_mm[] =
12337 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12338 short int ascii_ii[] =
12339 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12340 int use_ascii (int i) {
12341 return ascii_mm[i] + ascii_ii[i];
12342 }
12343 short int ebcdic_ii[] =
12344 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12345 short int ebcdic_mm[] =
12346 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12347 int use_ebcdic (int i) {
12348 return ebcdic_mm[i] + ebcdic_ii[i];
12349 }
12350 extern int foo;
12351
12352 int
12353 main ()
12354 {
12355 return use_ascii (foo) == use_ebcdic (foo);
12356 ;
12357 return 0;
12358 }
12359 _ACEOF
12360 if ac_fn_c_try_compile "$LINENO"; then :
12361 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12362 ac_cv_c_bigendian=yes
12363 fi
12364 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12365 if test "$ac_cv_c_bigendian" = unknown; then
12366 ac_cv_c_bigendian=no
12367 else
12368 # finding both strings is unlikely to happen, but who knows?
12369 ac_cv_c_bigendian=unknown
12370 fi
12371 fi
12372 fi
12373 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12374 else
12375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12376 /* end confdefs.h. */
12377 $ac_includes_default
12378 int
12379 main ()
12380 {
12381
12382 /* Are we little or big endian? From Harbison&Steele. */
12383 union
12384 {
12385 long int l;
12386 char c[sizeof (long int)];
12387 } u;
12388 u.l = 1;
12389 return u.c[sizeof (long int) - 1] == 1;
12390
12391 ;
12392 return 0;
12393 }
12394 _ACEOF
12395 if ac_fn_c_try_run "$LINENO"; then :
12396 ac_cv_c_bigendian=no
12397 else
12398 ac_cv_c_bigendian=yes
12399 fi
12400 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12401 conftest.$ac_objext conftest.beam conftest.$ac_ext
12402 fi
12403
12404 fi
12405 fi
12406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12407 $as_echo "$ac_cv_c_bigendian" >&6; }
12408 case $ac_cv_c_bigendian in #(
12409 yes)
12410 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12411 ;; #(
12412 no)
12413 ;; #(
12414 universal)
12415
12416 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12417
12418 ;; #(
12419 *)
12420 as_fn_error $? "unknown endianness
12421 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12422 esac
12423
12424
12425
12426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12427 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12428 if ${am_cv_langinfo_codeset+:} false; then :
12429 $as_echo_n "(cached) " >&6
12430 else
12431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12432 /* end confdefs.h. */
12433 #include <langinfo.h>
12434 int
12435 main ()
12436 {
12437 char* cs = nl_langinfo(CODESET); return !cs;
12438 ;
12439 return 0;
12440 }
12441 _ACEOF
12442 if ac_fn_c_try_link "$LINENO"; then :
12443 am_cv_langinfo_codeset=yes
12444 else
12445 am_cv_langinfo_codeset=no
12446 fi
12447 rm -f core conftest.err conftest.$ac_objext \
12448 conftest$ac_exeext conftest.$ac_ext
12449
12450 fi
12451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12452 $as_echo "$am_cv_langinfo_codeset" >&6; }
12453 if test $am_cv_langinfo_codeset = yes; then
12454
12455 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
12456
12457 fi
12458
12459
12460 ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
12461 if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
12462 ac_have_decl=1
12463 else
12464 ac_have_decl=0
12465 fi
12466
12467 cat >>confdefs.h <<_ACEOF
12468 #define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
12469 _ACEOF
12470
12471
12472
12473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5
12474 $as_echo_n "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; }
12475 if ${ac_cv_gnu_library_2_1+:} false; then :
12476 $as_echo_n "(cached) " >&6
12477 else
12478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12479 /* end confdefs.h. */
12480
12481 #include <features.h>
12482 #ifdef __GNU_LIBRARY__
12483 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
12484 Lucky GNU user
12485 #endif
12486 #endif
12487 #ifdef __UCLIBC__
12488 Lucky user
12489 #endif
12490
12491 _ACEOF
12492 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12493 $EGREP "Lucky" >/dev/null 2>&1; then :
12494 ac_cv_gnu_library_2_1=yes
12495 else
12496 ac_cv_gnu_library_2_1=no
12497 fi
12498 rm -f conftest*
12499
12500
12501
12502 fi
12503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
12504 $as_echo "$ac_cv_gnu_library_2_1" >&6; }
12505
12506 GLIBC21="$ac_cv_gnu_library_2_1"
12507
12508
12509
12510 if test "X$prefix" = "XNONE"; then
12511 acl_final_prefix="$ac_default_prefix"
12512 else
12513 acl_final_prefix="$prefix"
12514 fi
12515 if test "X$exec_prefix" = "XNONE"; then
12516 acl_final_exec_prefix='${prefix}'
12517 else
12518 acl_final_exec_prefix="$exec_prefix"
12519 fi
12520 acl_save_prefix="$prefix"
12521 prefix="$acl_final_prefix"
12522 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
12523 prefix="$acl_save_prefix"
12524
12525
12526
12527 # Check whether --with-gnu-ld was given.
12528 if test "${with_gnu_ld+set}" = set; then :
12529 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
12530 else
12531 with_gnu_ld=no
12532 fi
12533
12534 # Prepare PATH_SEPARATOR.
12535 # The user is always right.
12536 if test "${PATH_SEPARATOR+set}" != set; then
12537 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
12538 # contains only /bin. Note that ksh looks also at the FPATH variable,
12539 # so we have to set that as well for the test.
12540 PATH_SEPARATOR=:
12541 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
12542 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
12543 || PATH_SEPARATOR=';'
12544 }
12545 fi
12546
12547 ac_prog=ld
12548 if test "$GCC" = yes; then
12549 # Check if gcc -print-prog-name=ld gives a path.
12550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
12551 $as_echo_n "checking for ld used by $CC... " >&6; }
12552 case $host in
12553 *-*-mingw*)
12554 # gcc leaves a trailing carriage return which upsets mingw
12555 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
12556 *)
12557 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
12558 esac
12559 case $ac_prog in
12560 # Accept absolute paths.
12561 [\\/]* | ?:[\\/]*)
12562 re_direlt='/[^/][^/]*/\.\./'
12563 # Canonicalize the pathname of ld
12564 ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
12565 while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
12566 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
12567 done
12568 test -z "$LD" && LD="$ac_prog"
12569 ;;
12570 "")
12571 # If it fails, then pretend we aren't using GCC.
12572 ac_prog=ld
12573 ;;
12574 *)
12575 # If it is relative, then search for the first ld in PATH.
12576 with_gnu_ld=unknown
12577 ;;
12578 esac
12579 elif test "$with_gnu_ld" = yes; then
12580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
12581 $as_echo_n "checking for GNU ld... " >&6; }
12582 else
12583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
12584 $as_echo_n "checking for non-GNU ld... " >&6; }
12585 fi
12586 if ${acl_cv_path_LD+:} false; then :
12587 $as_echo_n "(cached) " >&6
12588 else
12589 if test -z "$LD"; then
12590 acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
12591 for ac_dir in $PATH; do
12592 IFS="$acl_save_ifs"
12593 test -z "$ac_dir" && ac_dir=.
12594 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
12595 acl_cv_path_LD="$ac_dir/$ac_prog"
12596 # Check to see if the program is GNU ld. I'd rather use --version,
12597 # but apparently some variants of GNU ld only accept -v.
12598 # Break only if it was the GNU/non-GNU ld that we prefer.
12599 case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
12600 *GNU* | *'with BFD'*)
12601 test "$with_gnu_ld" != no && break
12602 ;;
12603 *)
12604 test "$with_gnu_ld" != yes && break
12605 ;;
12606 esac
12607 fi
12608 done
12609 IFS="$acl_save_ifs"
12610 else
12611 acl_cv_path_LD="$LD" # Let the user override the test with a path.
12612 fi
12613 fi
12614
12615 LD="$acl_cv_path_LD"
12616 if test -n "$LD"; then
12617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
12618 $as_echo "$LD" >&6; }
12619 else
12620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12621 $as_echo "no" >&6; }
12622 fi
12623 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
12624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
12625 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
12626 if ${acl_cv_prog_gnu_ld+:} false; then :
12627 $as_echo_n "(cached) " >&6
12628 else
12629 # I'd rather use --version here, but apparently some GNU lds only accept -v.
12630 case `$LD -v 2>&1 </dev/null` in
12631 *GNU* | *'with BFD'*)
12632 acl_cv_prog_gnu_ld=yes
12633 ;;
12634 *)
12635 acl_cv_prog_gnu_ld=no
12636 ;;
12637 esac
12638 fi
12639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
12640 $as_echo "$acl_cv_prog_gnu_ld" >&6; }
12641 with_gnu_ld=$acl_cv_prog_gnu_ld
12642
12643
12644
12645
12646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
12647 $as_echo_n "checking for shared library run path origin... " >&6; }
12648 if ${acl_cv_rpath+:} false; then :
12649 $as_echo_n "(cached) " >&6
12650 else
12651
12652 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
12653 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
12654 . ./conftest.sh
12655 rm -f ./conftest.sh
12656 acl_cv_rpath=done
12657
12658 fi
12659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
12660 $as_echo "$acl_cv_rpath" >&6; }
12661 wl="$acl_cv_wl"
12662 acl_libext="$acl_cv_libext"
12663 acl_shlibext="$acl_cv_shlibext"
12664 acl_libname_spec="$acl_cv_libname_spec"
12665 acl_library_names_spec="$acl_cv_library_names_spec"
12666 acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
12667 acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
12668 acl_hardcode_direct="$acl_cv_hardcode_direct"
12669 acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
12670 # Check whether --enable-rpath was given.
12671 if test "${enable_rpath+set}" = set; then :
12672 enableval=$enable_rpath; :
12673 else
12674 enable_rpath=yes
12675 fi
12676
12677
12678
12679
12680 acl_libdirstem=lib
12681 acl_libdirstem2=
12682 case "$host_os" in
12683 solaris*)
12684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
12685 $as_echo_n "checking for 64-bit host... " >&6; }
12686 if ${gl_cv_solaris_64bit+:} false; then :
12687 $as_echo_n "(cached) " >&6
12688 else
12689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12690 /* end confdefs.h. */
12691
12692 #ifdef _LP64
12693 sixtyfour bits
12694 #endif
12695
12696 _ACEOF
12697 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12698 $EGREP "sixtyfour bits" >/dev/null 2>&1; then :
12699 gl_cv_solaris_64bit=yes
12700 else
12701 gl_cv_solaris_64bit=no
12702 fi
12703 rm -f conftest*
12704
12705
12706 fi
12707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5
12708 $as_echo "$gl_cv_solaris_64bit" >&6; }
12709 if test $gl_cv_solaris_64bit = yes; then
12710 acl_libdirstem=lib/64
12711 case "$host_cpu" in
12712 sparc*) acl_libdirstem2=lib/sparcv9 ;;
12713 i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
12714 esac
12715 fi
12716 ;;
12717 *)
12718 searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
12719 if test -n "$searchpath"; then
12720 acl_save_IFS="${IFS= }"; IFS=":"
12721 for searchdir in $searchpath; do
12722 if test -d "$searchdir"; then
12723 case "$searchdir" in
12724 */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
12725 */../ | */.. )
12726 # Better ignore directories of this form. They are misleading.
12727 ;;
12728 *) searchdir=`cd "$searchdir" && pwd`
12729 case "$searchdir" in
12730 */lib64 ) acl_libdirstem=lib64 ;;
12731 esac ;;
12732 esac
12733 fi
12734 done
12735 IFS="$acl_save_IFS"
12736 fi
12737 ;;
12738 esac
12739 test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
12740
12741
12742
12743 gl_threads_api=none
12744 LIBTHREAD=
12745 LTLIBTHREAD=
12746 LIBMULTITHREAD=
12747 LTLIBMULTITHREAD=
12748 if test "$gl_use_threads" != no; then
12749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
12750 $as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
12751 if ${gl_cv_have_weak+:} false; then :
12752 $as_echo_n "(cached) " >&6
12753 else
12754 gl_cv_have_weak=no
12755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12756 /* end confdefs.h. */
12757 extern void xyzzy ();
12758 #pragma weak xyzzy
12759 int
12760 main ()
12761 {
12762 xyzzy();
12763 ;
12764 return 0;
12765 }
12766 _ACEOF
12767 if ac_fn_c_try_link "$LINENO"; then :
12768 gl_cv_have_weak=maybe
12769 fi
12770 rm -f core conftest.err conftest.$ac_objext \
12771 conftest$ac_exeext conftest.$ac_ext
12772 if test $gl_cv_have_weak = maybe; then
12773 if test "$cross_compiling" = yes; then :
12774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12775 /* end confdefs.h. */
12776 #ifdef __ELF__
12777 Extensible Linking Format
12778 #endif
12779
12780 _ACEOF
12781 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12782 $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
12783 gl_cv_have_weak="guessing yes"
12784 else
12785 gl_cv_have_weak="guessing no"
12786 fi
12787 rm -f conftest*
12788
12789
12790 else
12791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12792 /* end confdefs.h. */
12793
12794 #include <stdio.h>
12795 #pragma weak fputs
12796 int main ()
12797 {
12798 return (fputs == NULL);
12799 }
12800 _ACEOF
12801 if ac_fn_c_try_run "$LINENO"; then :
12802 gl_cv_have_weak=yes
12803 else
12804 gl_cv_have_weak=no
12805 fi
12806 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12807 conftest.$ac_objext conftest.beam conftest.$ac_ext
12808 fi
12809
12810 fi
12811
12812 fi
12813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
12814 $as_echo "$gl_cv_have_weak" >&6; }
12815 if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
12816 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
12817 # it groks <pthread.h>. It's added above, in gl_THREADLIB_EARLY_BODY.
12818 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
12819 if test "x$ac_cv_header_pthread_h" = xyes; then :
12820 gl_have_pthread_h=yes
12821 else
12822 gl_have_pthread_h=no
12823 fi
12824
12825
12826 if test "$gl_have_pthread_h" = yes; then
12827 # Other possible tests:
12828 # -lpthreads (FSU threads, PCthreads)
12829 # -lgthreads
12830 gl_have_pthread=
12831 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
12832 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
12833 # the second one only in libpthread, and lock.c needs it.
12834 #
12835 # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
12836 # needs -pthread for some reason. See:
12837 # http://lists.gnu.org/archive/html/bug-gnulib/2014-09/msg00023.html
12838 save_LIBS=$LIBS
12839 for gl_pthread in '' '-pthread'; do
12840 LIBS="$LIBS $gl_pthread"
12841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12842 /* end confdefs.h. */
12843 #include <pthread.h>
12844 pthread_mutex_t m;
12845 pthread_mutexattr_t ma;
12846
12847 int
12848 main ()
12849 {
12850 pthread_mutex_lock (&m);
12851 pthread_mutexattr_init (&ma);
12852 ;
12853 return 0;
12854 }
12855 _ACEOF
12856 if ac_fn_c_try_link "$LINENO"; then :
12857 gl_have_pthread=yes
12858 LIBTHREAD=$gl_pthread LTLIBTHREAD=$gl_pthread
12859 LIBMULTITHREAD=$gl_pthread LTLIBMULTITHREAD=$gl_pthread
12860 fi
12861 rm -f core conftest.err conftest.$ac_objext \
12862 conftest$ac_exeext conftest.$ac_ext
12863 LIBS=$save_LIBS
12864 test -n "$gl_have_pthread" && break
12865 done
12866
12867 # Test for libpthread by looking for pthread_kill. (Not pthread_self,
12868 # since it is defined as a macro on OSF/1.)
12869 if test -n "$gl_have_pthread" && test -z "$LIBTHREAD"; then
12870 # The program links fine without libpthread. But it may actually
12871 # need to link with libpthread in order to create multiple threads.
12872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
12873 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
12874 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
12875 $as_echo_n "(cached) " >&6
12876 else
12877 ac_check_lib_save_LIBS=$LIBS
12878 LIBS="-lpthread $LIBS"
12879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12880 /* end confdefs.h. */
12881
12882 /* Override any GCC internal prototype to avoid an error.
12883 Use char because int might match the return type of a GCC
12884 builtin and then its argument prototype would still apply. */
12885 #ifdef __cplusplus
12886 extern "C"
12887 #endif
12888 char pthread_kill ();
12889 int
12890 main ()
12891 {
12892 return pthread_kill ();
12893 ;
12894 return 0;
12895 }
12896 _ACEOF
12897 if ac_fn_c_try_link "$LINENO"; then :
12898 ac_cv_lib_pthread_pthread_kill=yes
12899 else
12900 ac_cv_lib_pthread_pthread_kill=no
12901 fi
12902 rm -f core conftest.err conftest.$ac_objext \
12903 conftest$ac_exeext conftest.$ac_ext
12904 LIBS=$ac_check_lib_save_LIBS
12905 fi
12906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
12907 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
12908 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
12909 LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
12910 # On Solaris and HP-UX, most pthread functions exist also in libc.
12911 # Therefore pthread_in_use() needs to actually try to create a
12912 # thread: pthread_create from libc will fail, whereas
12913 # pthread_create will actually create a thread.
12914 case "$host_os" in
12915 solaris* | hpux*)
12916
12917 $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
12918
12919 esac
12920
12921 fi
12922
12923 elif test -z "$gl_have_pthread"; then
12924 # Some library is needed. Try libpthread and libc_r.
12925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
12926 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
12927 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
12928 $as_echo_n "(cached) " >&6
12929 else
12930 ac_check_lib_save_LIBS=$LIBS
12931 LIBS="-lpthread $LIBS"
12932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12933 /* end confdefs.h. */
12934
12935 /* Override any GCC internal prototype to avoid an error.
12936 Use char because int might match the return type of a GCC
12937 builtin and then its argument prototype would still apply. */
12938 #ifdef __cplusplus
12939 extern "C"
12940 #endif
12941 char pthread_kill ();
12942 int
12943 main ()
12944 {
12945 return pthread_kill ();
12946 ;
12947 return 0;
12948 }
12949 _ACEOF
12950 if ac_fn_c_try_link "$LINENO"; then :
12951 ac_cv_lib_pthread_pthread_kill=yes
12952 else
12953 ac_cv_lib_pthread_pthread_kill=no
12954 fi
12955 rm -f core conftest.err conftest.$ac_objext \
12956 conftest$ac_exeext conftest.$ac_ext
12957 LIBS=$ac_check_lib_save_LIBS
12958 fi
12959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
12960 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
12961 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
12962 gl_have_pthread=yes
12963 LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread
12964 LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
12965 fi
12966
12967 if test -z "$gl_have_pthread"; then
12968 # For FreeBSD 4.
12969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
12970 $as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
12971 if ${ac_cv_lib_c_r_pthread_kill+:} false; then :
12972 $as_echo_n "(cached) " >&6
12973 else
12974 ac_check_lib_save_LIBS=$LIBS
12975 LIBS="-lc_r $LIBS"
12976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12977 /* end confdefs.h. */
12978
12979 /* Override any GCC internal prototype to avoid an error.
12980 Use char because int might match the return type of a GCC
12981 builtin and then its argument prototype would still apply. */
12982 #ifdef __cplusplus
12983 extern "C"
12984 #endif
12985 char pthread_kill ();
12986 int
12987 main ()
12988 {
12989 return pthread_kill ();
12990 ;
12991 return 0;
12992 }
12993 _ACEOF
12994 if ac_fn_c_try_link "$LINENO"; then :
12995 ac_cv_lib_c_r_pthread_kill=yes
12996 else
12997 ac_cv_lib_c_r_pthread_kill=no
12998 fi
12999 rm -f core conftest.err conftest.$ac_objext \
13000 conftest$ac_exeext conftest.$ac_ext
13001 LIBS=$ac_check_lib_save_LIBS
13002 fi
13003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
13004 $as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
13005 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then :
13006 gl_have_pthread=yes
13007 LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r
13008 LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r
13009 fi
13010
13011 fi
13012 fi
13013 if test -n "$gl_have_pthread"; then
13014 gl_threads_api=posix
13015
13016 $as_echo "#define USE_POSIX_THREADS 1" >>confdefs.h
13017
13018 if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
13019 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
13020
13021 $as_echo "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h
13022
13023 LIBTHREAD=
13024 LTLIBTHREAD=
13025 fi
13026 fi
13027 fi
13028 fi
13029 fi
13030 if test -z "$gl_have_pthread"; then
13031 if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then
13032 gl_have_solaristhread=
13033 gl_save_LIBS="$LIBS"
13034 LIBS="$LIBS -lthread"
13035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13036 /* end confdefs.h. */
13037
13038 #include <thread.h>
13039 #include <synch.h>
13040
13041 int
13042 main ()
13043 {
13044 thr_self();
13045 ;
13046 return 0;
13047 }
13048 _ACEOF
13049 if ac_fn_c_try_link "$LINENO"; then :
13050 gl_have_solaristhread=yes
13051 fi
13052 rm -f core conftest.err conftest.$ac_objext \
13053 conftest$ac_exeext conftest.$ac_ext
13054 LIBS="$gl_save_LIBS"
13055 if test -n "$gl_have_solaristhread"; then
13056 gl_threads_api=solaris
13057 LIBTHREAD=-lthread
13058 LTLIBTHREAD=-lthread
13059 LIBMULTITHREAD="$LIBTHREAD"
13060 LTLIBMULTITHREAD="$LTLIBTHREAD"
13061
13062 $as_echo "#define USE_SOLARIS_THREADS 1" >>confdefs.h
13063
13064 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
13065
13066 $as_echo "#define USE_SOLARIS_THREADS_WEAK 1" >>confdefs.h
13067
13068 LIBTHREAD=
13069 LTLIBTHREAD=
13070 fi
13071 fi
13072 fi
13073 fi
13074 if test "$gl_use_threads" = pth; then
13075 gl_save_CPPFLAGS="$CPPFLAGS"
13076
13077
13078
13079
13080
13081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libpth" >&5
13082 $as_echo_n "checking how to link with libpth... " >&6; }
13083 if ${ac_cv_libpth_libs+:} false; then :
13084 $as_echo_n "(cached) " >&6
13085 else
13086
13087
13088
13089
13090
13091
13092
13093
13094 use_additional=yes
13095
13096 acl_save_prefix="$prefix"
13097 prefix="$acl_final_prefix"
13098 acl_save_exec_prefix="$exec_prefix"
13099 exec_prefix="$acl_final_exec_prefix"
13100
13101 eval additional_includedir=\"$includedir\"
13102 eval additional_libdir=\"$libdir\"
13103
13104 exec_prefix="$acl_save_exec_prefix"
13105 prefix="$acl_save_prefix"
13106
13107
13108 # Check whether --with-libpth-prefix was given.
13109 if test "${with_libpth_prefix+set}" = set; then :
13110 withval=$with_libpth_prefix;
13111 if test "X$withval" = "Xno"; then
13112 use_additional=no
13113 else
13114 if test "X$withval" = "X"; then
13115
13116 acl_save_prefix="$prefix"
13117 prefix="$acl_final_prefix"
13118 acl_save_exec_prefix="$exec_prefix"
13119 exec_prefix="$acl_final_exec_prefix"
13120
13121 eval additional_includedir=\"$includedir\"
13122 eval additional_libdir=\"$libdir\"
13123
13124 exec_prefix="$acl_save_exec_prefix"
13125 prefix="$acl_save_prefix"
13126
13127 else
13128 additional_includedir="$withval/include"
13129 additional_libdir="$withval/$acl_libdirstem"
13130 if test "$acl_libdirstem2" != "$acl_libdirstem" \
13131 && ! test -d "$withval/$acl_libdirstem"; then
13132 additional_libdir="$withval/$acl_libdirstem2"
13133 fi
13134 fi
13135 fi
13136
13137 fi
13138
13139 LIBPTH=
13140 LTLIBPTH=
13141 INCPTH=
13142 LIBPTH_PREFIX=
13143 HAVE_LIBPTH=
13144 rpathdirs=
13145 ltrpathdirs=
13146 names_already_handled=
13147 names_next_round='pth '
13148 while test -n "$names_next_round"; do
13149 names_this_round="$names_next_round"
13150 names_next_round=
13151 for name in $names_this_round; do
13152 already_handled=
13153 for n in $names_already_handled; do
13154 if test "$n" = "$name"; then
13155 already_handled=yes
13156 break
13157 fi
13158 done
13159 if test -z "$already_handled"; then
13160 names_already_handled="$names_already_handled $name"
13161 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
13162 eval value=\"\$HAVE_LIB$uppername\"
13163 if test -n "$value"; then
13164 if test "$value" = yes; then
13165 eval value=\"\$LIB$uppername\"
13166 test -z "$value" || LIBPTH="${LIBPTH}${LIBPTH:+ }$value"
13167 eval value=\"\$LTLIB$uppername\"
13168 test -z "$value" || LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$value"
13169 else
13170 :
13171 fi
13172 else
13173 found_dir=
13174 found_la=
13175 found_so=
13176 found_a=
13177 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
13178 if test -n "$acl_shlibext"; then
13179 shrext=".$acl_shlibext" # typically: shrext=.so
13180 else
13181 shrext=
13182 fi
13183 if test $use_additional = yes; then
13184 dir="$additional_libdir"
13185 if test -n "$acl_shlibext"; then
13186 if test -f "$dir/$libname$shrext"; then
13187 found_dir="$dir"
13188 found_so="$dir/$libname$shrext"
13189 else
13190 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
13191 ver=`(cd "$dir" && \
13192 for f in "$libname$shrext".*; do echo "$f"; done \
13193 | sed -e "s,^$libname$shrext\\\\.,," \
13194 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
13195 | sed 1q ) 2>/dev/null`
13196 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
13197 found_dir="$dir"
13198 found_so="$dir/$libname$shrext.$ver"
13199 fi
13200 else
13201 eval library_names=\"$acl_library_names_spec\"
13202 for f in $library_names; do
13203 if test -f "$dir/$f"; then
13204 found_dir="$dir"
13205 found_so="$dir/$f"
13206 break
13207 fi
13208 done
13209 fi
13210 fi
13211 fi
13212 if test "X$found_dir" = "X"; then
13213 if test -f "$dir/$libname.$acl_libext"; then
13214 found_dir="$dir"
13215 found_a="$dir/$libname.$acl_libext"
13216 fi
13217 fi
13218 if test "X$found_dir" != "X"; then
13219 if test -f "$dir/$libname.la"; then
13220 found_la="$dir/$libname.la"
13221 fi
13222 fi
13223 fi
13224 if test "X$found_dir" = "X"; then
13225 for x in $LDFLAGS $LTLIBPTH; do
13226
13227 acl_save_prefix="$prefix"
13228 prefix="$acl_final_prefix"
13229 acl_save_exec_prefix="$exec_prefix"
13230 exec_prefix="$acl_final_exec_prefix"
13231 eval x=\"$x\"
13232 exec_prefix="$acl_save_exec_prefix"
13233 prefix="$acl_save_prefix"
13234
13235 case "$x" in
13236 -L*)
13237 dir=`echo "X$x" | sed -e 's/^X-L//'`
13238 if test -n "$acl_shlibext"; then
13239 if test -f "$dir/$libname$shrext"; then
13240 found_dir="$dir"
13241 found_so="$dir/$libname$shrext"
13242 else
13243 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
13244 ver=`(cd "$dir" && \
13245 for f in "$libname$shrext".*; do echo "$f"; done \
13246 | sed -e "s,^$libname$shrext\\\\.,," \
13247 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
13248 | sed 1q ) 2>/dev/null`
13249 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
13250 found_dir="$dir"
13251 found_so="$dir/$libname$shrext.$ver"
13252 fi
13253 else
13254 eval library_names=\"$acl_library_names_spec\"
13255 for f in $library_names; do
13256 if test -f "$dir/$f"; then
13257 found_dir="$dir"
13258 found_so="$dir/$f"
13259 break
13260 fi
13261 done
13262 fi
13263 fi
13264 fi
13265 if test "X$found_dir" = "X"; then
13266 if test -f "$dir/$libname.$acl_libext"; then
13267 found_dir="$dir"
13268 found_a="$dir/$libname.$acl_libext"
13269 fi
13270 fi
13271 if test "X$found_dir" != "X"; then
13272 if test -f "$dir/$libname.la"; then
13273 found_la="$dir/$libname.la"
13274 fi
13275 fi
13276 ;;
13277 esac
13278 if test "X$found_dir" != "X"; then
13279 break
13280 fi
13281 done
13282 fi
13283 if test "X$found_dir" != "X"; then
13284 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$found_dir -l$name"
13285 if test "X$found_so" != "X"; then
13286 if test "$enable_rpath" = no \
13287 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
13288 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
13289 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
13290 else
13291 haveit=
13292 for x in $ltrpathdirs; do
13293 if test "X$x" = "X$found_dir"; then
13294 haveit=yes
13295 break
13296 fi
13297 done
13298 if test -z "$haveit"; then
13299 ltrpathdirs="$ltrpathdirs $found_dir"
13300 fi
13301 if test "$acl_hardcode_direct" = yes; then
13302 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
13303 else
13304 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
13305 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
13306 haveit=
13307 for x in $rpathdirs; do
13308 if test "X$x" = "X$found_dir"; then
13309 haveit=yes
13310 break
13311 fi
13312 done
13313 if test -z "$haveit"; then
13314 rpathdirs="$rpathdirs $found_dir"
13315 fi
13316 else
13317 haveit=
13318 for x in $LDFLAGS $LIBPTH; do
13319
13320 acl_save_prefix="$prefix"
13321 prefix="$acl_final_prefix"
13322 acl_save_exec_prefix="$exec_prefix"
13323 exec_prefix="$acl_final_exec_prefix"
13324 eval x=\"$x\"
13325 exec_prefix="$acl_save_exec_prefix"
13326 prefix="$acl_save_prefix"
13327
13328 if test "X$x" = "X-L$found_dir"; then
13329 haveit=yes
13330 break
13331 fi
13332 done
13333 if test -z "$haveit"; then
13334 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir"
13335 fi
13336 if test "$acl_hardcode_minus_L" != no; then
13337 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
13338 else
13339 LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
13340 fi
13341 fi
13342 fi
13343 fi
13344 else
13345 if test "X$found_a" != "X"; then
13346 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_a"
13347 else
13348 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir -l$name"
13349 fi
13350 fi
13351 additional_includedir=
13352 case "$found_dir" in
13353 */$acl_libdirstem | */$acl_libdirstem/)
13354 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
13355 if test "$name" = 'pth'; then
13356 LIBPTH_PREFIX="$basedir"
13357 fi
13358 additional_includedir="$basedir/include"
13359 ;;
13360 */$acl_libdirstem2 | */$acl_libdirstem2/)
13361 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
13362 if test "$name" = 'pth'; then
13363 LIBPTH_PREFIX="$basedir"
13364 fi
13365 additional_includedir="$basedir/include"
13366 ;;
13367 esac
13368 if test "X$additional_includedir" != "X"; then
13369 if test "X$additional_includedir" != "X/usr/include"; then
13370 haveit=
13371 if test "X$additional_includedir" = "X/usr/local/include"; then
13372 if test -n "$GCC"; then
13373 case $host_os in
13374 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
13375 esac
13376 fi
13377 fi
13378 if test -z "$haveit"; then
13379 for x in $CPPFLAGS $INCPTH; do
13380
13381 acl_save_prefix="$prefix"
13382 prefix="$acl_final_prefix"
13383 acl_save_exec_prefix="$exec_prefix"
13384 exec_prefix="$acl_final_exec_prefix"
13385 eval x=\"$x\"
13386 exec_prefix="$acl_save_exec_prefix"
13387 prefix="$acl_save_prefix"
13388
13389 if test "X$x" = "X-I$additional_includedir"; then
13390 haveit=yes
13391 break
13392 fi
13393 done
13394 if test -z "$haveit"; then
13395 if test -d "$additional_includedir"; then
13396 INCPTH="${INCPTH}${INCPTH:+ }-I$additional_includedir"
13397 fi
13398 fi
13399 fi
13400 fi
13401 fi
13402 if test -n "$found_la"; then
13403 save_libdir="$libdir"
13404 case "$found_la" in
13405 */* | *\\*) . "$found_la" ;;
13406 *) . "./$found_la" ;;
13407 esac
13408 libdir="$save_libdir"
13409 for dep in $dependency_libs; do
13410 case "$dep" in
13411 -L*)
13412 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
13413 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
13414 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
13415 haveit=
13416 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
13417 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
13418 if test -n "$GCC"; then
13419 case $host_os in
13420 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
13421 esac
13422 fi
13423 fi
13424 if test -z "$haveit"; then
13425 haveit=
13426 for x in $LDFLAGS $LIBPTH; do
13427
13428 acl_save_prefix="$prefix"
13429 prefix="$acl_final_prefix"
13430 acl_save_exec_prefix="$exec_prefix"
13431 exec_prefix="$acl_final_exec_prefix"
13432 eval x=\"$x\"
13433 exec_prefix="$acl_save_exec_prefix"
13434 prefix="$acl_save_prefix"
13435
13436 if test "X$x" = "X-L$additional_libdir"; then
13437 haveit=yes
13438 break
13439 fi
13440 done
13441 if test -z "$haveit"; then
13442 if test -d "$additional_libdir"; then
13443 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$additional_libdir"
13444 fi
13445 fi
13446 haveit=
13447 for x in $LDFLAGS $LTLIBPTH; do
13448
13449 acl_save_prefix="$prefix"
13450 prefix="$acl_final_prefix"
13451 acl_save_exec_prefix="$exec_prefix"
13452 exec_prefix="$acl_final_exec_prefix"
13453 eval x=\"$x\"
13454 exec_prefix="$acl_save_exec_prefix"
13455 prefix="$acl_save_prefix"
13456
13457 if test "X$x" = "X-L$additional_libdir"; then
13458 haveit=yes
13459 break
13460 fi
13461 done
13462 if test -z "$haveit"; then
13463 if test -d "$additional_libdir"; then
13464 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$additional_libdir"
13465 fi
13466 fi
13467 fi
13468 fi
13469 ;;
13470 -R*)
13471 dir=`echo "X$dep" | sed -e 's/^X-R//'`
13472 if test "$enable_rpath" != no; then
13473 haveit=
13474 for x in $rpathdirs; do
13475 if test "X$x" = "X$dir"; then
13476 haveit=yes
13477 break
13478 fi
13479 done
13480 if test -z "$haveit"; then
13481 rpathdirs="$rpathdirs $dir"
13482 fi
13483 haveit=
13484 for x in $ltrpathdirs; do
13485 if test "X$x" = "X$dir"; then
13486 haveit=yes
13487 break
13488 fi
13489 done
13490 if test -z "$haveit"; then
13491 ltrpathdirs="$ltrpathdirs $dir"
13492 fi
13493 fi
13494 ;;
13495 -l*)
13496 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
13497 ;;
13498 *.la)
13499 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
13500 ;;
13501 *)
13502 LIBPTH="${LIBPTH}${LIBPTH:+ }$dep"
13503 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$dep"
13504 ;;
13505 esac
13506 done
13507 fi
13508 else
13509 LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
13510 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-l$name"
13511 fi
13512 fi
13513 fi
13514 done
13515 done
13516 if test "X$rpathdirs" != "X"; then
13517 if test -n "$acl_hardcode_libdir_separator"; then
13518 alldirs=
13519 for found_dir in $rpathdirs; do
13520 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
13521 done
13522 acl_save_libdir="$libdir"
13523 libdir="$alldirs"
13524 eval flag=\"$acl_hardcode_libdir_flag_spec\"
13525 libdir="$acl_save_libdir"
13526 LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
13527 else
13528 for found_dir in $rpathdirs; do
13529 acl_save_libdir="$libdir"
13530 libdir="$found_dir"
13531 eval flag=\"$acl_hardcode_libdir_flag_spec\"
13532 libdir="$acl_save_libdir"
13533 LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
13534 done
13535 fi
13536 fi
13537 if test "X$ltrpathdirs" != "X"; then
13538 for found_dir in $ltrpathdirs; do
13539 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-R$found_dir"
13540 done
13541 fi
13542
13543
13544
13545
13546
13547
13548 ac_cv_libpth_libs="$LIBPTH"
13549 ac_cv_libpth_ltlibs="$LTLIBPTH"
13550 ac_cv_libpth_cppflags="$INCPTH"
13551 ac_cv_libpth_prefix="$LIBPTH_PREFIX"
13552
13553 fi
13554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libpth_libs" >&5
13555 $as_echo "$ac_cv_libpth_libs" >&6; }
13556 LIBPTH="$ac_cv_libpth_libs"
13557 LTLIBPTH="$ac_cv_libpth_ltlibs"
13558 INCPTH="$ac_cv_libpth_cppflags"
13559 LIBPTH_PREFIX="$ac_cv_libpth_prefix"
13560
13561 for element in $INCPTH; do
13562 haveit=
13563 for x in $CPPFLAGS; do
13564
13565 acl_save_prefix="$prefix"
13566 prefix="$acl_final_prefix"
13567 acl_save_exec_prefix="$exec_prefix"
13568 exec_prefix="$acl_final_exec_prefix"
13569 eval x=\"$x\"
13570 exec_prefix="$acl_save_exec_prefix"
13571 prefix="$acl_save_prefix"
13572
13573 if test "X$x" = "X$element"; then
13574 haveit=yes
13575 break
13576 fi
13577 done
13578 if test -z "$haveit"; then
13579 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
13580 fi
13581 done
13582
13583
13584
13585
13586 HAVE_LIBPTH=yes
13587
13588
13589
13590 gl_have_pth=
13591 gl_save_LIBS="$LIBS"
13592 LIBS="$LIBS $LIBPTH"
13593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13594 /* end confdefs.h. */
13595 #include <pth.h>
13596 int
13597 main ()
13598 {
13599 pth_self();
13600 ;
13601 return 0;
13602 }
13603 _ACEOF
13604 if ac_fn_c_try_link "$LINENO"; then :
13605 gl_have_pth=yes
13606 fi
13607 rm -f core conftest.err conftest.$ac_objext \
13608 conftest$ac_exeext conftest.$ac_ext
13609 LIBS="$gl_save_LIBS"
13610 if test -n "$gl_have_pth"; then
13611 gl_threads_api=pth
13612 LIBTHREAD="$LIBPTH"
13613 LTLIBTHREAD="$LTLIBPTH"
13614 LIBMULTITHREAD="$LIBTHREAD"
13615 LTLIBMULTITHREAD="$LTLIBTHREAD"
13616
13617 $as_echo "#define USE_PTH_THREADS 1" >>confdefs.h
13618
13619 if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
13620 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
13621
13622 $as_echo "#define USE_PTH_THREADS_WEAK 1" >>confdefs.h
13623
13624 LIBTHREAD=
13625 LTLIBTHREAD=
13626 fi
13627 fi
13628 else
13629 CPPFLAGS="$gl_save_CPPFLAGS"
13630 fi
13631 fi
13632 if test -z "$gl_have_pthread"; then
13633 case "$gl_use_threads" in
13634 yes | windows | win32) # The 'win32' is for backward compatibility.
13635 if { case "$host_os" in
13636 mingw*) true;;
13637 *) false;;
13638 esac
13639 }; then
13640 gl_threads_api=windows
13641
13642 $as_echo "#define USE_WINDOWS_THREADS 1" >>confdefs.h
13643
13644 fi
13645 ;;
13646 esac
13647 fi
13648 fi
13649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5
13650 $as_echo_n "checking for multithread API to use... " >&6; }
13651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5
13652 $as_echo "$gl_threads_api" >&6; }
13653
13654
13655
13656
13657
13658
13659
13660
13661
13662
13663
13664
13665
13666
13667
13668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
13669 $as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
13670 if ${gl_cv_func_malloc_posix+:} false; then :
13671 $as_echo_n "(cached) " >&6
13672 else
13673
13674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13675 /* end confdefs.h. */
13676
13677 int
13678 main ()
13679 {
13680 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
13681 choke me
13682 #endif
13683
13684 ;
13685 return 0;
13686 }
13687 _ACEOF
13688 if ac_fn_c_try_compile "$LINENO"; then :
13689 gl_cv_func_malloc_posix=yes
13690 else
13691 gl_cv_func_malloc_posix=no
13692 fi
13693 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13694
13695 fi
13696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
13697 $as_echo "$gl_cv_func_malloc_posix" >&6; }
13698
13699
13700
13701 for ac_header in stdlib.h
13702 do :
13703 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
13704 if test "x$ac_cv_header_stdlib_h" = xyes; then :
13705 cat >>confdefs.h <<_ACEOF
13706 #define HAVE_STDLIB_H 1
13707 _ACEOF
13708
13709 fi
13710
13711 done
13712
13713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
13714 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
13715 if ${ac_cv_func_malloc_0_nonnull+:} false; then :
13716 $as_echo_n "(cached) " >&6
13717 else
13718 if test "$cross_compiling" = yes; then :
13719 case "$host_os" in
13720 # Guess yes on platforms where we know the result.
13721 *-gnu* | freebsd* | netbsd* | openbsd* \
13722 | hpux* | solaris* | cygwin* | mingw*)
13723 ac_cv_func_malloc_0_nonnull=yes ;;
13724 # If we don't know, assume the worst.
13725 *) ac_cv_func_malloc_0_nonnull=no ;;
13726 esac
13727
13728 else
13729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13730 /* end confdefs.h. */
13731 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
13732 # include <stdlib.h>
13733 #else
13734 char *malloc ();
13735 #endif
13736
13737 int
13738 main ()
13739 {
13740 char *p = malloc (0);
13741 int result = !p;
13742 free (p);
13743 return result;
13744 ;
13745 return 0;
13746 }
13747
13748 _ACEOF
13749 if ac_fn_c_try_run "$LINENO"; then :
13750 ac_cv_func_malloc_0_nonnull=yes
13751 else
13752 ac_cv_func_malloc_0_nonnull=no
13753 fi
13754 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13755 conftest.$ac_objext conftest.beam conftest.$ac_ext
13756 fi
13757
13758
13759 fi
13760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
13761 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
13762 if test $ac_cv_func_malloc_0_nonnull = yes; then :
13763 gl_cv_func_malloc_0_nonnull=1
13764 else
13765 gl_cv_func_malloc_0_nonnull=0
13766 fi
13767
13768
13769 cat >>confdefs.h <<_ACEOF
13770 #define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
13771 _ACEOF
13772
13773
13774
13775
13776
13777
13778
13779
13780 GNULIB_BTOWC=0;
13781 GNULIB_WCTOB=0;
13782 GNULIB_MBSINIT=0;
13783 GNULIB_MBRTOWC=0;
13784 GNULIB_MBRLEN=0;
13785 GNULIB_MBSRTOWCS=0;
13786 GNULIB_MBSNRTOWCS=0;
13787 GNULIB_WCRTOMB=0;
13788 GNULIB_WCSRTOMBS=0;
13789 GNULIB_WCSNRTOMBS=0;
13790 GNULIB_WCWIDTH=0;
13791 GNULIB_WMEMCHR=0;
13792 GNULIB_WMEMCMP=0;
13793 GNULIB_WMEMCPY=0;
13794 GNULIB_WMEMMOVE=0;
13795 GNULIB_WMEMSET=0;
13796 GNULIB_WCSLEN=0;
13797 GNULIB_WCSNLEN=0;
13798 GNULIB_WCSCPY=0;
13799 GNULIB_WCPCPY=0;
13800 GNULIB_WCSNCPY=0;
13801 GNULIB_WCPNCPY=0;
13802 GNULIB_WCSCAT=0;
13803 GNULIB_WCSNCAT=0;
13804 GNULIB_WCSCMP=0;
13805 GNULIB_WCSNCMP=0;
13806 GNULIB_WCSCASECMP=0;
13807 GNULIB_WCSNCASECMP=0;
13808 GNULIB_WCSCOLL=0;
13809 GNULIB_WCSXFRM=0;
13810 GNULIB_WCSDUP=0;
13811 GNULIB_WCSCHR=0;
13812 GNULIB_WCSRCHR=0;
13813 GNULIB_WCSCSPN=0;
13814 GNULIB_WCSSPN=0;
13815 GNULIB_WCSPBRK=0;
13816 GNULIB_WCSSTR=0;
13817 GNULIB_WCSTOK=0;
13818 GNULIB_WCSWIDTH=0;
13819 HAVE_BTOWC=1;
13820 HAVE_MBSINIT=1;
13821 HAVE_MBRTOWC=1;
13822 HAVE_MBRLEN=1;
13823 HAVE_MBSRTOWCS=1;
13824 HAVE_MBSNRTOWCS=1;
13825 HAVE_WCRTOMB=1;
13826 HAVE_WCSRTOMBS=1;
13827 HAVE_WCSNRTOMBS=1;
13828 HAVE_WMEMCHR=1;
13829 HAVE_WMEMCMP=1;
13830 HAVE_WMEMCPY=1;
13831 HAVE_WMEMMOVE=1;
13832 HAVE_WMEMSET=1;
13833 HAVE_WCSLEN=1;
13834 HAVE_WCSNLEN=1;
13835 HAVE_WCSCPY=1;
13836 HAVE_WCPCPY=1;
13837 HAVE_WCSNCPY=1;
13838 HAVE_WCPNCPY=1;
13839 HAVE_WCSCAT=1;
13840 HAVE_WCSNCAT=1;
13841 HAVE_WCSCMP=1;
13842 HAVE_WCSNCMP=1;
13843 HAVE_WCSCASECMP=1;
13844 HAVE_WCSNCASECMP=1;
13845 HAVE_WCSCOLL=1;
13846 HAVE_WCSXFRM=1;
13847 HAVE_WCSDUP=1;
13848 HAVE_WCSCHR=1;
13849 HAVE_WCSRCHR=1;
13850 HAVE_WCSCSPN=1;
13851 HAVE_WCSSPN=1;
13852 HAVE_WCSPBRK=1;
13853 HAVE_WCSSTR=1;
13854 HAVE_WCSTOK=1;
13855 HAVE_WCSWIDTH=1;
13856 HAVE_DECL_WCTOB=1;
13857 HAVE_DECL_WCWIDTH=1;
13858 REPLACE_MBSTATE_T=0;
13859 REPLACE_BTOWC=0;
13860 REPLACE_WCTOB=0;
13861 REPLACE_MBSINIT=0;
13862 REPLACE_MBRTOWC=0;
13863 REPLACE_MBRLEN=0;
13864 REPLACE_MBSRTOWCS=0;
13865 REPLACE_MBSNRTOWCS=0;
13866 REPLACE_WCRTOMB=0;
13867 REPLACE_WCSRTOMBS=0;
13868 REPLACE_WCSNRTOMBS=0;
13869 REPLACE_WCWIDTH=0;
13870 REPLACE_WCSWIDTH=0;
13871
13872
13873
13874
13875
13876
13877
13878
13879
13880
13881
13882
13883
13884
13885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
13886 $as_echo_n "checking for a traditional japanese locale... " >&6; }
13887 if ${gt_cv_locale_ja+:} false; then :
13888 $as_echo_n "(cached) " >&6
13889 else
13890
13891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13892 /* end confdefs.h. */
13893
13894 #include <locale.h>
13895 #include <time.h>
13896 #if HAVE_LANGINFO_CODESET
13897 # include <langinfo.h>
13898 #endif
13899 #include <stdlib.h>
13900 #include <string.h>
13901 struct tm t;
13902 char buf[16];
13903 int main ()
13904 {
13905 const char *p;
13906 /* Check whether the given locale name is recognized by the system. */
13907 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
13908 /* On native Windows, setlocale(category, "") looks at the system settings,
13909 not at the environment variables. Also, when an encoding suffix such
13910 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
13911 category of the locale to "C". */
13912 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
13913 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
13914 return 1;
13915 #else
13916 if (setlocale (LC_ALL, "") == NULL) return 1;
13917 #endif
13918 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
13919 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
13920 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
13921 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
13922 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
13923 some unit tests fail.
13924 On MirBSD 10, when an unsupported locale is specified, setlocale()
13925 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
13926 #if HAVE_LANGINFO_CODESET
13927 {
13928 const char *cs = nl_langinfo (CODESET);
13929 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
13930 || strcmp (cs, "UTF-8") == 0)
13931 return 1;
13932 }
13933 #endif
13934 #ifdef __CYGWIN__
13935 /* On Cygwin, avoid locale names without encoding suffix, because the
13936 locale_charset() function relies on the encoding suffix. Note that
13937 LC_ALL is set on the command line. */
13938 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
13939 #endif
13940 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
13941 on Cygwin 1.5.x. */
13942 if (MB_CUR_MAX == 1)
13943 return 1;
13944 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
13945 This excludes the UTF-8 encoding (except on MirBSD). */
13946 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
13947 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
13948 for (p = buf; *p != '\0'; p++)
13949 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
13950 return 1;
13951 return 0;
13952 }
13953
13954 _ACEOF
13955 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
13956 (eval $ac_link) 2>&5
13957 ac_status=$?
13958 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13959 test $ac_status = 0; } && test -s conftest$ac_exeext; then
13960 case "$host_os" in
13961 # Handle native Windows specially, because there setlocale() interprets
13962 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
13963 # "fr" or "fra" as "French" or "French_France.1252",
13964 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
13965 # "ja" as "Japanese" or "Japanese_Japan.932",
13966 # and similar.
13967 mingw*)
13968 # Note that on native Windows, the Japanese locale is
13969 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
13970 # cannot use it here.
13971 gt_cv_locale_ja=none
13972 ;;
13973 *)
13974 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
13975 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
13976 # configure script would override the LC_ALL setting. Likewise for
13977 # LC_CTYPE, which is also set at the beginning of the configure script.
13978 # Test for the AIX locale name.
13979 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
13980 gt_cv_locale_ja=ja_JP
13981 else
13982 # Test for the locale name with explicit encoding suffix.
13983 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
13984 gt_cv_locale_ja=ja_JP.EUC-JP
13985 else
13986 # Test for the HP-UX, OSF/1, NetBSD locale name.
13987 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
13988 gt_cv_locale_ja=ja_JP.eucJP
13989 else
13990 # Test for the IRIX, FreeBSD locale name.
13991 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
13992 gt_cv_locale_ja=ja_JP.EUC
13993 else
13994 # Test for the Solaris 7 locale name.
13995 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
13996 gt_cv_locale_ja=ja
13997 else
13998 # Special test for NetBSD 1.6.
13999 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
14000 gt_cv_locale_ja=ja_JP.eucJP
14001 else
14002 # None found.
14003 gt_cv_locale_ja=none
14004 fi
14005 fi
14006 fi
14007 fi
14008 fi
14009 fi
14010 ;;
14011 esac
14012 fi
14013 rm -fr conftest*
14014
14015 fi
14016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
14017 $as_echo "$gt_cv_locale_ja" >&6; }
14018 LOCALE_JA=$gt_cv_locale_ja
14019
14020
14021
14022
14023
14024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
14025 $as_echo_n "checking for a transitional chinese locale... " >&6; }
14026 if ${gt_cv_locale_zh_CN+:} false; then :
14027 $as_echo_n "(cached) " >&6
14028 else
14029
14030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14031 /* end confdefs.h. */
14032
14033 #include <locale.h>
14034 #include <stdlib.h>
14035 #include <time.h>
14036 #if HAVE_LANGINFO_CODESET
14037 # include <langinfo.h>
14038 #endif
14039 #include <stdlib.h>
14040 #include <string.h>
14041 struct tm t;
14042 char buf[16];
14043 int main ()
14044 {
14045 const char *p;
14046 /* Check whether the given locale name is recognized by the system. */
14047 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
14048 /* On native Windows, setlocale(category, "") looks at the system settings,
14049 not at the environment variables. Also, when an encoding suffix such
14050 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
14051 category of the locale to "C". */
14052 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
14053 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
14054 return 1;
14055 #else
14056 if (setlocale (LC_ALL, "") == NULL) return 1;
14057 #endif
14058 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
14059 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
14060 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
14061 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
14062 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
14063 some unit tests fail.
14064 On MirBSD 10, when an unsupported locale is specified, setlocale()
14065 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
14066 #if HAVE_LANGINFO_CODESET
14067 {
14068 const char *cs = nl_langinfo (CODESET);
14069 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
14070 || strcmp (cs, "UTF-8") == 0)
14071 return 1;
14072 }
14073 #endif
14074 #ifdef __CYGWIN__
14075 /* On Cygwin, avoid locale names without encoding suffix, because the
14076 locale_charset() function relies on the encoding suffix. Note that
14077 LC_ALL is set on the command line. */
14078 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
14079 #endif
14080 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
14081 This excludes the UTF-8 encoding (except on MirBSD). */
14082 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
14083 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
14084 for (p = buf; *p != '\0'; p++)
14085 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
14086 return 1;
14087 /* Check whether a typical GB18030 multibyte sequence is recognized as a
14088 single wide character. This excludes the GB2312 and GBK encodings. */
14089 if (mblen ("\203\062\332\066", 5) != 4)
14090 return 1;
14091 return 0;
14092 }
14093
14094 _ACEOF
14095 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14096 (eval $ac_link) 2>&5
14097 ac_status=$?
14098 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14099 test $ac_status = 0; } && test -s conftest$ac_exeext; then
14100 case "$host_os" in
14101 # Handle native Windows specially, because there setlocale() interprets
14102 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
14103 # "fr" or "fra" as "French" or "French_France.1252",
14104 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
14105 # "ja" as "Japanese" or "Japanese_Japan.932",
14106 # and similar.
14107 mingw*)
14108 # Test for the hypothetical native Windows locale name.
14109 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14110 gt_cv_locale_zh_CN=Chinese_China.54936
14111 else
14112 # None found.
14113 gt_cv_locale_zh_CN=none
14114 fi
14115 ;;
14116 solaris2.8)
14117 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
14118 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
14119 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
14120 gt_cv_locale_zh_CN=none
14121 ;;
14122 *)
14123 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
14124 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
14125 # configure script would override the LC_ALL setting. Likewise for
14126 # LC_CTYPE, which is also set at the beginning of the configure script.
14127 # Test for the locale name without encoding suffix.
14128 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14129 gt_cv_locale_zh_CN=zh_CN
14130 else
14131 # Test for the locale name with explicit encoding suffix.
14132 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14133 gt_cv_locale_zh_CN=zh_CN.GB18030
14134 else
14135 # None found.
14136 gt_cv_locale_zh_CN=none
14137 fi
14138 fi
14139 ;;
14140 esac
14141 else
14142 # If there was a link error, due to mblen(), the system is so old that
14143 # it certainly doesn't have a chinese locale.
14144 gt_cv_locale_zh_CN=none
14145 fi
14146 rm -fr conftest*
14147
14148 fi
14149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
14150 $as_echo "$gt_cv_locale_zh_CN" >&6; }
14151 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
14152
14153
14154
14155
14156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
14157 $as_echo_n "checking for a french Unicode locale... " >&6; }
14158 if ${gt_cv_locale_fr_utf8+:} false; then :
14159 $as_echo_n "(cached) " >&6
14160 else
14161
14162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14163 /* end confdefs.h. */
14164
14165 #include <locale.h>
14166 #include <time.h>
14167 #if HAVE_LANGINFO_CODESET
14168 # include <langinfo.h>
14169 #endif
14170 #include <stdlib.h>
14171 #include <string.h>
14172 struct tm t;
14173 char buf[16];
14174 int main () {
14175 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
14176 imitates locale dependent behaviour by looking at the environment
14177 variables, and all locales use the UTF-8 encoding. */
14178 #if !(defined __BEOS__ || defined __HAIKU__)
14179 /* Check whether the given locale name is recognized by the system. */
14180 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
14181 /* On native Windows, setlocale(category, "") looks at the system settings,
14182 not at the environment variables. Also, when an encoding suffix such
14183 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
14184 category of the locale to "C". */
14185 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
14186 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
14187 return 1;
14188 # else
14189 if (setlocale (LC_ALL, "") == NULL) return 1;
14190 # endif
14191 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
14192 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
14193 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
14194 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
14195 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
14196 some unit tests fail. */
14197 # if HAVE_LANGINFO_CODESET
14198 {
14199 const char *cs = nl_langinfo (CODESET);
14200 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
14201 return 1;
14202 }
14203 # endif
14204 # ifdef __CYGWIN__
14205 /* On Cygwin, avoid locale names without encoding suffix, because the
14206 locale_charset() function relies on the encoding suffix. Note that
14207 LC_ALL is set on the command line. */
14208 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
14209 # endif
14210 /* Check whether in the abbreviation of the second month, the second
14211 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
14212 two bytes long, with UTF-8 encoding. */
14213 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
14214 if (strftime (buf, sizeof (buf), "%b", &t) < 4
14215 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
14216 return 1;
14217 #endif
14218 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
14219 /* Check whether the decimal separator is a comma.
14220 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
14221 are nl_langinfo(RADIXCHAR) are both ".". */
14222 if (localeconv () ->decimal_point[0] != ',') return 1;
14223 #endif
14224 return 0;
14225 }
14226
14227 _ACEOF
14228 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14229 (eval $ac_link) 2>&5
14230 ac_status=$?
14231 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14232 test $ac_status = 0; } && test -s conftest$ac_exeext; then
14233 case "$host_os" in
14234 # Handle native Windows specially, because there setlocale() interprets
14235 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
14236 # "fr" or "fra" as "French" or "French_France.1252",
14237 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
14238 # "ja" as "Japanese" or "Japanese_Japan.932",
14239 # and similar.
14240 mingw*)
14241 # Test for the hypothetical native Windows locale name.
14242 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14243 gt_cv_locale_fr_utf8=French_France.65001
14244 else
14245 # None found.
14246 gt_cv_locale_fr_utf8=none
14247 fi
14248 ;;
14249 *)
14250 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
14251 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
14252 # configure script would override the LC_ALL setting. Likewise for
14253 # LC_CTYPE, which is also set at the beginning of the configure script.
14254 # Test for the usual locale name.
14255 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14256 gt_cv_locale_fr_utf8=fr_FR
14257 else
14258 # Test for the locale name with explicit encoding suffix.
14259 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14260 gt_cv_locale_fr_utf8=fr_FR.UTF-8
14261 else
14262 # Test for the Solaris 7 locale name.
14263 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14264 gt_cv_locale_fr_utf8=fr.UTF-8
14265 else
14266 # None found.
14267 gt_cv_locale_fr_utf8=none
14268 fi
14269 fi
14270 fi
14271 ;;
14272 esac
14273 fi
14274 rm -fr conftest*
14275
14276 fi
14277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
14278 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
14279 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
14280
14281
14282
14283
14284
14285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
14286 $as_echo_n "checking for a traditional french locale... " >&6; }
14287 if ${gt_cv_locale_fr+:} false; then :
14288 $as_echo_n "(cached) " >&6
14289 else
14290
14291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14292 /* end confdefs.h. */
14293
14294 #include <locale.h>
14295 #include <time.h>
14296 #if HAVE_LANGINFO_CODESET
14297 # include <langinfo.h>
14298 #endif
14299 #include <stdlib.h>
14300 #include <string.h>
14301 struct tm t;
14302 char buf[16];
14303 int main () {
14304 /* Check whether the given locale name is recognized by the system. */
14305 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
14306 /* On native Windows, setlocale(category, "") looks at the system settings,
14307 not at the environment variables. Also, when an encoding suffix such
14308 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
14309 category of the locale to "C". */
14310 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
14311 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
14312 return 1;
14313 #else
14314 if (setlocale (LC_ALL, "") == NULL) return 1;
14315 #endif
14316 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
14317 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
14318 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
14319 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
14320 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
14321 some unit tests fail.
14322 On MirBSD 10, when an unsupported locale is specified, setlocale()
14323 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
14324 #if HAVE_LANGINFO_CODESET
14325 {
14326 const char *cs = nl_langinfo (CODESET);
14327 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
14328 || strcmp (cs, "UTF-8") == 0)
14329 return 1;
14330 }
14331 #endif
14332 #ifdef __CYGWIN__
14333 /* On Cygwin, avoid locale names without encoding suffix, because the
14334 locale_charset() function relies on the encoding suffix. Note that
14335 LC_ALL is set on the command line. */
14336 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
14337 #endif
14338 /* Check whether in the abbreviation of the second month, the second
14339 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
14340 one byte long. This excludes the UTF-8 encoding. */
14341 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
14342 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
14343 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
14344 /* Check whether the decimal separator is a comma.
14345 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
14346 are nl_langinfo(RADIXCHAR) are both ".". */
14347 if (localeconv () ->decimal_point[0] != ',') return 1;
14348 #endif
14349 return 0;
14350 }
14351
14352 _ACEOF
14353 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14354 (eval $ac_link) 2>&5
14355 ac_status=$?
14356 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14357 test $ac_status = 0; } && test -s conftest$ac_exeext; then
14358 case "$host_os" in
14359 # Handle native Windows specially, because there setlocale() interprets
14360 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
14361 # "fr" or "fra" as "French" or "French_France.1252",
14362 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
14363 # "ja" as "Japanese" or "Japanese_Japan.932",
14364 # and similar.
14365 mingw*)
14366 # Test for the native Windows locale name.
14367 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14368 gt_cv_locale_fr=French_France.1252
14369 else
14370 # None found.
14371 gt_cv_locale_fr=none
14372 fi
14373 ;;
14374 *)
14375 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
14376 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
14377 # configure script would override the LC_ALL setting. Likewise for
14378 # LC_CTYPE, which is also set at the beginning of the configure script.
14379 # Test for the usual locale name.
14380 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14381 gt_cv_locale_fr=fr_FR
14382 else
14383 # Test for the locale name with explicit encoding suffix.
14384 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14385 gt_cv_locale_fr=fr_FR.ISO-8859-1
14386 else
14387 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
14388 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14389 gt_cv_locale_fr=fr_FR.ISO8859-1
14390 else
14391 # Test for the HP-UX locale name.
14392 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14393 gt_cv_locale_fr=fr_FR.iso88591
14394 else
14395 # Test for the Solaris 7 locale name.
14396 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14397 gt_cv_locale_fr=fr
14398 else
14399 # None found.
14400 gt_cv_locale_fr=none
14401 fi
14402 fi
14403 fi
14404 fi
14405 fi
14406 ;;
14407 esac
14408 fi
14409 rm -fr conftest*
14410
14411 fi
14412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
14413 $as_echo "$gt_cv_locale_fr" >&6; }
14414 LOCALE_FR=$gt_cv_locale_fr
14415
14416
14417
14418
14419
14420
14421
14422
14423
14424
14425
14426
14427
14428 GNULIB_FFSL=0;
14429 GNULIB_FFSLL=0;
14430 GNULIB_MEMCHR=0;
14431 GNULIB_MEMMEM=0;
14432 GNULIB_MEMPCPY=0;
14433 GNULIB_MEMRCHR=0;
14434 GNULIB_RAWMEMCHR=0;
14435 GNULIB_STPCPY=0;
14436 GNULIB_STPNCPY=0;
14437 GNULIB_STRCHRNUL=0;
14438 GNULIB_STRDUP=0;
14439 GNULIB_STRNCAT=0;
14440 GNULIB_STRNDUP=0;
14441 GNULIB_STRNLEN=0;
14442 GNULIB_STRPBRK=0;
14443 GNULIB_STRSEP=0;
14444 GNULIB_STRSTR=0;
14445 GNULIB_STRCASESTR=0;
14446 GNULIB_STRTOK_R=0;
14447 GNULIB_MBSLEN=0;
14448 GNULIB_MBSNLEN=0;
14449 GNULIB_MBSCHR=0;
14450 GNULIB_MBSRCHR=0;
14451 GNULIB_MBSSTR=0;
14452 GNULIB_MBSCASECMP=0;
14453 GNULIB_MBSNCASECMP=0;
14454 GNULIB_MBSPCASECMP=0;
14455 GNULIB_MBSCASESTR=0;
14456 GNULIB_MBSCSPN=0;
14457 GNULIB_MBSPBRK=0;
14458 GNULIB_MBSSPN=0;
14459 GNULIB_MBSSEP=0;
14460 GNULIB_MBSTOK_R=0;
14461 GNULIB_STRERROR=0;
14462 GNULIB_STRERROR_R=0;
14463 GNULIB_STRSIGNAL=0;
14464 GNULIB_STRVERSCMP=0;
14465 HAVE_MBSLEN=0;
14466 HAVE_FFSL=1;
14467 HAVE_FFSLL=1;
14468 HAVE_MEMCHR=1;
14469 HAVE_DECL_MEMMEM=1;
14470 HAVE_MEMPCPY=1;
14471 HAVE_DECL_MEMRCHR=1;
14472 HAVE_RAWMEMCHR=1;
14473 HAVE_STPCPY=1;
14474 HAVE_STPNCPY=1;
14475 HAVE_STRCHRNUL=1;
14476 HAVE_DECL_STRDUP=1;
14477 HAVE_DECL_STRNDUP=1;
14478 HAVE_DECL_STRNLEN=1;
14479 HAVE_STRPBRK=1;
14480 HAVE_STRSEP=1;
14481 HAVE_STRCASESTR=1;
14482 HAVE_DECL_STRTOK_R=1;
14483 HAVE_DECL_STRERROR_R=1;
14484 HAVE_DECL_STRSIGNAL=1;
14485 HAVE_STRVERSCMP=1;
14486 REPLACE_MEMCHR=0;
14487 REPLACE_MEMMEM=0;
14488 REPLACE_STPNCPY=0;
14489 REPLACE_STRDUP=0;
14490 REPLACE_STRSTR=0;
14491 REPLACE_STRCASESTR=0;
14492 REPLACE_STRCHRNUL=0;
14493 REPLACE_STRERROR=0;
14494 REPLACE_STRERROR_R=0;
14495 REPLACE_STRNCAT=0;
14496 REPLACE_STRNDUP=0;
14497 REPLACE_STRNLEN=0;
14498 REPLACE_STRSIGNAL=0;
14499 REPLACE_STRTOK_R=0;
14500 UNDEFINE_STRTOK_R=0;
14501
14502
14503
14504
14505
14506 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
14507 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
14508 # irrelevant for anonymous mappings.
14509 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
14510 if test "x$ac_cv_func_mmap" = xyes; then :
14511 gl_have_mmap=yes
14512 else
14513 gl_have_mmap=no
14514 fi
14515
14516
14517 # Try to allow MAP_ANONYMOUS.
14518 gl_have_mmap_anonymous=no
14519 if test $gl_have_mmap = yes; then
14520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
14521 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
14522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14523 /* end confdefs.h. */
14524
14525 #include <sys/mman.h>
14526 #ifdef MAP_ANONYMOUS
14527 I cannot identify this map
14528 #endif
14529
14530 _ACEOF
14531 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14532 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
14533 gl_have_mmap_anonymous=yes
14534 fi
14535 rm -f conftest*
14536
14537 if test $gl_have_mmap_anonymous != yes; then
14538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14539 /* end confdefs.h. */
14540
14541 #include <sys/mman.h>
14542 #ifdef MAP_ANON
14543 I cannot identify this map
14544 #endif
14545
14546 _ACEOF
14547 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14548 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
14549
14550 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
14551
14552 gl_have_mmap_anonymous=yes
14553 fi
14554 rm -f conftest*
14555
14556 fi
14557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
14558 $as_echo "$gl_have_mmap_anonymous" >&6; }
14559 if test $gl_have_mmap_anonymous = yes; then
14560
14561 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
14562
14563 fi
14564 fi
14565
14566
14567 :
14568
14569
14570
14571
14572
14573
14574 :
14575
14576
14577
14578
14579
14580
14581
14582
14583 if test $HAVE_MEMCHR = 1; then
14584 # Detect platform-specific bugs in some versions of glibc:
14585 # memchr should not dereference anything with length 0
14586 # http://bugzilla.redhat.com/499689
14587 # memchr should not dereference overestimated length after a match
14588 # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
14589 # http://sourceware.org/bugzilla/show_bug.cgi?id=10162
14590 # Assume that memchr works on platforms that lack mprotect.
14591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
14592 $as_echo_n "checking whether memchr works... " >&6; }
14593 if ${gl_cv_func_memchr_works+:} false; then :
14594 $as_echo_n "(cached) " >&6
14595 else
14596 if test "$cross_compiling" = yes; then :
14597 gl_cv_func_memchr_works="guessing no"
14598 else
14599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14600 /* end confdefs.h. */
14601
14602 #include <string.h>
14603 #if HAVE_SYS_MMAN_H
14604 # include <fcntl.h>
14605 # include <unistd.h>
14606 # include <sys/types.h>
14607 # include <sys/mman.h>
14608 # ifndef MAP_FILE
14609 # define MAP_FILE 0
14610 # endif
14611 #endif
14612
14613 int
14614 main ()
14615 {
14616
14617 int result = 0;
14618 char *fence = NULL;
14619 #if HAVE_SYS_MMAN_H && HAVE_MPROTECT
14620 # if HAVE_MAP_ANONYMOUS
14621 const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
14622 const int fd = -1;
14623 # else /* !HAVE_MAP_ANONYMOUS */
14624 const int flags = MAP_FILE | MAP_PRIVATE;
14625 int fd = open ("/dev/zero", O_RDONLY, 0666);
14626 if (fd >= 0)
14627 # endif
14628 {
14629 int pagesize = getpagesize ();
14630 char *two_pages =
14631 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
14632 flags, fd, 0);
14633 if (two_pages != (char *)(-1)
14634 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
14635 fence = two_pages + pagesize;
14636 }
14637 #endif
14638 if (fence)
14639 {
14640 if (memchr (fence, 0, 0))
14641 result |= 1;
14642 strcpy (fence - 9, "12345678");
14643 if (memchr (fence - 9, 0, 79) != fence - 1)
14644 result |= 2;
14645 if (memchr (fence - 1, 0, 3) != fence - 1)
14646 result |= 4;
14647 }
14648 return result;
14649
14650 ;
14651 return 0;
14652 }
14653 _ACEOF
14654 if ac_fn_c_try_run "$LINENO"; then :
14655 gl_cv_func_memchr_works=yes
14656 else
14657 gl_cv_func_memchr_works=no
14658 fi
14659 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14660 conftest.$ac_objext conftest.beam conftest.$ac_ext
14661 fi
14662
14663 fi
14664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
14665 $as_echo "$gl_cv_func_memchr_works" >&6; }
14666 if test "$gl_cv_func_memchr_works" != yes; then
14667 REPLACE_MEMCHR=1
14668 fi
14669 fi
14670
14671
14672 ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default"
14673 if test "x$ac_cv_have_decl_memmem" = xyes; then :
14674 ac_have_decl=1
14675 else
14676 ac_have_decl=0
14677 fi
14678
14679 cat >>confdefs.h <<_ACEOF
14680 #define HAVE_DECL_MEMMEM $ac_have_decl
14681 _ACEOF
14682
14683
14684
14685
14686
14687
14688 for ac_func in memmem
14689 do :
14690 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
14691 if test "x$ac_cv_func_memmem" = xyes; then :
14692 cat >>confdefs.h <<_ACEOF
14693 #define HAVE_MEMMEM 1
14694 _ACEOF
14695
14696 fi
14697 done
14698
14699 if test $ac_cv_func_memmem = yes; then
14700 HAVE_MEMMEM=1
14701 else
14702 HAVE_MEMMEM=0
14703 fi
14704
14705 :
14706
14707
14708
14709
14710
14711 if test $ac_cv_have_decl_memmem = no; then
14712 HAVE_DECL_MEMMEM=0
14713 else
14714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
14715 $as_echo_n "checking whether memmem works... " >&6; }
14716 if ${gl_cv_func_memmem_works_always+:} false; then :
14717 $as_echo_n "(cached) " >&6
14718 else
14719 if test "$cross_compiling" = yes; then :
14720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14721 /* end confdefs.h. */
14722
14723 #ifdef __GNU_LIBRARY__
14724 #include <features.h>
14725 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
14726 || __GLIBC_MINOR__ > 12)) \
14727 || (__GLIBC__ > 2)) \
14728 || defined __UCLIBC__
14729 Lucky user
14730 #endif
14731 #elif defined __CYGWIN__
14732 #include <cygwin/version.h>
14733 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
14734 Lucky user
14735 #endif
14736 #else
14737 Lucky user
14738 #endif
14739
14740 _ACEOF
14741 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14742 $EGREP "Lucky user" >/dev/null 2>&1; then :
14743 gl_cv_func_memmem_works_always="guessing yes"
14744 else
14745 gl_cv_func_memmem_works_always="guessing no"
14746 fi
14747 rm -f conftest*
14748
14749
14750 else
14751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14752 /* end confdefs.h. */
14753
14754 #include <string.h> /* for memmem */
14755 #define P "_EF_BF_BD"
14756 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
14757 #define NEEDLE P P P P P
14758
14759 int
14760 main ()
14761 {
14762
14763 int result = 0;
14764 if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
14765 result |= 1;
14766 /* Check for empty needle behavior. */
14767 {
14768 const char *haystack = "AAA";
14769 if (memmem (haystack, 3, NULL, 0) != haystack)
14770 result |= 2;
14771 }
14772 return result;
14773
14774 ;
14775 return 0;
14776 }
14777 _ACEOF
14778 if ac_fn_c_try_run "$LINENO"; then :
14779 gl_cv_func_memmem_works_always=yes
14780 else
14781 gl_cv_func_memmem_works_always=no
14782 fi
14783 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14784 conftest.$ac_objext conftest.beam conftest.$ac_ext
14785 fi
14786
14787
14788 fi
14789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
14790 $as_echo "$gl_cv_func_memmem_works_always" >&6; }
14791 case "$gl_cv_func_memmem_works_always" in
14792 *yes) ;;
14793 *)
14794 REPLACE_MEMMEM=1
14795 ;;
14796 esac
14797 fi
14798 :
14799
14800
14801 ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
14802 if test "x$ac_cv_have_decl_memrchr" = xyes; then :
14803 ac_have_decl=1
14804 else
14805 ac_have_decl=0
14806 fi
14807
14808 cat >>confdefs.h <<_ACEOF
14809 #define HAVE_DECL_MEMRCHR $ac_have_decl
14810 _ACEOF
14811
14812
14813
14814
14815
14816
14817
14818
14819
14820
14821
14822
14823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
14824 $as_echo_n "checking for promoted mode_t type... " >&6; }
14825 if ${gl_cv_promoted_mode_t+:} false; then :
14826 $as_echo_n "(cached) " >&6
14827 else
14828
14829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14830 /* end confdefs.h. */
14831 #include <sys/types.h>
14832 int
14833 main ()
14834 {
14835 typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
14836 ;
14837 return 0;
14838 }
14839 _ACEOF
14840 if ac_fn_c_try_compile "$LINENO"; then :
14841 gl_cv_promoted_mode_t='int'
14842 else
14843 gl_cv_promoted_mode_t='mode_t'
14844 fi
14845 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14846
14847 fi
14848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
14849 $as_echo "$gl_cv_promoted_mode_t" >&6; }
14850
14851 cat >>confdefs.h <<_ACEOF
14852 #define PROMOTED_MODE_T $gl_cv_promoted_mode_t
14853 _ACEOF
14854
14855
14856
14857
14858
14859
14860
14861
14862 GNULIB_DPRINTF=0;
14863 GNULIB_FCLOSE=0;
14864 GNULIB_FDOPEN=0;
14865 GNULIB_FFLUSH=0;
14866 GNULIB_FGETC=0;
14867 GNULIB_FGETS=0;
14868 GNULIB_FOPEN=0;
14869 GNULIB_FPRINTF=0;
14870 GNULIB_FPRINTF_POSIX=0;
14871 GNULIB_FPURGE=0;
14872 GNULIB_FPUTC=0;
14873 GNULIB_FPUTS=0;
14874 GNULIB_FREAD=0;
14875 GNULIB_FREOPEN=0;
14876 GNULIB_FSCANF=0;
14877 GNULIB_FSEEK=0;
14878 GNULIB_FSEEKO=0;
14879 GNULIB_FTELL=0;
14880 GNULIB_FTELLO=0;
14881 GNULIB_FWRITE=0;
14882 GNULIB_GETC=0;
14883 GNULIB_GETCHAR=0;
14884 GNULIB_GETDELIM=0;
14885 GNULIB_GETLINE=0;
14886 GNULIB_OBSTACK_PRINTF=0;
14887 GNULIB_OBSTACK_PRINTF_POSIX=0;
14888 GNULIB_PCLOSE=0;
14889 GNULIB_PERROR=0;
14890 GNULIB_POPEN=0;
14891 GNULIB_PRINTF=0;
14892 GNULIB_PRINTF_POSIX=0;
14893 GNULIB_PUTC=0;
14894 GNULIB_PUTCHAR=0;
14895 GNULIB_PUTS=0;
14896 GNULIB_REMOVE=0;
14897 GNULIB_RENAME=0;
14898 GNULIB_RENAMEAT=0;
14899 GNULIB_SCANF=0;
14900 GNULIB_SNPRINTF=0;
14901 GNULIB_SPRINTF_POSIX=0;
14902 GNULIB_STDIO_H_NONBLOCKING=0;
14903 GNULIB_STDIO_H_SIGPIPE=0;
14904 GNULIB_TMPFILE=0;
14905 GNULIB_VASPRINTF=0;
14906 GNULIB_VFSCANF=0;
14907 GNULIB_VSCANF=0;
14908 GNULIB_VDPRINTF=0;
14909 GNULIB_VFPRINTF=0;
14910 GNULIB_VFPRINTF_POSIX=0;
14911 GNULIB_VPRINTF=0;
14912 GNULIB_VPRINTF_POSIX=0;
14913 GNULIB_VSNPRINTF=0;
14914 GNULIB_VSPRINTF_POSIX=0;
14915 HAVE_DECL_FPURGE=1;
14916 HAVE_DECL_FSEEKO=1;
14917 HAVE_DECL_FTELLO=1;
14918 HAVE_DECL_GETDELIM=1;
14919 HAVE_DECL_GETLINE=1;
14920 HAVE_DECL_OBSTACK_PRINTF=1;
14921 HAVE_DECL_SNPRINTF=1;
14922 HAVE_DECL_VSNPRINTF=1;
14923 HAVE_DPRINTF=1;
14924 HAVE_FSEEKO=1;
14925 HAVE_FTELLO=1;
14926 HAVE_PCLOSE=1;
14927 HAVE_POPEN=1;
14928 HAVE_RENAMEAT=1;
14929 HAVE_VASPRINTF=1;
14930 HAVE_VDPRINTF=1;
14931 REPLACE_DPRINTF=0;
14932 REPLACE_FCLOSE=0;
14933 REPLACE_FDOPEN=0;
14934 REPLACE_FFLUSH=0;
14935 REPLACE_FOPEN=0;
14936 REPLACE_FPRINTF=0;
14937 REPLACE_FPURGE=0;
14938 REPLACE_FREOPEN=0;
14939 REPLACE_FSEEK=0;
14940 REPLACE_FSEEKO=0;
14941 REPLACE_FTELL=0;
14942 REPLACE_FTELLO=0;
14943 REPLACE_GETDELIM=0;
14944 REPLACE_GETLINE=0;
14945 REPLACE_OBSTACK_PRINTF=0;
14946 REPLACE_PERROR=0;
14947 REPLACE_POPEN=0;
14948 REPLACE_PRINTF=0;
14949 REPLACE_REMOVE=0;
14950 REPLACE_RENAME=0;
14951 REPLACE_RENAMEAT=0;
14952 REPLACE_SNPRINTF=0;
14953 REPLACE_SPRINTF=0;
14954 REPLACE_STDIO_READ_FUNCS=0;
14955 REPLACE_STDIO_WRITE_FUNCS=0;
14956 REPLACE_TMPFILE=0;
14957 REPLACE_VASPRINTF=0;
14958 REPLACE_VDPRINTF=0;
14959 REPLACE_VFPRINTF=0;
14960 REPLACE_VPRINTF=0;
14961 REPLACE_VSNPRINTF=0;
14962 REPLACE_VSPRINTF=0;
14963
14964
14965
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 ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default"
14996 if test "x$ac_cv_have_decl_setenv" = xyes; then :
14997 ac_have_decl=1
14998 else
14999 ac_have_decl=0
15000 fi
15001
15002 cat >>confdefs.h <<_ACEOF
15003 #define HAVE_DECL_SETENV $ac_have_decl
15004 _ACEOF
15005
15006
15007
15008
15009
15010
15011
15012
15013
15014
15015 :
15016
15017
15018
15019
15020
15021 if test $ac_cv_have_decl_setenv = no; then
15022 HAVE_DECL_SETENV=0
15023 fi
15024
15025 :
15026
15027
15028
15029
15030
15031
15032
15033
15034
15035 :
15036
15037
15038
15039
15040
15041 for ac_header in search.h
15042 do :
15043 ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
15044 if test "x$ac_cv_header_search_h" = xyes; then :
15045 cat >>confdefs.h <<_ACEOF
15046 #define HAVE_SEARCH_H 1
15047 _ACEOF
15048
15049 fi
15050
15051 done
15052
15053 for ac_func in tsearch
15054 do :
15055 ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
15056 if test "x$ac_cv_func_tsearch" = xyes; then :
15057 cat >>confdefs.h <<_ACEOF
15058 #define HAVE_TSEARCH 1
15059 _ACEOF
15060
15061 fi
15062 done
15063
15064
15065
15066
15067 GNULIB_PTHREAD_SIGMASK=0;
15068 GNULIB_RAISE=0;
15069 GNULIB_SIGNAL_H_SIGPIPE=0;
15070 GNULIB_SIGPROCMASK=0;
15071 GNULIB_SIGACTION=0;
15072 HAVE_POSIX_SIGNALBLOCKING=1;
15073 HAVE_PTHREAD_SIGMASK=1;
15074 HAVE_RAISE=1;
15075 HAVE_SIGSET_T=1;
15076 HAVE_SIGINFO_T=1;
15077 HAVE_SIGACTION=1;
15078 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
15079
15080 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
15081
15082 HAVE_SIGHANDLER_T=1;
15083 REPLACE_PTHREAD_SIGMASK=0;
15084 REPLACE_RAISE=0;
15085
15086
15087 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
15088 #include <signal.h>
15089 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
15090 #include <sys/types.h>
15091
15092 "
15093 if test "x$ac_cv_type_sigset_t" = xyes; then :
15094
15095 cat >>confdefs.h <<_ACEOF
15096 #define HAVE_SIGSET_T 1
15097 _ACEOF
15098
15099 gl_cv_type_sigset_t=yes
15100 else
15101 gl_cv_type_sigset_t=no
15102 fi
15103
15104 if test $gl_cv_type_sigset_t != yes; then
15105 HAVE_SIGSET_T=0
15106 fi
15107
15108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
15109 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
15110 if ${ac_cv_type_uid_t+:} false; then :
15111 $as_echo_n "(cached) " >&6
15112 else
15113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15114 /* end confdefs.h. */
15115 #include <sys/types.h>
15116
15117 _ACEOF
15118 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15119 $EGREP "uid_t" >/dev/null 2>&1; then :
15120 ac_cv_type_uid_t=yes
15121 else
15122 ac_cv_type_uid_t=no
15123 fi
15124 rm -f conftest*
15125
15126 fi
15127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
15128 $as_echo "$ac_cv_type_uid_t" >&6; }
15129 if test $ac_cv_type_uid_t = no; then
15130
15131 $as_echo "#define uid_t int" >>confdefs.h
15132
15133
15134 $as_echo "#define gid_t int" >>confdefs.h
15135
15136 fi
15137
15138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
15139 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
15140 if ${ac_cv_header_stdbool_h+:} false; then :
15141 $as_echo_n "(cached) " >&6
15142 else
15143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15144 /* end confdefs.h. */
15145
15146 #include <stdbool.h>
15147
15148 #ifdef __cplusplus
15149 typedef bool Bool;
15150 #else
15151 typedef _Bool Bool;
15152 #ifndef bool
15153 "error: bool is not defined"
15154 #endif
15155 #ifndef false
15156 "error: false is not defined"
15157 #endif
15158 #if false
15159 "error: false is not 0"
15160 #endif
15161 #ifndef true
15162 "error: true is not defined"
15163 #endif
15164 #if true != 1
15165 "error: true is not 1"
15166 #endif
15167 #endif
15168
15169 #ifndef __bool_true_false_are_defined
15170 "error: __bool_true_false_are_defined is not defined"
15171 #endif
15172
15173 struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
15174
15175 char a[true == 1 ? 1 : -1];
15176 char b[false == 0 ? 1 : -1];
15177 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
15178 char d[(bool) 0.5 == true ? 1 : -1];
15179 /* See body of main program for 'e'. */
15180 char f[(Bool) 0.0 == false ? 1 : -1];
15181 char g[true];
15182 char h[sizeof (Bool)];
15183 char i[sizeof s.t];
15184 enum { j = false, k = true, l = false * true, m = true * 256 };
15185 /* The following fails for
15186 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
15187 Bool n[m];
15188 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
15189 char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
15190 /* Catch a bug in an HP-UX C compiler. See
15191 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
15192 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
15193 */
15194 Bool q = true;
15195 Bool *pq = &q;
15196 bool *qq = &q;
15197
15198 int
15199 main ()
15200 {
15201
15202 bool e = &s;
15203 *pq |= q; *pq |= ! q;
15204 *qq |= q; *qq |= ! q;
15205 /* Refer to every declared value, to avoid compiler optimizations. */
15206 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
15207 + !m + !n + !o + !p + !q + !pq + !qq);
15208
15209 ;
15210 return 0;
15211 }
15212 _ACEOF
15213 if ac_fn_c_try_compile "$LINENO"; then :
15214 ac_cv_header_stdbool_h=yes
15215 else
15216 ac_cv_header_stdbool_h=no
15217 fi
15218 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15219 fi
15220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
15221 $as_echo "$ac_cv_header_stdbool_h" >&6; }
15222 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
15223 if test "x$ac_cv_type__Bool" = xyes; then :
15224
15225 cat >>confdefs.h <<_ACEOF
15226 #define HAVE__BOOL 1
15227 _ACEOF
15228
15229
15230 fi
15231
15232
15233
15234 REPLACE_NULL=0;
15235 HAVE_MAX_ALIGN_T=1;
15236 HAVE_WCHAR_T=1;
15237
15238
15239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
15240 $as_echo_n "checking for wchar_t... " >&6; }
15241 if ${gt_cv_c_wchar_t+:} false; then :
15242 $as_echo_n "(cached) " >&6
15243 else
15244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15245 /* end confdefs.h. */
15246 #include <stddef.h>
15247 wchar_t foo = (wchar_t)'\0';
15248 int
15249 main ()
15250 {
15251
15252 ;
15253 return 0;
15254 }
15255 _ACEOF
15256 if ac_fn_c_try_compile "$LINENO"; then :
15257 gt_cv_c_wchar_t=yes
15258 else
15259 gt_cv_c_wchar_t=no
15260 fi
15261 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15262 fi
15263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
15264 $as_echo "$gt_cv_c_wchar_t" >&6; }
15265 if test $gt_cv_c_wchar_t = yes; then
15266
15267 $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
15268
15269 fi
15270
15271
15272
15273
15274
15275
15276
15277 ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
15278 if test "x$ac_cv_have_decl_strdup" = xyes; then :
15279 ac_have_decl=1
15280 else
15281 ac_have_decl=0
15282 fi
15283
15284 cat >>confdefs.h <<_ACEOF
15285 #define HAVE_DECL_STRDUP $ac_have_decl
15286 _ACEOF
15287
15288
15289
15290 REPLACE_STRERROR_0=0
15291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
15292 $as_echo_n "checking whether strerror(0) succeeds... " >&6; }
15293 if ${gl_cv_func_strerror_0_works+:} false; then :
15294 $as_echo_n "(cached) " >&6
15295 else
15296 if test "$cross_compiling" = yes; then :
15297 case "$host_os" in
15298 # Guess yes on glibc systems.
15299 *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
15300 # If we don't know, assume the worst.
15301 *) gl_cv_func_strerror_0_works="guessing no" ;;
15302 esac
15303
15304 else
15305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15306 /* end confdefs.h. */
15307 #include <string.h>
15308 #include <errno.h>
15309
15310 int
15311 main ()
15312 {
15313 int result = 0;
15314 char *str;
15315 errno = 0;
15316 str = strerror (0);
15317 if (!*str) result |= 1;
15318 if (errno) result |= 2;
15319 if (strstr (str, "nknown") || strstr (str, "ndefined"))
15320 result |= 4;
15321 return result;
15322 ;
15323 return 0;
15324 }
15325 _ACEOF
15326 if ac_fn_c_try_run "$LINENO"; then :
15327 gl_cv_func_strerror_0_works=yes
15328 else
15329 gl_cv_func_strerror_0_works=no
15330 fi
15331 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15332 conftest.$ac_objext conftest.beam conftest.$ac_ext
15333 fi
15334
15335
15336 fi
15337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
15338 $as_echo "$gl_cv_func_strerror_0_works" >&6; }
15339 case "$gl_cv_func_strerror_0_works" in
15340 *yes) ;;
15341 *)
15342 REPLACE_STRERROR_0=1
15343
15344 $as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h
15345
15346 ;;
15347 esac
15348
15349
15350
15351
15352
15353
15354
15355
15356
15357
15358 ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
15359 if test "x$ac_cv_func_strerror_r" = xyes; then :
15360
15361 fi
15362
15363 if test $ac_cv_func_strerror_r = yes; then
15364 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
15365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strerror_r with POSIX signature" >&5
15366 $as_echo_n "checking for strerror_r with POSIX signature... " >&6; }
15367 if ${gl_cv_func_strerror_r_posix_signature+:} false; then :
15368 $as_echo_n "(cached) " >&6
15369 else
15370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15371 /* end confdefs.h. */
15372 #include <string.h>
15373 int strerror_r (int, char *, size_t);
15374
15375 int
15376 main ()
15377 {
15378
15379 ;
15380 return 0;
15381 }
15382 _ACEOF
15383 if ac_fn_c_try_compile "$LINENO"; then :
15384 gl_cv_func_strerror_r_posix_signature=yes
15385 else
15386 gl_cv_func_strerror_r_posix_signature=no
15387 fi
15388 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15389
15390 fi
15391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_posix_signature" >&5
15392 $as_echo "$gl_cv_func_strerror_r_posix_signature" >&6; }
15393 if test $gl_cv_func_strerror_r_posix_signature = yes; then
15394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r works" >&5
15395 $as_echo_n "checking whether strerror_r works... " >&6; }
15396 if ${gl_cv_func_strerror_r_works+:} false; then :
15397 $as_echo_n "(cached) " >&6
15398 else
15399 if test "$cross_compiling" = yes; then :
15400
15401 case "$host_os" in
15402 # Guess no on AIX.
15403 aix*) gl_cv_func_strerror_r_works="guessing no";;
15404 # Guess no on HP-UX.
15405 hpux*) gl_cv_func_strerror_r_works="guessing no";;
15406 # Guess no on BSD variants.
15407 *bsd*) gl_cv_func_strerror_r_works="guessing no";;
15408 # Guess yes otherwise.
15409 *) gl_cv_func_strerror_r_works="guessing yes";;
15410 esac
15411
15412 else
15413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15414 /* end confdefs.h. */
15415 #include <errno.h>
15416 #include <string.h>
15417
15418 int
15419 main ()
15420 {
15421 int result = 0;
15422 char buf[79];
15423 if (strerror_r (EACCES, buf, 0) < 0)
15424 result |= 1;
15425 errno = 0;
15426 if (strerror_r (EACCES, buf, sizeof buf) != 0)
15427 result |= 2;
15428 strcpy (buf, "Unknown");
15429 if (strerror_r (0, buf, sizeof buf) != 0)
15430 result |= 4;
15431 if (errno)
15432 result |= 8;
15433 if (strstr (buf, "nknown") || strstr (buf, "ndefined"))
15434 result |= 0x10;
15435 errno = 0;
15436 *buf = 0;
15437 if (strerror_r (-3, buf, sizeof buf) < 0)
15438 result |= 0x20;
15439 if (errno)
15440 result |= 0x40;
15441 if (!*buf)
15442 result |= 0x80;
15443 return result;
15444
15445 ;
15446 return 0;
15447 }
15448 _ACEOF
15449 if ac_fn_c_try_run "$LINENO"; then :
15450 gl_cv_func_strerror_r_works=yes
15451 else
15452 gl_cv_func_strerror_r_works=no
15453 fi
15454 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15455 conftest.$ac_objext conftest.beam conftest.$ac_ext
15456 fi
15457
15458
15459 fi
15460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
15461 $as_echo "$gl_cv_func_strerror_r_works" >&6; }
15462 else
15463
15464 :
15465
15466
15467
15468
15469
15470 if test $ac_cv_func___xpg_strerror_r = yes; then
15471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __xpg_strerror_r works" >&5
15472 $as_echo_n "checking whether __xpg_strerror_r works... " >&6; }
15473 if ${gl_cv_func_strerror_r_works+:} false; then :
15474 $as_echo_n "(cached) " >&6
15475 else
15476 if test "$cross_compiling" = yes; then :
15477 gl_cv_func_strerror_r_works="guessing no"
15478
15479 else
15480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15481 /* end confdefs.h. */
15482 #include <errno.h>
15483 #include <string.h>
15484 extern
15485 #ifdef __cplusplus
15486 "C"
15487 #endif
15488 int __xpg_strerror_r(int, char *, size_t);
15489
15490 int
15491 main ()
15492 {
15493 int result = 0;
15494 char buf[256] = "^";
15495 char copy[256];
15496 char *str = strerror (-1);
15497 strcpy (copy, str);
15498 if (__xpg_strerror_r (-2, buf, 1) == 0)
15499 result |= 1;
15500 if (*buf)
15501 result |= 2;
15502 __xpg_strerror_r (-2, buf, 256);
15503 if (strcmp (str, copy))
15504 result |= 4;
15505 return result;
15506
15507 ;
15508 return 0;
15509 }
15510 _ACEOF
15511 if ac_fn_c_try_run "$LINENO"; then :
15512 gl_cv_func_strerror_r_works=yes
15513 else
15514 gl_cv_func_strerror_r_works=no
15515 fi
15516 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15517 conftest.$ac_objext conftest.beam conftest.$ac_ext
15518 fi
15519
15520
15521 fi
15522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
15523 $as_echo "$gl_cv_func_strerror_r_works" >&6; }
15524 fi
15525 fi
15526 fi
15527 fi
15528
15529
15530
15531
15532
15533
15534
15535
15536
15537
15538
15539
15540
15541
15542
15543
15544
15545
15546
15547
15548
15549
15550 if test $gl_cv_have_include_next = yes; then
15551 gl_cv_next_string_h='<'string.h'>'
15552 else
15553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
15554 $as_echo_n "checking absolute name of <string.h>... " >&6; }
15555 if ${gl_cv_next_string_h+:} false; then :
15556 $as_echo_n "(cached) " >&6
15557 else
15558
15559
15560
15561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15562 /* end confdefs.h. */
15563 #include <string.h>
15564 _ACEOF
15565 case "$host_os" in
15566 aix*) gl_absname_cpp="$ac_cpp -C" ;;
15567 *) gl_absname_cpp="$ac_cpp" ;;
15568 esac
15569
15570 case "$host_os" in
15571 mingw*)
15572 gl_dirsep_regex='[/\\]'
15573 ;;
15574 *)
15575 gl_dirsep_regex='\/'
15576 ;;
15577 esac
15578 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15579 gl_header_literal_regex=`echo 'string.h' \
15580 | sed -e "$gl_make_literal_regex_sed"`
15581 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15582 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15583 s|^/[^/]|//&|
15584 p
15585 q
15586 }'
15587
15588 gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15589 sed -n "$gl_absolute_header_sed"`
15590
15591 gl_header=$gl_cv_absolute_string_h
15592 gl_cv_next_string_h='"'$gl_header'"'
15593
15594
15595 fi
15596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
15597 $as_echo "$gl_cv_next_string_h" >&6; }
15598 fi
15599 NEXT_STRING_H=$gl_cv_next_string_h
15600
15601 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15602 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15603 gl_next_as_first_directive='<'string.h'>'
15604 else
15605 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15606 gl_next_as_first_directive=$gl_cv_next_string_h
15607 fi
15608 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
15609
15610
15611
15612
15613
15614
15615 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
15616 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
15617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
15618 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
15619 if eval \${$as_gl_Symbol+:} false; then :
15620 $as_echo_n "(cached) " >&6
15621 else
15622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15623 /* end confdefs.h. */
15624 #include <string.h>
15625
15626 int
15627 main ()
15628 {
15629 #undef $gl_func
15630 (void) $gl_func;
15631 ;
15632 return 0;
15633 }
15634 _ACEOF
15635 if ac_fn_c_try_compile "$LINENO"; then :
15636 eval "$as_gl_Symbol=yes"
15637 else
15638 eval "$as_gl_Symbol=no"
15639 fi
15640 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15641 fi
15642 eval ac_res=\$$as_gl_Symbol
15643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15644 $as_echo "$ac_res" >&6; }
15645 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
15646 cat >>confdefs.h <<_ACEOF
15647 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
15648 _ACEOF
15649
15650 eval ac_cv_have_decl_$gl_func=yes
15651 fi
15652 done
15653
15654
15655
15656
15657
15658 if test "$gl_cv_func_memchr_works" != yes; then
15659 REPLACE_STRSTR=1
15660 else
15661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
15662 $as_echo_n "checking whether strstr works... " >&6; }
15663 if ${gl_cv_func_strstr_works_always+:} false; then :
15664 $as_echo_n "(cached) " >&6
15665 else
15666 if test "$cross_compiling" = yes; then :
15667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15668 /* end confdefs.h. */
15669
15670 #ifdef __GNU_LIBRARY__
15671 #include <features.h>
15672 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
15673 || defined __UCLIBC__
15674 Lucky user
15675 #endif
15676 #elif defined __CYGWIN__
15677 #include <cygwin/version.h>
15678 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
15679 Lucky user
15680 #endif
15681 #else
15682 Lucky user
15683 #endif
15684
15685 _ACEOF
15686 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15687 $EGREP "Lucky user" >/dev/null 2>&1; then :
15688 gl_cv_func_strstr_works_always="guessing yes"
15689 else
15690 gl_cv_func_strstr_works_always="guessing no"
15691 fi
15692 rm -f conftest*
15693
15694
15695 else
15696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15697 /* end confdefs.h. */
15698
15699 #include <string.h> /* for strstr */
15700 #define P "_EF_BF_BD"
15701 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
15702 #define NEEDLE P P P P P
15703
15704 int
15705 main ()
15706 {
15707 return !!strstr (HAYSTACK, NEEDLE);
15708
15709 ;
15710 return 0;
15711 }
15712 _ACEOF
15713 if ac_fn_c_try_run "$LINENO"; then :
15714 gl_cv_func_strstr_works_always=yes
15715 else
15716 gl_cv_func_strstr_works_always=no
15717 fi
15718 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15719 conftest.$ac_objext conftest.beam conftest.$ac_ext
15720 fi
15721
15722
15723 fi
15724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
15725 $as_echo "$gl_cv_func_strstr_works_always" >&6; }
15726 case "$gl_cv_func_strstr_works_always" in
15727 *yes) ;;
15728 *)
15729 REPLACE_STRSTR=1
15730 ;;
15731 esac
15732 fi
15733
15734
15735 ac_fn_c_check_decl "$LINENO" "strtok_r" "ac_cv_have_decl_strtok_r" "$ac_includes_default"
15736 if test "x$ac_cv_have_decl_strtok_r" = xyes; then :
15737 ac_have_decl=1
15738 else
15739 ac_have_decl=0
15740 fi
15741
15742 cat >>confdefs.h <<_ACEOF
15743 #define HAVE_DECL_STRTOK_R $ac_have_decl
15744 _ACEOF
15745
15746
15747
15748
15749
15750
15751
15752
15753
15754
15755
15756
15757
15758
15759
15760
15761
15762
15763
15764
15765 if test $gl_cv_have_include_next = yes; then
15766 gl_cv_next_sys_types_h='<'sys/types.h'>'
15767 else
15768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
15769 $as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
15770 if ${gl_cv_next_sys_types_h+:} false; then :
15771 $as_echo_n "(cached) " >&6
15772 else
15773
15774
15775
15776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15777 /* end confdefs.h. */
15778 #include <sys/types.h>
15779 _ACEOF
15780 case "$host_os" in
15781 aix*) gl_absname_cpp="$ac_cpp -C" ;;
15782 *) gl_absname_cpp="$ac_cpp" ;;
15783 esac
15784
15785 case "$host_os" in
15786 mingw*)
15787 gl_dirsep_regex='[/\\]'
15788 ;;
15789 *)
15790 gl_dirsep_regex='\/'
15791 ;;
15792 esac
15793 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15794 gl_header_literal_regex=`echo 'sys/types.h' \
15795 | sed -e "$gl_make_literal_regex_sed"`
15796 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15797 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15798 s|^/[^/]|//&|
15799 p
15800 q
15801 }'
15802
15803 gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15804 sed -n "$gl_absolute_header_sed"`
15805
15806 gl_header=$gl_cv_absolute_sys_types_h
15807 gl_cv_next_sys_types_h='"'$gl_header'"'
15808
15809
15810 fi
15811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
15812 $as_echo "$gl_cv_next_sys_types_h" >&6; }
15813 fi
15814 NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
15815
15816 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15817 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15818 gl_next_as_first_directive='<'sys/types.h'>'
15819 else
15820 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15821 gl_next_as_first_directive=$gl_cv_next_sys_types_h
15822 fi
15823 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
15824
15825
15826
15827
15828
15829
15830
15831
15832
15833
15834
15835
15836
15837
15838
15839
15840
15841
15842
15843 GNULIB_MKTIME=0;
15844 GNULIB_NANOSLEEP=0;
15845 GNULIB_STRPTIME=0;
15846 GNULIB_TIMEGM=0;
15847 GNULIB_TIME_R=0;
15848 GNULIB_TIME_RZ=0;
15849 HAVE_DECL_LOCALTIME_R=1;
15850 HAVE_NANOSLEEP=1;
15851 HAVE_STRPTIME=1;
15852 HAVE_TIMEGM=1;
15853 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
15854 REPLACE_MKTIME=GNULIB_PORTCHECK;
15855 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
15856 REPLACE_TIMEGM=GNULIB_PORTCHECK;
15857
15858 : ${GNULIB_GETTIMEOFDAY=0};
15859 REPLACE_GMTIME=0;
15860 REPLACE_LOCALTIME=0;
15861
15862
15863
15864 :
15865
15866
15867
15868
15869
15870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
15871 $as_echo_n "checking for struct timespec in <time.h>... " >&6; }
15872 if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then :
15873 $as_echo_n "(cached) " >&6
15874 else
15875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15876 /* end confdefs.h. */
15877 #include <time.h>
15878
15879 int
15880 main ()
15881 {
15882 static struct timespec x; x.tv_sec = x.tv_nsec;
15883 ;
15884 return 0;
15885 }
15886 _ACEOF
15887 if ac_fn_c_try_compile "$LINENO"; then :
15888 gl_cv_sys_struct_timespec_in_time_h=yes
15889 else
15890 gl_cv_sys_struct_timespec_in_time_h=no
15891 fi
15892 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15893 fi
15894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
15895 $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
15896
15897 TIME_H_DEFINES_STRUCT_TIMESPEC=0
15898 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
15899 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
15900 UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
15901 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
15902 TIME_H_DEFINES_STRUCT_TIMESPEC=1
15903 else
15904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
15905 $as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
15906 if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then :
15907 $as_echo_n "(cached) " >&6
15908 else
15909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15910 /* end confdefs.h. */
15911 #include <sys/time.h>
15912
15913 int
15914 main ()
15915 {
15916 static struct timespec x; x.tv_sec = x.tv_nsec;
15917 ;
15918 return 0;
15919 }
15920 _ACEOF
15921 if ac_fn_c_try_compile "$LINENO"; then :
15922 gl_cv_sys_struct_timespec_in_sys_time_h=yes
15923 else
15924 gl_cv_sys_struct_timespec_in_sys_time_h=no
15925 fi
15926 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15927 fi
15928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
15929 $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
15930 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
15931 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
15932 else
15933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
15934 $as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
15935 if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then :
15936 $as_echo_n "(cached) " >&6
15937 else
15938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15939 /* end confdefs.h. */
15940 #include <pthread.h>
15941
15942 int
15943 main ()
15944 {
15945 static struct timespec x; x.tv_sec = x.tv_nsec;
15946 ;
15947 return 0;
15948 }
15949 _ACEOF
15950 if ac_fn_c_try_compile "$LINENO"; then :
15951 gl_cv_sys_struct_timespec_in_pthread_h=yes
15952 else
15953 gl_cv_sys_struct_timespec_in_pthread_h=no
15954 fi
15955 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15956 fi
15957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
15958 $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
15959 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
15960 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
15961 else
15962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
15963 $as_echo_n "checking for struct timespec in <unistd.h>... " >&6; }
15964 if ${gl_cv_sys_struct_timespec_in_unistd_h+:} false; then :
15965 $as_echo_n "(cached) " >&6
15966 else
15967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15968 /* end confdefs.h. */
15969 #include <unistd.h>
15970
15971 int
15972 main ()
15973 {
15974 static struct timespec x; x.tv_sec = x.tv_nsec;
15975 ;
15976 return 0;
15977 }
15978 _ACEOF
15979 if ac_fn_c_try_compile "$LINENO"; then :
15980 gl_cv_sys_struct_timespec_in_unistd_h=yes
15981 else
15982 gl_cv_sys_struct_timespec_in_unistd_h=no
15983 fi
15984 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15985 fi
15986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5
15987 $as_echo "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
15988 if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
15989 UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
15990 fi
15991 fi
15992 fi
15993 fi
15994
15995
15996
15997
15998
15999
16000
16001
16002
16003
16004
16005
16006
16007
16008
16009
16010 if test $gl_cv_have_include_next = yes; then
16011 gl_cv_next_time_h='<'time.h'>'
16012 else
16013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
16014 $as_echo_n "checking absolute name of <time.h>... " >&6; }
16015 if ${gl_cv_next_time_h+:} false; then :
16016 $as_echo_n "(cached) " >&6
16017 else
16018
16019
16020
16021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16022 /* end confdefs.h. */
16023 #include <time.h>
16024 _ACEOF
16025 case "$host_os" in
16026 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16027 *) gl_absname_cpp="$ac_cpp" ;;
16028 esac
16029
16030 case "$host_os" in
16031 mingw*)
16032 gl_dirsep_regex='[/\\]'
16033 ;;
16034 *)
16035 gl_dirsep_regex='\/'
16036 ;;
16037 esac
16038 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16039 gl_header_literal_regex=`echo 'time.h' \
16040 | sed -e "$gl_make_literal_regex_sed"`
16041 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16042 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16043 s|^/[^/]|//&|
16044 p
16045 q
16046 }'
16047
16048 gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16049 sed -n "$gl_absolute_header_sed"`
16050
16051 gl_header=$gl_cv_absolute_time_h
16052 gl_cv_next_time_h='"'$gl_header'"'
16053
16054
16055 fi
16056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
16057 $as_echo "$gl_cv_next_time_h" >&6; }
16058 fi
16059 NEXT_TIME_H=$gl_cv_next_time_h
16060
16061 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16062 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16063 gl_next_as_first_directive='<'time.h'>'
16064 else
16065 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
16066 gl_next_as_first_directive=$gl_cv_next_time_h
16067 fi
16068 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
16069
16070
16071
16072
16073
16074
16075
16076
16077
16078
16079
16080
16081
16082
16083
16084
16085
16086 ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
16087 if test "x$ac_cv_have_decl_unsetenv" = xyes; then :
16088 ac_have_decl=1
16089 else
16090 ac_have_decl=0
16091 fi
16092
16093 cat >>confdefs.h <<_ACEOF
16094 #define HAVE_DECL_UNSETENV $ac_have_decl
16095 _ACEOF
16096
16097
16098
16099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
16100 $as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
16101 if ${gl_cv_header_wchar_h_correct_inline+:} false; then :
16102 $as_echo_n "(cached) " >&6
16103 else
16104 gl_cv_header_wchar_h_correct_inline=yes
16105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16106 /* end confdefs.h. */
16107
16108 #define wcstod renamed_wcstod
16109 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
16110 <wchar.h>.
16111 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16112 included before <wchar.h>. */
16113 #include <stddef.h>
16114 #include <stdio.h>
16115 #include <time.h>
16116 #include <wchar.h>
16117 extern int zero (void);
16118 int main () { return zero(); }
16119
16120 _ACEOF
16121 save_ac_compile="$ac_compile"
16122 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
16123 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
16124 (eval $ac_compile) 2>&5
16125 ac_status=$?
16126 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16127 test $ac_status = 0; }; then
16128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16129 /* end confdefs.h. */
16130
16131 #define wcstod renamed_wcstod
16132 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
16133 <wchar.h>.
16134 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16135 included before <wchar.h>. */
16136 #include <stddef.h>
16137 #include <stdio.h>
16138 #include <time.h>
16139 #include <wchar.h>
16140 int zero (void) { return 0; }
16141
16142 _ACEOF
16143 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
16144 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
16145 (eval $ac_compile) 2>&5
16146 ac_status=$?
16147 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16148 test $ac_status = 0; }; then
16149 if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
16150 :
16151 else
16152 gl_cv_header_wchar_h_correct_inline=no
16153 fi
16154 fi
16155 fi
16156 ac_compile="$save_ac_compile"
16157 rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
16158
16159 fi
16160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
16161 $as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
16162 if test $gl_cv_header_wchar_h_correct_inline = no; then
16163 as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
16164 This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
16165 C99 mode. You have four options:
16166 - Add the flag -fgnu89-inline to CC and reconfigure, or
16167 - Fix your include files, using parts of
16168 <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
16169 - Use a gcc version older than 4.3, or
16170 - Don't use the flags -std=c99 or -std=gnu99.
16171 Configuration aborted." "$LINENO" 5
16172 fi
16173
16174
16175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
16176 $as_echo_n "checking for wint_t... " >&6; }
16177 if ${gt_cv_c_wint_t+:} false; then :
16178 $as_echo_n "(cached) " >&6
16179 else
16180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16181 /* end confdefs.h. */
16182
16183 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
16184 <wchar.h>.
16185 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
16186 before <wchar.h>. */
16187 #include <stddef.h>
16188 #include <stdio.h>
16189 #include <time.h>
16190 #include <wchar.h>
16191 wint_t foo = (wchar_t)'\0';
16192 int
16193 main ()
16194 {
16195
16196 ;
16197 return 0;
16198 }
16199 _ACEOF
16200 if ac_fn_c_try_compile "$LINENO"; then :
16201 gt_cv_c_wint_t=yes
16202 else
16203 gt_cv_c_wint_t=no
16204 fi
16205 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16206 fi
16207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
16208 $as_echo "$gt_cv_c_wint_t" >&6; }
16209 if test $gt_cv_c_wint_t = yes; then
16210
16211 $as_echo "#define HAVE_WINT_T 1" >>confdefs.h
16212
16213 fi
16214
16215
16216 GNULIB_ISWBLANK=0;
16217 GNULIB_WCTYPE=0;
16218 GNULIB_ISWCTYPE=0;
16219 GNULIB_WCTRANS=0;
16220 GNULIB_TOWCTRANS=0;
16221 HAVE_ISWBLANK=1;
16222 HAVE_WCTYPE_T=1;
16223 HAVE_WCTRANS_T=1;
16224 REPLACE_ISWBLANK=0;
16225
16226
16227
16228
16229
16230
16231
16232 if false; then
16233 GL_COND_LIBTOOL_TRUE=
16234 GL_COND_LIBTOOL_FALSE='#'
16235 else
16236 GL_COND_LIBTOOL_TRUE='#'
16237 GL_COND_LIBTOOL_FALSE=
16238 fi
16239
16240 gl_cond_libtool=false
16241 gl_libdeps=
16242 gl_ltlibdeps=
16243 gl_m4_base='import/m4'
16244
16245
16246
16247
16248
16249
16250
16251
16252
16253 gl_source_base='import'
16254
16255
16256 if test $ac_cv_func_alloca_works = no; then
16257 :
16258 fi
16259
16260 # Define an additional variable used in the Makefile substitution.
16261 if test $ac_cv_working_alloca_h = yes; then
16262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
16263 $as_echo_n "checking for alloca as a compiler built-in... " >&6; }
16264 if ${gl_cv_rpl_alloca+:} false; then :
16265 $as_echo_n "(cached) " >&6
16266 else
16267
16268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16269 /* end confdefs.h. */
16270
16271 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
16272 Need own alloca
16273 #endif
16274
16275 _ACEOF
16276 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16277 $EGREP "Need own alloca" >/dev/null 2>&1; then :
16278 gl_cv_rpl_alloca=yes
16279 else
16280 gl_cv_rpl_alloca=no
16281 fi
16282 rm -f conftest*
16283
16284
16285 fi
16286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
16287 $as_echo "$gl_cv_rpl_alloca" >&6; }
16288 if test $gl_cv_rpl_alloca = yes; then
16289
16290 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
16291
16292 ALLOCA_H=alloca.h
16293 else
16294 ALLOCA_H=
16295 fi
16296 else
16297 ALLOCA_H=alloca.h
16298 fi
16299
16300 if test -n "$ALLOCA_H"; then
16301 GL_GENERATE_ALLOCA_H_TRUE=
16302 GL_GENERATE_ALLOCA_H_FALSE='#'
16303 else
16304 GL_GENERATE_ALLOCA_H_TRUE='#'
16305 GL_GENERATE_ALLOCA_H_FALSE=
16306 fi
16307
16308
16309
16310
16311
16312
16313 :
16314
16315
16316
16317
16318
16319 if test $ac_cv_header_arpa_inet_h = yes; then
16320 HAVE_ARPA_INET_H=1
16321 else
16322 HAVE_ARPA_INET_H=0
16323 fi
16324
16325
16326
16327
16328
16329
16330
16331 :
16332
16333
16334
16335
16336
16337
16338
16339
16340 if test $gl_cv_have_include_next = yes; then
16341 gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
16342 else
16343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <arpa/inet.h>" >&5
16344 $as_echo_n "checking absolute name of <arpa/inet.h>... " >&6; }
16345 if ${gl_cv_next_arpa_inet_h+:} false; then :
16346 $as_echo_n "(cached) " >&6
16347 else
16348
16349 if test $ac_cv_header_arpa_inet_h = yes; then
16350
16351
16352
16353
16354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16355 /* end confdefs.h. */
16356 #include <arpa/inet.h>
16357 _ACEOF
16358 case "$host_os" in
16359 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16360 *) gl_absname_cpp="$ac_cpp" ;;
16361 esac
16362
16363 case "$host_os" in
16364 mingw*)
16365 gl_dirsep_regex='[/\\]'
16366 ;;
16367 *)
16368 gl_dirsep_regex='\/'
16369 ;;
16370 esac
16371 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16372 gl_header_literal_regex=`echo 'arpa/inet.h' \
16373 | sed -e "$gl_make_literal_regex_sed"`
16374 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16375 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16376 s|^/[^/]|//&|
16377 p
16378 q
16379 }'
16380
16381 gl_cv_absolute_arpa_inet_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16382 sed -n "$gl_absolute_header_sed"`
16383
16384 gl_header=$gl_cv_absolute_arpa_inet_h
16385 gl_cv_next_arpa_inet_h='"'$gl_header'"'
16386 else
16387 gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
16388 fi
16389
16390
16391 fi
16392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_arpa_inet_h" >&5
16393 $as_echo "$gl_cv_next_arpa_inet_h" >&6; }
16394 fi
16395 NEXT_ARPA_INET_H=$gl_cv_next_arpa_inet_h
16396
16397 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16398 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16399 gl_next_as_first_directive='<'arpa/inet.h'>'
16400 else
16401 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
16402 gl_next_as_first_directive=$gl_cv_next_arpa_inet_h
16403 fi
16404 NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H=$gl_next_as_first_directive
16405
16406
16407
16408
16409
16410
16411
16412
16413 for gl_func in inet_ntop inet_pton; do
16414 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
16415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
16416 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
16417 if eval \${$as_gl_Symbol+:} false; then :
16418 $as_echo_n "(cached) " >&6
16419 else
16420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16421 /* end confdefs.h. */
16422
16423 /* On some systems, this header is not self-consistent. */
16424 #if !(defined __GLIBC__ || defined __UCLIBC__)
16425 # include <sys/socket.h>
16426 #endif
16427 #ifdef __TANDEM
16428 # include <netdb.h>
16429 #endif
16430 #include <arpa/inet.h>
16431
16432 int
16433 main ()
16434 {
16435 #undef $gl_func
16436 (void) $gl_func;
16437 ;
16438 return 0;
16439 }
16440 _ACEOF
16441 if ac_fn_c_try_compile "$LINENO"; then :
16442 eval "$as_gl_Symbol=yes"
16443 else
16444 eval "$as_gl_Symbol=no"
16445 fi
16446 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16447 fi
16448 eval ac_res=\$$as_gl_Symbol
16449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16450 $as_echo "$ac_res" >&6; }
16451 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
16452 cat >>confdefs.h <<_ACEOF
16453 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
16454 _ACEOF
16455
16456 eval ac_cv_have_decl_$gl_func=yes
16457 fi
16458 done
16459
16460
16461
16462
16463
16464
16465
16466
16467
16468
16469
16470 gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
16471
16472
16473
16474
16475 if test $ac_cv_func_canonicalize_file_name = no; then
16476 HAVE_CANONICALIZE_FILE_NAME=0
16477 if test $ac_cv_func_realpath = no; then
16478 HAVE_REALPATH=0
16479 else
16480 case "$gl_cv_func_realpath_works" in
16481 *yes) ;;
16482 *) REPLACE_REALPATH=1 ;;
16483 esac
16484 fi
16485 else
16486 case "$gl_cv_func_realpath_works" in
16487 *yes)
16488 ;;
16489 *)
16490 REPLACE_CANONICALIZE_FILE_NAME=1
16491 REPLACE_REALPATH=1
16492 ;;
16493 esac
16494 fi
16495
16496 if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
16497
16498
16499
16500
16501
16502
16503
16504
16505 gl_LIBOBJS="$gl_LIBOBJS canonicalize-lgpl.$ac_objext"
16506
16507 fi
16508
16509
16510 cat >>confdefs.h <<_ACEOF
16511 #define GNULIB_CANONICALIZE_LGPL 1
16512 _ACEOF
16513
16514
16515
16516
16517
16518
16519
16520 GNULIB_CANONICALIZE_FILE_NAME=1
16521
16522
16523
16524
16525
16526 $as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
16527
16528
16529
16530
16531
16532
16533
16534
16535 GNULIB_REALPATH=1
16536
16537
16538
16539
16540
16541 $as_echo "#define GNULIB_TEST_REALPATH 1" >>confdefs.h
16542
16543
16544
16545
16546
16547
16548
16549
16550 GNULIB_CHDIR=1
16551
16552
16553
16554
16555
16556 $as_echo "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
16557
16558
16559
16560
16561
16562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this system has an arbitrary file name length limit" >&5
16563 $as_echo_n "checking whether this system has an arbitrary file name length limit... " >&6; }
16564 if ${gl_cv_have_arbitrary_file_name_length_limit+:} false; then :
16565 $as_echo_n "(cached) " >&6
16566 else
16567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16568 /* end confdefs.h. */
16569
16570 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
16571 #if HAVE_UNISTD_H
16572 # include <unistd.h>
16573 #endif
16574 #include <limits.h>
16575 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
16576 # include <sys/param.h>
16577 #endif
16578 #if !defined PATH_MAX && defined MAXPATHLEN
16579 # define PATH_MAX MAXPATHLEN
16580 #endif
16581 #ifdef __hpux
16582 # undef PATH_MAX
16583 # define PATH_MAX 1024
16584 #endif
16585 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
16586 # undef PATH_MAX
16587 # define PATH_MAX 260
16588 #endif
16589
16590 #ifdef PATH_MAX
16591 have_arbitrary_file_name_length_limit
16592 #endif
16593 _ACEOF
16594 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16595 $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1; then :
16596 gl_cv_have_arbitrary_file_name_length_limit=yes
16597 else
16598 gl_cv_have_arbitrary_file_name_length_limit=no
16599 fi
16600 rm -f conftest*
16601
16602 fi
16603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_arbitrary_file_name_length_limit" >&5
16604 $as_echo "$gl_cv_have_arbitrary_file_name_length_limit" >&6; }
16605
16606 if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then
16607
16608
16609
16610
16611
16612
16613
16614
16615 gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext"
16616
16617 :
16618 fi
16619
16620
16621 $as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
16622
16623
16624
16625
16626
16627 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
16628 REPLACE_CLOSE=1
16629 fi
16630
16631
16632
16633
16634
16635 :
16636
16637
16638
16639
16640
16641 if test $ac_cv_header_sys_socket_h != yes; then
16642 for ac_header in winsock2.h
16643 do :
16644 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
16645 if test "x$ac_cv_header_winsock2_h" = xyes; then :
16646 cat >>confdefs.h <<_ACEOF
16647 #define HAVE_WINSOCK2_H 1
16648 _ACEOF
16649
16650 fi
16651
16652 done
16653
16654 fi
16655 if test "$ac_cv_header_winsock2_h" = yes; then
16656 HAVE_WINSOCK2_H=1
16657 UNISTD_H_HAVE_WINSOCK2_H=1
16658 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
16659 else
16660 HAVE_WINSOCK2_H=0
16661 fi
16662
16663
16664 if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
16665 REPLACE_CLOSE=1
16666 fi
16667
16668
16669 if test $REPLACE_CLOSE = 0; then
16670
16671
16672
16673 :
16674
16675
16676
16677
16678
16679 if test $ac_cv_func_fchdir = no; then
16680 HAVE_FCHDIR=0
16681 fi
16682
16683 if test $HAVE_FCHDIR = 0; then
16684 REPLACE_CLOSE=1
16685 fi
16686 fi
16687
16688
16689 if test $REPLACE_CLOSE = 1; then
16690
16691
16692
16693
16694
16695
16696
16697
16698 gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
16699
16700 fi
16701
16702
16703
16704
16705
16706 GNULIB_CLOSE=1
16707
16708
16709
16710
16711
16712 $as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
16713
16714
16715
16716
16717
16718
16719 for ac_func in closedir
16720 do :
16721 ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir"
16722 if test "x$ac_cv_func_closedir" = xyes; then :
16723 cat >>confdefs.h <<_ACEOF
16724 #define HAVE_CLOSEDIR 1
16725 _ACEOF
16726
16727 fi
16728 done
16729
16730 if test $ac_cv_func_closedir = no; then
16731 HAVE_CLOSEDIR=0
16732 fi
16733
16734
16735
16736
16737 :
16738
16739
16740
16741
16742
16743 if test $ac_cv_func_fchdir = no; then
16744 HAVE_FCHDIR=0
16745 fi
16746
16747 if test $HAVE_FCHDIR = 0; then
16748 if test $HAVE_CLOSEDIR = 1; then
16749 REPLACE_CLOSEDIR=1
16750 fi
16751 fi
16752
16753 case $host_os,$HAVE_CLOSEDIR in
16754 os2*,1)
16755 REPLACE_CLOSEDIR=1;;
16756 esac
16757
16758 if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
16759
16760
16761
16762
16763
16764
16765
16766
16767 gl_LIBOBJS="$gl_LIBOBJS closedir.$ac_objext"
16768
16769 fi
16770
16771
16772
16773
16774
16775 GNULIB_CLOSEDIR=1
16776
16777
16778
16779
16780
16781 $as_echo "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
16782
16783
16784
16785
16786 if test "x$datarootdir" = x; then
16787 datarootdir='${datadir}'
16788
16789 fi
16790 if test "x$docdir" = x; then
16791 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
16792
16793 fi
16794 if test "x$htmldir" = x; then
16795 htmldir='${docdir}'
16796
16797 fi
16798 if test "x$dvidir" = x; then
16799 dvidir='${docdir}'
16800
16801 fi
16802 if test "x$pdfdir" = x; then
16803 pdfdir='${docdir}'
16804
16805 fi
16806 if test "x$psdir" = x; then
16807 psdir='${docdir}'
16808
16809 fi
16810 if test "x$lispdir" = x; then
16811 lispdir='${datarootdir}/emacs/site-lisp'
16812
16813 fi
16814 if test "x$localedir" = x; then
16815 localedir='${datarootdir}/locale'
16816
16817 fi
16818 if test "x$runstatedir" = x; then
16819 runstatedir='${localstatedir}/run'
16820
16821 fi
16822
16823 pkglibexecdir='${libexecdir}/${PACKAGE}'
16824
16825
16826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
16827 $as_echo_n "checking for d_ino member in directory struct... " >&6; }
16828 if ${gl_cv_struct_dirent_d_ino+:} false; then :
16829 $as_echo_n "(cached) " >&6
16830 else
16831 if test "$cross_compiling" = yes; then :
16832 case "$host_os" in
16833 # Guess yes on glibc systems with Linux kernel.
16834 linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
16835 # If we don't know, assume the worst.
16836 *) gl_cv_struct_dirent_d_ino="guessing no" ;;
16837 esac
16838
16839 else
16840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16841 /* end confdefs.h. */
16842 #include <sys/types.h>
16843 #include <sys/stat.h>
16844 #include <dirent.h>
16845
16846 int
16847 main ()
16848 {
16849 DIR *dp = opendir (".");
16850 struct dirent *e;
16851 struct stat st;
16852 if (! dp)
16853 return 1;
16854 e = readdir (dp);
16855 if (! e)
16856 return 2;
16857 if (lstat (e->d_name, &st) != 0)
16858 return 3;
16859 if (e->d_ino != st.st_ino)
16860 return 4;
16861 closedir (dp);
16862 return 0;
16863
16864 ;
16865 return 0;
16866 }
16867 _ACEOF
16868 if ac_fn_c_try_run "$LINENO"; then :
16869 gl_cv_struct_dirent_d_ino=yes
16870 else
16871 gl_cv_struct_dirent_d_ino=no
16872 fi
16873 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16874 conftest.$ac_objext conftest.beam conftest.$ac_ext
16875 fi
16876
16877 fi
16878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5
16879 $as_echo "$gl_cv_struct_dirent_d_ino" >&6; }
16880 case "$gl_cv_struct_dirent_d_ino" in
16881 *yes)
16882
16883 $as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h
16884
16885 ;;
16886 esac
16887
16888
16889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_type member in directory struct" >&5
16890 $as_echo_n "checking for d_type member in directory struct... " >&6; }
16891 if ${gl_cv_struct_dirent_d_type+:} false; then :
16892 $as_echo_n "(cached) " >&6
16893 else
16894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16895 /* end confdefs.h. */
16896
16897 #include <sys/types.h>
16898 #include <dirent.h>
16899
16900 int
16901 main ()
16902 {
16903 struct dirent dp; dp.d_type = 0;
16904 ;
16905 return 0;
16906 }
16907 _ACEOF
16908 if ac_fn_c_try_link "$LINENO"; then :
16909 gl_cv_struct_dirent_d_type=yes
16910 else
16911 gl_cv_struct_dirent_d_type=no
16912 fi
16913 rm -f core conftest.err conftest.$ac_objext \
16914 conftest$ac_exeext conftest.$ac_ext
16915
16916
16917 fi
16918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_type" >&5
16919 $as_echo "$gl_cv_struct_dirent_d_type" >&6; }
16920 if test $gl_cv_struct_dirent_d_type = yes; then
16921
16922 $as_echo "#define HAVE_STRUCT_DIRENT_D_TYPE 1" >>confdefs.h
16923
16924 fi
16925
16926
16927
16928
16929
16930
16931
16932
16933
16934
16935
16936 :
16937
16938
16939
16940
16941
16942
16943
16944
16945 if test $gl_cv_have_include_next = yes; then
16946 gl_cv_next_dirent_h='<'dirent.h'>'
16947 else
16948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
16949 $as_echo_n "checking absolute name of <dirent.h>... " >&6; }
16950 if ${gl_cv_next_dirent_h+:} false; then :
16951 $as_echo_n "(cached) " >&6
16952 else
16953
16954 if test $ac_cv_header_dirent_h = yes; then
16955
16956
16957
16958
16959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16960 /* end confdefs.h. */
16961 #include <dirent.h>
16962 _ACEOF
16963 case "$host_os" in
16964 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16965 *) gl_absname_cpp="$ac_cpp" ;;
16966 esac
16967
16968 case "$host_os" in
16969 mingw*)
16970 gl_dirsep_regex='[/\\]'
16971 ;;
16972 *)
16973 gl_dirsep_regex='\/'
16974 ;;
16975 esac
16976 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16977 gl_header_literal_regex=`echo 'dirent.h' \
16978 | sed -e "$gl_make_literal_regex_sed"`
16979 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16980 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16981 s|^/[^/]|//&|
16982 p
16983 q
16984 }'
16985
16986 gl_cv_absolute_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16987 sed -n "$gl_absolute_header_sed"`
16988
16989 gl_header=$gl_cv_absolute_dirent_h
16990 gl_cv_next_dirent_h='"'$gl_header'"'
16991 else
16992 gl_cv_next_dirent_h='<'dirent.h'>'
16993 fi
16994
16995
16996 fi
16997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
16998 $as_echo "$gl_cv_next_dirent_h" >&6; }
16999 fi
17000 NEXT_DIRENT_H=$gl_cv_next_dirent_h
17001
17002 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17003 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17004 gl_next_as_first_directive='<'dirent.h'>'
17005 else
17006 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17007 gl_next_as_first_directive=$gl_cv_next_dirent_h
17008 fi
17009 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
17010
17011
17012
17013
17014 if test $ac_cv_header_dirent_h = yes; then
17015 HAVE_DIRENT_H=1
17016 else
17017 HAVE_DIRENT_H=0
17018 fi
17019
17020
17021
17022 for gl_func in alphasort closedir dirfd fdopendir opendir readdir rewinddir scandir; do
17023 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
17024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
17025 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
17026 if eval \${$as_gl_Symbol+:} false; then :
17027 $as_echo_n "(cached) " >&6
17028 else
17029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17030 /* end confdefs.h. */
17031 #include <dirent.h>
17032
17033 int
17034 main ()
17035 {
17036 #undef $gl_func
17037 (void) $gl_func;
17038 ;
17039 return 0;
17040 }
17041 _ACEOF
17042 if ac_fn_c_try_compile "$LINENO"; then :
17043 eval "$as_gl_Symbol=yes"
17044 else
17045 eval "$as_gl_Symbol=no"
17046 fi
17047 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17048 fi
17049 eval ac_res=\$$as_gl_Symbol
17050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17051 $as_echo "$ac_res" >&6; }
17052 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
17053 cat >>confdefs.h <<_ACEOF
17054 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
17055 _ACEOF
17056
17057 eval ac_cv_have_decl_$gl_func=yes
17058 fi
17059 done
17060
17061
17062
17063
17064
17065
17066
17067 for ac_func in dirfd
17068 do :
17069 ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
17070 if test "x$ac_cv_func_dirfd" = xyes; then :
17071 cat >>confdefs.h <<_ACEOF
17072 #define HAVE_DIRFD 1
17073 _ACEOF
17074
17075 fi
17076 done
17077
17078 ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
17079 #include <dirent.h>
17080 "
17081 if test "x$ac_cv_have_decl_dirfd" = xyes; then :
17082 ac_have_decl=1
17083 else
17084 ac_have_decl=0
17085 fi
17086
17087 cat >>confdefs.h <<_ACEOF
17088 #define HAVE_DECL_DIRFD $ac_have_decl
17089 _ACEOF
17090
17091 if test $ac_cv_have_decl_dirfd = no; then
17092 HAVE_DECL_DIRFD=0
17093 fi
17094
17095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
17096 $as_echo_n "checking whether dirfd is a macro... " >&6; }
17097 if ${gl_cv_func_dirfd_macro+:} false; then :
17098 $as_echo_n "(cached) " >&6
17099 else
17100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17101 /* end confdefs.h. */
17102
17103 #include <sys/types.h>
17104 #include <dirent.h>
17105 #ifdef dirfd
17106 dirent_header_defines_dirfd
17107 #endif
17108 _ACEOF
17109 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17110 $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1; then :
17111 gl_cv_func_dirfd_macro=yes
17112 else
17113 gl_cv_func_dirfd_macro=no
17114 fi
17115 rm -f conftest*
17116
17117 fi
17118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
17119 $as_echo "$gl_cv_func_dirfd_macro" >&6; }
17120
17121 # Use the replacement if we have no function or macro with that name,
17122 # or if OS/2 kLIBC whose dirfd() does not work.
17123 # Replace only if the system declares dirfd already.
17124 case $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro,$host_os,$ac_cv_have_decl_dirfd in
17125 no,no,*,yes | *,*,os2*,yes)
17126 REPLACE_DIRFD=1
17127
17128 $as_echo "#define REPLACE_DIRFD 1" >>confdefs.h
17129 ;;
17130 esac
17131
17132 if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \
17133 || test $REPLACE_DIRFD = 1; then
17134
17135
17136
17137
17138
17139
17140
17141
17142 gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext"
17143
17144
17145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
17146 $as_echo_n "checking how to get the file descriptor associated with an open DIR*... " >&6; }
17147 if ${gl_cv_sys_dir_fd_member_name+:} false; then :
17148 $as_echo_n "(cached) " >&6
17149 else
17150
17151 dirfd_save_CFLAGS=$CFLAGS
17152 for ac_expr in d_fd dd_fd; do
17153
17154 CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
17155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17156 /* end confdefs.h. */
17157
17158 #include <sys/types.h>
17159 #include <dirent.h>
17160 int
17161 main ()
17162 {
17163 DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
17164 ;
17165 return 0;
17166 }
17167 _ACEOF
17168 if ac_fn_c_try_compile "$LINENO"; then :
17169 dir_fd_found=yes
17170
17171 fi
17172 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17173 CFLAGS=$dirfd_save_CFLAGS
17174 test "$dir_fd_found" = yes && break
17175 done
17176 test "$dir_fd_found" = yes || ac_expr=no_such_member
17177
17178 gl_cv_sys_dir_fd_member_name=$ac_expr
17179
17180
17181 fi
17182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
17183 $as_echo "$gl_cv_sys_dir_fd_member_name" >&6; }
17184 if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
17185
17186 cat >>confdefs.h <<_ACEOF
17187 #define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name
17188 _ACEOF
17189
17190 fi
17191
17192
17193 fi
17194
17195
17196
17197
17198
17199 GNULIB_DIRFD=1
17200
17201
17202
17203
17204
17205 $as_echo "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
17206
17207
17208
17209
17210
17211
17212
17213
17214
17215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
17216 $as_echo_n "checking whether // is distinct from /... " >&6; }
17217 if ${gl_cv_double_slash_root+:} false; then :
17218 $as_echo_n "(cached) " >&6
17219 else
17220 if test x"$cross_compiling" = xyes ; then
17221 # When cross-compiling, there is no way to tell whether // is special
17222 # short of a list of hosts. However, the only known hosts to date
17223 # that have a distinct // are Apollo DomainOS (too old to port to),
17224 # Cygwin, and z/OS. If anyone knows of another system for which // has
17225 # special semantics and is distinct from /, please report it to
17226 # <bug-gnulib@gnu.org>.
17227 case $host in
17228 *-cygwin | i370-ibm-openedition)
17229 gl_cv_double_slash_root=yes ;;
17230 *)
17231 # Be optimistic and assume that / and // are the same when we
17232 # don't know.
17233 gl_cv_double_slash_root='unknown, assuming no' ;;
17234 esac
17235 else
17236 set x `ls -di / // 2>/dev/null`
17237 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
17238 gl_cv_double_slash_root=no
17239 else
17240 gl_cv_double_slash_root=yes
17241 fi
17242 fi
17243 fi
17244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
17245 $as_echo "$gl_cv_double_slash_root" >&6; }
17246 if test "$gl_cv_double_slash_root" = yes; then
17247
17248 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
17249
17250 fi
17251
17252
17253
17254
17255 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
17256 REPLACE_DUP=1
17257 fi
17258
17259
17260
17261
17262 :
17263
17264
17265
17266
17267
17268 if test $ac_cv_func_fchdir = no; then
17269 HAVE_FCHDIR=0
17270 fi
17271
17272 if test $HAVE_FCHDIR = 0; then
17273 REPLACE_DUP=1
17274 fi
17275
17276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup works" >&5
17277 $as_echo_n "checking whether dup works... " >&6; }
17278 if ${gl_cv_func_dup_works+:} false; then :
17279 $as_echo_n "(cached) " >&6
17280 else
17281 if test "$cross_compiling" = yes; then :
17282 gl_cv_func_dup_works='guessing yes'
17283 else
17284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17285 /* end confdefs.h. */
17286 #include <unistd.h>
17287 #include <fcntl.h>
17288 #include <errno.h>
17289 int
17290 main ()
17291 {
17292 /* On OS/2 kLIBC, dup does not work on a directory fd. */
17293 int fd = open (".", O_RDONLY);
17294 return fd < 0 ? 1 : dup (fd) < 0 ? 2 : 0;
17295
17296 ;
17297 return 0;
17298 }
17299
17300 _ACEOF
17301 if ac_fn_c_try_run "$LINENO"; then :
17302 gl_cv_func_dup_works=yes
17303 else
17304 gl_cv_func_dup_works=no
17305 fi
17306 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17307 conftest.$ac_objext conftest.beam conftest.$ac_ext
17308 fi
17309
17310
17311 fi
17312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup_works" >&5
17313 $as_echo "$gl_cv_func_dup_works" >&6; }
17314 case "$gl_cv_func_dup_works" in
17315 *yes) ;;
17316 *)
17317 REPLACE_DUP=1
17318 ;;
17319 esac
17320
17321 if test $REPLACE_DUP = 1; then
17322
17323
17324
17325
17326
17327
17328
17329
17330 gl_LIBOBJS="$gl_LIBOBJS dup.$ac_objext"
17331
17332 :
17333 fi
17334
17335
17336
17337
17338
17339 GNULIB_DUP=1
17340
17341
17342
17343
17344
17345 $as_echo "#define GNULIB_TEST_DUP 1" >>confdefs.h
17346
17347
17348
17349
17350
17351
17352
17353
17354 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
17355
17356
17357 if test $HAVE_DUP2 = 1; then
17358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
17359 $as_echo_n "checking whether dup2 works... " >&6; }
17360 if ${gl_cv_func_dup2_works+:} false; then :
17361 $as_echo_n "(cached) " >&6
17362 else
17363 if test "$cross_compiling" = yes; then :
17364 case "$host_os" in
17365 mingw*) # on this platform, dup2 always returns 0 for success
17366 gl_cv_func_dup2_works="guessing no" ;;
17367 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
17368 gl_cv_func_dup2_works="guessing no" ;;
17369 aix* | freebsd*)
17370 # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
17371 # not EBADF.
17372 gl_cv_func_dup2_works="guessing no" ;;
17373 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
17374 gl_cv_func_dup2_works="guessing no" ;;
17375 *-android*) # implemented using dup3(), which fails if oldfd == newfd
17376 gl_cv_func_dup2_works="guessing no" ;;
17377 os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
17378 gl_cv_func_dup2_works="guessing no" ;;
17379 *) gl_cv_func_dup2_works="guessing yes" ;;
17380 esac
17381 else
17382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17383 /* end confdefs.h. */
17384
17385 #include <errno.h>
17386 #include <fcntl.h>
17387 #include <limits.h>
17388 #include <sys/resource.h>
17389 #include <unistd.h>
17390 #ifndef RLIM_SAVED_CUR
17391 # define RLIM_SAVED_CUR RLIM_INFINITY
17392 #endif
17393 #ifndef RLIM_SAVED_MAX
17394 # define RLIM_SAVED_MAX RLIM_INFINITY
17395 #endif
17396
17397 int
17398 main ()
17399 {
17400 int result = 0;
17401 int bad_fd = INT_MAX;
17402 struct rlimit rlim;
17403 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
17404 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
17405 && rlim.rlim_cur != RLIM_INFINITY
17406 && rlim.rlim_cur != RLIM_SAVED_MAX
17407 && rlim.rlim_cur != RLIM_SAVED_CUR)
17408 bad_fd = rlim.rlim_cur;
17409 #ifdef FD_CLOEXEC
17410 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
17411 result |= 1;
17412 #endif
17413 if (dup2 (1, 1) != 1)
17414 result |= 2;
17415 #ifdef FD_CLOEXEC
17416 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
17417 result |= 4;
17418 #endif
17419 close (0);
17420 if (dup2 (0, 0) != -1)
17421 result |= 8;
17422 /* Many gnulib modules require POSIX conformance of EBADF. */
17423 if (dup2 (2, bad_fd) == -1 && errno != EBADF)
17424 result |= 16;
17425 /* Flush out some cygwin core dumps. */
17426 if (dup2 (2, -1) != -1 || errno != EBADF)
17427 result |= 32;
17428 dup2 (2, 255);
17429 dup2 (2, 256);
17430 /* On OS/2 kLIBC, dup2() does not work on a directory fd. */
17431 {
17432 int fd = open (".", O_RDONLY);
17433 if (fd == -1)
17434 result |= 64;
17435 else if (dup2 (fd, fd + 1) == -1)
17436 result |= 128;
17437
17438 close (fd);
17439 }
17440 return result;
17441 ;
17442 return 0;
17443 }
17444
17445 _ACEOF
17446 if ac_fn_c_try_run "$LINENO"; then :
17447 gl_cv_func_dup2_works=yes
17448 else
17449 gl_cv_func_dup2_works=no
17450 fi
17451 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17452 conftest.$ac_objext conftest.beam conftest.$ac_ext
17453 fi
17454
17455
17456 fi
17457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
17458 $as_echo "$gl_cv_func_dup2_works" >&6; }
17459 case "$gl_cv_func_dup2_works" in
17460 *yes) ;;
17461 *)
17462 REPLACE_DUP2=1
17463 for ac_func in setdtablesize
17464 do :
17465 ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
17466 if test "x$ac_cv_func_setdtablesize" = xyes; then :
17467 cat >>confdefs.h <<_ACEOF
17468 #define HAVE_SETDTABLESIZE 1
17469 _ACEOF
17470
17471 fi
17472 done
17473
17474 ;;
17475 esac
17476 fi
17477
17478
17479
17480
17481 :
17482
17483
17484
17485
17486
17487 if test $ac_cv_func_fchdir = no; then
17488 HAVE_FCHDIR=0
17489 fi
17490
17491 if test $HAVE_FCHDIR = 0; then
17492 if test $HAVE_DUP2 = 1; then
17493 REPLACE_DUP2=1
17494 fi
17495 fi
17496
17497
17498 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
17499
17500
17501
17502
17503
17504
17505
17506
17507 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
17508
17509
17510 fi
17511
17512
17513
17514
17515
17516 GNULIB_DUP2=1
17517
17518
17519
17520
17521
17522 $as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h
17523
17524
17525
17526
17527
17528
17529
17530
17531
17532 GNULIB_ENVIRON=1
17533
17534
17535
17536
17537
17538 $as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
17539
17540
17541
17542
17543
17544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
17545 $as_echo_n "checking for error_at_line... " >&6; }
17546 if ${ac_cv_lib_error_at_line+:} false; then :
17547 $as_echo_n "(cached) " >&6
17548 else
17549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17550 /* end confdefs.h. */
17551 #include <error.h>
17552 int
17553 main ()
17554 {
17555 error_at_line (0, 0, "", 0, "an error occurred");
17556 ;
17557 return 0;
17558 }
17559 _ACEOF
17560 if ac_fn_c_try_link "$LINENO"; then :
17561 ac_cv_lib_error_at_line=yes
17562 else
17563 ac_cv_lib_error_at_line=no
17564 fi
17565 rm -f core conftest.err conftest.$ac_objext \
17566 conftest$ac_exeext conftest.$ac_ext
17567 fi
17568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
17569 $as_echo "$ac_cv_lib_error_at_line" >&6; }
17570
17571 if test $ac_cv_lib_error_at_line = no; then
17572
17573
17574
17575
17576
17577
17578
17579
17580 gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
17581
17582
17583
17584 :
17585
17586 fi
17587
17588
17589
17590
17591
17592
17593
17594 :
17595
17596
17597
17598
17599
17600 if test $ac_cv_have_decl_fchdir = no; then
17601 HAVE_DECL_FCHDIR=0
17602 fi
17603
17604
17605 if test $HAVE_FCHDIR = 0; then
17606
17607
17608
17609
17610
17611
17612
17613
17614 gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext"
17615
17616 :
17617
17618 $as_echo "#define REPLACE_FCHDIR 1" >>confdefs.h
17619
17620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5
17621 $as_echo_n "checking whether open can visit directories... " >&6; }
17622 if ${gl_cv_func_open_directory_works+:} false; then :
17623 $as_echo_n "(cached) " >&6
17624 else
17625 if test "$cross_compiling" = yes; then :
17626 case "$host_os" in
17627 # Guess yes on glibc systems.
17628 *-gnu*) gl_cv_func_open_directory_works="guessing yes" ;;
17629 # If we don't know, assume the worst.
17630 *) gl_cv_func_open_directory_works="guessing no" ;;
17631 esac
17632
17633 else
17634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17635 /* end confdefs.h. */
17636 #include <fcntl.h>
17637
17638 int
17639 main ()
17640 {
17641 return open(".", O_RDONLY) < 0;
17642 ;
17643 return 0;
17644 }
17645 _ACEOF
17646 if ac_fn_c_try_run "$LINENO"; then :
17647 gl_cv_func_open_directory_works=yes
17648 else
17649 gl_cv_func_open_directory_works=no
17650 fi
17651 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17652 conftest.$ac_objext conftest.beam conftest.$ac_ext
17653 fi
17654
17655 fi
17656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5
17657 $as_echo "$gl_cv_func_open_directory_works" >&6; }
17658 case "$gl_cv_func_open_directory_works" in
17659 *yes) ;;
17660 *)
17661
17662 $as_echo "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h
17663
17664 ;;
17665 esac
17666 fi
17667
17668
17669
17670
17671
17672
17673 GNULIB_FCHDIR=1
17674
17675
17676
17677
17678
17679 $as_echo "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h
17680
17681
17682
17683
17684
17685
17686
17687
17688 :
17689
17690
17691
17692
17693
17694 if test $ac_cv_func_fcntl = no; then
17695
17696
17697
17698 :
17699
17700
17701
17702
17703
17704 if test $ac_cv_func_fcntl = no; then
17705 HAVE_FCNTL=0
17706 else
17707 REPLACE_FCNTL=1
17708 fi
17709
17710 else
17711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
17712 $as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
17713 if ${gl_cv_func_fcntl_f_dupfd_works+:} false; then :
17714 $as_echo_n "(cached) " >&6
17715 else
17716 if test "$cross_compiling" = yes; then :
17717 case $host_os in
17718 aix* | cygwin* | haiku*)
17719 gl_cv_func_fcntl_f_dupfd_works="guessing no" ;;
17720 *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;;
17721 esac
17722 else
17723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17724 /* end confdefs.h. */
17725 #include <errno.h>
17726 #include <fcntl.h>
17727 #include <limits.h>
17728 #include <sys/resource.h>
17729 #include <unistd.h>
17730 #ifndef RLIM_SAVED_CUR
17731 # define RLIM_SAVED_CUR RLIM_INFINITY
17732 #endif
17733 #ifndef RLIM_SAVED_MAX
17734 # define RLIM_SAVED_MAX RLIM_INFINITY
17735 #endif
17736
17737 int
17738 main ()
17739 {
17740 int result = 0;
17741 int bad_fd = INT_MAX;
17742 struct rlimit rlim;
17743 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
17744 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
17745 && rlim.rlim_cur != RLIM_INFINITY
17746 && rlim.rlim_cur != RLIM_SAVED_MAX
17747 && rlim.rlim_cur != RLIM_SAVED_CUR)
17748 bad_fd = rlim.rlim_cur;
17749 if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
17750 if (errno != EINVAL) result |= 2;
17751 if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
17752 if (errno != EINVAL) result |= 8;
17753 /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */
17754 {
17755 int fd;
17756 fd = open (".", O_RDONLY);
17757 if (fd == -1)
17758 result |= 16;
17759 else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1)
17760 result |= 32;
17761
17762 close (fd);
17763 }
17764 return result;
17765 ;
17766 return 0;
17767 }
17768 _ACEOF
17769 if ac_fn_c_try_run "$LINENO"; then :
17770 gl_cv_func_fcntl_f_dupfd_works=yes
17771 else
17772 gl_cv_func_fcntl_f_dupfd_works=no
17773 fi
17774 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17775 conftest.$ac_objext conftest.beam conftest.$ac_ext
17776 fi
17777
17778 fi
17779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
17780 $as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
17781 case $gl_cv_func_fcntl_f_dupfd_works in
17782 *yes) ;;
17783 *)
17784
17785
17786 :
17787
17788
17789
17790
17791
17792 if test $ac_cv_func_fcntl = no; then
17793 HAVE_FCNTL=0
17794 else
17795 REPLACE_FCNTL=1
17796 fi
17797
17798
17799 $as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
17800 ;;
17801 esac
17802
17803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
17804 $as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
17805 if ${gl_cv_func_fcntl_f_dupfd_cloexec+:} false; then :
17806 $as_echo_n "(cached) " >&6
17807 else
17808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17809 /* end confdefs.h. */
17810
17811 #include <fcntl.h>
17812 #ifndef F_DUPFD_CLOEXEC
17813 choke me
17814 #endif
17815
17816 int
17817 main ()
17818 {
17819
17820 ;
17821 return 0;
17822 }
17823 _ACEOF
17824 if ac_fn_c_try_compile "$LINENO"; then :
17825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17826 /* end confdefs.h. */
17827
17828 #ifdef __linux__
17829 /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
17830 it to support the semantics on older kernels that failed with EINVAL. */
17831 choke me
17832 #endif
17833
17834 int
17835 main ()
17836 {
17837
17838 ;
17839 return 0;
17840 }
17841 _ACEOF
17842 if ac_fn_c_try_compile "$LINENO"; then :
17843 gl_cv_func_fcntl_f_dupfd_cloexec=yes
17844 else
17845 gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
17846 fi
17847 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17848 else
17849 gl_cv_func_fcntl_f_dupfd_cloexec=no
17850 fi
17851 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17852 fi
17853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
17854 $as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
17855 if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
17856
17857
17858
17859 :
17860
17861
17862
17863
17864
17865 if test $ac_cv_func_fcntl = no; then
17866 HAVE_FCNTL=0
17867 else
17868 REPLACE_FCNTL=1
17869 fi
17870
17871 fi
17872 fi
17873
17874
17875
17876
17877 :
17878
17879
17880
17881
17882
17883 if test $ac_cv_func_fchdir = no; then
17884 HAVE_FCHDIR=0
17885 fi
17886
17887 if test $HAVE_FCHDIR = 0; then
17888
17889
17890
17891 :
17892
17893
17894
17895
17896
17897 if test $ac_cv_func_fcntl = no; then
17898 HAVE_FCNTL=0
17899 else
17900 REPLACE_FCNTL=1
17901 fi
17902
17903 fi
17904
17905
17906 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
17907
17908
17909
17910
17911
17912
17913
17914
17915 gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
17916
17917 fi
17918
17919
17920
17921
17922
17923 GNULIB_FCNTL=1
17924
17925
17926
17927
17928
17929 $as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
17930
17931
17932
17933
17934
17935
17936
17937
17938
17939
17940
17941
17942
17943
17944 if test $gl_cv_have_include_next = yes; then
17945 gl_cv_next_fcntl_h='<'fcntl.h'>'
17946 else
17947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
17948 $as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
17949 if ${gl_cv_next_fcntl_h+:} false; then :
17950 $as_echo_n "(cached) " >&6
17951 else
17952
17953
17954
17955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17956 /* end confdefs.h. */
17957 #include <fcntl.h>
17958 _ACEOF
17959 case "$host_os" in
17960 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17961 *) gl_absname_cpp="$ac_cpp" ;;
17962 esac
17963
17964 case "$host_os" in
17965 mingw*)
17966 gl_dirsep_regex='[/\\]'
17967 ;;
17968 *)
17969 gl_dirsep_regex='\/'
17970 ;;
17971 esac
17972 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17973 gl_header_literal_regex=`echo 'fcntl.h' \
17974 | sed -e "$gl_make_literal_regex_sed"`
17975 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17976 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17977 s|^/[^/]|//&|
17978 p
17979 q
17980 }'
17981
17982 gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17983 sed -n "$gl_absolute_header_sed"`
17984
17985 gl_header=$gl_cv_absolute_fcntl_h
17986 gl_cv_next_fcntl_h='"'$gl_header'"'
17987
17988
17989 fi
17990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
17991 $as_echo "$gl_cv_next_fcntl_h" >&6; }
17992 fi
17993 NEXT_FCNTL_H=$gl_cv_next_fcntl_h
17994
17995 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17996 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17997 gl_next_as_first_directive='<'fcntl.h'>'
17998 else
17999 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18000 gl_next_as_first_directive=$gl_cv_next_fcntl_h
18001 fi
18002 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
18003
18004
18005
18006
18007
18008
18009
18010
18011
18012
18013 for gl_func in fcntl openat; do
18014 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
18015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
18016 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
18017 if eval \${$as_gl_Symbol+:} false; then :
18018 $as_echo_n "(cached) " >&6
18019 else
18020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18021 /* end confdefs.h. */
18022 #include <fcntl.h>
18023
18024 int
18025 main ()
18026 {
18027 #undef $gl_func
18028 (void) $gl_func;
18029 ;
18030 return 0;
18031 }
18032 _ACEOF
18033 if ac_fn_c_try_compile "$LINENO"; then :
18034 eval "$as_gl_Symbol=yes"
18035 else
18036 eval "$as_gl_Symbol=no"
18037 fi
18038 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18039 fi
18040 eval ac_res=\$$as_gl_Symbol
18041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18042 $as_echo "$ac_res" >&6; }
18043 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
18044 cat >>confdefs.h <<_ACEOF
18045 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
18046 _ACEOF
18047
18048 eval ac_cv_have_decl_$gl_func=yes
18049 fi
18050 done
18051
18052
18053
18054
18055
18056
18057
18058 ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
18059 #include <dirent.h>
18060
18061 "
18062 if test "x$ac_cv_have_decl_fdopendir" = xyes; then :
18063 ac_have_decl=1
18064 else
18065 ac_have_decl=0
18066 fi
18067
18068 cat >>confdefs.h <<_ACEOF
18069 #define HAVE_DECL_FDOPENDIR $ac_have_decl
18070 _ACEOF
18071 if test $ac_have_decl = 1; then :
18072
18073 else
18074 HAVE_DECL_FDOPENDIR=0
18075 fi
18076
18077
18078 :
18079
18080
18081
18082
18083
18084 if test $ac_cv_func_fdopendir = no; then
18085 HAVE_FDOPENDIR=0
18086 else
18087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
18088 $as_echo_n "checking whether fdopendir works... " >&6; }
18089 if ${gl_cv_func_fdopendir_works+:} false; then :
18090 $as_echo_n "(cached) " >&6
18091 else
18092 if test "$cross_compiling" = yes; then :
18093 case "$host_os" in
18094 # Guess yes on glibc systems.
18095 *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
18096 # If we don't know, assume the worst.
18097 *) gl_cv_func_fdopendir_works="guessing no" ;;
18098 esac
18099
18100 else
18101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18102 /* end confdefs.h. */
18103
18104 #include <dirent.h>
18105 #include <fcntl.h>
18106 #include <unistd.h>
18107 #if !HAVE_DECL_FDOPENDIR
18108 extern
18109 # ifdef __cplusplus
18110 "C"
18111 # endif
18112 DIR *fdopendir (int);
18113 #endif
18114
18115 int
18116 main ()
18117 {
18118 int result = 0;
18119 int fd = open ("conftest.c", O_RDONLY);
18120 if (fd < 0) result |= 1;
18121 if (fdopendir (fd)) result |= 2;
18122 if (close (fd)) result |= 4;
18123 return result;
18124 ;
18125 return 0;
18126 }
18127 _ACEOF
18128 if ac_fn_c_try_run "$LINENO"; then :
18129 gl_cv_func_fdopendir_works=yes
18130 else
18131 gl_cv_func_fdopendir_works=no
18132 fi
18133 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18134 conftest.$ac_objext conftest.beam conftest.$ac_ext
18135 fi
18136
18137 fi
18138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
18139 $as_echo "$gl_cv_func_fdopendir_works" >&6; }
18140 case "$gl_cv_func_fdopendir_works" in
18141 *yes) ;;
18142 *)
18143 REPLACE_FDOPENDIR=1
18144 ;;
18145 esac
18146 fi
18147
18148 if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
18149
18150
18151
18152
18153
18154
18155
18156
18157 gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
18158
18159 fi
18160
18161
18162
18163
18164
18165 GNULIB_FDOPENDIR=1
18166
18167
18168
18169
18170
18171 $as_echo "#define GNULIB_TEST_FDOPENDIR 1" >>confdefs.h
18172
18173
18174
18175
18176
18177 cat >>confdefs.h <<_ACEOF
18178 #define GNULIB_FDOPENDIR 1
18179 _ACEOF
18180
18181
18182
18183
18184 :
18185
18186
18187
18188
18189
18190
18191
18192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
18193 $as_echo_n "checking for flexible array member... " >&6; }
18194 if ${ac_cv_c_flexmember+:} false; then :
18195 $as_echo_n "(cached) " >&6
18196 else
18197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18198 /* end confdefs.h. */
18199 #include <stdlib.h>
18200 #include <stdio.h>
18201 #include <stddef.h>
18202 struct s { int n; double d[]; };
18203 int
18204 main ()
18205 {
18206 int m = getchar ();
18207 size_t nbytes = offsetof (struct s, d) + m * sizeof (double);
18208 nbytes += sizeof (struct s) - 1;
18209 nbytes -= nbytes % sizeof (struct s);
18210 struct s *p = malloc (nbytes);
18211 p->d[0] = 0.0;
18212 return p->d != (double *) NULL;
18213 ;
18214 return 0;
18215 }
18216 _ACEOF
18217 if ac_fn_c_try_compile "$LINENO"; then :
18218 ac_cv_c_flexmember=yes
18219 else
18220 ac_cv_c_flexmember=no
18221 fi
18222 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18223 fi
18224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
18225 $as_echo "$ac_cv_c_flexmember" >&6; }
18226 if test $ac_cv_c_flexmember = yes; then
18227
18228 $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
18229
18230 else
18231 $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
18232
18233 fi
18234
18235
18236
18237
18238 FLOAT_H=
18239 REPLACE_FLOAT_LDBL=0
18240 case "$host_os" in
18241 aix* | beos* | openbsd* | mirbsd* | irix*)
18242 FLOAT_H=float.h
18243 ;;
18244 freebsd*)
18245 case "$host_cpu" in
18246 i[34567]86 )
18247 FLOAT_H=float.h
18248 ;;
18249 x86_64 )
18250 # On x86_64 systems, the C compiler may still be generating
18251 # 32-bit code.
18252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18253 /* end confdefs.h. */
18254 #if defined __LP64__ || defined __x86_64__ || defined __amd64__
18255 yes
18256 #endif
18257 _ACEOF
18258 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18259 $EGREP "yes" >/dev/null 2>&1; then :
18260
18261 else
18262 FLOAT_H=float.h
18263 fi
18264 rm -f conftest*
18265
18266 ;;
18267 esac
18268 ;;
18269 linux*)
18270 case "$host_cpu" in
18271 powerpc*)
18272 FLOAT_H=float.h
18273 ;;
18274 esac
18275 ;;
18276 esac
18277 case "$host_os" in
18278 aix* | freebsd* | linux*)
18279 if test -n "$FLOAT_H"; then
18280 REPLACE_FLOAT_LDBL=1
18281 fi
18282 ;;
18283 esac
18284
18285 REPLACE_ITOLD=0
18286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
18287 $as_echo_n "checking whether conversion from 'int' to 'long double' works... " >&6; }
18288 if ${gl_cv_func_itold_works+:} false; then :
18289 $as_echo_n "(cached) " >&6
18290 else
18291
18292 if test "$cross_compiling" = yes; then :
18293 case "$host" in
18294 sparc*-*-linux*)
18295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18296 /* end confdefs.h. */
18297 #if defined __LP64__ || defined __arch64__
18298 yes
18299 #endif
18300 _ACEOF
18301 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18302 $EGREP "yes" >/dev/null 2>&1; then :
18303 gl_cv_func_itold_works="guessing no"
18304 else
18305 gl_cv_func_itold_works="guessing yes"
18306 fi
18307 rm -f conftest*
18308
18309 ;;
18310 *) gl_cv_func_itold_works="guessing yes" ;;
18311 esac
18312
18313 else
18314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18315 /* end confdefs.h. */
18316
18317 int i = -1;
18318 volatile long double ld;
18319 int main ()
18320 {
18321 ld += i * 1.0L;
18322 if (ld > 0)
18323 return 1;
18324 return 0;
18325 }
18326 _ACEOF
18327 if ac_fn_c_try_run "$LINENO"; then :
18328 gl_cv_func_itold_works=yes
18329 else
18330 gl_cv_func_itold_works=no
18331 fi
18332 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18333 conftest.$ac_objext conftest.beam conftest.$ac_ext
18334 fi
18335
18336
18337 fi
18338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
18339 $as_echo "$gl_cv_func_itold_works" >&6; }
18340 case "$gl_cv_func_itold_works" in
18341 *no)
18342 REPLACE_ITOLD=1
18343 FLOAT_H=float.h
18344 ;;
18345 esac
18346
18347 if test -n "$FLOAT_H"; then
18348
18349
18350
18351
18352
18353
18354
18355
18356 if test $gl_cv_have_include_next = yes; then
18357 gl_cv_next_float_h='<'float.h'>'
18358 else
18359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
18360 $as_echo_n "checking absolute name of <float.h>... " >&6; }
18361 if ${gl_cv_next_float_h+:} false; then :
18362 $as_echo_n "(cached) " >&6
18363 else
18364
18365
18366
18367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18368 /* end confdefs.h. */
18369 #include <float.h>
18370 _ACEOF
18371 case "$host_os" in
18372 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18373 *) gl_absname_cpp="$ac_cpp" ;;
18374 esac
18375
18376 case "$host_os" in
18377 mingw*)
18378 gl_dirsep_regex='[/\\]'
18379 ;;
18380 *)
18381 gl_dirsep_regex='\/'
18382 ;;
18383 esac
18384 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18385 gl_header_literal_regex=`echo 'float.h' \
18386 | sed -e "$gl_make_literal_regex_sed"`
18387 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18388 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18389 s|^/[^/]|//&|
18390 p
18391 q
18392 }'
18393
18394 gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18395 sed -n "$gl_absolute_header_sed"`
18396
18397 gl_header=$gl_cv_absolute_float_h
18398 gl_cv_next_float_h='"'$gl_header'"'
18399
18400
18401 fi
18402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
18403 $as_echo "$gl_cv_next_float_h" >&6; }
18404 fi
18405 NEXT_FLOAT_H=$gl_cv_next_float_h
18406
18407 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18408 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18409 gl_next_as_first_directive='<'float.h'>'
18410 else
18411 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18412 gl_next_as_first_directive=$gl_cv_next_float_h
18413 fi
18414 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
18415
18416
18417
18418
18419 fi
18420
18421 if test -n "$FLOAT_H"; then
18422 GL_GENERATE_FLOAT_H_TRUE=
18423 GL_GENERATE_FLOAT_H_FALSE='#'
18424 else
18425 GL_GENERATE_FLOAT_H_TRUE='#'
18426 GL_GENERATE_FLOAT_H_FALSE=
18427 fi
18428
18429
18430
18431 if test $REPLACE_FLOAT_LDBL = 1; then
18432
18433
18434
18435
18436
18437
18438
18439
18440 gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
18441
18442 fi
18443 if test $REPLACE_ITOLD = 1; then
18444
18445
18446
18447
18448
18449
18450
18451
18452 gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
18453
18454 fi
18455
18456
18457
18458
18459
18460 FNMATCH_H=
18461 gl_fnmatch_required_lowercase=`
18462 echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]'
18463 `
18464 gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}"
18465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5
18466 $as_echo_n "checking for working $gl_fnmatch_required fnmatch... " >&6; }
18467 if eval \${$gl_fnmatch_cache_var+:} false; then :
18468 $as_echo_n "(cached) " >&6
18469 else
18470 if test $gl_fnmatch_required = GNU; then
18471 gl_fnmatch_gnu_start=
18472 gl_fnmatch_gnu_end=
18473 else
18474 gl_fnmatch_gnu_start='#if 0'
18475 gl_fnmatch_gnu_end='#endif'
18476 fi
18477 if test "$cross_compiling" = yes; then :
18478 eval "$gl_fnmatch_cache_var=\"guessing no\""
18479 else
18480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18481 /* end confdefs.h. */
18482 #include <fnmatch.h>
18483 static int
18484 y (char const *pattern, char const *string, int flags)
18485 {
18486 return fnmatch (pattern, string, flags) == 0;
18487 }
18488 static int
18489 n (char const *pattern, char const *string, int flags)
18490 {
18491 return fnmatch (pattern, string, flags) == FNM_NOMATCH;
18492 }
18493
18494 int
18495 main ()
18496 {
18497 char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]";
18498 char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]";
18499 static char const A_1[] = { 'A' - 1, 0 };
18500 static char const A01[] = { 'A' + 1, 0 };
18501 static char const a_1[] = { 'a' - 1, 0 };
18502 static char const a01[] = { 'a' + 1, 0 };
18503 static char const bs_1[] = { '\\\\' - 1, 0 };
18504 static char const bs01[] = { '\\\\' + 1, 0 };
18505 int result = 0;
18506 if (!n ("a*", "", 0))
18507 return 1;
18508 if (!y ("a*", "abc", 0))
18509 return 1;
18510 if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */
18511 return 1;
18512 if (!n ("d*/*1", "d/s/1", FNM_PATHNAME))
18513 return 2;
18514 if (!y ("a\\\\bc", "abc", 0))
18515 return 3;
18516 if (!n ("a\\\\bc", "abc", FNM_NOESCAPE))
18517 return 3;
18518 if (!y ("*x", ".x", 0))
18519 return 4;
18520 if (!n ("*x", ".x", FNM_PERIOD))
18521 return 4;
18522 if (!y (Apat, "\\\\", 0))
18523 return 5;
18524 if (!y (Apat, "A", 0))
18525 return 5;
18526 if (!y (apat, "\\\\", 0))
18527 return 5;
18528 if (!y (apat, "a", 0))
18529 return 5;
18530 if (!(n (Apat, A_1, 0) == ('A' < '\\\\')))
18531 return 5;
18532 if (!(n (apat, a_1, 0) == ('a' < '\\\\')))
18533 return 5;
18534 if (!(y (Apat, A01, 0) == ('A' < '\\\\')))
18535 return 5;
18536 if (!(y (apat, a01, 0) == ('a' < '\\\\')))
18537 return 5;
18538 if (!(y (Apat, bs_1, 0) == ('A' < '\\\\')))
18539 return 5;
18540 if (!(y (apat, bs_1, 0) == ('a' < '\\\\')))
18541 return 5;
18542 if (!(n (Apat, bs01, 0) == ('A' < '\\\\')))
18543 return 5;
18544 if (!(n (apat, bs01, 0) == ('a' < '\\\\')))
18545 return 5;
18546 $gl_fnmatch_gnu_start
18547 if (!y ("xxXX", "xXxX", FNM_CASEFOLD))
18548 result |= 8;
18549 if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH))
18550 result |= 16;
18551 if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME))
18552 result |= 32;
18553 if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR))
18554 result |= 64;
18555 if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR))
18556 result |= 64;
18557 if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR))
18558 result |= 64;
18559 $gl_fnmatch_gnu_end
18560 return result;
18561
18562 ;
18563 return 0;
18564 }
18565 _ACEOF
18566 if ac_fn_c_try_run "$LINENO"; then :
18567 eval "$gl_fnmatch_cache_var=yes"
18568 else
18569 eval "$gl_fnmatch_cache_var=no"
18570 fi
18571 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18572 conftest.$ac_objext conftest.beam conftest.$ac_ext
18573 fi
18574
18575
18576 fi
18577 eval ac_res=\$$gl_fnmatch_cache_var
18578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18579 $as_echo "$ac_res" >&6; }
18580 eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\""
18581 if test "$gl_fnmatch_result" = yes; then
18582 rm -f "$gl_source_base/fnmatch.h"
18583 else
18584 FNMATCH_H=fnmatch.h
18585 fi
18586
18587 if test -n "$FNMATCH_H"; then
18588 GL_GENERATE_FNMATCH_H_TRUE=
18589 GL_GENERATE_FNMATCH_H_FALSE='#'
18590 else
18591 GL_GENERATE_FNMATCH_H_TRUE='#'
18592 GL_GENERATE_FNMATCH_H_FALSE=
18593 fi
18594
18595
18596 if test -n "$FNMATCH_H"; then
18597
18598
18599
18600
18601
18602
18603
18604
18605 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
18606
18607
18608
18609 cat >>confdefs.h <<_ACEOF
18610 #define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
18611 _ACEOF
18612
18613
18614 ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
18615 "
18616 if test "x$ac_cv_have_decl_isblank" = xyes; then :
18617 ac_have_decl=1
18618 else
18619 ac_have_decl=0
18620 fi
18621
18622 cat >>confdefs.h <<_ACEOF
18623 #define HAVE_DECL_ISBLANK $ac_have_decl
18624 _ACEOF
18625
18626
18627 :
18628
18629
18630
18631
18632
18633
18634
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 fi
18663
18664
18665
18666
18667
18668 if test -n "$FNMATCH_H"; then
18669
18670
18671
18672
18673
18674
18675
18676
18677 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
18678
18679
18680
18681 cat >>confdefs.h <<_ACEOF
18682 #define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
18683 _ACEOF
18684
18685
18686 ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
18687 "
18688 if test "x$ac_cv_have_decl_isblank" = xyes; then :
18689 ac_have_decl=1
18690 else
18691 ac_have_decl=0
18692 fi
18693
18694 cat >>confdefs.h <<_ACEOF
18695 #define HAVE_DECL_ISBLANK $ac_have_decl
18696 _ACEOF
18697
18698
18699 :
18700
18701
18702
18703
18704
18705
18706
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 fi
18735
18736
18737
18738 FREXP_LIBM=
18739 if test $gl_cv_func_frexp_no_libm = no; then
18740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used with libm" >&5
18741 $as_echo_n "checking whether frexp() can be used with libm... " >&6; }
18742 if ${gl_cv_func_frexp_in_libm+:} false; then :
18743 $as_echo_n "(cached) " >&6
18744 else
18745
18746 save_LIBS="$LIBS"
18747 LIBS="$LIBS -lm"
18748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18749 /* end confdefs.h. */
18750 #include <math.h>
18751 double x;
18752 int
18753 main ()
18754 {
18755 int e; return frexp (x, &e) > 0;
18756 ;
18757 return 0;
18758 }
18759 _ACEOF
18760 if ac_fn_c_try_link "$LINENO"; then :
18761 gl_cv_func_frexp_in_libm=yes
18762 else
18763 gl_cv_func_frexp_in_libm=no
18764 fi
18765 rm -f core conftest.err conftest.$ac_objext \
18766 conftest$ac_exeext conftest.$ac_ext
18767 LIBS="$save_LIBS"
18768
18769 fi
18770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_in_libm" >&5
18771 $as_echo "$gl_cv_func_frexp_in_libm" >&6; }
18772 if test $gl_cv_func_frexp_in_libm = yes; then
18773 FREXP_LIBM=-lm
18774 fi
18775 fi
18776 if test $gl_cv_func_frexp_no_libm = yes \
18777 || test $gl_cv_func_frexp_in_libm = yes; then
18778 save_LIBS="$LIBS"
18779 LIBS="$LIBS $FREXP_LIBM"
18780
18781
18782
18783 :
18784
18785
18786
18787
18788
18789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
18790 $as_echo_n "checking whether frexp works... " >&6; }
18791 if ${gl_cv_func_frexp_works+:} false; then :
18792 $as_echo_n "(cached) " >&6
18793 else
18794
18795 if test "$cross_compiling" = yes; then :
18796 case "$host_os" in
18797 netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";;
18798 *) gl_cv_func_frexp_works="guessing yes";;
18799 esac
18800
18801 else
18802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18803 /* end confdefs.h. */
18804
18805 #include <float.h>
18806 #include <math.h>
18807 #include <string.h>
18808 #if HAVE_DECL_ALARM
18809 # include <signal.h>
18810 # include <unistd.h>
18811 #endif
18812 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
18813 ICC 10.0 has a bug when optimizing the expression -zero.
18814 The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
18815 to PowerPC on Mac OS X 10.5. */
18816 #if defined __hpux || defined __sgi || defined __ICC
18817 static double
18818 compute_minus_zero (void)
18819 {
18820 return -DBL_MIN * DBL_MIN;
18821 }
18822 # define minus_zero compute_minus_zero ()
18823 #else
18824 double minus_zero = -0.0;
18825 #endif
18826 int main()
18827 {
18828 int result = 0;
18829 int i;
18830 volatile double x;
18831 double zero = 0.0;
18832 #if HAVE_DECL_ALARM
18833 /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
18834 number. Let the test fail in this case. */
18835 signal (SIGALRM, SIG_DFL);
18836 alarm (5);
18837 #endif
18838 /* Test on denormalized numbers. */
18839 for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
18840 ;
18841 if (x > 0.0)
18842 {
18843 int exp;
18844 double y = frexp (x, &exp);
18845 /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
18846 On NetBSD: y = 0.75. Correct: y = 0.5. */
18847 if (y != 0.5)
18848 result |= 1;
18849 }
18850 /* Test on infinite numbers. */
18851 x = 1.0 / zero;
18852 {
18853 int exp;
18854 double y = frexp (x, &exp);
18855 if (y != x)
18856 result |= 2;
18857 }
18858 /* Test on negative zero. */
18859 x = minus_zero;
18860 {
18861 int exp;
18862 double y = frexp (x, &exp);
18863 if (memcmp (&y, &x, sizeof x))
18864 result |= 4;
18865 }
18866 return result;
18867 }
18868 _ACEOF
18869 if ac_fn_c_try_run "$LINENO"; then :
18870 gl_cv_func_frexp_works=yes
18871 else
18872 gl_cv_func_frexp_works=no
18873 fi
18874 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18875 conftest.$ac_objext conftest.beam conftest.$ac_ext
18876 fi
18877
18878
18879 fi
18880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
18881 $as_echo "$gl_cv_func_frexp_works" >&6; }
18882
18883 LIBS="$save_LIBS"
18884 case "$gl_cv_func_frexp_works" in
18885 *yes) gl_func_frexp=yes ;;
18886 *) gl_func_frexp=no; REPLACE_FREXP=1; FREXP_LIBM= ;;
18887 esac
18888 else
18889 gl_func_frexp=no
18890 fi
18891 if test $gl_func_frexp = yes; then
18892
18893 $as_echo "#define HAVE_FREXP 1" >>confdefs.h
18894
18895 fi
18896
18897
18898 if test $gl_func_frexp != yes; then
18899
18900
18901
18902
18903
18904
18905
18906
18907 gl_LIBOBJS="$gl_LIBOBJS frexp.$ac_objext"
18908
18909 fi
18910
18911
18912
18913
18914
18915 GNULIB_FREXP=1
18916
18917
18918
18919
18920
18921 $as_echo "#define GNULIB_TEST_FREXP 1" >>confdefs.h
18922
18923
18924
18925
18926
18927
18928
18929
18930
18931 ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
18932 "
18933 if test "x$ac_cv_have_decl_frexpl" = xyes; then :
18934
18935 else
18936 HAVE_DECL_FREXPL=0
18937 fi
18938
18939
18940 FREXPL_LIBM=
18941 if test $HAVE_DECL_FREXPL = 1; then
18942
18943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
18944 $as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; }
18945 if ${gl_cv_func_frexpl_no_libm+:} false; then :
18946 $as_echo_n "(cached) " >&6
18947 else
18948
18949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18950 /* end confdefs.h. */
18951 #include <math.h>
18952 long double x;
18953 int
18954 main ()
18955 {
18956 int e; return frexpl (x, &e) > 0;
18957 ;
18958 return 0;
18959 }
18960 _ACEOF
18961 if ac_fn_c_try_link "$LINENO"; then :
18962 gl_cv_func_frexpl_no_libm=yes
18963 else
18964 gl_cv_func_frexpl_no_libm=no
18965 fi
18966 rm -f core conftest.err conftest.$ac_objext \
18967 conftest$ac_exeext conftest.$ac_ext
18968
18969 fi
18970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
18971 $as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
18972
18973 if test $gl_cv_func_frexpl_no_libm = no; then
18974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used with libm" >&5
18975 $as_echo_n "checking whether frexpl() can be used with libm... " >&6; }
18976 if ${gl_cv_func_frexpl_in_libm+:} false; then :
18977 $as_echo_n "(cached) " >&6
18978 else
18979
18980 save_LIBS="$LIBS"
18981 LIBS="$LIBS -lm"
18982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18983 /* end confdefs.h. */
18984 #include <math.h>
18985 long double x;
18986 int
18987 main ()
18988 {
18989 int e; return frexpl (x, &e) > 0;
18990 ;
18991 return 0;
18992 }
18993 _ACEOF
18994 if ac_fn_c_try_link "$LINENO"; then :
18995 gl_cv_func_frexpl_in_libm=yes
18996 else
18997 gl_cv_func_frexpl_in_libm=no
18998 fi
18999 rm -f core conftest.err conftest.$ac_objext \
19000 conftest$ac_exeext conftest.$ac_ext
19001 LIBS="$save_LIBS"
19002
19003 fi
19004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_in_libm" >&5
19005 $as_echo "$gl_cv_func_frexpl_in_libm" >&6; }
19006 if test $gl_cv_func_frexpl_in_libm = yes; then
19007 FREXPL_LIBM=-lm
19008 fi
19009 fi
19010 if test $gl_cv_func_frexpl_no_libm = yes \
19011 || test $gl_cv_func_frexpl_in_libm = yes; then
19012 save_LIBS="$LIBS"
19013 LIBS="$LIBS $FREXPL_LIBM"
19014
19015
19016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
19017 $as_echo_n "checking whether frexpl works... " >&6; }
19018 if ${gl_cv_func_frexpl_works+:} false; then :
19019 $as_echo_n "(cached) " >&6
19020 else
19021
19022 if test "$cross_compiling" = yes; then :
19023
19024 case "$host_os" in
19025 aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
19026 gl_cv_func_frexpl_works="guessing no";;
19027 *) gl_cv_func_frexpl_works="guessing yes";;
19028 esac
19029
19030 else
19031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19032 /* end confdefs.h. */
19033
19034 #include <float.h>
19035 #include <math.h>
19036 /* Override the values of <float.h>, like done in float.in.h. */
19037 #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
19038 # undef LDBL_MIN_EXP
19039 # define LDBL_MIN_EXP (-16381)
19040 #endif
19041 #if defined __i386__ && defined __FreeBSD__
19042 # undef LDBL_MIN_EXP
19043 # define LDBL_MIN_EXP (-16381)
19044 #endif
19045 #if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
19046 # undef LDBL_MIN_EXP
19047 # define LDBL_MIN_EXP DBL_MIN_EXP
19048 #endif
19049 #if defined __sgi && (LDBL_MANT_DIG >= 106)
19050 # if defined __GNUC__
19051 # undef LDBL_MIN_EXP
19052 # define LDBL_MIN_EXP DBL_MIN_EXP
19053 # endif
19054 #endif
19055 extern
19056 #ifdef __cplusplus
19057 "C"
19058 #endif
19059 long double frexpl (long double, int *);
19060 int main()
19061 {
19062 int result = 0;
19063 volatile long double x;
19064 /* Test on finite numbers that fails on AIX 5.1. */
19065 x = 16.0L;
19066 {
19067 int exp = -9999;
19068 frexpl (x, &exp);
19069 if (exp != 5)
19070 result |= 1;
19071 }
19072 /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
19073 function returns an invalid (incorrectly normalized) value: it returns
19074 y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
19075 but the correct result is
19076 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */
19077 x = 1.01L;
19078 {
19079 int exp = -9999;
19080 long double y = frexpl (x, &exp);
19081 if (!(exp == 1 && y == 0.505L))
19082 result |= 2;
19083 }
19084 /* Test on large finite numbers. This fails on BeOS at i = 16322, while
19085 LDBL_MAX_EXP = 16384.
19086 In the loop end test, we test x against Infinity, rather than comparing
19087 i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */
19088 {
19089 int i;
19090 for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
19091 {
19092 int exp = -9999;
19093 frexpl (x, &exp);
19094 if (exp != i)
19095 {
19096 result |= 4;
19097 break;
19098 }
19099 }
19100 }
19101 /* Test on denormalized numbers. */
19102 {
19103 int i;
19104 for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
19105 ;
19106 if (x > 0.0L)
19107 {
19108 int exp;
19109 long double y = frexpl (x, &exp);
19110 /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
19111 exp = -16382, y = 0.5. On Mac OS X 10.5: exp = -16384, y = 0.5. */
19112 if (exp != LDBL_MIN_EXP - 1)
19113 result |= 8;
19114 }
19115 }
19116 /* Test on infinite numbers. */
19117 x = 1.0L / 0.0L;
19118 {
19119 int exp;
19120 long double y = frexpl (x, &exp);
19121 if (y != x)
19122 result |= 16;
19123 }
19124 return result;
19125 }
19126 _ACEOF
19127 if ac_fn_c_try_run "$LINENO"; then :
19128 gl_cv_func_frexpl_works=yes
19129 else
19130 gl_cv_func_frexpl_works=no
19131 fi
19132 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19133 conftest.$ac_objext conftest.beam conftest.$ac_ext
19134 fi
19135
19136
19137 fi
19138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
19139 $as_echo "$gl_cv_func_frexpl_works" >&6; }
19140
19141 LIBS="$save_LIBS"
19142 case "$gl_cv_func_frexpl_works" in
19143 *yes) gl_func_frexpl=yes ;;
19144 *) gl_func_frexpl=no; REPLACE_FREXPL=1 ;;
19145 esac
19146 else
19147 gl_func_frexpl=no
19148 fi
19149 if test $gl_func_frexpl = yes; then
19150
19151 $as_echo "#define HAVE_FREXPL 1" >>confdefs.h
19152
19153 fi
19154 fi
19155 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
19156 if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then
19157
19158 FREXPL_LIBM="$FREXP_LIBM"
19159 else
19160 FREXPL_LIBM=
19161 fi
19162 fi
19163
19164
19165 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
19166
19167
19168
19169
19170
19171
19172
19173
19174 gl_LIBOBJS="$gl_LIBOBJS frexpl.$ac_objext"
19175
19176 fi
19177
19178
19179
19180
19181
19182 GNULIB_FREXPL=1
19183
19184
19185
19186
19187
19188 $as_echo "#define GNULIB_TEST_FREXPL 1" >>confdefs.h
19189
19190
19191
19192
19193
19194
19195
19196 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
19197 REPLACE_FSTAT=1
19198 fi
19199
19200
19201 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
19202 REPLACE_FSTAT=1
19203 fi
19204
19205
19206
19207
19208
19209 :
19210
19211
19212
19213
19214
19215 if test $ac_cv_func_fchdir = no; then
19216 HAVE_FCHDIR=0
19217 fi
19218
19219 if test $HAVE_FCHDIR = 0; then
19220 case "$gl_cv_func_open_directory_works" in
19221 *yes) ;;
19222 *)
19223 REPLACE_FSTAT=1
19224 ;;
19225 esac
19226 fi
19227
19228
19229 if test $REPLACE_FSTAT = 1; then
19230
19231
19232
19233
19234
19235
19236
19237
19238 gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
19239
19240 :
19241 fi
19242
19243
19244
19245
19246
19247 GNULIB_FSTAT=1
19248
19249
19250
19251
19252
19253 $as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
19254
19255
19256
19257
19258
19259
19260
19261
19262 :
19263
19264
19265
19266
19267
19268
19269 if test $ac_cv_func_fstatat = no; then
19270 HAVE_FSTATAT=0
19271 else
19272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
19273 $as_echo_n "checking whether fstatat (..., 0) works... " >&6; }
19274 if ${gl_cv_func_fstatat_zero_flag+:} false; then :
19275 $as_echo_n "(cached) " >&6
19276 else
19277 if test "$cross_compiling" = yes; then :
19278 case "$host_os" in
19279 aix*) gl_cv_func_fstatat_zero_flag="guessing no";;
19280 *) gl_cv_func_fstatat_zero_flag="guessing yes";;
19281 esac
19282
19283 else
19284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19285 /* end confdefs.h. */
19286
19287 #include <fcntl.h>
19288 #include <sys/stat.h>
19289 int
19290 main (void)
19291 {
19292 struct stat a;
19293 return fstatat (AT_FDCWD, ".", &a, 0) != 0;
19294 }
19295
19296 _ACEOF
19297 if ac_fn_c_try_run "$LINENO"; then :
19298 gl_cv_func_fstatat_zero_flag=yes
19299 else
19300 gl_cv_func_fstatat_zero_flag=no
19301 fi
19302 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19303 conftest.$ac_objext conftest.beam conftest.$ac_ext
19304 fi
19305
19306
19307 fi
19308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
19309 $as_echo "$gl_cv_func_fstatat_zero_flag" >&6; }
19310
19311 case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
19312 *yes+*yes) ;;
19313 *) REPLACE_FSTATAT=1
19314 case $gl_cv_func_fstatat_zero_flag in
19315 *yes)
19316
19317 $as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
19318
19319 ;;
19320 esac
19321 ;;
19322 esac
19323 fi
19324
19325 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
19326
19327
19328
19329
19330
19331
19332
19333
19334 gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
19335
19336 fi
19337
19338
19339
19340
19341
19342 GNULIB_FSTATAT=1
19343
19344
19345
19346
19347
19348 $as_echo "#define GNULIB_TEST_FSTATAT 1" >>confdefs.h
19349
19350
19351
19352
19353
19354
19355
19356
19357 gl_abort_bug=no
19358 case "$host_os" in
19359 mingw*)
19360 gl_cv_func_getcwd_path_max=yes
19361 ;;
19362 *)
19363
19364
19365 :
19366
19367
19368
19369
19370
19371
19372
19373 :
19374
19375
19376
19377
19378
19379
19380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd handles long file names properly" >&5
19381 $as_echo_n "checking whether getcwd handles long file names properly... " >&6; }
19382 if ${gl_cv_func_getcwd_path_max+:} false; then :
19383 $as_echo_n "(cached) " >&6
19384 else
19385 # Arrange for deletion of the temporary directory this test creates.
19386 ac_clean_files="$ac_clean_files confdir3"
19387 if test "$cross_compiling" = yes; then :
19388 # Cross-compilation guesses:
19389 case "$host_os" in
19390 aix*) # On AIX, it has the AIX bug.
19391 gl_cv_func_getcwd_path_max='no, it has the AIX bug' ;;
19392 gnu*) # On Hurd, it is 'yes'.
19393 gl_cv_func_getcwd_path_max=yes ;;
19394 linux* | kfreebsd*)
19395 # On older Linux+glibc it's 'no, but it is partly working',
19396 # on newer Linux+glibc it's 'yes'.
19397 # On Linux+musl libc, it's 'no, but it is partly working'.
19398 # On kFreeBSD+glibc, it's 'no, but it is partly working'.
19399 gl_cv_func_getcwd_path_max='no, but it is partly working' ;;
19400 *) # If we don't know, assume the worst.
19401 gl_cv_func_getcwd_path_max=no ;;
19402 esac
19403
19404 else
19405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19406 /* end confdefs.h. */
19407
19408 #include <errno.h>
19409 #include <stdlib.h>
19410 #if HAVE_UNISTD_H
19411 # include <unistd.h>
19412 #else
19413 # include <direct.h>
19414 #endif
19415 #include <string.h>
19416 #include <limits.h>
19417 #include <sys/stat.h>
19418 #include <sys/types.h>
19419 #include <fcntl.h>
19420
19421
19422 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
19423 #if HAVE_UNISTD_H
19424 # include <unistd.h>
19425 #endif
19426 #include <limits.h>
19427 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
19428 # include <sys/param.h>
19429 #endif
19430 #if !defined PATH_MAX && defined MAXPATHLEN
19431 # define PATH_MAX MAXPATHLEN
19432 #endif
19433 #ifdef __hpux
19434 # undef PATH_MAX
19435 # define PATH_MAX 1024
19436 #endif
19437 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
19438 # undef PATH_MAX
19439 # define PATH_MAX 260
19440 #endif
19441
19442
19443 #ifndef AT_FDCWD
19444 # define AT_FDCWD 0
19445 #endif
19446 #ifdef ENAMETOOLONG
19447 # define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG)
19448 #else
19449 # define is_ENAMETOOLONG(x) 0
19450 #endif
19451
19452 /* Use the getcwd function, not any macro. */
19453 #undef getcwd
19454
19455 /* Don't get link errors because mkdir is redefined to rpl_mkdir. */
19456 #undef mkdir
19457
19458 #ifndef S_IRWXU
19459 # define S_IRWXU 0700
19460 #endif
19461
19462 /* The length of this name must be 8. */
19463 #define DIR_NAME "confdir3"
19464 #define DIR_NAME_LEN 8
19465 #define DIR_NAME_SIZE (DIR_NAME_LEN + 1)
19466
19467 /* The length of "../". */
19468 #define DOTDOTSLASH_LEN 3
19469
19470 /* Leftover bytes in the buffer, to work around library or OS bugs. */
19471 #define BUF_SLOP 20
19472
19473 int
19474 main ()
19475 {
19476 #ifndef PATH_MAX
19477 /* The Hurd doesn't define this, so getcwd can't exhibit the bug --
19478 at least not on a local file system. And if we were to start worrying
19479 about remote file systems, we'd have to enable the wrapper function
19480 all of the time, just to be safe. That's not worth the cost. */
19481 exit (0);
19482 #elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \
19483 - DIR_NAME_SIZE - BUF_SLOP) \
19484 <= PATH_MAX)
19485 /* FIXME: Assuming there's a system for which this is true,
19486 this should be done in a compile test. */
19487 exit (0);
19488 #else
19489 char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1)
19490 + DIR_NAME_SIZE + BUF_SLOP];
19491 char *cwd = getcwd (buf, PATH_MAX);
19492 size_t initial_cwd_len;
19493 size_t cwd_len;
19494 int fail = 0;
19495 size_t n_chdirs = 0;
19496
19497 if (cwd == NULL)
19498 exit (10);
19499
19500 cwd_len = initial_cwd_len = strlen (cwd);
19501
19502 while (1)
19503 {
19504 size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN);
19505 char *c = NULL;
19506
19507 cwd_len += DIR_NAME_SIZE;
19508 /* If mkdir or chdir fails, it could be that this system cannot create
19509 any file with an absolute name longer than PATH_MAX, such as cygwin.
19510 If so, leave fail as 0, because the current working directory can't
19511 be too long for getcwd if it can't even be created. For other
19512 errors, be pessimistic and consider that as a failure, too. */
19513 if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0)
19514 {
19515 if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
19516 fail = 20;
19517 break;
19518 }
19519
19520 if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE)
19521 {
19522 struct stat sb;
19523
19524 c = getcwd (buf, PATH_MAX);
19525 if (!c && errno == ENOENT)
19526 {
19527 fail = 11;
19528 break;
19529 }
19530 if (c)
19531 {
19532 fail = 31;
19533 break;
19534 }
19535 if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
19536 {
19537 fail = 21;
19538 break;
19539 }
19540
19541 /* Our replacement needs to be able to stat() long ../../paths,
19542 so generate a path larger than PATH_MAX to check,
19543 avoiding the replacement if we can't stat(). */
19544 c = getcwd (buf, cwd_len + 1);
19545 if (c && !AT_FDCWD && stat (c, &sb) != 0 && is_ENAMETOOLONG (errno))
19546 {
19547 fail = 32;
19548 break;
19549 }
19550 }
19551
19552 if (dotdot_max <= cwd_len - initial_cwd_len)
19553 {
19554 if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len)
19555 break;
19556 c = getcwd (buf, cwd_len + 1);
19557 if (!c)
19558 {
19559 if (! (errno == ERANGE || errno == ENOENT
19560 || is_ENAMETOOLONG (errno)))
19561 {
19562 fail = 22;
19563 break;
19564 }
19565 if (AT_FDCWD || errno == ERANGE || errno == ENOENT)
19566 {
19567 fail = 12;
19568 break;
19569 }
19570 }
19571 }
19572
19573 if (c && strlen (c) != cwd_len)
19574 {
19575 fail = 23;
19576 break;
19577 }
19578 ++n_chdirs;
19579 }
19580
19581 /* Leaving behind such a deep directory is not polite.
19582 So clean up here, right away, even though the driving
19583 shell script would also clean up. */
19584 {
19585 size_t i;
19586
19587 /* Try rmdir first, in case the chdir failed. */
19588 rmdir (DIR_NAME);
19589 for (i = 0; i <= n_chdirs; i++)
19590 {
19591 if (chdir ("..") < 0)
19592 break;
19593 if (rmdir (DIR_NAME) != 0)
19594 break;
19595 }
19596 }
19597
19598 exit (fail);
19599 #endif
19600 }
19601
19602 _ACEOF
19603 if ac_fn_c_try_run "$LINENO"; then :
19604 gl_cv_func_getcwd_path_max=yes
19605 else
19606 case $? in
19607 10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';;
19608 31) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
19609 32) gl_cv_func_getcwd_path_max='yes, but with shorter paths';;
19610 *) gl_cv_func_getcwd_path_max=no;;
19611 esac
19612 fi
19613 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19614 conftest.$ac_objext conftest.beam conftest.$ac_ext
19615 fi
19616
19617
19618 fi
19619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_path_max" >&5
19620 $as_echo "$gl_cv_func_getcwd_path_max" >&6; }
19621
19622 case "$gl_cv_func_getcwd_null" in
19623 *yes)
19624
19625
19626 :
19627
19628
19629
19630
19631
19632
19633 :
19634
19635
19636
19637
19638
19639
19640 for ac_func in getpagesize
19641 do :
19642 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
19643 if test "x$ac_cv_func_getpagesize" = xyes; then :
19644 cat >>confdefs.h <<_ACEOF
19645 #define HAVE_GETPAGESIZE 1
19646 _ACEOF
19647
19648 fi
19649 done
19650
19651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd aborts when 4k < cwd_length < 16k" >&5
19652 $as_echo_n "checking whether getcwd aborts when 4k < cwd_length < 16k... " >&6; }
19653 if ${gl_cv_func_getcwd_abort_bug+:} false; then :
19654 $as_echo_n "(cached) " >&6
19655 else
19656 # Remove any remnants of a previous test.
19657 rm -rf confdir-14B---
19658 # Arrange for deletion of the temporary directory this test creates.
19659 ac_clean_files="$ac_clean_files confdir-14B---"
19660 if test "$cross_compiling" = yes; then :
19661 gl_cv_func_getcwd_abort_bug=yes
19662 else
19663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19664 /* end confdefs.h. */
19665
19666 #include <errno.h>
19667 #include <stdlib.h>
19668 #if HAVE_UNISTD_H
19669 # include <unistd.h>
19670 #else /* on Windows with MSVC */
19671 # include <direct.h>
19672 #endif
19673 #include <string.h>
19674 #include <sys/stat.h>
19675
19676
19677 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
19678 #if HAVE_UNISTD_H
19679 # include <unistd.h>
19680 #endif
19681 #include <limits.h>
19682 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
19683 # include <sys/param.h>
19684 #endif
19685 #if !defined PATH_MAX && defined MAXPATHLEN
19686 # define PATH_MAX MAXPATHLEN
19687 #endif
19688 #ifdef __hpux
19689 # undef PATH_MAX
19690 # define PATH_MAX 1024
19691 #endif
19692 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
19693 # undef PATH_MAX
19694 # define PATH_MAX 260
19695 #endif
19696
19697
19698 /* Don't get link errors because mkdir is redefined to rpl_mkdir. */
19699 #undef mkdir
19700
19701 #ifndef S_IRWXU
19702 # define S_IRWXU 0700
19703 #endif
19704
19705 /* FIXME: skip the run-test altogether on systems without getpagesize. */
19706 #if ! HAVE_GETPAGESIZE
19707 # define getpagesize() 0
19708 #endif
19709
19710 /* This size is chosen to be larger than PATH_MAX (4k), yet smaller than
19711 the 16kB pagesize on ia64 linux. Those conditions make the code below
19712 trigger a bug in glibc's getcwd implementation before 2.4.90-10. */
19713 #define TARGET_LEN (5 * 1024)
19714
19715 int
19716 main ()
19717 {
19718 char *cwd;
19719 size_t initial_cwd_len;
19720 int fail = 0;
19721
19722 /* The bug is triggered when PATH_MAX < getpagesize (), so skip
19723 this relatively expensive and invasive test if that's not true. */
19724 #ifdef PATH_MAX
19725 int bug_possible = PATH_MAX < getpagesize ();
19726 #else
19727 int bug_possible = 0;
19728 #endif
19729 if (! bug_possible)
19730 return 0;
19731
19732 cwd = getcwd (NULL, 0);
19733 if (cwd == NULL)
19734 return 2;
19735
19736 initial_cwd_len = strlen (cwd);
19737 free (cwd);
19738
19739 if (1)
19740 {
19741 static char const dir_name[] = "confdir-14B---";
19742 size_t desired_depth = ((TARGET_LEN - 1 - initial_cwd_len)
19743 / sizeof dir_name);
19744 size_t d;
19745 for (d = 0; d < desired_depth; d++)
19746 {
19747 if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0)
19748 {
19749 if (! (errno == ERANGE || errno == ENAMETOOLONG
19750 || errno == ENOENT))
19751 fail = 3; /* Unable to construct deep hierarchy. */
19752 break;
19753 }
19754 }
19755
19756 /* If libc has the bug in question, this invocation of getcwd
19757 results in a failed assertion. */
19758 cwd = getcwd (NULL, 0);
19759 if (cwd == NULL)
19760 fail = 4; /* getcwd didn't assert, but it failed for a long name
19761 where the answer could have been learned. */
19762 free (cwd);
19763
19764 /* Call rmdir first, in case the above chdir failed. */
19765 rmdir (dir_name);
19766 while (0 < d--)
19767 {
19768 if (chdir ("..") < 0)
19769 {
19770 fail = 5;
19771 break;
19772 }
19773 rmdir (dir_name);
19774 }
19775 }
19776
19777 return fail;
19778 }
19779
19780 _ACEOF
19781 if ac_fn_c_try_run "$LINENO"; then :
19782 gl_cv_func_getcwd_abort_bug=no
19783 else
19784 ret=$?
19785 if test $ret -ge 128 || test $ret = 4; then
19786 gl_cv_func_getcwd_abort_bug=yes
19787 else
19788 gl_cv_func_getcwd_abort_bug=no
19789 fi
19790 fi
19791 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19792 conftest.$ac_objext conftest.beam conftest.$ac_ext
19793 fi
19794
19795
19796 fi
19797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_abort_bug" >&5
19798 $as_echo "$gl_cv_func_getcwd_abort_bug" >&6; }
19799 if test $gl_cv_func_getcwd_abort_bug = yes; then :
19800 gl_abort_bug=yes
19801 fi
19802
19803 ;;
19804 esac
19805 ;;
19806 esac
19807 case "$gl_cv_func_getcwd_path_max" in
19808 "no"|"no, it has the AIX bug") ;;
19809 *)
19810
19811 $as_echo "#define HAVE_MINIMALLY_WORKING_GETCWD 1" >>confdefs.h
19812
19813 ;;
19814 esac
19815 case "$gl_cv_func_getcwd_path_max" in
19816 "no, but it is partly working")
19817
19818 $as_echo "#define HAVE_PARTLY_WORKING_GETCWD 1" >>confdefs.h
19819
19820 ;;
19821 "yes, but with shorter paths")
19822
19823 $as_echo "#define HAVE_GETCWD_SHORTER 1" >>confdefs.h
19824
19825 ;;
19826 esac
19827
19828 if { case "$gl_cv_func_getcwd_null" in *yes) false;; *) true;; esac; } \
19829 || test $gl_cv_func_getcwd_posix_signature != yes \
19830 || { case "$gl_cv_func_getcwd_path_max" in *yes*) false;; *) true;; esac; } \
19831 || test $gl_abort_bug = yes; then
19832 REPLACE_GETCWD=1
19833 fi
19834
19835 if test $REPLACE_GETCWD = 1; then
19836
19837
19838
19839
19840
19841
19842
19843
19844 gl_LIBOBJS="$gl_LIBOBJS getcwd.$ac_objext"
19845
19846
19847
19848
19849 :
19850
19851 fi
19852
19853
19854 cat >>confdefs.h <<_ACEOF
19855 #define GNULIB_GETCWD 1
19856 _ACEOF
19857
19858
19859
19860
19861
19862
19863
19864 GNULIB_GETCWD=1
19865
19866
19867
19868
19869
19870 $as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
19871
19872
19873
19874
19875
19876
19877
19878
19879 case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
19880 *yes,yes) ;;
19881 *)
19882 REPLACE_GETCWD=1
19883 ;;
19884 esac
19885
19886 if test $REPLACE_GETCWD = 1; then
19887
19888
19889
19890
19891
19892
19893
19894
19895 gl_LIBOBJS="$gl_LIBOBJS getcwd-lgpl.$ac_objext"
19896
19897 fi
19898
19899
19900
19901
19902
19903 GNULIB_GETCWD=1
19904
19905
19906
19907
19908
19909 $as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
19910
19911
19912
19913
19914
19915
19916
19917 :
19918
19919
19920
19921
19922
19923
19924 :
19925
19926
19927
19928
19929
19930 if test $ac_cv_func_getdtablesize = yes &&
19931 test $ac_cv_have_decl_getdtablesize = yes; then
19932 # Cygwin 1.7.25 automatically increases the RLIMIT_NOFILE soft limit
19933 # up to an unchangeable hard limit; all other platforms correctly
19934 # require setrlimit before getdtablesize() can report a larger value.
19935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
19936 $as_echo_n "checking whether getdtablesize works... " >&6; }
19937 if ${gl_cv_func_getdtablesize_works+:} false; then :
19938 $as_echo_n "(cached) " >&6
19939 else
19940 if test "$cross_compiling" = yes; then :
19941 case "$host_os" in
19942 cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
19943 gl_cv_func_getdtablesize_works="guessing no" ;;
19944 *) gl_cv_func_getdtablesize_works="guessing yes" ;;
19945 esac
19946 else
19947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19948 /* end confdefs.h. */
19949
19950 #include <unistd.h>
19951 int
19952 main ()
19953 {
19954 int size = getdtablesize();
19955 if (dup2 (0, getdtablesize()) != -1)
19956 return 1;
19957 if (size != getdtablesize())
19958 return 2;
19959
19960 ;
19961 return 0;
19962 }
19963 _ACEOF
19964 if ac_fn_c_try_run "$LINENO"; then :
19965 gl_cv_func_getdtablesize_works=yes
19966 else
19967 gl_cv_func_getdtablesize_works=no
19968 fi
19969 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19970 conftest.$ac_objext conftest.beam conftest.$ac_ext
19971 fi
19972
19973
19974 fi
19975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
19976 $as_echo "$gl_cv_func_getdtablesize_works" >&6; }
19977 case "$gl_cv_func_getdtablesize_works" in
19978 *yes) ;;
19979 *) REPLACE_GETDTABLESIZE=1 ;;
19980 esac
19981 else
19982 HAVE_GETDTABLESIZE=0
19983 fi
19984
19985 if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
19986
19987
19988
19989
19990
19991
19992
19993
19994 gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
19995
19996 :
19997 fi
19998
19999
20000
20001
20002
20003 GNULIB_GETDTABLESIZE=1
20004
20005
20006
20007
20008
20009 $as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
20010
20011
20012
20013
20014
20015
20016
20017
20018
20019 :
20020
20021
20022
20023
20024
20025 if test $ac_cv_have_decl_getlogin_r = no; then
20026 HAVE_DECL_GETLOGIN_R=0
20027 fi
20028
20029
20030 :
20031
20032
20033
20034
20035
20036 if test $ac_cv_func_getlogin_r = no; then
20037 HAVE_GETLOGIN_R=0
20038 else
20039 HAVE_GETLOGIN_R=1
20040
20041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getlogin_r works with small buffers" >&5
20042 $as_echo_n "checking whether getlogin_r works with small buffers... " >&6; }
20043 if ${gl_cv_func_getlogin_r_works+:} false; then :
20044 $as_echo_n "(cached) " >&6
20045 else
20046
20047 case "$host_os" in
20048 # Guess no on OSF/1.
20049 osf*) gl_cv_func_getlogin_r_works="guessing no" ;;
20050 # Guess yes otherwise.
20051 *) gl_cv_func_getlogin_r_works="guessing yes" ;;
20052 esac
20053 if test "$cross_compiling" = yes; then :
20054 :
20055 else
20056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20057 /* end confdefs.h. */
20058
20059 #include <stddef.h>
20060 #include <unistd.h>
20061 #if !HAVE_DECL_GETLOGIN_R
20062 extern
20063 # ifdef __cplusplus
20064 "C"
20065 # endif
20066 int getlogin_r (char *, size_t);
20067 #endif
20068 int
20069 main (void)
20070 {
20071 int result = 0;
20072 char buf[100];
20073
20074 if (getlogin_r (buf, 0) == 0)
20075 result |= 16;
20076 if (getlogin_r (buf, 1) == 0)
20077 result |= 17;
20078 return result;
20079 }
20080 _ACEOF
20081 if ac_fn_c_try_run "$LINENO"; then :
20082 gl_cv_func_getlogin_r_works=yes
20083 else
20084 case $? in
20085 16 | 17) gl_cv_func_getlogin_r_works=no ;;
20086 esac
20087
20088 fi
20089 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20090 conftest.$ac_objext conftest.beam conftest.$ac_ext
20091 fi
20092
20093
20094 fi
20095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getlogin_r_works" >&5
20096 $as_echo "$gl_cv_func_getlogin_r_works" >&6; }
20097 case "$gl_cv_func_getlogin_r_works" in
20098 *yes) ;;
20099 *) REPLACE_GETLOGIN_R=1 ;;
20100 esac
20101 fi
20102
20103 if test $HAVE_GETLOGIN_R = 0 || test $REPLACE_GETLOGIN_R = 1; then
20104
20105
20106
20107
20108
20109
20110
20111
20112 gl_LIBOBJS="$gl_LIBOBJS getlogin_r.$ac_objext"
20113
20114
20115
20116 :
20117
20118
20119
20120
20121
20122
20123 fi
20124
20125
20126
20127
20128
20129 GNULIB_GETLOGIN_R=1
20130
20131
20132
20133
20134
20135 $as_echo "#define GNULIB_TEST_GETLOGIN_R 1" >>confdefs.h
20136
20137
20138
20139
20140
20141 :
20142
20143
20144
20145
20146
20147
20148
20149
20150
20151 ac_found=0
20152 ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
20153 "
20154 if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
20155 ac_have_decl=1
20156 else
20157 ac_have_decl=0
20158 fi
20159
20160 cat >>confdefs.h <<_ACEOF
20161 #define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
20162 _ACEOF
20163 if test $ac_have_decl = 1; then :
20164 ac_found=1
20165 fi
20166
20167 ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
20168 "
20169 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
20170 ac_have_decl=1
20171 else
20172 ac_have_decl=0
20173 fi
20174
20175 cat >>confdefs.h <<_ACEOF
20176 #define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
20177 _ACEOF
20178 if test $ac_have_decl = 1; then :
20179 ac_found=1
20180 fi
20181
20182 ac_fn_c_check_decl "$LINENO" "__argv" "ac_cv_have_decl___argv" "#include <stdlib.h>
20183 "
20184 if test "x$ac_cv_have_decl___argv" = xyes; then :
20185 ac_have_decl=1
20186 else
20187 ac_have_decl=0
20188 fi
20189
20190 cat >>confdefs.h <<_ACEOF
20191 #define HAVE_DECL___ARGV $ac_have_decl
20192 _ACEOF
20193 if test $ac_have_decl = 1; then :
20194 ac_found=1
20195 fi
20196
20197
20198 # Incur the cost of this test only if none of the above worked.
20199 if test $ac_found = 0; then
20200 # On OpenBSD 5.1, using the global __progname variable appears to be
20201 # the only way to implement getprogname.
20202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __progname is defined in default libraries" >&5
20203 $as_echo_n "checking whether __progname is defined in default libraries... " >&6; }
20204 if ${gl_cv_var___progname+:} false; then :
20205 $as_echo_n "(cached) " >&6
20206 else
20207
20208 gl_cv_var___progname=
20209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20210 /* end confdefs.h. */
20211 extern char *__progname;
20212 int
20213 main ()
20214 {
20215 return *__progname;
20216
20217 ;
20218 return 0;
20219 }
20220 _ACEOF
20221 if ac_fn_c_try_link "$LINENO"; then :
20222 gl_cv_var___progname=yes
20223
20224 fi
20225 rm -f core conftest.err conftest.$ac_objext \
20226 conftest$ac_exeext conftest.$ac_ext
20227
20228
20229 fi
20230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var___progname" >&5
20231 $as_echo "$gl_cv_var___progname" >&6; }
20232 if test "$gl_cv_var___progname" = yes; then
20233
20234 $as_echo "#define HAVE_VAR___PROGNAME 1" >>confdefs.h
20235
20236 fi
20237 fi
20238
20239
20240
20241
20242
20243
20244
20245
20246 :
20247
20248
20249
20250
20251
20252
20253 gl_gettimeofday_timezone=void
20254 if test $ac_cv_func_gettimeofday != yes; then
20255 HAVE_GETTIMEOFDAY=0
20256 else
20257
20258
20259
20260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
20261 $as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
20262 if ${gl_cv_func_gettimeofday_clobber+:} false; then :
20263 $as_echo_n "(cached) " >&6
20264 else
20265 if test "$cross_compiling" = yes; then :
20266 # When cross-compiling:
20267 case "$host_os" in
20268 # Guess all is fine on glibc systems.
20269 *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
20270 # If we don't know, assume the worst.
20271 *) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
20272 esac
20273
20274 else
20275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20276 /* end confdefs.h. */
20277 #include <string.h>
20278 #include <sys/time.h>
20279 #include <time.h>
20280 #include <stdlib.h>
20281
20282 int
20283 main ()
20284 {
20285
20286 time_t t = 0;
20287 struct tm *lt;
20288 struct tm saved_lt;
20289 struct timeval tv;
20290 lt = localtime (&t);
20291 saved_lt = *lt;
20292 gettimeofday (&tv, NULL);
20293 return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
20294
20295 ;
20296 return 0;
20297 }
20298 _ACEOF
20299 if ac_fn_c_try_run "$LINENO"; then :
20300 gl_cv_func_gettimeofday_clobber=no
20301 else
20302 gl_cv_func_gettimeofday_clobber=yes
20303 fi
20304 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20305 conftest.$ac_objext conftest.beam conftest.$ac_ext
20306 fi
20307
20308 fi
20309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
20310 $as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
20311
20312 case "$gl_cv_func_gettimeofday_clobber" in
20313 *yes)
20314 REPLACE_GETTIMEOFDAY=1
20315
20316 REPLACE_GMTIME=1
20317 REPLACE_LOCALTIME=1
20318
20319
20320 $as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
20321
20322 ;;
20323 esac
20324
20325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
20326 $as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
20327 if ${gl_cv_func_gettimeofday_posix_signature+:} false; then :
20328 $as_echo_n "(cached) " >&6
20329 else
20330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20331 /* end confdefs.h. */
20332 #include <sys/time.h>
20333 struct timeval c;
20334 int gettimeofday (struct timeval *restrict, void *restrict);
20335
20336 int
20337 main ()
20338 {
20339 /* glibc uses struct timezone * rather than the POSIX void *
20340 if _GNU_SOURCE is defined. However, since the only portable
20341 use of gettimeofday uses NULL as the second parameter, and
20342 since the glibc definition is actually more typesafe, it is
20343 not worth wrapping this to get a compliant signature. */
20344 int (*f) (struct timeval *restrict, void *restrict)
20345 = gettimeofday;
20346 int x = f (&c, 0);
20347 return !(x | c.tv_sec | c.tv_usec);
20348
20349 ;
20350 return 0;
20351 }
20352 _ACEOF
20353 if ac_fn_c_try_compile "$LINENO"; then :
20354 gl_cv_func_gettimeofday_posix_signature=yes
20355 else
20356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20357 /* end confdefs.h. */
20358 #include <sys/time.h>
20359 int gettimeofday (struct timeval *restrict, struct timezone *restrict);
20360
20361 int
20362 main ()
20363 {
20364
20365 ;
20366 return 0;
20367 }
20368 _ACEOF
20369 if ac_fn_c_try_compile "$LINENO"; then :
20370 gl_cv_func_gettimeofday_posix_signature=almost
20371 else
20372 gl_cv_func_gettimeofday_posix_signature=no
20373 fi
20374 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20375 fi
20376 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20377 fi
20378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
20379 $as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
20380 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
20381 gl_gettimeofday_timezone='struct timezone'
20382 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
20383 REPLACE_GETTIMEOFDAY=1
20384 fi
20385 if test $REPLACE_STRUCT_TIMEVAL = 1; then
20386 REPLACE_GETTIMEOFDAY=1
20387 fi
20388
20389 fi
20390
20391 cat >>confdefs.h <<_ACEOF
20392 #define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
20393 _ACEOF
20394
20395
20396 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
20397
20398
20399
20400
20401
20402
20403
20404
20405 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
20406
20407
20408 for ac_header in sys/timeb.h
20409 do :
20410 ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
20411 if test "x$ac_cv_header_sys_timeb_h" = xyes; then :
20412 cat >>confdefs.h <<_ACEOF
20413 #define HAVE_SYS_TIMEB_H 1
20414 _ACEOF
20415
20416 fi
20417
20418 done
20419
20420 for ac_func in _ftime
20421 do :
20422 ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
20423 if test "x$ac_cv_func__ftime" = xyes; then :
20424 cat >>confdefs.h <<_ACEOF
20425 #define HAVE__FTIME 1
20426 _ACEOF
20427
20428 fi
20429 done
20430
20431
20432 fi
20433
20434
20435
20436
20437
20438 GNULIB_GETTIMEOFDAY=1
20439
20440
20441
20442
20443
20444 $as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
20445
20446
20447
20448 GLOB_H=
20449 for ac_header in glob.h
20450 do :
20451 ac_fn_c_check_header_mongrel "$LINENO" "glob.h" "ac_cv_header_glob_h" "$ac_includes_default"
20452 if test "x$ac_cv_header_glob_h" = xyes; then :
20453 cat >>confdefs.h <<_ACEOF
20454 #define HAVE_GLOB_H 1
20455 _ACEOF
20456
20457 else
20458 GLOB_H=glob.h
20459 fi
20460
20461 done
20462
20463
20464 if test -z "$GLOB_H"; then
20465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU glob interface version 1" >&5
20466 $as_echo_n "checking for GNU glob interface version 1... " >&6; }
20467 if ${gl_cv_gnu_glob_interface_version_1+:} false; then :
20468 $as_echo_n "(cached) " >&6
20469 else
20470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20471 /* end confdefs.h. */
20472 #include <gnu-versions.h>
20473 char a[_GNU_GLOB_INTERFACE_VERSION == 1 ? 1 : -1];
20474 _ACEOF
20475 if ac_fn_c_try_compile "$LINENO"; then :
20476 gl_cv_gnu_glob_interface_version_1=yes
20477 else
20478 gl_cv_gnu_glob_interface_version_1=no
20479 fi
20480 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20481 fi
20482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_gnu_glob_interface_version_1" >&5
20483 $as_echo "$gl_cv_gnu_glob_interface_version_1" >&6; }
20484
20485 if test "$gl_cv_gnu_glob_interface_version_1" = "no"; then
20486 GLOB_H=glob.h
20487 fi
20488 fi
20489
20490 if test -z "$GLOB_H"; then
20491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether glob lists broken symlinks" >&5
20492 $as_echo_n "checking whether glob lists broken symlinks... " >&6; }
20493 if ${gl_cv_glob_lists_symlinks+:} false; then :
20494 $as_echo_n "(cached) " >&6
20495 else
20496 if ln -s conf-doesntexist conf$$-globtest 2>/dev/null; then
20497 gl_cv_glob_lists_symlinks=maybe
20498 else
20499 # If we can't make a symlink, then we cannot test this issue. Be
20500 # pessimistic about this.
20501 gl_cv_glob_lists_symlinks=no
20502 fi
20503
20504 if test $gl_cv_glob_lists_symlinks = maybe; then
20505 if test "$cross_compiling" = yes; then :
20506 gl_cv_glob_lists_symlinks=no
20507 else
20508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20509 /* end confdefs.h. */
20510
20511 #include <stddef.h>
20512 #include <glob.h>
20513 int
20514 main ()
20515 {
20516 glob_t found;
20517 if (glob ("conf*-globtest", 0, NULL, &found) == GLOB_NOMATCH) return 1;
20518 ;
20519 return 0;
20520 }
20521 _ACEOF
20522 if ac_fn_c_try_run "$LINENO"; then :
20523 gl_cv_glob_lists_symlinks=yes
20524 else
20525 gl_cv_glob_lists_symlinks=no
20526 fi
20527 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20528 conftest.$ac_objext conftest.beam conftest.$ac_ext
20529 fi
20530
20531 fi
20532 fi
20533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_glob_lists_symlinks" >&5
20534 $as_echo "$gl_cv_glob_lists_symlinks" >&6; }
20535
20536 if test $gl_cv_glob_lists_symlinks = no; then
20537 GLOB_H=glob.h
20538 fi
20539 fi
20540
20541 rm -f conf$$-globtest
20542
20543
20544 if test -n "$GLOB_H"; then
20545 GL_GENERATE_GLOB_H_TRUE=
20546 GL_GENERATE_GLOB_H_FALSE='#'
20547 else
20548 GL_GENERATE_GLOB_H_TRUE='#'
20549 GL_GENERATE_GLOB_H_FALSE=
20550 fi
20551
20552
20553 if test -n "$GLOB_H"; then
20554
20555
20556
20557
20558
20559
20560
20561
20562 gl_LIBOBJS="$gl_LIBOBJS glob.$ac_objext"
20563
20564
20565
20566 :
20567
20568
20569
20570
20571
20572
20573
20574 if test $ac_cv_header_sys_cdefs_h = yes; then
20575 HAVE_SYS_CDEFS_H=1
20576 else
20577 HAVE_SYS_CDEFS_H=0
20578 fi
20579
20580
20581 :
20582
20583
20584
20585
20586
20587
20588
20589
20590
20591
20592
20593 fi
20594
20595 :
20596
20597
20598
20599
20600
20601
20602
20603
20604 HAVE_INET_NTOP=1
20605 INET_NTOP_LIB=
20606
20607
20608
20609
20610 :
20611
20612
20613
20614
20615
20616 if test $ac_cv_header_sys_socket_h != yes; then
20617 for ac_header in winsock2.h
20618 do :
20619 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
20620 if test "x$ac_cv_header_winsock2_h" = xyes; then :
20621 cat >>confdefs.h <<_ACEOF
20622 #define HAVE_WINSOCK2_H 1
20623 _ACEOF
20624
20625 fi
20626
20627 done
20628
20629 fi
20630 if test "$ac_cv_header_winsock2_h" = yes; then
20631 HAVE_WINSOCK2_H=1
20632 UNISTD_H_HAVE_WINSOCK2_H=1
20633 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
20634 else
20635 HAVE_WINSOCK2_H=0
20636 fi
20637
20638
20639 if test $HAVE_WINSOCK2_H = 1; then
20640 ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <ws2tcpip.h>
20641 "
20642 if test "x$ac_cv_have_decl_inet_ntop" = xyes; then :
20643 ac_have_decl=1
20644 else
20645 ac_have_decl=0
20646 fi
20647
20648 cat >>confdefs.h <<_ACEOF
20649 #define HAVE_DECL_INET_NTOP $ac_have_decl
20650 _ACEOF
20651
20652 if test $ac_cv_have_decl_inet_ntop = yes; then
20653 REPLACE_INET_NTOP=1
20654 INET_NTOP_LIB="-lws2_32"
20655 else
20656 HAVE_DECL_INET_NTOP=0
20657 HAVE_INET_NTOP=0
20658 fi
20659 else
20660 gl_save_LIBS=$LIBS
20661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5
20662 $as_echo_n "checking for library containing inet_ntop... " >&6; }
20663 if ${ac_cv_search_inet_ntop+:} false; then :
20664 $as_echo_n "(cached) " >&6
20665 else
20666 ac_func_search_save_LIBS=$LIBS
20667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20668 /* end confdefs.h. */
20669
20670 /* Override any GCC internal prototype to avoid an error.
20671 Use char because int might match the return type of a GCC
20672 builtin and then its argument prototype would still apply. */
20673 #ifdef __cplusplus
20674 extern "C"
20675 #endif
20676 char inet_ntop ();
20677 int
20678 main ()
20679 {
20680 return inet_ntop ();
20681 ;
20682 return 0;
20683 }
20684 _ACEOF
20685 for ac_lib in '' nsl resolv; do
20686 if test -z "$ac_lib"; then
20687 ac_res="none required"
20688 else
20689 ac_res=-l$ac_lib
20690 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
20691 fi
20692 if ac_fn_c_try_link "$LINENO"; then :
20693 ac_cv_search_inet_ntop=$ac_res
20694 fi
20695 rm -f core conftest.err conftest.$ac_objext \
20696 conftest$ac_exeext
20697 if ${ac_cv_search_inet_ntop+:} false; then :
20698 break
20699 fi
20700 done
20701 if ${ac_cv_search_inet_ntop+:} false; then :
20702
20703 else
20704 ac_cv_search_inet_ntop=no
20705 fi
20706 rm conftest.$ac_ext
20707 LIBS=$ac_func_search_save_LIBS
20708 fi
20709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5
20710 $as_echo "$ac_cv_search_inet_ntop" >&6; }
20711 ac_res=$ac_cv_search_inet_ntop
20712 if test "$ac_res" != no; then :
20713 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20714
20715 else
20716 for ac_func in inet_ntop
20717 do :
20718 ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
20719 if test "x$ac_cv_func_inet_ntop" = xyes; then :
20720 cat >>confdefs.h <<_ACEOF
20721 #define HAVE_INET_NTOP 1
20722 _ACEOF
20723
20724 fi
20725 done
20726
20727 if test $ac_cv_func_inet_ntop = no; then
20728 HAVE_INET_NTOP=0
20729 fi
20730
20731 fi
20732
20733 LIBS=$gl_save_LIBS
20734
20735 if test "$ac_cv_search_inet_ntop" != "no" \
20736 && test "$ac_cv_search_inet_ntop" != "none required"; then
20737 INET_NTOP_LIB="$ac_cv_search_inet_ntop"
20738 fi
20739
20740
20741 :
20742
20743
20744
20745
20746
20747 ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <arpa/inet.h>
20748 #if HAVE_NETDB_H
20749 # include <netdb.h>
20750 #endif
20751
20752 "
20753 if test "x$ac_cv_have_decl_inet_ntop" = xyes; then :
20754 ac_have_decl=1
20755 else
20756 ac_have_decl=0
20757 fi
20758
20759 cat >>confdefs.h <<_ACEOF
20760 #define HAVE_DECL_INET_NTOP $ac_have_decl
20761 _ACEOF
20762
20763 if test $ac_cv_have_decl_inet_ntop = no; then
20764 HAVE_DECL_INET_NTOP=0
20765 fi
20766 fi
20767
20768
20769 if test $HAVE_INET_NTOP = 0 || test $REPLACE_INET_NTOP = 1; then
20770
20771
20772
20773
20774
20775
20776
20777
20778 gl_LIBOBJS="$gl_LIBOBJS inet_ntop.$ac_objext"
20779
20780
20781
20782
20783 fi
20784
20785
20786
20787
20788
20789 GNULIB_INET_NTOP=1
20790
20791
20792
20793
20794
20795
20796
20797
20798
20799 PRIPTR_PREFIX=
20800 if test -n "$STDINT_H"; then
20801 PRIPTR_PREFIX='"l"'
20802 else
20803 for glpfx in '' l ll I64; do
20804 case $glpfx in
20805 '') gltype1='int';;
20806 l) gltype1='long int';;
20807 ll) gltype1='long long int';;
20808 I64) gltype1='__int64';;
20809 esac
20810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20811 /* end confdefs.h. */
20812 #include <stdint.h>
20813 extern intptr_t foo;
20814 extern $gltype1 foo;
20815 int
20816 main ()
20817 {
20818
20819 ;
20820 return 0;
20821 }
20822 _ACEOF
20823 if ac_fn_c_try_compile "$LINENO"; then :
20824 PRIPTR_PREFIX='"'$glpfx'"'
20825 fi
20826 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20827 test -n "$PRIPTR_PREFIX" && break
20828 done
20829 fi
20830
20831
20832
20833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
20834 $as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
20835 if ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+:} false; then :
20836 $as_echo_n "(cached) " >&6
20837 else
20838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20839 /* end confdefs.h. */
20840 /* Work also in C++ mode. */
20841 #define __STDC_LIMIT_MACROS 1
20842
20843 /* Work if build is not clean. */
20844 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
20845
20846 #include <limits.h>
20847 #if HAVE_STDINT_H
20848 #include <stdint.h>
20849 #endif
20850
20851 #if defined INT32_MAX && defined INTMAX_MAX
20852 #define CONDITION (INT32_MAX < INTMAX_MAX)
20853 #elif HAVE_LONG_LONG_INT
20854 #define CONDITION (sizeof (int) < sizeof (long long int))
20855 #else
20856 #define CONDITION 0
20857 #endif
20858 int test[CONDITION ? 1 : -1];
20859 int
20860 main ()
20861 {
20862
20863 ;
20864 return 0;
20865 }
20866 _ACEOF
20867 if ac_fn_c_try_compile "$LINENO"; then :
20868 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
20869 else
20870 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
20871 fi
20872 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20873 fi
20874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
20875 $as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
20876 if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
20877 INT32_MAX_LT_INTMAX_MAX=1;
20878 else
20879 INT32_MAX_LT_INTMAX_MAX=0;
20880 fi
20881
20882
20883 if test $APPLE_UNIVERSAL_BUILD = 0; then
20884
20885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
20886 $as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; }
20887 if ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+:} false; then :
20888 $as_echo_n "(cached) " >&6
20889 else
20890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20891 /* end confdefs.h. */
20892 /* Work also in C++ mode. */
20893 #define __STDC_LIMIT_MACROS 1
20894
20895 /* Work if build is not clean. */
20896 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
20897
20898 #include <limits.h>
20899 #if HAVE_STDINT_H
20900 #include <stdint.h>
20901 #endif
20902
20903 #if defined INT64_MAX
20904 #define CONDITION (INT64_MAX == LONG_MAX)
20905 #elif HAVE_LONG_LONG_INT
20906 #define CONDITION (sizeof (long long int) == sizeof (long int))
20907 #else
20908 #define CONDITION 0
20909 #endif
20910 int test[CONDITION ? 1 : -1];
20911 int
20912 main ()
20913 {
20914
20915 ;
20916 return 0;
20917 }
20918 _ACEOF
20919 if ac_fn_c_try_compile "$LINENO"; then :
20920 gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
20921 else
20922 gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
20923 fi
20924 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20925 fi
20926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
20927 $as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
20928 if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
20929 INT64_MAX_EQ_LONG_MAX=1;
20930 else
20931 INT64_MAX_EQ_LONG_MAX=0;
20932 fi
20933
20934
20935 else
20936 INT64_MAX_EQ_LONG_MAX=-1
20937 fi
20938
20939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
20940 $as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
20941 if ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+:} false; then :
20942 $as_echo_n "(cached) " >&6
20943 else
20944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20945 /* end confdefs.h. */
20946 /* Work also in C++ mode. */
20947 #define __STDC_LIMIT_MACROS 1
20948
20949 /* Work if build is not clean. */
20950 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
20951
20952 #include <limits.h>
20953 #if HAVE_STDINT_H
20954 #include <stdint.h>
20955 #endif
20956
20957 #if defined UINT32_MAX && defined UINTMAX_MAX
20958 #define CONDITION (UINT32_MAX < UINTMAX_MAX)
20959 #elif HAVE_LONG_LONG_INT
20960 #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
20961 #else
20962 #define CONDITION 0
20963 #endif
20964 int test[CONDITION ? 1 : -1];
20965 int
20966 main ()
20967 {
20968
20969 ;
20970 return 0;
20971 }
20972 _ACEOF
20973 if ac_fn_c_try_compile "$LINENO"; then :
20974 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
20975 else
20976 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
20977 fi
20978 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20979 fi
20980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
20981 $as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
20982 if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
20983 UINT32_MAX_LT_UINTMAX_MAX=1;
20984 else
20985 UINT32_MAX_LT_UINTMAX_MAX=0;
20986 fi
20987
20988
20989 if test $APPLE_UNIVERSAL_BUILD = 0; then
20990
20991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
20992 $as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
20993 if ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+:} false; then :
20994 $as_echo_n "(cached) " >&6
20995 else
20996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20997 /* end confdefs.h. */
20998 /* Work also in C++ mode. */
20999 #define __STDC_LIMIT_MACROS 1
21000
21001 /* Work if build is not clean. */
21002 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
21003
21004 #include <limits.h>
21005 #if HAVE_STDINT_H
21006 #include <stdint.h>
21007 #endif
21008
21009 #if defined UINT64_MAX
21010 #define CONDITION (UINT64_MAX == ULONG_MAX)
21011 #elif HAVE_LONG_LONG_INT
21012 #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
21013 #else
21014 #define CONDITION 0
21015 #endif
21016 int test[CONDITION ? 1 : -1];
21017 int
21018 main ()
21019 {
21020
21021 ;
21022 return 0;
21023 }
21024 _ACEOF
21025 if ac_fn_c_try_compile "$LINENO"; then :
21026 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
21027 else
21028 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
21029 fi
21030 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21031 fi
21032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
21033 $as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
21034 if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
21035 UINT64_MAX_EQ_ULONG_MAX=1;
21036 else
21037 UINT64_MAX_EQ_ULONG_MAX=0;
21038 fi
21039
21040
21041 else
21042 UINT64_MAX_EQ_ULONG_MAX=-1
21043 fi
21044
21045
21046
21047
21048
21049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
21050 $as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; }
21051 if ${gl_cv_func_isnand_no_libm+:} false; then :
21052 $as_echo_n "(cached) " >&6
21053 else
21054
21055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21056 /* end confdefs.h. */
21057 #include <math.h>
21058 #if __GNUC__ >= 4
21059 # undef isnand
21060 # define isnand(x) __builtin_isnan ((double)(x))
21061 #else
21062 # undef isnand
21063 # define isnand(x) isnan ((double)(x))
21064 #endif
21065 double x;
21066 int
21067 main ()
21068 {
21069 return isnand (x);
21070 ;
21071 return 0;
21072 }
21073 _ACEOF
21074 if ac_fn_c_try_link "$LINENO"; then :
21075 gl_cv_func_isnand_no_libm=yes
21076 else
21077 gl_cv_func_isnand_no_libm=no
21078 fi
21079 rm -f core conftest.err conftest.$ac_objext \
21080 conftest$ac_exeext conftest.$ac_ext
21081
21082 fi
21083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
21084 $as_echo "$gl_cv_func_isnand_no_libm" >&6; }
21085
21086 gl_func_isnand_no_libm=$gl_cv_func_isnand_no_libm
21087 if test $gl_cv_func_isnand_no_libm = yes; then
21088
21089 $as_echo "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h
21090
21091 fi
21092
21093 if test $gl_func_isnand_no_libm != yes; then
21094
21095
21096
21097
21098
21099
21100
21101
21102 gl_LIBOBJS="$gl_LIBOBJS isnand.$ac_objext"
21103
21104
21105
21106
21107 fi
21108
21109
21110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
21111 $as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; }
21112 if ${gl_cv_func_isnanl_no_libm+:} false; then :
21113 $as_echo_n "(cached) " >&6
21114 else
21115
21116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21117 /* end confdefs.h. */
21118 #include <math.h>
21119 #if __GNUC__ >= 4
21120 # undef isnanl
21121 # define isnanl(x) __builtin_isnanl ((long double)(x))
21122 #elif defined isnan
21123 # undef isnanl
21124 # define isnanl(x) isnan ((long double)(x))
21125 #endif
21126 long double x;
21127 int
21128 main ()
21129 {
21130 return isnanl (x);
21131 ;
21132 return 0;
21133 }
21134 _ACEOF
21135 if ac_fn_c_try_link "$LINENO"; then :
21136 gl_cv_func_isnanl_no_libm=yes
21137 else
21138 gl_cv_func_isnanl_no_libm=no
21139 fi
21140 rm -f core conftest.err conftest.$ac_objext \
21141 conftest$ac_exeext conftest.$ac_ext
21142
21143 fi
21144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
21145 $as_echo "$gl_cv_func_isnanl_no_libm" >&6; }
21146
21147 gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm
21148 if test $gl_func_isnanl_no_libm = yes; then
21149
21150
21151
21152
21153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
21154 $as_echo_n "checking whether isnanl works... " >&6; }
21155 if ${gl_cv_func_isnanl_works+:} false; then :
21156 $as_echo_n "(cached) " >&6
21157 else
21158
21159 if test "$cross_compiling" = yes; then :
21160 gl_cv_func_isnanl_works="guessing yes"
21161 else
21162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21163 /* end confdefs.h. */
21164
21165 #include <float.h>
21166 #include <limits.h>
21167 #include <math.h>
21168 #if __GNUC__ >= 4
21169 # undef isnanl
21170 # define isnanl(x) __builtin_isnanl ((long double)(x))
21171 #elif defined isnan
21172 # undef isnanl
21173 # define isnanl(x) isnan ((long double)(x))
21174 #endif
21175 #define NWORDS \
21176 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
21177 typedef union { unsigned int word[NWORDS]; long double value; }
21178 memory_long_double;
21179 /* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
21180 runtime type conversion. */
21181 #ifdef __sgi
21182 static long double NaNl ()
21183 {
21184 double zero = 0.0;
21185 return zero / zero;
21186 }
21187 #else
21188 # define NaNl() (0.0L / 0.0L)
21189 #endif
21190 int main ()
21191 {
21192 int result = 0;
21193
21194 if (!isnanl (NaNl ()))
21195 result |= 1;
21196
21197 {
21198 memory_long_double m;
21199 unsigned int i;
21200
21201 /* The isnanl function should be immune against changes in the sign bit and
21202 in the mantissa bits. The xor operation twiddles a bit that can only be
21203 a sign bit or a mantissa bit (since the exponent never extends to
21204 bit 31). */
21205 m.value = NaNl ();
21206 m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
21207 for (i = 0; i < NWORDS; i++)
21208 m.word[i] |= 1;
21209 if (!isnanl (m.value))
21210 result |= 1;
21211 }
21212
21213 #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
21214 /* Representation of an 80-bit 'long double' as an initializer for a sequence
21215 of 'unsigned int' words. */
21216 # ifdef WORDS_BIGENDIAN
21217 # define LDBL80_WORDS(exponent,manthi,mantlo) \
21218 { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
21219 ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \
21220 (unsigned int) (mantlo) << 16 \
21221 }
21222 # else
21223 # define LDBL80_WORDS(exponent,manthi,mantlo) \
21224 { mantlo, manthi, exponent }
21225 # endif
21226 { /* Quiet NaN. */
21227 static memory_long_double x =
21228 { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
21229 if (!isnanl (x.value))
21230 result |= 2;
21231 }
21232 {
21233 /* Signalling NaN. */
21234 static memory_long_double x =
21235 { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
21236 if (!isnanl (x.value))
21237 result |= 2;
21238 }
21239 /* isnanl should return something even for noncanonical values. */
21240 { /* Pseudo-NaN. */
21241 static memory_long_double x =
21242 { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
21243 if (isnanl (x.value) && !isnanl (x.value))
21244 result |= 4;
21245 }
21246 { /* Pseudo-Infinity. */
21247 static memory_long_double x =
21248 { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
21249 if (isnanl (x.value) && !isnanl (x.value))
21250 result |= 8;
21251 }
21252 { /* Pseudo-Zero. */
21253 static memory_long_double x =
21254 { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
21255 if (isnanl (x.value) && !isnanl (x.value))
21256 result |= 16;
21257 }
21258 { /* Unnormalized number. */
21259 static memory_long_double x =
21260 { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
21261 if (isnanl (x.value) && !isnanl (x.value))
21262 result |= 32;
21263 }
21264 { /* Pseudo-Denormal. */
21265 static memory_long_double x =
21266 { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
21267 if (isnanl (x.value) && !isnanl (x.value))
21268 result |= 64;
21269 }
21270 #endif
21271
21272 return result;
21273 }
21274 _ACEOF
21275 if ac_fn_c_try_run "$LINENO"; then :
21276 gl_cv_func_isnanl_works=yes
21277 else
21278 gl_cv_func_isnanl_works=no
21279 fi
21280 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21281 conftest.$ac_objext conftest.beam conftest.$ac_ext
21282 fi
21283
21284
21285 fi
21286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
21287 $as_echo "$gl_cv_func_isnanl_works" >&6; }
21288
21289 case "$gl_cv_func_isnanl_works" in
21290 *yes) ;;
21291 *) gl_func_isnanl_no_libm=no ;;
21292 esac
21293 fi
21294 if test $gl_func_isnanl_no_libm = yes; then
21295
21296 $as_echo "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h
21297
21298 fi
21299
21300 if test $gl_func_isnanl_no_libm != yes; then
21301
21302
21303
21304
21305
21306
21307
21308
21309 gl_LIBOBJS="$gl_LIBOBJS isnanl.$ac_objext"
21310
21311
21312
21313
21314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
21315 $as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
21316 if ${gl_cv_cc_long_double_expbit0+:} false; then :
21317 $as_echo_n "(cached) " >&6
21318 else
21319
21320 if test "$cross_compiling" = yes; then :
21321
21322 gl_cv_cc_long_double_expbit0="unknown"
21323
21324 else
21325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21326 /* end confdefs.h. */
21327
21328 #include <float.h>
21329 #include <stddef.h>
21330 #include <stdio.h>
21331 #include <string.h>
21332 #define NWORDS \
21333 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
21334 typedef union { long double value; unsigned int word[NWORDS]; }
21335 memory_long_double;
21336 static unsigned int ored_words[NWORDS];
21337 static unsigned int anded_words[NWORDS];
21338 static void add_to_ored_words (long double x)
21339 {
21340 memory_long_double m;
21341 size_t i;
21342 /* Clear it first, in case
21343 sizeof (long double) < sizeof (memory_long_double). */
21344 memset (&m, 0, sizeof (memory_long_double));
21345 m.value = x;
21346 for (i = 0; i < NWORDS; i++)
21347 {
21348 ored_words[i] |= m.word[i];
21349 anded_words[i] &= m.word[i];
21350 }
21351 }
21352 int main ()
21353 {
21354 size_t j;
21355 FILE *fp = fopen ("conftest.out", "w");
21356 if (fp == NULL)
21357 return 1;
21358 for (j = 0; j < NWORDS; j++)
21359 anded_words[j] = ~ (unsigned int) 0;
21360 add_to_ored_words (0.25L);
21361 add_to_ored_words (0.5L);
21362 add_to_ored_words (1.0L);
21363 add_to_ored_words (2.0L);
21364 add_to_ored_words (4.0L);
21365 /* Remove bits that are common (e.g. if representation of the first mantissa
21366 bit is explicit). */
21367 for (j = 0; j < NWORDS; j++)
21368 ored_words[j] &= ~anded_words[j];
21369 /* Now find the nonzero word. */
21370 for (j = 0; j < NWORDS; j++)
21371 if (ored_words[j] != 0)
21372 break;
21373 if (j < NWORDS)
21374 {
21375 size_t i;
21376 for (i = j + 1; i < NWORDS; i++)
21377 if (ored_words[i] != 0)
21378 {
21379 fprintf (fp, "unknown");
21380 return (fclose (fp) != 0);
21381 }
21382 for (i = 0; ; i++)
21383 if ((ored_words[j] >> i) & 1)
21384 {
21385 fprintf (fp, "word %d bit %d", (int) j, (int) i);
21386 return (fclose (fp) != 0);
21387 }
21388 }
21389 fprintf (fp, "unknown");
21390 return (fclose (fp) != 0);
21391 }
21392
21393 _ACEOF
21394 if ac_fn_c_try_run "$LINENO"; then :
21395 gl_cv_cc_long_double_expbit0=`cat conftest.out`
21396 else
21397 gl_cv_cc_long_double_expbit0="unknown"
21398 fi
21399 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21400 conftest.$ac_objext conftest.beam conftest.$ac_ext
21401 fi
21402
21403 rm -f conftest.out
21404
21405 fi
21406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
21407 $as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
21408 case "$gl_cv_cc_long_double_expbit0" in
21409 word*bit*)
21410 word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
21411 bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
21412
21413 cat >>confdefs.h <<_ACEOF
21414 #define LDBL_EXPBIT0_WORD $word
21415 _ACEOF
21416
21417
21418 cat >>confdefs.h <<_ACEOF
21419 #define LDBL_EXPBIT0_BIT $bit
21420 _ACEOF
21421
21422 ;;
21423 esac
21424
21425
21426
21427 fi
21428
21429
21430
21431
21432
21433
21434 :
21435
21436
21437
21438
21439
21440
21441
21442
21443
21444 LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
21445
21446
21447
21448 if test "$gl_threads_api" = posix; then
21449 # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
21450 # pthread_rwlock_* functions.
21451 ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
21452 "
21453 if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then :
21454
21455 $as_echo "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
21456
21457 fi
21458
21459 # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
21460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21461 /* end confdefs.h. */
21462
21463 #include <pthread.h>
21464 int
21465 main ()
21466 {
21467
21468 #if __FreeBSD__ == 4
21469 error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
21470 #elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \
21471 && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
21472 error "No, in Mac OS X < 10.7 recursive mutexes actually don't work."
21473 #else
21474 int x = (int)PTHREAD_MUTEX_RECURSIVE;
21475 return !x;
21476 #endif
21477
21478 ;
21479 return 0;
21480 }
21481 _ACEOF
21482 if ac_fn_c_try_compile "$LINENO"; then :
21483
21484 $as_echo "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h
21485
21486 fi
21487 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21488 fi
21489 :
21490
21491
21492
21493 cat >>confdefs.h <<_ACEOF
21494 #define GNULIB_LOCK 1
21495 _ACEOF
21496
21497
21498
21499
21500
21501 :
21502
21503
21504
21505
21506
21507 if test $ac_cv_func_lstat = yes; then
21508
21509 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
21510 *no)
21511 REPLACE_LSTAT=1
21512 ;;
21513 esac
21514 else
21515 HAVE_LSTAT=0
21516 fi
21517
21518 if test $REPLACE_LSTAT = 1; then
21519
21520
21521
21522
21523
21524
21525
21526
21527 gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
21528
21529 :
21530 fi
21531
21532
21533
21534
21535
21536 GNULIB_LSTAT=1
21537
21538
21539
21540
21541
21542 $as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
21543
21544
21545
21546
21547
21548
21549 if test $gl_cv_func_malloc_posix = yes; then
21550
21551 $as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
21552
21553 else
21554 REPLACE_MALLOC=1
21555 fi
21556
21557 if test $REPLACE_MALLOC = 1; then
21558
21559
21560
21561
21562
21563
21564
21565
21566 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
21567
21568 fi
21569
21570
21571
21572
21573
21574 GNULIB_MALLOC_POSIX=1
21575
21576
21577
21578
21579
21580 $as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
21581
21582
21583
21584
21585
21586
21587
21588
21589
21590
21591
21592
21593
21594
21595
21596 :
21597
21598
21599
21600
21601
21602
21603
21604
21605 if test $gl_cv_have_include_next = yes; then
21606 gl_cv_next_math_h='<'math.h'>'
21607 else
21608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
21609 $as_echo_n "checking absolute name of <math.h>... " >&6; }
21610 if ${gl_cv_next_math_h+:} false; then :
21611 $as_echo_n "(cached) " >&6
21612 else
21613
21614 if test $ac_cv_header_math_h = yes; then
21615
21616
21617
21618
21619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21620 /* end confdefs.h. */
21621 #include <math.h>
21622 _ACEOF
21623 case "$host_os" in
21624 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21625 *) gl_absname_cpp="$ac_cpp" ;;
21626 esac
21627
21628 case "$host_os" in
21629 mingw*)
21630 gl_dirsep_regex='[/\\]'
21631 ;;
21632 *)
21633 gl_dirsep_regex='\/'
21634 ;;
21635 esac
21636 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21637 gl_header_literal_regex=`echo 'math.h' \
21638 | sed -e "$gl_make_literal_regex_sed"`
21639 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21640 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21641 s|^/[^/]|//&|
21642 p
21643 q
21644 }'
21645
21646 gl_cv_absolute_math_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21647 sed -n "$gl_absolute_header_sed"`
21648
21649 gl_header=$gl_cv_absolute_math_h
21650 gl_cv_next_math_h='"'$gl_header'"'
21651 else
21652 gl_cv_next_math_h='<'math.h'>'
21653 fi
21654
21655
21656 fi
21657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
21658 $as_echo "$gl_cv_next_math_h" >&6; }
21659 fi
21660 NEXT_MATH_H=$gl_cv_next_math_h
21661
21662 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21663 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21664 gl_next_as_first_directive='<'math.h'>'
21665 else
21666 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21667 gl_next_as_first_directive=$gl_cv_next_math_h
21668 fi
21669 NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive
21670
21671
21672
21673
21674
21675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
21676 $as_echo_n "checking whether NAN macro works... " >&6; }
21677 if ${gl_cv_header_math_nan_works+:} false; then :
21678 $as_echo_n "(cached) " >&6
21679 else
21680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21681 /* end confdefs.h. */
21682 #include <math.h>
21683 int
21684 main ()
21685 {
21686 /* Solaris 10 has a broken definition of NAN. Other platforms
21687 fail to provide NAN, or provide it only in C99 mode; this
21688 test only needs to fail when NAN is provided but wrong. */
21689 float f = 1.0f;
21690 #ifdef NAN
21691 f = NAN;
21692 #endif
21693 return f == 0;
21694 ;
21695 return 0;
21696 }
21697 _ACEOF
21698 if ac_fn_c_try_compile "$LINENO"; then :
21699 gl_cv_header_math_nan_works=yes
21700 else
21701 gl_cv_header_math_nan_works=no
21702 fi
21703 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21704 fi
21705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5
21706 $as_echo "$gl_cv_header_math_nan_works" >&6; }
21707 if test $gl_cv_header_math_nan_works = no; then
21708 REPLACE_NAN=1
21709 fi
21710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
21711 $as_echo_n "checking whether HUGE_VAL works... " >&6; }
21712 if ${gl_cv_header_math_huge_val_works+:} false; then :
21713 $as_echo_n "(cached) " >&6
21714 else
21715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21716 /* end confdefs.h. */
21717 #include <math.h>
21718 int
21719 main ()
21720 {
21721 /* Solaris 10 has a broken definition of HUGE_VAL. */
21722 double d = HUGE_VAL;
21723 return d == 0;
21724 ;
21725 return 0;
21726 }
21727 _ACEOF
21728 if ac_fn_c_try_compile "$LINENO"; then :
21729 gl_cv_header_math_huge_val_works=yes
21730 else
21731 gl_cv_header_math_huge_val_works=no
21732 fi
21733 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21734 fi
21735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5
21736 $as_echo "$gl_cv_header_math_huge_val_works" >&6; }
21737 if test $gl_cv_header_math_huge_val_works = no; then
21738 REPLACE_HUGE_VAL=1
21739 fi
21740
21741
21742 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
21743 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
21744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
21745 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
21746 if eval \${$as_gl_Symbol+:} false; then :
21747 $as_echo_n "(cached) " >&6
21748 else
21749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21750 /* end confdefs.h. */
21751 #include <math.h>
21752 int
21753 main ()
21754 {
21755 #undef $gl_func
21756 (void) $gl_func;
21757 ;
21758 return 0;
21759 }
21760 _ACEOF
21761 if ac_fn_c_try_compile "$LINENO"; then :
21762 eval "$as_gl_Symbol=yes"
21763 else
21764 eval "$as_gl_Symbol=no"
21765 fi
21766 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21767 fi
21768 eval ac_res=\$$as_gl_Symbol
21769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
21770 $as_echo "$ac_res" >&6; }
21771 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
21772 cat >>confdefs.h <<_ACEOF
21773 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
21774 _ACEOF
21775
21776 eval ac_cv_have_decl_$gl_func=yes
21777 fi
21778 done
21779
21780
21781
21782
21783
21784
21785
21786
21787
21788
21789
21790 :
21791
21792
21793
21794
21795
21796
21797 :
21798
21799
21800
21801
21802
21803 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
21804
21805
21806
21807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
21808 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
21809 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
21810 $as_echo_n "(cached) " >&6
21811 else
21812
21813 case "$host_os" in
21814 # Guess no on AIX and OSF/1.
21815 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
21816 # Guess yes otherwise.
21817 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
21818 esac
21819 if test $LOCALE_JA != none; then
21820 if test "$cross_compiling" = yes; then :
21821 :
21822 else
21823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21824 /* end confdefs.h. */
21825
21826 #include <locale.h>
21827 #include <string.h>
21828 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21829 <wchar.h>.
21830 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21831 included before <wchar.h>. */
21832 #include <stddef.h>
21833 #include <stdio.h>
21834 #include <time.h>
21835 #include <wchar.h>
21836 int main ()
21837 {
21838 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
21839 {
21840 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
21841 mbstate_t state;
21842 wchar_t wc;
21843
21844 memset (&state, '\0', sizeof (mbstate_t));
21845 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
21846 if (mbsinit (&state))
21847 return 1;
21848 }
21849 return 0;
21850 }
21851 _ACEOF
21852 if ac_fn_c_try_run "$LINENO"; then :
21853 gl_cv_func_mbrtowc_incomplete_state=yes
21854 else
21855 gl_cv_func_mbrtowc_incomplete_state=no
21856 fi
21857 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21858 conftest.$ac_objext conftest.beam conftest.$ac_ext
21859 fi
21860
21861 fi
21862
21863 fi
21864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
21865 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
21866
21867
21868
21869
21870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
21871 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
21872 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
21873 $as_echo_n "(cached) " >&6
21874 else
21875
21876 case "$host_os" in
21877 # Guess no on Solaris 8.
21878 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
21879 # Guess yes otherwise.
21880 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
21881 esac
21882 if test $LOCALE_ZH_CN != none; then
21883 if test "$cross_compiling" = yes; then :
21884 :
21885 else
21886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21887 /* end confdefs.h. */
21888
21889 #include <locale.h>
21890 #include <stdlib.h>
21891 #include <string.h>
21892 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21893 <wchar.h>.
21894 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21895 included before <wchar.h>. */
21896 #include <stddef.h>
21897 #include <stdio.h>
21898 #include <time.h>
21899 #include <wchar.h>
21900 int main ()
21901 {
21902 /* This fails on Solaris 8:
21903 mbrtowc returns 2, and sets wc to 0x00F0.
21904 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
21905 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
21906 {
21907 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
21908 mbstate_t state;
21909 wchar_t wc;
21910
21911 memset (&state, '\0', sizeof (mbstate_t));
21912 if (mbrtowc (&wc, input + 3, 6, &state) != 4
21913 && mbtowc (&wc, input + 3, 6) == 4)
21914 return 1;
21915 }
21916 return 0;
21917 }
21918 _ACEOF
21919 if ac_fn_c_try_run "$LINENO"; then :
21920 gl_cv_func_mbrtowc_sanitycheck=yes
21921 else
21922 gl_cv_func_mbrtowc_sanitycheck=no
21923 fi
21924 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21925 conftest.$ac_objext conftest.beam conftest.$ac_ext
21926 fi
21927
21928 fi
21929
21930 fi
21931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
21932 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
21933
21934 REPLACE_MBSTATE_T=0
21935 case "$gl_cv_func_mbrtowc_incomplete_state" in
21936 *yes) ;;
21937 *) REPLACE_MBSTATE_T=1 ;;
21938 esac
21939 case "$gl_cv_func_mbrtowc_sanitycheck" in
21940 *yes) ;;
21941 *) REPLACE_MBSTATE_T=1 ;;
21942 esac
21943 else
21944 REPLACE_MBSTATE_T=1
21945 fi
21946
21947
21948
21949 :
21950
21951
21952
21953
21954
21955 if test $ac_cv_func_mbrtowc = no; then
21956 HAVE_MBRTOWC=0
21957 ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
21958 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21959 <wchar.h>.
21960 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21961 included before <wchar.h>. */
21962 #include <stddef.h>
21963 #include <stdio.h>
21964 #include <time.h>
21965 #include <wchar.h>
21966
21967 "
21968 if test "x$ac_cv_have_decl_mbrtowc" = xyes; then :
21969 ac_have_decl=1
21970 else
21971 ac_have_decl=0
21972 fi
21973
21974 cat >>confdefs.h <<_ACEOF
21975 #define HAVE_DECL_MBRTOWC $ac_have_decl
21976 _ACEOF
21977
21978 if test $ac_cv_have_decl_mbrtowc = yes; then
21979 REPLACE_MBRTOWC=1
21980 fi
21981 else
21982 if test $REPLACE_MBSTATE_T = 1; then
21983 REPLACE_MBRTOWC=1
21984 else
21985
21986
21987
21988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
21989 $as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
21990 if ${gl_cv_func_mbrtowc_null_arg1+:} false; then :
21991 $as_echo_n "(cached) " >&6
21992 else
21993
21994 case "$host_os" in
21995 # Guess no on Solaris.
21996 solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
21997 # Guess yes otherwise.
21998 *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
21999 esac
22000 if test $LOCALE_FR_UTF8 != none; then
22001 if test "$cross_compiling" = yes; then :
22002 :
22003 else
22004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22005 /* end confdefs.h. */
22006
22007 #include <locale.h>
22008 #include <stdlib.h>
22009 #include <string.h>
22010 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22011 <wchar.h>.
22012 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22013 included before <wchar.h>. */
22014 #include <stddef.h>
22015 #include <stdio.h>
22016 #include <time.h>
22017 #include <wchar.h>
22018 int main ()
22019 {
22020 int result = 0;
22021
22022 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
22023 {
22024 char input[] = "\303\237er";
22025 mbstate_t state;
22026 wchar_t wc;
22027 size_t ret;
22028
22029 memset (&state, '\0', sizeof (mbstate_t));
22030 wc = (wchar_t) 0xBADFACE;
22031 ret = mbrtowc (&wc, input, 5, &state);
22032 if (ret != 2)
22033 result |= 1;
22034 if (!mbsinit (&state))
22035 result |= 2;
22036
22037 memset (&state, '\0', sizeof (mbstate_t));
22038 ret = mbrtowc (NULL, input, 5, &state);
22039 if (ret != 2) /* Solaris 7 fails here: ret is -1. */
22040 result |= 4;
22041 if (!mbsinit (&state))
22042 result |= 8;
22043 }
22044 return result;
22045 }
22046 _ACEOF
22047 if ac_fn_c_try_run "$LINENO"; then :
22048 gl_cv_func_mbrtowc_null_arg1=yes
22049 else
22050 gl_cv_func_mbrtowc_null_arg1=no
22051 fi
22052 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22053 conftest.$ac_objext conftest.beam conftest.$ac_ext
22054 fi
22055
22056 fi
22057
22058 fi
22059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
22060 $as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; }
22061
22062
22063
22064
22065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
22066 $as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
22067 if ${gl_cv_func_mbrtowc_null_arg2+:} false; then :
22068 $as_echo_n "(cached) " >&6
22069 else
22070
22071 case "$host_os" in
22072 # Guess no on OSF/1.
22073 osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
22074 # Guess yes otherwise.
22075 *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
22076 esac
22077 if test $LOCALE_FR_UTF8 != none; then
22078 if test "$cross_compiling" = yes; then :
22079 :
22080 else
22081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22082 /* end confdefs.h. */
22083
22084 #include <locale.h>
22085 #include <string.h>
22086 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22087 <wchar.h>.
22088 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22089 included before <wchar.h>. */
22090 #include <stddef.h>
22091 #include <stdio.h>
22092 #include <time.h>
22093 #include <wchar.h>
22094 int main ()
22095 {
22096 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
22097 {
22098 mbstate_t state;
22099 wchar_t wc;
22100 int ret;
22101
22102 memset (&state, '\0', sizeof (mbstate_t));
22103 wc = (wchar_t) 0xBADFACE;
22104 mbrtowc (&wc, NULL, 5, &state);
22105 /* Check that wc was not modified. */
22106 if (wc != (wchar_t) 0xBADFACE)
22107 return 1;
22108 }
22109 return 0;
22110 }
22111 _ACEOF
22112 if ac_fn_c_try_run "$LINENO"; then :
22113 gl_cv_func_mbrtowc_null_arg2=yes
22114 else
22115 gl_cv_func_mbrtowc_null_arg2=no
22116 fi
22117 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22118 conftest.$ac_objext conftest.beam conftest.$ac_ext
22119 fi
22120
22121 fi
22122
22123 fi
22124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
22125 $as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; }
22126
22127
22128
22129
22130
22131
22132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
22133 $as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
22134 if ${gl_cv_func_mbrtowc_retval+:} false; then :
22135 $as_echo_n "(cached) " >&6
22136 else
22137
22138 case "$host_os" in
22139 # Guess no on HP-UX, Solaris, native Windows.
22140 hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
22141 # Guess yes otherwise.
22142 *) gl_cv_func_mbrtowc_retval="guessing yes" ;;
22143 esac
22144 if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
22145 || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
22146 if test "$cross_compiling" = yes; then :
22147 :
22148 else
22149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22150 /* end confdefs.h. */
22151
22152 #include <locale.h>
22153 #include <string.h>
22154 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22155 <wchar.h>.
22156 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22157 included before <wchar.h>. */
22158 #include <stddef.h>
22159 #include <stdio.h>
22160 #include <time.h>
22161 #include <wchar.h>
22162 int main ()
22163 {
22164 int result = 0;
22165 int found_some_locale = 0;
22166 /* This fails on Solaris. */
22167 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
22168 {
22169 char input[] = "B\303\274\303\237er"; /* "Büßer" */
22170 mbstate_t state;
22171 wchar_t wc;
22172
22173 memset (&state, '\0', sizeof (mbstate_t));
22174 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
22175 {
22176 input[1] = '\0';
22177 if (mbrtowc (&wc, input + 2, 5, &state) != 1)
22178 result |= 1;
22179 }
22180 found_some_locale = 1;
22181 }
22182 /* This fails on HP-UX 11.11. */
22183 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
22184 {
22185 char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
22186 mbstate_t state;
22187 wchar_t wc;
22188
22189 memset (&state, '\0', sizeof (mbstate_t));
22190 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
22191 {
22192 input[1] = '\0';
22193 if (mbrtowc (&wc, input + 2, 5, &state) != 2)
22194 result |= 2;
22195 }
22196 found_some_locale = 1;
22197 }
22198 /* This fails on native Windows. */
22199 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
22200 {
22201 char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
22202 mbstate_t state;
22203 wchar_t wc;
22204
22205 memset (&state, '\0', sizeof (mbstate_t));
22206 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
22207 {
22208 input[3] = '\0';
22209 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
22210 result |= 4;
22211 }
22212 found_some_locale = 1;
22213 }
22214 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
22215 {
22216 char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
22217 mbstate_t state;
22218 wchar_t wc;
22219
22220 memset (&state, '\0', sizeof (mbstate_t));
22221 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
22222 {
22223 input[3] = '\0';
22224 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
22225 result |= 8;
22226 }
22227 found_some_locale = 1;
22228 }
22229 if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
22230 {
22231 char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
22232 mbstate_t state;
22233 wchar_t wc;
22234
22235 memset (&state, '\0', sizeof (mbstate_t));
22236 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
22237 {
22238 input[3] = '\0';
22239 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
22240 result |= 16;
22241 }
22242 found_some_locale = 1;
22243 }
22244 return (found_some_locale ? result : 77);
22245 }
22246 _ACEOF
22247 if ac_fn_c_try_run "$LINENO"; then :
22248 gl_cv_func_mbrtowc_retval=yes
22249 else
22250 if test $? != 77; then
22251 gl_cv_func_mbrtowc_retval=no
22252 fi
22253
22254 fi
22255 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22256 conftest.$ac_objext conftest.beam conftest.$ac_ext
22257 fi
22258
22259 fi
22260
22261 fi
22262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
22263 $as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
22264
22265
22266
22267
22268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
22269 $as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
22270 if ${gl_cv_func_mbrtowc_nul_retval+:} false; then :
22271 $as_echo_n "(cached) " >&6
22272 else
22273
22274 case "$host_os" in
22275 # Guess no on Solaris 8 and 9.
22276 solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
22277 # Guess yes otherwise.
22278 *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
22279 esac
22280 if test $LOCALE_ZH_CN != none; then
22281 if test "$cross_compiling" = yes; then :
22282 :
22283 else
22284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22285 /* end confdefs.h. */
22286
22287 #include <locale.h>
22288 #include <string.h>
22289 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22290 <wchar.h>.
22291 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22292 included before <wchar.h>. */
22293 #include <stddef.h>
22294 #include <stdio.h>
22295 #include <time.h>
22296 #include <wchar.h>
22297 int main ()
22298 {
22299 /* This fails on Solaris 8 and 9. */
22300 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
22301 {
22302 mbstate_t state;
22303 wchar_t wc;
22304
22305 memset (&state, '\0', sizeof (mbstate_t));
22306 if (mbrtowc (&wc, "", 1, &state) != 0)
22307 return 1;
22308 }
22309 return 0;
22310 }
22311 _ACEOF
22312 if ac_fn_c_try_run "$LINENO"; then :
22313 gl_cv_func_mbrtowc_nul_retval=yes
22314 else
22315 gl_cv_func_mbrtowc_nul_retval=no
22316 fi
22317 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22318 conftest.$ac_objext conftest.beam conftest.$ac_ext
22319 fi
22320
22321 fi
22322
22323 fi
22324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
22325 $as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
22326
22327
22328
22329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5
22330 $as_echo_n "checking whether mbrtowc works on empty input... " >&6; }
22331 if ${gl_cv_func_mbrtowc_empty_input+:} false; then :
22332 $as_echo_n "(cached) " >&6
22333 else
22334
22335 case "$host_os" in
22336 # Guess no on AIX and glibc systems.
22337 aix* | *-gnu*)
22338 gl_cv_func_mbrtowc_empty_input="guessing no" ;;
22339 *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
22340 esac
22341 if test "$cross_compiling" = yes; then :
22342 :
22343 else
22344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22345 /* end confdefs.h. */
22346
22347 #include <wchar.h>
22348 static wchar_t wc;
22349 static mbstate_t mbs;
22350 int
22351 main (void)
22352 {
22353 return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
22354 }
22355 _ACEOF
22356 if ac_fn_c_try_run "$LINENO"; then :
22357 gl_cv_func_mbrtowc_empty_input=yes
22358 else
22359 gl_cv_func_mbrtowc_empty_input=no
22360 fi
22361 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22362 conftest.$ac_objext conftest.beam conftest.$ac_ext
22363 fi
22364
22365
22366 fi
22367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5
22368 $as_echo "$gl_cv_func_mbrtowc_empty_input" >&6; }
22369
22370
22371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
22372 $as_echo_n "checking whether the C locale is free of encoding errors... " >&6; }
22373 if ${gl_cv_C_locale_sans_EILSEQ+:} false; then :
22374 $as_echo_n "(cached) " >&6
22375 else
22376
22377 gl_cv_C_locale_sans_EILSEQ="guessing no"
22378
22379 if test "$cross_compiling" = yes; then :
22380 :
22381 else
22382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22383 /* end confdefs.h. */
22384 #include <limits.h>
22385 #include <locale.h>
22386 #include <wchar.h>
22387
22388 int
22389 main ()
22390 {
22391
22392 int i;
22393 char *locale = setlocale (LC_ALL, "C");
22394 if (! locale)
22395 return 1;
22396 for (i = CHAR_MIN; i <= CHAR_MAX; i++)
22397 {
22398 char c = i;
22399 wchar_t wc;
22400 mbstate_t mbs = { 0, };
22401 size_t ss = mbrtowc (&wc, &c, 1, &mbs);
22402 if (1 < ss)
22403 return 1;
22404 }
22405 return 0;
22406
22407 ;
22408 return 0;
22409 }
22410 _ACEOF
22411 if ac_fn_c_try_run "$LINENO"; then :
22412 gl_cv_C_locale_sans_EILSEQ=yes
22413 else
22414 gl_cv_C_locale_sans_EILSEQ=no
22415 fi
22416 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22417 conftest.$ac_objext conftest.beam conftest.$ac_ext
22418 fi
22419
22420 fi
22421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_C_locale_sans_EILSEQ" >&5
22422 $as_echo "$gl_cv_C_locale_sans_EILSEQ" >&6; }
22423
22424 case "$gl_cv_func_mbrtowc_null_arg1" in
22425 *yes) ;;
22426 *)
22427 $as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
22428
22429 REPLACE_MBRTOWC=1
22430 ;;
22431 esac
22432 case "$gl_cv_func_mbrtowc_null_arg2" in
22433 *yes) ;;
22434 *)
22435 $as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
22436
22437 REPLACE_MBRTOWC=1
22438 ;;
22439 esac
22440 case "$gl_cv_func_mbrtowc_retval" in
22441 *yes) ;;
22442 *)
22443 $as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
22444
22445 REPLACE_MBRTOWC=1
22446 ;;
22447 esac
22448 case "$gl_cv_func_mbrtowc_nul_retval" in
22449 *yes) ;;
22450 *)
22451 $as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
22452
22453 REPLACE_MBRTOWC=1
22454 ;;
22455 esac
22456 case "$gl_cv_func_mbrtowc_empty_input" in
22457 *yes) ;;
22458 *)
22459 $as_echo "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h
22460
22461 REPLACE_MBRTOWC=1
22462 ;;
22463 esac
22464 case $gl_cv_C_locale_sans_EILSEQ in
22465 *yes) ;;
22466 *)
22467 $as_echo "#define C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
22468
22469 REPLACE_MBRTOWC=1
22470 ;;
22471 esac
22472 fi
22473 fi
22474
22475 if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
22476
22477
22478
22479
22480
22481
22482
22483
22484 gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
22485
22486
22487 :
22488
22489 fi
22490
22491
22492
22493
22494
22495 GNULIB_MBRTOWC=1
22496
22497
22498
22499
22500
22501 $as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
22502
22503
22504
22505
22506
22507
22508
22509
22510
22511
22512
22513
22514
22515 :
22516
22517
22518
22519
22520
22521
22522 :
22523
22524
22525
22526
22527
22528 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
22529
22530
22531
22532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
22533 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
22534 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
22535 $as_echo_n "(cached) " >&6
22536 else
22537
22538 case "$host_os" in
22539 # Guess no on AIX and OSF/1.
22540 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
22541 # Guess yes otherwise.
22542 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
22543 esac
22544 if test $LOCALE_JA != none; then
22545 if test "$cross_compiling" = yes; then :
22546 :
22547 else
22548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22549 /* end confdefs.h. */
22550
22551 #include <locale.h>
22552 #include <string.h>
22553 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22554 <wchar.h>.
22555 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22556 included before <wchar.h>. */
22557 #include <stddef.h>
22558 #include <stdio.h>
22559 #include <time.h>
22560 #include <wchar.h>
22561 int main ()
22562 {
22563 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
22564 {
22565 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
22566 mbstate_t state;
22567 wchar_t wc;
22568
22569 memset (&state, '\0', sizeof (mbstate_t));
22570 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
22571 if (mbsinit (&state))
22572 return 1;
22573 }
22574 return 0;
22575 }
22576 _ACEOF
22577 if ac_fn_c_try_run "$LINENO"; then :
22578 gl_cv_func_mbrtowc_incomplete_state=yes
22579 else
22580 gl_cv_func_mbrtowc_incomplete_state=no
22581 fi
22582 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22583 conftest.$ac_objext conftest.beam conftest.$ac_ext
22584 fi
22585
22586 fi
22587
22588 fi
22589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
22590 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
22591
22592
22593
22594
22595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
22596 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
22597 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
22598 $as_echo_n "(cached) " >&6
22599 else
22600
22601 case "$host_os" in
22602 # Guess no on Solaris 8.
22603 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
22604 # Guess yes otherwise.
22605 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
22606 esac
22607 if test $LOCALE_ZH_CN != none; then
22608 if test "$cross_compiling" = yes; then :
22609 :
22610 else
22611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22612 /* end confdefs.h. */
22613
22614 #include <locale.h>
22615 #include <stdlib.h>
22616 #include <string.h>
22617 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22618 <wchar.h>.
22619 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22620 included before <wchar.h>. */
22621 #include <stddef.h>
22622 #include <stdio.h>
22623 #include <time.h>
22624 #include <wchar.h>
22625 int main ()
22626 {
22627 /* This fails on Solaris 8:
22628 mbrtowc returns 2, and sets wc to 0x00F0.
22629 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
22630 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
22631 {
22632 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
22633 mbstate_t state;
22634 wchar_t wc;
22635
22636 memset (&state, '\0', sizeof (mbstate_t));
22637 if (mbrtowc (&wc, input + 3, 6, &state) != 4
22638 && mbtowc (&wc, input + 3, 6) == 4)
22639 return 1;
22640 }
22641 return 0;
22642 }
22643 _ACEOF
22644 if ac_fn_c_try_run "$LINENO"; then :
22645 gl_cv_func_mbrtowc_sanitycheck=yes
22646 else
22647 gl_cv_func_mbrtowc_sanitycheck=no
22648 fi
22649 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22650 conftest.$ac_objext conftest.beam conftest.$ac_ext
22651 fi
22652
22653 fi
22654
22655 fi
22656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
22657 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
22658
22659 REPLACE_MBSTATE_T=0
22660 case "$gl_cv_func_mbrtowc_incomplete_state" in
22661 *yes) ;;
22662 *) REPLACE_MBSTATE_T=1 ;;
22663 esac
22664 case "$gl_cv_func_mbrtowc_sanitycheck" in
22665 *yes) ;;
22666 *) REPLACE_MBSTATE_T=1 ;;
22667 esac
22668 else
22669 REPLACE_MBSTATE_T=1
22670 fi
22671
22672
22673
22674 :
22675
22676
22677
22678
22679
22680 if test $ac_cv_func_mbsinit = no; then
22681 HAVE_MBSINIT=0
22682 ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
22683 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22684 <wchar.h>.
22685 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22686 included before <wchar.h>. */
22687 #include <stddef.h>
22688 #include <stdio.h>
22689 #include <time.h>
22690 #include <wchar.h>
22691
22692 "
22693 if test "x$ac_cv_have_decl_mbsinit" = xyes; then :
22694 ac_have_decl=1
22695 else
22696 ac_have_decl=0
22697 fi
22698
22699 cat >>confdefs.h <<_ACEOF
22700 #define HAVE_DECL_MBSINIT $ac_have_decl
22701 _ACEOF
22702
22703 if test $ac_cv_have_decl_mbsinit = yes; then
22704 REPLACE_MBSINIT=1
22705 fi
22706 else
22707 if test $REPLACE_MBSTATE_T = 1; then
22708 REPLACE_MBSINIT=1
22709 else
22710 case "$host_os" in
22711 mingw*) REPLACE_MBSINIT=1 ;;
22712 esac
22713 fi
22714 fi
22715
22716 if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
22717
22718
22719
22720
22721
22722
22723
22724
22725 gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
22726
22727
22728 :
22729
22730 fi
22731
22732
22733
22734
22735
22736 GNULIB_MBSINIT=1
22737
22738
22739
22740
22741
22742 $as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
22743
22744
22745
22746
22747
22748
22749
22750
22751
22752
22753
22754
22755 :
22756
22757
22758
22759
22760
22761
22762 :
22763
22764
22765
22766
22767
22768 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
22769
22770
22771
22772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
22773 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
22774 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
22775 $as_echo_n "(cached) " >&6
22776 else
22777
22778 case "$host_os" in
22779 # Guess no on AIX and OSF/1.
22780 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
22781 # Guess yes otherwise.
22782 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
22783 esac
22784 if test $LOCALE_JA != none; then
22785 if test "$cross_compiling" = yes; then :
22786 :
22787 else
22788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22789 /* end confdefs.h. */
22790
22791 #include <locale.h>
22792 #include <string.h>
22793 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22794 <wchar.h>.
22795 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22796 included before <wchar.h>. */
22797 #include <stddef.h>
22798 #include <stdio.h>
22799 #include <time.h>
22800 #include <wchar.h>
22801 int main ()
22802 {
22803 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
22804 {
22805 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
22806 mbstate_t state;
22807 wchar_t wc;
22808
22809 memset (&state, '\0', sizeof (mbstate_t));
22810 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
22811 if (mbsinit (&state))
22812 return 1;
22813 }
22814 return 0;
22815 }
22816 _ACEOF
22817 if ac_fn_c_try_run "$LINENO"; then :
22818 gl_cv_func_mbrtowc_incomplete_state=yes
22819 else
22820 gl_cv_func_mbrtowc_incomplete_state=no
22821 fi
22822 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22823 conftest.$ac_objext conftest.beam conftest.$ac_ext
22824 fi
22825
22826 fi
22827
22828 fi
22829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
22830 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
22831
22832
22833
22834
22835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
22836 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
22837 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
22838 $as_echo_n "(cached) " >&6
22839 else
22840
22841 case "$host_os" in
22842 # Guess no on Solaris 8.
22843 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
22844 # Guess yes otherwise.
22845 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
22846 esac
22847 if test $LOCALE_ZH_CN != none; then
22848 if test "$cross_compiling" = yes; then :
22849 :
22850 else
22851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22852 /* end confdefs.h. */
22853
22854 #include <locale.h>
22855 #include <stdlib.h>
22856 #include <string.h>
22857 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22858 <wchar.h>.
22859 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22860 included before <wchar.h>. */
22861 #include <stddef.h>
22862 #include <stdio.h>
22863 #include <time.h>
22864 #include <wchar.h>
22865 int main ()
22866 {
22867 /* This fails on Solaris 8:
22868 mbrtowc returns 2, and sets wc to 0x00F0.
22869 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
22870 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
22871 {
22872 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
22873 mbstate_t state;
22874 wchar_t wc;
22875
22876 memset (&state, '\0', sizeof (mbstate_t));
22877 if (mbrtowc (&wc, input + 3, 6, &state) != 4
22878 && mbtowc (&wc, input + 3, 6) == 4)
22879 return 1;
22880 }
22881 return 0;
22882 }
22883 _ACEOF
22884 if ac_fn_c_try_run "$LINENO"; then :
22885 gl_cv_func_mbrtowc_sanitycheck=yes
22886 else
22887 gl_cv_func_mbrtowc_sanitycheck=no
22888 fi
22889 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22890 conftest.$ac_objext conftest.beam conftest.$ac_ext
22891 fi
22892
22893 fi
22894
22895 fi
22896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
22897 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
22898
22899 REPLACE_MBSTATE_T=0
22900 case "$gl_cv_func_mbrtowc_incomplete_state" in
22901 *yes) ;;
22902 *) REPLACE_MBSTATE_T=1 ;;
22903 esac
22904 case "$gl_cv_func_mbrtowc_sanitycheck" in
22905 *yes) ;;
22906 *) REPLACE_MBSTATE_T=1 ;;
22907 esac
22908 else
22909 REPLACE_MBSTATE_T=1
22910 fi
22911
22912
22913
22914 :
22915
22916
22917
22918
22919
22920 if test $ac_cv_func_mbsrtowcs = no; then
22921 HAVE_MBSRTOWCS=0
22922 ac_fn_c_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" "
22923 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22924 <wchar.h>.
22925 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22926 included before <wchar.h>. */
22927 #include <stddef.h>
22928 #include <stdio.h>
22929 #include <time.h>
22930 #include <wchar.h>
22931
22932 "
22933 if test "x$ac_cv_have_decl_mbsrtowcs" = xyes; then :
22934 ac_have_decl=1
22935 else
22936 ac_have_decl=0
22937 fi
22938
22939 cat >>confdefs.h <<_ACEOF
22940 #define HAVE_DECL_MBSRTOWCS $ac_have_decl
22941 _ACEOF
22942
22943 if test $ac_cv_have_decl_mbsrtowcs = yes; then
22944 REPLACE_MBSRTOWCS=1
22945 fi
22946 else
22947 if test $REPLACE_MBSTATE_T = 1; then
22948 REPLACE_MBSRTOWCS=1
22949 else
22950
22951
22952
22953
22954
22955
22956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5
22957 $as_echo_n "checking whether mbsrtowcs works... " >&6; }
22958 if ${gl_cv_func_mbsrtowcs_works+:} false; then :
22959 $as_echo_n "(cached) " >&6
22960 else
22961
22962 case "$host_os" in
22963 # Guess no on HP-UX, Solaris, mingw.
22964 hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;;
22965 # Guess yes otherwise.
22966 *) gl_cv_func_mbsrtowcs_works="guessing yes" ;;
22967 esac
22968 if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
22969 if test "$cross_compiling" = yes; then :
22970 :
22971 else
22972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22973 /* end confdefs.h. */
22974
22975 #include <locale.h>
22976 #include <string.h>
22977 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22978 <wchar.h>.
22979 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22980 included before <wchar.h>. */
22981 #include <stddef.h>
22982 #include <stdio.h>
22983 #include <time.h>
22984 #include <wchar.h>
22985 int main ()
22986 {
22987 int result = 0;
22988 /* Test whether the function supports a NULL destination argument.
22989 This fails on native Windows. */
22990 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
22991 {
22992 const char input[] = "\337er";
22993 const char *src = input;
22994 mbstate_t state;
22995
22996 memset (&state, '\0', sizeof (mbstate_t));
22997 if (mbsrtowcs (NULL, &src, 1, &state) != 3
22998 || src != input)
22999 result |= 1;
23000 }
23001 /* Test whether the function works when started with a conversion state
23002 in non-initial state. This fails on HP-UX 11.11 and Solaris 10. */
23003 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
23004 {
23005 const char input[] = "B\303\274\303\237er";
23006 mbstate_t state;
23007
23008 memset (&state, '\0', sizeof (mbstate_t));
23009 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
23010 if (!mbsinit (&state))
23011 {
23012 const char *src = input + 2;
23013 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
23014 result |= 2;
23015 }
23016 }
23017 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
23018 {
23019 const char input[] = "<\306\374\313\334\270\354>";
23020 mbstate_t state;
23021
23022 memset (&state, '\0', sizeof (mbstate_t));
23023 if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2))
23024 if (!mbsinit (&state))
23025 {
23026 const char *src = input + 4;
23027 if (mbsrtowcs (NULL, &src, 10, &state) != 3)
23028 result |= 4;
23029 }
23030 }
23031 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
23032 {
23033 const char input[] = "B\250\271\201\060\211\070er";
23034 mbstate_t state;
23035
23036 memset (&state, '\0', sizeof (mbstate_t));
23037 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
23038 if (!mbsinit (&state))
23039 {
23040 const char *src = input + 2;
23041 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
23042 result |= 8;
23043 }
23044 }
23045 return result;
23046 }
23047 _ACEOF
23048 if ac_fn_c_try_run "$LINENO"; then :
23049 gl_cv_func_mbsrtowcs_works=yes
23050 else
23051 gl_cv_func_mbsrtowcs_works=no
23052 fi
23053 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23054 conftest.$ac_objext conftest.beam conftest.$ac_ext
23055 fi
23056
23057 fi
23058
23059 fi
23060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5
23061 $as_echo "$gl_cv_func_mbsrtowcs_works" >&6; }
23062
23063 case "$gl_cv_func_mbsrtowcs_works" in
23064 *yes) ;;
23065 *) REPLACE_MBSRTOWCS=1 ;;
23066 esac
23067 fi
23068 fi
23069
23070 if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
23071
23072
23073
23074
23075
23076
23077
23078
23079 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs.$ac_objext"
23080
23081
23082
23083
23084
23085
23086
23087
23088
23089 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext"
23090
23091
23092 :
23093
23094 fi
23095
23096
23097
23098
23099
23100 GNULIB_MBSRTOWCS=1
23101
23102
23103
23104
23105
23106 $as_echo "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h
23107
23108
23109
23110
23111 if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
23112
23113
23114
23115
23116
23117
23118
23119
23120 gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
23121
23122
23123 for ac_header in bp-sym.h
23124 do :
23125 ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
23126 if test "x$ac_cv_header_bp_sym_h" = xyes; then :
23127 cat >>confdefs.h <<_ACEOF
23128 #define HAVE_BP_SYM_H 1
23129 _ACEOF
23130
23131 fi
23132
23133 done
23134
23135
23136 fi
23137
23138
23139
23140
23141
23142 GNULIB_MEMCHR=1
23143
23144
23145
23146
23147
23148 $as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
23149
23150
23151
23152
23153
23154 if test $HAVE_DECL_MEMMEM = 1 && test $REPLACE_MEMMEM = 0; then
23155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works in linear time" >&5
23156 $as_echo_n "checking whether memmem works in linear time... " >&6; }
23157 if ${gl_cv_func_memmem_works_fast+:} false; then :
23158 $as_echo_n "(cached) " >&6
23159 else
23160 if test "$cross_compiling" = yes; then :
23161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23162 /* end confdefs.h. */
23163
23164 #include <features.h>
23165 #ifdef __GNU_LIBRARY__
23166 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2)) \
23167 && !defined __UCLIBC__
23168 Lucky user
23169 #endif
23170 #endif
23171 #ifdef __CYGWIN__
23172 #include <cygwin/version.h>
23173 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 0)
23174 Lucky user
23175 #endif
23176 #endif
23177
23178 _ACEOF
23179 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23180 $EGREP "Lucky user" >/dev/null 2>&1; then :
23181 gl_cv_func_memmem_works_fast="guessing yes"
23182 else
23183 gl_cv_func_memmem_works_fast="guessing no"
23184 fi
23185 rm -f conftest*
23186
23187
23188 else
23189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23190 /* end confdefs.h. */
23191
23192 #include <signal.h> /* for signal */
23193 #include <string.h> /* for memmem */
23194 #include <stdlib.h> /* for malloc */
23195 #include <unistd.h> /* for alarm */
23196 static void quit (int sig) { _exit (sig + 128); }
23197
23198 int
23199 main ()
23200 {
23201
23202 int result = 0;
23203 size_t m = 1000000;
23204 char *haystack = (char *) malloc (2 * m + 1);
23205 char *needle = (char *) malloc (m + 1);
23206 /* Failure to compile this test due to missing alarm is okay,
23207 since all such platforms (mingw) also lack memmem. */
23208 signal (SIGALRM, quit);
23209 alarm (5);
23210 /* Check for quadratic performance. */
23211 if (haystack && needle)
23212 {
23213 memset (haystack, 'A', 2 * m);
23214 haystack[2 * m] = 'B';
23215 memset (needle, 'A', m);
23216 needle[m] = 'B';
23217 if (!memmem (haystack, 2 * m + 1, needle, m + 1))
23218 result |= 1;
23219 }
23220 return result;
23221
23222 ;
23223 return 0;
23224 }
23225 _ACEOF
23226 if ac_fn_c_try_run "$LINENO"; then :
23227 gl_cv_func_memmem_works_fast=yes
23228 else
23229 gl_cv_func_memmem_works_fast=no
23230 fi
23231 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23232 conftest.$ac_objext conftest.beam conftest.$ac_ext
23233 fi
23234
23235
23236 fi
23237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_fast" >&5
23238 $as_echo "$gl_cv_func_memmem_works_fast" >&6; }
23239 case "$gl_cv_func_memmem_works_fast" in
23240 *yes) ;;
23241 *)
23242 REPLACE_MEMMEM=1
23243 ;;
23244 esac
23245 fi
23246
23247 if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
23248
23249
23250
23251
23252
23253
23254
23255
23256 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
23257
23258 fi
23259
23260
23261
23262
23263 for ac_func in memmem
23264 do :
23265 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
23266 if test "x$ac_cv_func_memmem" = xyes; then :
23267 cat >>confdefs.h <<_ACEOF
23268 #define HAVE_MEMMEM 1
23269 _ACEOF
23270
23271 fi
23272 done
23273
23274 if test $ac_cv_func_memmem = yes; then
23275 HAVE_MEMMEM=1
23276 else
23277 HAVE_MEMMEM=0
23278 fi
23279
23280 :
23281
23282
23283
23284
23285
23286 if test $ac_cv_have_decl_memmem = no; then
23287 HAVE_DECL_MEMMEM=0
23288 else
23289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
23290 $as_echo_n "checking whether memmem works... " >&6; }
23291 if ${gl_cv_func_memmem_works_always+:} false; then :
23292 $as_echo_n "(cached) " >&6
23293 else
23294 if test "$cross_compiling" = yes; then :
23295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23296 /* end confdefs.h. */
23297
23298 #ifdef __GNU_LIBRARY__
23299 #include <features.h>
23300 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
23301 || __GLIBC_MINOR__ > 12)) \
23302 || (__GLIBC__ > 2)) \
23303 || defined __UCLIBC__
23304 Lucky user
23305 #endif
23306 #elif defined __CYGWIN__
23307 #include <cygwin/version.h>
23308 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
23309 Lucky user
23310 #endif
23311 #else
23312 Lucky user
23313 #endif
23314
23315 _ACEOF
23316 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23317 $EGREP "Lucky user" >/dev/null 2>&1; then :
23318 gl_cv_func_memmem_works_always="guessing yes"
23319 else
23320 gl_cv_func_memmem_works_always="guessing no"
23321 fi
23322 rm -f conftest*
23323
23324
23325 else
23326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23327 /* end confdefs.h. */
23328
23329 #include <string.h> /* for memmem */
23330 #define P "_EF_BF_BD"
23331 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
23332 #define NEEDLE P P P P P
23333
23334 int
23335 main ()
23336 {
23337
23338 int result = 0;
23339 if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
23340 result |= 1;
23341 /* Check for empty needle behavior. */
23342 {
23343 const char *haystack = "AAA";
23344 if (memmem (haystack, 3, NULL, 0) != haystack)
23345 result |= 2;
23346 }
23347 return result;
23348
23349 ;
23350 return 0;
23351 }
23352 _ACEOF
23353 if ac_fn_c_try_run "$LINENO"; then :
23354 gl_cv_func_memmem_works_always=yes
23355 else
23356 gl_cv_func_memmem_works_always=no
23357 fi
23358 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23359 conftest.$ac_objext conftest.beam conftest.$ac_ext
23360 fi
23361
23362
23363 fi
23364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
23365 $as_echo "$gl_cv_func_memmem_works_always" >&6; }
23366 case "$gl_cv_func_memmem_works_always" in
23367 *yes) ;;
23368 *)
23369 REPLACE_MEMMEM=1
23370 ;;
23371 esac
23372 fi
23373 :
23374
23375 if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
23376
23377
23378
23379
23380
23381
23382
23383
23384 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
23385
23386 fi
23387
23388
23389
23390
23391
23392 GNULIB_MEMMEM=1
23393
23394
23395
23396
23397
23398 $as_echo "#define GNULIB_TEST_MEMMEM 1" >>confdefs.h
23399
23400
23401
23402
23403
23404
23405
23406
23407
23408 for ac_func in mempcpy
23409 do :
23410 ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
23411 if test "x$ac_cv_func_mempcpy" = xyes; then :
23412 cat >>confdefs.h <<_ACEOF
23413 #define HAVE_MEMPCPY 1
23414 _ACEOF
23415
23416 fi
23417 done
23418
23419 if test $ac_cv_func_mempcpy = no; then
23420 HAVE_MEMPCPY=0
23421 fi
23422
23423 if test $HAVE_MEMPCPY = 0; then
23424
23425
23426
23427
23428
23429
23430
23431
23432 gl_LIBOBJS="$gl_LIBOBJS mempcpy.$ac_objext"
23433
23434
23435 :
23436
23437 fi
23438
23439
23440
23441
23442
23443 GNULIB_MEMPCPY=1
23444
23445
23446
23447
23448
23449 $as_echo "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h
23450
23451
23452
23453
23454
23455
23456
23457
23458 :
23459
23460
23461
23462
23463
23464 if test $ac_cv_have_decl_memrchr = no; then
23465 HAVE_DECL_MEMRCHR=0
23466 fi
23467
23468 for ac_func in memrchr
23469 do :
23470 ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
23471 if test "x$ac_cv_func_memrchr" = xyes; then :
23472 cat >>confdefs.h <<_ACEOF
23473 #define HAVE_MEMRCHR 1
23474 _ACEOF
23475
23476 fi
23477 done
23478
23479
23480 if test $ac_cv_func_memrchr = no; then
23481
23482
23483
23484
23485
23486
23487
23488
23489 gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
23490
23491 :
23492 fi
23493
23494
23495
23496
23497
23498 GNULIB_MEMRCHR=1
23499
23500
23501
23502
23503
23504 $as_echo "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h
23505
23506
23507
23508
23509
23510 :
23511
23512
23513
23514
23515
23516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing slash" >&5
23517 $as_echo_n "checking whether mkdir handles trailing slash... " >&6; }
23518 if ${gl_cv_func_mkdir_trailing_slash_works+:} false; then :
23519 $as_echo_n "(cached) " >&6
23520 else
23521 rm -rf conftest.dir
23522 if test "$cross_compiling" = yes; then :
23523 case "$host_os" in
23524 # Guess yes on glibc systems.
23525 *-gnu*) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
23526 # If we don't know, assume the worst.
23527 *) gl_cv_func_mkdir_trailing_slash_works="guessing no" ;;
23528 esac
23529
23530 else
23531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23532 /* end confdefs.h. */
23533
23534 # include <sys/types.h>
23535 # include <sys/stat.h>
23536
23537 int
23538 main ()
23539 {
23540 return mkdir ("conftest.dir/", 0700);
23541 ;
23542 return 0;
23543 }
23544 _ACEOF
23545 if ac_fn_c_try_run "$LINENO"; then :
23546 gl_cv_func_mkdir_trailing_slash_works=yes
23547 else
23548 gl_cv_func_mkdir_trailing_slash_works=no
23549 fi
23550 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23551 conftest.$ac_objext conftest.beam conftest.$ac_ext
23552 fi
23553
23554 rm -rf conftest.dir
23555
23556
23557 fi
23558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_slash_works" >&5
23559 $as_echo "$gl_cv_func_mkdir_trailing_slash_works" >&6; }
23560 case "$gl_cv_func_mkdir_trailing_slash_works" in
23561 *yes) ;;
23562 *)
23563 REPLACE_MKDIR=1
23564 ;;
23565 esac
23566
23567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing dot" >&5
23568 $as_echo_n "checking whether mkdir handles trailing dot... " >&6; }
23569 if ${gl_cv_func_mkdir_trailing_dot_works+:} false; then :
23570 $as_echo_n "(cached) " >&6
23571 else
23572 rm -rf conftest.dir
23573 if test "$cross_compiling" = yes; then :
23574 case "$host_os" in
23575 # Guess yes on glibc systems.
23576 *-gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
23577 # If we don't know, assume the worst.
23578 *) gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
23579 esac
23580
23581 else
23582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23583 /* end confdefs.h. */
23584
23585 # include <sys/types.h>
23586 # include <sys/stat.h>
23587
23588 int
23589 main ()
23590 {
23591 return !mkdir ("conftest.dir/./", 0700);
23592 ;
23593 return 0;
23594 }
23595 _ACEOF
23596 if ac_fn_c_try_run "$LINENO"; then :
23597 gl_cv_func_mkdir_trailing_dot_works=yes
23598 else
23599 gl_cv_func_mkdir_trailing_dot_works=no
23600 fi
23601 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23602 conftest.$ac_objext conftest.beam conftest.$ac_ext
23603 fi
23604
23605 rm -rf conftest.dir
23606
23607
23608 fi
23609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_dot_works" >&5
23610 $as_echo "$gl_cv_func_mkdir_trailing_dot_works" >&6; }
23611 case "$gl_cv_func_mkdir_trailing_dot_works" in
23612 *yes) ;;
23613 *)
23614 REPLACE_MKDIR=1
23615
23616 $as_echo "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h
23617
23618 ;;
23619 esac
23620
23621 if test $REPLACE_MKDIR = 1; then
23622
23623
23624
23625
23626
23627
23628
23629
23630 gl_LIBOBJS="$gl_LIBOBJS mkdir.$ac_objext"
23631
23632 fi
23633
23634
23635 for ac_func in mkdtemp
23636 do :
23637 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
23638 if test "x$ac_cv_func_mkdtemp" = xyes; then :
23639 cat >>confdefs.h <<_ACEOF
23640 #define HAVE_MKDTEMP 1
23641 _ACEOF
23642
23643 fi
23644 done
23645
23646 if test $ac_cv_func_mkdtemp = no; then
23647 HAVE_MKDTEMP=0
23648 fi
23649
23650 if test $HAVE_MKDTEMP = 0; then
23651
23652
23653
23654
23655
23656
23657
23658
23659 gl_LIBOBJS="$gl_LIBOBJS mkdtemp.$ac_objext"
23660
23661 :
23662
23663 fi
23664
23665
23666
23667
23668
23669 GNULIB_MKDTEMP=1
23670
23671
23672
23673
23674
23675 $as_echo "#define GNULIB_TEST_MKDTEMP 1" >>confdefs.h
23676
23677
23678
23679
23680
23681
23682
23683
23684
23685 :
23686
23687
23688
23689
23690
23691 if test $ac_cv_func_mkostemp != yes; then
23692 HAVE_MKOSTEMP=0
23693 fi
23694
23695 if test $HAVE_MKOSTEMP = 0; then
23696
23697
23698
23699
23700
23701
23702
23703
23704 gl_LIBOBJS="$gl_LIBOBJS mkostemp.$ac_objext"
23705
23706
23707
23708 fi
23709
23710
23711 cat >>confdefs.h <<_ACEOF
23712 #define GNULIB_MKOSTEMP 1
23713 _ACEOF
23714
23715
23716
23717
23718
23719
23720
23721 GNULIB_MKOSTEMP=1
23722
23723
23724
23725
23726
23727 $as_echo "#define GNULIB_TEST_MKOSTEMP 1" >>confdefs.h
23728
23729
23730
23731
23732 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
23733
23734
23735
23736
23737
23738
23739
23740
23741 gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
23742
23743 fi
23744
23745 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
23746
23747
23748
23749
23750
23751
23752
23753
23754 gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
23755
23756 fi
23757
23758
23759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <netinet/in.h> is self-contained" >&5
23760 $as_echo_n "checking whether <netinet/in.h> is self-contained... " >&6; }
23761 if ${gl_cv_header_netinet_in_h_selfcontained+:} false; then :
23762 $as_echo_n "(cached) " >&6
23763 else
23764
23765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23766 /* end confdefs.h. */
23767 #include <netinet/in.h>
23768 int
23769 main ()
23770 {
23771
23772 ;
23773 return 0;
23774 }
23775 _ACEOF
23776 if ac_fn_c_try_compile "$LINENO"; then :
23777 gl_cv_header_netinet_in_h_selfcontained=yes
23778 else
23779 gl_cv_header_netinet_in_h_selfcontained=no
23780 fi
23781 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23782
23783 fi
23784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_netinet_in_h_selfcontained" >&5
23785 $as_echo "$gl_cv_header_netinet_in_h_selfcontained" >&6; }
23786 if test $gl_cv_header_netinet_in_h_selfcontained = yes; then
23787 NETINET_IN_H=''
23788 else
23789 NETINET_IN_H='netinet/in.h'
23790 for ac_header in netinet/in.h
23791 do :
23792 ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
23793 if test "x$ac_cv_header_netinet_in_h" = xyes; then :
23794 cat >>confdefs.h <<_ACEOF
23795 #define HAVE_NETINET_IN_H 1
23796 _ACEOF
23797
23798 fi
23799
23800 done
23801
23802
23803
23804
23805
23806
23807
23808 :
23809
23810
23811
23812
23813
23814
23815
23816
23817 if test $gl_cv_have_include_next = yes; then
23818 gl_cv_next_netinet_in_h='<'netinet/in.h'>'
23819 else
23820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <netinet/in.h>" >&5
23821 $as_echo_n "checking absolute name of <netinet/in.h>... " >&6; }
23822 if ${gl_cv_next_netinet_in_h+:} false; then :
23823 $as_echo_n "(cached) " >&6
23824 else
23825
23826 if test $ac_cv_header_netinet_in_h = yes; then
23827
23828
23829
23830
23831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23832 /* end confdefs.h. */
23833 #include <netinet/in.h>
23834 _ACEOF
23835 case "$host_os" in
23836 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23837 *) gl_absname_cpp="$ac_cpp" ;;
23838 esac
23839
23840 case "$host_os" in
23841 mingw*)
23842 gl_dirsep_regex='[/\\]'
23843 ;;
23844 *)
23845 gl_dirsep_regex='\/'
23846 ;;
23847 esac
23848 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23849 gl_header_literal_regex=`echo 'netinet/in.h' \
23850 | sed -e "$gl_make_literal_regex_sed"`
23851 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23852 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23853 s|^/[^/]|//&|
23854 p
23855 q
23856 }'
23857
23858 gl_cv_absolute_netinet_in_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23859 sed -n "$gl_absolute_header_sed"`
23860
23861 gl_header=$gl_cv_absolute_netinet_in_h
23862 gl_cv_next_netinet_in_h='"'$gl_header'"'
23863 else
23864 gl_cv_next_netinet_in_h='<'netinet/in.h'>'
23865 fi
23866
23867
23868 fi
23869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_netinet_in_h" >&5
23870 $as_echo "$gl_cv_next_netinet_in_h" >&6; }
23871 fi
23872 NEXT_NETINET_IN_H=$gl_cv_next_netinet_in_h
23873
23874 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23875 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23876 gl_next_as_first_directive='<'netinet/in.h'>'
23877 else
23878 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23879 gl_next_as_first_directive=$gl_cv_next_netinet_in_h
23880 fi
23881 NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H=$gl_next_as_first_directive
23882
23883
23884
23885
23886 if test $ac_cv_header_netinet_in_h = yes; then
23887 HAVE_NETINET_IN_H=1
23888 else
23889 HAVE_NETINET_IN_H=0
23890 fi
23891
23892 fi
23893
23894 if test -n "$NETINET_IN_H"; then
23895 GL_GENERATE_NETINET_IN_H_TRUE=
23896 GL_GENERATE_NETINET_IN_H_FALSE='#'
23897 else
23898 GL_GENERATE_NETINET_IN_H_TRUE='#'
23899 GL_GENERATE_NETINET_IN_H_FALSE=
23900 fi
23901
23902
23903
23904
23905
23906 case "$host_os" in
23907 mingw* | pw*)
23908 REPLACE_OPEN=1
23909 ;;
23910 *)
23911
23912 :
23913
23914
23915
23916
23917
23918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
23919 $as_echo_n "checking whether open recognizes a trailing slash... " >&6; }
23920 if ${gl_cv_func_open_slash+:} false; then :
23921 $as_echo_n "(cached) " >&6
23922 else
23923 # Assume that if we have lstat, we can also check symlinks.
23924 if test $ac_cv_func_lstat = yes; then
23925 touch conftest.tmp
23926 ln -s conftest.tmp conftest.lnk
23927 fi
23928 if test "$cross_compiling" = yes; then :
23929
23930 case "$host_os" in
23931 freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
23932 gl_cv_func_open_slash="guessing no" ;;
23933 *)
23934 gl_cv_func_open_slash="guessing yes" ;;
23935 esac
23936
23937 else
23938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23939 /* end confdefs.h. */
23940
23941 #include <fcntl.h>
23942 #if HAVE_UNISTD_H
23943 # include <unistd.h>
23944 #endif
23945 int main ()
23946 {
23947 int result = 0;
23948 #if HAVE_LSTAT
23949 if (open ("conftest.lnk/", O_RDONLY) != -1)
23950 result |= 1;
23951 #endif
23952 if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
23953 result |= 2;
23954 return result;
23955 }
23956 _ACEOF
23957 if ac_fn_c_try_run "$LINENO"; then :
23958 gl_cv_func_open_slash=yes
23959 else
23960 gl_cv_func_open_slash=no
23961 fi
23962 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23963 conftest.$ac_objext conftest.beam conftest.$ac_ext
23964 fi
23965
23966 rm -f conftest.sl conftest.tmp conftest.lnk
23967
23968 fi
23969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
23970 $as_echo "$gl_cv_func_open_slash" >&6; }
23971 case "$gl_cv_func_open_slash" in
23972 *no)
23973
23974 $as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
23975
23976 REPLACE_OPEN=1
23977 ;;
23978 esac
23979 ;;
23980 esac
23981
23982 if test $REPLACE_OPEN = 0; then
23983
23984
23985
23986 :
23987
23988
23989
23990
23991
23992 if test $ac_cv_func_fchdir = no; then
23993 HAVE_FCHDIR=0
23994 fi
23995
23996 if test $HAVE_FCHDIR = 0; then
23997 REPLACE_OPEN=1
23998 fi
23999 fi
24000
24001
24002
24003 if test $REPLACE_OPEN = 1; then
24004
24005
24006
24007
24008
24009
24010
24011
24012 gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
24013
24014
24015
24016 :
24017
24018 fi
24019
24020
24021
24022
24023
24024 GNULIB_OPEN=1
24025
24026
24027
24028
24029
24030 $as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h
24031
24032
24033
24034
24035
24036
24037
24038 :
24039
24040
24041
24042
24043
24044
24045 case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in
24046 yes+*yes)
24047 ;;
24048 yes+*)
24049 # Solaris 9 has *at functions, but uniformly mishandles trailing
24050 # slash in all of them.
24051 REPLACE_OPENAT=1
24052 ;;
24053 *)
24054 HAVE_OPENAT=0
24055 ;;
24056 esac
24057
24058 if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then
24059
24060
24061
24062
24063
24064
24065
24066
24067 gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext"
24068
24069
24070
24071 :
24072
24073 fi
24074
24075
24076 cat >>confdefs.h <<_ACEOF
24077 #define GNULIB_OPENAT 1
24078 _ACEOF
24079
24080
24081
24082
24083
24084
24085 GNULIB_OPENAT=1
24086
24087
24088
24089
24090
24091 $as_echo "#define GNULIB_TEST_OPENAT 1" >>confdefs.h
24092
24093
24094
24095
24096
24097
24098 for ac_func in opendir
24099 do :
24100 ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
24101 if test "x$ac_cv_func_opendir" = xyes; then :
24102 cat >>confdefs.h <<_ACEOF
24103 #define HAVE_OPENDIR 1
24104 _ACEOF
24105
24106 fi
24107 done
24108
24109 if test $ac_cv_func_opendir = no; then
24110 HAVE_OPENDIR=0
24111 fi
24112
24113
24114
24115
24116 :
24117
24118
24119
24120
24121
24122 if test $ac_cv_func_fchdir = no; then
24123 HAVE_FCHDIR=0
24124 fi
24125
24126 if test $HAVE_FCHDIR = 0; then
24127 if test $HAVE_OPENDIR = 1; then
24128 REPLACE_OPENDIR=1
24129 fi
24130 fi
24131
24132 case $host_os,$HAVE_OPENDIR in
24133 os2*,1)
24134 REPLACE_OPENDIR=1;;
24135 esac
24136
24137 if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
24138
24139
24140
24141
24142
24143
24144
24145
24146 gl_LIBOBJS="$gl_LIBOBJS opendir.$ac_objext"
24147
24148 fi
24149
24150
24151
24152
24153
24154 GNULIB_OPENDIR=1
24155
24156
24157
24158
24159
24160 $as_echo "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
24161
24162
24163
24164
24165
24166 :
24167
24168
24169
24170
24171
24172
24173
24174
24175
24176
24177 for ac_func in rawmemchr
24178 do :
24179 ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
24180 if test "x$ac_cv_func_rawmemchr" = xyes; then :
24181 cat >>confdefs.h <<_ACEOF
24182 #define HAVE_RAWMEMCHR 1
24183 _ACEOF
24184
24185 fi
24186 done
24187
24188 if test $ac_cv_func_rawmemchr = no; then
24189 HAVE_RAWMEMCHR=0
24190 fi
24191
24192 if test $HAVE_RAWMEMCHR = 0; then
24193
24194
24195
24196
24197
24198
24199
24200
24201 gl_LIBOBJS="$gl_LIBOBJS rawmemchr.$ac_objext"
24202
24203 :
24204 fi
24205
24206
24207
24208
24209
24210 GNULIB_RAWMEMCHR=1
24211
24212
24213
24214
24215
24216 $as_echo "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
24217
24218
24219
24220
24221
24222
24223 for ac_func in readdir
24224 do :
24225 ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir"
24226 if test "x$ac_cv_func_readdir" = xyes; then :
24227 cat >>confdefs.h <<_ACEOF
24228 #define HAVE_READDIR 1
24229 _ACEOF
24230
24231 fi
24232 done
24233
24234 if test $ac_cv_func_readdir = no; then
24235 HAVE_READDIR=0
24236 fi
24237
24238 if test $HAVE_READDIR = 0; then
24239
24240
24241
24242
24243
24244
24245
24246
24247 gl_LIBOBJS="$gl_LIBOBJS readdir.$ac_objext"
24248
24249 fi
24250
24251
24252
24253
24254
24255 GNULIB_READDIR=1
24256
24257
24258
24259
24260
24261 $as_echo "#define GNULIB_TEST_READDIR 1" >>confdefs.h
24262
24263
24264
24265
24266
24267
24268 :
24269
24270
24271
24272
24273
24274 if test $ac_cv_func_readlink = no; then
24275 HAVE_READLINK=0
24276 else
24277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
24278 $as_echo_n "checking whether readlink signature is correct... " >&6; }
24279 if ${gl_cv_decl_readlink_works+:} false; then :
24280 $as_echo_n "(cached) " >&6
24281 else
24282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24283 /* end confdefs.h. */
24284 #include <unistd.h>
24285 /* Cause compilation failure if original declaration has wrong type. */
24286 ssize_t readlink (const char *, char *, size_t);
24287 int
24288 main ()
24289 {
24290
24291 ;
24292 return 0;
24293 }
24294 _ACEOF
24295 if ac_fn_c_try_compile "$LINENO"; then :
24296 gl_cv_decl_readlink_works=yes
24297 else
24298 gl_cv_decl_readlink_works=no
24299 fi
24300 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24301 fi
24302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
24303 $as_echo "$gl_cv_decl_readlink_works" >&6; }
24304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
24305 $as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
24306 if ${gl_cv_func_readlink_works+:} false; then :
24307 $as_echo_n "(cached) " >&6
24308 else
24309 # We have readlink, so assume ln -s works.
24310 ln -s conftest.no-such conftest.link
24311 ln -s conftest.link conftest.lnk2
24312 if test "$cross_compiling" = yes; then :
24313 case "$host_os" in
24314 # Guess yes on glibc systems.
24315 *-gnu*) gl_cv_func_readlink_works="guessing yes" ;;
24316 # If we don't know, assume the worst.
24317 *) gl_cv_func_readlink_works="guessing no" ;;
24318 esac
24319
24320 else
24321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24322 /* end confdefs.h. */
24323 #include <unistd.h>
24324
24325 int
24326 main ()
24327 {
24328 char buf[20];
24329 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
24330 ;
24331 return 0;
24332 }
24333 _ACEOF
24334 if ac_fn_c_try_run "$LINENO"; then :
24335 gl_cv_func_readlink_works=yes
24336 else
24337 gl_cv_func_readlink_works=no
24338 fi
24339 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24340 conftest.$ac_objext conftest.beam conftest.$ac_ext
24341 fi
24342
24343 rm -f conftest.link conftest.lnk2
24344 fi
24345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
24346 $as_echo "$gl_cv_func_readlink_works" >&6; }
24347 case "$gl_cv_func_readlink_works" in
24348 *yes)
24349 if test "$gl_cv_decl_readlink_works" != yes; then
24350 REPLACE_READLINK=1
24351 fi
24352 ;;
24353 *)
24354
24355 $as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
24356
24357 REPLACE_READLINK=1
24358 ;;
24359 esac
24360 fi
24361
24362 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
24363
24364
24365
24366
24367
24368
24369
24370
24371 gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
24372
24373
24374 :
24375
24376 fi
24377
24378
24379
24380
24381
24382 GNULIB_READLINK=1
24383
24384
24385
24386
24387
24388 $as_echo "#define GNULIB_TEST_READLINK 1" >>confdefs.h
24389
24390
24391
24392
24393
24394
24395 if test $gl_cv_func_malloc_posix = yes; then
24396
24397 $as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h
24398
24399 else
24400 REPLACE_REALLOC=1
24401 fi
24402
24403 if test $REPLACE_REALLOC = 1; then
24404
24405
24406
24407
24408
24409
24410
24411
24412 gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
24413
24414 fi
24415
24416
24417
24418
24419
24420 GNULIB_REALLOC_POSIX=1
24421
24422
24423
24424
24425
24426 $as_echo "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
24427
24428
24429
24430
24431
24432
24433
24434 :
24435
24436
24437
24438
24439
24440
24441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on destination" >&5
24442 $as_echo_n "checking whether rename honors trailing slash on destination... " >&6; }
24443 if ${gl_cv_func_rename_slash_dst_works+:} false; then :
24444 $as_echo_n "(cached) " >&6
24445 else
24446 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
24447 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
24448 as_fn_error $? "cannot create temporary files" "$LINENO" 5
24449 # Assume that if we have lstat, we can also check symlinks.
24450 if test $ac_cv_func_lstat = yes; then
24451 ln -s conftest.f conftest.lnk
24452 fi
24453 if test "$cross_compiling" = yes; then :
24454 case "$host_os" in
24455 # Guess yes on glibc systems.
24456 *-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
24457 # If we don't know, assume the worst.
24458 *) gl_cv_func_rename_slash_dst_works="guessing no" ;;
24459 esac
24460
24461 else
24462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24463 /* end confdefs.h. */
24464
24465 # include <stdio.h>
24466 # include <stdlib.h>
24467
24468 int
24469 main ()
24470 {
24471 int result = 0;
24472 if (rename ("conftest.f1", "conftest.f2/") == 0)
24473 result |= 1;
24474 if (rename ("conftest.d1", "conftest.d2/") != 0)
24475 result |= 2;
24476 #if HAVE_LSTAT
24477 if (rename ("conftest.f", "conftest.lnk/") == 0)
24478 result |= 4;
24479 #endif
24480 return result;
24481
24482 ;
24483 return 0;
24484 }
24485 _ACEOF
24486 if ac_fn_c_try_run "$LINENO"; then :
24487 gl_cv_func_rename_slash_dst_works=yes
24488 else
24489 gl_cv_func_rename_slash_dst_works=no
24490 fi
24491 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24492 conftest.$ac_objext conftest.beam conftest.$ac_ext
24493 fi
24494
24495 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
24496
24497 fi
24498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_dst_works" >&5
24499 $as_echo "$gl_cv_func_rename_slash_dst_works" >&6; }
24500 case "$gl_cv_func_rename_slash_dst_works" in
24501 *yes) ;;
24502 *)
24503 REPLACE_RENAME=1
24504
24505 $as_echo "#define RENAME_TRAILING_SLASH_DEST_BUG 1" >>confdefs.h
24506
24507 ;;
24508 esac
24509
24510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on source" >&5
24511 $as_echo_n "checking whether rename honors trailing slash on source... " >&6; }
24512 if ${gl_cv_func_rename_slash_src_works+:} false; then :
24513 $as_echo_n "(cached) " >&6
24514 else
24515 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
24516 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
24517 as_fn_error $? "cannot create temporary files" "$LINENO" 5
24518 # Assume that if we have lstat, we can also check symlinks.
24519 if test $ac_cv_func_lstat = yes; then
24520 ln -s conftest.f conftest.lnk
24521 fi
24522 if test "$cross_compiling" = yes; then :
24523 case "$host_os" in
24524 # Guess yes on glibc systems.
24525 *-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
24526 # If we don't know, assume the worst.
24527 *) gl_cv_func_rename_slash_src_works="guessing no" ;;
24528 esac
24529
24530 else
24531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24532 /* end confdefs.h. */
24533
24534 # include <stdio.h>
24535 # include <stdlib.h>
24536
24537 int
24538 main ()
24539 {
24540 int result = 0;
24541 if (rename ("conftest.f1/", "conftest.d3") == 0)
24542 result |= 1;
24543 if (rename ("conftest.d1/", "conftest.d2") != 0)
24544 result |= 2;
24545 #if HAVE_LSTAT
24546 if (rename ("conftest.lnk/", "conftest.f") == 0)
24547 result |= 4;
24548 #endif
24549 return result;
24550
24551 ;
24552 return 0;
24553 }
24554 _ACEOF
24555 if ac_fn_c_try_run "$LINENO"; then :
24556 gl_cv_func_rename_slash_src_works=yes
24557 else
24558 gl_cv_func_rename_slash_src_works=no
24559 fi
24560 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24561 conftest.$ac_objext conftest.beam conftest.$ac_ext
24562 fi
24563
24564 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
24565
24566 fi
24567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_src_works" >&5
24568 $as_echo "$gl_cv_func_rename_slash_src_works" >&6; }
24569 case "$gl_cv_func_rename_slash_src_works" in
24570 *yes) ;;
24571 *)
24572 REPLACE_RENAME=1
24573
24574 $as_echo "#define RENAME_TRAILING_SLASH_SOURCE_BUG 1" >>confdefs.h
24575
24576 ;;
24577 esac
24578
24579
24580 :
24581
24582
24583
24584
24585
24586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5
24587 $as_echo_n "checking whether rename manages hard links correctly... " >&6; }
24588 if ${gl_cv_func_rename_link_works+:} false; then :
24589 $as_echo_n "(cached) " >&6
24590 else
24591 if test $ac_cv_func_link = yes; then
24592 rm -rf conftest.f conftest.f1
24593 if touch conftest.f && ln conftest.f conftest.f1 &&
24594 set x `ls -i conftest.f conftest.f1` && test "" = ""; then
24595 if test "$cross_compiling" = yes; then :
24596 case "$host_os" in
24597 # Guess yes on glibc systems.
24598 *-gnu*) gl_cv_func_rename_link_works="guessing yes" ;;
24599 # If we don't know, assume the worst.
24600 *) gl_cv_func_rename_link_works="guessing no" ;;
24601 esac
24602
24603 else
24604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24605 /* end confdefs.h. */
24606
24607 # include <stdio.h>
24608 # include <stdlib.h>
24609 # include <unistd.h>
24610
24611 int
24612 main ()
24613 {
24614 int result = 0;
24615 if (rename ("conftest.f", "conftest.f1"))
24616 result |= 1;
24617 if (unlink ("conftest.f1"))
24618 result |= 2;
24619 if (rename ("conftest.f", "conftest.f"))
24620 result |= 4;
24621 if (rename ("conftest.f1", "conftest.f1") == 0)
24622 result |= 8;
24623 return result;
24624
24625 ;
24626 return 0;
24627 }
24628 _ACEOF
24629 if ac_fn_c_try_run "$LINENO"; then :
24630 gl_cv_func_rename_link_works=yes
24631 else
24632 gl_cv_func_rename_link_works=no
24633 fi
24634 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24635 conftest.$ac_objext conftest.beam conftest.$ac_ext
24636 fi
24637
24638 else
24639 gl_cv_func_rename_link_works="guessing no"
24640 fi
24641 rm -rf conftest.f conftest.f1
24642 else
24643 gl_cv_func_rename_link_works=yes
24644 fi
24645
24646 fi
24647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_link_works" >&5
24648 $as_echo "$gl_cv_func_rename_link_works" >&6; }
24649 case "$gl_cv_func_rename_link_works" in
24650 *yes) ;;
24651 *)
24652 REPLACE_RENAME=1
24653
24654 $as_echo "#define RENAME_HARD_LINK_BUG 1" >>confdefs.h
24655
24656 ;;
24657 esac
24658
24659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages existing destinations correctly" >&5
24660 $as_echo_n "checking whether rename manages existing destinations correctly... " >&6; }
24661 if ${gl_cv_func_rename_dest_works+:} false; then :
24662 $as_echo_n "(cached) " >&6
24663 else
24664 rm -rf conftest.f conftest.d1 conftest.d2
24665 touch conftest.f && mkdir conftest.d1 conftest.d2 ||
24666 as_fn_error $? "cannot create temporary files" "$LINENO" 5
24667 if test "$cross_compiling" = yes; then :
24668 case "$host_os" in
24669 # Guess yes on glibc systems.
24670 *-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;;
24671 # If we don't know, assume the worst.
24672 *) gl_cv_func_rename_dest_works="guessing no" ;;
24673 esac
24674
24675 else
24676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24677 /* end confdefs.h. */
24678
24679 # include <stdio.h>
24680 # include <stdlib.h>
24681
24682 int
24683 main ()
24684 {
24685 int result = 0;
24686 if (rename ("conftest.d1", "conftest.d2") != 0)
24687 result |= 1;
24688 if (rename ("conftest.d2", "conftest.f") == 0)
24689 result |= 2;
24690 return result;
24691
24692 ;
24693 return 0;
24694 }
24695 _ACEOF
24696 if ac_fn_c_try_run "$LINENO"; then :
24697 gl_cv_func_rename_dest_works=yes
24698 else
24699 gl_cv_func_rename_dest_works=no
24700 fi
24701 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24702 conftest.$ac_objext conftest.beam conftest.$ac_ext
24703 fi
24704
24705 rm -rf conftest.f conftest.d1 conftest.d2
24706
24707 fi
24708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_dest_works" >&5
24709 $as_echo "$gl_cv_func_rename_dest_works" >&6; }
24710 case "$gl_cv_func_rename_dest_works" in
24711 *yes) ;;
24712 *)
24713 REPLACE_RENAME=1
24714
24715 $as_echo "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h
24716
24717 ;;
24718 esac
24719
24720 if test $REPLACE_RENAME = 1; then
24721
24722
24723
24724
24725
24726
24727
24728
24729 gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext"
24730
24731 fi
24732
24733
24734
24735
24736
24737 GNULIB_RENAME=1
24738
24739
24740
24741
24742
24743 $as_echo "#define GNULIB_TEST_RENAME 1" >>confdefs.h
24744
24745
24746
24747
24748
24749
24750 for ac_func in rewinddir
24751 do :
24752 ac_fn_c_check_func "$LINENO" "rewinddir" "ac_cv_func_rewinddir"
24753 if test "x$ac_cv_func_rewinddir" = xyes; then :
24754 cat >>confdefs.h <<_ACEOF
24755 #define HAVE_REWINDDIR 1
24756 _ACEOF
24757
24758 fi
24759 done
24760
24761 if test $ac_cv_func_rewinddir = no; then
24762 HAVE_REWINDDIR=0
24763 fi
24764
24765 if test $HAVE_REWINDDIR = 0; then
24766
24767
24768
24769
24770
24771
24772
24773
24774 gl_LIBOBJS="$gl_LIBOBJS rewinddir.$ac_objext"
24775
24776 fi
24777
24778
24779
24780
24781
24782 GNULIB_REWINDDIR=1
24783
24784
24785
24786
24787
24788 $as_echo "#define GNULIB_TEST_REWINDDIR 1" >>confdefs.h
24789
24790
24791
24792
24793
24794
24795 :
24796
24797
24798
24799
24800
24801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
24802 $as_echo_n "checking whether rmdir works... " >&6; }
24803 if ${gl_cv_func_rmdir_works+:} false; then :
24804 $as_echo_n "(cached) " >&6
24805 else
24806 mkdir conftest.dir
24807 touch conftest.file
24808 if test "$cross_compiling" = yes; then :
24809 case "$host_os" in
24810 # Guess yes on glibc systems.
24811 *-gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
24812 # If we don't know, assume the worst.
24813 *) gl_cv_func_rmdir_works="guessing no" ;;
24814 esac
24815
24816 else
24817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24818 /* end confdefs.h. */
24819 #include <stdio.h>
24820 #include <errno.h>
24821 #if HAVE_UNISTD_H
24822 # include <unistd.h>
24823 #else /* on Windows with MSVC */
24824 # include <direct.h>
24825 #endif
24826
24827 int
24828 main ()
24829 {
24830 int result = 0;
24831 if (!rmdir ("conftest.file/"))
24832 result |= 1;
24833 else if (errno != ENOTDIR)
24834 result |= 2;
24835 if (!rmdir ("conftest.dir/./"))
24836 result |= 4;
24837 return result;
24838
24839 ;
24840 return 0;
24841 }
24842 _ACEOF
24843 if ac_fn_c_try_run "$LINENO"; then :
24844 gl_cv_func_rmdir_works=yes
24845 else
24846 gl_cv_func_rmdir_works=no
24847 fi
24848 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24849 conftest.$ac_objext conftest.beam conftest.$ac_ext
24850 fi
24851
24852 rm -rf conftest.dir conftest.file
24853 fi
24854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
24855 $as_echo "$gl_cv_func_rmdir_works" >&6; }
24856 case "$gl_cv_func_rmdir_works" in
24857 *yes) ;;
24858 *)
24859 REPLACE_RMDIR=1
24860 ;;
24861 esac
24862
24863 if test $REPLACE_RMDIR = 1; then
24864
24865
24866
24867
24868
24869
24870
24871
24872 gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext"
24873
24874 fi
24875
24876
24877
24878
24879
24880 GNULIB_RMDIR=1
24881
24882
24883
24884
24885
24886 $as_echo "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
24887
24888
24889
24890
24891
24892 :
24893
24894
24895
24896
24897
24898
24899
24900
24901
24902
24903
24904 :
24905
24906
24907
24908
24909
24910 if test $ac_cv_func_secure_getenv = no; then
24911 HAVE_SECURE_GETENV=0
24912 fi
24913
24914 if test $HAVE_SECURE_GETENV = 0; then
24915
24916
24917
24918
24919
24920
24921
24922
24923 gl_LIBOBJS="$gl_LIBOBJS secure_getenv.$ac_objext"
24924
24925
24926 for ac_func in __secure_getenv
24927 do :
24928 ac_fn_c_check_func "$LINENO" "__secure_getenv" "ac_cv_func___secure_getenv"
24929 if test "x$ac_cv_func___secure_getenv" = xyes; then :
24930 cat >>confdefs.h <<_ACEOF
24931 #define HAVE___SECURE_GETENV 1
24932 _ACEOF
24933
24934 fi
24935 done
24936
24937 if test $ac_cv_func___secure_getenv = no; then
24938 for ac_func in issetugid
24939 do :
24940 ac_fn_c_check_func "$LINENO" "issetugid" "ac_cv_func_issetugid"
24941 if test "x$ac_cv_func_issetugid" = xyes; then :
24942 cat >>confdefs.h <<_ACEOF
24943 #define HAVE_ISSETUGID 1
24944 _ACEOF
24945
24946 fi
24947 done
24948
24949 fi
24950
24951 :
24952
24953
24954
24955
24956
24957
24958
24959
24960
24961
24962
24963
24964
24965
24966
24967 fi
24968
24969
24970
24971
24972
24973 GNULIB_SECURE_GETENV=1
24974
24975
24976
24977
24978
24979 $as_echo "#define GNULIB_TEST_SECURE_GETENV 1" >>confdefs.h
24980
24981
24982
24983
24984
24985 if test $ac_cv_func_setenv = no; then
24986 HAVE_SETENV=0
24987 else
24988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
24989 $as_echo_n "checking whether setenv validates arguments... " >&6; }
24990 if ${gl_cv_func_setenv_works+:} false; then :
24991 $as_echo_n "(cached) " >&6
24992 else
24993 if test "$cross_compiling" = yes; then :
24994 case "$host_os" in
24995 # Guess yes on glibc systems.
24996 *-gnu*) gl_cv_func_setenv_works="guessing yes" ;;
24997 # If we don't know, assume the worst.
24998 *) gl_cv_func_setenv_works="guessing no" ;;
24999 esac
25000
25001 else
25002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25003 /* end confdefs.h. */
25004
25005 #include <stdlib.h>
25006 #include <errno.h>
25007 #include <string.h>
25008
25009 int
25010 main ()
25011 {
25012
25013 int result = 0;
25014 {
25015 if (setenv ("", "", 0) != -1)
25016 result |= 1;
25017 else if (errno != EINVAL)
25018 result |= 2;
25019 }
25020 {
25021 if (setenv ("a", "=", 1) != 0)
25022 result |= 4;
25023 else if (strcmp (getenv ("a"), "=") != 0)
25024 result |= 8;
25025 }
25026 return result;
25027
25028 ;
25029 return 0;
25030 }
25031 _ACEOF
25032 if ac_fn_c_try_run "$LINENO"; then :
25033 gl_cv_func_setenv_works=yes
25034 else
25035 gl_cv_func_setenv_works=no
25036 fi
25037 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25038 conftest.$ac_objext conftest.beam conftest.$ac_ext
25039 fi
25040
25041 fi
25042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
25043 $as_echo "$gl_cv_func_setenv_works" >&6; }
25044 case "$gl_cv_func_setenv_works" in
25045 *yes) ;;
25046 *)
25047 REPLACE_SETENV=1
25048 ;;
25049 esac
25050 fi
25051
25052 if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
25053
25054
25055
25056
25057
25058
25059
25060
25061 gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext"
25062
25063 fi
25064
25065
25066
25067
25068
25069 GNULIB_SETENV=1
25070
25071
25072
25073
25074
25075 $as_echo "#define GNULIB_TEST_SETENV 1" >>confdefs.h
25076
25077
25078
25079
25080
25081
25082
25083
25084
25085
25086
25087
25088
25089
25090 if test $gl_cv_have_include_next = yes; then
25091 gl_cv_next_signal_h='<'signal.h'>'
25092 else
25093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
25094 $as_echo_n "checking absolute name of <signal.h>... " >&6; }
25095 if ${gl_cv_next_signal_h+:} false; then :
25096 $as_echo_n "(cached) " >&6
25097 else
25098
25099
25100
25101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25102 /* end confdefs.h. */
25103 #include <signal.h>
25104 _ACEOF
25105 case "$host_os" in
25106 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25107 *) gl_absname_cpp="$ac_cpp" ;;
25108 esac
25109
25110 case "$host_os" in
25111 mingw*)
25112 gl_dirsep_regex='[/\\]'
25113 ;;
25114 *)
25115 gl_dirsep_regex='\/'
25116 ;;
25117 esac
25118 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25119 gl_header_literal_regex=`echo 'signal.h' \
25120 | sed -e "$gl_make_literal_regex_sed"`
25121 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25122 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25123 s|^/[^/]|//&|
25124 p
25125 q
25126 }'
25127
25128 gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25129 sed -n "$gl_absolute_header_sed"`
25130
25131 gl_header=$gl_cv_absolute_signal_h
25132 gl_cv_next_signal_h='"'$gl_header'"'
25133
25134
25135 fi
25136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
25137 $as_echo "$gl_cv_next_signal_h" >&6; }
25138 fi
25139 NEXT_SIGNAL_H=$gl_cv_next_signal_h
25140
25141 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25142 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25143 gl_next_as_first_directive='<'signal.h'>'
25144 else
25145 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25146 gl_next_as_first_directive=$gl_cv_next_signal_h
25147 fi
25148 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
25149
25150
25151
25152
25153
25154 # AIX declares sig_atomic_t to already include volatile, and C89 compilers
25155 # then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
25156 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
25157 #include <signal.h>
25158
25159 "
25160 if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes; then :
25161
25162 else
25163 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
25164 fi
25165
25166
25167
25168
25169
25170
25171
25172 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
25173 #include <signal.h>
25174
25175 "
25176 if test "x$ac_cv_type_sighandler_t" = xyes; then :
25177
25178 else
25179 HAVE_SIGHANDLER_T=0
25180 fi
25181
25182
25183
25184 for gl_func in pthread_sigmask sigaction sigaddset sigdelset sigemptyset sigfillset sigismember sigpending sigprocmask; do
25185 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
25186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
25187 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
25188 if eval \${$as_gl_Symbol+:} false; then :
25189 $as_echo_n "(cached) " >&6
25190 else
25191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25192 /* end confdefs.h. */
25193 #include <signal.h>
25194
25195 int
25196 main ()
25197 {
25198 #undef $gl_func
25199 (void) $gl_func;
25200 ;
25201 return 0;
25202 }
25203 _ACEOF
25204 if ac_fn_c_try_compile "$LINENO"; then :
25205 eval "$as_gl_Symbol=yes"
25206 else
25207 eval "$as_gl_Symbol=no"
25208 fi
25209 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25210 fi
25211 eval ac_res=\$$as_gl_Symbol
25212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
25213 $as_echo "$ac_res" >&6; }
25214 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
25215 cat >>confdefs.h <<_ACEOF
25216 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
25217 _ACEOF
25218
25219 eval ac_cv_have_decl_$gl_func=yes
25220 fi
25221 done
25222
25223
25224 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
25225 /* <sys/types.h> is not needed according to POSIX, but the
25226 <sys/socket.h> in i386-unknown-freebsd4.10 and
25227 powerpc-apple-darwin5.5 required it. */
25228 #include <sys/types.h>
25229 #if HAVE_SYS_SOCKET_H
25230 # include <sys/socket.h>
25231 #elif HAVE_WS2TCPIP_H
25232 # include <ws2tcpip.h>
25233 #endif
25234
25235 "
25236 if test "x$ac_cv_type_socklen_t" = xyes; then :
25237
25238 else
25239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
25240 $as_echo_n "checking for socklen_t equivalent... " >&6; }
25241 if ${gl_cv_socklen_t_equiv+:} false; then :
25242 $as_echo_n "(cached) " >&6
25243 else
25244 # Systems have either "struct sockaddr *" or
25245 # "void *" as the second argument to getpeername
25246 gl_cv_socklen_t_equiv=
25247 for arg2 in "struct sockaddr" void; do
25248 for t in int size_t "unsigned int" "long int" "unsigned long int"; do
25249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25250 /* end confdefs.h. */
25251 #include <sys/types.h>
25252 #include <sys/socket.h>
25253
25254 int getpeername (int, $arg2 *, $t *);
25255 int
25256 main ()
25257 {
25258 $t len;
25259 getpeername (0, 0, &len);
25260 ;
25261 return 0;
25262 }
25263 _ACEOF
25264 if ac_fn_c_try_compile "$LINENO"; then :
25265 gl_cv_socklen_t_equiv="$t"
25266 fi
25267 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25268 test "$gl_cv_socklen_t_equiv" != "" && break
25269 done
25270 test "$gl_cv_socklen_t_equiv" != "" && break
25271 done
25272
25273 fi
25274
25275 if test "$gl_cv_socklen_t_equiv" = ""; then
25276 as_fn_error $? "Cannot find a type to use in place of socklen_t" "$LINENO" 5
25277 fi
25278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
25279 $as_echo "$gl_cv_socklen_t_equiv" >&6; }
25280
25281 cat >>confdefs.h <<_ACEOF
25282 #define socklen_t $gl_cv_socklen_t_equiv
25283 _ACEOF
25284
25285 fi
25286
25287
25288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
25289 $as_echo_n "checking for ssize_t... " >&6; }
25290 if ${gt_cv_ssize_t+:} false; then :
25291 $as_echo_n "(cached) " >&6
25292 else
25293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25294 /* end confdefs.h. */
25295 #include <sys/types.h>
25296 int
25297 main ()
25298 {
25299 int x = sizeof (ssize_t *) + sizeof (ssize_t);
25300 return !x;
25301 ;
25302 return 0;
25303 }
25304 _ACEOF
25305 if ac_fn_c_try_compile "$LINENO"; then :
25306 gt_cv_ssize_t=yes
25307 else
25308 gt_cv_ssize_t=no
25309 fi
25310 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25311 fi
25312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
25313 $as_echo "$gt_cv_ssize_t" >&6; }
25314 if test $gt_cv_ssize_t = no; then
25315
25316 $as_echo "#define ssize_t int" >>confdefs.h
25317
25318 fi
25319
25320
25321
25322
25323 :
25324
25325
25326
25327
25328
25329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
25330 $as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
25331 if ${gl_cv_func_stat_dir_slash+:} false; then :
25332 $as_echo_n "(cached) " >&6
25333 else
25334 if test "$cross_compiling" = yes; then :
25335 case $host_os in
25336 mingw*) gl_cv_func_stat_dir_slash="guessing no";;
25337 *) gl_cv_func_stat_dir_slash="guessing yes";;
25338 esac
25339 else
25340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25341 /* end confdefs.h. */
25342 #include <sys/stat.h>
25343
25344 int
25345 main ()
25346 {
25347 struct stat st; return stat (".", &st) != stat ("./", &st);
25348 ;
25349 return 0;
25350 }
25351 _ACEOF
25352 if ac_fn_c_try_run "$LINENO"; then :
25353 gl_cv_func_stat_dir_slash=yes
25354 else
25355 gl_cv_func_stat_dir_slash=no
25356 fi
25357 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25358 conftest.$ac_objext conftest.beam conftest.$ac_ext
25359 fi
25360
25361 fi
25362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
25363 $as_echo "$gl_cv_func_stat_dir_slash" >&6; }
25364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
25365 $as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
25366 if ${gl_cv_func_stat_file_slash+:} false; then :
25367 $as_echo_n "(cached) " >&6
25368 else
25369 touch conftest.tmp
25370 # Assume that if we have lstat, we can also check symlinks.
25371 if test $ac_cv_func_lstat = yes; then
25372 ln -s conftest.tmp conftest.lnk
25373 fi
25374 if test "$cross_compiling" = yes; then :
25375 case "$host_os" in
25376 # Guess yes on glibc systems.
25377 *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
25378 # If we don't know, assume the worst.
25379 *) gl_cv_func_stat_file_slash="guessing no" ;;
25380 esac
25381
25382 else
25383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25384 /* end confdefs.h. */
25385 #include <sys/stat.h>
25386
25387 int
25388 main ()
25389 {
25390 int result = 0;
25391 struct stat st;
25392 if (!stat ("conftest.tmp/", &st))
25393 result |= 1;
25394 #if HAVE_LSTAT
25395 if (!stat ("conftest.lnk/", &st))
25396 result |= 2;
25397 #endif
25398 return result;
25399
25400 ;
25401 return 0;
25402 }
25403 _ACEOF
25404 if ac_fn_c_try_run "$LINENO"; then :
25405 gl_cv_func_stat_file_slash=yes
25406 else
25407 gl_cv_func_stat_file_slash=no
25408 fi
25409 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25410 conftest.$ac_objext conftest.beam conftest.$ac_ext
25411 fi
25412
25413 rm -f conftest.tmp conftest.lnk
25414 fi
25415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
25416 $as_echo "$gl_cv_func_stat_file_slash" >&6; }
25417 case $gl_cv_func_stat_dir_slash in
25418 *no) REPLACE_STAT=1
25419
25420 $as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
25421 ;;
25422 esac
25423 case $gl_cv_func_stat_file_slash in
25424 *no) REPLACE_STAT=1
25425
25426 $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
25427 ;;
25428 esac
25429
25430 if test $REPLACE_STAT = 1; then
25431
25432
25433
25434
25435
25436
25437
25438
25439 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
25440
25441 :
25442 fi
25443
25444
25445
25446
25447
25448 GNULIB_STAT=1
25449
25450
25451
25452
25453
25454 $as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h
25455
25456
25457
25458
25459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
25460 $as_echo_n "checking for working stdalign.h... " >&6; }
25461 if ${gl_cv_header_working_stdalign_h+:} false; then :
25462 $as_echo_n "(cached) " >&6
25463 else
25464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25465 /* end confdefs.h. */
25466 #include <stdalign.h>
25467 #include <stddef.h>
25468
25469 /* Test that alignof yields a result consistent with offsetof.
25470 This catches GCC bug 52023
25471 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
25472 #ifdef __cplusplus
25473 template <class t> struct alignof_helper { char a; t b; };
25474 # define ao(type) offsetof (alignof_helper<type>, b)
25475 #else
25476 # define ao(type) offsetof (struct { char a; type b; }, b)
25477 #endif
25478 char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
25479 char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
25480 char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
25481
25482 /* Test _Alignas only on platforms where gnulib can help. */
25483 #if \
25484 ((defined __cplusplus && 201103 <= __cplusplus) \
25485 || (defined __APPLE__ && defined __MACH__ \
25486 ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
25487 : __GNUC__) \
25488 || __HP_cc || __HP_aCC || __IBMC__ || __IBMCPP__ \
25489 || __ICC || 0x5110 <= __SUNPRO_C \
25490 || 1300 <= _MSC_VER)
25491 struct alignas_test { char c; char alignas (8) alignas_8; };
25492 char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
25493 ? 1 : -1];
25494 #endif
25495
25496 int
25497 main ()
25498 {
25499
25500 ;
25501 return 0;
25502 }
25503 _ACEOF
25504 if ac_fn_c_try_compile "$LINENO"; then :
25505 gl_cv_header_working_stdalign_h=yes
25506 else
25507 gl_cv_header_working_stdalign_h=no
25508 fi
25509 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25510 fi
25511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
25512 $as_echo "$gl_cv_header_working_stdalign_h" >&6; }
25513
25514 if test $gl_cv_header_working_stdalign_h = yes; then
25515 STDALIGN_H=''
25516 else
25517 STDALIGN_H='stdalign.h'
25518 fi
25519
25520
25521 if test -n "$STDALIGN_H"; then
25522 GL_GENERATE_STDALIGN_H_TRUE=
25523 GL_GENERATE_STDALIGN_H_FALSE='#'
25524 else
25525 GL_GENERATE_STDALIGN_H_TRUE='#'
25526 GL_GENERATE_STDALIGN_H_FALSE=
25527 fi
25528
25529
25530
25531
25532
25533 # Define two additional variables used in the Makefile substitution.
25534
25535 if test "$ac_cv_header_stdbool_h" = yes; then
25536 STDBOOL_H=''
25537 else
25538 STDBOOL_H='stdbool.h'
25539 fi
25540
25541 if test -n "$STDBOOL_H"; then
25542 GL_GENERATE_STDBOOL_H_TRUE=
25543 GL_GENERATE_STDBOOL_H_FALSE='#'
25544 else
25545 GL_GENERATE_STDBOOL_H_TRUE='#'
25546 GL_GENERATE_STDBOOL_H_FALSE=
25547 fi
25548
25549
25550 if test "$ac_cv_type__Bool" = yes; then
25551 HAVE__BOOL=1
25552 else
25553 HAVE__BOOL=0
25554 fi
25555
25556
25557
25558
25559
25560 STDDEF_H=
25561 ac_fn_c_check_type "$LINENO" "max_align_t" "ac_cv_type_max_align_t" "#include <stddef.h>
25562
25563 "
25564 if test "x$ac_cv_type_max_align_t" = xyes; then :
25565
25566 else
25567 HAVE_MAX_ALIGN_T=0; STDDEF_H=stddef.h
25568 fi
25569
25570 if test $gt_cv_c_wchar_t = no; then
25571 HAVE_WCHAR_T=0
25572 STDDEF_H=stddef.h
25573 fi
25574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
25575 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
25576 if ${gl_cv_decl_null_works+:} false; then :
25577 $as_echo_n "(cached) " >&6
25578 else
25579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25580 /* end confdefs.h. */
25581 #include <stddef.h>
25582 int test[2 * (sizeof NULL == sizeof (void *)) -1];
25583
25584 int
25585 main ()
25586 {
25587
25588 ;
25589 return 0;
25590 }
25591 _ACEOF
25592 if ac_fn_c_try_compile "$LINENO"; then :
25593 gl_cv_decl_null_works=yes
25594 else
25595 gl_cv_decl_null_works=no
25596 fi
25597 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25598 fi
25599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
25600 $as_echo "$gl_cv_decl_null_works" >&6; }
25601 if test $gl_cv_decl_null_works = no; then
25602 REPLACE_NULL=1
25603 STDDEF_H=stddef.h
25604 fi
25605
25606 if test -n "$STDDEF_H"; then
25607 GL_GENERATE_STDDEF_H_TRUE=
25608 GL_GENERATE_STDDEF_H_FALSE='#'
25609 else
25610 GL_GENERATE_STDDEF_H_TRUE='#'
25611 GL_GENERATE_STDDEF_H_FALSE=
25612 fi
25613
25614 if test -n "$STDDEF_H"; then
25615
25616
25617
25618
25619
25620
25621
25622
25623 if test $gl_cv_have_include_next = yes; then
25624 gl_cv_next_stddef_h='<'stddef.h'>'
25625 else
25626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
25627 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
25628 if ${gl_cv_next_stddef_h+:} false; then :
25629 $as_echo_n "(cached) " >&6
25630 else
25631
25632
25633
25634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25635 /* end confdefs.h. */
25636 #include <stddef.h>
25637 _ACEOF
25638 case "$host_os" in
25639 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25640 *) gl_absname_cpp="$ac_cpp" ;;
25641 esac
25642
25643 case "$host_os" in
25644 mingw*)
25645 gl_dirsep_regex='[/\\]'
25646 ;;
25647 *)
25648 gl_dirsep_regex='\/'
25649 ;;
25650 esac
25651 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25652 gl_header_literal_regex=`echo 'stddef.h' \
25653 | sed -e "$gl_make_literal_regex_sed"`
25654 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25655 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25656 s|^/[^/]|//&|
25657 p
25658 q
25659 }'
25660
25661 gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25662 sed -n "$gl_absolute_header_sed"`
25663
25664 gl_header=$gl_cv_absolute_stddef_h
25665 gl_cv_next_stddef_h='"'$gl_header'"'
25666
25667
25668 fi
25669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
25670 $as_echo "$gl_cv_next_stddef_h" >&6; }
25671 fi
25672 NEXT_STDDEF_H=$gl_cv_next_stddef_h
25673
25674 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25675 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25676 gl_next_as_first_directive='<'stddef.h'>'
25677 else
25678 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25679 gl_next_as_first_directive=$gl_cv_next_stddef_h
25680 fi
25681 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
25682
25683
25684
25685
25686 fi
25687
25688
25689
25690
25691 $as_echo "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
25692
25693
25694
25695
25696
25697
25698
25699
25700
25701
25702 if test $gl_cv_have_include_next = yes; then
25703 gl_cv_next_stdio_h='<'stdio.h'>'
25704 else
25705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
25706 $as_echo_n "checking absolute name of <stdio.h>... " >&6; }
25707 if ${gl_cv_next_stdio_h+:} false; then :
25708 $as_echo_n "(cached) " >&6
25709 else
25710
25711
25712
25713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25714 /* end confdefs.h. */
25715 #include <stdio.h>
25716 _ACEOF
25717 case "$host_os" in
25718 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25719 *) gl_absname_cpp="$ac_cpp" ;;
25720 esac
25721
25722 case "$host_os" in
25723 mingw*)
25724 gl_dirsep_regex='[/\\]'
25725 ;;
25726 *)
25727 gl_dirsep_regex='\/'
25728 ;;
25729 esac
25730 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25731 gl_header_literal_regex=`echo 'stdio.h' \
25732 | sed -e "$gl_make_literal_regex_sed"`
25733 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25734 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25735 s|^/[^/]|//&|
25736 p
25737 q
25738 }'
25739
25740 gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25741 sed -n "$gl_absolute_header_sed"`
25742
25743 gl_header=$gl_cv_absolute_stdio_h
25744 gl_cv_next_stdio_h='"'$gl_header'"'
25745
25746
25747 fi
25748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
25749 $as_echo "$gl_cv_next_stdio_h" >&6; }
25750 fi
25751 NEXT_STDIO_H=$gl_cv_next_stdio_h
25752
25753 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25754 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25755 gl_next_as_first_directive='<'stdio.h'>'
25756 else
25757 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25758 gl_next_as_first_directive=$gl_cv_next_stdio_h
25759 fi
25760 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
25761
25762
25763
25764
25765
25766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
25767 $as_echo_n "checking which flavor of printf attribute matches inttypes macros... " >&6; }
25768 if ${gl_cv_func_printf_attribute_flavor+:} false; then :
25769 $as_echo_n "(cached) " >&6
25770 else
25771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25772 /* end confdefs.h. */
25773
25774 #define __STDC_FORMAT_MACROS 1
25775 #include <stdio.h>
25776 #include <inttypes.h>
25777 /* For non-mingw systems, compilation will trivially succeed.
25778 For mingw, compilation will succeed for older mingw (system
25779 printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
25780 #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) && \
25781 (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
25782 extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
25783 #endif
25784
25785 int
25786 main ()
25787 {
25788
25789 ;
25790 return 0;
25791 }
25792 _ACEOF
25793 if ac_fn_c_try_compile "$LINENO"; then :
25794 gl_cv_func_printf_attribute_flavor=system
25795 else
25796 gl_cv_func_printf_attribute_flavor=gnu
25797 fi
25798 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25799 fi
25800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
25801 $as_echo "$gl_cv_func_printf_attribute_flavor" >&6; }
25802 if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
25803
25804 $as_echo "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
25805
25806 fi
25807
25808 GNULIB_FSCANF=1
25809
25810
25811 cat >>confdefs.h <<_ACEOF
25812 #define GNULIB_FSCANF 1
25813 _ACEOF
25814
25815
25816 GNULIB_SCANF=1
25817
25818
25819 cat >>confdefs.h <<_ACEOF
25820 #define GNULIB_SCANF 1
25821 _ACEOF
25822
25823
25824 GNULIB_FGETC=1
25825 GNULIB_GETC=1
25826 GNULIB_GETCHAR=1
25827 GNULIB_FGETS=1
25828 GNULIB_FREAD=1
25829
25830
25831 GNULIB_FPRINTF=1
25832 GNULIB_PRINTF=1
25833 GNULIB_VFPRINTF=1
25834 GNULIB_VPRINTF=1
25835 GNULIB_FPUTC=1
25836 GNULIB_PUTC=1
25837 GNULIB_PUTCHAR=1
25838 GNULIB_FPUTS=1
25839 GNULIB_PUTS=1
25840 GNULIB_FWRITE=1
25841
25842
25843
25844
25845 for gl_func in dprintf fpurge fseeko ftello getdelim getline gets pclose popen renameat snprintf tmpfile vdprintf vsnprintf; do
25846 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
25847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
25848 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
25849 if eval \${$as_gl_Symbol+:} false; then :
25850 $as_echo_n "(cached) " >&6
25851 else
25852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25853 /* end confdefs.h. */
25854 #include <stdio.h>
25855
25856 int
25857 main ()
25858 {
25859 #undef $gl_func
25860 (void) $gl_func;
25861 ;
25862 return 0;
25863 }
25864 _ACEOF
25865 if ac_fn_c_try_compile "$LINENO"; then :
25866 eval "$as_gl_Symbol=yes"
25867 else
25868 eval "$as_gl_Symbol=no"
25869 fi
25870 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25871 fi
25872 eval ac_res=\$$as_gl_Symbol
25873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
25874 $as_echo "$ac_res" >&6; }
25875 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
25876 cat >>confdefs.h <<_ACEOF
25877 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
25878 _ACEOF
25879
25880 eval ac_cv_have_decl_$gl_func=yes
25881 fi
25882 done
25883
25884
25885
25886
25887
25888
25889
25890
25891
25892
25893
25894
25895 if test $gl_cv_have_include_next = yes; then
25896 gl_cv_next_stdlib_h='<'stdlib.h'>'
25897 else
25898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
25899 $as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
25900 if ${gl_cv_next_stdlib_h+:} false; then :
25901 $as_echo_n "(cached) " >&6
25902 else
25903
25904
25905
25906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25907 /* end confdefs.h. */
25908 #include <stdlib.h>
25909 _ACEOF
25910 case "$host_os" in
25911 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25912 *) gl_absname_cpp="$ac_cpp" ;;
25913 esac
25914
25915 case "$host_os" in
25916 mingw*)
25917 gl_dirsep_regex='[/\\]'
25918 ;;
25919 *)
25920 gl_dirsep_regex='\/'
25921 ;;
25922 esac
25923 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25924 gl_header_literal_regex=`echo 'stdlib.h' \
25925 | sed -e "$gl_make_literal_regex_sed"`
25926 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25927 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25928 s|^/[^/]|//&|
25929 p
25930 q
25931 }'
25932
25933 gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25934 sed -n "$gl_absolute_header_sed"`
25935
25936 gl_header=$gl_cv_absolute_stdlib_h
25937 gl_cv_next_stdlib_h='"'$gl_header'"'
25938
25939
25940 fi
25941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
25942 $as_echo "$gl_cv_next_stdlib_h" >&6; }
25943 fi
25944 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
25945
25946 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25947 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25948 gl_next_as_first_directive='<'stdlib.h'>'
25949 else
25950 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25951 gl_next_as_first_directive=$gl_cv_next_stdlib_h
25952 fi
25953 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
25954
25955
25956
25957
25958
25959
25960 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
25961 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
25962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
25963 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
25964 if eval \${$as_gl_Symbol+:} false; then :
25965 $as_echo_n "(cached) " >&6
25966 else
25967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25968 /* end confdefs.h. */
25969 #include <stdlib.h>
25970 #if HAVE_SYS_LOADAVG_H
25971 # include <sys/loadavg.h>
25972 #endif
25973 #if HAVE_RANDOM_H
25974 # include <random.h>
25975 #endif
25976
25977 int
25978 main ()
25979 {
25980 #undef $gl_func
25981 (void) $gl_func;
25982 ;
25983 return 0;
25984 }
25985 _ACEOF
25986 if ac_fn_c_try_compile "$LINENO"; then :
25987 eval "$as_gl_Symbol=yes"
25988 else
25989 eval "$as_gl_Symbol=no"
25990 fi
25991 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25992 fi
25993 eval ac_res=\$$as_gl_Symbol
25994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
25995 $as_echo "$ac_res" >&6; }
25996 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
25997 cat >>confdefs.h <<_ACEOF
25998 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
25999 _ACEOF
26000
26001 eval ac_cv_have_decl_$gl_func=yes
26002 fi
26003 done
26004
26005
26006
26007
26008
26009
26010 for ac_func in strchrnul
26011 do :
26012 ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
26013 if test "x$ac_cv_func_strchrnul" = xyes; then :
26014 cat >>confdefs.h <<_ACEOF
26015 #define HAVE_STRCHRNUL 1
26016 _ACEOF
26017
26018 fi
26019 done
26020
26021 if test $ac_cv_func_strchrnul = no; then
26022 HAVE_STRCHRNUL=0
26023 else
26024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5
26025 $as_echo_n "checking whether strchrnul works... " >&6; }
26026 if ${gl_cv_func_strchrnul_works+:} false; then :
26027 $as_echo_n "(cached) " >&6
26028 else
26029 if test "$cross_compiling" = yes; then :
26030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26031 /* end confdefs.h. */
26032
26033 #if defined __CYGWIN__
26034 #include <cygwin/version.h>
26035 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9)
26036 Lucky user
26037 #endif
26038 #else
26039 Lucky user
26040 #endif
26041
26042 _ACEOF
26043 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26044 $EGREP "Lucky user" >/dev/null 2>&1; then :
26045 gl_cv_func_strchrnul_works="guessing yes"
26046 else
26047 gl_cv_func_strchrnul_works="guessing no"
26048 fi
26049 rm -f conftest*
26050
26051
26052 else
26053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26054 /* end confdefs.h. */
26055
26056 #include <string.h> /* for strchrnul */
26057
26058 int
26059 main ()
26060 {
26061 const char *buf = "a";
26062 return strchrnul (buf, 'b') != buf + 1;
26063
26064 ;
26065 return 0;
26066 }
26067 _ACEOF
26068 if ac_fn_c_try_run "$LINENO"; then :
26069 gl_cv_func_strchrnul_works=yes
26070 else
26071 gl_cv_func_strchrnul_works=no
26072 fi
26073 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26074 conftest.$ac_objext conftest.beam conftest.$ac_ext
26075 fi
26076
26077
26078 fi
26079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strchrnul_works" >&5
26080 $as_echo "$gl_cv_func_strchrnul_works" >&6; }
26081 case "$gl_cv_func_strchrnul_works" in
26082 *yes) ;;
26083 *) REPLACE_STRCHRNUL=1 ;;
26084 esac
26085 fi
26086
26087 if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
26088
26089
26090
26091
26092
26093
26094
26095
26096 gl_LIBOBJS="$gl_LIBOBJS strchrnul.$ac_objext"
26097
26098 :
26099 fi
26100
26101
26102
26103
26104
26105 GNULIB_STRCHRNUL=1
26106
26107
26108
26109
26110
26111 $as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
26112
26113
26114
26115
26116
26117
26118
26119 :
26120
26121
26122
26123
26124
26125 if test $ac_cv_func_strdup = yes; then
26126 if test $gl_cv_func_malloc_posix != yes; then
26127 REPLACE_STRDUP=1
26128 fi
26129 fi
26130
26131 :
26132
26133
26134
26135
26136
26137 if test $ac_cv_have_decl_strdup = no; then
26138 HAVE_DECL_STRDUP=0
26139 fi
26140
26141 if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
26142
26143
26144
26145
26146
26147
26148
26149
26150 gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext"
26151
26152 :
26153 fi
26154
26155
26156
26157
26158
26159 GNULIB_STRDUP=1
26160
26161
26162
26163
26164
26165 $as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
26166
26167
26168
26169
26170
26171
26172
26173
26174
26175
26176 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
26177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
26178 $as_echo_n "checking for working strerror function... " >&6; }
26179 if ${gl_cv_func_working_strerror+:} false; then :
26180 $as_echo_n "(cached) " >&6
26181 else
26182 if test "$cross_compiling" = yes; then :
26183 case "$host_os" in
26184 # Guess yes on glibc systems.
26185 *-gnu*) gl_cv_func_working_strerror="guessing yes" ;;
26186 # If we don't know, assume the worst.
26187 *) gl_cv_func_working_strerror="guessing no" ;;
26188 esac
26189
26190 else
26191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26192 /* end confdefs.h. */
26193 #include <string.h>
26194
26195 int
26196 main ()
26197 {
26198 if (!*strerror (-2)) return 1;
26199 ;
26200 return 0;
26201 }
26202 _ACEOF
26203 if ac_fn_c_try_run "$LINENO"; then :
26204 gl_cv_func_working_strerror=yes
26205 else
26206 gl_cv_func_working_strerror=no
26207 fi
26208 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26209 conftest.$ac_objext conftest.beam conftest.$ac_ext
26210 fi
26211
26212
26213 fi
26214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
26215 $as_echo "$gl_cv_func_working_strerror" >&6; }
26216 case "$gl_cv_func_working_strerror" in
26217 *yes) ;;
26218 *)
26219 REPLACE_STRERROR=1
26220 ;;
26221 esac
26222
26223 case "$gl_cv_func_strerror_r_works" in
26224 *no) REPLACE_STRERROR=1 ;;
26225 esac
26226
26227 else
26228 REPLACE_STRERROR=1
26229 fi
26230
26231 if test $REPLACE_STRERROR = 1; then
26232
26233
26234
26235
26236
26237
26238
26239
26240 gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
26241
26242 fi
26243
26244
26245 cat >>confdefs.h <<_ACEOF
26246 #define GNULIB_STRERROR 1
26247 _ACEOF
26248
26249
26250
26251
26252
26253
26254
26255 GNULIB_STRERROR=1
26256
26257
26258
26259
26260
26261 $as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
26262
26263
26264
26265
26266
26267 if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
26268
26269
26270
26271
26272
26273
26274
26275
26276 gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
26277
26278
26279
26280
26281
26282 :
26283
26284
26285
26286
26287
26288 if test $ac_cv_header_sys_socket_h != yes; then
26289 for ac_header in winsock2.h
26290 do :
26291 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
26292 if test "x$ac_cv_header_winsock2_h" = xyes; then :
26293 cat >>confdefs.h <<_ACEOF
26294 #define HAVE_WINSOCK2_H 1
26295 _ACEOF
26296
26297 fi
26298
26299 done
26300
26301 fi
26302 if test "$ac_cv_header_winsock2_h" = yes; then
26303 HAVE_WINSOCK2_H=1
26304 UNISTD_H_HAVE_WINSOCK2_H=1
26305 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
26306 else
26307 HAVE_WINSOCK2_H=0
26308 fi
26309
26310
26311 fi
26312
26313
26314
26315
26316
26317
26318 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
26319 if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
26320 HAVE_DECL_STRERROR_R=1
26321 else
26322 HAVE_DECL_STRERROR_R=0
26323 fi
26324
26325
26326 cat >>confdefs.h <<_ACEOF
26327 #define HAVE_DECL_STRERROR_R_ORIG $HAVE_DECL_STRERROR_R
26328 _ACEOF
26329
26330
26331 if test $ac_cv_func_strerror_r = yes; then
26332 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
26333 if test $gl_cv_func_strerror_r_posix_signature = yes; then
26334 case "$gl_cv_func_strerror_r_works" in
26335 *no) REPLACE_STRERROR_R=1 ;;
26336 esac
26337 else
26338 REPLACE_STRERROR_R=1
26339 fi
26340 else
26341 REPLACE_STRERROR_R=1
26342 fi
26343 fi
26344
26345 # Overwrite the findings of AC_FUNC_STRERROR_R (for code that uses that).
26346
26347
26348 if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then
26349
26350
26351
26352
26353
26354
26355
26356
26357 gl_LIBOBJS="$gl_LIBOBJS strerror_r.$ac_objext"
26358
26359
26360
26361 :
26362
26363
26364
26365
26366
26367
26368 :
26369
26370
26371
26372
26373
26374
26375 :
26376
26377
26378
26379
26380
26381
26382 fi
26383
26384
26385
26386
26387
26388 GNULIB_STRERROR_R=1
26389
26390
26391
26392
26393
26394 $as_echo "#define GNULIB_TEST_STRERROR_R 1" >>confdefs.h
26395
26396
26397
26398
26399
26400
26401
26402
26403 if test $REPLACE_STRSTR = 0; then
26404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works in linear time" >&5
26405 $as_echo_n "checking whether strstr works in linear time... " >&6; }
26406 if ${gl_cv_func_strstr_linear+:} false; then :
26407 $as_echo_n "(cached) " >&6
26408 else
26409 if test "$cross_compiling" = yes; then :
26410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26411 /* end confdefs.h. */
26412
26413 #include <features.h>
26414 #ifdef __GNU_LIBRARY__
26415 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
26416 && !(defined __i386__ || defined __x86_64__) \
26417 && !defined __UCLIBC__
26418 Lucky user
26419 #endif
26420 #endif
26421 #ifdef __CYGWIN__
26422 #include <cygwin/version.h>
26423 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
26424 Lucky user
26425 #endif
26426 #endif
26427
26428 _ACEOF
26429 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26430 $EGREP "Lucky user" >/dev/null 2>&1; then :
26431 gl_cv_func_strstr_linear="guessing yes"
26432 else
26433 gl_cv_func_strstr_linear="guessing no"
26434 fi
26435 rm -f conftest*
26436
26437
26438 else
26439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26440 /* end confdefs.h. */
26441
26442 #ifdef __MVS__
26443 /* z/OS does not deliver signals while strstr() is running (thanks to
26444 restrictions on its LE runtime), which prevents us from limiting the
26445 running time of this test. */
26446 # error "This test does not work properly on z/OS"
26447 #endif
26448 #include <signal.h> /* for signal */
26449 #include <string.h> /* for strstr */
26450 #include <stdlib.h> /* for malloc */
26451 #include <unistd.h> /* for alarm */
26452 static void quit (int sig) { _exit (sig + 128); }
26453
26454 int
26455 main ()
26456 {
26457
26458 int result = 0;
26459 size_t m = 1000000;
26460 char *haystack = (char *) malloc (2 * m + 2);
26461 char *needle = (char *) malloc (m + 2);
26462 /* Failure to compile this test due to missing alarm is okay,
26463 since all such platforms (mingw) also have quadratic strstr. */
26464 signal (SIGALRM, quit);
26465 alarm (5);
26466 /* Check for quadratic performance. */
26467 if (haystack && needle)
26468 {
26469 memset (haystack, 'A', 2 * m);
26470 haystack[2 * m] = 'B';
26471 haystack[2 * m + 1] = 0;
26472 memset (needle, 'A', m);
26473 needle[m] = 'B';
26474 needle[m + 1] = 0;
26475 if (!strstr (haystack, needle))
26476 result |= 1;
26477 }
26478 return result;
26479
26480 ;
26481 return 0;
26482 }
26483 _ACEOF
26484 if ac_fn_c_try_run "$LINENO"; then :
26485 gl_cv_func_strstr_linear=yes
26486 else
26487 gl_cv_func_strstr_linear=no
26488 fi
26489 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26490 conftest.$ac_objext conftest.beam conftest.$ac_ext
26491 fi
26492
26493
26494 fi
26495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_linear" >&5
26496 $as_echo "$gl_cv_func_strstr_linear" >&6; }
26497 case "$gl_cv_func_strstr_linear" in
26498 *yes) ;;
26499 *)
26500 REPLACE_STRSTR=1
26501 ;;
26502 esac
26503 fi
26504
26505 if test $REPLACE_STRSTR = 1; then
26506
26507
26508
26509
26510
26511
26512
26513
26514 gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
26515
26516 fi
26517
26518
26519
26520 if test "$gl_cv_func_memchr_works" != yes; then
26521 REPLACE_STRSTR=1
26522 else
26523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
26524 $as_echo_n "checking whether strstr works... " >&6; }
26525 if ${gl_cv_func_strstr_works_always+:} false; then :
26526 $as_echo_n "(cached) " >&6
26527 else
26528 if test "$cross_compiling" = yes; then :
26529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26530 /* end confdefs.h. */
26531
26532 #ifdef __GNU_LIBRARY__
26533 #include <features.h>
26534 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
26535 || defined __UCLIBC__
26536 Lucky user
26537 #endif
26538 #elif defined __CYGWIN__
26539 #include <cygwin/version.h>
26540 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
26541 Lucky user
26542 #endif
26543 #else
26544 Lucky user
26545 #endif
26546
26547 _ACEOF
26548 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26549 $EGREP "Lucky user" >/dev/null 2>&1; then :
26550 gl_cv_func_strstr_works_always="guessing yes"
26551 else
26552 gl_cv_func_strstr_works_always="guessing no"
26553 fi
26554 rm -f conftest*
26555
26556
26557 else
26558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26559 /* end confdefs.h. */
26560
26561 #include <string.h> /* for strstr */
26562 #define P "_EF_BF_BD"
26563 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
26564 #define NEEDLE P P P P P
26565
26566 int
26567 main ()
26568 {
26569 return !!strstr (HAYSTACK, NEEDLE);
26570
26571 ;
26572 return 0;
26573 }
26574 _ACEOF
26575 if ac_fn_c_try_run "$LINENO"; then :
26576 gl_cv_func_strstr_works_always=yes
26577 else
26578 gl_cv_func_strstr_works_always=no
26579 fi
26580 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26581 conftest.$ac_objext conftest.beam conftest.$ac_ext
26582 fi
26583
26584
26585 fi
26586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
26587 $as_echo "$gl_cv_func_strstr_works_always" >&6; }
26588 case "$gl_cv_func_strstr_works_always" in
26589 *yes) ;;
26590 *)
26591 REPLACE_STRSTR=1
26592 ;;
26593 esac
26594 fi
26595
26596 if test $REPLACE_STRSTR = 1; then
26597
26598
26599
26600
26601
26602
26603
26604
26605 gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
26606
26607 fi
26608
26609
26610
26611
26612
26613 GNULIB_STRSTR=1
26614
26615
26616
26617
26618
26619 $as_echo "#define GNULIB_TEST_STRSTR 1" >>confdefs.h
26620
26621
26622
26623
26624
26625
26626
26627 for ac_func in strtok_r
26628 do :
26629 ac_fn_c_check_func "$LINENO" "strtok_r" "ac_cv_func_strtok_r"
26630 if test "x$ac_cv_func_strtok_r" = xyes; then :
26631 cat >>confdefs.h <<_ACEOF
26632 #define HAVE_STRTOK_R 1
26633 _ACEOF
26634
26635 fi
26636 done
26637
26638 if test $ac_cv_func_strtok_r = yes; then
26639 HAVE_STRTOK_R=1
26640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtok_r works" >&5
26641 $as_echo_n "checking whether strtok_r works... " >&6; }
26642 if ${gl_cv_func_strtok_r_works+:} false; then :
26643 $as_echo_n "(cached) " >&6
26644 else
26645 if test "$cross_compiling" = yes; then :
26646
26647 case "$host_os" in
26648 # Guess no on glibc systems.
26649 *-gnu*) gl_cv_func_strtok_r_works="guessing no";;
26650 *) gl_cv_func_strtok_r_works="guessing yes";;
26651 esac
26652
26653 else
26654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26655 /* end confdefs.h. */
26656
26657 #ifndef __OPTIMIZE__
26658 # define __OPTIMIZE__ 1
26659 #endif
26660 #undef __OPTIMIZE_SIZE__
26661 #undef __NO_INLINE__
26662 #include <stdlib.h>
26663 #include <string.h>
26664
26665 int
26666 main ()
26667 {
26668 static const char dummy[] = "\177\01a";
26669 char delimiters[] = "xxxxxxxx";
26670 char *save_ptr = (char *) dummy;
26671 strtok_r (delimiters, "x", &save_ptr);
26672 strtok_r (NULL, "x", &save_ptr);
26673 return 0;
26674
26675 ;
26676 return 0;
26677 }
26678
26679 _ACEOF
26680 if ac_fn_c_try_run "$LINENO"; then :
26681 gl_cv_func_strtok_r_works=yes
26682 else
26683 gl_cv_func_strtok_r_works=no
26684 fi
26685 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26686 conftest.$ac_objext conftest.beam conftest.$ac_ext
26687 fi
26688
26689
26690 fi
26691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtok_r_works" >&5
26692 $as_echo "$gl_cv_func_strtok_r_works" >&6; }
26693 case "$gl_cv_func_strtok_r_works" in
26694 *no)
26695 UNDEFINE_STRTOK_R=1
26696 ;;
26697 esac
26698 else
26699 HAVE_STRTOK_R=0
26700 fi
26701
26702 :
26703
26704
26705
26706
26707
26708 if test $ac_cv_have_decl_strtok_r = no; then
26709 HAVE_DECL_STRTOK_R=0
26710 fi
26711
26712 if test $HAVE_STRTOK_R = 0 || test $REPLACE_STRTOK_R = 1; then
26713
26714
26715
26716
26717
26718
26719
26720
26721 gl_LIBOBJS="$gl_LIBOBJS strtok_r.$ac_objext"
26722
26723
26724 :
26725
26726 fi
26727
26728
26729
26730
26731
26732 GNULIB_STRTOK_R=1
26733
26734
26735
26736
26737
26738 $as_echo "#define GNULIB_TEST_STRTOK_R 1" >>confdefs.h
26739
26740
26741
26742
26743
26744
26745
26746
26747
26748
26749
26750
26751
26752
26753
26754
26755 :
26756
26757
26758
26759
26760
26761
26762
26763
26764 if test $gl_cv_have_include_next = yes; then
26765 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
26766 else
26767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
26768 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
26769 if ${gl_cv_next_sys_stat_h+:} false; then :
26770 $as_echo_n "(cached) " >&6
26771 else
26772
26773 if test $ac_cv_header_sys_stat_h = yes; then
26774
26775
26776
26777
26778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26779 /* end confdefs.h. */
26780 #include <sys/stat.h>
26781 _ACEOF
26782 case "$host_os" in
26783 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26784 *) gl_absname_cpp="$ac_cpp" ;;
26785 esac
26786
26787 case "$host_os" in
26788 mingw*)
26789 gl_dirsep_regex='[/\\]'
26790 ;;
26791 *)
26792 gl_dirsep_regex='\/'
26793 ;;
26794 esac
26795 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26796 gl_header_literal_regex=`echo 'sys/stat.h' \
26797 | sed -e "$gl_make_literal_regex_sed"`
26798 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26799 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26800 s|^/[^/]|//&|
26801 p
26802 q
26803 }'
26804
26805 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26806 sed -n "$gl_absolute_header_sed"`
26807
26808 gl_header=$gl_cv_absolute_sys_stat_h
26809 gl_cv_next_sys_stat_h='"'$gl_header'"'
26810 else
26811 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
26812 fi
26813
26814
26815 fi
26816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
26817 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
26818 fi
26819 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
26820
26821 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26822 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26823 gl_next_as_first_directive='<'sys/stat.h'>'
26824 else
26825 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26826 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
26827 fi
26828 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
26829
26830
26831
26832
26833
26834
26835
26836
26837
26838
26839
26840 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
26841
26842 $as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
26843
26844 fi
26845
26846 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
26847 #include <sys/stat.h>
26848 "
26849 if test "x$ac_cv_type_nlink_t" = xyes; then :
26850
26851 else
26852
26853 $as_echo "#define nlink_t int" >>confdefs.h
26854
26855 fi
26856
26857
26858
26859 for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do
26860 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
26861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
26862 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
26863 if eval \${$as_gl_Symbol+:} false; then :
26864 $as_echo_n "(cached) " >&6
26865 else
26866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26867 /* end confdefs.h. */
26868 #include <sys/stat.h>
26869
26870 int
26871 main ()
26872 {
26873 #undef $gl_func
26874 (void) $gl_func;
26875 ;
26876 return 0;
26877 }
26878 _ACEOF
26879 if ac_fn_c_try_compile "$LINENO"; then :
26880 eval "$as_gl_Symbol=yes"
26881 else
26882 eval "$as_gl_Symbol=no"
26883 fi
26884 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26885 fi
26886 eval ac_res=\$$as_gl_Symbol
26887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
26888 $as_echo "$ac_res" >&6; }
26889 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
26890 cat >>confdefs.h <<_ACEOF
26891 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
26892 _ACEOF
26893
26894 eval ac_cv_have_decl_$gl_func=yes
26895 fi
26896 done
26897
26898
26899
26900
26901
26902
26903
26904
26905
26906
26907
26908
26909
26910
26911
26912
26913
26914 :
26915
26916
26917
26918
26919
26920
26921
26922
26923 if test $gl_cv_have_include_next = yes; then
26924 gl_cv_next_sys_uio_h='<'sys/uio.h'>'
26925 else
26926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/uio.h>" >&5
26927 $as_echo_n "checking absolute name of <sys/uio.h>... " >&6; }
26928 if ${gl_cv_next_sys_uio_h+:} false; then :
26929 $as_echo_n "(cached) " >&6
26930 else
26931
26932 if test $ac_cv_header_sys_uio_h = yes; then
26933
26934
26935
26936
26937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26938 /* end confdefs.h. */
26939 #include <sys/uio.h>
26940 _ACEOF
26941 case "$host_os" in
26942 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26943 *) gl_absname_cpp="$ac_cpp" ;;
26944 esac
26945
26946 case "$host_os" in
26947 mingw*)
26948 gl_dirsep_regex='[/\\]'
26949 ;;
26950 *)
26951 gl_dirsep_regex='\/'
26952 ;;
26953 esac
26954 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26955 gl_header_literal_regex=`echo 'sys/uio.h' \
26956 | sed -e "$gl_make_literal_regex_sed"`
26957 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26958 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26959 s|^/[^/]|//&|
26960 p
26961 q
26962 }'
26963
26964 gl_cv_absolute_sys_uio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26965 sed -n "$gl_absolute_header_sed"`
26966
26967 gl_header=$gl_cv_absolute_sys_uio_h
26968 gl_cv_next_sys_uio_h='"'$gl_header'"'
26969 else
26970 gl_cv_next_sys_uio_h='<'sys/uio.h'>'
26971 fi
26972
26973
26974 fi
26975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_uio_h" >&5
26976 $as_echo "$gl_cv_next_sys_uio_h" >&6; }
26977 fi
26978 NEXT_SYS_UIO_H=$gl_cv_next_sys_uio_h
26979
26980 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26981 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26982 gl_next_as_first_directive='<'sys/uio.h'>'
26983 else
26984 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26985 gl_next_as_first_directive=$gl_cv_next_sys_uio_h
26986 fi
26987 NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H=$gl_next_as_first_directive
26988
26989
26990
26991
26992 if test $ac_cv_header_sys_uio_h = yes; then
26993 HAVE_SYS_UIO_H=1
26994 else
26995 HAVE_SYS_UIO_H=0
26996 fi
26997
26998
26999
27000
27001
27002 :
27003
27004
27005
27006
27007
27008
27009
27010
27011
27012
27013
27014
27015
27016
27017
27018 ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "#include <time.h>
27019 "
27020 if test "x$ac_cv_have_decl_localtime_r" = xyes; then :
27021 ac_have_decl=1
27022 else
27023 ac_have_decl=0
27024 fi
27025
27026 cat >>confdefs.h <<_ACEOF
27027 #define HAVE_DECL_LOCALTIME_R $ac_have_decl
27028 _ACEOF
27029
27030 if test $ac_cv_have_decl_localtime_r = no; then
27031 HAVE_DECL_LOCALTIME_R=0
27032 fi
27033
27034
27035 :
27036
27037
27038
27039
27040
27041 if test $ac_cv_func_localtime_r = yes; then
27042 HAVE_LOCALTIME_R=1
27043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
27044 $as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
27045 if ${gl_cv_time_r_posix+:} false; then :
27046 $as_echo_n "(cached) " >&6
27047 else
27048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27049 /* end confdefs.h. */
27050 #include <time.h>
27051 int
27052 main ()
27053 {
27054 /* We don't need to append 'restrict's to the argument types,
27055 even though the POSIX signature has the 'restrict's,
27056 since C99 says they can't affect type compatibility. */
27057 struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
27058 if (ptr) return 0;
27059 /* Check the return type is a pointer.
27060 On HP-UX 10 it is 'int'. */
27061 *localtime_r (0, 0);
27062 ;
27063 return 0;
27064 }
27065
27066 _ACEOF
27067 if ac_fn_c_try_compile "$LINENO"; then :
27068 gl_cv_time_r_posix=yes
27069 else
27070 gl_cv_time_r_posix=no
27071 fi
27072 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27073
27074 fi
27075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
27076 $as_echo "$gl_cv_time_r_posix" >&6; }
27077 if test $gl_cv_time_r_posix = yes; then
27078 REPLACE_LOCALTIME_R=0
27079 else
27080 REPLACE_LOCALTIME_R=1
27081 fi
27082 else
27083 HAVE_LOCALTIME_R=0
27084 fi
27085
27086 if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
27087
27088
27089
27090
27091
27092
27093
27094
27095 gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext"
27096
27097
27098 :
27099
27100 fi
27101
27102
27103
27104
27105
27106 GNULIB_TIME_R=1
27107
27108
27109
27110
27111
27112 $as_echo "#define GNULIB_TEST_TIME_R 1" >>confdefs.h
27113
27114
27115
27116
27117
27118
27119
27120
27121
27122
27123
27124
27125 :
27126
27127
27128
27129
27130
27131
27132
27133
27134 if test $gl_cv_have_include_next = yes; then
27135 gl_cv_next_unistd_h='<'unistd.h'>'
27136 else
27137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
27138 $as_echo_n "checking absolute name of <unistd.h>... " >&6; }
27139 if ${gl_cv_next_unistd_h+:} false; then :
27140 $as_echo_n "(cached) " >&6
27141 else
27142
27143 if test $ac_cv_header_unistd_h = yes; then
27144
27145
27146
27147
27148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27149 /* end confdefs.h. */
27150 #include <unistd.h>
27151 _ACEOF
27152 case "$host_os" in
27153 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27154 *) gl_absname_cpp="$ac_cpp" ;;
27155 esac
27156
27157 case "$host_os" in
27158 mingw*)
27159 gl_dirsep_regex='[/\\]'
27160 ;;
27161 *)
27162 gl_dirsep_regex='\/'
27163 ;;
27164 esac
27165 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27166 gl_header_literal_regex=`echo 'unistd.h' \
27167 | sed -e "$gl_make_literal_regex_sed"`
27168 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27169 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27170 s|^/[^/]|//&|
27171 p
27172 q
27173 }'
27174
27175 gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27176 sed -n "$gl_absolute_header_sed"`
27177
27178 gl_header=$gl_cv_absolute_unistd_h
27179 gl_cv_next_unistd_h='"'$gl_header'"'
27180 else
27181 gl_cv_next_unistd_h='<'unistd.h'>'
27182 fi
27183
27184
27185 fi
27186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
27187 $as_echo "$gl_cv_next_unistd_h" >&6; }
27188 fi
27189 NEXT_UNISTD_H=$gl_cv_next_unistd_h
27190
27191 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27192 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27193 gl_next_as_first_directive='<'unistd.h'>'
27194 else
27195 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27196 gl_next_as_first_directive=$gl_cv_next_unistd_h
27197 fi
27198 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
27199
27200
27201
27202
27203 if test $ac_cv_header_unistd_h = yes; then
27204 HAVE_UNISTD_H=1
27205 else
27206 HAVE_UNISTD_H=0
27207 fi
27208
27209
27210
27211
27212
27213
27214
27215 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
27216 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
27217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
27218 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
27219 if eval \${$as_gl_Symbol+:} false; then :
27220 $as_echo_n "(cached) " >&6
27221 else
27222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27223 /* end confdefs.h. */
27224
27225 #if HAVE_UNISTD_H
27226 # include <unistd.h>
27227 #endif
27228 /* Some systems declare various items in the wrong headers. */
27229 #if !(defined __GLIBC__ && !defined __UCLIBC__)
27230 # include <fcntl.h>
27231 # include <stdio.h>
27232 # include <stdlib.h>
27233 # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
27234 # include <io.h>
27235 # endif
27236 #endif
27237
27238 int
27239 main ()
27240 {
27241 #undef $gl_func
27242 (void) $gl_func;
27243 ;
27244 return 0;
27245 }
27246 _ACEOF
27247 if ac_fn_c_try_compile "$LINENO"; then :
27248 eval "$as_gl_Symbol=yes"
27249 else
27250 eval "$as_gl_Symbol=no"
27251 fi
27252 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27253 fi
27254 eval ac_res=\$$as_gl_Symbol
27255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
27256 $as_echo "$ac_res" >&6; }
27257 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
27258 cat >>confdefs.h <<_ACEOF
27259 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
27260 _ACEOF
27261
27262 eval ac_cv_have_decl_$gl_func=yes
27263 fi
27264 done
27265
27266
27267
27268
27269 :
27270
27271
27272
27273
27274
27275
27276
27277
27278
27279 :
27280
27281
27282
27283
27284
27285 if test $ac_cv_have_decl_unsetenv = no; then
27286 HAVE_DECL_UNSETENV=0
27287 fi
27288 for ac_func in unsetenv
27289 do :
27290 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
27291 if test "x$ac_cv_func_unsetenv" = xyes; then :
27292 cat >>confdefs.h <<_ACEOF
27293 #define HAVE_UNSETENV 1
27294 _ACEOF
27295
27296 fi
27297 done
27298
27299 if test $ac_cv_func_unsetenv = no; then
27300 HAVE_UNSETENV=0
27301 else
27302 HAVE_UNSETENV=1
27303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
27304 $as_echo_n "checking for unsetenv() return type... " >&6; }
27305 if ${gt_cv_func_unsetenv_ret+:} false; then :
27306 $as_echo_n "(cached) " >&6
27307 else
27308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27309 /* end confdefs.h. */
27310
27311 #undef _BSD
27312 #define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
27313 #include <stdlib.h>
27314 extern
27315 #ifdef __cplusplus
27316 "C"
27317 #endif
27318 int unsetenv (const char *name);
27319
27320 int
27321 main ()
27322 {
27323
27324 ;
27325 return 0;
27326 }
27327 _ACEOF
27328 if ac_fn_c_try_compile "$LINENO"; then :
27329 gt_cv_func_unsetenv_ret='int'
27330 else
27331 gt_cv_func_unsetenv_ret='void'
27332 fi
27333 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27334 fi
27335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
27336 $as_echo "$gt_cv_func_unsetenv_ret" >&6; }
27337 if test $gt_cv_func_unsetenv_ret = 'void'; then
27338
27339 $as_echo "#define VOID_UNSETENV 1" >>confdefs.h
27340
27341 REPLACE_UNSETENV=1
27342 fi
27343
27344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
27345 $as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
27346 if ${gl_cv_func_unsetenv_works+:} false; then :
27347 $as_echo_n "(cached) " >&6
27348 else
27349 if test "$cross_compiling" = yes; then :
27350 case "$host_os" in
27351 # Guess yes on glibc systems.
27352 *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
27353 # If we don't know, assume the worst.
27354 *) gl_cv_func_unsetenv_works="guessing no" ;;
27355 esac
27356
27357 else
27358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27359 /* end confdefs.h. */
27360
27361 #include <stdlib.h>
27362 #include <errno.h>
27363 extern char **environ;
27364
27365 int
27366 main ()
27367 {
27368
27369 char entry1[] = "a=1";
27370 char entry2[] = "b=2";
27371 char *env[] = { entry1, entry2, NULL };
27372 if (putenv ((char *) "a=1")) return 1;
27373 if (putenv (entry2)) return 2;
27374 entry2[0] = 'a';
27375 unsetenv ("a");
27376 if (getenv ("a")) return 3;
27377 if (!unsetenv ("") || errno != EINVAL) return 4;
27378 entry2[0] = 'b';
27379 environ = env;
27380 if (!getenv ("a")) return 5;
27381 entry2[0] = 'a';
27382 unsetenv ("a");
27383 if (getenv ("a")) return 6;
27384
27385 ;
27386 return 0;
27387 }
27388 _ACEOF
27389 if ac_fn_c_try_run "$LINENO"; then :
27390 gl_cv_func_unsetenv_works=yes
27391 else
27392 gl_cv_func_unsetenv_works=no
27393 fi
27394 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27395 conftest.$ac_objext conftest.beam conftest.$ac_ext
27396 fi
27397
27398 fi
27399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
27400 $as_echo "$gl_cv_func_unsetenv_works" >&6; }
27401 case "$gl_cv_func_unsetenv_works" in
27402 *yes) ;;
27403 *)
27404 REPLACE_UNSETENV=1
27405 ;;
27406 esac
27407 fi
27408
27409 if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
27410
27411
27412
27413
27414
27415
27416
27417
27418 gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
27419
27420
27421
27422
27423 :
27424
27425
27426
27427
27428
27429
27430 fi
27431
27432
27433
27434
27435
27436 GNULIB_UNSETENV=1
27437
27438
27439
27440
27441
27442 $as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
27443
27444
27445
27446
27447
27448
27449
27450
27451
27452
27453
27454
27455 :
27456
27457
27458
27459
27460
27461
27462
27463
27464 if test $gl_cv_have_include_next = yes; then
27465 gl_cv_next_wchar_h='<'wchar.h'>'
27466 else
27467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
27468 $as_echo_n "checking absolute name of <wchar.h>... " >&6; }
27469 if ${gl_cv_next_wchar_h+:} false; then :
27470 $as_echo_n "(cached) " >&6
27471 else
27472
27473 if test $ac_cv_header_wchar_h = yes; then
27474
27475
27476
27477
27478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27479 /* end confdefs.h. */
27480 #include <wchar.h>
27481 _ACEOF
27482 case "$host_os" in
27483 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27484 *) gl_absname_cpp="$ac_cpp" ;;
27485 esac
27486
27487 case "$host_os" in
27488 mingw*)
27489 gl_dirsep_regex='[/\\]'
27490 ;;
27491 *)
27492 gl_dirsep_regex='\/'
27493 ;;
27494 esac
27495 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27496 gl_header_literal_regex=`echo 'wchar.h' \
27497 | sed -e "$gl_make_literal_regex_sed"`
27498 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27499 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27500 s|^/[^/]|//&|
27501 p
27502 q
27503 }'
27504
27505 gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27506 sed -n "$gl_absolute_header_sed"`
27507
27508 gl_header=$gl_cv_absolute_wchar_h
27509 gl_cv_next_wchar_h='"'$gl_header'"'
27510 else
27511 gl_cv_next_wchar_h='<'wchar.h'>'
27512 fi
27513
27514
27515 fi
27516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
27517 $as_echo "$gl_cv_next_wchar_h" >&6; }
27518 fi
27519 NEXT_WCHAR_H=$gl_cv_next_wchar_h
27520
27521 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27522 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27523 gl_next_as_first_directive='<'wchar.h'>'
27524 else
27525 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27526 gl_next_as_first_directive=$gl_cv_next_wchar_h
27527 fi
27528 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
27529
27530
27531
27532
27533 if test $ac_cv_header_wchar_h = yes; then
27534 HAVE_WCHAR_H=1
27535 else
27536 HAVE_WCHAR_H=0
27537 fi
27538
27539
27540
27541
27542
27543 if test $gt_cv_c_wint_t = yes; then
27544 HAVE_WINT_T=1
27545 else
27546 HAVE_WINT_T=0
27547 fi
27548
27549
27550
27551 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
27552 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
27553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
27554 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
27555 if eval \${$as_gl_Symbol+:} false; then :
27556 $as_echo_n "(cached) " >&6
27557 else
27558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27559 /* end confdefs.h. */
27560
27561 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
27562 <wchar.h>.
27563 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
27564 included before <wchar.h>. */
27565 #if !(defined __GLIBC__ && !defined __UCLIBC__)
27566 # include <stddef.h>
27567 # include <stdio.h>
27568 # include <time.h>
27569 #endif
27570 #include <wchar.h>
27571
27572 int
27573 main ()
27574 {
27575 #undef $gl_func
27576 (void) $gl_func;
27577 ;
27578 return 0;
27579 }
27580 _ACEOF
27581 if ac_fn_c_try_compile "$LINENO"; then :
27582 eval "$as_gl_Symbol=yes"
27583 else
27584 eval "$as_gl_Symbol=no"
27585 fi
27586 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27587 fi
27588 eval ac_res=\$$as_gl_Symbol
27589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
27590 $as_echo "$ac_res" >&6; }
27591 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
27592 cat >>confdefs.h <<_ACEOF
27593 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
27594 _ACEOF
27595
27596 eval ac_cv_have_decl_$gl_func=yes
27597 fi
27598 done
27599
27600
27601
27602
27603
27604
27605
27606 :
27607
27608
27609
27610
27611
27612 if test $ac_cv_func_iswcntrl = yes; then
27613 HAVE_ISWCNTRL=1
27614 else
27615 HAVE_ISWCNTRL=0
27616 fi
27617
27618
27619
27620 if test $gt_cv_c_wint_t = yes; then
27621 HAVE_WINT_T=1
27622 else
27623 HAVE_WINT_T=0
27624 fi
27625
27626
27627
27628
27629
27630
27631
27632
27633 :
27634
27635
27636
27637
27638
27639
27640
27641
27642 if test $gl_cv_have_include_next = yes; then
27643 gl_cv_next_wctype_h='<'wctype.h'>'
27644 else
27645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
27646 $as_echo_n "checking absolute name of <wctype.h>... " >&6; }
27647 if ${gl_cv_next_wctype_h+:} false; then :
27648 $as_echo_n "(cached) " >&6
27649 else
27650
27651 if test $ac_cv_header_wctype_h = yes; then
27652
27653
27654
27655
27656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27657 /* end confdefs.h. */
27658 #include <wctype.h>
27659 _ACEOF
27660 case "$host_os" in
27661 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27662 *) gl_absname_cpp="$ac_cpp" ;;
27663 esac
27664
27665 case "$host_os" in
27666 mingw*)
27667 gl_dirsep_regex='[/\\]'
27668 ;;
27669 *)
27670 gl_dirsep_regex='\/'
27671 ;;
27672 esac
27673 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27674 gl_header_literal_regex=`echo 'wctype.h' \
27675 | sed -e "$gl_make_literal_regex_sed"`
27676 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27677 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27678 s|^/[^/]|//&|
27679 p
27680 q
27681 }'
27682
27683 gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27684 sed -n "$gl_absolute_header_sed"`
27685
27686 gl_header=$gl_cv_absolute_wctype_h
27687 gl_cv_next_wctype_h='"'$gl_header'"'
27688 else
27689 gl_cv_next_wctype_h='<'wctype.h'>'
27690 fi
27691
27692
27693 fi
27694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
27695 $as_echo "$gl_cv_next_wctype_h" >&6; }
27696 fi
27697 NEXT_WCTYPE_H=$gl_cv_next_wctype_h
27698
27699 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27700 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27701 gl_next_as_first_directive='<'wctype.h'>'
27702 else
27703 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27704 gl_next_as_first_directive=$gl_cv_next_wctype_h
27705 fi
27706 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
27707
27708
27709
27710
27711 if test $ac_cv_header_wctype_h = yes; then
27712 if test $ac_cv_func_iswcntrl = yes; then
27713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
27714 $as_echo_n "checking whether iswcntrl works... " >&6; }
27715 if ${gl_cv_func_iswcntrl_works+:} false; then :
27716 $as_echo_n "(cached) " >&6
27717 else
27718
27719 if test "$cross_compiling" = yes; then :
27720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27721 /* end confdefs.h. */
27722 #include <stdlib.h>
27723 #if __GNU_LIBRARY__ == 1
27724 Linux libc5 i18n is broken.
27725 #endif
27726 int
27727 main ()
27728 {
27729
27730 ;
27731 return 0;
27732 }
27733 _ACEOF
27734 if ac_fn_c_try_compile "$LINENO"; then :
27735 gl_cv_func_iswcntrl_works="guessing yes"
27736 else
27737 gl_cv_func_iswcntrl_works="guessing no"
27738 fi
27739 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27740
27741 else
27742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27743 /* end confdefs.h. */
27744
27745 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
27746 included before <wchar.h>.
27747 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
27748 must be included before <wchar.h>. */
27749 #include <stddef.h>
27750 #include <stdio.h>
27751 #include <time.h>
27752 #include <wchar.h>
27753 #include <wctype.h>
27754 int main () { return iswprint ('x') == 0; }
27755
27756 _ACEOF
27757 if ac_fn_c_try_run "$LINENO"; then :
27758 gl_cv_func_iswcntrl_works=yes
27759 else
27760 gl_cv_func_iswcntrl_works=no
27761 fi
27762 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27763 conftest.$ac_objext conftest.beam conftest.$ac_ext
27764 fi
27765
27766
27767 fi
27768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
27769 $as_echo "$gl_cv_func_iswcntrl_works" >&6; }
27770 fi
27771 HAVE_WCTYPE_H=1
27772 else
27773 HAVE_WCTYPE_H=0
27774 fi
27775
27776
27777 case "$gl_cv_func_iswcntrl_works" in
27778 *yes) REPLACE_ISWCNTRL=0 ;;
27779 *) REPLACE_ISWCNTRL=1 ;;
27780 esac
27781
27782
27783 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
27784 :
27785 fi
27786
27787 if test $REPLACE_ISWCNTRL = 1; then
27788 REPLACE_TOWLOWER=1
27789 else
27790 for ac_func in towlower
27791 do :
27792 ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
27793 if test "x$ac_cv_func_towlower" = xyes; then :
27794 cat >>confdefs.h <<_ACEOF
27795 #define HAVE_TOWLOWER 1
27796 _ACEOF
27797
27798 fi
27799 done
27800
27801 if test $ac_cv_func_towlower = yes; then
27802 REPLACE_TOWLOWER=0
27803 else
27804 ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
27805 included before <wchar.h>.
27806 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
27807 must be included before <wchar.h>. */
27808 #include <stddef.h>
27809 #include <stdio.h>
27810 #include <time.h>
27811 #include <wchar.h>
27812 #if HAVE_WCTYPE_H
27813 # include <wctype.h>
27814 #endif
27815
27816 "
27817 if test "x$ac_cv_have_decl_towlower" = xyes; then :
27818 ac_have_decl=1
27819 else
27820 ac_have_decl=0
27821 fi
27822
27823 cat >>confdefs.h <<_ACEOF
27824 #define HAVE_DECL_TOWLOWER $ac_have_decl
27825 _ACEOF
27826
27827 if test $ac_cv_have_decl_towlower = yes; then
27828 REPLACE_TOWLOWER=1
27829 else
27830 REPLACE_TOWLOWER=0
27831 fi
27832 fi
27833 fi
27834
27835
27836 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
27837 :
27838 fi
27839
27840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
27841 $as_echo_n "checking for wctype_t... " >&6; }
27842 if ${gl_cv_type_wctype_t+:} false; then :
27843 $as_echo_n "(cached) " >&6
27844 else
27845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27846 /* end confdefs.h. */
27847 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
27848 included before <wchar.h>.
27849 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
27850 must be included before <wchar.h>. */
27851 #include <stddef.h>
27852 #include <stdio.h>
27853 #include <time.h>
27854 #include <wchar.h>
27855 #if HAVE_WCTYPE_H
27856 # include <wctype.h>
27857 #endif
27858 wctype_t a;
27859
27860 int
27861 main ()
27862 {
27863
27864 ;
27865 return 0;
27866 }
27867 _ACEOF
27868 if ac_fn_c_try_compile "$LINENO"; then :
27869 gl_cv_type_wctype_t=yes
27870 else
27871 gl_cv_type_wctype_t=no
27872 fi
27873 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27874
27875 fi
27876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
27877 $as_echo "$gl_cv_type_wctype_t" >&6; }
27878 if test $gl_cv_type_wctype_t = no; then
27879 HAVE_WCTYPE_T=0
27880 fi
27881
27882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
27883 $as_echo_n "checking for wctrans_t... " >&6; }
27884 if ${gl_cv_type_wctrans_t+:} false; then :
27885 $as_echo_n "(cached) " >&6
27886 else
27887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27888 /* end confdefs.h. */
27889 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
27890 included before <wchar.h>.
27891 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
27892 must be included before <wchar.h>. */
27893 #include <stddef.h>
27894 #include <stdio.h>
27895 #include <time.h>
27896 #include <wchar.h>
27897 #include <wctype.h>
27898 wctrans_t a;
27899
27900 int
27901 main ()
27902 {
27903
27904 ;
27905 return 0;
27906 }
27907 _ACEOF
27908 if ac_fn_c_try_compile "$LINENO"; then :
27909 gl_cv_type_wctrans_t=yes
27910 else
27911 gl_cv_type_wctrans_t=no
27912 fi
27913 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27914
27915 fi
27916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
27917 $as_echo "$gl_cv_type_wctrans_t" >&6; }
27918 if test $gl_cv_type_wctrans_t = no; then
27919 HAVE_WCTRANS_T=0
27920 fi
27921
27922
27923 for gl_func in wctype iswctype wctrans towctrans ; do
27924 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
27925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
27926 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
27927 if eval \${$as_gl_Symbol+:} false; then :
27928 $as_echo_n "(cached) " >&6
27929 else
27930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27931 /* end confdefs.h. */
27932
27933 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
27934 <wchar.h>.
27935 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
27936 included before <wchar.h>. */
27937 #if !(defined __GLIBC__ && !defined __UCLIBC__)
27938 # include <stddef.h>
27939 # include <stdio.h>
27940 # include <time.h>
27941 # include <wchar.h>
27942 #endif
27943 #include <wctype.h>
27944
27945 int
27946 main ()
27947 {
27948 #undef $gl_func
27949 (void) $gl_func;
27950 ;
27951 return 0;
27952 }
27953 _ACEOF
27954 if ac_fn_c_try_compile "$LINENO"; then :
27955 eval "$as_gl_Symbol=yes"
27956 else
27957 eval "$as_gl_Symbol=no"
27958 fi
27959 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27960 fi
27961 eval ac_res=\$$as_gl_Symbol
27962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
27963 $as_echo "$ac_res" >&6; }
27964 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
27965 cat >>confdefs.h <<_ACEOF
27966 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
27967 _ACEOF
27968
27969 eval ac_cv_have_decl_$gl_func=yes
27970 fi
27971 done
27972
27973
27974 # End of code from modules
27975
27976
27977
27978
27979
27980
27981
27982
27983
27984 gltests_libdeps=
27985 gltests_ltlibdeps=
27986
27987
27988
27989
27990
27991
27992
27993
27994
27995 gl_source_base='tests'
27996 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
27997
27998 gl_module_indicator_condition=$gltests_WITNESS
27999
28000
28001
28002
28003
28004
28005
28006
28007
28008 LIBGNU_LIBDEPS="$gl_libdeps"
28009
28010 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
28011
28012
28013
28014 am__api_version='1.15'
28015
28016 # Find a good install program. We prefer a C program (faster),
28017 # so one script is as good as another. But avoid the broken or
28018 # incompatible versions:
28019 # SysV /etc/install, /usr/sbin/install
28020 # SunOS /usr/etc/install
28021 # IRIX /sbin/install
28022 # AIX /bin/install
28023 # AmigaOS /C/install, which installs bootblocks on floppy discs
28024 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
28025 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
28026 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
28027 # OS/2's system install, which has a completely different semantic
28028 # ./install, which can be erroneously created by make from ./install.sh.
28029 # Reject install programs that cannot install multiple files.
28030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
28031 $as_echo_n "checking for a BSD-compatible install... " >&6; }
28032 if test -z "$INSTALL"; then
28033 if ${ac_cv_path_install+:} false; then :
28034 $as_echo_n "(cached) " >&6
28035 else
28036 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28037 for as_dir in $PATH
28038 do
28039 IFS=$as_save_IFS
28040 test -z "$as_dir" && as_dir=.
28041 # Account for people who put trailing slashes in PATH elements.
28042 case $as_dir/ in #((
28043 ./ | .// | /[cC]/* | \
28044 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
28045 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
28046 /usr/ucb/* ) ;;
28047 *)
28048 # OSF1 and SCO ODT 3.0 have their own names for install.
28049 # Don't use installbsd from OSF since it installs stuff as root
28050 # by default.
28051 for ac_prog in ginstall scoinst install; do
28052 for ac_exec_ext in '' $ac_executable_extensions; do
28053 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
28054 if test $ac_prog = install &&
28055 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
28056 # AIX install. It has an incompatible calling convention.
28057 :
28058 elif test $ac_prog = install &&
28059 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
28060 # program-specific install script used by HP pwplus--don't use.
28061 :
28062 else
28063 rm -rf conftest.one conftest.two conftest.dir
28064 echo one > conftest.one
28065 echo two > conftest.two
28066 mkdir conftest.dir
28067 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
28068 test -s conftest.one && test -s conftest.two &&
28069 test -s conftest.dir/conftest.one &&
28070 test -s conftest.dir/conftest.two
28071 then
28072 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
28073 break 3
28074 fi
28075 fi
28076 fi
28077 done
28078 done
28079 ;;
28080 esac
28081
28082 done
28083 IFS=$as_save_IFS
28084
28085 rm -rf conftest.one conftest.two conftest.dir
28086
28087 fi
28088 if test "${ac_cv_path_install+set}" = set; then
28089 INSTALL=$ac_cv_path_install
28090 else
28091 # As a last resort, use the slow shell script. Don't cache a
28092 # value for INSTALL within a source directory, because that will
28093 # break other packages using the cache if that directory is
28094 # removed, or if the value is a relative name.
28095 INSTALL=$ac_install_sh
28096 fi
28097 fi
28098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
28099 $as_echo "$INSTALL" >&6; }
28100
28101 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
28102 # It thinks the first close brace ends the variable substitution.
28103 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
28104
28105 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
28106
28107 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
28108
28109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
28110 $as_echo_n "checking whether build environment is sane... " >&6; }
28111 # Reject unsafe characters in $srcdir or the absolute working directory
28112 # name. Accept space and tab only in the latter.
28113 am_lf='
28114 '
28115 case `pwd` in
28116 *[\\\"\#\$\&\'\`$am_lf]*)
28117 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
28118 esac
28119 case $srcdir in
28120 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
28121 as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
28122 esac
28123
28124 # Do 'set' in a subshell so we don't clobber the current shell's
28125 # arguments. Must try -L first in case configure is actually a
28126 # symlink; some systems play weird games with the mod time of symlinks
28127 # (eg FreeBSD returns the mod time of the symlink's containing
28128 # directory).
28129 if (
28130 am_has_slept=no
28131 for am_try in 1 2; do
28132 echo "timestamp, slept: $am_has_slept" > conftest.file
28133 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
28134 if test "$*" = "X"; then
28135 # -L didn't work.
28136 set X `ls -t "$srcdir/configure" conftest.file`
28137 fi
28138 if test "$*" != "X $srcdir/configure conftest.file" \
28139 && test "$*" != "X conftest.file $srcdir/configure"; then
28140
28141 # If neither matched, then we have a broken ls. This can happen
28142 # if, for instance, CONFIG_SHELL is bash and it inherits a
28143 # broken ls alias from the environment. This has actually
28144 # happened. Such a system could not be considered "sane".
28145 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
28146 alias in your environment" "$LINENO" 5
28147 fi
28148 if test "$2" = conftest.file || test $am_try -eq 2; then
28149 break
28150 fi
28151 # Just in case.
28152 sleep 1
28153 am_has_slept=yes
28154 done
28155 test "$2" = conftest.file
28156 )
28157 then
28158 # Ok.
28159 :
28160 else
28161 as_fn_error $? "newly created file is older than distributed files!
28162 Check your system clock" "$LINENO" 5
28163 fi
28164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28165 $as_echo "yes" >&6; }
28166 # If we didn't sleep, we still need to ensure time stamps of config.status and
28167 # generated files are strictly newer.
28168 am_sleep_pid=
28169 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
28170 ( sleep 1 ) &
28171 am_sleep_pid=$!
28172 fi
28173
28174 rm -f conftest.file
28175
28176 test "$program_prefix" != NONE &&
28177 program_transform_name="s&^&$program_prefix&;$program_transform_name"
28178 # Use a double $ so make ignores it.
28179 test "$program_suffix" != NONE &&
28180 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
28181 # Double any \ or $.
28182 # By default was `s,x,x', remove it if useless.
28183 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
28184 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
28185
28186 if test x"${MISSING+set}" != xset; then
28187 case $am_aux_dir in
28188 *\ * | *\ *)
28189 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
28190 *)
28191 MISSING="\${SHELL} $am_aux_dir/missing" ;;
28192 esac
28193 fi
28194 # Use eval to expand $SHELL
28195 if eval "$MISSING --is-lightweight"; then
28196 am_missing_run="$MISSING "
28197 else
28198 am_missing_run=
28199 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
28200 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
28201 fi
28202
28203 if test x"${install_sh+set}" != xset; then
28204 case $am_aux_dir in
28205 *\ * | *\ *)
28206 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
28207 *)
28208 install_sh="\${SHELL} $am_aux_dir/install-sh"
28209 esac
28210 fi
28211
28212 # Installed binaries are usually stripped using 'strip' when the user
28213 # run "make install-strip". However 'strip' might not be the right
28214 # tool to use in cross-compilation environments, therefore Automake
28215 # will honor the 'STRIP' environment variable to overrule this program.
28216 if test "$cross_compiling" != no; then
28217 if test -n "$ac_tool_prefix"; then
28218 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
28219 set dummy ${ac_tool_prefix}strip; ac_word=$2
28220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28221 $as_echo_n "checking for $ac_word... " >&6; }
28222 if ${ac_cv_prog_STRIP+:} false; then :
28223 $as_echo_n "(cached) " >&6
28224 else
28225 if test -n "$STRIP"; then
28226 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
28227 else
28228 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28229 for as_dir in $PATH
28230 do
28231 IFS=$as_save_IFS
28232 test -z "$as_dir" && as_dir=.
28233 for ac_exec_ext in '' $ac_executable_extensions; do
28234 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28235 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
28236 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28237 break 2
28238 fi
28239 done
28240 done
28241 IFS=$as_save_IFS
28242
28243 fi
28244 fi
28245 STRIP=$ac_cv_prog_STRIP
28246 if test -n "$STRIP"; then
28247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
28248 $as_echo "$STRIP" >&6; }
28249 else
28250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28251 $as_echo "no" >&6; }
28252 fi
28253
28254
28255 fi
28256 if test -z "$ac_cv_prog_STRIP"; then
28257 ac_ct_STRIP=$STRIP
28258 # Extract the first word of "strip", so it can be a program name with args.
28259 set dummy strip; ac_word=$2
28260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28261 $as_echo_n "checking for $ac_word... " >&6; }
28262 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
28263 $as_echo_n "(cached) " >&6
28264 else
28265 if test -n "$ac_ct_STRIP"; then
28266 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
28267 else
28268 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28269 for as_dir in $PATH
28270 do
28271 IFS=$as_save_IFS
28272 test -z "$as_dir" && as_dir=.
28273 for ac_exec_ext in '' $ac_executable_extensions; do
28274 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28275 ac_cv_prog_ac_ct_STRIP="strip"
28276 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28277 break 2
28278 fi
28279 done
28280 done
28281 IFS=$as_save_IFS
28282
28283 fi
28284 fi
28285 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
28286 if test -n "$ac_ct_STRIP"; then
28287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
28288 $as_echo "$ac_ct_STRIP" >&6; }
28289 else
28290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28291 $as_echo "no" >&6; }
28292 fi
28293
28294 if test "x$ac_ct_STRIP" = x; then
28295 STRIP=":"
28296 else
28297 case $cross_compiling:$ac_tool_warned in
28298 yes:)
28299 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28300 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28301 ac_tool_warned=yes ;;
28302 esac
28303 STRIP=$ac_ct_STRIP
28304 fi
28305 else
28306 STRIP="$ac_cv_prog_STRIP"
28307 fi
28308
28309 fi
28310 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
28311
28312 for ac_prog in gawk mawk nawk awk
28313 do
28314 # Extract the first word of "$ac_prog", so it can be a program name with args.
28315 set dummy $ac_prog; ac_word=$2
28316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28317 $as_echo_n "checking for $ac_word... " >&6; }
28318 if ${ac_cv_prog_AWK+:} false; then :
28319 $as_echo_n "(cached) " >&6
28320 else
28321 if test -n "$AWK"; then
28322 ac_cv_prog_AWK="$AWK" # Let the user override the test.
28323 else
28324 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28325 for as_dir in $PATH
28326 do
28327 IFS=$as_save_IFS
28328 test -z "$as_dir" && as_dir=.
28329 for ac_exec_ext in '' $ac_executable_extensions; do
28330 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28331 ac_cv_prog_AWK="$ac_prog"
28332 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28333 break 2
28334 fi
28335 done
28336 done
28337 IFS=$as_save_IFS
28338
28339 fi
28340 fi
28341 AWK=$ac_cv_prog_AWK
28342 if test -n "$AWK"; then
28343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
28344 $as_echo "$AWK" >&6; }
28345 else
28346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28347 $as_echo "no" >&6; }
28348 fi
28349
28350
28351 test -n "$AWK" && break
28352 done
28353
28354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
28355 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
28356 set x ${MAKE-make}
28357 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
28358 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
28359 $as_echo_n "(cached) " >&6
28360 else
28361 cat >conftest.make <<\_ACEOF
28362 SHELL = /bin/sh
28363 all:
28364 @echo '@@@%%%=$(MAKE)=@@@%%%'
28365 _ACEOF
28366 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
28367 case `${MAKE-make} -f conftest.make 2>/dev/null` in
28368 *@@@%%%=?*=@@@%%%*)
28369 eval ac_cv_prog_make_${ac_make}_set=yes;;
28370 *)
28371 eval ac_cv_prog_make_${ac_make}_set=no;;
28372 esac
28373 rm -f conftest.make
28374 fi
28375 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
28376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28377 $as_echo "yes" >&6; }
28378 SET_MAKE=
28379 else
28380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28381 $as_echo "no" >&6; }
28382 SET_MAKE="MAKE=${MAKE-make}"
28383 fi
28384
28385 rm -rf .tst 2>/dev/null
28386 mkdir .tst 2>/dev/null
28387 if test -d .tst; then
28388 am__leading_dot=.
28389 else
28390 am__leading_dot=_
28391 fi
28392 rmdir .tst 2>/dev/null
28393
28394 DEPDIR="${am__leading_dot}deps"
28395
28396 ac_config_commands="$ac_config_commands depfiles"
28397
28398
28399 am_make=${MAKE-make}
28400 cat > confinc << 'END'
28401 am__doit:
28402 @echo this is the am__doit target
28403 .PHONY: am__doit
28404 END
28405 # If we don't find an include directive, just comment out the code.
28406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
28407 $as_echo_n "checking for style of include used by $am_make... " >&6; }
28408 am__include="#"
28409 am__quote=
28410 _am_result=none
28411 # First try GNU make style include.
28412 echo "include confinc" > confmf
28413 # Ignore all kinds of additional output from 'make'.
28414 case `$am_make -s -f confmf 2> /dev/null` in #(
28415 *the\ am__doit\ target*)
28416 am__include=include
28417 am__quote=
28418 _am_result=GNU
28419 ;;
28420 esac
28421 # Now try BSD make style include.
28422 if test "$am__include" = "#"; then
28423 echo '.include "confinc"' > confmf
28424 case `$am_make -s -f confmf 2> /dev/null` in #(
28425 *the\ am__doit\ target*)
28426 am__include=.include
28427 am__quote="\""
28428 _am_result=BSD
28429 ;;
28430 esac
28431 fi
28432
28433
28434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
28435 $as_echo "$_am_result" >&6; }
28436 rm -f confinc confmf
28437
28438 # Check whether --enable-dependency-tracking was given.
28439 if test "${enable_dependency_tracking+set}" = set; then :
28440 enableval=$enable_dependency_tracking;
28441 fi
28442
28443 if test "x$enable_dependency_tracking" != xno; then
28444 am_depcomp="$ac_aux_dir/depcomp"
28445 AMDEPBACKSLASH='\'
28446 am__nodep='_no'
28447 fi
28448 if test "x$enable_dependency_tracking" != xno; then
28449 AMDEP_TRUE=
28450 AMDEP_FALSE='#'
28451 else
28452 AMDEP_TRUE='#'
28453 AMDEP_FALSE=
28454 fi
28455
28456
28457 # Check whether --enable-silent-rules was given.
28458 if test "${enable_silent_rules+set}" = set; then :
28459 enableval=$enable_silent_rules;
28460 fi
28461
28462 case $enable_silent_rules in # (((
28463 yes) AM_DEFAULT_VERBOSITY=0;;
28464 no) AM_DEFAULT_VERBOSITY=1;;
28465 *) AM_DEFAULT_VERBOSITY=1;;
28466 esac
28467 am_make=${MAKE-make}
28468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
28469 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
28470 if ${am_cv_make_support_nested_variables+:} false; then :
28471 $as_echo_n "(cached) " >&6
28472 else
28473 if $as_echo 'TRUE=$(BAR$(V))
28474 BAR0=false
28475 BAR1=true
28476 V=1
28477 am__doit:
28478 @$(TRUE)
28479 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
28480 am_cv_make_support_nested_variables=yes
28481 else
28482 am_cv_make_support_nested_variables=no
28483 fi
28484 fi
28485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
28486 $as_echo "$am_cv_make_support_nested_variables" >&6; }
28487 if test $am_cv_make_support_nested_variables = yes; then
28488 AM_V='$(V)'
28489 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
28490 else
28491 AM_V=$AM_DEFAULT_VERBOSITY
28492 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
28493 fi
28494 AM_BACKSLASH='\'
28495
28496 if test "`cd $srcdir && pwd`" != "`pwd`"; then
28497 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
28498 # is not polluted with repeated "-I."
28499 am__isrc=' -I$(srcdir)'
28500 # test to see if srcdir already configured
28501 if test -f $srcdir/config.status; then
28502 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
28503 fi
28504 fi
28505
28506 # test whether we have cygpath
28507 if test -z "$CYGPATH_W"; then
28508 if (cygpath --version) >/dev/null 2>/dev/null; then
28509 CYGPATH_W='cygpath -w'
28510 else
28511 CYGPATH_W=echo
28512 fi
28513 fi
28514
28515
28516 # Define the identity of the package.
28517 PACKAGE='libgnu'
28518 VERSION='UNUSED-VERSION'
28519
28520
28521 # Some tools Automake needs.
28522
28523 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
28524
28525
28526 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
28527
28528
28529 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
28530
28531
28532 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
28533
28534
28535 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
28536
28537 # For better backward compatibility. To be removed once Automake 1.9.x
28538 # dies out for good. For more background, see:
28539 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
28540 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
28541 mkdir_p='$(MKDIR_P)'
28542
28543 # We need awk for the "check" target (and possibly the TAP driver). The
28544 # system "awk" is bad on some platforms.
28545 # Always define AMTAR for backward compatibility. Yes, it's still used
28546 # in the wild :-( We should find a proper way to deprecate it ...
28547 AMTAR='$${TAR-tar}'
28548
28549
28550 # We'll loop over all known methods to create a tar archive until one works.
28551 _am_tools='gnutar pax cpio none'
28552
28553 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
28554
28555
28556
28557
28558
28559 depcc="$CC" am_compiler_list=
28560
28561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
28562 $as_echo_n "checking dependency style of $depcc... " >&6; }
28563 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
28564 $as_echo_n "(cached) " >&6
28565 else
28566 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
28567 # We make a subdir and do the tests there. Otherwise we can end up
28568 # making bogus files that we don't know about and never remove. For
28569 # instance it was reported that on HP-UX the gcc test will end up
28570 # making a dummy file named 'D' -- because '-MD' means "put the output
28571 # in D".
28572 rm -rf conftest.dir
28573 mkdir conftest.dir
28574 # Copy depcomp to subdir because otherwise we won't find it if we're
28575 # using a relative directory.
28576 cp "$am_depcomp" conftest.dir
28577 cd conftest.dir
28578 # We will build objects and dependencies in a subdirectory because
28579 # it helps to detect inapplicable dependency modes. For instance
28580 # both Tru64's cc and ICC support -MD to output dependencies as a
28581 # side effect of compilation, but ICC will put the dependencies in
28582 # the current directory while Tru64 will put them in the object
28583 # directory.
28584 mkdir sub
28585
28586 am_cv_CC_dependencies_compiler_type=none
28587 if test "$am_compiler_list" = ""; then
28588 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
28589 fi
28590 am__universal=false
28591 case " $depcc " in #(
28592 *\ -arch\ *\ -arch\ *) am__universal=true ;;
28593 esac
28594
28595 for depmode in $am_compiler_list; do
28596 # Setup a source with many dependencies, because some compilers
28597 # like to wrap large dependency lists on column 80 (with \), and
28598 # we should not choose a depcomp mode which is confused by this.
28599 #
28600 # We need to recreate these files for each test, as the compiler may
28601 # overwrite some of them when testing with obscure command lines.
28602 # This happens at least with the AIX C compiler.
28603 : > sub/conftest.c
28604 for i in 1 2 3 4 5 6; do
28605 echo '#include "conftst'$i'.h"' >> sub/conftest.c
28606 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
28607 # Solaris 10 /bin/sh.
28608 echo '/* dummy */' > sub/conftst$i.h
28609 done
28610 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
28611
28612 # We check with '-c' and '-o' for the sake of the "dashmstdout"
28613 # mode. It turns out that the SunPro C++ compiler does not properly
28614 # handle '-M -o', and we need to detect this. Also, some Intel
28615 # versions had trouble with output in subdirs.
28616 am__obj=sub/conftest.${OBJEXT-o}
28617 am__minus_obj="-o $am__obj"
28618 case $depmode in
28619 gcc)
28620 # This depmode causes a compiler race in universal mode.
28621 test "$am__universal" = false || continue
28622 ;;
28623 nosideeffect)
28624 # After this tag, mechanisms are not by side-effect, so they'll
28625 # only be used when explicitly requested.
28626 if test "x$enable_dependency_tracking" = xyes; then
28627 continue
28628 else
28629 break
28630 fi
28631 ;;
28632 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
28633 # This compiler won't grok '-c -o', but also, the minuso test has
28634 # not run yet. These depmodes are late enough in the game, and
28635 # so weak that their functioning should not be impacted.
28636 am__obj=conftest.${OBJEXT-o}
28637 am__minus_obj=
28638 ;;
28639 none) break ;;
28640 esac
28641 if depmode=$depmode \
28642 source=sub/conftest.c object=$am__obj \
28643 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
28644 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
28645 >/dev/null 2>conftest.err &&
28646 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
28647 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
28648 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
28649 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
28650 # icc doesn't choke on unknown options, it will just issue warnings
28651 # or remarks (even with -Werror). So we grep stderr for any message
28652 # that says an option was ignored or not supported.
28653 # When given -MP, icc 7.0 and 7.1 complain thusly:
28654 # icc: Command line warning: ignoring option '-M'; no argument required
28655 # The diagnosis changed in icc 8.0:
28656 # icc: Command line remark: option '-MP' not supported
28657 if (grep 'ignoring option' conftest.err ||
28658 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
28659 am_cv_CC_dependencies_compiler_type=$depmode
28660 break
28661 fi
28662 fi
28663 done
28664
28665 cd ..
28666 rm -rf conftest.dir
28667 else
28668 am_cv_CC_dependencies_compiler_type=none
28669 fi
28670
28671 fi
28672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
28673 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
28674 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
28675
28676 if
28677 test "x$enable_dependency_tracking" != xno \
28678 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
28679 am__fastdepCC_TRUE=
28680 am__fastdepCC_FALSE='#'
28681 else
28682 am__fastdepCC_TRUE='#'
28683 am__fastdepCC_FALSE=
28684 fi
28685
28686
28687
28688 # POSIX will say in a future version that running "rm -f" with no argument
28689 # is OK; and we want to be able to make that assumption in our Makefile
28690 # recipes. So use an aggressive probe to check that the usage we want is
28691 # actually supported "in the wild" to an acceptable degree.
28692 # See automake bug#10828.
28693 # To make any issue more visible, cause the running configure to be aborted
28694 # by default if the 'rm' program in use doesn't match our expectations; the
28695 # user can still override this though.
28696 if rm -f && rm -fr && rm -rf; then : OK; else
28697 cat >&2 <<'END'
28698 Oops!
28699
28700 Your 'rm' program seems unable to run without file operands specified
28701 on the command line, even when the '-f' option is present. This is contrary
28702 to the behaviour of most rm programs out there, and not conforming with
28703 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
28704
28705 Please tell bug-automake@gnu.org about your system, including the value
28706 of your $PATH and any error possibly output before this message. This
28707 can help us improve future automake versions.
28708
28709 END
28710 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
28711 echo 'Configuration will proceed anyway, since you have set the' >&2
28712 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
28713 echo >&2
28714 else
28715 cat >&2 <<'END'
28716 Aborting the configuration process, to ensure you take notice of the issue.
28717
28718 You can download and install GNU coreutils to get an 'rm' implementation
28719 that behaves properly: <http://www.gnu.org/software/coreutils/>.
28720
28721 If you want to complete the configuration process using your problematic
28722 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
28723 to "yes", and re-run configure.
28724
28725 END
28726 as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
28727 fi
28728 fi
28729
28730
28731 # Check whether --enable-silent-rules was given.
28732 if test "${enable_silent_rules+set}" = set; then :
28733 enableval=$enable_silent_rules;
28734 fi
28735
28736 case $enable_silent_rules in # (((
28737 yes) AM_DEFAULT_VERBOSITY=0;;
28738 no) AM_DEFAULT_VERBOSITY=1;;
28739 *) AM_DEFAULT_VERBOSITY=0;;
28740 esac
28741 am_make=${MAKE-make}
28742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
28743 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
28744 if ${am_cv_make_support_nested_variables+:} false; then :
28745 $as_echo_n "(cached) " >&6
28746 else
28747 if $as_echo 'TRUE=$(BAR$(V))
28748 BAR0=false
28749 BAR1=true
28750 V=1
28751 am__doit:
28752 @$(TRUE)
28753 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
28754 am_cv_make_support_nested_variables=yes
28755 else
28756 am_cv_make_support_nested_variables=no
28757 fi
28758 fi
28759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
28760 $as_echo "$am_cv_make_support_nested_variables" >&6; }
28761 if test $am_cv_make_support_nested_variables = yes; then
28762 AM_V='$(V)'
28763 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
28764 else
28765 AM_V=$AM_DEFAULT_VERBOSITY
28766 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
28767 fi
28768 AM_BACKSLASH='\'
28769
28770
28771 # --------------------- #
28772 # Checks for programs. #
28773 # --------------------- #
28774
28775
28776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
28777 $as_echo_n "checking whether ln -s works... " >&6; }
28778 LN_S=$as_ln_s
28779 if test "$LN_S" = "ln -s"; then
28780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28781 $as_echo "yes" >&6; }
28782 else
28783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
28784 $as_echo "no, using $LN_S" >&6; }
28785 fi
28786
28787 if test -n "$ac_tool_prefix"; then
28788 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
28789 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
28790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28791 $as_echo_n "checking for $ac_word... " >&6; }
28792 if ${ac_cv_prog_RANLIB+:} false; then :
28793 $as_echo_n "(cached) " >&6
28794 else
28795 if test -n "$RANLIB"; then
28796 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
28797 else
28798 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28799 for as_dir in $PATH
28800 do
28801 IFS=$as_save_IFS
28802 test -z "$as_dir" && as_dir=.
28803 for ac_exec_ext in '' $ac_executable_extensions; do
28804 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28805 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
28806 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28807 break 2
28808 fi
28809 done
28810 done
28811 IFS=$as_save_IFS
28812
28813 fi
28814 fi
28815 RANLIB=$ac_cv_prog_RANLIB
28816 if test -n "$RANLIB"; then
28817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
28818 $as_echo "$RANLIB" >&6; }
28819 else
28820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28821 $as_echo "no" >&6; }
28822 fi
28823
28824
28825 fi
28826 if test -z "$ac_cv_prog_RANLIB"; then
28827 ac_ct_RANLIB=$RANLIB
28828 # Extract the first word of "ranlib", so it can be a program name with args.
28829 set dummy ranlib; ac_word=$2
28830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28831 $as_echo_n "checking for $ac_word... " >&6; }
28832 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
28833 $as_echo_n "(cached) " >&6
28834 else
28835 if test -n "$ac_ct_RANLIB"; then
28836 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
28837 else
28838 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28839 for as_dir in $PATH
28840 do
28841 IFS=$as_save_IFS
28842 test -z "$as_dir" && as_dir=.
28843 for ac_exec_ext in '' $ac_executable_extensions; do
28844 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28845 ac_cv_prog_ac_ct_RANLIB="ranlib"
28846 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28847 break 2
28848 fi
28849 done
28850 done
28851 IFS=$as_save_IFS
28852
28853 fi
28854 fi
28855 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
28856 if test -n "$ac_ct_RANLIB"; then
28857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
28858 $as_echo "$ac_ct_RANLIB" >&6; }
28859 else
28860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28861 $as_echo "no" >&6; }
28862 fi
28863
28864 if test "x$ac_ct_RANLIB" = x; then
28865 RANLIB=":"
28866 else
28867 case $cross_compiling:$ac_tool_warned in
28868 yes:)
28869 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28870 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28871 ac_tool_warned=yes ;;
28872 esac
28873 RANLIB=$ac_ct_RANLIB
28874 fi
28875 else
28876 RANLIB="$ac_cv_prog_RANLIB"
28877 fi
28878
28879
28880 if test -n "$ac_tool_prefix"; then
28881 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
28882 set dummy ${ac_tool_prefix}ar; ac_word=$2
28883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28884 $as_echo_n "checking for $ac_word... " >&6; }
28885 if ${ac_cv_prog_AR+:} false; then :
28886 $as_echo_n "(cached) " >&6
28887 else
28888 if test -n "$AR"; then
28889 ac_cv_prog_AR="$AR" # Let the user override the test.
28890 else
28891 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28892 for as_dir in $PATH
28893 do
28894 IFS=$as_save_IFS
28895 test -z "$as_dir" && as_dir=.
28896 for ac_exec_ext in '' $ac_executable_extensions; do
28897 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28898 ac_cv_prog_AR="${ac_tool_prefix}ar"
28899 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28900 break 2
28901 fi
28902 done
28903 done
28904 IFS=$as_save_IFS
28905
28906 fi
28907 fi
28908 AR=$ac_cv_prog_AR
28909 if test -n "$AR"; then
28910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
28911 $as_echo "$AR" >&6; }
28912 else
28913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28914 $as_echo "no" >&6; }
28915 fi
28916
28917
28918 fi
28919 if test -z "$ac_cv_prog_AR"; then
28920 ac_ct_AR=$AR
28921 # Extract the first word of "ar", so it can be a program name with args.
28922 set dummy ar; ac_word=$2
28923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28924 $as_echo_n "checking for $ac_word... " >&6; }
28925 if ${ac_cv_prog_ac_ct_AR+:} false; then :
28926 $as_echo_n "(cached) " >&6
28927 else
28928 if test -n "$ac_ct_AR"; then
28929 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
28930 else
28931 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28932 for as_dir in $PATH
28933 do
28934 IFS=$as_save_IFS
28935 test -z "$as_dir" && as_dir=.
28936 for ac_exec_ext in '' $ac_executable_extensions; do
28937 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28938 ac_cv_prog_ac_ct_AR="ar"
28939 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28940 break 2
28941 fi
28942 done
28943 done
28944 IFS=$as_save_IFS
28945
28946 fi
28947 fi
28948 ac_ct_AR=$ac_cv_prog_ac_ct_AR
28949 if test -n "$ac_ct_AR"; then
28950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
28951 $as_echo "$ac_ct_AR" >&6; }
28952 else
28953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28954 $as_echo "no" >&6; }
28955 fi
28956
28957 if test "x$ac_ct_AR" = x; then
28958 AR=""
28959 else
28960 case $cross_compiling:$ac_tool_warned in
28961 yes:)
28962 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28963 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28964 ac_tool_warned=yes ;;
28965 esac
28966 AR=$ac_ct_AR
28967 fi
28968 else
28969 AR="$ac_cv_prog_AR"
28970 fi
28971
28972
28973 # ---------------------- #
28974 # Checks for libraries. #
28975 # ---------------------- #
28976
28977 ac_config_files="$ac_config_files Makefile import/Makefile"
28978
28979 ac_config_commands="$ac_config_commands default"
28980
28981 cat >confcache <<\_ACEOF
28982 # This file is a shell script that caches the results of configure
28983 # tests run on this system so they can be shared between configure
28984 # scripts and configure runs, see configure's option --config-cache.
28985 # It is not useful on other systems. If it contains results you don't
28986 # want to keep, you may remove or edit it.
28987 #
28988 # config.status only pays attention to the cache file if you give it
28989 # the --recheck option to rerun configure.
28990 #
28991 # `ac_cv_env_foo' variables (set or unset) will be overridden when
28992 # loading this file, other *unset* `ac_cv_foo' will be assigned the
28993 # following values.
28994
28995 _ACEOF
28996
28997 # The following way of writing the cache mishandles newlines in values,
28998 # but we know of no workaround that is simple, portable, and efficient.
28999 # So, we kill variables containing newlines.
29000 # Ultrix sh set writes to stderr and can't be redirected directly,
29001 # and sets the high bit in the cache file unless we assign to the vars.
29002 (
29003 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
29004 eval ac_val=\$$ac_var
29005 case $ac_val in #(
29006 *${as_nl}*)
29007 case $ac_var in #(
29008 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
29009 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
29010 esac
29011 case $ac_var in #(
29012 _ | IFS | as_nl) ;; #(
29013 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
29014 *) { eval $ac_var=; unset $ac_var;} ;;
29015 esac ;;
29016 esac
29017 done
29018
29019 (set) 2>&1 |
29020 case $as_nl`(ac_space=' '; set) 2>&1` in #(
29021 *${as_nl}ac_space=\ *)
29022 # `set' does not quote correctly, so add quotes: double-quote
29023 # substitution turns \\\\ into \\, and sed turns \\ into \.
29024 sed -n \
29025 "s/'/'\\\\''/g;
29026 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
29027 ;; #(
29028 *)
29029 # `set' quotes correctly as required by POSIX, so do not add quotes.
29030 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
29031 ;;
29032 esac |
29033 sort
29034 ) |
29035 sed '
29036 /^ac_cv_env_/b end
29037 t clear
29038 :clear
29039 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
29040 t end
29041 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
29042 :end' >>confcache
29043 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
29044 if test -w "$cache_file"; then
29045 if test "x$cache_file" != "x/dev/null"; then
29046 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
29047 $as_echo "$as_me: updating cache $cache_file" >&6;}
29048 if test ! -f "$cache_file" || test -h "$cache_file"; then
29049 cat confcache >"$cache_file"
29050 else
29051 case $cache_file in #(
29052 */* | ?:*)
29053 mv -f confcache "$cache_file"$$ &&
29054 mv -f "$cache_file"$$ "$cache_file" ;; #(
29055 *)
29056 mv -f confcache "$cache_file" ;;
29057 esac
29058 fi
29059 fi
29060 else
29061 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
29062 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
29063 fi
29064 fi
29065 rm -f confcache
29066
29067 test "x$prefix" = xNONE && prefix=$ac_default_prefix
29068 # Let make expand exec_prefix.
29069 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
29070
29071 DEFS=-DHAVE_CONFIG_H
29072
29073 ac_libobjs=
29074 ac_ltlibobjs=
29075 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
29076 # 1. Remove the extension, and $U if already installed.
29077 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
29078 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
29079 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
29080 # will be set to the directory where LIBOBJS objects are built.
29081 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
29082 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
29083 done
29084 LIBOBJS=$ac_libobjs
29085
29086 LTLIBOBJS=$ac_ltlibobjs
29087
29088
29089 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
29090 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
29091 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29092 fi
29093 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
29094 as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
29095 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29096 fi
29097 if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
29098 as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
29099 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29100 fi
29101 if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
29102 as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
29103 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29104 fi
29105 if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
29106 as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
29107 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29108 fi
29109 if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
29110 as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
29111 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29112 fi
29113 if test -z "${GL_GENERATE_GLOB_H_TRUE}" && test -z "${GL_GENERATE_GLOB_H_FALSE}"; then
29114 as_fn_error $? "conditional \"GL_GENERATE_GLOB_H\" was never defined.
29115 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29116 fi
29117 if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
29118 as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
29119 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29120 fi
29121 if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
29122 as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
29123 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29124 fi
29125 if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
29126 as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
29127 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29128 fi
29129
29130
29131 if test -z "${GL_GENERATE_NETINET_IN_H_TRUE}" && test -z "${GL_GENERATE_NETINET_IN_H_FALSE}"; then
29132 as_fn_error $? "conditional \"GL_GENERATE_NETINET_IN_H\" was never defined.
29133 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29134 fi
29135 if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
29136 as_fn_error $? "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
29137 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29138 fi
29139 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
29140 as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
29141 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29142 fi
29143 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
29144 as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
29145 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29146 fi
29147
29148 gl_libobjs=
29149 gl_ltlibobjs=
29150 if test -n "$gl_LIBOBJS"; then
29151 # Remove the extension.
29152 sed_drop_objext='s/\.o$//;s/\.obj$//'
29153 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
29154 gl_libobjs="$gl_libobjs $i.$ac_objext"
29155 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
29156 done
29157 fi
29158 gl_LIBOBJS=$gl_libobjs
29159
29160 gl_LTLIBOBJS=$gl_ltlibobjs
29161
29162
29163
29164 gltests_libobjs=
29165 gltests_ltlibobjs=
29166 if test -n "$gltests_LIBOBJS"; then
29167 # Remove the extension.
29168 sed_drop_objext='s/\.o$//;s/\.obj$//'
29169 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
29170 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
29171 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
29172 done
29173 fi
29174 gltests_LIBOBJS=$gltests_libobjs
29175
29176 gltests_LTLIBOBJS=$gltests_ltlibobjs
29177
29178
29179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
29180 $as_echo_n "checking that generated files are newer than configure... " >&6; }
29181 if test -n "$am_sleep_pid"; then
29182 # Hide warnings about reused PIDs.
29183 wait $am_sleep_pid 2>/dev/null
29184 fi
29185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
29186 $as_echo "done" >&6; }
29187 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
29188 as_fn_error $? "conditional \"AMDEP\" was never defined.
29189 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29190 fi
29191 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
29192 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
29193 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29194 fi
29195 if test -n "$EXEEXT"; then
29196 am__EXEEXT_TRUE=
29197 am__EXEEXT_FALSE='#'
29198 else
29199 am__EXEEXT_TRUE='#'
29200 am__EXEEXT_FALSE=
29201 fi
29202
29203
29204 : "${CONFIG_STATUS=./config.status}"
29205 ac_write_fail=0
29206 ac_clean_files_save=$ac_clean_files
29207 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
29208 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
29209 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
29210 as_write_fail=0
29211 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
29212 #! $SHELL
29213 # Generated by $as_me.
29214 # Run this file to recreate the current configuration.
29215 # Compiler output produced by configure, useful for debugging
29216 # configure, is in config.log if it exists.
29217
29218 debug=false
29219 ac_cs_recheck=false
29220 ac_cs_silent=false
29221
29222 SHELL=\${CONFIG_SHELL-$SHELL}
29223 export SHELL
29224 _ASEOF
29225 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
29226 ## -------------------- ##
29227 ## M4sh Initialization. ##
29228 ## -------------------- ##
29229
29230 # Be more Bourne compatible
29231 DUALCASE=1; export DUALCASE # for MKS sh
29232 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
29233 emulate sh
29234 NULLCMD=:
29235 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29236 # is contrary to our usage. Disable this feature.
29237 alias -g '${1+"$@"}'='"$@"'
29238 setopt NO_GLOB_SUBST
29239 else
29240 case `(set -o) 2>/dev/null` in #(
29241 *posix*) :
29242 set -o posix ;; #(
29243 *) :
29244 ;;
29245 esac
29246 fi
29247
29248
29249 as_nl='
29250 '
29251 export as_nl
29252 # Printing a long string crashes Solaris 7 /usr/bin/printf.
29253 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
29254 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
29255 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
29256 # Prefer a ksh shell builtin over an external printf program on Solaris,
29257 # but without wasting forks for bash or zsh.
29258 if test -z "$BASH_VERSION$ZSH_VERSION" \
29259 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
29260 as_echo='print -r --'
29261 as_echo_n='print -rn --'
29262 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
29263 as_echo='printf %s\n'
29264 as_echo_n='printf %s'
29265 else
29266 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
29267 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
29268 as_echo_n='/usr/ucb/echo -n'
29269 else
29270 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
29271 as_echo_n_body='eval
29272 arg=$1;
29273 case $arg in #(
29274 *"$as_nl"*)
29275 expr "X$arg" : "X\\(.*\\)$as_nl";
29276 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
29277 esac;
29278 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
29279 '
29280 export as_echo_n_body
29281 as_echo_n='sh -c $as_echo_n_body as_echo'
29282 fi
29283 export as_echo_body
29284 as_echo='sh -c $as_echo_body as_echo'
29285 fi
29286
29287 # The user is always right.
29288 if test "${PATH_SEPARATOR+set}" != set; then
29289 PATH_SEPARATOR=:
29290 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
29291 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
29292 PATH_SEPARATOR=';'
29293 }
29294 fi
29295
29296
29297 # IFS
29298 # We need space, tab and new line, in precisely that order. Quoting is
29299 # there to prevent editors from complaining about space-tab.
29300 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
29301 # splitting by setting IFS to empty value.)
29302 IFS=" "" $as_nl"
29303
29304 # Find who we are. Look in the path if we contain no directory separator.
29305 as_myself=
29306 case $0 in #((
29307 *[\\/]* ) as_myself=$0 ;;
29308 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29309 for as_dir in $PATH
29310 do
29311 IFS=$as_save_IFS
29312 test -z "$as_dir" && as_dir=.
29313 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
29314 done
29315 IFS=$as_save_IFS
29316
29317 ;;
29318 esac
29319 # We did not find ourselves, most probably we were run as `sh COMMAND'
29320 # in which case we are not to be found in the path.
29321 if test "x$as_myself" = x; then
29322 as_myself=$0
29323 fi
29324 if test ! -f "$as_myself"; then
29325 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
29326 exit 1
29327 fi
29328
29329 # Unset variables that we do not need and which cause bugs (e.g. in
29330 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
29331 # suppresses any "Segmentation fault" message there. '((' could
29332 # trigger a bug in pdksh 5.2.14.
29333 for as_var in BASH_ENV ENV MAIL MAILPATH
29334 do eval test x\${$as_var+set} = xset \
29335 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
29336 done
29337 PS1='$ '
29338 PS2='> '
29339 PS4='+ '
29340
29341 # NLS nuisances.
29342 LC_ALL=C
29343 export LC_ALL
29344 LANGUAGE=C
29345 export LANGUAGE
29346
29347 # CDPATH.
29348 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
29349
29350
29351 # as_fn_error STATUS ERROR [LINENO LOG_FD]
29352 # ----------------------------------------
29353 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
29354 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
29355 # script with STATUS, using 1 if that was 0.
29356 as_fn_error ()
29357 {
29358 as_status=$1; test $as_status -eq 0 && as_status=1
29359 if test "$4"; then
29360 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
29361 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
29362 fi
29363 $as_echo "$as_me: error: $2" >&2
29364 as_fn_exit $as_status
29365 } # as_fn_error
29366
29367
29368 # as_fn_set_status STATUS
29369 # -----------------------
29370 # Set $? to STATUS, without forking.
29371 as_fn_set_status ()
29372 {
29373 return $1
29374 } # as_fn_set_status
29375
29376 # as_fn_exit STATUS
29377 # -----------------
29378 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
29379 as_fn_exit ()
29380 {
29381 set +e
29382 as_fn_set_status $1
29383 exit $1
29384 } # as_fn_exit
29385
29386 # as_fn_unset VAR
29387 # ---------------
29388 # Portably unset VAR.
29389 as_fn_unset ()
29390 {
29391 { eval $1=; unset $1;}
29392 }
29393 as_unset=as_fn_unset
29394 # as_fn_append VAR VALUE
29395 # ----------------------
29396 # Append the text in VALUE to the end of the definition contained in VAR. Take
29397 # advantage of any shell optimizations that allow amortized linear growth over
29398 # repeated appends, instead of the typical quadratic growth present in naive
29399 # implementations.
29400 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
29401 eval 'as_fn_append ()
29402 {
29403 eval $1+=\$2
29404 }'
29405 else
29406 as_fn_append ()
29407 {
29408 eval $1=\$$1\$2
29409 }
29410 fi # as_fn_append
29411
29412 # as_fn_arith ARG...
29413 # ------------------
29414 # Perform arithmetic evaluation on the ARGs, and store the result in the
29415 # global $as_val. Take advantage of shells that can avoid forks. The arguments
29416 # must be portable across $(()) and expr.
29417 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
29418 eval 'as_fn_arith ()
29419 {
29420 as_val=$(( $* ))
29421 }'
29422 else
29423 as_fn_arith ()
29424 {
29425 as_val=`expr "$@" || test $? -eq 1`
29426 }
29427 fi # as_fn_arith
29428
29429
29430 if expr a : '\(a\)' >/dev/null 2>&1 &&
29431 test "X`expr 00001 : '.*\(...\)'`" = X001; then
29432 as_expr=expr
29433 else
29434 as_expr=false
29435 fi
29436
29437 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
29438 as_basename=basename
29439 else
29440 as_basename=false
29441 fi
29442
29443 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
29444 as_dirname=dirname
29445 else
29446 as_dirname=false
29447 fi
29448
29449 as_me=`$as_basename -- "$0" ||
29450 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
29451 X"$0" : 'X\(//\)$' \| \
29452 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
29453 $as_echo X/"$0" |
29454 sed '/^.*\/\([^/][^/]*\)\/*$/{
29455 s//\1/
29456 q
29457 }
29458 /^X\/\(\/\/\)$/{
29459 s//\1/
29460 q
29461 }
29462 /^X\/\(\/\).*/{
29463 s//\1/
29464 q
29465 }
29466 s/.*/./; q'`
29467
29468 # Avoid depending upon Character Ranges.
29469 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
29470 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
29471 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
29472 as_cr_digits='0123456789'
29473 as_cr_alnum=$as_cr_Letters$as_cr_digits
29474
29475 ECHO_C= ECHO_N= ECHO_T=
29476 case `echo -n x` in #(((((
29477 -n*)
29478 case `echo 'xy\c'` in
29479 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
29480 xy) ECHO_C='\c';;
29481 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
29482 ECHO_T=' ';;
29483 esac;;
29484 *)
29485 ECHO_N='-n';;
29486 esac
29487
29488 rm -f conf$$ conf$$.exe conf$$.file
29489 if test -d conf$$.dir; then
29490 rm -f conf$$.dir/conf$$.file
29491 else
29492 rm -f conf$$.dir
29493 mkdir conf$$.dir 2>/dev/null
29494 fi
29495 if (echo >conf$$.file) 2>/dev/null; then
29496 if ln -s conf$$.file conf$$ 2>/dev/null; then
29497 as_ln_s='ln -s'
29498 # ... but there are two gotchas:
29499 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
29500 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
29501 # In both cases, we have to default to `cp -pR'.
29502 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
29503 as_ln_s='cp -pR'
29504 elif ln conf$$.file conf$$ 2>/dev/null; then
29505 as_ln_s=ln
29506 else
29507 as_ln_s='cp -pR'
29508 fi
29509 else
29510 as_ln_s='cp -pR'
29511 fi
29512 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
29513 rmdir conf$$.dir 2>/dev/null
29514
29515
29516 # as_fn_mkdir_p
29517 # -------------
29518 # Create "$as_dir" as a directory, including parents if necessary.
29519 as_fn_mkdir_p ()
29520 {
29521
29522 case $as_dir in #(
29523 -*) as_dir=./$as_dir;;
29524 esac
29525 test -d "$as_dir" || eval $as_mkdir_p || {
29526 as_dirs=
29527 while :; do
29528 case $as_dir in #(
29529 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
29530 *) as_qdir=$as_dir;;
29531 esac
29532 as_dirs="'$as_qdir' $as_dirs"
29533 as_dir=`$as_dirname -- "$as_dir" ||
29534 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29535 X"$as_dir" : 'X\(//\)[^/]' \| \
29536 X"$as_dir" : 'X\(//\)$' \| \
29537 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
29538 $as_echo X"$as_dir" |
29539 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
29540 s//\1/
29541 q
29542 }
29543 /^X\(\/\/\)[^/].*/{
29544 s//\1/
29545 q
29546 }
29547 /^X\(\/\/\)$/{
29548 s//\1/
29549 q
29550 }
29551 /^X\(\/\).*/{
29552 s//\1/
29553 q
29554 }
29555 s/.*/./; q'`
29556 test -d "$as_dir" && break
29557 done
29558 test -z "$as_dirs" || eval "mkdir $as_dirs"
29559 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
29560
29561
29562 } # as_fn_mkdir_p
29563 if mkdir -p . 2>/dev/null; then
29564 as_mkdir_p='mkdir -p "$as_dir"'
29565 else
29566 test -d ./-p && rmdir ./-p
29567 as_mkdir_p=false
29568 fi
29569
29570
29571 # as_fn_executable_p FILE
29572 # -----------------------
29573 # Test if FILE is an executable regular file.
29574 as_fn_executable_p ()
29575 {
29576 test -f "$1" && test -x "$1"
29577 } # as_fn_executable_p
29578 as_test_x='test -x'
29579 as_executable_p=as_fn_executable_p
29580
29581 # Sed expression to map a string onto a valid CPP name.
29582 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
29583
29584 # Sed expression to map a string onto a valid variable name.
29585 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
29586
29587
29588 exec 6>&1
29589 ## ----------------------------------- ##
29590 ## Main body of $CONFIG_STATUS script. ##
29591 ## ----------------------------------- ##
29592 _ASEOF
29593 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
29594
29595 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29596 # Save the log message, to keep $0 and so on meaningful, and to
29597 # report actual input values of CONFIG_FILES etc. instead of their
29598 # values after options handling.
29599 ac_log="
29600 This file was extended by libgnu $as_me UNUSED-VERSION, which was
29601 generated by GNU Autoconf 2.69. Invocation command line was
29602
29603 CONFIG_FILES = $CONFIG_FILES
29604 CONFIG_HEADERS = $CONFIG_HEADERS
29605 CONFIG_LINKS = $CONFIG_LINKS
29606 CONFIG_COMMANDS = $CONFIG_COMMANDS
29607 $ $0 $@
29608
29609 on `(hostname || uname -n) 2>/dev/null | sed 1q`
29610 "
29611
29612 _ACEOF
29613
29614 case $ac_config_files in *"
29615 "*) set x $ac_config_files; shift; ac_config_files=$*;;
29616 esac
29617
29618 case $ac_config_headers in *"
29619 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
29620 esac
29621
29622
29623 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29624 # Files that config.status was made for.
29625 config_files="$ac_config_files"
29626 config_headers="$ac_config_headers"
29627 config_commands="$ac_config_commands"
29628
29629 _ACEOF
29630
29631 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29632 ac_cs_usage="\
29633 \`$as_me' instantiates files and other configuration actions
29634 from templates according to the current configuration. Unless the files
29635 and actions are specified as TAGs, all are instantiated by default.
29636
29637 Usage: $0 [OPTION]... [TAG]...
29638
29639 -h, --help print this help, then exit
29640 -V, --version print version number and configuration settings, then exit
29641 --config print configuration, then exit
29642 -q, --quiet, --silent
29643 do not print progress messages
29644 -d, --debug don't remove temporary files
29645 --recheck update $as_me by reconfiguring in the same conditions
29646 --file=FILE[:TEMPLATE]
29647 instantiate the configuration file FILE
29648 --header=FILE[:TEMPLATE]
29649 instantiate the configuration header FILE
29650
29651 Configuration files:
29652 $config_files
29653
29654 Configuration headers:
29655 $config_headers
29656
29657 Configuration commands:
29658 $config_commands
29659
29660 Report bugs to the package provider."
29661
29662 _ACEOF
29663 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29664 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
29665 ac_cs_version="\\
29666 libgnu config.status UNUSED-VERSION
29667 configured by $0, generated by GNU Autoconf 2.69,
29668 with options \\"\$ac_cs_config\\"
29669
29670 Copyright (C) 2012 Free Software Foundation, Inc.
29671 This config.status script is free software; the Free Software Foundation
29672 gives unlimited permission to copy, distribute and modify it."
29673
29674 ac_pwd='$ac_pwd'
29675 srcdir='$srcdir'
29676 INSTALL='$INSTALL'
29677 MKDIR_P='$MKDIR_P'
29678 AWK='$AWK'
29679 test -n "\$AWK" || AWK=awk
29680 _ACEOF
29681
29682 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29683 # The default lists apply if the user does not specify any file.
29684 ac_need_defaults=:
29685 while test $# != 0
29686 do
29687 case $1 in
29688 --*=?*)
29689 ac_option=`expr "X$1" : 'X\([^=]*\)='`
29690 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
29691 ac_shift=:
29692 ;;
29693 --*=)
29694 ac_option=`expr "X$1" : 'X\([^=]*\)='`
29695 ac_optarg=
29696 ac_shift=:
29697 ;;
29698 *)
29699 ac_option=$1
29700 ac_optarg=$2
29701 ac_shift=shift
29702 ;;
29703 esac
29704
29705 case $ac_option in
29706 # Handling of the options.
29707 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
29708 ac_cs_recheck=: ;;
29709 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
29710 $as_echo "$ac_cs_version"; exit ;;
29711 --config | --confi | --conf | --con | --co | --c )
29712 $as_echo "$ac_cs_config"; exit ;;
29713 --debug | --debu | --deb | --de | --d | -d )
29714 debug=: ;;
29715 --file | --fil | --fi | --f )
29716 $ac_shift
29717 case $ac_optarg in
29718 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
29719 '') as_fn_error $? "missing file argument" ;;
29720 esac
29721 as_fn_append CONFIG_FILES " '$ac_optarg'"
29722 ac_need_defaults=false;;
29723 --header | --heade | --head | --hea )
29724 $ac_shift
29725 case $ac_optarg in
29726 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
29727 esac
29728 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
29729 ac_need_defaults=false;;
29730 --he | --h)
29731 # Conflict between --help and --header
29732 as_fn_error $? "ambiguous option: \`$1'
29733 Try \`$0 --help' for more information.";;
29734 --help | --hel | -h )
29735 $as_echo "$ac_cs_usage"; exit ;;
29736 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
29737 | -silent | --silent | --silen | --sile | --sil | --si | --s)
29738 ac_cs_silent=: ;;
29739
29740 # This is an error.
29741 -*) as_fn_error $? "unrecognized option: \`$1'
29742 Try \`$0 --help' for more information." ;;
29743
29744 *) as_fn_append ac_config_targets " $1"
29745 ac_need_defaults=false ;;
29746
29747 esac
29748 shift
29749 done
29750
29751 ac_configure_extra_args=
29752
29753 if $ac_cs_silent; then
29754 exec 6>/dev/null
29755 ac_configure_extra_args="$ac_configure_extra_args --silent"
29756 fi
29757
29758 _ACEOF
29759 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29760 if \$ac_cs_recheck; then
29761 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
29762 shift
29763 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
29764 CONFIG_SHELL='$SHELL'
29765 export CONFIG_SHELL
29766 exec "\$@"
29767 fi
29768
29769 _ACEOF
29770 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29771 exec 5>>config.log
29772 {
29773 echo
29774 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
29775 ## Running $as_me. ##
29776 _ASBOX
29777 $as_echo "$ac_log"
29778 } >&5
29779
29780 _ACEOF
29781 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29782 #
29783 # INIT-COMMANDS
29784 #
29785 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
29786
29787 _ACEOF
29788
29789 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29790
29791 # Handling of arguments.
29792 for ac_config_target in $ac_config_targets
29793 do
29794 case $ac_config_target in
29795 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
29796 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
29797 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
29798 "import/Makefile") CONFIG_FILES="$CONFIG_FILES import/Makefile" ;;
29799 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
29800
29801 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
29802 esac
29803 done
29804
29805
29806 # If the user did not use the arguments to specify the items to instantiate,
29807 # then the envvar interface is used. Set only those that are not.
29808 # We use the long form for the default assignment because of an extremely
29809 # bizarre bug on SunOS 4.1.3.
29810 if $ac_need_defaults; then
29811 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
29812 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
29813 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
29814 fi
29815
29816 # Have a temporary directory for convenience. Make it in the build tree
29817 # simply because there is no reason against having it here, and in addition,
29818 # creating and moving files from /tmp can sometimes cause problems.
29819 # Hook for its removal unless debugging.
29820 # Note that there is a small window in which the directory will not be cleaned:
29821 # after its creation but before its name has been assigned to `$tmp'.
29822 $debug ||
29823 {
29824 tmp= ac_tmp=
29825 trap 'exit_status=$?
29826 : "${ac_tmp:=$tmp}"
29827 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
29828 ' 0
29829 trap 'as_fn_exit 1' 1 2 13 15
29830 }
29831 # Create a (secure) tmp directory for tmp files.
29832
29833 {
29834 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
29835 test -d "$tmp"
29836 } ||
29837 {
29838 tmp=./conf$$-$RANDOM
29839 (umask 077 && mkdir "$tmp")
29840 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
29841 ac_tmp=$tmp
29842
29843 # Set up the scripts for CONFIG_FILES section.
29844 # No need to generate them if there are no CONFIG_FILES.
29845 # This happens for instance with `./config.status config.h'.
29846 if test -n "$CONFIG_FILES"; then
29847
29848
29849 ac_cr=`echo X | tr X '\015'`
29850 # On cygwin, bash can eat \r inside `` if the user requested igncr.
29851 # But we know of no other shell where ac_cr would be empty at this
29852 # point, so we can use a bashism as a fallback.
29853 if test "x$ac_cr" = x; then
29854 eval ac_cr=\$\'\\r\'
29855 fi
29856 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
29857 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
29858 ac_cs_awk_cr='\\r'
29859 else
29860 ac_cs_awk_cr=$ac_cr
29861 fi
29862
29863 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
29864 _ACEOF
29865
29866
29867 {
29868 echo "cat >conf$$subs.awk <<_ACEOF" &&
29869 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
29870 echo "_ACEOF"
29871 } >conf$$subs.sh ||
29872 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
29873 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
29874 ac_delim='%!_!# '
29875 for ac_last_try in false false false false false :; do
29876 . ./conf$$subs.sh ||
29877 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
29878
29879 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
29880 if test $ac_delim_n = $ac_delim_num; then
29881 break
29882 elif $ac_last_try; then
29883 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
29884 else
29885 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
29886 fi
29887 done
29888 rm -f conf$$subs.sh
29889
29890 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29891 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
29892 _ACEOF
29893 sed -n '
29894 h
29895 s/^/S["/; s/!.*/"]=/
29896 p
29897 g
29898 s/^[^!]*!//
29899 :repl
29900 t repl
29901 s/'"$ac_delim"'$//
29902 t delim
29903 :nl
29904 h
29905 s/\(.\{148\}\)..*/\1/
29906 t more1
29907 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
29908 p
29909 n
29910 b repl
29911 :more1
29912 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
29913 p
29914 g
29915 s/.\{148\}//
29916 t nl
29917 :delim
29918 h
29919 s/\(.\{148\}\)..*/\1/
29920 t more2
29921 s/["\\]/\\&/g; s/^/"/; s/$/"/
29922 p
29923 b
29924 :more2
29925 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
29926 p
29927 g
29928 s/.\{148\}//
29929 t delim
29930 ' <conf$$subs.awk | sed '
29931 /^[^""]/{
29932 N
29933 s/\n//
29934 }
29935 ' >>$CONFIG_STATUS || ac_write_fail=1
29936 rm -f conf$$subs.awk
29937 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29938 _ACAWK
29939 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
29940 for (key in S) S_is_set[key] = 1
29941 FS = "\a"
29942
29943 }
29944 {
29945 line = $ 0
29946 nfields = split(line, field, "@")
29947 substed = 0
29948 len = length(field[1])
29949 for (i = 2; i < nfields; i++) {
29950 key = field[i]
29951 keylen = length(key)
29952 if (S_is_set[key]) {
29953 value = S[key]
29954 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
29955 len += length(value) + length(field[++i])
29956 substed = 1
29957 } else
29958 len += 1 + keylen
29959 }
29960
29961 print line
29962 }
29963
29964 _ACAWK
29965 _ACEOF
29966 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29967 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
29968 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
29969 else
29970 cat
29971 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
29972 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
29973 _ACEOF
29974
29975 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
29976 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
29977 # trailing colons and then remove the whole line if VPATH becomes empty
29978 # (actually we leave an empty line to preserve line numbers).
29979 if test "x$srcdir" = x.; then
29980 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
29981 h
29982 s///
29983 s/^/:/
29984 s/[ ]*$/:/
29985 s/:\$(srcdir):/:/g
29986 s/:\${srcdir}:/:/g
29987 s/:@srcdir@:/:/g
29988 s/^:*//
29989 s/:*$//
29990 x
29991 s/\(=[ ]*\).*/\1/
29992 G
29993 s/\n//
29994 s/^[^=]*=[ ]*$//
29995 }'
29996 fi
29997
29998 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29999 fi # test -n "$CONFIG_FILES"
30000
30001 # Set up the scripts for CONFIG_HEADERS section.
30002 # No need to generate them if there are no CONFIG_HEADERS.
30003 # This happens for instance with `./config.status Makefile'.
30004 if test -n "$CONFIG_HEADERS"; then
30005 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
30006 BEGIN {
30007 _ACEOF
30008
30009 # Transform confdefs.h into an awk script `defines.awk', embedded as
30010 # here-document in config.status, that substitutes the proper values into
30011 # config.h.in to produce config.h.
30012
30013 # Create a delimiter string that does not exist in confdefs.h, to ease
30014 # handling of long lines.
30015 ac_delim='%!_!# '
30016 for ac_last_try in false false :; do
30017 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
30018 if test -z "$ac_tt"; then
30019 break
30020 elif $ac_last_try; then
30021 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
30022 else
30023 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
30024 fi
30025 done
30026
30027 # For the awk script, D is an array of macro values keyed by name,
30028 # likewise P contains macro parameters if any. Preserve backslash
30029 # newline sequences.
30030
30031 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
30032 sed -n '
30033 s/.\{148\}/&'"$ac_delim"'/g
30034 t rset
30035 :rset
30036 s/^[ ]*#[ ]*define[ ][ ]*/ /
30037 t def
30038 d
30039 :def
30040 s/\\$//
30041 t bsnl
30042 s/["\\]/\\&/g
30043 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
30044 D["\1"]=" \3"/p
30045 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
30046 d
30047 :bsnl
30048 s/["\\]/\\&/g
30049 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
30050 D["\1"]=" \3\\\\\\n"\\/p
30051 t cont
30052 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
30053 t cont
30054 d
30055 :cont
30056 n
30057 s/.\{148\}/&'"$ac_delim"'/g
30058 t clear
30059 :clear
30060 s/\\$//
30061 t bsnlc
30062 s/["\\]/\\&/g; s/^/"/; s/$/"/p
30063 d
30064 :bsnlc
30065 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
30066 b cont
30067 ' <confdefs.h | sed '
30068 s/'"$ac_delim"'/"\\\
30069 "/g' >>$CONFIG_STATUS || ac_write_fail=1
30070
30071 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30072 for (key in D) D_is_set[key] = 1
30073 FS = "\a"
30074 }
30075 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
30076 line = \$ 0
30077 split(line, arg, " ")
30078 if (arg[1] == "#") {
30079 defundef = arg[2]
30080 mac1 = arg[3]
30081 } else {
30082 defundef = substr(arg[1], 2)
30083 mac1 = arg[2]
30084 }
30085 split(mac1, mac2, "(") #)
30086 macro = mac2[1]
30087 prefix = substr(line, 1, index(line, defundef) - 1)
30088 if (D_is_set[macro]) {
30089 # Preserve the white space surrounding the "#".
30090 print prefix "define", macro P[macro] D[macro]
30091 next
30092 } else {
30093 # Replace #undef with comments. This is necessary, for example,
30094 # in the case of _POSIX_SOURCE, which is predefined and required
30095 # on some systems where configure will not decide to define it.
30096 if (defundef == "undef") {
30097 print "/*", prefix defundef, macro, "*/"
30098 next
30099 }
30100 }
30101 }
30102 { print }
30103 _ACAWK
30104 _ACEOF
30105 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30106 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
30107 fi # test -n "$CONFIG_HEADERS"
30108
30109
30110 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
30111 shift
30112 for ac_tag
30113 do
30114 case $ac_tag in
30115 :[FHLC]) ac_mode=$ac_tag; continue;;
30116 esac
30117 case $ac_mode$ac_tag in
30118 :[FHL]*:*);;
30119 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
30120 :[FH]-) ac_tag=-:-;;
30121 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
30122 esac
30123 ac_save_IFS=$IFS
30124 IFS=:
30125 set x $ac_tag
30126 IFS=$ac_save_IFS
30127 shift
30128 ac_file=$1
30129 shift
30130
30131 case $ac_mode in
30132 :L) ac_source=$1;;
30133 :[FH])
30134 ac_file_inputs=
30135 for ac_f
30136 do
30137 case $ac_f in
30138 -) ac_f="$ac_tmp/stdin";;
30139 *) # Look for the file first in the build tree, then in the source tree
30140 # (if the path is not absolute). The absolute path cannot be DOS-style,
30141 # because $ac_f cannot contain `:'.
30142 test -f "$ac_f" ||
30143 case $ac_f in
30144 [\\/$]*) false;;
30145 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
30146 esac ||
30147 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
30148 esac
30149 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
30150 as_fn_append ac_file_inputs " '$ac_f'"
30151 done
30152
30153 # Let's still pretend it is `configure' which instantiates (i.e., don't
30154 # use $as_me), people would be surprised to read:
30155 # /* config.h. Generated by config.status. */
30156 configure_input='Generated from '`
30157 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
30158 `' by configure.'
30159 if test x"$ac_file" != x-; then
30160 configure_input="$ac_file. $configure_input"
30161 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
30162 $as_echo "$as_me: creating $ac_file" >&6;}
30163 fi
30164 # Neutralize special characters interpreted by sed in replacement strings.
30165 case $configure_input in #(
30166 *\&* | *\|* | *\\* )
30167 ac_sed_conf_input=`$as_echo "$configure_input" |
30168 sed 's/[\\\\&|]/\\\\&/g'`;; #(
30169 *) ac_sed_conf_input=$configure_input;;
30170 esac
30171
30172 case $ac_tag in
30173 *:-:* | *:-) cat >"$ac_tmp/stdin" \
30174 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
30175 esac
30176 ;;
30177 esac
30178
30179 ac_dir=`$as_dirname -- "$ac_file" ||
30180 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30181 X"$ac_file" : 'X\(//\)[^/]' \| \
30182 X"$ac_file" : 'X\(//\)$' \| \
30183 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
30184 $as_echo X"$ac_file" |
30185 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30186 s//\1/
30187 q
30188 }
30189 /^X\(\/\/\)[^/].*/{
30190 s//\1/
30191 q
30192 }
30193 /^X\(\/\/\)$/{
30194 s//\1/
30195 q
30196 }
30197 /^X\(\/\).*/{
30198 s//\1/
30199 q
30200 }
30201 s/.*/./; q'`
30202 as_dir="$ac_dir"; as_fn_mkdir_p
30203 ac_builddir=.
30204
30205 case "$ac_dir" in
30206 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
30207 *)
30208 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
30209 # A ".." for each directory in $ac_dir_suffix.
30210 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
30211 case $ac_top_builddir_sub in
30212 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
30213 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
30214 esac ;;
30215 esac
30216 ac_abs_top_builddir=$ac_pwd
30217 ac_abs_builddir=$ac_pwd$ac_dir_suffix
30218 # for backward compatibility:
30219 ac_top_builddir=$ac_top_build_prefix
30220
30221 case $srcdir in
30222 .) # We are building in place.
30223 ac_srcdir=.
30224 ac_top_srcdir=$ac_top_builddir_sub
30225 ac_abs_top_srcdir=$ac_pwd ;;
30226 [\\/]* | ?:[\\/]* ) # Absolute name.
30227 ac_srcdir=$srcdir$ac_dir_suffix;
30228 ac_top_srcdir=$srcdir
30229 ac_abs_top_srcdir=$srcdir ;;
30230 *) # Relative name.
30231 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
30232 ac_top_srcdir=$ac_top_build_prefix$srcdir
30233 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
30234 esac
30235 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
30236
30237
30238 case $ac_mode in
30239 :F)
30240 #
30241 # CONFIG_FILE
30242 #
30243
30244 case $INSTALL in
30245 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
30246 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
30247 esac
30248 ac_MKDIR_P=$MKDIR_P
30249 case $MKDIR_P in
30250 [\\/$]* | ?:[\\/]* ) ;;
30251 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
30252 esac
30253 _ACEOF
30254
30255 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30256 # If the template does not know about datarootdir, expand it.
30257 # FIXME: This hack should be removed a few years after 2.60.
30258 ac_datarootdir_hack=; ac_datarootdir_seen=
30259 ac_sed_dataroot='
30260 /datarootdir/ {
30261 p
30262 q
30263 }
30264 /@datadir@/p
30265 /@docdir@/p
30266 /@infodir@/p
30267 /@localedir@/p
30268 /@mandir@/p'
30269 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
30270 *datarootdir*) ac_datarootdir_seen=yes;;
30271 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
30272 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
30273 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
30274 _ACEOF
30275 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30276 ac_datarootdir_hack='
30277 s&@datadir@&$datadir&g
30278 s&@docdir@&$docdir&g
30279 s&@infodir@&$infodir&g
30280 s&@localedir@&$localedir&g
30281 s&@mandir@&$mandir&g
30282 s&\\\${datarootdir}&$datarootdir&g' ;;
30283 esac
30284 _ACEOF
30285
30286 # Neutralize VPATH when `$srcdir' = `.'.
30287 # Shell code in configure.ac might set extrasub.
30288 # FIXME: do we really want to maintain this feature?
30289 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30290 ac_sed_extra="$ac_vpsub
30291 $extrasub
30292 _ACEOF
30293 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30294 :t
30295 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
30296 s|@configure_input@|$ac_sed_conf_input|;t t
30297 s&@top_builddir@&$ac_top_builddir_sub&;t t
30298 s&@top_build_prefix@&$ac_top_build_prefix&;t t
30299 s&@srcdir@&$ac_srcdir&;t t
30300 s&@abs_srcdir@&$ac_abs_srcdir&;t t
30301 s&@top_srcdir@&$ac_top_srcdir&;t t
30302 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
30303 s&@builddir@&$ac_builddir&;t t
30304 s&@abs_builddir@&$ac_abs_builddir&;t t
30305 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
30306 s&@INSTALL@&$ac_INSTALL&;t t
30307 s&@MKDIR_P@&$ac_MKDIR_P&;t t
30308 $ac_datarootdir_hack
30309 "
30310 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
30311 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
30312
30313 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
30314 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
30315 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
30316 "$ac_tmp/out"`; test -z "$ac_out"; } &&
30317 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
30318 which seems to be undefined. Please make sure it is defined" >&5
30319 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
30320 which seems to be undefined. Please make sure it is defined" >&2;}
30321
30322 rm -f "$ac_tmp/stdin"
30323 case $ac_file in
30324 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
30325 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
30326 esac \
30327 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
30328 ;;
30329 :H)
30330 #
30331 # CONFIG_HEADER
30332 #
30333 if test x"$ac_file" != x-; then
30334 {
30335 $as_echo "/* $configure_input */" \
30336 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
30337 } >"$ac_tmp/config.h" \
30338 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
30339 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
30340 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
30341 $as_echo "$as_me: $ac_file is unchanged" >&6;}
30342 else
30343 rm -f "$ac_file"
30344 mv "$ac_tmp/config.h" "$ac_file" \
30345 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
30346 fi
30347 else
30348 $as_echo "/* $configure_input */" \
30349 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
30350 || as_fn_error $? "could not create -" "$LINENO" 5
30351 fi
30352 # Compute "$ac_file"'s index in $config_headers.
30353 _am_arg="$ac_file"
30354 _am_stamp_count=1
30355 for _am_header in $config_headers :; do
30356 case $_am_header in
30357 $_am_arg | $_am_arg:* )
30358 break ;;
30359 * )
30360 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
30361 esac
30362 done
30363 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
30364 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30365 X"$_am_arg" : 'X\(//\)[^/]' \| \
30366 X"$_am_arg" : 'X\(//\)$' \| \
30367 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
30368 $as_echo X"$_am_arg" |
30369 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30370 s//\1/
30371 q
30372 }
30373 /^X\(\/\/\)[^/].*/{
30374 s//\1/
30375 q
30376 }
30377 /^X\(\/\/\)$/{
30378 s//\1/
30379 q
30380 }
30381 /^X\(\/\).*/{
30382 s//\1/
30383 q
30384 }
30385 s/.*/./; q'`/stamp-h$_am_stamp_count
30386 ;;
30387
30388 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
30389 $as_echo "$as_me: executing $ac_file commands" >&6;}
30390 ;;
30391 esac
30392
30393
30394 case $ac_file$ac_mode in
30395 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
30396 # Older Autoconf quotes --file arguments for eval, but not when files
30397 # are listed without --file. Let's play safe and only enable the eval
30398 # if we detect the quoting.
30399 case $CONFIG_FILES in
30400 *\'*) eval set x "$CONFIG_FILES" ;;
30401 *) set x $CONFIG_FILES ;;
30402 esac
30403 shift
30404 for mf
30405 do
30406 # Strip MF so we end up with the name of the file.
30407 mf=`echo "$mf" | sed -e 's/:.*$//'`
30408 # Check whether this is an Automake generated Makefile or not.
30409 # We used to match only the files named 'Makefile.in', but
30410 # some people rename them; so instead we look at the file content.
30411 # Grep'ing the first line is not enough: some people post-process
30412 # each Makefile.in and add a new line on top of each file to say so.
30413 # Grep'ing the whole file is not good either: AIX grep has a line
30414 # limit of 2048, but all sed's we know have understand at least 4000.
30415 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
30416 dirpart=`$as_dirname -- "$mf" ||
30417 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30418 X"$mf" : 'X\(//\)[^/]' \| \
30419 X"$mf" : 'X\(//\)$' \| \
30420 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
30421 $as_echo X"$mf" |
30422 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30423 s//\1/
30424 q
30425 }
30426 /^X\(\/\/\)[^/].*/{
30427 s//\1/
30428 q
30429 }
30430 /^X\(\/\/\)$/{
30431 s//\1/
30432 q
30433 }
30434 /^X\(\/\).*/{
30435 s//\1/
30436 q
30437 }
30438 s/.*/./; q'`
30439 else
30440 continue
30441 fi
30442 # Extract the definition of DEPDIR, am__include, and am__quote
30443 # from the Makefile without running 'make'.
30444 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
30445 test -z "$DEPDIR" && continue
30446 am__include=`sed -n 's/^am__include = //p' < "$mf"`
30447 test -z "$am__include" && continue
30448 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
30449 # Find all dependency output files, they are included files with
30450 # $(DEPDIR) in their names. We invoke sed twice because it is the
30451 # simplest approach to changing $(DEPDIR) to its actual value in the
30452 # expansion.
30453 for file in `sed -n "
30454 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
30455 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
30456 # Make sure the directory exists.
30457 test -f "$dirpart/$file" && continue
30458 fdir=`$as_dirname -- "$file" ||
30459 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30460 X"$file" : 'X\(//\)[^/]' \| \
30461 X"$file" : 'X\(//\)$' \| \
30462 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
30463 $as_echo X"$file" |
30464 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30465 s//\1/
30466 q
30467 }
30468 /^X\(\/\/\)[^/].*/{
30469 s//\1/
30470 q
30471 }
30472 /^X\(\/\/\)$/{
30473 s//\1/
30474 q
30475 }
30476 /^X\(\/\).*/{
30477 s//\1/
30478 q
30479 }
30480 s/.*/./; q'`
30481 as_dir=$dirpart/$fdir; as_fn_mkdir_p
30482 # echo "creating $dirpart/$file"
30483 echo '# dummy' > "$dirpart/$file"
30484 done
30485 done
30486 }
30487 ;;
30488 "default":C)
30489 case x$CONFIG_HEADERS in
30490 xconfig.h:config.in)
30491 echo > stamp-h ;;
30492 esac
30493 ;;
30494
30495 esac
30496 done # for ac_tag
30497
30498
30499 as_fn_exit 0
30500 _ACEOF
30501 ac_clean_files=$ac_clean_files_save
30502
30503 test $ac_write_fail = 0 ||
30504 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
30505
30506
30507 # configure is writing to config.log, and then calls config.status.
30508 # config.status does its own redirection, appending to config.log.
30509 # Unfortunately, on DOS this fails, as config.log is still kept open
30510 # by configure, so config.status won't be able to write to it; its
30511 # output is simply discarded. So we exec the FD to /dev/null,
30512 # effectively closing config.log, so it can be properly (re)opened and
30513 # appended to by config.status. When coming back to configure, we
30514 # need to make the FD available again.
30515 if test "$no_create" != yes; then
30516 ac_cs_success=:
30517 ac_config_status_args=
30518 test "$silent" = yes &&
30519 ac_config_status_args="$ac_config_status_args --quiet"
30520 exec 5>/dev/null
30521 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
30522 exec 5>>config.log
30523 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
30524 # would make configure fail if this is the last instruction.
30525 $ac_cs_success || as_fn_exit 1
30526 fi
30527 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
30528 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
30529 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
30530 fi
30531
30532
30533 exit 0
This page took 0.665054 seconds and 3 git commands to generate.