Import the strerror_r-posix module and use it in GDB.
[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 pipe"
3568 gl_func_list="$gl_func_list iswcntrl"
3569 # Check that the precious variables saved in the cache have kept the same
3570 # value.
3571 ac_cache_corrupted=false
3572 for ac_var in $ac_precious_vars; do
3573 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3574 eval ac_new_set=\$ac_env_${ac_var}_set
3575 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3576 eval ac_new_val=\$ac_env_${ac_var}_value
3577 case $ac_old_set,$ac_new_set in
3578 set,)
3579 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3580 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3581 ac_cache_corrupted=: ;;
3582 ,set)
3583 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3584 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3585 ac_cache_corrupted=: ;;
3586 ,);;
3587 *)
3588 if test "x$ac_old_val" != "x$ac_new_val"; then
3589 # differences in whitespace do not lead to failure.
3590 ac_old_val_w=`echo x $ac_old_val`
3591 ac_new_val_w=`echo x $ac_new_val`
3592 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3593 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3594 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3595 ac_cache_corrupted=:
3596 else
3597 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3598 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3599 eval $ac_var=\$ac_old_val
3600 fi
3601 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3602 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3603 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3604 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
3605 fi;;
3606 esac
3607 # Pass precious variables to config.status.
3608 if test "$ac_new_set" = set; then
3609 case $ac_new_val in
3610 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3611 *) ac_arg=$ac_var=$ac_new_val ;;
3612 esac
3613 case " $ac_configure_args " in
3614 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3615 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3616 esac
3617 fi
3618 done
3619 if $ac_cache_corrupted; then
3620 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3621 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3622 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3623 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3624 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3625 fi
3626 ## -------------------- ##
3627 ## Main body of script. ##
3628 ## -------------------- ##
3629
3630 ac_ext=c
3631 ac_cpp='$CPP $CPPFLAGS'
3632 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3633 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3634 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3635
3636
3637
3638
3639
3640
3641 ac_config_headers="$ac_config_headers config.h:config.in"
3642
3643
3644
3645
3646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
3647 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
3648 # Check whether --enable-maintainer-mode was given.
3649 if test "${enable_maintainer_mode+set}" = set; then :
3650 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
3651 else
3652 USE_MAINTAINER_MODE=no
3653 fi
3654
3655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
3656 $as_echo "$USE_MAINTAINER_MODE" >&6; }
3657 if test $USE_MAINTAINER_MODE = yes; then
3658 MAINTAINER_MODE_TRUE=
3659 MAINTAINER_MODE_FALSE='#'
3660 else
3661 MAINTAINER_MODE_TRUE='#'
3662 MAINTAINER_MODE_FALSE=
3663 fi
3664
3665 MAINT=$MAINTAINER_MODE_TRUE
3666
3667
3668
3669 ac_ext=c
3670 ac_cpp='$CPP $CPPFLAGS'
3671 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3672 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3673 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3674 if test -n "$ac_tool_prefix"; then
3675 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3676 set dummy ${ac_tool_prefix}gcc; ac_word=$2
3677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3678 $as_echo_n "checking for $ac_word... " >&6; }
3679 if ${ac_cv_prog_CC+:} false; then :
3680 $as_echo_n "(cached) " >&6
3681 else
3682 if test -n "$CC"; then
3683 ac_cv_prog_CC="$CC" # Let the user override the test.
3684 else
3685 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3686 for as_dir in $PATH
3687 do
3688 IFS=$as_save_IFS
3689 test -z "$as_dir" && as_dir=.
3690 for ac_exec_ext in '' $ac_executable_extensions; do
3691 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3692 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3693 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3694 break 2
3695 fi
3696 done
3697 done
3698 IFS=$as_save_IFS
3699
3700 fi
3701 fi
3702 CC=$ac_cv_prog_CC
3703 if test -n "$CC"; then
3704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3705 $as_echo "$CC" >&6; }
3706 else
3707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3708 $as_echo "no" >&6; }
3709 fi
3710
3711
3712 fi
3713 if test -z "$ac_cv_prog_CC"; then
3714 ac_ct_CC=$CC
3715 # Extract the first word of "gcc", so it can be a program name with args.
3716 set dummy gcc; ac_word=$2
3717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3718 $as_echo_n "checking for $ac_word... " >&6; }
3719 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3720 $as_echo_n "(cached) " >&6
3721 else
3722 if test -n "$ac_ct_CC"; then
3723 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3724 else
3725 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3726 for as_dir in $PATH
3727 do
3728 IFS=$as_save_IFS
3729 test -z "$as_dir" && as_dir=.
3730 for ac_exec_ext in '' $ac_executable_extensions; do
3731 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3732 ac_cv_prog_ac_ct_CC="gcc"
3733 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3734 break 2
3735 fi
3736 done
3737 done
3738 IFS=$as_save_IFS
3739
3740 fi
3741 fi
3742 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3743 if test -n "$ac_ct_CC"; then
3744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3745 $as_echo "$ac_ct_CC" >&6; }
3746 else
3747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3748 $as_echo "no" >&6; }
3749 fi
3750
3751 if test "x$ac_ct_CC" = x; then
3752 CC=""
3753 else
3754 case $cross_compiling:$ac_tool_warned in
3755 yes:)
3756 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3757 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3758 ac_tool_warned=yes ;;
3759 esac
3760 CC=$ac_ct_CC
3761 fi
3762 else
3763 CC="$ac_cv_prog_CC"
3764 fi
3765
3766 if test -z "$CC"; then
3767 if test -n "$ac_tool_prefix"; then
3768 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3769 set dummy ${ac_tool_prefix}cc; ac_word=$2
3770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3771 $as_echo_n "checking for $ac_word... " >&6; }
3772 if ${ac_cv_prog_CC+:} false; then :
3773 $as_echo_n "(cached) " >&6
3774 else
3775 if test -n "$CC"; then
3776 ac_cv_prog_CC="$CC" # Let the user override the test.
3777 else
3778 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3779 for as_dir in $PATH
3780 do
3781 IFS=$as_save_IFS
3782 test -z "$as_dir" && as_dir=.
3783 for ac_exec_ext in '' $ac_executable_extensions; do
3784 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3785 ac_cv_prog_CC="${ac_tool_prefix}cc"
3786 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3787 break 2
3788 fi
3789 done
3790 done
3791 IFS=$as_save_IFS
3792
3793 fi
3794 fi
3795 CC=$ac_cv_prog_CC
3796 if test -n "$CC"; then
3797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3798 $as_echo "$CC" >&6; }
3799 else
3800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3801 $as_echo "no" >&6; }
3802 fi
3803
3804
3805 fi
3806 fi
3807 if test -z "$CC"; then
3808 # Extract the first word of "cc", so it can be a program name with args.
3809 set dummy cc; ac_word=$2
3810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3811 $as_echo_n "checking for $ac_word... " >&6; }
3812 if ${ac_cv_prog_CC+:} false; then :
3813 $as_echo_n "(cached) " >&6
3814 else
3815 if test -n "$CC"; then
3816 ac_cv_prog_CC="$CC" # Let the user override the test.
3817 else
3818 ac_prog_rejected=no
3819 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3820 for as_dir in $PATH
3821 do
3822 IFS=$as_save_IFS
3823 test -z "$as_dir" && as_dir=.
3824 for ac_exec_ext in '' $ac_executable_extensions; do
3825 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3826 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3827 ac_prog_rejected=yes
3828 continue
3829 fi
3830 ac_cv_prog_CC="cc"
3831 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3832 break 2
3833 fi
3834 done
3835 done
3836 IFS=$as_save_IFS
3837
3838 if test $ac_prog_rejected = yes; then
3839 # We found a bogon in the path, so make sure we never use it.
3840 set dummy $ac_cv_prog_CC
3841 shift
3842 if test $# != 0; then
3843 # We chose a different compiler from the bogus one.
3844 # However, it has the same basename, so the bogon will be chosen
3845 # first if we set CC to just the basename; use the full file name.
3846 shift
3847 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3848 fi
3849 fi
3850 fi
3851 fi
3852 CC=$ac_cv_prog_CC
3853 if test -n "$CC"; then
3854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3855 $as_echo "$CC" >&6; }
3856 else
3857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3858 $as_echo "no" >&6; }
3859 fi
3860
3861
3862 fi
3863 if test -z "$CC"; then
3864 if test -n "$ac_tool_prefix"; then
3865 for ac_prog in cl.exe
3866 do
3867 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3868 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3870 $as_echo_n "checking for $ac_word... " >&6; }
3871 if ${ac_cv_prog_CC+:} false; then :
3872 $as_echo_n "(cached) " >&6
3873 else
3874 if test -n "$CC"; then
3875 ac_cv_prog_CC="$CC" # Let the user override the test.
3876 else
3877 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3878 for as_dir in $PATH
3879 do
3880 IFS=$as_save_IFS
3881 test -z "$as_dir" && as_dir=.
3882 for ac_exec_ext in '' $ac_executable_extensions; do
3883 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3884 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3885 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3886 break 2
3887 fi
3888 done
3889 done
3890 IFS=$as_save_IFS
3891
3892 fi
3893 fi
3894 CC=$ac_cv_prog_CC
3895 if test -n "$CC"; then
3896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3897 $as_echo "$CC" >&6; }
3898 else
3899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3900 $as_echo "no" >&6; }
3901 fi
3902
3903
3904 test -n "$CC" && break
3905 done
3906 fi
3907 if test -z "$CC"; then
3908 ac_ct_CC=$CC
3909 for ac_prog in cl.exe
3910 do
3911 # Extract the first word of "$ac_prog", so it can be a program name with args.
3912 set dummy $ac_prog; ac_word=$2
3913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3914 $as_echo_n "checking for $ac_word... " >&6; }
3915 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3916 $as_echo_n "(cached) " >&6
3917 else
3918 if test -n "$ac_ct_CC"; then
3919 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3920 else
3921 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3922 for as_dir in $PATH
3923 do
3924 IFS=$as_save_IFS
3925 test -z "$as_dir" && as_dir=.
3926 for ac_exec_ext in '' $ac_executable_extensions; do
3927 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3928 ac_cv_prog_ac_ct_CC="$ac_prog"
3929 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3930 break 2
3931 fi
3932 done
3933 done
3934 IFS=$as_save_IFS
3935
3936 fi
3937 fi
3938 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3939 if test -n "$ac_ct_CC"; then
3940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3941 $as_echo "$ac_ct_CC" >&6; }
3942 else
3943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3944 $as_echo "no" >&6; }
3945 fi
3946
3947
3948 test -n "$ac_ct_CC" && break
3949 done
3950
3951 if test "x$ac_ct_CC" = x; then
3952 CC=""
3953 else
3954 case $cross_compiling:$ac_tool_warned in
3955 yes:)
3956 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3957 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3958 ac_tool_warned=yes ;;
3959 esac
3960 CC=$ac_ct_CC
3961 fi
3962 fi
3963
3964 fi
3965
3966
3967 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3968 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3969 as_fn_error $? "no acceptable C compiler found in \$PATH
3970 See \`config.log' for more details" "$LINENO" 5; }
3971
3972 # Provide some information about the compiler.
3973 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3974 set X $ac_compile
3975 ac_compiler=$2
3976 for ac_option in --version -v -V -qversion; do
3977 { { ac_try="$ac_compiler $ac_option >&5"
3978 case "(($ac_try" in
3979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3980 *) ac_try_echo=$ac_try;;
3981 esac
3982 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3983 $as_echo "$ac_try_echo"; } >&5
3984 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3985 ac_status=$?
3986 if test -s conftest.err; then
3987 sed '10a\
3988 ... rest of stderr output deleted ...
3989 10q' conftest.err >conftest.er1
3990 cat conftest.er1 >&5
3991 fi
3992 rm -f conftest.er1 conftest.err
3993 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3994 test $ac_status = 0; }
3995 done
3996
3997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3998 /* end confdefs.h. */
3999
4000 int
4001 main ()
4002 {
4003
4004 ;
4005 return 0;
4006 }
4007 _ACEOF
4008 ac_clean_files_save=$ac_clean_files
4009 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4010 # Try to create an executable without -o first, disregard a.out.
4011 # It will help us diagnose broken compilers, and finding out an intuition
4012 # of exeext.
4013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4014 $as_echo_n "checking whether the C compiler works... " >&6; }
4015 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4016
4017 # The possible output files:
4018 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4019
4020 ac_rmfiles=
4021 for ac_file in $ac_files
4022 do
4023 case $ac_file in
4024 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4025 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4026 esac
4027 done
4028 rm -f $ac_rmfiles
4029
4030 if { { ac_try="$ac_link_default"
4031 case "(($ac_try" in
4032 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4033 *) ac_try_echo=$ac_try;;
4034 esac
4035 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4036 $as_echo "$ac_try_echo"; } >&5
4037 (eval "$ac_link_default") 2>&5
4038 ac_status=$?
4039 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4040 test $ac_status = 0; }; then :
4041 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4042 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4043 # in a Makefile. We should not override ac_cv_exeext if it was cached,
4044 # so that the user can short-circuit this test for compilers unknown to
4045 # Autoconf.
4046 for ac_file in $ac_files ''
4047 do
4048 test -f "$ac_file" || continue
4049 case $ac_file in
4050 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4051 ;;
4052 [ab].out )
4053 # We found the default executable, but exeext='' is most
4054 # certainly right.
4055 break;;
4056 *.* )
4057 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4058 then :; else
4059 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4060 fi
4061 # We set ac_cv_exeext here because the later test for it is not
4062 # safe: cross compilers may not add the suffix if given an `-o'
4063 # argument, so we may need to know it at that point already.
4064 # Even if this section looks crufty: it has the advantage of
4065 # actually working.
4066 break;;
4067 * )
4068 break;;
4069 esac
4070 done
4071 test "$ac_cv_exeext" = no && ac_cv_exeext=
4072
4073 else
4074 ac_file=''
4075 fi
4076 if test -z "$ac_file"; then :
4077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4078 $as_echo "no" >&6; }
4079 $as_echo "$as_me: failed program was:" >&5
4080 sed 's/^/| /' conftest.$ac_ext >&5
4081
4082 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4083 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4084 as_fn_error 77 "C compiler cannot create executables
4085 See \`config.log' for more details" "$LINENO" 5; }
4086 else
4087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4088 $as_echo "yes" >&6; }
4089 fi
4090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4091 $as_echo_n "checking for C compiler default output file name... " >&6; }
4092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4093 $as_echo "$ac_file" >&6; }
4094 ac_exeext=$ac_cv_exeext
4095
4096 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4097 ac_clean_files=$ac_clean_files_save
4098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4099 $as_echo_n "checking for suffix of executables... " >&6; }
4100 if { { ac_try="$ac_link"
4101 case "(($ac_try" in
4102 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4103 *) ac_try_echo=$ac_try;;
4104 esac
4105 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4106 $as_echo "$ac_try_echo"; } >&5
4107 (eval "$ac_link") 2>&5
4108 ac_status=$?
4109 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4110 test $ac_status = 0; }; then :
4111 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4112 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4113 # work properly (i.e., refer to `conftest.exe'), while it won't with
4114 # `rm'.
4115 for ac_file in conftest.exe conftest conftest.*; do
4116 test -f "$ac_file" || continue
4117 case $ac_file in
4118 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4119 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4120 break;;
4121 * ) break;;
4122 esac
4123 done
4124 else
4125 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4126 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4127 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4128 See \`config.log' for more details" "$LINENO" 5; }
4129 fi
4130 rm -f conftest conftest$ac_cv_exeext
4131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4132 $as_echo "$ac_cv_exeext" >&6; }
4133
4134 rm -f conftest.$ac_ext
4135 EXEEXT=$ac_cv_exeext
4136 ac_exeext=$EXEEXT
4137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4138 /* end confdefs.h. */
4139 #include <stdio.h>
4140 int
4141 main ()
4142 {
4143 FILE *f = fopen ("conftest.out", "w");
4144 return ferror (f) || fclose (f) != 0;
4145
4146 ;
4147 return 0;
4148 }
4149 _ACEOF
4150 ac_clean_files="$ac_clean_files conftest.out"
4151 # Check that the compiler produces executables we can run. If not, either
4152 # the compiler is broken, or we cross compile.
4153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4154 $as_echo_n "checking whether we are cross compiling... " >&6; }
4155 if test "$cross_compiling" != yes; then
4156 { { ac_try="$ac_link"
4157 case "(($ac_try" in
4158 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4159 *) ac_try_echo=$ac_try;;
4160 esac
4161 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4162 $as_echo "$ac_try_echo"; } >&5
4163 (eval "$ac_link") 2>&5
4164 ac_status=$?
4165 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4166 test $ac_status = 0; }
4167 if { ac_try='./conftest$ac_cv_exeext'
4168 { { case "(($ac_try" in
4169 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4170 *) ac_try_echo=$ac_try;;
4171 esac
4172 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4173 $as_echo "$ac_try_echo"; } >&5
4174 (eval "$ac_try") 2>&5
4175 ac_status=$?
4176 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4177 test $ac_status = 0; }; }; then
4178 cross_compiling=no
4179 else
4180 if test "$cross_compiling" = maybe; then
4181 cross_compiling=yes
4182 else
4183 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4184 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4185 as_fn_error $? "cannot run C compiled programs.
4186 If you meant to cross compile, use \`--host'.
4187 See \`config.log' for more details" "$LINENO" 5; }
4188 fi
4189 fi
4190 fi
4191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4192 $as_echo "$cross_compiling" >&6; }
4193
4194 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4195 ac_clean_files=$ac_clean_files_save
4196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4197 $as_echo_n "checking for suffix of object files... " >&6; }
4198 if ${ac_cv_objext+:} false; then :
4199 $as_echo_n "(cached) " >&6
4200 else
4201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4202 /* end confdefs.h. */
4203
4204 int
4205 main ()
4206 {
4207
4208 ;
4209 return 0;
4210 }
4211 _ACEOF
4212 rm -f conftest.o conftest.obj
4213 if { { ac_try="$ac_compile"
4214 case "(($ac_try" in
4215 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4216 *) ac_try_echo=$ac_try;;
4217 esac
4218 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4219 $as_echo "$ac_try_echo"; } >&5
4220 (eval "$ac_compile") 2>&5
4221 ac_status=$?
4222 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4223 test $ac_status = 0; }; then :
4224 for ac_file in conftest.o conftest.obj conftest.*; do
4225 test -f "$ac_file" || continue;
4226 case $ac_file in
4227 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4228 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4229 break;;
4230 esac
4231 done
4232 else
4233 $as_echo "$as_me: failed program was:" >&5
4234 sed 's/^/| /' conftest.$ac_ext >&5
4235
4236 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4237 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4238 as_fn_error $? "cannot compute suffix of object files: cannot compile
4239 See \`config.log' for more details" "$LINENO" 5; }
4240 fi
4241 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4242 fi
4243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4244 $as_echo "$ac_cv_objext" >&6; }
4245 OBJEXT=$ac_cv_objext
4246 ac_objext=$OBJEXT
4247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4248 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4249 if ${ac_cv_c_compiler_gnu+:} false; then :
4250 $as_echo_n "(cached) " >&6
4251 else
4252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4253 /* end confdefs.h. */
4254
4255 int
4256 main ()
4257 {
4258 #ifndef __GNUC__
4259 choke me
4260 #endif
4261
4262 ;
4263 return 0;
4264 }
4265 _ACEOF
4266 if ac_fn_c_try_compile "$LINENO"; then :
4267 ac_compiler_gnu=yes
4268 else
4269 ac_compiler_gnu=no
4270 fi
4271 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4272 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4273
4274 fi
4275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4276 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4277 if test $ac_compiler_gnu = yes; then
4278 GCC=yes
4279 else
4280 GCC=
4281 fi
4282 ac_test_CFLAGS=${CFLAGS+set}
4283 ac_save_CFLAGS=$CFLAGS
4284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4285 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4286 if ${ac_cv_prog_cc_g+:} false; then :
4287 $as_echo_n "(cached) " >&6
4288 else
4289 ac_save_c_werror_flag=$ac_c_werror_flag
4290 ac_c_werror_flag=yes
4291 ac_cv_prog_cc_g=no
4292 CFLAGS="-g"
4293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4294 /* end confdefs.h. */
4295
4296 int
4297 main ()
4298 {
4299
4300 ;
4301 return 0;
4302 }
4303 _ACEOF
4304 if ac_fn_c_try_compile "$LINENO"; then :
4305 ac_cv_prog_cc_g=yes
4306 else
4307 CFLAGS=""
4308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4309 /* end confdefs.h. */
4310
4311 int
4312 main ()
4313 {
4314
4315 ;
4316 return 0;
4317 }
4318 _ACEOF
4319 if ac_fn_c_try_compile "$LINENO"; then :
4320
4321 else
4322 ac_c_werror_flag=$ac_save_c_werror_flag
4323 CFLAGS="-g"
4324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4325 /* end confdefs.h. */
4326
4327 int
4328 main ()
4329 {
4330
4331 ;
4332 return 0;
4333 }
4334 _ACEOF
4335 if ac_fn_c_try_compile "$LINENO"; then :
4336 ac_cv_prog_cc_g=yes
4337 fi
4338 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4339 fi
4340 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4341 fi
4342 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4343 ac_c_werror_flag=$ac_save_c_werror_flag
4344 fi
4345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4346 $as_echo "$ac_cv_prog_cc_g" >&6; }
4347 if test "$ac_test_CFLAGS" = set; then
4348 CFLAGS=$ac_save_CFLAGS
4349 elif test $ac_cv_prog_cc_g = yes; then
4350 if test "$GCC" = yes; then
4351 CFLAGS="-g -O2"
4352 else
4353 CFLAGS="-g"
4354 fi
4355 else
4356 if test "$GCC" = yes; then
4357 CFLAGS="-O2"
4358 else
4359 CFLAGS=
4360 fi
4361 fi
4362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4363 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4364 if ${ac_cv_prog_cc_c89+:} false; then :
4365 $as_echo_n "(cached) " >&6
4366 else
4367 ac_cv_prog_cc_c89=no
4368 ac_save_CC=$CC
4369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4370 /* end confdefs.h. */
4371 #include <stdarg.h>
4372 #include <stdio.h>
4373 struct stat;
4374 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4375 struct buf { int x; };
4376 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4377 static char *e (p, i)
4378 char **p;
4379 int i;
4380 {
4381 return p[i];
4382 }
4383 static char *f (char * (*g) (char **, int), char **p, ...)
4384 {
4385 char *s;
4386 va_list v;
4387 va_start (v,p);
4388 s = g (p, va_arg (v,int));
4389 va_end (v);
4390 return s;
4391 }
4392
4393 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4394 function prototypes and stuff, but not '\xHH' hex character constants.
4395 These don't provoke an error unfortunately, instead are silently treated
4396 as 'x'. The following induces an error, until -std is added to get
4397 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4398 array size at least. It's necessary to write '\x00'==0 to get something
4399 that's true only with -std. */
4400 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4401
4402 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4403 inside strings and character constants. */
4404 #define FOO(x) 'x'
4405 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4406
4407 int test (int i, double x);
4408 struct s1 {int (*f) (int a);};
4409 struct s2 {int (*f) (double a);};
4410 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4411 int argc;
4412 char **argv;
4413 int
4414 main ()
4415 {
4416 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4417 ;
4418 return 0;
4419 }
4420 _ACEOF
4421 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4422 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4423 do
4424 CC="$ac_save_CC $ac_arg"
4425 if ac_fn_c_try_compile "$LINENO"; then :
4426 ac_cv_prog_cc_c89=$ac_arg
4427 fi
4428 rm -f core conftest.err conftest.$ac_objext
4429 test "x$ac_cv_prog_cc_c89" != "xno" && break
4430 done
4431 rm -f conftest.$ac_ext
4432 CC=$ac_save_CC
4433
4434 fi
4435 # AC_CACHE_VAL
4436 case "x$ac_cv_prog_cc_c89" in
4437 x)
4438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4439 $as_echo "none needed" >&6; } ;;
4440 xno)
4441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4442 $as_echo "unsupported" >&6; } ;;
4443 *)
4444 CC="$CC $ac_cv_prog_cc_c89"
4445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4446 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4447 esac
4448 if test "x$ac_cv_prog_cc_c89" != xno; then :
4449
4450 fi
4451
4452 ac_ext=c
4453 ac_cpp='$CPP $CPPFLAGS'
4454 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4455 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4456 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4457
4458 ac_aux_dir=
4459 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4460 if test -f "$ac_dir/install-sh"; then
4461 ac_aux_dir=$ac_dir
4462 ac_install_sh="$ac_aux_dir/install-sh -c"
4463 break
4464 elif test -f "$ac_dir/install.sh"; then
4465 ac_aux_dir=$ac_dir
4466 ac_install_sh="$ac_aux_dir/install.sh -c"
4467 break
4468 elif test -f "$ac_dir/shtool"; then
4469 ac_aux_dir=$ac_dir
4470 ac_install_sh="$ac_aux_dir/shtool install -c"
4471 break
4472 fi
4473 done
4474 if test -z "$ac_aux_dir"; then
4475 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
4476 fi
4477
4478 # These three variables are undocumented and unsupported,
4479 # and are intended to be withdrawn in a future Autoconf release.
4480 # They can cause serious problems if a builder's source tree is in a directory
4481 # whose full name contains unusual characters.
4482 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4483 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4484 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4485
4486
4487 # Expand $ac_aux_dir to an absolute path.
4488 am_aux_dir=`cd "$ac_aux_dir" && pwd`
4489
4490 ac_ext=c
4491 ac_cpp='$CPP $CPPFLAGS'
4492 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4493 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4494 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
4496 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
4497 if ${am_cv_prog_cc_c_o+:} false; then :
4498 $as_echo_n "(cached) " >&6
4499 else
4500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4501 /* end confdefs.h. */
4502
4503 int
4504 main ()
4505 {
4506
4507 ;
4508 return 0;
4509 }
4510 _ACEOF
4511 # Make sure it works both with $CC and with simple cc.
4512 # Following AC_PROG_CC_C_O, we do the test twice because some
4513 # compilers refuse to overwrite an existing .o file with -o,
4514 # though they will create one.
4515 am_cv_prog_cc_c_o=yes
4516 for am_i in 1 2; do
4517 if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
4518 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
4519 ac_status=$?
4520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4521 (exit $ac_status); } \
4522 && test -f conftest2.$ac_objext; then
4523 : OK
4524 else
4525 am_cv_prog_cc_c_o=no
4526 break
4527 fi
4528 done
4529 rm -f core conftest*
4530 unset am_i
4531 fi
4532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
4533 $as_echo "$am_cv_prog_cc_c_o" >&6; }
4534 if test "$am_cv_prog_cc_c_o" != yes; then
4535 # Losing compiler, so override with the script.
4536 # FIXME: It is wrong to rewrite CC.
4537 # But if we don't then we get into trouble of one sort or another.
4538 # A longer-term fix would be to have automake use am__CC in this case,
4539 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
4540 CC="$am_aux_dir/compile $CC"
4541 fi
4542 ac_ext=c
4543 ac_cpp='$CPP $CPPFLAGS'
4544 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4545 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4546 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4547
4548
4549
4550 ac_ext=c
4551 ac_cpp='$CPP $CPPFLAGS'
4552 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4553 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4554 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4556 $as_echo_n "checking how to run the C preprocessor... " >&6; }
4557 # On Suns, sometimes $CPP names a directory.
4558 if test -n "$CPP" && test -d "$CPP"; then
4559 CPP=
4560 fi
4561 if test -z "$CPP"; then
4562 if ${ac_cv_prog_CPP+:} false; then :
4563 $as_echo_n "(cached) " >&6
4564 else
4565 # Double quotes because CPP needs to be expanded
4566 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4567 do
4568 ac_preproc_ok=false
4569 for ac_c_preproc_warn_flag in '' yes
4570 do
4571 # Use a header file that comes with gcc, so configuring glibc
4572 # with a fresh cross-compiler works.
4573 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4574 # <limits.h> exists even on freestanding compilers.
4575 # On the NeXT, cc -E runs the code through the compiler's parser,
4576 # not just through cpp. "Syntax error" is here to catch this case.
4577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4578 /* end confdefs.h. */
4579 #ifdef __STDC__
4580 # include <limits.h>
4581 #else
4582 # include <assert.h>
4583 #endif
4584 Syntax error
4585 _ACEOF
4586 if ac_fn_c_try_cpp "$LINENO"; then :
4587
4588 else
4589 # Broken: fails on valid input.
4590 continue
4591 fi
4592 rm -f conftest.err conftest.i conftest.$ac_ext
4593
4594 # OK, works on sane cases. Now check whether nonexistent headers
4595 # can be detected and how.
4596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4597 /* end confdefs.h. */
4598 #include <ac_nonexistent.h>
4599 _ACEOF
4600 if ac_fn_c_try_cpp "$LINENO"; then :
4601 # Broken: success on invalid input.
4602 continue
4603 else
4604 # Passes both tests.
4605 ac_preproc_ok=:
4606 break
4607 fi
4608 rm -f conftest.err conftest.i conftest.$ac_ext
4609
4610 done
4611 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4612 rm -f conftest.i conftest.err conftest.$ac_ext
4613 if $ac_preproc_ok; then :
4614 break
4615 fi
4616
4617 done
4618 ac_cv_prog_CPP=$CPP
4619
4620 fi
4621 CPP=$ac_cv_prog_CPP
4622 else
4623 ac_cv_prog_CPP=$CPP
4624 fi
4625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4626 $as_echo "$CPP" >&6; }
4627 ac_preproc_ok=false
4628 for ac_c_preproc_warn_flag in '' yes
4629 do
4630 # Use a header file that comes with gcc, so configuring glibc
4631 # with a fresh cross-compiler works.
4632 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4633 # <limits.h> exists even on freestanding compilers.
4634 # On the NeXT, cc -E runs the code through the compiler's parser,
4635 # not just through cpp. "Syntax error" is here to catch this case.
4636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4637 /* end confdefs.h. */
4638 #ifdef __STDC__
4639 # include <limits.h>
4640 #else
4641 # include <assert.h>
4642 #endif
4643 Syntax error
4644 _ACEOF
4645 if ac_fn_c_try_cpp "$LINENO"; then :
4646
4647 else
4648 # Broken: fails on valid input.
4649 continue
4650 fi
4651 rm -f conftest.err conftest.i conftest.$ac_ext
4652
4653 # OK, works on sane cases. Now check whether nonexistent headers
4654 # can be detected and how.
4655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4656 /* end confdefs.h. */
4657 #include <ac_nonexistent.h>
4658 _ACEOF
4659 if ac_fn_c_try_cpp "$LINENO"; then :
4660 # Broken: success on invalid input.
4661 continue
4662 else
4663 # Passes both tests.
4664 ac_preproc_ok=:
4665 break
4666 fi
4667 rm -f conftest.err conftest.i conftest.$ac_ext
4668
4669 done
4670 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4671 rm -f conftest.i conftest.err conftest.$ac_ext
4672 if $ac_preproc_ok; then :
4673
4674 else
4675 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4676 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4677 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4678 See \`config.log' for more details" "$LINENO" 5; }
4679 fi
4680
4681 ac_ext=c
4682 ac_cpp='$CPP $CPPFLAGS'
4683 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4684 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4685 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4686
4687
4688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4689 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4690 if ${ac_cv_path_GREP+:} false; then :
4691 $as_echo_n "(cached) " >&6
4692 else
4693 if test -z "$GREP"; then
4694 ac_path_GREP_found=false
4695 # Loop through the user's path and test for each of PROGNAME-LIST
4696 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4697 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4698 do
4699 IFS=$as_save_IFS
4700 test -z "$as_dir" && as_dir=.
4701 for ac_prog in grep ggrep; do
4702 for ac_exec_ext in '' $ac_executable_extensions; do
4703 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4704 as_fn_executable_p "$ac_path_GREP" || continue
4705 # Check for GNU ac_path_GREP and select it if it is found.
4706 # Check for GNU $ac_path_GREP
4707 case `"$ac_path_GREP" --version 2>&1` in
4708 *GNU*)
4709 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4710 *)
4711 ac_count=0
4712 $as_echo_n 0123456789 >"conftest.in"
4713 while :
4714 do
4715 cat "conftest.in" "conftest.in" >"conftest.tmp"
4716 mv "conftest.tmp" "conftest.in"
4717 cp "conftest.in" "conftest.nl"
4718 $as_echo 'GREP' >> "conftest.nl"
4719 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4720 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4721 as_fn_arith $ac_count + 1 && ac_count=$as_val
4722 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4723 # Best one so far, save it but keep looking for a better one
4724 ac_cv_path_GREP="$ac_path_GREP"
4725 ac_path_GREP_max=$ac_count
4726 fi
4727 # 10*(2^10) chars as input seems more than enough
4728 test $ac_count -gt 10 && break
4729 done
4730 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4731 esac
4732
4733 $ac_path_GREP_found && break 3
4734 done
4735 done
4736 done
4737 IFS=$as_save_IFS
4738 if test -z "$ac_cv_path_GREP"; then
4739 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4740 fi
4741 else
4742 ac_cv_path_GREP=$GREP
4743 fi
4744
4745 fi
4746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4747 $as_echo "$ac_cv_path_GREP" >&6; }
4748 GREP="$ac_cv_path_GREP"
4749
4750
4751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4752 $as_echo_n "checking for egrep... " >&6; }
4753 if ${ac_cv_path_EGREP+:} false; then :
4754 $as_echo_n "(cached) " >&6
4755 else
4756 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4757 then ac_cv_path_EGREP="$GREP -E"
4758 else
4759 if test -z "$EGREP"; then
4760 ac_path_EGREP_found=false
4761 # Loop through the user's path and test for each of PROGNAME-LIST
4762 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4763 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4764 do
4765 IFS=$as_save_IFS
4766 test -z "$as_dir" && as_dir=.
4767 for ac_prog in egrep; do
4768 for ac_exec_ext in '' $ac_executable_extensions; do
4769 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4770 as_fn_executable_p "$ac_path_EGREP" || continue
4771 # Check for GNU ac_path_EGREP and select it if it is found.
4772 # Check for GNU $ac_path_EGREP
4773 case `"$ac_path_EGREP" --version 2>&1` in
4774 *GNU*)
4775 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4776 *)
4777 ac_count=0
4778 $as_echo_n 0123456789 >"conftest.in"
4779 while :
4780 do
4781 cat "conftest.in" "conftest.in" >"conftest.tmp"
4782 mv "conftest.tmp" "conftest.in"
4783 cp "conftest.in" "conftest.nl"
4784 $as_echo 'EGREP' >> "conftest.nl"
4785 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4786 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4787 as_fn_arith $ac_count + 1 && ac_count=$as_val
4788 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4789 # Best one so far, save it but keep looking for a better one
4790 ac_cv_path_EGREP="$ac_path_EGREP"
4791 ac_path_EGREP_max=$ac_count
4792 fi
4793 # 10*(2^10) chars as input seems more than enough
4794 test $ac_count -gt 10 && break
4795 done
4796 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4797 esac
4798
4799 $ac_path_EGREP_found && break 3
4800 done
4801 done
4802 done
4803 IFS=$as_save_IFS
4804 if test -z "$ac_cv_path_EGREP"; then
4805 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4806 fi
4807 else
4808 ac_cv_path_EGREP=$EGREP
4809 fi
4810
4811 fi
4812 fi
4813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4814 $as_echo "$ac_cv_path_EGREP" >&6; }
4815 EGREP="$ac_cv_path_EGREP"
4816
4817
4818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4819 $as_echo_n "checking for ANSI C header files... " >&6; }
4820 if ${ac_cv_header_stdc+:} false; then :
4821 $as_echo_n "(cached) " >&6
4822 else
4823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4824 /* end confdefs.h. */
4825 #include <stdlib.h>
4826 #include <stdarg.h>
4827 #include <string.h>
4828 #include <float.h>
4829
4830 int
4831 main ()
4832 {
4833
4834 ;
4835 return 0;
4836 }
4837 _ACEOF
4838 if ac_fn_c_try_compile "$LINENO"; then :
4839 ac_cv_header_stdc=yes
4840 else
4841 ac_cv_header_stdc=no
4842 fi
4843 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4844
4845 if test $ac_cv_header_stdc = yes; then
4846 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4848 /* end confdefs.h. */
4849 #include <string.h>
4850
4851 _ACEOF
4852 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4853 $EGREP "memchr" >/dev/null 2>&1; then :
4854
4855 else
4856 ac_cv_header_stdc=no
4857 fi
4858 rm -f conftest*
4859
4860 fi
4861
4862 if test $ac_cv_header_stdc = yes; then
4863 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4865 /* end confdefs.h. */
4866 #include <stdlib.h>
4867
4868 _ACEOF
4869 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4870 $EGREP "free" >/dev/null 2>&1; then :
4871
4872 else
4873 ac_cv_header_stdc=no
4874 fi
4875 rm -f conftest*
4876
4877 fi
4878
4879 if test $ac_cv_header_stdc = yes; then
4880 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4881 if test "$cross_compiling" = yes; then :
4882 :
4883 else
4884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4885 /* end confdefs.h. */
4886 #include <ctype.h>
4887 #include <stdlib.h>
4888 #if ((' ' & 0x0FF) == 0x020)
4889 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4890 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4891 #else
4892 # define ISLOWER(c) \
4893 (('a' <= (c) && (c) <= 'i') \
4894 || ('j' <= (c) && (c) <= 'r') \
4895 || ('s' <= (c) && (c) <= 'z'))
4896 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4897 #endif
4898
4899 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4900 int
4901 main ()
4902 {
4903 int i;
4904 for (i = 0; i < 256; i++)
4905 if (XOR (islower (i), ISLOWER (i))
4906 || toupper (i) != TOUPPER (i))
4907 return 2;
4908 return 0;
4909 }
4910 _ACEOF
4911 if ac_fn_c_try_run "$LINENO"; then :
4912
4913 else
4914 ac_cv_header_stdc=no
4915 fi
4916 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4917 conftest.$ac_objext conftest.beam conftest.$ac_ext
4918 fi
4919
4920 fi
4921 fi
4922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4923 $as_echo "$ac_cv_header_stdc" >&6; }
4924 if test $ac_cv_header_stdc = yes; then
4925
4926 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
4927
4928 fi
4929
4930 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4931 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4932 inttypes.h stdint.h unistd.h
4933 do :
4934 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4935 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4936 "
4937 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4938 cat >>confdefs.h <<_ACEOF
4939 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4940 _ACEOF
4941
4942 fi
4943
4944 done
4945
4946
4947
4948 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4949 if test "x$ac_cv_header_minix_config_h" = xyes; then :
4950 MINIX=yes
4951 else
4952 MINIX=
4953 fi
4954
4955
4956 if test "$MINIX" = yes; then
4957
4958 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4959
4960
4961 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4962
4963
4964 $as_echo "#define _MINIX 1" >>confdefs.h
4965
4966
4967 $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
4968
4969 fi
4970
4971
4972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4973 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4974 if ${ac_cv_safe_to_define___extensions__+:} false; then :
4975 $as_echo_n "(cached) " >&6
4976 else
4977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4978 /* end confdefs.h. */
4979
4980 # define __EXTENSIONS__ 1
4981 $ac_includes_default
4982 int
4983 main ()
4984 {
4985
4986 ;
4987 return 0;
4988 }
4989 _ACEOF
4990 if ac_fn_c_try_compile "$LINENO"; then :
4991 ac_cv_safe_to_define___extensions__=yes
4992 else
4993 ac_cv_safe_to_define___extensions__=no
4994 fi
4995 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4996 fi
4997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4998 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4999 test $ac_cv_safe_to_define___extensions__ = yes &&
5000 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5001
5002 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5003
5004 $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
5005
5006 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5007
5008 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5009
5010 $as_echo "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
5011
5012 $as_echo "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
5013
5014 $as_echo "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
5015
5016 $as_echo "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
5017
5018 $as_echo "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
5019
5020 $as_echo "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
5021
5022 $as_echo "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
5023
5024 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5025
5026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
5027 $as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; }
5028 if ${ac_cv_should_define__xopen_source+:} false; then :
5029 $as_echo_n "(cached) " >&6
5030 else
5031 ac_cv_should_define__xopen_source=no
5032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5033 /* end confdefs.h. */
5034
5035 #include <wchar.h>
5036 mbstate_t x;
5037 int
5038 main ()
5039 {
5040
5041 ;
5042 return 0;
5043 }
5044 _ACEOF
5045 if ac_fn_c_try_compile "$LINENO"; then :
5046
5047 else
5048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5049 /* end confdefs.h. */
5050
5051 #define _XOPEN_SOURCE 500
5052 #include <wchar.h>
5053 mbstate_t x;
5054 int
5055 main ()
5056 {
5057
5058 ;
5059 return 0;
5060 }
5061 _ACEOF
5062 if ac_fn_c_try_compile "$LINENO"; then :
5063 ac_cv_should_define__xopen_source=yes
5064 fi
5065 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5066 fi
5067 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5068 fi
5069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
5070 $as_echo "$ac_cv_should_define__xopen_source" >&6; }
5071 test $ac_cv_should_define__xopen_source = yes &&
5072 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
5085 $as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
5086 if ${gl_cv_c_amsterdam_compiler+:} false; then :
5087 $as_echo_n "(cached) " >&6
5088 else
5089
5090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5091 /* end confdefs.h. */
5092
5093 #ifdef __ACK__
5094 Amsterdam
5095 #endif
5096
5097 _ACEOF
5098 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5099 $EGREP "Amsterdam" >/dev/null 2>&1; then :
5100 gl_cv_c_amsterdam_compiler=yes
5101 else
5102 gl_cv_c_amsterdam_compiler=no
5103 fi
5104 rm -f conftest*
5105
5106
5107 fi
5108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
5109 $as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
5110
5111 if test $gl_cv_c_amsterdam_compiler = yes; then
5112 if test -z "$AR"; then
5113 AR='cc -c.a'
5114 fi
5115 if test -z "$ARFLAGS"; then
5116 ARFLAGS='-o'
5117 fi
5118 else
5119 if test -n "$ac_tool_prefix"; then
5120 for ac_prog in ar lib "link -lib"
5121 do
5122 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5123 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5125 $as_echo_n "checking for $ac_word... " >&6; }
5126 if ${ac_cv_prog_AR+:} false; then :
5127 $as_echo_n "(cached) " >&6
5128 else
5129 if test -n "$AR"; then
5130 ac_cv_prog_AR="$AR" # Let the user override the test.
5131 else
5132 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5133 for as_dir in $PATH
5134 do
5135 IFS=$as_save_IFS
5136 test -z "$as_dir" && as_dir=.
5137 for ac_exec_ext in '' $ac_executable_extensions; do
5138 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5139 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
5140 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5141 break 2
5142 fi
5143 done
5144 done
5145 IFS=$as_save_IFS
5146
5147 fi
5148 fi
5149 AR=$ac_cv_prog_AR
5150 if test -n "$AR"; then
5151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5152 $as_echo "$AR" >&6; }
5153 else
5154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5155 $as_echo "no" >&6; }
5156 fi
5157
5158
5159 test -n "$AR" && break
5160 done
5161 fi
5162 if test -z "$AR"; then
5163 ac_ct_AR=$AR
5164 for ac_prog in ar lib "link -lib"
5165 do
5166 # Extract the first word of "$ac_prog", so it can be a program name with args.
5167 set dummy $ac_prog; ac_word=$2
5168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5169 $as_echo_n "checking for $ac_word... " >&6; }
5170 if ${ac_cv_prog_ac_ct_AR+:} false; then :
5171 $as_echo_n "(cached) " >&6
5172 else
5173 if test -n "$ac_ct_AR"; then
5174 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5175 else
5176 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5177 for as_dir in $PATH
5178 do
5179 IFS=$as_save_IFS
5180 test -z "$as_dir" && as_dir=.
5181 for ac_exec_ext in '' $ac_executable_extensions; do
5182 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5183 ac_cv_prog_ac_ct_AR="$ac_prog"
5184 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5185 break 2
5186 fi
5187 done
5188 done
5189 IFS=$as_save_IFS
5190
5191 fi
5192 fi
5193 ac_ct_AR=$ac_cv_prog_ac_ct_AR
5194 if test -n "$ac_ct_AR"; then
5195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5196 $as_echo "$ac_ct_AR" >&6; }
5197 else
5198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5199 $as_echo "no" >&6; }
5200 fi
5201
5202
5203 test -n "$ac_ct_AR" && break
5204 done
5205
5206 if test "x$ac_ct_AR" = x; then
5207 AR="false"
5208 else
5209 case $cross_compiling:$ac_tool_warned in
5210 yes:)
5211 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5212 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5213 ac_tool_warned=yes ;;
5214 esac
5215 AR=$ac_ct_AR
5216 fi
5217 fi
5218
5219 : ${AR=ar}
5220
5221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5
5222 $as_echo_n "checking the archiver ($AR) interface... " >&6; }
5223 if ${am_cv_ar_interface+:} false; then :
5224 $as_echo_n "(cached) " >&6
5225 else
5226 ac_ext=c
5227 ac_cpp='$CPP $CPPFLAGS'
5228 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5229 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5230 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5231
5232 am_cv_ar_interface=ar
5233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5234 /* end confdefs.h. */
5235 int some_variable = 0;
5236 _ACEOF
5237 if ac_fn_c_try_compile "$LINENO"; then :
5238 am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5'
5239 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
5240 (eval $am_ar_try) 2>&5
5241 ac_status=$?
5242 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5243 test $ac_status = 0; }
5244 if test "$ac_status" -eq 0; then
5245 am_cv_ar_interface=ar
5246 else
5247 am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5'
5248 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
5249 (eval $am_ar_try) 2>&5
5250 ac_status=$?
5251 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5252 test $ac_status = 0; }
5253 if test "$ac_status" -eq 0; then
5254 am_cv_ar_interface=lib
5255 else
5256 am_cv_ar_interface=unknown
5257 fi
5258 fi
5259 rm -f conftest.lib libconftest.a
5260
5261 fi
5262 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5263 ac_ext=c
5264 ac_cpp='$CPP $CPPFLAGS'
5265 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5266 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5267 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5268
5269 fi
5270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5
5271 $as_echo "$am_cv_ar_interface" >&6; }
5272
5273 case $am_cv_ar_interface in
5274 ar)
5275 ;;
5276 lib)
5277 # Microsoft lib, so override with the ar-lib wrapper script.
5278 # FIXME: It is wrong to rewrite AR.
5279 # But if we don't then we get into trouble of one sort or another.
5280 # A longer-term fix would be to have automake use am__AR in this case,
5281 # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
5282 # similar.
5283 AR="$am_aux_dir/ar-lib $AR"
5284 ;;
5285 unknown)
5286 as_fn_error $? "could not determine $AR interface" "$LINENO" 5
5287 ;;
5288 esac
5289
5290 fi
5291
5292 if test -n "$ac_tool_prefix"; then
5293 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5294 set dummy ${ac_tool_prefix}ar; ac_word=$2
5295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5296 $as_echo_n "checking for $ac_word... " >&6; }
5297 if ${ac_cv_prog_AR+:} false; then :
5298 $as_echo_n "(cached) " >&6
5299 else
5300 if test -n "$AR"; then
5301 ac_cv_prog_AR="$AR" # Let the user override the test.
5302 else
5303 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5304 for as_dir in $PATH
5305 do
5306 IFS=$as_save_IFS
5307 test -z "$as_dir" && as_dir=.
5308 for ac_exec_ext in '' $ac_executable_extensions; do
5309 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5310 ac_cv_prog_AR="${ac_tool_prefix}ar"
5311 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5312 break 2
5313 fi
5314 done
5315 done
5316 IFS=$as_save_IFS
5317
5318 fi
5319 fi
5320 AR=$ac_cv_prog_AR
5321 if test -n "$AR"; then
5322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5323 $as_echo "$AR" >&6; }
5324 else
5325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5326 $as_echo "no" >&6; }
5327 fi
5328
5329
5330 fi
5331 if test -z "$ac_cv_prog_AR"; then
5332 ac_ct_AR=$AR
5333 # Extract the first word of "ar", so it can be a program name with args.
5334 set dummy ar; ac_word=$2
5335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5336 $as_echo_n "checking for $ac_word... " >&6; }
5337 if ${ac_cv_prog_ac_ct_AR+:} false; then :
5338 $as_echo_n "(cached) " >&6
5339 else
5340 if test -n "$ac_ct_AR"; then
5341 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5342 else
5343 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5344 for as_dir in $PATH
5345 do
5346 IFS=$as_save_IFS
5347 test -z "$as_dir" && as_dir=.
5348 for ac_exec_ext in '' $ac_executable_extensions; do
5349 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5350 ac_cv_prog_ac_ct_AR="ar"
5351 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5352 break 2
5353 fi
5354 done
5355 done
5356 IFS=$as_save_IFS
5357
5358 fi
5359 fi
5360 ac_ct_AR=$ac_cv_prog_ac_ct_AR
5361 if test -n "$ac_ct_AR"; then
5362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5363 $as_echo "$ac_ct_AR" >&6; }
5364 else
5365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5366 $as_echo "no" >&6; }
5367 fi
5368
5369 if test "x$ac_ct_AR" = x; then
5370 AR="ar"
5371 else
5372 case $cross_compiling:$ac_tool_warned in
5373 yes:)
5374 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5375 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5376 ac_tool_warned=yes ;;
5377 esac
5378 AR=$ac_ct_AR
5379 fi
5380 else
5381 AR="$ac_cv_prog_AR"
5382 fi
5383
5384 if test -z "$ARFLAGS"; then
5385 ARFLAGS='cr'
5386 fi
5387
5388
5389
5390 if test -z "$RANLIB"; then
5391 if test $gl_cv_c_amsterdam_compiler = yes; then
5392 RANLIB=':'
5393 else
5394 if test -n "$ac_tool_prefix"; then
5395 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5396 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5398 $as_echo_n "checking for $ac_word... " >&6; }
5399 if ${ac_cv_prog_RANLIB+:} false; then :
5400 $as_echo_n "(cached) " >&6
5401 else
5402 if test -n "$RANLIB"; then
5403 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5404 else
5405 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5406 for as_dir in $PATH
5407 do
5408 IFS=$as_save_IFS
5409 test -z "$as_dir" && as_dir=.
5410 for ac_exec_ext in '' $ac_executable_extensions; do
5411 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5412 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5413 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5414 break 2
5415 fi
5416 done
5417 done
5418 IFS=$as_save_IFS
5419
5420 fi
5421 fi
5422 RANLIB=$ac_cv_prog_RANLIB
5423 if test -n "$RANLIB"; then
5424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5425 $as_echo "$RANLIB" >&6; }
5426 else
5427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5428 $as_echo "no" >&6; }
5429 fi
5430
5431
5432 fi
5433 if test -z "$ac_cv_prog_RANLIB"; then
5434 ac_ct_RANLIB=$RANLIB
5435 # Extract the first word of "ranlib", so it can be a program name with args.
5436 set dummy ranlib; ac_word=$2
5437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5438 $as_echo_n "checking for $ac_word... " >&6; }
5439 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
5440 $as_echo_n "(cached) " >&6
5441 else
5442 if test -n "$ac_ct_RANLIB"; then
5443 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5444 else
5445 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5446 for as_dir in $PATH
5447 do
5448 IFS=$as_save_IFS
5449 test -z "$as_dir" && as_dir=.
5450 for ac_exec_ext in '' $ac_executable_extensions; do
5451 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5452 ac_cv_prog_ac_ct_RANLIB="ranlib"
5453 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5454 break 2
5455 fi
5456 done
5457 done
5458 IFS=$as_save_IFS
5459
5460 fi
5461 fi
5462 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5463 if test -n "$ac_ct_RANLIB"; then
5464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5465 $as_echo "$ac_ct_RANLIB" >&6; }
5466 else
5467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5468 $as_echo "no" >&6; }
5469 fi
5470
5471 if test "x$ac_ct_RANLIB" = x; then
5472 RANLIB=":"
5473 else
5474 case $cross_compiling:$ac_tool_warned in
5475 yes:)
5476 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5477 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5478 ac_tool_warned=yes ;;
5479 esac
5480 RANLIB=$ac_ct_RANLIB
5481 fi
5482 else
5483 RANLIB="$ac_cv_prog_RANLIB"
5484 fi
5485
5486 fi
5487 fi
5488
5489
5490
5491 # Make sure we can run config.sub.
5492 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
5493 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
5494
5495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
5496 $as_echo_n "checking build system type... " >&6; }
5497 if ${ac_cv_build+:} false; then :
5498 $as_echo_n "(cached) " >&6
5499 else
5500 ac_build_alias=$build_alias
5501 test "x$ac_build_alias" = x &&
5502 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
5503 test "x$ac_build_alias" = x &&
5504 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
5505 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
5506 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
5507
5508 fi
5509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
5510 $as_echo "$ac_cv_build" >&6; }
5511 case $ac_cv_build in
5512 *-*-*) ;;
5513 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
5514 esac
5515 build=$ac_cv_build
5516 ac_save_IFS=$IFS; IFS='-'
5517 set x $ac_cv_build
5518 shift
5519 build_cpu=$1
5520 build_vendor=$2
5521 shift; shift
5522 # Remember, the first character of IFS is used to create $*,
5523 # except with old shells:
5524 build_os=$*
5525 IFS=$ac_save_IFS
5526 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
5527
5528
5529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
5530 $as_echo_n "checking host system type... " >&6; }
5531 if ${ac_cv_host+:} false; then :
5532 $as_echo_n "(cached) " >&6
5533 else
5534 if test "x$host_alias" = x; then
5535 ac_cv_host=$ac_cv_build
5536 else
5537 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
5538 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
5539 fi
5540
5541 fi
5542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
5543 $as_echo "$ac_cv_host" >&6; }
5544 case $ac_cv_host in
5545 *-*-*) ;;
5546 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
5547 esac
5548 host=$ac_cv_host
5549 ac_save_IFS=$IFS; IFS='-'
5550 set x $ac_cv_host
5551 shift
5552 host_cpu=$1
5553 host_vendor=$2
5554 shift; shift
5555 # Remember, the first character of IFS is used to create $*,
5556 # except with old shells:
5557 host_os=$*
5558 IFS=$ac_save_IFS
5559 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
5560
5561
5562
5563
5564
5565 # IEEE behaviour is the default on all CPUs except Alpha and SH
5566 # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
5567 # and the GCC 4.1.2 manual).
5568 case "$host_cpu" in
5569 alpha*)
5570 # On Alpha systems, a compiler option provides the behaviour.
5571 # See the ieee(3) manual page, also available at
5572 # <http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V51B_HTML/MAN/MAN3/0600____.HTM>
5573 if test -n "$GCC"; then
5574 # GCC has the option -mieee.
5575 # For full IEEE compliance (rarely needed), use option -mieee-with-inexact.
5576 CPPFLAGS="$CPPFLAGS -mieee"
5577 else
5578 # Compaq (ex-DEC) C has the option -ieee, equivalent to -ieee_with_no_inexact.
5579 # For full IEEE compliance (rarely needed), use option -ieee_with_inexact.
5580 CPPFLAGS="$CPPFLAGS -ieee"
5581 fi
5582 ;;
5583 sh*)
5584 if test -n "$GCC"; then
5585 # GCC has the option -mieee.
5586 CPPFLAGS="$CPPFLAGS -mieee"
5587 fi
5588 ;;
5589 esac
5590
5591 # Check whether --enable-largefile was given.
5592 if test "${enable_largefile+set}" = set; then :
5593 enableval=$enable_largefile;
5594 fi
5595
5596 if test "$enable_largefile" != no; then
5597
5598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
5599 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
5600 if ${ac_cv_sys_largefile_CC+:} false; then :
5601 $as_echo_n "(cached) " >&6
5602 else
5603 ac_cv_sys_largefile_CC=no
5604 if test "$GCC" != yes; then
5605 ac_save_CC=$CC
5606 while :; do
5607 # IRIX 6.2 and later do not support large files by default,
5608 # so use the C compiler's -n32 option if that helps.
5609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5610 /* end confdefs.h. */
5611 #include <sys/types.h>
5612 /* Check that off_t can represent 2**63 - 1 correctly.
5613 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5614 since some C++ compilers masquerading as C compilers
5615 incorrectly reject 9223372036854775807. */
5616 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5617 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5618 && LARGE_OFF_T % 2147483647 == 1)
5619 ? 1 : -1];
5620 int
5621 main ()
5622 {
5623
5624 ;
5625 return 0;
5626 }
5627 _ACEOF
5628 if ac_fn_c_try_compile "$LINENO"; then :
5629 break
5630 fi
5631 rm -f core conftest.err conftest.$ac_objext
5632 CC="$CC -n32"
5633 if ac_fn_c_try_compile "$LINENO"; then :
5634 ac_cv_sys_largefile_CC=' -n32'; break
5635 fi
5636 rm -f core conftest.err conftest.$ac_objext
5637 break
5638 done
5639 CC=$ac_save_CC
5640 rm -f conftest.$ac_ext
5641 fi
5642 fi
5643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
5644 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
5645 if test "$ac_cv_sys_largefile_CC" != no; then
5646 CC=$CC$ac_cv_sys_largefile_CC
5647 fi
5648
5649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5650 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
5651 if ${ac_cv_sys_file_offset_bits+:} false; then :
5652 $as_echo_n "(cached) " >&6
5653 else
5654 while :; do
5655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5656 /* end confdefs.h. */
5657 #include <sys/types.h>
5658 /* Check that off_t can represent 2**63 - 1 correctly.
5659 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5660 since some C++ compilers masquerading as C compilers
5661 incorrectly reject 9223372036854775807. */
5662 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5663 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5664 && LARGE_OFF_T % 2147483647 == 1)
5665 ? 1 : -1];
5666 int
5667 main ()
5668 {
5669
5670 ;
5671 return 0;
5672 }
5673 _ACEOF
5674 if ac_fn_c_try_compile "$LINENO"; then :
5675 ac_cv_sys_file_offset_bits=no; break
5676 fi
5677 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5679 /* end confdefs.h. */
5680 #define _FILE_OFFSET_BITS 64
5681 #include <sys/types.h>
5682 /* Check that off_t can represent 2**63 - 1 correctly.
5683 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5684 since some C++ compilers masquerading as C compilers
5685 incorrectly reject 9223372036854775807. */
5686 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5687 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5688 && LARGE_OFF_T % 2147483647 == 1)
5689 ? 1 : -1];
5690 int
5691 main ()
5692 {
5693
5694 ;
5695 return 0;
5696 }
5697 _ACEOF
5698 if ac_fn_c_try_compile "$LINENO"; then :
5699 ac_cv_sys_file_offset_bits=64; break
5700 fi
5701 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5702 ac_cv_sys_file_offset_bits=unknown
5703 break
5704 done
5705 fi
5706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
5707 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
5708 case $ac_cv_sys_file_offset_bits in #(
5709 no | unknown) ;;
5710 *)
5711 cat >>confdefs.h <<_ACEOF
5712 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
5713 _ACEOF
5714 ;;
5715 esac
5716 rm -rf conftest*
5717 if test $ac_cv_sys_file_offset_bits = unknown; then
5718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
5719 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
5720 if ${ac_cv_sys_large_files+:} false; then :
5721 $as_echo_n "(cached) " >&6
5722 else
5723 while :; do
5724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5725 /* end confdefs.h. */
5726 #include <sys/types.h>
5727 /* Check that off_t can represent 2**63 - 1 correctly.
5728 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5729 since some C++ compilers masquerading as C compilers
5730 incorrectly reject 9223372036854775807. */
5731 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5732 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5733 && LARGE_OFF_T % 2147483647 == 1)
5734 ? 1 : -1];
5735 int
5736 main ()
5737 {
5738
5739 ;
5740 return 0;
5741 }
5742 _ACEOF
5743 if ac_fn_c_try_compile "$LINENO"; then :
5744 ac_cv_sys_large_files=no; break
5745 fi
5746 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5748 /* end confdefs.h. */
5749 #define _LARGE_FILES 1
5750 #include <sys/types.h>
5751 /* Check that off_t can represent 2**63 - 1 correctly.
5752 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5753 since some C++ compilers masquerading as C compilers
5754 incorrectly reject 9223372036854775807. */
5755 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5756 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5757 && LARGE_OFF_T % 2147483647 == 1)
5758 ? 1 : -1];
5759 int
5760 main ()
5761 {
5762
5763 ;
5764 return 0;
5765 }
5766 _ACEOF
5767 if ac_fn_c_try_compile "$LINENO"; then :
5768 ac_cv_sys_large_files=1; break
5769 fi
5770 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5771 ac_cv_sys_large_files=unknown
5772 break
5773 done
5774 fi
5775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
5776 $as_echo "$ac_cv_sys_large_files" >&6; }
5777 case $ac_cv_sys_large_files in #(
5778 no | unknown) ;;
5779 *)
5780 cat >>confdefs.h <<_ACEOF
5781 #define _LARGE_FILES $ac_cv_sys_large_files
5782 _ACEOF
5783 ;;
5784 esac
5785 rm -rf conftest*
5786 fi
5787
5788
5789 $as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
5790
5791 fi
5792
5793
5794
5795
5796
5797
5798 # Check whether --enable-threads was given.
5799 if test "${enable_threads+set}" = set; then :
5800 enableval=$enable_threads; gl_use_threads=$enableval
5801 else
5802 if test -n "$gl_use_threads_default"; then
5803 gl_use_threads="$gl_use_threads_default"
5804 else
5805 case "$host_os" in
5806 osf*) gl_use_threads=no ;;
5807 cygwin*)
5808 case `uname -r` in
5809 1.[0-5].*) gl_use_threads=no ;;
5810 *) gl_use_threads=yes ;;
5811 esac
5812 ;;
5813 *) gl_use_threads=yes ;;
5814 esac
5815 fi
5816
5817 fi
5818
5819 if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
5820 # For using <pthread.h>:
5821 case "$host_os" in
5822 osf*)
5823 # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
5824 # groks <pthread.h>. cc also understands the flag -pthread, but
5825 # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
5826 # 2. putting a flag into CPPFLAGS that has an effect on the linker
5827 # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
5828 # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
5829 CPPFLAGS="$CPPFLAGS -D_REENTRANT"
5830 ;;
5831 esac
5832 # Some systems optimize for single-threaded programs by default, and
5833 # need special flags to disable these optimizations. For example, the
5834 # definition of 'errno' in <errno.h>.
5835 case "$host_os" in
5836 aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
5837 solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
5838 esac
5839 fi
5840
5841
5842
5843 # Pre-early section.
5844
5845
5846
5847
5848 # Code from module absolute-header:
5849 # Code from module alloca:
5850 # Code from module alloca-opt:
5851 # Code from module arpa_inet:
5852 # Code from module assure:
5853 # Code from module at-internal:
5854 # Code from module canonicalize-lgpl:
5855 # Code from module chdir:
5856 # Code from module chdir-long:
5857 # Code from module cloexec:
5858 # Code from module close:
5859 # Code from module closedir:
5860 # Code from module configmake:
5861 # Code from module d-ino:
5862 # Code from module d-type:
5863 # Code from module dirent:
5864 # Code from module dirfd:
5865 # Code from module dirname-lgpl:
5866 # Code from module dosname:
5867 # Code from module double-slash-root:
5868 # Code from module dup:
5869 # Code from module dup2:
5870 # Code from module environ:
5871 # Code from module errno:
5872 # Code from module error:
5873 # Code from module exitfail:
5874 # Code from module extensions:
5875 # Code from module extern-inline:
5876 # Code from module fchdir:
5877 # Code from module fcntl:
5878 # Code from module fcntl-h:
5879 # Code from module fd-hook:
5880 # Code from module fdopendir:
5881 # Code from module filename:
5882 # Code from module filenamecat-lgpl:
5883 # Code from module flexmember:
5884 # Code from module float:
5885 # Code from module fnmatch:
5886 # Code from module fnmatch-gnu:
5887 # Code from module fpieee:
5888
5889 # Code from module fpucw:
5890 # Code from module frexp:
5891 # Code from module frexpl:
5892 # Code from module fstat:
5893 # Code from module fstatat:
5894 # Code from module getcwd:
5895 # Code from module getcwd-lgpl:
5896 # Code from module getdtablesize:
5897 # Code from module getlogin_r:
5898 # Code from module getprogname:
5899 # Code from module gettext-h:
5900 # Code from module gettimeofday:
5901 # Code from module glob:
5902 # Code from module hard-locale:
5903 # Code from module havelib:
5904 # Code from module include_next:
5905 # Code from module inet_ntop:
5906 # Code from module intprops:
5907 # Code from module inttypes:
5908 # Code from module inttypes-incomplete:
5909 # Code from module isnand-nolibm:
5910 # Code from module isnanl-nolibm:
5911 # Code from module largefile:
5912
5913 # Code from module limits-h:
5914 # Code from module localcharset:
5915 # Code from module lock:
5916 # Code from module lstat:
5917 # Code from module malloc-posix:
5918 # Code from module malloca:
5919 # Code from module math:
5920 # Code from module mbrtowc:
5921 # Code from module mbsinit:
5922 # Code from module mbsrtowcs:
5923 # Code from module memchr:
5924 # Code from module memmem:
5925 # Code from module memmem-simple:
5926 # Code from module mempcpy:
5927 # Code from module memrchr:
5928 # Code from module mkdir:
5929 # Code from module mkdtemp:
5930 # Code from module mkostemp:
5931 # Code from module msvc-inval:
5932 # Code from module msvc-nothrow:
5933 # Code from module multiarch:
5934 # Code from module netinet_in:
5935 # Code from module nocrash:
5936 # Code from module open:
5937 # Code from module openat:
5938 # Code from module openat-die:
5939 # Code from module openat-h:
5940 # Code from module opendir:
5941 # Code from module pathmax:
5942 # Code from module rawmemchr:
5943 # Code from module readdir:
5944 # Code from module readlink:
5945 # Code from module realloc-posix:
5946 # Code from module rename:
5947 # Code from module rewinddir:
5948 # Code from module rmdir:
5949 # Code from module same-inode:
5950 # Code from module save-cwd:
5951 # Code from module secure_getenv:
5952 # Code from module setenv:
5953 # Code from module signal-h:
5954 # Code from module snippet/_Noreturn:
5955 # Code from module snippet/arg-nonnull:
5956 # Code from module snippet/c++defs:
5957 # Code from module snippet/warn-on-use:
5958 # Code from module socklen:
5959 # Code from module ssize_t:
5960 # Code from module stat:
5961 # Code from module stdalign:
5962 # Code from module stdbool:
5963 # Code from module stddef:
5964 # Code from module stdint:
5965 # Code from module stdio:
5966 # Code from module stdlib:
5967 # Code from module strchrnul:
5968 # Code from module strdup-posix:
5969 # Code from module streq:
5970 # Code from module strerror:
5971 # Code from module strerror-override:
5972 # Code from module strerror_r-posix:
5973 # Code from module string:
5974 # Code from module strnlen1:
5975 # Code from module strstr:
5976 # Code from module strstr-simple:
5977 # Code from module strtok_r:
5978 # Code from module sys_socket:
5979 # Code from module sys_stat:
5980 # Code from module sys_time:
5981 # Code from module sys_types:
5982 # Code from module sys_uio:
5983 # Code from module tempname:
5984 # Code from module threadlib:
5985
5986
5987
5988 # Code from module time:
5989 # Code from module unistd:
5990 # Code from module unistd-safer:
5991 # Code from module unsetenv:
5992 # Code from module update-copyright:
5993 # Code from module verify:
5994 # Code from module wchar:
5995 # Code from module wctype-h:
5996
5997 ac_ext=c
5998 ac_cpp='$CPP $CPPFLAGS'
5999 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6000 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6001 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6002 if test -n "$ac_tool_prefix"; then
6003 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
6004 set dummy ${ac_tool_prefix}gcc; ac_word=$2
6005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6006 $as_echo_n "checking for $ac_word... " >&6; }
6007 if ${ac_cv_prog_CC+:} false; then :
6008 $as_echo_n "(cached) " >&6
6009 else
6010 if test -n "$CC"; then
6011 ac_cv_prog_CC="$CC" # Let the user override the test.
6012 else
6013 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6014 for as_dir in $PATH
6015 do
6016 IFS=$as_save_IFS
6017 test -z "$as_dir" && as_dir=.
6018 for ac_exec_ext in '' $ac_executable_extensions; do
6019 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6020 ac_cv_prog_CC="${ac_tool_prefix}gcc"
6021 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6022 break 2
6023 fi
6024 done
6025 done
6026 IFS=$as_save_IFS
6027
6028 fi
6029 fi
6030 CC=$ac_cv_prog_CC
6031 if test -n "$CC"; then
6032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6033 $as_echo "$CC" >&6; }
6034 else
6035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6036 $as_echo "no" >&6; }
6037 fi
6038
6039
6040 fi
6041 if test -z "$ac_cv_prog_CC"; then
6042 ac_ct_CC=$CC
6043 # Extract the first word of "gcc", so it can be a program name with args.
6044 set dummy gcc; ac_word=$2
6045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6046 $as_echo_n "checking for $ac_word... " >&6; }
6047 if ${ac_cv_prog_ac_ct_CC+:} false; then :
6048 $as_echo_n "(cached) " >&6
6049 else
6050 if test -n "$ac_ct_CC"; then
6051 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
6052 else
6053 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6054 for as_dir in $PATH
6055 do
6056 IFS=$as_save_IFS
6057 test -z "$as_dir" && as_dir=.
6058 for ac_exec_ext in '' $ac_executable_extensions; do
6059 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6060 ac_cv_prog_ac_ct_CC="gcc"
6061 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6062 break 2
6063 fi
6064 done
6065 done
6066 IFS=$as_save_IFS
6067
6068 fi
6069 fi
6070 ac_ct_CC=$ac_cv_prog_ac_ct_CC
6071 if test -n "$ac_ct_CC"; then
6072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
6073 $as_echo "$ac_ct_CC" >&6; }
6074 else
6075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6076 $as_echo "no" >&6; }
6077 fi
6078
6079 if test "x$ac_ct_CC" = x; then
6080 CC=""
6081 else
6082 case $cross_compiling:$ac_tool_warned in
6083 yes:)
6084 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6085 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6086 ac_tool_warned=yes ;;
6087 esac
6088 CC=$ac_ct_CC
6089 fi
6090 else
6091 CC="$ac_cv_prog_CC"
6092 fi
6093
6094 if test -z "$CC"; then
6095 if test -n "$ac_tool_prefix"; then
6096 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
6097 set dummy ${ac_tool_prefix}cc; ac_word=$2
6098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6099 $as_echo_n "checking for $ac_word... " >&6; }
6100 if ${ac_cv_prog_CC+:} false; then :
6101 $as_echo_n "(cached) " >&6
6102 else
6103 if test -n "$CC"; then
6104 ac_cv_prog_CC="$CC" # Let the user override the test.
6105 else
6106 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6107 for as_dir in $PATH
6108 do
6109 IFS=$as_save_IFS
6110 test -z "$as_dir" && as_dir=.
6111 for ac_exec_ext in '' $ac_executable_extensions; do
6112 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6113 ac_cv_prog_CC="${ac_tool_prefix}cc"
6114 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6115 break 2
6116 fi
6117 done
6118 done
6119 IFS=$as_save_IFS
6120
6121 fi
6122 fi
6123 CC=$ac_cv_prog_CC
6124 if test -n "$CC"; then
6125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6126 $as_echo "$CC" >&6; }
6127 else
6128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6129 $as_echo "no" >&6; }
6130 fi
6131
6132
6133 fi
6134 fi
6135 if test -z "$CC"; then
6136 # Extract the first word of "cc", so it can be a program name with args.
6137 set dummy cc; ac_word=$2
6138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6139 $as_echo_n "checking for $ac_word... " >&6; }
6140 if ${ac_cv_prog_CC+:} false; then :
6141 $as_echo_n "(cached) " >&6
6142 else
6143 if test -n "$CC"; then
6144 ac_cv_prog_CC="$CC" # Let the user override the test.
6145 else
6146 ac_prog_rejected=no
6147 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6148 for as_dir in $PATH
6149 do
6150 IFS=$as_save_IFS
6151 test -z "$as_dir" && as_dir=.
6152 for ac_exec_ext in '' $ac_executable_extensions; do
6153 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6154 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
6155 ac_prog_rejected=yes
6156 continue
6157 fi
6158 ac_cv_prog_CC="cc"
6159 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6160 break 2
6161 fi
6162 done
6163 done
6164 IFS=$as_save_IFS
6165
6166 if test $ac_prog_rejected = yes; then
6167 # We found a bogon in the path, so make sure we never use it.
6168 set dummy $ac_cv_prog_CC
6169 shift
6170 if test $# != 0; then
6171 # We chose a different compiler from the bogus one.
6172 # However, it has the same basename, so the bogon will be chosen
6173 # first if we set CC to just the basename; use the full file name.
6174 shift
6175 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
6176 fi
6177 fi
6178 fi
6179 fi
6180 CC=$ac_cv_prog_CC
6181 if test -n "$CC"; then
6182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6183 $as_echo "$CC" >&6; }
6184 else
6185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6186 $as_echo "no" >&6; }
6187 fi
6188
6189
6190 fi
6191 if test -z "$CC"; then
6192 if test -n "$ac_tool_prefix"; then
6193 for ac_prog in cl.exe
6194 do
6195 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6196 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6198 $as_echo_n "checking for $ac_word... " >&6; }
6199 if ${ac_cv_prog_CC+:} false; then :
6200 $as_echo_n "(cached) " >&6
6201 else
6202 if test -n "$CC"; then
6203 ac_cv_prog_CC="$CC" # Let the user override the test.
6204 else
6205 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6206 for as_dir in $PATH
6207 do
6208 IFS=$as_save_IFS
6209 test -z "$as_dir" && as_dir=.
6210 for ac_exec_ext in '' $ac_executable_extensions; do
6211 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6212 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
6213 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6214 break 2
6215 fi
6216 done
6217 done
6218 IFS=$as_save_IFS
6219
6220 fi
6221 fi
6222 CC=$ac_cv_prog_CC
6223 if test -n "$CC"; then
6224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6225 $as_echo "$CC" >&6; }
6226 else
6227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6228 $as_echo "no" >&6; }
6229 fi
6230
6231
6232 test -n "$CC" && break
6233 done
6234 fi
6235 if test -z "$CC"; then
6236 ac_ct_CC=$CC
6237 for ac_prog in cl.exe
6238 do
6239 # Extract the first word of "$ac_prog", so it can be a program name with args.
6240 set dummy $ac_prog; ac_word=$2
6241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6242 $as_echo_n "checking for $ac_word... " >&6; }
6243 if ${ac_cv_prog_ac_ct_CC+:} false; then :
6244 $as_echo_n "(cached) " >&6
6245 else
6246 if test -n "$ac_ct_CC"; then
6247 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
6248 else
6249 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6250 for as_dir in $PATH
6251 do
6252 IFS=$as_save_IFS
6253 test -z "$as_dir" && as_dir=.
6254 for ac_exec_ext in '' $ac_executable_extensions; do
6255 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6256 ac_cv_prog_ac_ct_CC="$ac_prog"
6257 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6258 break 2
6259 fi
6260 done
6261 done
6262 IFS=$as_save_IFS
6263
6264 fi
6265 fi
6266 ac_ct_CC=$ac_cv_prog_ac_ct_CC
6267 if test -n "$ac_ct_CC"; then
6268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
6269 $as_echo "$ac_ct_CC" >&6; }
6270 else
6271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6272 $as_echo "no" >&6; }
6273 fi
6274
6275
6276 test -n "$ac_ct_CC" && break
6277 done
6278
6279 if test "x$ac_ct_CC" = x; then
6280 CC=""
6281 else
6282 case $cross_compiling:$ac_tool_warned in
6283 yes:)
6284 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6285 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6286 ac_tool_warned=yes ;;
6287 esac
6288 CC=$ac_ct_CC
6289 fi
6290 fi
6291
6292 fi
6293
6294
6295 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6296 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6297 as_fn_error $? "no acceptable C compiler found in \$PATH
6298 See \`config.log' for more details" "$LINENO" 5; }
6299
6300 # Provide some information about the compiler.
6301 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
6302 set X $ac_compile
6303 ac_compiler=$2
6304 for ac_option in --version -v -V -qversion; do
6305 { { ac_try="$ac_compiler $ac_option >&5"
6306 case "(($ac_try" in
6307 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6308 *) ac_try_echo=$ac_try;;
6309 esac
6310 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
6311 $as_echo "$ac_try_echo"; } >&5
6312 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
6313 ac_status=$?
6314 if test -s conftest.err; then
6315 sed '10a\
6316 ... rest of stderr output deleted ...
6317 10q' conftest.err >conftest.er1
6318 cat conftest.er1 >&5
6319 fi
6320 rm -f conftest.er1 conftest.err
6321 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6322 test $ac_status = 0; }
6323 done
6324
6325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
6326 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
6327 if ${ac_cv_c_compiler_gnu+:} false; then :
6328 $as_echo_n "(cached) " >&6
6329 else
6330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6331 /* end confdefs.h. */
6332
6333 int
6334 main ()
6335 {
6336 #ifndef __GNUC__
6337 choke me
6338 #endif
6339
6340 ;
6341 return 0;
6342 }
6343 _ACEOF
6344 if ac_fn_c_try_compile "$LINENO"; then :
6345 ac_compiler_gnu=yes
6346 else
6347 ac_compiler_gnu=no
6348 fi
6349 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6350 ac_cv_c_compiler_gnu=$ac_compiler_gnu
6351
6352 fi
6353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
6354 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
6355 if test $ac_compiler_gnu = yes; then
6356 GCC=yes
6357 else
6358 GCC=
6359 fi
6360 ac_test_CFLAGS=${CFLAGS+set}
6361 ac_save_CFLAGS=$CFLAGS
6362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
6363 $as_echo_n "checking whether $CC accepts -g... " >&6; }
6364 if ${ac_cv_prog_cc_g+:} false; then :
6365 $as_echo_n "(cached) " >&6
6366 else
6367 ac_save_c_werror_flag=$ac_c_werror_flag
6368 ac_c_werror_flag=yes
6369 ac_cv_prog_cc_g=no
6370 CFLAGS="-g"
6371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6372 /* end confdefs.h. */
6373
6374 int
6375 main ()
6376 {
6377
6378 ;
6379 return 0;
6380 }
6381 _ACEOF
6382 if ac_fn_c_try_compile "$LINENO"; then :
6383 ac_cv_prog_cc_g=yes
6384 else
6385 CFLAGS=""
6386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6387 /* end confdefs.h. */
6388
6389 int
6390 main ()
6391 {
6392
6393 ;
6394 return 0;
6395 }
6396 _ACEOF
6397 if ac_fn_c_try_compile "$LINENO"; then :
6398
6399 else
6400 ac_c_werror_flag=$ac_save_c_werror_flag
6401 CFLAGS="-g"
6402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6403 /* end confdefs.h. */
6404
6405 int
6406 main ()
6407 {
6408
6409 ;
6410 return 0;
6411 }
6412 _ACEOF
6413 if ac_fn_c_try_compile "$LINENO"; then :
6414 ac_cv_prog_cc_g=yes
6415 fi
6416 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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 ac_c_werror_flag=$ac_save_c_werror_flag
6422 fi
6423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
6424 $as_echo "$ac_cv_prog_cc_g" >&6; }
6425 if test "$ac_test_CFLAGS" = set; then
6426 CFLAGS=$ac_save_CFLAGS
6427 elif test $ac_cv_prog_cc_g = yes; then
6428 if test "$GCC" = yes; then
6429 CFLAGS="-g -O2"
6430 else
6431 CFLAGS="-g"
6432 fi
6433 else
6434 if test "$GCC" = yes; then
6435 CFLAGS="-O2"
6436 else
6437 CFLAGS=
6438 fi
6439 fi
6440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
6441 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
6442 if ${ac_cv_prog_cc_c89+:} false; then :
6443 $as_echo_n "(cached) " >&6
6444 else
6445 ac_cv_prog_cc_c89=no
6446 ac_save_CC=$CC
6447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6448 /* end confdefs.h. */
6449 #include <stdarg.h>
6450 #include <stdio.h>
6451 struct stat;
6452 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
6453 struct buf { int x; };
6454 FILE * (*rcsopen) (struct buf *, struct stat *, int);
6455 static char *e (p, i)
6456 char **p;
6457 int i;
6458 {
6459 return p[i];
6460 }
6461 static char *f (char * (*g) (char **, int), char **p, ...)
6462 {
6463 char *s;
6464 va_list v;
6465 va_start (v,p);
6466 s = g (p, va_arg (v,int));
6467 va_end (v);
6468 return s;
6469 }
6470
6471 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
6472 function prototypes and stuff, but not '\xHH' hex character constants.
6473 These don't provoke an error unfortunately, instead are silently treated
6474 as 'x'. The following induces an error, until -std is added to get
6475 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
6476 array size at least. It's necessary to write '\x00'==0 to get something
6477 that's true only with -std. */
6478 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
6479
6480 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
6481 inside strings and character constants. */
6482 #define FOO(x) 'x'
6483 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
6484
6485 int test (int i, double x);
6486 struct s1 {int (*f) (int a);};
6487 struct s2 {int (*f) (double a);};
6488 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
6489 int argc;
6490 char **argv;
6491 int
6492 main ()
6493 {
6494 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
6495 ;
6496 return 0;
6497 }
6498 _ACEOF
6499 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
6500 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6501 do
6502 CC="$ac_save_CC $ac_arg"
6503 if ac_fn_c_try_compile "$LINENO"; then :
6504 ac_cv_prog_cc_c89=$ac_arg
6505 fi
6506 rm -f core conftest.err conftest.$ac_objext
6507 test "x$ac_cv_prog_cc_c89" != "xno" && break
6508 done
6509 rm -f conftest.$ac_ext
6510 CC=$ac_save_CC
6511
6512 fi
6513 # AC_CACHE_VAL
6514 case "x$ac_cv_prog_cc_c89" in
6515 x)
6516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6517 $as_echo "none needed" >&6; } ;;
6518 xno)
6519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6520 $as_echo "unsupported" >&6; } ;;
6521 *)
6522 CC="$CC $ac_cv_prog_cc_c89"
6523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
6524 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
6525 esac
6526 if test "x$ac_cv_prog_cc_c89" != xno; then :
6527
6528 fi
6529
6530 ac_ext=c
6531 ac_cpp='$CPP $CPPFLAGS'
6532 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6533 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6534 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6535
6536 ac_ext=c
6537 ac_cpp='$CPP $CPPFLAGS'
6538 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6539 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6540 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
6542 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
6543 if ${am_cv_prog_cc_c_o+:} false; then :
6544 $as_echo_n "(cached) " >&6
6545 else
6546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6547 /* end confdefs.h. */
6548
6549 int
6550 main ()
6551 {
6552
6553 ;
6554 return 0;
6555 }
6556 _ACEOF
6557 # Make sure it works both with $CC and with simple cc.
6558 # Following AC_PROG_CC_C_O, we do the test twice because some
6559 # compilers refuse to overwrite an existing .o file with -o,
6560 # though they will create one.
6561 am_cv_prog_cc_c_o=yes
6562 for am_i in 1 2; do
6563 if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
6564 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
6565 ac_status=$?
6566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6567 (exit $ac_status); } \
6568 && test -f conftest2.$ac_objext; then
6569 : OK
6570 else
6571 am_cv_prog_cc_c_o=no
6572 break
6573 fi
6574 done
6575 rm -f core conftest*
6576 unset am_i
6577 fi
6578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
6579 $as_echo "$am_cv_prog_cc_c_o" >&6; }
6580 if test "$am_cv_prog_cc_c_o" != yes; then
6581 # Losing compiler, so override with the script.
6582 # FIXME: It is wrong to rewrite CC.
6583 # But if we don't then we get into trouble of one sort or another.
6584 # A longer-term fix would be to have automake use am__CC in this case,
6585 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
6586 CC="$am_aux_dir/compile $CC"
6587 fi
6588 ac_ext=c
6589 ac_cpp='$CPP $CPPFLAGS'
6590 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6591 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6592 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6593
6594
6595 am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
6596
6597
6598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6599 $as_echo_n "checking target system type... " >&6; }
6600 if ${ac_cv_target+:} false; then :
6601 $as_echo_n "(cached) " >&6
6602 else
6603 if test "x$target_alias" = x; then
6604 ac_cv_target=$ac_cv_host
6605 else
6606 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6607 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6608 fi
6609
6610 fi
6611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6612 $as_echo "$ac_cv_target" >&6; }
6613 case $ac_cv_target in
6614 *-*-*) ;;
6615 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6616 esac
6617 target=$ac_cv_target
6618 ac_save_IFS=$IFS; IFS='-'
6619 set x $ac_cv_target
6620 shift
6621 target_cpu=$1
6622 target_vendor=$2
6623 shift; shift
6624 # Remember, the first character of IFS is used to create $*,
6625 # except with old shells:
6626 target_os=$*
6627 IFS=$ac_save_IFS
6628 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6629
6630
6631 # The aliases save the names the user supplied, while $host etc.
6632 # will get canonicalized.
6633 test -n "$target_alias" &&
6634 test "$program_prefix$program_suffix$program_transform_name" = \
6635 NONENONEs,x,x, &&
6636 program_prefix=${target_alias}-
6637
6638 # The tests for host and target for $enable_largefile require
6639 # canonical names.
6640
6641
6642
6643 # As the $enable_largefile decision depends on --enable-plugins we must set it
6644 # even in directories otherwise not depending on the $plugins option.
6645
6646
6647 maybe_plugins=no
6648 for ac_header in dlfcn.h
6649 do :
6650 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
6651 "
6652 if test "x$ac_cv_header_dlfcn_h" = xyes; then :
6653 cat >>confdefs.h <<_ACEOF
6654 #define HAVE_DLFCN_H 1
6655 _ACEOF
6656 maybe_plugins=yes
6657 fi
6658
6659 done
6660
6661 for ac_header in windows.h
6662 do :
6663 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
6664 "
6665 if test "x$ac_cv_header_windows_h" = xyes; then :
6666 cat >>confdefs.h <<_ACEOF
6667 #define HAVE_WINDOWS_H 1
6668 _ACEOF
6669 maybe_plugins=yes
6670 fi
6671
6672 done
6673
6674
6675 # Check whether --enable-plugins was given.
6676 if test "${enable_plugins+set}" = set; then :
6677 enableval=$enable_plugins; case "${enableval}" in
6678 no) plugins=no ;;
6679 *) plugins=yes
6680 if test "$maybe_plugins" != "yes" ; then
6681 as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
6682 fi ;;
6683 esac
6684 else
6685 plugins=$maybe_plugins
6686
6687 fi
6688
6689 if test "$plugins" = "yes"; then
6690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
6691 $as_echo_n "checking for library containing dlsym... " >&6; }
6692 if ${ac_cv_search_dlsym+:} false; then :
6693 $as_echo_n "(cached) " >&6
6694 else
6695 ac_func_search_save_LIBS=$LIBS
6696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6697 /* end confdefs.h. */
6698
6699 /* Override any GCC internal prototype to avoid an error.
6700 Use char because int might match the return type of a GCC
6701 builtin and then its argument prototype would still apply. */
6702 #ifdef __cplusplus
6703 extern "C"
6704 #endif
6705 char dlsym ();
6706 int
6707 main ()
6708 {
6709 return dlsym ();
6710 ;
6711 return 0;
6712 }
6713 _ACEOF
6714 for ac_lib in '' dl; do
6715 if test -z "$ac_lib"; then
6716 ac_res="none required"
6717 else
6718 ac_res=-l$ac_lib
6719 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
6720 fi
6721 if ac_fn_c_try_link "$LINENO"; then :
6722 ac_cv_search_dlsym=$ac_res
6723 fi
6724 rm -f core conftest.err conftest.$ac_objext \
6725 conftest$ac_exeext
6726 if ${ac_cv_search_dlsym+:} false; then :
6727 break
6728 fi
6729 done
6730 if ${ac_cv_search_dlsym+:} false; then :
6731
6732 else
6733 ac_cv_search_dlsym=no
6734 fi
6735 rm conftest.$ac_ext
6736 LIBS=$ac_func_search_save_LIBS
6737 fi
6738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
6739 $as_echo "$ac_cv_search_dlsym" >&6; }
6740 ac_res=$ac_cv_search_dlsym
6741 if test "$ac_res" != no; then :
6742 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6743
6744 fi
6745
6746 fi
6747
6748
6749 case "${host}" in
6750 sparc-*-solaris*|i[3-7]86-*-solaris*)
6751 # On native 32bit sparc and ia32 solaris, large-file and procfs support
6752 # are mutually exclusive; and without procfs support, the bfd/ elf module
6753 # cannot provide certain routines such as elfcore_write_prpsinfo
6754 # or elfcore_write_prstatus. So unless the user explicitly requested
6755 # large-file support through the --enable-largefile switch, disable
6756 # large-file support in favor of procfs support.
6757 test "${target}" = "${host}" -a "x$plugins" = xno \
6758 && : ${enable_largefile="no"}
6759 ;;
6760 esac
6761
6762 # Check whether --enable-largefile was given.
6763 if test "${enable_largefile+set}" = set; then :
6764 enableval=$enable_largefile;
6765 fi
6766
6767 if test "$enable_largefile" != no; then
6768
6769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
6770 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
6771 if ${ac_cv_sys_largefile_CC+:} false; then :
6772 $as_echo_n "(cached) " >&6
6773 else
6774 ac_cv_sys_largefile_CC=no
6775 if test "$GCC" != yes; then
6776 ac_save_CC=$CC
6777 while :; do
6778 # IRIX 6.2 and later do not support large files by default,
6779 # so use the C compiler's -n32 option if that helps.
6780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6781 /* end confdefs.h. */
6782 #include <sys/types.h>
6783 /* Check that off_t can represent 2**63 - 1 correctly.
6784 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6785 since some C++ compilers masquerading as C compilers
6786 incorrectly reject 9223372036854775807. */
6787 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6788 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6789 && LARGE_OFF_T % 2147483647 == 1)
6790 ? 1 : -1];
6791 int
6792 main ()
6793 {
6794
6795 ;
6796 return 0;
6797 }
6798 _ACEOF
6799 if ac_fn_c_try_compile "$LINENO"; then :
6800 break
6801 fi
6802 rm -f core conftest.err conftest.$ac_objext
6803 CC="$CC -n32"
6804 if ac_fn_c_try_compile "$LINENO"; then :
6805 ac_cv_sys_largefile_CC=' -n32'; break
6806 fi
6807 rm -f core conftest.err conftest.$ac_objext
6808 break
6809 done
6810 CC=$ac_save_CC
6811 rm -f conftest.$ac_ext
6812 fi
6813 fi
6814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
6815 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
6816 if test "$ac_cv_sys_largefile_CC" != no; then
6817 CC=$CC$ac_cv_sys_largefile_CC
6818 fi
6819
6820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
6821 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
6822 if ${ac_cv_sys_file_offset_bits+:} false; then :
6823 $as_echo_n "(cached) " >&6
6824 else
6825 while :; do
6826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6827 /* end confdefs.h. */
6828 #include <sys/types.h>
6829 /* Check that off_t can represent 2**63 - 1 correctly.
6830 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6831 since some C++ compilers masquerading as C compilers
6832 incorrectly reject 9223372036854775807. */
6833 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6834 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6835 && LARGE_OFF_T % 2147483647 == 1)
6836 ? 1 : -1];
6837 int
6838 main ()
6839 {
6840
6841 ;
6842 return 0;
6843 }
6844 _ACEOF
6845 if ac_fn_c_try_compile "$LINENO"; then :
6846 ac_cv_sys_file_offset_bits=no; break
6847 fi
6848 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6850 /* end confdefs.h. */
6851 #define _FILE_OFFSET_BITS 64
6852 #include <sys/types.h>
6853 /* Check that off_t can represent 2**63 - 1 correctly.
6854 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6855 since some C++ compilers masquerading as C compilers
6856 incorrectly reject 9223372036854775807. */
6857 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6858 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6859 && LARGE_OFF_T % 2147483647 == 1)
6860 ? 1 : -1];
6861 int
6862 main ()
6863 {
6864
6865 ;
6866 return 0;
6867 }
6868 _ACEOF
6869 if ac_fn_c_try_compile "$LINENO"; then :
6870 ac_cv_sys_file_offset_bits=64; break
6871 fi
6872 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6873 ac_cv_sys_file_offset_bits=unknown
6874 break
6875 done
6876 fi
6877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
6878 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
6879 case $ac_cv_sys_file_offset_bits in #(
6880 no | unknown) ;;
6881 *)
6882 cat >>confdefs.h <<_ACEOF
6883 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
6884 _ACEOF
6885 ;;
6886 esac
6887 rm -rf conftest*
6888 if test $ac_cv_sys_file_offset_bits = unknown; then
6889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
6890 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
6891 if ${ac_cv_sys_large_files+:} false; then :
6892 $as_echo_n "(cached) " >&6
6893 else
6894 while :; do
6895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6896 /* end confdefs.h. */
6897 #include <sys/types.h>
6898 /* Check that off_t can represent 2**63 - 1 correctly.
6899 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6900 since some C++ compilers masquerading as C compilers
6901 incorrectly reject 9223372036854775807. */
6902 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6903 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6904 && LARGE_OFF_T % 2147483647 == 1)
6905 ? 1 : -1];
6906 int
6907 main ()
6908 {
6909
6910 ;
6911 return 0;
6912 }
6913 _ACEOF
6914 if ac_fn_c_try_compile "$LINENO"; then :
6915 ac_cv_sys_large_files=no; break
6916 fi
6917 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6919 /* end confdefs.h. */
6920 #define _LARGE_FILES 1
6921 #include <sys/types.h>
6922 /* Check that off_t can represent 2**63 - 1 correctly.
6923 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6924 since some C++ compilers masquerading as C compilers
6925 incorrectly reject 9223372036854775807. */
6926 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6927 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6928 && LARGE_OFF_T % 2147483647 == 1)
6929 ? 1 : -1];
6930 int
6931 main ()
6932 {
6933
6934 ;
6935 return 0;
6936 }
6937 _ACEOF
6938 if ac_fn_c_try_compile "$LINENO"; then :
6939 ac_cv_sys_large_files=1; break
6940 fi
6941 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6942 ac_cv_sys_large_files=unknown
6943 break
6944 done
6945 fi
6946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
6947 $as_echo "$ac_cv_sys_large_files" >&6; }
6948 case $ac_cv_sys_large_files in #(
6949 no | unknown) ;;
6950 *)
6951 cat >>confdefs.h <<_ACEOF
6952 #define _LARGE_FILES $ac_cv_sys_large_files
6953 _ACEOF
6954 ;;
6955 esac
6956 rm -rf conftest*
6957 fi
6958
6959
6960 $as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
6961
6962 fi
6963
6964
6965
6966 ac_aux_dir=
6967 for ac_dir in .. "$srcdir"/..; do
6968 if test -f "$ac_dir/install-sh"; then
6969 ac_aux_dir=$ac_dir
6970 ac_install_sh="$ac_aux_dir/install-sh -c"
6971 break
6972 elif test -f "$ac_dir/install.sh"; then
6973 ac_aux_dir=$ac_dir
6974 ac_install_sh="$ac_aux_dir/install.sh -c"
6975 break
6976 elif test -f "$ac_dir/shtool"; then
6977 ac_aux_dir=$ac_dir
6978 ac_install_sh="$ac_aux_dir/shtool install -c"
6979 break
6980 fi
6981 done
6982 if test -z "$ac_aux_dir"; then
6983 as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
6984 fi
6985
6986 # These three variables are undocumented and unsupported,
6987 # and are intended to be withdrawn in a future Autoconf release.
6988 # They can cause serious problems if a builder's source tree is in a directory
6989 # whose full name contains unusual characters.
6990 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
6991 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
6992 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002 LIBC_FATAL_STDERR_=1
7003 export LIBC_FATAL_STDERR_
7004
7005 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
7006 if test "x$ac_cv_type_size_t" = xyes; then :
7007
7008 else
7009
7010 cat >>confdefs.h <<_ACEOF
7011 #define size_t unsigned int
7012 _ACEOF
7013
7014 fi
7015
7016 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
7017 # for constant arguments. Useless!
7018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
7019 $as_echo_n "checking for working alloca.h... " >&6; }
7020 if ${ac_cv_working_alloca_h+:} false; then :
7021 $as_echo_n "(cached) " >&6
7022 else
7023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7024 /* end confdefs.h. */
7025 #include <alloca.h>
7026 int
7027 main ()
7028 {
7029 char *p = (char *) alloca (2 * sizeof (int));
7030 if (p) return 0;
7031 ;
7032 return 0;
7033 }
7034 _ACEOF
7035 if ac_fn_c_try_link "$LINENO"; then :
7036 ac_cv_working_alloca_h=yes
7037 else
7038 ac_cv_working_alloca_h=no
7039 fi
7040 rm -f core conftest.err conftest.$ac_objext \
7041 conftest$ac_exeext conftest.$ac_ext
7042 fi
7043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
7044 $as_echo "$ac_cv_working_alloca_h" >&6; }
7045 if test $ac_cv_working_alloca_h = yes; then
7046
7047 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
7048
7049 fi
7050
7051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
7052 $as_echo_n "checking for alloca... " >&6; }
7053 if ${ac_cv_func_alloca_works+:} false; then :
7054 $as_echo_n "(cached) " >&6
7055 else
7056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7057 /* end confdefs.h. */
7058 #ifdef __GNUC__
7059 # define alloca __builtin_alloca
7060 #else
7061 # ifdef _MSC_VER
7062 # include <malloc.h>
7063 # define alloca _alloca
7064 # else
7065 # ifdef HAVE_ALLOCA_H
7066 # include <alloca.h>
7067 # else
7068 # ifdef _AIX
7069 #pragma alloca
7070 # else
7071 # ifndef alloca /* predefined by HP cc +Olibcalls */
7072 void *alloca (size_t);
7073 # endif
7074 # endif
7075 # endif
7076 # endif
7077 #endif
7078
7079 int
7080 main ()
7081 {
7082 char *p = (char *) alloca (1);
7083 if (p) return 0;
7084 ;
7085 return 0;
7086 }
7087 _ACEOF
7088 if ac_fn_c_try_link "$LINENO"; then :
7089 ac_cv_func_alloca_works=yes
7090 else
7091 ac_cv_func_alloca_works=no
7092 fi
7093 rm -f core conftest.err conftest.$ac_objext \
7094 conftest$ac_exeext conftest.$ac_ext
7095 fi
7096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
7097 $as_echo "$ac_cv_func_alloca_works" >&6; }
7098
7099 if test $ac_cv_func_alloca_works = yes; then
7100
7101 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
7102
7103 else
7104 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
7105 # that cause trouble. Some versions do not even contain alloca or
7106 # contain a buggy version. If you still want to use their alloca,
7107 # use ar to extract alloca.o from them instead of compiling alloca.c.
7108
7109
7110
7111
7112
7113 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
7114
7115 $as_echo "#define C_ALLOCA 1" >>confdefs.h
7116
7117
7118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
7119 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
7120 if ${ac_cv_os_cray+:} false; then :
7121 $as_echo_n "(cached) " >&6
7122 else
7123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7124 /* end confdefs.h. */
7125 #if defined CRAY && ! defined CRAY2
7126 webecray
7127 #else
7128 wenotbecray
7129 #endif
7130
7131 _ACEOF
7132 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7133 $EGREP "webecray" >/dev/null 2>&1; then :
7134 ac_cv_os_cray=yes
7135 else
7136 ac_cv_os_cray=no
7137 fi
7138 rm -f conftest*
7139
7140 fi
7141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
7142 $as_echo "$ac_cv_os_cray" >&6; }
7143 if test $ac_cv_os_cray = yes; then
7144 for ac_func in _getb67 GETB67 getb67; do
7145 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7146 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7147 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7148
7149 cat >>confdefs.h <<_ACEOF
7150 #define CRAY_STACKSEG_END $ac_func
7151 _ACEOF
7152
7153 break
7154 fi
7155
7156 done
7157 fi
7158
7159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
7160 $as_echo_n "checking stack direction for C alloca... " >&6; }
7161 if ${ac_cv_c_stack_direction+:} false; then :
7162 $as_echo_n "(cached) " >&6
7163 else
7164 if test "$cross_compiling" = yes; then :
7165 ac_cv_c_stack_direction=0
7166 else
7167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7168 /* end confdefs.h. */
7169 $ac_includes_default
7170 int
7171 find_stack_direction (int *addr, int depth)
7172 {
7173 int dir, dummy = 0;
7174 if (! addr)
7175 addr = &dummy;
7176 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
7177 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
7178 return dir + dummy;
7179 }
7180
7181 int
7182 main (int argc, char **argv)
7183 {
7184 return find_stack_direction (0, argc + !argv + 20) < 0;
7185 }
7186 _ACEOF
7187 if ac_fn_c_try_run "$LINENO"; then :
7188 ac_cv_c_stack_direction=1
7189 else
7190 ac_cv_c_stack_direction=-1
7191 fi
7192 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7193 conftest.$ac_objext conftest.beam conftest.$ac_ext
7194 fi
7195
7196 fi
7197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
7198 $as_echo "$ac_cv_c_stack_direction" >&6; }
7199 cat >>confdefs.h <<_ACEOF
7200 #define STACK_DIRECTION $ac_cv_c_stack_direction
7201 _ACEOF
7202
7203
7204 fi
7205
7206
7207 GNULIB_INET_NTOP=0;
7208 GNULIB_INET_PTON=0;
7209 HAVE_DECL_INET_NTOP=1;
7210 HAVE_DECL_INET_PTON=1;
7211 REPLACE_INET_NTOP=0;
7212 REPLACE_INET_PTON=0;
7213
7214
7215
7216
7217
7218 for ac_header in $gl_header_list
7219 do :
7220 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7221 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
7222 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7223 cat >>confdefs.h <<_ACEOF
7224 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7225 _ACEOF
7226
7227 fi
7228
7229 done
7230
7231
7232
7233
7234
7235
7236
7237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
7238 $as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
7239 if ${gl_cv_have_include_next+:} false; then :
7240 $as_echo_n "(cached) " >&6
7241 else
7242 rm -rf conftestd1a conftestd1b conftestd2
7243 mkdir conftestd1a conftestd1b conftestd2
7244 cat <<EOF > conftestd1a/conftest.h
7245 #define DEFINED_IN_CONFTESTD1
7246 #include_next <conftest.h>
7247 #ifdef DEFINED_IN_CONFTESTD2
7248 int foo;
7249 #else
7250 #error "include_next doesn't work"
7251 #endif
7252 EOF
7253 cat <<EOF > conftestd1b/conftest.h
7254 #define DEFINED_IN_CONFTESTD1
7255 #include <stdio.h>
7256 #include_next <conftest.h>
7257 #ifdef DEFINED_IN_CONFTESTD2
7258 int foo;
7259 #else
7260 #error "include_next doesn't work"
7261 #endif
7262 EOF
7263 cat <<EOF > conftestd2/conftest.h
7264 #ifndef DEFINED_IN_CONFTESTD1
7265 #error "include_next test doesn't work"
7266 #endif
7267 #define DEFINED_IN_CONFTESTD2
7268 EOF
7269 gl_save_CPPFLAGS="$CPPFLAGS"
7270 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
7271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7272 /* end confdefs.h. */
7273 #include <conftest.h>
7274 _ACEOF
7275 if ac_fn_c_try_compile "$LINENO"; then :
7276 gl_cv_have_include_next=yes
7277 else
7278 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
7279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7280 /* end confdefs.h. */
7281 #include <conftest.h>
7282 _ACEOF
7283 if ac_fn_c_try_compile "$LINENO"; then :
7284 gl_cv_have_include_next=buggy
7285 else
7286 gl_cv_have_include_next=no
7287 fi
7288 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7289
7290 fi
7291 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7292 CPPFLAGS="$gl_save_CPPFLAGS"
7293 rm -rf conftestd1a conftestd1b conftestd2
7294
7295 fi
7296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
7297 $as_echo "$gl_cv_have_include_next" >&6; }
7298 PRAGMA_SYSTEM_HEADER=
7299 if test $gl_cv_have_include_next = yes; then
7300 INCLUDE_NEXT=include_next
7301 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
7302 if test -n "$GCC"; then
7303 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
7304 fi
7305 else
7306 if test $gl_cv_have_include_next = buggy; then
7307 INCLUDE_NEXT=include
7308 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
7309 else
7310 INCLUDE_NEXT=include
7311 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
7312 fi
7313 fi
7314
7315
7316
7317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
7318 $as_echo_n "checking whether system header files limit the line length... " >&6; }
7319 if ${gl_cv_pragma_columns+:} false; then :
7320 $as_echo_n "(cached) " >&6
7321 else
7322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7323 /* end confdefs.h. */
7324
7325 #ifdef __TANDEM
7326 choke me
7327 #endif
7328
7329 _ACEOF
7330 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7331 $EGREP "choke me" >/dev/null 2>&1; then :
7332 gl_cv_pragma_columns=yes
7333 else
7334 gl_cv_pragma_columns=no
7335 fi
7336 rm -f conftest*
7337
7338
7339 fi
7340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
7341 $as_echo "$gl_cv_pragma_columns" >&6; }
7342 if test $gl_cv_pragma_columns = yes; then
7343 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
7344 else
7345 PRAGMA_COLUMNS=
7346 fi
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356 :
7357
7358
7359
7360
7361
7362 if test $ac_cv_header_features_h = yes; then
7363 HAVE_FEATURES_H=1
7364 else
7365 HAVE_FEATURES_H=0
7366 fi
7367
7368
7369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
7370 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
7371 if test -z "$MKDIR_P"; then
7372 if ${ac_cv_path_mkdir+:} false; then :
7373 $as_echo_n "(cached) " >&6
7374 else
7375 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7376 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
7377 do
7378 IFS=$as_save_IFS
7379 test -z "$as_dir" && as_dir=.
7380 for ac_prog in mkdir gmkdir; do
7381 for ac_exec_ext in '' $ac_executable_extensions; do
7382 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
7383 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
7384 'mkdir (GNU coreutils) '* | \
7385 'mkdir (coreutils) '* | \
7386 'mkdir (fileutils) '4.1*)
7387 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
7388 break 3;;
7389 esac
7390 done
7391 done
7392 done
7393 IFS=$as_save_IFS
7394
7395 fi
7396
7397 test -d ./--version && rmdir ./--version
7398 if test "${ac_cv_path_mkdir+set}" = set; then
7399 MKDIR_P="$ac_cv_path_mkdir -p"
7400 else
7401 # As a last resort, use the slow shell script. Don't cache a
7402 # value for MKDIR_P within a source directory, because that will
7403 # break other packages using the cache if that directory is
7404 # removed, or if the value is a relative name.
7405 MKDIR_P="$ac_install_sh -d"
7406 fi
7407 fi
7408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
7409 $as_echo "$MKDIR_P" >&6; }
7410
7411
7412 GNULIB__EXIT=0;
7413 GNULIB_ATOLL=0;
7414 GNULIB_CALLOC_POSIX=0;
7415 GNULIB_CANONICALIZE_FILE_NAME=0;
7416 GNULIB_GETLOADAVG=0;
7417 GNULIB_GETSUBOPT=0;
7418 GNULIB_GRANTPT=0;
7419 GNULIB_MALLOC_POSIX=0;
7420 GNULIB_MBTOWC=0;
7421 GNULIB_MKDTEMP=0;
7422 GNULIB_MKOSTEMP=0;
7423 GNULIB_MKOSTEMPS=0;
7424 GNULIB_MKSTEMP=0;
7425 GNULIB_MKSTEMPS=0;
7426 GNULIB_POSIX_OPENPT=0;
7427 GNULIB_PTSNAME=0;
7428 GNULIB_PTSNAME_R=0;
7429 GNULIB_PUTENV=0;
7430 GNULIB_QSORT_R=0;
7431 GNULIB_RANDOM=0;
7432 GNULIB_RANDOM_R=0;
7433 GNULIB_REALLOC_POSIX=0;
7434 GNULIB_REALPATH=0;
7435 GNULIB_RPMATCH=0;
7436 GNULIB_SECURE_GETENV=0;
7437 GNULIB_SETENV=0;
7438 GNULIB_STRTOD=0;
7439 GNULIB_STRTOLL=0;
7440 GNULIB_STRTOULL=0;
7441 GNULIB_SYSTEM_POSIX=0;
7442 GNULIB_UNLOCKPT=0;
7443 GNULIB_UNSETENV=0;
7444 GNULIB_WCTOMB=0;
7445 HAVE__EXIT=1;
7446 HAVE_ATOLL=1;
7447 HAVE_CANONICALIZE_FILE_NAME=1;
7448 HAVE_DECL_GETLOADAVG=1;
7449 HAVE_GETSUBOPT=1;
7450 HAVE_GRANTPT=1;
7451 HAVE_MKDTEMP=1;
7452 HAVE_MKOSTEMP=1;
7453 HAVE_MKOSTEMPS=1;
7454 HAVE_MKSTEMP=1;
7455 HAVE_MKSTEMPS=1;
7456 HAVE_POSIX_OPENPT=1;
7457 HAVE_PTSNAME=1;
7458 HAVE_PTSNAME_R=1;
7459 HAVE_QSORT_R=1;
7460 HAVE_RANDOM=1;
7461 HAVE_RANDOM_H=1;
7462 HAVE_RANDOM_R=1;
7463 HAVE_REALPATH=1;
7464 HAVE_RPMATCH=1;
7465 HAVE_SECURE_GETENV=1;
7466 HAVE_SETENV=1;
7467 HAVE_DECL_SETENV=1;
7468 HAVE_STRTOD=1;
7469 HAVE_STRTOLL=1;
7470 HAVE_STRTOULL=1;
7471 HAVE_STRUCT_RANDOM_DATA=1;
7472 HAVE_SYS_LOADAVG_H=0;
7473 HAVE_UNLOCKPT=1;
7474 HAVE_DECL_UNSETENV=1;
7475 REPLACE_CALLOC=0;
7476 REPLACE_CANONICALIZE_FILE_NAME=0;
7477 REPLACE_MALLOC=0;
7478 REPLACE_MBTOWC=0;
7479 REPLACE_MKSTEMP=0;
7480 REPLACE_PTSNAME=0;
7481 REPLACE_PTSNAME_R=0;
7482 REPLACE_PUTENV=0;
7483 REPLACE_QSORT_R=0;
7484 REPLACE_RANDOM_R=0;
7485 REPLACE_REALLOC=0;
7486 REPLACE_REALPATH=0;
7487 REPLACE_SETENV=0;
7488 REPLACE_STRTOD=0;
7489 REPLACE_UNSETENV=0;
7490 REPLACE_WCTOMB=0;
7491
7492
7493
7494
7495
7496 for ac_func in $gl_func_list
7497 do :
7498 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7499 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7500 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7501 cat >>confdefs.h <<_ACEOF
7502 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7503 _ACEOF
7504
7505 fi
7506 done
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
7525 $as_echo_n "checking whether // is distinct from /... " >&6; }
7526 if ${gl_cv_double_slash_root+:} false; then :
7527 $as_echo_n "(cached) " >&6
7528 else
7529 if test x"$cross_compiling" = xyes ; then
7530 # When cross-compiling, there is no way to tell whether // is special
7531 # short of a list of hosts. However, the only known hosts to date
7532 # that have a distinct // are Apollo DomainOS (too old to port to),
7533 # Cygwin, and z/OS. If anyone knows of another system for which // has
7534 # special semantics and is distinct from /, please report it to
7535 # <bug-gnulib@gnu.org>.
7536 case $host in
7537 *-cygwin | i370-ibm-openedition)
7538 gl_cv_double_slash_root=yes ;;
7539 *)
7540 # Be optimistic and assume that / and // are the same when we
7541 # don't know.
7542 gl_cv_double_slash_root='unknown, assuming no' ;;
7543 esac
7544 else
7545 set x `ls -di / // 2>/dev/null`
7546 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
7547 gl_cv_double_slash_root=no
7548 else
7549 gl_cv_double_slash_root=yes
7550 fi
7551 fi
7552 fi
7553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
7554 $as_echo "$gl_cv_double_slash_root" >&6; }
7555 if test "$gl_cv_double_slash_root" = yes; then
7556
7557 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
7558
7559 fi
7560
7561
7562
7563
7564
7565
7566
7567
7568 :
7569
7570
7571
7572
7573
7574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
7575 $as_echo_n "checking whether realpath works... " >&6; }
7576 if ${gl_cv_func_realpath_works+:} false; then :
7577 $as_echo_n "(cached) " >&6
7578 else
7579
7580 touch conftest.a
7581 mkdir conftest.d
7582 if test "$cross_compiling" = yes; then :
7583 case "$host_os" in
7584 # Guess yes on glibc systems.
7585 *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
7586 # If we don't know, assume the worst.
7587 *) gl_cv_func_realpath_works="guessing no" ;;
7588 esac
7589
7590 else
7591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7592 /* end confdefs.h. */
7593
7594
7595
7596 #include <stdlib.h>
7597 #if defined __MACH__ && defined __APPLE__
7598 /* Avoid a crash on Mac OS X. */
7599 #include <mach/mach.h>
7600 #include <mach/mach_error.h>
7601 #include <mach/thread_status.h>
7602 #include <mach/exception.h>
7603 #include <mach/task.h>
7604 #include <pthread.h>
7605 /* The exception port on which our thread listens. */
7606 static mach_port_t our_exception_port;
7607 /* The main function of the thread listening for exceptions of type
7608 EXC_BAD_ACCESS. */
7609 static void *
7610 mach_exception_thread (void *arg)
7611 {
7612 /* Buffer for a message to be received. */
7613 struct {
7614 mach_msg_header_t head;
7615 mach_msg_body_t msgh_body;
7616 char data[1024];
7617 } msg;
7618 mach_msg_return_t retval;
7619 /* Wait for a message on the exception port. */
7620 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
7621 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
7622 if (retval != MACH_MSG_SUCCESS)
7623 abort ();
7624 exit (1);
7625 }
7626 static void
7627 nocrash_init (void)
7628 {
7629 mach_port_t self = mach_task_self ();
7630 /* Allocate a port on which the thread shall listen for exceptions. */
7631 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
7632 == KERN_SUCCESS) {
7633 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
7634 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
7635 MACH_MSG_TYPE_MAKE_SEND)
7636 == KERN_SUCCESS) {
7637 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
7638 for us. */
7639 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
7640 /* Create the thread listening on the exception port. */
7641 pthread_attr_t attr;
7642 pthread_t thread;
7643 if (pthread_attr_init (&attr) == 0
7644 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
7645 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
7646 pthread_attr_destroy (&attr);
7647 /* Replace the exception port info for these exceptions with our own.
7648 Note that we replace the exception port for the entire task, not only
7649 for a particular thread. This has the effect that when our exception
7650 port gets the message, the thread specific exception port has already
7651 been asked, and we don't need to bother about it.
7652 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
7653 task_set_exception_ports (self, mask, our_exception_port,
7654 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
7655 }
7656 }
7657 }
7658 }
7659 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
7660 /* Avoid a crash on native Windows. */
7661 #define WIN32_LEAN_AND_MEAN
7662 #include <windows.h>
7663 #include <winerror.h>
7664 static LONG WINAPI
7665 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
7666 {
7667 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
7668 {
7669 case EXCEPTION_ACCESS_VIOLATION:
7670 case EXCEPTION_IN_PAGE_ERROR:
7671 case EXCEPTION_STACK_OVERFLOW:
7672 case EXCEPTION_GUARD_PAGE:
7673 case EXCEPTION_PRIV_INSTRUCTION:
7674 case EXCEPTION_ILLEGAL_INSTRUCTION:
7675 case EXCEPTION_DATATYPE_MISALIGNMENT:
7676 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
7677 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
7678 exit (1);
7679 }
7680 return EXCEPTION_CONTINUE_SEARCH;
7681 }
7682 static void
7683 nocrash_init (void)
7684 {
7685 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
7686 }
7687 #else
7688 /* Avoid a crash on POSIX systems. */
7689 #include <signal.h>
7690 #include <unistd.h>
7691 /* A POSIX signal handler. */
7692 static void
7693 exception_handler (int sig)
7694 {
7695 _exit (1);
7696 }
7697 static void
7698 nocrash_init (void)
7699 {
7700 #ifdef SIGSEGV
7701 signal (SIGSEGV, exception_handler);
7702 #endif
7703 #ifdef SIGBUS
7704 signal (SIGBUS, exception_handler);
7705 #endif
7706 }
7707 #endif
7708
7709 #include <stdlib.h>
7710 #include <string.h>
7711
7712 int
7713 main ()
7714 {
7715
7716 int result = 0;
7717 {
7718 char *name = realpath ("conftest.a", NULL);
7719 if (!(name && *name == '/'))
7720 result |= 1;
7721 free (name);
7722 }
7723 {
7724 char *name = realpath ("conftest.b/../conftest.a", NULL);
7725 if (name != NULL)
7726 result |= 2;
7727 free (name);
7728 }
7729 {
7730 char *name = realpath ("conftest.a/", NULL);
7731 if (name != NULL)
7732 result |= 4;
7733 free (name);
7734 }
7735 {
7736 char *name1 = realpath (".", NULL);
7737 char *name2 = realpath ("conftest.d//./..", NULL);
7738 if (! name1 || ! name2 || strcmp (name1, name2))
7739 result |= 8;
7740 free (name1);
7741 free (name2);
7742 }
7743 return result;
7744
7745 ;
7746 return 0;
7747 }
7748
7749 _ACEOF
7750 if ac_fn_c_try_run "$LINENO"; then :
7751 gl_cv_func_realpath_works=yes
7752 else
7753 gl_cv_func_realpath_works=no
7754 fi
7755 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7756 conftest.$ac_objext conftest.beam conftest.$ac_ext
7757 fi
7758
7759 rm -rf conftest.a conftest.d
7760
7761 fi
7762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
7763 $as_echo "$gl_cv_func_realpath_works" >&6; }
7764 case "$gl_cv_func_realpath_works" in
7765 *yes)
7766
7767 $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
7768
7769 ;;
7770 esac
7771
7772
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 GNULIB_CHDIR=0;
7804 GNULIB_CHOWN=0;
7805 GNULIB_CLOSE=0;
7806 GNULIB_DUP=0;
7807 GNULIB_DUP2=0;
7808 GNULIB_DUP3=0;
7809 GNULIB_ENVIRON=0;
7810 GNULIB_EUIDACCESS=0;
7811 GNULIB_FACCESSAT=0;
7812 GNULIB_FCHDIR=0;
7813 GNULIB_FCHOWNAT=0;
7814 GNULIB_FDATASYNC=0;
7815 GNULIB_FSYNC=0;
7816 GNULIB_FTRUNCATE=0;
7817 GNULIB_GETCWD=0;
7818 GNULIB_GETDOMAINNAME=0;
7819 GNULIB_GETDTABLESIZE=0;
7820 GNULIB_GETGROUPS=0;
7821 GNULIB_GETHOSTNAME=0;
7822 GNULIB_GETLOGIN=0;
7823 GNULIB_GETLOGIN_R=0;
7824 GNULIB_GETPAGESIZE=0;
7825 GNULIB_GETUSERSHELL=0;
7826 GNULIB_GROUP_MEMBER=0;
7827 GNULIB_ISATTY=0;
7828 GNULIB_LCHOWN=0;
7829 GNULIB_LINK=0;
7830 GNULIB_LINKAT=0;
7831 GNULIB_LSEEK=0;
7832 GNULIB_PIPE=0;
7833 GNULIB_PIPE2=0;
7834 GNULIB_PREAD=0;
7835 GNULIB_PWRITE=0;
7836 GNULIB_READ=0;
7837 GNULIB_READLINK=0;
7838 GNULIB_READLINKAT=0;
7839 GNULIB_RMDIR=0;
7840 GNULIB_SETHOSTNAME=0;
7841 GNULIB_SLEEP=0;
7842 GNULIB_SYMLINK=0;
7843 GNULIB_SYMLINKAT=0;
7844 GNULIB_TTYNAME_R=0;
7845 GNULIB_UNISTD_H_NONBLOCKING=0;
7846 GNULIB_UNISTD_H_SIGPIPE=0;
7847 GNULIB_UNLINK=0;
7848 GNULIB_UNLINKAT=0;
7849 GNULIB_USLEEP=0;
7850 GNULIB_WRITE=0;
7851 HAVE_CHOWN=1;
7852 HAVE_DUP2=1;
7853 HAVE_DUP3=1;
7854 HAVE_EUIDACCESS=1;
7855 HAVE_FACCESSAT=1;
7856 HAVE_FCHDIR=1;
7857 HAVE_FCHOWNAT=1;
7858 HAVE_FDATASYNC=1;
7859 HAVE_FSYNC=1;
7860 HAVE_FTRUNCATE=1;
7861 HAVE_GETDTABLESIZE=1;
7862 HAVE_GETGROUPS=1;
7863 HAVE_GETHOSTNAME=1;
7864 HAVE_GETLOGIN=1;
7865 HAVE_GETPAGESIZE=1;
7866 HAVE_GROUP_MEMBER=1;
7867 HAVE_LCHOWN=1;
7868 HAVE_LINK=1;
7869 HAVE_LINKAT=1;
7870 HAVE_PIPE=1;
7871 HAVE_PIPE2=1;
7872 HAVE_PREAD=1;
7873 HAVE_PWRITE=1;
7874 HAVE_READLINK=1;
7875 HAVE_READLINKAT=1;
7876 HAVE_SETHOSTNAME=1;
7877 HAVE_SLEEP=1;
7878 HAVE_SYMLINK=1;
7879 HAVE_SYMLINKAT=1;
7880 HAVE_UNLINKAT=1;
7881 HAVE_USLEEP=1;
7882 HAVE_DECL_ENVIRON=1;
7883 HAVE_DECL_FCHDIR=1;
7884 HAVE_DECL_FDATASYNC=1;
7885 HAVE_DECL_GETDOMAINNAME=1;
7886 HAVE_DECL_GETLOGIN_R=1;
7887 HAVE_DECL_GETPAGESIZE=1;
7888 HAVE_DECL_GETUSERSHELL=1;
7889 HAVE_DECL_SETHOSTNAME=1;
7890 HAVE_DECL_TTYNAME_R=1;
7891 HAVE_OS_H=0;
7892 HAVE_SYS_PARAM_H=0;
7893 REPLACE_CHOWN=0;
7894 REPLACE_CLOSE=0;
7895 REPLACE_DUP=0;
7896 REPLACE_DUP2=0;
7897 REPLACE_FCHOWNAT=0;
7898 REPLACE_FTRUNCATE=0;
7899 REPLACE_GETCWD=0;
7900 REPLACE_GETDOMAINNAME=0;
7901 REPLACE_GETDTABLESIZE=0;
7902 REPLACE_GETLOGIN_R=0;
7903 REPLACE_GETGROUPS=0;
7904 REPLACE_GETPAGESIZE=0;
7905 REPLACE_ISATTY=0;
7906 REPLACE_LCHOWN=0;
7907 REPLACE_LINK=0;
7908 REPLACE_LINKAT=0;
7909 REPLACE_LSEEK=0;
7910 REPLACE_PREAD=0;
7911 REPLACE_PWRITE=0;
7912 REPLACE_READ=0;
7913 REPLACE_READLINK=0;
7914 REPLACE_READLINKAT=0;
7915 REPLACE_RMDIR=0;
7916 REPLACE_SLEEP=0;
7917 REPLACE_SYMLINK=0;
7918 REPLACE_SYMLINKAT=0;
7919 REPLACE_TTYNAME_R=0;
7920 REPLACE_UNLINK=0;
7921 REPLACE_UNLINKAT=0;
7922 REPLACE_USLEEP=0;
7923 REPLACE_WRITE=0;
7924 UNISTD_H_HAVE_WINSOCK2_H=0;
7925 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
7926
7927
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 if test $ac_cv_func__set_invalid_parameter_handler = yes; then
7959 HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
7960
7961 $as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
7962
7963 else
7964 HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
7965 fi
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979 GNULIB_OPENDIR=0;
7980 GNULIB_READDIR=0;
7981 GNULIB_REWINDDIR=0;
7982 GNULIB_CLOSEDIR=0;
7983 GNULIB_DIRFD=0;
7984 GNULIB_FDOPENDIR=0;
7985 GNULIB_SCANDIR=0;
7986 GNULIB_ALPHASORT=0;
7987 HAVE_OPENDIR=1;
7988 HAVE_READDIR=1;
7989 HAVE_REWINDDIR=1;
7990 HAVE_CLOSEDIR=1;
7991 HAVE_DECL_DIRFD=1;
7992 HAVE_DECL_FDOPENDIR=1;
7993 HAVE_FDOPENDIR=1;
7994 HAVE_SCANDIR=1;
7995 HAVE_ALPHASORT=1;
7996 REPLACE_OPENDIR=0;
7997 REPLACE_CLOSEDIR=0;
7998 REPLACE_DIRFD=0;
7999 REPLACE_FDOPENDIR=0;
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011 :
8012
8013
8014
8015
8016
8017
8018
8019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
8020 $as_echo_n "checking if environ is properly declared... " >&6; }
8021 if ${gt_cv_var_environ_declaration+:} false; then :
8022 $as_echo_n "(cached) " >&6
8023 else
8024
8025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8026 /* end confdefs.h. */
8027 #if HAVE_UNISTD_H
8028 #include <unistd.h>
8029 #endif
8030 /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
8031 #include <stdlib.h>
8032
8033 extern struct { int foo; } environ;
8034 int
8035 main ()
8036 {
8037 environ.foo = 1;
8038 ;
8039 return 0;
8040 }
8041 _ACEOF
8042 if ac_fn_c_try_compile "$LINENO"; then :
8043 gt_cv_var_environ_declaration=no
8044 else
8045 gt_cv_var_environ_declaration=yes
8046 fi
8047 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8048 fi
8049
8050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
8051 $as_echo "$gt_cv_var_environ_declaration" >&6; }
8052 if test $gt_cv_var_environ_declaration = yes; then
8053
8054 $as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
8055
8056 fi
8057
8058
8059 if test $gt_cv_var_environ_declaration != yes; then
8060 HAVE_DECL_ENVIRON=0
8061 fi
8062
8063
8064
8065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
8066 $as_echo_n "checking for complete errno.h... " >&6; }
8067 if ${gl_cv_header_errno_h_complete+:} false; then :
8068 $as_echo_n "(cached) " >&6
8069 else
8070
8071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8072 /* end confdefs.h. */
8073
8074 #include <errno.h>
8075 #if !defined ETXTBSY
8076 booboo
8077 #endif
8078 #if !defined ENOMSG
8079 booboo
8080 #endif
8081 #if !defined EIDRM
8082 booboo
8083 #endif
8084 #if !defined ENOLINK
8085 booboo
8086 #endif
8087 #if !defined EPROTO
8088 booboo
8089 #endif
8090 #if !defined EMULTIHOP
8091 booboo
8092 #endif
8093 #if !defined EBADMSG
8094 booboo
8095 #endif
8096 #if !defined EOVERFLOW
8097 booboo
8098 #endif
8099 #if !defined ENOTSUP
8100 booboo
8101 #endif
8102 #if !defined ENETRESET
8103 booboo
8104 #endif
8105 #if !defined ECONNABORTED
8106 booboo
8107 #endif
8108 #if !defined ESTALE
8109 booboo
8110 #endif
8111 #if !defined EDQUOT
8112 booboo
8113 #endif
8114 #if !defined ECANCELED
8115 booboo
8116 #endif
8117 #if !defined EOWNERDEAD
8118 booboo
8119 #endif
8120 #if !defined ENOTRECOVERABLE
8121 booboo
8122 #endif
8123 #if !defined EILSEQ
8124 booboo
8125 #endif
8126
8127 _ACEOF
8128 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8129 $EGREP "booboo" >/dev/null 2>&1; then :
8130 gl_cv_header_errno_h_complete=no
8131 else
8132 gl_cv_header_errno_h_complete=yes
8133 fi
8134 rm -f conftest*
8135
8136
8137 fi
8138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
8139 $as_echo "$gl_cv_header_errno_h_complete" >&6; }
8140 if test $gl_cv_header_errno_h_complete = yes; then
8141 ERRNO_H=''
8142 else
8143
8144
8145
8146
8147
8148
8149
8150
8151 if test $gl_cv_have_include_next = yes; then
8152 gl_cv_next_errno_h='<'errno.h'>'
8153 else
8154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
8155 $as_echo_n "checking absolute name of <errno.h>... " >&6; }
8156 if ${gl_cv_next_errno_h+:} false; then :
8157 $as_echo_n "(cached) " >&6
8158 else
8159
8160
8161
8162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8163 /* end confdefs.h. */
8164 #include <errno.h>
8165 _ACEOF
8166 case "$host_os" in
8167 aix*) gl_absname_cpp="$ac_cpp -C" ;;
8168 *) gl_absname_cpp="$ac_cpp" ;;
8169 esac
8170
8171 case "$host_os" in
8172 mingw*)
8173 gl_dirsep_regex='[/\\]'
8174 ;;
8175 *)
8176 gl_dirsep_regex='\/'
8177 ;;
8178 esac
8179 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
8180 gl_header_literal_regex=`echo 'errno.h' \
8181 | sed -e "$gl_make_literal_regex_sed"`
8182 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
8183 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
8184 s|^/[^/]|//&|
8185 p
8186 q
8187 }'
8188
8189 gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
8190 sed -n "$gl_absolute_header_sed"`
8191
8192 gl_header=$gl_cv_absolute_errno_h
8193 gl_cv_next_errno_h='"'$gl_header'"'
8194
8195
8196 fi
8197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
8198 $as_echo "$gl_cv_next_errno_h" >&6; }
8199 fi
8200 NEXT_ERRNO_H=$gl_cv_next_errno_h
8201
8202 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
8203 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
8204 gl_next_as_first_directive='<'errno.h'>'
8205 else
8206 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
8207 gl_next_as_first_directive=$gl_cv_next_errno_h
8208 fi
8209 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
8210
8211
8212
8213
8214 ERRNO_H='errno.h'
8215 fi
8216
8217 if test -n "$ERRNO_H"; then
8218 GL_GENERATE_ERRNO_H_TRUE=
8219 GL_GENERATE_ERRNO_H_FALSE='#'
8220 else
8221 GL_GENERATE_ERRNO_H_TRUE='#'
8222 GL_GENERATE_ERRNO_H_FALSE=
8223 fi
8224
8225
8226 if test -n "$ERRNO_H"; then
8227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
8228 $as_echo_n "checking for EMULTIHOP value... " >&6; }
8229 if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then :
8230 $as_echo_n "(cached) " >&6
8231 else
8232
8233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8234 /* end confdefs.h. */
8235
8236 #include <errno.h>
8237 #ifdef EMULTIHOP
8238 yes
8239 #endif
8240
8241 _ACEOF
8242 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8243 $EGREP "yes" >/dev/null 2>&1; then :
8244 gl_cv_header_errno_h_EMULTIHOP=yes
8245 else
8246 gl_cv_header_errno_h_EMULTIHOP=no
8247 fi
8248 rm -f conftest*
8249
8250 if test $gl_cv_header_errno_h_EMULTIHOP = no; then
8251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8252 /* end confdefs.h. */
8253
8254 #define _XOPEN_SOURCE_EXTENDED 1
8255 #include <errno.h>
8256 #ifdef EMULTIHOP
8257 yes
8258 #endif
8259
8260 _ACEOF
8261 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8262 $EGREP "yes" >/dev/null 2>&1; then :
8263 gl_cv_header_errno_h_EMULTIHOP=hidden
8264 fi
8265 rm -f conftest*
8266
8267 if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
8268 if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
8269 #define _XOPEN_SOURCE_EXTENDED 1
8270 #include <errno.h>
8271 /* The following two lines are a workaround against an autoconf-2.52 bug. */
8272 #include <stdio.h>
8273 #include <stdlib.h>
8274 "; then :
8275
8276 fi
8277
8278 fi
8279 fi
8280
8281 fi
8282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
8283 $as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
8284 case $gl_cv_header_errno_h_EMULTIHOP in
8285 yes | no)
8286 EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
8287 ;;
8288 *)
8289 EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
8290 ;;
8291 esac
8292
8293
8294 fi
8295
8296
8297 if test -n "$ERRNO_H"; then
8298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
8299 $as_echo_n "checking for ENOLINK value... " >&6; }
8300 if ${gl_cv_header_errno_h_ENOLINK+:} false; then :
8301 $as_echo_n "(cached) " >&6
8302 else
8303
8304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8305 /* end confdefs.h. */
8306
8307 #include <errno.h>
8308 #ifdef ENOLINK
8309 yes
8310 #endif
8311
8312 _ACEOF
8313 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8314 $EGREP "yes" >/dev/null 2>&1; then :
8315 gl_cv_header_errno_h_ENOLINK=yes
8316 else
8317 gl_cv_header_errno_h_ENOLINK=no
8318 fi
8319 rm -f conftest*
8320
8321 if test $gl_cv_header_errno_h_ENOLINK = no; then
8322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8323 /* end confdefs.h. */
8324
8325 #define _XOPEN_SOURCE_EXTENDED 1
8326 #include <errno.h>
8327 #ifdef ENOLINK
8328 yes
8329 #endif
8330
8331 _ACEOF
8332 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8333 $EGREP "yes" >/dev/null 2>&1; then :
8334 gl_cv_header_errno_h_ENOLINK=hidden
8335 fi
8336 rm -f conftest*
8337
8338 if test $gl_cv_header_errno_h_ENOLINK = hidden; then
8339 if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
8340 #define _XOPEN_SOURCE_EXTENDED 1
8341 #include <errno.h>
8342 /* The following two lines are a workaround against an autoconf-2.52 bug. */
8343 #include <stdio.h>
8344 #include <stdlib.h>
8345 "; then :
8346
8347 fi
8348
8349 fi
8350 fi
8351
8352 fi
8353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
8354 $as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
8355 case $gl_cv_header_errno_h_ENOLINK in
8356 yes | no)
8357 ENOLINK_HIDDEN=0; ENOLINK_VALUE=
8358 ;;
8359 *)
8360 ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
8361 ;;
8362 esac
8363
8364
8365 fi
8366
8367
8368 if test -n "$ERRNO_H"; then
8369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
8370 $as_echo_n "checking for EOVERFLOW value... " >&6; }
8371 if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then :
8372 $as_echo_n "(cached) " >&6
8373 else
8374
8375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8376 /* end confdefs.h. */
8377
8378 #include <errno.h>
8379 #ifdef EOVERFLOW
8380 yes
8381 #endif
8382
8383 _ACEOF
8384 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8385 $EGREP "yes" >/dev/null 2>&1; then :
8386 gl_cv_header_errno_h_EOVERFLOW=yes
8387 else
8388 gl_cv_header_errno_h_EOVERFLOW=no
8389 fi
8390 rm -f conftest*
8391
8392 if test $gl_cv_header_errno_h_EOVERFLOW = no; then
8393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8394 /* end confdefs.h. */
8395
8396 #define _XOPEN_SOURCE_EXTENDED 1
8397 #include <errno.h>
8398 #ifdef EOVERFLOW
8399 yes
8400 #endif
8401
8402 _ACEOF
8403 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8404 $EGREP "yes" >/dev/null 2>&1; then :
8405 gl_cv_header_errno_h_EOVERFLOW=hidden
8406 fi
8407 rm -f conftest*
8408
8409 if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
8410 if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
8411 #define _XOPEN_SOURCE_EXTENDED 1
8412 #include <errno.h>
8413 /* The following two lines are a workaround against an autoconf-2.52 bug. */
8414 #include <stdio.h>
8415 #include <stdlib.h>
8416 "; then :
8417
8418 fi
8419
8420 fi
8421 fi
8422
8423 fi
8424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
8425 $as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
8426 case $gl_cv_header_errno_h_EOVERFLOW in
8427 yes | no)
8428 EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
8429 ;;
8430 *)
8431 EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
8432 ;;
8433 esac
8434
8435
8436 fi
8437
8438
8439
8440
8441 $as_echo "#define HAVE_DECL_STRERROR_R 1" >>confdefs.h
8442
8443
8444 $as_echo "#define HAVE_STRERROR_R 1" >>confdefs.h
8445
8446
8447 $as_echo "#define STRERROR_R_CHAR_P 0" >>confdefs.h
8448
8449
8450
8451 XGETTEXT_EXTRA_OPTIONS=
8452
8453
8454
8455
8456
8457 ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default"
8458 if test "x$ac_cv_have_decl_fchdir" = xyes; then :
8459 ac_have_decl=1
8460 else
8461 ac_have_decl=0
8462 fi
8463
8464 cat >>confdefs.h <<_ACEOF
8465 #define HAVE_DECL_FCHDIR $ac_have_decl
8466 _ACEOF
8467
8468
8469
8470 GNULIB_FCNTL=0;
8471 GNULIB_NONBLOCKING=0;
8472 GNULIB_OPEN=0;
8473 GNULIB_OPENAT=0;
8474 HAVE_FCNTL=1;
8475 HAVE_OPENAT=1;
8476 REPLACE_FCNTL=0;
8477 REPLACE_OPEN=0;
8478 REPLACE_OPENAT=0;
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
8507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
8508 $as_echo_n "checking for working fcntl.h... " >&6; }
8509 if ${gl_cv_header_working_fcntl_h+:} false; then :
8510 $as_echo_n "(cached) " >&6
8511 else
8512 if test "$cross_compiling" = yes; then :
8513 gl_cv_header_working_fcntl_h=cross-compiling
8514 else
8515 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8516 /* end confdefs.h. */
8517 #include <sys/types.h>
8518 #include <sys/stat.h>
8519 #if HAVE_UNISTD_H
8520 # include <unistd.h>
8521 #else /* on Windows with MSVC */
8522 # include <io.h>
8523 # include <stdlib.h>
8524 # defined sleep(n) _sleep ((n) * 1000)
8525 #endif
8526 #include <fcntl.h>
8527 #ifndef O_NOATIME
8528 #define O_NOATIME 0
8529 #endif
8530 #ifndef O_NOFOLLOW
8531 #define O_NOFOLLOW 0
8532 #endif
8533 static int const constants[] =
8534 {
8535 O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
8536 O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
8537 };
8538
8539 int
8540 main ()
8541 {
8542
8543 int result = !constants;
8544 #if HAVE_SYMLINK
8545 {
8546 static char const sym[] = "conftest.sym";
8547 if (symlink ("/dev/null", sym) != 0)
8548 result |= 2;
8549 else
8550 {
8551 int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
8552 if (fd >= 0)
8553 {
8554 close (fd);
8555 result |= 4;
8556 }
8557 }
8558 if (unlink (sym) != 0 || symlink (".", sym) != 0)
8559 result |= 2;
8560 else
8561 {
8562 int fd = open (sym, O_RDONLY | O_NOFOLLOW);
8563 if (fd >= 0)
8564 {
8565 close (fd);
8566 result |= 4;
8567 }
8568 }
8569 unlink (sym);
8570 }
8571 #endif
8572 {
8573 static char const file[] = "confdefs.h";
8574 int fd = open (file, O_RDONLY | O_NOATIME);
8575 if (fd < 0)
8576 result |= 8;
8577 else
8578 {
8579 struct stat st0;
8580 if (fstat (fd, &st0) != 0)
8581 result |= 16;
8582 else
8583 {
8584 char c;
8585 sleep (1);
8586 if (read (fd, &c, 1) != 1)
8587 result |= 24;
8588 else
8589 {
8590 if (close (fd) != 0)
8591 result |= 32;
8592 else
8593 {
8594 struct stat st1;
8595 if (stat (file, &st1) != 0)
8596 result |= 40;
8597 else
8598 if (st0.st_atime != st1.st_atime)
8599 result |= 64;
8600 }
8601 }
8602 }
8603 }
8604 }
8605 return result;
8606 ;
8607 return 0;
8608 }
8609 _ACEOF
8610 if ac_fn_c_try_run "$LINENO"; then :
8611 gl_cv_header_working_fcntl_h=yes
8612 else
8613 case $? in #(
8614 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
8615 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
8616 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
8617 *) gl_cv_header_working_fcntl_h='no';;
8618 esac
8619 fi
8620 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8621 conftest.$ac_objext conftest.beam conftest.$ac_ext
8622 fi
8623
8624 fi
8625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
8626 $as_echo "$gl_cv_header_working_fcntl_h" >&6; }
8627
8628 case $gl_cv_header_working_fcntl_h in #(
8629 *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
8630 *) ac_val=1;;
8631 esac
8632
8633 cat >>confdefs.h <<_ACEOF
8634 #define HAVE_WORKING_O_NOATIME $ac_val
8635 _ACEOF
8636
8637
8638 case $gl_cv_header_working_fcntl_h in #(
8639 *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
8640 *) ac_val=1;;
8641 esac
8642
8643 cat >>confdefs.h <<_ACEOF
8644 #define HAVE_WORKING_O_NOFOLLOW $ac_val
8645 _ACEOF
8646
8647
8648 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
8649 if test "x$ac_cv_type_pid_t" = xyes; then :
8650
8651 else
8652
8653 cat >>confdefs.h <<_ACEOF
8654 #define pid_t int
8655 _ACEOF
8656
8657 fi
8658
8659 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
8660 if test "x$ac_cv_type_mode_t" = xyes; then :
8661
8662 else
8663
8664 cat >>confdefs.h <<_ACEOF
8665 #define mode_t int
8666 _ACEOF
8667
8668 fi
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
8683 $as_echo_n "checking for mbstate_t... " >&6; }
8684 if ${ac_cv_type_mbstate_t+:} false; then :
8685 $as_echo_n "(cached) " >&6
8686 else
8687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8688 /* end confdefs.h. */
8689 $ac_includes_default
8690 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
8691 <wchar.h>.
8692 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8693 included before <wchar.h>. */
8694 #include <stddef.h>
8695 #include <stdio.h>
8696 #include <time.h>
8697 #include <wchar.h>
8698 int
8699 main ()
8700 {
8701 mbstate_t x; return sizeof x;
8702 ;
8703 return 0;
8704 }
8705 _ACEOF
8706 if ac_fn_c_try_compile "$LINENO"; then :
8707 ac_cv_type_mbstate_t=yes
8708 else
8709 ac_cv_type_mbstate_t=no
8710 fi
8711 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8712 fi
8713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
8714 $as_echo "$ac_cv_type_mbstate_t" >&6; }
8715 if test $ac_cv_type_mbstate_t = yes; then
8716
8717 $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
8718
8719 else
8720
8721 $as_echo "#define mbstate_t int" >>confdefs.h
8722
8723 fi
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
8766 GNULIB_ACOSF=0;
8767 GNULIB_ACOSL=0;
8768 GNULIB_ASINF=0;
8769 GNULIB_ASINL=0;
8770 GNULIB_ATANF=0;
8771 GNULIB_ATANL=0;
8772 GNULIB_ATAN2F=0;
8773 GNULIB_CBRT=0;
8774 GNULIB_CBRTF=0;
8775 GNULIB_CBRTL=0;
8776 GNULIB_CEIL=0;
8777 GNULIB_CEILF=0;
8778 GNULIB_CEILL=0;
8779 GNULIB_COPYSIGN=0;
8780 GNULIB_COPYSIGNF=0;
8781 GNULIB_COPYSIGNL=0;
8782 GNULIB_COSF=0;
8783 GNULIB_COSL=0;
8784 GNULIB_COSHF=0;
8785 GNULIB_EXPF=0;
8786 GNULIB_EXPL=0;
8787 GNULIB_EXP2=0;
8788 GNULIB_EXP2F=0;
8789 GNULIB_EXP2L=0;
8790 GNULIB_EXPM1=0;
8791 GNULIB_EXPM1F=0;
8792 GNULIB_EXPM1L=0;
8793 GNULIB_FABSF=0;
8794 GNULIB_FABSL=0;
8795 GNULIB_FLOOR=0;
8796 GNULIB_FLOORF=0;
8797 GNULIB_FLOORL=0;
8798 GNULIB_FMA=0;
8799 GNULIB_FMAF=0;
8800 GNULIB_FMAL=0;
8801 GNULIB_FMOD=0;
8802 GNULIB_FMODF=0;
8803 GNULIB_FMODL=0;
8804 GNULIB_FREXPF=0;
8805 GNULIB_FREXP=0;
8806 GNULIB_FREXPL=0;
8807 GNULIB_HYPOT=0;
8808 GNULIB_HYPOTF=0;
8809 GNULIB_HYPOTL=0;
8810 GNULIB_ILOGB=0;
8811 GNULIB_ILOGBF=0;
8812 GNULIB_ILOGBL=0;
8813 GNULIB_ISFINITE=0;
8814 GNULIB_ISINF=0;
8815 GNULIB_ISNAN=0;
8816 GNULIB_ISNANF=0;
8817 GNULIB_ISNAND=0;
8818 GNULIB_ISNANL=0;
8819 GNULIB_LDEXPF=0;
8820 GNULIB_LDEXPL=0;
8821 GNULIB_LOG=0;
8822 GNULIB_LOGF=0;
8823 GNULIB_LOGL=0;
8824 GNULIB_LOG10=0;
8825 GNULIB_LOG10F=0;
8826 GNULIB_LOG10L=0;
8827 GNULIB_LOG1P=0;
8828 GNULIB_LOG1PF=0;
8829 GNULIB_LOG1PL=0;
8830 GNULIB_LOG2=0;
8831 GNULIB_LOG2F=0;
8832 GNULIB_LOG2L=0;
8833 GNULIB_LOGB=0;
8834 GNULIB_LOGBF=0;
8835 GNULIB_LOGBL=0;
8836 GNULIB_MODF=0;
8837 GNULIB_MODFF=0;
8838 GNULIB_MODFL=0;
8839 GNULIB_POWF=0;
8840 GNULIB_REMAINDER=0;
8841 GNULIB_REMAINDERF=0;
8842 GNULIB_REMAINDERL=0;
8843 GNULIB_RINT=0;
8844 GNULIB_RINTF=0;
8845 GNULIB_RINTL=0;
8846 GNULIB_ROUND=0;
8847 GNULIB_ROUNDF=0;
8848 GNULIB_ROUNDL=0;
8849 GNULIB_SIGNBIT=0;
8850 GNULIB_SINF=0;
8851 GNULIB_SINL=0;
8852 GNULIB_SINHF=0;
8853 GNULIB_SQRTF=0;
8854 GNULIB_SQRTL=0;
8855 GNULIB_TANF=0;
8856 GNULIB_TANL=0;
8857 GNULIB_TANHF=0;
8858 GNULIB_TRUNC=0;
8859 GNULIB_TRUNCF=0;
8860 GNULIB_TRUNCL=0;
8861 HAVE_ACOSF=1;
8862 HAVE_ACOSL=1;
8863 HAVE_ASINF=1;
8864 HAVE_ASINL=1;
8865 HAVE_ATANF=1;
8866 HAVE_ATANL=1;
8867 HAVE_ATAN2F=1;
8868 HAVE_CBRT=1;
8869 HAVE_CBRTF=1;
8870 HAVE_CBRTL=1;
8871 HAVE_COPYSIGN=1;
8872 HAVE_COPYSIGNL=1;
8873 HAVE_COSF=1;
8874 HAVE_COSL=1;
8875 HAVE_COSHF=1;
8876 HAVE_EXPF=1;
8877 HAVE_EXPL=1;
8878 HAVE_EXPM1=1;
8879 HAVE_EXPM1F=1;
8880 HAVE_FABSF=1;
8881 HAVE_FABSL=1;
8882 HAVE_FMA=1;
8883 HAVE_FMAF=1;
8884 HAVE_FMAL=1;
8885 HAVE_FMODF=1;
8886 HAVE_FMODL=1;
8887 HAVE_FREXPF=1;
8888 HAVE_HYPOTF=1;
8889 HAVE_HYPOTL=1;
8890 HAVE_ILOGB=1;
8891 HAVE_ILOGBF=1;
8892 HAVE_ILOGBL=1;
8893 HAVE_ISNANF=1;
8894 HAVE_ISNAND=1;
8895 HAVE_ISNANL=1;
8896 HAVE_LDEXPF=1;
8897 HAVE_LOGF=1;
8898 HAVE_LOGL=1;
8899 HAVE_LOG10F=1;
8900 HAVE_LOG10L=1;
8901 HAVE_LOG1P=1;
8902 HAVE_LOG1PF=1;
8903 HAVE_LOG1PL=1;
8904 HAVE_LOGBF=1;
8905 HAVE_LOGBL=1;
8906 HAVE_MODFF=1;
8907 HAVE_MODFL=1;
8908 HAVE_POWF=1;
8909 HAVE_REMAINDER=1;
8910 HAVE_REMAINDERF=1;
8911 HAVE_RINT=1;
8912 HAVE_RINTL=1;
8913 HAVE_SINF=1;
8914 HAVE_SINL=1;
8915 HAVE_SINHF=1;
8916 HAVE_SQRTF=1;
8917 HAVE_SQRTL=1;
8918 HAVE_TANF=1;
8919 HAVE_TANL=1;
8920 HAVE_TANHF=1;
8921 HAVE_DECL_ACOSL=1;
8922 HAVE_DECL_ASINL=1;
8923 HAVE_DECL_ATANL=1;
8924 HAVE_DECL_CBRTF=1;
8925 HAVE_DECL_CBRTL=1;
8926 HAVE_DECL_CEILF=1;
8927 HAVE_DECL_CEILL=1;
8928 HAVE_DECL_COPYSIGNF=1;
8929 HAVE_DECL_COSL=1;
8930 HAVE_DECL_EXPL=1;
8931 HAVE_DECL_EXP2=1;
8932 HAVE_DECL_EXP2F=1;
8933 HAVE_DECL_EXP2L=1;
8934 HAVE_DECL_EXPM1L=1;
8935 HAVE_DECL_FLOORF=1;
8936 HAVE_DECL_FLOORL=1;
8937 HAVE_DECL_FREXPL=1;
8938 HAVE_DECL_LDEXPL=1;
8939 HAVE_DECL_LOGL=1;
8940 HAVE_DECL_LOG10L=1;
8941 HAVE_DECL_LOG2=1;
8942 HAVE_DECL_LOG2F=1;
8943 HAVE_DECL_LOG2L=1;
8944 HAVE_DECL_LOGB=1;
8945 HAVE_DECL_REMAINDER=1;
8946 HAVE_DECL_REMAINDERL=1;
8947 HAVE_DECL_RINTF=1;
8948 HAVE_DECL_ROUND=1;
8949 HAVE_DECL_ROUNDF=1;
8950 HAVE_DECL_ROUNDL=1;
8951 HAVE_DECL_SINL=1;
8952 HAVE_DECL_SQRTL=1;
8953 HAVE_DECL_TANL=1;
8954 HAVE_DECL_TRUNC=1;
8955 HAVE_DECL_TRUNCF=1;
8956 HAVE_DECL_TRUNCL=1;
8957 REPLACE_CBRTF=0;
8958 REPLACE_CBRTL=0;
8959 REPLACE_CEIL=0;
8960 REPLACE_CEILF=0;
8961 REPLACE_CEILL=0;
8962 REPLACE_EXPM1=0;
8963 REPLACE_EXPM1F=0;
8964 REPLACE_EXP2=0;
8965 REPLACE_EXP2L=0;
8966 REPLACE_FABSL=0;
8967 REPLACE_FLOOR=0;
8968 REPLACE_FLOORF=0;
8969 REPLACE_FLOORL=0;
8970 REPLACE_FMA=0;
8971 REPLACE_FMAF=0;
8972 REPLACE_FMAL=0;
8973 REPLACE_FMOD=0;
8974 REPLACE_FMODF=0;
8975 REPLACE_FMODL=0;
8976 REPLACE_FREXPF=0;
8977 REPLACE_FREXP=0;
8978 REPLACE_FREXPL=0;
8979 REPLACE_HUGE_VAL=0;
8980 REPLACE_HYPOT=0;
8981 REPLACE_HYPOTF=0;
8982 REPLACE_HYPOTL=0;
8983 REPLACE_ILOGB=0;
8984 REPLACE_ILOGBF=0;
8985 REPLACE_ISFINITE=0;
8986 REPLACE_ISINF=0;
8987 REPLACE_ISNAN=0;
8988 REPLACE_LDEXPL=0;
8989 REPLACE_LOG=0;
8990 REPLACE_LOGF=0;
8991 REPLACE_LOGL=0;
8992 REPLACE_LOG10=0;
8993 REPLACE_LOG10F=0;
8994 REPLACE_LOG10L=0;
8995 REPLACE_LOG1P=0;
8996 REPLACE_LOG1PF=0;
8997 REPLACE_LOG1PL=0;
8998 REPLACE_LOG2=0;
8999 REPLACE_LOG2F=0;
9000 REPLACE_LOG2L=0;
9001 REPLACE_LOGB=0;
9002 REPLACE_LOGBF=0;
9003 REPLACE_LOGBL=0;
9004 REPLACE_MODF=0;
9005 REPLACE_MODFF=0;
9006 REPLACE_MODFL=0;
9007 REPLACE_NAN=0;
9008 REPLACE_REMAINDER=0;
9009 REPLACE_REMAINDERF=0;
9010 REPLACE_REMAINDERL=0;
9011 REPLACE_ROUND=0;
9012 REPLACE_ROUNDF=0;
9013 REPLACE_ROUNDL=0;
9014 REPLACE_SIGNBIT=0;
9015 REPLACE_SIGNBIT_USING_GCC=0;
9016 REPLACE_SQRTL=0;
9017 REPLACE_TRUNC=0;
9018 REPLACE_TRUNCF=0;
9019 REPLACE_TRUNCL=0;
9020
9021
9022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5
9023 $as_echo_n "checking whether frexp() can be used without linking with libm... " >&6; }
9024 if ${gl_cv_func_frexp_no_libm+:} false; then :
9025 $as_echo_n "(cached) " >&6
9026 else
9027
9028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9029 /* end confdefs.h. */
9030 #include <math.h>
9031 double x;
9032 int
9033 main ()
9034 {
9035 int e; return frexp (x, &e) > 0;
9036 ;
9037 return 0;
9038 }
9039 _ACEOF
9040 if ac_fn_c_try_link "$LINENO"; then :
9041 gl_cv_func_frexp_no_libm=yes
9042 else
9043 gl_cv_func_frexp_no_libm=no
9044 fi
9045 rm -f core conftest.err conftest.$ac_objext \
9046 conftest$ac_exeext conftest.$ac_ext
9047
9048 fi
9049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
9050 $as_echo "$gl_cv_func_frexp_no_libm" >&6; }
9051
9052
9053 ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
9054 if test "x$ac_cv_have_decl_alarm" = xyes; then :
9055 ac_have_decl=1
9056 else
9057 ac_have_decl=0
9058 fi
9059
9060 cat >>confdefs.h <<_ACEOF
9061 #define HAVE_DECL_ALARM $ac_have_decl
9062 _ACEOF
9063
9064
9065
9066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5
9067 $as_echo_n "checking whether long double and double are the same... " >&6; }
9068 if ${gl_cv_long_double_equals_double+:} false; then :
9069 $as_echo_n "(cached) " >&6
9070 else
9071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9072 /* end confdefs.h. */
9073 #include <float.h>
9074 int
9075 main ()
9076 {
9077 typedef int check[sizeof (long double) == sizeof (double)
9078 && LDBL_MANT_DIG == DBL_MANT_DIG
9079 && LDBL_MAX_EXP == DBL_MAX_EXP
9080 && LDBL_MIN_EXP == DBL_MIN_EXP
9081 ? 1 : -1];
9082
9083 ;
9084 return 0;
9085 }
9086 _ACEOF
9087 if ac_fn_c_try_compile "$LINENO"; then :
9088 gl_cv_long_double_equals_double=yes
9089 else
9090 gl_cv_long_double_equals_double=no
9091 fi
9092 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9093
9094 fi
9095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_long_double_equals_double" >&5
9096 $as_echo "$gl_cv_long_double_equals_double" >&6; }
9097 if test $gl_cv_long_double_equals_double = yes; then
9098
9099 $as_echo "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h
9100
9101 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1
9102 else
9103 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0
9104 fi
9105
9106
9107
9108 GNULIB_FCHMODAT=0;
9109 GNULIB_FSTAT=0;
9110 GNULIB_FSTATAT=0;
9111 GNULIB_FUTIMENS=0;
9112 GNULIB_LCHMOD=0;
9113 GNULIB_LSTAT=0;
9114 GNULIB_MKDIRAT=0;
9115 GNULIB_MKFIFO=0;
9116 GNULIB_MKFIFOAT=0;
9117 GNULIB_MKNOD=0;
9118 GNULIB_MKNODAT=0;
9119 GNULIB_STAT=0;
9120 GNULIB_UTIMENSAT=0;
9121 HAVE_FCHMODAT=1;
9122 HAVE_FSTATAT=1;
9123 HAVE_FUTIMENS=1;
9124 HAVE_LCHMOD=1;
9125 HAVE_LSTAT=1;
9126 HAVE_MKDIRAT=1;
9127 HAVE_MKFIFO=1;
9128 HAVE_MKFIFOAT=1;
9129 HAVE_MKNOD=1;
9130 HAVE_MKNODAT=1;
9131 HAVE_UTIMENSAT=1;
9132 REPLACE_FSTAT=0;
9133 REPLACE_FSTATAT=0;
9134 REPLACE_FUTIMENS=0;
9135 REPLACE_LSTAT=0;
9136 REPLACE_MKDIR=0;
9137 REPLACE_MKFIFO=0;
9138 REPLACE_MKNOD=0;
9139 REPLACE_STAT=0;
9140 REPLACE_UTIMENSAT=0;
9141
9142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
9143 $as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
9144 if ${ac_cv_header_stat_broken+:} false; then :
9145 $as_echo_n "(cached) " >&6
9146 else
9147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9148 /* end confdefs.h. */
9149 #include <sys/types.h>
9150 #include <sys/stat.h>
9151
9152 #if defined S_ISBLK && defined S_IFDIR
9153 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
9154 #endif
9155
9156 #if defined S_ISBLK && defined S_IFCHR
9157 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
9158 #endif
9159
9160 #if defined S_ISLNK && defined S_IFREG
9161 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
9162 #endif
9163
9164 #if defined S_ISSOCK && defined S_IFREG
9165 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
9166 #endif
9167
9168 _ACEOF
9169 if ac_fn_c_try_compile "$LINENO"; then :
9170 ac_cv_header_stat_broken=no
9171 else
9172 ac_cv_header_stat_broken=yes
9173 fi
9174 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9175 fi
9176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
9177 $as_echo "$ac_cv_header_stat_broken" >&6; }
9178 if test $ac_cv_header_stat_broken = yes; then
9179
9180 $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
9181
9182 fi
9183
9184
9185
9186
9187
9188
9189
9190
9191 case "$host_os" in
9192 mingw*)
9193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
9194 $as_echo_n "checking for 64-bit off_t... " >&6; }
9195 if ${gl_cv_type_off_t_64+:} false; then :
9196 $as_echo_n "(cached) " >&6
9197 else
9198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9199 /* end confdefs.h. */
9200 #include <sys/types.h>
9201 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
9202
9203 int
9204 main ()
9205 {
9206
9207 ;
9208 return 0;
9209 }
9210 _ACEOF
9211 if ac_fn_c_try_compile "$LINENO"; then :
9212 gl_cv_type_off_t_64=yes
9213 else
9214 gl_cv_type_off_t_64=no
9215 fi
9216 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9217
9218 fi
9219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
9220 $as_echo "$gl_cv_type_off_t_64" >&6; }
9221 if test $gl_cv_type_off_t_64 = no; then
9222 WINDOWS_64_BIT_OFF_T=1
9223 else
9224 WINDOWS_64_BIT_OFF_T=0
9225 fi
9226 WINDOWS_64_BIT_ST_SIZE=1
9227 ;;
9228 *)
9229 WINDOWS_64_BIT_OFF_T=0
9230 WINDOWS_64_BIT_ST_SIZE=0
9231 ;;
9232 esac
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244
9245 :
9246
9247
9248
9249
9250
9251
9252
9253
9254 if test $gl_cv_have_include_next = yes; then
9255 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
9256 else
9257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
9258 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
9259 if ${gl_cv_next_sys_stat_h+:} false; then :
9260 $as_echo_n "(cached) " >&6
9261 else
9262
9263 if test $ac_cv_header_sys_stat_h = yes; then
9264
9265
9266
9267
9268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9269 /* end confdefs.h. */
9270 #include <sys/stat.h>
9271 _ACEOF
9272 case "$host_os" in
9273 aix*) gl_absname_cpp="$ac_cpp -C" ;;
9274 *) gl_absname_cpp="$ac_cpp" ;;
9275 esac
9276
9277 case "$host_os" in
9278 mingw*)
9279 gl_dirsep_regex='[/\\]'
9280 ;;
9281 *)
9282 gl_dirsep_regex='\/'
9283 ;;
9284 esac
9285 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
9286 gl_header_literal_regex=`echo 'sys/stat.h' \
9287 | sed -e "$gl_make_literal_regex_sed"`
9288 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
9289 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
9290 s|^/[^/]|//&|
9291 p
9292 q
9293 }'
9294
9295 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
9296 sed -n "$gl_absolute_header_sed"`
9297
9298 gl_header=$gl_cv_absolute_sys_stat_h
9299 gl_cv_next_sys_stat_h='"'$gl_header'"'
9300 else
9301 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
9302 fi
9303
9304
9305 fi
9306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
9307 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
9308 fi
9309 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
9310
9311 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
9312 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
9313 gl_next_as_first_directive='<'sys/stat.h'>'
9314 else
9315 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
9316 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
9317 fi
9318 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
9330 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
9331
9332 $as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
9333
9334 fi
9335
9336 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
9337 #include <sys/stat.h>
9338 "
9339 if test "x$ac_cv_type_nlink_t" = xyes; then :
9340
9341 else
9342
9343 $as_echo "#define nlink_t int" >>confdefs.h
9344
9345 fi
9346
9347
9348
9349 for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do
9350 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
9351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
9352 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
9353 if eval \${$as_gl_Symbol+:} false; then :
9354 $as_echo_n "(cached) " >&6
9355 else
9356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9357 /* end confdefs.h. */
9358 #include <sys/stat.h>
9359
9360 int
9361 main ()
9362 {
9363 #undef $gl_func
9364 (void) $gl_func;
9365 ;
9366 return 0;
9367 }
9368 _ACEOF
9369 if ac_fn_c_try_compile "$LINENO"; then :
9370 eval "$as_gl_Symbol=yes"
9371 else
9372 eval "$as_gl_Symbol=no"
9373 fi
9374 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9375 fi
9376 eval ac_res=\$$as_gl_Symbol
9377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9378 $as_echo "$ac_res" >&6; }
9379 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
9380 cat >>confdefs.h <<_ACEOF
9381 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
9382 _ACEOF
9383
9384 eval ac_cv_have_decl_$gl_func=yes
9385 fi
9386 done
9387
9388
9389
9390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
9391 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
9392 if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
9393 $as_echo_n "(cached) " >&6
9394 else
9395 rm -f conftest.sym conftest.file
9396 echo >conftest.file
9397 if test "$cross_compiling" = yes; then :
9398 case "$host_os" in
9399 *-gnu*)
9400 # Guess yes on glibc systems.
9401 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
9402 *)
9403 # If we don't know, assume the worst.
9404 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
9405 esac
9406
9407 else
9408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9409 /* end confdefs.h. */
9410 $ac_includes_default
9411 int
9412 main ()
9413 {
9414 struct stat sbuf;
9415 if (symlink ("conftest.file", "conftest.sym") != 0)
9416 return 1;
9417 /* Linux will dereference the symlink and fail, as required by
9418 POSIX. That is better in the sense that it means we will not
9419 have to compile and use the lstat wrapper. */
9420 return lstat ("conftest.sym/", &sbuf) == 0;
9421
9422 ;
9423 return 0;
9424 }
9425 _ACEOF
9426 if ac_fn_c_try_run "$LINENO"; then :
9427 gl_cv_func_lstat_dereferences_slashed_symlink=yes
9428 else
9429 gl_cv_func_lstat_dereferences_slashed_symlink=no
9430 fi
9431 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9432 conftest.$ac_objext conftest.beam conftest.$ac_ext
9433 fi
9434
9435 rm -f conftest.sym conftest.file
9436
9437 fi
9438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
9439 $as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
9440 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
9441 *yes)
9442
9443 cat >>confdefs.h <<_ACEOF
9444 #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
9445 _ACEOF
9446
9447 ;;
9448 esac
9449
9450
9451
9452
9453
9454
9455
9456
9457 :
9458
9459
9460
9461
9462
9463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
9464 $as_echo_n "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
9465 if ${gl_cv_func_getcwd_null+:} false; then :
9466 $as_echo_n "(cached) " >&6
9467 else
9468 if test "$cross_compiling" = yes; then :
9469 case "$host_os" in
9470 # Guess yes on glibc systems.
9471 *-gnu*) gl_cv_func_getcwd_null="guessing yes";;
9472 # Guess yes on Cygwin.
9473 cygwin*) gl_cv_func_getcwd_null="guessing yes";;
9474 # If we don't know, assume the worst.
9475 *) gl_cv_func_getcwd_null="guessing no";;
9476 esac
9477
9478 else
9479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9480 /* end confdefs.h. */
9481
9482 # include <stdlib.h>
9483 # if HAVE_UNISTD_H
9484 # include <unistd.h>
9485 # else /* on Windows with MSVC */
9486 # include <direct.h>
9487 # endif
9488 # ifndef getcwd
9489 char *getcwd ();
9490 # endif
9491
9492 int
9493 main ()
9494 {
9495
9496 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
9497 /* mingw cwd does not start with '/', but getcwd does allocate.
9498 However, mingw fails to honor non-zero size. */
9499 #else
9500 if (chdir ("/") != 0)
9501 return 1;
9502 else
9503 {
9504 char *f = getcwd (NULL, 0);
9505 if (! f)
9506 return 2;
9507 if (f[0] != '/')
9508 return 3;
9509 if (f[1] != '\0')
9510 return 4;
9511 free (f);
9512 return 0;
9513 }
9514 #endif
9515
9516 ;
9517 return 0;
9518 }
9519 _ACEOF
9520 if ac_fn_c_try_run "$LINENO"; then :
9521 gl_cv_func_getcwd_null=yes
9522 else
9523 gl_cv_func_getcwd_null=no
9524 fi
9525 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9526 conftest.$ac_objext conftest.beam conftest.$ac_ext
9527 fi
9528
9529 fi
9530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
9531 $as_echo "$gl_cv_func_getcwd_null" >&6; }
9532
9533
9534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
9535 $as_echo_n "checking for getcwd with POSIX signature... " >&6; }
9536 if ${gl_cv_func_getcwd_posix_signature+:} false; then :
9537 $as_echo_n "(cached) " >&6
9538 else
9539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9540 /* end confdefs.h. */
9541 #include <unistd.h>
9542 int
9543 main ()
9544 {
9545 extern
9546 #ifdef __cplusplus
9547 "C"
9548 #endif
9549 char *getcwd (char *, size_t);
9550
9551 ;
9552 return 0;
9553 }
9554
9555 _ACEOF
9556 if ac_fn_c_try_compile "$LINENO"; then :
9557 gl_cv_func_getcwd_posix_signature=yes
9558 else
9559 gl_cv_func_getcwd_posix_signature=no
9560 fi
9561 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9562
9563 fi
9564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
9565 $as_echo "$gl_cv_func_getcwd_posix_signature" >&6; }
9566
9567
9568 ac_fn_c_check_decl "$LINENO" "getcwd" "ac_cv_have_decl_getcwd" "$ac_includes_default"
9569 if test "x$ac_cv_have_decl_getcwd" = xyes; then :
9570 ac_have_decl=1
9571 else
9572 ac_have_decl=0
9573 fi
9574
9575 cat >>confdefs.h <<_ACEOF
9576 #define HAVE_DECL_GETCWD $ac_have_decl
9577 _ACEOF
9578
9579
9580
9581
9582
9583
9584
9585
9586 ac_fn_c_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default"
9587 if test "x$ac_cv_have_decl_getdtablesize" = xyes; then :
9588 ac_have_decl=1
9589 else
9590 ac_have_decl=0
9591 fi
9592
9593 cat >>confdefs.h <<_ACEOF
9594 #define HAVE_DECL_GETDTABLESIZE $ac_have_decl
9595 _ACEOF
9596
9597
9598
9599 ac_fn_c_check_decl "$LINENO" "getlogin_r" "ac_cv_have_decl_getlogin_r" "$ac_includes_default"
9600 if test "x$ac_cv_have_decl_getlogin_r" = xyes; then :
9601 ac_have_decl=1
9602 else
9603 ac_have_decl=0
9604 fi
9605
9606 cat >>confdefs.h <<_ACEOF
9607 #define HAVE_DECL_GETLOGIN_R $ac_have_decl
9608 _ACEOF
9609
9610
9611
9612
9613
9614
9615
9616
9617 ac_fn_c_check_decl "$LINENO" "getlogin" "ac_cv_have_decl_getlogin" "$ac_includes_default"
9618 if test "x$ac_cv_have_decl_getlogin" = xyes; then :
9619 ac_have_decl=1
9620 else
9621 ac_have_decl=0
9622 fi
9623
9624 cat >>confdefs.h <<_ACEOF
9625 #define HAVE_DECL_GETLOGIN $ac_have_decl
9626 _ACEOF
9627
9628
9629
9630
9631
9632
9633
9634
9635
9636
9637
9638
9639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
9640 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
9641 if ${ac_cv_c_restrict+:} false; then :
9642 $as_echo_n "(cached) " >&6
9643 else
9644 ac_cv_c_restrict=no
9645 # The order here caters to the fact that C++ does not require restrict.
9646 for ac_kw in __restrict __restrict__ _Restrict restrict; do
9647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9648 /* end confdefs.h. */
9649 typedef int *int_ptr;
9650 int foo (int_ptr $ac_kw ip) { return ip[0]; }
9651 int bar (int [$ac_kw]); /* Catch GCC bug 14050. */
9652 int bar (int ip[$ac_kw]) { return ip[0]; }
9653
9654 int
9655 main ()
9656 {
9657 int s[1];
9658 int *$ac_kw t = s;
9659 t[0] = 0;
9660 return foo (t) + bar (t);
9661
9662 ;
9663 return 0;
9664 }
9665 _ACEOF
9666 if ac_fn_c_try_compile "$LINENO"; then :
9667 ac_cv_c_restrict=$ac_kw
9668 fi
9669 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9670 test "$ac_cv_c_restrict" != no && break
9671 done
9672
9673 fi
9674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
9675 $as_echo "$ac_cv_c_restrict" >&6; }
9676
9677 case $ac_cv_c_restrict in
9678 restrict) ;;
9679 no) $as_echo "#define restrict /**/" >>confdefs.h
9680 ;;
9681 *) cat >>confdefs.h <<_ACEOF
9682 #define restrict $ac_cv_c_restrict
9683 _ACEOF
9684 ;;
9685 esac
9686
9687
9688 GNULIB_GETTIMEOFDAY=0;
9689 HAVE_GETTIMEOFDAY=1;
9690 HAVE_STRUCT_TIMEVAL=1;
9691 HAVE_SYS_TIME_H=1;
9692 HAVE_TIMEZONE_T=0;
9693 REPLACE_GETTIMEOFDAY=0;
9694 REPLACE_STRUCT_TIMEVAL=0;
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
9726 if test $gl_cv_have_include_next = yes; then
9727 gl_cv_next_sys_time_h='<'sys/time.h'>'
9728 else
9729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
9730 $as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
9731 if ${gl_cv_next_sys_time_h+:} false; then :
9732 $as_echo_n "(cached) " >&6
9733 else
9734
9735 if test $ac_cv_header_sys_time_h = yes; then
9736
9737
9738
9739
9740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9741 /* end confdefs.h. */
9742 #include <sys/time.h>
9743 _ACEOF
9744 case "$host_os" in
9745 aix*) gl_absname_cpp="$ac_cpp -C" ;;
9746 *) gl_absname_cpp="$ac_cpp" ;;
9747 esac
9748
9749 case "$host_os" in
9750 mingw*)
9751 gl_dirsep_regex='[/\\]'
9752 ;;
9753 *)
9754 gl_dirsep_regex='\/'
9755 ;;
9756 esac
9757 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
9758 gl_header_literal_regex=`echo 'sys/time.h' \
9759 | sed -e "$gl_make_literal_regex_sed"`
9760 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
9761 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
9762 s|^/[^/]|//&|
9763 p
9764 q
9765 }'
9766
9767 gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
9768 sed -n "$gl_absolute_header_sed"`
9769
9770 gl_header=$gl_cv_absolute_sys_time_h
9771 gl_cv_next_sys_time_h='"'$gl_header'"'
9772 else
9773 gl_cv_next_sys_time_h='<'sys/time.h'>'
9774 fi
9775
9776
9777 fi
9778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
9779 $as_echo "$gl_cv_next_sys_time_h" >&6; }
9780 fi
9781 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
9782
9783 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
9784 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
9785 gl_next_as_first_directive='<'sys/time.h'>'
9786 else
9787 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
9788 gl_next_as_first_directive=$gl_cv_next_sys_time_h
9789 fi
9790 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
9791
9792
9793
9794
9795
9796 if test $ac_cv_header_sys_time_h != yes; then
9797 HAVE_SYS_TIME_H=0
9798 fi
9799
9800
9801
9802
9803
9804 :
9805
9806
9807
9808
9809
9810 if test $ac_cv_header_sys_socket_h != yes; then
9811 for ac_header in winsock2.h
9812 do :
9813 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
9814 if test "x$ac_cv_header_winsock2_h" = xyes; then :
9815 cat >>confdefs.h <<_ACEOF
9816 #define HAVE_WINSOCK2_H 1
9817 _ACEOF
9818
9819 fi
9820
9821 done
9822
9823 fi
9824 if test "$ac_cv_header_winsock2_h" = yes; then
9825 HAVE_WINSOCK2_H=1
9826 UNISTD_H_HAVE_WINSOCK2_H=1
9827 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
9828 else
9829 HAVE_WINSOCK2_H=0
9830 fi
9831
9832
9833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
9834 $as_echo_n "checking for struct timeval... " >&6; }
9835 if ${gl_cv_sys_struct_timeval+:} false; then :
9836 $as_echo_n "(cached) " >&6
9837 else
9838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9839 /* end confdefs.h. */
9840 #if HAVE_SYS_TIME_H
9841 #include <sys/time.h>
9842 #endif
9843 #include <time.h>
9844 #if HAVE_WINSOCK2_H
9845 # include <winsock2.h>
9846 #endif
9847
9848 int
9849 main ()
9850 {
9851 static struct timeval x; x.tv_sec = x.tv_usec;
9852 ;
9853 return 0;
9854 }
9855 _ACEOF
9856 if ac_fn_c_try_compile "$LINENO"; then :
9857 gl_cv_sys_struct_timeval=yes
9858 else
9859 gl_cv_sys_struct_timeval=no
9860 fi
9861 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9862
9863 fi
9864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
9865 $as_echo "$gl_cv_sys_struct_timeval" >&6; }
9866 if test $gl_cv_sys_struct_timeval != yes; then
9867 HAVE_STRUCT_TIMEVAL=0
9868 else
9869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
9870 $as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
9871 if ${gl_cv_sys_struct_timeval_tv_sec+:} false; then :
9872 $as_echo_n "(cached) " >&6
9873 else
9874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9875 /* end confdefs.h. */
9876 #if HAVE_SYS_TIME_H
9877 #include <sys/time.h>
9878 #endif
9879 #include <time.h>
9880 #if HAVE_WINSOCK2_H
9881 # include <winsock2.h>
9882 #endif
9883
9884 int
9885 main ()
9886 {
9887 static struct timeval x;
9888 typedef int verify_tv_sec_type[
9889 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
9890 ];
9891
9892 ;
9893 return 0;
9894 }
9895 _ACEOF
9896 if ac_fn_c_try_compile "$LINENO"; then :
9897 gl_cv_sys_struct_timeval_tv_sec=yes
9898 else
9899 gl_cv_sys_struct_timeval_tv_sec=no
9900 fi
9901 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9902
9903 fi
9904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
9905 $as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
9906 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
9907 REPLACE_STRUCT_TIMEVAL=1
9908 fi
9909 fi
9910
9911
9912 for gl_func in gettimeofday; do
9913 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
9914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
9915 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
9916 if eval \${$as_gl_Symbol+:} false; then :
9917 $as_echo_n "(cached) " >&6
9918 else
9919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9920 /* end confdefs.h. */
9921
9922 #if HAVE_SYS_TIME_H
9923 # include <sys/time.h>
9924 #endif
9925 #include <time.h>
9926
9927 int
9928 main ()
9929 {
9930 #undef $gl_func
9931 (void) $gl_func;
9932 ;
9933 return 0;
9934 }
9935 _ACEOF
9936 if ac_fn_c_try_compile "$LINENO"; then :
9937 eval "$as_gl_Symbol=yes"
9938 else
9939 eval "$as_gl_Symbol=no"
9940 fi
9941 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9942 fi
9943 eval ac_res=\$$as_gl_Symbol
9944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9945 $as_echo "$ac_res" >&6; }
9946 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
9947 cat >>confdefs.h <<_ACEOF
9948 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
9949 _ACEOF
9950
9951 eval ac_cv_have_decl_$gl_func=yes
9952 fi
9953 done
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
9980 GNULIB_SOCKET=0;
9981 GNULIB_CONNECT=0;
9982 GNULIB_ACCEPT=0;
9983 GNULIB_BIND=0;
9984 GNULIB_GETPEERNAME=0;
9985 GNULIB_GETSOCKNAME=0;
9986 GNULIB_GETSOCKOPT=0;
9987 GNULIB_LISTEN=0;
9988 GNULIB_RECV=0;
9989 GNULIB_SEND=0;
9990 GNULIB_RECVFROM=0;
9991 GNULIB_SENDTO=0;
9992 GNULIB_SETSOCKOPT=0;
9993 GNULIB_SHUTDOWN=0;
9994 GNULIB_ACCEPT4=0;
9995 HAVE_STRUCT_SOCKADDR_STORAGE=1;
9996 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1;
9997
9998 HAVE_SA_FAMILY_T=1;
9999 HAVE_ACCEPT4=1;
10000
10001
10002 :
10003
10004
10005
10006
10007
10008 if test $ac_cv_header_sys_socket_h = no; then
10009 for ac_header in ws2tcpip.h
10010 do :
10011 ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
10012 if test "x$ac_cv_header_ws2tcpip_h" = xyes; then :
10013 cat >>confdefs.h <<_ACEOF
10014 #define HAVE_WS2TCPIP_H 1
10015 _ACEOF
10016
10017 fi
10018
10019 done
10020
10021 fi
10022
10023
10024
10025
10026
10027 case "$host_os" in
10028 osf*)
10029
10030 $as_echo "#define _POSIX_PII_SOCKET 1" >>confdefs.h
10031
10032 ;;
10033 esac
10034
10035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> is self-contained" >&5
10036 $as_echo_n "checking whether <sys/socket.h> is self-contained... " >&6; }
10037 if ${gl_cv_header_sys_socket_h_selfcontained+:} false; then :
10038 $as_echo_n "(cached) " >&6
10039 else
10040
10041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10042 /* end confdefs.h. */
10043 #include <sys/socket.h>
10044 int
10045 main ()
10046 {
10047
10048 ;
10049 return 0;
10050 }
10051 _ACEOF
10052 if ac_fn_c_try_compile "$LINENO"; then :
10053 gl_cv_header_sys_socket_h_selfcontained=yes
10054 else
10055 gl_cv_header_sys_socket_h_selfcontained=no
10056 fi
10057 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10058
10059 fi
10060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_selfcontained" >&5
10061 $as_echo "$gl_cv_header_sys_socket_h_selfcontained" >&6; }
10062 if test $gl_cv_header_sys_socket_h_selfcontained = yes; then
10063 for ac_func in shutdown
10064 do :
10065 ac_fn_c_check_func "$LINENO" "shutdown" "ac_cv_func_shutdown"
10066 if test "x$ac_cv_func_shutdown" = xyes; then :
10067 cat >>confdefs.h <<_ACEOF
10068 #define HAVE_SHUTDOWN 1
10069 _ACEOF
10070
10071 fi
10072 done
10073
10074 if test $ac_cv_func_shutdown = yes; then
10075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> defines the SHUT_* macros" >&5
10076 $as_echo_n "checking whether <sys/socket.h> defines the SHUT_* macros... " >&6; }
10077 if ${gl_cv_header_sys_socket_h_shut+:} false; then :
10078 $as_echo_n "(cached) " >&6
10079 else
10080
10081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10082 /* end confdefs.h. */
10083 #include <sys/socket.h>
10084 int
10085 main ()
10086 {
10087 int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };
10088 ;
10089 return 0;
10090 }
10091 _ACEOF
10092 if ac_fn_c_try_compile "$LINENO"; then :
10093 gl_cv_header_sys_socket_h_shut=yes
10094 else
10095 gl_cv_header_sys_socket_h_shut=no
10096 fi
10097 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10098
10099 fi
10100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_shut" >&5
10101 $as_echo "$gl_cv_header_sys_socket_h_shut" >&6; }
10102 if test $gl_cv_header_sys_socket_h_shut = no; then
10103 SYS_SOCKET_H='sys/socket.h'
10104 fi
10105 fi
10106 fi
10107 # We need to check for ws2tcpip.h now.
10108
10109
10110
10111
10112
10113
10114
10115
10116 :
10117
10118
10119
10120
10121
10122
10123
10124
10125 if test $gl_cv_have_include_next = yes; then
10126 gl_cv_next_sys_socket_h='<'sys/socket.h'>'
10127 else
10128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/socket.h>" >&5
10129 $as_echo_n "checking absolute name of <sys/socket.h>... " >&6; }
10130 if ${gl_cv_next_sys_socket_h+:} false; then :
10131 $as_echo_n "(cached) " >&6
10132 else
10133
10134 if test $ac_cv_header_sys_socket_h = yes; then
10135
10136
10137
10138
10139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10140 /* end confdefs.h. */
10141 #include <sys/socket.h>
10142 _ACEOF
10143 case "$host_os" in
10144 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10145 *) gl_absname_cpp="$ac_cpp" ;;
10146 esac
10147
10148 case "$host_os" in
10149 mingw*)
10150 gl_dirsep_regex='[/\\]'
10151 ;;
10152 *)
10153 gl_dirsep_regex='\/'
10154 ;;
10155 esac
10156 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10157 gl_header_literal_regex=`echo 'sys/socket.h' \
10158 | sed -e "$gl_make_literal_regex_sed"`
10159 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10160 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10161 s|^/[^/]|//&|
10162 p
10163 q
10164 }'
10165
10166 gl_cv_absolute_sys_socket_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10167 sed -n "$gl_absolute_header_sed"`
10168
10169 gl_header=$gl_cv_absolute_sys_socket_h
10170 gl_cv_next_sys_socket_h='"'$gl_header'"'
10171 else
10172 gl_cv_next_sys_socket_h='<'sys/socket.h'>'
10173 fi
10174
10175
10176 fi
10177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_socket_h" >&5
10178 $as_echo "$gl_cv_next_sys_socket_h" >&6; }
10179 fi
10180 NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_h
10181
10182 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10183 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10184 gl_next_as_first_directive='<'sys/socket.h'>'
10185 else
10186 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10187 gl_next_as_first_directive=$gl_cv_next_sys_socket_h
10188 fi
10189 NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H=$gl_next_as_first_directive
10190
10191
10192
10193
10194 if test $ac_cv_header_sys_socket_h = yes; then
10195 HAVE_SYS_SOCKET_H=1
10196 HAVE_WS2TCPIP_H=0
10197 else
10198 HAVE_SYS_SOCKET_H=0
10199 if test $ac_cv_header_ws2tcpip_h = yes; then
10200 HAVE_WS2TCPIP_H=1
10201 else
10202 HAVE_WS2TCPIP_H=0
10203 fi
10204 fi
10205
10206
10207
10208 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "
10209 /* sys/types.h is not needed according to POSIX, but the
10210 sys/socket.h in i386-unknown-freebsd4.10 and
10211 powerpc-apple-darwin5.5 required it. */
10212 #include <sys/types.h>
10213 #ifdef HAVE_SYS_SOCKET_H
10214 #include <sys/socket.h>
10215 #endif
10216 #ifdef HAVE_WS2TCPIP_H
10217 #include <ws2tcpip.h>
10218 #endif
10219
10220 "
10221 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
10222
10223 cat >>confdefs.h <<_ACEOF
10224 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
10225 _ACEOF
10226
10227
10228 fi
10229 ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" "
10230 /* sys/types.h is not needed according to POSIX, but the
10231 sys/socket.h in i386-unknown-freebsd4.10 and
10232 powerpc-apple-darwin5.5 required it. */
10233 #include <sys/types.h>
10234 #ifdef HAVE_SYS_SOCKET_H
10235 #include <sys/socket.h>
10236 #endif
10237 #ifdef HAVE_WS2TCPIP_H
10238 #include <ws2tcpip.h>
10239 #endif
10240
10241 "
10242 if test "x$ac_cv_type_sa_family_t" = xyes; then :
10243
10244 cat >>confdefs.h <<_ACEOF
10245 #define HAVE_SA_FAMILY_T 1
10246 _ACEOF
10247
10248
10249 fi
10250
10251 if test $ac_cv_type_struct_sockaddr_storage = no; then
10252 HAVE_STRUCT_SOCKADDR_STORAGE=0
10253 fi
10254 if test $ac_cv_type_sa_family_t = no; then
10255 HAVE_SA_FAMILY_T=0
10256 fi
10257 if test $ac_cv_type_struct_sockaddr_storage != no; then
10258 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
10259 #ifdef HAVE_SYS_SOCKET_H
10260 #include <sys/socket.h>
10261 #endif
10262 #ifdef HAVE_WS2TCPIP_H
10263 #include <ws2tcpip.h>
10264 #endif
10265
10266 "
10267 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
10268
10269 cat >>confdefs.h <<_ACEOF
10270 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
10271 _ACEOF
10272
10273
10274 else
10275 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0
10276 fi
10277
10278 fi
10279 if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \
10280 || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then
10281 SYS_SOCKET_H='sys/socket.h'
10282 fi
10283
10284
10285
10286
10287 :
10288
10289
10290
10291
10292
10293 if test $ac_cv_header_sys_socket_h != yes; then
10294 for ac_header in winsock2.h
10295 do :
10296 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
10297 if test "x$ac_cv_header_winsock2_h" = xyes; then :
10298 cat >>confdefs.h <<_ACEOF
10299 #define HAVE_WINSOCK2_H 1
10300 _ACEOF
10301
10302 fi
10303
10304 done
10305
10306 fi
10307 if test "$ac_cv_header_winsock2_h" = yes; then
10308 HAVE_WINSOCK2_H=1
10309 UNISTD_H_HAVE_WINSOCK2_H=1
10310 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
10311 else
10312 HAVE_WINSOCK2_H=0
10313 fi
10314
10315
10316
10317
10318 for gl_func in socket connect accept bind getpeername getsockname getsockopt listen recv send recvfrom sendto setsockopt shutdown accept4; do
10319 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
10320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
10321 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
10322 if eval \${$as_gl_Symbol+:} false; then :
10323 $as_echo_n "(cached) " >&6
10324 else
10325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10326 /* end confdefs.h. */
10327
10328 /* Some systems require prerequisite headers. */
10329 #include <sys/types.h>
10330 #include <sys/socket.h>
10331
10332 int
10333 main ()
10334 {
10335 #undef $gl_func
10336 (void) $gl_func;
10337 ;
10338 return 0;
10339 }
10340 _ACEOF
10341 if ac_fn_c_try_compile "$LINENO"; then :
10342 eval "$as_gl_Symbol=yes"
10343 else
10344 eval "$as_gl_Symbol=no"
10345 fi
10346 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10347 fi
10348 eval ac_res=\$$as_gl_Symbol
10349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10350 $as_echo "$ac_res" >&6; }
10351 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
10352 cat >>confdefs.h <<_ACEOF
10353 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
10354 _ACEOF
10355
10356 eval ac_cv_have_decl_$gl_func=yes
10357 fi
10358 done
10359
10360
10361
10362
10363
10364
10365
10366
10367
10368
10369 :
10370
10371
10372
10373
10374
10375
10376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv4 sockets" >&5
10377 $as_echo_n "checking for IPv4 sockets... " >&6; }
10378 if ${gl_cv_socket_ipv4+:} false; then :
10379 $as_echo_n "(cached) " >&6
10380 else
10381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10382 /* end confdefs.h. */
10383 #include <sys/types.h>
10384 #ifdef HAVE_SYS_SOCKET_H
10385 #include <sys/socket.h>
10386 #endif
10387 #ifdef HAVE_NETINET_IN_H
10388 #include <netinet/in.h>
10389 #endif
10390 #ifdef HAVE_WINSOCK2_H
10391 #include <winsock2.h>
10392 #endif
10393 int
10394 main ()
10395 {
10396 int x = AF_INET; struct in_addr y; struct sockaddr_in z;
10397 if (&x && &y && &z) return 0;
10398 ;
10399 return 0;
10400 }
10401 _ACEOF
10402 if ac_fn_c_try_compile "$LINENO"; then :
10403 gl_cv_socket_ipv4=yes
10404 else
10405 gl_cv_socket_ipv4=no
10406 fi
10407 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10408 fi
10409
10410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv4" >&5
10411 $as_echo "$gl_cv_socket_ipv4" >&6; }
10412 if test $gl_cv_socket_ipv4 = yes; then
10413
10414 $as_echo "#define HAVE_IPV4 1" >>confdefs.h
10415
10416 fi
10417
10418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv6 sockets" >&5
10419 $as_echo_n "checking for IPv6 sockets... " >&6; }
10420 if ${gl_cv_socket_ipv6+:} false; then :
10421 $as_echo_n "(cached) " >&6
10422 else
10423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10424 /* end confdefs.h. */
10425 #include <sys/types.h>
10426 #ifdef HAVE_SYS_SOCKET_H
10427 #include <sys/socket.h>
10428 #endif
10429 #ifdef HAVE_NETINET_IN_H
10430 #include <netinet/in.h>
10431 #endif
10432 #ifdef HAVE_WINSOCK2_H
10433 #include <winsock2.h>
10434 #endif
10435 #ifdef HAVE_WS2TCPIP_H
10436 #include <ws2tcpip.h>
10437 #endif
10438 int
10439 main ()
10440 {
10441 int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z;
10442 if (&x && &y && &z) return 0;
10443 ;
10444 return 0;
10445 }
10446 _ACEOF
10447 if ac_fn_c_try_compile "$LINENO"; then :
10448 gl_cv_socket_ipv6=yes
10449 else
10450 gl_cv_socket_ipv6=no
10451 fi
10452 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10453 fi
10454
10455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv6" >&5
10456 $as_echo "$gl_cv_socket_ipv6" >&6; }
10457 if test $gl_cv_socket_ipv6 = yes; then
10458
10459 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
10460
10461 fi
10462
10463
10464
10465
10466
10467
10468
10469
10470
10471
10472
10473
10474
10475 :
10476
10477
10478
10479
10480
10481
10482
10483
10484 if test $gl_cv_have_include_next = yes; then
10485 gl_cv_next_limits_h='<'limits.h'>'
10486 else
10487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5
10488 $as_echo_n "checking absolute name of <limits.h>... " >&6; }
10489 if ${gl_cv_next_limits_h+:} false; then :
10490 $as_echo_n "(cached) " >&6
10491 else
10492
10493 if test $ac_cv_header_limits_h = yes; then
10494
10495
10496
10497
10498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10499 /* end confdefs.h. */
10500 #include <limits.h>
10501 _ACEOF
10502 case "$host_os" in
10503 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10504 *) gl_absname_cpp="$ac_cpp" ;;
10505 esac
10506
10507 case "$host_os" in
10508 mingw*)
10509 gl_dirsep_regex='[/\\]'
10510 ;;
10511 *)
10512 gl_dirsep_regex='\/'
10513 ;;
10514 esac
10515 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10516 gl_header_literal_regex=`echo 'limits.h' \
10517 | sed -e "$gl_make_literal_regex_sed"`
10518 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10519 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10520 s|^/[^/]|//&|
10521 p
10522 q
10523 }'
10524
10525 gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10526 sed -n "$gl_absolute_header_sed"`
10527
10528 gl_header=$gl_cv_absolute_limits_h
10529 gl_cv_next_limits_h='"'$gl_header'"'
10530 else
10531 gl_cv_next_limits_h='<'limits.h'>'
10532 fi
10533
10534
10535 fi
10536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
10537 $as_echo "$gl_cv_next_limits_h" >&6; }
10538 fi
10539 NEXT_LIMITS_H=$gl_cv_next_limits_h
10540
10541 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10542 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10543 gl_next_as_first_directive='<'limits.h'>'
10544 else
10545 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10546 gl_next_as_first_directive=$gl_cv_next_limits_h
10547 fi
10548 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive
10549
10550
10551
10552
10553
10554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether limits.h has ULLONG_WIDTH etc." >&5
10555 $as_echo_n "checking whether limits.h has ULLONG_WIDTH etc.... " >&6; }
10556 if ${gl_cv_header_limits_width+:} false; then :
10557 $as_echo_n "(cached) " >&6
10558 else
10559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10560 /* end confdefs.h. */
10561 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
10562 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
10563 #endif
10564 #include <limits.h>
10565 int ullw = ULLONG_WIDTH;
10566 int
10567 main ()
10568 {
10569
10570 ;
10571 return 0;
10572 }
10573 _ACEOF
10574 if ac_fn_c_try_compile "$LINENO"; then :
10575 gl_cv_header_limits_width=yes
10576 else
10577 gl_cv_header_limits_width=no
10578 fi
10579 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10580 fi
10581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5
10582 $as_echo "$gl_cv_header_limits_width" >&6; }
10583 if test "$gl_cv_header_limits_width" = yes; then
10584 LIMITS_H=
10585 else
10586 LIMITS_H=limits.h
10587 fi
10588
10589 if test -n "$LIMITS_H"; then
10590 GL_GENERATE_LIMITS_H_TRUE=
10591 GL_GENERATE_LIMITS_H_FALSE='#'
10592 else
10593 GL_GENERATE_LIMITS_H_TRUE='#'
10594 GL_GENERATE_LIMITS_H_FALSE=
10595 fi
10596
10597
10598
10599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
10600 $as_echo_n "checking for unsigned long long int... " >&6; }
10601 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
10602 $as_echo_n "(cached) " >&6
10603 else
10604 ac_cv_type_unsigned_long_long_int=yes
10605 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
10606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10607 /* end confdefs.h. */
10608
10609 /* For now, do not test the preprocessor; as of 2007 there are too many
10610 implementations with broken preprocessors. Perhaps this can
10611 be revisited in 2012. In the meantime, code should not expect
10612 #if to work with literals wider than 32 bits. */
10613 /* Test literals. */
10614 long long int ll = 9223372036854775807ll;
10615 long long int nll = -9223372036854775807LL;
10616 unsigned long long int ull = 18446744073709551615ULL;
10617 /* Test constant expressions. */
10618 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
10619 ? 1 : -1)];
10620 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
10621 ? 1 : -1)];
10622 int i = 63;
10623 int
10624 main ()
10625 {
10626 /* Test availability of runtime routines for shift and division. */
10627 long long int llmax = 9223372036854775807ll;
10628 unsigned long long int ullmax = 18446744073709551615ull;
10629 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
10630 | (llmax / ll) | (llmax % ll)
10631 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
10632 | (ullmax / ull) | (ullmax % ull));
10633 ;
10634 return 0;
10635 }
10636
10637 _ACEOF
10638 if ac_fn_c_try_link "$LINENO"; then :
10639
10640 else
10641 ac_cv_type_unsigned_long_long_int=no
10642 fi
10643 rm -f core conftest.err conftest.$ac_objext \
10644 conftest$ac_exeext conftest.$ac_ext
10645 fi
10646 fi
10647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
10648 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
10649 if test $ac_cv_type_unsigned_long_long_int = yes; then
10650
10651 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
10652
10653 fi
10654
10655
10656
10657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
10658 $as_echo_n "checking for long long int... " >&6; }
10659 if ${ac_cv_type_long_long_int+:} false; then :
10660 $as_echo_n "(cached) " >&6
10661 else
10662 ac_cv_type_long_long_int=yes
10663 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
10664 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
10665 if test $ac_cv_type_long_long_int = yes; then
10666 if test "$cross_compiling" = yes; then :
10667 :
10668 else
10669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10670 /* end confdefs.h. */
10671 #include <limits.h>
10672 #ifndef LLONG_MAX
10673 # define HALF \
10674 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
10675 # define LLONG_MAX (HALF - 1 + HALF)
10676 #endif
10677 int
10678 main ()
10679 {
10680 long long int n = 1;
10681 int i;
10682 for (i = 0; ; i++)
10683 {
10684 long long int m = n << i;
10685 if (m >> i != n)
10686 return 1;
10687 if (LLONG_MAX / 2 < m)
10688 break;
10689 }
10690 return 0;
10691 ;
10692 return 0;
10693 }
10694 _ACEOF
10695 if ac_fn_c_try_run "$LINENO"; then :
10696
10697 else
10698 ac_cv_type_long_long_int=no
10699 fi
10700 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10701 conftest.$ac_objext conftest.beam conftest.$ac_ext
10702 fi
10703
10704 fi
10705 fi
10706 fi
10707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
10708 $as_echo "$ac_cv_type_long_long_int" >&6; }
10709 if test $ac_cv_type_long_long_int = yes; then
10710
10711 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
10712
10713 fi
10714
10715
10716
10717
10718
10719
10720
10721
10722
10723
10724
10725
10726 gl_cv_c_multiarch=no
10727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10728 /* end confdefs.h. */
10729 #ifndef __APPLE_CC__
10730 not a universal capable compiler
10731 #endif
10732 typedef int dummy;
10733
10734 _ACEOF
10735 if ac_fn_c_try_compile "$LINENO"; then :
10736
10737 arch=
10738 prev=
10739 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
10740 if test -n "$prev"; then
10741 case $word in
10742 i?86 | x86_64 | ppc | ppc64)
10743 if test -z "$arch" || test "$arch" = "$word"; then
10744 arch="$word"
10745 else
10746 gl_cv_c_multiarch=yes
10747 fi
10748 ;;
10749 esac
10750 prev=
10751 else
10752 if test "x$word" = "x-arch"; then
10753 prev=arch
10754 fi
10755 fi
10756 done
10757
10758 fi
10759 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10760 if test $gl_cv_c_multiarch = yes; then
10761 APPLE_UNIVERSAL_BUILD=1
10762 else
10763 APPLE_UNIVERSAL_BUILD=0
10764 fi
10765
10766
10767
10768
10769
10770
10771
10772 if test $ac_cv_type_long_long_int = yes; then
10773 HAVE_LONG_LONG_INT=1
10774 else
10775 HAVE_LONG_LONG_INT=0
10776 fi
10777
10778
10779 if test $ac_cv_type_unsigned_long_long_int = yes; then
10780 HAVE_UNSIGNED_LONG_LONG_INT=1
10781 else
10782 HAVE_UNSIGNED_LONG_LONG_INT=0
10783 fi
10784
10785
10786
10787 :
10788
10789
10790
10791
10792
10793 if test $ac_cv_header_wchar_h = yes; then
10794 HAVE_WCHAR_H=1
10795 else
10796 HAVE_WCHAR_H=0
10797 fi
10798
10799
10800 if test $ac_cv_header_inttypes_h = yes; then
10801 HAVE_INTTYPES_H=1
10802 else
10803 HAVE_INTTYPES_H=0
10804 fi
10805
10806
10807 if test $ac_cv_header_sys_types_h = yes; then
10808 HAVE_SYS_TYPES_H=1
10809 else
10810 HAVE_SYS_TYPES_H=0
10811 fi
10812
10813
10814
10815
10816
10817
10818
10819
10820 :
10821
10822
10823
10824
10825
10826
10827
10828
10829 if test $gl_cv_have_include_next = yes; then
10830 gl_cv_next_stdint_h='<'stdint.h'>'
10831 else
10832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
10833 $as_echo_n "checking absolute name of <stdint.h>... " >&6; }
10834 if ${gl_cv_next_stdint_h+:} false; then :
10835 $as_echo_n "(cached) " >&6
10836 else
10837
10838 if test $ac_cv_header_stdint_h = yes; then
10839
10840
10841
10842
10843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10844 /* end confdefs.h. */
10845 #include <stdint.h>
10846 _ACEOF
10847 case "$host_os" in
10848 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10849 *) gl_absname_cpp="$ac_cpp" ;;
10850 esac
10851
10852 case "$host_os" in
10853 mingw*)
10854 gl_dirsep_regex='[/\\]'
10855 ;;
10856 *)
10857 gl_dirsep_regex='\/'
10858 ;;
10859 esac
10860 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10861 gl_header_literal_regex=`echo 'stdint.h' \
10862 | sed -e "$gl_make_literal_regex_sed"`
10863 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10864 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10865 s|^/[^/]|//&|
10866 p
10867 q
10868 }'
10869
10870 gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10871 sed -n "$gl_absolute_header_sed"`
10872
10873 gl_header=$gl_cv_absolute_stdint_h
10874 gl_cv_next_stdint_h='"'$gl_header'"'
10875 else
10876 gl_cv_next_stdint_h='<'stdint.h'>'
10877 fi
10878
10879
10880 fi
10881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
10882 $as_echo "$gl_cv_next_stdint_h" >&6; }
10883 fi
10884 NEXT_STDINT_H=$gl_cv_next_stdint_h
10885
10886 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10887 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10888 gl_next_as_first_directive='<'stdint.h'>'
10889 else
10890 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10891 gl_next_as_first_directive=$gl_cv_next_stdint_h
10892 fi
10893 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
10894
10895
10896
10897
10898 if test $ac_cv_header_stdint_h = yes; then
10899 HAVE_STDINT_H=1
10900 else
10901 HAVE_STDINT_H=0
10902 fi
10903
10904
10905 if test $ac_cv_header_stdint_h = yes; then
10906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
10907 $as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
10908 if ${gl_cv_header_working_stdint_h+:} false; then :
10909 $as_echo_n "(cached) " >&6
10910 else
10911 gl_cv_header_working_stdint_h=no
10912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10913 /* end confdefs.h. */
10914
10915
10916 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
10917 #define __STDC_CONSTANT_MACROS 1
10918 #define __STDC_LIMIT_MACROS 1
10919 #include <stdint.h>
10920 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
10921 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
10922 #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
10923 #endif
10924
10925
10926 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10927 included before <wchar.h>. */
10928 #include <stddef.h>
10929 #include <signal.h>
10930 #if HAVE_WCHAR_H
10931 # include <stdio.h>
10932 # include <time.h>
10933 # include <wchar.h>
10934 #endif
10935
10936
10937 #ifdef INT8_MAX
10938 int8_t a1 = INT8_MAX;
10939 int8_t a1min = INT8_MIN;
10940 #endif
10941 #ifdef INT16_MAX
10942 int16_t a2 = INT16_MAX;
10943 int16_t a2min = INT16_MIN;
10944 #endif
10945 #ifdef INT32_MAX
10946 int32_t a3 = INT32_MAX;
10947 int32_t a3min = INT32_MIN;
10948 #endif
10949 #ifdef INT64_MAX
10950 int64_t a4 = INT64_MAX;
10951 int64_t a4min = INT64_MIN;
10952 #endif
10953 #ifdef UINT8_MAX
10954 uint8_t b1 = UINT8_MAX;
10955 #else
10956 typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
10957 #endif
10958 #ifdef UINT16_MAX
10959 uint16_t b2 = UINT16_MAX;
10960 #endif
10961 #ifdef UINT32_MAX
10962 uint32_t b3 = UINT32_MAX;
10963 #endif
10964 #ifdef UINT64_MAX
10965 uint64_t b4 = UINT64_MAX;
10966 #endif
10967 int_least8_t c1 = INT8_C (0x7f);
10968 int_least8_t c1max = INT_LEAST8_MAX;
10969 int_least8_t c1min = INT_LEAST8_MIN;
10970 int_least16_t c2 = INT16_C (0x7fff);
10971 int_least16_t c2max = INT_LEAST16_MAX;
10972 int_least16_t c2min = INT_LEAST16_MIN;
10973 int_least32_t c3 = INT32_C (0x7fffffff);
10974 int_least32_t c3max = INT_LEAST32_MAX;
10975 int_least32_t c3min = INT_LEAST32_MIN;
10976 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
10977 int_least64_t c4max = INT_LEAST64_MAX;
10978 int_least64_t c4min = INT_LEAST64_MIN;
10979 uint_least8_t d1 = UINT8_C (0xff);
10980 uint_least8_t d1max = UINT_LEAST8_MAX;
10981 uint_least16_t d2 = UINT16_C (0xffff);
10982 uint_least16_t d2max = UINT_LEAST16_MAX;
10983 uint_least32_t d3 = UINT32_C (0xffffffff);
10984 uint_least32_t d3max = UINT_LEAST32_MAX;
10985 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
10986 uint_least64_t d4max = UINT_LEAST64_MAX;
10987 int_fast8_t e1 = INT_FAST8_MAX;
10988 int_fast8_t e1min = INT_FAST8_MIN;
10989 int_fast16_t e2 = INT_FAST16_MAX;
10990 int_fast16_t e2min = INT_FAST16_MIN;
10991 int_fast32_t e3 = INT_FAST32_MAX;
10992 int_fast32_t e3min = INT_FAST32_MIN;
10993 int_fast64_t e4 = INT_FAST64_MAX;
10994 int_fast64_t e4min = INT_FAST64_MIN;
10995 uint_fast8_t f1 = UINT_FAST8_MAX;
10996 uint_fast16_t f2 = UINT_FAST16_MAX;
10997 uint_fast32_t f3 = UINT_FAST32_MAX;
10998 uint_fast64_t f4 = UINT_FAST64_MAX;
10999 #ifdef INTPTR_MAX
11000 intptr_t g = INTPTR_MAX;
11001 intptr_t gmin = INTPTR_MIN;
11002 #endif
11003 #ifdef UINTPTR_MAX
11004 uintptr_t h = UINTPTR_MAX;
11005 #endif
11006 intmax_t i = INTMAX_MAX;
11007 uintmax_t j = UINTMAX_MAX;
11008
11009 /* Check that SIZE_MAX has the correct type, if possible. */
11010 #if 201112 <= __STDC_VERSION__
11011 int k = _Generic (SIZE_MAX, size_t: 0);
11012 #elif (2 <= __GNUC__ || defined __IBM__TYPEOF__ \
11013 || (0x5110 <= __SUNPRO_C && !__STDC__))
11014 extern size_t k;
11015 extern __typeof__ (SIZE_MAX) k;
11016 #endif
11017
11018 #include <limits.h> /* for CHAR_BIT */
11019 #define TYPE_MINIMUM(t) \
11020 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
11021 #define TYPE_MAXIMUM(t) \
11022 ((t) ((t) 0 < (t) -1 \
11023 ? (t) -1 \
11024 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
11025 struct s {
11026 int check_PTRDIFF:
11027 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
11028 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
11029 ? 1 : -1;
11030 /* Detect bug in FreeBSD 6.0 / ia64. */
11031 int check_SIG_ATOMIC:
11032 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
11033 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
11034 ? 1 : -1;
11035 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
11036 int check_WCHAR:
11037 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
11038 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
11039 ? 1 : -1;
11040 /* Detect bug in mingw. */
11041 int check_WINT:
11042 WINT_MIN == TYPE_MINIMUM (wint_t)
11043 && WINT_MAX == TYPE_MAXIMUM (wint_t)
11044 ? 1 : -1;
11045
11046 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
11047 int check_UINT8_C:
11048 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
11049 int check_UINT16_C:
11050 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
11051
11052 /* Detect bugs in OpenBSD 3.9 stdint.h. */
11053 #ifdef UINT8_MAX
11054 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
11055 #endif
11056 #ifdef UINT16_MAX
11057 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
11058 #endif
11059 #ifdef UINT32_MAX
11060 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
11061 #endif
11062 #ifdef UINT64_MAX
11063 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
11064 #endif
11065 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
11066 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
11067 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
11068 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
11069 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
11070 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
11071 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
11072 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
11073 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
11074 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
11075 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
11076 };
11077
11078 int
11079 main ()
11080 {
11081
11082 ;
11083 return 0;
11084 }
11085 _ACEOF
11086 if ac_fn_c_try_compile "$LINENO"; then :
11087 if test "$cross_compiling" = yes; then :
11088 gl_cv_header_working_stdint_h=yes
11089
11090 else
11091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11092 /* end confdefs.h. */
11093
11094
11095 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
11096 #define __STDC_CONSTANT_MACROS 1
11097 #define __STDC_LIMIT_MACROS 1
11098 #include <stdint.h>
11099
11100
11101 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11102 included before <wchar.h>. */
11103 #include <stddef.h>
11104 #include <signal.h>
11105 #if HAVE_WCHAR_H
11106 # include <stdio.h>
11107 # include <time.h>
11108 # include <wchar.h>
11109 #endif
11110
11111
11112 #include <stdio.h>
11113 #include <string.h>
11114 #define MVAL(macro) MVAL1(macro)
11115 #define MVAL1(expression) #expression
11116 static const char *macro_values[] =
11117 {
11118 #ifdef INT8_MAX
11119 MVAL (INT8_MAX),
11120 #endif
11121 #ifdef INT16_MAX
11122 MVAL (INT16_MAX),
11123 #endif
11124 #ifdef INT32_MAX
11125 MVAL (INT32_MAX),
11126 #endif
11127 #ifdef INT64_MAX
11128 MVAL (INT64_MAX),
11129 #endif
11130 #ifdef UINT8_MAX
11131 MVAL (UINT8_MAX),
11132 #endif
11133 #ifdef UINT16_MAX
11134 MVAL (UINT16_MAX),
11135 #endif
11136 #ifdef UINT32_MAX
11137 MVAL (UINT32_MAX),
11138 #endif
11139 #ifdef UINT64_MAX
11140 MVAL (UINT64_MAX),
11141 #endif
11142 NULL
11143 };
11144
11145 int
11146 main ()
11147 {
11148
11149 const char **mv;
11150 for (mv = macro_values; *mv != NULL; mv++)
11151 {
11152 const char *value = *mv;
11153 /* Test whether it looks like a cast expression. */
11154 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
11155 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
11156 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
11157 || strncmp (value, "((int)"/*)*/, 6) == 0
11158 || strncmp (value, "((signed short)"/*)*/, 15) == 0
11159 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
11160 return mv - macro_values + 1;
11161 }
11162 return 0;
11163
11164 ;
11165 return 0;
11166 }
11167 _ACEOF
11168 if ac_fn_c_try_run "$LINENO"; then :
11169 gl_cv_header_working_stdint_h=yes
11170 fi
11171 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11172 conftest.$ac_objext conftest.beam conftest.$ac_ext
11173 fi
11174
11175
11176 fi
11177 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11178
11179 fi
11180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
11181 $as_echo "$gl_cv_header_working_stdint_h" >&6; }
11182 fi
11183
11184 HAVE_C99_STDINT_H=0
11185 HAVE_SYS_BITYPES_H=0
11186 HAVE_SYS_INTTYPES_H=0
11187 STDINT_H=stdint.h
11188 if test "$gl_cv_header_working_stdint_h" = yes; then
11189 HAVE_C99_STDINT_H=1
11190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h predates C++11" >&5
11191 $as_echo_n "checking whether stdint.h predates C++11... " >&6; }
11192 if ${gl_cv_header_stdint_predates_cxx11_h+:} false; then :
11193 $as_echo_n "(cached) " >&6
11194 else
11195 gl_cv_header_stdint_predates_cxx11_h=yes
11196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11197 /* end confdefs.h. */
11198
11199
11200 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
11201 #include <stdint.h>
11202
11203
11204 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11205 included before <wchar.h>. */
11206 #include <stddef.h>
11207 #include <signal.h>
11208 #if HAVE_WCHAR_H
11209 # include <stdio.h>
11210 # include <time.h>
11211 # include <wchar.h>
11212 #endif
11213
11214
11215 intmax_t im = INTMAX_MAX;
11216 int32_t i32 = INT32_C (0x7fffffff);
11217
11218 int
11219 main ()
11220 {
11221
11222 ;
11223 return 0;
11224 }
11225 _ACEOF
11226 if ac_fn_c_try_compile "$LINENO"; then :
11227 gl_cv_header_stdint_predates_cxx11_h=no
11228 fi
11229 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11230 fi
11231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_predates_cxx11_h" >&5
11232 $as_echo "$gl_cv_header_stdint_predates_cxx11_h" >&6; }
11233
11234 if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then
11235
11236 $as_echo "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
11237
11238
11239 $as_echo "#define __STDC_LIMIT_MACROS 1" >>confdefs.h
11240
11241 fi
11242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5
11243 $as_echo_n "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; }
11244 if ${gl_cv_header_stdint_width+:} false; then :
11245 $as_echo_n "(cached) " >&6
11246 else
11247 gl_cv_header_stdint_width=no
11248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11249 /* end confdefs.h. */
11250
11251 /* Work if build is not clean. */
11252 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
11253 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
11254 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
11255 #endif
11256 #include <stdint.h>
11257
11258 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11259 included before <wchar.h>. */
11260 #include <stddef.h>
11261 #include <signal.h>
11262 #if HAVE_WCHAR_H
11263 # include <stdio.h>
11264 # include <time.h>
11265 # include <wchar.h>
11266 #endif
11267
11268 int iw = UINTMAX_WIDTH;
11269
11270 int
11271 main ()
11272 {
11273
11274 ;
11275 return 0;
11276 }
11277 _ACEOF
11278 if ac_fn_c_try_compile "$LINENO"; then :
11279 gl_cv_header_stdint_width=yes
11280 fi
11281 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11282 fi
11283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5
11284 $as_echo "$gl_cv_header_stdint_width" >&6; }
11285 if test "$gl_cv_header_stdint_width" = yes; then
11286 STDINT_H=
11287 fi
11288 else
11289 for ac_header in sys/inttypes.h sys/bitypes.h
11290 do :
11291 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11292 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11293 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
11294 cat >>confdefs.h <<_ACEOF
11295 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11296 _ACEOF
11297
11298 fi
11299
11300 done
11301
11302 if test $ac_cv_header_sys_inttypes_h = yes; then
11303 HAVE_SYS_INTTYPES_H=1
11304 fi
11305 if test $ac_cv_header_sys_bitypes_h = yes; then
11306 HAVE_SYS_BITYPES_H=1
11307 fi
11308
11309
11310 if test $APPLE_UNIVERSAL_BUILD = 0; then
11311
11312
11313 for gltype in ptrdiff_t size_t ; do
11314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
11315 $as_echo_n "checking for bit size of $gltype... " >&6; }
11316 if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
11317 $as_echo_n "(cached) " >&6
11318 else
11319 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
11320 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11321 included before <wchar.h>. */
11322 #include <stddef.h>
11323 #include <signal.h>
11324 #if HAVE_WCHAR_H
11325 # include <stdio.h>
11326 # include <time.h>
11327 # include <wchar.h>
11328 #endif
11329
11330 #include <limits.h>"; then :
11331
11332 else
11333 result=unknown
11334 fi
11335
11336 eval gl_cv_bitsizeof_${gltype}=\$result
11337
11338 fi
11339 eval ac_res=\$gl_cv_bitsizeof_${gltype}
11340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11341 $as_echo "$ac_res" >&6; }
11342 eval result=\$gl_cv_bitsizeof_${gltype}
11343 if test $result = unknown; then
11344 result=0
11345 fi
11346 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
11347 cat >>confdefs.h <<_ACEOF
11348 #define BITSIZEOF_${GLTYPE} $result
11349 _ACEOF
11350
11351 eval BITSIZEOF_${GLTYPE}=\$result
11352 done
11353
11354
11355 fi
11356
11357
11358 for gltype in sig_atomic_t wchar_t wint_t ; do
11359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
11360 $as_echo_n "checking for bit size of $gltype... " >&6; }
11361 if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
11362 $as_echo_n "(cached) " >&6
11363 else
11364 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
11365 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11366 included before <wchar.h>. */
11367 #include <stddef.h>
11368 #include <signal.h>
11369 #if HAVE_WCHAR_H
11370 # include <stdio.h>
11371 # include <time.h>
11372 # include <wchar.h>
11373 #endif
11374
11375 #include <limits.h>"; then :
11376
11377 else
11378 result=unknown
11379 fi
11380
11381 eval gl_cv_bitsizeof_${gltype}=\$result
11382
11383 fi
11384 eval ac_res=\$gl_cv_bitsizeof_${gltype}
11385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11386 $as_echo "$ac_res" >&6; }
11387 eval result=\$gl_cv_bitsizeof_${gltype}
11388 if test $result = unknown; then
11389 result=0
11390 fi
11391 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
11392 cat >>confdefs.h <<_ACEOF
11393 #define BITSIZEOF_${GLTYPE} $result
11394 _ACEOF
11395
11396 eval BITSIZEOF_${GLTYPE}=\$result
11397 done
11398
11399
11400
11401
11402 for gltype in sig_atomic_t wchar_t wint_t ; do
11403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
11404 $as_echo_n "checking whether $gltype is signed... " >&6; }
11405 if eval \${gl_cv_type_${gltype}_signed+:} false; then :
11406 $as_echo_n "(cached) " >&6
11407 else
11408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11409 /* end confdefs.h. */
11410
11411 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11412 included before <wchar.h>. */
11413 #include <stddef.h>
11414 #include <signal.h>
11415 #if HAVE_WCHAR_H
11416 # include <stdio.h>
11417 # include <time.h>
11418 # include <wchar.h>
11419 #endif
11420
11421 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
11422 int
11423 main ()
11424 {
11425
11426 ;
11427 return 0;
11428 }
11429 _ACEOF
11430 if ac_fn_c_try_compile "$LINENO"; then :
11431 result=yes
11432 else
11433 result=no
11434 fi
11435 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11436 eval gl_cv_type_${gltype}_signed=\$result
11437
11438 fi
11439 eval ac_res=\$gl_cv_type_${gltype}_signed
11440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11441 $as_echo "$ac_res" >&6; }
11442 eval result=\$gl_cv_type_${gltype}_signed
11443 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
11444 if test "$result" = yes; then
11445 cat >>confdefs.h <<_ACEOF
11446 #define HAVE_SIGNED_${GLTYPE} 1
11447 _ACEOF
11448
11449 eval HAVE_SIGNED_${GLTYPE}=1
11450 else
11451 eval HAVE_SIGNED_${GLTYPE}=0
11452 fi
11453 done
11454
11455
11456 gl_cv_type_ptrdiff_t_signed=yes
11457 gl_cv_type_size_t_signed=no
11458 if test $APPLE_UNIVERSAL_BUILD = 0; then
11459
11460
11461 for gltype in ptrdiff_t size_t ; do
11462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
11463 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
11464 if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
11465 $as_echo_n "(cached) " >&6
11466 else
11467 eval gl_cv_type_${gltype}_suffix=no
11468 eval result=\$gl_cv_type_${gltype}_signed
11469 if test "$result" = yes; then
11470 glsufu=
11471 else
11472 glsufu=u
11473 fi
11474 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
11475 case $glsuf in
11476 '') gltype1='int';;
11477 l) gltype1='long int';;
11478 ll) gltype1='long long int';;
11479 i64) gltype1='__int64';;
11480 u) gltype1='unsigned int';;
11481 ul) gltype1='unsigned long int';;
11482 ull) gltype1='unsigned long long int';;
11483 ui64)gltype1='unsigned __int64';;
11484 esac
11485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11486 /* end confdefs.h. */
11487
11488 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11489 included before <wchar.h>. */
11490 #include <stddef.h>
11491 #include <signal.h>
11492 #if HAVE_WCHAR_H
11493 # include <stdio.h>
11494 # include <time.h>
11495 # include <wchar.h>
11496 #endif
11497
11498 extern $gltype foo;
11499 extern $gltype1 foo;
11500 int
11501 main ()
11502 {
11503
11504 ;
11505 return 0;
11506 }
11507 _ACEOF
11508 if ac_fn_c_try_compile "$LINENO"; then :
11509 eval gl_cv_type_${gltype}_suffix=\$glsuf
11510 fi
11511 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11512 eval result=\$gl_cv_type_${gltype}_suffix
11513 test "$result" != no && break
11514 done
11515 fi
11516 eval ac_res=\$gl_cv_type_${gltype}_suffix
11517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11518 $as_echo "$ac_res" >&6; }
11519 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
11520 eval result=\$gl_cv_type_${gltype}_suffix
11521 test "$result" = no && result=
11522 eval ${GLTYPE}_SUFFIX=\$result
11523 cat >>confdefs.h <<_ACEOF
11524 #define ${GLTYPE}_SUFFIX $result
11525 _ACEOF
11526
11527 done
11528
11529
11530 fi
11531
11532
11533 for gltype in sig_atomic_t wchar_t wint_t ; do
11534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
11535 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
11536 if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
11537 $as_echo_n "(cached) " >&6
11538 else
11539 eval gl_cv_type_${gltype}_suffix=no
11540 eval result=\$gl_cv_type_${gltype}_signed
11541 if test "$result" = yes; then
11542 glsufu=
11543 else
11544 glsufu=u
11545 fi
11546 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
11547 case $glsuf in
11548 '') gltype1='int';;
11549 l) gltype1='long int';;
11550 ll) gltype1='long long int';;
11551 i64) gltype1='__int64';;
11552 u) gltype1='unsigned int';;
11553 ul) gltype1='unsigned long int';;
11554 ull) gltype1='unsigned long long int';;
11555 ui64)gltype1='unsigned __int64';;
11556 esac
11557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11558 /* end confdefs.h. */
11559
11560 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11561 included before <wchar.h>. */
11562 #include <stddef.h>
11563 #include <signal.h>
11564 #if HAVE_WCHAR_H
11565 # include <stdio.h>
11566 # include <time.h>
11567 # include <wchar.h>
11568 #endif
11569
11570 extern $gltype foo;
11571 extern $gltype1 foo;
11572 int
11573 main ()
11574 {
11575
11576 ;
11577 return 0;
11578 }
11579 _ACEOF
11580 if ac_fn_c_try_compile "$LINENO"; then :
11581 eval gl_cv_type_${gltype}_suffix=\$glsuf
11582 fi
11583 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11584 eval result=\$gl_cv_type_${gltype}_suffix
11585 test "$result" != no && break
11586 done
11587 fi
11588 eval ac_res=\$gl_cv_type_${gltype}_suffix
11589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11590 $as_echo "$ac_res" >&6; }
11591 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
11592 eval result=\$gl_cv_type_${gltype}_suffix
11593 test "$result" = no && result=
11594 eval ${GLTYPE}_SUFFIX=\$result
11595 cat >>confdefs.h <<_ACEOF
11596 #define ${GLTYPE}_SUFFIX $result
11597 _ACEOF
11598
11599 done
11600
11601
11602
11603 if test $BITSIZEOF_WINT_T -lt 32; then
11604 BITSIZEOF_WINT_T=32
11605 fi
11606
11607 fi
11608
11609 # The substitute stdint.h needs the substitute limit.h's _GL_INTEGER_WIDTH.
11610 LIMITS_H=limits.h
11611 if test -n "$LIMITS_H"; then
11612 GL_GENERATE_LIMITS_H_TRUE=
11613 GL_GENERATE_LIMITS_H_FALSE='#'
11614 else
11615 GL_GENERATE_LIMITS_H_TRUE='#'
11616 GL_GENERATE_LIMITS_H_FALSE=
11617 fi
11618
11619
11620
11621
11622
11623
11624 if test -n "$STDINT_H"; then
11625 GL_GENERATE_STDINT_H_TRUE=
11626 GL_GENERATE_STDINT_H_FALSE='#'
11627 else
11628 GL_GENERATE_STDINT_H_TRUE='#'
11629 GL_GENERATE_STDINT_H_FALSE=
11630 fi
11631
11632
11633
11634
11635
11636
11637
11638
11639 GNULIB_IMAXABS=0;
11640 GNULIB_IMAXDIV=0;
11641 GNULIB_STRTOIMAX=0;
11642 GNULIB_STRTOUMAX=0;
11643 HAVE_DECL_IMAXABS=1;
11644 HAVE_DECL_IMAXDIV=1;
11645 HAVE_DECL_STRTOIMAX=1;
11646 HAVE_DECL_STRTOUMAX=1;
11647 REPLACE_STRTOIMAX=0;
11648 REPLACE_STRTOUMAX=0;
11649 INT32_MAX_LT_INTMAX_MAX=1;
11650 INT64_MAX_EQ_LONG_MAX='defined _LP64';
11651 PRI_MACROS_BROKEN=0;
11652 PRIPTR_PREFIX=__PRIPTR_PREFIX;
11653 UINT32_MAX_LT_UINTMAX_MAX=1;
11654 UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
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
11682 if test $gl_cv_have_include_next = yes; then
11683 gl_cv_next_inttypes_h='<'inttypes.h'>'
11684 else
11685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
11686 $as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
11687 if ${gl_cv_next_inttypes_h+:} false; then :
11688 $as_echo_n "(cached) " >&6
11689 else
11690
11691 if test $ac_cv_header_inttypes_h = yes; then
11692
11693
11694
11695
11696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11697 /* end confdefs.h. */
11698 #include <inttypes.h>
11699 _ACEOF
11700 case "$host_os" in
11701 aix*) gl_absname_cpp="$ac_cpp -C" ;;
11702 *) gl_absname_cpp="$ac_cpp" ;;
11703 esac
11704
11705 case "$host_os" in
11706 mingw*)
11707 gl_dirsep_regex='[/\\]'
11708 ;;
11709 *)
11710 gl_dirsep_regex='\/'
11711 ;;
11712 esac
11713 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11714 gl_header_literal_regex=`echo 'inttypes.h' \
11715 | sed -e "$gl_make_literal_regex_sed"`
11716 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11717 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11718 s|^/[^/]|//&|
11719 p
11720 q
11721 }'
11722
11723 gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11724 sed -n "$gl_absolute_header_sed"`
11725
11726 gl_header=$gl_cv_absolute_inttypes_h
11727 gl_cv_next_inttypes_h='"'$gl_header'"'
11728 else
11729 gl_cv_next_inttypes_h='<'inttypes.h'>'
11730 fi
11731
11732
11733 fi
11734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
11735 $as_echo "$gl_cv_next_inttypes_h" >&6; }
11736 fi
11737 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
11738
11739 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11740 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11741 gl_next_as_first_directive='<'inttypes.h'>'
11742 else
11743 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11744 gl_next_as_first_directive=$gl_cv_next_inttypes_h
11745 fi
11746 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
11747
11748
11749
11750
11751
11752
11753
11754
11755 for gl_func in imaxabs imaxdiv strtoimax strtoumax; do
11756 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
11757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
11758 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
11759 if eval \${$as_gl_Symbol+:} false; then :
11760 $as_echo_n "(cached) " >&6
11761 else
11762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11763 /* end confdefs.h. */
11764 #include <inttypes.h>
11765
11766 int
11767 main ()
11768 {
11769 #undef $gl_func
11770 (void) $gl_func;
11771 ;
11772 return 0;
11773 }
11774 _ACEOF
11775 if ac_fn_c_try_compile "$LINENO"; then :
11776 eval "$as_gl_Symbol=yes"
11777 else
11778 eval "$as_gl_Symbol=no"
11779 fi
11780 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11781 fi
11782 eval ac_res=\$$as_gl_Symbol
11783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11784 $as_echo "$ac_res" >&6; }
11785 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
11786 cat >>confdefs.h <<_ACEOF
11787 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
11788 _ACEOF
11789
11790 eval ac_cv_have_decl_$gl_func=yes
11791 fi
11792 done
11793
11794
11795
11796 for ac_header in inttypes.h
11797 do :
11798 ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
11799 if test "x$ac_cv_header_inttypes_h" = xyes; then :
11800 cat >>confdefs.h <<_ACEOF
11801 #define HAVE_INTTYPES_H 1
11802 _ACEOF
11803
11804 fi
11805
11806 done
11807
11808 if test $ac_cv_header_inttypes_h = yes; then
11809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5
11810 $as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; }
11811 if ${gt_cv_inttypes_pri_broken+:} false; then :
11812 $as_echo_n "(cached) " >&6
11813 else
11814
11815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11816 /* end confdefs.h. */
11817
11818 #include <inttypes.h>
11819 #ifdef PRId32
11820 char *p = PRId32;
11821 #endif
11822
11823 int
11824 main ()
11825 {
11826
11827 ;
11828 return 0;
11829 }
11830 _ACEOF
11831 if ac_fn_c_try_compile "$LINENO"; then :
11832 gt_cv_inttypes_pri_broken=no
11833 else
11834 gt_cv_inttypes_pri_broken=yes
11835 fi
11836 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11837
11838 fi
11839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5
11840 $as_echo "$gt_cv_inttypes_pri_broken" >&6; }
11841 fi
11842 if test "$gt_cv_inttypes_pri_broken" = yes; then
11843
11844 cat >>confdefs.h <<_ACEOF
11845 #define PRI_MACROS_BROKEN 1
11846 _ACEOF
11847
11848 PRI_MACROS_BROKEN=1
11849 else
11850 PRI_MACROS_BROKEN=0
11851 fi
11852
11853
11854
11855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
11856 $as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
11857 if ${gl_cv_cc_double_expbit0+:} false; then :
11858 $as_echo_n "(cached) " >&6
11859 else
11860
11861 if test "$cross_compiling" = yes; then :
11862
11863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11864 /* end confdefs.h. */
11865
11866 #if defined arm || defined __arm || defined __arm__
11867 mixed_endianness
11868 #endif
11869
11870 _ACEOF
11871 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11872 $EGREP "mixed_endianness" >/dev/null 2>&1; then :
11873 gl_cv_cc_double_expbit0="unknown"
11874 else
11875
11876 :
11877 if ${ac_cv_c_bigendian+:} false; then :
11878 $as_echo_n "(cached) " >&6
11879 else
11880 ac_cv_c_bigendian=unknown
11881 # See if we're dealing with a universal compiler.
11882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11883 /* end confdefs.h. */
11884 #ifndef __APPLE_CC__
11885 not a universal capable compiler
11886 #endif
11887 typedef int dummy;
11888
11889 _ACEOF
11890 if ac_fn_c_try_compile "$LINENO"; then :
11891
11892 # Check for potential -arch flags. It is not universal unless
11893 # there are at least two -arch flags with different values.
11894 ac_arch=
11895 ac_prev=
11896 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
11897 if test -n "$ac_prev"; then
11898 case $ac_word in
11899 i?86 | x86_64 | ppc | ppc64)
11900 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
11901 ac_arch=$ac_word
11902 else
11903 ac_cv_c_bigendian=universal
11904 break
11905 fi
11906 ;;
11907 esac
11908 ac_prev=
11909 elif test "x$ac_word" = "x-arch"; then
11910 ac_prev=arch
11911 fi
11912 done
11913 fi
11914 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11915 if test $ac_cv_c_bigendian = unknown; then
11916 # See if sys/param.h defines the BYTE_ORDER macro.
11917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11918 /* end confdefs.h. */
11919 #include <sys/types.h>
11920 #include <sys/param.h>
11921
11922 int
11923 main ()
11924 {
11925 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
11926 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
11927 && LITTLE_ENDIAN)
11928 bogus endian macros
11929 #endif
11930
11931 ;
11932 return 0;
11933 }
11934 _ACEOF
11935 if ac_fn_c_try_compile "$LINENO"; then :
11936 # It does; now see whether it defined to BIG_ENDIAN or not.
11937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11938 /* end confdefs.h. */
11939 #include <sys/types.h>
11940 #include <sys/param.h>
11941
11942 int
11943 main ()
11944 {
11945 #if BYTE_ORDER != BIG_ENDIAN
11946 not big endian
11947 #endif
11948
11949 ;
11950 return 0;
11951 }
11952 _ACEOF
11953 if ac_fn_c_try_compile "$LINENO"; then :
11954 ac_cv_c_bigendian=yes
11955 else
11956 ac_cv_c_bigendian=no
11957 fi
11958 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11959 fi
11960 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11961 fi
11962 if test $ac_cv_c_bigendian = unknown; then
11963 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
11964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11965 /* end confdefs.h. */
11966 #include <limits.h>
11967
11968 int
11969 main ()
11970 {
11971 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
11972 bogus endian macros
11973 #endif
11974
11975 ;
11976 return 0;
11977 }
11978 _ACEOF
11979 if ac_fn_c_try_compile "$LINENO"; then :
11980 # It does; now see whether it defined to _BIG_ENDIAN or not.
11981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11982 /* end confdefs.h. */
11983 #include <limits.h>
11984
11985 int
11986 main ()
11987 {
11988 #ifndef _BIG_ENDIAN
11989 not big endian
11990 #endif
11991
11992 ;
11993 return 0;
11994 }
11995 _ACEOF
11996 if ac_fn_c_try_compile "$LINENO"; then :
11997 ac_cv_c_bigendian=yes
11998 else
11999 ac_cv_c_bigendian=no
12000 fi
12001 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12002 fi
12003 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12004 fi
12005 if test $ac_cv_c_bigendian = unknown; then
12006 # Compile a test program.
12007 if test "$cross_compiling" = yes; then :
12008 # Try to guess by grepping values from an object file.
12009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12010 /* end confdefs.h. */
12011 short int ascii_mm[] =
12012 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12013 short int ascii_ii[] =
12014 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12015 int use_ascii (int i) {
12016 return ascii_mm[i] + ascii_ii[i];
12017 }
12018 short int ebcdic_ii[] =
12019 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12020 short int ebcdic_mm[] =
12021 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12022 int use_ebcdic (int i) {
12023 return ebcdic_mm[i] + ebcdic_ii[i];
12024 }
12025 extern int foo;
12026
12027 int
12028 main ()
12029 {
12030 return use_ascii (foo) == use_ebcdic (foo);
12031 ;
12032 return 0;
12033 }
12034 _ACEOF
12035 if ac_fn_c_try_compile "$LINENO"; then :
12036 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12037 ac_cv_c_bigendian=yes
12038 fi
12039 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12040 if test "$ac_cv_c_bigendian" = unknown; then
12041 ac_cv_c_bigendian=no
12042 else
12043 # finding both strings is unlikely to happen, but who knows?
12044 ac_cv_c_bigendian=unknown
12045 fi
12046 fi
12047 fi
12048 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12049 else
12050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12051 /* end confdefs.h. */
12052 $ac_includes_default
12053 int
12054 main ()
12055 {
12056
12057 /* Are we little or big endian? From Harbison&Steele. */
12058 union
12059 {
12060 long int l;
12061 char c[sizeof (long int)];
12062 } u;
12063 u.l = 1;
12064 return u.c[sizeof (long int) - 1] == 1;
12065
12066 ;
12067 return 0;
12068 }
12069 _ACEOF
12070 if ac_fn_c_try_run "$LINENO"; then :
12071 ac_cv_c_bigendian=no
12072 else
12073 ac_cv_c_bigendian=yes
12074 fi
12075 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12076 conftest.$ac_objext conftest.beam conftest.$ac_ext
12077 fi
12078
12079 fi
12080 fi
12081 :
12082 case $ac_cv_c_bigendian in #(
12083 yes)
12084 gl_cv_cc_double_expbit0="word 0 bit 20";; #(
12085 no)
12086 gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
12087 universal)
12088
12089 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12090
12091 ;; #(
12092 *)
12093 gl_cv_cc_double_expbit0="unknown" ;;
12094 esac
12095
12096
12097 fi
12098 rm -f conftest*
12099
12100
12101 else
12102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12103 /* end confdefs.h. */
12104
12105 #include <float.h>
12106 #include <stddef.h>
12107 #include <stdio.h>
12108 #include <string.h>
12109 #define NWORDS \
12110 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
12111 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
12112 static unsigned int ored_words[NWORDS];
12113 static unsigned int anded_words[NWORDS];
12114 static void add_to_ored_words (double x)
12115 {
12116 memory_double m;
12117 size_t i;
12118 /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
12119 memset (&m, 0, sizeof (memory_double));
12120 m.value = x;
12121 for (i = 0; i < NWORDS; i++)
12122 {
12123 ored_words[i] |= m.word[i];
12124 anded_words[i] &= m.word[i];
12125 }
12126 }
12127 int main ()
12128 {
12129 size_t j;
12130 FILE *fp = fopen ("conftest.out", "w");
12131 if (fp == NULL)
12132 return 1;
12133 for (j = 0; j < NWORDS; j++)
12134 anded_words[j] = ~ (unsigned int) 0;
12135 add_to_ored_words (0.25);
12136 add_to_ored_words (0.5);
12137 add_to_ored_words (1.0);
12138 add_to_ored_words (2.0);
12139 add_to_ored_words (4.0);
12140 /* Remove bits that are common (e.g. if representation of the first mantissa
12141 bit is explicit). */
12142 for (j = 0; j < NWORDS; j++)
12143 ored_words[j] &= ~anded_words[j];
12144 /* Now find the nonzero word. */
12145 for (j = 0; j < NWORDS; j++)
12146 if (ored_words[j] != 0)
12147 break;
12148 if (j < NWORDS)
12149 {
12150 size_t i;
12151 for (i = j + 1; i < NWORDS; i++)
12152 if (ored_words[i] != 0)
12153 {
12154 fprintf (fp, "unknown");
12155 return (fclose (fp) != 0);
12156 }
12157 for (i = 0; ; i++)
12158 if ((ored_words[j] >> i) & 1)
12159 {
12160 fprintf (fp, "word %d bit %d", (int) j, (int) i);
12161 return (fclose (fp) != 0);
12162 }
12163 }
12164 fprintf (fp, "unknown");
12165 return (fclose (fp) != 0);
12166 }
12167
12168 _ACEOF
12169 if ac_fn_c_try_run "$LINENO"; then :
12170 gl_cv_cc_double_expbit0=`cat conftest.out`
12171 else
12172 gl_cv_cc_double_expbit0="unknown"
12173 fi
12174 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12175 conftest.$ac_objext conftest.beam conftest.$ac_ext
12176 fi
12177
12178 rm -f conftest.out
12179
12180 fi
12181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
12182 $as_echo "$gl_cv_cc_double_expbit0" >&6; }
12183 case "$gl_cv_cc_double_expbit0" in
12184 word*bit*)
12185 word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
12186 bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
12187
12188 cat >>confdefs.h <<_ACEOF
12189 #define DBL_EXPBIT0_WORD $word
12190 _ACEOF
12191
12192
12193 cat >>confdefs.h <<_ACEOF
12194 #define DBL_EXPBIT0_BIT $bit
12195 _ACEOF
12196
12197 ;;
12198 esac
12199
12200
12201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12202 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12203 if ${ac_cv_c_bigendian+:} false; then :
12204 $as_echo_n "(cached) " >&6
12205 else
12206 ac_cv_c_bigendian=unknown
12207 # See if we're dealing with a universal compiler.
12208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12209 /* end confdefs.h. */
12210 #ifndef __APPLE_CC__
12211 not a universal capable compiler
12212 #endif
12213 typedef int dummy;
12214
12215 _ACEOF
12216 if ac_fn_c_try_compile "$LINENO"; then :
12217
12218 # Check for potential -arch flags. It is not universal unless
12219 # there are at least two -arch flags with different values.
12220 ac_arch=
12221 ac_prev=
12222 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12223 if test -n "$ac_prev"; then
12224 case $ac_word in
12225 i?86 | x86_64 | ppc | ppc64)
12226 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12227 ac_arch=$ac_word
12228 else
12229 ac_cv_c_bigendian=universal
12230 break
12231 fi
12232 ;;
12233 esac
12234 ac_prev=
12235 elif test "x$ac_word" = "x-arch"; then
12236 ac_prev=arch
12237 fi
12238 done
12239 fi
12240 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12241 if test $ac_cv_c_bigendian = unknown; then
12242 # See if sys/param.h defines the BYTE_ORDER macro.
12243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12244 /* end confdefs.h. */
12245 #include <sys/types.h>
12246 #include <sys/param.h>
12247
12248 int
12249 main ()
12250 {
12251 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12252 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12253 && LITTLE_ENDIAN)
12254 bogus endian macros
12255 #endif
12256
12257 ;
12258 return 0;
12259 }
12260 _ACEOF
12261 if ac_fn_c_try_compile "$LINENO"; then :
12262 # It does; now see whether it defined to BIG_ENDIAN or not.
12263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12264 /* end confdefs.h. */
12265 #include <sys/types.h>
12266 #include <sys/param.h>
12267
12268 int
12269 main ()
12270 {
12271 #if BYTE_ORDER != BIG_ENDIAN
12272 not big endian
12273 #endif
12274
12275 ;
12276 return 0;
12277 }
12278 _ACEOF
12279 if ac_fn_c_try_compile "$LINENO"; then :
12280 ac_cv_c_bigendian=yes
12281 else
12282 ac_cv_c_bigendian=no
12283 fi
12284 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12285 fi
12286 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12287 fi
12288 if test $ac_cv_c_bigendian = unknown; then
12289 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12291 /* end confdefs.h. */
12292 #include <limits.h>
12293
12294 int
12295 main ()
12296 {
12297 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12298 bogus endian macros
12299 #endif
12300
12301 ;
12302 return 0;
12303 }
12304 _ACEOF
12305 if ac_fn_c_try_compile "$LINENO"; then :
12306 # It does; now see whether it defined to _BIG_ENDIAN or not.
12307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12308 /* end confdefs.h. */
12309 #include <limits.h>
12310
12311 int
12312 main ()
12313 {
12314 #ifndef _BIG_ENDIAN
12315 not big endian
12316 #endif
12317
12318 ;
12319 return 0;
12320 }
12321 _ACEOF
12322 if ac_fn_c_try_compile "$LINENO"; then :
12323 ac_cv_c_bigendian=yes
12324 else
12325 ac_cv_c_bigendian=no
12326 fi
12327 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12328 fi
12329 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12330 fi
12331 if test $ac_cv_c_bigendian = unknown; then
12332 # Compile a test program.
12333 if test "$cross_compiling" = yes; then :
12334 # Try to guess by grepping values from an object file.
12335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12336 /* end confdefs.h. */
12337 short int ascii_mm[] =
12338 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12339 short int ascii_ii[] =
12340 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12341 int use_ascii (int i) {
12342 return ascii_mm[i] + ascii_ii[i];
12343 }
12344 short int ebcdic_ii[] =
12345 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12346 short int ebcdic_mm[] =
12347 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12348 int use_ebcdic (int i) {
12349 return ebcdic_mm[i] + ebcdic_ii[i];
12350 }
12351 extern int foo;
12352
12353 int
12354 main ()
12355 {
12356 return use_ascii (foo) == use_ebcdic (foo);
12357 ;
12358 return 0;
12359 }
12360 _ACEOF
12361 if ac_fn_c_try_compile "$LINENO"; then :
12362 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12363 ac_cv_c_bigendian=yes
12364 fi
12365 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12366 if test "$ac_cv_c_bigendian" = unknown; then
12367 ac_cv_c_bigendian=no
12368 else
12369 # finding both strings is unlikely to happen, but who knows?
12370 ac_cv_c_bigendian=unknown
12371 fi
12372 fi
12373 fi
12374 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12375 else
12376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12377 /* end confdefs.h. */
12378 $ac_includes_default
12379 int
12380 main ()
12381 {
12382
12383 /* Are we little or big endian? From Harbison&Steele. */
12384 union
12385 {
12386 long int l;
12387 char c[sizeof (long int)];
12388 } u;
12389 u.l = 1;
12390 return u.c[sizeof (long int) - 1] == 1;
12391
12392 ;
12393 return 0;
12394 }
12395 _ACEOF
12396 if ac_fn_c_try_run "$LINENO"; then :
12397 ac_cv_c_bigendian=no
12398 else
12399 ac_cv_c_bigendian=yes
12400 fi
12401 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12402 conftest.$ac_objext conftest.beam conftest.$ac_ext
12403 fi
12404
12405 fi
12406 fi
12407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12408 $as_echo "$ac_cv_c_bigendian" >&6; }
12409 case $ac_cv_c_bigendian in #(
12410 yes)
12411 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12412 ;; #(
12413 no)
12414 ;; #(
12415 universal)
12416
12417 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12418
12419 ;; #(
12420 *)
12421 as_fn_error $? "unknown endianness
12422 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12423 esac
12424
12425
12426
12427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12428 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12429 if ${am_cv_langinfo_codeset+:} false; then :
12430 $as_echo_n "(cached) " >&6
12431 else
12432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12433 /* end confdefs.h. */
12434 #include <langinfo.h>
12435 int
12436 main ()
12437 {
12438 char* cs = nl_langinfo(CODESET); return !cs;
12439 ;
12440 return 0;
12441 }
12442 _ACEOF
12443 if ac_fn_c_try_link "$LINENO"; then :
12444 am_cv_langinfo_codeset=yes
12445 else
12446 am_cv_langinfo_codeset=no
12447 fi
12448 rm -f core conftest.err conftest.$ac_objext \
12449 conftest$ac_exeext conftest.$ac_ext
12450
12451 fi
12452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12453 $as_echo "$am_cv_langinfo_codeset" >&6; }
12454 if test $am_cv_langinfo_codeset = yes; then
12455
12456 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
12457
12458 fi
12459
12460
12461 ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
12462 if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
12463 ac_have_decl=1
12464 else
12465 ac_have_decl=0
12466 fi
12467
12468 cat >>confdefs.h <<_ACEOF
12469 #define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
12470 _ACEOF
12471
12472
12473
12474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5
12475 $as_echo_n "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; }
12476 if ${ac_cv_gnu_library_2_1+:} false; then :
12477 $as_echo_n "(cached) " >&6
12478 else
12479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12480 /* end confdefs.h. */
12481
12482 #include <features.h>
12483 #ifdef __GNU_LIBRARY__
12484 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
12485 Lucky GNU user
12486 #endif
12487 #endif
12488 #ifdef __UCLIBC__
12489 Lucky user
12490 #endif
12491
12492 _ACEOF
12493 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12494 $EGREP "Lucky" >/dev/null 2>&1; then :
12495 ac_cv_gnu_library_2_1=yes
12496 else
12497 ac_cv_gnu_library_2_1=no
12498 fi
12499 rm -f conftest*
12500
12501
12502
12503 fi
12504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
12505 $as_echo "$ac_cv_gnu_library_2_1" >&6; }
12506
12507 GLIBC21="$ac_cv_gnu_library_2_1"
12508
12509
12510
12511 if test "X$prefix" = "XNONE"; then
12512 acl_final_prefix="$ac_default_prefix"
12513 else
12514 acl_final_prefix="$prefix"
12515 fi
12516 if test "X$exec_prefix" = "XNONE"; then
12517 acl_final_exec_prefix='${prefix}'
12518 else
12519 acl_final_exec_prefix="$exec_prefix"
12520 fi
12521 acl_save_prefix="$prefix"
12522 prefix="$acl_final_prefix"
12523 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
12524 prefix="$acl_save_prefix"
12525
12526
12527
12528 # Check whether --with-gnu-ld was given.
12529 if test "${with_gnu_ld+set}" = set; then :
12530 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
12531 else
12532 with_gnu_ld=no
12533 fi
12534
12535 # Prepare PATH_SEPARATOR.
12536 # The user is always right.
12537 if test "${PATH_SEPARATOR+set}" != set; then
12538 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
12539 # contains only /bin. Note that ksh looks also at the FPATH variable,
12540 # so we have to set that as well for the test.
12541 PATH_SEPARATOR=:
12542 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
12543 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
12544 || PATH_SEPARATOR=';'
12545 }
12546 fi
12547
12548 ac_prog=ld
12549 if test "$GCC" = yes; then
12550 # Check if gcc -print-prog-name=ld gives a path.
12551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
12552 $as_echo_n "checking for ld used by $CC... " >&6; }
12553 case $host in
12554 *-*-mingw*)
12555 # gcc leaves a trailing carriage return which upsets mingw
12556 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
12557 *)
12558 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
12559 esac
12560 case $ac_prog in
12561 # Accept absolute paths.
12562 [\\/]* | ?:[\\/]*)
12563 re_direlt='/[^/][^/]*/\.\./'
12564 # Canonicalize the pathname of ld
12565 ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
12566 while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
12567 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
12568 done
12569 test -z "$LD" && LD="$ac_prog"
12570 ;;
12571 "")
12572 # If it fails, then pretend we aren't using GCC.
12573 ac_prog=ld
12574 ;;
12575 *)
12576 # If it is relative, then search for the first ld in PATH.
12577 with_gnu_ld=unknown
12578 ;;
12579 esac
12580 elif test "$with_gnu_ld" = yes; then
12581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
12582 $as_echo_n "checking for GNU ld... " >&6; }
12583 else
12584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
12585 $as_echo_n "checking for non-GNU ld... " >&6; }
12586 fi
12587 if ${acl_cv_path_LD+:} false; then :
12588 $as_echo_n "(cached) " >&6
12589 else
12590 if test -z "$LD"; then
12591 acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
12592 for ac_dir in $PATH; do
12593 IFS="$acl_save_ifs"
12594 test -z "$ac_dir" && ac_dir=.
12595 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
12596 acl_cv_path_LD="$ac_dir/$ac_prog"
12597 # Check to see if the program is GNU ld. I'd rather use --version,
12598 # but apparently some variants of GNU ld only accept -v.
12599 # Break only if it was the GNU/non-GNU ld that we prefer.
12600 case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
12601 *GNU* | *'with BFD'*)
12602 test "$with_gnu_ld" != no && break
12603 ;;
12604 *)
12605 test "$with_gnu_ld" != yes && break
12606 ;;
12607 esac
12608 fi
12609 done
12610 IFS="$acl_save_ifs"
12611 else
12612 acl_cv_path_LD="$LD" # Let the user override the test with a path.
12613 fi
12614 fi
12615
12616 LD="$acl_cv_path_LD"
12617 if test -n "$LD"; then
12618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
12619 $as_echo "$LD" >&6; }
12620 else
12621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12622 $as_echo "no" >&6; }
12623 fi
12624 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
12625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
12626 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
12627 if ${acl_cv_prog_gnu_ld+:} false; then :
12628 $as_echo_n "(cached) " >&6
12629 else
12630 # I'd rather use --version here, but apparently some GNU lds only accept -v.
12631 case `$LD -v 2>&1 </dev/null` in
12632 *GNU* | *'with BFD'*)
12633 acl_cv_prog_gnu_ld=yes
12634 ;;
12635 *)
12636 acl_cv_prog_gnu_ld=no
12637 ;;
12638 esac
12639 fi
12640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
12641 $as_echo "$acl_cv_prog_gnu_ld" >&6; }
12642 with_gnu_ld=$acl_cv_prog_gnu_ld
12643
12644
12645
12646
12647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
12648 $as_echo_n "checking for shared library run path origin... " >&6; }
12649 if ${acl_cv_rpath+:} false; then :
12650 $as_echo_n "(cached) " >&6
12651 else
12652
12653 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
12654 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
12655 . ./conftest.sh
12656 rm -f ./conftest.sh
12657 acl_cv_rpath=done
12658
12659 fi
12660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
12661 $as_echo "$acl_cv_rpath" >&6; }
12662 wl="$acl_cv_wl"
12663 acl_libext="$acl_cv_libext"
12664 acl_shlibext="$acl_cv_shlibext"
12665 acl_libname_spec="$acl_cv_libname_spec"
12666 acl_library_names_spec="$acl_cv_library_names_spec"
12667 acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
12668 acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
12669 acl_hardcode_direct="$acl_cv_hardcode_direct"
12670 acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
12671 # Check whether --enable-rpath was given.
12672 if test "${enable_rpath+set}" = set; then :
12673 enableval=$enable_rpath; :
12674 else
12675 enable_rpath=yes
12676 fi
12677
12678
12679
12680
12681 acl_libdirstem=lib
12682 acl_libdirstem2=
12683 case "$host_os" in
12684 solaris*)
12685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
12686 $as_echo_n "checking for 64-bit host... " >&6; }
12687 if ${gl_cv_solaris_64bit+:} false; then :
12688 $as_echo_n "(cached) " >&6
12689 else
12690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12691 /* end confdefs.h. */
12692
12693 #ifdef _LP64
12694 sixtyfour bits
12695 #endif
12696
12697 _ACEOF
12698 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12699 $EGREP "sixtyfour bits" >/dev/null 2>&1; then :
12700 gl_cv_solaris_64bit=yes
12701 else
12702 gl_cv_solaris_64bit=no
12703 fi
12704 rm -f conftest*
12705
12706
12707 fi
12708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5
12709 $as_echo "$gl_cv_solaris_64bit" >&6; }
12710 if test $gl_cv_solaris_64bit = yes; then
12711 acl_libdirstem=lib/64
12712 case "$host_cpu" in
12713 sparc*) acl_libdirstem2=lib/sparcv9 ;;
12714 i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
12715 esac
12716 fi
12717 ;;
12718 *)
12719 searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
12720 if test -n "$searchpath"; then
12721 acl_save_IFS="${IFS= }"; IFS=":"
12722 for searchdir in $searchpath; do
12723 if test -d "$searchdir"; then
12724 case "$searchdir" in
12725 */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
12726 */../ | */.. )
12727 # Better ignore directories of this form. They are misleading.
12728 ;;
12729 *) searchdir=`cd "$searchdir" && pwd`
12730 case "$searchdir" in
12731 */lib64 ) acl_libdirstem=lib64 ;;
12732 esac ;;
12733 esac
12734 fi
12735 done
12736 IFS="$acl_save_IFS"
12737 fi
12738 ;;
12739 esac
12740 test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
12741
12742
12743
12744 gl_threads_api=none
12745 LIBTHREAD=
12746 LTLIBTHREAD=
12747 LIBMULTITHREAD=
12748 LTLIBMULTITHREAD=
12749 if test "$gl_use_threads" != no; then
12750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
12751 $as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
12752 if ${gl_cv_have_weak+:} false; then :
12753 $as_echo_n "(cached) " >&6
12754 else
12755 gl_cv_have_weak=no
12756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12757 /* end confdefs.h. */
12758 extern void xyzzy ();
12759 #pragma weak xyzzy
12760 int
12761 main ()
12762 {
12763 xyzzy();
12764 ;
12765 return 0;
12766 }
12767 _ACEOF
12768 if ac_fn_c_try_link "$LINENO"; then :
12769 gl_cv_have_weak=maybe
12770 fi
12771 rm -f core conftest.err conftest.$ac_objext \
12772 conftest$ac_exeext conftest.$ac_ext
12773 if test $gl_cv_have_weak = maybe; then
12774 if test "$cross_compiling" = yes; then :
12775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12776 /* end confdefs.h. */
12777 #ifdef __ELF__
12778 Extensible Linking Format
12779 #endif
12780
12781 _ACEOF
12782 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12783 $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
12784 gl_cv_have_weak="guessing yes"
12785 else
12786 gl_cv_have_weak="guessing no"
12787 fi
12788 rm -f conftest*
12789
12790
12791 else
12792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12793 /* end confdefs.h. */
12794
12795 #include <stdio.h>
12796 #pragma weak fputs
12797 int main ()
12798 {
12799 return (fputs == NULL);
12800 }
12801 _ACEOF
12802 if ac_fn_c_try_run "$LINENO"; then :
12803 gl_cv_have_weak=yes
12804 else
12805 gl_cv_have_weak=no
12806 fi
12807 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12808 conftest.$ac_objext conftest.beam conftest.$ac_ext
12809 fi
12810
12811 fi
12812
12813 fi
12814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
12815 $as_echo "$gl_cv_have_weak" >&6; }
12816 if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
12817 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
12818 # it groks <pthread.h>. It's added above, in gl_THREADLIB_EARLY_BODY.
12819 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
12820 if test "x$ac_cv_header_pthread_h" = xyes; then :
12821 gl_have_pthread_h=yes
12822 else
12823 gl_have_pthread_h=no
12824 fi
12825
12826
12827 if test "$gl_have_pthread_h" = yes; then
12828 # Other possible tests:
12829 # -lpthreads (FSU threads, PCthreads)
12830 # -lgthreads
12831 gl_have_pthread=
12832 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
12833 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
12834 # the second one only in libpthread, and lock.c needs it.
12835 #
12836 # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
12837 # needs -pthread for some reason. See:
12838 # http://lists.gnu.org/archive/html/bug-gnulib/2014-09/msg00023.html
12839 save_LIBS=$LIBS
12840 for gl_pthread in '' '-pthread'; do
12841 LIBS="$LIBS $gl_pthread"
12842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12843 /* end confdefs.h. */
12844 #include <pthread.h>
12845 pthread_mutex_t m;
12846 pthread_mutexattr_t ma;
12847
12848 int
12849 main ()
12850 {
12851 pthread_mutex_lock (&m);
12852 pthread_mutexattr_init (&ma);
12853 ;
12854 return 0;
12855 }
12856 _ACEOF
12857 if ac_fn_c_try_link "$LINENO"; then :
12858 gl_have_pthread=yes
12859 LIBTHREAD=$gl_pthread LTLIBTHREAD=$gl_pthread
12860 LIBMULTITHREAD=$gl_pthread LTLIBMULTITHREAD=$gl_pthread
12861 fi
12862 rm -f core conftest.err conftest.$ac_objext \
12863 conftest$ac_exeext conftest.$ac_ext
12864 LIBS=$save_LIBS
12865 test -n "$gl_have_pthread" && break
12866 done
12867
12868 # Test for libpthread by looking for pthread_kill. (Not pthread_self,
12869 # since it is defined as a macro on OSF/1.)
12870 if test -n "$gl_have_pthread" && test -z "$LIBTHREAD"; then
12871 # The program links fine without libpthread. But it may actually
12872 # need to link with libpthread in order to create multiple threads.
12873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
12874 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
12875 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
12876 $as_echo_n "(cached) " >&6
12877 else
12878 ac_check_lib_save_LIBS=$LIBS
12879 LIBS="-lpthread $LIBS"
12880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12881 /* end confdefs.h. */
12882
12883 /* Override any GCC internal prototype to avoid an error.
12884 Use char because int might match the return type of a GCC
12885 builtin and then its argument prototype would still apply. */
12886 #ifdef __cplusplus
12887 extern "C"
12888 #endif
12889 char pthread_kill ();
12890 int
12891 main ()
12892 {
12893 return pthread_kill ();
12894 ;
12895 return 0;
12896 }
12897 _ACEOF
12898 if ac_fn_c_try_link "$LINENO"; then :
12899 ac_cv_lib_pthread_pthread_kill=yes
12900 else
12901 ac_cv_lib_pthread_pthread_kill=no
12902 fi
12903 rm -f core conftest.err conftest.$ac_objext \
12904 conftest$ac_exeext conftest.$ac_ext
12905 LIBS=$ac_check_lib_save_LIBS
12906 fi
12907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
12908 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
12909 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
12910 LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
12911 # On Solaris and HP-UX, most pthread functions exist also in libc.
12912 # Therefore pthread_in_use() needs to actually try to create a
12913 # thread: pthread_create from libc will fail, whereas
12914 # pthread_create will actually create a thread.
12915 case "$host_os" in
12916 solaris* | hpux*)
12917
12918 $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
12919
12920 esac
12921
12922 fi
12923
12924 elif test -z "$gl_have_pthread"; then
12925 # Some library is needed. Try libpthread and libc_r.
12926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
12927 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
12928 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
12929 $as_echo_n "(cached) " >&6
12930 else
12931 ac_check_lib_save_LIBS=$LIBS
12932 LIBS="-lpthread $LIBS"
12933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12934 /* end confdefs.h. */
12935
12936 /* Override any GCC internal prototype to avoid an error.
12937 Use char because int might match the return type of a GCC
12938 builtin and then its argument prototype would still apply. */
12939 #ifdef __cplusplus
12940 extern "C"
12941 #endif
12942 char pthread_kill ();
12943 int
12944 main ()
12945 {
12946 return pthread_kill ();
12947 ;
12948 return 0;
12949 }
12950 _ACEOF
12951 if ac_fn_c_try_link "$LINENO"; then :
12952 ac_cv_lib_pthread_pthread_kill=yes
12953 else
12954 ac_cv_lib_pthread_pthread_kill=no
12955 fi
12956 rm -f core conftest.err conftest.$ac_objext \
12957 conftest$ac_exeext conftest.$ac_ext
12958 LIBS=$ac_check_lib_save_LIBS
12959 fi
12960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
12961 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
12962 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
12963 gl_have_pthread=yes
12964 LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread
12965 LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
12966 fi
12967
12968 if test -z "$gl_have_pthread"; then
12969 # For FreeBSD 4.
12970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
12971 $as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
12972 if ${ac_cv_lib_c_r_pthread_kill+:} false; then :
12973 $as_echo_n "(cached) " >&6
12974 else
12975 ac_check_lib_save_LIBS=$LIBS
12976 LIBS="-lc_r $LIBS"
12977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12978 /* end confdefs.h. */
12979
12980 /* Override any GCC internal prototype to avoid an error.
12981 Use char because int might match the return type of a GCC
12982 builtin and then its argument prototype would still apply. */
12983 #ifdef __cplusplus
12984 extern "C"
12985 #endif
12986 char pthread_kill ();
12987 int
12988 main ()
12989 {
12990 return pthread_kill ();
12991 ;
12992 return 0;
12993 }
12994 _ACEOF
12995 if ac_fn_c_try_link "$LINENO"; then :
12996 ac_cv_lib_c_r_pthread_kill=yes
12997 else
12998 ac_cv_lib_c_r_pthread_kill=no
12999 fi
13000 rm -f core conftest.err conftest.$ac_objext \
13001 conftest$ac_exeext conftest.$ac_ext
13002 LIBS=$ac_check_lib_save_LIBS
13003 fi
13004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
13005 $as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
13006 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then :
13007 gl_have_pthread=yes
13008 LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r
13009 LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r
13010 fi
13011
13012 fi
13013 fi
13014 if test -n "$gl_have_pthread"; then
13015 gl_threads_api=posix
13016
13017 $as_echo "#define USE_POSIX_THREADS 1" >>confdefs.h
13018
13019 if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
13020 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
13021
13022 $as_echo "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h
13023
13024 LIBTHREAD=
13025 LTLIBTHREAD=
13026 fi
13027 fi
13028 fi
13029 fi
13030 fi
13031 if test -z "$gl_have_pthread"; then
13032 if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then
13033 gl_have_solaristhread=
13034 gl_save_LIBS="$LIBS"
13035 LIBS="$LIBS -lthread"
13036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13037 /* end confdefs.h. */
13038
13039 #include <thread.h>
13040 #include <synch.h>
13041
13042 int
13043 main ()
13044 {
13045 thr_self();
13046 ;
13047 return 0;
13048 }
13049 _ACEOF
13050 if ac_fn_c_try_link "$LINENO"; then :
13051 gl_have_solaristhread=yes
13052 fi
13053 rm -f core conftest.err conftest.$ac_objext \
13054 conftest$ac_exeext conftest.$ac_ext
13055 LIBS="$gl_save_LIBS"
13056 if test -n "$gl_have_solaristhread"; then
13057 gl_threads_api=solaris
13058 LIBTHREAD=-lthread
13059 LTLIBTHREAD=-lthread
13060 LIBMULTITHREAD="$LIBTHREAD"
13061 LTLIBMULTITHREAD="$LTLIBTHREAD"
13062
13063 $as_echo "#define USE_SOLARIS_THREADS 1" >>confdefs.h
13064
13065 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
13066
13067 $as_echo "#define USE_SOLARIS_THREADS_WEAK 1" >>confdefs.h
13068
13069 LIBTHREAD=
13070 LTLIBTHREAD=
13071 fi
13072 fi
13073 fi
13074 fi
13075 if test "$gl_use_threads" = pth; then
13076 gl_save_CPPFLAGS="$CPPFLAGS"
13077
13078
13079
13080
13081
13082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libpth" >&5
13083 $as_echo_n "checking how to link with libpth... " >&6; }
13084 if ${ac_cv_libpth_libs+:} false; then :
13085 $as_echo_n "(cached) " >&6
13086 else
13087
13088
13089
13090
13091
13092
13093
13094
13095 use_additional=yes
13096
13097 acl_save_prefix="$prefix"
13098 prefix="$acl_final_prefix"
13099 acl_save_exec_prefix="$exec_prefix"
13100 exec_prefix="$acl_final_exec_prefix"
13101
13102 eval additional_includedir=\"$includedir\"
13103 eval additional_libdir=\"$libdir\"
13104
13105 exec_prefix="$acl_save_exec_prefix"
13106 prefix="$acl_save_prefix"
13107
13108
13109 # Check whether --with-libpth-prefix was given.
13110 if test "${with_libpth_prefix+set}" = set; then :
13111 withval=$with_libpth_prefix;
13112 if test "X$withval" = "Xno"; then
13113 use_additional=no
13114 else
13115 if test "X$withval" = "X"; then
13116
13117 acl_save_prefix="$prefix"
13118 prefix="$acl_final_prefix"
13119 acl_save_exec_prefix="$exec_prefix"
13120 exec_prefix="$acl_final_exec_prefix"
13121
13122 eval additional_includedir=\"$includedir\"
13123 eval additional_libdir=\"$libdir\"
13124
13125 exec_prefix="$acl_save_exec_prefix"
13126 prefix="$acl_save_prefix"
13127
13128 else
13129 additional_includedir="$withval/include"
13130 additional_libdir="$withval/$acl_libdirstem"
13131 if test "$acl_libdirstem2" != "$acl_libdirstem" \
13132 && ! test -d "$withval/$acl_libdirstem"; then
13133 additional_libdir="$withval/$acl_libdirstem2"
13134 fi
13135 fi
13136 fi
13137
13138 fi
13139
13140 LIBPTH=
13141 LTLIBPTH=
13142 INCPTH=
13143 LIBPTH_PREFIX=
13144 HAVE_LIBPTH=
13145 rpathdirs=
13146 ltrpathdirs=
13147 names_already_handled=
13148 names_next_round='pth '
13149 while test -n "$names_next_round"; do
13150 names_this_round="$names_next_round"
13151 names_next_round=
13152 for name in $names_this_round; do
13153 already_handled=
13154 for n in $names_already_handled; do
13155 if test "$n" = "$name"; then
13156 already_handled=yes
13157 break
13158 fi
13159 done
13160 if test -z "$already_handled"; then
13161 names_already_handled="$names_already_handled $name"
13162 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
13163 eval value=\"\$HAVE_LIB$uppername\"
13164 if test -n "$value"; then
13165 if test "$value" = yes; then
13166 eval value=\"\$LIB$uppername\"
13167 test -z "$value" || LIBPTH="${LIBPTH}${LIBPTH:+ }$value"
13168 eval value=\"\$LTLIB$uppername\"
13169 test -z "$value" || LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$value"
13170 else
13171 :
13172 fi
13173 else
13174 found_dir=
13175 found_la=
13176 found_so=
13177 found_a=
13178 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
13179 if test -n "$acl_shlibext"; then
13180 shrext=".$acl_shlibext" # typically: shrext=.so
13181 else
13182 shrext=
13183 fi
13184 if test $use_additional = yes; then
13185 dir="$additional_libdir"
13186 if test -n "$acl_shlibext"; then
13187 if test -f "$dir/$libname$shrext"; then
13188 found_dir="$dir"
13189 found_so="$dir/$libname$shrext"
13190 else
13191 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
13192 ver=`(cd "$dir" && \
13193 for f in "$libname$shrext".*; do echo "$f"; done \
13194 | sed -e "s,^$libname$shrext\\\\.,," \
13195 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
13196 | sed 1q ) 2>/dev/null`
13197 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
13198 found_dir="$dir"
13199 found_so="$dir/$libname$shrext.$ver"
13200 fi
13201 else
13202 eval library_names=\"$acl_library_names_spec\"
13203 for f in $library_names; do
13204 if test -f "$dir/$f"; then
13205 found_dir="$dir"
13206 found_so="$dir/$f"
13207 break
13208 fi
13209 done
13210 fi
13211 fi
13212 fi
13213 if test "X$found_dir" = "X"; then
13214 if test -f "$dir/$libname.$acl_libext"; then
13215 found_dir="$dir"
13216 found_a="$dir/$libname.$acl_libext"
13217 fi
13218 fi
13219 if test "X$found_dir" != "X"; then
13220 if test -f "$dir/$libname.la"; then
13221 found_la="$dir/$libname.la"
13222 fi
13223 fi
13224 fi
13225 if test "X$found_dir" = "X"; then
13226 for x in $LDFLAGS $LTLIBPTH; do
13227
13228 acl_save_prefix="$prefix"
13229 prefix="$acl_final_prefix"
13230 acl_save_exec_prefix="$exec_prefix"
13231 exec_prefix="$acl_final_exec_prefix"
13232 eval x=\"$x\"
13233 exec_prefix="$acl_save_exec_prefix"
13234 prefix="$acl_save_prefix"
13235
13236 case "$x" in
13237 -L*)
13238 dir=`echo "X$x" | sed -e 's/^X-L//'`
13239 if test -n "$acl_shlibext"; then
13240 if test -f "$dir/$libname$shrext"; then
13241 found_dir="$dir"
13242 found_so="$dir/$libname$shrext"
13243 else
13244 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
13245 ver=`(cd "$dir" && \
13246 for f in "$libname$shrext".*; do echo "$f"; done \
13247 | sed -e "s,^$libname$shrext\\\\.,," \
13248 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
13249 | sed 1q ) 2>/dev/null`
13250 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
13251 found_dir="$dir"
13252 found_so="$dir/$libname$shrext.$ver"
13253 fi
13254 else
13255 eval library_names=\"$acl_library_names_spec\"
13256 for f in $library_names; do
13257 if test -f "$dir/$f"; then
13258 found_dir="$dir"
13259 found_so="$dir/$f"
13260 break
13261 fi
13262 done
13263 fi
13264 fi
13265 fi
13266 if test "X$found_dir" = "X"; then
13267 if test -f "$dir/$libname.$acl_libext"; then
13268 found_dir="$dir"
13269 found_a="$dir/$libname.$acl_libext"
13270 fi
13271 fi
13272 if test "X$found_dir" != "X"; then
13273 if test -f "$dir/$libname.la"; then
13274 found_la="$dir/$libname.la"
13275 fi
13276 fi
13277 ;;
13278 esac
13279 if test "X$found_dir" != "X"; then
13280 break
13281 fi
13282 done
13283 fi
13284 if test "X$found_dir" != "X"; then
13285 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$found_dir -l$name"
13286 if test "X$found_so" != "X"; then
13287 if test "$enable_rpath" = no \
13288 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
13289 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
13290 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
13291 else
13292 haveit=
13293 for x in $ltrpathdirs; do
13294 if test "X$x" = "X$found_dir"; then
13295 haveit=yes
13296 break
13297 fi
13298 done
13299 if test -z "$haveit"; then
13300 ltrpathdirs="$ltrpathdirs $found_dir"
13301 fi
13302 if test "$acl_hardcode_direct" = yes; then
13303 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
13304 else
13305 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
13306 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
13307 haveit=
13308 for x in $rpathdirs; do
13309 if test "X$x" = "X$found_dir"; then
13310 haveit=yes
13311 break
13312 fi
13313 done
13314 if test -z "$haveit"; then
13315 rpathdirs="$rpathdirs $found_dir"
13316 fi
13317 else
13318 haveit=
13319 for x in $LDFLAGS $LIBPTH; do
13320
13321 acl_save_prefix="$prefix"
13322 prefix="$acl_final_prefix"
13323 acl_save_exec_prefix="$exec_prefix"
13324 exec_prefix="$acl_final_exec_prefix"
13325 eval x=\"$x\"
13326 exec_prefix="$acl_save_exec_prefix"
13327 prefix="$acl_save_prefix"
13328
13329 if test "X$x" = "X-L$found_dir"; then
13330 haveit=yes
13331 break
13332 fi
13333 done
13334 if test -z "$haveit"; then
13335 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir"
13336 fi
13337 if test "$acl_hardcode_minus_L" != no; then
13338 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
13339 else
13340 LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
13341 fi
13342 fi
13343 fi
13344 fi
13345 else
13346 if test "X$found_a" != "X"; then
13347 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_a"
13348 else
13349 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir -l$name"
13350 fi
13351 fi
13352 additional_includedir=
13353 case "$found_dir" in
13354 */$acl_libdirstem | */$acl_libdirstem/)
13355 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
13356 if test "$name" = 'pth'; then
13357 LIBPTH_PREFIX="$basedir"
13358 fi
13359 additional_includedir="$basedir/include"
13360 ;;
13361 */$acl_libdirstem2 | */$acl_libdirstem2/)
13362 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
13363 if test "$name" = 'pth'; then
13364 LIBPTH_PREFIX="$basedir"
13365 fi
13366 additional_includedir="$basedir/include"
13367 ;;
13368 esac
13369 if test "X$additional_includedir" != "X"; then
13370 if test "X$additional_includedir" != "X/usr/include"; then
13371 haveit=
13372 if test "X$additional_includedir" = "X/usr/local/include"; then
13373 if test -n "$GCC"; then
13374 case $host_os in
13375 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
13376 esac
13377 fi
13378 fi
13379 if test -z "$haveit"; then
13380 for x in $CPPFLAGS $INCPTH; do
13381
13382 acl_save_prefix="$prefix"
13383 prefix="$acl_final_prefix"
13384 acl_save_exec_prefix="$exec_prefix"
13385 exec_prefix="$acl_final_exec_prefix"
13386 eval x=\"$x\"
13387 exec_prefix="$acl_save_exec_prefix"
13388 prefix="$acl_save_prefix"
13389
13390 if test "X$x" = "X-I$additional_includedir"; then
13391 haveit=yes
13392 break
13393 fi
13394 done
13395 if test -z "$haveit"; then
13396 if test -d "$additional_includedir"; then
13397 INCPTH="${INCPTH}${INCPTH:+ }-I$additional_includedir"
13398 fi
13399 fi
13400 fi
13401 fi
13402 fi
13403 if test -n "$found_la"; then
13404 save_libdir="$libdir"
13405 case "$found_la" in
13406 */* | *\\*) . "$found_la" ;;
13407 *) . "./$found_la" ;;
13408 esac
13409 libdir="$save_libdir"
13410 for dep in $dependency_libs; do
13411 case "$dep" in
13412 -L*)
13413 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
13414 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
13415 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
13416 haveit=
13417 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
13418 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
13419 if test -n "$GCC"; then
13420 case $host_os in
13421 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
13422 esac
13423 fi
13424 fi
13425 if test -z "$haveit"; then
13426 haveit=
13427 for x in $LDFLAGS $LIBPTH; do
13428
13429 acl_save_prefix="$prefix"
13430 prefix="$acl_final_prefix"
13431 acl_save_exec_prefix="$exec_prefix"
13432 exec_prefix="$acl_final_exec_prefix"
13433 eval x=\"$x\"
13434 exec_prefix="$acl_save_exec_prefix"
13435 prefix="$acl_save_prefix"
13436
13437 if test "X$x" = "X-L$additional_libdir"; then
13438 haveit=yes
13439 break
13440 fi
13441 done
13442 if test -z "$haveit"; then
13443 if test -d "$additional_libdir"; then
13444 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$additional_libdir"
13445 fi
13446 fi
13447 haveit=
13448 for x in $LDFLAGS $LTLIBPTH; do
13449
13450 acl_save_prefix="$prefix"
13451 prefix="$acl_final_prefix"
13452 acl_save_exec_prefix="$exec_prefix"
13453 exec_prefix="$acl_final_exec_prefix"
13454 eval x=\"$x\"
13455 exec_prefix="$acl_save_exec_prefix"
13456 prefix="$acl_save_prefix"
13457
13458 if test "X$x" = "X-L$additional_libdir"; then
13459 haveit=yes
13460 break
13461 fi
13462 done
13463 if test -z "$haveit"; then
13464 if test -d "$additional_libdir"; then
13465 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$additional_libdir"
13466 fi
13467 fi
13468 fi
13469 fi
13470 ;;
13471 -R*)
13472 dir=`echo "X$dep" | sed -e 's/^X-R//'`
13473 if test "$enable_rpath" != no; then
13474 haveit=
13475 for x in $rpathdirs; do
13476 if test "X$x" = "X$dir"; then
13477 haveit=yes
13478 break
13479 fi
13480 done
13481 if test -z "$haveit"; then
13482 rpathdirs="$rpathdirs $dir"
13483 fi
13484 haveit=
13485 for x in $ltrpathdirs; do
13486 if test "X$x" = "X$dir"; then
13487 haveit=yes
13488 break
13489 fi
13490 done
13491 if test -z "$haveit"; then
13492 ltrpathdirs="$ltrpathdirs $dir"
13493 fi
13494 fi
13495 ;;
13496 -l*)
13497 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
13498 ;;
13499 *.la)
13500 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
13501 ;;
13502 *)
13503 LIBPTH="${LIBPTH}${LIBPTH:+ }$dep"
13504 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$dep"
13505 ;;
13506 esac
13507 done
13508 fi
13509 else
13510 LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
13511 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-l$name"
13512 fi
13513 fi
13514 fi
13515 done
13516 done
13517 if test "X$rpathdirs" != "X"; then
13518 if test -n "$acl_hardcode_libdir_separator"; then
13519 alldirs=
13520 for found_dir in $rpathdirs; do
13521 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
13522 done
13523 acl_save_libdir="$libdir"
13524 libdir="$alldirs"
13525 eval flag=\"$acl_hardcode_libdir_flag_spec\"
13526 libdir="$acl_save_libdir"
13527 LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
13528 else
13529 for found_dir in $rpathdirs; do
13530 acl_save_libdir="$libdir"
13531 libdir="$found_dir"
13532 eval flag=\"$acl_hardcode_libdir_flag_spec\"
13533 libdir="$acl_save_libdir"
13534 LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
13535 done
13536 fi
13537 fi
13538 if test "X$ltrpathdirs" != "X"; then
13539 for found_dir in $ltrpathdirs; do
13540 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-R$found_dir"
13541 done
13542 fi
13543
13544
13545
13546
13547
13548
13549 ac_cv_libpth_libs="$LIBPTH"
13550 ac_cv_libpth_ltlibs="$LTLIBPTH"
13551 ac_cv_libpth_cppflags="$INCPTH"
13552 ac_cv_libpth_prefix="$LIBPTH_PREFIX"
13553
13554 fi
13555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libpth_libs" >&5
13556 $as_echo "$ac_cv_libpth_libs" >&6; }
13557 LIBPTH="$ac_cv_libpth_libs"
13558 LTLIBPTH="$ac_cv_libpth_ltlibs"
13559 INCPTH="$ac_cv_libpth_cppflags"
13560 LIBPTH_PREFIX="$ac_cv_libpth_prefix"
13561
13562 for element in $INCPTH; do
13563 haveit=
13564 for x in $CPPFLAGS; do
13565
13566 acl_save_prefix="$prefix"
13567 prefix="$acl_final_prefix"
13568 acl_save_exec_prefix="$exec_prefix"
13569 exec_prefix="$acl_final_exec_prefix"
13570 eval x=\"$x\"
13571 exec_prefix="$acl_save_exec_prefix"
13572 prefix="$acl_save_prefix"
13573
13574 if test "X$x" = "X$element"; then
13575 haveit=yes
13576 break
13577 fi
13578 done
13579 if test -z "$haveit"; then
13580 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
13581 fi
13582 done
13583
13584
13585
13586
13587 HAVE_LIBPTH=yes
13588
13589
13590
13591 gl_have_pth=
13592 gl_save_LIBS="$LIBS"
13593 LIBS="$LIBS $LIBPTH"
13594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13595 /* end confdefs.h. */
13596 #include <pth.h>
13597 int
13598 main ()
13599 {
13600 pth_self();
13601 ;
13602 return 0;
13603 }
13604 _ACEOF
13605 if ac_fn_c_try_link "$LINENO"; then :
13606 gl_have_pth=yes
13607 fi
13608 rm -f core conftest.err conftest.$ac_objext \
13609 conftest$ac_exeext conftest.$ac_ext
13610 LIBS="$gl_save_LIBS"
13611 if test -n "$gl_have_pth"; then
13612 gl_threads_api=pth
13613 LIBTHREAD="$LIBPTH"
13614 LTLIBTHREAD="$LTLIBPTH"
13615 LIBMULTITHREAD="$LIBTHREAD"
13616 LTLIBMULTITHREAD="$LTLIBTHREAD"
13617
13618 $as_echo "#define USE_PTH_THREADS 1" >>confdefs.h
13619
13620 if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
13621 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
13622
13623 $as_echo "#define USE_PTH_THREADS_WEAK 1" >>confdefs.h
13624
13625 LIBTHREAD=
13626 LTLIBTHREAD=
13627 fi
13628 fi
13629 else
13630 CPPFLAGS="$gl_save_CPPFLAGS"
13631 fi
13632 fi
13633 if test -z "$gl_have_pthread"; then
13634 case "$gl_use_threads" in
13635 yes | windows | win32) # The 'win32' is for backward compatibility.
13636 if { case "$host_os" in
13637 mingw*) true;;
13638 *) false;;
13639 esac
13640 }; then
13641 gl_threads_api=windows
13642
13643 $as_echo "#define USE_WINDOWS_THREADS 1" >>confdefs.h
13644
13645 fi
13646 ;;
13647 esac
13648 fi
13649 fi
13650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5
13651 $as_echo_n "checking for multithread API to use... " >&6; }
13652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5
13653 $as_echo "$gl_threads_api" >&6; }
13654
13655
13656
13657
13658
13659
13660
13661
13662
13663
13664
13665
13666
13667
13668
13669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
13670 $as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
13671 if ${gl_cv_func_malloc_posix+:} false; then :
13672 $as_echo_n "(cached) " >&6
13673 else
13674
13675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13676 /* end confdefs.h. */
13677
13678 int
13679 main ()
13680 {
13681 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
13682 choke me
13683 #endif
13684
13685 ;
13686 return 0;
13687 }
13688 _ACEOF
13689 if ac_fn_c_try_compile "$LINENO"; then :
13690 gl_cv_func_malloc_posix=yes
13691 else
13692 gl_cv_func_malloc_posix=no
13693 fi
13694 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13695
13696 fi
13697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
13698 $as_echo "$gl_cv_func_malloc_posix" >&6; }
13699
13700
13701
13702 for ac_header in stdlib.h
13703 do :
13704 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
13705 if test "x$ac_cv_header_stdlib_h" = xyes; then :
13706 cat >>confdefs.h <<_ACEOF
13707 #define HAVE_STDLIB_H 1
13708 _ACEOF
13709
13710 fi
13711
13712 done
13713
13714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
13715 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
13716 if ${ac_cv_func_malloc_0_nonnull+:} false; then :
13717 $as_echo_n "(cached) " >&6
13718 else
13719 if test "$cross_compiling" = yes; then :
13720 case "$host_os" in
13721 # Guess yes on platforms where we know the result.
13722 *-gnu* | freebsd* | netbsd* | openbsd* \
13723 | hpux* | solaris* | cygwin* | mingw*)
13724 ac_cv_func_malloc_0_nonnull=yes ;;
13725 # If we don't know, assume the worst.
13726 *) ac_cv_func_malloc_0_nonnull=no ;;
13727 esac
13728
13729 else
13730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13731 /* end confdefs.h. */
13732 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
13733 # include <stdlib.h>
13734 #else
13735 char *malloc ();
13736 #endif
13737
13738 int
13739 main ()
13740 {
13741 char *p = malloc (0);
13742 int result = !p;
13743 free (p);
13744 return result;
13745 ;
13746 return 0;
13747 }
13748
13749 _ACEOF
13750 if ac_fn_c_try_run "$LINENO"; then :
13751 ac_cv_func_malloc_0_nonnull=yes
13752 else
13753 ac_cv_func_malloc_0_nonnull=no
13754 fi
13755 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13756 conftest.$ac_objext conftest.beam conftest.$ac_ext
13757 fi
13758
13759
13760 fi
13761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
13762 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
13763 if test $ac_cv_func_malloc_0_nonnull = yes; then :
13764 gl_cv_func_malloc_0_nonnull=1
13765 else
13766 gl_cv_func_malloc_0_nonnull=0
13767 fi
13768
13769
13770 cat >>confdefs.h <<_ACEOF
13771 #define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
13772 _ACEOF
13773
13774
13775
13776
13777
13778
13779
13780
13781 GNULIB_BTOWC=0;
13782 GNULIB_WCTOB=0;
13783 GNULIB_MBSINIT=0;
13784 GNULIB_MBRTOWC=0;
13785 GNULIB_MBRLEN=0;
13786 GNULIB_MBSRTOWCS=0;
13787 GNULIB_MBSNRTOWCS=0;
13788 GNULIB_WCRTOMB=0;
13789 GNULIB_WCSRTOMBS=0;
13790 GNULIB_WCSNRTOMBS=0;
13791 GNULIB_WCWIDTH=0;
13792 GNULIB_WMEMCHR=0;
13793 GNULIB_WMEMCMP=0;
13794 GNULIB_WMEMCPY=0;
13795 GNULIB_WMEMMOVE=0;
13796 GNULIB_WMEMSET=0;
13797 GNULIB_WCSLEN=0;
13798 GNULIB_WCSNLEN=0;
13799 GNULIB_WCSCPY=0;
13800 GNULIB_WCPCPY=0;
13801 GNULIB_WCSNCPY=0;
13802 GNULIB_WCPNCPY=0;
13803 GNULIB_WCSCAT=0;
13804 GNULIB_WCSNCAT=0;
13805 GNULIB_WCSCMP=0;
13806 GNULIB_WCSNCMP=0;
13807 GNULIB_WCSCASECMP=0;
13808 GNULIB_WCSNCASECMP=0;
13809 GNULIB_WCSCOLL=0;
13810 GNULIB_WCSXFRM=0;
13811 GNULIB_WCSDUP=0;
13812 GNULIB_WCSCHR=0;
13813 GNULIB_WCSRCHR=0;
13814 GNULIB_WCSCSPN=0;
13815 GNULIB_WCSSPN=0;
13816 GNULIB_WCSPBRK=0;
13817 GNULIB_WCSSTR=0;
13818 GNULIB_WCSTOK=0;
13819 GNULIB_WCSWIDTH=0;
13820 HAVE_BTOWC=1;
13821 HAVE_MBSINIT=1;
13822 HAVE_MBRTOWC=1;
13823 HAVE_MBRLEN=1;
13824 HAVE_MBSRTOWCS=1;
13825 HAVE_MBSNRTOWCS=1;
13826 HAVE_WCRTOMB=1;
13827 HAVE_WCSRTOMBS=1;
13828 HAVE_WCSNRTOMBS=1;
13829 HAVE_WMEMCHR=1;
13830 HAVE_WMEMCMP=1;
13831 HAVE_WMEMCPY=1;
13832 HAVE_WMEMMOVE=1;
13833 HAVE_WMEMSET=1;
13834 HAVE_WCSLEN=1;
13835 HAVE_WCSNLEN=1;
13836 HAVE_WCSCPY=1;
13837 HAVE_WCPCPY=1;
13838 HAVE_WCSNCPY=1;
13839 HAVE_WCPNCPY=1;
13840 HAVE_WCSCAT=1;
13841 HAVE_WCSNCAT=1;
13842 HAVE_WCSCMP=1;
13843 HAVE_WCSNCMP=1;
13844 HAVE_WCSCASECMP=1;
13845 HAVE_WCSNCASECMP=1;
13846 HAVE_WCSCOLL=1;
13847 HAVE_WCSXFRM=1;
13848 HAVE_WCSDUP=1;
13849 HAVE_WCSCHR=1;
13850 HAVE_WCSRCHR=1;
13851 HAVE_WCSCSPN=1;
13852 HAVE_WCSSPN=1;
13853 HAVE_WCSPBRK=1;
13854 HAVE_WCSSTR=1;
13855 HAVE_WCSTOK=1;
13856 HAVE_WCSWIDTH=1;
13857 HAVE_DECL_WCTOB=1;
13858 HAVE_DECL_WCWIDTH=1;
13859 REPLACE_MBSTATE_T=0;
13860 REPLACE_BTOWC=0;
13861 REPLACE_WCTOB=0;
13862 REPLACE_MBSINIT=0;
13863 REPLACE_MBRTOWC=0;
13864 REPLACE_MBRLEN=0;
13865 REPLACE_MBSRTOWCS=0;
13866 REPLACE_MBSNRTOWCS=0;
13867 REPLACE_WCRTOMB=0;
13868 REPLACE_WCSRTOMBS=0;
13869 REPLACE_WCSNRTOMBS=0;
13870 REPLACE_WCWIDTH=0;
13871 REPLACE_WCSWIDTH=0;
13872
13873
13874
13875
13876
13877
13878
13879
13880
13881
13882
13883
13884
13885
13886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
13887 $as_echo_n "checking for a traditional japanese locale... " >&6; }
13888 if ${gt_cv_locale_ja+:} false; then :
13889 $as_echo_n "(cached) " >&6
13890 else
13891
13892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13893 /* end confdefs.h. */
13894
13895 #include <locale.h>
13896 #include <time.h>
13897 #if HAVE_LANGINFO_CODESET
13898 # include <langinfo.h>
13899 #endif
13900 #include <stdlib.h>
13901 #include <string.h>
13902 struct tm t;
13903 char buf[16];
13904 int main ()
13905 {
13906 const char *p;
13907 /* Check whether the given locale name is recognized by the system. */
13908 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
13909 /* On native Windows, setlocale(category, "") looks at the system settings,
13910 not at the environment variables. Also, when an encoding suffix such
13911 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
13912 category of the locale to "C". */
13913 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
13914 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
13915 return 1;
13916 #else
13917 if (setlocale (LC_ALL, "") == NULL) return 1;
13918 #endif
13919 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
13920 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
13921 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
13922 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
13923 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
13924 some unit tests fail.
13925 On MirBSD 10, when an unsupported locale is specified, setlocale()
13926 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
13927 #if HAVE_LANGINFO_CODESET
13928 {
13929 const char *cs = nl_langinfo (CODESET);
13930 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
13931 || strcmp (cs, "UTF-8") == 0)
13932 return 1;
13933 }
13934 #endif
13935 #ifdef __CYGWIN__
13936 /* On Cygwin, avoid locale names without encoding suffix, because the
13937 locale_charset() function relies on the encoding suffix. Note that
13938 LC_ALL is set on the command line. */
13939 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
13940 #endif
13941 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
13942 on Cygwin 1.5.x. */
13943 if (MB_CUR_MAX == 1)
13944 return 1;
13945 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
13946 This excludes the UTF-8 encoding (except on MirBSD). */
13947 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
13948 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
13949 for (p = buf; *p != '\0'; p++)
13950 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
13951 return 1;
13952 return 0;
13953 }
13954
13955 _ACEOF
13956 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
13957 (eval $ac_link) 2>&5
13958 ac_status=$?
13959 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13960 test $ac_status = 0; } && test -s conftest$ac_exeext; then
13961 case "$host_os" in
13962 # Handle native Windows specially, because there setlocale() interprets
13963 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
13964 # "fr" or "fra" as "French" or "French_France.1252",
13965 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
13966 # "ja" as "Japanese" or "Japanese_Japan.932",
13967 # and similar.
13968 mingw*)
13969 # Note that on native Windows, the Japanese locale is
13970 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
13971 # cannot use it here.
13972 gt_cv_locale_ja=none
13973 ;;
13974 *)
13975 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
13976 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
13977 # configure script would override the LC_ALL setting. Likewise for
13978 # LC_CTYPE, which is also set at the beginning of the configure script.
13979 # Test for the AIX locale name.
13980 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
13981 gt_cv_locale_ja=ja_JP
13982 else
13983 # Test for the locale name with explicit encoding suffix.
13984 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
13985 gt_cv_locale_ja=ja_JP.EUC-JP
13986 else
13987 # Test for the HP-UX, OSF/1, NetBSD locale name.
13988 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
13989 gt_cv_locale_ja=ja_JP.eucJP
13990 else
13991 # Test for the IRIX, FreeBSD locale name.
13992 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
13993 gt_cv_locale_ja=ja_JP.EUC
13994 else
13995 # Test for the Solaris 7 locale name.
13996 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
13997 gt_cv_locale_ja=ja
13998 else
13999 # Special test for NetBSD 1.6.
14000 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
14001 gt_cv_locale_ja=ja_JP.eucJP
14002 else
14003 # None found.
14004 gt_cv_locale_ja=none
14005 fi
14006 fi
14007 fi
14008 fi
14009 fi
14010 fi
14011 ;;
14012 esac
14013 fi
14014 rm -fr conftest*
14015
14016 fi
14017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
14018 $as_echo "$gt_cv_locale_ja" >&6; }
14019 LOCALE_JA=$gt_cv_locale_ja
14020
14021
14022
14023
14024
14025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
14026 $as_echo_n "checking for a transitional chinese locale... " >&6; }
14027 if ${gt_cv_locale_zh_CN+:} false; then :
14028 $as_echo_n "(cached) " >&6
14029 else
14030
14031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14032 /* end confdefs.h. */
14033
14034 #include <locale.h>
14035 #include <stdlib.h>
14036 #include <time.h>
14037 #if HAVE_LANGINFO_CODESET
14038 # include <langinfo.h>
14039 #endif
14040 #include <stdlib.h>
14041 #include <string.h>
14042 struct tm t;
14043 char buf[16];
14044 int main ()
14045 {
14046 const char *p;
14047 /* Check whether the given locale name is recognized by the system. */
14048 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
14049 /* On native Windows, setlocale(category, "") looks at the system settings,
14050 not at the environment variables. Also, when an encoding suffix such
14051 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
14052 category of the locale to "C". */
14053 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
14054 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
14055 return 1;
14056 #else
14057 if (setlocale (LC_ALL, "") == NULL) return 1;
14058 #endif
14059 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
14060 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
14061 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
14062 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
14063 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
14064 some unit tests fail.
14065 On MirBSD 10, when an unsupported locale is specified, setlocale()
14066 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
14067 #if HAVE_LANGINFO_CODESET
14068 {
14069 const char *cs = nl_langinfo (CODESET);
14070 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
14071 || strcmp (cs, "UTF-8") == 0)
14072 return 1;
14073 }
14074 #endif
14075 #ifdef __CYGWIN__
14076 /* On Cygwin, avoid locale names without encoding suffix, because the
14077 locale_charset() function relies on the encoding suffix. Note that
14078 LC_ALL is set on the command line. */
14079 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
14080 #endif
14081 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
14082 This excludes the UTF-8 encoding (except on MirBSD). */
14083 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
14084 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
14085 for (p = buf; *p != '\0'; p++)
14086 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
14087 return 1;
14088 /* Check whether a typical GB18030 multibyte sequence is recognized as a
14089 single wide character. This excludes the GB2312 and GBK encodings. */
14090 if (mblen ("\203\062\332\066", 5) != 4)
14091 return 1;
14092 return 0;
14093 }
14094
14095 _ACEOF
14096 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14097 (eval $ac_link) 2>&5
14098 ac_status=$?
14099 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14100 test $ac_status = 0; } && test -s conftest$ac_exeext; then
14101 case "$host_os" in
14102 # Handle native Windows specially, because there setlocale() interprets
14103 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
14104 # "fr" or "fra" as "French" or "French_France.1252",
14105 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
14106 # "ja" as "Japanese" or "Japanese_Japan.932",
14107 # and similar.
14108 mingw*)
14109 # Test for the hypothetical native Windows locale name.
14110 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14111 gt_cv_locale_zh_CN=Chinese_China.54936
14112 else
14113 # None found.
14114 gt_cv_locale_zh_CN=none
14115 fi
14116 ;;
14117 solaris2.8)
14118 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
14119 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
14120 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
14121 gt_cv_locale_zh_CN=none
14122 ;;
14123 *)
14124 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
14125 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
14126 # configure script would override the LC_ALL setting. Likewise for
14127 # LC_CTYPE, which is also set at the beginning of the configure script.
14128 # Test for the locale name without encoding suffix.
14129 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14130 gt_cv_locale_zh_CN=zh_CN
14131 else
14132 # Test for the locale name with explicit encoding suffix.
14133 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14134 gt_cv_locale_zh_CN=zh_CN.GB18030
14135 else
14136 # None found.
14137 gt_cv_locale_zh_CN=none
14138 fi
14139 fi
14140 ;;
14141 esac
14142 else
14143 # If there was a link error, due to mblen(), the system is so old that
14144 # it certainly doesn't have a chinese locale.
14145 gt_cv_locale_zh_CN=none
14146 fi
14147 rm -fr conftest*
14148
14149 fi
14150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
14151 $as_echo "$gt_cv_locale_zh_CN" >&6; }
14152 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
14153
14154
14155
14156
14157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
14158 $as_echo_n "checking for a french Unicode locale... " >&6; }
14159 if ${gt_cv_locale_fr_utf8+:} false; then :
14160 $as_echo_n "(cached) " >&6
14161 else
14162
14163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14164 /* end confdefs.h. */
14165
14166 #include <locale.h>
14167 #include <time.h>
14168 #if HAVE_LANGINFO_CODESET
14169 # include <langinfo.h>
14170 #endif
14171 #include <stdlib.h>
14172 #include <string.h>
14173 struct tm t;
14174 char buf[16];
14175 int main () {
14176 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
14177 imitates locale dependent behaviour by looking at the environment
14178 variables, and all locales use the UTF-8 encoding. */
14179 #if !(defined __BEOS__ || defined __HAIKU__)
14180 /* Check whether the given locale name is recognized by the system. */
14181 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
14182 /* On native Windows, setlocale(category, "") looks at the system settings,
14183 not at the environment variables. Also, when an encoding suffix such
14184 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
14185 category of the locale to "C". */
14186 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
14187 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
14188 return 1;
14189 # else
14190 if (setlocale (LC_ALL, "") == NULL) return 1;
14191 # endif
14192 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
14193 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
14194 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
14195 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
14196 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
14197 some unit tests fail. */
14198 # if HAVE_LANGINFO_CODESET
14199 {
14200 const char *cs = nl_langinfo (CODESET);
14201 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
14202 return 1;
14203 }
14204 # endif
14205 # ifdef __CYGWIN__
14206 /* On Cygwin, avoid locale names without encoding suffix, because the
14207 locale_charset() function relies on the encoding suffix. Note that
14208 LC_ALL is set on the command line. */
14209 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
14210 # endif
14211 /* Check whether in the abbreviation of the second month, the second
14212 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
14213 two bytes long, with UTF-8 encoding. */
14214 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
14215 if (strftime (buf, sizeof (buf), "%b", &t) < 4
14216 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
14217 return 1;
14218 #endif
14219 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
14220 /* Check whether the decimal separator is a comma.
14221 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
14222 are nl_langinfo(RADIXCHAR) are both ".". */
14223 if (localeconv () ->decimal_point[0] != ',') return 1;
14224 #endif
14225 return 0;
14226 }
14227
14228 _ACEOF
14229 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14230 (eval $ac_link) 2>&5
14231 ac_status=$?
14232 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14233 test $ac_status = 0; } && test -s conftest$ac_exeext; then
14234 case "$host_os" in
14235 # Handle native Windows specially, because there setlocale() interprets
14236 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
14237 # "fr" or "fra" as "French" or "French_France.1252",
14238 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
14239 # "ja" as "Japanese" or "Japanese_Japan.932",
14240 # and similar.
14241 mingw*)
14242 # Test for the hypothetical native Windows locale name.
14243 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14244 gt_cv_locale_fr_utf8=French_France.65001
14245 else
14246 # None found.
14247 gt_cv_locale_fr_utf8=none
14248 fi
14249 ;;
14250 *)
14251 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
14252 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
14253 # configure script would override the LC_ALL setting. Likewise for
14254 # LC_CTYPE, which is also set at the beginning of the configure script.
14255 # Test for the usual locale name.
14256 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14257 gt_cv_locale_fr_utf8=fr_FR
14258 else
14259 # Test for the locale name with explicit encoding suffix.
14260 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14261 gt_cv_locale_fr_utf8=fr_FR.UTF-8
14262 else
14263 # Test for the Solaris 7 locale name.
14264 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14265 gt_cv_locale_fr_utf8=fr.UTF-8
14266 else
14267 # None found.
14268 gt_cv_locale_fr_utf8=none
14269 fi
14270 fi
14271 fi
14272 ;;
14273 esac
14274 fi
14275 rm -fr conftest*
14276
14277 fi
14278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
14279 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
14280 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
14281
14282
14283
14284
14285
14286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
14287 $as_echo_n "checking for a traditional french locale... " >&6; }
14288 if ${gt_cv_locale_fr+:} false; then :
14289 $as_echo_n "(cached) " >&6
14290 else
14291
14292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14293 /* end confdefs.h. */
14294
14295 #include <locale.h>
14296 #include <time.h>
14297 #if HAVE_LANGINFO_CODESET
14298 # include <langinfo.h>
14299 #endif
14300 #include <stdlib.h>
14301 #include <string.h>
14302 struct tm t;
14303 char buf[16];
14304 int main () {
14305 /* Check whether the given locale name is recognized by the system. */
14306 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
14307 /* On native Windows, setlocale(category, "") looks at the system settings,
14308 not at the environment variables. Also, when an encoding suffix such
14309 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
14310 category of the locale to "C". */
14311 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
14312 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
14313 return 1;
14314 #else
14315 if (setlocale (LC_ALL, "") == NULL) return 1;
14316 #endif
14317 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
14318 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
14319 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
14320 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
14321 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
14322 some unit tests fail.
14323 On MirBSD 10, when an unsupported locale is specified, setlocale()
14324 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
14325 #if HAVE_LANGINFO_CODESET
14326 {
14327 const char *cs = nl_langinfo (CODESET);
14328 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
14329 || strcmp (cs, "UTF-8") == 0)
14330 return 1;
14331 }
14332 #endif
14333 #ifdef __CYGWIN__
14334 /* On Cygwin, avoid locale names without encoding suffix, because the
14335 locale_charset() function relies on the encoding suffix. Note that
14336 LC_ALL is set on the command line. */
14337 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
14338 #endif
14339 /* Check whether in the abbreviation of the second month, the second
14340 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
14341 one byte long. This excludes the UTF-8 encoding. */
14342 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
14343 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
14344 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
14345 /* Check whether the decimal separator is a comma.
14346 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
14347 are nl_langinfo(RADIXCHAR) are both ".". */
14348 if (localeconv () ->decimal_point[0] != ',') return 1;
14349 #endif
14350 return 0;
14351 }
14352
14353 _ACEOF
14354 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14355 (eval $ac_link) 2>&5
14356 ac_status=$?
14357 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14358 test $ac_status = 0; } && test -s conftest$ac_exeext; then
14359 case "$host_os" in
14360 # Handle native Windows specially, because there setlocale() interprets
14361 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
14362 # "fr" or "fra" as "French" or "French_France.1252",
14363 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
14364 # "ja" as "Japanese" or "Japanese_Japan.932",
14365 # and similar.
14366 mingw*)
14367 # Test for the native Windows locale name.
14368 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14369 gt_cv_locale_fr=French_France.1252
14370 else
14371 # None found.
14372 gt_cv_locale_fr=none
14373 fi
14374 ;;
14375 *)
14376 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
14377 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
14378 # configure script would override the LC_ALL setting. Likewise for
14379 # LC_CTYPE, which is also set at the beginning of the configure script.
14380 # Test for the usual locale name.
14381 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14382 gt_cv_locale_fr=fr_FR
14383 else
14384 # Test for the locale name with explicit encoding suffix.
14385 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14386 gt_cv_locale_fr=fr_FR.ISO-8859-1
14387 else
14388 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
14389 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14390 gt_cv_locale_fr=fr_FR.ISO8859-1
14391 else
14392 # Test for the HP-UX locale name.
14393 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14394 gt_cv_locale_fr=fr_FR.iso88591
14395 else
14396 # Test for the Solaris 7 locale name.
14397 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14398 gt_cv_locale_fr=fr
14399 else
14400 # None found.
14401 gt_cv_locale_fr=none
14402 fi
14403 fi
14404 fi
14405 fi
14406 fi
14407 ;;
14408 esac
14409 fi
14410 rm -fr conftest*
14411
14412 fi
14413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
14414 $as_echo "$gt_cv_locale_fr" >&6; }
14415 LOCALE_FR=$gt_cv_locale_fr
14416
14417
14418
14419
14420
14421
14422
14423
14424
14425
14426
14427
14428
14429 GNULIB_FFSL=0;
14430 GNULIB_FFSLL=0;
14431 GNULIB_MEMCHR=0;
14432 GNULIB_MEMMEM=0;
14433 GNULIB_MEMPCPY=0;
14434 GNULIB_MEMRCHR=0;
14435 GNULIB_RAWMEMCHR=0;
14436 GNULIB_STPCPY=0;
14437 GNULIB_STPNCPY=0;
14438 GNULIB_STRCHRNUL=0;
14439 GNULIB_STRDUP=0;
14440 GNULIB_STRNCAT=0;
14441 GNULIB_STRNDUP=0;
14442 GNULIB_STRNLEN=0;
14443 GNULIB_STRPBRK=0;
14444 GNULIB_STRSEP=0;
14445 GNULIB_STRSTR=0;
14446 GNULIB_STRCASESTR=0;
14447 GNULIB_STRTOK_R=0;
14448 GNULIB_MBSLEN=0;
14449 GNULIB_MBSNLEN=0;
14450 GNULIB_MBSCHR=0;
14451 GNULIB_MBSRCHR=0;
14452 GNULIB_MBSSTR=0;
14453 GNULIB_MBSCASECMP=0;
14454 GNULIB_MBSNCASECMP=0;
14455 GNULIB_MBSPCASECMP=0;
14456 GNULIB_MBSCASESTR=0;
14457 GNULIB_MBSCSPN=0;
14458 GNULIB_MBSPBRK=0;
14459 GNULIB_MBSSPN=0;
14460 GNULIB_MBSSEP=0;
14461 GNULIB_MBSTOK_R=0;
14462 GNULIB_STRERROR=0;
14463 GNULIB_STRERROR_R=0;
14464 GNULIB_STRSIGNAL=0;
14465 GNULIB_STRVERSCMP=0;
14466 HAVE_MBSLEN=0;
14467 HAVE_FFSL=1;
14468 HAVE_FFSLL=1;
14469 HAVE_MEMCHR=1;
14470 HAVE_DECL_MEMMEM=1;
14471 HAVE_MEMPCPY=1;
14472 HAVE_DECL_MEMRCHR=1;
14473 HAVE_RAWMEMCHR=1;
14474 HAVE_STPCPY=1;
14475 HAVE_STPNCPY=1;
14476 HAVE_STRCHRNUL=1;
14477 HAVE_DECL_STRDUP=1;
14478 HAVE_DECL_STRNDUP=1;
14479 HAVE_DECL_STRNLEN=1;
14480 HAVE_STRPBRK=1;
14481 HAVE_STRSEP=1;
14482 HAVE_STRCASESTR=1;
14483 HAVE_DECL_STRTOK_R=1;
14484 HAVE_DECL_STRERROR_R=1;
14485 HAVE_DECL_STRSIGNAL=1;
14486 HAVE_STRVERSCMP=1;
14487 REPLACE_MEMCHR=0;
14488 REPLACE_MEMMEM=0;
14489 REPLACE_STPNCPY=0;
14490 REPLACE_STRDUP=0;
14491 REPLACE_STRSTR=0;
14492 REPLACE_STRCASESTR=0;
14493 REPLACE_STRCHRNUL=0;
14494 REPLACE_STRERROR=0;
14495 REPLACE_STRERROR_R=0;
14496 REPLACE_STRNCAT=0;
14497 REPLACE_STRNDUP=0;
14498 REPLACE_STRNLEN=0;
14499 REPLACE_STRSIGNAL=0;
14500 REPLACE_STRTOK_R=0;
14501 UNDEFINE_STRTOK_R=0;
14502
14503
14504
14505
14506
14507 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
14508 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
14509 # irrelevant for anonymous mappings.
14510 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
14511 if test "x$ac_cv_func_mmap" = xyes; then :
14512 gl_have_mmap=yes
14513 else
14514 gl_have_mmap=no
14515 fi
14516
14517
14518 # Try to allow MAP_ANONYMOUS.
14519 gl_have_mmap_anonymous=no
14520 if test $gl_have_mmap = yes; then
14521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
14522 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
14523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14524 /* end confdefs.h. */
14525
14526 #include <sys/mman.h>
14527 #ifdef MAP_ANONYMOUS
14528 I cannot identify this map
14529 #endif
14530
14531 _ACEOF
14532 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14533 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
14534 gl_have_mmap_anonymous=yes
14535 fi
14536 rm -f conftest*
14537
14538 if test $gl_have_mmap_anonymous != yes; then
14539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14540 /* end confdefs.h. */
14541
14542 #include <sys/mman.h>
14543 #ifdef MAP_ANON
14544 I cannot identify this map
14545 #endif
14546
14547 _ACEOF
14548 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14549 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
14550
14551 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
14552
14553 gl_have_mmap_anonymous=yes
14554 fi
14555 rm -f conftest*
14556
14557 fi
14558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
14559 $as_echo "$gl_have_mmap_anonymous" >&6; }
14560 if test $gl_have_mmap_anonymous = yes; then
14561
14562 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
14563
14564 fi
14565 fi
14566
14567
14568 :
14569
14570
14571
14572
14573
14574
14575 :
14576
14577
14578
14579
14580
14581
14582
14583
14584 if test $HAVE_MEMCHR = 1; then
14585 # Detect platform-specific bugs in some versions of glibc:
14586 # memchr should not dereference anything with length 0
14587 # http://bugzilla.redhat.com/499689
14588 # memchr should not dereference overestimated length after a match
14589 # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
14590 # http://sourceware.org/bugzilla/show_bug.cgi?id=10162
14591 # Assume that memchr works on platforms that lack mprotect.
14592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
14593 $as_echo_n "checking whether memchr works... " >&6; }
14594 if ${gl_cv_func_memchr_works+:} false; then :
14595 $as_echo_n "(cached) " >&6
14596 else
14597 if test "$cross_compiling" = yes; then :
14598 gl_cv_func_memchr_works="guessing no"
14599 else
14600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14601 /* end confdefs.h. */
14602
14603 #include <string.h>
14604 #if HAVE_SYS_MMAN_H
14605 # include <fcntl.h>
14606 # include <unistd.h>
14607 # include <sys/types.h>
14608 # include <sys/mman.h>
14609 # ifndef MAP_FILE
14610 # define MAP_FILE 0
14611 # endif
14612 #endif
14613
14614 int
14615 main ()
14616 {
14617
14618 int result = 0;
14619 char *fence = NULL;
14620 #if HAVE_SYS_MMAN_H && HAVE_MPROTECT
14621 # if HAVE_MAP_ANONYMOUS
14622 const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
14623 const int fd = -1;
14624 # else /* !HAVE_MAP_ANONYMOUS */
14625 const int flags = MAP_FILE | MAP_PRIVATE;
14626 int fd = open ("/dev/zero", O_RDONLY, 0666);
14627 if (fd >= 0)
14628 # endif
14629 {
14630 int pagesize = getpagesize ();
14631 char *two_pages =
14632 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
14633 flags, fd, 0);
14634 if (two_pages != (char *)(-1)
14635 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
14636 fence = two_pages + pagesize;
14637 }
14638 #endif
14639 if (fence)
14640 {
14641 if (memchr (fence, 0, 0))
14642 result |= 1;
14643 strcpy (fence - 9, "12345678");
14644 if (memchr (fence - 9, 0, 79) != fence - 1)
14645 result |= 2;
14646 if (memchr (fence - 1, 0, 3) != fence - 1)
14647 result |= 4;
14648 }
14649 return result;
14650
14651 ;
14652 return 0;
14653 }
14654 _ACEOF
14655 if ac_fn_c_try_run "$LINENO"; then :
14656 gl_cv_func_memchr_works=yes
14657 else
14658 gl_cv_func_memchr_works=no
14659 fi
14660 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14661 conftest.$ac_objext conftest.beam conftest.$ac_ext
14662 fi
14663
14664 fi
14665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
14666 $as_echo "$gl_cv_func_memchr_works" >&6; }
14667 if test "$gl_cv_func_memchr_works" != yes; then
14668 REPLACE_MEMCHR=1
14669 fi
14670 fi
14671
14672
14673 ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default"
14674 if test "x$ac_cv_have_decl_memmem" = xyes; then :
14675 ac_have_decl=1
14676 else
14677 ac_have_decl=0
14678 fi
14679
14680 cat >>confdefs.h <<_ACEOF
14681 #define HAVE_DECL_MEMMEM $ac_have_decl
14682 _ACEOF
14683
14684
14685
14686
14687
14688
14689 for ac_func in memmem
14690 do :
14691 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
14692 if test "x$ac_cv_func_memmem" = xyes; then :
14693 cat >>confdefs.h <<_ACEOF
14694 #define HAVE_MEMMEM 1
14695 _ACEOF
14696
14697 fi
14698 done
14699
14700 if test $ac_cv_func_memmem = yes; then
14701 HAVE_MEMMEM=1
14702 else
14703 HAVE_MEMMEM=0
14704 fi
14705
14706 :
14707
14708
14709
14710
14711
14712 if test $ac_cv_have_decl_memmem = no; then
14713 HAVE_DECL_MEMMEM=0
14714 else
14715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
14716 $as_echo_n "checking whether memmem works... " >&6; }
14717 if ${gl_cv_func_memmem_works_always+:} false; then :
14718 $as_echo_n "(cached) " >&6
14719 else
14720 if test "$cross_compiling" = yes; then :
14721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14722 /* end confdefs.h. */
14723
14724 #ifdef __GNU_LIBRARY__
14725 #include <features.h>
14726 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
14727 || __GLIBC_MINOR__ > 12)) \
14728 || (__GLIBC__ > 2)) \
14729 || defined __UCLIBC__
14730 Lucky user
14731 #endif
14732 #elif defined __CYGWIN__
14733 #include <cygwin/version.h>
14734 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
14735 Lucky user
14736 #endif
14737 #else
14738 Lucky user
14739 #endif
14740
14741 _ACEOF
14742 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14743 $EGREP "Lucky user" >/dev/null 2>&1; then :
14744 gl_cv_func_memmem_works_always="guessing yes"
14745 else
14746 gl_cv_func_memmem_works_always="guessing no"
14747 fi
14748 rm -f conftest*
14749
14750
14751 else
14752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14753 /* end confdefs.h. */
14754
14755 #include <string.h> /* for memmem */
14756 #define P "_EF_BF_BD"
14757 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
14758 #define NEEDLE P P P P P
14759
14760 int
14761 main ()
14762 {
14763
14764 int result = 0;
14765 if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
14766 result |= 1;
14767 /* Check for empty needle behavior. */
14768 {
14769 const char *haystack = "AAA";
14770 if (memmem (haystack, 3, NULL, 0) != haystack)
14771 result |= 2;
14772 }
14773 return result;
14774
14775 ;
14776 return 0;
14777 }
14778 _ACEOF
14779 if ac_fn_c_try_run "$LINENO"; then :
14780 gl_cv_func_memmem_works_always=yes
14781 else
14782 gl_cv_func_memmem_works_always=no
14783 fi
14784 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14785 conftest.$ac_objext conftest.beam conftest.$ac_ext
14786 fi
14787
14788
14789 fi
14790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
14791 $as_echo "$gl_cv_func_memmem_works_always" >&6; }
14792 case "$gl_cv_func_memmem_works_always" in
14793 *yes) ;;
14794 *)
14795 REPLACE_MEMMEM=1
14796 ;;
14797 esac
14798 fi
14799 :
14800
14801
14802 ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
14803 if test "x$ac_cv_have_decl_memrchr" = xyes; then :
14804 ac_have_decl=1
14805 else
14806 ac_have_decl=0
14807 fi
14808
14809 cat >>confdefs.h <<_ACEOF
14810 #define HAVE_DECL_MEMRCHR $ac_have_decl
14811 _ACEOF
14812
14813
14814
14815
14816
14817
14818
14819
14820
14821
14822
14823
14824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
14825 $as_echo_n "checking for promoted mode_t type... " >&6; }
14826 if ${gl_cv_promoted_mode_t+:} false; then :
14827 $as_echo_n "(cached) " >&6
14828 else
14829
14830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14831 /* end confdefs.h. */
14832 #include <sys/types.h>
14833 int
14834 main ()
14835 {
14836 typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
14837 ;
14838 return 0;
14839 }
14840 _ACEOF
14841 if ac_fn_c_try_compile "$LINENO"; then :
14842 gl_cv_promoted_mode_t='int'
14843 else
14844 gl_cv_promoted_mode_t='mode_t'
14845 fi
14846 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14847
14848 fi
14849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
14850 $as_echo "$gl_cv_promoted_mode_t" >&6; }
14851
14852 cat >>confdefs.h <<_ACEOF
14853 #define PROMOTED_MODE_T $gl_cv_promoted_mode_t
14854 _ACEOF
14855
14856
14857
14858
14859
14860
14861
14862
14863 GNULIB_DPRINTF=0;
14864 GNULIB_FCLOSE=0;
14865 GNULIB_FDOPEN=0;
14866 GNULIB_FFLUSH=0;
14867 GNULIB_FGETC=0;
14868 GNULIB_FGETS=0;
14869 GNULIB_FOPEN=0;
14870 GNULIB_FPRINTF=0;
14871 GNULIB_FPRINTF_POSIX=0;
14872 GNULIB_FPURGE=0;
14873 GNULIB_FPUTC=0;
14874 GNULIB_FPUTS=0;
14875 GNULIB_FREAD=0;
14876 GNULIB_FREOPEN=0;
14877 GNULIB_FSCANF=0;
14878 GNULIB_FSEEK=0;
14879 GNULIB_FSEEKO=0;
14880 GNULIB_FTELL=0;
14881 GNULIB_FTELLO=0;
14882 GNULIB_FWRITE=0;
14883 GNULIB_GETC=0;
14884 GNULIB_GETCHAR=0;
14885 GNULIB_GETDELIM=0;
14886 GNULIB_GETLINE=0;
14887 GNULIB_OBSTACK_PRINTF=0;
14888 GNULIB_OBSTACK_PRINTF_POSIX=0;
14889 GNULIB_PCLOSE=0;
14890 GNULIB_PERROR=0;
14891 GNULIB_POPEN=0;
14892 GNULIB_PRINTF=0;
14893 GNULIB_PRINTF_POSIX=0;
14894 GNULIB_PUTC=0;
14895 GNULIB_PUTCHAR=0;
14896 GNULIB_PUTS=0;
14897 GNULIB_REMOVE=0;
14898 GNULIB_RENAME=0;
14899 GNULIB_RENAMEAT=0;
14900 GNULIB_SCANF=0;
14901 GNULIB_SNPRINTF=0;
14902 GNULIB_SPRINTF_POSIX=0;
14903 GNULIB_STDIO_H_NONBLOCKING=0;
14904 GNULIB_STDIO_H_SIGPIPE=0;
14905 GNULIB_TMPFILE=0;
14906 GNULIB_VASPRINTF=0;
14907 GNULIB_VFSCANF=0;
14908 GNULIB_VSCANF=0;
14909 GNULIB_VDPRINTF=0;
14910 GNULIB_VFPRINTF=0;
14911 GNULIB_VFPRINTF_POSIX=0;
14912 GNULIB_VPRINTF=0;
14913 GNULIB_VPRINTF_POSIX=0;
14914 GNULIB_VSNPRINTF=0;
14915 GNULIB_VSPRINTF_POSIX=0;
14916 HAVE_DECL_FPURGE=1;
14917 HAVE_DECL_FSEEKO=1;
14918 HAVE_DECL_FTELLO=1;
14919 HAVE_DECL_GETDELIM=1;
14920 HAVE_DECL_GETLINE=1;
14921 HAVE_DECL_OBSTACK_PRINTF=1;
14922 HAVE_DECL_SNPRINTF=1;
14923 HAVE_DECL_VSNPRINTF=1;
14924 HAVE_DPRINTF=1;
14925 HAVE_FSEEKO=1;
14926 HAVE_FTELLO=1;
14927 HAVE_PCLOSE=1;
14928 HAVE_POPEN=1;
14929 HAVE_RENAMEAT=1;
14930 HAVE_VASPRINTF=1;
14931 HAVE_VDPRINTF=1;
14932 REPLACE_DPRINTF=0;
14933 REPLACE_FCLOSE=0;
14934 REPLACE_FDOPEN=0;
14935 REPLACE_FFLUSH=0;
14936 REPLACE_FOPEN=0;
14937 REPLACE_FPRINTF=0;
14938 REPLACE_FPURGE=0;
14939 REPLACE_FREOPEN=0;
14940 REPLACE_FSEEK=0;
14941 REPLACE_FSEEKO=0;
14942 REPLACE_FTELL=0;
14943 REPLACE_FTELLO=0;
14944 REPLACE_GETDELIM=0;
14945 REPLACE_GETLINE=0;
14946 REPLACE_OBSTACK_PRINTF=0;
14947 REPLACE_PERROR=0;
14948 REPLACE_POPEN=0;
14949 REPLACE_PRINTF=0;
14950 REPLACE_REMOVE=0;
14951 REPLACE_RENAME=0;
14952 REPLACE_RENAMEAT=0;
14953 REPLACE_SNPRINTF=0;
14954 REPLACE_SPRINTF=0;
14955 REPLACE_STDIO_READ_FUNCS=0;
14956 REPLACE_STDIO_WRITE_FUNCS=0;
14957 REPLACE_TMPFILE=0;
14958 REPLACE_VASPRINTF=0;
14959 REPLACE_VDPRINTF=0;
14960 REPLACE_VFPRINTF=0;
14961 REPLACE_VPRINTF=0;
14962 REPLACE_VSNPRINTF=0;
14963 REPLACE_VSPRINTF=0;
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
14996 ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default"
14997 if test "x$ac_cv_have_decl_setenv" = xyes; then :
14998 ac_have_decl=1
14999 else
15000 ac_have_decl=0
15001 fi
15002
15003 cat >>confdefs.h <<_ACEOF
15004 #define HAVE_DECL_SETENV $ac_have_decl
15005 _ACEOF
15006
15007
15008
15009
15010
15011
15012
15013
15014
15015
15016 :
15017
15018
15019
15020
15021
15022 if test $ac_cv_have_decl_setenv = no; then
15023 HAVE_DECL_SETENV=0
15024 fi
15025
15026 :
15027
15028
15029
15030
15031
15032
15033
15034
15035
15036 :
15037
15038
15039
15040
15041
15042 for ac_header in search.h
15043 do :
15044 ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
15045 if test "x$ac_cv_header_search_h" = xyes; then :
15046 cat >>confdefs.h <<_ACEOF
15047 #define HAVE_SEARCH_H 1
15048 _ACEOF
15049
15050 fi
15051
15052 done
15053
15054 for ac_func in tsearch
15055 do :
15056 ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
15057 if test "x$ac_cv_func_tsearch" = xyes; then :
15058 cat >>confdefs.h <<_ACEOF
15059 #define HAVE_TSEARCH 1
15060 _ACEOF
15061
15062 fi
15063 done
15064
15065
15066
15067
15068 GNULIB_PTHREAD_SIGMASK=0;
15069 GNULIB_RAISE=0;
15070 GNULIB_SIGNAL_H_SIGPIPE=0;
15071 GNULIB_SIGPROCMASK=0;
15072 GNULIB_SIGACTION=0;
15073 HAVE_POSIX_SIGNALBLOCKING=1;
15074 HAVE_PTHREAD_SIGMASK=1;
15075 HAVE_RAISE=1;
15076 HAVE_SIGSET_T=1;
15077 HAVE_SIGINFO_T=1;
15078 HAVE_SIGACTION=1;
15079 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
15080
15081 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
15082
15083 HAVE_SIGHANDLER_T=1;
15084 REPLACE_PTHREAD_SIGMASK=0;
15085 REPLACE_RAISE=0;
15086
15087
15088 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
15089 #include <signal.h>
15090 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
15091 #include <sys/types.h>
15092
15093 "
15094 if test "x$ac_cv_type_sigset_t" = xyes; then :
15095
15096 cat >>confdefs.h <<_ACEOF
15097 #define HAVE_SIGSET_T 1
15098 _ACEOF
15099
15100 gl_cv_type_sigset_t=yes
15101 else
15102 gl_cv_type_sigset_t=no
15103 fi
15104
15105 if test $gl_cv_type_sigset_t != yes; then
15106 HAVE_SIGSET_T=0
15107 fi
15108
15109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
15110 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
15111 if ${ac_cv_type_uid_t+:} false; then :
15112 $as_echo_n "(cached) " >&6
15113 else
15114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15115 /* end confdefs.h. */
15116 #include <sys/types.h>
15117
15118 _ACEOF
15119 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15120 $EGREP "uid_t" >/dev/null 2>&1; then :
15121 ac_cv_type_uid_t=yes
15122 else
15123 ac_cv_type_uid_t=no
15124 fi
15125 rm -f conftest*
15126
15127 fi
15128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
15129 $as_echo "$ac_cv_type_uid_t" >&6; }
15130 if test $ac_cv_type_uid_t = no; then
15131
15132 $as_echo "#define uid_t int" >>confdefs.h
15133
15134
15135 $as_echo "#define gid_t int" >>confdefs.h
15136
15137 fi
15138
15139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
15140 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
15141 if ${ac_cv_header_stdbool_h+:} false; then :
15142 $as_echo_n "(cached) " >&6
15143 else
15144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15145 /* end confdefs.h. */
15146
15147 #include <stdbool.h>
15148
15149 #ifdef __cplusplus
15150 typedef bool Bool;
15151 #else
15152 typedef _Bool Bool;
15153 #ifndef bool
15154 "error: bool is not defined"
15155 #endif
15156 #ifndef false
15157 "error: false is not defined"
15158 #endif
15159 #if false
15160 "error: false is not 0"
15161 #endif
15162 #ifndef true
15163 "error: true is not defined"
15164 #endif
15165 #if true != 1
15166 "error: true is not 1"
15167 #endif
15168 #endif
15169
15170 #ifndef __bool_true_false_are_defined
15171 "error: __bool_true_false_are_defined is not defined"
15172 #endif
15173
15174 struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
15175
15176 char a[true == 1 ? 1 : -1];
15177 char b[false == 0 ? 1 : -1];
15178 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
15179 char d[(bool) 0.5 == true ? 1 : -1];
15180 /* See body of main program for 'e'. */
15181 char f[(Bool) 0.0 == false ? 1 : -1];
15182 char g[true];
15183 char h[sizeof (Bool)];
15184 char i[sizeof s.t];
15185 enum { j = false, k = true, l = false * true, m = true * 256 };
15186 /* The following fails for
15187 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
15188 Bool n[m];
15189 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
15190 char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
15191 /* Catch a bug in an HP-UX C compiler. See
15192 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
15193 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
15194 */
15195 Bool q = true;
15196 Bool *pq = &q;
15197 bool *qq = &q;
15198
15199 int
15200 main ()
15201 {
15202
15203 bool e = &s;
15204 *pq |= q; *pq |= ! q;
15205 *qq |= q; *qq |= ! q;
15206 /* Refer to every declared value, to avoid compiler optimizations. */
15207 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
15208 + !m + !n + !o + !p + !q + !pq + !qq);
15209
15210 ;
15211 return 0;
15212 }
15213 _ACEOF
15214 if ac_fn_c_try_compile "$LINENO"; then :
15215 ac_cv_header_stdbool_h=yes
15216 else
15217 ac_cv_header_stdbool_h=no
15218 fi
15219 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15220 fi
15221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
15222 $as_echo "$ac_cv_header_stdbool_h" >&6; }
15223 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
15224 if test "x$ac_cv_type__Bool" = xyes; then :
15225
15226 cat >>confdefs.h <<_ACEOF
15227 #define HAVE__BOOL 1
15228 _ACEOF
15229
15230
15231 fi
15232
15233
15234
15235 REPLACE_NULL=0;
15236 HAVE_MAX_ALIGN_T=1;
15237 HAVE_WCHAR_T=1;
15238
15239
15240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
15241 $as_echo_n "checking for wchar_t... " >&6; }
15242 if ${gt_cv_c_wchar_t+:} false; then :
15243 $as_echo_n "(cached) " >&6
15244 else
15245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15246 /* end confdefs.h. */
15247 #include <stddef.h>
15248 wchar_t foo = (wchar_t)'\0';
15249 int
15250 main ()
15251 {
15252
15253 ;
15254 return 0;
15255 }
15256 _ACEOF
15257 if ac_fn_c_try_compile "$LINENO"; then :
15258 gt_cv_c_wchar_t=yes
15259 else
15260 gt_cv_c_wchar_t=no
15261 fi
15262 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15263 fi
15264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
15265 $as_echo "$gt_cv_c_wchar_t" >&6; }
15266 if test $gt_cv_c_wchar_t = yes; then
15267
15268 $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
15269
15270 fi
15271
15272
15273
15274
15275
15276
15277
15278 ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
15279 if test "x$ac_cv_have_decl_strdup" = xyes; then :
15280 ac_have_decl=1
15281 else
15282 ac_have_decl=0
15283 fi
15284
15285 cat >>confdefs.h <<_ACEOF
15286 #define HAVE_DECL_STRDUP $ac_have_decl
15287 _ACEOF
15288
15289
15290
15291 REPLACE_STRERROR_0=0
15292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
15293 $as_echo_n "checking whether strerror(0) succeeds... " >&6; }
15294 if ${gl_cv_func_strerror_0_works+:} false; then :
15295 $as_echo_n "(cached) " >&6
15296 else
15297 if test "$cross_compiling" = yes; then :
15298 case "$host_os" in
15299 # Guess yes on glibc systems.
15300 *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
15301 # If we don't know, assume the worst.
15302 *) gl_cv_func_strerror_0_works="guessing no" ;;
15303 esac
15304
15305 else
15306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15307 /* end confdefs.h. */
15308 #include <string.h>
15309 #include <errno.h>
15310
15311 int
15312 main ()
15313 {
15314 int result = 0;
15315 char *str;
15316 errno = 0;
15317 str = strerror (0);
15318 if (!*str) result |= 1;
15319 if (errno) result |= 2;
15320 if (strstr (str, "nknown") || strstr (str, "ndefined"))
15321 result |= 4;
15322 return result;
15323 ;
15324 return 0;
15325 }
15326 _ACEOF
15327 if ac_fn_c_try_run "$LINENO"; then :
15328 gl_cv_func_strerror_0_works=yes
15329 else
15330 gl_cv_func_strerror_0_works=no
15331 fi
15332 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15333 conftest.$ac_objext conftest.beam conftest.$ac_ext
15334 fi
15335
15336
15337 fi
15338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
15339 $as_echo "$gl_cv_func_strerror_0_works" >&6; }
15340 case "$gl_cv_func_strerror_0_works" in
15341 *yes) ;;
15342 *)
15343 REPLACE_STRERROR_0=1
15344
15345 $as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h
15346
15347 ;;
15348 esac
15349
15350
15351
15352
15353
15354
15355
15356
15357
15358
15359 ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
15360 if test "x$ac_cv_func_strerror_r" = xyes; then :
15361
15362 fi
15363
15364 if test $ac_cv_func_strerror_r = yes; then
15365 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
15366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strerror_r with POSIX signature" >&5
15367 $as_echo_n "checking for strerror_r with POSIX signature... " >&6; }
15368 if ${gl_cv_func_strerror_r_posix_signature+:} false; then :
15369 $as_echo_n "(cached) " >&6
15370 else
15371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15372 /* end confdefs.h. */
15373 #include <string.h>
15374 int strerror_r (int, char *, size_t);
15375
15376 int
15377 main ()
15378 {
15379
15380 ;
15381 return 0;
15382 }
15383 _ACEOF
15384 if ac_fn_c_try_compile "$LINENO"; then :
15385 gl_cv_func_strerror_r_posix_signature=yes
15386 else
15387 gl_cv_func_strerror_r_posix_signature=no
15388 fi
15389 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15390
15391 fi
15392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_posix_signature" >&5
15393 $as_echo "$gl_cv_func_strerror_r_posix_signature" >&6; }
15394 if test $gl_cv_func_strerror_r_posix_signature = yes; then
15395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r works" >&5
15396 $as_echo_n "checking whether strerror_r works... " >&6; }
15397 if ${gl_cv_func_strerror_r_works+:} false; then :
15398 $as_echo_n "(cached) " >&6
15399 else
15400 if test "$cross_compiling" = yes; then :
15401
15402 case "$host_os" in
15403 # Guess no on AIX.
15404 aix*) gl_cv_func_strerror_r_works="guessing no";;
15405 # Guess no on HP-UX.
15406 hpux*) gl_cv_func_strerror_r_works="guessing no";;
15407 # Guess no on BSD variants.
15408 *bsd*) gl_cv_func_strerror_r_works="guessing no";;
15409 # Guess yes otherwise.
15410 *) gl_cv_func_strerror_r_works="guessing yes";;
15411 esac
15412
15413 else
15414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15415 /* end confdefs.h. */
15416 #include <errno.h>
15417 #include <string.h>
15418
15419 int
15420 main ()
15421 {
15422 int result = 0;
15423 char buf[79];
15424 if (strerror_r (EACCES, buf, 0) < 0)
15425 result |= 1;
15426 errno = 0;
15427 if (strerror_r (EACCES, buf, sizeof buf) != 0)
15428 result |= 2;
15429 strcpy (buf, "Unknown");
15430 if (strerror_r (0, buf, sizeof buf) != 0)
15431 result |= 4;
15432 if (errno)
15433 result |= 8;
15434 if (strstr (buf, "nknown") || strstr (buf, "ndefined"))
15435 result |= 0x10;
15436 errno = 0;
15437 *buf = 0;
15438 if (strerror_r (-3, buf, sizeof buf) < 0)
15439 result |= 0x20;
15440 if (errno)
15441 result |= 0x40;
15442 if (!*buf)
15443 result |= 0x80;
15444 return result;
15445
15446 ;
15447 return 0;
15448 }
15449 _ACEOF
15450 if ac_fn_c_try_run "$LINENO"; then :
15451 gl_cv_func_strerror_r_works=yes
15452 else
15453 gl_cv_func_strerror_r_works=no
15454 fi
15455 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15456 conftest.$ac_objext conftest.beam conftest.$ac_ext
15457 fi
15458
15459
15460 fi
15461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
15462 $as_echo "$gl_cv_func_strerror_r_works" >&6; }
15463 else
15464
15465 :
15466
15467
15468
15469
15470
15471 if test $ac_cv_func___xpg_strerror_r = yes; then
15472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __xpg_strerror_r works" >&5
15473 $as_echo_n "checking whether __xpg_strerror_r works... " >&6; }
15474 if ${gl_cv_func_strerror_r_works+:} false; then :
15475 $as_echo_n "(cached) " >&6
15476 else
15477 if test "$cross_compiling" = yes; then :
15478 gl_cv_func_strerror_r_works="guessing no"
15479
15480 else
15481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15482 /* end confdefs.h. */
15483 #include <errno.h>
15484 #include <string.h>
15485 extern
15486 #ifdef __cplusplus
15487 "C"
15488 #endif
15489 int __xpg_strerror_r(int, char *, size_t);
15490
15491 int
15492 main ()
15493 {
15494 int result = 0;
15495 char buf[256] = "^";
15496 char copy[256];
15497 char *str = strerror (-1);
15498 strcpy (copy, str);
15499 if (__xpg_strerror_r (-2, buf, 1) == 0)
15500 result |= 1;
15501 if (*buf)
15502 result |= 2;
15503 __xpg_strerror_r (-2, buf, 256);
15504 if (strcmp (str, copy))
15505 result |= 4;
15506 return result;
15507
15508 ;
15509 return 0;
15510 }
15511 _ACEOF
15512 if ac_fn_c_try_run "$LINENO"; then :
15513 gl_cv_func_strerror_r_works=yes
15514 else
15515 gl_cv_func_strerror_r_works=no
15516 fi
15517 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15518 conftest.$ac_objext conftest.beam conftest.$ac_ext
15519 fi
15520
15521
15522 fi
15523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
15524 $as_echo "$gl_cv_func_strerror_r_works" >&6; }
15525 fi
15526 fi
15527 fi
15528 fi
15529
15530
15531
15532
15533
15534
15535
15536
15537
15538
15539
15540
15541
15542
15543
15544
15545
15546
15547
15548
15549
15550
15551 if test $gl_cv_have_include_next = yes; then
15552 gl_cv_next_string_h='<'string.h'>'
15553 else
15554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
15555 $as_echo_n "checking absolute name of <string.h>... " >&6; }
15556 if ${gl_cv_next_string_h+:} false; then :
15557 $as_echo_n "(cached) " >&6
15558 else
15559
15560
15561
15562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15563 /* end confdefs.h. */
15564 #include <string.h>
15565 _ACEOF
15566 case "$host_os" in
15567 aix*) gl_absname_cpp="$ac_cpp -C" ;;
15568 *) gl_absname_cpp="$ac_cpp" ;;
15569 esac
15570
15571 case "$host_os" in
15572 mingw*)
15573 gl_dirsep_regex='[/\\]'
15574 ;;
15575 *)
15576 gl_dirsep_regex='\/'
15577 ;;
15578 esac
15579 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15580 gl_header_literal_regex=`echo 'string.h' \
15581 | sed -e "$gl_make_literal_regex_sed"`
15582 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15583 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15584 s|^/[^/]|//&|
15585 p
15586 q
15587 }'
15588
15589 gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15590 sed -n "$gl_absolute_header_sed"`
15591
15592 gl_header=$gl_cv_absolute_string_h
15593 gl_cv_next_string_h='"'$gl_header'"'
15594
15595
15596 fi
15597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
15598 $as_echo "$gl_cv_next_string_h" >&6; }
15599 fi
15600 NEXT_STRING_H=$gl_cv_next_string_h
15601
15602 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15603 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15604 gl_next_as_first_directive='<'string.h'>'
15605 else
15606 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15607 gl_next_as_first_directive=$gl_cv_next_string_h
15608 fi
15609 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
15610
15611
15612
15613
15614
15615
15616 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
15617 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
15618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
15619 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
15620 if eval \${$as_gl_Symbol+:} false; then :
15621 $as_echo_n "(cached) " >&6
15622 else
15623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15624 /* end confdefs.h. */
15625 #include <string.h>
15626
15627 int
15628 main ()
15629 {
15630 #undef $gl_func
15631 (void) $gl_func;
15632 ;
15633 return 0;
15634 }
15635 _ACEOF
15636 if ac_fn_c_try_compile "$LINENO"; then :
15637 eval "$as_gl_Symbol=yes"
15638 else
15639 eval "$as_gl_Symbol=no"
15640 fi
15641 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15642 fi
15643 eval ac_res=\$$as_gl_Symbol
15644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15645 $as_echo "$ac_res" >&6; }
15646 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
15647 cat >>confdefs.h <<_ACEOF
15648 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
15649 _ACEOF
15650
15651 eval ac_cv_have_decl_$gl_func=yes
15652 fi
15653 done
15654
15655
15656
15657
15658
15659 if test "$gl_cv_func_memchr_works" != yes; then
15660 REPLACE_STRSTR=1
15661 else
15662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
15663 $as_echo_n "checking whether strstr works... " >&6; }
15664 if ${gl_cv_func_strstr_works_always+:} false; then :
15665 $as_echo_n "(cached) " >&6
15666 else
15667 if test "$cross_compiling" = yes; then :
15668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15669 /* end confdefs.h. */
15670
15671 #ifdef __GNU_LIBRARY__
15672 #include <features.h>
15673 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
15674 || defined __UCLIBC__
15675 Lucky user
15676 #endif
15677 #elif defined __CYGWIN__
15678 #include <cygwin/version.h>
15679 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
15680 Lucky user
15681 #endif
15682 #else
15683 Lucky user
15684 #endif
15685
15686 _ACEOF
15687 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15688 $EGREP "Lucky user" >/dev/null 2>&1; then :
15689 gl_cv_func_strstr_works_always="guessing yes"
15690 else
15691 gl_cv_func_strstr_works_always="guessing no"
15692 fi
15693 rm -f conftest*
15694
15695
15696 else
15697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15698 /* end confdefs.h. */
15699
15700 #include <string.h> /* for strstr */
15701 #define P "_EF_BF_BD"
15702 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
15703 #define NEEDLE P P P P P
15704
15705 int
15706 main ()
15707 {
15708 return !!strstr (HAYSTACK, NEEDLE);
15709
15710 ;
15711 return 0;
15712 }
15713 _ACEOF
15714 if ac_fn_c_try_run "$LINENO"; then :
15715 gl_cv_func_strstr_works_always=yes
15716 else
15717 gl_cv_func_strstr_works_always=no
15718 fi
15719 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15720 conftest.$ac_objext conftest.beam conftest.$ac_ext
15721 fi
15722
15723
15724 fi
15725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
15726 $as_echo "$gl_cv_func_strstr_works_always" >&6; }
15727 case "$gl_cv_func_strstr_works_always" in
15728 *yes) ;;
15729 *)
15730 REPLACE_STRSTR=1
15731 ;;
15732 esac
15733 fi
15734
15735
15736 ac_fn_c_check_decl "$LINENO" "strtok_r" "ac_cv_have_decl_strtok_r" "$ac_includes_default"
15737 if test "x$ac_cv_have_decl_strtok_r" = xyes; then :
15738 ac_have_decl=1
15739 else
15740 ac_have_decl=0
15741 fi
15742
15743 cat >>confdefs.h <<_ACEOF
15744 #define HAVE_DECL_STRTOK_R $ac_have_decl
15745 _ACEOF
15746
15747
15748
15749
15750
15751
15752
15753
15754
15755
15756
15757
15758
15759
15760
15761
15762
15763
15764
15765
15766 if test $gl_cv_have_include_next = yes; then
15767 gl_cv_next_sys_types_h='<'sys/types.h'>'
15768 else
15769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
15770 $as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
15771 if ${gl_cv_next_sys_types_h+:} false; then :
15772 $as_echo_n "(cached) " >&6
15773 else
15774
15775
15776
15777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15778 /* end confdefs.h. */
15779 #include <sys/types.h>
15780 _ACEOF
15781 case "$host_os" in
15782 aix*) gl_absname_cpp="$ac_cpp -C" ;;
15783 *) gl_absname_cpp="$ac_cpp" ;;
15784 esac
15785
15786 case "$host_os" in
15787 mingw*)
15788 gl_dirsep_regex='[/\\]'
15789 ;;
15790 *)
15791 gl_dirsep_regex='\/'
15792 ;;
15793 esac
15794 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15795 gl_header_literal_regex=`echo 'sys/types.h' \
15796 | sed -e "$gl_make_literal_regex_sed"`
15797 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15798 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15799 s|^/[^/]|//&|
15800 p
15801 q
15802 }'
15803
15804 gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15805 sed -n "$gl_absolute_header_sed"`
15806
15807 gl_header=$gl_cv_absolute_sys_types_h
15808 gl_cv_next_sys_types_h='"'$gl_header'"'
15809
15810
15811 fi
15812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
15813 $as_echo "$gl_cv_next_sys_types_h" >&6; }
15814 fi
15815 NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
15816
15817 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15818 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15819 gl_next_as_first_directive='<'sys/types.h'>'
15820 else
15821 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15822 gl_next_as_first_directive=$gl_cv_next_sys_types_h
15823 fi
15824 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
15825
15826
15827
15828
15829
15830
15831
15832
15833
15834
15835
15836
15837
15838
15839
15840
15841
15842
15843
15844 GNULIB_MKTIME=0;
15845 GNULIB_NANOSLEEP=0;
15846 GNULIB_STRPTIME=0;
15847 GNULIB_TIMEGM=0;
15848 GNULIB_TIME_R=0;
15849 GNULIB_TIME_RZ=0;
15850 HAVE_DECL_LOCALTIME_R=1;
15851 HAVE_NANOSLEEP=1;
15852 HAVE_STRPTIME=1;
15853 HAVE_TIMEGM=1;
15854 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
15855 REPLACE_MKTIME=GNULIB_PORTCHECK;
15856 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
15857 REPLACE_TIMEGM=GNULIB_PORTCHECK;
15858
15859 : ${GNULIB_GETTIMEOFDAY=0};
15860 REPLACE_GMTIME=0;
15861 REPLACE_LOCALTIME=0;
15862
15863
15864
15865 :
15866
15867
15868
15869
15870
15871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
15872 $as_echo_n "checking for struct timespec in <time.h>... " >&6; }
15873 if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then :
15874 $as_echo_n "(cached) " >&6
15875 else
15876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15877 /* end confdefs.h. */
15878 #include <time.h>
15879
15880 int
15881 main ()
15882 {
15883 static struct timespec x; x.tv_sec = x.tv_nsec;
15884 ;
15885 return 0;
15886 }
15887 _ACEOF
15888 if ac_fn_c_try_compile "$LINENO"; then :
15889 gl_cv_sys_struct_timespec_in_time_h=yes
15890 else
15891 gl_cv_sys_struct_timespec_in_time_h=no
15892 fi
15893 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15894 fi
15895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
15896 $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
15897
15898 TIME_H_DEFINES_STRUCT_TIMESPEC=0
15899 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
15900 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
15901 UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
15902 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
15903 TIME_H_DEFINES_STRUCT_TIMESPEC=1
15904 else
15905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
15906 $as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
15907 if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then :
15908 $as_echo_n "(cached) " >&6
15909 else
15910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15911 /* end confdefs.h. */
15912 #include <sys/time.h>
15913
15914 int
15915 main ()
15916 {
15917 static struct timespec x; x.tv_sec = x.tv_nsec;
15918 ;
15919 return 0;
15920 }
15921 _ACEOF
15922 if ac_fn_c_try_compile "$LINENO"; then :
15923 gl_cv_sys_struct_timespec_in_sys_time_h=yes
15924 else
15925 gl_cv_sys_struct_timespec_in_sys_time_h=no
15926 fi
15927 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15928 fi
15929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
15930 $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
15931 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
15932 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
15933 else
15934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
15935 $as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
15936 if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then :
15937 $as_echo_n "(cached) " >&6
15938 else
15939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15940 /* end confdefs.h. */
15941 #include <pthread.h>
15942
15943 int
15944 main ()
15945 {
15946 static struct timespec x; x.tv_sec = x.tv_nsec;
15947 ;
15948 return 0;
15949 }
15950 _ACEOF
15951 if ac_fn_c_try_compile "$LINENO"; then :
15952 gl_cv_sys_struct_timespec_in_pthread_h=yes
15953 else
15954 gl_cv_sys_struct_timespec_in_pthread_h=no
15955 fi
15956 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15957 fi
15958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
15959 $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
15960 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
15961 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
15962 else
15963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
15964 $as_echo_n "checking for struct timespec in <unistd.h>... " >&6; }
15965 if ${gl_cv_sys_struct_timespec_in_unistd_h+:} false; then :
15966 $as_echo_n "(cached) " >&6
15967 else
15968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15969 /* end confdefs.h. */
15970 #include <unistd.h>
15971
15972 int
15973 main ()
15974 {
15975 static struct timespec x; x.tv_sec = x.tv_nsec;
15976 ;
15977 return 0;
15978 }
15979 _ACEOF
15980 if ac_fn_c_try_compile "$LINENO"; then :
15981 gl_cv_sys_struct_timespec_in_unistd_h=yes
15982 else
15983 gl_cv_sys_struct_timespec_in_unistd_h=no
15984 fi
15985 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15986 fi
15987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5
15988 $as_echo "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
15989 if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
15990 UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
15991 fi
15992 fi
15993 fi
15994 fi
15995
15996
15997
15998
15999
16000
16001
16002
16003
16004
16005
16006
16007
16008
16009
16010
16011 if test $gl_cv_have_include_next = yes; then
16012 gl_cv_next_time_h='<'time.h'>'
16013 else
16014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
16015 $as_echo_n "checking absolute name of <time.h>... " >&6; }
16016 if ${gl_cv_next_time_h+:} false; then :
16017 $as_echo_n "(cached) " >&6
16018 else
16019
16020
16021
16022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16023 /* end confdefs.h. */
16024 #include <time.h>
16025 _ACEOF
16026 case "$host_os" in
16027 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16028 *) gl_absname_cpp="$ac_cpp" ;;
16029 esac
16030
16031 case "$host_os" in
16032 mingw*)
16033 gl_dirsep_regex='[/\\]'
16034 ;;
16035 *)
16036 gl_dirsep_regex='\/'
16037 ;;
16038 esac
16039 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16040 gl_header_literal_regex=`echo 'time.h' \
16041 | sed -e "$gl_make_literal_regex_sed"`
16042 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16043 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16044 s|^/[^/]|//&|
16045 p
16046 q
16047 }'
16048
16049 gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16050 sed -n "$gl_absolute_header_sed"`
16051
16052 gl_header=$gl_cv_absolute_time_h
16053 gl_cv_next_time_h='"'$gl_header'"'
16054
16055
16056 fi
16057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
16058 $as_echo "$gl_cv_next_time_h" >&6; }
16059 fi
16060 NEXT_TIME_H=$gl_cv_next_time_h
16061
16062 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16063 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16064 gl_next_as_first_directive='<'time.h'>'
16065 else
16066 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
16067 gl_next_as_first_directive=$gl_cv_next_time_h
16068 fi
16069 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
16070
16071
16072
16073
16074
16075
16076
16077
16078
16079
16080
16081
16082 ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
16083 if test "x$ac_cv_have_decl_unsetenv" = xyes; then :
16084 ac_have_decl=1
16085 else
16086 ac_have_decl=0
16087 fi
16088
16089 cat >>confdefs.h <<_ACEOF
16090 #define HAVE_DECL_UNSETENV $ac_have_decl
16091 _ACEOF
16092
16093
16094
16095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
16096 $as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
16097 if ${gl_cv_header_wchar_h_correct_inline+:} false; then :
16098 $as_echo_n "(cached) " >&6
16099 else
16100 gl_cv_header_wchar_h_correct_inline=yes
16101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16102 /* end confdefs.h. */
16103
16104 #define wcstod renamed_wcstod
16105 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
16106 <wchar.h>.
16107 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16108 included before <wchar.h>. */
16109 #include <stddef.h>
16110 #include <stdio.h>
16111 #include <time.h>
16112 #include <wchar.h>
16113 extern int zero (void);
16114 int main () { return zero(); }
16115
16116 _ACEOF
16117 save_ac_compile="$ac_compile"
16118 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
16119 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
16120 (eval $ac_compile) 2>&5
16121 ac_status=$?
16122 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16123 test $ac_status = 0; }; then
16124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16125 /* end confdefs.h. */
16126
16127 #define wcstod renamed_wcstod
16128 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
16129 <wchar.h>.
16130 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16131 included before <wchar.h>. */
16132 #include <stddef.h>
16133 #include <stdio.h>
16134 #include <time.h>
16135 #include <wchar.h>
16136 int zero (void) { return 0; }
16137
16138 _ACEOF
16139 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
16140 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
16141 (eval $ac_compile) 2>&5
16142 ac_status=$?
16143 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16144 test $ac_status = 0; }; then
16145 if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
16146 :
16147 else
16148 gl_cv_header_wchar_h_correct_inline=no
16149 fi
16150 fi
16151 fi
16152 ac_compile="$save_ac_compile"
16153 rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
16154
16155 fi
16156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
16157 $as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
16158 if test $gl_cv_header_wchar_h_correct_inline = no; then
16159 as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
16160 This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
16161 C99 mode. You have four options:
16162 - Add the flag -fgnu89-inline to CC and reconfigure, or
16163 - Fix your include files, using parts of
16164 <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
16165 - Use a gcc version older than 4.3, or
16166 - Don't use the flags -std=c99 or -std=gnu99.
16167 Configuration aborted." "$LINENO" 5
16168 fi
16169
16170
16171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
16172 $as_echo_n "checking for wint_t... " >&6; }
16173 if ${gt_cv_c_wint_t+:} false; then :
16174 $as_echo_n "(cached) " >&6
16175 else
16176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16177 /* end confdefs.h. */
16178
16179 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
16180 <wchar.h>.
16181 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
16182 before <wchar.h>. */
16183 #include <stddef.h>
16184 #include <stdio.h>
16185 #include <time.h>
16186 #include <wchar.h>
16187 wint_t foo = (wchar_t)'\0';
16188 int
16189 main ()
16190 {
16191
16192 ;
16193 return 0;
16194 }
16195 _ACEOF
16196 if ac_fn_c_try_compile "$LINENO"; then :
16197 gt_cv_c_wint_t=yes
16198 else
16199 gt_cv_c_wint_t=no
16200 fi
16201 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16202 fi
16203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
16204 $as_echo "$gt_cv_c_wint_t" >&6; }
16205 if test $gt_cv_c_wint_t = yes; then
16206
16207 $as_echo "#define HAVE_WINT_T 1" >>confdefs.h
16208
16209 fi
16210
16211
16212 GNULIB_ISWBLANK=0;
16213 GNULIB_WCTYPE=0;
16214 GNULIB_ISWCTYPE=0;
16215 GNULIB_WCTRANS=0;
16216 GNULIB_TOWCTRANS=0;
16217 HAVE_ISWBLANK=1;
16218 HAVE_WCTYPE_T=1;
16219 HAVE_WCTRANS_T=1;
16220 REPLACE_ISWBLANK=0;
16221
16222
16223
16224
16225
16226
16227
16228 if false; then
16229 GL_COND_LIBTOOL_TRUE=
16230 GL_COND_LIBTOOL_FALSE='#'
16231 else
16232 GL_COND_LIBTOOL_TRUE='#'
16233 GL_COND_LIBTOOL_FALSE=
16234 fi
16235
16236 gl_cond_libtool=false
16237 gl_libdeps=
16238 gl_ltlibdeps=
16239 gl_m4_base='import/m4'
16240
16241
16242
16243
16244
16245
16246
16247
16248
16249 gl_source_base='import'
16250
16251
16252 if test $ac_cv_func_alloca_works = no; then
16253 :
16254 fi
16255
16256 # Define an additional variable used in the Makefile substitution.
16257 if test $ac_cv_working_alloca_h = yes; then
16258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
16259 $as_echo_n "checking for alloca as a compiler built-in... " >&6; }
16260 if ${gl_cv_rpl_alloca+:} false; then :
16261 $as_echo_n "(cached) " >&6
16262 else
16263
16264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16265 /* end confdefs.h. */
16266
16267 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
16268 Need own alloca
16269 #endif
16270
16271 _ACEOF
16272 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16273 $EGREP "Need own alloca" >/dev/null 2>&1; then :
16274 gl_cv_rpl_alloca=yes
16275 else
16276 gl_cv_rpl_alloca=no
16277 fi
16278 rm -f conftest*
16279
16280
16281 fi
16282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
16283 $as_echo "$gl_cv_rpl_alloca" >&6; }
16284 if test $gl_cv_rpl_alloca = yes; then
16285
16286 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
16287
16288 ALLOCA_H=alloca.h
16289 else
16290 ALLOCA_H=
16291 fi
16292 else
16293 ALLOCA_H=alloca.h
16294 fi
16295
16296 if test -n "$ALLOCA_H"; then
16297 GL_GENERATE_ALLOCA_H_TRUE=
16298 GL_GENERATE_ALLOCA_H_FALSE='#'
16299 else
16300 GL_GENERATE_ALLOCA_H_TRUE='#'
16301 GL_GENERATE_ALLOCA_H_FALSE=
16302 fi
16303
16304
16305
16306
16307
16308
16309 :
16310
16311
16312
16313
16314
16315 if test $ac_cv_header_arpa_inet_h = yes; then
16316 HAVE_ARPA_INET_H=1
16317 else
16318 HAVE_ARPA_INET_H=0
16319 fi
16320
16321
16322
16323
16324
16325
16326
16327 :
16328
16329
16330
16331
16332
16333
16334
16335
16336 if test $gl_cv_have_include_next = yes; then
16337 gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
16338 else
16339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <arpa/inet.h>" >&5
16340 $as_echo_n "checking absolute name of <arpa/inet.h>... " >&6; }
16341 if ${gl_cv_next_arpa_inet_h+:} false; then :
16342 $as_echo_n "(cached) " >&6
16343 else
16344
16345 if test $ac_cv_header_arpa_inet_h = yes; then
16346
16347
16348
16349
16350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16351 /* end confdefs.h. */
16352 #include <arpa/inet.h>
16353 _ACEOF
16354 case "$host_os" in
16355 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16356 *) gl_absname_cpp="$ac_cpp" ;;
16357 esac
16358
16359 case "$host_os" in
16360 mingw*)
16361 gl_dirsep_regex='[/\\]'
16362 ;;
16363 *)
16364 gl_dirsep_regex='\/'
16365 ;;
16366 esac
16367 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16368 gl_header_literal_regex=`echo 'arpa/inet.h' \
16369 | sed -e "$gl_make_literal_regex_sed"`
16370 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16371 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16372 s|^/[^/]|//&|
16373 p
16374 q
16375 }'
16376
16377 gl_cv_absolute_arpa_inet_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16378 sed -n "$gl_absolute_header_sed"`
16379
16380 gl_header=$gl_cv_absolute_arpa_inet_h
16381 gl_cv_next_arpa_inet_h='"'$gl_header'"'
16382 else
16383 gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
16384 fi
16385
16386
16387 fi
16388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_arpa_inet_h" >&5
16389 $as_echo "$gl_cv_next_arpa_inet_h" >&6; }
16390 fi
16391 NEXT_ARPA_INET_H=$gl_cv_next_arpa_inet_h
16392
16393 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16394 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16395 gl_next_as_first_directive='<'arpa/inet.h'>'
16396 else
16397 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
16398 gl_next_as_first_directive=$gl_cv_next_arpa_inet_h
16399 fi
16400 NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H=$gl_next_as_first_directive
16401
16402
16403
16404
16405
16406
16407
16408
16409 for gl_func in inet_ntop inet_pton; do
16410 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
16411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
16412 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
16413 if eval \${$as_gl_Symbol+:} false; then :
16414 $as_echo_n "(cached) " >&6
16415 else
16416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16417 /* end confdefs.h. */
16418
16419 /* On some systems, this header is not self-consistent. */
16420 #if !(defined __GLIBC__ || defined __UCLIBC__)
16421 # include <sys/socket.h>
16422 #endif
16423 #ifdef __TANDEM
16424 # include <netdb.h>
16425 #endif
16426 #include <arpa/inet.h>
16427
16428 int
16429 main ()
16430 {
16431 #undef $gl_func
16432 (void) $gl_func;
16433 ;
16434 return 0;
16435 }
16436 _ACEOF
16437 if ac_fn_c_try_compile "$LINENO"; then :
16438 eval "$as_gl_Symbol=yes"
16439 else
16440 eval "$as_gl_Symbol=no"
16441 fi
16442 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16443 fi
16444 eval ac_res=\$$as_gl_Symbol
16445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16446 $as_echo "$ac_res" >&6; }
16447 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
16448 cat >>confdefs.h <<_ACEOF
16449 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
16450 _ACEOF
16451
16452 eval ac_cv_have_decl_$gl_func=yes
16453 fi
16454 done
16455
16456
16457
16458
16459
16460
16461
16462
16463
16464
16465
16466 gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
16467
16468
16469
16470
16471 if test $ac_cv_func_canonicalize_file_name = no; then
16472 HAVE_CANONICALIZE_FILE_NAME=0
16473 if test $ac_cv_func_realpath = no; then
16474 HAVE_REALPATH=0
16475 else
16476 case "$gl_cv_func_realpath_works" in
16477 *yes) ;;
16478 *) REPLACE_REALPATH=1 ;;
16479 esac
16480 fi
16481 else
16482 case "$gl_cv_func_realpath_works" in
16483 *yes)
16484 ;;
16485 *)
16486 REPLACE_CANONICALIZE_FILE_NAME=1
16487 REPLACE_REALPATH=1
16488 ;;
16489 esac
16490 fi
16491
16492 if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
16493
16494
16495
16496
16497
16498
16499
16500
16501 gl_LIBOBJS="$gl_LIBOBJS canonicalize-lgpl.$ac_objext"
16502
16503 fi
16504
16505
16506 cat >>confdefs.h <<_ACEOF
16507 #define GNULIB_CANONICALIZE_LGPL 1
16508 _ACEOF
16509
16510
16511
16512
16513
16514
16515
16516 GNULIB_CANONICALIZE_FILE_NAME=1
16517
16518
16519
16520
16521
16522 $as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
16523
16524
16525
16526
16527
16528
16529
16530
16531 GNULIB_REALPATH=1
16532
16533
16534
16535
16536
16537 $as_echo "#define GNULIB_TEST_REALPATH 1" >>confdefs.h
16538
16539
16540
16541
16542
16543
16544
16545
16546 GNULIB_CHDIR=1
16547
16548
16549
16550
16551
16552 $as_echo "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
16553
16554
16555
16556
16557
16558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this system has an arbitrary file name length limit" >&5
16559 $as_echo_n "checking whether this system has an arbitrary file name length limit... " >&6; }
16560 if ${gl_cv_have_arbitrary_file_name_length_limit+:} false; then :
16561 $as_echo_n "(cached) " >&6
16562 else
16563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16564 /* end confdefs.h. */
16565
16566 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
16567 #if HAVE_UNISTD_H
16568 # include <unistd.h>
16569 #endif
16570 #include <limits.h>
16571 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
16572 # include <sys/param.h>
16573 #endif
16574 #if !defined PATH_MAX && defined MAXPATHLEN
16575 # define PATH_MAX MAXPATHLEN
16576 #endif
16577 #ifdef __hpux
16578 # undef PATH_MAX
16579 # define PATH_MAX 1024
16580 #endif
16581 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
16582 # undef PATH_MAX
16583 # define PATH_MAX 260
16584 #endif
16585
16586 #ifdef PATH_MAX
16587 have_arbitrary_file_name_length_limit
16588 #endif
16589 _ACEOF
16590 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16591 $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1; then :
16592 gl_cv_have_arbitrary_file_name_length_limit=yes
16593 else
16594 gl_cv_have_arbitrary_file_name_length_limit=no
16595 fi
16596 rm -f conftest*
16597
16598 fi
16599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_arbitrary_file_name_length_limit" >&5
16600 $as_echo "$gl_cv_have_arbitrary_file_name_length_limit" >&6; }
16601
16602 if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then
16603
16604
16605
16606
16607
16608
16609
16610
16611 gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext"
16612
16613 :
16614 fi
16615
16616
16617 $as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
16618
16619
16620
16621
16622
16623 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
16624 REPLACE_CLOSE=1
16625 fi
16626
16627
16628
16629
16630
16631 :
16632
16633
16634
16635
16636
16637 if test $ac_cv_header_sys_socket_h != yes; then
16638 for ac_header in winsock2.h
16639 do :
16640 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
16641 if test "x$ac_cv_header_winsock2_h" = xyes; then :
16642 cat >>confdefs.h <<_ACEOF
16643 #define HAVE_WINSOCK2_H 1
16644 _ACEOF
16645
16646 fi
16647
16648 done
16649
16650 fi
16651 if test "$ac_cv_header_winsock2_h" = yes; then
16652 HAVE_WINSOCK2_H=1
16653 UNISTD_H_HAVE_WINSOCK2_H=1
16654 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
16655 else
16656 HAVE_WINSOCK2_H=0
16657 fi
16658
16659
16660 if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
16661 REPLACE_CLOSE=1
16662 fi
16663
16664
16665 if test $REPLACE_CLOSE = 0; then
16666
16667
16668
16669 :
16670
16671
16672
16673
16674
16675 if test $ac_cv_func_fchdir = no; then
16676 HAVE_FCHDIR=0
16677 fi
16678
16679 if test $HAVE_FCHDIR = 0; then
16680 REPLACE_CLOSE=1
16681 fi
16682 fi
16683
16684
16685 if test $REPLACE_CLOSE = 1; then
16686
16687
16688
16689
16690
16691
16692
16693
16694 gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
16695
16696 fi
16697
16698
16699
16700
16701
16702 GNULIB_CLOSE=1
16703
16704
16705
16706
16707
16708 $as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
16709
16710
16711
16712
16713
16714
16715 for ac_func in closedir
16716 do :
16717 ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir"
16718 if test "x$ac_cv_func_closedir" = xyes; then :
16719 cat >>confdefs.h <<_ACEOF
16720 #define HAVE_CLOSEDIR 1
16721 _ACEOF
16722
16723 fi
16724 done
16725
16726 if test $ac_cv_func_closedir = no; then
16727 HAVE_CLOSEDIR=0
16728 fi
16729
16730
16731
16732
16733 :
16734
16735
16736
16737
16738
16739 if test $ac_cv_func_fchdir = no; then
16740 HAVE_FCHDIR=0
16741 fi
16742
16743 if test $HAVE_FCHDIR = 0; then
16744 if test $HAVE_CLOSEDIR = 1; then
16745 REPLACE_CLOSEDIR=1
16746 fi
16747 fi
16748
16749 case $host_os,$HAVE_CLOSEDIR in
16750 os2*,1)
16751 REPLACE_CLOSEDIR=1;;
16752 esac
16753
16754 if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
16755
16756
16757
16758
16759
16760
16761
16762
16763 gl_LIBOBJS="$gl_LIBOBJS closedir.$ac_objext"
16764
16765 fi
16766
16767
16768
16769
16770
16771 GNULIB_CLOSEDIR=1
16772
16773
16774
16775
16776
16777 $as_echo "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
16778
16779
16780
16781
16782 if test "x$datarootdir" = x; then
16783 datarootdir='${datadir}'
16784
16785 fi
16786 if test "x$docdir" = x; then
16787 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
16788
16789 fi
16790 if test "x$htmldir" = x; then
16791 htmldir='${docdir}'
16792
16793 fi
16794 if test "x$dvidir" = x; then
16795 dvidir='${docdir}'
16796
16797 fi
16798 if test "x$pdfdir" = x; then
16799 pdfdir='${docdir}'
16800
16801 fi
16802 if test "x$psdir" = x; then
16803 psdir='${docdir}'
16804
16805 fi
16806 if test "x$lispdir" = x; then
16807 lispdir='${datarootdir}/emacs/site-lisp'
16808
16809 fi
16810 if test "x$localedir" = x; then
16811 localedir='${datarootdir}/locale'
16812
16813 fi
16814 if test "x$runstatedir" = x; then
16815 runstatedir='${localstatedir}/run'
16816
16817 fi
16818
16819 pkglibexecdir='${libexecdir}/${PACKAGE}'
16820
16821
16822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
16823 $as_echo_n "checking for d_ino member in directory struct... " >&6; }
16824 if ${gl_cv_struct_dirent_d_ino+:} false; then :
16825 $as_echo_n "(cached) " >&6
16826 else
16827 if test "$cross_compiling" = yes; then :
16828 case "$host_os" in
16829 # Guess yes on glibc systems with Linux kernel.
16830 linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
16831 # If we don't know, assume the worst.
16832 *) gl_cv_struct_dirent_d_ino="guessing no" ;;
16833 esac
16834
16835 else
16836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16837 /* end confdefs.h. */
16838 #include <sys/types.h>
16839 #include <sys/stat.h>
16840 #include <dirent.h>
16841
16842 int
16843 main ()
16844 {
16845 DIR *dp = opendir (".");
16846 struct dirent *e;
16847 struct stat st;
16848 if (! dp)
16849 return 1;
16850 e = readdir (dp);
16851 if (! e)
16852 return 2;
16853 if (lstat (e->d_name, &st) != 0)
16854 return 3;
16855 if (e->d_ino != st.st_ino)
16856 return 4;
16857 closedir (dp);
16858 return 0;
16859
16860 ;
16861 return 0;
16862 }
16863 _ACEOF
16864 if ac_fn_c_try_run "$LINENO"; then :
16865 gl_cv_struct_dirent_d_ino=yes
16866 else
16867 gl_cv_struct_dirent_d_ino=no
16868 fi
16869 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16870 conftest.$ac_objext conftest.beam conftest.$ac_ext
16871 fi
16872
16873 fi
16874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5
16875 $as_echo "$gl_cv_struct_dirent_d_ino" >&6; }
16876 case "$gl_cv_struct_dirent_d_ino" in
16877 *yes)
16878
16879 $as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h
16880
16881 ;;
16882 esac
16883
16884
16885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_type member in directory struct" >&5
16886 $as_echo_n "checking for d_type member in directory struct... " >&6; }
16887 if ${gl_cv_struct_dirent_d_type+:} false; then :
16888 $as_echo_n "(cached) " >&6
16889 else
16890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16891 /* end confdefs.h. */
16892
16893 #include <sys/types.h>
16894 #include <dirent.h>
16895
16896 int
16897 main ()
16898 {
16899 struct dirent dp; dp.d_type = 0;
16900 ;
16901 return 0;
16902 }
16903 _ACEOF
16904 if ac_fn_c_try_link "$LINENO"; then :
16905 gl_cv_struct_dirent_d_type=yes
16906 else
16907 gl_cv_struct_dirent_d_type=no
16908 fi
16909 rm -f core conftest.err conftest.$ac_objext \
16910 conftest$ac_exeext conftest.$ac_ext
16911
16912
16913 fi
16914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_type" >&5
16915 $as_echo "$gl_cv_struct_dirent_d_type" >&6; }
16916 if test $gl_cv_struct_dirent_d_type = yes; then
16917
16918 $as_echo "#define HAVE_STRUCT_DIRENT_D_TYPE 1" >>confdefs.h
16919
16920 fi
16921
16922
16923
16924
16925
16926
16927
16928
16929
16930
16931
16932 :
16933
16934
16935
16936
16937
16938
16939
16940
16941 if test $gl_cv_have_include_next = yes; then
16942 gl_cv_next_dirent_h='<'dirent.h'>'
16943 else
16944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
16945 $as_echo_n "checking absolute name of <dirent.h>... " >&6; }
16946 if ${gl_cv_next_dirent_h+:} false; then :
16947 $as_echo_n "(cached) " >&6
16948 else
16949
16950 if test $ac_cv_header_dirent_h = yes; then
16951
16952
16953
16954
16955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16956 /* end confdefs.h. */
16957 #include <dirent.h>
16958 _ACEOF
16959 case "$host_os" in
16960 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16961 *) gl_absname_cpp="$ac_cpp" ;;
16962 esac
16963
16964 case "$host_os" in
16965 mingw*)
16966 gl_dirsep_regex='[/\\]'
16967 ;;
16968 *)
16969 gl_dirsep_regex='\/'
16970 ;;
16971 esac
16972 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16973 gl_header_literal_regex=`echo 'dirent.h' \
16974 | sed -e "$gl_make_literal_regex_sed"`
16975 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16976 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16977 s|^/[^/]|//&|
16978 p
16979 q
16980 }'
16981
16982 gl_cv_absolute_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16983 sed -n "$gl_absolute_header_sed"`
16984
16985 gl_header=$gl_cv_absolute_dirent_h
16986 gl_cv_next_dirent_h='"'$gl_header'"'
16987 else
16988 gl_cv_next_dirent_h='<'dirent.h'>'
16989 fi
16990
16991
16992 fi
16993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
16994 $as_echo "$gl_cv_next_dirent_h" >&6; }
16995 fi
16996 NEXT_DIRENT_H=$gl_cv_next_dirent_h
16997
16998 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16999 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17000 gl_next_as_first_directive='<'dirent.h'>'
17001 else
17002 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17003 gl_next_as_first_directive=$gl_cv_next_dirent_h
17004 fi
17005 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
17006
17007
17008
17009
17010 if test $ac_cv_header_dirent_h = yes; then
17011 HAVE_DIRENT_H=1
17012 else
17013 HAVE_DIRENT_H=0
17014 fi
17015
17016
17017
17018 for gl_func in alphasort closedir dirfd fdopendir opendir readdir rewinddir scandir; do
17019 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
17020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
17021 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
17022 if eval \${$as_gl_Symbol+:} false; then :
17023 $as_echo_n "(cached) " >&6
17024 else
17025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17026 /* end confdefs.h. */
17027 #include <dirent.h>
17028
17029 int
17030 main ()
17031 {
17032 #undef $gl_func
17033 (void) $gl_func;
17034 ;
17035 return 0;
17036 }
17037 _ACEOF
17038 if ac_fn_c_try_compile "$LINENO"; then :
17039 eval "$as_gl_Symbol=yes"
17040 else
17041 eval "$as_gl_Symbol=no"
17042 fi
17043 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17044 fi
17045 eval ac_res=\$$as_gl_Symbol
17046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17047 $as_echo "$ac_res" >&6; }
17048 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
17049 cat >>confdefs.h <<_ACEOF
17050 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
17051 _ACEOF
17052
17053 eval ac_cv_have_decl_$gl_func=yes
17054 fi
17055 done
17056
17057
17058
17059
17060
17061
17062
17063 for ac_func in dirfd
17064 do :
17065 ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
17066 if test "x$ac_cv_func_dirfd" = xyes; then :
17067 cat >>confdefs.h <<_ACEOF
17068 #define HAVE_DIRFD 1
17069 _ACEOF
17070
17071 fi
17072 done
17073
17074 ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
17075 #include <dirent.h>
17076 "
17077 if test "x$ac_cv_have_decl_dirfd" = xyes; then :
17078 ac_have_decl=1
17079 else
17080 ac_have_decl=0
17081 fi
17082
17083 cat >>confdefs.h <<_ACEOF
17084 #define HAVE_DECL_DIRFD $ac_have_decl
17085 _ACEOF
17086
17087 if test $ac_cv_have_decl_dirfd = no; then
17088 HAVE_DECL_DIRFD=0
17089 fi
17090
17091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
17092 $as_echo_n "checking whether dirfd is a macro... " >&6; }
17093 if ${gl_cv_func_dirfd_macro+:} false; then :
17094 $as_echo_n "(cached) " >&6
17095 else
17096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17097 /* end confdefs.h. */
17098
17099 #include <sys/types.h>
17100 #include <dirent.h>
17101 #ifdef dirfd
17102 dirent_header_defines_dirfd
17103 #endif
17104 _ACEOF
17105 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17106 $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1; then :
17107 gl_cv_func_dirfd_macro=yes
17108 else
17109 gl_cv_func_dirfd_macro=no
17110 fi
17111 rm -f conftest*
17112
17113 fi
17114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
17115 $as_echo "$gl_cv_func_dirfd_macro" >&6; }
17116
17117 # Use the replacement if we have no function or macro with that name,
17118 # or if OS/2 kLIBC whose dirfd() does not work.
17119 # Replace only if the system declares dirfd already.
17120 case $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro,$host_os,$ac_cv_have_decl_dirfd in
17121 no,no,*,yes | *,*,os2*,yes)
17122 REPLACE_DIRFD=1
17123
17124 $as_echo "#define REPLACE_DIRFD 1" >>confdefs.h
17125 ;;
17126 esac
17127
17128 if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \
17129 || test $REPLACE_DIRFD = 1; then
17130
17131
17132
17133
17134
17135
17136
17137
17138 gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext"
17139
17140
17141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
17142 $as_echo_n "checking how to get the file descriptor associated with an open DIR*... " >&6; }
17143 if ${gl_cv_sys_dir_fd_member_name+:} false; then :
17144 $as_echo_n "(cached) " >&6
17145 else
17146
17147 dirfd_save_CFLAGS=$CFLAGS
17148 for ac_expr in d_fd dd_fd; do
17149
17150 CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
17151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17152 /* end confdefs.h. */
17153
17154 #include <sys/types.h>
17155 #include <dirent.h>
17156 int
17157 main ()
17158 {
17159 DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
17160 ;
17161 return 0;
17162 }
17163 _ACEOF
17164 if ac_fn_c_try_compile "$LINENO"; then :
17165 dir_fd_found=yes
17166
17167 fi
17168 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17169 CFLAGS=$dirfd_save_CFLAGS
17170 test "$dir_fd_found" = yes && break
17171 done
17172 test "$dir_fd_found" = yes || ac_expr=no_such_member
17173
17174 gl_cv_sys_dir_fd_member_name=$ac_expr
17175
17176
17177 fi
17178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
17179 $as_echo "$gl_cv_sys_dir_fd_member_name" >&6; }
17180 if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
17181
17182 cat >>confdefs.h <<_ACEOF
17183 #define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name
17184 _ACEOF
17185
17186 fi
17187
17188
17189 fi
17190
17191
17192
17193
17194
17195 GNULIB_DIRFD=1
17196
17197
17198
17199
17200
17201 $as_echo "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
17202
17203
17204
17205
17206
17207
17208
17209
17210
17211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
17212 $as_echo_n "checking whether // is distinct from /... " >&6; }
17213 if ${gl_cv_double_slash_root+:} false; then :
17214 $as_echo_n "(cached) " >&6
17215 else
17216 if test x"$cross_compiling" = xyes ; then
17217 # When cross-compiling, there is no way to tell whether // is special
17218 # short of a list of hosts. However, the only known hosts to date
17219 # that have a distinct // are Apollo DomainOS (too old to port to),
17220 # Cygwin, and z/OS. If anyone knows of another system for which // has
17221 # special semantics and is distinct from /, please report it to
17222 # <bug-gnulib@gnu.org>.
17223 case $host in
17224 *-cygwin | i370-ibm-openedition)
17225 gl_cv_double_slash_root=yes ;;
17226 *)
17227 # Be optimistic and assume that / and // are the same when we
17228 # don't know.
17229 gl_cv_double_slash_root='unknown, assuming no' ;;
17230 esac
17231 else
17232 set x `ls -di / // 2>/dev/null`
17233 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
17234 gl_cv_double_slash_root=no
17235 else
17236 gl_cv_double_slash_root=yes
17237 fi
17238 fi
17239 fi
17240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
17241 $as_echo "$gl_cv_double_slash_root" >&6; }
17242 if test "$gl_cv_double_slash_root" = yes; then
17243
17244 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
17245
17246 fi
17247
17248
17249
17250
17251 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
17252 REPLACE_DUP=1
17253 fi
17254
17255
17256
17257
17258 :
17259
17260
17261
17262
17263
17264 if test $ac_cv_func_fchdir = no; then
17265 HAVE_FCHDIR=0
17266 fi
17267
17268 if test $HAVE_FCHDIR = 0; then
17269 REPLACE_DUP=1
17270 fi
17271
17272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup works" >&5
17273 $as_echo_n "checking whether dup works... " >&6; }
17274 if ${gl_cv_func_dup_works+:} false; then :
17275 $as_echo_n "(cached) " >&6
17276 else
17277 if test "$cross_compiling" = yes; then :
17278 gl_cv_func_dup_works='guessing yes'
17279 else
17280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17281 /* end confdefs.h. */
17282 #include <unistd.h>
17283 #include <fcntl.h>
17284 #include <errno.h>
17285 int
17286 main ()
17287 {
17288 /* On OS/2 kLIBC, dup does not work on a directory fd. */
17289 int fd = open (".", O_RDONLY);
17290 return fd < 0 ? 1 : dup (fd) < 0 ? 2 : 0;
17291
17292 ;
17293 return 0;
17294 }
17295
17296 _ACEOF
17297 if ac_fn_c_try_run "$LINENO"; then :
17298 gl_cv_func_dup_works=yes
17299 else
17300 gl_cv_func_dup_works=no
17301 fi
17302 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17303 conftest.$ac_objext conftest.beam conftest.$ac_ext
17304 fi
17305
17306
17307 fi
17308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup_works" >&5
17309 $as_echo "$gl_cv_func_dup_works" >&6; }
17310 case "$gl_cv_func_dup_works" in
17311 *yes) ;;
17312 *)
17313 REPLACE_DUP=1
17314 ;;
17315 esac
17316
17317 if test $REPLACE_DUP = 1; then
17318
17319
17320
17321
17322
17323
17324
17325
17326 gl_LIBOBJS="$gl_LIBOBJS dup.$ac_objext"
17327
17328 :
17329 fi
17330
17331
17332
17333
17334
17335 GNULIB_DUP=1
17336
17337
17338
17339
17340
17341 $as_echo "#define GNULIB_TEST_DUP 1" >>confdefs.h
17342
17343
17344
17345
17346
17347
17348
17349
17350 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
17351
17352
17353 if test $HAVE_DUP2 = 1; then
17354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
17355 $as_echo_n "checking whether dup2 works... " >&6; }
17356 if ${gl_cv_func_dup2_works+:} false; then :
17357 $as_echo_n "(cached) " >&6
17358 else
17359 if test "$cross_compiling" = yes; then :
17360 case "$host_os" in
17361 mingw*) # on this platform, dup2 always returns 0 for success
17362 gl_cv_func_dup2_works="guessing no" ;;
17363 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
17364 gl_cv_func_dup2_works="guessing no" ;;
17365 aix* | freebsd*)
17366 # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
17367 # not EBADF.
17368 gl_cv_func_dup2_works="guessing no" ;;
17369 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
17370 gl_cv_func_dup2_works="guessing no" ;;
17371 *-android*) # implemented using dup3(), which fails if oldfd == newfd
17372 gl_cv_func_dup2_works="guessing no" ;;
17373 os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
17374 gl_cv_func_dup2_works="guessing no" ;;
17375 *) gl_cv_func_dup2_works="guessing yes" ;;
17376 esac
17377 else
17378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17379 /* end confdefs.h. */
17380
17381 #include <errno.h>
17382 #include <fcntl.h>
17383 #include <limits.h>
17384 #include <sys/resource.h>
17385 #include <unistd.h>
17386 #ifndef RLIM_SAVED_CUR
17387 # define RLIM_SAVED_CUR RLIM_INFINITY
17388 #endif
17389 #ifndef RLIM_SAVED_MAX
17390 # define RLIM_SAVED_MAX RLIM_INFINITY
17391 #endif
17392
17393 int
17394 main ()
17395 {
17396 int result = 0;
17397 int bad_fd = INT_MAX;
17398 struct rlimit rlim;
17399 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
17400 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
17401 && rlim.rlim_cur != RLIM_INFINITY
17402 && rlim.rlim_cur != RLIM_SAVED_MAX
17403 && rlim.rlim_cur != RLIM_SAVED_CUR)
17404 bad_fd = rlim.rlim_cur;
17405 #ifdef FD_CLOEXEC
17406 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
17407 result |= 1;
17408 #endif
17409 if (dup2 (1, 1) != 1)
17410 result |= 2;
17411 #ifdef FD_CLOEXEC
17412 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
17413 result |= 4;
17414 #endif
17415 close (0);
17416 if (dup2 (0, 0) != -1)
17417 result |= 8;
17418 /* Many gnulib modules require POSIX conformance of EBADF. */
17419 if (dup2 (2, bad_fd) == -1 && errno != EBADF)
17420 result |= 16;
17421 /* Flush out some cygwin core dumps. */
17422 if (dup2 (2, -1) != -1 || errno != EBADF)
17423 result |= 32;
17424 dup2 (2, 255);
17425 dup2 (2, 256);
17426 /* On OS/2 kLIBC, dup2() does not work on a directory fd. */
17427 {
17428 int fd = open (".", O_RDONLY);
17429 if (fd == -1)
17430 result |= 64;
17431 else if (dup2 (fd, fd + 1) == -1)
17432 result |= 128;
17433
17434 close (fd);
17435 }
17436 return result;
17437 ;
17438 return 0;
17439 }
17440
17441 _ACEOF
17442 if ac_fn_c_try_run "$LINENO"; then :
17443 gl_cv_func_dup2_works=yes
17444 else
17445 gl_cv_func_dup2_works=no
17446 fi
17447 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17448 conftest.$ac_objext conftest.beam conftest.$ac_ext
17449 fi
17450
17451
17452 fi
17453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
17454 $as_echo "$gl_cv_func_dup2_works" >&6; }
17455 case "$gl_cv_func_dup2_works" in
17456 *yes) ;;
17457 *)
17458 REPLACE_DUP2=1
17459 for ac_func in setdtablesize
17460 do :
17461 ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
17462 if test "x$ac_cv_func_setdtablesize" = xyes; then :
17463 cat >>confdefs.h <<_ACEOF
17464 #define HAVE_SETDTABLESIZE 1
17465 _ACEOF
17466
17467 fi
17468 done
17469
17470 ;;
17471 esac
17472 fi
17473
17474
17475
17476
17477 :
17478
17479
17480
17481
17482
17483 if test $ac_cv_func_fchdir = no; then
17484 HAVE_FCHDIR=0
17485 fi
17486
17487 if test $HAVE_FCHDIR = 0; then
17488 if test $HAVE_DUP2 = 1; then
17489 REPLACE_DUP2=1
17490 fi
17491 fi
17492
17493
17494 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
17495
17496
17497
17498
17499
17500
17501
17502
17503 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
17504
17505
17506 fi
17507
17508
17509
17510
17511
17512 GNULIB_DUP2=1
17513
17514
17515
17516
17517
17518 $as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h
17519
17520
17521
17522
17523
17524
17525
17526
17527
17528 GNULIB_ENVIRON=1
17529
17530
17531
17532
17533
17534 $as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
17535
17536
17537
17538
17539
17540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
17541 $as_echo_n "checking for error_at_line... " >&6; }
17542 if ${ac_cv_lib_error_at_line+:} false; then :
17543 $as_echo_n "(cached) " >&6
17544 else
17545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17546 /* end confdefs.h. */
17547 #include <error.h>
17548 int
17549 main ()
17550 {
17551 error_at_line (0, 0, "", 0, "an error occurred");
17552 ;
17553 return 0;
17554 }
17555 _ACEOF
17556 if ac_fn_c_try_link "$LINENO"; then :
17557 ac_cv_lib_error_at_line=yes
17558 else
17559 ac_cv_lib_error_at_line=no
17560 fi
17561 rm -f core conftest.err conftest.$ac_objext \
17562 conftest$ac_exeext conftest.$ac_ext
17563 fi
17564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
17565 $as_echo "$ac_cv_lib_error_at_line" >&6; }
17566
17567 if test $ac_cv_lib_error_at_line = no; then
17568
17569
17570
17571
17572
17573
17574
17575
17576 gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
17577
17578
17579
17580 :
17581
17582 fi
17583
17584
17585 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format"
17586
17587
17588
17589 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format"
17590
17591
17592
17593
17594
17595
17596
17597 :
17598
17599
17600
17601
17602
17603 if test $ac_cv_have_decl_fchdir = no; then
17604 HAVE_DECL_FCHDIR=0
17605 fi
17606
17607
17608 if test $HAVE_FCHDIR = 0; then
17609
17610
17611
17612
17613
17614
17615
17616
17617 gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext"
17618
17619 :
17620
17621 $as_echo "#define REPLACE_FCHDIR 1" >>confdefs.h
17622
17623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5
17624 $as_echo_n "checking whether open can visit directories... " >&6; }
17625 if ${gl_cv_func_open_directory_works+:} false; then :
17626 $as_echo_n "(cached) " >&6
17627 else
17628 if test "$cross_compiling" = yes; then :
17629 case "$host_os" in
17630 # Guess yes on glibc systems.
17631 *-gnu*) gl_cv_func_open_directory_works="guessing yes" ;;
17632 # If we don't know, assume the worst.
17633 *) gl_cv_func_open_directory_works="guessing no" ;;
17634 esac
17635
17636 else
17637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17638 /* end confdefs.h. */
17639 #include <fcntl.h>
17640
17641 int
17642 main ()
17643 {
17644 return open(".", O_RDONLY) < 0;
17645 ;
17646 return 0;
17647 }
17648 _ACEOF
17649 if ac_fn_c_try_run "$LINENO"; then :
17650 gl_cv_func_open_directory_works=yes
17651 else
17652 gl_cv_func_open_directory_works=no
17653 fi
17654 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17655 conftest.$ac_objext conftest.beam conftest.$ac_ext
17656 fi
17657
17658 fi
17659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5
17660 $as_echo "$gl_cv_func_open_directory_works" >&6; }
17661 case "$gl_cv_func_open_directory_works" in
17662 *yes) ;;
17663 *)
17664
17665 $as_echo "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h
17666
17667 ;;
17668 esac
17669 fi
17670
17671
17672
17673
17674
17675
17676 GNULIB_FCHDIR=1
17677
17678
17679
17680
17681
17682 $as_echo "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h
17683
17684
17685
17686
17687
17688
17689
17690
17691 :
17692
17693
17694
17695
17696
17697 if test $ac_cv_func_fcntl = no; then
17698
17699
17700
17701 :
17702
17703
17704
17705
17706
17707 if test $ac_cv_func_fcntl = no; then
17708 HAVE_FCNTL=0
17709 else
17710 REPLACE_FCNTL=1
17711 fi
17712
17713 else
17714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
17715 $as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
17716 if ${gl_cv_func_fcntl_f_dupfd_works+:} false; then :
17717 $as_echo_n "(cached) " >&6
17718 else
17719 if test "$cross_compiling" = yes; then :
17720 case $host_os in
17721 aix* | cygwin* | haiku*)
17722 gl_cv_func_fcntl_f_dupfd_works="guessing no" ;;
17723 *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;;
17724 esac
17725 else
17726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17727 /* end confdefs.h. */
17728 #include <errno.h>
17729 #include <fcntl.h>
17730 #include <limits.h>
17731 #include <sys/resource.h>
17732 #include <unistd.h>
17733 #ifndef RLIM_SAVED_CUR
17734 # define RLIM_SAVED_CUR RLIM_INFINITY
17735 #endif
17736 #ifndef RLIM_SAVED_MAX
17737 # define RLIM_SAVED_MAX RLIM_INFINITY
17738 #endif
17739
17740 int
17741 main ()
17742 {
17743 int result = 0;
17744 int bad_fd = INT_MAX;
17745 struct rlimit rlim;
17746 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
17747 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
17748 && rlim.rlim_cur != RLIM_INFINITY
17749 && rlim.rlim_cur != RLIM_SAVED_MAX
17750 && rlim.rlim_cur != RLIM_SAVED_CUR)
17751 bad_fd = rlim.rlim_cur;
17752 if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
17753 if (errno != EINVAL) result |= 2;
17754 if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
17755 if (errno != EINVAL) result |= 8;
17756 /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */
17757 {
17758 int fd;
17759 fd = open (".", O_RDONLY);
17760 if (fd == -1)
17761 result |= 16;
17762 else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1)
17763 result |= 32;
17764
17765 close (fd);
17766 }
17767 return result;
17768 ;
17769 return 0;
17770 }
17771 _ACEOF
17772 if ac_fn_c_try_run "$LINENO"; then :
17773 gl_cv_func_fcntl_f_dupfd_works=yes
17774 else
17775 gl_cv_func_fcntl_f_dupfd_works=no
17776 fi
17777 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17778 conftest.$ac_objext conftest.beam conftest.$ac_ext
17779 fi
17780
17781 fi
17782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
17783 $as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
17784 case $gl_cv_func_fcntl_f_dupfd_works in
17785 *yes) ;;
17786 *)
17787
17788
17789 :
17790
17791
17792
17793
17794
17795 if test $ac_cv_func_fcntl = no; then
17796 HAVE_FCNTL=0
17797 else
17798 REPLACE_FCNTL=1
17799 fi
17800
17801
17802 $as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
17803 ;;
17804 esac
17805
17806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
17807 $as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
17808 if ${gl_cv_func_fcntl_f_dupfd_cloexec+:} false; then :
17809 $as_echo_n "(cached) " >&6
17810 else
17811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17812 /* end confdefs.h. */
17813
17814 #include <fcntl.h>
17815 #ifndef F_DUPFD_CLOEXEC
17816 choke me
17817 #endif
17818
17819 int
17820 main ()
17821 {
17822
17823 ;
17824 return 0;
17825 }
17826 _ACEOF
17827 if ac_fn_c_try_compile "$LINENO"; then :
17828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17829 /* end confdefs.h. */
17830
17831 #ifdef __linux__
17832 /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
17833 it to support the semantics on older kernels that failed with EINVAL. */
17834 choke me
17835 #endif
17836
17837 int
17838 main ()
17839 {
17840
17841 ;
17842 return 0;
17843 }
17844 _ACEOF
17845 if ac_fn_c_try_compile "$LINENO"; then :
17846 gl_cv_func_fcntl_f_dupfd_cloexec=yes
17847 else
17848 gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
17849 fi
17850 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17851 else
17852 gl_cv_func_fcntl_f_dupfd_cloexec=no
17853 fi
17854 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17855 fi
17856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
17857 $as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
17858 if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
17859
17860
17861
17862 :
17863
17864
17865
17866
17867
17868 if test $ac_cv_func_fcntl = no; then
17869 HAVE_FCNTL=0
17870 else
17871 REPLACE_FCNTL=1
17872 fi
17873
17874 fi
17875 fi
17876
17877
17878
17879
17880 :
17881
17882
17883
17884
17885
17886 if test $ac_cv_func_fchdir = no; then
17887 HAVE_FCHDIR=0
17888 fi
17889
17890 if test $HAVE_FCHDIR = 0; then
17891
17892
17893
17894 :
17895
17896
17897
17898
17899
17900 if test $ac_cv_func_fcntl = no; then
17901 HAVE_FCNTL=0
17902 else
17903 REPLACE_FCNTL=1
17904 fi
17905
17906 fi
17907
17908
17909 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
17910
17911
17912
17913
17914
17915
17916
17917
17918 gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
17919
17920 fi
17921
17922
17923
17924
17925
17926 GNULIB_FCNTL=1
17927
17928
17929
17930
17931
17932 $as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
17933
17934
17935
17936
17937
17938
17939
17940
17941
17942
17943
17944
17945
17946
17947 if test $gl_cv_have_include_next = yes; then
17948 gl_cv_next_fcntl_h='<'fcntl.h'>'
17949 else
17950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
17951 $as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
17952 if ${gl_cv_next_fcntl_h+:} false; then :
17953 $as_echo_n "(cached) " >&6
17954 else
17955
17956
17957
17958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17959 /* end confdefs.h. */
17960 #include <fcntl.h>
17961 _ACEOF
17962 case "$host_os" in
17963 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17964 *) gl_absname_cpp="$ac_cpp" ;;
17965 esac
17966
17967 case "$host_os" in
17968 mingw*)
17969 gl_dirsep_regex='[/\\]'
17970 ;;
17971 *)
17972 gl_dirsep_regex='\/'
17973 ;;
17974 esac
17975 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17976 gl_header_literal_regex=`echo 'fcntl.h' \
17977 | sed -e "$gl_make_literal_regex_sed"`
17978 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17979 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17980 s|^/[^/]|//&|
17981 p
17982 q
17983 }'
17984
17985 gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17986 sed -n "$gl_absolute_header_sed"`
17987
17988 gl_header=$gl_cv_absolute_fcntl_h
17989 gl_cv_next_fcntl_h='"'$gl_header'"'
17990
17991
17992 fi
17993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
17994 $as_echo "$gl_cv_next_fcntl_h" >&6; }
17995 fi
17996 NEXT_FCNTL_H=$gl_cv_next_fcntl_h
17997
17998 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17999 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18000 gl_next_as_first_directive='<'fcntl.h'>'
18001 else
18002 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18003 gl_next_as_first_directive=$gl_cv_next_fcntl_h
18004 fi
18005 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
18006
18007
18008
18009
18010
18011
18012
18013
18014
18015
18016 for gl_func in fcntl openat; do
18017 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
18018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
18019 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
18020 if eval \${$as_gl_Symbol+:} false; then :
18021 $as_echo_n "(cached) " >&6
18022 else
18023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18024 /* end confdefs.h. */
18025 #include <fcntl.h>
18026
18027 int
18028 main ()
18029 {
18030 #undef $gl_func
18031 (void) $gl_func;
18032 ;
18033 return 0;
18034 }
18035 _ACEOF
18036 if ac_fn_c_try_compile "$LINENO"; then :
18037 eval "$as_gl_Symbol=yes"
18038 else
18039 eval "$as_gl_Symbol=no"
18040 fi
18041 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18042 fi
18043 eval ac_res=\$$as_gl_Symbol
18044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18045 $as_echo "$ac_res" >&6; }
18046 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
18047 cat >>confdefs.h <<_ACEOF
18048 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
18049 _ACEOF
18050
18051 eval ac_cv_have_decl_$gl_func=yes
18052 fi
18053 done
18054
18055
18056
18057
18058
18059
18060
18061 ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
18062 #include <dirent.h>
18063
18064 "
18065 if test "x$ac_cv_have_decl_fdopendir" = xyes; then :
18066 ac_have_decl=1
18067 else
18068 ac_have_decl=0
18069 fi
18070
18071 cat >>confdefs.h <<_ACEOF
18072 #define HAVE_DECL_FDOPENDIR $ac_have_decl
18073 _ACEOF
18074 if test $ac_have_decl = 1; then :
18075
18076 else
18077 HAVE_DECL_FDOPENDIR=0
18078 fi
18079
18080
18081 :
18082
18083
18084
18085
18086
18087 if test $ac_cv_func_fdopendir = no; then
18088 HAVE_FDOPENDIR=0
18089 else
18090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
18091 $as_echo_n "checking whether fdopendir works... " >&6; }
18092 if ${gl_cv_func_fdopendir_works+:} false; then :
18093 $as_echo_n "(cached) " >&6
18094 else
18095 if test "$cross_compiling" = yes; then :
18096 case "$host_os" in
18097 # Guess yes on glibc systems.
18098 *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
18099 # If we don't know, assume the worst.
18100 *) gl_cv_func_fdopendir_works="guessing no" ;;
18101 esac
18102
18103 else
18104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18105 /* end confdefs.h. */
18106
18107 #include <dirent.h>
18108 #include <fcntl.h>
18109 #include <unistd.h>
18110 #if !HAVE_DECL_FDOPENDIR
18111 extern
18112 # ifdef __cplusplus
18113 "C"
18114 # endif
18115 DIR *fdopendir (int);
18116 #endif
18117
18118 int
18119 main ()
18120 {
18121 int result = 0;
18122 int fd = open ("conftest.c", O_RDONLY);
18123 if (fd < 0) result |= 1;
18124 if (fdopendir (fd)) result |= 2;
18125 if (close (fd)) result |= 4;
18126 return result;
18127 ;
18128 return 0;
18129 }
18130 _ACEOF
18131 if ac_fn_c_try_run "$LINENO"; then :
18132 gl_cv_func_fdopendir_works=yes
18133 else
18134 gl_cv_func_fdopendir_works=no
18135 fi
18136 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18137 conftest.$ac_objext conftest.beam conftest.$ac_ext
18138 fi
18139
18140 fi
18141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
18142 $as_echo "$gl_cv_func_fdopendir_works" >&6; }
18143 case "$gl_cv_func_fdopendir_works" in
18144 *yes) ;;
18145 *)
18146 REPLACE_FDOPENDIR=1
18147 ;;
18148 esac
18149 fi
18150
18151 if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
18152
18153
18154
18155
18156
18157
18158
18159
18160 gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
18161
18162 fi
18163
18164
18165
18166
18167
18168 GNULIB_FDOPENDIR=1
18169
18170
18171
18172
18173
18174 $as_echo "#define GNULIB_TEST_FDOPENDIR 1" >>confdefs.h
18175
18176
18177
18178
18179
18180 cat >>confdefs.h <<_ACEOF
18181 #define GNULIB_FDOPENDIR 1
18182 _ACEOF
18183
18184
18185
18186
18187 :
18188
18189
18190
18191
18192
18193
18194
18195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
18196 $as_echo_n "checking for flexible array member... " >&6; }
18197 if ${ac_cv_c_flexmember+:} false; then :
18198 $as_echo_n "(cached) " >&6
18199 else
18200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18201 /* end confdefs.h. */
18202 #include <stdlib.h>
18203 #include <stdio.h>
18204 #include <stddef.h>
18205 struct s { int n; double d[]; };
18206 int
18207 main ()
18208 {
18209 int m = getchar ();
18210 size_t nbytes = offsetof (struct s, d) + m * sizeof (double);
18211 nbytes += sizeof (struct s) - 1;
18212 nbytes -= nbytes % sizeof (struct s);
18213 struct s *p = malloc (nbytes);
18214 p->d[0] = 0.0;
18215 return p->d != (double *) NULL;
18216 ;
18217 return 0;
18218 }
18219 _ACEOF
18220 if ac_fn_c_try_compile "$LINENO"; then :
18221 ac_cv_c_flexmember=yes
18222 else
18223 ac_cv_c_flexmember=no
18224 fi
18225 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18226 fi
18227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
18228 $as_echo "$ac_cv_c_flexmember" >&6; }
18229 if test $ac_cv_c_flexmember = yes; then
18230
18231 $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
18232
18233 else
18234 $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
18235
18236 fi
18237
18238
18239
18240
18241 FLOAT_H=
18242 REPLACE_FLOAT_LDBL=0
18243 case "$host_os" in
18244 aix* | beos* | openbsd* | mirbsd* | irix*)
18245 FLOAT_H=float.h
18246 ;;
18247 freebsd*)
18248 case "$host_cpu" in
18249 i[34567]86 )
18250 FLOAT_H=float.h
18251 ;;
18252 x86_64 )
18253 # On x86_64 systems, the C compiler may still be generating
18254 # 32-bit code.
18255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18256 /* end confdefs.h. */
18257 #if defined __LP64__ || defined __x86_64__ || defined __amd64__
18258 yes
18259 #endif
18260 _ACEOF
18261 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18262 $EGREP "yes" >/dev/null 2>&1; then :
18263
18264 else
18265 FLOAT_H=float.h
18266 fi
18267 rm -f conftest*
18268
18269 ;;
18270 esac
18271 ;;
18272 linux*)
18273 case "$host_cpu" in
18274 powerpc*)
18275 FLOAT_H=float.h
18276 ;;
18277 esac
18278 ;;
18279 esac
18280 case "$host_os" in
18281 aix* | freebsd* | linux*)
18282 if test -n "$FLOAT_H"; then
18283 REPLACE_FLOAT_LDBL=1
18284 fi
18285 ;;
18286 esac
18287
18288 REPLACE_ITOLD=0
18289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
18290 $as_echo_n "checking whether conversion from 'int' to 'long double' works... " >&6; }
18291 if ${gl_cv_func_itold_works+:} false; then :
18292 $as_echo_n "(cached) " >&6
18293 else
18294
18295 if test "$cross_compiling" = yes; then :
18296 case "$host" in
18297 sparc*-*-linux*)
18298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18299 /* end confdefs.h. */
18300 #if defined __LP64__ || defined __arch64__
18301 yes
18302 #endif
18303 _ACEOF
18304 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18305 $EGREP "yes" >/dev/null 2>&1; then :
18306 gl_cv_func_itold_works="guessing no"
18307 else
18308 gl_cv_func_itold_works="guessing yes"
18309 fi
18310 rm -f conftest*
18311
18312 ;;
18313 *) gl_cv_func_itold_works="guessing yes" ;;
18314 esac
18315
18316 else
18317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18318 /* end confdefs.h. */
18319
18320 int i = -1;
18321 volatile long double ld;
18322 int main ()
18323 {
18324 ld += i * 1.0L;
18325 if (ld > 0)
18326 return 1;
18327 return 0;
18328 }
18329 _ACEOF
18330 if ac_fn_c_try_run "$LINENO"; then :
18331 gl_cv_func_itold_works=yes
18332 else
18333 gl_cv_func_itold_works=no
18334 fi
18335 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18336 conftest.$ac_objext conftest.beam conftest.$ac_ext
18337 fi
18338
18339
18340 fi
18341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
18342 $as_echo "$gl_cv_func_itold_works" >&6; }
18343 case "$gl_cv_func_itold_works" in
18344 *no)
18345 REPLACE_ITOLD=1
18346 FLOAT_H=float.h
18347 ;;
18348 esac
18349
18350 if test -n "$FLOAT_H"; then
18351
18352
18353
18354
18355
18356
18357
18358
18359 if test $gl_cv_have_include_next = yes; then
18360 gl_cv_next_float_h='<'float.h'>'
18361 else
18362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
18363 $as_echo_n "checking absolute name of <float.h>... " >&6; }
18364 if ${gl_cv_next_float_h+:} false; then :
18365 $as_echo_n "(cached) " >&6
18366 else
18367
18368
18369
18370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18371 /* end confdefs.h. */
18372 #include <float.h>
18373 _ACEOF
18374 case "$host_os" in
18375 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18376 *) gl_absname_cpp="$ac_cpp" ;;
18377 esac
18378
18379 case "$host_os" in
18380 mingw*)
18381 gl_dirsep_regex='[/\\]'
18382 ;;
18383 *)
18384 gl_dirsep_regex='\/'
18385 ;;
18386 esac
18387 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18388 gl_header_literal_regex=`echo 'float.h' \
18389 | sed -e "$gl_make_literal_regex_sed"`
18390 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18391 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18392 s|^/[^/]|//&|
18393 p
18394 q
18395 }'
18396
18397 gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18398 sed -n "$gl_absolute_header_sed"`
18399
18400 gl_header=$gl_cv_absolute_float_h
18401 gl_cv_next_float_h='"'$gl_header'"'
18402
18403
18404 fi
18405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
18406 $as_echo "$gl_cv_next_float_h" >&6; }
18407 fi
18408 NEXT_FLOAT_H=$gl_cv_next_float_h
18409
18410 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18411 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18412 gl_next_as_first_directive='<'float.h'>'
18413 else
18414 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18415 gl_next_as_first_directive=$gl_cv_next_float_h
18416 fi
18417 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
18418
18419
18420
18421
18422 fi
18423
18424 if test -n "$FLOAT_H"; then
18425 GL_GENERATE_FLOAT_H_TRUE=
18426 GL_GENERATE_FLOAT_H_FALSE='#'
18427 else
18428 GL_GENERATE_FLOAT_H_TRUE='#'
18429 GL_GENERATE_FLOAT_H_FALSE=
18430 fi
18431
18432
18433
18434 if test $REPLACE_FLOAT_LDBL = 1; then
18435
18436
18437
18438
18439
18440
18441
18442
18443 gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
18444
18445 fi
18446 if test $REPLACE_ITOLD = 1; then
18447
18448
18449
18450
18451
18452
18453
18454
18455 gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
18456
18457 fi
18458
18459
18460
18461
18462
18463 FNMATCH_H=
18464 gl_fnmatch_required_lowercase=`
18465 echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]'
18466 `
18467 gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}"
18468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5
18469 $as_echo_n "checking for working $gl_fnmatch_required fnmatch... " >&6; }
18470 if eval \${$gl_fnmatch_cache_var+:} false; then :
18471 $as_echo_n "(cached) " >&6
18472 else
18473 if test $gl_fnmatch_required = GNU; then
18474 gl_fnmatch_gnu_start=
18475 gl_fnmatch_gnu_end=
18476 else
18477 gl_fnmatch_gnu_start='#if 0'
18478 gl_fnmatch_gnu_end='#endif'
18479 fi
18480 if test "$cross_compiling" = yes; then :
18481 eval "$gl_fnmatch_cache_var=\"guessing no\""
18482 else
18483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18484 /* end confdefs.h. */
18485 #include <fnmatch.h>
18486 static int
18487 y (char const *pattern, char const *string, int flags)
18488 {
18489 return fnmatch (pattern, string, flags) == 0;
18490 }
18491 static int
18492 n (char const *pattern, char const *string, int flags)
18493 {
18494 return fnmatch (pattern, string, flags) == FNM_NOMATCH;
18495 }
18496
18497 int
18498 main ()
18499 {
18500 char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]";
18501 char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]";
18502 static char const A_1[] = { 'A' - 1, 0 };
18503 static char const A01[] = { 'A' + 1, 0 };
18504 static char const a_1[] = { 'a' - 1, 0 };
18505 static char const a01[] = { 'a' + 1, 0 };
18506 static char const bs_1[] = { '\\\\' - 1, 0 };
18507 static char const bs01[] = { '\\\\' + 1, 0 };
18508 int result = 0;
18509 if (!n ("a*", "", 0))
18510 return 1;
18511 if (!y ("a*", "abc", 0))
18512 return 1;
18513 if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */
18514 return 1;
18515 if (!n ("d*/*1", "d/s/1", FNM_PATHNAME))
18516 return 2;
18517 if (!y ("a\\\\bc", "abc", 0))
18518 return 3;
18519 if (!n ("a\\\\bc", "abc", FNM_NOESCAPE))
18520 return 3;
18521 if (!y ("*x", ".x", 0))
18522 return 4;
18523 if (!n ("*x", ".x", FNM_PERIOD))
18524 return 4;
18525 if (!y (Apat, "\\\\", 0))
18526 return 5;
18527 if (!y (Apat, "A", 0))
18528 return 5;
18529 if (!y (apat, "\\\\", 0))
18530 return 5;
18531 if (!y (apat, "a", 0))
18532 return 5;
18533 if (!(n (Apat, A_1, 0) == ('A' < '\\\\')))
18534 return 5;
18535 if (!(n (apat, a_1, 0) == ('a' < '\\\\')))
18536 return 5;
18537 if (!(y (Apat, A01, 0) == ('A' < '\\\\')))
18538 return 5;
18539 if (!(y (apat, a01, 0) == ('a' < '\\\\')))
18540 return 5;
18541 if (!(y (Apat, bs_1, 0) == ('A' < '\\\\')))
18542 return 5;
18543 if (!(y (apat, bs_1, 0) == ('a' < '\\\\')))
18544 return 5;
18545 if (!(n (Apat, bs01, 0) == ('A' < '\\\\')))
18546 return 5;
18547 if (!(n (apat, bs01, 0) == ('a' < '\\\\')))
18548 return 5;
18549 $gl_fnmatch_gnu_start
18550 if (!y ("xxXX", "xXxX", FNM_CASEFOLD))
18551 result |= 8;
18552 if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH))
18553 result |= 16;
18554 if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME))
18555 result |= 32;
18556 if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR))
18557 result |= 64;
18558 if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR))
18559 result |= 64;
18560 if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR))
18561 result |= 64;
18562 $gl_fnmatch_gnu_end
18563 return result;
18564
18565 ;
18566 return 0;
18567 }
18568 _ACEOF
18569 if ac_fn_c_try_run "$LINENO"; then :
18570 eval "$gl_fnmatch_cache_var=yes"
18571 else
18572 eval "$gl_fnmatch_cache_var=no"
18573 fi
18574 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18575 conftest.$ac_objext conftest.beam conftest.$ac_ext
18576 fi
18577
18578
18579 fi
18580 eval ac_res=\$$gl_fnmatch_cache_var
18581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18582 $as_echo "$ac_res" >&6; }
18583 eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\""
18584 if test "$gl_fnmatch_result" = yes; then
18585 rm -f "$gl_source_base/fnmatch.h"
18586 else
18587 FNMATCH_H=fnmatch.h
18588 fi
18589
18590 if test -n "$FNMATCH_H"; then
18591 GL_GENERATE_FNMATCH_H_TRUE=
18592 GL_GENERATE_FNMATCH_H_FALSE='#'
18593 else
18594 GL_GENERATE_FNMATCH_H_TRUE='#'
18595 GL_GENERATE_FNMATCH_H_FALSE=
18596 fi
18597
18598
18599 if test -n "$FNMATCH_H"; then
18600
18601
18602
18603
18604
18605
18606
18607
18608 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
18609
18610
18611
18612 cat >>confdefs.h <<_ACEOF
18613 #define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
18614 _ACEOF
18615
18616
18617 ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
18618 "
18619 if test "x$ac_cv_have_decl_isblank" = xyes; then :
18620 ac_have_decl=1
18621 else
18622 ac_have_decl=0
18623 fi
18624
18625 cat >>confdefs.h <<_ACEOF
18626 #define HAVE_DECL_ISBLANK $ac_have_decl
18627 _ACEOF
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
18663
18664
18665 fi
18666
18667
18668
18669
18670
18671 if test -n "$FNMATCH_H"; then
18672
18673
18674
18675
18676
18677
18678
18679
18680 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
18681
18682
18683
18684 cat >>confdefs.h <<_ACEOF
18685 #define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
18686 _ACEOF
18687
18688
18689 ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
18690 "
18691 if test "x$ac_cv_have_decl_isblank" = xyes; then :
18692 ac_have_decl=1
18693 else
18694 ac_have_decl=0
18695 fi
18696
18697 cat >>confdefs.h <<_ACEOF
18698 #define HAVE_DECL_ISBLANK $ac_have_decl
18699 _ACEOF
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
18735
18736
18737 fi
18738
18739
18740
18741 FREXP_LIBM=
18742 if test $gl_cv_func_frexp_no_libm = no; then
18743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used with libm" >&5
18744 $as_echo_n "checking whether frexp() can be used with libm... " >&6; }
18745 if ${gl_cv_func_frexp_in_libm+:} false; then :
18746 $as_echo_n "(cached) " >&6
18747 else
18748
18749 save_LIBS="$LIBS"
18750 LIBS="$LIBS -lm"
18751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18752 /* end confdefs.h. */
18753 #include <math.h>
18754 double x;
18755 int
18756 main ()
18757 {
18758 int e; return frexp (x, &e) > 0;
18759 ;
18760 return 0;
18761 }
18762 _ACEOF
18763 if ac_fn_c_try_link "$LINENO"; then :
18764 gl_cv_func_frexp_in_libm=yes
18765 else
18766 gl_cv_func_frexp_in_libm=no
18767 fi
18768 rm -f core conftest.err conftest.$ac_objext \
18769 conftest$ac_exeext conftest.$ac_ext
18770 LIBS="$save_LIBS"
18771
18772 fi
18773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_in_libm" >&5
18774 $as_echo "$gl_cv_func_frexp_in_libm" >&6; }
18775 if test $gl_cv_func_frexp_in_libm = yes; then
18776 FREXP_LIBM=-lm
18777 fi
18778 fi
18779 if test $gl_cv_func_frexp_no_libm = yes \
18780 || test $gl_cv_func_frexp_in_libm = yes; then
18781 save_LIBS="$LIBS"
18782 LIBS="$LIBS $FREXP_LIBM"
18783
18784
18785
18786 :
18787
18788
18789
18790
18791
18792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
18793 $as_echo_n "checking whether frexp works... " >&6; }
18794 if ${gl_cv_func_frexp_works+:} false; then :
18795 $as_echo_n "(cached) " >&6
18796 else
18797
18798 if test "$cross_compiling" = yes; then :
18799 case "$host_os" in
18800 netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";;
18801 *) gl_cv_func_frexp_works="guessing yes";;
18802 esac
18803
18804 else
18805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18806 /* end confdefs.h. */
18807
18808 #include <float.h>
18809 #include <math.h>
18810 #include <string.h>
18811 #if HAVE_DECL_ALARM
18812 # include <signal.h>
18813 # include <unistd.h>
18814 #endif
18815 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
18816 ICC 10.0 has a bug when optimizing the expression -zero.
18817 The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
18818 to PowerPC on Mac OS X 10.5. */
18819 #if defined __hpux || defined __sgi || defined __ICC
18820 static double
18821 compute_minus_zero (void)
18822 {
18823 return -DBL_MIN * DBL_MIN;
18824 }
18825 # define minus_zero compute_minus_zero ()
18826 #else
18827 double minus_zero = -0.0;
18828 #endif
18829 int main()
18830 {
18831 int result = 0;
18832 int i;
18833 volatile double x;
18834 double zero = 0.0;
18835 #if HAVE_DECL_ALARM
18836 /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
18837 number. Let the test fail in this case. */
18838 signal (SIGALRM, SIG_DFL);
18839 alarm (5);
18840 #endif
18841 /* Test on denormalized numbers. */
18842 for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
18843 ;
18844 if (x > 0.0)
18845 {
18846 int exp;
18847 double y = frexp (x, &exp);
18848 /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
18849 On NetBSD: y = 0.75. Correct: y = 0.5. */
18850 if (y != 0.5)
18851 result |= 1;
18852 }
18853 /* Test on infinite numbers. */
18854 x = 1.0 / zero;
18855 {
18856 int exp;
18857 double y = frexp (x, &exp);
18858 if (y != x)
18859 result |= 2;
18860 }
18861 /* Test on negative zero. */
18862 x = minus_zero;
18863 {
18864 int exp;
18865 double y = frexp (x, &exp);
18866 if (memcmp (&y, &x, sizeof x))
18867 result |= 4;
18868 }
18869 return result;
18870 }
18871 _ACEOF
18872 if ac_fn_c_try_run "$LINENO"; then :
18873 gl_cv_func_frexp_works=yes
18874 else
18875 gl_cv_func_frexp_works=no
18876 fi
18877 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18878 conftest.$ac_objext conftest.beam conftest.$ac_ext
18879 fi
18880
18881
18882 fi
18883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
18884 $as_echo "$gl_cv_func_frexp_works" >&6; }
18885
18886 LIBS="$save_LIBS"
18887 case "$gl_cv_func_frexp_works" in
18888 *yes) gl_func_frexp=yes ;;
18889 *) gl_func_frexp=no; REPLACE_FREXP=1; FREXP_LIBM= ;;
18890 esac
18891 else
18892 gl_func_frexp=no
18893 fi
18894 if test $gl_func_frexp = yes; then
18895
18896 $as_echo "#define HAVE_FREXP 1" >>confdefs.h
18897
18898 fi
18899
18900
18901 if test $gl_func_frexp != yes; then
18902
18903
18904
18905
18906
18907
18908
18909
18910 gl_LIBOBJS="$gl_LIBOBJS frexp.$ac_objext"
18911
18912 fi
18913
18914
18915
18916
18917
18918 GNULIB_FREXP=1
18919
18920
18921
18922
18923
18924 $as_echo "#define GNULIB_TEST_FREXP 1" >>confdefs.h
18925
18926
18927
18928
18929
18930
18931
18932
18933
18934 ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
18935 "
18936 if test "x$ac_cv_have_decl_frexpl" = xyes; then :
18937
18938 else
18939 HAVE_DECL_FREXPL=0
18940 fi
18941
18942
18943 FREXPL_LIBM=
18944 if test $HAVE_DECL_FREXPL = 1; then
18945
18946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
18947 $as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; }
18948 if ${gl_cv_func_frexpl_no_libm+:} false; then :
18949 $as_echo_n "(cached) " >&6
18950 else
18951
18952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18953 /* end confdefs.h. */
18954 #include <math.h>
18955 long double x;
18956 int
18957 main ()
18958 {
18959 int e; return frexpl (x, &e) > 0;
18960 ;
18961 return 0;
18962 }
18963 _ACEOF
18964 if ac_fn_c_try_link "$LINENO"; then :
18965 gl_cv_func_frexpl_no_libm=yes
18966 else
18967 gl_cv_func_frexpl_no_libm=no
18968 fi
18969 rm -f core conftest.err conftest.$ac_objext \
18970 conftest$ac_exeext conftest.$ac_ext
18971
18972 fi
18973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
18974 $as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
18975
18976 if test $gl_cv_func_frexpl_no_libm = no; then
18977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used with libm" >&5
18978 $as_echo_n "checking whether frexpl() can be used with libm... " >&6; }
18979 if ${gl_cv_func_frexpl_in_libm+:} false; then :
18980 $as_echo_n "(cached) " >&6
18981 else
18982
18983 save_LIBS="$LIBS"
18984 LIBS="$LIBS -lm"
18985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18986 /* end confdefs.h. */
18987 #include <math.h>
18988 long double x;
18989 int
18990 main ()
18991 {
18992 int e; return frexpl (x, &e) > 0;
18993 ;
18994 return 0;
18995 }
18996 _ACEOF
18997 if ac_fn_c_try_link "$LINENO"; then :
18998 gl_cv_func_frexpl_in_libm=yes
18999 else
19000 gl_cv_func_frexpl_in_libm=no
19001 fi
19002 rm -f core conftest.err conftest.$ac_objext \
19003 conftest$ac_exeext conftest.$ac_ext
19004 LIBS="$save_LIBS"
19005
19006 fi
19007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_in_libm" >&5
19008 $as_echo "$gl_cv_func_frexpl_in_libm" >&6; }
19009 if test $gl_cv_func_frexpl_in_libm = yes; then
19010 FREXPL_LIBM=-lm
19011 fi
19012 fi
19013 if test $gl_cv_func_frexpl_no_libm = yes \
19014 || test $gl_cv_func_frexpl_in_libm = yes; then
19015 save_LIBS="$LIBS"
19016 LIBS="$LIBS $FREXPL_LIBM"
19017
19018
19019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
19020 $as_echo_n "checking whether frexpl works... " >&6; }
19021 if ${gl_cv_func_frexpl_works+:} false; then :
19022 $as_echo_n "(cached) " >&6
19023 else
19024
19025 if test "$cross_compiling" = yes; then :
19026
19027 case "$host_os" in
19028 aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
19029 gl_cv_func_frexpl_works="guessing no";;
19030 *) gl_cv_func_frexpl_works="guessing yes";;
19031 esac
19032
19033 else
19034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19035 /* end confdefs.h. */
19036
19037 #include <float.h>
19038 #include <math.h>
19039 /* Override the values of <float.h>, like done in float.in.h. */
19040 #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
19041 # undef LDBL_MIN_EXP
19042 # define LDBL_MIN_EXP (-16381)
19043 #endif
19044 #if defined __i386__ && defined __FreeBSD__
19045 # undef LDBL_MIN_EXP
19046 # define LDBL_MIN_EXP (-16381)
19047 #endif
19048 #if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
19049 # undef LDBL_MIN_EXP
19050 # define LDBL_MIN_EXP DBL_MIN_EXP
19051 #endif
19052 #if defined __sgi && (LDBL_MANT_DIG >= 106)
19053 # if defined __GNUC__
19054 # undef LDBL_MIN_EXP
19055 # define LDBL_MIN_EXP DBL_MIN_EXP
19056 # endif
19057 #endif
19058 extern
19059 #ifdef __cplusplus
19060 "C"
19061 #endif
19062 long double frexpl (long double, int *);
19063 int main()
19064 {
19065 int result = 0;
19066 volatile long double x;
19067 /* Test on finite numbers that fails on AIX 5.1. */
19068 x = 16.0L;
19069 {
19070 int exp = -9999;
19071 frexpl (x, &exp);
19072 if (exp != 5)
19073 result |= 1;
19074 }
19075 /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
19076 function returns an invalid (incorrectly normalized) value: it returns
19077 y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
19078 but the correct result is
19079 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */
19080 x = 1.01L;
19081 {
19082 int exp = -9999;
19083 long double y = frexpl (x, &exp);
19084 if (!(exp == 1 && y == 0.505L))
19085 result |= 2;
19086 }
19087 /* Test on large finite numbers. This fails on BeOS at i = 16322, while
19088 LDBL_MAX_EXP = 16384.
19089 In the loop end test, we test x against Infinity, rather than comparing
19090 i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */
19091 {
19092 int i;
19093 for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
19094 {
19095 int exp = -9999;
19096 frexpl (x, &exp);
19097 if (exp != i)
19098 {
19099 result |= 4;
19100 break;
19101 }
19102 }
19103 }
19104 /* Test on denormalized numbers. */
19105 {
19106 int i;
19107 for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
19108 ;
19109 if (x > 0.0L)
19110 {
19111 int exp;
19112 long double y = frexpl (x, &exp);
19113 /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
19114 exp = -16382, y = 0.5. On Mac OS X 10.5: exp = -16384, y = 0.5. */
19115 if (exp != LDBL_MIN_EXP - 1)
19116 result |= 8;
19117 }
19118 }
19119 /* Test on infinite numbers. */
19120 x = 1.0L / 0.0L;
19121 {
19122 int exp;
19123 long double y = frexpl (x, &exp);
19124 if (y != x)
19125 result |= 16;
19126 }
19127 return result;
19128 }
19129 _ACEOF
19130 if ac_fn_c_try_run "$LINENO"; then :
19131 gl_cv_func_frexpl_works=yes
19132 else
19133 gl_cv_func_frexpl_works=no
19134 fi
19135 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19136 conftest.$ac_objext conftest.beam conftest.$ac_ext
19137 fi
19138
19139
19140 fi
19141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
19142 $as_echo "$gl_cv_func_frexpl_works" >&6; }
19143
19144 LIBS="$save_LIBS"
19145 case "$gl_cv_func_frexpl_works" in
19146 *yes) gl_func_frexpl=yes ;;
19147 *) gl_func_frexpl=no; REPLACE_FREXPL=1 ;;
19148 esac
19149 else
19150 gl_func_frexpl=no
19151 fi
19152 if test $gl_func_frexpl = yes; then
19153
19154 $as_echo "#define HAVE_FREXPL 1" >>confdefs.h
19155
19156 fi
19157 fi
19158 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
19159 if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then
19160
19161 FREXPL_LIBM="$FREXP_LIBM"
19162 else
19163 FREXPL_LIBM=
19164 fi
19165 fi
19166
19167
19168 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
19169
19170
19171
19172
19173
19174
19175
19176
19177 gl_LIBOBJS="$gl_LIBOBJS frexpl.$ac_objext"
19178
19179 fi
19180
19181
19182
19183
19184
19185 GNULIB_FREXPL=1
19186
19187
19188
19189
19190
19191 $as_echo "#define GNULIB_TEST_FREXPL 1" >>confdefs.h
19192
19193
19194
19195
19196
19197
19198
19199 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
19200 REPLACE_FSTAT=1
19201 fi
19202
19203
19204 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
19205 REPLACE_FSTAT=1
19206 fi
19207
19208
19209
19210
19211
19212 :
19213
19214
19215
19216
19217
19218 if test $ac_cv_func_fchdir = no; then
19219 HAVE_FCHDIR=0
19220 fi
19221
19222 if test $HAVE_FCHDIR = 0; then
19223 case "$gl_cv_func_open_directory_works" in
19224 *yes) ;;
19225 *)
19226 REPLACE_FSTAT=1
19227 ;;
19228 esac
19229 fi
19230
19231
19232 if test $REPLACE_FSTAT = 1; then
19233
19234
19235
19236
19237
19238
19239
19240
19241 gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
19242
19243 :
19244 fi
19245
19246
19247
19248
19249
19250 GNULIB_FSTAT=1
19251
19252
19253
19254
19255
19256 $as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
19257
19258
19259
19260
19261
19262
19263
19264
19265 :
19266
19267
19268
19269
19270
19271
19272 if test $ac_cv_func_fstatat = no; then
19273 HAVE_FSTATAT=0
19274 else
19275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
19276 $as_echo_n "checking whether fstatat (..., 0) works... " >&6; }
19277 if ${gl_cv_func_fstatat_zero_flag+:} false; then :
19278 $as_echo_n "(cached) " >&6
19279 else
19280 if test "$cross_compiling" = yes; then :
19281 case "$host_os" in
19282 aix*) gl_cv_func_fstatat_zero_flag="guessing no";;
19283 *) gl_cv_func_fstatat_zero_flag="guessing yes";;
19284 esac
19285
19286 else
19287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19288 /* end confdefs.h. */
19289
19290 #include <fcntl.h>
19291 #include <sys/stat.h>
19292 int
19293 main (void)
19294 {
19295 struct stat a;
19296 return fstatat (AT_FDCWD, ".", &a, 0) != 0;
19297 }
19298
19299 _ACEOF
19300 if ac_fn_c_try_run "$LINENO"; then :
19301 gl_cv_func_fstatat_zero_flag=yes
19302 else
19303 gl_cv_func_fstatat_zero_flag=no
19304 fi
19305 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19306 conftest.$ac_objext conftest.beam conftest.$ac_ext
19307 fi
19308
19309
19310 fi
19311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
19312 $as_echo "$gl_cv_func_fstatat_zero_flag" >&6; }
19313
19314 case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
19315 *yes+*yes) ;;
19316 *) REPLACE_FSTATAT=1
19317 case $gl_cv_func_fstatat_zero_flag in
19318 *yes)
19319
19320 $as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
19321
19322 ;;
19323 esac
19324 ;;
19325 esac
19326 fi
19327
19328 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
19329
19330
19331
19332
19333
19334
19335
19336
19337 gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
19338
19339 fi
19340
19341
19342
19343
19344
19345 GNULIB_FSTATAT=1
19346
19347
19348
19349
19350
19351 $as_echo "#define GNULIB_TEST_FSTATAT 1" >>confdefs.h
19352
19353
19354
19355
19356
19357
19358
19359
19360 gl_abort_bug=no
19361 case "$host_os" in
19362 mingw*)
19363 gl_cv_func_getcwd_path_max=yes
19364 ;;
19365 *)
19366
19367
19368 :
19369
19370
19371
19372
19373
19374
19375
19376 :
19377
19378
19379
19380
19381
19382
19383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd handles long file names properly" >&5
19384 $as_echo_n "checking whether getcwd handles long file names properly... " >&6; }
19385 if ${gl_cv_func_getcwd_path_max+:} false; then :
19386 $as_echo_n "(cached) " >&6
19387 else
19388 # Arrange for deletion of the temporary directory this test creates.
19389 ac_clean_files="$ac_clean_files confdir3"
19390 if test "$cross_compiling" = yes; then :
19391 # Cross-compilation guesses:
19392 case "$host_os" in
19393 aix*) # On AIX, it has the AIX bug.
19394 gl_cv_func_getcwd_path_max='no, it has the AIX bug' ;;
19395 gnu*) # On Hurd, it is 'yes'.
19396 gl_cv_func_getcwd_path_max=yes ;;
19397 linux* | kfreebsd*)
19398 # On older Linux+glibc it's 'no, but it is partly working',
19399 # on newer Linux+glibc it's 'yes'.
19400 # On Linux+musl libc, it's 'no, but it is partly working'.
19401 # On kFreeBSD+glibc, it's 'no, but it is partly working'.
19402 gl_cv_func_getcwd_path_max='no, but it is partly working' ;;
19403 *) # If we don't know, assume the worst.
19404 gl_cv_func_getcwd_path_max=no ;;
19405 esac
19406
19407 else
19408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19409 /* end confdefs.h. */
19410
19411 #include <errno.h>
19412 #include <stdlib.h>
19413 #if HAVE_UNISTD_H
19414 # include <unistd.h>
19415 #else
19416 # include <direct.h>
19417 #endif
19418 #include <string.h>
19419 #include <limits.h>
19420 #include <sys/stat.h>
19421 #include <sys/types.h>
19422 #include <fcntl.h>
19423
19424
19425 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
19426 #if HAVE_UNISTD_H
19427 # include <unistd.h>
19428 #endif
19429 #include <limits.h>
19430 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
19431 # include <sys/param.h>
19432 #endif
19433 #if !defined PATH_MAX && defined MAXPATHLEN
19434 # define PATH_MAX MAXPATHLEN
19435 #endif
19436 #ifdef __hpux
19437 # undef PATH_MAX
19438 # define PATH_MAX 1024
19439 #endif
19440 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
19441 # undef PATH_MAX
19442 # define PATH_MAX 260
19443 #endif
19444
19445
19446 #ifndef AT_FDCWD
19447 # define AT_FDCWD 0
19448 #endif
19449 #ifdef ENAMETOOLONG
19450 # define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG)
19451 #else
19452 # define is_ENAMETOOLONG(x) 0
19453 #endif
19454
19455 /* Use the getcwd function, not any macro. */
19456 #undef getcwd
19457
19458 /* Don't get link errors because mkdir is redefined to rpl_mkdir. */
19459 #undef mkdir
19460
19461 #ifndef S_IRWXU
19462 # define S_IRWXU 0700
19463 #endif
19464
19465 /* The length of this name must be 8. */
19466 #define DIR_NAME "confdir3"
19467 #define DIR_NAME_LEN 8
19468 #define DIR_NAME_SIZE (DIR_NAME_LEN + 1)
19469
19470 /* The length of "../". */
19471 #define DOTDOTSLASH_LEN 3
19472
19473 /* Leftover bytes in the buffer, to work around library or OS bugs. */
19474 #define BUF_SLOP 20
19475
19476 int
19477 main ()
19478 {
19479 #ifndef PATH_MAX
19480 /* The Hurd doesn't define this, so getcwd can't exhibit the bug --
19481 at least not on a local file system. And if we were to start worrying
19482 about remote file systems, we'd have to enable the wrapper function
19483 all of the time, just to be safe. That's not worth the cost. */
19484 exit (0);
19485 #elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \
19486 - DIR_NAME_SIZE - BUF_SLOP) \
19487 <= PATH_MAX)
19488 /* FIXME: Assuming there's a system for which this is true,
19489 this should be done in a compile test. */
19490 exit (0);
19491 #else
19492 char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1)
19493 + DIR_NAME_SIZE + BUF_SLOP];
19494 char *cwd = getcwd (buf, PATH_MAX);
19495 size_t initial_cwd_len;
19496 size_t cwd_len;
19497 int fail = 0;
19498 size_t n_chdirs = 0;
19499
19500 if (cwd == NULL)
19501 exit (10);
19502
19503 cwd_len = initial_cwd_len = strlen (cwd);
19504
19505 while (1)
19506 {
19507 size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN);
19508 char *c = NULL;
19509
19510 cwd_len += DIR_NAME_SIZE;
19511 /* If mkdir or chdir fails, it could be that this system cannot create
19512 any file with an absolute name longer than PATH_MAX, such as cygwin.
19513 If so, leave fail as 0, because the current working directory can't
19514 be too long for getcwd if it can't even be created. For other
19515 errors, be pessimistic and consider that as a failure, too. */
19516 if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0)
19517 {
19518 if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
19519 fail = 20;
19520 break;
19521 }
19522
19523 if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE)
19524 {
19525 struct stat sb;
19526
19527 c = getcwd (buf, PATH_MAX);
19528 if (!c && errno == ENOENT)
19529 {
19530 fail = 11;
19531 break;
19532 }
19533 if (c)
19534 {
19535 fail = 31;
19536 break;
19537 }
19538 if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
19539 {
19540 fail = 21;
19541 break;
19542 }
19543
19544 /* Our replacement needs to be able to stat() long ../../paths,
19545 so generate a path larger than PATH_MAX to check,
19546 avoiding the replacement if we can't stat(). */
19547 c = getcwd (buf, cwd_len + 1);
19548 if (c && !AT_FDCWD && stat (c, &sb) != 0 && is_ENAMETOOLONG (errno))
19549 {
19550 fail = 32;
19551 break;
19552 }
19553 }
19554
19555 if (dotdot_max <= cwd_len - initial_cwd_len)
19556 {
19557 if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len)
19558 break;
19559 c = getcwd (buf, cwd_len + 1);
19560 if (!c)
19561 {
19562 if (! (errno == ERANGE || errno == ENOENT
19563 || is_ENAMETOOLONG (errno)))
19564 {
19565 fail = 22;
19566 break;
19567 }
19568 if (AT_FDCWD || errno == ERANGE || errno == ENOENT)
19569 {
19570 fail = 12;
19571 break;
19572 }
19573 }
19574 }
19575
19576 if (c && strlen (c) != cwd_len)
19577 {
19578 fail = 23;
19579 break;
19580 }
19581 ++n_chdirs;
19582 }
19583
19584 /* Leaving behind such a deep directory is not polite.
19585 So clean up here, right away, even though the driving
19586 shell script would also clean up. */
19587 {
19588 size_t i;
19589
19590 /* Try rmdir first, in case the chdir failed. */
19591 rmdir (DIR_NAME);
19592 for (i = 0; i <= n_chdirs; i++)
19593 {
19594 if (chdir ("..") < 0)
19595 break;
19596 if (rmdir (DIR_NAME) != 0)
19597 break;
19598 }
19599 }
19600
19601 exit (fail);
19602 #endif
19603 }
19604
19605 _ACEOF
19606 if ac_fn_c_try_run "$LINENO"; then :
19607 gl_cv_func_getcwd_path_max=yes
19608 else
19609 case $? in
19610 10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';;
19611 31) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
19612 32) gl_cv_func_getcwd_path_max='yes, but with shorter paths';;
19613 *) gl_cv_func_getcwd_path_max=no;;
19614 esac
19615 fi
19616 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19617 conftest.$ac_objext conftest.beam conftest.$ac_ext
19618 fi
19619
19620
19621 fi
19622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_path_max" >&5
19623 $as_echo "$gl_cv_func_getcwd_path_max" >&6; }
19624
19625 case "$gl_cv_func_getcwd_null" in
19626 *yes)
19627
19628
19629 :
19630
19631
19632
19633
19634
19635
19636 :
19637
19638
19639
19640
19641
19642
19643 for ac_func in getpagesize
19644 do :
19645 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
19646 if test "x$ac_cv_func_getpagesize" = xyes; then :
19647 cat >>confdefs.h <<_ACEOF
19648 #define HAVE_GETPAGESIZE 1
19649 _ACEOF
19650
19651 fi
19652 done
19653
19654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd aborts when 4k < cwd_length < 16k" >&5
19655 $as_echo_n "checking whether getcwd aborts when 4k < cwd_length < 16k... " >&6; }
19656 if ${gl_cv_func_getcwd_abort_bug+:} false; then :
19657 $as_echo_n "(cached) " >&6
19658 else
19659 # Remove any remnants of a previous test.
19660 rm -rf confdir-14B---
19661 # Arrange for deletion of the temporary directory this test creates.
19662 ac_clean_files="$ac_clean_files confdir-14B---"
19663 if test "$cross_compiling" = yes; then :
19664 gl_cv_func_getcwd_abort_bug=yes
19665 else
19666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19667 /* end confdefs.h. */
19668
19669 #include <errno.h>
19670 #include <stdlib.h>
19671 #if HAVE_UNISTD_H
19672 # include <unistd.h>
19673 #else /* on Windows with MSVC */
19674 # include <direct.h>
19675 #endif
19676 #include <string.h>
19677 #include <sys/stat.h>
19678
19679
19680 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
19681 #if HAVE_UNISTD_H
19682 # include <unistd.h>
19683 #endif
19684 #include <limits.h>
19685 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
19686 # include <sys/param.h>
19687 #endif
19688 #if !defined PATH_MAX && defined MAXPATHLEN
19689 # define PATH_MAX MAXPATHLEN
19690 #endif
19691 #ifdef __hpux
19692 # undef PATH_MAX
19693 # define PATH_MAX 1024
19694 #endif
19695 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
19696 # undef PATH_MAX
19697 # define PATH_MAX 260
19698 #endif
19699
19700
19701 /* Don't get link errors because mkdir is redefined to rpl_mkdir. */
19702 #undef mkdir
19703
19704 #ifndef S_IRWXU
19705 # define S_IRWXU 0700
19706 #endif
19707
19708 /* FIXME: skip the run-test altogether on systems without getpagesize. */
19709 #if ! HAVE_GETPAGESIZE
19710 # define getpagesize() 0
19711 #endif
19712
19713 /* This size is chosen to be larger than PATH_MAX (4k), yet smaller than
19714 the 16kB pagesize on ia64 linux. Those conditions make the code below
19715 trigger a bug in glibc's getcwd implementation before 2.4.90-10. */
19716 #define TARGET_LEN (5 * 1024)
19717
19718 int
19719 main ()
19720 {
19721 char *cwd;
19722 size_t initial_cwd_len;
19723 int fail = 0;
19724
19725 /* The bug is triggered when PATH_MAX < getpagesize (), so skip
19726 this relatively expensive and invasive test if that's not true. */
19727 #ifdef PATH_MAX
19728 int bug_possible = PATH_MAX < getpagesize ();
19729 #else
19730 int bug_possible = 0;
19731 #endif
19732 if (! bug_possible)
19733 return 0;
19734
19735 cwd = getcwd (NULL, 0);
19736 if (cwd == NULL)
19737 return 2;
19738
19739 initial_cwd_len = strlen (cwd);
19740 free (cwd);
19741
19742 if (1)
19743 {
19744 static char const dir_name[] = "confdir-14B---";
19745 size_t desired_depth = ((TARGET_LEN - 1 - initial_cwd_len)
19746 / sizeof dir_name);
19747 size_t d;
19748 for (d = 0; d < desired_depth; d++)
19749 {
19750 if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0)
19751 {
19752 if (! (errno == ERANGE || errno == ENAMETOOLONG
19753 || errno == ENOENT))
19754 fail = 3; /* Unable to construct deep hierarchy. */
19755 break;
19756 }
19757 }
19758
19759 /* If libc has the bug in question, this invocation of getcwd
19760 results in a failed assertion. */
19761 cwd = getcwd (NULL, 0);
19762 if (cwd == NULL)
19763 fail = 4; /* getcwd didn't assert, but it failed for a long name
19764 where the answer could have been learned. */
19765 free (cwd);
19766
19767 /* Call rmdir first, in case the above chdir failed. */
19768 rmdir (dir_name);
19769 while (0 < d--)
19770 {
19771 if (chdir ("..") < 0)
19772 {
19773 fail = 5;
19774 break;
19775 }
19776 rmdir (dir_name);
19777 }
19778 }
19779
19780 return fail;
19781 }
19782
19783 _ACEOF
19784 if ac_fn_c_try_run "$LINENO"; then :
19785 gl_cv_func_getcwd_abort_bug=no
19786 else
19787 ret=$?
19788 if test $ret -ge 128 || test $ret = 4; then
19789 gl_cv_func_getcwd_abort_bug=yes
19790 else
19791 gl_cv_func_getcwd_abort_bug=no
19792 fi
19793 fi
19794 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19795 conftest.$ac_objext conftest.beam conftest.$ac_ext
19796 fi
19797
19798
19799 fi
19800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_abort_bug" >&5
19801 $as_echo "$gl_cv_func_getcwd_abort_bug" >&6; }
19802 if test $gl_cv_func_getcwd_abort_bug = yes; then :
19803 gl_abort_bug=yes
19804 fi
19805
19806 ;;
19807 esac
19808 ;;
19809 esac
19810 case "$gl_cv_func_getcwd_path_max" in
19811 "no"|"no, it has the AIX bug") ;;
19812 *)
19813
19814 $as_echo "#define HAVE_MINIMALLY_WORKING_GETCWD 1" >>confdefs.h
19815
19816 ;;
19817 esac
19818 case "$gl_cv_func_getcwd_path_max" in
19819 "no, but it is partly working")
19820
19821 $as_echo "#define HAVE_PARTLY_WORKING_GETCWD 1" >>confdefs.h
19822
19823 ;;
19824 "yes, but with shorter paths")
19825
19826 $as_echo "#define HAVE_GETCWD_SHORTER 1" >>confdefs.h
19827
19828 ;;
19829 esac
19830
19831 if { case "$gl_cv_func_getcwd_null" in *yes) false;; *) true;; esac; } \
19832 || test $gl_cv_func_getcwd_posix_signature != yes \
19833 || { case "$gl_cv_func_getcwd_path_max" in *yes*) false;; *) true;; esac; } \
19834 || test $gl_abort_bug = yes; then
19835 REPLACE_GETCWD=1
19836 fi
19837
19838 if test $REPLACE_GETCWD = 1; then
19839
19840
19841
19842
19843
19844
19845
19846
19847 gl_LIBOBJS="$gl_LIBOBJS getcwd.$ac_objext"
19848
19849
19850
19851
19852 :
19853
19854 fi
19855
19856
19857 cat >>confdefs.h <<_ACEOF
19858 #define GNULIB_GETCWD 1
19859 _ACEOF
19860
19861
19862
19863
19864
19865
19866
19867 GNULIB_GETCWD=1
19868
19869
19870
19871
19872
19873 $as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
19874
19875
19876
19877
19878
19879
19880
19881
19882 case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
19883 *yes,yes) ;;
19884 *)
19885 REPLACE_GETCWD=1
19886 ;;
19887 esac
19888
19889 if test $REPLACE_GETCWD = 1; then
19890
19891
19892
19893
19894
19895
19896
19897
19898 gl_LIBOBJS="$gl_LIBOBJS getcwd-lgpl.$ac_objext"
19899
19900 fi
19901
19902
19903
19904
19905
19906 GNULIB_GETCWD=1
19907
19908
19909
19910
19911
19912 $as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
19913
19914
19915
19916
19917
19918
19919
19920 :
19921
19922
19923
19924
19925
19926
19927 :
19928
19929
19930
19931
19932
19933 if test $ac_cv_func_getdtablesize = yes &&
19934 test $ac_cv_have_decl_getdtablesize = yes; then
19935 # Cygwin 1.7.25 automatically increases the RLIMIT_NOFILE soft limit
19936 # up to an unchangeable hard limit; all other platforms correctly
19937 # require setrlimit before getdtablesize() can report a larger value.
19938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
19939 $as_echo_n "checking whether getdtablesize works... " >&6; }
19940 if ${gl_cv_func_getdtablesize_works+:} false; then :
19941 $as_echo_n "(cached) " >&6
19942 else
19943 if test "$cross_compiling" = yes; then :
19944 case "$host_os" in
19945 cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
19946 gl_cv_func_getdtablesize_works="guessing no" ;;
19947 *) gl_cv_func_getdtablesize_works="guessing yes" ;;
19948 esac
19949 else
19950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19951 /* end confdefs.h. */
19952
19953 #include <unistd.h>
19954 int
19955 main ()
19956 {
19957 int size = getdtablesize();
19958 if (dup2 (0, getdtablesize()) != -1)
19959 return 1;
19960 if (size != getdtablesize())
19961 return 2;
19962
19963 ;
19964 return 0;
19965 }
19966 _ACEOF
19967 if ac_fn_c_try_run "$LINENO"; then :
19968 gl_cv_func_getdtablesize_works=yes
19969 else
19970 gl_cv_func_getdtablesize_works=no
19971 fi
19972 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19973 conftest.$ac_objext conftest.beam conftest.$ac_ext
19974 fi
19975
19976
19977 fi
19978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
19979 $as_echo "$gl_cv_func_getdtablesize_works" >&6; }
19980 case "$gl_cv_func_getdtablesize_works" in
19981 *yes) ;;
19982 *) REPLACE_GETDTABLESIZE=1 ;;
19983 esac
19984 else
19985 HAVE_GETDTABLESIZE=0
19986 fi
19987
19988 if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
19989
19990
19991
19992
19993
19994
19995
19996
19997 gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
19998
19999 :
20000 fi
20001
20002
20003
20004
20005
20006 GNULIB_GETDTABLESIZE=1
20007
20008
20009
20010
20011
20012 $as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
20013
20014
20015
20016
20017
20018
20019
20020
20021
20022 :
20023
20024
20025
20026
20027
20028 if test $ac_cv_have_decl_getlogin_r = no; then
20029 HAVE_DECL_GETLOGIN_R=0
20030 fi
20031
20032
20033 :
20034
20035
20036
20037
20038
20039 if test $ac_cv_func_getlogin_r = no; then
20040 HAVE_GETLOGIN_R=0
20041 else
20042 HAVE_GETLOGIN_R=1
20043
20044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getlogin_r works with small buffers" >&5
20045 $as_echo_n "checking whether getlogin_r works with small buffers... " >&6; }
20046 if ${gl_cv_func_getlogin_r_works+:} false; then :
20047 $as_echo_n "(cached) " >&6
20048 else
20049
20050 case "$host_os" in
20051 # Guess no on OSF/1.
20052 osf*) gl_cv_func_getlogin_r_works="guessing no" ;;
20053 # Guess yes otherwise.
20054 *) gl_cv_func_getlogin_r_works="guessing yes" ;;
20055 esac
20056 if test "$cross_compiling" = yes; then :
20057 :
20058 else
20059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20060 /* end confdefs.h. */
20061
20062 #include <stddef.h>
20063 #include <unistd.h>
20064 #if !HAVE_DECL_GETLOGIN_R
20065 extern
20066 # ifdef __cplusplus
20067 "C"
20068 # endif
20069 int getlogin_r (char *, size_t);
20070 #endif
20071 int
20072 main (void)
20073 {
20074 int result = 0;
20075 char buf[100];
20076
20077 if (getlogin_r (buf, 0) == 0)
20078 result |= 16;
20079 if (getlogin_r (buf, 1) == 0)
20080 result |= 17;
20081 return result;
20082 }
20083 _ACEOF
20084 if ac_fn_c_try_run "$LINENO"; then :
20085 gl_cv_func_getlogin_r_works=yes
20086 else
20087 case $? in
20088 16 | 17) gl_cv_func_getlogin_r_works=no ;;
20089 esac
20090
20091 fi
20092 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20093 conftest.$ac_objext conftest.beam conftest.$ac_ext
20094 fi
20095
20096
20097 fi
20098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getlogin_r_works" >&5
20099 $as_echo "$gl_cv_func_getlogin_r_works" >&6; }
20100 case "$gl_cv_func_getlogin_r_works" in
20101 *yes) ;;
20102 *) REPLACE_GETLOGIN_R=1 ;;
20103 esac
20104 fi
20105
20106 if test $HAVE_GETLOGIN_R = 0 || test $REPLACE_GETLOGIN_R = 1; then
20107
20108
20109
20110
20111
20112
20113
20114
20115 gl_LIBOBJS="$gl_LIBOBJS getlogin_r.$ac_objext"
20116
20117
20118
20119 :
20120
20121
20122
20123
20124
20125
20126 fi
20127
20128
20129
20130
20131
20132 GNULIB_GETLOGIN_R=1
20133
20134
20135
20136
20137
20138 $as_echo "#define GNULIB_TEST_GETLOGIN_R 1" >>confdefs.h
20139
20140
20141
20142
20143
20144 :
20145
20146
20147
20148
20149
20150
20151
20152
20153
20154 ac_found=0
20155 ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
20156 "
20157 if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
20158 ac_have_decl=1
20159 else
20160 ac_have_decl=0
20161 fi
20162
20163 cat >>confdefs.h <<_ACEOF
20164 #define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
20165 _ACEOF
20166 if test $ac_have_decl = 1; then :
20167 ac_found=1
20168 fi
20169
20170 ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
20171 "
20172 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
20173 ac_have_decl=1
20174 else
20175 ac_have_decl=0
20176 fi
20177
20178 cat >>confdefs.h <<_ACEOF
20179 #define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
20180 _ACEOF
20181 if test $ac_have_decl = 1; then :
20182 ac_found=1
20183 fi
20184
20185 ac_fn_c_check_decl "$LINENO" "__argv" "ac_cv_have_decl___argv" "#include <stdlib.h>
20186 "
20187 if test "x$ac_cv_have_decl___argv" = xyes; then :
20188 ac_have_decl=1
20189 else
20190 ac_have_decl=0
20191 fi
20192
20193 cat >>confdefs.h <<_ACEOF
20194 #define HAVE_DECL___ARGV $ac_have_decl
20195 _ACEOF
20196 if test $ac_have_decl = 1; then :
20197 ac_found=1
20198 fi
20199
20200
20201 # Incur the cost of this test only if none of the above worked.
20202 if test $ac_found = 0; then
20203 # On OpenBSD 5.1, using the global __progname variable appears to be
20204 # the only way to implement getprogname.
20205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __progname is defined in default libraries" >&5
20206 $as_echo_n "checking whether __progname is defined in default libraries... " >&6; }
20207 if ${gl_cv_var___progname+:} false; then :
20208 $as_echo_n "(cached) " >&6
20209 else
20210
20211 gl_cv_var___progname=
20212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20213 /* end confdefs.h. */
20214 extern char *__progname;
20215 int
20216 main ()
20217 {
20218 return *__progname;
20219
20220 ;
20221 return 0;
20222 }
20223 _ACEOF
20224 if ac_fn_c_try_link "$LINENO"; then :
20225 gl_cv_var___progname=yes
20226
20227 fi
20228 rm -f core conftest.err conftest.$ac_objext \
20229 conftest$ac_exeext conftest.$ac_ext
20230
20231
20232 fi
20233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var___progname" >&5
20234 $as_echo "$gl_cv_var___progname" >&6; }
20235 if test "$gl_cv_var___progname" = yes; then
20236
20237 $as_echo "#define HAVE_VAR___PROGNAME 1" >>confdefs.h
20238
20239 fi
20240 fi
20241
20242
20243
20244
20245
20246
20247
20248
20249 :
20250
20251
20252
20253
20254
20255
20256 gl_gettimeofday_timezone=void
20257 if test $ac_cv_func_gettimeofday != yes; then
20258 HAVE_GETTIMEOFDAY=0
20259 else
20260
20261
20262
20263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
20264 $as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
20265 if ${gl_cv_func_gettimeofday_clobber+:} false; then :
20266 $as_echo_n "(cached) " >&6
20267 else
20268 if test "$cross_compiling" = yes; then :
20269 # When cross-compiling:
20270 case "$host_os" in
20271 # Guess all is fine on glibc systems.
20272 *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
20273 # If we don't know, assume the worst.
20274 *) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
20275 esac
20276
20277 else
20278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20279 /* end confdefs.h. */
20280 #include <string.h>
20281 #include <sys/time.h>
20282 #include <time.h>
20283 #include <stdlib.h>
20284
20285 int
20286 main ()
20287 {
20288
20289 time_t t = 0;
20290 struct tm *lt;
20291 struct tm saved_lt;
20292 struct timeval tv;
20293 lt = localtime (&t);
20294 saved_lt = *lt;
20295 gettimeofday (&tv, NULL);
20296 return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
20297
20298 ;
20299 return 0;
20300 }
20301 _ACEOF
20302 if ac_fn_c_try_run "$LINENO"; then :
20303 gl_cv_func_gettimeofday_clobber=no
20304 else
20305 gl_cv_func_gettimeofday_clobber=yes
20306 fi
20307 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20308 conftest.$ac_objext conftest.beam conftest.$ac_ext
20309 fi
20310
20311 fi
20312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
20313 $as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
20314
20315 case "$gl_cv_func_gettimeofday_clobber" in
20316 *yes)
20317 REPLACE_GETTIMEOFDAY=1
20318
20319 REPLACE_GMTIME=1
20320 REPLACE_LOCALTIME=1
20321
20322
20323 $as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
20324
20325 ;;
20326 esac
20327
20328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
20329 $as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
20330 if ${gl_cv_func_gettimeofday_posix_signature+:} false; then :
20331 $as_echo_n "(cached) " >&6
20332 else
20333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20334 /* end confdefs.h. */
20335 #include <sys/time.h>
20336 struct timeval c;
20337 int gettimeofday (struct timeval *restrict, void *restrict);
20338
20339 int
20340 main ()
20341 {
20342 /* glibc uses struct timezone * rather than the POSIX void *
20343 if _GNU_SOURCE is defined. However, since the only portable
20344 use of gettimeofday uses NULL as the second parameter, and
20345 since the glibc definition is actually more typesafe, it is
20346 not worth wrapping this to get a compliant signature. */
20347 int (*f) (struct timeval *restrict, void *restrict)
20348 = gettimeofday;
20349 int x = f (&c, 0);
20350 return !(x | c.tv_sec | c.tv_usec);
20351
20352 ;
20353 return 0;
20354 }
20355 _ACEOF
20356 if ac_fn_c_try_compile "$LINENO"; then :
20357 gl_cv_func_gettimeofday_posix_signature=yes
20358 else
20359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20360 /* end confdefs.h. */
20361 #include <sys/time.h>
20362 int gettimeofday (struct timeval *restrict, struct timezone *restrict);
20363
20364 int
20365 main ()
20366 {
20367
20368 ;
20369 return 0;
20370 }
20371 _ACEOF
20372 if ac_fn_c_try_compile "$LINENO"; then :
20373 gl_cv_func_gettimeofday_posix_signature=almost
20374 else
20375 gl_cv_func_gettimeofday_posix_signature=no
20376 fi
20377 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20378 fi
20379 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20380 fi
20381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
20382 $as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
20383 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
20384 gl_gettimeofday_timezone='struct timezone'
20385 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
20386 REPLACE_GETTIMEOFDAY=1
20387 fi
20388 if test $REPLACE_STRUCT_TIMEVAL = 1; then
20389 REPLACE_GETTIMEOFDAY=1
20390 fi
20391
20392 fi
20393
20394 cat >>confdefs.h <<_ACEOF
20395 #define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
20396 _ACEOF
20397
20398
20399 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
20400
20401
20402
20403
20404
20405
20406
20407
20408 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
20409
20410
20411 for ac_header in sys/timeb.h
20412 do :
20413 ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
20414 if test "x$ac_cv_header_sys_timeb_h" = xyes; then :
20415 cat >>confdefs.h <<_ACEOF
20416 #define HAVE_SYS_TIMEB_H 1
20417 _ACEOF
20418
20419 fi
20420
20421 done
20422
20423 for ac_func in _ftime
20424 do :
20425 ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
20426 if test "x$ac_cv_func__ftime" = xyes; then :
20427 cat >>confdefs.h <<_ACEOF
20428 #define HAVE__FTIME 1
20429 _ACEOF
20430
20431 fi
20432 done
20433
20434
20435 fi
20436
20437
20438
20439
20440
20441 GNULIB_GETTIMEOFDAY=1
20442
20443
20444
20445
20446
20447 $as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
20448
20449
20450
20451 GLOB_H=
20452 for ac_header in glob.h
20453 do :
20454 ac_fn_c_check_header_mongrel "$LINENO" "glob.h" "ac_cv_header_glob_h" "$ac_includes_default"
20455 if test "x$ac_cv_header_glob_h" = xyes; then :
20456 cat >>confdefs.h <<_ACEOF
20457 #define HAVE_GLOB_H 1
20458 _ACEOF
20459
20460 else
20461 GLOB_H=glob.h
20462 fi
20463
20464 done
20465
20466
20467 if test -z "$GLOB_H"; then
20468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU glob interface version 1" >&5
20469 $as_echo_n "checking for GNU glob interface version 1... " >&6; }
20470 if ${gl_cv_gnu_glob_interface_version_1+:} false; then :
20471 $as_echo_n "(cached) " >&6
20472 else
20473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20474 /* end confdefs.h. */
20475 #include <gnu-versions.h>
20476 char a[_GNU_GLOB_INTERFACE_VERSION == 1 ? 1 : -1];
20477 _ACEOF
20478 if ac_fn_c_try_compile "$LINENO"; then :
20479 gl_cv_gnu_glob_interface_version_1=yes
20480 else
20481 gl_cv_gnu_glob_interface_version_1=no
20482 fi
20483 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20484 fi
20485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_gnu_glob_interface_version_1" >&5
20486 $as_echo "$gl_cv_gnu_glob_interface_version_1" >&6; }
20487
20488 if test "$gl_cv_gnu_glob_interface_version_1" = "no"; then
20489 GLOB_H=glob.h
20490 fi
20491 fi
20492
20493 if test -z "$GLOB_H"; then
20494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether glob lists broken symlinks" >&5
20495 $as_echo_n "checking whether glob lists broken symlinks... " >&6; }
20496 if ${gl_cv_glob_lists_symlinks+:} false; then :
20497 $as_echo_n "(cached) " >&6
20498 else
20499 if ln -s conf-doesntexist conf$$-globtest 2>/dev/null; then
20500 gl_cv_glob_lists_symlinks=maybe
20501 else
20502 # If we can't make a symlink, then we cannot test this issue. Be
20503 # pessimistic about this.
20504 gl_cv_glob_lists_symlinks=no
20505 fi
20506
20507 if test $gl_cv_glob_lists_symlinks = maybe; then
20508 if test "$cross_compiling" = yes; then :
20509 gl_cv_glob_lists_symlinks=no
20510 else
20511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20512 /* end confdefs.h. */
20513
20514 #include <stddef.h>
20515 #include <glob.h>
20516 int
20517 main ()
20518 {
20519 glob_t found;
20520 if (glob ("conf*-globtest", 0, NULL, &found) == GLOB_NOMATCH) return 1;
20521 ;
20522 return 0;
20523 }
20524 _ACEOF
20525 if ac_fn_c_try_run "$LINENO"; then :
20526 gl_cv_glob_lists_symlinks=yes
20527 else
20528 gl_cv_glob_lists_symlinks=no
20529 fi
20530 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20531 conftest.$ac_objext conftest.beam conftest.$ac_ext
20532 fi
20533
20534 fi
20535 fi
20536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_glob_lists_symlinks" >&5
20537 $as_echo "$gl_cv_glob_lists_symlinks" >&6; }
20538
20539 if test $gl_cv_glob_lists_symlinks = no; then
20540 GLOB_H=glob.h
20541 fi
20542 fi
20543
20544 rm -f conf$$-globtest
20545
20546
20547 if test -n "$GLOB_H"; then
20548 GL_GENERATE_GLOB_H_TRUE=
20549 GL_GENERATE_GLOB_H_FALSE='#'
20550 else
20551 GL_GENERATE_GLOB_H_TRUE='#'
20552 GL_GENERATE_GLOB_H_FALSE=
20553 fi
20554
20555
20556 if test -n "$GLOB_H"; then
20557
20558
20559
20560
20561
20562
20563
20564
20565 gl_LIBOBJS="$gl_LIBOBJS glob.$ac_objext"
20566
20567
20568
20569 :
20570
20571
20572
20573
20574
20575
20576
20577 if test $ac_cv_header_sys_cdefs_h = yes; then
20578 HAVE_SYS_CDEFS_H=1
20579 else
20580 HAVE_SYS_CDEFS_H=0
20581 fi
20582
20583
20584 :
20585
20586
20587
20588
20589
20590
20591
20592
20593
20594
20595
20596 fi
20597
20598 :
20599
20600
20601
20602
20603
20604
20605
20606
20607 HAVE_INET_NTOP=1
20608 INET_NTOP_LIB=
20609
20610
20611
20612
20613 :
20614
20615
20616
20617
20618
20619 if test $ac_cv_header_sys_socket_h != yes; then
20620 for ac_header in winsock2.h
20621 do :
20622 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
20623 if test "x$ac_cv_header_winsock2_h" = xyes; then :
20624 cat >>confdefs.h <<_ACEOF
20625 #define HAVE_WINSOCK2_H 1
20626 _ACEOF
20627
20628 fi
20629
20630 done
20631
20632 fi
20633 if test "$ac_cv_header_winsock2_h" = yes; then
20634 HAVE_WINSOCK2_H=1
20635 UNISTD_H_HAVE_WINSOCK2_H=1
20636 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
20637 else
20638 HAVE_WINSOCK2_H=0
20639 fi
20640
20641
20642 if test $HAVE_WINSOCK2_H = 1; then
20643 ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <ws2tcpip.h>
20644 "
20645 if test "x$ac_cv_have_decl_inet_ntop" = xyes; then :
20646 ac_have_decl=1
20647 else
20648 ac_have_decl=0
20649 fi
20650
20651 cat >>confdefs.h <<_ACEOF
20652 #define HAVE_DECL_INET_NTOP $ac_have_decl
20653 _ACEOF
20654
20655 if test $ac_cv_have_decl_inet_ntop = yes; then
20656 REPLACE_INET_NTOP=1
20657 INET_NTOP_LIB="-lws2_32"
20658 else
20659 HAVE_DECL_INET_NTOP=0
20660 HAVE_INET_NTOP=0
20661 fi
20662 else
20663 gl_save_LIBS=$LIBS
20664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5
20665 $as_echo_n "checking for library containing inet_ntop... " >&6; }
20666 if ${ac_cv_search_inet_ntop+:} false; then :
20667 $as_echo_n "(cached) " >&6
20668 else
20669 ac_func_search_save_LIBS=$LIBS
20670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20671 /* end confdefs.h. */
20672
20673 /* Override any GCC internal prototype to avoid an error.
20674 Use char because int might match the return type of a GCC
20675 builtin and then its argument prototype would still apply. */
20676 #ifdef __cplusplus
20677 extern "C"
20678 #endif
20679 char inet_ntop ();
20680 int
20681 main ()
20682 {
20683 return inet_ntop ();
20684 ;
20685 return 0;
20686 }
20687 _ACEOF
20688 for ac_lib in '' nsl resolv; do
20689 if test -z "$ac_lib"; then
20690 ac_res="none required"
20691 else
20692 ac_res=-l$ac_lib
20693 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
20694 fi
20695 if ac_fn_c_try_link "$LINENO"; then :
20696 ac_cv_search_inet_ntop=$ac_res
20697 fi
20698 rm -f core conftest.err conftest.$ac_objext \
20699 conftest$ac_exeext
20700 if ${ac_cv_search_inet_ntop+:} false; then :
20701 break
20702 fi
20703 done
20704 if ${ac_cv_search_inet_ntop+:} false; then :
20705
20706 else
20707 ac_cv_search_inet_ntop=no
20708 fi
20709 rm conftest.$ac_ext
20710 LIBS=$ac_func_search_save_LIBS
20711 fi
20712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5
20713 $as_echo "$ac_cv_search_inet_ntop" >&6; }
20714 ac_res=$ac_cv_search_inet_ntop
20715 if test "$ac_res" != no; then :
20716 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20717
20718 else
20719 for ac_func in inet_ntop
20720 do :
20721 ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
20722 if test "x$ac_cv_func_inet_ntop" = xyes; then :
20723 cat >>confdefs.h <<_ACEOF
20724 #define HAVE_INET_NTOP 1
20725 _ACEOF
20726
20727 fi
20728 done
20729
20730 if test $ac_cv_func_inet_ntop = no; then
20731 HAVE_INET_NTOP=0
20732 fi
20733
20734 fi
20735
20736 LIBS=$gl_save_LIBS
20737
20738 if test "$ac_cv_search_inet_ntop" != "no" \
20739 && test "$ac_cv_search_inet_ntop" != "none required"; then
20740 INET_NTOP_LIB="$ac_cv_search_inet_ntop"
20741 fi
20742
20743
20744 :
20745
20746
20747
20748
20749
20750 ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <arpa/inet.h>
20751 #if HAVE_NETDB_H
20752 # include <netdb.h>
20753 #endif
20754
20755 "
20756 if test "x$ac_cv_have_decl_inet_ntop" = xyes; then :
20757 ac_have_decl=1
20758 else
20759 ac_have_decl=0
20760 fi
20761
20762 cat >>confdefs.h <<_ACEOF
20763 #define HAVE_DECL_INET_NTOP $ac_have_decl
20764 _ACEOF
20765
20766 if test $ac_cv_have_decl_inet_ntop = no; then
20767 HAVE_DECL_INET_NTOP=0
20768 fi
20769 fi
20770
20771
20772 if test $HAVE_INET_NTOP = 0 || test $REPLACE_INET_NTOP = 1; then
20773
20774
20775
20776
20777
20778
20779
20780
20781 gl_LIBOBJS="$gl_LIBOBJS inet_ntop.$ac_objext"
20782
20783
20784
20785
20786 fi
20787
20788
20789
20790
20791
20792 GNULIB_INET_NTOP=1
20793
20794
20795
20796
20797
20798
20799
20800
20801
20802 PRIPTR_PREFIX=
20803 if test -n "$STDINT_H"; then
20804 PRIPTR_PREFIX='"l"'
20805 else
20806 for glpfx in '' l ll I64; do
20807 case $glpfx in
20808 '') gltype1='int';;
20809 l) gltype1='long int';;
20810 ll) gltype1='long long int';;
20811 I64) gltype1='__int64';;
20812 esac
20813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20814 /* end confdefs.h. */
20815 #include <stdint.h>
20816 extern intptr_t foo;
20817 extern $gltype1 foo;
20818 int
20819 main ()
20820 {
20821
20822 ;
20823 return 0;
20824 }
20825 _ACEOF
20826 if ac_fn_c_try_compile "$LINENO"; then :
20827 PRIPTR_PREFIX='"'$glpfx'"'
20828 fi
20829 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20830 test -n "$PRIPTR_PREFIX" && break
20831 done
20832 fi
20833
20834
20835
20836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
20837 $as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
20838 if ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+:} false; then :
20839 $as_echo_n "(cached) " >&6
20840 else
20841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20842 /* end confdefs.h. */
20843 /* Work also in C++ mode. */
20844 #define __STDC_LIMIT_MACROS 1
20845
20846 /* Work if build is not clean. */
20847 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
20848
20849 #include <limits.h>
20850 #if HAVE_STDINT_H
20851 #include <stdint.h>
20852 #endif
20853
20854 #if defined INT32_MAX && defined INTMAX_MAX
20855 #define CONDITION (INT32_MAX < INTMAX_MAX)
20856 #elif HAVE_LONG_LONG_INT
20857 #define CONDITION (sizeof (int) < sizeof (long long int))
20858 #else
20859 #define CONDITION 0
20860 #endif
20861 int test[CONDITION ? 1 : -1];
20862 int
20863 main ()
20864 {
20865
20866 ;
20867 return 0;
20868 }
20869 _ACEOF
20870 if ac_fn_c_try_compile "$LINENO"; then :
20871 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
20872 else
20873 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
20874 fi
20875 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20876 fi
20877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
20878 $as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
20879 if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
20880 INT32_MAX_LT_INTMAX_MAX=1;
20881 else
20882 INT32_MAX_LT_INTMAX_MAX=0;
20883 fi
20884
20885
20886 if test $APPLE_UNIVERSAL_BUILD = 0; then
20887
20888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
20889 $as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; }
20890 if ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+:} false; then :
20891 $as_echo_n "(cached) " >&6
20892 else
20893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20894 /* end confdefs.h. */
20895 /* Work also in C++ mode. */
20896 #define __STDC_LIMIT_MACROS 1
20897
20898 /* Work if build is not clean. */
20899 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
20900
20901 #include <limits.h>
20902 #if HAVE_STDINT_H
20903 #include <stdint.h>
20904 #endif
20905
20906 #if defined INT64_MAX
20907 #define CONDITION (INT64_MAX == LONG_MAX)
20908 #elif HAVE_LONG_LONG_INT
20909 #define CONDITION (sizeof (long long int) == sizeof (long int))
20910 #else
20911 #define CONDITION 0
20912 #endif
20913 int test[CONDITION ? 1 : -1];
20914 int
20915 main ()
20916 {
20917
20918 ;
20919 return 0;
20920 }
20921 _ACEOF
20922 if ac_fn_c_try_compile "$LINENO"; then :
20923 gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
20924 else
20925 gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
20926 fi
20927 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20928 fi
20929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
20930 $as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
20931 if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
20932 INT64_MAX_EQ_LONG_MAX=1;
20933 else
20934 INT64_MAX_EQ_LONG_MAX=0;
20935 fi
20936
20937
20938 else
20939 INT64_MAX_EQ_LONG_MAX=-1
20940 fi
20941
20942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
20943 $as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
20944 if ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+:} false; then :
20945 $as_echo_n "(cached) " >&6
20946 else
20947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20948 /* end confdefs.h. */
20949 /* Work also in C++ mode. */
20950 #define __STDC_LIMIT_MACROS 1
20951
20952 /* Work if build is not clean. */
20953 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
20954
20955 #include <limits.h>
20956 #if HAVE_STDINT_H
20957 #include <stdint.h>
20958 #endif
20959
20960 #if defined UINT32_MAX && defined UINTMAX_MAX
20961 #define CONDITION (UINT32_MAX < UINTMAX_MAX)
20962 #elif HAVE_LONG_LONG_INT
20963 #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
20964 #else
20965 #define CONDITION 0
20966 #endif
20967 int test[CONDITION ? 1 : -1];
20968 int
20969 main ()
20970 {
20971
20972 ;
20973 return 0;
20974 }
20975 _ACEOF
20976 if ac_fn_c_try_compile "$LINENO"; then :
20977 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
20978 else
20979 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
20980 fi
20981 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20982 fi
20983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
20984 $as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
20985 if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
20986 UINT32_MAX_LT_UINTMAX_MAX=1;
20987 else
20988 UINT32_MAX_LT_UINTMAX_MAX=0;
20989 fi
20990
20991
20992 if test $APPLE_UNIVERSAL_BUILD = 0; then
20993
20994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
20995 $as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
20996 if ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+:} false; then :
20997 $as_echo_n "(cached) " >&6
20998 else
20999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21000 /* end confdefs.h. */
21001 /* Work also in C++ mode. */
21002 #define __STDC_LIMIT_MACROS 1
21003
21004 /* Work if build is not clean. */
21005 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
21006
21007 #include <limits.h>
21008 #if HAVE_STDINT_H
21009 #include <stdint.h>
21010 #endif
21011
21012 #if defined UINT64_MAX
21013 #define CONDITION (UINT64_MAX == ULONG_MAX)
21014 #elif HAVE_LONG_LONG_INT
21015 #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
21016 #else
21017 #define CONDITION 0
21018 #endif
21019 int test[CONDITION ? 1 : -1];
21020 int
21021 main ()
21022 {
21023
21024 ;
21025 return 0;
21026 }
21027 _ACEOF
21028 if ac_fn_c_try_compile "$LINENO"; then :
21029 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
21030 else
21031 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
21032 fi
21033 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21034 fi
21035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
21036 $as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
21037 if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
21038 UINT64_MAX_EQ_ULONG_MAX=1;
21039 else
21040 UINT64_MAX_EQ_ULONG_MAX=0;
21041 fi
21042
21043
21044 else
21045 UINT64_MAX_EQ_ULONG_MAX=-1
21046 fi
21047
21048
21049
21050
21051
21052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
21053 $as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; }
21054 if ${gl_cv_func_isnand_no_libm+:} false; then :
21055 $as_echo_n "(cached) " >&6
21056 else
21057
21058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21059 /* end confdefs.h. */
21060 #include <math.h>
21061 #if __GNUC__ >= 4
21062 # undef isnand
21063 # define isnand(x) __builtin_isnan ((double)(x))
21064 #else
21065 # undef isnand
21066 # define isnand(x) isnan ((double)(x))
21067 #endif
21068 double x;
21069 int
21070 main ()
21071 {
21072 return isnand (x);
21073 ;
21074 return 0;
21075 }
21076 _ACEOF
21077 if ac_fn_c_try_link "$LINENO"; then :
21078 gl_cv_func_isnand_no_libm=yes
21079 else
21080 gl_cv_func_isnand_no_libm=no
21081 fi
21082 rm -f core conftest.err conftest.$ac_objext \
21083 conftest$ac_exeext conftest.$ac_ext
21084
21085 fi
21086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
21087 $as_echo "$gl_cv_func_isnand_no_libm" >&6; }
21088
21089 gl_func_isnand_no_libm=$gl_cv_func_isnand_no_libm
21090 if test $gl_cv_func_isnand_no_libm = yes; then
21091
21092 $as_echo "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h
21093
21094 fi
21095
21096 if test $gl_func_isnand_no_libm != yes; then
21097
21098
21099
21100
21101
21102
21103
21104
21105 gl_LIBOBJS="$gl_LIBOBJS isnand.$ac_objext"
21106
21107
21108
21109
21110 fi
21111
21112
21113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
21114 $as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; }
21115 if ${gl_cv_func_isnanl_no_libm+:} false; then :
21116 $as_echo_n "(cached) " >&6
21117 else
21118
21119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21120 /* end confdefs.h. */
21121 #include <math.h>
21122 #if __GNUC__ >= 4
21123 # undef isnanl
21124 # define isnanl(x) __builtin_isnanl ((long double)(x))
21125 #elif defined isnan
21126 # undef isnanl
21127 # define isnanl(x) isnan ((long double)(x))
21128 #endif
21129 long double x;
21130 int
21131 main ()
21132 {
21133 return isnanl (x);
21134 ;
21135 return 0;
21136 }
21137 _ACEOF
21138 if ac_fn_c_try_link "$LINENO"; then :
21139 gl_cv_func_isnanl_no_libm=yes
21140 else
21141 gl_cv_func_isnanl_no_libm=no
21142 fi
21143 rm -f core conftest.err conftest.$ac_objext \
21144 conftest$ac_exeext conftest.$ac_ext
21145
21146 fi
21147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
21148 $as_echo "$gl_cv_func_isnanl_no_libm" >&6; }
21149
21150 gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm
21151 if test $gl_func_isnanl_no_libm = yes; then
21152
21153
21154
21155
21156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
21157 $as_echo_n "checking whether isnanl works... " >&6; }
21158 if ${gl_cv_func_isnanl_works+:} false; then :
21159 $as_echo_n "(cached) " >&6
21160 else
21161
21162 if test "$cross_compiling" = yes; then :
21163 gl_cv_func_isnanl_works="guessing yes"
21164 else
21165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21166 /* end confdefs.h. */
21167
21168 #include <float.h>
21169 #include <limits.h>
21170 #include <math.h>
21171 #if __GNUC__ >= 4
21172 # undef isnanl
21173 # define isnanl(x) __builtin_isnanl ((long double)(x))
21174 #elif defined isnan
21175 # undef isnanl
21176 # define isnanl(x) isnan ((long double)(x))
21177 #endif
21178 #define NWORDS \
21179 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
21180 typedef union { unsigned int word[NWORDS]; long double value; }
21181 memory_long_double;
21182 /* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
21183 runtime type conversion. */
21184 #ifdef __sgi
21185 static long double NaNl ()
21186 {
21187 double zero = 0.0;
21188 return zero / zero;
21189 }
21190 #else
21191 # define NaNl() (0.0L / 0.0L)
21192 #endif
21193 int main ()
21194 {
21195 int result = 0;
21196
21197 if (!isnanl (NaNl ()))
21198 result |= 1;
21199
21200 {
21201 memory_long_double m;
21202 unsigned int i;
21203
21204 /* The isnanl function should be immune against changes in the sign bit and
21205 in the mantissa bits. The xor operation twiddles a bit that can only be
21206 a sign bit or a mantissa bit (since the exponent never extends to
21207 bit 31). */
21208 m.value = NaNl ();
21209 m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
21210 for (i = 0; i < NWORDS; i++)
21211 m.word[i] |= 1;
21212 if (!isnanl (m.value))
21213 result |= 1;
21214 }
21215
21216 #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
21217 /* Representation of an 80-bit 'long double' as an initializer for a sequence
21218 of 'unsigned int' words. */
21219 # ifdef WORDS_BIGENDIAN
21220 # define LDBL80_WORDS(exponent,manthi,mantlo) \
21221 { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
21222 ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \
21223 (unsigned int) (mantlo) << 16 \
21224 }
21225 # else
21226 # define LDBL80_WORDS(exponent,manthi,mantlo) \
21227 { mantlo, manthi, exponent }
21228 # endif
21229 { /* Quiet NaN. */
21230 static memory_long_double x =
21231 { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
21232 if (!isnanl (x.value))
21233 result |= 2;
21234 }
21235 {
21236 /* Signalling NaN. */
21237 static memory_long_double x =
21238 { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
21239 if (!isnanl (x.value))
21240 result |= 2;
21241 }
21242 /* isnanl should return something even for noncanonical values. */
21243 { /* Pseudo-NaN. */
21244 static memory_long_double x =
21245 { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
21246 if (isnanl (x.value) && !isnanl (x.value))
21247 result |= 4;
21248 }
21249 { /* Pseudo-Infinity. */
21250 static memory_long_double x =
21251 { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
21252 if (isnanl (x.value) && !isnanl (x.value))
21253 result |= 8;
21254 }
21255 { /* Pseudo-Zero. */
21256 static memory_long_double x =
21257 { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
21258 if (isnanl (x.value) && !isnanl (x.value))
21259 result |= 16;
21260 }
21261 { /* Unnormalized number. */
21262 static memory_long_double x =
21263 { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
21264 if (isnanl (x.value) && !isnanl (x.value))
21265 result |= 32;
21266 }
21267 { /* Pseudo-Denormal. */
21268 static memory_long_double x =
21269 { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
21270 if (isnanl (x.value) && !isnanl (x.value))
21271 result |= 64;
21272 }
21273 #endif
21274
21275 return result;
21276 }
21277 _ACEOF
21278 if ac_fn_c_try_run "$LINENO"; then :
21279 gl_cv_func_isnanl_works=yes
21280 else
21281 gl_cv_func_isnanl_works=no
21282 fi
21283 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21284 conftest.$ac_objext conftest.beam conftest.$ac_ext
21285 fi
21286
21287
21288 fi
21289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
21290 $as_echo "$gl_cv_func_isnanl_works" >&6; }
21291
21292 case "$gl_cv_func_isnanl_works" in
21293 *yes) ;;
21294 *) gl_func_isnanl_no_libm=no ;;
21295 esac
21296 fi
21297 if test $gl_func_isnanl_no_libm = yes; then
21298
21299 $as_echo "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h
21300
21301 fi
21302
21303 if test $gl_func_isnanl_no_libm != yes; then
21304
21305
21306
21307
21308
21309
21310
21311
21312 gl_LIBOBJS="$gl_LIBOBJS isnanl.$ac_objext"
21313
21314
21315
21316
21317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
21318 $as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
21319 if ${gl_cv_cc_long_double_expbit0+:} false; then :
21320 $as_echo_n "(cached) " >&6
21321 else
21322
21323 if test "$cross_compiling" = yes; then :
21324
21325 gl_cv_cc_long_double_expbit0="unknown"
21326
21327 else
21328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21329 /* end confdefs.h. */
21330
21331 #include <float.h>
21332 #include <stddef.h>
21333 #include <stdio.h>
21334 #include <string.h>
21335 #define NWORDS \
21336 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
21337 typedef union { long double value; unsigned int word[NWORDS]; }
21338 memory_long_double;
21339 static unsigned int ored_words[NWORDS];
21340 static unsigned int anded_words[NWORDS];
21341 static void add_to_ored_words (long double x)
21342 {
21343 memory_long_double m;
21344 size_t i;
21345 /* Clear it first, in case
21346 sizeof (long double) < sizeof (memory_long_double). */
21347 memset (&m, 0, sizeof (memory_long_double));
21348 m.value = x;
21349 for (i = 0; i < NWORDS; i++)
21350 {
21351 ored_words[i] |= m.word[i];
21352 anded_words[i] &= m.word[i];
21353 }
21354 }
21355 int main ()
21356 {
21357 size_t j;
21358 FILE *fp = fopen ("conftest.out", "w");
21359 if (fp == NULL)
21360 return 1;
21361 for (j = 0; j < NWORDS; j++)
21362 anded_words[j] = ~ (unsigned int) 0;
21363 add_to_ored_words (0.25L);
21364 add_to_ored_words (0.5L);
21365 add_to_ored_words (1.0L);
21366 add_to_ored_words (2.0L);
21367 add_to_ored_words (4.0L);
21368 /* Remove bits that are common (e.g. if representation of the first mantissa
21369 bit is explicit). */
21370 for (j = 0; j < NWORDS; j++)
21371 ored_words[j] &= ~anded_words[j];
21372 /* Now find the nonzero word. */
21373 for (j = 0; j < NWORDS; j++)
21374 if (ored_words[j] != 0)
21375 break;
21376 if (j < NWORDS)
21377 {
21378 size_t i;
21379 for (i = j + 1; i < NWORDS; i++)
21380 if (ored_words[i] != 0)
21381 {
21382 fprintf (fp, "unknown");
21383 return (fclose (fp) != 0);
21384 }
21385 for (i = 0; ; i++)
21386 if ((ored_words[j] >> i) & 1)
21387 {
21388 fprintf (fp, "word %d bit %d", (int) j, (int) i);
21389 return (fclose (fp) != 0);
21390 }
21391 }
21392 fprintf (fp, "unknown");
21393 return (fclose (fp) != 0);
21394 }
21395
21396 _ACEOF
21397 if ac_fn_c_try_run "$LINENO"; then :
21398 gl_cv_cc_long_double_expbit0=`cat conftest.out`
21399 else
21400 gl_cv_cc_long_double_expbit0="unknown"
21401 fi
21402 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21403 conftest.$ac_objext conftest.beam conftest.$ac_ext
21404 fi
21405
21406 rm -f conftest.out
21407
21408 fi
21409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
21410 $as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
21411 case "$gl_cv_cc_long_double_expbit0" in
21412 word*bit*)
21413 word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
21414 bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
21415
21416 cat >>confdefs.h <<_ACEOF
21417 #define LDBL_EXPBIT0_WORD $word
21418 _ACEOF
21419
21420
21421 cat >>confdefs.h <<_ACEOF
21422 #define LDBL_EXPBIT0_BIT $bit
21423 _ACEOF
21424
21425 ;;
21426 esac
21427
21428
21429
21430 fi
21431
21432
21433
21434
21435
21436
21437 :
21438
21439
21440
21441
21442
21443
21444
21445
21446
21447 LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
21448
21449
21450
21451 if test "$gl_threads_api" = posix; then
21452 # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
21453 # pthread_rwlock_* functions.
21454 ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
21455 "
21456 if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then :
21457
21458 $as_echo "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
21459
21460 fi
21461
21462 # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
21463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21464 /* end confdefs.h. */
21465
21466 #include <pthread.h>
21467 int
21468 main ()
21469 {
21470
21471 #if __FreeBSD__ == 4
21472 error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
21473 #elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \
21474 && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
21475 error "No, in Mac OS X < 10.7 recursive mutexes actually don't work."
21476 #else
21477 int x = (int)PTHREAD_MUTEX_RECURSIVE;
21478 return !x;
21479 #endif
21480
21481 ;
21482 return 0;
21483 }
21484 _ACEOF
21485 if ac_fn_c_try_compile "$LINENO"; then :
21486
21487 $as_echo "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h
21488
21489 fi
21490 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21491 fi
21492 :
21493
21494
21495
21496 cat >>confdefs.h <<_ACEOF
21497 #define GNULIB_LOCK 1
21498 _ACEOF
21499
21500
21501
21502
21503
21504 :
21505
21506
21507
21508
21509
21510 if test $ac_cv_func_lstat = yes; then
21511
21512 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
21513 *no)
21514 REPLACE_LSTAT=1
21515 ;;
21516 esac
21517 else
21518 HAVE_LSTAT=0
21519 fi
21520
21521 if test $REPLACE_LSTAT = 1; then
21522
21523
21524
21525
21526
21527
21528
21529
21530 gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
21531
21532 :
21533 fi
21534
21535
21536
21537
21538
21539 GNULIB_LSTAT=1
21540
21541
21542
21543
21544
21545 $as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
21546
21547
21548
21549
21550
21551
21552 if test $gl_cv_func_malloc_posix = yes; then
21553
21554 $as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
21555
21556 else
21557 REPLACE_MALLOC=1
21558 fi
21559
21560 if test $REPLACE_MALLOC = 1; then
21561
21562
21563
21564
21565
21566
21567
21568
21569 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
21570
21571 fi
21572
21573
21574
21575
21576
21577 GNULIB_MALLOC_POSIX=1
21578
21579
21580
21581
21582
21583 $as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
21584
21585
21586
21587
21588
21589
21590
21591
21592
21593
21594
21595
21596
21597
21598
21599 :
21600
21601
21602
21603
21604
21605
21606
21607
21608 if test $gl_cv_have_include_next = yes; then
21609 gl_cv_next_math_h='<'math.h'>'
21610 else
21611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
21612 $as_echo_n "checking absolute name of <math.h>... " >&6; }
21613 if ${gl_cv_next_math_h+:} false; then :
21614 $as_echo_n "(cached) " >&6
21615 else
21616
21617 if test $ac_cv_header_math_h = yes; then
21618
21619
21620
21621
21622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21623 /* end confdefs.h. */
21624 #include <math.h>
21625 _ACEOF
21626 case "$host_os" in
21627 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21628 *) gl_absname_cpp="$ac_cpp" ;;
21629 esac
21630
21631 case "$host_os" in
21632 mingw*)
21633 gl_dirsep_regex='[/\\]'
21634 ;;
21635 *)
21636 gl_dirsep_regex='\/'
21637 ;;
21638 esac
21639 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21640 gl_header_literal_regex=`echo 'math.h' \
21641 | sed -e "$gl_make_literal_regex_sed"`
21642 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21643 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21644 s|^/[^/]|//&|
21645 p
21646 q
21647 }'
21648
21649 gl_cv_absolute_math_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21650 sed -n "$gl_absolute_header_sed"`
21651
21652 gl_header=$gl_cv_absolute_math_h
21653 gl_cv_next_math_h='"'$gl_header'"'
21654 else
21655 gl_cv_next_math_h='<'math.h'>'
21656 fi
21657
21658
21659 fi
21660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
21661 $as_echo "$gl_cv_next_math_h" >&6; }
21662 fi
21663 NEXT_MATH_H=$gl_cv_next_math_h
21664
21665 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21666 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21667 gl_next_as_first_directive='<'math.h'>'
21668 else
21669 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21670 gl_next_as_first_directive=$gl_cv_next_math_h
21671 fi
21672 NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive
21673
21674
21675
21676
21677
21678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
21679 $as_echo_n "checking whether NAN macro works... " >&6; }
21680 if ${gl_cv_header_math_nan_works+:} false; then :
21681 $as_echo_n "(cached) " >&6
21682 else
21683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21684 /* end confdefs.h. */
21685 #include <math.h>
21686 int
21687 main ()
21688 {
21689 /* Solaris 10 has a broken definition of NAN. Other platforms
21690 fail to provide NAN, or provide it only in C99 mode; this
21691 test only needs to fail when NAN is provided but wrong. */
21692 float f = 1.0f;
21693 #ifdef NAN
21694 f = NAN;
21695 #endif
21696 return f == 0;
21697 ;
21698 return 0;
21699 }
21700 _ACEOF
21701 if ac_fn_c_try_compile "$LINENO"; then :
21702 gl_cv_header_math_nan_works=yes
21703 else
21704 gl_cv_header_math_nan_works=no
21705 fi
21706 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21707 fi
21708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5
21709 $as_echo "$gl_cv_header_math_nan_works" >&6; }
21710 if test $gl_cv_header_math_nan_works = no; then
21711 REPLACE_NAN=1
21712 fi
21713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
21714 $as_echo_n "checking whether HUGE_VAL works... " >&6; }
21715 if ${gl_cv_header_math_huge_val_works+:} false; then :
21716 $as_echo_n "(cached) " >&6
21717 else
21718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21719 /* end confdefs.h. */
21720 #include <math.h>
21721 int
21722 main ()
21723 {
21724 /* Solaris 10 has a broken definition of HUGE_VAL. */
21725 double d = HUGE_VAL;
21726 return d == 0;
21727 ;
21728 return 0;
21729 }
21730 _ACEOF
21731 if ac_fn_c_try_compile "$LINENO"; then :
21732 gl_cv_header_math_huge_val_works=yes
21733 else
21734 gl_cv_header_math_huge_val_works=no
21735 fi
21736 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21737 fi
21738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5
21739 $as_echo "$gl_cv_header_math_huge_val_works" >&6; }
21740 if test $gl_cv_header_math_huge_val_works = no; then
21741 REPLACE_HUGE_VAL=1
21742 fi
21743
21744
21745 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
21746 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
21747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
21748 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
21749 if eval \${$as_gl_Symbol+:} false; then :
21750 $as_echo_n "(cached) " >&6
21751 else
21752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21753 /* end confdefs.h. */
21754 #include <math.h>
21755 int
21756 main ()
21757 {
21758 #undef $gl_func
21759 (void) $gl_func;
21760 ;
21761 return 0;
21762 }
21763 _ACEOF
21764 if ac_fn_c_try_compile "$LINENO"; then :
21765 eval "$as_gl_Symbol=yes"
21766 else
21767 eval "$as_gl_Symbol=no"
21768 fi
21769 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21770 fi
21771 eval ac_res=\$$as_gl_Symbol
21772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
21773 $as_echo "$ac_res" >&6; }
21774 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
21775 cat >>confdefs.h <<_ACEOF
21776 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
21777 _ACEOF
21778
21779 eval ac_cv_have_decl_$gl_func=yes
21780 fi
21781 done
21782
21783
21784
21785
21786
21787
21788
21789
21790
21791
21792
21793 :
21794
21795
21796
21797
21798
21799
21800 :
21801
21802
21803
21804
21805
21806 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
21807
21808
21809
21810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
21811 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
21812 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
21813 $as_echo_n "(cached) " >&6
21814 else
21815
21816 case "$host_os" in
21817 # Guess no on AIX and OSF/1.
21818 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
21819 # Guess yes otherwise.
21820 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
21821 esac
21822 if test $LOCALE_JA != none; then
21823 if test "$cross_compiling" = yes; then :
21824 :
21825 else
21826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21827 /* end confdefs.h. */
21828
21829 #include <locale.h>
21830 #include <string.h>
21831 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21832 <wchar.h>.
21833 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21834 included before <wchar.h>. */
21835 #include <stddef.h>
21836 #include <stdio.h>
21837 #include <time.h>
21838 #include <wchar.h>
21839 int main ()
21840 {
21841 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
21842 {
21843 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
21844 mbstate_t state;
21845 wchar_t wc;
21846
21847 memset (&state, '\0', sizeof (mbstate_t));
21848 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
21849 if (mbsinit (&state))
21850 return 1;
21851 }
21852 return 0;
21853 }
21854 _ACEOF
21855 if ac_fn_c_try_run "$LINENO"; then :
21856 gl_cv_func_mbrtowc_incomplete_state=yes
21857 else
21858 gl_cv_func_mbrtowc_incomplete_state=no
21859 fi
21860 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21861 conftest.$ac_objext conftest.beam conftest.$ac_ext
21862 fi
21863
21864 fi
21865
21866 fi
21867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
21868 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
21869
21870
21871
21872
21873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
21874 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
21875 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
21876 $as_echo_n "(cached) " >&6
21877 else
21878
21879 case "$host_os" in
21880 # Guess no on Solaris 8.
21881 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
21882 # Guess yes otherwise.
21883 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
21884 esac
21885 if test $LOCALE_ZH_CN != none; then
21886 if test "$cross_compiling" = yes; then :
21887 :
21888 else
21889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21890 /* end confdefs.h. */
21891
21892 #include <locale.h>
21893 #include <stdlib.h>
21894 #include <string.h>
21895 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21896 <wchar.h>.
21897 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21898 included before <wchar.h>. */
21899 #include <stddef.h>
21900 #include <stdio.h>
21901 #include <time.h>
21902 #include <wchar.h>
21903 int main ()
21904 {
21905 /* This fails on Solaris 8:
21906 mbrtowc returns 2, and sets wc to 0x00F0.
21907 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
21908 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
21909 {
21910 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
21911 mbstate_t state;
21912 wchar_t wc;
21913
21914 memset (&state, '\0', sizeof (mbstate_t));
21915 if (mbrtowc (&wc, input + 3, 6, &state) != 4
21916 && mbtowc (&wc, input + 3, 6) == 4)
21917 return 1;
21918 }
21919 return 0;
21920 }
21921 _ACEOF
21922 if ac_fn_c_try_run "$LINENO"; then :
21923 gl_cv_func_mbrtowc_sanitycheck=yes
21924 else
21925 gl_cv_func_mbrtowc_sanitycheck=no
21926 fi
21927 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21928 conftest.$ac_objext conftest.beam conftest.$ac_ext
21929 fi
21930
21931 fi
21932
21933 fi
21934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
21935 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
21936
21937 REPLACE_MBSTATE_T=0
21938 case "$gl_cv_func_mbrtowc_incomplete_state" in
21939 *yes) ;;
21940 *) REPLACE_MBSTATE_T=1 ;;
21941 esac
21942 case "$gl_cv_func_mbrtowc_sanitycheck" in
21943 *yes) ;;
21944 *) REPLACE_MBSTATE_T=1 ;;
21945 esac
21946 else
21947 REPLACE_MBSTATE_T=1
21948 fi
21949
21950
21951
21952 :
21953
21954
21955
21956
21957
21958 if test $ac_cv_func_mbrtowc = no; then
21959 HAVE_MBRTOWC=0
21960 ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
21961 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21962 <wchar.h>.
21963 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21964 included before <wchar.h>. */
21965 #include <stddef.h>
21966 #include <stdio.h>
21967 #include <time.h>
21968 #include <wchar.h>
21969
21970 "
21971 if test "x$ac_cv_have_decl_mbrtowc" = xyes; then :
21972 ac_have_decl=1
21973 else
21974 ac_have_decl=0
21975 fi
21976
21977 cat >>confdefs.h <<_ACEOF
21978 #define HAVE_DECL_MBRTOWC $ac_have_decl
21979 _ACEOF
21980
21981 if test $ac_cv_have_decl_mbrtowc = yes; then
21982 REPLACE_MBRTOWC=1
21983 fi
21984 else
21985 if test $REPLACE_MBSTATE_T = 1; then
21986 REPLACE_MBRTOWC=1
21987 else
21988
21989
21990
21991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
21992 $as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
21993 if ${gl_cv_func_mbrtowc_null_arg1+:} false; then :
21994 $as_echo_n "(cached) " >&6
21995 else
21996
21997 case "$host_os" in
21998 # Guess no on Solaris.
21999 solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
22000 # Guess yes otherwise.
22001 *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
22002 esac
22003 if test $LOCALE_FR_UTF8 != none; then
22004 if test "$cross_compiling" = yes; then :
22005 :
22006 else
22007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22008 /* end confdefs.h. */
22009
22010 #include <locale.h>
22011 #include <stdlib.h>
22012 #include <string.h>
22013 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22014 <wchar.h>.
22015 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22016 included before <wchar.h>. */
22017 #include <stddef.h>
22018 #include <stdio.h>
22019 #include <time.h>
22020 #include <wchar.h>
22021 int main ()
22022 {
22023 int result = 0;
22024
22025 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
22026 {
22027 char input[] = "\303\237er";
22028 mbstate_t state;
22029 wchar_t wc;
22030 size_t ret;
22031
22032 memset (&state, '\0', sizeof (mbstate_t));
22033 wc = (wchar_t) 0xBADFACE;
22034 ret = mbrtowc (&wc, input, 5, &state);
22035 if (ret != 2)
22036 result |= 1;
22037 if (!mbsinit (&state))
22038 result |= 2;
22039
22040 memset (&state, '\0', sizeof (mbstate_t));
22041 ret = mbrtowc (NULL, input, 5, &state);
22042 if (ret != 2) /* Solaris 7 fails here: ret is -1. */
22043 result |= 4;
22044 if (!mbsinit (&state))
22045 result |= 8;
22046 }
22047 return result;
22048 }
22049 _ACEOF
22050 if ac_fn_c_try_run "$LINENO"; then :
22051 gl_cv_func_mbrtowc_null_arg1=yes
22052 else
22053 gl_cv_func_mbrtowc_null_arg1=no
22054 fi
22055 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22056 conftest.$ac_objext conftest.beam conftest.$ac_ext
22057 fi
22058
22059 fi
22060
22061 fi
22062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
22063 $as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; }
22064
22065
22066
22067
22068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
22069 $as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
22070 if ${gl_cv_func_mbrtowc_null_arg2+:} false; then :
22071 $as_echo_n "(cached) " >&6
22072 else
22073
22074 case "$host_os" in
22075 # Guess no on OSF/1.
22076 osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
22077 # Guess yes otherwise.
22078 *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
22079 esac
22080 if test $LOCALE_FR_UTF8 != none; then
22081 if test "$cross_compiling" = yes; then :
22082 :
22083 else
22084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22085 /* end confdefs.h. */
22086
22087 #include <locale.h>
22088 #include <string.h>
22089 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22090 <wchar.h>.
22091 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22092 included before <wchar.h>. */
22093 #include <stddef.h>
22094 #include <stdio.h>
22095 #include <time.h>
22096 #include <wchar.h>
22097 int main ()
22098 {
22099 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
22100 {
22101 mbstate_t state;
22102 wchar_t wc;
22103 int ret;
22104
22105 memset (&state, '\0', sizeof (mbstate_t));
22106 wc = (wchar_t) 0xBADFACE;
22107 mbrtowc (&wc, NULL, 5, &state);
22108 /* Check that wc was not modified. */
22109 if (wc != (wchar_t) 0xBADFACE)
22110 return 1;
22111 }
22112 return 0;
22113 }
22114 _ACEOF
22115 if ac_fn_c_try_run "$LINENO"; then :
22116 gl_cv_func_mbrtowc_null_arg2=yes
22117 else
22118 gl_cv_func_mbrtowc_null_arg2=no
22119 fi
22120 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22121 conftest.$ac_objext conftest.beam conftest.$ac_ext
22122 fi
22123
22124 fi
22125
22126 fi
22127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
22128 $as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; }
22129
22130
22131
22132
22133
22134
22135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
22136 $as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
22137 if ${gl_cv_func_mbrtowc_retval+:} false; then :
22138 $as_echo_n "(cached) " >&6
22139 else
22140
22141 case "$host_os" in
22142 # Guess no on HP-UX, Solaris, native Windows.
22143 hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
22144 # Guess yes otherwise.
22145 *) gl_cv_func_mbrtowc_retval="guessing yes" ;;
22146 esac
22147 if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
22148 || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
22149 if test "$cross_compiling" = yes; then :
22150 :
22151 else
22152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22153 /* end confdefs.h. */
22154
22155 #include <locale.h>
22156 #include <string.h>
22157 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22158 <wchar.h>.
22159 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22160 included before <wchar.h>. */
22161 #include <stddef.h>
22162 #include <stdio.h>
22163 #include <time.h>
22164 #include <wchar.h>
22165 int main ()
22166 {
22167 int result = 0;
22168 int found_some_locale = 0;
22169 /* This fails on Solaris. */
22170 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
22171 {
22172 char input[] = "B\303\274\303\237er"; /* "Büßer" */
22173 mbstate_t state;
22174 wchar_t wc;
22175
22176 memset (&state, '\0', sizeof (mbstate_t));
22177 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
22178 {
22179 input[1] = '\0';
22180 if (mbrtowc (&wc, input + 2, 5, &state) != 1)
22181 result |= 1;
22182 }
22183 found_some_locale = 1;
22184 }
22185 /* This fails on HP-UX 11.11. */
22186 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
22187 {
22188 char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
22189 mbstate_t state;
22190 wchar_t wc;
22191
22192 memset (&state, '\0', sizeof (mbstate_t));
22193 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
22194 {
22195 input[1] = '\0';
22196 if (mbrtowc (&wc, input + 2, 5, &state) != 2)
22197 result |= 2;
22198 }
22199 found_some_locale = 1;
22200 }
22201 /* This fails on native Windows. */
22202 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
22203 {
22204 char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
22205 mbstate_t state;
22206 wchar_t wc;
22207
22208 memset (&state, '\0', sizeof (mbstate_t));
22209 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
22210 {
22211 input[3] = '\0';
22212 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
22213 result |= 4;
22214 }
22215 found_some_locale = 1;
22216 }
22217 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
22218 {
22219 char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
22220 mbstate_t state;
22221 wchar_t wc;
22222
22223 memset (&state, '\0', sizeof (mbstate_t));
22224 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
22225 {
22226 input[3] = '\0';
22227 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
22228 result |= 8;
22229 }
22230 found_some_locale = 1;
22231 }
22232 if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
22233 {
22234 char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
22235 mbstate_t state;
22236 wchar_t wc;
22237
22238 memset (&state, '\0', sizeof (mbstate_t));
22239 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
22240 {
22241 input[3] = '\0';
22242 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
22243 result |= 16;
22244 }
22245 found_some_locale = 1;
22246 }
22247 return (found_some_locale ? result : 77);
22248 }
22249 _ACEOF
22250 if ac_fn_c_try_run "$LINENO"; then :
22251 gl_cv_func_mbrtowc_retval=yes
22252 else
22253 if test $? != 77; then
22254 gl_cv_func_mbrtowc_retval=no
22255 fi
22256
22257 fi
22258 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22259 conftest.$ac_objext conftest.beam conftest.$ac_ext
22260 fi
22261
22262 fi
22263
22264 fi
22265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
22266 $as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
22267
22268
22269
22270
22271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
22272 $as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
22273 if ${gl_cv_func_mbrtowc_nul_retval+:} false; then :
22274 $as_echo_n "(cached) " >&6
22275 else
22276
22277 case "$host_os" in
22278 # Guess no on Solaris 8 and 9.
22279 solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
22280 # Guess yes otherwise.
22281 *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
22282 esac
22283 if test $LOCALE_ZH_CN != none; then
22284 if test "$cross_compiling" = yes; then :
22285 :
22286 else
22287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22288 /* end confdefs.h. */
22289
22290 #include <locale.h>
22291 #include <string.h>
22292 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22293 <wchar.h>.
22294 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22295 included before <wchar.h>. */
22296 #include <stddef.h>
22297 #include <stdio.h>
22298 #include <time.h>
22299 #include <wchar.h>
22300 int main ()
22301 {
22302 /* This fails on Solaris 8 and 9. */
22303 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
22304 {
22305 mbstate_t state;
22306 wchar_t wc;
22307
22308 memset (&state, '\0', sizeof (mbstate_t));
22309 if (mbrtowc (&wc, "", 1, &state) != 0)
22310 return 1;
22311 }
22312 return 0;
22313 }
22314 _ACEOF
22315 if ac_fn_c_try_run "$LINENO"; then :
22316 gl_cv_func_mbrtowc_nul_retval=yes
22317 else
22318 gl_cv_func_mbrtowc_nul_retval=no
22319 fi
22320 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22321 conftest.$ac_objext conftest.beam conftest.$ac_ext
22322 fi
22323
22324 fi
22325
22326 fi
22327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
22328 $as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
22329
22330
22331
22332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5
22333 $as_echo_n "checking whether mbrtowc works on empty input... " >&6; }
22334 if ${gl_cv_func_mbrtowc_empty_input+:} false; then :
22335 $as_echo_n "(cached) " >&6
22336 else
22337
22338 case "$host_os" in
22339 # Guess no on AIX and glibc systems.
22340 aix* | *-gnu*)
22341 gl_cv_func_mbrtowc_empty_input="guessing no" ;;
22342 *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
22343 esac
22344 if test "$cross_compiling" = yes; then :
22345 :
22346 else
22347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22348 /* end confdefs.h. */
22349
22350 #include <wchar.h>
22351 static wchar_t wc;
22352 static mbstate_t mbs;
22353 int
22354 main (void)
22355 {
22356 return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
22357 }
22358 _ACEOF
22359 if ac_fn_c_try_run "$LINENO"; then :
22360 gl_cv_func_mbrtowc_empty_input=yes
22361 else
22362 gl_cv_func_mbrtowc_empty_input=no
22363 fi
22364 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22365 conftest.$ac_objext conftest.beam conftest.$ac_ext
22366 fi
22367
22368
22369 fi
22370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5
22371 $as_echo "$gl_cv_func_mbrtowc_empty_input" >&6; }
22372
22373
22374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
22375 $as_echo_n "checking whether the C locale is free of encoding errors... " >&6; }
22376 if ${gl_cv_C_locale_sans_EILSEQ+:} false; then :
22377 $as_echo_n "(cached) " >&6
22378 else
22379
22380 gl_cv_C_locale_sans_EILSEQ="guessing no"
22381
22382 if test "$cross_compiling" = yes; then :
22383 :
22384 else
22385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22386 /* end confdefs.h. */
22387 #include <limits.h>
22388 #include <locale.h>
22389 #include <wchar.h>
22390
22391 int
22392 main ()
22393 {
22394
22395 int i;
22396 char *locale = setlocale (LC_ALL, "C");
22397 if (! locale)
22398 return 1;
22399 for (i = CHAR_MIN; i <= CHAR_MAX; i++)
22400 {
22401 char c = i;
22402 wchar_t wc;
22403 mbstate_t mbs = { 0, };
22404 size_t ss = mbrtowc (&wc, &c, 1, &mbs);
22405 if (1 < ss)
22406 return 1;
22407 }
22408 return 0;
22409
22410 ;
22411 return 0;
22412 }
22413 _ACEOF
22414 if ac_fn_c_try_run "$LINENO"; then :
22415 gl_cv_C_locale_sans_EILSEQ=yes
22416 else
22417 gl_cv_C_locale_sans_EILSEQ=no
22418 fi
22419 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22420 conftest.$ac_objext conftest.beam conftest.$ac_ext
22421 fi
22422
22423 fi
22424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_C_locale_sans_EILSEQ" >&5
22425 $as_echo "$gl_cv_C_locale_sans_EILSEQ" >&6; }
22426
22427 case "$gl_cv_func_mbrtowc_null_arg1" in
22428 *yes) ;;
22429 *)
22430 $as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
22431
22432 REPLACE_MBRTOWC=1
22433 ;;
22434 esac
22435 case "$gl_cv_func_mbrtowc_null_arg2" in
22436 *yes) ;;
22437 *)
22438 $as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
22439
22440 REPLACE_MBRTOWC=1
22441 ;;
22442 esac
22443 case "$gl_cv_func_mbrtowc_retval" in
22444 *yes) ;;
22445 *)
22446 $as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
22447
22448 REPLACE_MBRTOWC=1
22449 ;;
22450 esac
22451 case "$gl_cv_func_mbrtowc_nul_retval" in
22452 *yes) ;;
22453 *)
22454 $as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
22455
22456 REPLACE_MBRTOWC=1
22457 ;;
22458 esac
22459 case "$gl_cv_func_mbrtowc_empty_input" in
22460 *yes) ;;
22461 *)
22462 $as_echo "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h
22463
22464 REPLACE_MBRTOWC=1
22465 ;;
22466 esac
22467 case $gl_cv_C_locale_sans_EILSEQ in
22468 *yes) ;;
22469 *)
22470 $as_echo "#define C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
22471
22472 REPLACE_MBRTOWC=1
22473 ;;
22474 esac
22475 fi
22476 fi
22477
22478 if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
22479
22480
22481
22482
22483
22484
22485
22486
22487 gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
22488
22489
22490 :
22491
22492 fi
22493
22494
22495
22496
22497
22498 GNULIB_MBRTOWC=1
22499
22500
22501
22502
22503
22504 $as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
22505
22506
22507
22508
22509
22510
22511
22512
22513
22514
22515
22516
22517
22518 :
22519
22520
22521
22522
22523
22524
22525 :
22526
22527
22528
22529
22530
22531 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
22532
22533
22534
22535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
22536 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
22537 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
22538 $as_echo_n "(cached) " >&6
22539 else
22540
22541 case "$host_os" in
22542 # Guess no on AIX and OSF/1.
22543 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
22544 # Guess yes otherwise.
22545 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
22546 esac
22547 if test $LOCALE_JA != none; then
22548 if test "$cross_compiling" = yes; then :
22549 :
22550 else
22551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22552 /* end confdefs.h. */
22553
22554 #include <locale.h>
22555 #include <string.h>
22556 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22557 <wchar.h>.
22558 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22559 included before <wchar.h>. */
22560 #include <stddef.h>
22561 #include <stdio.h>
22562 #include <time.h>
22563 #include <wchar.h>
22564 int main ()
22565 {
22566 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
22567 {
22568 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
22569 mbstate_t state;
22570 wchar_t wc;
22571
22572 memset (&state, '\0', sizeof (mbstate_t));
22573 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
22574 if (mbsinit (&state))
22575 return 1;
22576 }
22577 return 0;
22578 }
22579 _ACEOF
22580 if ac_fn_c_try_run "$LINENO"; then :
22581 gl_cv_func_mbrtowc_incomplete_state=yes
22582 else
22583 gl_cv_func_mbrtowc_incomplete_state=no
22584 fi
22585 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22586 conftest.$ac_objext conftest.beam conftest.$ac_ext
22587 fi
22588
22589 fi
22590
22591 fi
22592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
22593 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
22594
22595
22596
22597
22598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
22599 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
22600 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
22601 $as_echo_n "(cached) " >&6
22602 else
22603
22604 case "$host_os" in
22605 # Guess no on Solaris 8.
22606 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
22607 # Guess yes otherwise.
22608 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
22609 esac
22610 if test $LOCALE_ZH_CN != none; then
22611 if test "$cross_compiling" = yes; then :
22612 :
22613 else
22614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22615 /* end confdefs.h. */
22616
22617 #include <locale.h>
22618 #include <stdlib.h>
22619 #include <string.h>
22620 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22621 <wchar.h>.
22622 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22623 included before <wchar.h>. */
22624 #include <stddef.h>
22625 #include <stdio.h>
22626 #include <time.h>
22627 #include <wchar.h>
22628 int main ()
22629 {
22630 /* This fails on Solaris 8:
22631 mbrtowc returns 2, and sets wc to 0x00F0.
22632 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
22633 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
22634 {
22635 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
22636 mbstate_t state;
22637 wchar_t wc;
22638
22639 memset (&state, '\0', sizeof (mbstate_t));
22640 if (mbrtowc (&wc, input + 3, 6, &state) != 4
22641 && mbtowc (&wc, input + 3, 6) == 4)
22642 return 1;
22643 }
22644 return 0;
22645 }
22646 _ACEOF
22647 if ac_fn_c_try_run "$LINENO"; then :
22648 gl_cv_func_mbrtowc_sanitycheck=yes
22649 else
22650 gl_cv_func_mbrtowc_sanitycheck=no
22651 fi
22652 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22653 conftest.$ac_objext conftest.beam conftest.$ac_ext
22654 fi
22655
22656 fi
22657
22658 fi
22659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
22660 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
22661
22662 REPLACE_MBSTATE_T=0
22663 case "$gl_cv_func_mbrtowc_incomplete_state" in
22664 *yes) ;;
22665 *) REPLACE_MBSTATE_T=1 ;;
22666 esac
22667 case "$gl_cv_func_mbrtowc_sanitycheck" in
22668 *yes) ;;
22669 *) REPLACE_MBSTATE_T=1 ;;
22670 esac
22671 else
22672 REPLACE_MBSTATE_T=1
22673 fi
22674
22675
22676
22677 :
22678
22679
22680
22681
22682
22683 if test $ac_cv_func_mbsinit = no; then
22684 HAVE_MBSINIT=0
22685 ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
22686 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22687 <wchar.h>.
22688 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22689 included before <wchar.h>. */
22690 #include <stddef.h>
22691 #include <stdio.h>
22692 #include <time.h>
22693 #include <wchar.h>
22694
22695 "
22696 if test "x$ac_cv_have_decl_mbsinit" = xyes; then :
22697 ac_have_decl=1
22698 else
22699 ac_have_decl=0
22700 fi
22701
22702 cat >>confdefs.h <<_ACEOF
22703 #define HAVE_DECL_MBSINIT $ac_have_decl
22704 _ACEOF
22705
22706 if test $ac_cv_have_decl_mbsinit = yes; then
22707 REPLACE_MBSINIT=1
22708 fi
22709 else
22710 if test $REPLACE_MBSTATE_T = 1; then
22711 REPLACE_MBSINIT=1
22712 else
22713 case "$host_os" in
22714 mingw*) REPLACE_MBSINIT=1 ;;
22715 esac
22716 fi
22717 fi
22718
22719 if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
22720
22721
22722
22723
22724
22725
22726
22727
22728 gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
22729
22730
22731 :
22732
22733 fi
22734
22735
22736
22737
22738
22739 GNULIB_MBSINIT=1
22740
22741
22742
22743
22744
22745 $as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
22746
22747
22748
22749
22750
22751
22752
22753
22754
22755
22756
22757
22758 :
22759
22760
22761
22762
22763
22764
22765 :
22766
22767
22768
22769
22770
22771 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
22772
22773
22774
22775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
22776 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
22777 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
22778 $as_echo_n "(cached) " >&6
22779 else
22780
22781 case "$host_os" in
22782 # Guess no on AIX and OSF/1.
22783 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
22784 # Guess yes otherwise.
22785 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
22786 esac
22787 if test $LOCALE_JA != none; then
22788 if test "$cross_compiling" = yes; then :
22789 :
22790 else
22791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22792 /* end confdefs.h. */
22793
22794 #include <locale.h>
22795 #include <string.h>
22796 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22797 <wchar.h>.
22798 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22799 included before <wchar.h>. */
22800 #include <stddef.h>
22801 #include <stdio.h>
22802 #include <time.h>
22803 #include <wchar.h>
22804 int main ()
22805 {
22806 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
22807 {
22808 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
22809 mbstate_t state;
22810 wchar_t wc;
22811
22812 memset (&state, '\0', sizeof (mbstate_t));
22813 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
22814 if (mbsinit (&state))
22815 return 1;
22816 }
22817 return 0;
22818 }
22819 _ACEOF
22820 if ac_fn_c_try_run "$LINENO"; then :
22821 gl_cv_func_mbrtowc_incomplete_state=yes
22822 else
22823 gl_cv_func_mbrtowc_incomplete_state=no
22824 fi
22825 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22826 conftest.$ac_objext conftest.beam conftest.$ac_ext
22827 fi
22828
22829 fi
22830
22831 fi
22832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
22833 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
22834
22835
22836
22837
22838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
22839 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
22840 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
22841 $as_echo_n "(cached) " >&6
22842 else
22843
22844 case "$host_os" in
22845 # Guess no on Solaris 8.
22846 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
22847 # Guess yes otherwise.
22848 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
22849 esac
22850 if test $LOCALE_ZH_CN != none; then
22851 if test "$cross_compiling" = yes; then :
22852 :
22853 else
22854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22855 /* end confdefs.h. */
22856
22857 #include <locale.h>
22858 #include <stdlib.h>
22859 #include <string.h>
22860 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22861 <wchar.h>.
22862 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22863 included before <wchar.h>. */
22864 #include <stddef.h>
22865 #include <stdio.h>
22866 #include <time.h>
22867 #include <wchar.h>
22868 int main ()
22869 {
22870 /* This fails on Solaris 8:
22871 mbrtowc returns 2, and sets wc to 0x00F0.
22872 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
22873 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
22874 {
22875 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
22876 mbstate_t state;
22877 wchar_t wc;
22878
22879 memset (&state, '\0', sizeof (mbstate_t));
22880 if (mbrtowc (&wc, input + 3, 6, &state) != 4
22881 && mbtowc (&wc, input + 3, 6) == 4)
22882 return 1;
22883 }
22884 return 0;
22885 }
22886 _ACEOF
22887 if ac_fn_c_try_run "$LINENO"; then :
22888 gl_cv_func_mbrtowc_sanitycheck=yes
22889 else
22890 gl_cv_func_mbrtowc_sanitycheck=no
22891 fi
22892 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22893 conftest.$ac_objext conftest.beam conftest.$ac_ext
22894 fi
22895
22896 fi
22897
22898 fi
22899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
22900 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
22901
22902 REPLACE_MBSTATE_T=0
22903 case "$gl_cv_func_mbrtowc_incomplete_state" in
22904 *yes) ;;
22905 *) REPLACE_MBSTATE_T=1 ;;
22906 esac
22907 case "$gl_cv_func_mbrtowc_sanitycheck" in
22908 *yes) ;;
22909 *) REPLACE_MBSTATE_T=1 ;;
22910 esac
22911 else
22912 REPLACE_MBSTATE_T=1
22913 fi
22914
22915
22916
22917 :
22918
22919
22920
22921
22922
22923 if test $ac_cv_func_mbsrtowcs = no; then
22924 HAVE_MBSRTOWCS=0
22925 ac_fn_c_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" "
22926 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22927 <wchar.h>.
22928 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22929 included before <wchar.h>. */
22930 #include <stddef.h>
22931 #include <stdio.h>
22932 #include <time.h>
22933 #include <wchar.h>
22934
22935 "
22936 if test "x$ac_cv_have_decl_mbsrtowcs" = xyes; then :
22937 ac_have_decl=1
22938 else
22939 ac_have_decl=0
22940 fi
22941
22942 cat >>confdefs.h <<_ACEOF
22943 #define HAVE_DECL_MBSRTOWCS $ac_have_decl
22944 _ACEOF
22945
22946 if test $ac_cv_have_decl_mbsrtowcs = yes; then
22947 REPLACE_MBSRTOWCS=1
22948 fi
22949 else
22950 if test $REPLACE_MBSTATE_T = 1; then
22951 REPLACE_MBSRTOWCS=1
22952 else
22953
22954
22955
22956
22957
22958
22959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5
22960 $as_echo_n "checking whether mbsrtowcs works... " >&6; }
22961 if ${gl_cv_func_mbsrtowcs_works+:} false; then :
22962 $as_echo_n "(cached) " >&6
22963 else
22964
22965 case "$host_os" in
22966 # Guess no on HP-UX, Solaris, mingw.
22967 hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;;
22968 # Guess yes otherwise.
22969 *) gl_cv_func_mbsrtowcs_works="guessing yes" ;;
22970 esac
22971 if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
22972 if test "$cross_compiling" = yes; then :
22973 :
22974 else
22975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22976 /* end confdefs.h. */
22977
22978 #include <locale.h>
22979 #include <string.h>
22980 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22981 <wchar.h>.
22982 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22983 included before <wchar.h>. */
22984 #include <stddef.h>
22985 #include <stdio.h>
22986 #include <time.h>
22987 #include <wchar.h>
22988 int main ()
22989 {
22990 int result = 0;
22991 /* Test whether the function supports a NULL destination argument.
22992 This fails on native Windows. */
22993 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
22994 {
22995 const char input[] = "\337er";
22996 const char *src = input;
22997 mbstate_t state;
22998
22999 memset (&state, '\0', sizeof (mbstate_t));
23000 if (mbsrtowcs (NULL, &src, 1, &state) != 3
23001 || src != input)
23002 result |= 1;
23003 }
23004 /* Test whether the function works when started with a conversion state
23005 in non-initial state. This fails on HP-UX 11.11 and Solaris 10. */
23006 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
23007 {
23008 const char input[] = "B\303\274\303\237er";
23009 mbstate_t state;
23010
23011 memset (&state, '\0', sizeof (mbstate_t));
23012 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
23013 if (!mbsinit (&state))
23014 {
23015 const char *src = input + 2;
23016 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
23017 result |= 2;
23018 }
23019 }
23020 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
23021 {
23022 const char input[] = "<\306\374\313\334\270\354>";
23023 mbstate_t state;
23024
23025 memset (&state, '\0', sizeof (mbstate_t));
23026 if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2))
23027 if (!mbsinit (&state))
23028 {
23029 const char *src = input + 4;
23030 if (mbsrtowcs (NULL, &src, 10, &state) != 3)
23031 result |= 4;
23032 }
23033 }
23034 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
23035 {
23036 const char input[] = "B\250\271\201\060\211\070er";
23037 mbstate_t state;
23038
23039 memset (&state, '\0', sizeof (mbstate_t));
23040 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
23041 if (!mbsinit (&state))
23042 {
23043 const char *src = input + 2;
23044 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
23045 result |= 8;
23046 }
23047 }
23048 return result;
23049 }
23050 _ACEOF
23051 if ac_fn_c_try_run "$LINENO"; then :
23052 gl_cv_func_mbsrtowcs_works=yes
23053 else
23054 gl_cv_func_mbsrtowcs_works=no
23055 fi
23056 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23057 conftest.$ac_objext conftest.beam conftest.$ac_ext
23058 fi
23059
23060 fi
23061
23062 fi
23063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5
23064 $as_echo "$gl_cv_func_mbsrtowcs_works" >&6; }
23065
23066 case "$gl_cv_func_mbsrtowcs_works" in
23067 *yes) ;;
23068 *) REPLACE_MBSRTOWCS=1 ;;
23069 esac
23070 fi
23071 fi
23072
23073 if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
23074
23075
23076
23077
23078
23079
23080
23081
23082 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs.$ac_objext"
23083
23084
23085
23086
23087
23088
23089
23090
23091
23092 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext"
23093
23094
23095 :
23096
23097 fi
23098
23099
23100
23101
23102
23103 GNULIB_MBSRTOWCS=1
23104
23105
23106
23107
23108
23109 $as_echo "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h
23110
23111
23112
23113
23114 if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
23115
23116
23117
23118
23119
23120
23121
23122
23123 gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
23124
23125
23126 for ac_header in bp-sym.h
23127 do :
23128 ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
23129 if test "x$ac_cv_header_bp_sym_h" = xyes; then :
23130 cat >>confdefs.h <<_ACEOF
23131 #define HAVE_BP_SYM_H 1
23132 _ACEOF
23133
23134 fi
23135
23136 done
23137
23138
23139 fi
23140
23141
23142
23143
23144
23145 GNULIB_MEMCHR=1
23146
23147
23148
23149
23150
23151 $as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
23152
23153
23154
23155
23156
23157 if test $HAVE_DECL_MEMMEM = 1 && test $REPLACE_MEMMEM = 0; then
23158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works in linear time" >&5
23159 $as_echo_n "checking whether memmem works in linear time... " >&6; }
23160 if ${gl_cv_func_memmem_works_fast+:} false; then :
23161 $as_echo_n "(cached) " >&6
23162 else
23163 if test "$cross_compiling" = yes; then :
23164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23165 /* end confdefs.h. */
23166
23167 #include <features.h>
23168 #ifdef __GNU_LIBRARY__
23169 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2)) \
23170 && !defined __UCLIBC__
23171 Lucky user
23172 #endif
23173 #endif
23174 #ifdef __CYGWIN__
23175 #include <cygwin/version.h>
23176 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 0)
23177 Lucky user
23178 #endif
23179 #endif
23180
23181 _ACEOF
23182 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23183 $EGREP "Lucky user" >/dev/null 2>&1; then :
23184 gl_cv_func_memmem_works_fast="guessing yes"
23185 else
23186 gl_cv_func_memmem_works_fast="guessing no"
23187 fi
23188 rm -f conftest*
23189
23190
23191 else
23192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23193 /* end confdefs.h. */
23194
23195 #include <signal.h> /* for signal */
23196 #include <string.h> /* for memmem */
23197 #include <stdlib.h> /* for malloc */
23198 #include <unistd.h> /* for alarm */
23199 static void quit (int sig) { _exit (sig + 128); }
23200
23201 int
23202 main ()
23203 {
23204
23205 int result = 0;
23206 size_t m = 1000000;
23207 char *haystack = (char *) malloc (2 * m + 1);
23208 char *needle = (char *) malloc (m + 1);
23209 /* Failure to compile this test due to missing alarm is okay,
23210 since all such platforms (mingw) also lack memmem. */
23211 signal (SIGALRM, quit);
23212 alarm (5);
23213 /* Check for quadratic performance. */
23214 if (haystack && needle)
23215 {
23216 memset (haystack, 'A', 2 * m);
23217 haystack[2 * m] = 'B';
23218 memset (needle, 'A', m);
23219 needle[m] = 'B';
23220 if (!memmem (haystack, 2 * m + 1, needle, m + 1))
23221 result |= 1;
23222 }
23223 return result;
23224
23225 ;
23226 return 0;
23227 }
23228 _ACEOF
23229 if ac_fn_c_try_run "$LINENO"; then :
23230 gl_cv_func_memmem_works_fast=yes
23231 else
23232 gl_cv_func_memmem_works_fast=no
23233 fi
23234 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23235 conftest.$ac_objext conftest.beam conftest.$ac_ext
23236 fi
23237
23238
23239 fi
23240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_fast" >&5
23241 $as_echo "$gl_cv_func_memmem_works_fast" >&6; }
23242 case "$gl_cv_func_memmem_works_fast" in
23243 *yes) ;;
23244 *)
23245 REPLACE_MEMMEM=1
23246 ;;
23247 esac
23248 fi
23249
23250 if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
23251
23252
23253
23254
23255
23256
23257
23258
23259 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
23260
23261 fi
23262
23263
23264
23265
23266 for ac_func in memmem
23267 do :
23268 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
23269 if test "x$ac_cv_func_memmem" = xyes; then :
23270 cat >>confdefs.h <<_ACEOF
23271 #define HAVE_MEMMEM 1
23272 _ACEOF
23273
23274 fi
23275 done
23276
23277 if test $ac_cv_func_memmem = yes; then
23278 HAVE_MEMMEM=1
23279 else
23280 HAVE_MEMMEM=0
23281 fi
23282
23283 :
23284
23285
23286
23287
23288
23289 if test $ac_cv_have_decl_memmem = no; then
23290 HAVE_DECL_MEMMEM=0
23291 else
23292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
23293 $as_echo_n "checking whether memmem works... " >&6; }
23294 if ${gl_cv_func_memmem_works_always+:} false; then :
23295 $as_echo_n "(cached) " >&6
23296 else
23297 if test "$cross_compiling" = yes; then :
23298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23299 /* end confdefs.h. */
23300
23301 #ifdef __GNU_LIBRARY__
23302 #include <features.h>
23303 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
23304 || __GLIBC_MINOR__ > 12)) \
23305 || (__GLIBC__ > 2)) \
23306 || defined __UCLIBC__
23307 Lucky user
23308 #endif
23309 #elif defined __CYGWIN__
23310 #include <cygwin/version.h>
23311 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
23312 Lucky user
23313 #endif
23314 #else
23315 Lucky user
23316 #endif
23317
23318 _ACEOF
23319 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23320 $EGREP "Lucky user" >/dev/null 2>&1; then :
23321 gl_cv_func_memmem_works_always="guessing yes"
23322 else
23323 gl_cv_func_memmem_works_always="guessing no"
23324 fi
23325 rm -f conftest*
23326
23327
23328 else
23329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23330 /* end confdefs.h. */
23331
23332 #include <string.h> /* for memmem */
23333 #define P "_EF_BF_BD"
23334 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
23335 #define NEEDLE P P P P P
23336
23337 int
23338 main ()
23339 {
23340
23341 int result = 0;
23342 if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
23343 result |= 1;
23344 /* Check for empty needle behavior. */
23345 {
23346 const char *haystack = "AAA";
23347 if (memmem (haystack, 3, NULL, 0) != haystack)
23348 result |= 2;
23349 }
23350 return result;
23351
23352 ;
23353 return 0;
23354 }
23355 _ACEOF
23356 if ac_fn_c_try_run "$LINENO"; then :
23357 gl_cv_func_memmem_works_always=yes
23358 else
23359 gl_cv_func_memmem_works_always=no
23360 fi
23361 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23362 conftest.$ac_objext conftest.beam conftest.$ac_ext
23363 fi
23364
23365
23366 fi
23367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
23368 $as_echo "$gl_cv_func_memmem_works_always" >&6; }
23369 case "$gl_cv_func_memmem_works_always" in
23370 *yes) ;;
23371 *)
23372 REPLACE_MEMMEM=1
23373 ;;
23374 esac
23375 fi
23376 :
23377
23378 if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
23379
23380
23381
23382
23383
23384
23385
23386
23387 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
23388
23389 fi
23390
23391
23392
23393
23394
23395 GNULIB_MEMMEM=1
23396
23397
23398
23399
23400
23401 $as_echo "#define GNULIB_TEST_MEMMEM 1" >>confdefs.h
23402
23403
23404
23405
23406
23407
23408
23409
23410
23411 for ac_func in mempcpy
23412 do :
23413 ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
23414 if test "x$ac_cv_func_mempcpy" = xyes; then :
23415 cat >>confdefs.h <<_ACEOF
23416 #define HAVE_MEMPCPY 1
23417 _ACEOF
23418
23419 fi
23420 done
23421
23422 if test $ac_cv_func_mempcpy = no; then
23423 HAVE_MEMPCPY=0
23424 fi
23425
23426 if test $HAVE_MEMPCPY = 0; then
23427
23428
23429
23430
23431
23432
23433
23434
23435 gl_LIBOBJS="$gl_LIBOBJS mempcpy.$ac_objext"
23436
23437
23438 :
23439
23440 fi
23441
23442
23443
23444
23445
23446 GNULIB_MEMPCPY=1
23447
23448
23449
23450
23451
23452 $as_echo "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h
23453
23454
23455
23456
23457
23458
23459
23460
23461 :
23462
23463
23464
23465
23466
23467 if test $ac_cv_have_decl_memrchr = no; then
23468 HAVE_DECL_MEMRCHR=0
23469 fi
23470
23471 for ac_func in memrchr
23472 do :
23473 ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
23474 if test "x$ac_cv_func_memrchr" = xyes; then :
23475 cat >>confdefs.h <<_ACEOF
23476 #define HAVE_MEMRCHR 1
23477 _ACEOF
23478
23479 fi
23480 done
23481
23482
23483 if test $ac_cv_func_memrchr = no; then
23484
23485
23486
23487
23488
23489
23490
23491
23492 gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
23493
23494 :
23495 fi
23496
23497
23498
23499
23500
23501 GNULIB_MEMRCHR=1
23502
23503
23504
23505
23506
23507 $as_echo "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h
23508
23509
23510
23511
23512
23513 :
23514
23515
23516
23517
23518
23519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing slash" >&5
23520 $as_echo_n "checking whether mkdir handles trailing slash... " >&6; }
23521 if ${gl_cv_func_mkdir_trailing_slash_works+:} false; then :
23522 $as_echo_n "(cached) " >&6
23523 else
23524 rm -rf conftest.dir
23525 if test "$cross_compiling" = yes; then :
23526 case "$host_os" in
23527 # Guess yes on glibc systems.
23528 *-gnu*) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
23529 # If we don't know, assume the worst.
23530 *) gl_cv_func_mkdir_trailing_slash_works="guessing no" ;;
23531 esac
23532
23533 else
23534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23535 /* end confdefs.h. */
23536
23537 # include <sys/types.h>
23538 # include <sys/stat.h>
23539
23540 int
23541 main ()
23542 {
23543 return mkdir ("conftest.dir/", 0700);
23544 ;
23545 return 0;
23546 }
23547 _ACEOF
23548 if ac_fn_c_try_run "$LINENO"; then :
23549 gl_cv_func_mkdir_trailing_slash_works=yes
23550 else
23551 gl_cv_func_mkdir_trailing_slash_works=no
23552 fi
23553 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23554 conftest.$ac_objext conftest.beam conftest.$ac_ext
23555 fi
23556
23557 rm -rf conftest.dir
23558
23559
23560 fi
23561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_slash_works" >&5
23562 $as_echo "$gl_cv_func_mkdir_trailing_slash_works" >&6; }
23563 case "$gl_cv_func_mkdir_trailing_slash_works" in
23564 *yes) ;;
23565 *)
23566 REPLACE_MKDIR=1
23567 ;;
23568 esac
23569
23570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing dot" >&5
23571 $as_echo_n "checking whether mkdir handles trailing dot... " >&6; }
23572 if ${gl_cv_func_mkdir_trailing_dot_works+:} false; then :
23573 $as_echo_n "(cached) " >&6
23574 else
23575 rm -rf conftest.dir
23576 if test "$cross_compiling" = yes; then :
23577 case "$host_os" in
23578 # Guess yes on glibc systems.
23579 *-gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
23580 # If we don't know, assume the worst.
23581 *) gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
23582 esac
23583
23584 else
23585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23586 /* end confdefs.h. */
23587
23588 # include <sys/types.h>
23589 # include <sys/stat.h>
23590
23591 int
23592 main ()
23593 {
23594 return !mkdir ("conftest.dir/./", 0700);
23595 ;
23596 return 0;
23597 }
23598 _ACEOF
23599 if ac_fn_c_try_run "$LINENO"; then :
23600 gl_cv_func_mkdir_trailing_dot_works=yes
23601 else
23602 gl_cv_func_mkdir_trailing_dot_works=no
23603 fi
23604 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23605 conftest.$ac_objext conftest.beam conftest.$ac_ext
23606 fi
23607
23608 rm -rf conftest.dir
23609
23610
23611 fi
23612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_dot_works" >&5
23613 $as_echo "$gl_cv_func_mkdir_trailing_dot_works" >&6; }
23614 case "$gl_cv_func_mkdir_trailing_dot_works" in
23615 *yes) ;;
23616 *)
23617 REPLACE_MKDIR=1
23618
23619 $as_echo "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h
23620
23621 ;;
23622 esac
23623
23624 if test $REPLACE_MKDIR = 1; then
23625
23626
23627
23628
23629
23630
23631
23632
23633 gl_LIBOBJS="$gl_LIBOBJS mkdir.$ac_objext"
23634
23635 fi
23636
23637
23638 for ac_func in mkdtemp
23639 do :
23640 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
23641 if test "x$ac_cv_func_mkdtemp" = xyes; then :
23642 cat >>confdefs.h <<_ACEOF
23643 #define HAVE_MKDTEMP 1
23644 _ACEOF
23645
23646 fi
23647 done
23648
23649 if test $ac_cv_func_mkdtemp = no; then
23650 HAVE_MKDTEMP=0
23651 fi
23652
23653 if test $HAVE_MKDTEMP = 0; then
23654
23655
23656
23657
23658
23659
23660
23661
23662 gl_LIBOBJS="$gl_LIBOBJS mkdtemp.$ac_objext"
23663
23664 :
23665
23666 fi
23667
23668
23669
23670
23671
23672 GNULIB_MKDTEMP=1
23673
23674
23675
23676
23677
23678 $as_echo "#define GNULIB_TEST_MKDTEMP 1" >>confdefs.h
23679
23680
23681
23682
23683
23684
23685
23686
23687
23688 :
23689
23690
23691
23692
23693
23694 if test $ac_cv_func_mkostemp != yes; then
23695 HAVE_MKOSTEMP=0
23696 fi
23697
23698 if test $HAVE_MKOSTEMP = 0; then
23699
23700
23701
23702
23703
23704
23705
23706
23707 gl_LIBOBJS="$gl_LIBOBJS mkostemp.$ac_objext"
23708
23709
23710
23711 fi
23712
23713
23714 cat >>confdefs.h <<_ACEOF
23715 #define GNULIB_MKOSTEMP 1
23716 _ACEOF
23717
23718
23719
23720
23721
23722
23723
23724 GNULIB_MKOSTEMP=1
23725
23726
23727
23728
23729
23730 $as_echo "#define GNULIB_TEST_MKOSTEMP 1" >>confdefs.h
23731
23732
23733
23734
23735 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
23736
23737
23738
23739
23740
23741
23742
23743
23744 gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
23745
23746 fi
23747
23748 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
23749
23750
23751
23752
23753
23754
23755
23756
23757 gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
23758
23759 fi
23760
23761
23762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <netinet/in.h> is self-contained" >&5
23763 $as_echo_n "checking whether <netinet/in.h> is self-contained... " >&6; }
23764 if ${gl_cv_header_netinet_in_h_selfcontained+:} false; then :
23765 $as_echo_n "(cached) " >&6
23766 else
23767
23768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23769 /* end confdefs.h. */
23770 #include <netinet/in.h>
23771 int
23772 main ()
23773 {
23774
23775 ;
23776 return 0;
23777 }
23778 _ACEOF
23779 if ac_fn_c_try_compile "$LINENO"; then :
23780 gl_cv_header_netinet_in_h_selfcontained=yes
23781 else
23782 gl_cv_header_netinet_in_h_selfcontained=no
23783 fi
23784 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23785
23786 fi
23787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_netinet_in_h_selfcontained" >&5
23788 $as_echo "$gl_cv_header_netinet_in_h_selfcontained" >&6; }
23789 if test $gl_cv_header_netinet_in_h_selfcontained = yes; then
23790 NETINET_IN_H=''
23791 else
23792 NETINET_IN_H='netinet/in.h'
23793 for ac_header in netinet/in.h
23794 do :
23795 ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
23796 if test "x$ac_cv_header_netinet_in_h" = xyes; then :
23797 cat >>confdefs.h <<_ACEOF
23798 #define HAVE_NETINET_IN_H 1
23799 _ACEOF
23800
23801 fi
23802
23803 done
23804
23805
23806
23807
23808
23809
23810
23811 :
23812
23813
23814
23815
23816
23817
23818
23819
23820 if test $gl_cv_have_include_next = yes; then
23821 gl_cv_next_netinet_in_h='<'netinet/in.h'>'
23822 else
23823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <netinet/in.h>" >&5
23824 $as_echo_n "checking absolute name of <netinet/in.h>... " >&6; }
23825 if ${gl_cv_next_netinet_in_h+:} false; then :
23826 $as_echo_n "(cached) " >&6
23827 else
23828
23829 if test $ac_cv_header_netinet_in_h = yes; then
23830
23831
23832
23833
23834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23835 /* end confdefs.h. */
23836 #include <netinet/in.h>
23837 _ACEOF
23838 case "$host_os" in
23839 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23840 *) gl_absname_cpp="$ac_cpp" ;;
23841 esac
23842
23843 case "$host_os" in
23844 mingw*)
23845 gl_dirsep_regex='[/\\]'
23846 ;;
23847 *)
23848 gl_dirsep_regex='\/'
23849 ;;
23850 esac
23851 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23852 gl_header_literal_regex=`echo 'netinet/in.h' \
23853 | sed -e "$gl_make_literal_regex_sed"`
23854 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23855 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23856 s|^/[^/]|//&|
23857 p
23858 q
23859 }'
23860
23861 gl_cv_absolute_netinet_in_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23862 sed -n "$gl_absolute_header_sed"`
23863
23864 gl_header=$gl_cv_absolute_netinet_in_h
23865 gl_cv_next_netinet_in_h='"'$gl_header'"'
23866 else
23867 gl_cv_next_netinet_in_h='<'netinet/in.h'>'
23868 fi
23869
23870
23871 fi
23872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_netinet_in_h" >&5
23873 $as_echo "$gl_cv_next_netinet_in_h" >&6; }
23874 fi
23875 NEXT_NETINET_IN_H=$gl_cv_next_netinet_in_h
23876
23877 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23878 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23879 gl_next_as_first_directive='<'netinet/in.h'>'
23880 else
23881 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23882 gl_next_as_first_directive=$gl_cv_next_netinet_in_h
23883 fi
23884 NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H=$gl_next_as_first_directive
23885
23886
23887
23888
23889 if test $ac_cv_header_netinet_in_h = yes; then
23890 HAVE_NETINET_IN_H=1
23891 else
23892 HAVE_NETINET_IN_H=0
23893 fi
23894
23895 fi
23896
23897 if test -n "$NETINET_IN_H"; then
23898 GL_GENERATE_NETINET_IN_H_TRUE=
23899 GL_GENERATE_NETINET_IN_H_FALSE='#'
23900 else
23901 GL_GENERATE_NETINET_IN_H_TRUE='#'
23902 GL_GENERATE_NETINET_IN_H_FALSE=
23903 fi
23904
23905
23906
23907
23908
23909 case "$host_os" in
23910 mingw* | pw*)
23911 REPLACE_OPEN=1
23912 ;;
23913 *)
23914
23915 :
23916
23917
23918
23919
23920
23921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
23922 $as_echo_n "checking whether open recognizes a trailing slash... " >&6; }
23923 if ${gl_cv_func_open_slash+:} false; then :
23924 $as_echo_n "(cached) " >&6
23925 else
23926 # Assume that if we have lstat, we can also check symlinks.
23927 if test $ac_cv_func_lstat = yes; then
23928 touch conftest.tmp
23929 ln -s conftest.tmp conftest.lnk
23930 fi
23931 if test "$cross_compiling" = yes; then :
23932
23933 case "$host_os" in
23934 freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
23935 gl_cv_func_open_slash="guessing no" ;;
23936 *)
23937 gl_cv_func_open_slash="guessing yes" ;;
23938 esac
23939
23940 else
23941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23942 /* end confdefs.h. */
23943
23944 #include <fcntl.h>
23945 #if HAVE_UNISTD_H
23946 # include <unistd.h>
23947 #endif
23948 int main ()
23949 {
23950 int result = 0;
23951 #if HAVE_LSTAT
23952 if (open ("conftest.lnk/", O_RDONLY) != -1)
23953 result |= 1;
23954 #endif
23955 if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
23956 result |= 2;
23957 return result;
23958 }
23959 _ACEOF
23960 if ac_fn_c_try_run "$LINENO"; then :
23961 gl_cv_func_open_slash=yes
23962 else
23963 gl_cv_func_open_slash=no
23964 fi
23965 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23966 conftest.$ac_objext conftest.beam conftest.$ac_ext
23967 fi
23968
23969 rm -f conftest.sl conftest.tmp conftest.lnk
23970
23971 fi
23972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
23973 $as_echo "$gl_cv_func_open_slash" >&6; }
23974 case "$gl_cv_func_open_slash" in
23975 *no)
23976
23977 $as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
23978
23979 REPLACE_OPEN=1
23980 ;;
23981 esac
23982 ;;
23983 esac
23984
23985 if test $REPLACE_OPEN = 0; then
23986
23987
23988
23989 :
23990
23991
23992
23993
23994
23995 if test $ac_cv_func_fchdir = no; then
23996 HAVE_FCHDIR=0
23997 fi
23998
23999 if test $HAVE_FCHDIR = 0; then
24000 REPLACE_OPEN=1
24001 fi
24002 fi
24003
24004
24005
24006 if test $REPLACE_OPEN = 1; then
24007
24008
24009
24010
24011
24012
24013
24014
24015 gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
24016
24017
24018
24019 :
24020
24021 fi
24022
24023
24024
24025
24026
24027 GNULIB_OPEN=1
24028
24029
24030
24031
24032
24033 $as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h
24034
24035
24036
24037
24038
24039
24040
24041 :
24042
24043
24044
24045
24046
24047
24048 case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in
24049 yes+*yes)
24050 ;;
24051 yes+*)
24052 # Solaris 9 has *at functions, but uniformly mishandles trailing
24053 # slash in all of them.
24054 REPLACE_OPENAT=1
24055 ;;
24056 *)
24057 HAVE_OPENAT=0
24058 ;;
24059 esac
24060
24061 if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then
24062
24063
24064
24065
24066
24067
24068
24069
24070 gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext"
24071
24072
24073
24074 :
24075
24076 fi
24077
24078
24079 cat >>confdefs.h <<_ACEOF
24080 #define GNULIB_OPENAT 1
24081 _ACEOF
24082
24083
24084
24085
24086
24087
24088 GNULIB_OPENAT=1
24089
24090
24091
24092
24093
24094 $as_echo "#define GNULIB_TEST_OPENAT 1" >>confdefs.h
24095
24096
24097
24098
24099
24100
24101 for ac_func in opendir
24102 do :
24103 ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
24104 if test "x$ac_cv_func_opendir" = xyes; then :
24105 cat >>confdefs.h <<_ACEOF
24106 #define HAVE_OPENDIR 1
24107 _ACEOF
24108
24109 fi
24110 done
24111
24112 if test $ac_cv_func_opendir = no; then
24113 HAVE_OPENDIR=0
24114 fi
24115
24116
24117
24118
24119 :
24120
24121
24122
24123
24124
24125 if test $ac_cv_func_fchdir = no; then
24126 HAVE_FCHDIR=0
24127 fi
24128
24129 if test $HAVE_FCHDIR = 0; then
24130 if test $HAVE_OPENDIR = 1; then
24131 REPLACE_OPENDIR=1
24132 fi
24133 fi
24134
24135 case $host_os,$HAVE_OPENDIR in
24136 os2*,1)
24137 REPLACE_OPENDIR=1;;
24138 esac
24139
24140 if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
24141
24142
24143
24144
24145
24146
24147
24148
24149 gl_LIBOBJS="$gl_LIBOBJS opendir.$ac_objext"
24150
24151 fi
24152
24153
24154
24155
24156
24157 GNULIB_OPENDIR=1
24158
24159
24160
24161
24162
24163 $as_echo "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
24164
24165
24166
24167
24168
24169 :
24170
24171
24172
24173
24174
24175
24176
24177
24178
24179
24180 for ac_func in rawmemchr
24181 do :
24182 ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
24183 if test "x$ac_cv_func_rawmemchr" = xyes; then :
24184 cat >>confdefs.h <<_ACEOF
24185 #define HAVE_RAWMEMCHR 1
24186 _ACEOF
24187
24188 fi
24189 done
24190
24191 if test $ac_cv_func_rawmemchr = no; then
24192 HAVE_RAWMEMCHR=0
24193 fi
24194
24195 if test $HAVE_RAWMEMCHR = 0; then
24196
24197
24198
24199
24200
24201
24202
24203
24204 gl_LIBOBJS="$gl_LIBOBJS rawmemchr.$ac_objext"
24205
24206 :
24207 fi
24208
24209
24210
24211
24212
24213 GNULIB_RAWMEMCHR=1
24214
24215
24216
24217
24218
24219 $as_echo "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
24220
24221
24222
24223
24224
24225
24226 for ac_func in readdir
24227 do :
24228 ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir"
24229 if test "x$ac_cv_func_readdir" = xyes; then :
24230 cat >>confdefs.h <<_ACEOF
24231 #define HAVE_READDIR 1
24232 _ACEOF
24233
24234 fi
24235 done
24236
24237 if test $ac_cv_func_readdir = no; then
24238 HAVE_READDIR=0
24239 fi
24240
24241 if test $HAVE_READDIR = 0; then
24242
24243
24244
24245
24246
24247
24248
24249
24250 gl_LIBOBJS="$gl_LIBOBJS readdir.$ac_objext"
24251
24252 fi
24253
24254
24255
24256
24257
24258 GNULIB_READDIR=1
24259
24260
24261
24262
24263
24264 $as_echo "#define GNULIB_TEST_READDIR 1" >>confdefs.h
24265
24266
24267
24268
24269
24270
24271 :
24272
24273
24274
24275
24276
24277 if test $ac_cv_func_readlink = no; then
24278 HAVE_READLINK=0
24279 else
24280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
24281 $as_echo_n "checking whether readlink signature is correct... " >&6; }
24282 if ${gl_cv_decl_readlink_works+:} false; then :
24283 $as_echo_n "(cached) " >&6
24284 else
24285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24286 /* end confdefs.h. */
24287 #include <unistd.h>
24288 /* Cause compilation failure if original declaration has wrong type. */
24289 ssize_t readlink (const char *, char *, size_t);
24290 int
24291 main ()
24292 {
24293
24294 ;
24295 return 0;
24296 }
24297 _ACEOF
24298 if ac_fn_c_try_compile "$LINENO"; then :
24299 gl_cv_decl_readlink_works=yes
24300 else
24301 gl_cv_decl_readlink_works=no
24302 fi
24303 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24304 fi
24305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
24306 $as_echo "$gl_cv_decl_readlink_works" >&6; }
24307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
24308 $as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
24309 if ${gl_cv_func_readlink_works+:} false; then :
24310 $as_echo_n "(cached) " >&6
24311 else
24312 # We have readlink, so assume ln -s works.
24313 ln -s conftest.no-such conftest.link
24314 ln -s conftest.link conftest.lnk2
24315 if test "$cross_compiling" = yes; then :
24316 case "$host_os" in
24317 # Guess yes on glibc systems.
24318 *-gnu*) gl_cv_func_readlink_works="guessing yes" ;;
24319 # If we don't know, assume the worst.
24320 *) gl_cv_func_readlink_works="guessing no" ;;
24321 esac
24322
24323 else
24324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24325 /* end confdefs.h. */
24326 #include <unistd.h>
24327
24328 int
24329 main ()
24330 {
24331 char buf[20];
24332 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
24333 ;
24334 return 0;
24335 }
24336 _ACEOF
24337 if ac_fn_c_try_run "$LINENO"; then :
24338 gl_cv_func_readlink_works=yes
24339 else
24340 gl_cv_func_readlink_works=no
24341 fi
24342 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24343 conftest.$ac_objext conftest.beam conftest.$ac_ext
24344 fi
24345
24346 rm -f conftest.link conftest.lnk2
24347 fi
24348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
24349 $as_echo "$gl_cv_func_readlink_works" >&6; }
24350 case "$gl_cv_func_readlink_works" in
24351 *yes)
24352 if test "$gl_cv_decl_readlink_works" != yes; then
24353 REPLACE_READLINK=1
24354 fi
24355 ;;
24356 *)
24357
24358 $as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
24359
24360 REPLACE_READLINK=1
24361 ;;
24362 esac
24363 fi
24364
24365 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
24366
24367
24368
24369
24370
24371
24372
24373
24374 gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
24375
24376
24377 :
24378
24379 fi
24380
24381
24382
24383
24384
24385 GNULIB_READLINK=1
24386
24387
24388
24389
24390
24391 $as_echo "#define GNULIB_TEST_READLINK 1" >>confdefs.h
24392
24393
24394
24395
24396
24397
24398 if test $gl_cv_func_malloc_posix = yes; then
24399
24400 $as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h
24401
24402 else
24403 REPLACE_REALLOC=1
24404 fi
24405
24406 if test $REPLACE_REALLOC = 1; then
24407
24408
24409
24410
24411
24412
24413
24414
24415 gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
24416
24417 fi
24418
24419
24420
24421
24422
24423 GNULIB_REALLOC_POSIX=1
24424
24425
24426
24427
24428
24429 $as_echo "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
24430
24431
24432
24433
24434
24435
24436
24437 :
24438
24439
24440
24441
24442
24443
24444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on destination" >&5
24445 $as_echo_n "checking whether rename honors trailing slash on destination... " >&6; }
24446 if ${gl_cv_func_rename_slash_dst_works+:} false; then :
24447 $as_echo_n "(cached) " >&6
24448 else
24449 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
24450 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
24451 as_fn_error $? "cannot create temporary files" "$LINENO" 5
24452 # Assume that if we have lstat, we can also check symlinks.
24453 if test $ac_cv_func_lstat = yes; then
24454 ln -s conftest.f conftest.lnk
24455 fi
24456 if test "$cross_compiling" = yes; then :
24457 case "$host_os" in
24458 # Guess yes on glibc systems.
24459 *-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
24460 # If we don't know, assume the worst.
24461 *) gl_cv_func_rename_slash_dst_works="guessing no" ;;
24462 esac
24463
24464 else
24465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24466 /* end confdefs.h. */
24467
24468 # include <stdio.h>
24469 # include <stdlib.h>
24470
24471 int
24472 main ()
24473 {
24474 int result = 0;
24475 if (rename ("conftest.f1", "conftest.f2/") == 0)
24476 result |= 1;
24477 if (rename ("conftest.d1", "conftest.d2/") != 0)
24478 result |= 2;
24479 #if HAVE_LSTAT
24480 if (rename ("conftest.f", "conftest.lnk/") == 0)
24481 result |= 4;
24482 #endif
24483 return result;
24484
24485 ;
24486 return 0;
24487 }
24488 _ACEOF
24489 if ac_fn_c_try_run "$LINENO"; then :
24490 gl_cv_func_rename_slash_dst_works=yes
24491 else
24492 gl_cv_func_rename_slash_dst_works=no
24493 fi
24494 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24495 conftest.$ac_objext conftest.beam conftest.$ac_ext
24496 fi
24497
24498 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
24499
24500 fi
24501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_dst_works" >&5
24502 $as_echo "$gl_cv_func_rename_slash_dst_works" >&6; }
24503 case "$gl_cv_func_rename_slash_dst_works" in
24504 *yes) ;;
24505 *)
24506 REPLACE_RENAME=1
24507
24508 $as_echo "#define RENAME_TRAILING_SLASH_DEST_BUG 1" >>confdefs.h
24509
24510 ;;
24511 esac
24512
24513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on source" >&5
24514 $as_echo_n "checking whether rename honors trailing slash on source... " >&6; }
24515 if ${gl_cv_func_rename_slash_src_works+:} false; then :
24516 $as_echo_n "(cached) " >&6
24517 else
24518 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
24519 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
24520 as_fn_error $? "cannot create temporary files" "$LINENO" 5
24521 # Assume that if we have lstat, we can also check symlinks.
24522 if test $ac_cv_func_lstat = yes; then
24523 ln -s conftest.f conftest.lnk
24524 fi
24525 if test "$cross_compiling" = yes; then :
24526 case "$host_os" in
24527 # Guess yes on glibc systems.
24528 *-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
24529 # If we don't know, assume the worst.
24530 *) gl_cv_func_rename_slash_src_works="guessing no" ;;
24531 esac
24532
24533 else
24534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24535 /* end confdefs.h. */
24536
24537 # include <stdio.h>
24538 # include <stdlib.h>
24539
24540 int
24541 main ()
24542 {
24543 int result = 0;
24544 if (rename ("conftest.f1/", "conftest.d3") == 0)
24545 result |= 1;
24546 if (rename ("conftest.d1/", "conftest.d2") != 0)
24547 result |= 2;
24548 #if HAVE_LSTAT
24549 if (rename ("conftest.lnk/", "conftest.f") == 0)
24550 result |= 4;
24551 #endif
24552 return result;
24553
24554 ;
24555 return 0;
24556 }
24557 _ACEOF
24558 if ac_fn_c_try_run "$LINENO"; then :
24559 gl_cv_func_rename_slash_src_works=yes
24560 else
24561 gl_cv_func_rename_slash_src_works=no
24562 fi
24563 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24564 conftest.$ac_objext conftest.beam conftest.$ac_ext
24565 fi
24566
24567 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
24568
24569 fi
24570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_src_works" >&5
24571 $as_echo "$gl_cv_func_rename_slash_src_works" >&6; }
24572 case "$gl_cv_func_rename_slash_src_works" in
24573 *yes) ;;
24574 *)
24575 REPLACE_RENAME=1
24576
24577 $as_echo "#define RENAME_TRAILING_SLASH_SOURCE_BUG 1" >>confdefs.h
24578
24579 ;;
24580 esac
24581
24582
24583 :
24584
24585
24586
24587
24588
24589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5
24590 $as_echo_n "checking whether rename manages hard links correctly... " >&6; }
24591 if ${gl_cv_func_rename_link_works+:} false; then :
24592 $as_echo_n "(cached) " >&6
24593 else
24594 if test $ac_cv_func_link = yes; then
24595 rm -rf conftest.f conftest.f1
24596 if touch conftest.f && ln conftest.f conftest.f1 &&
24597 set x `ls -i conftest.f conftest.f1` && test "" = ""; then
24598 if test "$cross_compiling" = yes; then :
24599 case "$host_os" in
24600 # Guess yes on glibc systems.
24601 *-gnu*) gl_cv_func_rename_link_works="guessing yes" ;;
24602 # If we don't know, assume the worst.
24603 *) gl_cv_func_rename_link_works="guessing no" ;;
24604 esac
24605
24606 else
24607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24608 /* end confdefs.h. */
24609
24610 # include <stdio.h>
24611 # include <stdlib.h>
24612 # include <unistd.h>
24613
24614 int
24615 main ()
24616 {
24617 int result = 0;
24618 if (rename ("conftest.f", "conftest.f1"))
24619 result |= 1;
24620 if (unlink ("conftest.f1"))
24621 result |= 2;
24622 if (rename ("conftest.f", "conftest.f"))
24623 result |= 4;
24624 if (rename ("conftest.f1", "conftest.f1") == 0)
24625 result |= 8;
24626 return result;
24627
24628 ;
24629 return 0;
24630 }
24631 _ACEOF
24632 if ac_fn_c_try_run "$LINENO"; then :
24633 gl_cv_func_rename_link_works=yes
24634 else
24635 gl_cv_func_rename_link_works=no
24636 fi
24637 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24638 conftest.$ac_objext conftest.beam conftest.$ac_ext
24639 fi
24640
24641 else
24642 gl_cv_func_rename_link_works="guessing no"
24643 fi
24644 rm -rf conftest.f conftest.f1
24645 else
24646 gl_cv_func_rename_link_works=yes
24647 fi
24648
24649 fi
24650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_link_works" >&5
24651 $as_echo "$gl_cv_func_rename_link_works" >&6; }
24652 case "$gl_cv_func_rename_link_works" in
24653 *yes) ;;
24654 *)
24655 REPLACE_RENAME=1
24656
24657 $as_echo "#define RENAME_HARD_LINK_BUG 1" >>confdefs.h
24658
24659 ;;
24660 esac
24661
24662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages existing destinations correctly" >&5
24663 $as_echo_n "checking whether rename manages existing destinations correctly... " >&6; }
24664 if ${gl_cv_func_rename_dest_works+:} false; then :
24665 $as_echo_n "(cached) " >&6
24666 else
24667 rm -rf conftest.f conftest.d1 conftest.d2
24668 touch conftest.f && mkdir conftest.d1 conftest.d2 ||
24669 as_fn_error $? "cannot create temporary files" "$LINENO" 5
24670 if test "$cross_compiling" = yes; then :
24671 case "$host_os" in
24672 # Guess yes on glibc systems.
24673 *-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;;
24674 # If we don't know, assume the worst.
24675 *) gl_cv_func_rename_dest_works="guessing no" ;;
24676 esac
24677
24678 else
24679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24680 /* end confdefs.h. */
24681
24682 # include <stdio.h>
24683 # include <stdlib.h>
24684
24685 int
24686 main ()
24687 {
24688 int result = 0;
24689 if (rename ("conftest.d1", "conftest.d2") != 0)
24690 result |= 1;
24691 if (rename ("conftest.d2", "conftest.f") == 0)
24692 result |= 2;
24693 return result;
24694
24695 ;
24696 return 0;
24697 }
24698 _ACEOF
24699 if ac_fn_c_try_run "$LINENO"; then :
24700 gl_cv_func_rename_dest_works=yes
24701 else
24702 gl_cv_func_rename_dest_works=no
24703 fi
24704 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24705 conftest.$ac_objext conftest.beam conftest.$ac_ext
24706 fi
24707
24708 rm -rf conftest.f conftest.d1 conftest.d2
24709
24710 fi
24711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_dest_works" >&5
24712 $as_echo "$gl_cv_func_rename_dest_works" >&6; }
24713 case "$gl_cv_func_rename_dest_works" in
24714 *yes) ;;
24715 *)
24716 REPLACE_RENAME=1
24717
24718 $as_echo "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h
24719
24720 ;;
24721 esac
24722
24723 if test $REPLACE_RENAME = 1; then
24724
24725
24726
24727
24728
24729
24730
24731
24732 gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext"
24733
24734 fi
24735
24736
24737
24738
24739
24740 GNULIB_RENAME=1
24741
24742
24743
24744
24745
24746 $as_echo "#define GNULIB_TEST_RENAME 1" >>confdefs.h
24747
24748
24749
24750
24751
24752
24753 for ac_func in rewinddir
24754 do :
24755 ac_fn_c_check_func "$LINENO" "rewinddir" "ac_cv_func_rewinddir"
24756 if test "x$ac_cv_func_rewinddir" = xyes; then :
24757 cat >>confdefs.h <<_ACEOF
24758 #define HAVE_REWINDDIR 1
24759 _ACEOF
24760
24761 fi
24762 done
24763
24764 if test $ac_cv_func_rewinddir = no; then
24765 HAVE_REWINDDIR=0
24766 fi
24767
24768 if test $HAVE_REWINDDIR = 0; then
24769
24770
24771
24772
24773
24774
24775
24776
24777 gl_LIBOBJS="$gl_LIBOBJS rewinddir.$ac_objext"
24778
24779 fi
24780
24781
24782
24783
24784
24785 GNULIB_REWINDDIR=1
24786
24787
24788
24789
24790
24791 $as_echo "#define GNULIB_TEST_REWINDDIR 1" >>confdefs.h
24792
24793
24794
24795
24796
24797
24798 :
24799
24800
24801
24802
24803
24804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
24805 $as_echo_n "checking whether rmdir works... " >&6; }
24806 if ${gl_cv_func_rmdir_works+:} false; then :
24807 $as_echo_n "(cached) " >&6
24808 else
24809 mkdir conftest.dir
24810 touch conftest.file
24811 if test "$cross_compiling" = yes; then :
24812 case "$host_os" in
24813 # Guess yes on glibc systems.
24814 *-gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
24815 # If we don't know, assume the worst.
24816 *) gl_cv_func_rmdir_works="guessing no" ;;
24817 esac
24818
24819 else
24820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24821 /* end confdefs.h. */
24822 #include <stdio.h>
24823 #include <errno.h>
24824 #if HAVE_UNISTD_H
24825 # include <unistd.h>
24826 #else /* on Windows with MSVC */
24827 # include <direct.h>
24828 #endif
24829
24830 int
24831 main ()
24832 {
24833 int result = 0;
24834 if (!rmdir ("conftest.file/"))
24835 result |= 1;
24836 else if (errno != ENOTDIR)
24837 result |= 2;
24838 if (!rmdir ("conftest.dir/./"))
24839 result |= 4;
24840 return result;
24841
24842 ;
24843 return 0;
24844 }
24845 _ACEOF
24846 if ac_fn_c_try_run "$LINENO"; then :
24847 gl_cv_func_rmdir_works=yes
24848 else
24849 gl_cv_func_rmdir_works=no
24850 fi
24851 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24852 conftest.$ac_objext conftest.beam conftest.$ac_ext
24853 fi
24854
24855 rm -rf conftest.dir conftest.file
24856 fi
24857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
24858 $as_echo "$gl_cv_func_rmdir_works" >&6; }
24859 case "$gl_cv_func_rmdir_works" in
24860 *yes) ;;
24861 *)
24862 REPLACE_RMDIR=1
24863 ;;
24864 esac
24865
24866 if test $REPLACE_RMDIR = 1; then
24867
24868
24869
24870
24871
24872
24873
24874
24875 gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext"
24876
24877 fi
24878
24879
24880
24881
24882
24883 GNULIB_RMDIR=1
24884
24885
24886
24887
24888
24889 $as_echo "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
24890
24891
24892
24893
24894
24895 :
24896
24897
24898
24899
24900
24901
24902
24903
24904
24905
24906
24907 :
24908
24909
24910
24911
24912
24913 if test $ac_cv_func_secure_getenv = no; then
24914 HAVE_SECURE_GETENV=0
24915 fi
24916
24917 if test $HAVE_SECURE_GETENV = 0; then
24918
24919
24920
24921
24922
24923
24924
24925
24926 gl_LIBOBJS="$gl_LIBOBJS secure_getenv.$ac_objext"
24927
24928
24929 for ac_func in __secure_getenv
24930 do :
24931 ac_fn_c_check_func "$LINENO" "__secure_getenv" "ac_cv_func___secure_getenv"
24932 if test "x$ac_cv_func___secure_getenv" = xyes; then :
24933 cat >>confdefs.h <<_ACEOF
24934 #define HAVE___SECURE_GETENV 1
24935 _ACEOF
24936
24937 fi
24938 done
24939
24940 if test $ac_cv_func___secure_getenv = no; then
24941 for ac_func in issetugid
24942 do :
24943 ac_fn_c_check_func "$LINENO" "issetugid" "ac_cv_func_issetugid"
24944 if test "x$ac_cv_func_issetugid" = xyes; then :
24945 cat >>confdefs.h <<_ACEOF
24946 #define HAVE_ISSETUGID 1
24947 _ACEOF
24948
24949 fi
24950 done
24951
24952 fi
24953
24954 :
24955
24956
24957
24958
24959
24960
24961
24962
24963
24964
24965
24966
24967
24968
24969
24970 fi
24971
24972
24973
24974
24975
24976 GNULIB_SECURE_GETENV=1
24977
24978
24979
24980
24981
24982 $as_echo "#define GNULIB_TEST_SECURE_GETENV 1" >>confdefs.h
24983
24984
24985
24986
24987
24988 if test $ac_cv_func_setenv = no; then
24989 HAVE_SETENV=0
24990 else
24991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
24992 $as_echo_n "checking whether setenv validates arguments... " >&6; }
24993 if ${gl_cv_func_setenv_works+:} false; then :
24994 $as_echo_n "(cached) " >&6
24995 else
24996 if test "$cross_compiling" = yes; then :
24997 case "$host_os" in
24998 # Guess yes on glibc systems.
24999 *-gnu*) gl_cv_func_setenv_works="guessing yes" ;;
25000 # If we don't know, assume the worst.
25001 *) gl_cv_func_setenv_works="guessing no" ;;
25002 esac
25003
25004 else
25005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25006 /* end confdefs.h. */
25007
25008 #include <stdlib.h>
25009 #include <errno.h>
25010 #include <string.h>
25011
25012 int
25013 main ()
25014 {
25015
25016 int result = 0;
25017 {
25018 if (setenv ("", "", 0) != -1)
25019 result |= 1;
25020 else if (errno != EINVAL)
25021 result |= 2;
25022 }
25023 {
25024 if (setenv ("a", "=", 1) != 0)
25025 result |= 4;
25026 else if (strcmp (getenv ("a"), "=") != 0)
25027 result |= 8;
25028 }
25029 return result;
25030
25031 ;
25032 return 0;
25033 }
25034 _ACEOF
25035 if ac_fn_c_try_run "$LINENO"; then :
25036 gl_cv_func_setenv_works=yes
25037 else
25038 gl_cv_func_setenv_works=no
25039 fi
25040 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25041 conftest.$ac_objext conftest.beam conftest.$ac_ext
25042 fi
25043
25044 fi
25045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
25046 $as_echo "$gl_cv_func_setenv_works" >&6; }
25047 case "$gl_cv_func_setenv_works" in
25048 *yes) ;;
25049 *)
25050 REPLACE_SETENV=1
25051 ;;
25052 esac
25053 fi
25054
25055 if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
25056
25057
25058
25059
25060
25061
25062
25063
25064 gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext"
25065
25066 fi
25067
25068
25069
25070
25071
25072 GNULIB_SETENV=1
25073
25074
25075
25076
25077
25078 $as_echo "#define GNULIB_TEST_SETENV 1" >>confdefs.h
25079
25080
25081
25082
25083
25084
25085
25086
25087
25088
25089
25090
25091
25092
25093 if test $gl_cv_have_include_next = yes; then
25094 gl_cv_next_signal_h='<'signal.h'>'
25095 else
25096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
25097 $as_echo_n "checking absolute name of <signal.h>... " >&6; }
25098 if ${gl_cv_next_signal_h+:} false; then :
25099 $as_echo_n "(cached) " >&6
25100 else
25101
25102
25103
25104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25105 /* end confdefs.h. */
25106 #include <signal.h>
25107 _ACEOF
25108 case "$host_os" in
25109 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25110 *) gl_absname_cpp="$ac_cpp" ;;
25111 esac
25112
25113 case "$host_os" in
25114 mingw*)
25115 gl_dirsep_regex='[/\\]'
25116 ;;
25117 *)
25118 gl_dirsep_regex='\/'
25119 ;;
25120 esac
25121 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25122 gl_header_literal_regex=`echo 'signal.h' \
25123 | sed -e "$gl_make_literal_regex_sed"`
25124 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25125 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25126 s|^/[^/]|//&|
25127 p
25128 q
25129 }'
25130
25131 gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25132 sed -n "$gl_absolute_header_sed"`
25133
25134 gl_header=$gl_cv_absolute_signal_h
25135 gl_cv_next_signal_h='"'$gl_header'"'
25136
25137
25138 fi
25139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
25140 $as_echo "$gl_cv_next_signal_h" >&6; }
25141 fi
25142 NEXT_SIGNAL_H=$gl_cv_next_signal_h
25143
25144 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25145 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25146 gl_next_as_first_directive='<'signal.h'>'
25147 else
25148 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25149 gl_next_as_first_directive=$gl_cv_next_signal_h
25150 fi
25151 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
25152
25153
25154
25155
25156
25157 # AIX declares sig_atomic_t to already include volatile, and C89 compilers
25158 # then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
25159 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
25160 #include <signal.h>
25161
25162 "
25163 if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes; then :
25164
25165 else
25166 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
25167 fi
25168
25169
25170
25171
25172
25173
25174
25175 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
25176 #include <signal.h>
25177
25178 "
25179 if test "x$ac_cv_type_sighandler_t" = xyes; then :
25180
25181 else
25182 HAVE_SIGHANDLER_T=0
25183 fi
25184
25185
25186
25187 for gl_func in pthread_sigmask sigaction sigaddset sigdelset sigemptyset sigfillset sigismember sigpending sigprocmask; do
25188 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
25189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
25190 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
25191 if eval \${$as_gl_Symbol+:} false; then :
25192 $as_echo_n "(cached) " >&6
25193 else
25194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25195 /* end confdefs.h. */
25196 #include <signal.h>
25197
25198 int
25199 main ()
25200 {
25201 #undef $gl_func
25202 (void) $gl_func;
25203 ;
25204 return 0;
25205 }
25206 _ACEOF
25207 if ac_fn_c_try_compile "$LINENO"; then :
25208 eval "$as_gl_Symbol=yes"
25209 else
25210 eval "$as_gl_Symbol=no"
25211 fi
25212 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25213 fi
25214 eval ac_res=\$$as_gl_Symbol
25215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
25216 $as_echo "$ac_res" >&6; }
25217 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
25218 cat >>confdefs.h <<_ACEOF
25219 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
25220 _ACEOF
25221
25222 eval ac_cv_have_decl_$gl_func=yes
25223 fi
25224 done
25225
25226
25227 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
25228 /* <sys/types.h> is not needed according to POSIX, but the
25229 <sys/socket.h> in i386-unknown-freebsd4.10 and
25230 powerpc-apple-darwin5.5 required it. */
25231 #include <sys/types.h>
25232 #if HAVE_SYS_SOCKET_H
25233 # include <sys/socket.h>
25234 #elif HAVE_WS2TCPIP_H
25235 # include <ws2tcpip.h>
25236 #endif
25237
25238 "
25239 if test "x$ac_cv_type_socklen_t" = xyes; then :
25240
25241 else
25242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
25243 $as_echo_n "checking for socklen_t equivalent... " >&6; }
25244 if ${gl_cv_socklen_t_equiv+:} false; then :
25245 $as_echo_n "(cached) " >&6
25246 else
25247 # Systems have either "struct sockaddr *" or
25248 # "void *" as the second argument to getpeername
25249 gl_cv_socklen_t_equiv=
25250 for arg2 in "struct sockaddr" void; do
25251 for t in int size_t "unsigned int" "long int" "unsigned long int"; do
25252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25253 /* end confdefs.h. */
25254 #include <sys/types.h>
25255 #include <sys/socket.h>
25256
25257 int getpeername (int, $arg2 *, $t *);
25258 int
25259 main ()
25260 {
25261 $t len;
25262 getpeername (0, 0, &len);
25263 ;
25264 return 0;
25265 }
25266 _ACEOF
25267 if ac_fn_c_try_compile "$LINENO"; then :
25268 gl_cv_socklen_t_equiv="$t"
25269 fi
25270 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25271 test "$gl_cv_socklen_t_equiv" != "" && break
25272 done
25273 test "$gl_cv_socklen_t_equiv" != "" && break
25274 done
25275
25276 fi
25277
25278 if test "$gl_cv_socklen_t_equiv" = ""; then
25279 as_fn_error $? "Cannot find a type to use in place of socklen_t" "$LINENO" 5
25280 fi
25281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
25282 $as_echo "$gl_cv_socklen_t_equiv" >&6; }
25283
25284 cat >>confdefs.h <<_ACEOF
25285 #define socklen_t $gl_cv_socklen_t_equiv
25286 _ACEOF
25287
25288 fi
25289
25290
25291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
25292 $as_echo_n "checking for ssize_t... " >&6; }
25293 if ${gt_cv_ssize_t+:} false; then :
25294 $as_echo_n "(cached) " >&6
25295 else
25296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25297 /* end confdefs.h. */
25298 #include <sys/types.h>
25299 int
25300 main ()
25301 {
25302 int x = sizeof (ssize_t *) + sizeof (ssize_t);
25303 return !x;
25304 ;
25305 return 0;
25306 }
25307 _ACEOF
25308 if ac_fn_c_try_compile "$LINENO"; then :
25309 gt_cv_ssize_t=yes
25310 else
25311 gt_cv_ssize_t=no
25312 fi
25313 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25314 fi
25315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
25316 $as_echo "$gt_cv_ssize_t" >&6; }
25317 if test $gt_cv_ssize_t = no; then
25318
25319 $as_echo "#define ssize_t int" >>confdefs.h
25320
25321 fi
25322
25323
25324
25325
25326 :
25327
25328
25329
25330
25331
25332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
25333 $as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
25334 if ${gl_cv_func_stat_dir_slash+:} false; then :
25335 $as_echo_n "(cached) " >&6
25336 else
25337 if test "$cross_compiling" = yes; then :
25338 case $host_os in
25339 mingw*) gl_cv_func_stat_dir_slash="guessing no";;
25340 *) gl_cv_func_stat_dir_slash="guessing yes";;
25341 esac
25342 else
25343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25344 /* end confdefs.h. */
25345 #include <sys/stat.h>
25346
25347 int
25348 main ()
25349 {
25350 struct stat st; return stat (".", &st) != stat ("./", &st);
25351 ;
25352 return 0;
25353 }
25354 _ACEOF
25355 if ac_fn_c_try_run "$LINENO"; then :
25356 gl_cv_func_stat_dir_slash=yes
25357 else
25358 gl_cv_func_stat_dir_slash=no
25359 fi
25360 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25361 conftest.$ac_objext conftest.beam conftest.$ac_ext
25362 fi
25363
25364 fi
25365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
25366 $as_echo "$gl_cv_func_stat_dir_slash" >&6; }
25367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
25368 $as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
25369 if ${gl_cv_func_stat_file_slash+:} false; then :
25370 $as_echo_n "(cached) " >&6
25371 else
25372 touch conftest.tmp
25373 # Assume that if we have lstat, we can also check symlinks.
25374 if test $ac_cv_func_lstat = yes; then
25375 ln -s conftest.tmp conftest.lnk
25376 fi
25377 if test "$cross_compiling" = yes; then :
25378 case "$host_os" in
25379 # Guess yes on glibc systems.
25380 *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
25381 # If we don't know, assume the worst.
25382 *) gl_cv_func_stat_file_slash="guessing no" ;;
25383 esac
25384
25385 else
25386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25387 /* end confdefs.h. */
25388 #include <sys/stat.h>
25389
25390 int
25391 main ()
25392 {
25393 int result = 0;
25394 struct stat st;
25395 if (!stat ("conftest.tmp/", &st))
25396 result |= 1;
25397 #if HAVE_LSTAT
25398 if (!stat ("conftest.lnk/", &st))
25399 result |= 2;
25400 #endif
25401 return result;
25402
25403 ;
25404 return 0;
25405 }
25406 _ACEOF
25407 if ac_fn_c_try_run "$LINENO"; then :
25408 gl_cv_func_stat_file_slash=yes
25409 else
25410 gl_cv_func_stat_file_slash=no
25411 fi
25412 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25413 conftest.$ac_objext conftest.beam conftest.$ac_ext
25414 fi
25415
25416 rm -f conftest.tmp conftest.lnk
25417 fi
25418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
25419 $as_echo "$gl_cv_func_stat_file_slash" >&6; }
25420 case $gl_cv_func_stat_dir_slash in
25421 *no) REPLACE_STAT=1
25422
25423 $as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
25424 ;;
25425 esac
25426 case $gl_cv_func_stat_file_slash in
25427 *no) REPLACE_STAT=1
25428
25429 $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
25430 ;;
25431 esac
25432
25433 if test $REPLACE_STAT = 1; then
25434
25435
25436
25437
25438
25439
25440
25441
25442 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
25443
25444 :
25445 fi
25446
25447
25448
25449
25450
25451 GNULIB_STAT=1
25452
25453
25454
25455
25456
25457 $as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h
25458
25459
25460
25461
25462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
25463 $as_echo_n "checking for working stdalign.h... " >&6; }
25464 if ${gl_cv_header_working_stdalign_h+:} false; then :
25465 $as_echo_n "(cached) " >&6
25466 else
25467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25468 /* end confdefs.h. */
25469 #include <stdalign.h>
25470 #include <stddef.h>
25471
25472 /* Test that alignof yields a result consistent with offsetof.
25473 This catches GCC bug 52023
25474 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
25475 #ifdef __cplusplus
25476 template <class t> struct alignof_helper { char a; t b; };
25477 # define ao(type) offsetof (alignof_helper<type>, b)
25478 #else
25479 # define ao(type) offsetof (struct { char a; type b; }, b)
25480 #endif
25481 char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
25482 char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
25483 char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
25484
25485 /* Test _Alignas only on platforms where gnulib can help. */
25486 #if \
25487 ((defined __cplusplus && 201103 <= __cplusplus) \
25488 || (defined __APPLE__ && defined __MACH__ \
25489 ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
25490 : __GNUC__) \
25491 || __HP_cc || __HP_aCC || __IBMC__ || __IBMCPP__ \
25492 || __ICC || 0x5110 <= __SUNPRO_C \
25493 || 1300 <= _MSC_VER)
25494 struct alignas_test { char c; char alignas (8) alignas_8; };
25495 char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
25496 ? 1 : -1];
25497 #endif
25498
25499 int
25500 main ()
25501 {
25502
25503 ;
25504 return 0;
25505 }
25506 _ACEOF
25507 if ac_fn_c_try_compile "$LINENO"; then :
25508 gl_cv_header_working_stdalign_h=yes
25509 else
25510 gl_cv_header_working_stdalign_h=no
25511 fi
25512 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25513 fi
25514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
25515 $as_echo "$gl_cv_header_working_stdalign_h" >&6; }
25516
25517 if test $gl_cv_header_working_stdalign_h = yes; then
25518 STDALIGN_H=''
25519 else
25520 STDALIGN_H='stdalign.h'
25521 fi
25522
25523
25524 if test -n "$STDALIGN_H"; then
25525 GL_GENERATE_STDALIGN_H_TRUE=
25526 GL_GENERATE_STDALIGN_H_FALSE='#'
25527 else
25528 GL_GENERATE_STDALIGN_H_TRUE='#'
25529 GL_GENERATE_STDALIGN_H_FALSE=
25530 fi
25531
25532
25533
25534
25535
25536 # Define two additional variables used in the Makefile substitution.
25537
25538 if test "$ac_cv_header_stdbool_h" = yes; then
25539 STDBOOL_H=''
25540 else
25541 STDBOOL_H='stdbool.h'
25542 fi
25543
25544 if test -n "$STDBOOL_H"; then
25545 GL_GENERATE_STDBOOL_H_TRUE=
25546 GL_GENERATE_STDBOOL_H_FALSE='#'
25547 else
25548 GL_GENERATE_STDBOOL_H_TRUE='#'
25549 GL_GENERATE_STDBOOL_H_FALSE=
25550 fi
25551
25552
25553 if test "$ac_cv_type__Bool" = yes; then
25554 HAVE__BOOL=1
25555 else
25556 HAVE__BOOL=0
25557 fi
25558
25559
25560
25561
25562
25563 STDDEF_H=
25564 ac_fn_c_check_type "$LINENO" "max_align_t" "ac_cv_type_max_align_t" "#include <stddef.h>
25565
25566 "
25567 if test "x$ac_cv_type_max_align_t" = xyes; then :
25568
25569 else
25570 HAVE_MAX_ALIGN_T=0; STDDEF_H=stddef.h
25571 fi
25572
25573 if test $gt_cv_c_wchar_t = no; then
25574 HAVE_WCHAR_T=0
25575 STDDEF_H=stddef.h
25576 fi
25577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
25578 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
25579 if ${gl_cv_decl_null_works+:} false; then :
25580 $as_echo_n "(cached) " >&6
25581 else
25582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25583 /* end confdefs.h. */
25584 #include <stddef.h>
25585 int test[2 * (sizeof NULL == sizeof (void *)) -1];
25586
25587 int
25588 main ()
25589 {
25590
25591 ;
25592 return 0;
25593 }
25594 _ACEOF
25595 if ac_fn_c_try_compile "$LINENO"; then :
25596 gl_cv_decl_null_works=yes
25597 else
25598 gl_cv_decl_null_works=no
25599 fi
25600 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25601 fi
25602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
25603 $as_echo "$gl_cv_decl_null_works" >&6; }
25604 if test $gl_cv_decl_null_works = no; then
25605 REPLACE_NULL=1
25606 STDDEF_H=stddef.h
25607 fi
25608
25609 if test -n "$STDDEF_H"; then
25610 GL_GENERATE_STDDEF_H_TRUE=
25611 GL_GENERATE_STDDEF_H_FALSE='#'
25612 else
25613 GL_GENERATE_STDDEF_H_TRUE='#'
25614 GL_GENERATE_STDDEF_H_FALSE=
25615 fi
25616
25617 if test -n "$STDDEF_H"; then
25618
25619
25620
25621
25622
25623
25624
25625
25626 if test $gl_cv_have_include_next = yes; then
25627 gl_cv_next_stddef_h='<'stddef.h'>'
25628 else
25629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
25630 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
25631 if ${gl_cv_next_stddef_h+:} false; then :
25632 $as_echo_n "(cached) " >&6
25633 else
25634
25635
25636
25637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25638 /* end confdefs.h. */
25639 #include <stddef.h>
25640 _ACEOF
25641 case "$host_os" in
25642 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25643 *) gl_absname_cpp="$ac_cpp" ;;
25644 esac
25645
25646 case "$host_os" in
25647 mingw*)
25648 gl_dirsep_regex='[/\\]'
25649 ;;
25650 *)
25651 gl_dirsep_regex='\/'
25652 ;;
25653 esac
25654 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25655 gl_header_literal_regex=`echo 'stddef.h' \
25656 | sed -e "$gl_make_literal_regex_sed"`
25657 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25658 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25659 s|^/[^/]|//&|
25660 p
25661 q
25662 }'
25663
25664 gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25665 sed -n "$gl_absolute_header_sed"`
25666
25667 gl_header=$gl_cv_absolute_stddef_h
25668 gl_cv_next_stddef_h='"'$gl_header'"'
25669
25670
25671 fi
25672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
25673 $as_echo "$gl_cv_next_stddef_h" >&6; }
25674 fi
25675 NEXT_STDDEF_H=$gl_cv_next_stddef_h
25676
25677 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25678 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25679 gl_next_as_first_directive='<'stddef.h'>'
25680 else
25681 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25682 gl_next_as_first_directive=$gl_cv_next_stddef_h
25683 fi
25684 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
25685
25686
25687
25688
25689 fi
25690
25691
25692
25693
25694 $as_echo "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
25695
25696
25697
25698
25699
25700
25701
25702
25703
25704
25705 if test $gl_cv_have_include_next = yes; then
25706 gl_cv_next_stdio_h='<'stdio.h'>'
25707 else
25708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
25709 $as_echo_n "checking absolute name of <stdio.h>... " >&6; }
25710 if ${gl_cv_next_stdio_h+:} false; then :
25711 $as_echo_n "(cached) " >&6
25712 else
25713
25714
25715
25716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25717 /* end confdefs.h. */
25718 #include <stdio.h>
25719 _ACEOF
25720 case "$host_os" in
25721 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25722 *) gl_absname_cpp="$ac_cpp" ;;
25723 esac
25724
25725 case "$host_os" in
25726 mingw*)
25727 gl_dirsep_regex='[/\\]'
25728 ;;
25729 *)
25730 gl_dirsep_regex='\/'
25731 ;;
25732 esac
25733 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25734 gl_header_literal_regex=`echo 'stdio.h' \
25735 | sed -e "$gl_make_literal_regex_sed"`
25736 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25737 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25738 s|^/[^/]|//&|
25739 p
25740 q
25741 }'
25742
25743 gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25744 sed -n "$gl_absolute_header_sed"`
25745
25746 gl_header=$gl_cv_absolute_stdio_h
25747 gl_cv_next_stdio_h='"'$gl_header'"'
25748
25749
25750 fi
25751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
25752 $as_echo "$gl_cv_next_stdio_h" >&6; }
25753 fi
25754 NEXT_STDIO_H=$gl_cv_next_stdio_h
25755
25756 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25757 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25758 gl_next_as_first_directive='<'stdio.h'>'
25759 else
25760 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25761 gl_next_as_first_directive=$gl_cv_next_stdio_h
25762 fi
25763 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
25764
25765
25766
25767
25768
25769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
25770 $as_echo_n "checking which flavor of printf attribute matches inttypes macros... " >&6; }
25771 if ${gl_cv_func_printf_attribute_flavor+:} false; then :
25772 $as_echo_n "(cached) " >&6
25773 else
25774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25775 /* end confdefs.h. */
25776
25777 #define __STDC_FORMAT_MACROS 1
25778 #include <stdio.h>
25779 #include <inttypes.h>
25780 /* For non-mingw systems, compilation will trivially succeed.
25781 For mingw, compilation will succeed for older mingw (system
25782 printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
25783 #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) && \
25784 (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
25785 extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
25786 #endif
25787
25788 int
25789 main ()
25790 {
25791
25792 ;
25793 return 0;
25794 }
25795 _ACEOF
25796 if ac_fn_c_try_compile "$LINENO"; then :
25797 gl_cv_func_printf_attribute_flavor=system
25798 else
25799 gl_cv_func_printf_attribute_flavor=gnu
25800 fi
25801 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25802 fi
25803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
25804 $as_echo "$gl_cv_func_printf_attribute_flavor" >&6; }
25805 if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
25806
25807 $as_echo "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
25808
25809 fi
25810
25811 GNULIB_FSCANF=1
25812
25813
25814 cat >>confdefs.h <<_ACEOF
25815 #define GNULIB_FSCANF 1
25816 _ACEOF
25817
25818
25819 GNULIB_SCANF=1
25820
25821
25822 cat >>confdefs.h <<_ACEOF
25823 #define GNULIB_SCANF 1
25824 _ACEOF
25825
25826
25827 GNULIB_FGETC=1
25828 GNULIB_GETC=1
25829 GNULIB_GETCHAR=1
25830 GNULIB_FGETS=1
25831 GNULIB_FREAD=1
25832
25833
25834 GNULIB_FPRINTF=1
25835 GNULIB_PRINTF=1
25836 GNULIB_VFPRINTF=1
25837 GNULIB_VPRINTF=1
25838 GNULIB_FPUTC=1
25839 GNULIB_PUTC=1
25840 GNULIB_PUTCHAR=1
25841 GNULIB_FPUTS=1
25842 GNULIB_PUTS=1
25843 GNULIB_FWRITE=1
25844
25845
25846
25847
25848 for gl_func in dprintf fpurge fseeko ftello getdelim getline gets pclose popen renameat snprintf tmpfile vdprintf vsnprintf; do
25849 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
25850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
25851 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
25852 if eval \${$as_gl_Symbol+:} false; then :
25853 $as_echo_n "(cached) " >&6
25854 else
25855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25856 /* end confdefs.h. */
25857 #include <stdio.h>
25858
25859 int
25860 main ()
25861 {
25862 #undef $gl_func
25863 (void) $gl_func;
25864 ;
25865 return 0;
25866 }
25867 _ACEOF
25868 if ac_fn_c_try_compile "$LINENO"; then :
25869 eval "$as_gl_Symbol=yes"
25870 else
25871 eval "$as_gl_Symbol=no"
25872 fi
25873 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25874 fi
25875 eval ac_res=\$$as_gl_Symbol
25876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
25877 $as_echo "$ac_res" >&6; }
25878 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
25879 cat >>confdefs.h <<_ACEOF
25880 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
25881 _ACEOF
25882
25883 eval ac_cv_have_decl_$gl_func=yes
25884 fi
25885 done
25886
25887
25888
25889
25890
25891
25892
25893
25894
25895
25896
25897
25898 if test $gl_cv_have_include_next = yes; then
25899 gl_cv_next_stdlib_h='<'stdlib.h'>'
25900 else
25901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
25902 $as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
25903 if ${gl_cv_next_stdlib_h+:} false; then :
25904 $as_echo_n "(cached) " >&6
25905 else
25906
25907
25908
25909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25910 /* end confdefs.h. */
25911 #include <stdlib.h>
25912 _ACEOF
25913 case "$host_os" in
25914 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25915 *) gl_absname_cpp="$ac_cpp" ;;
25916 esac
25917
25918 case "$host_os" in
25919 mingw*)
25920 gl_dirsep_regex='[/\\]'
25921 ;;
25922 *)
25923 gl_dirsep_regex='\/'
25924 ;;
25925 esac
25926 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25927 gl_header_literal_regex=`echo 'stdlib.h' \
25928 | sed -e "$gl_make_literal_regex_sed"`
25929 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25930 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25931 s|^/[^/]|//&|
25932 p
25933 q
25934 }'
25935
25936 gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25937 sed -n "$gl_absolute_header_sed"`
25938
25939 gl_header=$gl_cv_absolute_stdlib_h
25940 gl_cv_next_stdlib_h='"'$gl_header'"'
25941
25942
25943 fi
25944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
25945 $as_echo "$gl_cv_next_stdlib_h" >&6; }
25946 fi
25947 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
25948
25949 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25950 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25951 gl_next_as_first_directive='<'stdlib.h'>'
25952 else
25953 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25954 gl_next_as_first_directive=$gl_cv_next_stdlib_h
25955 fi
25956 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
25957
25958
25959
25960
25961
25962
25963 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
25964 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
25965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
25966 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
25967 if eval \${$as_gl_Symbol+:} false; then :
25968 $as_echo_n "(cached) " >&6
25969 else
25970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25971 /* end confdefs.h. */
25972 #include <stdlib.h>
25973 #if HAVE_SYS_LOADAVG_H
25974 # include <sys/loadavg.h>
25975 #endif
25976 #if HAVE_RANDOM_H
25977 # include <random.h>
25978 #endif
25979
25980 int
25981 main ()
25982 {
25983 #undef $gl_func
25984 (void) $gl_func;
25985 ;
25986 return 0;
25987 }
25988 _ACEOF
25989 if ac_fn_c_try_compile "$LINENO"; then :
25990 eval "$as_gl_Symbol=yes"
25991 else
25992 eval "$as_gl_Symbol=no"
25993 fi
25994 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25995 fi
25996 eval ac_res=\$$as_gl_Symbol
25997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
25998 $as_echo "$ac_res" >&6; }
25999 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
26000 cat >>confdefs.h <<_ACEOF
26001 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
26002 _ACEOF
26003
26004 eval ac_cv_have_decl_$gl_func=yes
26005 fi
26006 done
26007
26008
26009
26010
26011
26012
26013 for ac_func in strchrnul
26014 do :
26015 ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
26016 if test "x$ac_cv_func_strchrnul" = xyes; then :
26017 cat >>confdefs.h <<_ACEOF
26018 #define HAVE_STRCHRNUL 1
26019 _ACEOF
26020
26021 fi
26022 done
26023
26024 if test $ac_cv_func_strchrnul = no; then
26025 HAVE_STRCHRNUL=0
26026 else
26027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5
26028 $as_echo_n "checking whether strchrnul works... " >&6; }
26029 if ${gl_cv_func_strchrnul_works+:} false; then :
26030 $as_echo_n "(cached) " >&6
26031 else
26032 if test "$cross_compiling" = yes; then :
26033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26034 /* end confdefs.h. */
26035
26036 #if defined __CYGWIN__
26037 #include <cygwin/version.h>
26038 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9)
26039 Lucky user
26040 #endif
26041 #else
26042 Lucky user
26043 #endif
26044
26045 _ACEOF
26046 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26047 $EGREP "Lucky user" >/dev/null 2>&1; then :
26048 gl_cv_func_strchrnul_works="guessing yes"
26049 else
26050 gl_cv_func_strchrnul_works="guessing no"
26051 fi
26052 rm -f conftest*
26053
26054
26055 else
26056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26057 /* end confdefs.h. */
26058
26059 #include <string.h> /* for strchrnul */
26060
26061 int
26062 main ()
26063 {
26064 const char *buf = "a";
26065 return strchrnul (buf, 'b') != buf + 1;
26066
26067 ;
26068 return 0;
26069 }
26070 _ACEOF
26071 if ac_fn_c_try_run "$LINENO"; then :
26072 gl_cv_func_strchrnul_works=yes
26073 else
26074 gl_cv_func_strchrnul_works=no
26075 fi
26076 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26077 conftest.$ac_objext conftest.beam conftest.$ac_ext
26078 fi
26079
26080
26081 fi
26082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strchrnul_works" >&5
26083 $as_echo "$gl_cv_func_strchrnul_works" >&6; }
26084 case "$gl_cv_func_strchrnul_works" in
26085 *yes) ;;
26086 *) REPLACE_STRCHRNUL=1 ;;
26087 esac
26088 fi
26089
26090 if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
26091
26092
26093
26094
26095
26096
26097
26098
26099 gl_LIBOBJS="$gl_LIBOBJS strchrnul.$ac_objext"
26100
26101 :
26102 fi
26103
26104
26105
26106
26107
26108 GNULIB_STRCHRNUL=1
26109
26110
26111
26112
26113
26114 $as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
26115
26116
26117
26118
26119
26120
26121
26122 :
26123
26124
26125
26126
26127
26128 if test $ac_cv_func_strdup = yes; then
26129 if test $gl_cv_func_malloc_posix != yes; then
26130 REPLACE_STRDUP=1
26131 fi
26132 fi
26133
26134 :
26135
26136
26137
26138
26139
26140 if test $ac_cv_have_decl_strdup = no; then
26141 HAVE_DECL_STRDUP=0
26142 fi
26143
26144 if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
26145
26146
26147
26148
26149
26150
26151
26152
26153 gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext"
26154
26155 :
26156 fi
26157
26158
26159
26160
26161
26162 GNULIB_STRDUP=1
26163
26164
26165
26166
26167
26168 $as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
26169
26170
26171
26172
26173
26174
26175
26176
26177
26178
26179 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
26180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
26181 $as_echo_n "checking for working strerror function... " >&6; }
26182 if ${gl_cv_func_working_strerror+:} false; then :
26183 $as_echo_n "(cached) " >&6
26184 else
26185 if test "$cross_compiling" = yes; then :
26186 case "$host_os" in
26187 # Guess yes on glibc systems.
26188 *-gnu*) gl_cv_func_working_strerror="guessing yes" ;;
26189 # If we don't know, assume the worst.
26190 *) gl_cv_func_working_strerror="guessing no" ;;
26191 esac
26192
26193 else
26194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26195 /* end confdefs.h. */
26196 #include <string.h>
26197
26198 int
26199 main ()
26200 {
26201 if (!*strerror (-2)) return 1;
26202 ;
26203 return 0;
26204 }
26205 _ACEOF
26206 if ac_fn_c_try_run "$LINENO"; then :
26207 gl_cv_func_working_strerror=yes
26208 else
26209 gl_cv_func_working_strerror=no
26210 fi
26211 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26212 conftest.$ac_objext conftest.beam conftest.$ac_ext
26213 fi
26214
26215
26216 fi
26217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
26218 $as_echo "$gl_cv_func_working_strerror" >&6; }
26219 case "$gl_cv_func_working_strerror" in
26220 *yes) ;;
26221 *)
26222 REPLACE_STRERROR=1
26223 ;;
26224 esac
26225
26226 case "$gl_cv_func_strerror_r_works" in
26227 *no) REPLACE_STRERROR=1 ;;
26228 esac
26229
26230 else
26231 REPLACE_STRERROR=1
26232 fi
26233
26234 if test $REPLACE_STRERROR = 1; then
26235
26236
26237
26238
26239
26240
26241
26242
26243 gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
26244
26245 fi
26246
26247
26248 cat >>confdefs.h <<_ACEOF
26249 #define GNULIB_STRERROR 1
26250 _ACEOF
26251
26252
26253
26254
26255
26256
26257
26258 GNULIB_STRERROR=1
26259
26260
26261
26262
26263
26264 $as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
26265
26266
26267
26268
26269
26270 if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
26271
26272
26273
26274
26275
26276
26277
26278
26279 gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
26280
26281
26282
26283
26284
26285 :
26286
26287
26288
26289
26290
26291 if test $ac_cv_header_sys_socket_h != yes; then
26292 for ac_header in winsock2.h
26293 do :
26294 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
26295 if test "x$ac_cv_header_winsock2_h" = xyes; then :
26296 cat >>confdefs.h <<_ACEOF
26297 #define HAVE_WINSOCK2_H 1
26298 _ACEOF
26299
26300 fi
26301
26302 done
26303
26304 fi
26305 if test "$ac_cv_header_winsock2_h" = yes; then
26306 HAVE_WINSOCK2_H=1
26307 UNISTD_H_HAVE_WINSOCK2_H=1
26308 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
26309 else
26310 HAVE_WINSOCK2_H=0
26311 fi
26312
26313
26314 fi
26315
26316
26317
26318
26319
26320
26321 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
26322 if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
26323 HAVE_DECL_STRERROR_R=1
26324 else
26325 HAVE_DECL_STRERROR_R=0
26326 fi
26327
26328
26329 cat >>confdefs.h <<_ACEOF
26330 #define HAVE_DECL_STRERROR_R_ORIG $HAVE_DECL_STRERROR_R
26331 _ACEOF
26332
26333
26334 if test $ac_cv_func_strerror_r = yes; then
26335 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
26336 if test $gl_cv_func_strerror_r_posix_signature = yes; then
26337 case "$gl_cv_func_strerror_r_works" in
26338 *no) REPLACE_STRERROR_R=1 ;;
26339 esac
26340 else
26341 REPLACE_STRERROR_R=1
26342 fi
26343 else
26344 REPLACE_STRERROR_R=1
26345 fi
26346 fi
26347
26348 # Overwrite the findings of AC_FUNC_STRERROR_R (for code that uses that).
26349
26350
26351 if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then
26352
26353
26354
26355
26356
26357
26358
26359
26360 gl_LIBOBJS="$gl_LIBOBJS strerror_r.$ac_objext"
26361
26362
26363
26364 :
26365
26366
26367
26368
26369
26370
26371 :
26372
26373
26374
26375
26376
26377
26378 :
26379
26380
26381
26382
26383
26384
26385 fi
26386
26387
26388
26389
26390
26391 GNULIB_STRERROR_R=1
26392
26393
26394
26395
26396
26397 $as_echo "#define GNULIB_TEST_STRERROR_R 1" >>confdefs.h
26398
26399
26400
26401
26402
26403
26404
26405
26406 if test $REPLACE_STRSTR = 0; then
26407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works in linear time" >&5
26408 $as_echo_n "checking whether strstr works in linear time... " >&6; }
26409 if ${gl_cv_func_strstr_linear+:} false; then :
26410 $as_echo_n "(cached) " >&6
26411 else
26412 if test "$cross_compiling" = yes; then :
26413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26414 /* end confdefs.h. */
26415
26416 #include <features.h>
26417 #ifdef __GNU_LIBRARY__
26418 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
26419 && !(defined __i386__ || defined __x86_64__) \
26420 && !defined __UCLIBC__
26421 Lucky user
26422 #endif
26423 #endif
26424 #ifdef __CYGWIN__
26425 #include <cygwin/version.h>
26426 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
26427 Lucky user
26428 #endif
26429 #endif
26430
26431 _ACEOF
26432 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26433 $EGREP "Lucky user" >/dev/null 2>&1; then :
26434 gl_cv_func_strstr_linear="guessing yes"
26435 else
26436 gl_cv_func_strstr_linear="guessing no"
26437 fi
26438 rm -f conftest*
26439
26440
26441 else
26442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26443 /* end confdefs.h. */
26444
26445 #ifdef __MVS__
26446 /* z/OS does not deliver signals while strstr() is running (thanks to
26447 restrictions on its LE runtime), which prevents us from limiting the
26448 running time of this test. */
26449 # error "This test does not work properly on z/OS"
26450 #endif
26451 #include <signal.h> /* for signal */
26452 #include <string.h> /* for strstr */
26453 #include <stdlib.h> /* for malloc */
26454 #include <unistd.h> /* for alarm */
26455 static void quit (int sig) { _exit (sig + 128); }
26456
26457 int
26458 main ()
26459 {
26460
26461 int result = 0;
26462 size_t m = 1000000;
26463 char *haystack = (char *) malloc (2 * m + 2);
26464 char *needle = (char *) malloc (m + 2);
26465 /* Failure to compile this test due to missing alarm is okay,
26466 since all such platforms (mingw) also have quadratic strstr. */
26467 signal (SIGALRM, quit);
26468 alarm (5);
26469 /* Check for quadratic performance. */
26470 if (haystack && needle)
26471 {
26472 memset (haystack, 'A', 2 * m);
26473 haystack[2 * m] = 'B';
26474 haystack[2 * m + 1] = 0;
26475 memset (needle, 'A', m);
26476 needle[m] = 'B';
26477 needle[m + 1] = 0;
26478 if (!strstr (haystack, needle))
26479 result |= 1;
26480 }
26481 return result;
26482
26483 ;
26484 return 0;
26485 }
26486 _ACEOF
26487 if ac_fn_c_try_run "$LINENO"; then :
26488 gl_cv_func_strstr_linear=yes
26489 else
26490 gl_cv_func_strstr_linear=no
26491 fi
26492 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26493 conftest.$ac_objext conftest.beam conftest.$ac_ext
26494 fi
26495
26496
26497 fi
26498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_linear" >&5
26499 $as_echo "$gl_cv_func_strstr_linear" >&6; }
26500 case "$gl_cv_func_strstr_linear" in
26501 *yes) ;;
26502 *)
26503 REPLACE_STRSTR=1
26504 ;;
26505 esac
26506 fi
26507
26508 if test $REPLACE_STRSTR = 1; then
26509
26510
26511
26512
26513
26514
26515
26516
26517 gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
26518
26519 fi
26520
26521
26522
26523 if test "$gl_cv_func_memchr_works" != yes; then
26524 REPLACE_STRSTR=1
26525 else
26526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
26527 $as_echo_n "checking whether strstr works... " >&6; }
26528 if ${gl_cv_func_strstr_works_always+:} false; then :
26529 $as_echo_n "(cached) " >&6
26530 else
26531 if test "$cross_compiling" = yes; then :
26532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26533 /* end confdefs.h. */
26534
26535 #ifdef __GNU_LIBRARY__
26536 #include <features.h>
26537 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
26538 || defined __UCLIBC__
26539 Lucky user
26540 #endif
26541 #elif defined __CYGWIN__
26542 #include <cygwin/version.h>
26543 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
26544 Lucky user
26545 #endif
26546 #else
26547 Lucky user
26548 #endif
26549
26550 _ACEOF
26551 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26552 $EGREP "Lucky user" >/dev/null 2>&1; then :
26553 gl_cv_func_strstr_works_always="guessing yes"
26554 else
26555 gl_cv_func_strstr_works_always="guessing no"
26556 fi
26557 rm -f conftest*
26558
26559
26560 else
26561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26562 /* end confdefs.h. */
26563
26564 #include <string.h> /* for strstr */
26565 #define P "_EF_BF_BD"
26566 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
26567 #define NEEDLE P P P P P
26568
26569 int
26570 main ()
26571 {
26572 return !!strstr (HAYSTACK, NEEDLE);
26573
26574 ;
26575 return 0;
26576 }
26577 _ACEOF
26578 if ac_fn_c_try_run "$LINENO"; then :
26579 gl_cv_func_strstr_works_always=yes
26580 else
26581 gl_cv_func_strstr_works_always=no
26582 fi
26583 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26584 conftest.$ac_objext conftest.beam conftest.$ac_ext
26585 fi
26586
26587
26588 fi
26589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
26590 $as_echo "$gl_cv_func_strstr_works_always" >&6; }
26591 case "$gl_cv_func_strstr_works_always" in
26592 *yes) ;;
26593 *)
26594 REPLACE_STRSTR=1
26595 ;;
26596 esac
26597 fi
26598
26599 if test $REPLACE_STRSTR = 1; then
26600
26601
26602
26603
26604
26605
26606
26607
26608 gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
26609
26610 fi
26611
26612
26613
26614
26615
26616 GNULIB_STRSTR=1
26617
26618
26619
26620
26621
26622 $as_echo "#define GNULIB_TEST_STRSTR 1" >>confdefs.h
26623
26624
26625
26626
26627
26628
26629
26630 for ac_func in strtok_r
26631 do :
26632 ac_fn_c_check_func "$LINENO" "strtok_r" "ac_cv_func_strtok_r"
26633 if test "x$ac_cv_func_strtok_r" = xyes; then :
26634 cat >>confdefs.h <<_ACEOF
26635 #define HAVE_STRTOK_R 1
26636 _ACEOF
26637
26638 fi
26639 done
26640
26641 if test $ac_cv_func_strtok_r = yes; then
26642 HAVE_STRTOK_R=1
26643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtok_r works" >&5
26644 $as_echo_n "checking whether strtok_r works... " >&6; }
26645 if ${gl_cv_func_strtok_r_works+:} false; then :
26646 $as_echo_n "(cached) " >&6
26647 else
26648 if test "$cross_compiling" = yes; then :
26649
26650 case "$host_os" in
26651 # Guess no on glibc systems.
26652 *-gnu*) gl_cv_func_strtok_r_works="guessing no";;
26653 *) gl_cv_func_strtok_r_works="guessing yes";;
26654 esac
26655
26656 else
26657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26658 /* end confdefs.h. */
26659
26660 #ifndef __OPTIMIZE__
26661 # define __OPTIMIZE__ 1
26662 #endif
26663 #undef __OPTIMIZE_SIZE__
26664 #undef __NO_INLINE__
26665 #include <stdlib.h>
26666 #include <string.h>
26667
26668 int
26669 main ()
26670 {
26671 static const char dummy[] = "\177\01a";
26672 char delimiters[] = "xxxxxxxx";
26673 char *save_ptr = (char *) dummy;
26674 strtok_r (delimiters, "x", &save_ptr);
26675 strtok_r (NULL, "x", &save_ptr);
26676 return 0;
26677
26678 ;
26679 return 0;
26680 }
26681
26682 _ACEOF
26683 if ac_fn_c_try_run "$LINENO"; then :
26684 gl_cv_func_strtok_r_works=yes
26685 else
26686 gl_cv_func_strtok_r_works=no
26687 fi
26688 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26689 conftest.$ac_objext conftest.beam conftest.$ac_ext
26690 fi
26691
26692
26693 fi
26694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtok_r_works" >&5
26695 $as_echo "$gl_cv_func_strtok_r_works" >&6; }
26696 case "$gl_cv_func_strtok_r_works" in
26697 *no)
26698 UNDEFINE_STRTOK_R=1
26699 ;;
26700 esac
26701 else
26702 HAVE_STRTOK_R=0
26703 fi
26704
26705 :
26706
26707
26708
26709
26710
26711 if test $ac_cv_have_decl_strtok_r = no; then
26712 HAVE_DECL_STRTOK_R=0
26713 fi
26714
26715 if test $HAVE_STRTOK_R = 0 || test $REPLACE_STRTOK_R = 1; then
26716
26717
26718
26719
26720
26721
26722
26723
26724 gl_LIBOBJS="$gl_LIBOBJS strtok_r.$ac_objext"
26725
26726
26727 :
26728
26729 fi
26730
26731
26732
26733
26734
26735 GNULIB_STRTOK_R=1
26736
26737
26738
26739
26740
26741 $as_echo "#define GNULIB_TEST_STRTOK_R 1" >>confdefs.h
26742
26743
26744
26745
26746
26747
26748
26749
26750
26751
26752
26753
26754
26755
26756
26757
26758 :
26759
26760
26761
26762
26763
26764
26765
26766
26767 if test $gl_cv_have_include_next = yes; then
26768 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
26769 else
26770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
26771 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
26772 if ${gl_cv_next_sys_stat_h+:} false; then :
26773 $as_echo_n "(cached) " >&6
26774 else
26775
26776 if test $ac_cv_header_sys_stat_h = yes; then
26777
26778
26779
26780
26781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26782 /* end confdefs.h. */
26783 #include <sys/stat.h>
26784 _ACEOF
26785 case "$host_os" in
26786 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26787 *) gl_absname_cpp="$ac_cpp" ;;
26788 esac
26789
26790 case "$host_os" in
26791 mingw*)
26792 gl_dirsep_regex='[/\\]'
26793 ;;
26794 *)
26795 gl_dirsep_regex='\/'
26796 ;;
26797 esac
26798 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26799 gl_header_literal_regex=`echo 'sys/stat.h' \
26800 | sed -e "$gl_make_literal_regex_sed"`
26801 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26802 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26803 s|^/[^/]|//&|
26804 p
26805 q
26806 }'
26807
26808 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26809 sed -n "$gl_absolute_header_sed"`
26810
26811 gl_header=$gl_cv_absolute_sys_stat_h
26812 gl_cv_next_sys_stat_h='"'$gl_header'"'
26813 else
26814 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
26815 fi
26816
26817
26818 fi
26819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
26820 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
26821 fi
26822 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
26823
26824 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26825 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26826 gl_next_as_first_directive='<'sys/stat.h'>'
26827 else
26828 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26829 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
26830 fi
26831 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
26832
26833
26834
26835
26836
26837
26838
26839
26840
26841
26842
26843 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
26844
26845 $as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
26846
26847 fi
26848
26849 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
26850 #include <sys/stat.h>
26851 "
26852 if test "x$ac_cv_type_nlink_t" = xyes; then :
26853
26854 else
26855
26856 $as_echo "#define nlink_t int" >>confdefs.h
26857
26858 fi
26859
26860
26861
26862 for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do
26863 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
26864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
26865 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
26866 if eval \${$as_gl_Symbol+:} false; then :
26867 $as_echo_n "(cached) " >&6
26868 else
26869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26870 /* end confdefs.h. */
26871 #include <sys/stat.h>
26872
26873 int
26874 main ()
26875 {
26876 #undef $gl_func
26877 (void) $gl_func;
26878 ;
26879 return 0;
26880 }
26881 _ACEOF
26882 if ac_fn_c_try_compile "$LINENO"; then :
26883 eval "$as_gl_Symbol=yes"
26884 else
26885 eval "$as_gl_Symbol=no"
26886 fi
26887 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26888 fi
26889 eval ac_res=\$$as_gl_Symbol
26890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
26891 $as_echo "$ac_res" >&6; }
26892 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
26893 cat >>confdefs.h <<_ACEOF
26894 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
26895 _ACEOF
26896
26897 eval ac_cv_have_decl_$gl_func=yes
26898 fi
26899 done
26900
26901
26902
26903
26904
26905
26906
26907
26908
26909
26910
26911
26912
26913
26914
26915
26916
26917 :
26918
26919
26920
26921
26922
26923
26924
26925
26926 if test $gl_cv_have_include_next = yes; then
26927 gl_cv_next_sys_uio_h='<'sys/uio.h'>'
26928 else
26929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/uio.h>" >&5
26930 $as_echo_n "checking absolute name of <sys/uio.h>... " >&6; }
26931 if ${gl_cv_next_sys_uio_h+:} false; then :
26932 $as_echo_n "(cached) " >&6
26933 else
26934
26935 if test $ac_cv_header_sys_uio_h = yes; then
26936
26937
26938
26939
26940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26941 /* end confdefs.h. */
26942 #include <sys/uio.h>
26943 _ACEOF
26944 case "$host_os" in
26945 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26946 *) gl_absname_cpp="$ac_cpp" ;;
26947 esac
26948
26949 case "$host_os" in
26950 mingw*)
26951 gl_dirsep_regex='[/\\]'
26952 ;;
26953 *)
26954 gl_dirsep_regex='\/'
26955 ;;
26956 esac
26957 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26958 gl_header_literal_regex=`echo 'sys/uio.h' \
26959 | sed -e "$gl_make_literal_regex_sed"`
26960 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26961 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26962 s|^/[^/]|//&|
26963 p
26964 q
26965 }'
26966
26967 gl_cv_absolute_sys_uio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26968 sed -n "$gl_absolute_header_sed"`
26969
26970 gl_header=$gl_cv_absolute_sys_uio_h
26971 gl_cv_next_sys_uio_h='"'$gl_header'"'
26972 else
26973 gl_cv_next_sys_uio_h='<'sys/uio.h'>'
26974 fi
26975
26976
26977 fi
26978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_uio_h" >&5
26979 $as_echo "$gl_cv_next_sys_uio_h" >&6; }
26980 fi
26981 NEXT_SYS_UIO_H=$gl_cv_next_sys_uio_h
26982
26983 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26984 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26985 gl_next_as_first_directive='<'sys/uio.h'>'
26986 else
26987 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26988 gl_next_as_first_directive=$gl_cv_next_sys_uio_h
26989 fi
26990 NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H=$gl_next_as_first_directive
26991
26992
26993
26994
26995 if test $ac_cv_header_sys_uio_h = yes; then
26996 HAVE_SYS_UIO_H=1
26997 else
26998 HAVE_SYS_UIO_H=0
26999 fi
27000
27001
27002
27003
27004
27005 :
27006
27007
27008
27009
27010
27011
27012
27013
27014
27015
27016
27017
27018
27019
27020
27021
27022
27023
27024 :
27025
27026
27027
27028
27029
27030
27031
27032
27033 if test $gl_cv_have_include_next = yes; then
27034 gl_cv_next_unistd_h='<'unistd.h'>'
27035 else
27036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
27037 $as_echo_n "checking absolute name of <unistd.h>... " >&6; }
27038 if ${gl_cv_next_unistd_h+:} false; then :
27039 $as_echo_n "(cached) " >&6
27040 else
27041
27042 if test $ac_cv_header_unistd_h = yes; then
27043
27044
27045
27046
27047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27048 /* end confdefs.h. */
27049 #include <unistd.h>
27050 _ACEOF
27051 case "$host_os" in
27052 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27053 *) gl_absname_cpp="$ac_cpp" ;;
27054 esac
27055
27056 case "$host_os" in
27057 mingw*)
27058 gl_dirsep_regex='[/\\]'
27059 ;;
27060 *)
27061 gl_dirsep_regex='\/'
27062 ;;
27063 esac
27064 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27065 gl_header_literal_regex=`echo 'unistd.h' \
27066 | sed -e "$gl_make_literal_regex_sed"`
27067 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27068 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27069 s|^/[^/]|//&|
27070 p
27071 q
27072 }'
27073
27074 gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27075 sed -n "$gl_absolute_header_sed"`
27076
27077 gl_header=$gl_cv_absolute_unistd_h
27078 gl_cv_next_unistd_h='"'$gl_header'"'
27079 else
27080 gl_cv_next_unistd_h='<'unistd.h'>'
27081 fi
27082
27083
27084 fi
27085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
27086 $as_echo "$gl_cv_next_unistd_h" >&6; }
27087 fi
27088 NEXT_UNISTD_H=$gl_cv_next_unistd_h
27089
27090 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27091 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27092 gl_next_as_first_directive='<'unistd.h'>'
27093 else
27094 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27095 gl_next_as_first_directive=$gl_cv_next_unistd_h
27096 fi
27097 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
27098
27099
27100
27101
27102 if test $ac_cv_header_unistd_h = yes; then
27103 HAVE_UNISTD_H=1
27104 else
27105 HAVE_UNISTD_H=0
27106 fi
27107
27108
27109
27110
27111
27112
27113
27114 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
27115 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
27116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
27117 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
27118 if eval \${$as_gl_Symbol+:} false; then :
27119 $as_echo_n "(cached) " >&6
27120 else
27121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27122 /* end confdefs.h. */
27123
27124 #if HAVE_UNISTD_H
27125 # include <unistd.h>
27126 #endif
27127 /* Some systems declare various items in the wrong headers. */
27128 #if !(defined __GLIBC__ && !defined __UCLIBC__)
27129 # include <fcntl.h>
27130 # include <stdio.h>
27131 # include <stdlib.h>
27132 # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
27133 # include <io.h>
27134 # endif
27135 #endif
27136
27137 int
27138 main ()
27139 {
27140 #undef $gl_func
27141 (void) $gl_func;
27142 ;
27143 return 0;
27144 }
27145 _ACEOF
27146 if ac_fn_c_try_compile "$LINENO"; then :
27147 eval "$as_gl_Symbol=yes"
27148 else
27149 eval "$as_gl_Symbol=no"
27150 fi
27151 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27152 fi
27153 eval ac_res=\$$as_gl_Symbol
27154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
27155 $as_echo "$ac_res" >&6; }
27156 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
27157 cat >>confdefs.h <<_ACEOF
27158 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
27159 _ACEOF
27160
27161 eval ac_cv_have_decl_$gl_func=yes
27162 fi
27163 done
27164
27165
27166
27167
27168 :
27169
27170
27171
27172
27173
27174
27175
27176
27177
27178 :
27179
27180
27181
27182
27183
27184 if test $ac_cv_have_decl_unsetenv = no; then
27185 HAVE_DECL_UNSETENV=0
27186 fi
27187 for ac_func in unsetenv
27188 do :
27189 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
27190 if test "x$ac_cv_func_unsetenv" = xyes; then :
27191 cat >>confdefs.h <<_ACEOF
27192 #define HAVE_UNSETENV 1
27193 _ACEOF
27194
27195 fi
27196 done
27197
27198 if test $ac_cv_func_unsetenv = no; then
27199 HAVE_UNSETENV=0
27200 else
27201 HAVE_UNSETENV=1
27202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
27203 $as_echo_n "checking for unsetenv() return type... " >&6; }
27204 if ${gt_cv_func_unsetenv_ret+:} false; then :
27205 $as_echo_n "(cached) " >&6
27206 else
27207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27208 /* end confdefs.h. */
27209
27210 #undef _BSD
27211 #define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
27212 #include <stdlib.h>
27213 extern
27214 #ifdef __cplusplus
27215 "C"
27216 #endif
27217 int unsetenv (const char *name);
27218
27219 int
27220 main ()
27221 {
27222
27223 ;
27224 return 0;
27225 }
27226 _ACEOF
27227 if ac_fn_c_try_compile "$LINENO"; then :
27228 gt_cv_func_unsetenv_ret='int'
27229 else
27230 gt_cv_func_unsetenv_ret='void'
27231 fi
27232 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27233 fi
27234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
27235 $as_echo "$gt_cv_func_unsetenv_ret" >&6; }
27236 if test $gt_cv_func_unsetenv_ret = 'void'; then
27237
27238 $as_echo "#define VOID_UNSETENV 1" >>confdefs.h
27239
27240 REPLACE_UNSETENV=1
27241 fi
27242
27243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
27244 $as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
27245 if ${gl_cv_func_unsetenv_works+:} false; then :
27246 $as_echo_n "(cached) " >&6
27247 else
27248 if test "$cross_compiling" = yes; then :
27249 case "$host_os" in
27250 # Guess yes on glibc systems.
27251 *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
27252 # If we don't know, assume the worst.
27253 *) gl_cv_func_unsetenv_works="guessing no" ;;
27254 esac
27255
27256 else
27257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27258 /* end confdefs.h. */
27259
27260 #include <stdlib.h>
27261 #include <errno.h>
27262 extern char **environ;
27263
27264 int
27265 main ()
27266 {
27267
27268 char entry1[] = "a=1";
27269 char entry2[] = "b=2";
27270 char *env[] = { entry1, entry2, NULL };
27271 if (putenv ((char *) "a=1")) return 1;
27272 if (putenv (entry2)) return 2;
27273 entry2[0] = 'a';
27274 unsetenv ("a");
27275 if (getenv ("a")) return 3;
27276 if (!unsetenv ("") || errno != EINVAL) return 4;
27277 entry2[0] = 'b';
27278 environ = env;
27279 if (!getenv ("a")) return 5;
27280 entry2[0] = 'a';
27281 unsetenv ("a");
27282 if (getenv ("a")) return 6;
27283
27284 ;
27285 return 0;
27286 }
27287 _ACEOF
27288 if ac_fn_c_try_run "$LINENO"; then :
27289 gl_cv_func_unsetenv_works=yes
27290 else
27291 gl_cv_func_unsetenv_works=no
27292 fi
27293 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27294 conftest.$ac_objext conftest.beam conftest.$ac_ext
27295 fi
27296
27297 fi
27298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
27299 $as_echo "$gl_cv_func_unsetenv_works" >&6; }
27300 case "$gl_cv_func_unsetenv_works" in
27301 *yes) ;;
27302 *)
27303 REPLACE_UNSETENV=1
27304 ;;
27305 esac
27306 fi
27307
27308 if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
27309
27310
27311
27312
27313
27314
27315
27316
27317 gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
27318
27319
27320
27321
27322 :
27323
27324
27325
27326
27327
27328
27329 fi
27330
27331
27332
27333
27334
27335 GNULIB_UNSETENV=1
27336
27337
27338
27339
27340
27341 $as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
27342
27343
27344
27345
27346
27347
27348
27349
27350
27351
27352
27353
27354 :
27355
27356
27357
27358
27359
27360
27361
27362
27363 if test $gl_cv_have_include_next = yes; then
27364 gl_cv_next_wchar_h='<'wchar.h'>'
27365 else
27366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
27367 $as_echo_n "checking absolute name of <wchar.h>... " >&6; }
27368 if ${gl_cv_next_wchar_h+:} false; then :
27369 $as_echo_n "(cached) " >&6
27370 else
27371
27372 if test $ac_cv_header_wchar_h = yes; then
27373
27374
27375
27376
27377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27378 /* end confdefs.h. */
27379 #include <wchar.h>
27380 _ACEOF
27381 case "$host_os" in
27382 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27383 *) gl_absname_cpp="$ac_cpp" ;;
27384 esac
27385
27386 case "$host_os" in
27387 mingw*)
27388 gl_dirsep_regex='[/\\]'
27389 ;;
27390 *)
27391 gl_dirsep_regex='\/'
27392 ;;
27393 esac
27394 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27395 gl_header_literal_regex=`echo 'wchar.h' \
27396 | sed -e "$gl_make_literal_regex_sed"`
27397 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27398 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27399 s|^/[^/]|//&|
27400 p
27401 q
27402 }'
27403
27404 gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27405 sed -n "$gl_absolute_header_sed"`
27406
27407 gl_header=$gl_cv_absolute_wchar_h
27408 gl_cv_next_wchar_h='"'$gl_header'"'
27409 else
27410 gl_cv_next_wchar_h='<'wchar.h'>'
27411 fi
27412
27413
27414 fi
27415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
27416 $as_echo "$gl_cv_next_wchar_h" >&6; }
27417 fi
27418 NEXT_WCHAR_H=$gl_cv_next_wchar_h
27419
27420 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27421 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27422 gl_next_as_first_directive='<'wchar.h'>'
27423 else
27424 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27425 gl_next_as_first_directive=$gl_cv_next_wchar_h
27426 fi
27427 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
27428
27429
27430
27431
27432 if test $ac_cv_header_wchar_h = yes; then
27433 HAVE_WCHAR_H=1
27434 else
27435 HAVE_WCHAR_H=0
27436 fi
27437
27438
27439
27440
27441
27442 if test $gt_cv_c_wint_t = yes; then
27443 HAVE_WINT_T=1
27444 else
27445 HAVE_WINT_T=0
27446 fi
27447
27448
27449
27450 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
27451 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
27452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
27453 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
27454 if eval \${$as_gl_Symbol+:} false; then :
27455 $as_echo_n "(cached) " >&6
27456 else
27457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27458 /* end confdefs.h. */
27459
27460 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
27461 <wchar.h>.
27462 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
27463 included before <wchar.h>. */
27464 #if !(defined __GLIBC__ && !defined __UCLIBC__)
27465 # include <stddef.h>
27466 # include <stdio.h>
27467 # include <time.h>
27468 #endif
27469 #include <wchar.h>
27470
27471 int
27472 main ()
27473 {
27474 #undef $gl_func
27475 (void) $gl_func;
27476 ;
27477 return 0;
27478 }
27479 _ACEOF
27480 if ac_fn_c_try_compile "$LINENO"; then :
27481 eval "$as_gl_Symbol=yes"
27482 else
27483 eval "$as_gl_Symbol=no"
27484 fi
27485 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27486 fi
27487 eval ac_res=\$$as_gl_Symbol
27488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
27489 $as_echo "$ac_res" >&6; }
27490 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
27491 cat >>confdefs.h <<_ACEOF
27492 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
27493 _ACEOF
27494
27495 eval ac_cv_have_decl_$gl_func=yes
27496 fi
27497 done
27498
27499
27500
27501
27502
27503
27504
27505 :
27506
27507
27508
27509
27510
27511 if test $ac_cv_func_iswcntrl = yes; then
27512 HAVE_ISWCNTRL=1
27513 else
27514 HAVE_ISWCNTRL=0
27515 fi
27516
27517
27518
27519 if test $gt_cv_c_wint_t = yes; then
27520 HAVE_WINT_T=1
27521 else
27522 HAVE_WINT_T=0
27523 fi
27524
27525
27526
27527
27528
27529
27530
27531
27532 :
27533
27534
27535
27536
27537
27538
27539
27540
27541 if test $gl_cv_have_include_next = yes; then
27542 gl_cv_next_wctype_h='<'wctype.h'>'
27543 else
27544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
27545 $as_echo_n "checking absolute name of <wctype.h>... " >&6; }
27546 if ${gl_cv_next_wctype_h+:} false; then :
27547 $as_echo_n "(cached) " >&6
27548 else
27549
27550 if test $ac_cv_header_wctype_h = yes; then
27551
27552
27553
27554
27555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27556 /* end confdefs.h. */
27557 #include <wctype.h>
27558 _ACEOF
27559 case "$host_os" in
27560 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27561 *) gl_absname_cpp="$ac_cpp" ;;
27562 esac
27563
27564 case "$host_os" in
27565 mingw*)
27566 gl_dirsep_regex='[/\\]'
27567 ;;
27568 *)
27569 gl_dirsep_regex='\/'
27570 ;;
27571 esac
27572 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27573 gl_header_literal_regex=`echo 'wctype.h' \
27574 | sed -e "$gl_make_literal_regex_sed"`
27575 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27576 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27577 s|^/[^/]|//&|
27578 p
27579 q
27580 }'
27581
27582 gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27583 sed -n "$gl_absolute_header_sed"`
27584
27585 gl_header=$gl_cv_absolute_wctype_h
27586 gl_cv_next_wctype_h='"'$gl_header'"'
27587 else
27588 gl_cv_next_wctype_h='<'wctype.h'>'
27589 fi
27590
27591
27592 fi
27593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
27594 $as_echo "$gl_cv_next_wctype_h" >&6; }
27595 fi
27596 NEXT_WCTYPE_H=$gl_cv_next_wctype_h
27597
27598 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27599 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27600 gl_next_as_first_directive='<'wctype.h'>'
27601 else
27602 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27603 gl_next_as_first_directive=$gl_cv_next_wctype_h
27604 fi
27605 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
27606
27607
27608
27609
27610 if test $ac_cv_header_wctype_h = yes; then
27611 if test $ac_cv_func_iswcntrl = yes; then
27612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
27613 $as_echo_n "checking whether iswcntrl works... " >&6; }
27614 if ${gl_cv_func_iswcntrl_works+:} false; then :
27615 $as_echo_n "(cached) " >&6
27616 else
27617
27618 if test "$cross_compiling" = yes; then :
27619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27620 /* end confdefs.h. */
27621 #include <stdlib.h>
27622 #if __GNU_LIBRARY__ == 1
27623 Linux libc5 i18n is broken.
27624 #endif
27625 int
27626 main ()
27627 {
27628
27629 ;
27630 return 0;
27631 }
27632 _ACEOF
27633 if ac_fn_c_try_compile "$LINENO"; then :
27634 gl_cv_func_iswcntrl_works="guessing yes"
27635 else
27636 gl_cv_func_iswcntrl_works="guessing no"
27637 fi
27638 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27639
27640 else
27641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27642 /* end confdefs.h. */
27643
27644 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
27645 included before <wchar.h>.
27646 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
27647 must be included before <wchar.h>. */
27648 #include <stddef.h>
27649 #include <stdio.h>
27650 #include <time.h>
27651 #include <wchar.h>
27652 #include <wctype.h>
27653 int main () { return iswprint ('x') == 0; }
27654
27655 _ACEOF
27656 if ac_fn_c_try_run "$LINENO"; then :
27657 gl_cv_func_iswcntrl_works=yes
27658 else
27659 gl_cv_func_iswcntrl_works=no
27660 fi
27661 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27662 conftest.$ac_objext conftest.beam conftest.$ac_ext
27663 fi
27664
27665
27666 fi
27667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
27668 $as_echo "$gl_cv_func_iswcntrl_works" >&6; }
27669 fi
27670 HAVE_WCTYPE_H=1
27671 else
27672 HAVE_WCTYPE_H=0
27673 fi
27674
27675
27676 case "$gl_cv_func_iswcntrl_works" in
27677 *yes) REPLACE_ISWCNTRL=0 ;;
27678 *) REPLACE_ISWCNTRL=1 ;;
27679 esac
27680
27681
27682 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
27683 :
27684 fi
27685
27686 if test $REPLACE_ISWCNTRL = 1; then
27687 REPLACE_TOWLOWER=1
27688 else
27689 for ac_func in towlower
27690 do :
27691 ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
27692 if test "x$ac_cv_func_towlower" = xyes; then :
27693 cat >>confdefs.h <<_ACEOF
27694 #define HAVE_TOWLOWER 1
27695 _ACEOF
27696
27697 fi
27698 done
27699
27700 if test $ac_cv_func_towlower = yes; then
27701 REPLACE_TOWLOWER=0
27702 else
27703 ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
27704 included before <wchar.h>.
27705 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
27706 must be included before <wchar.h>. */
27707 #include <stddef.h>
27708 #include <stdio.h>
27709 #include <time.h>
27710 #include <wchar.h>
27711 #if HAVE_WCTYPE_H
27712 # include <wctype.h>
27713 #endif
27714
27715 "
27716 if test "x$ac_cv_have_decl_towlower" = xyes; then :
27717 ac_have_decl=1
27718 else
27719 ac_have_decl=0
27720 fi
27721
27722 cat >>confdefs.h <<_ACEOF
27723 #define HAVE_DECL_TOWLOWER $ac_have_decl
27724 _ACEOF
27725
27726 if test $ac_cv_have_decl_towlower = yes; then
27727 REPLACE_TOWLOWER=1
27728 else
27729 REPLACE_TOWLOWER=0
27730 fi
27731 fi
27732 fi
27733
27734
27735 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
27736 :
27737 fi
27738
27739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
27740 $as_echo_n "checking for wctype_t... " >&6; }
27741 if ${gl_cv_type_wctype_t+:} false; then :
27742 $as_echo_n "(cached) " >&6
27743 else
27744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27745 /* end confdefs.h. */
27746 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
27747 included before <wchar.h>.
27748 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
27749 must be included before <wchar.h>. */
27750 #include <stddef.h>
27751 #include <stdio.h>
27752 #include <time.h>
27753 #include <wchar.h>
27754 #if HAVE_WCTYPE_H
27755 # include <wctype.h>
27756 #endif
27757 wctype_t a;
27758
27759 int
27760 main ()
27761 {
27762
27763 ;
27764 return 0;
27765 }
27766 _ACEOF
27767 if ac_fn_c_try_compile "$LINENO"; then :
27768 gl_cv_type_wctype_t=yes
27769 else
27770 gl_cv_type_wctype_t=no
27771 fi
27772 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27773
27774 fi
27775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
27776 $as_echo "$gl_cv_type_wctype_t" >&6; }
27777 if test $gl_cv_type_wctype_t = no; then
27778 HAVE_WCTYPE_T=0
27779 fi
27780
27781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
27782 $as_echo_n "checking for wctrans_t... " >&6; }
27783 if ${gl_cv_type_wctrans_t+:} false; then :
27784 $as_echo_n "(cached) " >&6
27785 else
27786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27787 /* end confdefs.h. */
27788 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
27789 included before <wchar.h>.
27790 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
27791 must be included before <wchar.h>. */
27792 #include <stddef.h>
27793 #include <stdio.h>
27794 #include <time.h>
27795 #include <wchar.h>
27796 #include <wctype.h>
27797 wctrans_t a;
27798
27799 int
27800 main ()
27801 {
27802
27803 ;
27804 return 0;
27805 }
27806 _ACEOF
27807 if ac_fn_c_try_compile "$LINENO"; then :
27808 gl_cv_type_wctrans_t=yes
27809 else
27810 gl_cv_type_wctrans_t=no
27811 fi
27812 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27813
27814 fi
27815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
27816 $as_echo "$gl_cv_type_wctrans_t" >&6; }
27817 if test $gl_cv_type_wctrans_t = no; then
27818 HAVE_WCTRANS_T=0
27819 fi
27820
27821
27822 for gl_func in wctype iswctype wctrans towctrans ; do
27823 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
27824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
27825 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
27826 if eval \${$as_gl_Symbol+:} false; then :
27827 $as_echo_n "(cached) " >&6
27828 else
27829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27830 /* end confdefs.h. */
27831
27832 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
27833 <wchar.h>.
27834 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
27835 included before <wchar.h>. */
27836 #if !(defined __GLIBC__ && !defined __UCLIBC__)
27837 # include <stddef.h>
27838 # include <stdio.h>
27839 # include <time.h>
27840 # include <wchar.h>
27841 #endif
27842 #include <wctype.h>
27843
27844 int
27845 main ()
27846 {
27847 #undef $gl_func
27848 (void) $gl_func;
27849 ;
27850 return 0;
27851 }
27852 _ACEOF
27853 if ac_fn_c_try_compile "$LINENO"; then :
27854 eval "$as_gl_Symbol=yes"
27855 else
27856 eval "$as_gl_Symbol=no"
27857 fi
27858 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27859 fi
27860 eval ac_res=\$$as_gl_Symbol
27861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
27862 $as_echo "$ac_res" >&6; }
27863 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
27864 cat >>confdefs.h <<_ACEOF
27865 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
27866 _ACEOF
27867
27868 eval ac_cv_have_decl_$gl_func=yes
27869 fi
27870 done
27871
27872
27873 # End of code from modules
27874
27875
27876
27877
27878
27879
27880
27881
27882
27883 gltests_libdeps=
27884 gltests_ltlibdeps=
27885
27886
27887
27888
27889
27890
27891
27892
27893
27894 gl_source_base='tests'
27895 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
27896
27897 gl_module_indicator_condition=$gltests_WITNESS
27898
27899
27900
27901
27902
27903
27904
27905
27906
27907 LIBGNU_LIBDEPS="$gl_libdeps"
27908
27909 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
27910
27911
27912
27913 # We don't use automake, but gnulib does. This line lets us generate
27914 # its Makefile.in.
27915 am__api_version='1.15'
27916
27917 # Find a good install program. We prefer a C program (faster),
27918 # so one script is as good as another. But avoid the broken or
27919 # incompatible versions:
27920 # SysV /etc/install, /usr/sbin/install
27921 # SunOS /usr/etc/install
27922 # IRIX /sbin/install
27923 # AIX /bin/install
27924 # AmigaOS /C/install, which installs bootblocks on floppy discs
27925 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
27926 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
27927 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
27928 # OS/2's system install, which has a completely different semantic
27929 # ./install, which can be erroneously created by make from ./install.sh.
27930 # Reject install programs that cannot install multiple files.
27931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
27932 $as_echo_n "checking for a BSD-compatible install... " >&6; }
27933 if test -z "$INSTALL"; then
27934 if ${ac_cv_path_install+:} false; then :
27935 $as_echo_n "(cached) " >&6
27936 else
27937 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27938 for as_dir in $PATH
27939 do
27940 IFS=$as_save_IFS
27941 test -z "$as_dir" && as_dir=.
27942 # Account for people who put trailing slashes in PATH elements.
27943 case $as_dir/ in #((
27944 ./ | .// | /[cC]/* | \
27945 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
27946 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
27947 /usr/ucb/* ) ;;
27948 *)
27949 # OSF1 and SCO ODT 3.0 have their own names for install.
27950 # Don't use installbsd from OSF since it installs stuff as root
27951 # by default.
27952 for ac_prog in ginstall scoinst install; do
27953 for ac_exec_ext in '' $ac_executable_extensions; do
27954 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
27955 if test $ac_prog = install &&
27956 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
27957 # AIX install. It has an incompatible calling convention.
27958 :
27959 elif test $ac_prog = install &&
27960 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
27961 # program-specific install script used by HP pwplus--don't use.
27962 :
27963 else
27964 rm -rf conftest.one conftest.two conftest.dir
27965 echo one > conftest.one
27966 echo two > conftest.two
27967 mkdir conftest.dir
27968 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
27969 test -s conftest.one && test -s conftest.two &&
27970 test -s conftest.dir/conftest.one &&
27971 test -s conftest.dir/conftest.two
27972 then
27973 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
27974 break 3
27975 fi
27976 fi
27977 fi
27978 done
27979 done
27980 ;;
27981 esac
27982
27983 done
27984 IFS=$as_save_IFS
27985
27986 rm -rf conftest.one conftest.two conftest.dir
27987
27988 fi
27989 if test "${ac_cv_path_install+set}" = set; then
27990 INSTALL=$ac_cv_path_install
27991 else
27992 # As a last resort, use the slow shell script. Don't cache a
27993 # value for INSTALL within a source directory, because that will
27994 # break other packages using the cache if that directory is
27995 # removed, or if the value is a relative name.
27996 INSTALL=$ac_install_sh
27997 fi
27998 fi
27999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
28000 $as_echo "$INSTALL" >&6; }
28001
28002 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
28003 # It thinks the first close brace ends the variable substitution.
28004 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
28005
28006 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
28007
28008 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
28009
28010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
28011 $as_echo_n "checking whether build environment is sane... " >&6; }
28012 # Reject unsafe characters in $srcdir or the absolute working directory
28013 # name. Accept space and tab only in the latter.
28014 am_lf='
28015 '
28016 case `pwd` in
28017 *[\\\"\#\$\&\'\`$am_lf]*)
28018 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
28019 esac
28020 case $srcdir in
28021 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
28022 as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
28023 esac
28024
28025 # Do 'set' in a subshell so we don't clobber the current shell's
28026 # arguments. Must try -L first in case configure is actually a
28027 # symlink; some systems play weird games with the mod time of symlinks
28028 # (eg FreeBSD returns the mod time of the symlink's containing
28029 # directory).
28030 if (
28031 am_has_slept=no
28032 for am_try in 1 2; do
28033 echo "timestamp, slept: $am_has_slept" > conftest.file
28034 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
28035 if test "$*" = "X"; then
28036 # -L didn't work.
28037 set X `ls -t "$srcdir/configure" conftest.file`
28038 fi
28039 if test "$*" != "X $srcdir/configure conftest.file" \
28040 && test "$*" != "X conftest.file $srcdir/configure"; then
28041
28042 # If neither matched, then we have a broken ls. This can happen
28043 # if, for instance, CONFIG_SHELL is bash and it inherits a
28044 # broken ls alias from the environment. This has actually
28045 # happened. Such a system could not be considered "sane".
28046 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
28047 alias in your environment" "$LINENO" 5
28048 fi
28049 if test "$2" = conftest.file || test $am_try -eq 2; then
28050 break
28051 fi
28052 # Just in case.
28053 sleep 1
28054 am_has_slept=yes
28055 done
28056 test "$2" = conftest.file
28057 )
28058 then
28059 # Ok.
28060 :
28061 else
28062 as_fn_error $? "newly created file is older than distributed files!
28063 Check your system clock" "$LINENO" 5
28064 fi
28065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28066 $as_echo "yes" >&6; }
28067 # If we didn't sleep, we still need to ensure time stamps of config.status and
28068 # generated files are strictly newer.
28069 am_sleep_pid=
28070 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
28071 ( sleep 1 ) &
28072 am_sleep_pid=$!
28073 fi
28074
28075 rm -f conftest.file
28076
28077 test "$program_prefix" != NONE &&
28078 program_transform_name="s&^&$program_prefix&;$program_transform_name"
28079 # Use a double $ so make ignores it.
28080 test "$program_suffix" != NONE &&
28081 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
28082 # Double any \ or $.
28083 # By default was `s,x,x', remove it if useless.
28084 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
28085 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
28086
28087 if test x"${MISSING+set}" != xset; then
28088 case $am_aux_dir in
28089 *\ * | *\ *)
28090 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
28091 *)
28092 MISSING="\${SHELL} $am_aux_dir/missing" ;;
28093 esac
28094 fi
28095 # Use eval to expand $SHELL
28096 if eval "$MISSING --is-lightweight"; then
28097 am_missing_run="$MISSING "
28098 else
28099 am_missing_run=
28100 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
28101 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
28102 fi
28103
28104 if test x"${install_sh+set}" != xset; then
28105 case $am_aux_dir in
28106 *\ * | *\ *)
28107 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
28108 *)
28109 install_sh="\${SHELL} $am_aux_dir/install-sh"
28110 esac
28111 fi
28112
28113 # Installed binaries are usually stripped using 'strip' when the user
28114 # run "make install-strip". However 'strip' might not be the right
28115 # tool to use in cross-compilation environments, therefore Automake
28116 # will honor the 'STRIP' environment variable to overrule this program.
28117 if test "$cross_compiling" != no; then
28118 if test -n "$ac_tool_prefix"; then
28119 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
28120 set dummy ${ac_tool_prefix}strip; ac_word=$2
28121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28122 $as_echo_n "checking for $ac_word... " >&6; }
28123 if ${ac_cv_prog_STRIP+:} false; then :
28124 $as_echo_n "(cached) " >&6
28125 else
28126 if test -n "$STRIP"; then
28127 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
28128 else
28129 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28130 for as_dir in $PATH
28131 do
28132 IFS=$as_save_IFS
28133 test -z "$as_dir" && as_dir=.
28134 for ac_exec_ext in '' $ac_executable_extensions; do
28135 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28136 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
28137 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28138 break 2
28139 fi
28140 done
28141 done
28142 IFS=$as_save_IFS
28143
28144 fi
28145 fi
28146 STRIP=$ac_cv_prog_STRIP
28147 if test -n "$STRIP"; then
28148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
28149 $as_echo "$STRIP" >&6; }
28150 else
28151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28152 $as_echo "no" >&6; }
28153 fi
28154
28155
28156 fi
28157 if test -z "$ac_cv_prog_STRIP"; then
28158 ac_ct_STRIP=$STRIP
28159 # Extract the first word of "strip", so it can be a program name with args.
28160 set dummy strip; ac_word=$2
28161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28162 $as_echo_n "checking for $ac_word... " >&6; }
28163 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
28164 $as_echo_n "(cached) " >&6
28165 else
28166 if test -n "$ac_ct_STRIP"; then
28167 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
28168 else
28169 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28170 for as_dir in $PATH
28171 do
28172 IFS=$as_save_IFS
28173 test -z "$as_dir" && as_dir=.
28174 for ac_exec_ext in '' $ac_executable_extensions; do
28175 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28176 ac_cv_prog_ac_ct_STRIP="strip"
28177 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28178 break 2
28179 fi
28180 done
28181 done
28182 IFS=$as_save_IFS
28183
28184 fi
28185 fi
28186 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
28187 if test -n "$ac_ct_STRIP"; then
28188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
28189 $as_echo "$ac_ct_STRIP" >&6; }
28190 else
28191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28192 $as_echo "no" >&6; }
28193 fi
28194
28195 if test "x$ac_ct_STRIP" = x; then
28196 STRIP=":"
28197 else
28198 case $cross_compiling:$ac_tool_warned in
28199 yes:)
28200 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28201 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28202 ac_tool_warned=yes ;;
28203 esac
28204 STRIP=$ac_ct_STRIP
28205 fi
28206 else
28207 STRIP="$ac_cv_prog_STRIP"
28208 fi
28209
28210 fi
28211 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
28212
28213 for ac_prog in gawk mawk nawk awk
28214 do
28215 # Extract the first word of "$ac_prog", so it can be a program name with args.
28216 set dummy $ac_prog; ac_word=$2
28217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28218 $as_echo_n "checking for $ac_word... " >&6; }
28219 if ${ac_cv_prog_AWK+:} false; then :
28220 $as_echo_n "(cached) " >&6
28221 else
28222 if test -n "$AWK"; then
28223 ac_cv_prog_AWK="$AWK" # Let the user override the test.
28224 else
28225 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28226 for as_dir in $PATH
28227 do
28228 IFS=$as_save_IFS
28229 test -z "$as_dir" && as_dir=.
28230 for ac_exec_ext in '' $ac_executable_extensions; do
28231 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28232 ac_cv_prog_AWK="$ac_prog"
28233 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28234 break 2
28235 fi
28236 done
28237 done
28238 IFS=$as_save_IFS
28239
28240 fi
28241 fi
28242 AWK=$ac_cv_prog_AWK
28243 if test -n "$AWK"; then
28244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
28245 $as_echo "$AWK" >&6; }
28246 else
28247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28248 $as_echo "no" >&6; }
28249 fi
28250
28251
28252 test -n "$AWK" && break
28253 done
28254
28255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
28256 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
28257 set x ${MAKE-make}
28258 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
28259 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
28260 $as_echo_n "(cached) " >&6
28261 else
28262 cat >conftest.make <<\_ACEOF
28263 SHELL = /bin/sh
28264 all:
28265 @echo '@@@%%%=$(MAKE)=@@@%%%'
28266 _ACEOF
28267 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
28268 case `${MAKE-make} -f conftest.make 2>/dev/null` in
28269 *@@@%%%=?*=@@@%%%*)
28270 eval ac_cv_prog_make_${ac_make}_set=yes;;
28271 *)
28272 eval ac_cv_prog_make_${ac_make}_set=no;;
28273 esac
28274 rm -f conftest.make
28275 fi
28276 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
28277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28278 $as_echo "yes" >&6; }
28279 SET_MAKE=
28280 else
28281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28282 $as_echo "no" >&6; }
28283 SET_MAKE="MAKE=${MAKE-make}"
28284 fi
28285
28286 rm -rf .tst 2>/dev/null
28287 mkdir .tst 2>/dev/null
28288 if test -d .tst; then
28289 am__leading_dot=.
28290 else
28291 am__leading_dot=_
28292 fi
28293 rmdir .tst 2>/dev/null
28294
28295 DEPDIR="${am__leading_dot}deps"
28296
28297 ac_config_commands="$ac_config_commands depfiles"
28298
28299
28300 am_make=${MAKE-make}
28301 cat > confinc << 'END'
28302 am__doit:
28303 @echo this is the am__doit target
28304 .PHONY: am__doit
28305 END
28306 # If we don't find an include directive, just comment out the code.
28307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
28308 $as_echo_n "checking for style of include used by $am_make... " >&6; }
28309 am__include="#"
28310 am__quote=
28311 _am_result=none
28312 # First try GNU make style include.
28313 echo "include confinc" > confmf
28314 # Ignore all kinds of additional output from 'make'.
28315 case `$am_make -s -f confmf 2> /dev/null` in #(
28316 *the\ am__doit\ target*)
28317 am__include=include
28318 am__quote=
28319 _am_result=GNU
28320 ;;
28321 esac
28322 # Now try BSD make style include.
28323 if test "$am__include" = "#"; then
28324 echo '.include "confinc"' > confmf
28325 case `$am_make -s -f confmf 2> /dev/null` in #(
28326 *the\ am__doit\ target*)
28327 am__include=.include
28328 am__quote="\""
28329 _am_result=BSD
28330 ;;
28331 esac
28332 fi
28333
28334
28335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
28336 $as_echo "$_am_result" >&6; }
28337 rm -f confinc confmf
28338
28339 # Check whether --enable-dependency-tracking was given.
28340 if test "${enable_dependency_tracking+set}" = set; then :
28341 enableval=$enable_dependency_tracking;
28342 fi
28343
28344 if test "x$enable_dependency_tracking" != xno; then
28345 am_depcomp="$ac_aux_dir/depcomp"
28346 AMDEPBACKSLASH='\'
28347 am__nodep='_no'
28348 fi
28349 if test "x$enable_dependency_tracking" != xno; then
28350 AMDEP_TRUE=
28351 AMDEP_FALSE='#'
28352 else
28353 AMDEP_TRUE='#'
28354 AMDEP_FALSE=
28355 fi
28356
28357
28358 # Check whether --enable-silent-rules was given.
28359 if test "${enable_silent_rules+set}" = set; then :
28360 enableval=$enable_silent_rules;
28361 fi
28362
28363 case $enable_silent_rules in # (((
28364 yes) AM_DEFAULT_VERBOSITY=0;;
28365 no) AM_DEFAULT_VERBOSITY=1;;
28366 *) AM_DEFAULT_VERBOSITY=1;;
28367 esac
28368 am_make=${MAKE-make}
28369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
28370 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
28371 if ${am_cv_make_support_nested_variables+:} false; then :
28372 $as_echo_n "(cached) " >&6
28373 else
28374 if $as_echo 'TRUE=$(BAR$(V))
28375 BAR0=false
28376 BAR1=true
28377 V=1
28378 am__doit:
28379 @$(TRUE)
28380 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
28381 am_cv_make_support_nested_variables=yes
28382 else
28383 am_cv_make_support_nested_variables=no
28384 fi
28385 fi
28386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
28387 $as_echo "$am_cv_make_support_nested_variables" >&6; }
28388 if test $am_cv_make_support_nested_variables = yes; then
28389 AM_V='$(V)'
28390 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
28391 else
28392 AM_V=$AM_DEFAULT_VERBOSITY
28393 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
28394 fi
28395 AM_BACKSLASH='\'
28396
28397 if test "`cd $srcdir && pwd`" != "`pwd`"; then
28398 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
28399 # is not polluted with repeated "-I."
28400 am__isrc=' -I$(srcdir)'
28401 # test to see if srcdir already configured
28402 if test -f $srcdir/config.status; then
28403 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
28404 fi
28405 fi
28406
28407 # test whether we have cygpath
28408 if test -z "$CYGPATH_W"; then
28409 if (cygpath --version) >/dev/null 2>/dev/null; then
28410 CYGPATH_W='cygpath -w'
28411 else
28412 CYGPATH_W=echo
28413 fi
28414 fi
28415
28416
28417 # Define the identity of the package.
28418 PACKAGE='libgnu'
28419 VERSION='UNUSED-VERSION'
28420
28421
28422 # Some tools Automake needs.
28423
28424 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
28425
28426
28427 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
28428
28429
28430 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
28431
28432
28433 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
28434
28435
28436 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
28437
28438 # For better backward compatibility. To be removed once Automake 1.9.x
28439 # dies out for good. For more background, see:
28440 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
28441 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
28442 mkdir_p='$(MKDIR_P)'
28443
28444 # We need awk for the "check" target (and possibly the TAP driver). The
28445 # system "awk" is bad on some platforms.
28446 # Always define AMTAR for backward compatibility. Yes, it's still used
28447 # in the wild :-( We should find a proper way to deprecate it ...
28448 AMTAR='$${TAR-tar}'
28449
28450
28451 # We'll loop over all known methods to create a tar archive until one works.
28452 _am_tools='gnutar pax cpio none'
28453
28454 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
28455
28456
28457
28458
28459
28460 depcc="$CC" am_compiler_list=
28461
28462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
28463 $as_echo_n "checking dependency style of $depcc... " >&6; }
28464 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
28465 $as_echo_n "(cached) " >&6
28466 else
28467 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
28468 # We make a subdir and do the tests there. Otherwise we can end up
28469 # making bogus files that we don't know about and never remove. For
28470 # instance it was reported that on HP-UX the gcc test will end up
28471 # making a dummy file named 'D' -- because '-MD' means "put the output
28472 # in D".
28473 rm -rf conftest.dir
28474 mkdir conftest.dir
28475 # Copy depcomp to subdir because otherwise we won't find it if we're
28476 # using a relative directory.
28477 cp "$am_depcomp" conftest.dir
28478 cd conftest.dir
28479 # We will build objects and dependencies in a subdirectory because
28480 # it helps to detect inapplicable dependency modes. For instance
28481 # both Tru64's cc and ICC support -MD to output dependencies as a
28482 # side effect of compilation, but ICC will put the dependencies in
28483 # the current directory while Tru64 will put them in the object
28484 # directory.
28485 mkdir sub
28486
28487 am_cv_CC_dependencies_compiler_type=none
28488 if test "$am_compiler_list" = ""; then
28489 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
28490 fi
28491 am__universal=false
28492 case " $depcc " in #(
28493 *\ -arch\ *\ -arch\ *) am__universal=true ;;
28494 esac
28495
28496 for depmode in $am_compiler_list; do
28497 # Setup a source with many dependencies, because some compilers
28498 # like to wrap large dependency lists on column 80 (with \), and
28499 # we should not choose a depcomp mode which is confused by this.
28500 #
28501 # We need to recreate these files for each test, as the compiler may
28502 # overwrite some of them when testing with obscure command lines.
28503 # This happens at least with the AIX C compiler.
28504 : > sub/conftest.c
28505 for i in 1 2 3 4 5 6; do
28506 echo '#include "conftst'$i'.h"' >> sub/conftest.c
28507 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
28508 # Solaris 10 /bin/sh.
28509 echo '/* dummy */' > sub/conftst$i.h
28510 done
28511 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
28512
28513 # We check with '-c' and '-o' for the sake of the "dashmstdout"
28514 # mode. It turns out that the SunPro C++ compiler does not properly
28515 # handle '-M -o', and we need to detect this. Also, some Intel
28516 # versions had trouble with output in subdirs.
28517 am__obj=sub/conftest.${OBJEXT-o}
28518 am__minus_obj="-o $am__obj"
28519 case $depmode in
28520 gcc)
28521 # This depmode causes a compiler race in universal mode.
28522 test "$am__universal" = false || continue
28523 ;;
28524 nosideeffect)
28525 # After this tag, mechanisms are not by side-effect, so they'll
28526 # only be used when explicitly requested.
28527 if test "x$enable_dependency_tracking" = xyes; then
28528 continue
28529 else
28530 break
28531 fi
28532 ;;
28533 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
28534 # This compiler won't grok '-c -o', but also, the minuso test has
28535 # not run yet. These depmodes are late enough in the game, and
28536 # so weak that their functioning should not be impacted.
28537 am__obj=conftest.${OBJEXT-o}
28538 am__minus_obj=
28539 ;;
28540 none) break ;;
28541 esac
28542 if depmode=$depmode \
28543 source=sub/conftest.c object=$am__obj \
28544 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
28545 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
28546 >/dev/null 2>conftest.err &&
28547 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
28548 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
28549 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
28550 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
28551 # icc doesn't choke on unknown options, it will just issue warnings
28552 # or remarks (even with -Werror). So we grep stderr for any message
28553 # that says an option was ignored or not supported.
28554 # When given -MP, icc 7.0 and 7.1 complain thusly:
28555 # icc: Command line warning: ignoring option '-M'; no argument required
28556 # The diagnosis changed in icc 8.0:
28557 # icc: Command line remark: option '-MP' not supported
28558 if (grep 'ignoring option' conftest.err ||
28559 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
28560 am_cv_CC_dependencies_compiler_type=$depmode
28561 break
28562 fi
28563 fi
28564 done
28565
28566 cd ..
28567 rm -rf conftest.dir
28568 else
28569 am_cv_CC_dependencies_compiler_type=none
28570 fi
28571
28572 fi
28573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
28574 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
28575 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
28576
28577 if
28578 test "x$enable_dependency_tracking" != xno \
28579 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
28580 am__fastdepCC_TRUE=
28581 am__fastdepCC_FALSE='#'
28582 else
28583 am__fastdepCC_TRUE='#'
28584 am__fastdepCC_FALSE=
28585 fi
28586
28587
28588
28589 # POSIX will say in a future version that running "rm -f" with no argument
28590 # is OK; and we want to be able to make that assumption in our Makefile
28591 # recipes. So use an aggressive probe to check that the usage we want is
28592 # actually supported "in the wild" to an acceptable degree.
28593 # See automake bug#10828.
28594 # To make any issue more visible, cause the running configure to be aborted
28595 # by default if the 'rm' program in use doesn't match our expectations; the
28596 # user can still override this though.
28597 if rm -f && rm -fr && rm -rf; then : OK; else
28598 cat >&2 <<'END'
28599 Oops!
28600
28601 Your 'rm' program seems unable to run without file operands specified
28602 on the command line, even when the '-f' option is present. This is contrary
28603 to the behaviour of most rm programs out there, and not conforming with
28604 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
28605
28606 Please tell bug-automake@gnu.org about your system, including the value
28607 of your $PATH and any error possibly output before this message. This
28608 can help us improve future automake versions.
28609
28610 END
28611 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
28612 echo 'Configuration will proceed anyway, since you have set the' >&2
28613 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
28614 echo >&2
28615 else
28616 cat >&2 <<'END'
28617 Aborting the configuration process, to ensure you take notice of the issue.
28618
28619 You can download and install GNU coreutils to get an 'rm' implementation
28620 that behaves properly: <http://www.gnu.org/software/coreutils/>.
28621
28622 If you want to complete the configuration process using your problematic
28623 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
28624 to "yes", and re-run configure.
28625
28626 END
28627 as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
28628 fi
28629 fi
28630
28631
28632 # Check whether --enable-silent-rules was given.
28633 if test "${enable_silent_rules+set}" = set; then :
28634 enableval=$enable_silent_rules;
28635 fi
28636
28637 case $enable_silent_rules in # (((
28638 yes) AM_DEFAULT_VERBOSITY=0;;
28639 no) AM_DEFAULT_VERBOSITY=1;;
28640 *) AM_DEFAULT_VERBOSITY=0;;
28641 esac
28642 am_make=${MAKE-make}
28643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
28644 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
28645 if ${am_cv_make_support_nested_variables+:} false; then :
28646 $as_echo_n "(cached) " >&6
28647 else
28648 if $as_echo 'TRUE=$(BAR$(V))
28649 BAR0=false
28650 BAR1=true
28651 V=1
28652 am__doit:
28653 @$(TRUE)
28654 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
28655 am_cv_make_support_nested_variables=yes
28656 else
28657 am_cv_make_support_nested_variables=no
28658 fi
28659 fi
28660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
28661 $as_echo "$am_cv_make_support_nested_variables" >&6; }
28662 if test $am_cv_make_support_nested_variables = yes; then
28663 AM_V='$(V)'
28664 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
28665 else
28666 AM_V=$AM_DEFAULT_VERBOSITY
28667 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
28668 fi
28669 AM_BACKSLASH='\'
28670
28671
28672 # --------------------- #
28673 # Checks for programs. #
28674 # --------------------- #
28675
28676
28677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
28678 $as_echo_n "checking whether ln -s works... " >&6; }
28679 LN_S=$as_ln_s
28680 if test "$LN_S" = "ln -s"; then
28681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28682 $as_echo "yes" >&6; }
28683 else
28684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
28685 $as_echo "no, using $LN_S" >&6; }
28686 fi
28687
28688 if test -n "$ac_tool_prefix"; then
28689 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
28690 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
28691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28692 $as_echo_n "checking for $ac_word... " >&6; }
28693 if ${ac_cv_prog_RANLIB+:} false; then :
28694 $as_echo_n "(cached) " >&6
28695 else
28696 if test -n "$RANLIB"; then
28697 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
28698 else
28699 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28700 for as_dir in $PATH
28701 do
28702 IFS=$as_save_IFS
28703 test -z "$as_dir" && as_dir=.
28704 for ac_exec_ext in '' $ac_executable_extensions; do
28705 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28706 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
28707 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28708 break 2
28709 fi
28710 done
28711 done
28712 IFS=$as_save_IFS
28713
28714 fi
28715 fi
28716 RANLIB=$ac_cv_prog_RANLIB
28717 if test -n "$RANLIB"; then
28718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
28719 $as_echo "$RANLIB" >&6; }
28720 else
28721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28722 $as_echo "no" >&6; }
28723 fi
28724
28725
28726 fi
28727 if test -z "$ac_cv_prog_RANLIB"; then
28728 ac_ct_RANLIB=$RANLIB
28729 # Extract the first word of "ranlib", so it can be a program name with args.
28730 set dummy ranlib; ac_word=$2
28731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28732 $as_echo_n "checking for $ac_word... " >&6; }
28733 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
28734 $as_echo_n "(cached) " >&6
28735 else
28736 if test -n "$ac_ct_RANLIB"; then
28737 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
28738 else
28739 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28740 for as_dir in $PATH
28741 do
28742 IFS=$as_save_IFS
28743 test -z "$as_dir" && as_dir=.
28744 for ac_exec_ext in '' $ac_executable_extensions; do
28745 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28746 ac_cv_prog_ac_ct_RANLIB="ranlib"
28747 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28748 break 2
28749 fi
28750 done
28751 done
28752 IFS=$as_save_IFS
28753
28754 fi
28755 fi
28756 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
28757 if test -n "$ac_ct_RANLIB"; then
28758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
28759 $as_echo "$ac_ct_RANLIB" >&6; }
28760 else
28761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28762 $as_echo "no" >&6; }
28763 fi
28764
28765 if test "x$ac_ct_RANLIB" = x; then
28766 RANLIB=":"
28767 else
28768 case $cross_compiling:$ac_tool_warned in
28769 yes:)
28770 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28771 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28772 ac_tool_warned=yes ;;
28773 esac
28774 RANLIB=$ac_ct_RANLIB
28775 fi
28776 else
28777 RANLIB="$ac_cv_prog_RANLIB"
28778 fi
28779
28780
28781 if test -n "$ac_tool_prefix"; then
28782 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
28783 set dummy ${ac_tool_prefix}ar; ac_word=$2
28784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28785 $as_echo_n "checking for $ac_word... " >&6; }
28786 if ${ac_cv_prog_AR+:} false; then :
28787 $as_echo_n "(cached) " >&6
28788 else
28789 if test -n "$AR"; then
28790 ac_cv_prog_AR="$AR" # Let the user override the test.
28791 else
28792 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28793 for as_dir in $PATH
28794 do
28795 IFS=$as_save_IFS
28796 test -z "$as_dir" && as_dir=.
28797 for ac_exec_ext in '' $ac_executable_extensions; do
28798 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28799 ac_cv_prog_AR="${ac_tool_prefix}ar"
28800 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28801 break 2
28802 fi
28803 done
28804 done
28805 IFS=$as_save_IFS
28806
28807 fi
28808 fi
28809 AR=$ac_cv_prog_AR
28810 if test -n "$AR"; then
28811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
28812 $as_echo "$AR" >&6; }
28813 else
28814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28815 $as_echo "no" >&6; }
28816 fi
28817
28818
28819 fi
28820 if test -z "$ac_cv_prog_AR"; then
28821 ac_ct_AR=$AR
28822 # Extract the first word of "ar", so it can be a program name with args.
28823 set dummy ar; ac_word=$2
28824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28825 $as_echo_n "checking for $ac_word... " >&6; }
28826 if ${ac_cv_prog_ac_ct_AR+:} false; then :
28827 $as_echo_n "(cached) " >&6
28828 else
28829 if test -n "$ac_ct_AR"; then
28830 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
28831 else
28832 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28833 for as_dir in $PATH
28834 do
28835 IFS=$as_save_IFS
28836 test -z "$as_dir" && as_dir=.
28837 for ac_exec_ext in '' $ac_executable_extensions; do
28838 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28839 ac_cv_prog_ac_ct_AR="ar"
28840 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28841 break 2
28842 fi
28843 done
28844 done
28845 IFS=$as_save_IFS
28846
28847 fi
28848 fi
28849 ac_ct_AR=$ac_cv_prog_ac_ct_AR
28850 if test -n "$ac_ct_AR"; then
28851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
28852 $as_echo "$ac_ct_AR" >&6; }
28853 else
28854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28855 $as_echo "no" >&6; }
28856 fi
28857
28858 if test "x$ac_ct_AR" = x; then
28859 AR=""
28860 else
28861 case $cross_compiling:$ac_tool_warned in
28862 yes:)
28863 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28864 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28865 ac_tool_warned=yes ;;
28866 esac
28867 AR=$ac_ct_AR
28868 fi
28869 else
28870 AR="$ac_cv_prog_AR"
28871 fi
28872
28873
28874 # ---------------------- #
28875 # Checks for libraries. #
28876 # ---------------------- #
28877
28878 ac_config_files="$ac_config_files Makefile import/Makefile"
28879
28880 ac_config_commands="$ac_config_commands default"
28881
28882 cat >confcache <<\_ACEOF
28883 # This file is a shell script that caches the results of configure
28884 # tests run on this system so they can be shared between configure
28885 # scripts and configure runs, see configure's option --config-cache.
28886 # It is not useful on other systems. If it contains results you don't
28887 # want to keep, you may remove or edit it.
28888 #
28889 # config.status only pays attention to the cache file if you give it
28890 # the --recheck option to rerun configure.
28891 #
28892 # `ac_cv_env_foo' variables (set or unset) will be overridden when
28893 # loading this file, other *unset* `ac_cv_foo' will be assigned the
28894 # following values.
28895
28896 _ACEOF
28897
28898 # The following way of writing the cache mishandles newlines in values,
28899 # but we know of no workaround that is simple, portable, and efficient.
28900 # So, we kill variables containing newlines.
28901 # Ultrix sh set writes to stderr and can't be redirected directly,
28902 # and sets the high bit in the cache file unless we assign to the vars.
28903 (
28904 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
28905 eval ac_val=\$$ac_var
28906 case $ac_val in #(
28907 *${as_nl}*)
28908 case $ac_var in #(
28909 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
28910 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
28911 esac
28912 case $ac_var in #(
28913 _ | IFS | as_nl) ;; #(
28914 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
28915 *) { eval $ac_var=; unset $ac_var;} ;;
28916 esac ;;
28917 esac
28918 done
28919
28920 (set) 2>&1 |
28921 case $as_nl`(ac_space=' '; set) 2>&1` in #(
28922 *${as_nl}ac_space=\ *)
28923 # `set' does not quote correctly, so add quotes: double-quote
28924 # substitution turns \\\\ into \\, and sed turns \\ into \.
28925 sed -n \
28926 "s/'/'\\\\''/g;
28927 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
28928 ;; #(
28929 *)
28930 # `set' quotes correctly as required by POSIX, so do not add quotes.
28931 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
28932 ;;
28933 esac |
28934 sort
28935 ) |
28936 sed '
28937 /^ac_cv_env_/b end
28938 t clear
28939 :clear
28940 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
28941 t end
28942 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
28943 :end' >>confcache
28944 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
28945 if test -w "$cache_file"; then
28946 if test "x$cache_file" != "x/dev/null"; then
28947 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
28948 $as_echo "$as_me: updating cache $cache_file" >&6;}
28949 if test ! -f "$cache_file" || test -h "$cache_file"; then
28950 cat confcache >"$cache_file"
28951 else
28952 case $cache_file in #(
28953 */* | ?:*)
28954 mv -f confcache "$cache_file"$$ &&
28955 mv -f "$cache_file"$$ "$cache_file" ;; #(
28956 *)
28957 mv -f confcache "$cache_file" ;;
28958 esac
28959 fi
28960 fi
28961 else
28962 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
28963 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
28964 fi
28965 fi
28966 rm -f confcache
28967
28968 test "x$prefix" = xNONE && prefix=$ac_default_prefix
28969 # Let make expand exec_prefix.
28970 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
28971
28972 DEFS=-DHAVE_CONFIG_H
28973
28974 ac_libobjs=
28975 ac_ltlibobjs=
28976 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
28977 # 1. Remove the extension, and $U if already installed.
28978 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
28979 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
28980 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
28981 # will be set to the directory where LIBOBJS objects are built.
28982 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
28983 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
28984 done
28985 LIBOBJS=$ac_libobjs
28986
28987 LTLIBOBJS=$ac_ltlibobjs
28988
28989
28990 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
28991 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
28992 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28993 fi
28994 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
28995 as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
28996 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28997 fi
28998 if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
28999 as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
29000 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29001 fi
29002 if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
29003 as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
29004 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29005 fi
29006 if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
29007 as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
29008 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29009 fi
29010 if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
29011 as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
29012 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29013 fi
29014 if test -z "${GL_GENERATE_GLOB_H_TRUE}" && test -z "${GL_GENERATE_GLOB_H_FALSE}"; then
29015 as_fn_error $? "conditional \"GL_GENERATE_GLOB_H\" was never defined.
29016 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29017 fi
29018 if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
29019 as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
29020 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29021 fi
29022 if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
29023 as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
29024 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29025 fi
29026 if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
29027 as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
29028 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29029 fi
29030
29031
29032 if test -z "${GL_GENERATE_NETINET_IN_H_TRUE}" && test -z "${GL_GENERATE_NETINET_IN_H_FALSE}"; then
29033 as_fn_error $? "conditional \"GL_GENERATE_NETINET_IN_H\" was never defined.
29034 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29035 fi
29036 if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
29037 as_fn_error $? "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
29038 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29039 fi
29040 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
29041 as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
29042 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29043 fi
29044 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
29045 as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
29046 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29047 fi
29048
29049 gl_libobjs=
29050 gl_ltlibobjs=
29051 if test -n "$gl_LIBOBJS"; then
29052 # Remove the extension.
29053 sed_drop_objext='s/\.o$//;s/\.obj$//'
29054 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
29055 gl_libobjs="$gl_libobjs $i.$ac_objext"
29056 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
29057 done
29058 fi
29059 gl_LIBOBJS=$gl_libobjs
29060
29061 gl_LTLIBOBJS=$gl_ltlibobjs
29062
29063
29064
29065 gltests_libobjs=
29066 gltests_ltlibobjs=
29067 if test -n "$gltests_LIBOBJS"; then
29068 # Remove the extension.
29069 sed_drop_objext='s/\.o$//;s/\.obj$//'
29070 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
29071 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
29072 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
29073 done
29074 fi
29075 gltests_LIBOBJS=$gltests_libobjs
29076
29077 gltests_LTLIBOBJS=$gltests_ltlibobjs
29078
29079
29080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
29081 $as_echo_n "checking that generated files are newer than configure... " >&6; }
29082 if test -n "$am_sleep_pid"; then
29083 # Hide warnings about reused PIDs.
29084 wait $am_sleep_pid 2>/dev/null
29085 fi
29086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
29087 $as_echo "done" >&6; }
29088 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
29089 as_fn_error $? "conditional \"AMDEP\" was never defined.
29090 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29091 fi
29092 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
29093 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
29094 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29095 fi
29096 if test -n "$EXEEXT"; then
29097 am__EXEEXT_TRUE=
29098 am__EXEEXT_FALSE='#'
29099 else
29100 am__EXEEXT_TRUE='#'
29101 am__EXEEXT_FALSE=
29102 fi
29103
29104
29105 : "${CONFIG_STATUS=./config.status}"
29106 ac_write_fail=0
29107 ac_clean_files_save=$ac_clean_files
29108 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
29109 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
29110 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
29111 as_write_fail=0
29112 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
29113 #! $SHELL
29114 # Generated by $as_me.
29115 # Run this file to recreate the current configuration.
29116 # Compiler output produced by configure, useful for debugging
29117 # configure, is in config.log if it exists.
29118
29119 debug=false
29120 ac_cs_recheck=false
29121 ac_cs_silent=false
29122
29123 SHELL=\${CONFIG_SHELL-$SHELL}
29124 export SHELL
29125 _ASEOF
29126 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
29127 ## -------------------- ##
29128 ## M4sh Initialization. ##
29129 ## -------------------- ##
29130
29131 # Be more Bourne compatible
29132 DUALCASE=1; export DUALCASE # for MKS sh
29133 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
29134 emulate sh
29135 NULLCMD=:
29136 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29137 # is contrary to our usage. Disable this feature.
29138 alias -g '${1+"$@"}'='"$@"'
29139 setopt NO_GLOB_SUBST
29140 else
29141 case `(set -o) 2>/dev/null` in #(
29142 *posix*) :
29143 set -o posix ;; #(
29144 *) :
29145 ;;
29146 esac
29147 fi
29148
29149
29150 as_nl='
29151 '
29152 export as_nl
29153 # Printing a long string crashes Solaris 7 /usr/bin/printf.
29154 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
29155 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
29156 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
29157 # Prefer a ksh shell builtin over an external printf program on Solaris,
29158 # but without wasting forks for bash or zsh.
29159 if test -z "$BASH_VERSION$ZSH_VERSION" \
29160 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
29161 as_echo='print -r --'
29162 as_echo_n='print -rn --'
29163 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
29164 as_echo='printf %s\n'
29165 as_echo_n='printf %s'
29166 else
29167 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
29168 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
29169 as_echo_n='/usr/ucb/echo -n'
29170 else
29171 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
29172 as_echo_n_body='eval
29173 arg=$1;
29174 case $arg in #(
29175 *"$as_nl"*)
29176 expr "X$arg" : "X\\(.*\\)$as_nl";
29177 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
29178 esac;
29179 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
29180 '
29181 export as_echo_n_body
29182 as_echo_n='sh -c $as_echo_n_body as_echo'
29183 fi
29184 export as_echo_body
29185 as_echo='sh -c $as_echo_body as_echo'
29186 fi
29187
29188 # The user is always right.
29189 if test "${PATH_SEPARATOR+set}" != set; then
29190 PATH_SEPARATOR=:
29191 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
29192 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
29193 PATH_SEPARATOR=';'
29194 }
29195 fi
29196
29197
29198 # IFS
29199 # We need space, tab and new line, in precisely that order. Quoting is
29200 # there to prevent editors from complaining about space-tab.
29201 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
29202 # splitting by setting IFS to empty value.)
29203 IFS=" "" $as_nl"
29204
29205 # Find who we are. Look in the path if we contain no directory separator.
29206 as_myself=
29207 case $0 in #((
29208 *[\\/]* ) as_myself=$0 ;;
29209 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29210 for as_dir in $PATH
29211 do
29212 IFS=$as_save_IFS
29213 test -z "$as_dir" && as_dir=.
29214 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
29215 done
29216 IFS=$as_save_IFS
29217
29218 ;;
29219 esac
29220 # We did not find ourselves, most probably we were run as `sh COMMAND'
29221 # in which case we are not to be found in the path.
29222 if test "x$as_myself" = x; then
29223 as_myself=$0
29224 fi
29225 if test ! -f "$as_myself"; then
29226 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
29227 exit 1
29228 fi
29229
29230 # Unset variables that we do not need and which cause bugs (e.g. in
29231 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
29232 # suppresses any "Segmentation fault" message there. '((' could
29233 # trigger a bug in pdksh 5.2.14.
29234 for as_var in BASH_ENV ENV MAIL MAILPATH
29235 do eval test x\${$as_var+set} = xset \
29236 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
29237 done
29238 PS1='$ '
29239 PS2='> '
29240 PS4='+ '
29241
29242 # NLS nuisances.
29243 LC_ALL=C
29244 export LC_ALL
29245 LANGUAGE=C
29246 export LANGUAGE
29247
29248 # CDPATH.
29249 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
29250
29251
29252 # as_fn_error STATUS ERROR [LINENO LOG_FD]
29253 # ----------------------------------------
29254 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
29255 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
29256 # script with STATUS, using 1 if that was 0.
29257 as_fn_error ()
29258 {
29259 as_status=$1; test $as_status -eq 0 && as_status=1
29260 if test "$4"; then
29261 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
29262 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
29263 fi
29264 $as_echo "$as_me: error: $2" >&2
29265 as_fn_exit $as_status
29266 } # as_fn_error
29267
29268
29269 # as_fn_set_status STATUS
29270 # -----------------------
29271 # Set $? to STATUS, without forking.
29272 as_fn_set_status ()
29273 {
29274 return $1
29275 } # as_fn_set_status
29276
29277 # as_fn_exit STATUS
29278 # -----------------
29279 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
29280 as_fn_exit ()
29281 {
29282 set +e
29283 as_fn_set_status $1
29284 exit $1
29285 } # as_fn_exit
29286
29287 # as_fn_unset VAR
29288 # ---------------
29289 # Portably unset VAR.
29290 as_fn_unset ()
29291 {
29292 { eval $1=; unset $1;}
29293 }
29294 as_unset=as_fn_unset
29295 # as_fn_append VAR VALUE
29296 # ----------------------
29297 # Append the text in VALUE to the end of the definition contained in VAR. Take
29298 # advantage of any shell optimizations that allow amortized linear growth over
29299 # repeated appends, instead of the typical quadratic growth present in naive
29300 # implementations.
29301 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
29302 eval 'as_fn_append ()
29303 {
29304 eval $1+=\$2
29305 }'
29306 else
29307 as_fn_append ()
29308 {
29309 eval $1=\$$1\$2
29310 }
29311 fi # as_fn_append
29312
29313 # as_fn_arith ARG...
29314 # ------------------
29315 # Perform arithmetic evaluation on the ARGs, and store the result in the
29316 # global $as_val. Take advantage of shells that can avoid forks. The arguments
29317 # must be portable across $(()) and expr.
29318 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
29319 eval 'as_fn_arith ()
29320 {
29321 as_val=$(( $* ))
29322 }'
29323 else
29324 as_fn_arith ()
29325 {
29326 as_val=`expr "$@" || test $? -eq 1`
29327 }
29328 fi # as_fn_arith
29329
29330
29331 if expr a : '\(a\)' >/dev/null 2>&1 &&
29332 test "X`expr 00001 : '.*\(...\)'`" = X001; then
29333 as_expr=expr
29334 else
29335 as_expr=false
29336 fi
29337
29338 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
29339 as_basename=basename
29340 else
29341 as_basename=false
29342 fi
29343
29344 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
29345 as_dirname=dirname
29346 else
29347 as_dirname=false
29348 fi
29349
29350 as_me=`$as_basename -- "$0" ||
29351 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
29352 X"$0" : 'X\(//\)$' \| \
29353 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
29354 $as_echo X/"$0" |
29355 sed '/^.*\/\([^/][^/]*\)\/*$/{
29356 s//\1/
29357 q
29358 }
29359 /^X\/\(\/\/\)$/{
29360 s//\1/
29361 q
29362 }
29363 /^X\/\(\/\).*/{
29364 s//\1/
29365 q
29366 }
29367 s/.*/./; q'`
29368
29369 # Avoid depending upon Character Ranges.
29370 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
29371 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
29372 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
29373 as_cr_digits='0123456789'
29374 as_cr_alnum=$as_cr_Letters$as_cr_digits
29375
29376 ECHO_C= ECHO_N= ECHO_T=
29377 case `echo -n x` in #(((((
29378 -n*)
29379 case `echo 'xy\c'` in
29380 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
29381 xy) ECHO_C='\c';;
29382 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
29383 ECHO_T=' ';;
29384 esac;;
29385 *)
29386 ECHO_N='-n';;
29387 esac
29388
29389 rm -f conf$$ conf$$.exe conf$$.file
29390 if test -d conf$$.dir; then
29391 rm -f conf$$.dir/conf$$.file
29392 else
29393 rm -f conf$$.dir
29394 mkdir conf$$.dir 2>/dev/null
29395 fi
29396 if (echo >conf$$.file) 2>/dev/null; then
29397 if ln -s conf$$.file conf$$ 2>/dev/null; then
29398 as_ln_s='ln -s'
29399 # ... but there are two gotchas:
29400 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
29401 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
29402 # In both cases, we have to default to `cp -pR'.
29403 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
29404 as_ln_s='cp -pR'
29405 elif ln conf$$.file conf$$ 2>/dev/null; then
29406 as_ln_s=ln
29407 else
29408 as_ln_s='cp -pR'
29409 fi
29410 else
29411 as_ln_s='cp -pR'
29412 fi
29413 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
29414 rmdir conf$$.dir 2>/dev/null
29415
29416
29417 # as_fn_mkdir_p
29418 # -------------
29419 # Create "$as_dir" as a directory, including parents if necessary.
29420 as_fn_mkdir_p ()
29421 {
29422
29423 case $as_dir in #(
29424 -*) as_dir=./$as_dir;;
29425 esac
29426 test -d "$as_dir" || eval $as_mkdir_p || {
29427 as_dirs=
29428 while :; do
29429 case $as_dir in #(
29430 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
29431 *) as_qdir=$as_dir;;
29432 esac
29433 as_dirs="'$as_qdir' $as_dirs"
29434 as_dir=`$as_dirname -- "$as_dir" ||
29435 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29436 X"$as_dir" : 'X\(//\)[^/]' \| \
29437 X"$as_dir" : 'X\(//\)$' \| \
29438 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
29439 $as_echo X"$as_dir" |
29440 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
29441 s//\1/
29442 q
29443 }
29444 /^X\(\/\/\)[^/].*/{
29445 s//\1/
29446 q
29447 }
29448 /^X\(\/\/\)$/{
29449 s//\1/
29450 q
29451 }
29452 /^X\(\/\).*/{
29453 s//\1/
29454 q
29455 }
29456 s/.*/./; q'`
29457 test -d "$as_dir" && break
29458 done
29459 test -z "$as_dirs" || eval "mkdir $as_dirs"
29460 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
29461
29462
29463 } # as_fn_mkdir_p
29464 if mkdir -p . 2>/dev/null; then
29465 as_mkdir_p='mkdir -p "$as_dir"'
29466 else
29467 test -d ./-p && rmdir ./-p
29468 as_mkdir_p=false
29469 fi
29470
29471
29472 # as_fn_executable_p FILE
29473 # -----------------------
29474 # Test if FILE is an executable regular file.
29475 as_fn_executable_p ()
29476 {
29477 test -f "$1" && test -x "$1"
29478 } # as_fn_executable_p
29479 as_test_x='test -x'
29480 as_executable_p=as_fn_executable_p
29481
29482 # Sed expression to map a string onto a valid CPP name.
29483 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
29484
29485 # Sed expression to map a string onto a valid variable name.
29486 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
29487
29488
29489 exec 6>&1
29490 ## ----------------------------------- ##
29491 ## Main body of $CONFIG_STATUS script. ##
29492 ## ----------------------------------- ##
29493 _ASEOF
29494 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
29495
29496 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29497 # Save the log message, to keep $0 and so on meaningful, and to
29498 # report actual input values of CONFIG_FILES etc. instead of their
29499 # values after options handling.
29500 ac_log="
29501 This file was extended by libgnu $as_me UNUSED-VERSION, which was
29502 generated by GNU Autoconf 2.69. Invocation command line was
29503
29504 CONFIG_FILES = $CONFIG_FILES
29505 CONFIG_HEADERS = $CONFIG_HEADERS
29506 CONFIG_LINKS = $CONFIG_LINKS
29507 CONFIG_COMMANDS = $CONFIG_COMMANDS
29508 $ $0 $@
29509
29510 on `(hostname || uname -n) 2>/dev/null | sed 1q`
29511 "
29512
29513 _ACEOF
29514
29515 case $ac_config_files in *"
29516 "*) set x $ac_config_files; shift; ac_config_files=$*;;
29517 esac
29518
29519 case $ac_config_headers in *"
29520 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
29521 esac
29522
29523
29524 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29525 # Files that config.status was made for.
29526 config_files="$ac_config_files"
29527 config_headers="$ac_config_headers"
29528 config_commands="$ac_config_commands"
29529
29530 _ACEOF
29531
29532 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29533 ac_cs_usage="\
29534 \`$as_me' instantiates files and other configuration actions
29535 from templates according to the current configuration. Unless the files
29536 and actions are specified as TAGs, all are instantiated by default.
29537
29538 Usage: $0 [OPTION]... [TAG]...
29539
29540 -h, --help print this help, then exit
29541 -V, --version print version number and configuration settings, then exit
29542 --config print configuration, then exit
29543 -q, --quiet, --silent
29544 do not print progress messages
29545 -d, --debug don't remove temporary files
29546 --recheck update $as_me by reconfiguring in the same conditions
29547 --file=FILE[:TEMPLATE]
29548 instantiate the configuration file FILE
29549 --header=FILE[:TEMPLATE]
29550 instantiate the configuration header FILE
29551
29552 Configuration files:
29553 $config_files
29554
29555 Configuration headers:
29556 $config_headers
29557
29558 Configuration commands:
29559 $config_commands
29560
29561 Report bugs to the package provider."
29562
29563 _ACEOF
29564 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29565 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
29566 ac_cs_version="\\
29567 libgnu config.status UNUSED-VERSION
29568 configured by $0, generated by GNU Autoconf 2.69,
29569 with options \\"\$ac_cs_config\\"
29570
29571 Copyright (C) 2012 Free Software Foundation, Inc.
29572 This config.status script is free software; the Free Software Foundation
29573 gives unlimited permission to copy, distribute and modify it."
29574
29575 ac_pwd='$ac_pwd'
29576 srcdir='$srcdir'
29577 INSTALL='$INSTALL'
29578 MKDIR_P='$MKDIR_P'
29579 AWK='$AWK'
29580 test -n "\$AWK" || AWK=awk
29581 _ACEOF
29582
29583 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29584 # The default lists apply if the user does not specify any file.
29585 ac_need_defaults=:
29586 while test $# != 0
29587 do
29588 case $1 in
29589 --*=?*)
29590 ac_option=`expr "X$1" : 'X\([^=]*\)='`
29591 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
29592 ac_shift=:
29593 ;;
29594 --*=)
29595 ac_option=`expr "X$1" : 'X\([^=]*\)='`
29596 ac_optarg=
29597 ac_shift=:
29598 ;;
29599 *)
29600 ac_option=$1
29601 ac_optarg=$2
29602 ac_shift=shift
29603 ;;
29604 esac
29605
29606 case $ac_option in
29607 # Handling of the options.
29608 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
29609 ac_cs_recheck=: ;;
29610 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
29611 $as_echo "$ac_cs_version"; exit ;;
29612 --config | --confi | --conf | --con | --co | --c )
29613 $as_echo "$ac_cs_config"; exit ;;
29614 --debug | --debu | --deb | --de | --d | -d )
29615 debug=: ;;
29616 --file | --fil | --fi | --f )
29617 $ac_shift
29618 case $ac_optarg in
29619 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
29620 '') as_fn_error $? "missing file argument" ;;
29621 esac
29622 as_fn_append CONFIG_FILES " '$ac_optarg'"
29623 ac_need_defaults=false;;
29624 --header | --heade | --head | --hea )
29625 $ac_shift
29626 case $ac_optarg in
29627 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
29628 esac
29629 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
29630 ac_need_defaults=false;;
29631 --he | --h)
29632 # Conflict between --help and --header
29633 as_fn_error $? "ambiguous option: \`$1'
29634 Try \`$0 --help' for more information.";;
29635 --help | --hel | -h )
29636 $as_echo "$ac_cs_usage"; exit ;;
29637 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
29638 | -silent | --silent | --silen | --sile | --sil | --si | --s)
29639 ac_cs_silent=: ;;
29640
29641 # This is an error.
29642 -*) as_fn_error $? "unrecognized option: \`$1'
29643 Try \`$0 --help' for more information." ;;
29644
29645 *) as_fn_append ac_config_targets " $1"
29646 ac_need_defaults=false ;;
29647
29648 esac
29649 shift
29650 done
29651
29652 ac_configure_extra_args=
29653
29654 if $ac_cs_silent; then
29655 exec 6>/dev/null
29656 ac_configure_extra_args="$ac_configure_extra_args --silent"
29657 fi
29658
29659 _ACEOF
29660 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29661 if \$ac_cs_recheck; then
29662 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
29663 shift
29664 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
29665 CONFIG_SHELL='$SHELL'
29666 export CONFIG_SHELL
29667 exec "\$@"
29668 fi
29669
29670 _ACEOF
29671 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29672 exec 5>>config.log
29673 {
29674 echo
29675 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
29676 ## Running $as_me. ##
29677 _ASBOX
29678 $as_echo "$ac_log"
29679 } >&5
29680
29681 _ACEOF
29682 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29683 #
29684 # INIT-COMMANDS
29685 #
29686 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
29687
29688 _ACEOF
29689
29690 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29691
29692 # Handling of arguments.
29693 for ac_config_target in $ac_config_targets
29694 do
29695 case $ac_config_target in
29696 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
29697 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
29698 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
29699 "import/Makefile") CONFIG_FILES="$CONFIG_FILES import/Makefile" ;;
29700 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
29701
29702 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
29703 esac
29704 done
29705
29706
29707 # If the user did not use the arguments to specify the items to instantiate,
29708 # then the envvar interface is used. Set only those that are not.
29709 # We use the long form for the default assignment because of an extremely
29710 # bizarre bug on SunOS 4.1.3.
29711 if $ac_need_defaults; then
29712 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
29713 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
29714 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
29715 fi
29716
29717 # Have a temporary directory for convenience. Make it in the build tree
29718 # simply because there is no reason against having it here, and in addition,
29719 # creating and moving files from /tmp can sometimes cause problems.
29720 # Hook for its removal unless debugging.
29721 # Note that there is a small window in which the directory will not be cleaned:
29722 # after its creation but before its name has been assigned to `$tmp'.
29723 $debug ||
29724 {
29725 tmp= ac_tmp=
29726 trap 'exit_status=$?
29727 : "${ac_tmp:=$tmp}"
29728 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
29729 ' 0
29730 trap 'as_fn_exit 1' 1 2 13 15
29731 }
29732 # Create a (secure) tmp directory for tmp files.
29733
29734 {
29735 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
29736 test -d "$tmp"
29737 } ||
29738 {
29739 tmp=./conf$$-$RANDOM
29740 (umask 077 && mkdir "$tmp")
29741 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
29742 ac_tmp=$tmp
29743
29744 # Set up the scripts for CONFIG_FILES section.
29745 # No need to generate them if there are no CONFIG_FILES.
29746 # This happens for instance with `./config.status config.h'.
29747 if test -n "$CONFIG_FILES"; then
29748
29749
29750 ac_cr=`echo X | tr X '\015'`
29751 # On cygwin, bash can eat \r inside `` if the user requested igncr.
29752 # But we know of no other shell where ac_cr would be empty at this
29753 # point, so we can use a bashism as a fallback.
29754 if test "x$ac_cr" = x; then
29755 eval ac_cr=\$\'\\r\'
29756 fi
29757 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
29758 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
29759 ac_cs_awk_cr='\\r'
29760 else
29761 ac_cs_awk_cr=$ac_cr
29762 fi
29763
29764 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
29765 _ACEOF
29766
29767
29768 {
29769 echo "cat >conf$$subs.awk <<_ACEOF" &&
29770 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
29771 echo "_ACEOF"
29772 } >conf$$subs.sh ||
29773 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
29774 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
29775 ac_delim='%!_!# '
29776 for ac_last_try in false false false false false :; do
29777 . ./conf$$subs.sh ||
29778 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
29779
29780 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
29781 if test $ac_delim_n = $ac_delim_num; then
29782 break
29783 elif $ac_last_try; then
29784 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
29785 else
29786 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
29787 fi
29788 done
29789 rm -f conf$$subs.sh
29790
29791 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29792 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
29793 _ACEOF
29794 sed -n '
29795 h
29796 s/^/S["/; s/!.*/"]=/
29797 p
29798 g
29799 s/^[^!]*!//
29800 :repl
29801 t repl
29802 s/'"$ac_delim"'$//
29803 t delim
29804 :nl
29805 h
29806 s/\(.\{148\}\)..*/\1/
29807 t more1
29808 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
29809 p
29810 n
29811 b repl
29812 :more1
29813 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
29814 p
29815 g
29816 s/.\{148\}//
29817 t nl
29818 :delim
29819 h
29820 s/\(.\{148\}\)..*/\1/
29821 t more2
29822 s/["\\]/\\&/g; s/^/"/; s/$/"/
29823 p
29824 b
29825 :more2
29826 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
29827 p
29828 g
29829 s/.\{148\}//
29830 t delim
29831 ' <conf$$subs.awk | sed '
29832 /^[^""]/{
29833 N
29834 s/\n//
29835 }
29836 ' >>$CONFIG_STATUS || ac_write_fail=1
29837 rm -f conf$$subs.awk
29838 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29839 _ACAWK
29840 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
29841 for (key in S) S_is_set[key] = 1
29842 FS = "\a"
29843
29844 }
29845 {
29846 line = $ 0
29847 nfields = split(line, field, "@")
29848 substed = 0
29849 len = length(field[1])
29850 for (i = 2; i < nfields; i++) {
29851 key = field[i]
29852 keylen = length(key)
29853 if (S_is_set[key]) {
29854 value = S[key]
29855 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
29856 len += length(value) + length(field[++i])
29857 substed = 1
29858 } else
29859 len += 1 + keylen
29860 }
29861
29862 print line
29863 }
29864
29865 _ACAWK
29866 _ACEOF
29867 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29868 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
29869 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
29870 else
29871 cat
29872 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
29873 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
29874 _ACEOF
29875
29876 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
29877 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
29878 # trailing colons and then remove the whole line if VPATH becomes empty
29879 # (actually we leave an empty line to preserve line numbers).
29880 if test "x$srcdir" = x.; then
29881 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
29882 h
29883 s///
29884 s/^/:/
29885 s/[ ]*$/:/
29886 s/:\$(srcdir):/:/g
29887 s/:\${srcdir}:/:/g
29888 s/:@srcdir@:/:/g
29889 s/^:*//
29890 s/:*$//
29891 x
29892 s/\(=[ ]*\).*/\1/
29893 G
29894 s/\n//
29895 s/^[^=]*=[ ]*$//
29896 }'
29897 fi
29898
29899 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29900 fi # test -n "$CONFIG_FILES"
29901
29902 # Set up the scripts for CONFIG_HEADERS section.
29903 # No need to generate them if there are no CONFIG_HEADERS.
29904 # This happens for instance with `./config.status Makefile'.
29905 if test -n "$CONFIG_HEADERS"; then
29906 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
29907 BEGIN {
29908 _ACEOF
29909
29910 # Transform confdefs.h into an awk script `defines.awk', embedded as
29911 # here-document in config.status, that substitutes the proper values into
29912 # config.h.in to produce config.h.
29913
29914 # Create a delimiter string that does not exist in confdefs.h, to ease
29915 # handling of long lines.
29916 ac_delim='%!_!# '
29917 for ac_last_try in false false :; do
29918 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
29919 if test -z "$ac_tt"; then
29920 break
29921 elif $ac_last_try; then
29922 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
29923 else
29924 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
29925 fi
29926 done
29927
29928 # For the awk script, D is an array of macro values keyed by name,
29929 # likewise P contains macro parameters if any. Preserve backslash
29930 # newline sequences.
29931
29932 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
29933 sed -n '
29934 s/.\{148\}/&'"$ac_delim"'/g
29935 t rset
29936 :rset
29937 s/^[ ]*#[ ]*define[ ][ ]*/ /
29938 t def
29939 d
29940 :def
29941 s/\\$//
29942 t bsnl
29943 s/["\\]/\\&/g
29944 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
29945 D["\1"]=" \3"/p
29946 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
29947 d
29948 :bsnl
29949 s/["\\]/\\&/g
29950 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
29951 D["\1"]=" \3\\\\\\n"\\/p
29952 t cont
29953 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
29954 t cont
29955 d
29956 :cont
29957 n
29958 s/.\{148\}/&'"$ac_delim"'/g
29959 t clear
29960 :clear
29961 s/\\$//
29962 t bsnlc
29963 s/["\\]/\\&/g; s/^/"/; s/$/"/p
29964 d
29965 :bsnlc
29966 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
29967 b cont
29968 ' <confdefs.h | sed '
29969 s/'"$ac_delim"'/"\\\
29970 "/g' >>$CONFIG_STATUS || ac_write_fail=1
29971
29972 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29973 for (key in D) D_is_set[key] = 1
29974 FS = "\a"
29975 }
29976 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
29977 line = \$ 0
29978 split(line, arg, " ")
29979 if (arg[1] == "#") {
29980 defundef = arg[2]
29981 mac1 = arg[3]
29982 } else {
29983 defundef = substr(arg[1], 2)
29984 mac1 = arg[2]
29985 }
29986 split(mac1, mac2, "(") #)
29987 macro = mac2[1]
29988 prefix = substr(line, 1, index(line, defundef) - 1)
29989 if (D_is_set[macro]) {
29990 # Preserve the white space surrounding the "#".
29991 print prefix "define", macro P[macro] D[macro]
29992 next
29993 } else {
29994 # Replace #undef with comments. This is necessary, for example,
29995 # in the case of _POSIX_SOURCE, which is predefined and required
29996 # on some systems where configure will not decide to define it.
29997 if (defundef == "undef") {
29998 print "/*", prefix defundef, macro, "*/"
29999 next
30000 }
30001 }
30002 }
30003 { print }
30004 _ACAWK
30005 _ACEOF
30006 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30007 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
30008 fi # test -n "$CONFIG_HEADERS"
30009
30010
30011 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
30012 shift
30013 for ac_tag
30014 do
30015 case $ac_tag in
30016 :[FHLC]) ac_mode=$ac_tag; continue;;
30017 esac
30018 case $ac_mode$ac_tag in
30019 :[FHL]*:*);;
30020 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
30021 :[FH]-) ac_tag=-:-;;
30022 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
30023 esac
30024 ac_save_IFS=$IFS
30025 IFS=:
30026 set x $ac_tag
30027 IFS=$ac_save_IFS
30028 shift
30029 ac_file=$1
30030 shift
30031
30032 case $ac_mode in
30033 :L) ac_source=$1;;
30034 :[FH])
30035 ac_file_inputs=
30036 for ac_f
30037 do
30038 case $ac_f in
30039 -) ac_f="$ac_tmp/stdin";;
30040 *) # Look for the file first in the build tree, then in the source tree
30041 # (if the path is not absolute). The absolute path cannot be DOS-style,
30042 # because $ac_f cannot contain `:'.
30043 test -f "$ac_f" ||
30044 case $ac_f in
30045 [\\/$]*) false;;
30046 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
30047 esac ||
30048 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
30049 esac
30050 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
30051 as_fn_append ac_file_inputs " '$ac_f'"
30052 done
30053
30054 # Let's still pretend it is `configure' which instantiates (i.e., don't
30055 # use $as_me), people would be surprised to read:
30056 # /* config.h. Generated by config.status. */
30057 configure_input='Generated from '`
30058 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
30059 `' by configure.'
30060 if test x"$ac_file" != x-; then
30061 configure_input="$ac_file. $configure_input"
30062 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
30063 $as_echo "$as_me: creating $ac_file" >&6;}
30064 fi
30065 # Neutralize special characters interpreted by sed in replacement strings.
30066 case $configure_input in #(
30067 *\&* | *\|* | *\\* )
30068 ac_sed_conf_input=`$as_echo "$configure_input" |
30069 sed 's/[\\\\&|]/\\\\&/g'`;; #(
30070 *) ac_sed_conf_input=$configure_input;;
30071 esac
30072
30073 case $ac_tag in
30074 *:-:* | *:-) cat >"$ac_tmp/stdin" \
30075 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
30076 esac
30077 ;;
30078 esac
30079
30080 ac_dir=`$as_dirname -- "$ac_file" ||
30081 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30082 X"$ac_file" : 'X\(//\)[^/]' \| \
30083 X"$ac_file" : 'X\(//\)$' \| \
30084 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
30085 $as_echo X"$ac_file" |
30086 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30087 s//\1/
30088 q
30089 }
30090 /^X\(\/\/\)[^/].*/{
30091 s//\1/
30092 q
30093 }
30094 /^X\(\/\/\)$/{
30095 s//\1/
30096 q
30097 }
30098 /^X\(\/\).*/{
30099 s//\1/
30100 q
30101 }
30102 s/.*/./; q'`
30103 as_dir="$ac_dir"; as_fn_mkdir_p
30104 ac_builddir=.
30105
30106 case "$ac_dir" in
30107 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
30108 *)
30109 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
30110 # A ".." for each directory in $ac_dir_suffix.
30111 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
30112 case $ac_top_builddir_sub in
30113 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
30114 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
30115 esac ;;
30116 esac
30117 ac_abs_top_builddir=$ac_pwd
30118 ac_abs_builddir=$ac_pwd$ac_dir_suffix
30119 # for backward compatibility:
30120 ac_top_builddir=$ac_top_build_prefix
30121
30122 case $srcdir in
30123 .) # We are building in place.
30124 ac_srcdir=.
30125 ac_top_srcdir=$ac_top_builddir_sub
30126 ac_abs_top_srcdir=$ac_pwd ;;
30127 [\\/]* | ?:[\\/]* ) # Absolute name.
30128 ac_srcdir=$srcdir$ac_dir_suffix;
30129 ac_top_srcdir=$srcdir
30130 ac_abs_top_srcdir=$srcdir ;;
30131 *) # Relative name.
30132 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
30133 ac_top_srcdir=$ac_top_build_prefix$srcdir
30134 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
30135 esac
30136 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
30137
30138
30139 case $ac_mode in
30140 :F)
30141 #
30142 # CONFIG_FILE
30143 #
30144
30145 case $INSTALL in
30146 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
30147 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
30148 esac
30149 ac_MKDIR_P=$MKDIR_P
30150 case $MKDIR_P in
30151 [\\/$]* | ?:[\\/]* ) ;;
30152 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
30153 esac
30154 _ACEOF
30155
30156 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30157 # If the template does not know about datarootdir, expand it.
30158 # FIXME: This hack should be removed a few years after 2.60.
30159 ac_datarootdir_hack=; ac_datarootdir_seen=
30160 ac_sed_dataroot='
30161 /datarootdir/ {
30162 p
30163 q
30164 }
30165 /@datadir@/p
30166 /@docdir@/p
30167 /@infodir@/p
30168 /@localedir@/p
30169 /@mandir@/p'
30170 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
30171 *datarootdir*) ac_datarootdir_seen=yes;;
30172 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
30173 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
30174 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
30175 _ACEOF
30176 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30177 ac_datarootdir_hack='
30178 s&@datadir@&$datadir&g
30179 s&@docdir@&$docdir&g
30180 s&@infodir@&$infodir&g
30181 s&@localedir@&$localedir&g
30182 s&@mandir@&$mandir&g
30183 s&\\\${datarootdir}&$datarootdir&g' ;;
30184 esac
30185 _ACEOF
30186
30187 # Neutralize VPATH when `$srcdir' = `.'.
30188 # Shell code in configure.ac might set extrasub.
30189 # FIXME: do we really want to maintain this feature?
30190 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30191 ac_sed_extra="$ac_vpsub
30192 $extrasub
30193 _ACEOF
30194 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30195 :t
30196 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
30197 s|@configure_input@|$ac_sed_conf_input|;t t
30198 s&@top_builddir@&$ac_top_builddir_sub&;t t
30199 s&@top_build_prefix@&$ac_top_build_prefix&;t t
30200 s&@srcdir@&$ac_srcdir&;t t
30201 s&@abs_srcdir@&$ac_abs_srcdir&;t t
30202 s&@top_srcdir@&$ac_top_srcdir&;t t
30203 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
30204 s&@builddir@&$ac_builddir&;t t
30205 s&@abs_builddir@&$ac_abs_builddir&;t t
30206 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
30207 s&@INSTALL@&$ac_INSTALL&;t t
30208 s&@MKDIR_P@&$ac_MKDIR_P&;t t
30209 $ac_datarootdir_hack
30210 "
30211 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
30212 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
30213
30214 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
30215 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
30216 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
30217 "$ac_tmp/out"`; test -z "$ac_out"; } &&
30218 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
30219 which seems to be undefined. Please make sure it is defined" >&5
30220 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
30221 which seems to be undefined. Please make sure it is defined" >&2;}
30222
30223 rm -f "$ac_tmp/stdin"
30224 case $ac_file in
30225 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
30226 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
30227 esac \
30228 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
30229 ;;
30230 :H)
30231 #
30232 # CONFIG_HEADER
30233 #
30234 if test x"$ac_file" != x-; then
30235 {
30236 $as_echo "/* $configure_input */" \
30237 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
30238 } >"$ac_tmp/config.h" \
30239 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
30240 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
30241 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
30242 $as_echo "$as_me: $ac_file is unchanged" >&6;}
30243 else
30244 rm -f "$ac_file"
30245 mv "$ac_tmp/config.h" "$ac_file" \
30246 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
30247 fi
30248 else
30249 $as_echo "/* $configure_input */" \
30250 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
30251 || as_fn_error $? "could not create -" "$LINENO" 5
30252 fi
30253 # Compute "$ac_file"'s index in $config_headers.
30254 _am_arg="$ac_file"
30255 _am_stamp_count=1
30256 for _am_header in $config_headers :; do
30257 case $_am_header in
30258 $_am_arg | $_am_arg:* )
30259 break ;;
30260 * )
30261 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
30262 esac
30263 done
30264 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
30265 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30266 X"$_am_arg" : 'X\(//\)[^/]' \| \
30267 X"$_am_arg" : 'X\(//\)$' \| \
30268 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
30269 $as_echo X"$_am_arg" |
30270 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30271 s//\1/
30272 q
30273 }
30274 /^X\(\/\/\)[^/].*/{
30275 s//\1/
30276 q
30277 }
30278 /^X\(\/\/\)$/{
30279 s//\1/
30280 q
30281 }
30282 /^X\(\/\).*/{
30283 s//\1/
30284 q
30285 }
30286 s/.*/./; q'`/stamp-h$_am_stamp_count
30287 ;;
30288
30289 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
30290 $as_echo "$as_me: executing $ac_file commands" >&6;}
30291 ;;
30292 esac
30293
30294
30295 case $ac_file$ac_mode in
30296 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
30297 # Older Autoconf quotes --file arguments for eval, but not when files
30298 # are listed without --file. Let's play safe and only enable the eval
30299 # if we detect the quoting.
30300 case $CONFIG_FILES in
30301 *\'*) eval set x "$CONFIG_FILES" ;;
30302 *) set x $CONFIG_FILES ;;
30303 esac
30304 shift
30305 for mf
30306 do
30307 # Strip MF so we end up with the name of the file.
30308 mf=`echo "$mf" | sed -e 's/:.*$//'`
30309 # Check whether this is an Automake generated Makefile or not.
30310 # We used to match only the files named 'Makefile.in', but
30311 # some people rename them; so instead we look at the file content.
30312 # Grep'ing the first line is not enough: some people post-process
30313 # each Makefile.in and add a new line on top of each file to say so.
30314 # Grep'ing the whole file is not good either: AIX grep has a line
30315 # limit of 2048, but all sed's we know have understand at least 4000.
30316 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
30317 dirpart=`$as_dirname -- "$mf" ||
30318 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30319 X"$mf" : 'X\(//\)[^/]' \| \
30320 X"$mf" : 'X\(//\)$' \| \
30321 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
30322 $as_echo X"$mf" |
30323 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30324 s//\1/
30325 q
30326 }
30327 /^X\(\/\/\)[^/].*/{
30328 s//\1/
30329 q
30330 }
30331 /^X\(\/\/\)$/{
30332 s//\1/
30333 q
30334 }
30335 /^X\(\/\).*/{
30336 s//\1/
30337 q
30338 }
30339 s/.*/./; q'`
30340 else
30341 continue
30342 fi
30343 # Extract the definition of DEPDIR, am__include, and am__quote
30344 # from the Makefile without running 'make'.
30345 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
30346 test -z "$DEPDIR" && continue
30347 am__include=`sed -n 's/^am__include = //p' < "$mf"`
30348 test -z "$am__include" && continue
30349 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
30350 # Find all dependency output files, they are included files with
30351 # $(DEPDIR) in their names. We invoke sed twice because it is the
30352 # simplest approach to changing $(DEPDIR) to its actual value in the
30353 # expansion.
30354 for file in `sed -n "
30355 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
30356 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
30357 # Make sure the directory exists.
30358 test -f "$dirpart/$file" && continue
30359 fdir=`$as_dirname -- "$file" ||
30360 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30361 X"$file" : 'X\(//\)[^/]' \| \
30362 X"$file" : 'X\(//\)$' \| \
30363 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
30364 $as_echo X"$file" |
30365 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30366 s//\1/
30367 q
30368 }
30369 /^X\(\/\/\)[^/].*/{
30370 s//\1/
30371 q
30372 }
30373 /^X\(\/\/\)$/{
30374 s//\1/
30375 q
30376 }
30377 /^X\(\/\).*/{
30378 s//\1/
30379 q
30380 }
30381 s/.*/./; q'`
30382 as_dir=$dirpart/$fdir; as_fn_mkdir_p
30383 # echo "creating $dirpart/$file"
30384 echo '# dummy' > "$dirpart/$file"
30385 done
30386 done
30387 }
30388 ;;
30389 "default":C)
30390 case x$CONFIG_HEADERS in
30391 xconfig.h:config.in)
30392 echo > stamp-h ;;
30393 esac
30394 ;;
30395
30396 esac
30397 done # for ac_tag
30398
30399
30400 as_fn_exit 0
30401 _ACEOF
30402 ac_clean_files=$ac_clean_files_save
30403
30404 test $ac_write_fail = 0 ||
30405 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
30406
30407
30408 # configure is writing to config.log, and then calls config.status.
30409 # config.status does its own redirection, appending to config.log.
30410 # Unfortunately, on DOS this fails, as config.log is still kept open
30411 # by configure, so config.status won't be able to write to it; its
30412 # output is simply discarded. So we exec the FD to /dev/null,
30413 # effectively closing config.log, so it can be properly (re)opened and
30414 # appended to by config.status. When coming back to configure, we
30415 # need to make the FD available again.
30416 if test "$no_create" != yes; then
30417 ac_cs_success=:
30418 ac_config_status_args=
30419 test "$silent" = yes &&
30420 ac_config_status_args="$ac_config_status_args --quiet"
30421 exec 5>/dev/null
30422 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
30423 exec 5>>config.log
30424 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
30425 # would make configure fail if this is the last instruction.
30426 $ac_cs_success || as_fn_exit 1
30427 fi
30428 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
30429 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
30430 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
30431 fi
30432
30433
30434 exit 0
This page took 0.833591 seconds and 5 git commands to generate.