Don't set terminal flags twice in a row
[deliverable/binutils-gdb.git] / gdb / gnulib / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.64.
4 #
5 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
6 # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
7 # Foundation, Inc.
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 case $0 in #((
91 *[\\/]* ) as_myself=$0 ;;
92 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
93 for as_dir in $PATH
94 do
95 IFS=$as_save_IFS
96 test -z "$as_dir" && as_dir=.
97 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
98 done
99 IFS=$as_save_IFS
100
101 ;;
102 esac
103 # We did not find ourselves, most probably we were run as `sh COMMAND'
104 # in which case we are not to be found in the path.
105 if test "x$as_myself" = x; then
106 as_myself=$0
107 fi
108 if test ! -f "$as_myself"; then
109 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
110 exit 1
111 fi
112
113 # Unset variables that we do not need and which cause bugs (e.g. in
114 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
115 # suppresses any "Segmentation fault" message there. '((' could
116 # trigger a bug in pdksh 5.2.14.
117 for as_var in BASH_ENV ENV MAIL MAILPATH
118 do eval test x\${$as_var+set} = xset \
119 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
120 done
121 PS1='$ '
122 PS2='> '
123 PS4='+ '
124
125 # NLS nuisances.
126 LC_ALL=C
127 export LC_ALL
128 LANGUAGE=C
129 export LANGUAGE
130
131 # CDPATH.
132 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
133
134 if test "x$CONFIG_SHELL" = x; then
135 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
136 emulate sh
137 NULLCMD=:
138 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
139 # is contrary to our usage. Disable this feature.
140 alias -g '\${1+\"\$@\"}'='\"\$@\"'
141 setopt NO_GLOB_SUBST
142 else
143 case \`(set -o) 2>/dev/null\` in #(
144 *posix*) :
145 set -o posix ;; #(
146 *) :
147 ;;
148 esac
149 fi
150 "
151 as_required="as_fn_return () { (exit \$1); }
152 as_fn_success () { as_fn_return 0; }
153 as_fn_failure () { as_fn_return 1; }
154 as_fn_ret_success () { return 0; }
155 as_fn_ret_failure () { return 1; }
156
157 exitcode=0
158 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
159 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
160 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
161 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
162 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
163
164 else
165 exitcode=1; echo positional parameters were not saved.
166 fi
167 test x\$exitcode = x0 || exit 1"
168 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
169 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
170 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
171 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
172 test \$(( 1 + 1 )) = 2 || exit 1"
173 if (eval "$as_required") 2>/dev/null; then :
174 as_have_required=yes
175 else
176 as_have_required=no
177 fi
178 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
179
180 else
181 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
182 as_found=false
183 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
184 do
185 IFS=$as_save_IFS
186 test -z "$as_dir" && as_dir=.
187 as_found=:
188 case $as_dir in #(
189 /*)
190 for as_base in sh bash ksh sh5; do
191 # Try only shells that exist, to save several forks.
192 as_shell=$as_dir/$as_base
193 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
194 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
195 CONFIG_SHELL=$as_shell as_have_required=yes
196 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
197 break 2
198 fi
199 fi
200 done;;
201 esac
202 as_found=false
203 done
204 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
205 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
206 CONFIG_SHELL=$SHELL as_have_required=yes
207 fi; }
208 IFS=$as_save_IFS
209
210
211 if test "x$CONFIG_SHELL" != x; then :
212 # We cannot yet assume a decent shell, so we have to provide a
213 # neutralization value for shells without unset; and this also
214 # works around shells that cannot unset nonexistent variables.
215 BASH_ENV=/dev/null
216 ENV=/dev/null
217 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
218 export CONFIG_SHELL
219 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
220 fi
221
222 if test x$as_have_required = xno; then :
223 $as_echo "$0: This script requires a shell more modern than all"
224 $as_echo "$0: the shells that I found on your system."
225 if test x${ZSH_VERSION+set} = xset ; then
226 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
227 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
228 else
229 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
230 $0: including any error possibly output before this
231 $0: message. Then install a modern shell, or manually run
232 $0: the script under such a shell if you do have one."
233 fi
234 exit 1
235 fi
236 fi
237 fi
238 SHELL=${CONFIG_SHELL-/bin/sh}
239 export SHELL
240 # Unset more variables known to interfere with behavior of common tools.
241 CLICOLOR_FORCE= GREP_OPTIONS=
242 unset CLICOLOR_FORCE GREP_OPTIONS
243
244 ## --------------------- ##
245 ## M4sh Shell Functions. ##
246 ## --------------------- ##
247 # as_fn_unset VAR
248 # ---------------
249 # Portably unset VAR.
250 as_fn_unset ()
251 {
252 { eval $1=; unset $1;}
253 }
254 as_unset=as_fn_unset
255
256 # as_fn_set_status STATUS
257 # -----------------------
258 # Set $? to STATUS, without forking.
259 as_fn_set_status ()
260 {
261 return $1
262 } # as_fn_set_status
263
264 # as_fn_exit STATUS
265 # -----------------
266 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
267 as_fn_exit ()
268 {
269 set +e
270 as_fn_set_status $1
271 exit $1
272 } # as_fn_exit
273
274 # as_fn_mkdir_p
275 # -------------
276 # Create "$as_dir" as a directory, including parents if necessary.
277 as_fn_mkdir_p ()
278 {
279
280 case $as_dir in #(
281 -*) as_dir=./$as_dir;;
282 esac
283 test -d "$as_dir" || eval $as_mkdir_p || {
284 as_dirs=
285 while :; do
286 case $as_dir in #(
287 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
288 *) as_qdir=$as_dir;;
289 esac
290 as_dirs="'$as_qdir' $as_dirs"
291 as_dir=`$as_dirname -- "$as_dir" ||
292 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
293 X"$as_dir" : 'X\(//\)[^/]' \| \
294 X"$as_dir" : 'X\(//\)$' \| \
295 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
296 $as_echo X"$as_dir" |
297 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
298 s//\1/
299 q
300 }
301 /^X\(\/\/\)[^/].*/{
302 s//\1/
303 q
304 }
305 /^X\(\/\/\)$/{
306 s//\1/
307 q
308 }
309 /^X\(\/\).*/{
310 s//\1/
311 q
312 }
313 s/.*/./; q'`
314 test -d "$as_dir" && break
315 done
316 test -z "$as_dirs" || eval "mkdir $as_dirs"
317 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
318
319
320 } # as_fn_mkdir_p
321 # as_fn_append VAR VALUE
322 # ----------------------
323 # Append the text in VALUE to the end of the definition contained in VAR. Take
324 # advantage of any shell optimizations that allow amortized linear growth over
325 # repeated appends, instead of the typical quadratic growth present in naive
326 # implementations.
327 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
328 eval 'as_fn_append ()
329 {
330 eval $1+=\$2
331 }'
332 else
333 as_fn_append ()
334 {
335 eval $1=\$$1\$2
336 }
337 fi # as_fn_append
338
339 # as_fn_arith ARG...
340 # ------------------
341 # Perform arithmetic evaluation on the ARGs, and store the result in the
342 # global $as_val. Take advantage of shells that can avoid forks. The arguments
343 # must be portable across $(()) and expr.
344 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
345 eval 'as_fn_arith ()
346 {
347 as_val=$(( $* ))
348 }'
349 else
350 as_fn_arith ()
351 {
352 as_val=`expr "$@" || test $? -eq 1`
353 }
354 fi # as_fn_arith
355
356
357 # as_fn_error ERROR [LINENO LOG_FD]
358 # ---------------------------------
359 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
360 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
361 # script with status $?, using 1 if that was 0.
362 as_fn_error ()
363 {
364 as_status=$?; test $as_status -eq 0 && as_status=1
365 if test "$3"; then
366 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
367 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
368 fi
369 $as_echo "$as_me: error: $1" >&2
370 as_fn_exit $as_status
371 } # as_fn_error
372
373 if expr a : '\(a\)' >/dev/null 2>&1 &&
374 test "X`expr 00001 : '.*\(...\)'`" = X001; then
375 as_expr=expr
376 else
377 as_expr=false
378 fi
379
380 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
381 as_basename=basename
382 else
383 as_basename=false
384 fi
385
386 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
387 as_dirname=dirname
388 else
389 as_dirname=false
390 fi
391
392 as_me=`$as_basename -- "$0" ||
393 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
394 X"$0" : 'X\(//\)$' \| \
395 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
396 $as_echo X/"$0" |
397 sed '/^.*\/\([^/][^/]*\)\/*$/{
398 s//\1/
399 q
400 }
401 /^X\/\(\/\/\)$/{
402 s//\1/
403 q
404 }
405 /^X\/\(\/\).*/{
406 s//\1/
407 q
408 }
409 s/.*/./; q'`
410
411 # Avoid depending upon Character Ranges.
412 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
413 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
414 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
415 as_cr_digits='0123456789'
416 as_cr_alnum=$as_cr_Letters$as_cr_digits
417
418
419 as_lineno_1=$LINENO as_lineno_1a=$LINENO
420 as_lineno_2=$LINENO as_lineno_2a=$LINENO
421 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
422 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
423 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
424 sed -n '
425 p
426 /[$]LINENO/=
427 ' <$as_myself |
428 sed '
429 s/[$]LINENO.*/&-/
430 t lineno
431 b
432 :lineno
433 N
434 :loop
435 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
436 t loop
437 s/-\n.*//
438 ' >$as_me.lineno &&
439 chmod +x "$as_me.lineno" ||
440 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
441
442 # Don't try to exec as it changes $[0], causing all sort of problems
443 # (the dirname of $[0] is not the place where we might find the
444 # original and so on. Autoconf is especially sensitive to this).
445 . "./$as_me.lineno"
446 # Exit status is that of the last command.
447 exit
448 }
449
450 ECHO_C= ECHO_N= ECHO_T=
451 case `echo -n x` in #(((((
452 -n*)
453 case `echo 'xy\c'` in
454 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
455 xy) ECHO_C='\c';;
456 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
457 ECHO_T=' ';;
458 esac;;
459 *)
460 ECHO_N='-n';;
461 esac
462
463 rm -f conf$$ conf$$.exe conf$$.file
464 if test -d conf$$.dir; then
465 rm -f conf$$.dir/conf$$.file
466 else
467 rm -f conf$$.dir
468 mkdir conf$$.dir 2>/dev/null
469 fi
470 if (echo >conf$$.file) 2>/dev/null; then
471 if ln -s conf$$.file conf$$ 2>/dev/null; then
472 as_ln_s='ln -s'
473 # ... but there are two gotchas:
474 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
475 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
476 # In both cases, we have to default to `cp -p'.
477 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
478 as_ln_s='cp -p'
479 elif ln conf$$.file conf$$ 2>/dev/null; then
480 as_ln_s=ln
481 else
482 as_ln_s='cp -p'
483 fi
484 else
485 as_ln_s='cp -p'
486 fi
487 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
488 rmdir conf$$.dir 2>/dev/null
489
490 if mkdir -p . 2>/dev/null; then
491 as_mkdir_p='mkdir -p "$as_dir"'
492 else
493 test -d ./-p && rmdir ./-p
494 as_mkdir_p=false
495 fi
496
497 if test -x / >/dev/null 2>&1; then
498 as_test_x='test -x'
499 else
500 if ls -dL / >/dev/null 2>&1; then
501 as_ls_L_option=L
502 else
503 as_ls_L_option=
504 fi
505 as_test_x='
506 eval sh -c '\''
507 if test -d "$1"; then
508 test -d "$1/.";
509 else
510 case $1 in #(
511 -*)set "./$1";;
512 esac;
513 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
514 ???[sx]*):;;*)false;;esac;fi
515 '\'' sh
516 '
517 fi
518 as_executable_p=$as_test_x
519
520 # Sed expression to map a string onto a valid CPP name.
521 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
522
523 # Sed expression to map a string onto a valid variable name.
524 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
525
526
527 exec 7<&0 </dev/null 6>&1
528
529 # Name of the host.
530 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
531 # so uname gets run too.
532 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
533
534 #
535 # Initializations.
536 #
537 ac_default_prefix=/usr/local
538 ac_clean_files=
539 ac_config_libobj_dir=.
540 LIBOBJS=
541 cross_compiling=no
542 subdirs=
543 MFLAGS=
544 MAKEFLAGS=
545
546 # Identity of this package.
547 PACKAGE_NAME=
548 PACKAGE_TARNAME=
549 PACKAGE_VERSION=
550 PACKAGE_STRING=
551 PACKAGE_BUGREPORT=
552 PACKAGE_URL=
553
554 ac_unique_file="import/memmem.c"
555 # Factoring default headers for most tests.
556 ac_includes_default="\
557 #include <stdio.h>
558 #ifdef HAVE_SYS_TYPES_H
559 # include <sys/types.h>
560 #endif
561 #ifdef HAVE_SYS_STAT_H
562 # include <sys/stat.h>
563 #endif
564 #ifdef STDC_HEADERS
565 # include <stdlib.h>
566 # include <stddef.h>
567 #else
568 # ifdef HAVE_STDLIB_H
569 # include <stdlib.h>
570 # endif
571 #endif
572 #ifdef HAVE_STRING_H
573 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
574 # include <memory.h>
575 # endif
576 # include <string.h>
577 #endif
578 #ifdef HAVE_STRINGS_H
579 # include <strings.h>
580 #endif
581 #ifdef HAVE_INTTYPES_H
582 # include <inttypes.h>
583 #endif
584 #ifdef HAVE_STDINT_H
585 # include <stdint.h>
586 #endif
587 #ifdef HAVE_UNISTD_H
588 # include <unistd.h>
589 #endif"
590
591 ac_func_list=
592 ac_header_list=
593 gl_fnmatch_required=POSIX
594 ac_subst_vars='am__EXEEXT_FALSE
595 am__EXEEXT_TRUE
596 gltests_LTLIBOBJS
597 gltests_LIBOBJS
598 gl_LTLIBOBJS
599 gl_LIBOBJS
600 LTLIBOBJS
601 LIBOBJS
602 LN_S
603 am__fastdepCC_FALSE
604 am__fastdepCC_TRUE
605 CCDEPMODE
606 AMDEPBACKSLASH
607 AMDEP_FALSE
608 AMDEP_TRUE
609 am__quote
610 am__include
611 DEPDIR
612 am__untar
613 am__tar
614 AMTAR
615 am__leading_dot
616 SET_MAKE
617 AWK
618 mkdir_p
619 INSTALL_STRIP_PROGRAM
620 STRIP
621 install_sh
622 MAKEINFO
623 AUTOHEADER
624 AUTOMAKE
625 AUTOCONF
626 ACLOCAL
627 VERSION
628 PACKAGE
629 CYGPATH_W
630 am__isrc
631 INSTALL_DATA
632 INSTALL_SCRIPT
633 INSTALL_PROGRAM
634 LIBGNU_LTLIBDEPS
635 LIBGNU_LIBDEPS
636 gltests_WITNESS
637 REPLACE_TOWLOWER
638 REPLACE_ISWCNTRL
639 HAVE_WCTYPE_H
640 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
641 NEXT_WCTYPE_H
642 HAVE_ISWCNTRL
643 REPLACE_ISWBLANK
644 HAVE_WCTRANS_T
645 HAVE_WCTYPE_T
646 HAVE_ISWBLANK
647 GNULIB_TOWCTRANS
648 GNULIB_WCTRANS
649 GNULIB_ISWCTYPE
650 GNULIB_WCTYPE
651 GNULIB_ISWBLANK
652 HAVE_WINT_T
653 HAVE_FEATURES_H
654 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
655 NEXT_WCHAR_H
656 HAVE_UNISTD_H
657 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
658 NEXT_UNISTD_H
659 UNISTD_H_DEFINES_STRUCT_TIMESPEC
660 PTHREAD_H_DEFINES_STRUCT_TIMESPEC
661 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
662 TIME_H_DEFINES_STRUCT_TIMESPEC
663 NEXT_AS_FIRST_DIRECTIVE_TIME_H
664 NEXT_TIME_H
665 REPLACE_LOCALTIME
666 REPLACE_GMTIME
667 REPLACE_TIMEGM
668 REPLACE_NANOSLEEP
669 REPLACE_MKTIME
670 REPLACE_LOCALTIME_R
671 HAVE_TIMEGM
672 HAVE_STRPTIME
673 HAVE_NANOSLEEP
674 HAVE_DECL_LOCALTIME_R
675 GNULIB_TIME_RZ
676 GNULIB_TIME_R
677 GNULIB_TIMEGM
678 GNULIB_STRPTIME
679 GNULIB_NANOSLEEP
680 GNULIB_MKTIME
681 WINDOWS_64_BIT_OFF_T
682 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
683 NEXT_SYS_TYPES_H
684 MKDIR_P
685 NEXT_AS_FIRST_DIRECTIVE_STRING_H
686 NEXT_STRING_H
687 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
688 NEXT_STDLIB_H
689 NEXT_AS_FIRST_DIRECTIVE_STDIO_H
690 NEXT_STDIO_H
691 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
692 NEXT_STDDEF_H
693 GL_GENERATE_STDDEF_H_FALSE
694 GL_GENERATE_STDDEF_H_TRUE
695 STDDEF_H
696 HAVE_WCHAR_T
697 HAVE_MAX_ALIGN_T
698 REPLACE_NULL
699 HAVE__BOOL
700 GL_GENERATE_STDBOOL_H_FALSE
701 GL_GENERATE_STDBOOL_H_TRUE
702 STDBOOL_H
703 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
704 NEXT_SIGNAL_H
705 REPLACE_RAISE
706 REPLACE_PTHREAD_SIGMASK
707 HAVE_SIGHANDLER_T
708 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
709 HAVE_STRUCT_SIGACTION_SA_SIGACTION
710 HAVE_SIGACTION
711 HAVE_SIGINFO_T
712 HAVE_SIGSET_T
713 HAVE_RAISE
714 HAVE_PTHREAD_SIGMASK
715 HAVE_POSIX_SIGNALBLOCKING
716 GNULIB_SIGACTION
717 GNULIB_SIGPROCMASK
718 GNULIB_SIGNAL_H_SIGPIPE
719 GNULIB_RAISE
720 GNULIB_PTHREAD_SIGMASK
721 REPLACE_VSPRINTF
722 REPLACE_VSNPRINTF
723 REPLACE_VPRINTF
724 REPLACE_VFPRINTF
725 REPLACE_VDPRINTF
726 REPLACE_VASPRINTF
727 REPLACE_TMPFILE
728 REPLACE_STDIO_WRITE_FUNCS
729 REPLACE_STDIO_READ_FUNCS
730 REPLACE_SPRINTF
731 REPLACE_SNPRINTF
732 REPLACE_RENAMEAT
733 REPLACE_RENAME
734 REPLACE_REMOVE
735 REPLACE_PRINTF
736 REPLACE_POPEN
737 REPLACE_PERROR
738 REPLACE_OBSTACK_PRINTF
739 REPLACE_GETLINE
740 REPLACE_GETDELIM
741 REPLACE_FTELLO
742 REPLACE_FTELL
743 REPLACE_FSEEKO
744 REPLACE_FSEEK
745 REPLACE_FREOPEN
746 REPLACE_FPURGE
747 REPLACE_FPRINTF
748 REPLACE_FOPEN
749 REPLACE_FFLUSH
750 REPLACE_FDOPEN
751 REPLACE_FCLOSE
752 REPLACE_DPRINTF
753 HAVE_VDPRINTF
754 HAVE_VASPRINTF
755 HAVE_RENAMEAT
756 HAVE_POPEN
757 HAVE_PCLOSE
758 HAVE_FTELLO
759 HAVE_FSEEKO
760 HAVE_DPRINTF
761 HAVE_DECL_VSNPRINTF
762 HAVE_DECL_SNPRINTF
763 HAVE_DECL_OBSTACK_PRINTF
764 HAVE_DECL_GETLINE
765 HAVE_DECL_GETDELIM
766 HAVE_DECL_FTELLO
767 HAVE_DECL_FSEEKO
768 HAVE_DECL_FPURGE
769 GNULIB_VSPRINTF_POSIX
770 GNULIB_VSNPRINTF
771 GNULIB_VPRINTF_POSIX
772 GNULIB_VPRINTF
773 GNULIB_VFPRINTF_POSIX
774 GNULIB_VFPRINTF
775 GNULIB_VDPRINTF
776 GNULIB_VSCANF
777 GNULIB_VFSCANF
778 GNULIB_VASPRINTF
779 GNULIB_TMPFILE
780 GNULIB_STDIO_H_SIGPIPE
781 GNULIB_STDIO_H_NONBLOCKING
782 GNULIB_SPRINTF_POSIX
783 GNULIB_SNPRINTF
784 GNULIB_SCANF
785 GNULIB_RENAMEAT
786 GNULIB_RENAME
787 GNULIB_REMOVE
788 GNULIB_PUTS
789 GNULIB_PUTCHAR
790 GNULIB_PUTC
791 GNULIB_PRINTF_POSIX
792 GNULIB_PRINTF
793 GNULIB_POPEN
794 GNULIB_PERROR
795 GNULIB_PCLOSE
796 GNULIB_OBSTACK_PRINTF_POSIX
797 GNULIB_OBSTACK_PRINTF
798 GNULIB_GETLINE
799 GNULIB_GETDELIM
800 GNULIB_GETCHAR
801 GNULIB_GETC
802 GNULIB_FWRITE
803 GNULIB_FTELLO
804 GNULIB_FTELL
805 GNULIB_FSEEKO
806 GNULIB_FSEEK
807 GNULIB_FSCANF
808 GNULIB_FREOPEN
809 GNULIB_FREAD
810 GNULIB_FPUTS
811 GNULIB_FPUTC
812 GNULIB_FPURGE
813 GNULIB_FPRINTF_POSIX
814 GNULIB_FPRINTF
815 GNULIB_FOPEN
816 GNULIB_FGETS
817 GNULIB_FGETC
818 GNULIB_FFLUSH
819 GNULIB_FDOPEN
820 GNULIB_FCLOSE
821 GNULIB_DPRINTF
822 UNDEFINE_STRTOK_R
823 REPLACE_STRTOK_R
824 REPLACE_STRSIGNAL
825 REPLACE_STRNLEN
826 REPLACE_STRNDUP
827 REPLACE_STRNCAT
828 REPLACE_STRERROR_R
829 REPLACE_STRERROR
830 REPLACE_STRCHRNUL
831 REPLACE_STRCASESTR
832 REPLACE_STRSTR
833 REPLACE_STRDUP
834 REPLACE_STPNCPY
835 REPLACE_MEMMEM
836 REPLACE_MEMCHR
837 HAVE_STRVERSCMP
838 HAVE_DECL_STRSIGNAL
839 HAVE_DECL_STRERROR_R
840 HAVE_DECL_STRTOK_R
841 HAVE_STRCASESTR
842 HAVE_STRSEP
843 HAVE_STRPBRK
844 HAVE_DECL_STRNLEN
845 HAVE_DECL_STRNDUP
846 HAVE_DECL_STRDUP
847 HAVE_STRCHRNUL
848 HAVE_STPNCPY
849 HAVE_STPCPY
850 HAVE_RAWMEMCHR
851 HAVE_DECL_MEMRCHR
852 HAVE_MEMPCPY
853 HAVE_DECL_MEMMEM
854 HAVE_MEMCHR
855 HAVE_FFSLL
856 HAVE_FFSL
857 HAVE_MBSLEN
858 GNULIB_STRVERSCMP
859 GNULIB_STRSIGNAL
860 GNULIB_STRERROR_R
861 GNULIB_STRERROR
862 GNULIB_MBSTOK_R
863 GNULIB_MBSSEP
864 GNULIB_MBSSPN
865 GNULIB_MBSPBRK
866 GNULIB_MBSCSPN
867 GNULIB_MBSCASESTR
868 GNULIB_MBSPCASECMP
869 GNULIB_MBSNCASECMP
870 GNULIB_MBSCASECMP
871 GNULIB_MBSSTR
872 GNULIB_MBSRCHR
873 GNULIB_MBSCHR
874 GNULIB_MBSNLEN
875 GNULIB_MBSLEN
876 GNULIB_STRTOK_R
877 GNULIB_STRCASESTR
878 GNULIB_STRSTR
879 GNULIB_STRSEP
880 GNULIB_STRPBRK
881 GNULIB_STRNLEN
882 GNULIB_STRNDUP
883 GNULIB_STRNCAT
884 GNULIB_STRDUP
885 GNULIB_STRCHRNUL
886 GNULIB_STPNCPY
887 GNULIB_STPCPY
888 GNULIB_RAWMEMCHR
889 GNULIB_MEMRCHR
890 GNULIB_MEMPCPY
891 GNULIB_MEMMEM
892 GNULIB_MEMCHR
893 GNULIB_FFSLL
894 GNULIB_FFSL
895 LOCALE_FR
896 LOCALE_FR_UTF8
897 LOCALE_ZH_CN
898 LOCALE_JA
899 REPLACE_WCSWIDTH
900 REPLACE_WCWIDTH
901 REPLACE_WCSNRTOMBS
902 REPLACE_WCSRTOMBS
903 REPLACE_WCRTOMB
904 REPLACE_MBSNRTOWCS
905 REPLACE_MBSRTOWCS
906 REPLACE_MBRLEN
907 REPLACE_MBRTOWC
908 REPLACE_MBSINIT
909 REPLACE_WCTOB
910 REPLACE_BTOWC
911 REPLACE_MBSTATE_T
912 HAVE_DECL_WCWIDTH
913 HAVE_DECL_WCTOB
914 HAVE_WCSWIDTH
915 HAVE_WCSTOK
916 HAVE_WCSSTR
917 HAVE_WCSPBRK
918 HAVE_WCSSPN
919 HAVE_WCSCSPN
920 HAVE_WCSRCHR
921 HAVE_WCSCHR
922 HAVE_WCSDUP
923 HAVE_WCSXFRM
924 HAVE_WCSCOLL
925 HAVE_WCSNCASECMP
926 HAVE_WCSCASECMP
927 HAVE_WCSNCMP
928 HAVE_WCSCMP
929 HAVE_WCSNCAT
930 HAVE_WCSCAT
931 HAVE_WCPNCPY
932 HAVE_WCSNCPY
933 HAVE_WCPCPY
934 HAVE_WCSCPY
935 HAVE_WCSNLEN
936 HAVE_WCSLEN
937 HAVE_WMEMSET
938 HAVE_WMEMMOVE
939 HAVE_WMEMCPY
940 HAVE_WMEMCMP
941 HAVE_WMEMCHR
942 HAVE_WCSNRTOMBS
943 HAVE_WCSRTOMBS
944 HAVE_WCRTOMB
945 HAVE_MBSNRTOWCS
946 HAVE_MBSRTOWCS
947 HAVE_MBRLEN
948 HAVE_MBRTOWC
949 HAVE_MBSINIT
950 HAVE_BTOWC
951 GNULIB_WCSWIDTH
952 GNULIB_WCSTOK
953 GNULIB_WCSSTR
954 GNULIB_WCSPBRK
955 GNULIB_WCSSPN
956 GNULIB_WCSCSPN
957 GNULIB_WCSRCHR
958 GNULIB_WCSCHR
959 GNULIB_WCSDUP
960 GNULIB_WCSXFRM
961 GNULIB_WCSCOLL
962 GNULIB_WCSNCASECMP
963 GNULIB_WCSCASECMP
964 GNULIB_WCSNCMP
965 GNULIB_WCSCMP
966 GNULIB_WCSNCAT
967 GNULIB_WCSCAT
968 GNULIB_WCPNCPY
969 GNULIB_WCSNCPY
970 GNULIB_WCPCPY
971 GNULIB_WCSCPY
972 GNULIB_WCSNLEN
973 GNULIB_WCSLEN
974 GNULIB_WMEMSET
975 GNULIB_WMEMMOVE
976 GNULIB_WMEMCPY
977 GNULIB_WMEMCMP
978 GNULIB_WMEMCHR
979 GNULIB_WCWIDTH
980 GNULIB_WCSNRTOMBS
981 GNULIB_WCSRTOMBS
982 GNULIB_WCRTOMB
983 GNULIB_MBSNRTOWCS
984 GNULIB_MBSRTOWCS
985 GNULIB_MBRLEN
986 GNULIB_MBRTOWC
987 GNULIB_MBSINIT
988 GNULIB_WCTOB
989 GNULIB_BTOWC
990 NEXT_AS_FIRST_DIRECTIVE_MATH_H
991 NEXT_MATH_H
992 LOCALCHARSET_TESTS_ENVIRONMENT
993 GLIBC21
994 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
995 NEXT_INTTYPES_H
996 UINT64_MAX_EQ_ULONG_MAX
997 UINT32_MAX_LT_UINTMAX_MAX
998 PRIPTR_PREFIX
999 PRI_MACROS_BROKEN
1000 INT64_MAX_EQ_LONG_MAX
1001 INT32_MAX_LT_INTMAX_MAX
1002 REPLACE_STRTOUMAX
1003 REPLACE_STRTOIMAX
1004 HAVE_DECL_STRTOUMAX
1005 HAVE_DECL_STRTOIMAX
1006 HAVE_DECL_IMAXDIV
1007 HAVE_DECL_IMAXABS
1008 GNULIB_STRTOUMAX
1009 GNULIB_STRTOIMAX
1010 GNULIB_IMAXDIV
1011 GNULIB_IMAXABS
1012 GL_GENERATE_STDINT_H_FALSE
1013 GL_GENERATE_STDINT_H_TRUE
1014 STDINT_H
1015 HAVE_SYS_INTTYPES_H
1016 HAVE_SYS_BITYPES_H
1017 HAVE_C99_STDINT_H
1018 WINT_T_SUFFIX
1019 WCHAR_T_SUFFIX
1020 SIG_ATOMIC_T_SUFFIX
1021 SIZE_T_SUFFIX
1022 PTRDIFF_T_SUFFIX
1023 HAVE_SIGNED_WINT_T
1024 HAVE_SIGNED_WCHAR_T
1025 HAVE_SIGNED_SIG_ATOMIC_T
1026 BITSIZEOF_WINT_T
1027 BITSIZEOF_WCHAR_T
1028 BITSIZEOF_SIG_ATOMIC_T
1029 BITSIZEOF_SIZE_T
1030 BITSIZEOF_PTRDIFF_T
1031 APPLE_UNIVERSAL_BUILD
1032 HAVE_STDINT_H
1033 NEXT_AS_FIRST_DIRECTIVE_STDINT_H
1034 NEXT_STDINT_H
1035 HAVE_SYS_TYPES_H
1036 HAVE_INTTYPES_H
1037 HAVE_WCHAR_H
1038 HAVE_UNSIGNED_LONG_LONG_INT
1039 HAVE_LONG_LONG_INT
1040 GL_GENERATE_LIMITS_H_FALSE
1041 GL_GENERATE_LIMITS_H_TRUE
1042 LIMITS_H
1043 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H
1044 NEXT_LIMITS_H
1045 HAVE_SYS_CDEFS_H
1046 GL_GENERATE_GLOB_H_FALSE
1047 GL_GENERATE_GLOB_H_TRUE
1048 GLOB_H
1049 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
1050 NEXT_SYS_TIME_H
1051 REPLACE_STRUCT_TIMEVAL
1052 REPLACE_GETTIMEOFDAY
1053 HAVE_TIMEZONE_T
1054 HAVE_SYS_TIME_H
1055 HAVE_STRUCT_TIMEVAL
1056 HAVE_GETTIMEOFDAY
1057 GNULIB_GETTIMEOFDAY
1058 LTLIBINTL
1059 LIBINTL
1060 WINDOWS_64_BIT_ST_SIZE
1061 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
1062 NEXT_SYS_STAT_H
1063 REPLACE_UTIMENSAT
1064 REPLACE_STAT
1065 REPLACE_MKNOD
1066 REPLACE_MKFIFO
1067 REPLACE_MKDIR
1068 REPLACE_LSTAT
1069 REPLACE_FUTIMENS
1070 REPLACE_FSTATAT
1071 REPLACE_FSTAT
1072 HAVE_UTIMENSAT
1073 HAVE_MKNODAT
1074 HAVE_MKNOD
1075 HAVE_MKFIFOAT
1076 HAVE_MKFIFO
1077 HAVE_MKDIRAT
1078 HAVE_LSTAT
1079 HAVE_LCHMOD
1080 HAVE_FUTIMENS
1081 HAVE_FSTATAT
1082 HAVE_FCHMODAT
1083 GNULIB_UTIMENSAT
1084 GNULIB_STAT
1085 GNULIB_MKNODAT
1086 GNULIB_MKNOD
1087 GNULIB_MKFIFOAT
1088 GNULIB_MKFIFO
1089 GNULIB_MKDIRAT
1090 GNULIB_LSTAT
1091 GNULIB_LCHMOD
1092 GNULIB_FUTIMENS
1093 GNULIB_FSTATAT
1094 GNULIB_FSTAT
1095 GNULIB_FCHMODAT
1096 FREXPL_LIBM
1097 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
1098 FREXP_LIBM
1099 REPLACE_TRUNCL
1100 REPLACE_TRUNCF
1101 REPLACE_TRUNC
1102 REPLACE_SQRTL
1103 REPLACE_SIGNBIT_USING_GCC
1104 REPLACE_SIGNBIT
1105 REPLACE_ROUNDL
1106 REPLACE_ROUNDF
1107 REPLACE_ROUND
1108 REPLACE_REMAINDERL
1109 REPLACE_REMAINDERF
1110 REPLACE_REMAINDER
1111 REPLACE_NAN
1112 REPLACE_MODFL
1113 REPLACE_MODFF
1114 REPLACE_MODF
1115 REPLACE_LOGBL
1116 REPLACE_LOGBF
1117 REPLACE_LOGB
1118 REPLACE_LOG2L
1119 REPLACE_LOG2F
1120 REPLACE_LOG2
1121 REPLACE_LOG1PL
1122 REPLACE_LOG1PF
1123 REPLACE_LOG1P
1124 REPLACE_LOG10L
1125 REPLACE_LOG10F
1126 REPLACE_LOG10
1127 REPLACE_LOGL
1128 REPLACE_LOGF
1129 REPLACE_LOG
1130 REPLACE_LDEXPL
1131 REPLACE_ISNAN
1132 REPLACE_ISINF
1133 REPLACE_ISFINITE
1134 REPLACE_ILOGBF
1135 REPLACE_ILOGB
1136 REPLACE_HYPOTL
1137 REPLACE_HYPOTF
1138 REPLACE_HYPOT
1139 REPLACE_HUGE_VAL
1140 REPLACE_FREXPL
1141 REPLACE_FREXP
1142 REPLACE_FREXPF
1143 REPLACE_FMODL
1144 REPLACE_FMODF
1145 REPLACE_FMOD
1146 REPLACE_FMAL
1147 REPLACE_FMAF
1148 REPLACE_FMA
1149 REPLACE_FLOORL
1150 REPLACE_FLOORF
1151 REPLACE_FLOOR
1152 REPLACE_FABSL
1153 REPLACE_EXP2L
1154 REPLACE_EXP2
1155 REPLACE_EXPM1F
1156 REPLACE_EXPM1
1157 REPLACE_CEILL
1158 REPLACE_CEILF
1159 REPLACE_CEIL
1160 REPLACE_CBRTL
1161 REPLACE_CBRTF
1162 HAVE_DECL_TRUNCL
1163 HAVE_DECL_TRUNCF
1164 HAVE_DECL_TRUNC
1165 HAVE_DECL_TANL
1166 HAVE_DECL_SQRTL
1167 HAVE_DECL_SINL
1168 HAVE_DECL_ROUNDL
1169 HAVE_DECL_ROUNDF
1170 HAVE_DECL_ROUND
1171 HAVE_DECL_RINTF
1172 HAVE_DECL_REMAINDERL
1173 HAVE_DECL_REMAINDER
1174 HAVE_DECL_LOGB
1175 HAVE_DECL_LOG2L
1176 HAVE_DECL_LOG2F
1177 HAVE_DECL_LOG2
1178 HAVE_DECL_LOG10L
1179 HAVE_DECL_LOGL
1180 HAVE_DECL_LDEXPL
1181 HAVE_DECL_FREXPL
1182 HAVE_DECL_FLOORL
1183 HAVE_DECL_FLOORF
1184 HAVE_DECL_EXPM1L
1185 HAVE_DECL_EXP2L
1186 HAVE_DECL_EXP2F
1187 HAVE_DECL_EXP2
1188 HAVE_DECL_EXPL
1189 HAVE_DECL_COSL
1190 HAVE_DECL_COPYSIGNF
1191 HAVE_DECL_CEILL
1192 HAVE_DECL_CEILF
1193 HAVE_DECL_CBRTL
1194 HAVE_DECL_CBRTF
1195 HAVE_DECL_ATANL
1196 HAVE_DECL_ASINL
1197 HAVE_DECL_ACOSL
1198 HAVE_TANHF
1199 HAVE_TANL
1200 HAVE_TANF
1201 HAVE_SQRTL
1202 HAVE_SQRTF
1203 HAVE_SINHF
1204 HAVE_SINL
1205 HAVE_SINF
1206 HAVE_RINTL
1207 HAVE_RINT
1208 HAVE_REMAINDERF
1209 HAVE_REMAINDER
1210 HAVE_POWF
1211 HAVE_MODFL
1212 HAVE_MODFF
1213 HAVE_LOGBL
1214 HAVE_LOGBF
1215 HAVE_LOG1PL
1216 HAVE_LOG1PF
1217 HAVE_LOG1P
1218 HAVE_LOG10L
1219 HAVE_LOG10F
1220 HAVE_LOGL
1221 HAVE_LOGF
1222 HAVE_LDEXPF
1223 HAVE_ISNANL
1224 HAVE_ISNAND
1225 HAVE_ISNANF
1226 HAVE_ILOGBL
1227 HAVE_ILOGBF
1228 HAVE_ILOGB
1229 HAVE_HYPOTL
1230 HAVE_HYPOTF
1231 HAVE_FREXPF
1232 HAVE_FMODL
1233 HAVE_FMODF
1234 HAVE_FMAL
1235 HAVE_FMAF
1236 HAVE_FMA
1237 HAVE_FABSL
1238 HAVE_FABSF
1239 HAVE_EXPM1F
1240 HAVE_EXPM1
1241 HAVE_EXPL
1242 HAVE_EXPF
1243 HAVE_COSHF
1244 HAVE_COSL
1245 HAVE_COSF
1246 HAVE_COPYSIGNL
1247 HAVE_COPYSIGN
1248 HAVE_CBRTL
1249 HAVE_CBRTF
1250 HAVE_CBRT
1251 HAVE_ATAN2F
1252 HAVE_ATANL
1253 HAVE_ATANF
1254 HAVE_ASINL
1255 HAVE_ASINF
1256 HAVE_ACOSL
1257 HAVE_ACOSF
1258 GNULIB_TRUNCL
1259 GNULIB_TRUNCF
1260 GNULIB_TRUNC
1261 GNULIB_TANHF
1262 GNULIB_TANL
1263 GNULIB_TANF
1264 GNULIB_SQRTL
1265 GNULIB_SQRTF
1266 GNULIB_SINHF
1267 GNULIB_SINL
1268 GNULIB_SINF
1269 GNULIB_SIGNBIT
1270 GNULIB_ROUNDL
1271 GNULIB_ROUNDF
1272 GNULIB_ROUND
1273 GNULIB_RINTL
1274 GNULIB_RINTF
1275 GNULIB_RINT
1276 GNULIB_REMAINDERL
1277 GNULIB_REMAINDERF
1278 GNULIB_REMAINDER
1279 GNULIB_POWF
1280 GNULIB_MODFL
1281 GNULIB_MODFF
1282 GNULIB_MODF
1283 GNULIB_LOGBL
1284 GNULIB_LOGBF
1285 GNULIB_LOGB
1286 GNULIB_LOG2L
1287 GNULIB_LOG2F
1288 GNULIB_LOG2
1289 GNULIB_LOG1PL
1290 GNULIB_LOG1PF
1291 GNULIB_LOG1P
1292 GNULIB_LOG10L
1293 GNULIB_LOG10F
1294 GNULIB_LOG10
1295 GNULIB_LOGL
1296 GNULIB_LOGF
1297 GNULIB_LOG
1298 GNULIB_LDEXPL
1299 GNULIB_LDEXPF
1300 GNULIB_ISNANL
1301 GNULIB_ISNAND
1302 GNULIB_ISNANF
1303 GNULIB_ISNAN
1304 GNULIB_ISINF
1305 GNULIB_ISFINITE
1306 GNULIB_ILOGBL
1307 GNULIB_ILOGBF
1308 GNULIB_ILOGB
1309 GNULIB_HYPOTL
1310 GNULIB_HYPOTF
1311 GNULIB_HYPOT
1312 GNULIB_FREXPL
1313 GNULIB_FREXP
1314 GNULIB_FREXPF
1315 GNULIB_FMODL
1316 GNULIB_FMODF
1317 GNULIB_FMOD
1318 GNULIB_FMAL
1319 GNULIB_FMAF
1320 GNULIB_FMA
1321 GNULIB_FLOORL
1322 GNULIB_FLOORF
1323 GNULIB_FLOOR
1324 GNULIB_FABSL
1325 GNULIB_FABSF
1326 GNULIB_EXPM1L
1327 GNULIB_EXPM1F
1328 GNULIB_EXPM1
1329 GNULIB_EXP2L
1330 GNULIB_EXP2F
1331 GNULIB_EXP2
1332 GNULIB_EXPL
1333 GNULIB_EXPF
1334 GNULIB_COSHF
1335 GNULIB_COSL
1336 GNULIB_COSF
1337 GNULIB_COPYSIGNL
1338 GNULIB_COPYSIGNF
1339 GNULIB_COPYSIGN
1340 GNULIB_CEILL
1341 GNULIB_CEILF
1342 GNULIB_CEIL
1343 GNULIB_CBRTL
1344 GNULIB_CBRTF
1345 GNULIB_CBRT
1346 GNULIB_ATAN2F
1347 GNULIB_ATANL
1348 GNULIB_ATANF
1349 GNULIB_ASINL
1350 GNULIB_ASINF
1351 GNULIB_ACOSL
1352 GNULIB_ACOSF
1353 GL_GENERATE_FNMATCH_H_FALSE
1354 GL_GENERATE_FNMATCH_H_TRUE
1355 FNMATCH_H
1356 REPLACE_ITOLD
1357 GL_GENERATE_FLOAT_H_FALSE
1358 GL_GENERATE_FLOAT_H_TRUE
1359 FLOAT_H
1360 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1361 NEXT_FLOAT_H
1362 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1363 NEXT_FCNTL_H
1364 REPLACE_OPENAT
1365 REPLACE_OPEN
1366 REPLACE_FCNTL
1367 HAVE_OPENAT
1368 HAVE_FCNTL
1369 GNULIB_OPENAT
1370 GNULIB_OPEN
1371 GNULIB_NONBLOCKING
1372 GNULIB_FCNTL
1373 EOVERFLOW_VALUE
1374 EOVERFLOW_HIDDEN
1375 ENOLINK_VALUE
1376 ENOLINK_HIDDEN
1377 EMULTIHOP_VALUE
1378 EMULTIHOP_HIDDEN
1379 GL_GENERATE_ERRNO_H_FALSE
1380 GL_GENERATE_ERRNO_H_TRUE
1381 ERRNO_H
1382 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1383 NEXT_ERRNO_H
1384 HAVE_DIRENT_H
1385 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1386 NEXT_DIRENT_H
1387 PRAGMA_COLUMNS
1388 PRAGMA_SYSTEM_HEADER
1389 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1390 INCLUDE_NEXT
1391 pkglibexecdir
1392 runstatedir
1393 lispdir
1394 REPLACE_FDOPENDIR
1395 REPLACE_DIRFD
1396 REPLACE_CLOSEDIR
1397 REPLACE_OPENDIR
1398 HAVE_ALPHASORT
1399 HAVE_SCANDIR
1400 HAVE_FDOPENDIR
1401 HAVE_DECL_FDOPENDIR
1402 HAVE_DECL_DIRFD
1403 HAVE_CLOSEDIR
1404 HAVE_REWINDDIR
1405 HAVE_READDIR
1406 HAVE_OPENDIR
1407 GNULIB_ALPHASORT
1408 GNULIB_SCANDIR
1409 GNULIB_FDOPENDIR
1410 GNULIB_DIRFD
1411 GNULIB_CLOSEDIR
1412 GNULIB_REWINDDIR
1413 GNULIB_READDIR
1414 GNULIB_OPENDIR
1415 HAVE_WINSOCK2_H
1416 HAVE_MSVC_INVALID_PARAMETER_HANDLER
1417 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1418 UNISTD_H_HAVE_WINSOCK2_H
1419 REPLACE_WRITE
1420 REPLACE_USLEEP
1421 REPLACE_UNLINKAT
1422 REPLACE_UNLINK
1423 REPLACE_TTYNAME_R
1424 REPLACE_SYMLINKAT
1425 REPLACE_SYMLINK
1426 REPLACE_SLEEP
1427 REPLACE_RMDIR
1428 REPLACE_READLINKAT
1429 REPLACE_READLINK
1430 REPLACE_READ
1431 REPLACE_PWRITE
1432 REPLACE_PREAD
1433 REPLACE_LSEEK
1434 REPLACE_LINKAT
1435 REPLACE_LINK
1436 REPLACE_LCHOWN
1437 REPLACE_ISATTY
1438 REPLACE_GETPAGESIZE
1439 REPLACE_GETGROUPS
1440 REPLACE_GETLOGIN_R
1441 REPLACE_GETDTABLESIZE
1442 REPLACE_GETDOMAINNAME
1443 REPLACE_GETCWD
1444 REPLACE_FTRUNCATE
1445 REPLACE_FCHOWNAT
1446 REPLACE_DUP2
1447 REPLACE_DUP
1448 REPLACE_CLOSE
1449 REPLACE_CHOWN
1450 HAVE_SYS_PARAM_H
1451 HAVE_OS_H
1452 HAVE_DECL_TTYNAME_R
1453 HAVE_DECL_SETHOSTNAME
1454 HAVE_DECL_GETUSERSHELL
1455 HAVE_DECL_GETPAGESIZE
1456 HAVE_DECL_GETLOGIN_R
1457 HAVE_DECL_GETDOMAINNAME
1458 HAVE_DECL_FDATASYNC
1459 HAVE_DECL_FCHDIR
1460 HAVE_DECL_ENVIRON
1461 HAVE_USLEEP
1462 HAVE_UNLINKAT
1463 HAVE_SYMLINKAT
1464 HAVE_SYMLINK
1465 HAVE_SLEEP
1466 HAVE_SETHOSTNAME
1467 HAVE_READLINKAT
1468 HAVE_READLINK
1469 HAVE_PWRITE
1470 HAVE_PREAD
1471 HAVE_PIPE2
1472 HAVE_PIPE
1473 HAVE_LINKAT
1474 HAVE_LINK
1475 HAVE_LCHOWN
1476 HAVE_GROUP_MEMBER
1477 HAVE_GETPAGESIZE
1478 HAVE_GETLOGIN
1479 HAVE_GETHOSTNAME
1480 HAVE_GETGROUPS
1481 HAVE_GETDTABLESIZE
1482 HAVE_FTRUNCATE
1483 HAVE_FSYNC
1484 HAVE_FDATASYNC
1485 HAVE_FCHOWNAT
1486 HAVE_FCHDIR
1487 HAVE_FACCESSAT
1488 HAVE_EUIDACCESS
1489 HAVE_DUP3
1490 HAVE_DUP2
1491 HAVE_CHOWN
1492 GNULIB_WRITE
1493 GNULIB_USLEEP
1494 GNULIB_UNLINKAT
1495 GNULIB_UNLINK
1496 GNULIB_UNISTD_H_SIGPIPE
1497 GNULIB_UNISTD_H_NONBLOCKING
1498 GNULIB_TTYNAME_R
1499 GNULIB_SYMLINKAT
1500 GNULIB_SYMLINK
1501 GNULIB_SLEEP
1502 GNULIB_SETHOSTNAME
1503 GNULIB_RMDIR
1504 GNULIB_READLINKAT
1505 GNULIB_READLINK
1506 GNULIB_READ
1507 GNULIB_PWRITE
1508 GNULIB_PREAD
1509 GNULIB_PIPE2
1510 GNULIB_PIPE
1511 GNULIB_LSEEK
1512 GNULIB_LINKAT
1513 GNULIB_LINK
1514 GNULIB_LCHOWN
1515 GNULIB_ISATTY
1516 GNULIB_GROUP_MEMBER
1517 GNULIB_GETUSERSHELL
1518 GNULIB_GETPAGESIZE
1519 GNULIB_GETLOGIN_R
1520 GNULIB_GETLOGIN
1521 GNULIB_GETHOSTNAME
1522 GNULIB_GETGROUPS
1523 GNULIB_GETDTABLESIZE
1524 GNULIB_GETDOMAINNAME
1525 GNULIB_GETCWD
1526 GNULIB_FTRUNCATE
1527 GNULIB_FSYNC
1528 GNULIB_FDATASYNC
1529 GNULIB_FCHOWNAT
1530 GNULIB_FCHDIR
1531 GNULIB_FACCESSAT
1532 GNULIB_EUIDACCESS
1533 GNULIB_ENVIRON
1534 GNULIB_DUP3
1535 GNULIB_DUP2
1536 GNULIB_DUP
1537 GNULIB_CLOSE
1538 GNULIB_CHOWN
1539 GNULIB_CHDIR
1540 REPLACE_WCTOMB
1541 REPLACE_UNSETENV
1542 REPLACE_STRTOD
1543 REPLACE_SETENV
1544 REPLACE_REALPATH
1545 REPLACE_REALLOC
1546 REPLACE_RANDOM_R
1547 REPLACE_QSORT_R
1548 REPLACE_PUTENV
1549 REPLACE_PTSNAME_R
1550 REPLACE_PTSNAME
1551 REPLACE_MKSTEMP
1552 REPLACE_MBTOWC
1553 REPLACE_MALLOC
1554 REPLACE_CANONICALIZE_FILE_NAME
1555 REPLACE_CALLOC
1556 HAVE_DECL_UNSETENV
1557 HAVE_UNLOCKPT
1558 HAVE_SYS_LOADAVG_H
1559 HAVE_STRUCT_RANDOM_DATA
1560 HAVE_STRTOULL
1561 HAVE_STRTOLL
1562 HAVE_STRTOD
1563 HAVE_DECL_SETENV
1564 HAVE_SETENV
1565 HAVE_SECURE_GETENV
1566 HAVE_RPMATCH
1567 HAVE_REALPATH
1568 HAVE_RANDOM_R
1569 HAVE_RANDOM_H
1570 HAVE_RANDOM
1571 HAVE_QSORT_R
1572 HAVE_PTSNAME_R
1573 HAVE_PTSNAME
1574 HAVE_POSIX_OPENPT
1575 HAVE_MKSTEMPS
1576 HAVE_MKSTEMP
1577 HAVE_MKOSTEMPS
1578 HAVE_MKOSTEMP
1579 HAVE_MKDTEMP
1580 HAVE_GRANTPT
1581 HAVE_GETSUBOPT
1582 HAVE_DECL_GETLOADAVG
1583 HAVE_CANONICALIZE_FILE_NAME
1584 HAVE_ATOLL
1585 HAVE__EXIT
1586 GNULIB_WCTOMB
1587 GNULIB_UNSETENV
1588 GNULIB_UNLOCKPT
1589 GNULIB_SYSTEM_POSIX
1590 GNULIB_STRTOULL
1591 GNULIB_STRTOLL
1592 GNULIB_STRTOD
1593 GNULIB_SETENV
1594 GNULIB_SECURE_GETENV
1595 GNULIB_RPMATCH
1596 GNULIB_REALPATH
1597 GNULIB_REALLOC_POSIX
1598 GNULIB_RANDOM_R
1599 GNULIB_RANDOM
1600 GNULIB_QSORT_R
1601 GNULIB_PUTENV
1602 GNULIB_PTSNAME_R
1603 GNULIB_PTSNAME
1604 GNULIB_POSIX_OPENPT
1605 GNULIB_MKSTEMPS
1606 GNULIB_MKSTEMP
1607 GNULIB_MKOSTEMPS
1608 GNULIB_MKOSTEMP
1609 GNULIB_MKDTEMP
1610 GNULIB_MBTOWC
1611 GNULIB_MALLOC_POSIX
1612 GNULIB_GRANTPT
1613 GNULIB_GETSUBOPT
1614 GNULIB_GETLOADAVG
1615 GNULIB_CANONICALIZE_FILE_NAME
1616 GNULIB_CALLOC_POSIX
1617 GNULIB_ATOLL
1618 GNULIB__EXIT
1619 GL_GENERATE_ALLOCA_H_FALSE
1620 GL_GENERATE_ALLOCA_H_TRUE
1621 ALLOCA_H
1622 ALLOCA
1623 GL_COND_LIBTOOL_FALSE
1624 GL_COND_LIBTOOL_TRUE
1625 target_os
1626 target_vendor
1627 target_cpu
1628 target
1629 host_os
1630 host_vendor
1631 host_cpu
1632 host
1633 build_os
1634 build_vendor
1635 build_cpu
1636 build
1637 RANLIB
1638 ARFLAGS
1639 AR
1640 EGREP
1641 GREP
1642 CPP
1643 OBJEXT
1644 EXEEXT
1645 ac_ct_CC
1646 CPPFLAGS
1647 LDFLAGS
1648 CFLAGS
1649 CC
1650 MAINT
1651 MAINTAINER_MODE_FALSE
1652 MAINTAINER_MODE_TRUE
1653 target_alias
1654 host_alias
1655 build_alias
1656 LIBS
1657 ECHO_T
1658 ECHO_N
1659 ECHO_C
1660 DEFS
1661 mandir
1662 localedir
1663 libdir
1664 psdir
1665 pdfdir
1666 dvidir
1667 htmldir
1668 infodir
1669 docdir
1670 oldincludedir
1671 includedir
1672 localstatedir
1673 sharedstatedir
1674 sysconfdir
1675 datadir
1676 datarootdir
1677 libexecdir
1678 sbindir
1679 bindir
1680 program_transform_name
1681 prefix
1682 exec_prefix
1683 PACKAGE_URL
1684 PACKAGE_BUGREPORT
1685 PACKAGE_STRING
1686 PACKAGE_VERSION
1687 PACKAGE_TARNAME
1688 PACKAGE_NAME
1689 PATH_SEPARATOR
1690 SHELL'
1691 ac_subst_files=''
1692 ac_user_opts='
1693 enable_option_checking
1694 enable_maintainer_mode
1695 enable_largefile
1696 enable_dependency_tracking
1697 '
1698 ac_precious_vars='build_alias
1699 host_alias
1700 target_alias
1701 CC
1702 CFLAGS
1703 LDFLAGS
1704 LIBS
1705 CPPFLAGS
1706 CPP'
1707
1708
1709 # Initialize some variables set by options.
1710 ac_init_help=
1711 ac_init_version=false
1712 ac_unrecognized_opts=
1713 ac_unrecognized_sep=
1714 # The variables have the same names as the options, with
1715 # dashes changed to underlines.
1716 cache_file=/dev/null
1717 exec_prefix=NONE
1718 no_create=
1719 no_recursion=
1720 prefix=NONE
1721 program_prefix=NONE
1722 program_suffix=NONE
1723 program_transform_name=s,x,x,
1724 silent=
1725 site=
1726 srcdir=
1727 verbose=
1728 x_includes=NONE
1729 x_libraries=NONE
1730
1731 # Installation directory options.
1732 # These are left unexpanded so users can "make install exec_prefix=/foo"
1733 # and all the variables that are supposed to be based on exec_prefix
1734 # by default will actually change.
1735 # Use braces instead of parens because sh, perl, etc. also accept them.
1736 # (The list follows the same order as the GNU Coding Standards.)
1737 bindir='${exec_prefix}/bin'
1738 sbindir='${exec_prefix}/sbin'
1739 libexecdir='${exec_prefix}/libexec'
1740 datarootdir='${prefix}/share'
1741 datadir='${datarootdir}'
1742 sysconfdir='${prefix}/etc'
1743 sharedstatedir='${prefix}/com'
1744 localstatedir='${prefix}/var'
1745 includedir='${prefix}/include'
1746 oldincludedir='/usr/include'
1747 docdir='${datarootdir}/doc/${PACKAGE}'
1748 infodir='${datarootdir}/info'
1749 htmldir='${docdir}'
1750 dvidir='${docdir}'
1751 pdfdir='${docdir}'
1752 psdir='${docdir}'
1753 libdir='${exec_prefix}/lib'
1754 localedir='${datarootdir}/locale'
1755 mandir='${datarootdir}/man'
1756
1757 ac_prev=
1758 ac_dashdash=
1759 for ac_option
1760 do
1761 # If the previous option needs an argument, assign it.
1762 if test -n "$ac_prev"; then
1763 eval $ac_prev=\$ac_option
1764 ac_prev=
1765 continue
1766 fi
1767
1768 case $ac_option in
1769 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1770 *) ac_optarg=yes ;;
1771 esac
1772
1773 # Accept the important Cygnus configure options, so we can diagnose typos.
1774
1775 case $ac_dashdash$ac_option in
1776 --)
1777 ac_dashdash=yes ;;
1778
1779 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1780 ac_prev=bindir ;;
1781 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1782 bindir=$ac_optarg ;;
1783
1784 -build | --build | --buil | --bui | --bu)
1785 ac_prev=build_alias ;;
1786 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1787 build_alias=$ac_optarg ;;
1788
1789 -cache-file | --cache-file | --cache-fil | --cache-fi \
1790 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1791 ac_prev=cache_file ;;
1792 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1793 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1794 cache_file=$ac_optarg ;;
1795
1796 --config-cache | -C)
1797 cache_file=config.cache ;;
1798
1799 -datadir | --datadir | --datadi | --datad)
1800 ac_prev=datadir ;;
1801 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1802 datadir=$ac_optarg ;;
1803
1804 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1805 | --dataroo | --dataro | --datar)
1806 ac_prev=datarootdir ;;
1807 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1808 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1809 datarootdir=$ac_optarg ;;
1810
1811 -disable-* | --disable-*)
1812 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1813 # Reject names that are not valid shell variable names.
1814 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1815 as_fn_error "invalid feature name: $ac_useropt"
1816 ac_useropt_orig=$ac_useropt
1817 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1818 case $ac_user_opts in
1819 *"
1820 "enable_$ac_useropt"
1821 "*) ;;
1822 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1823 ac_unrecognized_sep=', ';;
1824 esac
1825 eval enable_$ac_useropt=no ;;
1826
1827 -docdir | --docdir | --docdi | --doc | --do)
1828 ac_prev=docdir ;;
1829 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1830 docdir=$ac_optarg ;;
1831
1832 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1833 ac_prev=dvidir ;;
1834 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1835 dvidir=$ac_optarg ;;
1836
1837 -enable-* | --enable-*)
1838 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1839 # Reject names that are not valid shell variable names.
1840 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1841 as_fn_error "invalid feature name: $ac_useropt"
1842 ac_useropt_orig=$ac_useropt
1843 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1844 case $ac_user_opts in
1845 *"
1846 "enable_$ac_useropt"
1847 "*) ;;
1848 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1849 ac_unrecognized_sep=', ';;
1850 esac
1851 eval enable_$ac_useropt=\$ac_optarg ;;
1852
1853 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1854 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1855 | --exec | --exe | --ex)
1856 ac_prev=exec_prefix ;;
1857 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1858 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1859 | --exec=* | --exe=* | --ex=*)
1860 exec_prefix=$ac_optarg ;;
1861
1862 -gas | --gas | --ga | --g)
1863 # Obsolete; use --with-gas.
1864 with_gas=yes ;;
1865
1866 -help | --help | --hel | --he | -h)
1867 ac_init_help=long ;;
1868 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1869 ac_init_help=recursive ;;
1870 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1871 ac_init_help=short ;;
1872
1873 -host | --host | --hos | --ho)
1874 ac_prev=host_alias ;;
1875 -host=* | --host=* | --hos=* | --ho=*)
1876 host_alias=$ac_optarg ;;
1877
1878 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1879 ac_prev=htmldir ;;
1880 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1881 | --ht=*)
1882 htmldir=$ac_optarg ;;
1883
1884 -includedir | --includedir | --includedi | --included | --include \
1885 | --includ | --inclu | --incl | --inc)
1886 ac_prev=includedir ;;
1887 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1888 | --includ=* | --inclu=* | --incl=* | --inc=*)
1889 includedir=$ac_optarg ;;
1890
1891 -infodir | --infodir | --infodi | --infod | --info | --inf)
1892 ac_prev=infodir ;;
1893 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1894 infodir=$ac_optarg ;;
1895
1896 -libdir | --libdir | --libdi | --libd)
1897 ac_prev=libdir ;;
1898 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1899 libdir=$ac_optarg ;;
1900
1901 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1902 | --libexe | --libex | --libe)
1903 ac_prev=libexecdir ;;
1904 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1905 | --libexe=* | --libex=* | --libe=*)
1906 libexecdir=$ac_optarg ;;
1907
1908 -localedir | --localedir | --localedi | --localed | --locale)
1909 ac_prev=localedir ;;
1910 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1911 localedir=$ac_optarg ;;
1912
1913 -localstatedir | --localstatedir | --localstatedi | --localstated \
1914 | --localstate | --localstat | --localsta | --localst | --locals)
1915 ac_prev=localstatedir ;;
1916 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1917 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1918 localstatedir=$ac_optarg ;;
1919
1920 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1921 ac_prev=mandir ;;
1922 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1923 mandir=$ac_optarg ;;
1924
1925 -nfp | --nfp | --nf)
1926 # Obsolete; use --without-fp.
1927 with_fp=no ;;
1928
1929 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1930 | --no-cr | --no-c | -n)
1931 no_create=yes ;;
1932
1933 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1934 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1935 no_recursion=yes ;;
1936
1937 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1938 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1939 | --oldin | --oldi | --old | --ol | --o)
1940 ac_prev=oldincludedir ;;
1941 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1942 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1943 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1944 oldincludedir=$ac_optarg ;;
1945
1946 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1947 ac_prev=prefix ;;
1948 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1949 prefix=$ac_optarg ;;
1950
1951 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1952 | --program-pre | --program-pr | --program-p)
1953 ac_prev=program_prefix ;;
1954 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1955 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1956 program_prefix=$ac_optarg ;;
1957
1958 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1959 | --program-suf | --program-su | --program-s)
1960 ac_prev=program_suffix ;;
1961 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1962 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1963 program_suffix=$ac_optarg ;;
1964
1965 -program-transform-name | --program-transform-name \
1966 | --program-transform-nam | --program-transform-na \
1967 | --program-transform-n | --program-transform- \
1968 | --program-transform | --program-transfor \
1969 | --program-transfo | --program-transf \
1970 | --program-trans | --program-tran \
1971 | --progr-tra | --program-tr | --program-t)
1972 ac_prev=program_transform_name ;;
1973 -program-transform-name=* | --program-transform-name=* \
1974 | --program-transform-nam=* | --program-transform-na=* \
1975 | --program-transform-n=* | --program-transform-=* \
1976 | --program-transform=* | --program-transfor=* \
1977 | --program-transfo=* | --program-transf=* \
1978 | --program-trans=* | --program-tran=* \
1979 | --progr-tra=* | --program-tr=* | --program-t=*)
1980 program_transform_name=$ac_optarg ;;
1981
1982 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1983 ac_prev=pdfdir ;;
1984 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1985 pdfdir=$ac_optarg ;;
1986
1987 -psdir | --psdir | --psdi | --psd | --ps)
1988 ac_prev=psdir ;;
1989 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1990 psdir=$ac_optarg ;;
1991
1992 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1993 | -silent | --silent | --silen | --sile | --sil)
1994 silent=yes ;;
1995
1996 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1997 ac_prev=sbindir ;;
1998 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1999 | --sbi=* | --sb=*)
2000 sbindir=$ac_optarg ;;
2001
2002 -sharedstatedir | --sharedstatedir | --sharedstatedi \
2003 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
2004 | --sharedst | --shareds | --shared | --share | --shar \
2005 | --sha | --sh)
2006 ac_prev=sharedstatedir ;;
2007 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
2008 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
2009 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
2010 | --sha=* | --sh=*)
2011 sharedstatedir=$ac_optarg ;;
2012
2013 -site | --site | --sit)
2014 ac_prev=site ;;
2015 -site=* | --site=* | --sit=*)
2016 site=$ac_optarg ;;
2017
2018 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2019 ac_prev=srcdir ;;
2020 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2021 srcdir=$ac_optarg ;;
2022
2023 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
2024 | --syscon | --sysco | --sysc | --sys | --sy)
2025 ac_prev=sysconfdir ;;
2026 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
2027 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
2028 sysconfdir=$ac_optarg ;;
2029
2030 -target | --target | --targe | --targ | --tar | --ta | --t)
2031 ac_prev=target_alias ;;
2032 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
2033 target_alias=$ac_optarg ;;
2034
2035 -v | -verbose | --verbose | --verbos | --verbo | --verb)
2036 verbose=yes ;;
2037
2038 -version | --version | --versio | --versi | --vers | -V)
2039 ac_init_version=: ;;
2040
2041 -with-* | --with-*)
2042 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
2043 # Reject names that are not valid shell variable names.
2044 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2045 as_fn_error "invalid package name: $ac_useropt"
2046 ac_useropt_orig=$ac_useropt
2047 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2048 case $ac_user_opts in
2049 *"
2050 "with_$ac_useropt"
2051 "*) ;;
2052 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
2053 ac_unrecognized_sep=', ';;
2054 esac
2055 eval with_$ac_useropt=\$ac_optarg ;;
2056
2057 -without-* | --without-*)
2058 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
2059 # Reject names that are not valid shell variable names.
2060 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2061 as_fn_error "invalid package name: $ac_useropt"
2062 ac_useropt_orig=$ac_useropt
2063 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2064 case $ac_user_opts in
2065 *"
2066 "with_$ac_useropt"
2067 "*) ;;
2068 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
2069 ac_unrecognized_sep=', ';;
2070 esac
2071 eval with_$ac_useropt=no ;;
2072
2073 --x)
2074 # Obsolete; use --with-x.
2075 with_x=yes ;;
2076
2077 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
2078 | --x-incl | --x-inc | --x-in | --x-i)
2079 ac_prev=x_includes ;;
2080 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
2081 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
2082 x_includes=$ac_optarg ;;
2083
2084 -x-libraries | --x-libraries | --x-librarie | --x-librari \
2085 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
2086 ac_prev=x_libraries ;;
2087 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
2088 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
2089 x_libraries=$ac_optarg ;;
2090
2091 -*) as_fn_error "unrecognized option: \`$ac_option'
2092 Try \`$0 --help' for more information."
2093 ;;
2094
2095 *=*)
2096 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
2097 # Reject names that are not valid shell variable names.
2098 case $ac_envvar in #(
2099 '' | [0-9]* | *[!_$as_cr_alnum]* )
2100 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
2101 esac
2102 eval $ac_envvar=\$ac_optarg
2103 export $ac_envvar ;;
2104
2105 *)
2106 # FIXME: should be removed in autoconf 3.0.
2107 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
2108 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
2109 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
2110 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
2111 ;;
2112
2113 esac
2114 done
2115
2116 if test -n "$ac_prev"; then
2117 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
2118 as_fn_error "missing argument to $ac_option"
2119 fi
2120
2121 if test -n "$ac_unrecognized_opts"; then
2122 case $enable_option_checking in
2123 no) ;;
2124 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
2125 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2126 esac
2127 fi
2128
2129 # Check all directory arguments for consistency.
2130 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
2131 datadir sysconfdir sharedstatedir localstatedir includedir \
2132 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2133 libdir localedir mandir
2134 do
2135 eval ac_val=\$$ac_var
2136 # Remove trailing slashes.
2137 case $ac_val in
2138 */ )
2139 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2140 eval $ac_var=\$ac_val;;
2141 esac
2142 # Be sure to have absolute directory names.
2143 case $ac_val in
2144 [\\/$]* | ?:[\\/]* ) continue;;
2145 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2146 esac
2147 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
2148 done
2149
2150 # There might be people who depend on the old broken behavior: `$host'
2151 # used to hold the argument of --host etc.
2152 # FIXME: To remove some day.
2153 build=$build_alias
2154 host=$host_alias
2155 target=$target_alias
2156
2157 # FIXME: To remove some day.
2158 if test "x$host_alias" != x; then
2159 if test "x$build_alias" = x; then
2160 cross_compiling=maybe
2161 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
2162 If a cross compiler is detected then cross compile mode will be used." >&2
2163 elif test "x$build_alias" != "x$host_alias"; then
2164 cross_compiling=yes
2165 fi
2166 fi
2167
2168 ac_tool_prefix=
2169 test -n "$host_alias" && ac_tool_prefix=$host_alias-
2170
2171 test "$silent" = yes && exec 6>/dev/null
2172
2173
2174 ac_pwd=`pwd` && test -n "$ac_pwd" &&
2175 ac_ls_di=`ls -di .` &&
2176 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2177 as_fn_error "working directory cannot be determined"
2178 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2179 as_fn_error "pwd does not report name of working directory"
2180
2181
2182 # Find the source files, if location was not specified.
2183 if test -z "$srcdir"; then
2184 ac_srcdir_defaulted=yes
2185 # Try the directory containing this script, then the parent directory.
2186 ac_confdir=`$as_dirname -- "$as_myself" ||
2187 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2188 X"$as_myself" : 'X\(//\)[^/]' \| \
2189 X"$as_myself" : 'X\(//\)$' \| \
2190 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2191 $as_echo X"$as_myself" |
2192 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2193 s//\1/
2194 q
2195 }
2196 /^X\(\/\/\)[^/].*/{
2197 s//\1/
2198 q
2199 }
2200 /^X\(\/\/\)$/{
2201 s//\1/
2202 q
2203 }
2204 /^X\(\/\).*/{
2205 s//\1/
2206 q
2207 }
2208 s/.*/./; q'`
2209 srcdir=$ac_confdir
2210 if test ! -r "$srcdir/$ac_unique_file"; then
2211 srcdir=..
2212 fi
2213 else
2214 ac_srcdir_defaulted=no
2215 fi
2216 if test ! -r "$srcdir/$ac_unique_file"; then
2217 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2218 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
2219 fi
2220 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2221 ac_abs_confdir=`(
2222 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
2223 pwd)`
2224 # When building in place, set srcdir=.
2225 if test "$ac_abs_confdir" = "$ac_pwd"; then
2226 srcdir=.
2227 fi
2228 # Remove unnecessary trailing slashes from srcdir.
2229 # Double slashes in file names in object file debugging info
2230 # mess up M-x gdb in Emacs.
2231 case $srcdir in
2232 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2233 esac
2234 for ac_var in $ac_precious_vars; do
2235 eval ac_env_${ac_var}_set=\${${ac_var}+set}
2236 eval ac_env_${ac_var}_value=\$${ac_var}
2237 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2238 eval ac_cv_env_${ac_var}_value=\$${ac_var}
2239 done
2240
2241 #
2242 # Report the --help message.
2243 #
2244 if test "$ac_init_help" = "long"; then
2245 # Omit some internal or obsolete options to make the list less imposing.
2246 # This message is too long to be a string in the A/UX 3.1 sh.
2247 cat <<_ACEOF
2248 \`configure' configures this package to adapt to many kinds of systems.
2249
2250 Usage: $0 [OPTION]... [VAR=VALUE]...
2251
2252 To assign environment variables (e.g., CC, CFLAGS...), specify them as
2253 VAR=VALUE. See below for descriptions of some of the useful variables.
2254
2255 Defaults for the options are specified in brackets.
2256
2257 Configuration:
2258 -h, --help display this help and exit
2259 --help=short display options specific to this package
2260 --help=recursive display the short help of all the included packages
2261 -V, --version display version information and exit
2262 -q, --quiet, --silent do not print \`checking...' messages
2263 --cache-file=FILE cache test results in FILE [disabled]
2264 -C, --config-cache alias for \`--cache-file=config.cache'
2265 -n, --no-create do not create output files
2266 --srcdir=DIR find the sources in DIR [configure dir or \`..']
2267
2268 Installation directories:
2269 --prefix=PREFIX install architecture-independent files in PREFIX
2270 [$ac_default_prefix]
2271 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
2272 [PREFIX]
2273
2274 By default, \`make install' will install all the files in
2275 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
2276 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2277 for instance \`--prefix=\$HOME'.
2278
2279 For better control, use the options below.
2280
2281 Fine tuning of the installation directories:
2282 --bindir=DIR user executables [EPREFIX/bin]
2283 --sbindir=DIR system admin executables [EPREFIX/sbin]
2284 --libexecdir=DIR program executables [EPREFIX/libexec]
2285 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
2286 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
2287 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
2288 --libdir=DIR object code libraries [EPREFIX/lib]
2289 --includedir=DIR C header files [PREFIX/include]
2290 --oldincludedir=DIR C header files for non-gcc [/usr/include]
2291 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
2292 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
2293 --infodir=DIR info documentation [DATAROOTDIR/info]
2294 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
2295 --mandir=DIR man documentation [DATAROOTDIR/man]
2296 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
2297 --htmldir=DIR html documentation [DOCDIR]
2298 --dvidir=DIR dvi documentation [DOCDIR]
2299 --pdfdir=DIR pdf documentation [DOCDIR]
2300 --psdir=DIR ps documentation [DOCDIR]
2301 _ACEOF
2302
2303 cat <<\_ACEOF
2304
2305 Program names:
2306 --program-prefix=PREFIX prepend PREFIX to installed program names
2307 --program-suffix=SUFFIX append SUFFIX to installed program names
2308 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
2309
2310 System types:
2311 --build=BUILD configure for building on BUILD [guessed]
2312 --host=HOST cross-compile to build programs to run on HOST [BUILD]
2313 --target=TARGET configure for building compilers for TARGET [HOST]
2314 _ACEOF
2315 fi
2316
2317 if test -n "$ac_init_help"; then
2318
2319 cat <<\_ACEOF
2320
2321 Optional Features:
2322 --disable-option-checking ignore unrecognized --enable/--with options
2323 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
2324 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
2325 --enable-maintainer-mode enable make rules and dependencies not useful
2326 (and sometimes confusing) to the casual installer
2327 --disable-largefile omit support for large files
2328 --disable-dependency-tracking speeds up one-time build
2329 --enable-dependency-tracking do not reject slow dependency extractors
2330
2331 Some influential environment variables:
2332 CC C compiler command
2333 CFLAGS C compiler flags
2334 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2335 nonstandard directory <lib dir>
2336 LIBS libraries to pass to the linker, e.g. -l<library>
2337 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
2338 you have headers in a nonstandard directory <include dir>
2339 CPP C preprocessor
2340
2341 Use these variables to override the choices made by `configure' or to help
2342 it to find libraries and programs with nonstandard names/locations.
2343
2344 Report bugs to the package provider.
2345 _ACEOF
2346 ac_status=$?
2347 fi
2348
2349 if test "$ac_init_help" = "recursive"; then
2350 # If there are subdirs, report their specific --help.
2351 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2352 test -d "$ac_dir" ||
2353 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2354 continue
2355 ac_builddir=.
2356
2357 case "$ac_dir" in
2358 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2359 *)
2360 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2361 # A ".." for each directory in $ac_dir_suffix.
2362 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2363 case $ac_top_builddir_sub in
2364 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2365 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2366 esac ;;
2367 esac
2368 ac_abs_top_builddir=$ac_pwd
2369 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2370 # for backward compatibility:
2371 ac_top_builddir=$ac_top_build_prefix
2372
2373 case $srcdir in
2374 .) # We are building in place.
2375 ac_srcdir=.
2376 ac_top_srcdir=$ac_top_builddir_sub
2377 ac_abs_top_srcdir=$ac_pwd ;;
2378 [\\/]* | ?:[\\/]* ) # Absolute name.
2379 ac_srcdir=$srcdir$ac_dir_suffix;
2380 ac_top_srcdir=$srcdir
2381 ac_abs_top_srcdir=$srcdir ;;
2382 *) # Relative name.
2383 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2384 ac_top_srcdir=$ac_top_build_prefix$srcdir
2385 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2386 esac
2387 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2388
2389 cd "$ac_dir" || { ac_status=$?; continue; }
2390 # Check for guested configure.
2391 if test -f "$ac_srcdir/configure.gnu"; then
2392 echo &&
2393 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2394 elif test -f "$ac_srcdir/configure"; then
2395 echo &&
2396 $SHELL "$ac_srcdir/configure" --help=recursive
2397 else
2398 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2399 fi || ac_status=$?
2400 cd "$ac_pwd" || { ac_status=$?; break; }
2401 done
2402 fi
2403
2404 test -n "$ac_init_help" && exit $ac_status
2405 if $ac_init_version; then
2406 cat <<\_ACEOF
2407 configure
2408 generated by GNU Autoconf 2.64
2409
2410 Copyright (C) 2009 Free Software Foundation, Inc.
2411 This configure script is free software; the Free Software Foundation
2412 gives unlimited permission to copy, distribute and modify it.
2413 _ACEOF
2414 exit
2415 fi
2416
2417 ## ------------------------ ##
2418 ## Autoconf initialization. ##
2419 ## ------------------------ ##
2420
2421 # ac_fn_c_try_compile LINENO
2422 # --------------------------
2423 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2424 ac_fn_c_try_compile ()
2425 {
2426 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2427 rm -f conftest.$ac_objext
2428 if { { ac_try="$ac_compile"
2429 case "(($ac_try" in
2430 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2431 *) ac_try_echo=$ac_try;;
2432 esac
2433 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2434 $as_echo "$ac_try_echo"; } >&5
2435 (eval "$ac_compile") 2>conftest.err
2436 ac_status=$?
2437 if test -s conftest.err; then
2438 grep -v '^ *+' conftest.err >conftest.er1
2439 cat conftest.er1 >&5
2440 mv -f conftest.er1 conftest.err
2441 fi
2442 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2443 test $ac_status = 0; } && {
2444 test -z "$ac_c_werror_flag" ||
2445 test ! -s conftest.err
2446 } && test -s conftest.$ac_objext; then :
2447 ac_retval=0
2448 else
2449 $as_echo "$as_me: failed program was:" >&5
2450 sed 's/^/| /' conftest.$ac_ext >&5
2451
2452 ac_retval=1
2453 fi
2454 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2455 return $ac_retval
2456
2457 } # ac_fn_c_try_compile
2458
2459 # ac_fn_c_try_cpp LINENO
2460 # ----------------------
2461 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2462 ac_fn_c_try_cpp ()
2463 {
2464 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2465 if { { ac_try="$ac_cpp conftest.$ac_ext"
2466 case "(($ac_try" in
2467 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2468 *) ac_try_echo=$ac_try;;
2469 esac
2470 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2471 $as_echo "$ac_try_echo"; } >&5
2472 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2473 ac_status=$?
2474 if test -s conftest.err; then
2475 grep -v '^ *+' conftest.err >conftest.er1
2476 cat conftest.er1 >&5
2477 mv -f conftest.er1 conftest.err
2478 fi
2479 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2480 test $ac_status = 0; } >/dev/null && {
2481 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2482 test ! -s conftest.err
2483 }; then :
2484 ac_retval=0
2485 else
2486 $as_echo "$as_me: failed program was:" >&5
2487 sed 's/^/| /' conftest.$ac_ext >&5
2488
2489 ac_retval=1
2490 fi
2491 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2492 return $ac_retval
2493
2494 } # ac_fn_c_try_cpp
2495
2496 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2497 # -------------------------------------------------------
2498 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2499 # the include files in INCLUDES and setting the cache variable VAR
2500 # accordingly.
2501 ac_fn_c_check_header_mongrel ()
2502 {
2503 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2504 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2506 $as_echo_n "checking for $2... " >&6; }
2507 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2508 $as_echo_n "(cached) " >&6
2509 fi
2510 eval ac_res=\$$3
2511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2512 $as_echo "$ac_res" >&6; }
2513 else
2514 # Is the header compilable?
2515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2516 $as_echo_n "checking $2 usability... " >&6; }
2517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2518 /* end confdefs.h. */
2519 $4
2520 #include <$2>
2521 _ACEOF
2522 if ac_fn_c_try_compile "$LINENO"; then :
2523 ac_header_compiler=yes
2524 else
2525 ac_header_compiler=no
2526 fi
2527 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2529 $as_echo "$ac_header_compiler" >&6; }
2530
2531 # Is the header present?
2532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2533 $as_echo_n "checking $2 presence... " >&6; }
2534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2535 /* end confdefs.h. */
2536 #include <$2>
2537 _ACEOF
2538 if ac_fn_c_try_cpp "$LINENO"; then :
2539 ac_header_preproc=yes
2540 else
2541 ac_header_preproc=no
2542 fi
2543 rm -f conftest.err conftest.$ac_ext
2544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2545 $as_echo "$ac_header_preproc" >&6; }
2546
2547 # So? What about this header?
2548 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2549 yes:no: )
2550 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2551 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2552 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2553 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2554 ;;
2555 no:yes:* )
2556 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2557 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2558 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2559 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2560 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2561 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2562 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2563 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2564 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2565 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2566 ;;
2567 esac
2568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2569 $as_echo_n "checking for $2... " >&6; }
2570 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2571 $as_echo_n "(cached) " >&6
2572 else
2573 eval "$3=\$ac_header_compiler"
2574 fi
2575 eval ac_res=\$$3
2576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2577 $as_echo "$ac_res" >&6; }
2578 fi
2579 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2580
2581 } # ac_fn_c_check_header_mongrel
2582
2583 # ac_fn_c_try_run LINENO
2584 # ----------------------
2585 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2586 # that executables *can* be run.
2587 ac_fn_c_try_run ()
2588 {
2589 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2590 if { { ac_try="$ac_link"
2591 case "(($ac_try" in
2592 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2593 *) ac_try_echo=$ac_try;;
2594 esac
2595 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2596 $as_echo "$ac_try_echo"; } >&5
2597 (eval "$ac_link") 2>&5
2598 ac_status=$?
2599 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2600 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2601 { { case "(($ac_try" in
2602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2603 *) ac_try_echo=$ac_try;;
2604 esac
2605 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2606 $as_echo "$ac_try_echo"; } >&5
2607 (eval "$ac_try") 2>&5
2608 ac_status=$?
2609 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2610 test $ac_status = 0; }; }; then :
2611 ac_retval=0
2612 else
2613 $as_echo "$as_me: program exited with status $ac_status" >&5
2614 $as_echo "$as_me: failed program was:" >&5
2615 sed 's/^/| /' conftest.$ac_ext >&5
2616
2617 ac_retval=$ac_status
2618 fi
2619 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2620 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2621 return $ac_retval
2622
2623 } # ac_fn_c_try_run
2624
2625 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2626 # -------------------------------------------------------
2627 # Tests whether HEADER exists and can be compiled using the include files in
2628 # INCLUDES, setting the cache variable VAR accordingly.
2629 ac_fn_c_check_header_compile ()
2630 {
2631 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2633 $as_echo_n "checking for $2... " >&6; }
2634 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2635 $as_echo_n "(cached) " >&6
2636 else
2637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2638 /* end confdefs.h. */
2639 $4
2640 #include <$2>
2641 _ACEOF
2642 if ac_fn_c_try_compile "$LINENO"; then :
2643 eval "$3=yes"
2644 else
2645 eval "$3=no"
2646 fi
2647 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2648 fi
2649 eval ac_res=\$$3
2650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2651 $as_echo "$ac_res" >&6; }
2652 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2653
2654 } # ac_fn_c_check_header_compile
2655
2656 # ac_fn_c_try_link LINENO
2657 # -----------------------
2658 # Try to link conftest.$ac_ext, and return whether this succeeded.
2659 ac_fn_c_try_link ()
2660 {
2661 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2662 rm -f conftest.$ac_objext conftest$ac_exeext
2663 if { { ac_try="$ac_link"
2664 case "(($ac_try" in
2665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2666 *) ac_try_echo=$ac_try;;
2667 esac
2668 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2669 $as_echo "$ac_try_echo"; } >&5
2670 (eval "$ac_link") 2>conftest.err
2671 ac_status=$?
2672 if test -s conftest.err; then
2673 grep -v '^ *+' conftest.err >conftest.er1
2674 cat conftest.er1 >&5
2675 mv -f conftest.er1 conftest.err
2676 fi
2677 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2678 test $ac_status = 0; } && {
2679 test -z "$ac_c_werror_flag" ||
2680 test ! -s conftest.err
2681 } && test -s conftest$ac_exeext && {
2682 test "$cross_compiling" = yes ||
2683 $as_test_x conftest$ac_exeext
2684 }; then :
2685 ac_retval=0
2686 else
2687 $as_echo "$as_me: failed program was:" >&5
2688 sed 's/^/| /' conftest.$ac_ext >&5
2689
2690 ac_retval=1
2691 fi
2692 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2693 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2694 # interfere with the next link command; also delete a directory that is
2695 # left behind by Apple's compiler. We do this before executing the actions.
2696 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2697 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2698 return $ac_retval
2699
2700 } # ac_fn_c_try_link
2701
2702 # ac_fn_c_check_func LINENO FUNC VAR
2703 # ----------------------------------
2704 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2705 ac_fn_c_check_func ()
2706 {
2707 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2709 $as_echo_n "checking for $2... " >&6; }
2710 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2711 $as_echo_n "(cached) " >&6
2712 else
2713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2714 /* end confdefs.h. */
2715 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2716 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2717 #define $2 innocuous_$2
2718
2719 /* System header to define __stub macros and hopefully few prototypes,
2720 which can conflict with char $2 (); below.
2721 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2722 <limits.h> exists even on freestanding compilers. */
2723
2724 #ifdef __STDC__
2725 # include <limits.h>
2726 #else
2727 # include <assert.h>
2728 #endif
2729
2730 #undef $2
2731
2732 /* Override any GCC internal prototype to avoid an error.
2733 Use char because int might match the return type of a GCC
2734 builtin and then its argument prototype would still apply. */
2735 #ifdef __cplusplus
2736 extern "C"
2737 #endif
2738 char $2 ();
2739 /* The GNU C library defines this for functions which it implements
2740 to always fail with ENOSYS. Some functions are actually named
2741 something starting with __ and the normal name is an alias. */
2742 #if defined __stub_$2 || defined __stub___$2
2743 choke me
2744 #endif
2745
2746 int
2747 main ()
2748 {
2749 return $2 ();
2750 ;
2751 return 0;
2752 }
2753 _ACEOF
2754 if ac_fn_c_try_link "$LINENO"; then :
2755 eval "$3=yes"
2756 else
2757 eval "$3=no"
2758 fi
2759 rm -f core conftest.err conftest.$ac_objext \
2760 conftest$ac_exeext conftest.$ac_ext
2761 fi
2762 eval ac_res=\$$3
2763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2764 $as_echo "$ac_res" >&6; }
2765 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2766
2767 } # ac_fn_c_check_func
2768
2769 # ac_fn_c_check_decl LINENO SYMBOL VAR
2770 # ------------------------------------
2771 # Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2772 ac_fn_c_check_decl ()
2773 {
2774 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2776 $as_echo_n "checking whether $2 is declared... " >&6; }
2777 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2778 $as_echo_n "(cached) " >&6
2779 else
2780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2781 /* end confdefs.h. */
2782 $4
2783 int
2784 main ()
2785 {
2786 #ifndef $2
2787 (void) $2;
2788 #endif
2789
2790 ;
2791 return 0;
2792 }
2793 _ACEOF
2794 if ac_fn_c_try_compile "$LINENO"; then :
2795 eval "$3=yes"
2796 else
2797 eval "$3=no"
2798 fi
2799 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2800 fi
2801 eval ac_res=\$$3
2802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2803 $as_echo "$ac_res" >&6; }
2804 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2805
2806 } # ac_fn_c_check_decl
2807
2808 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2809 # --------------------------------------------
2810 # Tries to find the compile-time value of EXPR in a program that includes
2811 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2812 # computed
2813 ac_fn_c_compute_int ()
2814 {
2815 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2816 if test "$cross_compiling" = yes; then
2817 # Depending upon the size, compute the lo and hi bounds.
2818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2819 /* end confdefs.h. */
2820 $4
2821 int
2822 main ()
2823 {
2824 static int test_array [1 - 2 * !(($2) >= 0)];
2825 test_array [0] = 0
2826
2827 ;
2828 return 0;
2829 }
2830 _ACEOF
2831 if ac_fn_c_try_compile "$LINENO"; then :
2832 ac_lo=0 ac_mid=0
2833 while :; do
2834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2835 /* end confdefs.h. */
2836 $4
2837 int
2838 main ()
2839 {
2840 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2841 test_array [0] = 0
2842
2843 ;
2844 return 0;
2845 }
2846 _ACEOF
2847 if ac_fn_c_try_compile "$LINENO"; then :
2848 ac_hi=$ac_mid; break
2849 else
2850 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2851 if test $ac_lo -le $ac_mid; then
2852 ac_lo= ac_hi=
2853 break
2854 fi
2855 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2856 fi
2857 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2858 done
2859 else
2860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2861 /* end confdefs.h. */
2862 $4
2863 int
2864 main ()
2865 {
2866 static int test_array [1 - 2 * !(($2) < 0)];
2867 test_array [0] = 0
2868
2869 ;
2870 return 0;
2871 }
2872 _ACEOF
2873 if ac_fn_c_try_compile "$LINENO"; then :
2874 ac_hi=-1 ac_mid=-1
2875 while :; do
2876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2877 /* end confdefs.h. */
2878 $4
2879 int
2880 main ()
2881 {
2882 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2883 test_array [0] = 0
2884
2885 ;
2886 return 0;
2887 }
2888 _ACEOF
2889 if ac_fn_c_try_compile "$LINENO"; then :
2890 ac_lo=$ac_mid; break
2891 else
2892 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2893 if test $ac_mid -le $ac_hi; then
2894 ac_lo= ac_hi=
2895 break
2896 fi
2897 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2898 fi
2899 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2900 done
2901 else
2902 ac_lo= ac_hi=
2903 fi
2904 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2905 fi
2906 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2907 # Binary search between lo and hi bounds.
2908 while test "x$ac_lo" != "x$ac_hi"; do
2909 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2911 /* end confdefs.h. */
2912 $4
2913 int
2914 main ()
2915 {
2916 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2917 test_array [0] = 0
2918
2919 ;
2920 return 0;
2921 }
2922 _ACEOF
2923 if ac_fn_c_try_compile "$LINENO"; then :
2924 ac_hi=$ac_mid
2925 else
2926 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2927 fi
2928 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2929 done
2930 case $ac_lo in #((
2931 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2932 '') ac_retval=1 ;;
2933 esac
2934 else
2935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2936 /* end confdefs.h. */
2937 $4
2938 static long int longval () { return $2; }
2939 static unsigned long int ulongval () { return $2; }
2940 #include <stdio.h>
2941 #include <stdlib.h>
2942 int
2943 main ()
2944 {
2945
2946 FILE *f = fopen ("conftest.val", "w");
2947 if (! f)
2948 return 1;
2949 if (($2) < 0)
2950 {
2951 long int i = longval ();
2952 if (i != ($2))
2953 return 1;
2954 fprintf (f, "%ld", i);
2955 }
2956 else
2957 {
2958 unsigned long int i = ulongval ();
2959 if (i != ($2))
2960 return 1;
2961 fprintf (f, "%lu", i);
2962 }
2963 /* Do not output a trailing newline, as this causes \r\n confusion
2964 on some platforms. */
2965 return ferror (f) || fclose (f) != 0;
2966
2967 ;
2968 return 0;
2969 }
2970 _ACEOF
2971 if ac_fn_c_try_run "$LINENO"; then :
2972 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2973 else
2974 ac_retval=1
2975 fi
2976 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2977 conftest.$ac_objext conftest.beam conftest.$ac_ext
2978 rm -f conftest.val
2979
2980 fi
2981 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2982 return $ac_retval
2983
2984 } # ac_fn_c_compute_int
2985
2986 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2987 # -------------------------------------------
2988 # Tests whether TYPE exists after having included INCLUDES, setting cache
2989 # variable VAR accordingly.
2990 ac_fn_c_check_type ()
2991 {
2992 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2994 $as_echo_n "checking for $2... " >&6; }
2995 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2996 $as_echo_n "(cached) " >&6
2997 else
2998 eval "$3=no"
2999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3000 /* end confdefs.h. */
3001 $4
3002 int
3003 main ()
3004 {
3005 if (sizeof ($2))
3006 return 0;
3007 ;
3008 return 0;
3009 }
3010 _ACEOF
3011 if ac_fn_c_try_compile "$LINENO"; then :
3012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3013 /* end confdefs.h. */
3014 $4
3015 int
3016 main ()
3017 {
3018 if (sizeof (($2)))
3019 return 0;
3020 ;
3021 return 0;
3022 }
3023 _ACEOF
3024 if ac_fn_c_try_compile "$LINENO"; then :
3025
3026 else
3027 eval "$3=yes"
3028 fi
3029 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3030 fi
3031 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3032 fi
3033 eval ac_res=\$$3
3034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3035 $as_echo "$ac_res" >&6; }
3036 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
3037
3038 } # ac_fn_c_check_type
3039 cat >config.log <<_ACEOF
3040 This file contains any messages produced by compilers while
3041 running configure, to aid debugging if configure makes a mistake.
3042
3043 It was created by $as_me, which was
3044 generated by GNU Autoconf 2.64. Invocation command line was
3045
3046 $ $0 $@
3047
3048 _ACEOF
3049 exec 5>>config.log
3050 {
3051 cat <<_ASUNAME
3052 ## --------- ##
3053 ## Platform. ##
3054 ## --------- ##
3055
3056 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3057 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3058 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3059 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3060 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3061
3062 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3063 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
3064
3065 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
3066 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
3067 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3068 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
3069 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
3070 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
3071 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
3072
3073 _ASUNAME
3074
3075 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3076 for as_dir in $PATH
3077 do
3078 IFS=$as_save_IFS
3079 test -z "$as_dir" && as_dir=.
3080 $as_echo "PATH: $as_dir"
3081 done
3082 IFS=$as_save_IFS
3083
3084 } >&5
3085
3086 cat >&5 <<_ACEOF
3087
3088
3089 ## ----------- ##
3090 ## Core tests. ##
3091 ## ----------- ##
3092
3093 _ACEOF
3094
3095
3096 # Keep a trace of the command line.
3097 # Strip out --no-create and --no-recursion so they do not pile up.
3098 # Strip out --silent because we don't want to record it for future runs.
3099 # Also quote any args containing shell meta-characters.
3100 # Make two passes to allow for proper duplicate-argument suppression.
3101 ac_configure_args=
3102 ac_configure_args0=
3103 ac_configure_args1=
3104 ac_must_keep_next=false
3105 for ac_pass in 1 2
3106 do
3107 for ac_arg
3108 do
3109 case $ac_arg in
3110 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3111 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3112 | -silent | --silent | --silen | --sile | --sil)
3113 continue ;;
3114 *\'*)
3115 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3116 esac
3117 case $ac_pass in
3118 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3119 2)
3120 as_fn_append ac_configure_args1 " '$ac_arg'"
3121 if test $ac_must_keep_next = true; then
3122 ac_must_keep_next=false # Got value, back to normal.
3123 else
3124 case $ac_arg in
3125 *=* | --config-cache | -C | -disable-* | --disable-* \
3126 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3127 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3128 | -with-* | --with-* | -without-* | --without-* | --x)
3129 case "$ac_configure_args0 " in
3130 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3131 esac
3132 ;;
3133 -* ) ac_must_keep_next=true ;;
3134 esac
3135 fi
3136 as_fn_append ac_configure_args " '$ac_arg'"
3137 ;;
3138 esac
3139 done
3140 done
3141 { ac_configure_args0=; unset ac_configure_args0;}
3142 { ac_configure_args1=; unset ac_configure_args1;}
3143
3144 # When interrupted or exit'd, cleanup temporary files, and complete
3145 # config.log. We remove comments because anyway the quotes in there
3146 # would cause problems or look ugly.
3147 # WARNING: Use '\'' to represent an apostrophe within the trap.
3148 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3149 trap 'exit_status=$?
3150 # Save into config.log some information that might help in debugging.
3151 {
3152 echo
3153
3154 cat <<\_ASBOX
3155 ## ---------------- ##
3156 ## Cache variables. ##
3157 ## ---------------- ##
3158 _ASBOX
3159 echo
3160 # The following way of writing the cache mishandles newlines in values,
3161 (
3162 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3163 eval ac_val=\$$ac_var
3164 case $ac_val in #(
3165 *${as_nl}*)
3166 case $ac_var in #(
3167 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3168 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3169 esac
3170 case $ac_var in #(
3171 _ | IFS | as_nl) ;; #(
3172 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3173 *) { eval $ac_var=; unset $ac_var;} ;;
3174 esac ;;
3175 esac
3176 done
3177 (set) 2>&1 |
3178 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3179 *${as_nl}ac_space=\ *)
3180 sed -n \
3181 "s/'\''/'\''\\\\'\'''\''/g;
3182 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3183 ;; #(
3184 *)
3185 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3186 ;;
3187 esac |
3188 sort
3189 )
3190 echo
3191
3192 cat <<\_ASBOX
3193 ## ----------------- ##
3194 ## Output variables. ##
3195 ## ----------------- ##
3196 _ASBOX
3197 echo
3198 for ac_var in $ac_subst_vars
3199 do
3200 eval ac_val=\$$ac_var
3201 case $ac_val in
3202 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3203 esac
3204 $as_echo "$ac_var='\''$ac_val'\''"
3205 done | sort
3206 echo
3207
3208 if test -n "$ac_subst_files"; then
3209 cat <<\_ASBOX
3210 ## ------------------- ##
3211 ## File substitutions. ##
3212 ## ------------------- ##
3213 _ASBOX
3214 echo
3215 for ac_var in $ac_subst_files
3216 do
3217 eval ac_val=\$$ac_var
3218 case $ac_val in
3219 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3220 esac
3221 $as_echo "$ac_var='\''$ac_val'\''"
3222 done | sort
3223 echo
3224 fi
3225
3226 if test -s confdefs.h; then
3227 cat <<\_ASBOX
3228 ## ----------- ##
3229 ## confdefs.h. ##
3230 ## ----------- ##
3231 _ASBOX
3232 echo
3233 cat confdefs.h
3234 echo
3235 fi
3236 test "$ac_signal" != 0 &&
3237 $as_echo "$as_me: caught signal $ac_signal"
3238 $as_echo "$as_me: exit $exit_status"
3239 } >&5
3240 rm -f core *.core core.conftest.* &&
3241 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3242 exit $exit_status
3243 ' 0
3244 for ac_signal in 1 2 13 15; do
3245 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3246 done
3247 ac_signal=0
3248
3249 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3250 rm -f -r conftest* confdefs.h
3251
3252 $as_echo "/* confdefs.h */" > confdefs.h
3253
3254 # Predefined preprocessor variables.
3255
3256 cat >>confdefs.h <<_ACEOF
3257 #define PACKAGE_NAME "$PACKAGE_NAME"
3258 _ACEOF
3259
3260 cat >>confdefs.h <<_ACEOF
3261 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3262 _ACEOF
3263
3264 cat >>confdefs.h <<_ACEOF
3265 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3266 _ACEOF
3267
3268 cat >>confdefs.h <<_ACEOF
3269 #define PACKAGE_STRING "$PACKAGE_STRING"
3270 _ACEOF
3271
3272 cat >>confdefs.h <<_ACEOF
3273 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3274 _ACEOF
3275
3276 cat >>confdefs.h <<_ACEOF
3277 #define PACKAGE_URL "$PACKAGE_URL"
3278 _ACEOF
3279
3280
3281 # Let the site file select an alternate cache file if it wants to.
3282 # Prefer an explicitly selected file to automatically selected ones.
3283 ac_site_file1=NONE
3284 ac_site_file2=NONE
3285 if test -n "$CONFIG_SITE"; then
3286 ac_site_file1=$CONFIG_SITE
3287 elif test "x$prefix" != xNONE; then
3288 ac_site_file1=$prefix/share/config.site
3289 ac_site_file2=$prefix/etc/config.site
3290 else
3291 ac_site_file1=$ac_default_prefix/share/config.site
3292 ac_site_file2=$ac_default_prefix/etc/config.site
3293 fi
3294 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3295 do
3296 test "x$ac_site_file" = xNONE && continue
3297 if test -r "$ac_site_file"; then
3298 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3299 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3300 sed 's/^/| /' "$ac_site_file" >&5
3301 . "$ac_site_file"
3302 fi
3303 done
3304
3305 if test -r "$cache_file"; then
3306 # Some versions of bash will fail to source /dev/null (special
3307 # files actually), so we avoid doing that.
3308 if test -f "$cache_file"; then
3309 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3310 $as_echo "$as_me: loading cache $cache_file" >&6;}
3311 case $cache_file in
3312 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3313 *) . "./$cache_file";;
3314 esac
3315 fi
3316 else
3317 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3318 $as_echo "$as_me: creating cache $cache_file" >&6;}
3319 >$cache_file
3320 fi
3321
3322 as_fn_append ac_func_list " canonicalize_file_name"
3323 as_fn_append ac_func_list " getcwd"
3324 as_fn_append ac_func_list " readlink"
3325 as_fn_append ac_func_list " realpath"
3326 as_fn_append ac_header_list " sys/param.h"
3327 as_fn_append ac_header_list " unistd.h"
3328 as_fn_append ac_func_list " _set_invalid_parameter_handler"
3329 as_fn_append ac_header_list " sys/socket.h"
3330 as_fn_append ac_func_list " fchdir"
3331 as_fn_append ac_header_list " dirent.h"
3332 as_fn_append ac_func_list " fcntl"
3333 as_fn_append ac_func_list " symlink"
3334 as_fn_append ac_func_list " fdopendir"
3335 as_fn_append ac_func_list " mempcpy"
3336 as_fn_append ac_func_list " btowc"
3337 as_fn_append ac_func_list " isblank"
3338 as_fn_append ac_func_list " iswctype"
3339 as_fn_append ac_func_list " mbsrtowcs"
3340 as_fn_append ac_func_list " wmemchr"
3341 as_fn_append ac_func_list " wmemcpy"
3342 as_fn_append ac_func_list " wmempcpy"
3343 as_fn_append ac_header_list " wctype.h"
3344 gl_fnmatch_required=GNU
3345 as_fn_append ac_header_list " sys/stat.h"
3346 as_fn_append ac_func_list " fstatat"
3347 as_fn_append ac_func_list " getdtablesize"
3348 as_fn_append ac_func_list " getlogin_r"
3349 as_fn_append ac_func_list " getprogname"
3350 as_fn_append ac_func_list " getexecname"
3351 as_fn_append ac_header_list " sys/time.h"
3352 as_fn_append ac_func_list " gettimeofday"
3353 as_fn_append ac_header_list " sys/cdefs.h"
3354 as_fn_append ac_func_list " getpwnam_r"
3355 as_fn_append ac_header_list " limits.h"
3356 as_fn_append ac_header_list " wchar.h"
3357 as_fn_append ac_header_list " stdint.h"
3358 as_fn_append ac_header_list " inttypes.h"
3359 as_fn_append ac_func_list " lstat"
3360 as_fn_append ac_header_list " math.h"
3361 as_fn_append ac_func_list " mbsinit"
3362 as_fn_append ac_func_list " mbrtowc"
3363 as_fn_append ac_header_list " sys/mman.h"
3364 as_fn_append ac_func_list " mprotect"
3365 as_fn_append ac_func_list " openat"
3366 as_fn_append ac_func_list " link"
3367 as_fn_append ac_func_list " setenv"
3368 as_fn_append ac_func_list " strdup"
3369 as_fn_append ac_func_list " pipe"
3370 as_fn_append ac_header_list " features.h"
3371 as_fn_append ac_func_list " iswcntrl"
3372 # Check that the precious variables saved in the cache have kept the same
3373 # value.
3374 ac_cache_corrupted=false
3375 for ac_var in $ac_precious_vars; do
3376 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3377 eval ac_new_set=\$ac_env_${ac_var}_set
3378 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3379 eval ac_new_val=\$ac_env_${ac_var}_value
3380 case $ac_old_set,$ac_new_set in
3381 set,)
3382 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3383 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3384 ac_cache_corrupted=: ;;
3385 ,set)
3386 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3387 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3388 ac_cache_corrupted=: ;;
3389 ,);;
3390 *)
3391 if test "x$ac_old_val" != "x$ac_new_val"; then
3392 # differences in whitespace do not lead to failure.
3393 ac_old_val_w=`echo x $ac_old_val`
3394 ac_new_val_w=`echo x $ac_new_val`
3395 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3396 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3397 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3398 ac_cache_corrupted=:
3399 else
3400 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3401 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3402 eval $ac_var=\$ac_old_val
3403 fi
3404 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3405 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3406 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3407 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
3408 fi;;
3409 esac
3410 # Pass precious variables to config.status.
3411 if test "$ac_new_set" = set; then
3412 case $ac_new_val in
3413 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3414 *) ac_arg=$ac_var=$ac_new_val ;;
3415 esac
3416 case " $ac_configure_args " in
3417 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3418 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3419 esac
3420 fi
3421 done
3422 if $ac_cache_corrupted; then
3423 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3424 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3425 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3426 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3427 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3428 fi
3429 ## -------------------- ##
3430 ## Main body of script. ##
3431 ## -------------------- ##
3432
3433 ac_ext=c
3434 ac_cpp='$CPP $CPPFLAGS'
3435 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3436 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3437 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3438
3439
3440 ac_config_headers="$ac_config_headers config.h:config.in"
3441
3442
3443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
3444 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
3445 # Check whether --enable-maintainer-mode was given.
3446 if test "${enable_maintainer_mode+set}" = set; then :
3447 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
3448 else
3449 USE_MAINTAINER_MODE=no
3450 fi
3451
3452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
3453 $as_echo "$USE_MAINTAINER_MODE" >&6; }
3454 if test $USE_MAINTAINER_MODE = yes; then
3455 MAINTAINER_MODE_TRUE=
3456 MAINTAINER_MODE_FALSE='#'
3457 else
3458 MAINTAINER_MODE_TRUE='#'
3459 MAINTAINER_MODE_FALSE=
3460 fi
3461
3462 MAINT=$MAINTAINER_MODE_TRUE
3463
3464
3465
3466 ac_ext=c
3467 ac_cpp='$CPP $CPPFLAGS'
3468 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3469 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3470 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3471 if test -n "$ac_tool_prefix"; then
3472 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3473 set dummy ${ac_tool_prefix}gcc; ac_word=$2
3474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3475 $as_echo_n "checking for $ac_word... " >&6; }
3476 if test "${ac_cv_prog_CC+set}" = set; then :
3477 $as_echo_n "(cached) " >&6
3478 else
3479 if test -n "$CC"; then
3480 ac_cv_prog_CC="$CC" # Let the user override the test.
3481 else
3482 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3483 for as_dir in $PATH
3484 do
3485 IFS=$as_save_IFS
3486 test -z "$as_dir" && as_dir=.
3487 for ac_exec_ext in '' $ac_executable_extensions; do
3488 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3489 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3490 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3491 break 2
3492 fi
3493 done
3494 done
3495 IFS=$as_save_IFS
3496
3497 fi
3498 fi
3499 CC=$ac_cv_prog_CC
3500 if test -n "$CC"; then
3501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3502 $as_echo "$CC" >&6; }
3503 else
3504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3505 $as_echo "no" >&6; }
3506 fi
3507
3508
3509 fi
3510 if test -z "$ac_cv_prog_CC"; then
3511 ac_ct_CC=$CC
3512 # Extract the first word of "gcc", so it can be a program name with args.
3513 set dummy gcc; ac_word=$2
3514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3515 $as_echo_n "checking for $ac_word... " >&6; }
3516 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3517 $as_echo_n "(cached) " >&6
3518 else
3519 if test -n "$ac_ct_CC"; then
3520 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3521 else
3522 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3523 for as_dir in $PATH
3524 do
3525 IFS=$as_save_IFS
3526 test -z "$as_dir" && as_dir=.
3527 for ac_exec_ext in '' $ac_executable_extensions; do
3528 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3529 ac_cv_prog_ac_ct_CC="gcc"
3530 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3531 break 2
3532 fi
3533 done
3534 done
3535 IFS=$as_save_IFS
3536
3537 fi
3538 fi
3539 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3540 if test -n "$ac_ct_CC"; then
3541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3542 $as_echo "$ac_ct_CC" >&6; }
3543 else
3544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3545 $as_echo "no" >&6; }
3546 fi
3547
3548 if test "x$ac_ct_CC" = x; then
3549 CC=""
3550 else
3551 case $cross_compiling:$ac_tool_warned in
3552 yes:)
3553 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3554 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3555 ac_tool_warned=yes ;;
3556 esac
3557 CC=$ac_ct_CC
3558 fi
3559 else
3560 CC="$ac_cv_prog_CC"
3561 fi
3562
3563 if test -z "$CC"; then
3564 if test -n "$ac_tool_prefix"; then
3565 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3566 set dummy ${ac_tool_prefix}cc; ac_word=$2
3567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3568 $as_echo_n "checking for $ac_word... " >&6; }
3569 if test "${ac_cv_prog_CC+set}" = set; then :
3570 $as_echo_n "(cached) " >&6
3571 else
3572 if test -n "$CC"; then
3573 ac_cv_prog_CC="$CC" # Let the user override the test.
3574 else
3575 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3576 for as_dir in $PATH
3577 do
3578 IFS=$as_save_IFS
3579 test -z "$as_dir" && as_dir=.
3580 for ac_exec_ext in '' $ac_executable_extensions; do
3581 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3582 ac_cv_prog_CC="${ac_tool_prefix}cc"
3583 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3584 break 2
3585 fi
3586 done
3587 done
3588 IFS=$as_save_IFS
3589
3590 fi
3591 fi
3592 CC=$ac_cv_prog_CC
3593 if test -n "$CC"; then
3594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3595 $as_echo "$CC" >&6; }
3596 else
3597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3598 $as_echo "no" >&6; }
3599 fi
3600
3601
3602 fi
3603 fi
3604 if test -z "$CC"; then
3605 # Extract the first word of "cc", so it can be a program name with args.
3606 set dummy cc; ac_word=$2
3607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3608 $as_echo_n "checking for $ac_word... " >&6; }
3609 if test "${ac_cv_prog_CC+set}" = set; then :
3610 $as_echo_n "(cached) " >&6
3611 else
3612 if test -n "$CC"; then
3613 ac_cv_prog_CC="$CC" # Let the user override the test.
3614 else
3615 ac_prog_rejected=no
3616 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3617 for as_dir in $PATH
3618 do
3619 IFS=$as_save_IFS
3620 test -z "$as_dir" && as_dir=.
3621 for ac_exec_ext in '' $ac_executable_extensions; do
3622 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3623 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3624 ac_prog_rejected=yes
3625 continue
3626 fi
3627 ac_cv_prog_CC="cc"
3628 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3629 break 2
3630 fi
3631 done
3632 done
3633 IFS=$as_save_IFS
3634
3635 if test $ac_prog_rejected = yes; then
3636 # We found a bogon in the path, so make sure we never use it.
3637 set dummy $ac_cv_prog_CC
3638 shift
3639 if test $# != 0; then
3640 # We chose a different compiler from the bogus one.
3641 # However, it has the same basename, so the bogon will be chosen
3642 # first if we set CC to just the basename; use the full file name.
3643 shift
3644 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3645 fi
3646 fi
3647 fi
3648 fi
3649 CC=$ac_cv_prog_CC
3650 if test -n "$CC"; then
3651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3652 $as_echo "$CC" >&6; }
3653 else
3654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3655 $as_echo "no" >&6; }
3656 fi
3657
3658
3659 fi
3660 if test -z "$CC"; then
3661 if test -n "$ac_tool_prefix"; then
3662 for ac_prog in cl.exe
3663 do
3664 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3665 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3667 $as_echo_n "checking for $ac_word... " >&6; }
3668 if test "${ac_cv_prog_CC+set}" = set; then :
3669 $as_echo_n "(cached) " >&6
3670 else
3671 if test -n "$CC"; then
3672 ac_cv_prog_CC="$CC" # Let the user override the test.
3673 else
3674 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3675 for as_dir in $PATH
3676 do
3677 IFS=$as_save_IFS
3678 test -z "$as_dir" && as_dir=.
3679 for ac_exec_ext in '' $ac_executable_extensions; do
3680 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3681 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3682 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3683 break 2
3684 fi
3685 done
3686 done
3687 IFS=$as_save_IFS
3688
3689 fi
3690 fi
3691 CC=$ac_cv_prog_CC
3692 if test -n "$CC"; then
3693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3694 $as_echo "$CC" >&6; }
3695 else
3696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3697 $as_echo "no" >&6; }
3698 fi
3699
3700
3701 test -n "$CC" && break
3702 done
3703 fi
3704 if test -z "$CC"; then
3705 ac_ct_CC=$CC
3706 for ac_prog in cl.exe
3707 do
3708 # Extract the first word of "$ac_prog", so it can be a program name with args.
3709 set dummy $ac_prog; ac_word=$2
3710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3711 $as_echo_n "checking for $ac_word... " >&6; }
3712 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3713 $as_echo_n "(cached) " >&6
3714 else
3715 if test -n "$ac_ct_CC"; then
3716 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3717 else
3718 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3719 for as_dir in $PATH
3720 do
3721 IFS=$as_save_IFS
3722 test -z "$as_dir" && as_dir=.
3723 for ac_exec_ext in '' $ac_executable_extensions; do
3724 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3725 ac_cv_prog_ac_ct_CC="$ac_prog"
3726 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3727 break 2
3728 fi
3729 done
3730 done
3731 IFS=$as_save_IFS
3732
3733 fi
3734 fi
3735 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3736 if test -n "$ac_ct_CC"; then
3737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3738 $as_echo "$ac_ct_CC" >&6; }
3739 else
3740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3741 $as_echo "no" >&6; }
3742 fi
3743
3744
3745 test -n "$ac_ct_CC" && break
3746 done
3747
3748 if test "x$ac_ct_CC" = x; then
3749 CC=""
3750 else
3751 case $cross_compiling:$ac_tool_warned in
3752 yes:)
3753 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3754 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3755 ac_tool_warned=yes ;;
3756 esac
3757 CC=$ac_ct_CC
3758 fi
3759 fi
3760
3761 fi
3762
3763
3764 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3765 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3766 as_fn_error "no acceptable C compiler found in \$PATH
3767 See \`config.log' for more details." "$LINENO" 5; }
3768
3769 # Provide some information about the compiler.
3770 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3771 set X $ac_compile
3772 ac_compiler=$2
3773 for ac_option in --version -v -V -qversion; do
3774 { { ac_try="$ac_compiler $ac_option >&5"
3775 case "(($ac_try" in
3776 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3777 *) ac_try_echo=$ac_try;;
3778 esac
3779 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3780 $as_echo "$ac_try_echo"; } >&5
3781 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3782 ac_status=$?
3783 if test -s conftest.err; then
3784 sed '10a\
3785 ... rest of stderr output deleted ...
3786 10q' conftest.err >conftest.er1
3787 cat conftest.er1 >&5
3788 rm -f conftest.er1 conftest.err
3789 fi
3790 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3791 test $ac_status = 0; }
3792 done
3793
3794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3795 /* end confdefs.h. */
3796 #include <stdio.h>
3797 int
3798 main ()
3799 {
3800 FILE *f = fopen ("conftest.out", "w");
3801 return ferror (f) || fclose (f) != 0;
3802
3803 ;
3804 return 0;
3805 }
3806 _ACEOF
3807 ac_clean_files_save=$ac_clean_files
3808 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
3809 # Try to create an executable without -o first, disregard a.out.
3810 # It will help us diagnose broken compilers, and finding out an intuition
3811 # of exeext.
3812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3813 $as_echo_n "checking for C compiler default output file name... " >&6; }
3814 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3815
3816 # The possible output files:
3817 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3818
3819 ac_rmfiles=
3820 for ac_file in $ac_files
3821 do
3822 case $ac_file in
3823 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3824 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3825 esac
3826 done
3827 rm -f $ac_rmfiles
3828
3829 if { { ac_try="$ac_link_default"
3830 case "(($ac_try" in
3831 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3832 *) ac_try_echo=$ac_try;;
3833 esac
3834 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3835 $as_echo "$ac_try_echo"; } >&5
3836 (eval "$ac_link_default") 2>&5
3837 ac_status=$?
3838 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3839 test $ac_status = 0; }; then :
3840 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3841 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3842 # in a Makefile. We should not override ac_cv_exeext if it was cached,
3843 # so that the user can short-circuit this test for compilers unknown to
3844 # Autoconf.
3845 for ac_file in $ac_files ''
3846 do
3847 test -f "$ac_file" || continue
3848 case $ac_file in
3849 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3850 ;;
3851 [ab].out )
3852 # We found the default executable, but exeext='' is most
3853 # certainly right.
3854 break;;
3855 *.* )
3856 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3857 then :; else
3858 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3859 fi
3860 # We set ac_cv_exeext here because the later test for it is not
3861 # safe: cross compilers may not add the suffix if given an `-o'
3862 # argument, so we may need to know it at that point already.
3863 # Even if this section looks crufty: it has the advantage of
3864 # actually working.
3865 break;;
3866 * )
3867 break;;
3868 esac
3869 done
3870 test "$ac_cv_exeext" = no && ac_cv_exeext=
3871
3872 else
3873 ac_file=''
3874 fi
3875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3876 $as_echo "$ac_file" >&6; }
3877 if test -z "$ac_file"; then :
3878 $as_echo "$as_me: failed program was:" >&5
3879 sed 's/^/| /' conftest.$ac_ext >&5
3880
3881 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3882 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3883 { as_fn_set_status 77
3884 as_fn_error "C compiler cannot create executables
3885 See \`config.log' for more details." "$LINENO" 5; }; }
3886 fi
3887 ac_exeext=$ac_cv_exeext
3888
3889 # Check that the compiler produces executables we can run. If not, either
3890 # the compiler is broken, or we cross compile.
3891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3892 $as_echo_n "checking whether the C compiler works... " >&6; }
3893 # If not cross compiling, check that we can run a simple program.
3894 if test "$cross_compiling" != yes; then
3895 if { ac_try='./$ac_file'
3896 { { case "(($ac_try" in
3897 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3898 *) ac_try_echo=$ac_try;;
3899 esac
3900 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3901 $as_echo "$ac_try_echo"; } >&5
3902 (eval "$ac_try") 2>&5
3903 ac_status=$?
3904 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3905 test $ac_status = 0; }; }; then
3906 cross_compiling=no
3907 else
3908 if test "$cross_compiling" = maybe; then
3909 cross_compiling=yes
3910 else
3911 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3912 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3913 as_fn_error "cannot run C compiled programs.
3914 If you meant to cross compile, use \`--host'.
3915 See \`config.log' for more details." "$LINENO" 5; }
3916 fi
3917 fi
3918 fi
3919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3920 $as_echo "yes" >&6; }
3921
3922 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
3923 ac_clean_files=$ac_clean_files_save
3924 # Check that the compiler produces executables we can run. If not, either
3925 # the compiler is broken, or we cross compile.
3926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3927 $as_echo_n "checking whether we are cross compiling... " >&6; }
3928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3929 $as_echo "$cross_compiling" >&6; }
3930
3931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3932 $as_echo_n "checking for suffix of executables... " >&6; }
3933 if { { ac_try="$ac_link"
3934 case "(($ac_try" in
3935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3936 *) ac_try_echo=$ac_try;;
3937 esac
3938 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3939 $as_echo "$ac_try_echo"; } >&5
3940 (eval "$ac_link") 2>&5
3941 ac_status=$?
3942 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3943 test $ac_status = 0; }; then :
3944 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3945 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3946 # work properly (i.e., refer to `conftest.exe'), while it won't with
3947 # `rm'.
3948 for ac_file in conftest.exe conftest conftest.*; do
3949 test -f "$ac_file" || continue
3950 case $ac_file in
3951 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3952 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3953 break;;
3954 * ) break;;
3955 esac
3956 done
3957 else
3958 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3959 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3960 as_fn_error "cannot compute suffix of executables: cannot compile and link
3961 See \`config.log' for more details." "$LINENO" 5; }
3962 fi
3963 rm -f conftest$ac_cv_exeext
3964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3965 $as_echo "$ac_cv_exeext" >&6; }
3966
3967 rm -f conftest.$ac_ext
3968 EXEEXT=$ac_cv_exeext
3969 ac_exeext=$EXEEXT
3970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3971 $as_echo_n "checking for suffix of object files... " >&6; }
3972 if test "${ac_cv_objext+set}" = set; then :
3973 $as_echo_n "(cached) " >&6
3974 else
3975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3976 /* end confdefs.h. */
3977
3978 int
3979 main ()
3980 {
3981
3982 ;
3983 return 0;
3984 }
3985 _ACEOF
3986 rm -f conftest.o conftest.obj
3987 if { { ac_try="$ac_compile"
3988 case "(($ac_try" in
3989 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3990 *) ac_try_echo=$ac_try;;
3991 esac
3992 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3993 $as_echo "$ac_try_echo"; } >&5
3994 (eval "$ac_compile") 2>&5
3995 ac_status=$?
3996 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3997 test $ac_status = 0; }; then :
3998 for ac_file in conftest.o conftest.obj conftest.*; do
3999 test -f "$ac_file" || continue;
4000 case $ac_file in
4001 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4002 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4003 break;;
4004 esac
4005 done
4006 else
4007 $as_echo "$as_me: failed program was:" >&5
4008 sed 's/^/| /' conftest.$ac_ext >&5
4009
4010 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4011 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4012 as_fn_error "cannot compute suffix of object files: cannot compile
4013 See \`config.log' for more details." "$LINENO" 5; }
4014 fi
4015 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4016 fi
4017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4018 $as_echo "$ac_cv_objext" >&6; }
4019 OBJEXT=$ac_cv_objext
4020 ac_objext=$OBJEXT
4021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4022 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4023 if test "${ac_cv_c_compiler_gnu+set}" = set; then :
4024 $as_echo_n "(cached) " >&6
4025 else
4026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4027 /* end confdefs.h. */
4028
4029 int
4030 main ()
4031 {
4032 #ifndef __GNUC__
4033 choke me
4034 #endif
4035
4036 ;
4037 return 0;
4038 }
4039 _ACEOF
4040 if ac_fn_c_try_compile "$LINENO"; then :
4041 ac_compiler_gnu=yes
4042 else
4043 ac_compiler_gnu=no
4044 fi
4045 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4046 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4047
4048 fi
4049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4050 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4051 if test $ac_compiler_gnu = yes; then
4052 GCC=yes
4053 else
4054 GCC=
4055 fi
4056 ac_test_CFLAGS=${CFLAGS+set}
4057 ac_save_CFLAGS=$CFLAGS
4058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4059 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4060 if test "${ac_cv_prog_cc_g+set}" = set; then :
4061 $as_echo_n "(cached) " >&6
4062 else
4063 ac_save_c_werror_flag=$ac_c_werror_flag
4064 ac_c_werror_flag=yes
4065 ac_cv_prog_cc_g=no
4066 CFLAGS="-g"
4067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4068 /* end confdefs.h. */
4069
4070 int
4071 main ()
4072 {
4073
4074 ;
4075 return 0;
4076 }
4077 _ACEOF
4078 if ac_fn_c_try_compile "$LINENO"; then :
4079 ac_cv_prog_cc_g=yes
4080 else
4081 CFLAGS=""
4082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4083 /* end confdefs.h. */
4084
4085 int
4086 main ()
4087 {
4088
4089 ;
4090 return 0;
4091 }
4092 _ACEOF
4093 if ac_fn_c_try_compile "$LINENO"; then :
4094
4095 else
4096 ac_c_werror_flag=$ac_save_c_werror_flag
4097 CFLAGS="-g"
4098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4099 /* end confdefs.h. */
4100
4101 int
4102 main ()
4103 {
4104
4105 ;
4106 return 0;
4107 }
4108 _ACEOF
4109 if ac_fn_c_try_compile "$LINENO"; then :
4110 ac_cv_prog_cc_g=yes
4111 fi
4112 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4113 fi
4114 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4115 fi
4116 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4117 ac_c_werror_flag=$ac_save_c_werror_flag
4118 fi
4119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4120 $as_echo "$ac_cv_prog_cc_g" >&6; }
4121 if test "$ac_test_CFLAGS" = set; then
4122 CFLAGS=$ac_save_CFLAGS
4123 elif test $ac_cv_prog_cc_g = yes; then
4124 if test "$GCC" = yes; then
4125 CFLAGS="-g -O2"
4126 else
4127 CFLAGS="-g"
4128 fi
4129 else
4130 if test "$GCC" = yes; then
4131 CFLAGS="-O2"
4132 else
4133 CFLAGS=
4134 fi
4135 fi
4136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4137 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4138 if test "${ac_cv_prog_cc_c89+set}" = set; then :
4139 $as_echo_n "(cached) " >&6
4140 else
4141 ac_cv_prog_cc_c89=no
4142 ac_save_CC=$CC
4143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4144 /* end confdefs.h. */
4145 #include <stdarg.h>
4146 #include <stdio.h>
4147 #include <sys/types.h>
4148 #include <sys/stat.h>
4149 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4150 struct buf { int x; };
4151 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4152 static char *e (p, i)
4153 char **p;
4154 int i;
4155 {
4156 return p[i];
4157 }
4158 static char *f (char * (*g) (char **, int), char **p, ...)
4159 {
4160 char *s;
4161 va_list v;
4162 va_start (v,p);
4163 s = g (p, va_arg (v,int));
4164 va_end (v);
4165 return s;
4166 }
4167
4168 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4169 function prototypes and stuff, but not '\xHH' hex character constants.
4170 These don't provoke an error unfortunately, instead are silently treated
4171 as 'x'. The following induces an error, until -std is added to get
4172 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4173 array size at least. It's necessary to write '\x00'==0 to get something
4174 that's true only with -std. */
4175 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4176
4177 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4178 inside strings and character constants. */
4179 #define FOO(x) 'x'
4180 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4181
4182 int test (int i, double x);
4183 struct s1 {int (*f) (int a);};
4184 struct s2 {int (*f) (double a);};
4185 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4186 int argc;
4187 char **argv;
4188 int
4189 main ()
4190 {
4191 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4192 ;
4193 return 0;
4194 }
4195 _ACEOF
4196 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4197 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4198 do
4199 CC="$ac_save_CC $ac_arg"
4200 if ac_fn_c_try_compile "$LINENO"; then :
4201 ac_cv_prog_cc_c89=$ac_arg
4202 fi
4203 rm -f core conftest.err conftest.$ac_objext
4204 test "x$ac_cv_prog_cc_c89" != "xno" && break
4205 done
4206 rm -f conftest.$ac_ext
4207 CC=$ac_save_CC
4208
4209 fi
4210 # AC_CACHE_VAL
4211 case "x$ac_cv_prog_cc_c89" in
4212 x)
4213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4214 $as_echo "none needed" >&6; } ;;
4215 xno)
4216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4217 $as_echo "unsupported" >&6; } ;;
4218 *)
4219 CC="$CC $ac_cv_prog_cc_c89"
4220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4221 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4222 esac
4223 if test "x$ac_cv_prog_cc_c89" != xno; then :
4224
4225 fi
4226
4227 ac_ext=c
4228 ac_cpp='$CPP $CPPFLAGS'
4229 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4230 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4231 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4232
4233
4234 ac_ext=c
4235 ac_cpp='$CPP $CPPFLAGS'
4236 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4237 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4238 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4240 $as_echo_n "checking how to run the C preprocessor... " >&6; }
4241 # On Suns, sometimes $CPP names a directory.
4242 if test -n "$CPP" && test -d "$CPP"; then
4243 CPP=
4244 fi
4245 if test -z "$CPP"; then
4246 if test "${ac_cv_prog_CPP+set}" = set; then :
4247 $as_echo_n "(cached) " >&6
4248 else
4249 # Double quotes because CPP needs to be expanded
4250 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4251 do
4252 ac_preproc_ok=false
4253 for ac_c_preproc_warn_flag in '' yes
4254 do
4255 # Use a header file that comes with gcc, so configuring glibc
4256 # with a fresh cross-compiler works.
4257 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4258 # <limits.h> exists even on freestanding compilers.
4259 # On the NeXT, cc -E runs the code through the compiler's parser,
4260 # not just through cpp. "Syntax error" is here to catch this case.
4261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4262 /* end confdefs.h. */
4263 #ifdef __STDC__
4264 # include <limits.h>
4265 #else
4266 # include <assert.h>
4267 #endif
4268 Syntax error
4269 _ACEOF
4270 if ac_fn_c_try_cpp "$LINENO"; then :
4271
4272 else
4273 # Broken: fails on valid input.
4274 continue
4275 fi
4276 rm -f conftest.err conftest.$ac_ext
4277
4278 # OK, works on sane cases. Now check whether nonexistent headers
4279 # can be detected and how.
4280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4281 /* end confdefs.h. */
4282 #include <ac_nonexistent.h>
4283 _ACEOF
4284 if ac_fn_c_try_cpp "$LINENO"; then :
4285 # Broken: success on invalid input.
4286 continue
4287 else
4288 # Passes both tests.
4289 ac_preproc_ok=:
4290 break
4291 fi
4292 rm -f conftest.err conftest.$ac_ext
4293
4294 done
4295 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4296 rm -f conftest.err conftest.$ac_ext
4297 if $ac_preproc_ok; then :
4298 break
4299 fi
4300
4301 done
4302 ac_cv_prog_CPP=$CPP
4303
4304 fi
4305 CPP=$ac_cv_prog_CPP
4306 else
4307 ac_cv_prog_CPP=$CPP
4308 fi
4309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4310 $as_echo "$CPP" >&6; }
4311 ac_preproc_ok=false
4312 for ac_c_preproc_warn_flag in '' yes
4313 do
4314 # Use a header file that comes with gcc, so configuring glibc
4315 # with a fresh cross-compiler works.
4316 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4317 # <limits.h> exists even on freestanding compilers.
4318 # On the NeXT, cc -E runs the code through the compiler's parser,
4319 # not just through cpp. "Syntax error" is here to catch this case.
4320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4321 /* end confdefs.h. */
4322 #ifdef __STDC__
4323 # include <limits.h>
4324 #else
4325 # include <assert.h>
4326 #endif
4327 Syntax error
4328 _ACEOF
4329 if ac_fn_c_try_cpp "$LINENO"; then :
4330
4331 else
4332 # Broken: fails on valid input.
4333 continue
4334 fi
4335 rm -f conftest.err conftest.$ac_ext
4336
4337 # OK, works on sane cases. Now check whether nonexistent headers
4338 # can be detected and how.
4339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4340 /* end confdefs.h. */
4341 #include <ac_nonexistent.h>
4342 _ACEOF
4343 if ac_fn_c_try_cpp "$LINENO"; then :
4344 # Broken: success on invalid input.
4345 continue
4346 else
4347 # Passes both tests.
4348 ac_preproc_ok=:
4349 break
4350 fi
4351 rm -f conftest.err conftest.$ac_ext
4352
4353 done
4354 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4355 rm -f conftest.err conftest.$ac_ext
4356 if $ac_preproc_ok; then :
4357
4358 else
4359 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4360 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4361 as_fn_error "C preprocessor \"$CPP\" fails sanity check
4362 See \`config.log' for more details." "$LINENO" 5; }
4363 fi
4364
4365 ac_ext=c
4366 ac_cpp='$CPP $CPPFLAGS'
4367 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4368 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4369 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4370
4371
4372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4373 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4374 if test "${ac_cv_path_GREP+set}" = set; then :
4375 $as_echo_n "(cached) " >&6
4376 else
4377 if test -z "$GREP"; then
4378 ac_path_GREP_found=false
4379 # Loop through the user's path and test for each of PROGNAME-LIST
4380 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4381 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4382 do
4383 IFS=$as_save_IFS
4384 test -z "$as_dir" && as_dir=.
4385 for ac_prog in grep ggrep; do
4386 for ac_exec_ext in '' $ac_executable_extensions; do
4387 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4388 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4389 # Check for GNU ac_path_GREP and select it if it is found.
4390 # Check for GNU $ac_path_GREP
4391 case `"$ac_path_GREP" --version 2>&1` in
4392 *GNU*)
4393 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4394 *)
4395 ac_count=0
4396 $as_echo_n 0123456789 >"conftest.in"
4397 while :
4398 do
4399 cat "conftest.in" "conftest.in" >"conftest.tmp"
4400 mv "conftest.tmp" "conftest.in"
4401 cp "conftest.in" "conftest.nl"
4402 $as_echo 'GREP' >> "conftest.nl"
4403 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4404 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4405 as_fn_arith $ac_count + 1 && ac_count=$as_val
4406 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4407 # Best one so far, save it but keep looking for a better one
4408 ac_cv_path_GREP="$ac_path_GREP"
4409 ac_path_GREP_max=$ac_count
4410 fi
4411 # 10*(2^10) chars as input seems more than enough
4412 test $ac_count -gt 10 && break
4413 done
4414 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4415 esac
4416
4417 $ac_path_GREP_found && break 3
4418 done
4419 done
4420 done
4421 IFS=$as_save_IFS
4422 if test -z "$ac_cv_path_GREP"; then
4423 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4424 fi
4425 else
4426 ac_cv_path_GREP=$GREP
4427 fi
4428
4429 fi
4430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4431 $as_echo "$ac_cv_path_GREP" >&6; }
4432 GREP="$ac_cv_path_GREP"
4433
4434
4435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4436 $as_echo_n "checking for egrep... " >&6; }
4437 if test "${ac_cv_path_EGREP+set}" = set; then :
4438 $as_echo_n "(cached) " >&6
4439 else
4440 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4441 then ac_cv_path_EGREP="$GREP -E"
4442 else
4443 if test -z "$EGREP"; then
4444 ac_path_EGREP_found=false
4445 # Loop through the user's path and test for each of PROGNAME-LIST
4446 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4447 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4448 do
4449 IFS=$as_save_IFS
4450 test -z "$as_dir" && as_dir=.
4451 for ac_prog in egrep; do
4452 for ac_exec_ext in '' $ac_executable_extensions; do
4453 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4454 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4455 # Check for GNU ac_path_EGREP and select it if it is found.
4456 # Check for GNU $ac_path_EGREP
4457 case `"$ac_path_EGREP" --version 2>&1` in
4458 *GNU*)
4459 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4460 *)
4461 ac_count=0
4462 $as_echo_n 0123456789 >"conftest.in"
4463 while :
4464 do
4465 cat "conftest.in" "conftest.in" >"conftest.tmp"
4466 mv "conftest.tmp" "conftest.in"
4467 cp "conftest.in" "conftest.nl"
4468 $as_echo 'EGREP' >> "conftest.nl"
4469 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4470 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4471 as_fn_arith $ac_count + 1 && ac_count=$as_val
4472 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4473 # Best one so far, save it but keep looking for a better one
4474 ac_cv_path_EGREP="$ac_path_EGREP"
4475 ac_path_EGREP_max=$ac_count
4476 fi
4477 # 10*(2^10) chars as input seems more than enough
4478 test $ac_count -gt 10 && break
4479 done
4480 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4481 esac
4482
4483 $ac_path_EGREP_found && break 3
4484 done
4485 done
4486 done
4487 IFS=$as_save_IFS
4488 if test -z "$ac_cv_path_EGREP"; then
4489 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4490 fi
4491 else
4492 ac_cv_path_EGREP=$EGREP
4493 fi
4494
4495 fi
4496 fi
4497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4498 $as_echo "$ac_cv_path_EGREP" >&6; }
4499 EGREP="$ac_cv_path_EGREP"
4500
4501
4502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4503 $as_echo_n "checking for ANSI C header files... " >&6; }
4504 if test "${ac_cv_header_stdc+set}" = set; then :
4505 $as_echo_n "(cached) " >&6
4506 else
4507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4508 /* end confdefs.h. */
4509 #include <stdlib.h>
4510 #include <stdarg.h>
4511 #include <string.h>
4512 #include <float.h>
4513
4514 int
4515 main ()
4516 {
4517
4518 ;
4519 return 0;
4520 }
4521 _ACEOF
4522 if ac_fn_c_try_compile "$LINENO"; then :
4523 ac_cv_header_stdc=yes
4524 else
4525 ac_cv_header_stdc=no
4526 fi
4527 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4528
4529 if test $ac_cv_header_stdc = yes; then
4530 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4532 /* end confdefs.h. */
4533 #include <string.h>
4534
4535 _ACEOF
4536 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4537 $EGREP "memchr" >/dev/null 2>&1; then :
4538
4539 else
4540 ac_cv_header_stdc=no
4541 fi
4542 rm -f conftest*
4543
4544 fi
4545
4546 if test $ac_cv_header_stdc = yes; then
4547 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4549 /* end confdefs.h. */
4550 #include <stdlib.h>
4551
4552 _ACEOF
4553 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4554 $EGREP "free" >/dev/null 2>&1; then :
4555
4556 else
4557 ac_cv_header_stdc=no
4558 fi
4559 rm -f conftest*
4560
4561 fi
4562
4563 if test $ac_cv_header_stdc = yes; then
4564 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4565 if test "$cross_compiling" = yes; then :
4566 :
4567 else
4568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4569 /* end confdefs.h. */
4570 #include <ctype.h>
4571 #include <stdlib.h>
4572 #if ((' ' & 0x0FF) == 0x020)
4573 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4574 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4575 #else
4576 # define ISLOWER(c) \
4577 (('a' <= (c) && (c) <= 'i') \
4578 || ('j' <= (c) && (c) <= 'r') \
4579 || ('s' <= (c) && (c) <= 'z'))
4580 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4581 #endif
4582
4583 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4584 int
4585 main ()
4586 {
4587 int i;
4588 for (i = 0; i < 256; i++)
4589 if (XOR (islower (i), ISLOWER (i))
4590 || toupper (i) != TOUPPER (i))
4591 return 2;
4592 return 0;
4593 }
4594 _ACEOF
4595 if ac_fn_c_try_run "$LINENO"; then :
4596
4597 else
4598 ac_cv_header_stdc=no
4599 fi
4600 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4601 conftest.$ac_objext conftest.beam conftest.$ac_ext
4602 fi
4603
4604 fi
4605 fi
4606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4607 $as_echo "$ac_cv_header_stdc" >&6; }
4608 if test $ac_cv_header_stdc = yes; then
4609
4610 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
4611
4612 fi
4613
4614 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4615 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4616 inttypes.h stdint.h unistd.h
4617 do :
4618 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4619 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4620 "
4621 eval as_val=\$$as_ac_Header
4622 if test "x$as_val" = x""yes; then :
4623 cat >>confdefs.h <<_ACEOF
4624 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4625 _ACEOF
4626
4627 fi
4628
4629 done
4630
4631
4632
4633 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4634 if test "x$ac_cv_header_minix_config_h" = x""yes; then :
4635 MINIX=yes
4636 else
4637 MINIX=
4638 fi
4639
4640
4641 if test "$MINIX" = yes; then
4642
4643 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4644
4645
4646 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4647
4648
4649 $as_echo "#define _MINIX 1" >>confdefs.h
4650
4651
4652 $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
4653
4654 fi
4655
4656
4657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4658 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4659 if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4660 $as_echo_n "(cached) " >&6
4661 else
4662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4663 /* end confdefs.h. */
4664
4665 # define __EXTENSIONS__ 1
4666 $ac_includes_default
4667 int
4668 main ()
4669 {
4670
4671 ;
4672 return 0;
4673 }
4674 _ACEOF
4675 if ac_fn_c_try_compile "$LINENO"; then :
4676 ac_cv_safe_to_define___extensions__=yes
4677 else
4678 ac_cv_safe_to_define___extensions__=no
4679 fi
4680 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4681 fi
4682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4683 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4684 test $ac_cv_safe_to_define___extensions__ = yes &&
4685 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4686
4687 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4688
4689 $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
4690
4691 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4692
4693 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4694
4695 $as_echo "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
4696
4697 $as_echo "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
4698
4699 $as_echo "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
4700
4701 $as_echo "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
4702
4703 $as_echo "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
4704
4705 $as_echo "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
4706
4707 $as_echo "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
4708
4709 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4710
4711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
4712 $as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; }
4713 if test "${ac_cv_should_define__xopen_source+set}" = set; then :
4714 $as_echo_n "(cached) " >&6
4715 else
4716 ac_cv_should_define__xopen_source=no
4717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4718 /* end confdefs.h. */
4719
4720 #include <wchar.h>
4721 mbstate_t x;
4722 int
4723 main ()
4724 {
4725
4726 ;
4727 return 0;
4728 }
4729 _ACEOF
4730 if ac_fn_c_try_compile "$LINENO"; then :
4731
4732 else
4733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4734 /* end confdefs.h. */
4735
4736 #define _XOPEN_SOURCE 500
4737 #include <wchar.h>
4738 mbstate_t x;
4739 int
4740 main ()
4741 {
4742
4743 ;
4744 return 0;
4745 }
4746 _ACEOF
4747 if ac_fn_c_try_compile "$LINENO"; then :
4748 ac_cv_should_define__xopen_source=yes
4749 fi
4750 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4751 fi
4752 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4753 fi
4754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
4755 $as_echo "$ac_cv_should_define__xopen_source" >&6; }
4756 test $ac_cv_should_define__xopen_source = yes &&
4757 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
4770 $as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
4771 if test "${gl_cv_c_amsterdam_compiler+set}" = set; then :
4772 $as_echo_n "(cached) " >&6
4773 else
4774
4775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4776 /* end confdefs.h. */
4777
4778 #ifdef __ACK__
4779 Amsterdam
4780 #endif
4781
4782 _ACEOF
4783 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4784 $EGREP "Amsterdam" >/dev/null 2>&1; then :
4785 gl_cv_c_amsterdam_compiler=yes
4786 else
4787 gl_cv_c_amsterdam_compiler=no
4788 fi
4789 rm -f conftest*
4790
4791
4792 fi
4793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
4794 $as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
4795
4796 if test $gl_cv_c_amsterdam_compiler = yes; then
4797 if test -z "$AR"; then
4798 AR='cc -c.a'
4799 fi
4800 if test -z "$ARFLAGS"; then
4801 ARFLAGS='-o'
4802 fi
4803 else
4804 :
4805 fi
4806
4807 if test -n "$ac_tool_prefix"; then
4808 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4809 set dummy ${ac_tool_prefix}ar; ac_word=$2
4810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4811 $as_echo_n "checking for $ac_word... " >&6; }
4812 if test "${ac_cv_prog_AR+set}" = set; then :
4813 $as_echo_n "(cached) " >&6
4814 else
4815 if test -n "$AR"; then
4816 ac_cv_prog_AR="$AR" # Let the user override the test.
4817 else
4818 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4819 for as_dir in $PATH
4820 do
4821 IFS=$as_save_IFS
4822 test -z "$as_dir" && as_dir=.
4823 for ac_exec_ext in '' $ac_executable_extensions; do
4824 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4825 ac_cv_prog_AR="${ac_tool_prefix}ar"
4826 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4827 break 2
4828 fi
4829 done
4830 done
4831 IFS=$as_save_IFS
4832
4833 fi
4834 fi
4835 AR=$ac_cv_prog_AR
4836 if test -n "$AR"; then
4837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
4838 $as_echo "$AR" >&6; }
4839 else
4840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4841 $as_echo "no" >&6; }
4842 fi
4843
4844
4845 fi
4846 if test -z "$ac_cv_prog_AR"; then
4847 ac_ct_AR=$AR
4848 # Extract the first word of "ar", so it can be a program name with args.
4849 set dummy ar; ac_word=$2
4850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4851 $as_echo_n "checking for $ac_word... " >&6; }
4852 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
4853 $as_echo_n "(cached) " >&6
4854 else
4855 if test -n "$ac_ct_AR"; then
4856 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4857 else
4858 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4859 for as_dir in $PATH
4860 do
4861 IFS=$as_save_IFS
4862 test -z "$as_dir" && as_dir=.
4863 for ac_exec_ext in '' $ac_executable_extensions; do
4864 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4865 ac_cv_prog_ac_ct_AR="ar"
4866 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4867 break 2
4868 fi
4869 done
4870 done
4871 IFS=$as_save_IFS
4872
4873 fi
4874 fi
4875 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4876 if test -n "$ac_ct_AR"; then
4877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
4878 $as_echo "$ac_ct_AR" >&6; }
4879 else
4880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4881 $as_echo "no" >&6; }
4882 fi
4883
4884 if test "x$ac_ct_AR" = x; then
4885 AR="ar"
4886 else
4887 case $cross_compiling:$ac_tool_warned in
4888 yes:)
4889 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4890 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4891 ac_tool_warned=yes ;;
4892 esac
4893 AR=$ac_ct_AR
4894 fi
4895 else
4896 AR="$ac_cv_prog_AR"
4897 fi
4898
4899 if test -z "$ARFLAGS"; then
4900 ARFLAGS='cr'
4901 fi
4902
4903
4904
4905 if test -z "$RANLIB"; then
4906 if test $gl_cv_c_amsterdam_compiler = yes; then
4907 RANLIB=':'
4908 else
4909 if test -n "$ac_tool_prefix"; then
4910 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4911 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4913 $as_echo_n "checking for $ac_word... " >&6; }
4914 if test "${ac_cv_prog_RANLIB+set}" = set; then :
4915 $as_echo_n "(cached) " >&6
4916 else
4917 if test -n "$RANLIB"; then
4918 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4919 else
4920 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4921 for as_dir in $PATH
4922 do
4923 IFS=$as_save_IFS
4924 test -z "$as_dir" && as_dir=.
4925 for ac_exec_ext in '' $ac_executable_extensions; do
4926 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4927 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4928 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4929 break 2
4930 fi
4931 done
4932 done
4933 IFS=$as_save_IFS
4934
4935 fi
4936 fi
4937 RANLIB=$ac_cv_prog_RANLIB
4938 if test -n "$RANLIB"; then
4939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4940 $as_echo "$RANLIB" >&6; }
4941 else
4942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4943 $as_echo "no" >&6; }
4944 fi
4945
4946
4947 fi
4948 if test -z "$ac_cv_prog_RANLIB"; then
4949 ac_ct_RANLIB=$RANLIB
4950 # Extract the first word of "ranlib", so it can be a program name with args.
4951 set dummy ranlib; ac_word=$2
4952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4953 $as_echo_n "checking for $ac_word... " >&6; }
4954 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
4955 $as_echo_n "(cached) " >&6
4956 else
4957 if test -n "$ac_ct_RANLIB"; then
4958 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4959 else
4960 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4961 for as_dir in $PATH
4962 do
4963 IFS=$as_save_IFS
4964 test -z "$as_dir" && as_dir=.
4965 for ac_exec_ext in '' $ac_executable_extensions; do
4966 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4967 ac_cv_prog_ac_ct_RANLIB="ranlib"
4968 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4969 break 2
4970 fi
4971 done
4972 done
4973 IFS=$as_save_IFS
4974
4975 fi
4976 fi
4977 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4978 if test -n "$ac_ct_RANLIB"; then
4979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
4980 $as_echo "$ac_ct_RANLIB" >&6; }
4981 else
4982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4983 $as_echo "no" >&6; }
4984 fi
4985
4986 if test "x$ac_ct_RANLIB" = x; then
4987 RANLIB=":"
4988 else
4989 case $cross_compiling:$ac_tool_warned in
4990 yes:)
4991 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4992 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4993 ac_tool_warned=yes ;;
4994 esac
4995 RANLIB=$ac_ct_RANLIB
4996 fi
4997 else
4998 RANLIB="$ac_cv_prog_RANLIB"
4999 fi
5000
5001 fi
5002 fi
5003
5004
5005 ac_aux_dir=
5006 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
5007 for ac_t in install-sh install.sh shtool; do
5008 if test -f "$ac_dir/$ac_t"; then
5009 ac_aux_dir=$ac_dir
5010 ac_install_sh="$ac_aux_dir/$ac_t -c"
5011 break 2
5012 fi
5013 done
5014 done
5015 if test -z "$ac_aux_dir"; then
5016 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
5017 fi
5018
5019 # These three variables are undocumented and unsupported,
5020 # and are intended to be withdrawn in a future Autoconf release.
5021 # They can cause serious problems if a builder's source tree is in a directory
5022 # whose full name contains unusual characters.
5023 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5024 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5025 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5026
5027
5028 # Make sure we can run config.sub.
5029 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
5030 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
5031
5032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
5033 $as_echo_n "checking build system type... " >&6; }
5034 if test "${ac_cv_build+set}" = set; then :
5035 $as_echo_n "(cached) " >&6
5036 else
5037 ac_build_alias=$build_alias
5038 test "x$ac_build_alias" = x &&
5039 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
5040 test "x$ac_build_alias" = x &&
5041 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
5042 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
5043 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
5044
5045 fi
5046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
5047 $as_echo "$ac_cv_build" >&6; }
5048 case $ac_cv_build in
5049 *-*-*) ;;
5050 *) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
5051 esac
5052 build=$ac_cv_build
5053 ac_save_IFS=$IFS; IFS='-'
5054 set x $ac_cv_build
5055 shift
5056 build_cpu=$1
5057 build_vendor=$2
5058 shift; shift
5059 # Remember, the first character of IFS is used to create $*,
5060 # except with old shells:
5061 build_os=$*
5062 IFS=$ac_save_IFS
5063 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
5064
5065
5066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
5067 $as_echo_n "checking host system type... " >&6; }
5068 if test "${ac_cv_host+set}" = set; then :
5069 $as_echo_n "(cached) " >&6
5070 else
5071 if test "x$host_alias" = x; then
5072 ac_cv_host=$ac_cv_build
5073 else
5074 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
5075 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
5076 fi
5077
5078 fi
5079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
5080 $as_echo "$ac_cv_host" >&6; }
5081 case $ac_cv_host in
5082 *-*-*) ;;
5083 *) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
5084 esac
5085 host=$ac_cv_host
5086 ac_save_IFS=$IFS; IFS='-'
5087 set x $ac_cv_host
5088 shift
5089 host_cpu=$1
5090 host_vendor=$2
5091 shift; shift
5092 # Remember, the first character of IFS is used to create $*,
5093 # except with old shells:
5094 host_os=$*
5095 IFS=$ac_save_IFS
5096 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
5097
5098
5099
5100
5101
5102 # IEEE behaviour is the default on all CPUs except Alpha and SH
5103 # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
5104 # and the GCC 4.1.2 manual).
5105 case "$host_cpu" in
5106 alpha*)
5107 # On Alpha systems, a compiler option provides the behaviour.
5108 # See the ieee(3) manual page, also available at
5109 # <http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V51B_HTML/MAN/MAN3/0600____.HTM>
5110 if test -n "$GCC"; then
5111 # GCC has the option -mieee.
5112 # For full IEEE compliance (rarely needed), use option -mieee-with-inexact.
5113 CPPFLAGS="$CPPFLAGS -mieee"
5114 else
5115 # Compaq (ex-DEC) C has the option -ieee, equivalent to -ieee_with_no_inexact.
5116 # For full IEEE compliance (rarely needed), use option -ieee_with_inexact.
5117 CPPFLAGS="$CPPFLAGS -ieee"
5118 fi
5119 ;;
5120 sh*)
5121 if test -n "$GCC"; then
5122 # GCC has the option -mieee.
5123 CPPFLAGS="$CPPFLAGS -mieee"
5124 fi
5125 ;;
5126 esac
5127
5128 # Check whether --enable-largefile was given.
5129 if test "${enable_largefile+set}" = set; then :
5130 enableval=$enable_largefile;
5131 fi
5132
5133 if test "$enable_largefile" != no; then
5134
5135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
5136 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
5137 if test "${ac_cv_sys_largefile_CC+set}" = set; then :
5138 $as_echo_n "(cached) " >&6
5139 else
5140 ac_cv_sys_largefile_CC=no
5141 if test "$GCC" != yes; then
5142 ac_save_CC=$CC
5143 while :; do
5144 # IRIX 6.2 and later do not support large files by default,
5145 # so use the C compiler's -n32 option if that helps.
5146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5147 /* end confdefs.h. */
5148 #include <sys/types.h>
5149 /* Check that off_t can represent 2**63 - 1 correctly.
5150 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5151 since some C++ compilers masquerading as C compilers
5152 incorrectly reject 9223372036854775807. */
5153 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5154 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5155 && LARGE_OFF_T % 2147483647 == 1)
5156 ? 1 : -1];
5157 int
5158 main ()
5159 {
5160
5161 ;
5162 return 0;
5163 }
5164 _ACEOF
5165 if ac_fn_c_try_compile "$LINENO"; then :
5166 break
5167 fi
5168 rm -f core conftest.err conftest.$ac_objext
5169 CC="$CC -n32"
5170 if ac_fn_c_try_compile "$LINENO"; then :
5171 ac_cv_sys_largefile_CC=' -n32'; break
5172 fi
5173 rm -f core conftest.err conftest.$ac_objext
5174 break
5175 done
5176 CC=$ac_save_CC
5177 rm -f conftest.$ac_ext
5178 fi
5179 fi
5180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
5181 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
5182 if test "$ac_cv_sys_largefile_CC" != no; then
5183 CC=$CC$ac_cv_sys_largefile_CC
5184 fi
5185
5186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5187 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
5188 if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
5189 $as_echo_n "(cached) " >&6
5190 else
5191 while :; do
5192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5193 /* end confdefs.h. */
5194 #include <sys/types.h>
5195 /* Check that off_t can represent 2**63 - 1 correctly.
5196 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5197 since some C++ compilers masquerading as C compilers
5198 incorrectly reject 9223372036854775807. */
5199 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5200 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5201 && LARGE_OFF_T % 2147483647 == 1)
5202 ? 1 : -1];
5203 int
5204 main ()
5205 {
5206
5207 ;
5208 return 0;
5209 }
5210 _ACEOF
5211 if ac_fn_c_try_compile "$LINENO"; then :
5212 ac_cv_sys_file_offset_bits=no; break
5213 fi
5214 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5216 /* end confdefs.h. */
5217 #define _FILE_OFFSET_BITS 64
5218 #include <sys/types.h>
5219 /* Check that off_t can represent 2**63 - 1 correctly.
5220 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5221 since some C++ compilers masquerading as C compilers
5222 incorrectly reject 9223372036854775807. */
5223 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5224 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5225 && LARGE_OFF_T % 2147483647 == 1)
5226 ? 1 : -1];
5227 int
5228 main ()
5229 {
5230
5231 ;
5232 return 0;
5233 }
5234 _ACEOF
5235 if ac_fn_c_try_compile "$LINENO"; then :
5236 ac_cv_sys_file_offset_bits=64; break
5237 fi
5238 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5239 ac_cv_sys_file_offset_bits=unknown
5240 break
5241 done
5242 fi
5243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
5244 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
5245 case $ac_cv_sys_file_offset_bits in #(
5246 no | unknown) ;;
5247 *)
5248 cat >>confdefs.h <<_ACEOF
5249 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
5250 _ACEOF
5251 ;;
5252 esac
5253 rm -rf conftest*
5254 if test $ac_cv_sys_file_offset_bits = unknown; then
5255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
5256 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
5257 if test "${ac_cv_sys_large_files+set}" = set; then :
5258 $as_echo_n "(cached) " >&6
5259 else
5260 while :; do
5261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5262 /* end confdefs.h. */
5263 #include <sys/types.h>
5264 /* Check that off_t can represent 2**63 - 1 correctly.
5265 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5266 since some C++ compilers masquerading as C compilers
5267 incorrectly reject 9223372036854775807. */
5268 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5269 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5270 && LARGE_OFF_T % 2147483647 == 1)
5271 ? 1 : -1];
5272 int
5273 main ()
5274 {
5275
5276 ;
5277 return 0;
5278 }
5279 _ACEOF
5280 if ac_fn_c_try_compile "$LINENO"; then :
5281 ac_cv_sys_large_files=no; break
5282 fi
5283 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5285 /* end confdefs.h. */
5286 #define _LARGE_FILES 1
5287 #include <sys/types.h>
5288 /* Check that off_t can represent 2**63 - 1 correctly.
5289 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5290 since some C++ compilers masquerading as C compilers
5291 incorrectly reject 9223372036854775807. */
5292 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5293 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5294 && LARGE_OFF_T % 2147483647 == 1)
5295 ? 1 : -1];
5296 int
5297 main ()
5298 {
5299
5300 ;
5301 return 0;
5302 }
5303 _ACEOF
5304 if ac_fn_c_try_compile "$LINENO"; then :
5305 ac_cv_sys_large_files=1; break
5306 fi
5307 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5308 ac_cv_sys_large_files=unknown
5309 break
5310 done
5311 fi
5312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
5313 $as_echo "$ac_cv_sys_large_files" >&6; }
5314 case $ac_cv_sys_large_files in #(
5315 no | unknown) ;;
5316 *)
5317 cat >>confdefs.h <<_ACEOF
5318 #define _LARGE_FILES $ac_cv_sys_large_files
5319 _ACEOF
5320 ;;
5321 esac
5322 rm -rf conftest*
5323 fi
5324
5325
5326 $as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
5327
5328 fi
5329
5330
5331
5332 # Pre-early section.
5333
5334
5335
5336 # Code from module absolute-header:
5337 # Code from module alloca:
5338 # Code from module alloca-opt:
5339 # Code from module assure:
5340 # Code from module at-internal:
5341 # Code from module canonicalize-lgpl:
5342 # Code from module chdir:
5343 # Code from module chdir-long:
5344 # Code from module cloexec:
5345 # Code from module close:
5346 # Code from module closedir:
5347 # Code from module configmake:
5348 # Code from module d-ino:
5349 # Code from module d-type:
5350 # Code from module dirent:
5351 # Code from module dirfd:
5352 # Code from module dirname-lgpl:
5353 # Code from module dosname:
5354 # Code from module double-slash-root:
5355 # Code from module dup:
5356 # Code from module dup2:
5357 # Code from module environ:
5358 # Code from module errno:
5359 # Code from module error:
5360 # Code from module exitfail:
5361 # Code from module extensions:
5362 # Code from module extern-inline:
5363 # Code from module fchdir:
5364 # Code from module fcntl:
5365 # Code from module fcntl-h:
5366 # Code from module fd-hook:
5367 # Code from module fdopendir:
5368 # Code from module filename:
5369 # Code from module filenamecat-lgpl:
5370 # Code from module flexmember:
5371 # Code from module float:
5372 # Code from module fnmatch:
5373 # Code from module fnmatch-gnu:
5374 # Code from module fpieee:
5375
5376 # Code from module fpucw:
5377 # Code from module frexp:
5378 # Code from module frexpl:
5379 # Code from module fstat:
5380 # Code from module fstatat:
5381 # Code from module getcwd:
5382 # Code from module getcwd-lgpl:
5383 # Code from module getdtablesize:
5384 # Code from module getlogin_r:
5385 # Code from module getprogname:
5386 # Code from module gettext-h:
5387 # Code from module gettimeofday:
5388 # Code from module glob:
5389 # Code from module hard-locale:
5390 # Code from module include_next:
5391 # Code from module intprops:
5392 # Code from module inttypes:
5393 # Code from module inttypes-incomplete:
5394 # Code from module isnand-nolibm:
5395 # Code from module isnanl-nolibm:
5396 # Code from module largefile:
5397
5398 # Code from module limits-h:
5399 # Code from module localcharset:
5400 # Code from module lstat:
5401 # Code from module malloc-posix:
5402 # Code from module malloca:
5403 # Code from module math:
5404 # Code from module mbrtowc:
5405 # Code from module mbsinit:
5406 # Code from module mbsrtowcs:
5407 # Code from module memchr:
5408 # Code from module memmem:
5409 # Code from module memmem-simple:
5410 # Code from module mempcpy:
5411 # Code from module memrchr:
5412 # Code from module msvc-inval:
5413 # Code from module msvc-nothrow:
5414 # Code from module multiarch:
5415 # Code from module nocrash:
5416 # Code from module open:
5417 # Code from module openat:
5418 # Code from module openat-die:
5419 # Code from module openat-h:
5420 # Code from module opendir:
5421 # Code from module pathmax:
5422 # Code from module rawmemchr:
5423 # Code from module readdir:
5424 # Code from module readlink:
5425 # Code from module realloc-posix:
5426 # Code from module rename:
5427 # Code from module rewinddir:
5428 # Code from module rmdir:
5429 # Code from module same-inode:
5430 # Code from module save-cwd:
5431 # Code from module setenv:
5432 # Code from module signal-h:
5433 # Code from module snippet/_Noreturn:
5434 # Code from module snippet/arg-nonnull:
5435 # Code from module snippet/c++defs:
5436 # Code from module snippet/warn-on-use:
5437 # Code from module ssize_t:
5438 # Code from module stat:
5439 # Code from module stdbool:
5440 # Code from module stddef:
5441 # Code from module stdint:
5442 # Code from module stdio:
5443 # Code from module stdlib:
5444 # Code from module strchrnul:
5445 # Code from module strdup-posix:
5446 # Code from module streq:
5447 # Code from module strerror:
5448 # Code from module strerror-override:
5449 # Code from module string:
5450 # Code from module strnlen1:
5451 # Code from module strstr:
5452 # Code from module strstr-simple:
5453 # Code from module strtok_r:
5454 # Code from module sys_stat:
5455 # Code from module sys_time:
5456 # Code from module sys_types:
5457 # Code from module time:
5458 # Code from module unistd:
5459 # Code from module unistd-safer:
5460 # Code from module unsetenv:
5461 # Code from module update-copyright:
5462 # Code from module verify:
5463 # Code from module wchar:
5464 # Code from module wctype-h:
5465
5466 ac_ext=c
5467 ac_cpp='$CPP $CPPFLAGS'
5468 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5469 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5470 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5471 if test -n "$ac_tool_prefix"; then
5472 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
5473 set dummy ${ac_tool_prefix}gcc; ac_word=$2
5474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5475 $as_echo_n "checking for $ac_word... " >&6; }
5476 if test "${ac_cv_prog_CC+set}" = set; then :
5477 $as_echo_n "(cached) " >&6
5478 else
5479 if test -n "$CC"; then
5480 ac_cv_prog_CC="$CC" # Let the user override the test.
5481 else
5482 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5483 for as_dir in $PATH
5484 do
5485 IFS=$as_save_IFS
5486 test -z "$as_dir" && as_dir=.
5487 for ac_exec_ext in '' $ac_executable_extensions; do
5488 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5489 ac_cv_prog_CC="${ac_tool_prefix}gcc"
5490 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5491 break 2
5492 fi
5493 done
5494 done
5495 IFS=$as_save_IFS
5496
5497 fi
5498 fi
5499 CC=$ac_cv_prog_CC
5500 if test -n "$CC"; then
5501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5502 $as_echo "$CC" >&6; }
5503 else
5504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5505 $as_echo "no" >&6; }
5506 fi
5507
5508
5509 fi
5510 if test -z "$ac_cv_prog_CC"; then
5511 ac_ct_CC=$CC
5512 # Extract the first word of "gcc", so it can be a program name with args.
5513 set dummy gcc; ac_word=$2
5514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5515 $as_echo_n "checking for $ac_word... " >&6; }
5516 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
5517 $as_echo_n "(cached) " >&6
5518 else
5519 if test -n "$ac_ct_CC"; then
5520 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5521 else
5522 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5523 for as_dir in $PATH
5524 do
5525 IFS=$as_save_IFS
5526 test -z "$as_dir" && as_dir=.
5527 for ac_exec_ext in '' $ac_executable_extensions; do
5528 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5529 ac_cv_prog_ac_ct_CC="gcc"
5530 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5531 break 2
5532 fi
5533 done
5534 done
5535 IFS=$as_save_IFS
5536
5537 fi
5538 fi
5539 ac_ct_CC=$ac_cv_prog_ac_ct_CC
5540 if test -n "$ac_ct_CC"; then
5541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5542 $as_echo "$ac_ct_CC" >&6; }
5543 else
5544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5545 $as_echo "no" >&6; }
5546 fi
5547
5548 if test "x$ac_ct_CC" = x; then
5549 CC=""
5550 else
5551 case $cross_compiling:$ac_tool_warned in
5552 yes:)
5553 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5554 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5555 ac_tool_warned=yes ;;
5556 esac
5557 CC=$ac_ct_CC
5558 fi
5559 else
5560 CC="$ac_cv_prog_CC"
5561 fi
5562
5563 if test -z "$CC"; then
5564 if test -n "$ac_tool_prefix"; then
5565 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
5566 set dummy ${ac_tool_prefix}cc; ac_word=$2
5567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5568 $as_echo_n "checking for $ac_word... " >&6; }
5569 if test "${ac_cv_prog_CC+set}" = set; then :
5570 $as_echo_n "(cached) " >&6
5571 else
5572 if test -n "$CC"; then
5573 ac_cv_prog_CC="$CC" # Let the user override the test.
5574 else
5575 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5576 for as_dir in $PATH
5577 do
5578 IFS=$as_save_IFS
5579 test -z "$as_dir" && as_dir=.
5580 for ac_exec_ext in '' $ac_executable_extensions; do
5581 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5582 ac_cv_prog_CC="${ac_tool_prefix}cc"
5583 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5584 break 2
5585 fi
5586 done
5587 done
5588 IFS=$as_save_IFS
5589
5590 fi
5591 fi
5592 CC=$ac_cv_prog_CC
5593 if test -n "$CC"; then
5594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5595 $as_echo "$CC" >&6; }
5596 else
5597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5598 $as_echo "no" >&6; }
5599 fi
5600
5601
5602 fi
5603 fi
5604 if test -z "$CC"; then
5605 # Extract the first word of "cc", so it can be a program name with args.
5606 set dummy cc; ac_word=$2
5607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5608 $as_echo_n "checking for $ac_word... " >&6; }
5609 if test "${ac_cv_prog_CC+set}" = set; then :
5610 $as_echo_n "(cached) " >&6
5611 else
5612 if test -n "$CC"; then
5613 ac_cv_prog_CC="$CC" # Let the user override the test.
5614 else
5615 ac_prog_rejected=no
5616 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5617 for as_dir in $PATH
5618 do
5619 IFS=$as_save_IFS
5620 test -z "$as_dir" && as_dir=.
5621 for ac_exec_ext in '' $ac_executable_extensions; do
5622 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5623 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
5624 ac_prog_rejected=yes
5625 continue
5626 fi
5627 ac_cv_prog_CC="cc"
5628 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5629 break 2
5630 fi
5631 done
5632 done
5633 IFS=$as_save_IFS
5634
5635 if test $ac_prog_rejected = yes; then
5636 # We found a bogon in the path, so make sure we never use it.
5637 set dummy $ac_cv_prog_CC
5638 shift
5639 if test $# != 0; then
5640 # We chose a different compiler from the bogus one.
5641 # However, it has the same basename, so the bogon will be chosen
5642 # first if we set CC to just the basename; use the full file name.
5643 shift
5644 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
5645 fi
5646 fi
5647 fi
5648 fi
5649 CC=$ac_cv_prog_CC
5650 if test -n "$CC"; then
5651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5652 $as_echo "$CC" >&6; }
5653 else
5654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5655 $as_echo "no" >&6; }
5656 fi
5657
5658
5659 fi
5660 if test -z "$CC"; then
5661 if test -n "$ac_tool_prefix"; then
5662 for ac_prog in cl.exe
5663 do
5664 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5665 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5667 $as_echo_n "checking for $ac_word... " >&6; }
5668 if test "${ac_cv_prog_CC+set}" = set; then :
5669 $as_echo_n "(cached) " >&6
5670 else
5671 if test -n "$CC"; then
5672 ac_cv_prog_CC="$CC" # Let the user override the test.
5673 else
5674 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5675 for as_dir in $PATH
5676 do
5677 IFS=$as_save_IFS
5678 test -z "$as_dir" && as_dir=.
5679 for ac_exec_ext in '' $ac_executable_extensions; do
5680 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5681 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
5682 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5683 break 2
5684 fi
5685 done
5686 done
5687 IFS=$as_save_IFS
5688
5689 fi
5690 fi
5691 CC=$ac_cv_prog_CC
5692 if test -n "$CC"; then
5693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5694 $as_echo "$CC" >&6; }
5695 else
5696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5697 $as_echo "no" >&6; }
5698 fi
5699
5700
5701 test -n "$CC" && break
5702 done
5703 fi
5704 if test -z "$CC"; then
5705 ac_ct_CC=$CC
5706 for ac_prog in cl.exe
5707 do
5708 # Extract the first word of "$ac_prog", so it can be a program name with args.
5709 set dummy $ac_prog; ac_word=$2
5710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5711 $as_echo_n "checking for $ac_word... " >&6; }
5712 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
5713 $as_echo_n "(cached) " >&6
5714 else
5715 if test -n "$ac_ct_CC"; then
5716 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5717 else
5718 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5719 for as_dir in $PATH
5720 do
5721 IFS=$as_save_IFS
5722 test -z "$as_dir" && as_dir=.
5723 for ac_exec_ext in '' $ac_executable_extensions; do
5724 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5725 ac_cv_prog_ac_ct_CC="$ac_prog"
5726 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5727 break 2
5728 fi
5729 done
5730 done
5731 IFS=$as_save_IFS
5732
5733 fi
5734 fi
5735 ac_ct_CC=$ac_cv_prog_ac_ct_CC
5736 if test -n "$ac_ct_CC"; then
5737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5738 $as_echo "$ac_ct_CC" >&6; }
5739 else
5740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5741 $as_echo "no" >&6; }
5742 fi
5743
5744
5745 test -n "$ac_ct_CC" && break
5746 done
5747
5748 if test "x$ac_ct_CC" = x; then
5749 CC=""
5750 else
5751 case $cross_compiling:$ac_tool_warned in
5752 yes:)
5753 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5754 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5755 ac_tool_warned=yes ;;
5756 esac
5757 CC=$ac_ct_CC
5758 fi
5759 fi
5760
5761 fi
5762
5763
5764 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5765 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5766 as_fn_error "no acceptable C compiler found in \$PATH
5767 See \`config.log' for more details." "$LINENO" 5; }
5768
5769 # Provide some information about the compiler.
5770 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
5771 set X $ac_compile
5772 ac_compiler=$2
5773 for ac_option in --version -v -V -qversion; do
5774 { { ac_try="$ac_compiler $ac_option >&5"
5775 case "(($ac_try" in
5776 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5777 *) ac_try_echo=$ac_try;;
5778 esac
5779 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5780 $as_echo "$ac_try_echo"; } >&5
5781 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
5782 ac_status=$?
5783 if test -s conftest.err; then
5784 sed '10a\
5785 ... rest of stderr output deleted ...
5786 10q' conftest.err >conftest.er1
5787 cat conftest.er1 >&5
5788 rm -f conftest.er1 conftest.err
5789 fi
5790 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5791 test $ac_status = 0; }
5792 done
5793
5794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
5795 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
5796 if test "${ac_cv_c_compiler_gnu+set}" = set; then :
5797 $as_echo_n "(cached) " >&6
5798 else
5799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5800 /* end confdefs.h. */
5801
5802 int
5803 main ()
5804 {
5805 #ifndef __GNUC__
5806 choke me
5807 #endif
5808
5809 ;
5810 return 0;
5811 }
5812 _ACEOF
5813 if ac_fn_c_try_compile "$LINENO"; then :
5814 ac_compiler_gnu=yes
5815 else
5816 ac_compiler_gnu=no
5817 fi
5818 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5819 ac_cv_c_compiler_gnu=$ac_compiler_gnu
5820
5821 fi
5822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
5823 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
5824 if test $ac_compiler_gnu = yes; then
5825 GCC=yes
5826 else
5827 GCC=
5828 fi
5829 ac_test_CFLAGS=${CFLAGS+set}
5830 ac_save_CFLAGS=$CFLAGS
5831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
5832 $as_echo_n "checking whether $CC accepts -g... " >&6; }
5833 if test "${ac_cv_prog_cc_g+set}" = set; then :
5834 $as_echo_n "(cached) " >&6
5835 else
5836 ac_save_c_werror_flag=$ac_c_werror_flag
5837 ac_c_werror_flag=yes
5838 ac_cv_prog_cc_g=no
5839 CFLAGS="-g"
5840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5841 /* end confdefs.h. */
5842
5843 int
5844 main ()
5845 {
5846
5847 ;
5848 return 0;
5849 }
5850 _ACEOF
5851 if ac_fn_c_try_compile "$LINENO"; then :
5852 ac_cv_prog_cc_g=yes
5853 else
5854 CFLAGS=""
5855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5856 /* end confdefs.h. */
5857
5858 int
5859 main ()
5860 {
5861
5862 ;
5863 return 0;
5864 }
5865 _ACEOF
5866 if ac_fn_c_try_compile "$LINENO"; then :
5867
5868 else
5869 ac_c_werror_flag=$ac_save_c_werror_flag
5870 CFLAGS="-g"
5871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5872 /* end confdefs.h. */
5873
5874 int
5875 main ()
5876 {
5877
5878 ;
5879 return 0;
5880 }
5881 _ACEOF
5882 if ac_fn_c_try_compile "$LINENO"; then :
5883 ac_cv_prog_cc_g=yes
5884 fi
5885 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5886 fi
5887 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5888 fi
5889 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5890 ac_c_werror_flag=$ac_save_c_werror_flag
5891 fi
5892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5893 $as_echo "$ac_cv_prog_cc_g" >&6; }
5894 if test "$ac_test_CFLAGS" = set; then
5895 CFLAGS=$ac_save_CFLAGS
5896 elif test $ac_cv_prog_cc_g = yes; then
5897 if test "$GCC" = yes; then
5898 CFLAGS="-g -O2"
5899 else
5900 CFLAGS="-g"
5901 fi
5902 else
5903 if test "$GCC" = yes; then
5904 CFLAGS="-O2"
5905 else
5906 CFLAGS=
5907 fi
5908 fi
5909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5910 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
5911 if test "${ac_cv_prog_cc_c89+set}" = set; then :
5912 $as_echo_n "(cached) " >&6
5913 else
5914 ac_cv_prog_cc_c89=no
5915 ac_save_CC=$CC
5916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5917 /* end confdefs.h. */
5918 #include <stdarg.h>
5919 #include <stdio.h>
5920 #include <sys/types.h>
5921 #include <sys/stat.h>
5922 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
5923 struct buf { int x; };
5924 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5925 static char *e (p, i)
5926 char **p;
5927 int i;
5928 {
5929 return p[i];
5930 }
5931 static char *f (char * (*g) (char **, int), char **p, ...)
5932 {
5933 char *s;
5934 va_list v;
5935 va_start (v,p);
5936 s = g (p, va_arg (v,int));
5937 va_end (v);
5938 return s;
5939 }
5940
5941 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
5942 function prototypes and stuff, but not '\xHH' hex character constants.
5943 These don't provoke an error unfortunately, instead are silently treated
5944 as 'x'. The following induces an error, until -std is added to get
5945 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
5946 array size at least. It's necessary to write '\x00'==0 to get something
5947 that's true only with -std. */
5948 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5949
5950 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5951 inside strings and character constants. */
5952 #define FOO(x) 'x'
5953 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5954
5955 int test (int i, double x);
5956 struct s1 {int (*f) (int a);};
5957 struct s2 {int (*f) (double a);};
5958 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5959 int argc;
5960 char **argv;
5961 int
5962 main ()
5963 {
5964 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5965 ;
5966 return 0;
5967 }
5968 _ACEOF
5969 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5970 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5971 do
5972 CC="$ac_save_CC $ac_arg"
5973 if ac_fn_c_try_compile "$LINENO"; then :
5974 ac_cv_prog_cc_c89=$ac_arg
5975 fi
5976 rm -f core conftest.err conftest.$ac_objext
5977 test "x$ac_cv_prog_cc_c89" != "xno" && break
5978 done
5979 rm -f conftest.$ac_ext
5980 CC=$ac_save_CC
5981
5982 fi
5983 # AC_CACHE_VAL
5984 case "x$ac_cv_prog_cc_c89" in
5985 x)
5986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5987 $as_echo "none needed" >&6; } ;;
5988 xno)
5989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5990 $as_echo "unsupported" >&6; } ;;
5991 *)
5992 CC="$CC $ac_cv_prog_cc_c89"
5993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5994 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5995 esac
5996 if test "x$ac_cv_prog_cc_c89" != xno; then :
5997
5998 fi
5999
6000 ac_ext=c
6001 ac_cpp='$CPP $CPPFLAGS'
6002 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6003 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6004 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6005
6006
6007 am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
6008
6009
6010 ac_aux_dir=
6011 for ac_dir in ../.. "$srcdir"/../..; do
6012 for ac_t in install-sh install.sh shtool; do
6013 if test -f "$ac_dir/$ac_t"; then
6014 ac_aux_dir=$ac_dir
6015 ac_install_sh="$ac_aux_dir/$ac_t -c"
6016 break 2
6017 fi
6018 done
6019 done
6020 if test -z "$ac_aux_dir"; then
6021 as_fn_error "cannot find install-sh, install.sh, or shtool in ../.. \"$srcdir\"/../.." "$LINENO" 5
6022 fi
6023
6024 # These three variables are undocumented and unsupported,
6025 # and are intended to be withdrawn in a future Autoconf release.
6026 # They can cause serious problems if a builder's source tree is in a directory
6027 # whose full name contains unusual characters.
6028 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
6029 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
6030 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
6031
6032
6033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6034 $as_echo_n "checking target system type... " >&6; }
6035 if test "${ac_cv_target+set}" = set; then :
6036 $as_echo_n "(cached) " >&6
6037 else
6038 if test "x$target_alias" = x; then
6039 ac_cv_target=$ac_cv_host
6040 else
6041 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6042 as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6043 fi
6044
6045 fi
6046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6047 $as_echo "$ac_cv_target" >&6; }
6048 case $ac_cv_target in
6049 *-*-*) ;;
6050 *) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
6051 esac
6052 target=$ac_cv_target
6053 ac_save_IFS=$IFS; IFS='-'
6054 set x $ac_cv_target
6055 shift
6056 target_cpu=$1
6057 target_vendor=$2
6058 shift; shift
6059 # Remember, the first character of IFS is used to create $*,
6060 # except with old shells:
6061 target_os=$*
6062 IFS=$ac_save_IFS
6063 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6064
6065
6066 # The aliases save the names the user supplied, while $host etc.
6067 # will get canonicalized.
6068 test -n "$target_alias" &&
6069 test "$program_prefix$program_suffix$program_transform_name" = \
6070 NONENONEs,x,x, &&
6071 program_prefix=${target_alias}-
6072
6073
6074
6075
6076
6077
6078
6079 LIBC_FATAL_STDERR_=1
6080 export LIBC_FATAL_STDERR_
6081
6082 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6083 # for constant arguments. Useless!
6084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
6085 $as_echo_n "checking for working alloca.h... " >&6; }
6086 if test "${ac_cv_working_alloca_h+set}" = set; then :
6087 $as_echo_n "(cached) " >&6
6088 else
6089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6090 /* end confdefs.h. */
6091 #include <alloca.h>
6092 int
6093 main ()
6094 {
6095 char *p = (char *) alloca (2 * sizeof (int));
6096 if (p) return 0;
6097 ;
6098 return 0;
6099 }
6100 _ACEOF
6101 if ac_fn_c_try_link "$LINENO"; then :
6102 ac_cv_working_alloca_h=yes
6103 else
6104 ac_cv_working_alloca_h=no
6105 fi
6106 rm -f core conftest.err conftest.$ac_objext \
6107 conftest$ac_exeext conftest.$ac_ext
6108 fi
6109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
6110 $as_echo "$ac_cv_working_alloca_h" >&6; }
6111 if test $ac_cv_working_alloca_h = yes; then
6112
6113 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
6114
6115 fi
6116
6117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
6118 $as_echo_n "checking for alloca... " >&6; }
6119 if test "${ac_cv_func_alloca_works+set}" = set; then :
6120 $as_echo_n "(cached) " >&6
6121 else
6122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6123 /* end confdefs.h. */
6124 #ifdef __GNUC__
6125 # define alloca __builtin_alloca
6126 #else
6127 # ifdef _MSC_VER
6128 # include <malloc.h>
6129 # define alloca _alloca
6130 # else
6131 # ifdef HAVE_ALLOCA_H
6132 # include <alloca.h>
6133 # else
6134 # ifdef _AIX
6135 #pragma alloca
6136 # else
6137 # ifndef alloca /* predefined by HP cc +Olibcalls */
6138 char *alloca ();
6139 # endif
6140 # endif
6141 # endif
6142 # endif
6143 #endif
6144
6145 int
6146 main ()
6147 {
6148 char *p = (char *) alloca (1);
6149 if (p) return 0;
6150 ;
6151 return 0;
6152 }
6153 _ACEOF
6154 if ac_fn_c_try_link "$LINENO"; then :
6155 ac_cv_func_alloca_works=yes
6156 else
6157 ac_cv_func_alloca_works=no
6158 fi
6159 rm -f core conftest.err conftest.$ac_objext \
6160 conftest$ac_exeext conftest.$ac_ext
6161 fi
6162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
6163 $as_echo "$ac_cv_func_alloca_works" >&6; }
6164
6165 if test $ac_cv_func_alloca_works = yes; then
6166
6167 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
6168
6169 else
6170 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6171 # that cause trouble. Some versions do not even contain alloca or
6172 # contain a buggy version. If you still want to use their alloca,
6173 # use ar to extract alloca.o from them instead of compiling alloca.c.
6174
6175
6176
6177
6178
6179 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
6180
6181 $as_echo "#define C_ALLOCA 1" >>confdefs.h
6182
6183
6184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether 'alloca.c' needs Cray hooks" >&5
6185 $as_echo_n "checking whether 'alloca.c' needs Cray hooks... " >&6; }
6186 if test "${ac_cv_os_cray+set}" = set; then :
6187 $as_echo_n "(cached) " >&6
6188 else
6189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6190 /* end confdefs.h. */
6191 #if defined CRAY && ! defined CRAY2
6192 webecray
6193 #else
6194 wenotbecray
6195 #endif
6196
6197 _ACEOF
6198 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6199 $EGREP "webecray" >/dev/null 2>&1; then :
6200 ac_cv_os_cray=yes
6201 else
6202 ac_cv_os_cray=no
6203 fi
6204 rm -f conftest*
6205
6206 fi
6207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
6208 $as_echo "$ac_cv_os_cray" >&6; }
6209 if test $ac_cv_os_cray = yes; then
6210 for ac_func in _getb67 GETB67 getb67; do
6211 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6212 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6213 eval as_val=\$$as_ac_var
6214 if test "x$as_val" = x""yes; then :
6215
6216 cat >>confdefs.h <<_ACEOF
6217 #define CRAY_STACKSEG_END $ac_func
6218 _ACEOF
6219
6220 break
6221 fi
6222
6223 done
6224 fi
6225
6226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
6227 $as_echo_n "checking stack direction for C alloca... " >&6; }
6228 if test "${ac_cv_c_stack_direction+set}" = set; then :
6229 $as_echo_n "(cached) " >&6
6230 else
6231 if test "$cross_compiling" = yes; then :
6232 ac_cv_c_stack_direction=0
6233 else
6234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6235 /* end confdefs.h. */
6236 $ac_includes_default
6237 int
6238 find_stack_direction (int *addr, int depth)
6239 {
6240 int dir, dummy = 0;
6241 if (! addr)
6242 addr = &dummy;
6243 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
6244 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
6245 return dir + dummy;
6246 }
6247
6248 int
6249 main (int argc, char **argv)
6250 {
6251 return find_stack_direction (0, argc + !argv + 20) < 0;
6252 }
6253 _ACEOF
6254 if ac_fn_c_try_run "$LINENO"; then :
6255 ac_cv_c_stack_direction=1
6256 else
6257 ac_cv_c_stack_direction=-1
6258 fi
6259 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6260 conftest.$ac_objext conftest.beam conftest.$ac_ext
6261 fi
6262
6263 fi
6264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
6265 $as_echo "$ac_cv_c_stack_direction" >&6; }
6266 cat >>confdefs.h <<_ACEOF
6267 #define STACK_DIRECTION $ac_cv_c_stack_direction
6268 _ACEOF
6269
6270
6271 fi
6272
6273
6274 GNULIB__EXIT=0;
6275 GNULIB_ATOLL=0;
6276 GNULIB_CALLOC_POSIX=0;
6277 GNULIB_CANONICALIZE_FILE_NAME=0;
6278 GNULIB_GETLOADAVG=0;
6279 GNULIB_GETSUBOPT=0;
6280 GNULIB_GRANTPT=0;
6281 GNULIB_MALLOC_POSIX=0;
6282 GNULIB_MBTOWC=0;
6283 GNULIB_MKDTEMP=0;
6284 GNULIB_MKOSTEMP=0;
6285 GNULIB_MKOSTEMPS=0;
6286 GNULIB_MKSTEMP=0;
6287 GNULIB_MKSTEMPS=0;
6288 GNULIB_POSIX_OPENPT=0;
6289 GNULIB_PTSNAME=0;
6290 GNULIB_PTSNAME_R=0;
6291 GNULIB_PUTENV=0;
6292 GNULIB_QSORT_R=0;
6293 GNULIB_RANDOM=0;
6294 GNULIB_RANDOM_R=0;
6295 GNULIB_REALLOC_POSIX=0;
6296 GNULIB_REALPATH=0;
6297 GNULIB_RPMATCH=0;
6298 GNULIB_SECURE_GETENV=0;
6299 GNULIB_SETENV=0;
6300 GNULIB_STRTOD=0;
6301 GNULIB_STRTOLL=0;
6302 GNULIB_STRTOULL=0;
6303 GNULIB_SYSTEM_POSIX=0;
6304 GNULIB_UNLOCKPT=0;
6305 GNULIB_UNSETENV=0;
6306 GNULIB_WCTOMB=0;
6307 HAVE__EXIT=1;
6308 HAVE_ATOLL=1;
6309 HAVE_CANONICALIZE_FILE_NAME=1;
6310 HAVE_DECL_GETLOADAVG=1;
6311 HAVE_GETSUBOPT=1;
6312 HAVE_GRANTPT=1;
6313 HAVE_MKDTEMP=1;
6314 HAVE_MKOSTEMP=1;
6315 HAVE_MKOSTEMPS=1;
6316 HAVE_MKSTEMP=1;
6317 HAVE_MKSTEMPS=1;
6318 HAVE_POSIX_OPENPT=1;
6319 HAVE_PTSNAME=1;
6320 HAVE_PTSNAME_R=1;
6321 HAVE_QSORT_R=1;
6322 HAVE_RANDOM=1;
6323 HAVE_RANDOM_H=1;
6324 HAVE_RANDOM_R=1;
6325 HAVE_REALPATH=1;
6326 HAVE_RPMATCH=1;
6327 HAVE_SECURE_GETENV=1;
6328 HAVE_SETENV=1;
6329 HAVE_DECL_SETENV=1;
6330 HAVE_STRTOD=1;
6331 HAVE_STRTOLL=1;
6332 HAVE_STRTOULL=1;
6333 HAVE_STRUCT_RANDOM_DATA=1;
6334 HAVE_SYS_LOADAVG_H=0;
6335 HAVE_UNLOCKPT=1;
6336 HAVE_DECL_UNSETENV=1;
6337 REPLACE_CALLOC=0;
6338 REPLACE_CANONICALIZE_FILE_NAME=0;
6339 REPLACE_MALLOC=0;
6340 REPLACE_MBTOWC=0;
6341 REPLACE_MKSTEMP=0;
6342 REPLACE_PTSNAME=0;
6343 REPLACE_PTSNAME_R=0;
6344 REPLACE_PUTENV=0;
6345 REPLACE_QSORT_R=0;
6346 REPLACE_RANDOM_R=0;
6347 REPLACE_REALLOC=0;
6348 REPLACE_REALPATH=0;
6349 REPLACE_SETENV=0;
6350 REPLACE_STRTOD=0;
6351 REPLACE_UNSETENV=0;
6352 REPLACE_WCTOMB=0;
6353
6354
6355
6356
6357 for ac_func in $ac_func_list
6358 do :
6359 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6360 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6361 eval as_val=\$$as_ac_var
6362 if test "x$as_val" = x""yes; then :
6363 cat >>confdefs.h <<_ACEOF
6364 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6365 _ACEOF
6366
6367 fi
6368 done
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
6379 $as_echo_n "checking whether // is distinct from /... " >&6; }
6380 if test "${gl_cv_double_slash_root+set}" = set; then :
6381 $as_echo_n "(cached) " >&6
6382 else
6383 if test x"$cross_compiling" = xyes ; then
6384 # When cross-compiling, there is no way to tell whether // is special
6385 # short of a list of hosts. However, the only known hosts to date
6386 # that have a distinct // are Apollo DomainOS (too old to port to),
6387 # Cygwin, and z/OS. If anyone knows of another system for which // has
6388 # special semantics and is distinct from /, please report it to
6389 # <bug-gnulib@gnu.org>.
6390 case $host in
6391 *-cygwin | i370-ibm-openedition)
6392 gl_cv_double_slash_root=yes ;;
6393 *)
6394 # Be optimistic and assume that / and // are the same when we
6395 # don't know.
6396 gl_cv_double_slash_root='unknown, assuming no' ;;
6397 esac
6398 else
6399 set x `ls -di / // 2>/dev/null`
6400 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
6401 gl_cv_double_slash_root=no
6402 else
6403 gl_cv_double_slash_root=yes
6404 fi
6405 fi
6406 fi
6407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
6408 $as_echo "$gl_cv_double_slash_root" >&6; }
6409 if test "$gl_cv_double_slash_root" = yes; then
6410
6411 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
6412
6413 fi
6414
6415
6416
6417
6418
6419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
6420 $as_echo_n "checking whether realpath works... " >&6; }
6421 if test "${gl_cv_func_realpath_works+set}" = set; then :
6422 $as_echo_n "(cached) " >&6
6423 else
6424
6425 touch conftest.a
6426 mkdir conftest.d
6427 if test "$cross_compiling" = yes; then :
6428 case "$host_os" in
6429 # Guess yes on glibc systems.
6430 *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
6431 # If we don't know, assume the worst.
6432 *) gl_cv_func_realpath_works="guessing no" ;;
6433 esac
6434
6435 else
6436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6437 /* end confdefs.h. */
6438
6439
6440
6441 #include <stdlib.h>
6442 #if defined __MACH__ && defined __APPLE__
6443 /* Avoid a crash on Mac OS X. */
6444 #include <mach/mach.h>
6445 #include <mach/mach_error.h>
6446 #include <mach/thread_status.h>
6447 #include <mach/exception.h>
6448 #include <mach/task.h>
6449 #include <pthread.h>
6450 /* The exception port on which our thread listens. */
6451 static mach_port_t our_exception_port;
6452 /* The main function of the thread listening for exceptions of type
6453 EXC_BAD_ACCESS. */
6454 static void *
6455 mach_exception_thread (void *arg)
6456 {
6457 /* Buffer for a message to be received. */
6458 struct {
6459 mach_msg_header_t head;
6460 mach_msg_body_t msgh_body;
6461 char data[1024];
6462 } msg;
6463 mach_msg_return_t retval;
6464 /* Wait for a message on the exception port. */
6465 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
6466 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
6467 if (retval != MACH_MSG_SUCCESS)
6468 abort ();
6469 exit (1);
6470 }
6471 static void
6472 nocrash_init (void)
6473 {
6474 mach_port_t self = mach_task_self ();
6475 /* Allocate a port on which the thread shall listen for exceptions. */
6476 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
6477 == KERN_SUCCESS) {
6478 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
6479 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
6480 MACH_MSG_TYPE_MAKE_SEND)
6481 == KERN_SUCCESS) {
6482 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
6483 for us. */
6484 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
6485 /* Create the thread listening on the exception port. */
6486 pthread_attr_t attr;
6487 pthread_t thread;
6488 if (pthread_attr_init (&attr) == 0
6489 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
6490 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
6491 pthread_attr_destroy (&attr);
6492 /* Replace the exception port info for these exceptions with our own.
6493 Note that we replace the exception port for the entire task, not only
6494 for a particular thread. This has the effect that when our exception
6495 port gets the message, the thread specific exception port has already
6496 been asked, and we don't need to bother about it.
6497 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
6498 task_set_exception_ports (self, mask, our_exception_port,
6499 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
6500 }
6501 }
6502 }
6503 }
6504 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
6505 /* Avoid a crash on native Windows. */
6506 #define WIN32_LEAN_AND_MEAN
6507 #include <windows.h>
6508 #include <winerror.h>
6509 static LONG WINAPI
6510 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
6511 {
6512 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
6513 {
6514 case EXCEPTION_ACCESS_VIOLATION:
6515 case EXCEPTION_IN_PAGE_ERROR:
6516 case EXCEPTION_STACK_OVERFLOW:
6517 case EXCEPTION_GUARD_PAGE:
6518 case EXCEPTION_PRIV_INSTRUCTION:
6519 case EXCEPTION_ILLEGAL_INSTRUCTION:
6520 case EXCEPTION_DATATYPE_MISALIGNMENT:
6521 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
6522 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
6523 exit (1);
6524 }
6525 return EXCEPTION_CONTINUE_SEARCH;
6526 }
6527 static void
6528 nocrash_init (void)
6529 {
6530 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
6531 }
6532 #else
6533 /* Avoid a crash on POSIX systems. */
6534 #include <signal.h>
6535 #include <unistd.h>
6536 /* A POSIX signal handler. */
6537 static void
6538 exception_handler (int sig)
6539 {
6540 _exit (1);
6541 }
6542 static void
6543 nocrash_init (void)
6544 {
6545 #ifdef SIGSEGV
6546 signal (SIGSEGV, exception_handler);
6547 #endif
6548 #ifdef SIGBUS
6549 signal (SIGBUS, exception_handler);
6550 #endif
6551 }
6552 #endif
6553
6554 #include <stdlib.h>
6555 #include <string.h>
6556
6557 int
6558 main ()
6559 {
6560
6561 int result = 0;
6562 {
6563 char *name = realpath ("conftest.a", NULL);
6564 if (!(name && *name == '/'))
6565 result |= 1;
6566 free (name);
6567 }
6568 {
6569 char *name = realpath ("conftest.b/../conftest.a", NULL);
6570 if (name != NULL)
6571 result |= 2;
6572 free (name);
6573 }
6574 {
6575 char *name = realpath ("conftest.a/", NULL);
6576 if (name != NULL)
6577 result |= 4;
6578 free (name);
6579 }
6580 {
6581 char *name1 = realpath (".", NULL);
6582 char *name2 = realpath ("conftest.d//./..", NULL);
6583 if (! name1 || ! name2 || strcmp (name1, name2))
6584 result |= 8;
6585 free (name1);
6586 free (name2);
6587 }
6588 return result;
6589
6590 ;
6591 return 0;
6592 }
6593
6594 _ACEOF
6595 if ac_fn_c_try_run "$LINENO"; then :
6596 gl_cv_func_realpath_works=yes
6597 else
6598 gl_cv_func_realpath_works=no
6599 fi
6600 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6601 conftest.$ac_objext conftest.beam conftest.$ac_ext
6602 fi
6603
6604 rm -rf conftest.a conftest.d
6605
6606 fi
6607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
6608 $as_echo "$gl_cv_func_realpath_works" >&6; }
6609 case "$gl_cv_func_realpath_works" in
6610 *yes)
6611
6612 $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
6613
6614 ;;
6615 esac
6616
6617
6618
6619
6620 for ac_header in $ac_header_list
6621 do :
6622 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6623 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6624 "
6625 eval as_val=\$$as_ac_Header
6626 if test "x$as_val" = x""yes; then :
6627 cat >>confdefs.h <<_ACEOF
6628 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6629 _ACEOF
6630
6631 fi
6632
6633 done
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645 GNULIB_CHDIR=0;
6646 GNULIB_CHOWN=0;
6647 GNULIB_CLOSE=0;
6648 GNULIB_DUP=0;
6649 GNULIB_DUP2=0;
6650 GNULIB_DUP3=0;
6651 GNULIB_ENVIRON=0;
6652 GNULIB_EUIDACCESS=0;
6653 GNULIB_FACCESSAT=0;
6654 GNULIB_FCHDIR=0;
6655 GNULIB_FCHOWNAT=0;
6656 GNULIB_FDATASYNC=0;
6657 GNULIB_FSYNC=0;
6658 GNULIB_FTRUNCATE=0;
6659 GNULIB_GETCWD=0;
6660 GNULIB_GETDOMAINNAME=0;
6661 GNULIB_GETDTABLESIZE=0;
6662 GNULIB_GETGROUPS=0;
6663 GNULIB_GETHOSTNAME=0;
6664 GNULIB_GETLOGIN=0;
6665 GNULIB_GETLOGIN_R=0;
6666 GNULIB_GETPAGESIZE=0;
6667 GNULIB_GETUSERSHELL=0;
6668 GNULIB_GROUP_MEMBER=0;
6669 GNULIB_ISATTY=0;
6670 GNULIB_LCHOWN=0;
6671 GNULIB_LINK=0;
6672 GNULIB_LINKAT=0;
6673 GNULIB_LSEEK=0;
6674 GNULIB_PIPE=0;
6675 GNULIB_PIPE2=0;
6676 GNULIB_PREAD=0;
6677 GNULIB_PWRITE=0;
6678 GNULIB_READ=0;
6679 GNULIB_READLINK=0;
6680 GNULIB_READLINKAT=0;
6681 GNULIB_RMDIR=0;
6682 GNULIB_SETHOSTNAME=0;
6683 GNULIB_SLEEP=0;
6684 GNULIB_SYMLINK=0;
6685 GNULIB_SYMLINKAT=0;
6686 GNULIB_TTYNAME_R=0;
6687 GNULIB_UNISTD_H_NONBLOCKING=0;
6688 GNULIB_UNISTD_H_SIGPIPE=0;
6689 GNULIB_UNLINK=0;
6690 GNULIB_UNLINKAT=0;
6691 GNULIB_USLEEP=0;
6692 GNULIB_WRITE=0;
6693 HAVE_CHOWN=1;
6694 HAVE_DUP2=1;
6695 HAVE_DUP3=1;
6696 HAVE_EUIDACCESS=1;
6697 HAVE_FACCESSAT=1;
6698 HAVE_FCHDIR=1;
6699 HAVE_FCHOWNAT=1;
6700 HAVE_FDATASYNC=1;
6701 HAVE_FSYNC=1;
6702 HAVE_FTRUNCATE=1;
6703 HAVE_GETDTABLESIZE=1;
6704 HAVE_GETGROUPS=1;
6705 HAVE_GETHOSTNAME=1;
6706 HAVE_GETLOGIN=1;
6707 HAVE_GETPAGESIZE=1;
6708 HAVE_GROUP_MEMBER=1;
6709 HAVE_LCHOWN=1;
6710 HAVE_LINK=1;
6711 HAVE_LINKAT=1;
6712 HAVE_PIPE=1;
6713 HAVE_PIPE2=1;
6714 HAVE_PREAD=1;
6715 HAVE_PWRITE=1;
6716 HAVE_READLINK=1;
6717 HAVE_READLINKAT=1;
6718 HAVE_SETHOSTNAME=1;
6719 HAVE_SLEEP=1;
6720 HAVE_SYMLINK=1;
6721 HAVE_SYMLINKAT=1;
6722 HAVE_UNLINKAT=1;
6723 HAVE_USLEEP=1;
6724 HAVE_DECL_ENVIRON=1;
6725 HAVE_DECL_FCHDIR=1;
6726 HAVE_DECL_FDATASYNC=1;
6727 HAVE_DECL_GETDOMAINNAME=1;
6728 HAVE_DECL_GETLOGIN_R=1;
6729 HAVE_DECL_GETPAGESIZE=1;
6730 HAVE_DECL_GETUSERSHELL=1;
6731 HAVE_DECL_SETHOSTNAME=1;
6732 HAVE_DECL_TTYNAME_R=1;
6733 HAVE_OS_H=0;
6734 HAVE_SYS_PARAM_H=0;
6735 REPLACE_CHOWN=0;
6736 REPLACE_CLOSE=0;
6737 REPLACE_DUP=0;
6738 REPLACE_DUP2=0;
6739 REPLACE_FCHOWNAT=0;
6740 REPLACE_FTRUNCATE=0;
6741 REPLACE_GETCWD=0;
6742 REPLACE_GETDOMAINNAME=0;
6743 REPLACE_GETDTABLESIZE=0;
6744 REPLACE_GETLOGIN_R=0;
6745 REPLACE_GETGROUPS=0;
6746 REPLACE_GETPAGESIZE=0;
6747 REPLACE_ISATTY=0;
6748 REPLACE_LCHOWN=0;
6749 REPLACE_LINK=0;
6750 REPLACE_LINKAT=0;
6751 REPLACE_LSEEK=0;
6752 REPLACE_PREAD=0;
6753 REPLACE_PWRITE=0;
6754 REPLACE_READ=0;
6755 REPLACE_READLINK=0;
6756 REPLACE_READLINKAT=0;
6757 REPLACE_RMDIR=0;
6758 REPLACE_SLEEP=0;
6759 REPLACE_SYMLINK=0;
6760 REPLACE_SYMLINKAT=0;
6761 REPLACE_TTYNAME_R=0;
6762 REPLACE_UNLINK=0;
6763 REPLACE_UNLINKAT=0;
6764 REPLACE_USLEEP=0;
6765 REPLACE_WRITE=0;
6766 UNISTD_H_HAVE_WINSOCK2_H=0;
6767 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779 if test $ac_cv_func__set_invalid_parameter_handler = yes; then
6780 HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
6781
6782 $as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
6783
6784 else
6785 HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
6786 fi
6787
6788
6789
6790
6791
6792
6793
6794 GNULIB_OPENDIR=0;
6795 GNULIB_READDIR=0;
6796 GNULIB_REWINDDIR=0;
6797 GNULIB_CLOSEDIR=0;
6798 GNULIB_DIRFD=0;
6799 GNULIB_FDOPENDIR=0;
6800 GNULIB_SCANDIR=0;
6801 GNULIB_ALPHASORT=0;
6802 HAVE_OPENDIR=1;
6803 HAVE_READDIR=1;
6804 HAVE_REWINDDIR=1;
6805 HAVE_CLOSEDIR=1;
6806 HAVE_DECL_DIRFD=1;
6807 HAVE_DECL_FDOPENDIR=1;
6808 HAVE_FDOPENDIR=1;
6809 HAVE_SCANDIR=1;
6810 HAVE_ALPHASORT=1;
6811 REPLACE_OPENDIR=0;
6812 REPLACE_CLOSEDIR=0;
6813 REPLACE_DIRFD=0;
6814 REPLACE_FDOPENDIR=0;
6815
6816
6817
6818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
6819 $as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
6820 if test "${gl_cv_have_include_next+set}" = set; then :
6821 $as_echo_n "(cached) " >&6
6822 else
6823 rm -rf conftestd1a conftestd1b conftestd2
6824 mkdir conftestd1a conftestd1b conftestd2
6825 cat <<EOF > conftestd1a/conftest.h
6826 #define DEFINED_IN_CONFTESTD1
6827 #include_next <conftest.h>
6828 #ifdef DEFINED_IN_CONFTESTD2
6829 int foo;
6830 #else
6831 #error "include_next doesn't work"
6832 #endif
6833 EOF
6834 cat <<EOF > conftestd1b/conftest.h
6835 #define DEFINED_IN_CONFTESTD1
6836 #include <stdio.h>
6837 #include_next <conftest.h>
6838 #ifdef DEFINED_IN_CONFTESTD2
6839 int foo;
6840 #else
6841 #error "include_next doesn't work"
6842 #endif
6843 EOF
6844 cat <<EOF > conftestd2/conftest.h
6845 #ifndef DEFINED_IN_CONFTESTD1
6846 #error "include_next test doesn't work"
6847 #endif
6848 #define DEFINED_IN_CONFTESTD2
6849 EOF
6850 gl_save_CPPFLAGS="$CPPFLAGS"
6851 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
6852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6853 /* end confdefs.h. */
6854 #include <conftest.h>
6855 _ACEOF
6856 if ac_fn_c_try_compile "$LINENO"; then :
6857 gl_cv_have_include_next=yes
6858 else
6859 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
6860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6861 /* end confdefs.h. */
6862 #include <conftest.h>
6863 _ACEOF
6864 if ac_fn_c_try_compile "$LINENO"; then :
6865 gl_cv_have_include_next=buggy
6866 else
6867 gl_cv_have_include_next=no
6868 fi
6869 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6870
6871 fi
6872 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6873 CPPFLAGS="$gl_save_CPPFLAGS"
6874 rm -rf conftestd1a conftestd1b conftestd2
6875
6876 fi
6877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
6878 $as_echo "$gl_cv_have_include_next" >&6; }
6879 PRAGMA_SYSTEM_HEADER=
6880 if test $gl_cv_have_include_next = yes; then
6881 INCLUDE_NEXT=include_next
6882 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
6883 if test -n "$GCC"; then
6884 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
6885 fi
6886 else
6887 if test $gl_cv_have_include_next = buggy; then
6888 INCLUDE_NEXT=include
6889 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
6890 else
6891 INCLUDE_NEXT=include
6892 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
6893 fi
6894 fi
6895
6896
6897
6898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
6899 $as_echo_n "checking whether system header files limit the line length... " >&6; }
6900 if test "${gl_cv_pragma_columns+set}" = set; then :
6901 $as_echo_n "(cached) " >&6
6902 else
6903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6904 /* end confdefs.h. */
6905
6906 #ifdef __TANDEM
6907 choke me
6908 #endif
6909
6910 _ACEOF
6911 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6912 $EGREP "choke me" >/dev/null 2>&1; then :
6913 gl_cv_pragma_columns=yes
6914 else
6915 gl_cv_pragma_columns=no
6916 fi
6917 rm -f conftest*
6918
6919
6920 fi
6921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
6922 $as_echo "$gl_cv_pragma_columns" >&6; }
6923 if test $gl_cv_pragma_columns = yes; then
6924 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
6925 else
6926 PRAGMA_COLUMNS=
6927 fi
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
6940 $as_echo_n "checking if environ is properly declared... " >&6; }
6941 if test "${gt_cv_var_environ_declaration+set}" = set; then :
6942 $as_echo_n "(cached) " >&6
6943 else
6944
6945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6946 /* end confdefs.h. */
6947 #if HAVE_UNISTD_H
6948 #include <unistd.h>
6949 #endif
6950 /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
6951 #include <stdlib.h>
6952
6953 extern struct { int foo; } environ;
6954 int
6955 main ()
6956 {
6957 environ.foo = 1;
6958 ;
6959 return 0;
6960 }
6961 _ACEOF
6962 if ac_fn_c_try_compile "$LINENO"; then :
6963 gt_cv_var_environ_declaration=no
6964 else
6965 gt_cv_var_environ_declaration=yes
6966 fi
6967 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6968 fi
6969
6970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
6971 $as_echo "$gt_cv_var_environ_declaration" >&6; }
6972 if test $gt_cv_var_environ_declaration = yes; then
6973
6974 $as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
6975
6976 fi
6977
6978
6979 if test $gt_cv_var_environ_declaration != yes; then
6980 HAVE_DECL_ENVIRON=0
6981 fi
6982
6983
6984
6985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
6986 $as_echo_n "checking for complete errno.h... " >&6; }
6987 if test "${gl_cv_header_errno_h_complete+set}" = set; then :
6988 $as_echo_n "(cached) " >&6
6989 else
6990
6991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6992 /* end confdefs.h. */
6993
6994 #include <errno.h>
6995 #if !defined ETXTBSY
6996 booboo
6997 #endif
6998 #if !defined ENOMSG
6999 booboo
7000 #endif
7001 #if !defined EIDRM
7002 booboo
7003 #endif
7004 #if !defined ENOLINK
7005 booboo
7006 #endif
7007 #if !defined EPROTO
7008 booboo
7009 #endif
7010 #if !defined EMULTIHOP
7011 booboo
7012 #endif
7013 #if !defined EBADMSG
7014 booboo
7015 #endif
7016 #if !defined EOVERFLOW
7017 booboo
7018 #endif
7019 #if !defined ENOTSUP
7020 booboo
7021 #endif
7022 #if !defined ENETRESET
7023 booboo
7024 #endif
7025 #if !defined ECONNABORTED
7026 booboo
7027 #endif
7028 #if !defined ESTALE
7029 booboo
7030 #endif
7031 #if !defined EDQUOT
7032 booboo
7033 #endif
7034 #if !defined ECANCELED
7035 booboo
7036 #endif
7037 #if !defined EOWNERDEAD
7038 booboo
7039 #endif
7040 #if !defined ENOTRECOVERABLE
7041 booboo
7042 #endif
7043 #if !defined EILSEQ
7044 booboo
7045 #endif
7046
7047 _ACEOF
7048 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7049 $EGREP "booboo" >/dev/null 2>&1; then :
7050 gl_cv_header_errno_h_complete=no
7051 else
7052 gl_cv_header_errno_h_complete=yes
7053 fi
7054 rm -f conftest*
7055
7056
7057 fi
7058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
7059 $as_echo "$gl_cv_header_errno_h_complete" >&6; }
7060 if test $gl_cv_header_errno_h_complete = yes; then
7061 ERRNO_H=''
7062 else
7063
7064
7065
7066
7067
7068
7069
7070
7071 if test $gl_cv_have_include_next = yes; then
7072 gl_cv_next_errno_h='<'errno.h'>'
7073 else
7074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
7075 $as_echo_n "checking absolute name of <errno.h>... " >&6; }
7076 if test "${gl_cv_next_errno_h+set}" = set; then :
7077 $as_echo_n "(cached) " >&6
7078 else
7079
7080
7081
7082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7083 /* end confdefs.h. */
7084 #include <errno.h>
7085 _ACEOF
7086 case "$host_os" in
7087 aix*) gl_absname_cpp="$ac_cpp -C" ;;
7088 *) gl_absname_cpp="$ac_cpp" ;;
7089 esac
7090
7091 case "$host_os" in
7092 mingw*)
7093 gl_dirsep_regex='[/\\]'
7094 ;;
7095 *)
7096 gl_dirsep_regex='\/'
7097 ;;
7098 esac
7099 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
7100 gl_header_literal_regex=`echo 'errno.h' \
7101 | sed -e "$gl_make_literal_regex_sed"`
7102 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
7103 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
7104 s|^/[^/]|//&|
7105 p
7106 q
7107 }'
7108
7109 gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
7110 sed -n "$gl_absolute_header_sed"`
7111
7112 gl_header=$gl_cv_absolute_errno_h
7113 gl_cv_next_errno_h='"'$gl_header'"'
7114
7115
7116 fi
7117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
7118 $as_echo "$gl_cv_next_errno_h" >&6; }
7119 fi
7120 NEXT_ERRNO_H=$gl_cv_next_errno_h
7121
7122 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
7123 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
7124 gl_next_as_first_directive='<'errno.h'>'
7125 else
7126 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
7127 gl_next_as_first_directive=$gl_cv_next_errno_h
7128 fi
7129 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
7130
7131
7132
7133
7134 ERRNO_H='errno.h'
7135 fi
7136
7137 if test -n "$ERRNO_H"; then
7138 GL_GENERATE_ERRNO_H_TRUE=
7139 GL_GENERATE_ERRNO_H_FALSE='#'
7140 else
7141 GL_GENERATE_ERRNO_H_TRUE='#'
7142 GL_GENERATE_ERRNO_H_FALSE=
7143 fi
7144
7145
7146 if test -n "$ERRNO_H"; then
7147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
7148 $as_echo_n "checking for EMULTIHOP value... " >&6; }
7149 if test "${gl_cv_header_errno_h_EMULTIHOP+set}" = set; then :
7150 $as_echo_n "(cached) " >&6
7151 else
7152
7153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7154 /* end confdefs.h. */
7155
7156 #include <errno.h>
7157 #ifdef EMULTIHOP
7158 yes
7159 #endif
7160
7161 _ACEOF
7162 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7163 $EGREP "yes" >/dev/null 2>&1; then :
7164 gl_cv_header_errno_h_EMULTIHOP=yes
7165 else
7166 gl_cv_header_errno_h_EMULTIHOP=no
7167 fi
7168 rm -f conftest*
7169
7170 if test $gl_cv_header_errno_h_EMULTIHOP = no; then
7171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7172 /* end confdefs.h. */
7173
7174 #define _XOPEN_SOURCE_EXTENDED 1
7175 #include <errno.h>
7176 #ifdef EMULTIHOP
7177 yes
7178 #endif
7179
7180 _ACEOF
7181 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7182 $EGREP "yes" >/dev/null 2>&1; then :
7183 gl_cv_header_errno_h_EMULTIHOP=hidden
7184 fi
7185 rm -f conftest*
7186
7187 if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
7188 if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
7189 #define _XOPEN_SOURCE_EXTENDED 1
7190 #include <errno.h>
7191 /* The following two lines are a workaround against an autoconf-2.52 bug. */
7192 #include <stdio.h>
7193 #include <stdlib.h>
7194 "; then :
7195
7196 fi
7197
7198 fi
7199 fi
7200
7201 fi
7202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
7203 $as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
7204 case $gl_cv_header_errno_h_EMULTIHOP in
7205 yes | no)
7206 EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
7207 ;;
7208 *)
7209 EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
7210 ;;
7211 esac
7212
7213
7214 fi
7215
7216
7217 if test -n "$ERRNO_H"; then
7218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
7219 $as_echo_n "checking for ENOLINK value... " >&6; }
7220 if test "${gl_cv_header_errno_h_ENOLINK+set}" = set; then :
7221 $as_echo_n "(cached) " >&6
7222 else
7223
7224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7225 /* end confdefs.h. */
7226
7227 #include <errno.h>
7228 #ifdef ENOLINK
7229 yes
7230 #endif
7231
7232 _ACEOF
7233 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7234 $EGREP "yes" >/dev/null 2>&1; then :
7235 gl_cv_header_errno_h_ENOLINK=yes
7236 else
7237 gl_cv_header_errno_h_ENOLINK=no
7238 fi
7239 rm -f conftest*
7240
7241 if test $gl_cv_header_errno_h_ENOLINK = no; then
7242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7243 /* end confdefs.h. */
7244
7245 #define _XOPEN_SOURCE_EXTENDED 1
7246 #include <errno.h>
7247 #ifdef ENOLINK
7248 yes
7249 #endif
7250
7251 _ACEOF
7252 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7253 $EGREP "yes" >/dev/null 2>&1; then :
7254 gl_cv_header_errno_h_ENOLINK=hidden
7255 fi
7256 rm -f conftest*
7257
7258 if test $gl_cv_header_errno_h_ENOLINK = hidden; then
7259 if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
7260 #define _XOPEN_SOURCE_EXTENDED 1
7261 #include <errno.h>
7262 /* The following two lines are a workaround against an autoconf-2.52 bug. */
7263 #include <stdio.h>
7264 #include <stdlib.h>
7265 "; then :
7266
7267 fi
7268
7269 fi
7270 fi
7271
7272 fi
7273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
7274 $as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
7275 case $gl_cv_header_errno_h_ENOLINK in
7276 yes | no)
7277 ENOLINK_HIDDEN=0; ENOLINK_VALUE=
7278 ;;
7279 *)
7280 ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
7281 ;;
7282 esac
7283
7284
7285 fi
7286
7287
7288 if test -n "$ERRNO_H"; then
7289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
7290 $as_echo_n "checking for EOVERFLOW value... " >&6; }
7291 if test "${gl_cv_header_errno_h_EOVERFLOW+set}" = set; then :
7292 $as_echo_n "(cached) " >&6
7293 else
7294
7295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7296 /* end confdefs.h. */
7297
7298 #include <errno.h>
7299 #ifdef EOVERFLOW
7300 yes
7301 #endif
7302
7303 _ACEOF
7304 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7305 $EGREP "yes" >/dev/null 2>&1; then :
7306 gl_cv_header_errno_h_EOVERFLOW=yes
7307 else
7308 gl_cv_header_errno_h_EOVERFLOW=no
7309 fi
7310 rm -f conftest*
7311
7312 if test $gl_cv_header_errno_h_EOVERFLOW = no; then
7313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7314 /* end confdefs.h. */
7315
7316 #define _XOPEN_SOURCE_EXTENDED 1
7317 #include <errno.h>
7318 #ifdef EOVERFLOW
7319 yes
7320 #endif
7321
7322 _ACEOF
7323 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7324 $EGREP "yes" >/dev/null 2>&1; then :
7325 gl_cv_header_errno_h_EOVERFLOW=hidden
7326 fi
7327 rm -f conftest*
7328
7329 if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
7330 if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
7331 #define _XOPEN_SOURCE_EXTENDED 1
7332 #include <errno.h>
7333 /* The following two lines are a workaround against an autoconf-2.52 bug. */
7334 #include <stdio.h>
7335 #include <stdlib.h>
7336 "; then :
7337
7338 fi
7339
7340 fi
7341 fi
7342
7343 fi
7344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
7345 $as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
7346 case $gl_cv_header_errno_h_EOVERFLOW in
7347 yes | no)
7348 EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
7349 ;;
7350 *)
7351 EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
7352 ;;
7353 esac
7354
7355
7356 fi
7357
7358
7359 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
7360 if test "x$ac_cv_have_decl_strerror_r" = x""yes; then :
7361 ac_have_decl=1
7362 else
7363 ac_have_decl=0
7364 fi
7365
7366 cat >>confdefs.h <<_ACEOF
7367 #define HAVE_DECL_STRERROR_R $ac_have_decl
7368 _ACEOF
7369
7370 for ac_func in strerror_r
7371 do :
7372 ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
7373 if test "x$ac_cv_func_strerror_r" = x""yes; then :
7374 cat >>confdefs.h <<_ACEOF
7375 #define HAVE_STRERROR_R 1
7376 _ACEOF
7377
7378 fi
7379 done
7380
7381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
7382 $as_echo_n "checking whether strerror_r returns char *... " >&6; }
7383 if test "${ac_cv_func_strerror_r_char_p+set}" = set; then :
7384 $as_echo_n "(cached) " >&6
7385 else
7386
7387 ac_cv_func_strerror_r_char_p=no
7388 if test $ac_cv_have_decl_strerror_r = yes; then
7389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7390 /* end confdefs.h. */
7391 $ac_includes_default
7392 int
7393 main ()
7394 {
7395
7396 char buf[100];
7397 char x = *strerror_r (0, buf, sizeof buf);
7398 char *p = strerror_r (0, buf, sizeof buf);
7399 return !p || x;
7400
7401 ;
7402 return 0;
7403 }
7404 _ACEOF
7405 if ac_fn_c_try_compile "$LINENO"; then :
7406 ac_cv_func_strerror_r_char_p=yes
7407 fi
7408 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7409 else
7410 # strerror_r is not declared. Choose between
7411 # systems that have relatively inaccessible declarations for the
7412 # function. BeOS and DEC UNIX 4.0 fall in this category, but the
7413 # former has a strerror_r that returns char*, while the latter
7414 # has a strerror_r that returns `int'.
7415 # This test should segfault on the DEC system.
7416 if test "$cross_compiling" = yes; then :
7417 :
7418 else
7419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7420 /* end confdefs.h. */
7421 $ac_includes_default
7422 extern char *strerror_r ();
7423 int
7424 main ()
7425 {
7426 char buf[100];
7427 char x = *strerror_r (0, buf, sizeof buf);
7428 return ! isalpha (x);
7429 ;
7430 return 0;
7431 }
7432 _ACEOF
7433 if ac_fn_c_try_run "$LINENO"; then :
7434 ac_cv_func_strerror_r_char_p=yes
7435 fi
7436 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7437 conftest.$ac_objext conftest.beam conftest.$ac_ext
7438 fi
7439
7440 fi
7441
7442 fi
7443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
7444 $as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
7445 if test $ac_cv_func_strerror_r_char_p = yes; then
7446
7447 $as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
7448
7449 fi
7450
7451
7452
7453
7454 ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default"
7455 if test "x$ac_cv_have_decl_fchdir" = x""yes; then :
7456 ac_have_decl=1
7457 else
7458 ac_have_decl=0
7459 fi
7460
7461 cat >>confdefs.h <<_ACEOF
7462 #define HAVE_DECL_FCHDIR $ac_have_decl
7463 _ACEOF
7464
7465
7466 GNULIB_FCNTL=0;
7467 GNULIB_NONBLOCKING=0;
7468 GNULIB_OPEN=0;
7469 GNULIB_OPENAT=0;
7470 HAVE_FCNTL=1;
7471 HAVE_OPENAT=1;
7472 REPLACE_FCNTL=0;
7473 REPLACE_OPEN=0;
7474 REPLACE_OPENAT=0;
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
7486 $as_echo_n "checking for working fcntl.h... " >&6; }
7487 if test "${gl_cv_header_working_fcntl_h+set}" = set; then :
7488 $as_echo_n "(cached) " >&6
7489 else
7490 if test "$cross_compiling" = yes; then :
7491 gl_cv_header_working_fcntl_h=cross-compiling
7492 else
7493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7494 /* end confdefs.h. */
7495 #include <sys/types.h>
7496 #include <sys/stat.h>
7497 #if HAVE_UNISTD_H
7498 # include <unistd.h>
7499 #else /* on Windows with MSVC */
7500 # include <io.h>
7501 # include <stdlib.h>
7502 # defined sleep(n) _sleep ((n) * 1000)
7503 #endif
7504 #include <fcntl.h>
7505 #ifndef O_NOATIME
7506 #define O_NOATIME 0
7507 #endif
7508 #ifndef O_NOFOLLOW
7509 #define O_NOFOLLOW 0
7510 #endif
7511 static int const constants[] =
7512 {
7513 O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
7514 O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
7515 };
7516
7517 int
7518 main ()
7519 {
7520
7521 int result = !constants;
7522 #if HAVE_SYMLINK
7523 {
7524 static char const sym[] = "conftest.sym";
7525 if (symlink ("/dev/null", sym) != 0)
7526 result |= 2;
7527 else
7528 {
7529 int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
7530 if (fd >= 0)
7531 {
7532 close (fd);
7533 result |= 4;
7534 }
7535 }
7536 if (unlink (sym) != 0 || symlink (".", sym) != 0)
7537 result |= 2;
7538 else
7539 {
7540 int fd = open (sym, O_RDONLY | O_NOFOLLOW);
7541 if (fd >= 0)
7542 {
7543 close (fd);
7544 result |= 4;
7545 }
7546 }
7547 unlink (sym);
7548 }
7549 #endif
7550 {
7551 static char const file[] = "confdefs.h";
7552 int fd = open (file, O_RDONLY | O_NOATIME);
7553 if (fd < 0)
7554 result |= 8;
7555 else
7556 {
7557 struct stat st0;
7558 if (fstat (fd, &st0) != 0)
7559 result |= 16;
7560 else
7561 {
7562 char c;
7563 sleep (1);
7564 if (read (fd, &c, 1) != 1)
7565 result |= 24;
7566 else
7567 {
7568 if (close (fd) != 0)
7569 result |= 32;
7570 else
7571 {
7572 struct stat st1;
7573 if (stat (file, &st1) != 0)
7574 result |= 40;
7575 else
7576 if (st0.st_atime != st1.st_atime)
7577 result |= 64;
7578 }
7579 }
7580 }
7581 }
7582 }
7583 return result;
7584 ;
7585 return 0;
7586 }
7587 _ACEOF
7588 if ac_fn_c_try_run "$LINENO"; then :
7589 gl_cv_header_working_fcntl_h=yes
7590 else
7591 case $? in #(
7592 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
7593 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
7594 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
7595 *) gl_cv_header_working_fcntl_h='no';;
7596 esac
7597 fi
7598 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7599 conftest.$ac_objext conftest.beam conftest.$ac_ext
7600 fi
7601
7602 fi
7603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
7604 $as_echo "$gl_cv_header_working_fcntl_h" >&6; }
7605
7606 case $gl_cv_header_working_fcntl_h in #(
7607 *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
7608 *) ac_val=1;;
7609 esac
7610
7611 cat >>confdefs.h <<_ACEOF
7612 #define HAVE_WORKING_O_NOATIME $ac_val
7613 _ACEOF
7614
7615
7616 case $gl_cv_header_working_fcntl_h in #(
7617 *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
7618 *) ac_val=1;;
7619 esac
7620
7621 cat >>confdefs.h <<_ACEOF
7622 #define HAVE_WORKING_O_NOFOLLOW $ac_val
7623 _ACEOF
7624
7625
7626 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
7627 if test "x$ac_cv_type_pid_t" = x""yes; then :
7628
7629 else
7630
7631 cat >>confdefs.h <<_ACEOF
7632 #define pid_t int
7633 _ACEOF
7634
7635 fi
7636
7637 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
7638 if test "x$ac_cv_type_mode_t" = x""yes; then :
7639
7640 else
7641
7642 cat >>confdefs.h <<_ACEOF
7643 #define mode_t int
7644 _ACEOF
7645
7646 fi
7647
7648
7649
7650
7651
7652
7653
7654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
7655 $as_echo_n "checking for mbstate_t... " >&6; }
7656 if test "${ac_cv_type_mbstate_t+set}" = set; then :
7657 $as_echo_n "(cached) " >&6
7658 else
7659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7660 /* end confdefs.h. */
7661 $ac_includes_default
7662 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
7663 <wchar.h>.
7664 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
7665 included before <wchar.h>. */
7666 #include <stddef.h>
7667 #include <stdio.h>
7668 #include <time.h>
7669 #include <wchar.h>
7670 int
7671 main ()
7672 {
7673 mbstate_t x; return sizeof x;
7674 ;
7675 return 0;
7676 }
7677 _ACEOF
7678 if ac_fn_c_try_compile "$LINENO"; then :
7679 ac_cv_type_mbstate_t=yes
7680 else
7681 ac_cv_type_mbstate_t=no
7682 fi
7683 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7684 fi
7685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
7686 $as_echo "$ac_cv_type_mbstate_t" >&6; }
7687 if test $ac_cv_type_mbstate_t = yes; then
7688
7689 $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
7690
7691 else
7692
7693 $as_echo "#define mbstate_t int" >>confdefs.h
7694
7695 fi
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714 GNULIB_ACOSF=0;
7715 GNULIB_ACOSL=0;
7716 GNULIB_ASINF=0;
7717 GNULIB_ASINL=0;
7718 GNULIB_ATANF=0;
7719 GNULIB_ATANL=0;
7720 GNULIB_ATAN2F=0;
7721 GNULIB_CBRT=0;
7722 GNULIB_CBRTF=0;
7723 GNULIB_CBRTL=0;
7724 GNULIB_CEIL=0;
7725 GNULIB_CEILF=0;
7726 GNULIB_CEILL=0;
7727 GNULIB_COPYSIGN=0;
7728 GNULIB_COPYSIGNF=0;
7729 GNULIB_COPYSIGNL=0;
7730 GNULIB_COSF=0;
7731 GNULIB_COSL=0;
7732 GNULIB_COSHF=0;
7733 GNULIB_EXPF=0;
7734 GNULIB_EXPL=0;
7735 GNULIB_EXP2=0;
7736 GNULIB_EXP2F=0;
7737 GNULIB_EXP2L=0;
7738 GNULIB_EXPM1=0;
7739 GNULIB_EXPM1F=0;
7740 GNULIB_EXPM1L=0;
7741 GNULIB_FABSF=0;
7742 GNULIB_FABSL=0;
7743 GNULIB_FLOOR=0;
7744 GNULIB_FLOORF=0;
7745 GNULIB_FLOORL=0;
7746 GNULIB_FMA=0;
7747 GNULIB_FMAF=0;
7748 GNULIB_FMAL=0;
7749 GNULIB_FMOD=0;
7750 GNULIB_FMODF=0;
7751 GNULIB_FMODL=0;
7752 GNULIB_FREXPF=0;
7753 GNULIB_FREXP=0;
7754 GNULIB_FREXPL=0;
7755 GNULIB_HYPOT=0;
7756 GNULIB_HYPOTF=0;
7757 GNULIB_HYPOTL=0;
7758 GNULIB_ILOGB=0;
7759 GNULIB_ILOGBF=0;
7760 GNULIB_ILOGBL=0;
7761 GNULIB_ISFINITE=0;
7762 GNULIB_ISINF=0;
7763 GNULIB_ISNAN=0;
7764 GNULIB_ISNANF=0;
7765 GNULIB_ISNAND=0;
7766 GNULIB_ISNANL=0;
7767 GNULIB_LDEXPF=0;
7768 GNULIB_LDEXPL=0;
7769 GNULIB_LOG=0;
7770 GNULIB_LOGF=0;
7771 GNULIB_LOGL=0;
7772 GNULIB_LOG10=0;
7773 GNULIB_LOG10F=0;
7774 GNULIB_LOG10L=0;
7775 GNULIB_LOG1P=0;
7776 GNULIB_LOG1PF=0;
7777 GNULIB_LOG1PL=0;
7778 GNULIB_LOG2=0;
7779 GNULIB_LOG2F=0;
7780 GNULIB_LOG2L=0;
7781 GNULIB_LOGB=0;
7782 GNULIB_LOGBF=0;
7783 GNULIB_LOGBL=0;
7784 GNULIB_MODF=0;
7785 GNULIB_MODFF=0;
7786 GNULIB_MODFL=0;
7787 GNULIB_POWF=0;
7788 GNULIB_REMAINDER=0;
7789 GNULIB_REMAINDERF=0;
7790 GNULIB_REMAINDERL=0;
7791 GNULIB_RINT=0;
7792 GNULIB_RINTF=0;
7793 GNULIB_RINTL=0;
7794 GNULIB_ROUND=0;
7795 GNULIB_ROUNDF=0;
7796 GNULIB_ROUNDL=0;
7797 GNULIB_SIGNBIT=0;
7798 GNULIB_SINF=0;
7799 GNULIB_SINL=0;
7800 GNULIB_SINHF=0;
7801 GNULIB_SQRTF=0;
7802 GNULIB_SQRTL=0;
7803 GNULIB_TANF=0;
7804 GNULIB_TANL=0;
7805 GNULIB_TANHF=0;
7806 GNULIB_TRUNC=0;
7807 GNULIB_TRUNCF=0;
7808 GNULIB_TRUNCL=0;
7809 HAVE_ACOSF=1;
7810 HAVE_ACOSL=1;
7811 HAVE_ASINF=1;
7812 HAVE_ASINL=1;
7813 HAVE_ATANF=1;
7814 HAVE_ATANL=1;
7815 HAVE_ATAN2F=1;
7816 HAVE_CBRT=1;
7817 HAVE_CBRTF=1;
7818 HAVE_CBRTL=1;
7819 HAVE_COPYSIGN=1;
7820 HAVE_COPYSIGNL=1;
7821 HAVE_COSF=1;
7822 HAVE_COSL=1;
7823 HAVE_COSHF=1;
7824 HAVE_EXPF=1;
7825 HAVE_EXPL=1;
7826 HAVE_EXPM1=1;
7827 HAVE_EXPM1F=1;
7828 HAVE_FABSF=1;
7829 HAVE_FABSL=1;
7830 HAVE_FMA=1;
7831 HAVE_FMAF=1;
7832 HAVE_FMAL=1;
7833 HAVE_FMODF=1;
7834 HAVE_FMODL=1;
7835 HAVE_FREXPF=1;
7836 HAVE_HYPOTF=1;
7837 HAVE_HYPOTL=1;
7838 HAVE_ILOGB=1;
7839 HAVE_ILOGBF=1;
7840 HAVE_ILOGBL=1;
7841 HAVE_ISNANF=1;
7842 HAVE_ISNAND=1;
7843 HAVE_ISNANL=1;
7844 HAVE_LDEXPF=1;
7845 HAVE_LOGF=1;
7846 HAVE_LOGL=1;
7847 HAVE_LOG10F=1;
7848 HAVE_LOG10L=1;
7849 HAVE_LOG1P=1;
7850 HAVE_LOG1PF=1;
7851 HAVE_LOG1PL=1;
7852 HAVE_LOGBF=1;
7853 HAVE_LOGBL=1;
7854 HAVE_MODFF=1;
7855 HAVE_MODFL=1;
7856 HAVE_POWF=1;
7857 HAVE_REMAINDER=1;
7858 HAVE_REMAINDERF=1;
7859 HAVE_RINT=1;
7860 HAVE_RINTL=1;
7861 HAVE_SINF=1;
7862 HAVE_SINL=1;
7863 HAVE_SINHF=1;
7864 HAVE_SQRTF=1;
7865 HAVE_SQRTL=1;
7866 HAVE_TANF=1;
7867 HAVE_TANL=1;
7868 HAVE_TANHF=1;
7869 HAVE_DECL_ACOSL=1;
7870 HAVE_DECL_ASINL=1;
7871 HAVE_DECL_ATANL=1;
7872 HAVE_DECL_CBRTF=1;
7873 HAVE_DECL_CBRTL=1;
7874 HAVE_DECL_CEILF=1;
7875 HAVE_DECL_CEILL=1;
7876 HAVE_DECL_COPYSIGNF=1;
7877 HAVE_DECL_COSL=1;
7878 HAVE_DECL_EXPL=1;
7879 HAVE_DECL_EXP2=1;
7880 HAVE_DECL_EXP2F=1;
7881 HAVE_DECL_EXP2L=1;
7882 HAVE_DECL_EXPM1L=1;
7883 HAVE_DECL_FLOORF=1;
7884 HAVE_DECL_FLOORL=1;
7885 HAVE_DECL_FREXPL=1;
7886 HAVE_DECL_LDEXPL=1;
7887 HAVE_DECL_LOGL=1;
7888 HAVE_DECL_LOG10L=1;
7889 HAVE_DECL_LOG2=1;
7890 HAVE_DECL_LOG2F=1;
7891 HAVE_DECL_LOG2L=1;
7892 HAVE_DECL_LOGB=1;
7893 HAVE_DECL_REMAINDER=1;
7894 HAVE_DECL_REMAINDERL=1;
7895 HAVE_DECL_RINTF=1;
7896 HAVE_DECL_ROUND=1;
7897 HAVE_DECL_ROUNDF=1;
7898 HAVE_DECL_ROUNDL=1;
7899 HAVE_DECL_SINL=1;
7900 HAVE_DECL_SQRTL=1;
7901 HAVE_DECL_TANL=1;
7902 HAVE_DECL_TRUNC=1;
7903 HAVE_DECL_TRUNCF=1;
7904 HAVE_DECL_TRUNCL=1;
7905 REPLACE_CBRTF=0;
7906 REPLACE_CBRTL=0;
7907 REPLACE_CEIL=0;
7908 REPLACE_CEILF=0;
7909 REPLACE_CEILL=0;
7910 REPLACE_EXPM1=0;
7911 REPLACE_EXPM1F=0;
7912 REPLACE_EXP2=0;
7913 REPLACE_EXP2L=0;
7914 REPLACE_FABSL=0;
7915 REPLACE_FLOOR=0;
7916 REPLACE_FLOORF=0;
7917 REPLACE_FLOORL=0;
7918 REPLACE_FMA=0;
7919 REPLACE_FMAF=0;
7920 REPLACE_FMAL=0;
7921 REPLACE_FMOD=0;
7922 REPLACE_FMODF=0;
7923 REPLACE_FMODL=0;
7924 REPLACE_FREXPF=0;
7925 REPLACE_FREXP=0;
7926 REPLACE_FREXPL=0;
7927 REPLACE_HUGE_VAL=0;
7928 REPLACE_HYPOT=0;
7929 REPLACE_HYPOTF=0;
7930 REPLACE_HYPOTL=0;
7931 REPLACE_ILOGB=0;
7932 REPLACE_ILOGBF=0;
7933 REPLACE_ISFINITE=0;
7934 REPLACE_ISINF=0;
7935 REPLACE_ISNAN=0;
7936 REPLACE_LDEXPL=0;
7937 REPLACE_LOG=0;
7938 REPLACE_LOGF=0;
7939 REPLACE_LOGL=0;
7940 REPLACE_LOG10=0;
7941 REPLACE_LOG10F=0;
7942 REPLACE_LOG10L=0;
7943 REPLACE_LOG1P=0;
7944 REPLACE_LOG1PF=0;
7945 REPLACE_LOG1PL=0;
7946 REPLACE_LOG2=0;
7947 REPLACE_LOG2F=0;
7948 REPLACE_LOG2L=0;
7949 REPLACE_LOGB=0;
7950 REPLACE_LOGBF=0;
7951 REPLACE_LOGBL=0;
7952 REPLACE_MODF=0;
7953 REPLACE_MODFF=0;
7954 REPLACE_MODFL=0;
7955 REPLACE_NAN=0;
7956 REPLACE_REMAINDER=0;
7957 REPLACE_REMAINDERF=0;
7958 REPLACE_REMAINDERL=0;
7959 REPLACE_ROUND=0;
7960 REPLACE_ROUNDF=0;
7961 REPLACE_ROUNDL=0;
7962 REPLACE_SIGNBIT=0;
7963 REPLACE_SIGNBIT_USING_GCC=0;
7964 REPLACE_SQRTL=0;
7965 REPLACE_TRUNC=0;
7966 REPLACE_TRUNCF=0;
7967 REPLACE_TRUNCL=0;
7968
7969
7970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5
7971 $as_echo_n "checking whether frexp() can be used without linking with libm... " >&6; }
7972 if test "${gl_cv_func_frexp_no_libm+set}" = set; then :
7973 $as_echo_n "(cached) " >&6
7974 else
7975
7976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7977 /* end confdefs.h. */
7978 #include <math.h>
7979 double x;
7980 int
7981 main ()
7982 {
7983 int e; return frexp (x, &e) > 0;
7984 ;
7985 return 0;
7986 }
7987 _ACEOF
7988 if ac_fn_c_try_link "$LINENO"; then :
7989 gl_cv_func_frexp_no_libm=yes
7990 else
7991 gl_cv_func_frexp_no_libm=no
7992 fi
7993 rm -f core conftest.err conftest.$ac_objext \
7994 conftest$ac_exeext conftest.$ac_ext
7995
7996 fi
7997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
7998 $as_echo "$gl_cv_func_frexp_no_libm" >&6; }
7999
8000 ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
8001 if test "x$ac_cv_have_decl_alarm" = x""yes; then :
8002 ac_have_decl=1
8003 else
8004 ac_have_decl=0
8005 fi
8006
8007 cat >>confdefs.h <<_ACEOF
8008 #define HAVE_DECL_ALARM $ac_have_decl
8009 _ACEOF
8010
8011
8012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5
8013 $as_echo_n "checking whether long double and double are the same... " >&6; }
8014 if test "${gl_cv_long_double_equals_double+set}" = set; then :
8015 $as_echo_n "(cached) " >&6
8016 else
8017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8018 /* end confdefs.h. */
8019 #include <float.h>
8020 int
8021 main ()
8022 {
8023 typedef int check[sizeof (long double) == sizeof (double)
8024 && LDBL_MANT_DIG == DBL_MANT_DIG
8025 && LDBL_MAX_EXP == DBL_MAX_EXP
8026 && LDBL_MIN_EXP == DBL_MIN_EXP
8027 ? 1 : -1];
8028
8029 ;
8030 return 0;
8031 }
8032 _ACEOF
8033 if ac_fn_c_try_compile "$LINENO"; then :
8034 gl_cv_long_double_equals_double=yes
8035 else
8036 gl_cv_long_double_equals_double=no
8037 fi
8038 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8039
8040 fi
8041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_long_double_equals_double" >&5
8042 $as_echo "$gl_cv_long_double_equals_double" >&6; }
8043 if test $gl_cv_long_double_equals_double = yes; then
8044
8045 $as_echo "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h
8046
8047 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1
8048 else
8049 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0
8050 fi
8051
8052
8053
8054 GNULIB_FCHMODAT=0;
8055 GNULIB_FSTAT=0;
8056 GNULIB_FSTATAT=0;
8057 GNULIB_FUTIMENS=0;
8058 GNULIB_LCHMOD=0;
8059 GNULIB_LSTAT=0;
8060 GNULIB_MKDIRAT=0;
8061 GNULIB_MKFIFO=0;
8062 GNULIB_MKFIFOAT=0;
8063 GNULIB_MKNOD=0;
8064 GNULIB_MKNODAT=0;
8065 GNULIB_STAT=0;
8066 GNULIB_UTIMENSAT=0;
8067 HAVE_FCHMODAT=1;
8068 HAVE_FSTATAT=1;
8069 HAVE_FUTIMENS=1;
8070 HAVE_LCHMOD=1;
8071 HAVE_LSTAT=1;
8072 HAVE_MKDIRAT=1;
8073 HAVE_MKFIFO=1;
8074 HAVE_MKFIFOAT=1;
8075 HAVE_MKNOD=1;
8076 HAVE_MKNODAT=1;
8077 HAVE_UTIMENSAT=1;
8078 REPLACE_FSTAT=0;
8079 REPLACE_FSTATAT=0;
8080 REPLACE_FUTIMENS=0;
8081 REPLACE_LSTAT=0;
8082 REPLACE_MKDIR=0;
8083 REPLACE_MKFIFO=0;
8084 REPLACE_MKNOD=0;
8085 REPLACE_STAT=0;
8086 REPLACE_UTIMENSAT=0;
8087
8088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
8089 $as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
8090 if test "${ac_cv_header_stat_broken+set}" = set; then :
8091 $as_echo_n "(cached) " >&6
8092 else
8093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8094 /* end confdefs.h. */
8095 #include <sys/types.h>
8096 #include <sys/stat.h>
8097
8098 #if defined S_ISBLK && defined S_IFDIR
8099 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
8100 #endif
8101
8102 #if defined S_ISBLK && defined S_IFCHR
8103 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
8104 #endif
8105
8106 #if defined S_ISLNK && defined S_IFREG
8107 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
8108 #endif
8109
8110 #if defined S_ISSOCK && defined S_IFREG
8111 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
8112 #endif
8113
8114 _ACEOF
8115 if ac_fn_c_try_compile "$LINENO"; then :
8116 ac_cv_header_stat_broken=no
8117 else
8118 ac_cv_header_stat_broken=yes
8119 fi
8120 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8121 fi
8122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
8123 $as_echo "$ac_cv_header_stat_broken" >&6; }
8124 if test $ac_cv_header_stat_broken = yes; then
8125
8126 $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
8127
8128 fi
8129
8130
8131
8132
8133
8134 case "$host_os" in
8135 mingw*)
8136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
8137 $as_echo_n "checking for 64-bit off_t... " >&6; }
8138 if test "${gl_cv_type_off_t_64+set}" = set; then :
8139 $as_echo_n "(cached) " >&6
8140 else
8141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8142 /* end confdefs.h. */
8143 #include <sys/types.h>
8144 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
8145
8146 int
8147 main ()
8148 {
8149
8150 ;
8151 return 0;
8152 }
8153 _ACEOF
8154 if ac_fn_c_try_compile "$LINENO"; then :
8155 gl_cv_type_off_t_64=yes
8156 else
8157 gl_cv_type_off_t_64=no
8158 fi
8159 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8160
8161 fi
8162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
8163 $as_echo "$gl_cv_type_off_t_64" >&6; }
8164 if test $gl_cv_type_off_t_64 = no; then
8165 WINDOWS_64_BIT_OFF_T=1
8166 else
8167 WINDOWS_64_BIT_OFF_T=0
8168 fi
8169 WINDOWS_64_BIT_ST_SIZE=1
8170 ;;
8171 *)
8172 WINDOWS_64_BIT_OFF_T=0
8173 WINDOWS_64_BIT_ST_SIZE=0
8174 ;;
8175 esac
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191 if test $gl_cv_have_include_next = yes; then
8192 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
8193 else
8194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
8195 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
8196 if test "${gl_cv_next_sys_stat_h+set}" = set; then :
8197 $as_echo_n "(cached) " >&6
8198 else
8199
8200 if test $ac_cv_header_sys_stat_h = yes; then
8201
8202
8203
8204
8205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8206 /* end confdefs.h. */
8207 #include <sys/stat.h>
8208 _ACEOF
8209 case "$host_os" in
8210 aix*) gl_absname_cpp="$ac_cpp -C" ;;
8211 *) gl_absname_cpp="$ac_cpp" ;;
8212 esac
8213
8214 case "$host_os" in
8215 mingw*)
8216 gl_dirsep_regex='[/\\]'
8217 ;;
8218 *)
8219 gl_dirsep_regex='\/'
8220 ;;
8221 esac
8222 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
8223 gl_header_literal_regex=`echo 'sys/stat.h' \
8224 | sed -e "$gl_make_literal_regex_sed"`
8225 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
8226 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
8227 s|^/[^/]|//&|
8228 p
8229 q
8230 }'
8231
8232 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
8233 sed -n "$gl_absolute_header_sed"`
8234
8235 gl_header=$gl_cv_absolute_sys_stat_h
8236 gl_cv_next_sys_stat_h='"'$gl_header'"'
8237 else
8238 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
8239 fi
8240
8241
8242 fi
8243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
8244 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
8245 fi
8246 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
8247
8248 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
8249 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
8250 gl_next_as_first_directive='<'sys/stat.h'>'
8251 else
8252 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
8253 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
8254 fi
8255 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
8268
8269 $as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
8270
8271 fi
8272
8273 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
8274 #include <sys/stat.h>
8275 "
8276 if test "x$ac_cv_type_nlink_t" = x""yes; then :
8277
8278 else
8279
8280 $as_echo "#define nlink_t int" >>confdefs.h
8281
8282 fi
8283
8284
8285
8286 for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do
8287 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
8288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
8289 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
8290 if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
8291 $as_echo_n "(cached) " >&6
8292 else
8293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8294 /* end confdefs.h. */
8295 #include <sys/stat.h>
8296
8297 int
8298 main ()
8299 {
8300 #undef $gl_func
8301 (void) $gl_func;
8302 ;
8303 return 0;
8304 }
8305 _ACEOF
8306 if ac_fn_c_try_compile "$LINENO"; then :
8307 eval "$as_gl_Symbol=yes"
8308 else
8309 eval "$as_gl_Symbol=no"
8310 fi
8311 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8312 fi
8313 eval ac_res=\$$as_gl_Symbol
8314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8315 $as_echo "$ac_res" >&6; }
8316 eval as_val=\$$as_gl_Symbol
8317 if test "x$as_val" = x""yes; then :
8318 cat >>confdefs.h <<_ACEOF
8319 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
8320 _ACEOF
8321
8322 eval ac_cv_have_decl_$gl_func=yes
8323 fi
8324 done
8325
8326
8327
8328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
8329 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
8330 if test "${gl_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then :
8331 $as_echo_n "(cached) " >&6
8332 else
8333 rm -f conftest.sym conftest.file
8334 echo >conftest.file
8335 if test "$cross_compiling" = yes; then :
8336 case "$host_os" in
8337 *-gnu*)
8338 # Guess yes on glibc systems.
8339 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
8340 *)
8341 # If we don't know, assume the worst.
8342 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
8343 esac
8344
8345 else
8346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8347 /* end confdefs.h. */
8348 $ac_includes_default
8349 int
8350 main ()
8351 {
8352 struct stat sbuf;
8353 if (symlink ("conftest.file", "conftest.sym") != 0)
8354 return 1;
8355 /* Linux will dereference the symlink and fail, as required by
8356 POSIX. That is better in the sense that it means we will not
8357 have to compile and use the lstat wrapper. */
8358 return lstat ("conftest.sym/", &sbuf) == 0;
8359
8360 ;
8361 return 0;
8362 }
8363 _ACEOF
8364 if ac_fn_c_try_run "$LINENO"; then :
8365 gl_cv_func_lstat_dereferences_slashed_symlink=yes
8366 else
8367 gl_cv_func_lstat_dereferences_slashed_symlink=no
8368 fi
8369 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8370 conftest.$ac_objext conftest.beam conftest.$ac_ext
8371 fi
8372
8373 rm -f conftest.sym conftest.file
8374
8375 fi
8376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
8377 $as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
8378 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
8379 *yes)
8380
8381 cat >>confdefs.h <<_ACEOF
8382 #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
8383 _ACEOF
8384
8385 ;;
8386 esac
8387
8388
8389
8390
8391
8392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
8393 $as_echo_n "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
8394 if test "${gl_cv_func_getcwd_null+set}" = set; then :
8395 $as_echo_n "(cached) " >&6
8396 else
8397 if test "$cross_compiling" = yes; then :
8398 case "$host_os" in
8399 # Guess yes on glibc systems.
8400 *-gnu*) gl_cv_func_getcwd_null="guessing yes";;
8401 # Guess yes on Cygwin.
8402 cygwin*) gl_cv_func_getcwd_null="guessing yes";;
8403 # If we don't know, assume the worst.
8404 *) gl_cv_func_getcwd_null="guessing no";;
8405 esac
8406
8407 else
8408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8409 /* end confdefs.h. */
8410
8411 # include <stdlib.h>
8412 # if HAVE_UNISTD_H
8413 # include <unistd.h>
8414 # else /* on Windows with MSVC */
8415 # include <direct.h>
8416 # endif
8417 # ifndef getcwd
8418 char *getcwd ();
8419 # endif
8420
8421 int
8422 main ()
8423 {
8424
8425 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
8426 /* mingw cwd does not start with '/', but getcwd does allocate.
8427 However, mingw fails to honor non-zero size. */
8428 #else
8429 if (chdir ("/") != 0)
8430 return 1;
8431 else
8432 {
8433 char *f = getcwd (NULL, 0);
8434 if (! f)
8435 return 2;
8436 if (f[0] != '/')
8437 return 3;
8438 if (f[1] != '\0')
8439 return 4;
8440 free (f);
8441 return 0;
8442 }
8443 #endif
8444
8445 ;
8446 return 0;
8447 }
8448 _ACEOF
8449 if ac_fn_c_try_run "$LINENO"; then :
8450 gl_cv_func_getcwd_null=yes
8451 else
8452 gl_cv_func_getcwd_null=no
8453 fi
8454 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8455 conftest.$ac_objext conftest.beam conftest.$ac_ext
8456 fi
8457
8458 fi
8459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
8460 $as_echo "$gl_cv_func_getcwd_null" >&6; }
8461
8462
8463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
8464 $as_echo_n "checking for getcwd with POSIX signature... " >&6; }
8465 if test "${gl_cv_func_getcwd_posix_signature+set}" = set; then :
8466 $as_echo_n "(cached) " >&6
8467 else
8468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8469 /* end confdefs.h. */
8470 #include <unistd.h>
8471 int
8472 main ()
8473 {
8474 extern
8475 #ifdef __cplusplus
8476 "C"
8477 #endif
8478 char *getcwd (char *, size_t);
8479
8480 ;
8481 return 0;
8482 }
8483
8484 _ACEOF
8485 if ac_fn_c_try_compile "$LINENO"; then :
8486 gl_cv_func_getcwd_posix_signature=yes
8487 else
8488 gl_cv_func_getcwd_posix_signature=no
8489 fi
8490 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8491
8492 fi
8493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
8494 $as_echo "$gl_cv_func_getcwd_posix_signature" >&6; }
8495
8496 ac_fn_c_check_decl "$LINENO" "getcwd" "ac_cv_have_decl_getcwd" "$ac_includes_default"
8497 if test "x$ac_cv_have_decl_getcwd" = x""yes; then :
8498 ac_have_decl=1
8499 else
8500 ac_have_decl=0
8501 fi
8502
8503 cat >>confdefs.h <<_ACEOF
8504 #define HAVE_DECL_GETCWD $ac_have_decl
8505 _ACEOF
8506
8507
8508
8509 ac_fn_c_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default"
8510 if test "x$ac_cv_have_decl_getdtablesize" = x""yes; then :
8511 ac_have_decl=1
8512 else
8513 ac_have_decl=0
8514 fi
8515
8516 cat >>confdefs.h <<_ACEOF
8517 #define HAVE_DECL_GETDTABLESIZE $ac_have_decl
8518 _ACEOF
8519
8520 ac_fn_c_check_decl "$LINENO" "getlogin_r" "ac_cv_have_decl_getlogin_r" "$ac_includes_default"
8521 if test "x$ac_cv_have_decl_getlogin_r" = x""yes; then :
8522 ac_have_decl=1
8523 else
8524 ac_have_decl=0
8525 fi
8526
8527 cat >>confdefs.h <<_ACEOF
8528 #define HAVE_DECL_GETLOGIN_R $ac_have_decl
8529 _ACEOF
8530
8531
8532
8533 ac_fn_c_check_decl "$LINENO" "getlogin" "ac_cv_have_decl_getlogin" "$ac_includes_default"
8534 if test "x$ac_cv_have_decl_getlogin" = x""yes; then :
8535 ac_have_decl=1
8536 else
8537 ac_have_decl=0
8538 fi
8539
8540 cat >>confdefs.h <<_ACEOF
8541 #define HAVE_DECL_GETLOGIN $ac_have_decl
8542 _ACEOF
8543
8544
8545
8546
8547
8548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
8549 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
8550 if test "${ac_cv_c_restrict+set}" = set; then :
8551 $as_echo_n "(cached) " >&6
8552 else
8553 ac_cv_c_restrict=no
8554 # The order here caters to the fact that C++ does not require restrict.
8555 for ac_kw in __restrict __restrict__ _Restrict restrict; do
8556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8557 /* end confdefs.h. */
8558 typedef int *int_ptr;
8559 int foo (int_ptr $ac_kw ip) { return ip[0]; }
8560 int bar (int [$ac_kw]); /* Catch GCC bug 14050. */
8561 int bar (int ip[$ac_kw]) { return ip[0]; }
8562
8563 int
8564 main ()
8565 {
8566 int s[1];
8567 int *$ac_kw t = s;
8568 t[0] = 0;
8569 return foo (t) + bar (t);
8570
8571 ;
8572 return 0;
8573 }
8574 _ACEOF
8575 if ac_fn_c_try_compile "$LINENO"; then :
8576 ac_cv_c_restrict=$ac_kw
8577 fi
8578 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8579 test "$ac_cv_c_restrict" != no && break
8580 done
8581
8582 fi
8583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
8584 $as_echo "$ac_cv_c_restrict" >&6; }
8585
8586 case $ac_cv_c_restrict in
8587 restrict) ;;
8588 no) $as_echo "#define restrict /**/" >>confdefs.h
8589 ;;
8590 *) cat >>confdefs.h <<_ACEOF
8591 #define restrict $ac_cv_c_restrict
8592 _ACEOF
8593 ;;
8594 esac
8595
8596
8597 GNULIB_GETTIMEOFDAY=0;
8598 HAVE_GETTIMEOFDAY=1;
8599 HAVE_STRUCT_TIMEVAL=1;
8600 HAVE_SYS_TIME_H=1;
8601 HAVE_TIMEZONE_T=0;
8602 REPLACE_GETTIMEOFDAY=0;
8603 REPLACE_STRUCT_TIMEVAL=0;
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620 if test $gl_cv_have_include_next = yes; then
8621 gl_cv_next_sys_time_h='<'sys/time.h'>'
8622 else
8623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
8624 $as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
8625 if test "${gl_cv_next_sys_time_h+set}" = set; then :
8626 $as_echo_n "(cached) " >&6
8627 else
8628
8629 if test $ac_cv_header_sys_time_h = yes; then
8630
8631
8632
8633
8634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8635 /* end confdefs.h. */
8636 #include <sys/time.h>
8637 _ACEOF
8638 case "$host_os" in
8639 aix*) gl_absname_cpp="$ac_cpp -C" ;;
8640 *) gl_absname_cpp="$ac_cpp" ;;
8641 esac
8642
8643 case "$host_os" in
8644 mingw*)
8645 gl_dirsep_regex='[/\\]'
8646 ;;
8647 *)
8648 gl_dirsep_regex='\/'
8649 ;;
8650 esac
8651 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
8652 gl_header_literal_regex=`echo 'sys/time.h' \
8653 | sed -e "$gl_make_literal_regex_sed"`
8654 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
8655 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
8656 s|^/[^/]|//&|
8657 p
8658 q
8659 }'
8660
8661 gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
8662 sed -n "$gl_absolute_header_sed"`
8663
8664 gl_header=$gl_cv_absolute_sys_time_h
8665 gl_cv_next_sys_time_h='"'$gl_header'"'
8666 else
8667 gl_cv_next_sys_time_h='<'sys/time.h'>'
8668 fi
8669
8670
8671 fi
8672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
8673 $as_echo "$gl_cv_next_sys_time_h" >&6; }
8674 fi
8675 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
8676
8677 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
8678 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
8679 gl_next_as_first_directive='<'sys/time.h'>'
8680 else
8681 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
8682 gl_next_as_first_directive=$gl_cv_next_sys_time_h
8683 fi
8684 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
8685
8686
8687
8688
8689
8690 if test $ac_cv_header_sys_time_h != yes; then
8691 HAVE_SYS_TIME_H=0
8692 fi
8693
8694
8695
8696
8697
8698 if test $ac_cv_header_sys_socket_h != yes; then
8699 for ac_header in winsock2.h
8700 do :
8701 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
8702 if test "x$ac_cv_header_winsock2_h" = x""yes; then :
8703 cat >>confdefs.h <<_ACEOF
8704 #define HAVE_WINSOCK2_H 1
8705 _ACEOF
8706
8707 fi
8708
8709 done
8710
8711 fi
8712 if test "$ac_cv_header_winsock2_h" = yes; then
8713 HAVE_WINSOCK2_H=1
8714 UNISTD_H_HAVE_WINSOCK2_H=1
8715 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
8716 else
8717 HAVE_WINSOCK2_H=0
8718 fi
8719
8720
8721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
8722 $as_echo_n "checking for struct timeval... " >&6; }
8723 if test "${gl_cv_sys_struct_timeval+set}" = set; then :
8724 $as_echo_n "(cached) " >&6
8725 else
8726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8727 /* end confdefs.h. */
8728 #if HAVE_SYS_TIME_H
8729 #include <sys/time.h>
8730 #endif
8731 #include <time.h>
8732 #if HAVE_WINSOCK2_H
8733 # include <winsock2.h>
8734 #endif
8735
8736 int
8737 main ()
8738 {
8739 static struct timeval x; x.tv_sec = x.tv_usec;
8740 ;
8741 return 0;
8742 }
8743 _ACEOF
8744 if ac_fn_c_try_compile "$LINENO"; then :
8745 gl_cv_sys_struct_timeval=yes
8746 else
8747 gl_cv_sys_struct_timeval=no
8748 fi
8749 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8750
8751 fi
8752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
8753 $as_echo "$gl_cv_sys_struct_timeval" >&6; }
8754 if test $gl_cv_sys_struct_timeval != yes; then
8755 HAVE_STRUCT_TIMEVAL=0
8756 else
8757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
8758 $as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
8759 if test "${gl_cv_sys_struct_timeval_tv_sec+set}" = set; then :
8760 $as_echo_n "(cached) " >&6
8761 else
8762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8763 /* end confdefs.h. */
8764 #if HAVE_SYS_TIME_H
8765 #include <sys/time.h>
8766 #endif
8767 #include <time.h>
8768 #if HAVE_WINSOCK2_H
8769 # include <winsock2.h>
8770 #endif
8771
8772 int
8773 main ()
8774 {
8775 static struct timeval x;
8776 typedef int verify_tv_sec_type[
8777 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
8778 ];
8779
8780 ;
8781 return 0;
8782 }
8783 _ACEOF
8784 if ac_fn_c_try_compile "$LINENO"; then :
8785 gl_cv_sys_struct_timeval_tv_sec=yes
8786 else
8787 gl_cv_sys_struct_timeval_tv_sec=no
8788 fi
8789 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8790
8791 fi
8792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
8793 $as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
8794 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
8795 REPLACE_STRUCT_TIMEVAL=1
8796 fi
8797 fi
8798
8799
8800 for gl_func in gettimeofday; do
8801 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
8802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
8803 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
8804 if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
8805 $as_echo_n "(cached) " >&6
8806 else
8807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8808 /* end confdefs.h. */
8809
8810 #if HAVE_SYS_TIME_H
8811 # include <sys/time.h>
8812 #endif
8813 #include <time.h>
8814
8815 int
8816 main ()
8817 {
8818 #undef $gl_func
8819 (void) $gl_func;
8820 ;
8821 return 0;
8822 }
8823 _ACEOF
8824 if ac_fn_c_try_compile "$LINENO"; then :
8825 eval "$as_gl_Symbol=yes"
8826 else
8827 eval "$as_gl_Symbol=no"
8828 fi
8829 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8830 fi
8831 eval ac_res=\$$as_gl_Symbol
8832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8833 $as_echo "$ac_res" >&6; }
8834 eval as_val=\$$as_gl_Symbol
8835 if test "x$as_val" = x""yes; then :
8836 cat >>confdefs.h <<_ACEOF
8837 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
8838 _ACEOF
8839
8840 eval ac_cv_have_decl_$gl_func=yes
8841 fi
8842 done
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866 if test $gl_cv_have_include_next = yes; then
8867 gl_cv_next_limits_h='<'limits.h'>'
8868 else
8869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5
8870 $as_echo_n "checking absolute name of <limits.h>... " >&6; }
8871 if test "${gl_cv_next_limits_h+set}" = set; then :
8872 $as_echo_n "(cached) " >&6
8873 else
8874
8875 if test $ac_cv_header_limits_h = yes; then
8876
8877
8878
8879
8880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8881 /* end confdefs.h. */
8882 #include <limits.h>
8883 _ACEOF
8884 case "$host_os" in
8885 aix*) gl_absname_cpp="$ac_cpp -C" ;;
8886 *) gl_absname_cpp="$ac_cpp" ;;
8887 esac
8888
8889 case "$host_os" in
8890 mingw*)
8891 gl_dirsep_regex='[/\\]'
8892 ;;
8893 *)
8894 gl_dirsep_regex='\/'
8895 ;;
8896 esac
8897 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
8898 gl_header_literal_regex=`echo 'limits.h' \
8899 | sed -e "$gl_make_literal_regex_sed"`
8900 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
8901 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
8902 s|^/[^/]|//&|
8903 p
8904 q
8905 }'
8906
8907 gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
8908 sed -n "$gl_absolute_header_sed"`
8909
8910 gl_header=$gl_cv_absolute_limits_h
8911 gl_cv_next_limits_h='"'$gl_header'"'
8912 else
8913 gl_cv_next_limits_h='<'limits.h'>'
8914 fi
8915
8916
8917 fi
8918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
8919 $as_echo "$gl_cv_next_limits_h" >&6; }
8920 fi
8921 NEXT_LIMITS_H=$gl_cv_next_limits_h
8922
8923 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
8924 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
8925 gl_next_as_first_directive='<'limits.h'>'
8926 else
8927 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
8928 gl_next_as_first_directive=$gl_cv_next_limits_h
8929 fi
8930 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive
8931
8932
8933
8934
8935
8936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether limits.h has ULLONG_WIDTH etc." >&5
8937 $as_echo_n "checking whether limits.h has ULLONG_WIDTH etc.... " >&6; }
8938 if test "${gl_cv_header_limits_width+set}" = set; then :
8939 $as_echo_n "(cached) " >&6
8940 else
8941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8942 /* end confdefs.h. */
8943 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
8944 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
8945 #endif
8946 #include <limits.h>
8947 int ullw = ULLONG_WIDTH;
8948 int
8949 main ()
8950 {
8951
8952 ;
8953 return 0;
8954 }
8955 _ACEOF
8956 if ac_fn_c_try_compile "$LINENO"; then :
8957 gl_cv_header_limits_width=yes
8958 else
8959 gl_cv_header_limits_width=no
8960 fi
8961 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8962 fi
8963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5
8964 $as_echo "$gl_cv_header_limits_width" >&6; }
8965 if test "$gl_cv_header_limits_width" = yes; then
8966 LIMITS_H=
8967 else
8968 LIMITS_H=limits.h
8969 fi
8970
8971 if test -n "$LIMITS_H"; then
8972 GL_GENERATE_LIMITS_H_TRUE=
8973 GL_GENERATE_LIMITS_H_FALSE='#'
8974 else
8975 GL_GENERATE_LIMITS_H_TRUE='#'
8976 GL_GENERATE_LIMITS_H_FALSE=
8977 fi
8978
8979
8980
8981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
8982 $as_echo_n "checking for unsigned long long int... " >&6; }
8983 if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
8984 $as_echo_n "(cached) " >&6
8985 else
8986 ac_cv_type_unsigned_long_long_int=yes
8987 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
8988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8989 /* end confdefs.h. */
8990
8991 /* For now, do not test the preprocessor; as of 2007 there are too many
8992 implementations with broken preprocessors. Perhaps this can
8993 be revisited in 2012. In the meantime, code should not expect
8994 #if to work with literals wider than 32 bits. */
8995 /* Test literals. */
8996 long long int ll = 9223372036854775807ll;
8997 long long int nll = -9223372036854775807LL;
8998 unsigned long long int ull = 18446744073709551615ULL;
8999 /* Test constant expressions. */
9000 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
9001 ? 1 : -1)];
9002 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
9003 ? 1 : -1)];
9004 int i = 63;
9005 int
9006 main ()
9007 {
9008 /* Test availability of runtime routines for shift and division. */
9009 long long int llmax = 9223372036854775807ll;
9010 unsigned long long int ullmax = 18446744073709551615ull;
9011 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
9012 | (llmax / ll) | (llmax % ll)
9013 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
9014 | (ullmax / ull) | (ullmax % ull));
9015 ;
9016 return 0;
9017 }
9018
9019 _ACEOF
9020 if ac_fn_c_try_link "$LINENO"; then :
9021
9022 else
9023 ac_cv_type_unsigned_long_long_int=no
9024 fi
9025 rm -f core conftest.err conftest.$ac_objext \
9026 conftest$ac_exeext conftest.$ac_ext
9027 fi
9028 fi
9029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
9030 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
9031 if test $ac_cv_type_unsigned_long_long_int = yes; then
9032
9033 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
9034
9035 fi
9036
9037
9038
9039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
9040 $as_echo_n "checking for long long int... " >&6; }
9041 if test "${ac_cv_type_long_long_int+set}" = set; then :
9042 $as_echo_n "(cached) " >&6
9043 else
9044 ac_cv_type_long_long_int=yes
9045 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
9046 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
9047 if test $ac_cv_type_long_long_int = yes; then
9048 if test "$cross_compiling" = yes; then :
9049 :
9050 else
9051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9052 /* end confdefs.h. */
9053 #include <limits.h>
9054 #ifndef LLONG_MAX
9055 # define HALF \
9056 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
9057 # define LLONG_MAX (HALF - 1 + HALF)
9058 #endif
9059 int
9060 main ()
9061 {
9062 long long int n = 1;
9063 int i;
9064 for (i = 0; ; i++)
9065 {
9066 long long int m = n << i;
9067 if (m >> i != n)
9068 return 1;
9069 if (LLONG_MAX / 2 < m)
9070 break;
9071 }
9072 return 0;
9073 ;
9074 return 0;
9075 }
9076 _ACEOF
9077 if ac_fn_c_try_run "$LINENO"; then :
9078
9079 else
9080 ac_cv_type_long_long_int=no
9081 fi
9082 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9083 conftest.$ac_objext conftest.beam conftest.$ac_ext
9084 fi
9085
9086 fi
9087 fi
9088 fi
9089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
9090 $as_echo "$ac_cv_type_long_long_int" >&6; }
9091 if test $ac_cv_type_long_long_int = yes; then
9092
9093 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
9094
9095 fi
9096
9097
9098
9099
9100
9101
9102 gl_cv_c_multiarch=no
9103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9104 /* end confdefs.h. */
9105 #ifndef __APPLE_CC__
9106 not a universal capable compiler
9107 #endif
9108 typedef int dummy;
9109
9110 _ACEOF
9111 if ac_fn_c_try_compile "$LINENO"; then :
9112
9113 arch=
9114 prev=
9115 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
9116 if test -n "$prev"; then
9117 case $word in
9118 i?86 | x86_64 | ppc | ppc64)
9119 if test -z "$arch" || test "$arch" = "$word"; then
9120 arch="$word"
9121 else
9122 gl_cv_c_multiarch=yes
9123 fi
9124 ;;
9125 esac
9126 prev=
9127 else
9128 if test "x$word" = "x-arch"; then
9129 prev=arch
9130 fi
9131 fi
9132 done
9133
9134 fi
9135 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9136 if test $gl_cv_c_multiarch = yes; then
9137 APPLE_UNIVERSAL_BUILD=1
9138 else
9139 APPLE_UNIVERSAL_BUILD=0
9140 fi
9141
9142
9143
9144
9145
9146
9147
9148 if test $ac_cv_type_long_long_int = yes; then
9149 HAVE_LONG_LONG_INT=1
9150 else
9151 HAVE_LONG_LONG_INT=0
9152 fi
9153
9154
9155 if test $ac_cv_type_unsigned_long_long_int = yes; then
9156 HAVE_UNSIGNED_LONG_LONG_INT=1
9157 else
9158 HAVE_UNSIGNED_LONG_LONG_INT=0
9159 fi
9160
9161
9162
9163 if test $ac_cv_header_wchar_h = yes; then
9164 HAVE_WCHAR_H=1
9165 else
9166 HAVE_WCHAR_H=0
9167 fi
9168
9169
9170 if test $ac_cv_header_inttypes_h = yes; then
9171 HAVE_INTTYPES_H=1
9172 else
9173 HAVE_INTTYPES_H=0
9174 fi
9175
9176
9177 if test $ac_cv_header_sys_types_h = yes; then
9178 HAVE_SYS_TYPES_H=1
9179 else
9180 HAVE_SYS_TYPES_H=0
9181 fi
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193 if test $gl_cv_have_include_next = yes; then
9194 gl_cv_next_stdint_h='<'stdint.h'>'
9195 else
9196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
9197 $as_echo_n "checking absolute name of <stdint.h>... " >&6; }
9198 if test "${gl_cv_next_stdint_h+set}" = set; then :
9199 $as_echo_n "(cached) " >&6
9200 else
9201
9202 if test $ac_cv_header_stdint_h = yes; then
9203
9204
9205
9206
9207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9208 /* end confdefs.h. */
9209 #include <stdint.h>
9210 _ACEOF
9211 case "$host_os" in
9212 aix*) gl_absname_cpp="$ac_cpp -C" ;;
9213 *) gl_absname_cpp="$ac_cpp" ;;
9214 esac
9215
9216 case "$host_os" in
9217 mingw*)
9218 gl_dirsep_regex='[/\\]'
9219 ;;
9220 *)
9221 gl_dirsep_regex='\/'
9222 ;;
9223 esac
9224 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
9225 gl_header_literal_regex=`echo 'stdint.h' \
9226 | sed -e "$gl_make_literal_regex_sed"`
9227 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
9228 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
9229 s|^/[^/]|//&|
9230 p
9231 q
9232 }'
9233
9234 gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
9235 sed -n "$gl_absolute_header_sed"`
9236
9237 gl_header=$gl_cv_absolute_stdint_h
9238 gl_cv_next_stdint_h='"'$gl_header'"'
9239 else
9240 gl_cv_next_stdint_h='<'stdint.h'>'
9241 fi
9242
9243
9244 fi
9245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
9246 $as_echo "$gl_cv_next_stdint_h" >&6; }
9247 fi
9248 NEXT_STDINT_H=$gl_cv_next_stdint_h
9249
9250 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
9251 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
9252 gl_next_as_first_directive='<'stdint.h'>'
9253 else
9254 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
9255 gl_next_as_first_directive=$gl_cv_next_stdint_h
9256 fi
9257 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
9258
9259
9260
9261
9262 if test $ac_cv_header_stdint_h = yes; then
9263 HAVE_STDINT_H=1
9264 else
9265 HAVE_STDINT_H=0
9266 fi
9267
9268
9269 if test $ac_cv_header_stdint_h = yes; then
9270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
9271 $as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
9272 if test "${gl_cv_header_working_stdint_h+set}" = set; then :
9273 $as_echo_n "(cached) " >&6
9274 else
9275 gl_cv_header_working_stdint_h=no
9276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9277 /* end confdefs.h. */
9278
9279
9280 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
9281 #define __STDC_CONSTANT_MACROS 1
9282 #define __STDC_LIMIT_MACROS 1
9283 #include <stdint.h>
9284 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
9285 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
9286 #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
9287 #endif
9288
9289
9290 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
9291 included before <wchar.h>. */
9292 #include <stddef.h>
9293 #include <signal.h>
9294 #if HAVE_WCHAR_H
9295 # include <stdio.h>
9296 # include <time.h>
9297 # include <wchar.h>
9298 #endif
9299
9300
9301 #ifdef INT8_MAX
9302 int8_t a1 = INT8_MAX;
9303 int8_t a1min = INT8_MIN;
9304 #endif
9305 #ifdef INT16_MAX
9306 int16_t a2 = INT16_MAX;
9307 int16_t a2min = INT16_MIN;
9308 #endif
9309 #ifdef INT32_MAX
9310 int32_t a3 = INT32_MAX;
9311 int32_t a3min = INT32_MIN;
9312 #endif
9313 #ifdef INT64_MAX
9314 int64_t a4 = INT64_MAX;
9315 int64_t a4min = INT64_MIN;
9316 #endif
9317 #ifdef UINT8_MAX
9318 uint8_t b1 = UINT8_MAX;
9319 #else
9320 typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
9321 #endif
9322 #ifdef UINT16_MAX
9323 uint16_t b2 = UINT16_MAX;
9324 #endif
9325 #ifdef UINT32_MAX
9326 uint32_t b3 = UINT32_MAX;
9327 #endif
9328 #ifdef UINT64_MAX
9329 uint64_t b4 = UINT64_MAX;
9330 #endif
9331 int_least8_t c1 = INT8_C (0x7f);
9332 int_least8_t c1max = INT_LEAST8_MAX;
9333 int_least8_t c1min = INT_LEAST8_MIN;
9334 int_least16_t c2 = INT16_C (0x7fff);
9335 int_least16_t c2max = INT_LEAST16_MAX;
9336 int_least16_t c2min = INT_LEAST16_MIN;
9337 int_least32_t c3 = INT32_C (0x7fffffff);
9338 int_least32_t c3max = INT_LEAST32_MAX;
9339 int_least32_t c3min = INT_LEAST32_MIN;
9340 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
9341 int_least64_t c4max = INT_LEAST64_MAX;
9342 int_least64_t c4min = INT_LEAST64_MIN;
9343 uint_least8_t d1 = UINT8_C (0xff);
9344 uint_least8_t d1max = UINT_LEAST8_MAX;
9345 uint_least16_t d2 = UINT16_C (0xffff);
9346 uint_least16_t d2max = UINT_LEAST16_MAX;
9347 uint_least32_t d3 = UINT32_C (0xffffffff);
9348 uint_least32_t d3max = UINT_LEAST32_MAX;
9349 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
9350 uint_least64_t d4max = UINT_LEAST64_MAX;
9351 int_fast8_t e1 = INT_FAST8_MAX;
9352 int_fast8_t e1min = INT_FAST8_MIN;
9353 int_fast16_t e2 = INT_FAST16_MAX;
9354 int_fast16_t e2min = INT_FAST16_MIN;
9355 int_fast32_t e3 = INT_FAST32_MAX;
9356 int_fast32_t e3min = INT_FAST32_MIN;
9357 int_fast64_t e4 = INT_FAST64_MAX;
9358 int_fast64_t e4min = INT_FAST64_MIN;
9359 uint_fast8_t f1 = UINT_FAST8_MAX;
9360 uint_fast16_t f2 = UINT_FAST16_MAX;
9361 uint_fast32_t f3 = UINT_FAST32_MAX;
9362 uint_fast64_t f4 = UINT_FAST64_MAX;
9363 #ifdef INTPTR_MAX
9364 intptr_t g = INTPTR_MAX;
9365 intptr_t gmin = INTPTR_MIN;
9366 #endif
9367 #ifdef UINTPTR_MAX
9368 uintptr_t h = UINTPTR_MAX;
9369 #endif
9370 intmax_t i = INTMAX_MAX;
9371 uintmax_t j = UINTMAX_MAX;
9372
9373 /* Check that SIZE_MAX has the correct type, if possible. */
9374 #if 201112 <= __STDC_VERSION__
9375 int k = _Generic (SIZE_MAX, size_t: 0);
9376 #elif (2 <= __GNUC__ || defined __IBM__TYPEOF__ \
9377 || (0x5110 <= __SUNPRO_C && !__STDC__))
9378 extern size_t k;
9379 extern __typeof__ (SIZE_MAX) k;
9380 #endif
9381
9382 #include <limits.h> /* for CHAR_BIT */
9383 #define TYPE_MINIMUM(t) \
9384 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
9385 #define TYPE_MAXIMUM(t) \
9386 ((t) ((t) 0 < (t) -1 \
9387 ? (t) -1 \
9388 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
9389 struct s {
9390 int check_PTRDIFF:
9391 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
9392 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
9393 ? 1 : -1;
9394 /* Detect bug in FreeBSD 6.0 / ia64. */
9395 int check_SIG_ATOMIC:
9396 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
9397 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
9398 ? 1 : -1;
9399 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
9400 int check_WCHAR:
9401 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
9402 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
9403 ? 1 : -1;
9404 /* Detect bug in mingw. */
9405 int check_WINT:
9406 WINT_MIN == TYPE_MINIMUM (wint_t)
9407 && WINT_MAX == TYPE_MAXIMUM (wint_t)
9408 ? 1 : -1;
9409
9410 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
9411 int check_UINT8_C:
9412 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
9413 int check_UINT16_C:
9414 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
9415
9416 /* Detect bugs in OpenBSD 3.9 stdint.h. */
9417 #ifdef UINT8_MAX
9418 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
9419 #endif
9420 #ifdef UINT16_MAX
9421 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
9422 #endif
9423 #ifdef UINT32_MAX
9424 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
9425 #endif
9426 #ifdef UINT64_MAX
9427 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
9428 #endif
9429 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
9430 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
9431 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
9432 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
9433 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
9434 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
9435 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
9436 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
9437 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
9438 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
9439 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
9440 };
9441
9442 int
9443 main ()
9444 {
9445
9446 ;
9447 return 0;
9448 }
9449 _ACEOF
9450 if ac_fn_c_try_compile "$LINENO"; then :
9451 if test "$cross_compiling" = yes; then :
9452 gl_cv_header_working_stdint_h=yes
9453
9454 else
9455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9456 /* end confdefs.h. */
9457
9458
9459 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
9460 #define __STDC_CONSTANT_MACROS 1
9461 #define __STDC_LIMIT_MACROS 1
9462 #include <stdint.h>
9463
9464
9465 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
9466 included before <wchar.h>. */
9467 #include <stddef.h>
9468 #include <signal.h>
9469 #if HAVE_WCHAR_H
9470 # include <stdio.h>
9471 # include <time.h>
9472 # include <wchar.h>
9473 #endif
9474
9475
9476 #include <stdio.h>
9477 #include <string.h>
9478 #define MVAL(macro) MVAL1(macro)
9479 #define MVAL1(expression) #expression
9480 static const char *macro_values[] =
9481 {
9482 #ifdef INT8_MAX
9483 MVAL (INT8_MAX),
9484 #endif
9485 #ifdef INT16_MAX
9486 MVAL (INT16_MAX),
9487 #endif
9488 #ifdef INT32_MAX
9489 MVAL (INT32_MAX),
9490 #endif
9491 #ifdef INT64_MAX
9492 MVAL (INT64_MAX),
9493 #endif
9494 #ifdef UINT8_MAX
9495 MVAL (UINT8_MAX),
9496 #endif
9497 #ifdef UINT16_MAX
9498 MVAL (UINT16_MAX),
9499 #endif
9500 #ifdef UINT32_MAX
9501 MVAL (UINT32_MAX),
9502 #endif
9503 #ifdef UINT64_MAX
9504 MVAL (UINT64_MAX),
9505 #endif
9506 NULL
9507 };
9508
9509 int
9510 main ()
9511 {
9512
9513 const char **mv;
9514 for (mv = macro_values; *mv != NULL; mv++)
9515 {
9516 const char *value = *mv;
9517 /* Test whether it looks like a cast expression. */
9518 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
9519 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
9520 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
9521 || strncmp (value, "((int)"/*)*/, 6) == 0
9522 || strncmp (value, "((signed short)"/*)*/, 15) == 0
9523 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
9524 return mv - macro_values + 1;
9525 }
9526 return 0;
9527
9528 ;
9529 return 0;
9530 }
9531 _ACEOF
9532 if ac_fn_c_try_run "$LINENO"; then :
9533 gl_cv_header_working_stdint_h=yes
9534 fi
9535 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9536 conftest.$ac_objext conftest.beam conftest.$ac_ext
9537 fi
9538
9539
9540 fi
9541 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9542
9543 fi
9544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
9545 $as_echo "$gl_cv_header_working_stdint_h" >&6; }
9546 fi
9547
9548 HAVE_C99_STDINT_H=0
9549 HAVE_SYS_BITYPES_H=0
9550 HAVE_SYS_INTTYPES_H=0
9551 STDINT_H=stdint.h
9552 if test "$gl_cv_header_working_stdint_h" = yes; then
9553 HAVE_C99_STDINT_H=1
9554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h predates C++11" >&5
9555 $as_echo_n "checking whether stdint.h predates C++11... " >&6; }
9556 if test "${gl_cv_header_stdint_predates_cxx11_h+set}" = set; then :
9557 $as_echo_n "(cached) " >&6
9558 else
9559 gl_cv_header_stdint_predates_cxx11_h=yes
9560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9561 /* end confdefs.h. */
9562
9563
9564 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
9565 #include <stdint.h>
9566
9567
9568 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
9569 included before <wchar.h>. */
9570 #include <stddef.h>
9571 #include <signal.h>
9572 #if HAVE_WCHAR_H
9573 # include <stdio.h>
9574 # include <time.h>
9575 # include <wchar.h>
9576 #endif
9577
9578
9579 intmax_t im = INTMAX_MAX;
9580 int32_t i32 = INT32_C (0x7fffffff);
9581
9582 int
9583 main ()
9584 {
9585
9586 ;
9587 return 0;
9588 }
9589 _ACEOF
9590 if ac_fn_c_try_compile "$LINENO"; then :
9591 gl_cv_header_stdint_predates_cxx11_h=no
9592 fi
9593 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9594 fi
9595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_predates_cxx11_h" >&5
9596 $as_echo "$gl_cv_header_stdint_predates_cxx11_h" >&6; }
9597
9598 if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then
9599
9600 $as_echo "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
9601
9602
9603 $as_echo "#define __STDC_LIMIT_MACROS 1" >>confdefs.h
9604
9605 fi
9606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5
9607 $as_echo_n "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; }
9608 if test "${gl_cv_header_stdint_width+set}" = set; then :
9609 $as_echo_n "(cached) " >&6
9610 else
9611 gl_cv_header_stdint_width=no
9612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9613 /* end confdefs.h. */
9614
9615 /* Work if build is not clean. */
9616 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
9617 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
9618 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
9619 #endif
9620 #include <stdint.h>
9621
9622 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
9623 included before <wchar.h>. */
9624 #include <stddef.h>
9625 #include <signal.h>
9626 #if HAVE_WCHAR_H
9627 # include <stdio.h>
9628 # include <time.h>
9629 # include <wchar.h>
9630 #endif
9631
9632 int iw = UINTMAX_WIDTH;
9633
9634 int
9635 main ()
9636 {
9637
9638 ;
9639 return 0;
9640 }
9641 _ACEOF
9642 if ac_fn_c_try_compile "$LINENO"; then :
9643 gl_cv_header_stdint_width=yes
9644 fi
9645 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9646 fi
9647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5
9648 $as_echo "$gl_cv_header_stdint_width" >&6; }
9649 if test "$gl_cv_header_stdint_width" = yes; then
9650 STDINT_H=
9651 fi
9652 else
9653 for ac_header in sys/inttypes.h sys/bitypes.h
9654 do :
9655 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9656 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9657 eval as_val=\$$as_ac_Header
9658 if test "x$as_val" = x""yes; then :
9659 cat >>confdefs.h <<_ACEOF
9660 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9661 _ACEOF
9662
9663 fi
9664
9665 done
9666
9667 if test $ac_cv_header_sys_inttypes_h = yes; then
9668 HAVE_SYS_INTTYPES_H=1
9669 fi
9670 if test $ac_cv_header_sys_bitypes_h = yes; then
9671 HAVE_SYS_BITYPES_H=1
9672 fi
9673
9674
9675 if test $APPLE_UNIVERSAL_BUILD = 0; then
9676
9677
9678 for gltype in ptrdiff_t size_t ; do
9679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
9680 $as_echo_n "checking for bit size of $gltype... " >&6; }
9681 if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
9682 $as_echo_n "(cached) " >&6
9683 else
9684 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
9685 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
9686 included before <wchar.h>. */
9687 #include <stddef.h>
9688 #include <signal.h>
9689 #if HAVE_WCHAR_H
9690 # include <stdio.h>
9691 # include <time.h>
9692 # include <wchar.h>
9693 #endif
9694
9695 #include <limits.h>"; then :
9696
9697 else
9698 result=unknown
9699 fi
9700
9701 eval gl_cv_bitsizeof_${gltype}=\$result
9702
9703 fi
9704 eval ac_res=\$gl_cv_bitsizeof_${gltype}
9705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9706 $as_echo "$ac_res" >&6; }
9707 eval result=\$gl_cv_bitsizeof_${gltype}
9708 if test $result = unknown; then
9709 result=0
9710 fi
9711 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
9712 cat >>confdefs.h <<_ACEOF
9713 #define BITSIZEOF_${GLTYPE} $result
9714 _ACEOF
9715
9716 eval BITSIZEOF_${GLTYPE}=\$result
9717 done
9718
9719
9720 fi
9721
9722
9723 for gltype in sig_atomic_t wchar_t wint_t ; do
9724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
9725 $as_echo_n "checking for bit size of $gltype... " >&6; }
9726 if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
9727 $as_echo_n "(cached) " >&6
9728 else
9729 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
9730 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
9731 included before <wchar.h>. */
9732 #include <stddef.h>
9733 #include <signal.h>
9734 #if HAVE_WCHAR_H
9735 # include <stdio.h>
9736 # include <time.h>
9737 # include <wchar.h>
9738 #endif
9739
9740 #include <limits.h>"; then :
9741
9742 else
9743 result=unknown
9744 fi
9745
9746 eval gl_cv_bitsizeof_${gltype}=\$result
9747
9748 fi
9749 eval ac_res=\$gl_cv_bitsizeof_${gltype}
9750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9751 $as_echo "$ac_res" >&6; }
9752 eval result=\$gl_cv_bitsizeof_${gltype}
9753 if test $result = unknown; then
9754 result=0
9755 fi
9756 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
9757 cat >>confdefs.h <<_ACEOF
9758 #define BITSIZEOF_${GLTYPE} $result
9759 _ACEOF
9760
9761 eval BITSIZEOF_${GLTYPE}=\$result
9762 done
9763
9764
9765
9766
9767 for gltype in sig_atomic_t wchar_t wint_t ; do
9768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
9769 $as_echo_n "checking whether $gltype is signed... " >&6; }
9770 if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then :
9771 $as_echo_n "(cached) " >&6
9772 else
9773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9774 /* end confdefs.h. */
9775
9776 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
9777 included before <wchar.h>. */
9778 #include <stddef.h>
9779 #include <signal.h>
9780 #if HAVE_WCHAR_H
9781 # include <stdio.h>
9782 # include <time.h>
9783 # include <wchar.h>
9784 #endif
9785
9786 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
9787 int
9788 main ()
9789 {
9790
9791 ;
9792 return 0;
9793 }
9794 _ACEOF
9795 if ac_fn_c_try_compile "$LINENO"; then :
9796 result=yes
9797 else
9798 result=no
9799 fi
9800 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9801 eval gl_cv_type_${gltype}_signed=\$result
9802
9803 fi
9804 eval ac_res=\$gl_cv_type_${gltype}_signed
9805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9806 $as_echo "$ac_res" >&6; }
9807 eval result=\$gl_cv_type_${gltype}_signed
9808 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
9809 if test "$result" = yes; then
9810 cat >>confdefs.h <<_ACEOF
9811 #define HAVE_SIGNED_${GLTYPE} 1
9812 _ACEOF
9813
9814 eval HAVE_SIGNED_${GLTYPE}=1
9815 else
9816 eval HAVE_SIGNED_${GLTYPE}=0
9817 fi
9818 done
9819
9820
9821 gl_cv_type_ptrdiff_t_signed=yes
9822 gl_cv_type_size_t_signed=no
9823 if test $APPLE_UNIVERSAL_BUILD = 0; then
9824
9825
9826 for gltype in ptrdiff_t size_t ; do
9827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
9828 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
9829 if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
9830 $as_echo_n "(cached) " >&6
9831 else
9832 eval gl_cv_type_${gltype}_suffix=no
9833 eval result=\$gl_cv_type_${gltype}_signed
9834 if test "$result" = yes; then
9835 glsufu=
9836 else
9837 glsufu=u
9838 fi
9839 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
9840 case $glsuf in
9841 '') gltype1='int';;
9842 l) gltype1='long int';;
9843 ll) gltype1='long long int';;
9844 i64) gltype1='__int64';;
9845 u) gltype1='unsigned int';;
9846 ul) gltype1='unsigned long int';;
9847 ull) gltype1='unsigned long long int';;
9848 ui64)gltype1='unsigned __int64';;
9849 esac
9850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9851 /* end confdefs.h. */
9852
9853 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
9854 included before <wchar.h>. */
9855 #include <stddef.h>
9856 #include <signal.h>
9857 #if HAVE_WCHAR_H
9858 # include <stdio.h>
9859 # include <time.h>
9860 # include <wchar.h>
9861 #endif
9862
9863 extern $gltype foo;
9864 extern $gltype1 foo;
9865 int
9866 main ()
9867 {
9868
9869 ;
9870 return 0;
9871 }
9872 _ACEOF
9873 if ac_fn_c_try_compile "$LINENO"; then :
9874 eval gl_cv_type_${gltype}_suffix=\$glsuf
9875 fi
9876 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9877 eval result=\$gl_cv_type_${gltype}_suffix
9878 test "$result" != no && break
9879 done
9880 fi
9881 eval ac_res=\$gl_cv_type_${gltype}_suffix
9882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9883 $as_echo "$ac_res" >&6; }
9884 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
9885 eval result=\$gl_cv_type_${gltype}_suffix
9886 test "$result" = no && result=
9887 eval ${GLTYPE}_SUFFIX=\$result
9888 cat >>confdefs.h <<_ACEOF
9889 #define ${GLTYPE}_SUFFIX $result
9890 _ACEOF
9891
9892 done
9893
9894
9895 fi
9896
9897
9898 for gltype in sig_atomic_t wchar_t wint_t ; do
9899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
9900 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
9901 if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
9902 $as_echo_n "(cached) " >&6
9903 else
9904 eval gl_cv_type_${gltype}_suffix=no
9905 eval result=\$gl_cv_type_${gltype}_signed
9906 if test "$result" = yes; then
9907 glsufu=
9908 else
9909 glsufu=u
9910 fi
9911 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
9912 case $glsuf in
9913 '') gltype1='int';;
9914 l) gltype1='long int';;
9915 ll) gltype1='long long int';;
9916 i64) gltype1='__int64';;
9917 u) gltype1='unsigned int';;
9918 ul) gltype1='unsigned long int';;
9919 ull) gltype1='unsigned long long int';;
9920 ui64)gltype1='unsigned __int64';;
9921 esac
9922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9923 /* end confdefs.h. */
9924
9925 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
9926 included before <wchar.h>. */
9927 #include <stddef.h>
9928 #include <signal.h>
9929 #if HAVE_WCHAR_H
9930 # include <stdio.h>
9931 # include <time.h>
9932 # include <wchar.h>
9933 #endif
9934
9935 extern $gltype foo;
9936 extern $gltype1 foo;
9937 int
9938 main ()
9939 {
9940
9941 ;
9942 return 0;
9943 }
9944 _ACEOF
9945 if ac_fn_c_try_compile "$LINENO"; then :
9946 eval gl_cv_type_${gltype}_suffix=\$glsuf
9947 fi
9948 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9949 eval result=\$gl_cv_type_${gltype}_suffix
9950 test "$result" != no && break
9951 done
9952 fi
9953 eval ac_res=\$gl_cv_type_${gltype}_suffix
9954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9955 $as_echo "$ac_res" >&6; }
9956 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
9957 eval result=\$gl_cv_type_${gltype}_suffix
9958 test "$result" = no && result=
9959 eval ${GLTYPE}_SUFFIX=\$result
9960 cat >>confdefs.h <<_ACEOF
9961 #define ${GLTYPE}_SUFFIX $result
9962 _ACEOF
9963
9964 done
9965
9966
9967
9968 if test $BITSIZEOF_WINT_T -lt 32; then
9969 BITSIZEOF_WINT_T=32
9970 fi
9971
9972 fi
9973
9974 # The substitute stdint.h needs the substitute limit.h's _GL_INTEGER_WIDTH.
9975 LIMITS_H=limits.h
9976 if test -n "$LIMITS_H"; then
9977 GL_GENERATE_LIMITS_H_TRUE=
9978 GL_GENERATE_LIMITS_H_FALSE='#'
9979 else
9980 GL_GENERATE_LIMITS_H_TRUE='#'
9981 GL_GENERATE_LIMITS_H_FALSE=
9982 fi
9983
9984
9985
9986
9987
9988
9989 if test -n "$STDINT_H"; then
9990 GL_GENERATE_STDINT_H_TRUE=
9991 GL_GENERATE_STDINT_H_FALSE='#'
9992 else
9993 GL_GENERATE_STDINT_H_TRUE='#'
9994 GL_GENERATE_STDINT_H_FALSE=
9995 fi
9996
9997
9998
9999
10000
10001 GNULIB_IMAXABS=0;
10002 GNULIB_IMAXDIV=0;
10003 GNULIB_STRTOIMAX=0;
10004 GNULIB_STRTOUMAX=0;
10005 HAVE_DECL_IMAXABS=1;
10006 HAVE_DECL_IMAXDIV=1;
10007 HAVE_DECL_STRTOIMAX=1;
10008 HAVE_DECL_STRTOUMAX=1;
10009 REPLACE_STRTOIMAX=0;
10010 REPLACE_STRTOUMAX=0;
10011 INT32_MAX_LT_INTMAX_MAX=1;
10012 INT64_MAX_EQ_LONG_MAX='defined _LP64';
10013 PRI_MACROS_BROKEN=0;
10014 PRIPTR_PREFIX=__PRIPTR_PREFIX;
10015 UINT32_MAX_LT_UINTMAX_MAX=1;
10016 UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
10017
10018
10019
10020
10021
10022
10023
10024
10025
10026
10027
10028
10029
10030
10031
10032 if test $gl_cv_have_include_next = yes; then
10033 gl_cv_next_inttypes_h='<'inttypes.h'>'
10034 else
10035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
10036 $as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
10037 if test "${gl_cv_next_inttypes_h+set}" = set; then :
10038 $as_echo_n "(cached) " >&6
10039 else
10040
10041 if test $ac_cv_header_inttypes_h = yes; then
10042
10043
10044
10045
10046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10047 /* end confdefs.h. */
10048 #include <inttypes.h>
10049 _ACEOF
10050 case "$host_os" in
10051 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10052 *) gl_absname_cpp="$ac_cpp" ;;
10053 esac
10054
10055 case "$host_os" in
10056 mingw*)
10057 gl_dirsep_regex='[/\\]'
10058 ;;
10059 *)
10060 gl_dirsep_regex='\/'
10061 ;;
10062 esac
10063 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10064 gl_header_literal_regex=`echo 'inttypes.h' \
10065 | sed -e "$gl_make_literal_regex_sed"`
10066 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10067 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10068 s|^/[^/]|//&|
10069 p
10070 q
10071 }'
10072
10073 gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10074 sed -n "$gl_absolute_header_sed"`
10075
10076 gl_header=$gl_cv_absolute_inttypes_h
10077 gl_cv_next_inttypes_h='"'$gl_header'"'
10078 else
10079 gl_cv_next_inttypes_h='<'inttypes.h'>'
10080 fi
10081
10082
10083 fi
10084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
10085 $as_echo "$gl_cv_next_inttypes_h" >&6; }
10086 fi
10087 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
10088
10089 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10090 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10091 gl_next_as_first_directive='<'inttypes.h'>'
10092 else
10093 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10094 gl_next_as_first_directive=$gl_cv_next_inttypes_h
10095 fi
10096 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
10097
10098
10099
10100
10101
10102
10103
10104
10105 for gl_func in imaxabs imaxdiv strtoimax strtoumax; do
10106 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
10107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
10108 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
10109 if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
10110 $as_echo_n "(cached) " >&6
10111 else
10112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10113 /* end confdefs.h. */
10114 #include <inttypes.h>
10115
10116 int
10117 main ()
10118 {
10119 #undef $gl_func
10120 (void) $gl_func;
10121 ;
10122 return 0;
10123 }
10124 _ACEOF
10125 if ac_fn_c_try_compile "$LINENO"; then :
10126 eval "$as_gl_Symbol=yes"
10127 else
10128 eval "$as_gl_Symbol=no"
10129 fi
10130 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10131 fi
10132 eval ac_res=\$$as_gl_Symbol
10133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10134 $as_echo "$ac_res" >&6; }
10135 eval as_val=\$$as_gl_Symbol
10136 if test "x$as_val" = x""yes; then :
10137 cat >>confdefs.h <<_ACEOF
10138 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
10139 _ACEOF
10140
10141 eval ac_cv_have_decl_$gl_func=yes
10142 fi
10143 done
10144
10145
10146
10147 for ac_header in inttypes.h
10148 do :
10149 ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
10150 if test "x$ac_cv_header_inttypes_h" = x""yes; then :
10151 cat >>confdefs.h <<_ACEOF
10152 #define HAVE_INTTYPES_H 1
10153 _ACEOF
10154
10155 fi
10156
10157 done
10158
10159 if test $ac_cv_header_inttypes_h = yes; then
10160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5
10161 $as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; }
10162 if test "${gt_cv_inttypes_pri_broken+set}" = set; then :
10163 $as_echo_n "(cached) " >&6
10164 else
10165
10166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10167 /* end confdefs.h. */
10168
10169 #include <inttypes.h>
10170 #ifdef PRId32
10171 char *p = PRId32;
10172 #endif
10173
10174 int
10175 main ()
10176 {
10177
10178 ;
10179 return 0;
10180 }
10181 _ACEOF
10182 if ac_fn_c_try_compile "$LINENO"; then :
10183 gt_cv_inttypes_pri_broken=no
10184 else
10185 gt_cv_inttypes_pri_broken=yes
10186 fi
10187 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10188
10189 fi
10190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5
10191 $as_echo "$gt_cv_inttypes_pri_broken" >&6; }
10192 fi
10193 if test "$gt_cv_inttypes_pri_broken" = yes; then
10194
10195 cat >>confdefs.h <<_ACEOF
10196 #define PRI_MACROS_BROKEN 1
10197 _ACEOF
10198
10199 PRI_MACROS_BROKEN=1
10200 else
10201 PRI_MACROS_BROKEN=0
10202 fi
10203
10204
10205
10206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
10207 $as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
10208 if test "${gl_cv_cc_double_expbit0+set}" = set; then :
10209 $as_echo_n "(cached) " >&6
10210 else
10211
10212 if test "$cross_compiling" = yes; then :
10213
10214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10215 /* end confdefs.h. */
10216
10217 #if defined arm || defined __arm || defined __arm__
10218 mixed_endianness
10219 #endif
10220
10221 _ACEOF
10222 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10223 $EGREP "mixed_endianness" >/dev/null 2>&1; then :
10224 gl_cv_cc_double_expbit0="unknown"
10225 else
10226
10227 :
10228 if test "${ac_cv_c_bigendian+set}" = set; then :
10229 $as_echo_n "(cached) " >&6
10230 else
10231 ac_cv_c_bigendian=unknown
10232 # See if we're dealing with a universal compiler.
10233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10234 /* end confdefs.h. */
10235 #ifndef __APPLE_CC__
10236 not a universal capable compiler
10237 #endif
10238 typedef int dummy;
10239
10240 _ACEOF
10241 if ac_fn_c_try_compile "$LINENO"; then :
10242
10243 # Check for potential -arch flags. It is not universal unless
10244 # there are at least two -arch flags with different values.
10245 ac_arch=
10246 ac_prev=
10247 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
10248 if test -n "$ac_prev"; then
10249 case $ac_word in
10250 i?86 | x86_64 | ppc | ppc64)
10251 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
10252 ac_arch=$ac_word
10253 else
10254 ac_cv_c_bigendian=universal
10255 break
10256 fi
10257 ;;
10258 esac
10259 ac_prev=
10260 elif test "x$ac_word" = "x-arch"; then
10261 ac_prev=arch
10262 fi
10263 done
10264 fi
10265 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10266 if test $ac_cv_c_bigendian = unknown; then
10267 # See if sys/param.h defines the BYTE_ORDER macro.
10268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10269 /* end confdefs.h. */
10270 #include <sys/types.h>
10271 #include <sys/param.h>
10272
10273 int
10274 main ()
10275 {
10276 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
10277 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
10278 && LITTLE_ENDIAN)
10279 bogus endian macros
10280 #endif
10281
10282 ;
10283 return 0;
10284 }
10285 _ACEOF
10286 if ac_fn_c_try_compile "$LINENO"; then :
10287 # It does; now see whether it defined to BIG_ENDIAN or not.
10288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10289 /* end confdefs.h. */
10290 #include <sys/types.h>
10291 #include <sys/param.h>
10292
10293 int
10294 main ()
10295 {
10296 #if BYTE_ORDER != BIG_ENDIAN
10297 not big endian
10298 #endif
10299
10300 ;
10301 return 0;
10302 }
10303 _ACEOF
10304 if ac_fn_c_try_compile "$LINENO"; then :
10305 ac_cv_c_bigendian=yes
10306 else
10307 ac_cv_c_bigendian=no
10308 fi
10309 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10310 fi
10311 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10312 fi
10313 if test $ac_cv_c_bigendian = unknown; then
10314 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
10315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10316 /* end confdefs.h. */
10317 #include <limits.h>
10318
10319 int
10320 main ()
10321 {
10322 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
10323 bogus endian macros
10324 #endif
10325
10326 ;
10327 return 0;
10328 }
10329 _ACEOF
10330 if ac_fn_c_try_compile "$LINENO"; then :
10331 # It does; now see whether it defined to _BIG_ENDIAN or not.
10332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10333 /* end confdefs.h. */
10334 #include <limits.h>
10335
10336 int
10337 main ()
10338 {
10339 #ifndef _BIG_ENDIAN
10340 not big endian
10341 #endif
10342
10343 ;
10344 return 0;
10345 }
10346 _ACEOF
10347 if ac_fn_c_try_compile "$LINENO"; then :
10348 ac_cv_c_bigendian=yes
10349 else
10350 ac_cv_c_bigendian=no
10351 fi
10352 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10353 fi
10354 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10355 fi
10356 if test $ac_cv_c_bigendian = unknown; then
10357 # Compile a test program.
10358 if test "$cross_compiling" = yes; then :
10359 # Try to guess by grepping values from an object file.
10360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10361 /* end confdefs.h. */
10362 short int ascii_mm[] =
10363 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
10364 short int ascii_ii[] =
10365 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
10366 int use_ascii (int i) {
10367 return ascii_mm[i] + ascii_ii[i];
10368 }
10369 short int ebcdic_ii[] =
10370 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
10371 short int ebcdic_mm[] =
10372 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
10373 int use_ebcdic (int i) {
10374 return ebcdic_mm[i] + ebcdic_ii[i];
10375 }
10376 extern int foo;
10377
10378 int
10379 main ()
10380 {
10381 return use_ascii (foo) == use_ebcdic (foo);
10382 ;
10383 return 0;
10384 }
10385 _ACEOF
10386 if ac_fn_c_try_compile "$LINENO"; then :
10387 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
10388 ac_cv_c_bigendian=yes
10389 fi
10390 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
10391 if test "$ac_cv_c_bigendian" = unknown; then
10392 ac_cv_c_bigendian=no
10393 else
10394 # finding both strings is unlikely to happen, but who knows?
10395 ac_cv_c_bigendian=unknown
10396 fi
10397 fi
10398 fi
10399 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10400 else
10401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10402 /* end confdefs.h. */
10403 $ac_includes_default
10404 int
10405 main ()
10406 {
10407
10408 /* Are we little or big endian? From Harbison&Steele. */
10409 union
10410 {
10411 long int l;
10412 char c[sizeof (long int)];
10413 } u;
10414 u.l = 1;
10415 return u.c[sizeof (long int) - 1] == 1;
10416
10417 ;
10418 return 0;
10419 }
10420 _ACEOF
10421 if ac_fn_c_try_run "$LINENO"; then :
10422 ac_cv_c_bigendian=no
10423 else
10424 ac_cv_c_bigendian=yes
10425 fi
10426 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10427 conftest.$ac_objext conftest.beam conftest.$ac_ext
10428 fi
10429
10430 fi
10431 fi
10432 :
10433 case $ac_cv_c_bigendian in #(
10434 yes)
10435 gl_cv_cc_double_expbit0="word 0 bit 20";; #(
10436 no)
10437 gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
10438 universal)
10439
10440 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
10441
10442 ;; #(
10443 *)
10444 gl_cv_cc_double_expbit0="unknown" ;;
10445 esac
10446
10447
10448 fi
10449 rm -f conftest*
10450
10451
10452 else
10453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10454 /* end confdefs.h. */
10455
10456 #include <float.h>
10457 #include <stddef.h>
10458 #include <stdio.h>
10459 #include <string.h>
10460 #define NWORDS \
10461 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
10462 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
10463 static unsigned int ored_words[NWORDS];
10464 static unsigned int anded_words[NWORDS];
10465 static void add_to_ored_words (double x)
10466 {
10467 memory_double m;
10468 size_t i;
10469 /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
10470 memset (&m, 0, sizeof (memory_double));
10471 m.value = x;
10472 for (i = 0; i < NWORDS; i++)
10473 {
10474 ored_words[i] |= m.word[i];
10475 anded_words[i] &= m.word[i];
10476 }
10477 }
10478 int main ()
10479 {
10480 size_t j;
10481 FILE *fp = fopen ("conftest.out", "w");
10482 if (fp == NULL)
10483 return 1;
10484 for (j = 0; j < NWORDS; j++)
10485 anded_words[j] = ~ (unsigned int) 0;
10486 add_to_ored_words (0.25);
10487 add_to_ored_words (0.5);
10488 add_to_ored_words (1.0);
10489 add_to_ored_words (2.0);
10490 add_to_ored_words (4.0);
10491 /* Remove bits that are common (e.g. if representation of the first mantissa
10492 bit is explicit). */
10493 for (j = 0; j < NWORDS; j++)
10494 ored_words[j] &= ~anded_words[j];
10495 /* Now find the nonzero word. */
10496 for (j = 0; j < NWORDS; j++)
10497 if (ored_words[j] != 0)
10498 break;
10499 if (j < NWORDS)
10500 {
10501 size_t i;
10502 for (i = j + 1; i < NWORDS; i++)
10503 if (ored_words[i] != 0)
10504 {
10505 fprintf (fp, "unknown");
10506 return (fclose (fp) != 0);
10507 }
10508 for (i = 0; ; i++)
10509 if ((ored_words[j] >> i) & 1)
10510 {
10511 fprintf (fp, "word %d bit %d", (int) j, (int) i);
10512 return (fclose (fp) != 0);
10513 }
10514 }
10515 fprintf (fp, "unknown");
10516 return (fclose (fp) != 0);
10517 }
10518
10519 _ACEOF
10520 if ac_fn_c_try_run "$LINENO"; then :
10521 gl_cv_cc_double_expbit0=`cat conftest.out`
10522 else
10523 gl_cv_cc_double_expbit0="unknown"
10524 fi
10525 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10526 conftest.$ac_objext conftest.beam conftest.$ac_ext
10527 fi
10528
10529 rm -f conftest.out
10530
10531 fi
10532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
10533 $as_echo "$gl_cv_cc_double_expbit0" >&6; }
10534 case "$gl_cv_cc_double_expbit0" in
10535 word*bit*)
10536 word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
10537 bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
10538
10539 cat >>confdefs.h <<_ACEOF
10540 #define DBL_EXPBIT0_WORD $word
10541 _ACEOF
10542
10543
10544 cat >>confdefs.h <<_ACEOF
10545 #define DBL_EXPBIT0_BIT $bit
10546 _ACEOF
10547
10548 ;;
10549 esac
10550
10551
10552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
10553 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
10554 if test "${ac_cv_c_bigendian+set}" = set; then :
10555 $as_echo_n "(cached) " >&6
10556 else
10557 ac_cv_c_bigendian=unknown
10558 # See if we're dealing with a universal compiler.
10559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10560 /* end confdefs.h. */
10561 #ifndef __APPLE_CC__
10562 not a universal capable compiler
10563 #endif
10564 typedef int dummy;
10565
10566 _ACEOF
10567 if ac_fn_c_try_compile "$LINENO"; then :
10568
10569 # Check for potential -arch flags. It is not universal unless
10570 # there are at least two -arch flags with different values.
10571 ac_arch=
10572 ac_prev=
10573 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
10574 if test -n "$ac_prev"; then
10575 case $ac_word in
10576 i?86 | x86_64 | ppc | ppc64)
10577 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
10578 ac_arch=$ac_word
10579 else
10580 ac_cv_c_bigendian=universal
10581 break
10582 fi
10583 ;;
10584 esac
10585 ac_prev=
10586 elif test "x$ac_word" = "x-arch"; then
10587 ac_prev=arch
10588 fi
10589 done
10590 fi
10591 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10592 if test $ac_cv_c_bigendian = unknown; then
10593 # See if sys/param.h defines the BYTE_ORDER macro.
10594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10595 /* end confdefs.h. */
10596 #include <sys/types.h>
10597 #include <sys/param.h>
10598
10599 int
10600 main ()
10601 {
10602 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
10603 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
10604 && LITTLE_ENDIAN)
10605 bogus endian macros
10606 #endif
10607
10608 ;
10609 return 0;
10610 }
10611 _ACEOF
10612 if ac_fn_c_try_compile "$LINENO"; then :
10613 # It does; now see whether it defined to BIG_ENDIAN or not.
10614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10615 /* end confdefs.h. */
10616 #include <sys/types.h>
10617 #include <sys/param.h>
10618
10619 int
10620 main ()
10621 {
10622 #if BYTE_ORDER != BIG_ENDIAN
10623 not big endian
10624 #endif
10625
10626 ;
10627 return 0;
10628 }
10629 _ACEOF
10630 if ac_fn_c_try_compile "$LINENO"; then :
10631 ac_cv_c_bigendian=yes
10632 else
10633 ac_cv_c_bigendian=no
10634 fi
10635 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10636 fi
10637 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10638 fi
10639 if test $ac_cv_c_bigendian = unknown; then
10640 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
10641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10642 /* end confdefs.h. */
10643 #include <limits.h>
10644
10645 int
10646 main ()
10647 {
10648 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
10649 bogus endian macros
10650 #endif
10651
10652 ;
10653 return 0;
10654 }
10655 _ACEOF
10656 if ac_fn_c_try_compile "$LINENO"; then :
10657 # It does; now see whether it defined to _BIG_ENDIAN or not.
10658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10659 /* end confdefs.h. */
10660 #include <limits.h>
10661
10662 int
10663 main ()
10664 {
10665 #ifndef _BIG_ENDIAN
10666 not big endian
10667 #endif
10668
10669 ;
10670 return 0;
10671 }
10672 _ACEOF
10673 if ac_fn_c_try_compile "$LINENO"; then :
10674 ac_cv_c_bigendian=yes
10675 else
10676 ac_cv_c_bigendian=no
10677 fi
10678 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10679 fi
10680 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10681 fi
10682 if test $ac_cv_c_bigendian = unknown; then
10683 # Compile a test program.
10684 if test "$cross_compiling" = yes; then :
10685 # Try to guess by grepping values from an object file.
10686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10687 /* end confdefs.h. */
10688 short int ascii_mm[] =
10689 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
10690 short int ascii_ii[] =
10691 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
10692 int use_ascii (int i) {
10693 return ascii_mm[i] + ascii_ii[i];
10694 }
10695 short int ebcdic_ii[] =
10696 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
10697 short int ebcdic_mm[] =
10698 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
10699 int use_ebcdic (int i) {
10700 return ebcdic_mm[i] + ebcdic_ii[i];
10701 }
10702 extern int foo;
10703
10704 int
10705 main ()
10706 {
10707 return use_ascii (foo) == use_ebcdic (foo);
10708 ;
10709 return 0;
10710 }
10711 _ACEOF
10712 if ac_fn_c_try_compile "$LINENO"; then :
10713 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
10714 ac_cv_c_bigendian=yes
10715 fi
10716 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
10717 if test "$ac_cv_c_bigendian" = unknown; then
10718 ac_cv_c_bigendian=no
10719 else
10720 # finding both strings is unlikely to happen, but who knows?
10721 ac_cv_c_bigendian=unknown
10722 fi
10723 fi
10724 fi
10725 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10726 else
10727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10728 /* end confdefs.h. */
10729 $ac_includes_default
10730 int
10731 main ()
10732 {
10733
10734 /* Are we little or big endian? From Harbison&Steele. */
10735 union
10736 {
10737 long int l;
10738 char c[sizeof (long int)];
10739 } u;
10740 u.l = 1;
10741 return u.c[sizeof (long int) - 1] == 1;
10742
10743 ;
10744 return 0;
10745 }
10746 _ACEOF
10747 if ac_fn_c_try_run "$LINENO"; then :
10748 ac_cv_c_bigendian=no
10749 else
10750 ac_cv_c_bigendian=yes
10751 fi
10752 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10753 conftest.$ac_objext conftest.beam conftest.$ac_ext
10754 fi
10755
10756 fi
10757 fi
10758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
10759 $as_echo "$ac_cv_c_bigendian" >&6; }
10760 case $ac_cv_c_bigendian in #(
10761 yes)
10762 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
10763 ;; #(
10764 no)
10765 ;; #(
10766 universal)
10767
10768 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
10769
10770 ;; #(
10771 *)
10772 as_fn_error "unknown endianness
10773 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
10774 esac
10775
10776
10777
10778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
10779 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
10780 if test "${am_cv_langinfo_codeset+set}" = set; then :
10781 $as_echo_n "(cached) " >&6
10782 else
10783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10784 /* end confdefs.h. */
10785 #include <langinfo.h>
10786 int
10787 main ()
10788 {
10789 char* cs = nl_langinfo(CODESET); return !cs;
10790 ;
10791 return 0;
10792 }
10793 _ACEOF
10794 if ac_fn_c_try_link "$LINENO"; then :
10795 am_cv_langinfo_codeset=yes
10796 else
10797 am_cv_langinfo_codeset=no
10798 fi
10799 rm -f core conftest.err conftest.$ac_objext \
10800 conftest$ac_exeext conftest.$ac_ext
10801
10802 fi
10803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
10804 $as_echo "$am_cv_langinfo_codeset" >&6; }
10805 if test $am_cv_langinfo_codeset = yes; then
10806
10807 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
10808
10809 fi
10810
10811 ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
10812 if test "x$ac_cv_have_decl_getc_unlocked" = x""yes; then :
10813 ac_have_decl=1
10814 else
10815 ac_have_decl=0
10816 fi
10817
10818 cat >>confdefs.h <<_ACEOF
10819 #define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
10820 _ACEOF
10821
10822
10823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5
10824 $as_echo_n "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; }
10825 if test "${ac_cv_gnu_library_2_1+set}" = set; then :
10826 $as_echo_n "(cached) " >&6
10827 else
10828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10829 /* end confdefs.h. */
10830
10831 #include <features.h>
10832 #ifdef __GNU_LIBRARY__
10833 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
10834 Lucky GNU user
10835 #endif
10836 #endif
10837 #ifdef __UCLIBC__
10838 Lucky user
10839 #endif
10840
10841 _ACEOF
10842 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10843 $EGREP "Lucky" >/dev/null 2>&1; then :
10844 ac_cv_gnu_library_2_1=yes
10845 else
10846 ac_cv_gnu_library_2_1=no
10847 fi
10848 rm -f conftest*
10849
10850
10851
10852 fi
10853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
10854 $as_echo "$ac_cv_gnu_library_2_1" >&6; }
10855
10856 GLIBC21="$ac_cv_gnu_library_2_1"
10857
10858
10859
10860
10861
10862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
10863 $as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
10864 if test "${gl_cv_func_malloc_posix+set}" = set; then :
10865 $as_echo_n "(cached) " >&6
10866 else
10867
10868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10869 /* end confdefs.h. */
10870
10871 int
10872 main ()
10873 {
10874 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
10875 choke me
10876 #endif
10877
10878 ;
10879 return 0;
10880 }
10881 _ACEOF
10882 if ac_fn_c_try_compile "$LINENO"; then :
10883 gl_cv_func_malloc_posix=yes
10884 else
10885 gl_cv_func_malloc_posix=no
10886 fi
10887 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10888
10889 fi
10890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
10891 $as_echo "$gl_cv_func_malloc_posix" >&6; }
10892
10893
10894
10895 for ac_header in stdlib.h
10896 do :
10897 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
10898 if test "x$ac_cv_header_stdlib_h" = x""yes; then :
10899 cat >>confdefs.h <<_ACEOF
10900 #define HAVE_STDLIB_H 1
10901 _ACEOF
10902
10903 fi
10904
10905 done
10906
10907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
10908 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
10909 if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then :
10910 $as_echo_n "(cached) " >&6
10911 else
10912 if test "$cross_compiling" = yes; then :
10913 case "$host_os" in
10914 # Guess yes on platforms where we know the result.
10915 *-gnu* | freebsd* | netbsd* | openbsd* \
10916 | hpux* | solaris* | cygwin* | mingw*)
10917 ac_cv_func_malloc_0_nonnull=yes ;;
10918 # If we don't know, assume the worst.
10919 *) ac_cv_func_malloc_0_nonnull=no ;;
10920 esac
10921
10922 else
10923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10924 /* end confdefs.h. */
10925 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
10926 # include <stdlib.h>
10927 #else
10928 char *malloc ();
10929 #endif
10930
10931 int
10932 main ()
10933 {
10934 char *p = malloc (0);
10935 int result = !p;
10936 free (p);
10937 return result;
10938 ;
10939 return 0;
10940 }
10941
10942 _ACEOF
10943 if ac_fn_c_try_run "$LINENO"; then :
10944 ac_cv_func_malloc_0_nonnull=yes
10945 else
10946 ac_cv_func_malloc_0_nonnull=no
10947 fi
10948 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10949 conftest.$ac_objext conftest.beam conftest.$ac_ext
10950 fi
10951
10952
10953 fi
10954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
10955 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
10956 if test $ac_cv_func_malloc_0_nonnull = yes; then :
10957 gl_cv_func_malloc_0_nonnull=1
10958 else
10959 gl_cv_func_malloc_0_nonnull=0
10960 fi
10961
10962
10963 cat >>confdefs.h <<_ACEOF
10964 #define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
10965 _ACEOF
10966
10967
10968
10969
10970
10971 GNULIB_BTOWC=0;
10972 GNULIB_WCTOB=0;
10973 GNULIB_MBSINIT=0;
10974 GNULIB_MBRTOWC=0;
10975 GNULIB_MBRLEN=0;
10976 GNULIB_MBSRTOWCS=0;
10977 GNULIB_MBSNRTOWCS=0;
10978 GNULIB_WCRTOMB=0;
10979 GNULIB_WCSRTOMBS=0;
10980 GNULIB_WCSNRTOMBS=0;
10981 GNULIB_WCWIDTH=0;
10982 GNULIB_WMEMCHR=0;
10983 GNULIB_WMEMCMP=0;
10984 GNULIB_WMEMCPY=0;
10985 GNULIB_WMEMMOVE=0;
10986 GNULIB_WMEMSET=0;
10987 GNULIB_WCSLEN=0;
10988 GNULIB_WCSNLEN=0;
10989 GNULIB_WCSCPY=0;
10990 GNULIB_WCPCPY=0;
10991 GNULIB_WCSNCPY=0;
10992 GNULIB_WCPNCPY=0;
10993 GNULIB_WCSCAT=0;
10994 GNULIB_WCSNCAT=0;
10995 GNULIB_WCSCMP=0;
10996 GNULIB_WCSNCMP=0;
10997 GNULIB_WCSCASECMP=0;
10998 GNULIB_WCSNCASECMP=0;
10999 GNULIB_WCSCOLL=0;
11000 GNULIB_WCSXFRM=0;
11001 GNULIB_WCSDUP=0;
11002 GNULIB_WCSCHR=0;
11003 GNULIB_WCSRCHR=0;
11004 GNULIB_WCSCSPN=0;
11005 GNULIB_WCSSPN=0;
11006 GNULIB_WCSPBRK=0;
11007 GNULIB_WCSSTR=0;
11008 GNULIB_WCSTOK=0;
11009 GNULIB_WCSWIDTH=0;
11010 HAVE_BTOWC=1;
11011 HAVE_MBSINIT=1;
11012 HAVE_MBRTOWC=1;
11013 HAVE_MBRLEN=1;
11014 HAVE_MBSRTOWCS=1;
11015 HAVE_MBSNRTOWCS=1;
11016 HAVE_WCRTOMB=1;
11017 HAVE_WCSRTOMBS=1;
11018 HAVE_WCSNRTOMBS=1;
11019 HAVE_WMEMCHR=1;
11020 HAVE_WMEMCMP=1;
11021 HAVE_WMEMCPY=1;
11022 HAVE_WMEMMOVE=1;
11023 HAVE_WMEMSET=1;
11024 HAVE_WCSLEN=1;
11025 HAVE_WCSNLEN=1;
11026 HAVE_WCSCPY=1;
11027 HAVE_WCPCPY=1;
11028 HAVE_WCSNCPY=1;
11029 HAVE_WCPNCPY=1;
11030 HAVE_WCSCAT=1;
11031 HAVE_WCSNCAT=1;
11032 HAVE_WCSCMP=1;
11033 HAVE_WCSNCMP=1;
11034 HAVE_WCSCASECMP=1;
11035 HAVE_WCSNCASECMP=1;
11036 HAVE_WCSCOLL=1;
11037 HAVE_WCSXFRM=1;
11038 HAVE_WCSDUP=1;
11039 HAVE_WCSCHR=1;
11040 HAVE_WCSRCHR=1;
11041 HAVE_WCSCSPN=1;
11042 HAVE_WCSSPN=1;
11043 HAVE_WCSPBRK=1;
11044 HAVE_WCSSTR=1;
11045 HAVE_WCSTOK=1;
11046 HAVE_WCSWIDTH=1;
11047 HAVE_DECL_WCTOB=1;
11048 HAVE_DECL_WCWIDTH=1;
11049 REPLACE_MBSTATE_T=0;
11050 REPLACE_BTOWC=0;
11051 REPLACE_WCTOB=0;
11052 REPLACE_MBSINIT=0;
11053 REPLACE_MBRTOWC=0;
11054 REPLACE_MBRLEN=0;
11055 REPLACE_MBSRTOWCS=0;
11056 REPLACE_MBSNRTOWCS=0;
11057 REPLACE_WCRTOMB=0;
11058 REPLACE_WCSRTOMBS=0;
11059 REPLACE_WCSNRTOMBS=0;
11060 REPLACE_WCWIDTH=0;
11061 REPLACE_WCSWIDTH=0;
11062
11063
11064
11065
11066
11067
11068
11069
11070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
11071 $as_echo_n "checking for a traditional japanese locale... " >&6; }
11072 if test "${gt_cv_locale_ja+set}" = set; then :
11073 $as_echo_n "(cached) " >&6
11074 else
11075
11076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11077 /* end confdefs.h. */
11078
11079 #include <locale.h>
11080 #include <time.h>
11081 #if HAVE_LANGINFO_CODESET
11082 # include <langinfo.h>
11083 #endif
11084 #include <stdlib.h>
11085 #include <string.h>
11086 struct tm t;
11087 char buf[16];
11088 int main ()
11089 {
11090 const char *p;
11091 /* Check whether the given locale name is recognized by the system. */
11092 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
11093 /* On native Windows, setlocale(category, "") looks at the system settings,
11094 not at the environment variables. Also, when an encoding suffix such
11095 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
11096 category of the locale to "C". */
11097 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
11098 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
11099 return 1;
11100 #else
11101 if (setlocale (LC_ALL, "") == NULL) return 1;
11102 #endif
11103 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
11104 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
11105 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
11106 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
11107 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
11108 some unit tests fail.
11109 On MirBSD 10, when an unsupported locale is specified, setlocale()
11110 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
11111 #if HAVE_LANGINFO_CODESET
11112 {
11113 const char *cs = nl_langinfo (CODESET);
11114 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
11115 || strcmp (cs, "UTF-8") == 0)
11116 return 1;
11117 }
11118 #endif
11119 #ifdef __CYGWIN__
11120 /* On Cygwin, avoid locale names without encoding suffix, because the
11121 locale_charset() function relies on the encoding suffix. Note that
11122 LC_ALL is set on the command line. */
11123 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
11124 #endif
11125 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
11126 on Cygwin 1.5.x. */
11127 if (MB_CUR_MAX == 1)
11128 return 1;
11129 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
11130 This excludes the UTF-8 encoding (except on MirBSD). */
11131 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
11132 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
11133 for (p = buf; *p != '\0'; p++)
11134 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
11135 return 1;
11136 return 0;
11137 }
11138
11139 _ACEOF
11140 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
11141 (eval $ac_link) 2>&5
11142 ac_status=$?
11143 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11144 test $ac_status = 0; } && test -s conftest$ac_exeext; then
11145 case "$host_os" in
11146 # Handle native Windows specially, because there setlocale() interprets
11147 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
11148 # "fr" or "fra" as "French" or "French_France.1252",
11149 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
11150 # "ja" as "Japanese" or "Japanese_Japan.932",
11151 # and similar.
11152 mingw*)
11153 # Note that on native Windows, the Japanese locale is
11154 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
11155 # cannot use it here.
11156 gt_cv_locale_ja=none
11157 ;;
11158 *)
11159 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
11160 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
11161 # configure script would override the LC_ALL setting. Likewise for
11162 # LC_CTYPE, which is also set at the beginning of the configure script.
11163 # Test for the AIX locale name.
11164 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11165 gt_cv_locale_ja=ja_JP
11166 else
11167 # Test for the locale name with explicit encoding suffix.
11168 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11169 gt_cv_locale_ja=ja_JP.EUC-JP
11170 else
11171 # Test for the HP-UX, OSF/1, NetBSD locale name.
11172 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11173 gt_cv_locale_ja=ja_JP.eucJP
11174 else
11175 # Test for the IRIX, FreeBSD locale name.
11176 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11177 gt_cv_locale_ja=ja_JP.EUC
11178 else
11179 # Test for the Solaris 7 locale name.
11180 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11181 gt_cv_locale_ja=ja
11182 else
11183 # Special test for NetBSD 1.6.
11184 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
11185 gt_cv_locale_ja=ja_JP.eucJP
11186 else
11187 # None found.
11188 gt_cv_locale_ja=none
11189 fi
11190 fi
11191 fi
11192 fi
11193 fi
11194 fi
11195 ;;
11196 esac
11197 fi
11198 rm -fr conftest*
11199
11200 fi
11201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
11202 $as_echo "$gt_cv_locale_ja" >&6; }
11203 LOCALE_JA=$gt_cv_locale_ja
11204
11205
11206
11207
11208
11209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
11210 $as_echo_n "checking for a transitional chinese locale... " >&6; }
11211 if test "${gt_cv_locale_zh_CN+set}" = set; then :
11212 $as_echo_n "(cached) " >&6
11213 else
11214
11215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11216 /* end confdefs.h. */
11217
11218 #include <locale.h>
11219 #include <stdlib.h>
11220 #include <time.h>
11221 #if HAVE_LANGINFO_CODESET
11222 # include <langinfo.h>
11223 #endif
11224 #include <stdlib.h>
11225 #include <string.h>
11226 struct tm t;
11227 char buf[16];
11228 int main ()
11229 {
11230 const char *p;
11231 /* Check whether the given locale name is recognized by the system. */
11232 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
11233 /* On native Windows, setlocale(category, "") looks at the system settings,
11234 not at the environment variables. Also, when an encoding suffix such
11235 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
11236 category of the locale to "C". */
11237 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
11238 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
11239 return 1;
11240 #else
11241 if (setlocale (LC_ALL, "") == NULL) return 1;
11242 #endif
11243 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
11244 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
11245 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
11246 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
11247 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
11248 some unit tests fail.
11249 On MirBSD 10, when an unsupported locale is specified, setlocale()
11250 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
11251 #if HAVE_LANGINFO_CODESET
11252 {
11253 const char *cs = nl_langinfo (CODESET);
11254 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
11255 || strcmp (cs, "UTF-8") == 0)
11256 return 1;
11257 }
11258 #endif
11259 #ifdef __CYGWIN__
11260 /* On Cygwin, avoid locale names without encoding suffix, because the
11261 locale_charset() function relies on the encoding suffix. Note that
11262 LC_ALL is set on the command line. */
11263 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
11264 #endif
11265 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
11266 This excludes the UTF-8 encoding (except on MirBSD). */
11267 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
11268 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
11269 for (p = buf; *p != '\0'; p++)
11270 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
11271 return 1;
11272 /* Check whether a typical GB18030 multibyte sequence is recognized as a
11273 single wide character. This excludes the GB2312 and GBK encodings. */
11274 if (mblen ("\203\062\332\066", 5) != 4)
11275 return 1;
11276 return 0;
11277 }
11278
11279 _ACEOF
11280 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
11281 (eval $ac_link) 2>&5
11282 ac_status=$?
11283 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11284 test $ac_status = 0; } && test -s conftest$ac_exeext; then
11285 case "$host_os" in
11286 # Handle native Windows specially, because there setlocale() interprets
11287 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
11288 # "fr" or "fra" as "French" or "French_France.1252",
11289 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
11290 # "ja" as "Japanese" or "Japanese_Japan.932",
11291 # and similar.
11292 mingw*)
11293 # Test for the hypothetical native Windows locale name.
11294 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11295 gt_cv_locale_zh_CN=Chinese_China.54936
11296 else
11297 # None found.
11298 gt_cv_locale_zh_CN=none
11299 fi
11300 ;;
11301 solaris2.8)
11302 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
11303 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
11304 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
11305 gt_cv_locale_zh_CN=none
11306 ;;
11307 *)
11308 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
11309 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
11310 # configure script would override the LC_ALL setting. Likewise for
11311 # LC_CTYPE, which is also set at the beginning of the configure script.
11312 # Test for the locale name without encoding suffix.
11313 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11314 gt_cv_locale_zh_CN=zh_CN
11315 else
11316 # Test for the locale name with explicit encoding suffix.
11317 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11318 gt_cv_locale_zh_CN=zh_CN.GB18030
11319 else
11320 # None found.
11321 gt_cv_locale_zh_CN=none
11322 fi
11323 fi
11324 ;;
11325 esac
11326 else
11327 # If there was a link error, due to mblen(), the system is so old that
11328 # it certainly doesn't have a chinese locale.
11329 gt_cv_locale_zh_CN=none
11330 fi
11331 rm -fr conftest*
11332
11333 fi
11334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
11335 $as_echo "$gt_cv_locale_zh_CN" >&6; }
11336 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
11337
11338
11339
11340
11341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
11342 $as_echo_n "checking for a french Unicode locale... " >&6; }
11343 if test "${gt_cv_locale_fr_utf8+set}" = set; then :
11344 $as_echo_n "(cached) " >&6
11345 else
11346
11347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11348 /* end confdefs.h. */
11349
11350 #include <locale.h>
11351 #include <time.h>
11352 #if HAVE_LANGINFO_CODESET
11353 # include <langinfo.h>
11354 #endif
11355 #include <stdlib.h>
11356 #include <string.h>
11357 struct tm t;
11358 char buf[16];
11359 int main () {
11360 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
11361 imitates locale dependent behaviour by looking at the environment
11362 variables, and all locales use the UTF-8 encoding. */
11363 #if !(defined __BEOS__ || defined __HAIKU__)
11364 /* Check whether the given locale name is recognized by the system. */
11365 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
11366 /* On native Windows, setlocale(category, "") looks at the system settings,
11367 not at the environment variables. Also, when an encoding suffix such
11368 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
11369 category of the locale to "C". */
11370 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
11371 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
11372 return 1;
11373 # else
11374 if (setlocale (LC_ALL, "") == NULL) return 1;
11375 # endif
11376 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
11377 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
11378 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
11379 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
11380 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
11381 some unit tests fail. */
11382 # if HAVE_LANGINFO_CODESET
11383 {
11384 const char *cs = nl_langinfo (CODESET);
11385 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
11386 return 1;
11387 }
11388 # endif
11389 # ifdef __CYGWIN__
11390 /* On Cygwin, avoid locale names without encoding suffix, because the
11391 locale_charset() function relies on the encoding suffix. Note that
11392 LC_ALL is set on the command line. */
11393 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
11394 # endif
11395 /* Check whether in the abbreviation of the second month, the second
11396 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
11397 two bytes long, with UTF-8 encoding. */
11398 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
11399 if (strftime (buf, sizeof (buf), "%b", &t) < 4
11400 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
11401 return 1;
11402 #endif
11403 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
11404 /* Check whether the decimal separator is a comma.
11405 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
11406 are nl_langinfo(RADIXCHAR) are both ".". */
11407 if (localeconv () ->decimal_point[0] != ',') return 1;
11408 #endif
11409 return 0;
11410 }
11411
11412 _ACEOF
11413 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
11414 (eval $ac_link) 2>&5
11415 ac_status=$?
11416 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11417 test $ac_status = 0; } && test -s conftest$ac_exeext; then
11418 case "$host_os" in
11419 # Handle native Windows specially, because there setlocale() interprets
11420 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
11421 # "fr" or "fra" as "French" or "French_France.1252",
11422 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
11423 # "ja" as "Japanese" or "Japanese_Japan.932",
11424 # and similar.
11425 mingw*)
11426 # Test for the hypothetical native Windows locale name.
11427 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11428 gt_cv_locale_fr_utf8=French_France.65001
11429 else
11430 # None found.
11431 gt_cv_locale_fr_utf8=none
11432 fi
11433 ;;
11434 *)
11435 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
11436 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
11437 # configure script would override the LC_ALL setting. Likewise for
11438 # LC_CTYPE, which is also set at the beginning of the configure script.
11439 # Test for the usual locale name.
11440 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11441 gt_cv_locale_fr_utf8=fr_FR
11442 else
11443 # Test for the locale name with explicit encoding suffix.
11444 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11445 gt_cv_locale_fr_utf8=fr_FR.UTF-8
11446 else
11447 # Test for the Solaris 7 locale name.
11448 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11449 gt_cv_locale_fr_utf8=fr.UTF-8
11450 else
11451 # None found.
11452 gt_cv_locale_fr_utf8=none
11453 fi
11454 fi
11455 fi
11456 ;;
11457 esac
11458 fi
11459 rm -fr conftest*
11460
11461 fi
11462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
11463 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
11464 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
11465
11466
11467
11468
11469
11470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
11471 $as_echo_n "checking for a traditional french locale... " >&6; }
11472 if test "${gt_cv_locale_fr+set}" = set; then :
11473 $as_echo_n "(cached) " >&6
11474 else
11475
11476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11477 /* end confdefs.h. */
11478
11479 #include <locale.h>
11480 #include <time.h>
11481 #if HAVE_LANGINFO_CODESET
11482 # include <langinfo.h>
11483 #endif
11484 #include <stdlib.h>
11485 #include <string.h>
11486 struct tm t;
11487 char buf[16];
11488 int main () {
11489 /* Check whether the given locale name is recognized by the system. */
11490 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
11491 /* On native Windows, setlocale(category, "") looks at the system settings,
11492 not at the environment variables. Also, when an encoding suffix such
11493 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
11494 category of the locale to "C". */
11495 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
11496 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
11497 return 1;
11498 #else
11499 if (setlocale (LC_ALL, "") == NULL) return 1;
11500 #endif
11501 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
11502 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
11503 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
11504 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
11505 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
11506 some unit tests fail.
11507 On MirBSD 10, when an unsupported locale is specified, setlocale()
11508 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
11509 #if HAVE_LANGINFO_CODESET
11510 {
11511 const char *cs = nl_langinfo (CODESET);
11512 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
11513 || strcmp (cs, "UTF-8") == 0)
11514 return 1;
11515 }
11516 #endif
11517 #ifdef __CYGWIN__
11518 /* On Cygwin, avoid locale names without encoding suffix, because the
11519 locale_charset() function relies on the encoding suffix. Note that
11520 LC_ALL is set on the command line. */
11521 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
11522 #endif
11523 /* Check whether in the abbreviation of the second month, the second
11524 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
11525 one byte long. This excludes the UTF-8 encoding. */
11526 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
11527 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
11528 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
11529 /* Check whether the decimal separator is a comma.
11530 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
11531 are nl_langinfo(RADIXCHAR) are both ".". */
11532 if (localeconv () ->decimal_point[0] != ',') return 1;
11533 #endif
11534 return 0;
11535 }
11536
11537 _ACEOF
11538 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
11539 (eval $ac_link) 2>&5
11540 ac_status=$?
11541 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11542 test $ac_status = 0; } && test -s conftest$ac_exeext; then
11543 case "$host_os" in
11544 # Handle native Windows specially, because there setlocale() interprets
11545 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
11546 # "fr" or "fra" as "French" or "French_France.1252",
11547 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
11548 # "ja" as "Japanese" or "Japanese_Japan.932",
11549 # and similar.
11550 mingw*)
11551 # Test for the native Windows locale name.
11552 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11553 gt_cv_locale_fr=French_France.1252
11554 else
11555 # None found.
11556 gt_cv_locale_fr=none
11557 fi
11558 ;;
11559 *)
11560 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
11561 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
11562 # configure script would override the LC_ALL setting. Likewise for
11563 # LC_CTYPE, which is also set at the beginning of the configure script.
11564 # Test for the usual locale name.
11565 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11566 gt_cv_locale_fr=fr_FR
11567 else
11568 # Test for the locale name with explicit encoding suffix.
11569 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11570 gt_cv_locale_fr=fr_FR.ISO-8859-1
11571 else
11572 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
11573 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11574 gt_cv_locale_fr=fr_FR.ISO8859-1
11575 else
11576 # Test for the HP-UX locale name.
11577 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11578 gt_cv_locale_fr=fr_FR.iso88591
11579 else
11580 # Test for the Solaris 7 locale name.
11581 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11582 gt_cv_locale_fr=fr
11583 else
11584 # None found.
11585 gt_cv_locale_fr=none
11586 fi
11587 fi
11588 fi
11589 fi
11590 fi
11591 ;;
11592 esac
11593 fi
11594 rm -fr conftest*
11595
11596 fi
11597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
11598 $as_echo "$gt_cv_locale_fr" >&6; }
11599 LOCALE_FR=$gt_cv_locale_fr
11600
11601
11602
11603
11604
11605
11606
11607 GNULIB_FFSL=0;
11608 GNULIB_FFSLL=0;
11609 GNULIB_MEMCHR=0;
11610 GNULIB_MEMMEM=0;
11611 GNULIB_MEMPCPY=0;
11612 GNULIB_MEMRCHR=0;
11613 GNULIB_RAWMEMCHR=0;
11614 GNULIB_STPCPY=0;
11615 GNULIB_STPNCPY=0;
11616 GNULIB_STRCHRNUL=0;
11617 GNULIB_STRDUP=0;
11618 GNULIB_STRNCAT=0;
11619 GNULIB_STRNDUP=0;
11620 GNULIB_STRNLEN=0;
11621 GNULIB_STRPBRK=0;
11622 GNULIB_STRSEP=0;
11623 GNULIB_STRSTR=0;
11624 GNULIB_STRCASESTR=0;
11625 GNULIB_STRTOK_R=0;
11626 GNULIB_MBSLEN=0;
11627 GNULIB_MBSNLEN=0;
11628 GNULIB_MBSCHR=0;
11629 GNULIB_MBSRCHR=0;
11630 GNULIB_MBSSTR=0;
11631 GNULIB_MBSCASECMP=0;
11632 GNULIB_MBSNCASECMP=0;
11633 GNULIB_MBSPCASECMP=0;
11634 GNULIB_MBSCASESTR=0;
11635 GNULIB_MBSCSPN=0;
11636 GNULIB_MBSPBRK=0;
11637 GNULIB_MBSSPN=0;
11638 GNULIB_MBSSEP=0;
11639 GNULIB_MBSTOK_R=0;
11640 GNULIB_STRERROR=0;
11641 GNULIB_STRERROR_R=0;
11642 GNULIB_STRSIGNAL=0;
11643 GNULIB_STRVERSCMP=0;
11644 HAVE_MBSLEN=0;
11645 HAVE_FFSL=1;
11646 HAVE_FFSLL=1;
11647 HAVE_MEMCHR=1;
11648 HAVE_DECL_MEMMEM=1;
11649 HAVE_MEMPCPY=1;
11650 HAVE_DECL_MEMRCHR=1;
11651 HAVE_RAWMEMCHR=1;
11652 HAVE_STPCPY=1;
11653 HAVE_STPNCPY=1;
11654 HAVE_STRCHRNUL=1;
11655 HAVE_DECL_STRDUP=1;
11656 HAVE_DECL_STRNDUP=1;
11657 HAVE_DECL_STRNLEN=1;
11658 HAVE_STRPBRK=1;
11659 HAVE_STRSEP=1;
11660 HAVE_STRCASESTR=1;
11661 HAVE_DECL_STRTOK_R=1;
11662 HAVE_DECL_STRERROR_R=1;
11663 HAVE_DECL_STRSIGNAL=1;
11664 HAVE_STRVERSCMP=1;
11665 REPLACE_MEMCHR=0;
11666 REPLACE_MEMMEM=0;
11667 REPLACE_STPNCPY=0;
11668 REPLACE_STRDUP=0;
11669 REPLACE_STRSTR=0;
11670 REPLACE_STRCASESTR=0;
11671 REPLACE_STRCHRNUL=0;
11672 REPLACE_STRERROR=0;
11673 REPLACE_STRERROR_R=0;
11674 REPLACE_STRNCAT=0;
11675 REPLACE_STRNDUP=0;
11676 REPLACE_STRNLEN=0;
11677 REPLACE_STRSIGNAL=0;
11678 REPLACE_STRTOK_R=0;
11679 UNDEFINE_STRTOK_R=0;
11680
11681
11682
11683
11684
11685 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
11686 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
11687 # irrelevant for anonymous mappings.
11688 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
11689 if test "x$ac_cv_func_mmap" = x""yes; then :
11690 gl_have_mmap=yes
11691 else
11692 gl_have_mmap=no
11693 fi
11694
11695
11696 # Try to allow MAP_ANONYMOUS.
11697 gl_have_mmap_anonymous=no
11698 if test $gl_have_mmap = yes; then
11699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
11700 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
11701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11702 /* end confdefs.h. */
11703
11704 #include <sys/mman.h>
11705 #ifdef MAP_ANONYMOUS
11706 I cannot identify this map
11707 #endif
11708
11709 _ACEOF
11710 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11711 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
11712 gl_have_mmap_anonymous=yes
11713 fi
11714 rm -f conftest*
11715
11716 if test $gl_have_mmap_anonymous != yes; then
11717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11718 /* end confdefs.h. */
11719
11720 #include <sys/mman.h>
11721 #ifdef MAP_ANON
11722 I cannot identify this map
11723 #endif
11724
11725 _ACEOF
11726 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11727 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
11728
11729 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
11730
11731 gl_have_mmap_anonymous=yes
11732 fi
11733 rm -f conftest*
11734
11735 fi
11736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
11737 $as_echo "$gl_have_mmap_anonymous" >&6; }
11738 if test $gl_have_mmap_anonymous = yes; then
11739
11740 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
11741
11742 fi
11743 fi
11744
11745
11746
11747
11748
11749
11750 if test $HAVE_MEMCHR = 1; then
11751 # Detect platform-specific bugs in some versions of glibc:
11752 # memchr should not dereference anything with length 0
11753 # http://bugzilla.redhat.com/499689
11754 # memchr should not dereference overestimated length after a match
11755 # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
11756 # http://sourceware.org/bugzilla/show_bug.cgi?id=10162
11757 # Assume that memchr works on platforms that lack mprotect.
11758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
11759 $as_echo_n "checking whether memchr works... " >&6; }
11760 if test "${gl_cv_func_memchr_works+set}" = set; then :
11761 $as_echo_n "(cached) " >&6
11762 else
11763 if test "$cross_compiling" = yes; then :
11764 gl_cv_func_memchr_works="guessing no"
11765 else
11766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11767 /* end confdefs.h. */
11768
11769 #include <string.h>
11770 #if HAVE_SYS_MMAN_H
11771 # include <fcntl.h>
11772 # include <unistd.h>
11773 # include <sys/types.h>
11774 # include <sys/mman.h>
11775 # ifndef MAP_FILE
11776 # define MAP_FILE 0
11777 # endif
11778 #endif
11779
11780 int
11781 main ()
11782 {
11783
11784 int result = 0;
11785 char *fence = NULL;
11786 #if HAVE_SYS_MMAN_H && HAVE_MPROTECT
11787 # if HAVE_MAP_ANONYMOUS
11788 const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
11789 const int fd = -1;
11790 # else /* !HAVE_MAP_ANONYMOUS */
11791 const int flags = MAP_FILE | MAP_PRIVATE;
11792 int fd = open ("/dev/zero", O_RDONLY, 0666);
11793 if (fd >= 0)
11794 # endif
11795 {
11796 int pagesize = getpagesize ();
11797 char *two_pages =
11798 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
11799 flags, fd, 0);
11800 if (two_pages != (char *)(-1)
11801 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
11802 fence = two_pages + pagesize;
11803 }
11804 #endif
11805 if (fence)
11806 {
11807 if (memchr (fence, 0, 0))
11808 result |= 1;
11809 strcpy (fence - 9, "12345678");
11810 if (memchr (fence - 9, 0, 79) != fence - 1)
11811 result |= 2;
11812 if (memchr (fence - 1, 0, 3) != fence - 1)
11813 result |= 4;
11814 }
11815 return result;
11816
11817 ;
11818 return 0;
11819 }
11820 _ACEOF
11821 if ac_fn_c_try_run "$LINENO"; then :
11822 gl_cv_func_memchr_works=yes
11823 else
11824 gl_cv_func_memchr_works=no
11825 fi
11826 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11827 conftest.$ac_objext conftest.beam conftest.$ac_ext
11828 fi
11829
11830 fi
11831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
11832 $as_echo "$gl_cv_func_memchr_works" >&6; }
11833 if test "$gl_cv_func_memchr_works" != yes; then
11834 REPLACE_MEMCHR=1
11835 fi
11836 fi
11837
11838 ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default"
11839 if test "x$ac_cv_have_decl_memmem" = x""yes; then :
11840 ac_have_decl=1
11841 else
11842 ac_have_decl=0
11843 fi
11844
11845 cat >>confdefs.h <<_ACEOF
11846 #define HAVE_DECL_MEMMEM $ac_have_decl
11847 _ACEOF
11848
11849
11850
11851
11852
11853 for ac_func in memmem
11854 do :
11855 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
11856 if test "x$ac_cv_func_memmem" = x""yes; then :
11857 cat >>confdefs.h <<_ACEOF
11858 #define HAVE_MEMMEM 1
11859 _ACEOF
11860
11861 fi
11862 done
11863
11864 if test $ac_cv_func_memmem = yes; then
11865 HAVE_MEMMEM=1
11866 else
11867 HAVE_MEMMEM=0
11868 fi
11869
11870 if test $ac_cv_have_decl_memmem = no; then
11871 HAVE_DECL_MEMMEM=0
11872 else
11873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
11874 $as_echo_n "checking whether memmem works... " >&6; }
11875 if test "${gl_cv_func_memmem_works_always+set}" = set; then :
11876 $as_echo_n "(cached) " >&6
11877 else
11878 if test "$cross_compiling" = yes; then :
11879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11880 /* end confdefs.h. */
11881
11882 #ifdef __GNU_LIBRARY__
11883 #include <features.h>
11884 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
11885 || __GLIBC_MINOR__ > 12)) \
11886 || (__GLIBC__ > 2)) \
11887 || defined __UCLIBC__
11888 Lucky user
11889 #endif
11890 #elif defined __CYGWIN__
11891 #include <cygwin/version.h>
11892 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
11893 Lucky user
11894 #endif
11895 #else
11896 Lucky user
11897 #endif
11898
11899 _ACEOF
11900 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11901 $EGREP "Lucky user" >/dev/null 2>&1; then :
11902 gl_cv_func_memmem_works_always="guessing yes"
11903 else
11904 gl_cv_func_memmem_works_always="guessing no"
11905 fi
11906 rm -f conftest*
11907
11908
11909 else
11910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11911 /* end confdefs.h. */
11912
11913 #include <string.h> /* for memmem */
11914 #define P "_EF_BF_BD"
11915 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
11916 #define NEEDLE P P P P P
11917
11918 int
11919 main ()
11920 {
11921
11922 int result = 0;
11923 if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
11924 result |= 1;
11925 /* Check for empty needle behavior. */
11926 {
11927 const char *haystack = "AAA";
11928 if (memmem (haystack, 3, NULL, 0) != haystack)
11929 result |= 2;
11930 }
11931 return result;
11932
11933 ;
11934 return 0;
11935 }
11936 _ACEOF
11937 if ac_fn_c_try_run "$LINENO"; then :
11938 gl_cv_func_memmem_works_always=yes
11939 else
11940 gl_cv_func_memmem_works_always=no
11941 fi
11942 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11943 conftest.$ac_objext conftest.beam conftest.$ac_ext
11944 fi
11945
11946
11947 fi
11948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
11949 $as_echo "$gl_cv_func_memmem_works_always" >&6; }
11950 case "$gl_cv_func_memmem_works_always" in
11951 *yes) ;;
11952 *)
11953 REPLACE_MEMMEM=1
11954 ;;
11955 esac
11956 fi
11957 :
11958
11959 ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
11960 if test "x$ac_cv_have_decl_memrchr" = x""yes; then :
11961 ac_have_decl=1
11962 else
11963 ac_have_decl=0
11964 fi
11965
11966 cat >>confdefs.h <<_ACEOF
11967 #define HAVE_DECL_MEMRCHR $ac_have_decl
11968 _ACEOF
11969
11970
11971
11972
11973
11974
11975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
11976 $as_echo_n "checking for promoted mode_t type... " >&6; }
11977 if test "${gl_cv_promoted_mode_t+set}" = set; then :
11978 $as_echo_n "(cached) " >&6
11979 else
11980
11981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11982 /* end confdefs.h. */
11983 #include <sys/types.h>
11984 int
11985 main ()
11986 {
11987 typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
11988 ;
11989 return 0;
11990 }
11991 _ACEOF
11992 if ac_fn_c_try_compile "$LINENO"; then :
11993 gl_cv_promoted_mode_t='int'
11994 else
11995 gl_cv_promoted_mode_t='mode_t'
11996 fi
11997 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11998
11999 fi
12000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
12001 $as_echo "$gl_cv_promoted_mode_t" >&6; }
12002
12003 cat >>confdefs.h <<_ACEOF
12004 #define PROMOTED_MODE_T $gl_cv_promoted_mode_t
12005 _ACEOF
12006
12007
12008
12009
12010
12011 GNULIB_DPRINTF=0;
12012 GNULIB_FCLOSE=0;
12013 GNULIB_FDOPEN=0;
12014 GNULIB_FFLUSH=0;
12015 GNULIB_FGETC=0;
12016 GNULIB_FGETS=0;
12017 GNULIB_FOPEN=0;
12018 GNULIB_FPRINTF=0;
12019 GNULIB_FPRINTF_POSIX=0;
12020 GNULIB_FPURGE=0;
12021 GNULIB_FPUTC=0;
12022 GNULIB_FPUTS=0;
12023 GNULIB_FREAD=0;
12024 GNULIB_FREOPEN=0;
12025 GNULIB_FSCANF=0;
12026 GNULIB_FSEEK=0;
12027 GNULIB_FSEEKO=0;
12028 GNULIB_FTELL=0;
12029 GNULIB_FTELLO=0;
12030 GNULIB_FWRITE=0;
12031 GNULIB_GETC=0;
12032 GNULIB_GETCHAR=0;
12033 GNULIB_GETDELIM=0;
12034 GNULIB_GETLINE=0;
12035 GNULIB_OBSTACK_PRINTF=0;
12036 GNULIB_OBSTACK_PRINTF_POSIX=0;
12037 GNULIB_PCLOSE=0;
12038 GNULIB_PERROR=0;
12039 GNULIB_POPEN=0;
12040 GNULIB_PRINTF=0;
12041 GNULIB_PRINTF_POSIX=0;
12042 GNULIB_PUTC=0;
12043 GNULIB_PUTCHAR=0;
12044 GNULIB_PUTS=0;
12045 GNULIB_REMOVE=0;
12046 GNULIB_RENAME=0;
12047 GNULIB_RENAMEAT=0;
12048 GNULIB_SCANF=0;
12049 GNULIB_SNPRINTF=0;
12050 GNULIB_SPRINTF_POSIX=0;
12051 GNULIB_STDIO_H_NONBLOCKING=0;
12052 GNULIB_STDIO_H_SIGPIPE=0;
12053 GNULIB_TMPFILE=0;
12054 GNULIB_VASPRINTF=0;
12055 GNULIB_VFSCANF=0;
12056 GNULIB_VSCANF=0;
12057 GNULIB_VDPRINTF=0;
12058 GNULIB_VFPRINTF=0;
12059 GNULIB_VFPRINTF_POSIX=0;
12060 GNULIB_VPRINTF=0;
12061 GNULIB_VPRINTF_POSIX=0;
12062 GNULIB_VSNPRINTF=0;
12063 GNULIB_VSPRINTF_POSIX=0;
12064 HAVE_DECL_FPURGE=1;
12065 HAVE_DECL_FSEEKO=1;
12066 HAVE_DECL_FTELLO=1;
12067 HAVE_DECL_GETDELIM=1;
12068 HAVE_DECL_GETLINE=1;
12069 HAVE_DECL_OBSTACK_PRINTF=1;
12070 HAVE_DECL_SNPRINTF=1;
12071 HAVE_DECL_VSNPRINTF=1;
12072 HAVE_DPRINTF=1;
12073 HAVE_FSEEKO=1;
12074 HAVE_FTELLO=1;
12075 HAVE_PCLOSE=1;
12076 HAVE_POPEN=1;
12077 HAVE_RENAMEAT=1;
12078 HAVE_VASPRINTF=1;
12079 HAVE_VDPRINTF=1;
12080 REPLACE_DPRINTF=0;
12081 REPLACE_FCLOSE=0;
12082 REPLACE_FDOPEN=0;
12083 REPLACE_FFLUSH=0;
12084 REPLACE_FOPEN=0;
12085 REPLACE_FPRINTF=0;
12086 REPLACE_FPURGE=0;
12087 REPLACE_FREOPEN=0;
12088 REPLACE_FSEEK=0;
12089 REPLACE_FSEEKO=0;
12090 REPLACE_FTELL=0;
12091 REPLACE_FTELLO=0;
12092 REPLACE_GETDELIM=0;
12093 REPLACE_GETLINE=0;
12094 REPLACE_OBSTACK_PRINTF=0;
12095 REPLACE_PERROR=0;
12096 REPLACE_POPEN=0;
12097 REPLACE_PRINTF=0;
12098 REPLACE_REMOVE=0;
12099 REPLACE_RENAME=0;
12100 REPLACE_RENAMEAT=0;
12101 REPLACE_SNPRINTF=0;
12102 REPLACE_SPRINTF=0;
12103 REPLACE_STDIO_READ_FUNCS=0;
12104 REPLACE_STDIO_WRITE_FUNCS=0;
12105 REPLACE_TMPFILE=0;
12106 REPLACE_VASPRINTF=0;
12107 REPLACE_VDPRINTF=0;
12108 REPLACE_VFPRINTF=0;
12109 REPLACE_VPRINTF=0;
12110 REPLACE_VSNPRINTF=0;
12111 REPLACE_VSPRINTF=0;
12112
12113
12114
12115 ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default"
12116 if test "x$ac_cv_have_decl_setenv" = x""yes; then :
12117 ac_have_decl=1
12118 else
12119 ac_have_decl=0
12120 fi
12121
12122 cat >>confdefs.h <<_ACEOF
12123 #define HAVE_DECL_SETENV $ac_have_decl
12124 _ACEOF
12125
12126
12127
12128
12129
12130
12131 if test $ac_cv_have_decl_setenv = no; then
12132 HAVE_DECL_SETENV=0
12133 fi
12134
12135
12136
12137
12138
12139 for ac_header in search.h
12140 do :
12141 ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
12142 if test "x$ac_cv_header_search_h" = x""yes; then :
12143 cat >>confdefs.h <<_ACEOF
12144 #define HAVE_SEARCH_H 1
12145 _ACEOF
12146
12147 fi
12148
12149 done
12150
12151 for ac_func in tsearch
12152 do :
12153 ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
12154 if test "x$ac_cv_func_tsearch" = x""yes; then :
12155 cat >>confdefs.h <<_ACEOF
12156 #define HAVE_TSEARCH 1
12157 _ACEOF
12158
12159 fi
12160 done
12161
12162
12163
12164
12165 GNULIB_PTHREAD_SIGMASK=0;
12166 GNULIB_RAISE=0;
12167 GNULIB_SIGNAL_H_SIGPIPE=0;
12168 GNULIB_SIGPROCMASK=0;
12169 GNULIB_SIGACTION=0;
12170 HAVE_POSIX_SIGNALBLOCKING=1;
12171 HAVE_PTHREAD_SIGMASK=1;
12172 HAVE_RAISE=1;
12173 HAVE_SIGSET_T=1;
12174 HAVE_SIGINFO_T=1;
12175 HAVE_SIGACTION=1;
12176 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
12177
12178 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
12179
12180 HAVE_SIGHANDLER_T=1;
12181 REPLACE_PTHREAD_SIGMASK=0;
12182 REPLACE_RAISE=0;
12183
12184
12185 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
12186 #include <signal.h>
12187 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
12188 #include <sys/types.h>
12189
12190 "
12191 if test "x$ac_cv_type_sigset_t" = x""yes; then :
12192
12193 cat >>confdefs.h <<_ACEOF
12194 #define HAVE_SIGSET_T 1
12195 _ACEOF
12196
12197 gl_cv_type_sigset_t=yes
12198 else
12199 gl_cv_type_sigset_t=no
12200 fi
12201
12202 if test $gl_cv_type_sigset_t != yes; then
12203 HAVE_SIGSET_T=0
12204 fi
12205
12206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
12207 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
12208 if test "${ac_cv_type_uid_t+set}" = set; then :
12209 $as_echo_n "(cached) " >&6
12210 else
12211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12212 /* end confdefs.h. */
12213 #include <sys/types.h>
12214
12215 _ACEOF
12216 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12217 $EGREP "uid_t" >/dev/null 2>&1; then :
12218 ac_cv_type_uid_t=yes
12219 else
12220 ac_cv_type_uid_t=no
12221 fi
12222 rm -f conftest*
12223
12224 fi
12225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
12226 $as_echo "$ac_cv_type_uid_t" >&6; }
12227 if test $ac_cv_type_uid_t = no; then
12228
12229 $as_echo "#define uid_t int" >>confdefs.h
12230
12231
12232 $as_echo "#define gid_t int" >>confdefs.h
12233
12234 fi
12235
12236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
12237 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
12238 if test "${ac_cv_header_stdbool_h+set}" = set; then :
12239 $as_echo_n "(cached) " >&6
12240 else
12241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12242 /* end confdefs.h. */
12243
12244 #include <stdbool.h>
12245
12246 #ifdef __cplusplus
12247 typedef bool Bool;
12248 #else
12249 typedef _Bool Bool;
12250 #ifndef bool
12251 "error: bool is not defined"
12252 #endif
12253 #ifndef false
12254 "error: false is not defined"
12255 #endif
12256 #if false
12257 "error: false is not 0"
12258 #endif
12259 #ifndef true
12260 "error: true is not defined"
12261 #endif
12262 #if true != 1
12263 "error: true is not 1"
12264 #endif
12265 #endif
12266
12267 #ifndef __bool_true_false_are_defined
12268 "error: __bool_true_false_are_defined is not defined"
12269 #endif
12270
12271 struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
12272
12273 char a[true == 1 ? 1 : -1];
12274 char b[false == 0 ? 1 : -1];
12275 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
12276 char d[(bool) 0.5 == true ? 1 : -1];
12277 /* See body of main program for 'e'. */
12278 char f[(Bool) 0.0 == false ? 1 : -1];
12279 char g[true];
12280 char h[sizeof (Bool)];
12281 char i[sizeof s.t];
12282 enum { j = false, k = true, l = false * true, m = true * 256 };
12283 /* The following fails for
12284 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
12285 Bool n[m];
12286 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
12287 char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
12288 /* Catch a bug in an HP-UX C compiler. See
12289 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
12290 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
12291 */
12292 Bool q = true;
12293 Bool *pq = &q;
12294 bool *qq = &q;
12295
12296 int
12297 main ()
12298 {
12299
12300 bool e = &s;
12301 *pq |= q; *pq |= ! q;
12302 *qq |= q; *qq |= ! q;
12303 /* Refer to every declared value, to avoid compiler optimizations. */
12304 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
12305 + !m + !n + !o + !p + !q + !pq + !qq);
12306
12307 ;
12308 return 0;
12309 }
12310 _ACEOF
12311 if ac_fn_c_try_compile "$LINENO"; then :
12312 ac_cv_header_stdbool_h=yes
12313 else
12314 ac_cv_header_stdbool_h=no
12315 fi
12316 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12317 fi
12318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
12319 $as_echo "$ac_cv_header_stdbool_h" >&6; }
12320 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
12321 if test "x$ac_cv_type__Bool" = x""yes; then :
12322
12323 cat >>confdefs.h <<_ACEOF
12324 #define HAVE__BOOL 1
12325 _ACEOF
12326
12327
12328 fi
12329
12330
12331
12332 REPLACE_NULL=0;
12333 HAVE_MAX_ALIGN_T=1;
12334 HAVE_WCHAR_T=1;
12335
12336
12337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
12338 $as_echo_n "checking for wchar_t... " >&6; }
12339 if test "${gt_cv_c_wchar_t+set}" = set; then :
12340 $as_echo_n "(cached) " >&6
12341 else
12342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12343 /* end confdefs.h. */
12344 #include <stddef.h>
12345 wchar_t foo = (wchar_t)'\0';
12346 int
12347 main ()
12348 {
12349
12350 ;
12351 return 0;
12352 }
12353 _ACEOF
12354 if ac_fn_c_try_compile "$LINENO"; then :
12355 gt_cv_c_wchar_t=yes
12356 else
12357 gt_cv_c_wchar_t=no
12358 fi
12359 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12360 fi
12361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
12362 $as_echo "$gt_cv_c_wchar_t" >&6; }
12363 if test $gt_cv_c_wchar_t = yes; then
12364
12365 $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
12366
12367 fi
12368
12369
12370
12371 ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
12372 if test "x$ac_cv_have_decl_strdup" = x""yes; then :
12373 ac_have_decl=1
12374 else
12375 ac_have_decl=0
12376 fi
12377
12378 cat >>confdefs.h <<_ACEOF
12379 #define HAVE_DECL_STRDUP $ac_have_decl
12380 _ACEOF
12381
12382
12383 REPLACE_STRERROR_0=0
12384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
12385 $as_echo_n "checking whether strerror(0) succeeds... " >&6; }
12386 if test "${gl_cv_func_strerror_0_works+set}" = set; then :
12387 $as_echo_n "(cached) " >&6
12388 else
12389 if test "$cross_compiling" = yes; then :
12390 case "$host_os" in
12391 # Guess yes on glibc systems.
12392 *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
12393 # If we don't know, assume the worst.
12394 *) gl_cv_func_strerror_0_works="guessing no" ;;
12395 esac
12396
12397 else
12398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12399 /* end confdefs.h. */
12400 #include <string.h>
12401 #include <errno.h>
12402
12403 int
12404 main ()
12405 {
12406 int result = 0;
12407 char *str;
12408 errno = 0;
12409 str = strerror (0);
12410 if (!*str) result |= 1;
12411 if (errno) result |= 2;
12412 if (strstr (str, "nknown") || strstr (str, "ndefined"))
12413 result |= 4;
12414 return result;
12415 ;
12416 return 0;
12417 }
12418 _ACEOF
12419 if ac_fn_c_try_run "$LINENO"; then :
12420 gl_cv_func_strerror_0_works=yes
12421 else
12422 gl_cv_func_strerror_0_works=no
12423 fi
12424 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12425 conftest.$ac_objext conftest.beam conftest.$ac_ext
12426 fi
12427
12428
12429 fi
12430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
12431 $as_echo "$gl_cv_func_strerror_0_works" >&6; }
12432 case "$gl_cv_func_strerror_0_works" in
12433 *yes) ;;
12434 *)
12435 REPLACE_STRERROR_0=1
12436
12437 $as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h
12438
12439 ;;
12440 esac
12441
12442
12443
12444
12445
12446
12447
12448
12449
12450
12451
12452
12453 if test $gl_cv_have_include_next = yes; then
12454 gl_cv_next_string_h='<'string.h'>'
12455 else
12456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
12457 $as_echo_n "checking absolute name of <string.h>... " >&6; }
12458 if test "${gl_cv_next_string_h+set}" = set; then :
12459 $as_echo_n "(cached) " >&6
12460 else
12461
12462
12463
12464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12465 /* end confdefs.h. */
12466 #include <string.h>
12467 _ACEOF
12468 case "$host_os" in
12469 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12470 *) gl_absname_cpp="$ac_cpp" ;;
12471 esac
12472
12473 case "$host_os" in
12474 mingw*)
12475 gl_dirsep_regex='[/\\]'
12476 ;;
12477 *)
12478 gl_dirsep_regex='\/'
12479 ;;
12480 esac
12481 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12482 gl_header_literal_regex=`echo 'string.h' \
12483 | sed -e "$gl_make_literal_regex_sed"`
12484 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12485 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12486 s|^/[^/]|//&|
12487 p
12488 q
12489 }'
12490
12491 gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12492 sed -n "$gl_absolute_header_sed"`
12493
12494 gl_header=$gl_cv_absolute_string_h
12495 gl_cv_next_string_h='"'$gl_header'"'
12496
12497
12498 fi
12499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
12500 $as_echo "$gl_cv_next_string_h" >&6; }
12501 fi
12502 NEXT_STRING_H=$gl_cv_next_string_h
12503
12504 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12505 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12506 gl_next_as_first_directive='<'string.h'>'
12507 else
12508 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12509 gl_next_as_first_directive=$gl_cv_next_string_h
12510 fi
12511 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
12512
12513
12514
12515
12516
12517
12518 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
12519 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
12520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
12521 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
12522 if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
12523 $as_echo_n "(cached) " >&6
12524 else
12525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12526 /* end confdefs.h. */
12527 #include <string.h>
12528
12529 int
12530 main ()
12531 {
12532 #undef $gl_func
12533 (void) $gl_func;
12534 ;
12535 return 0;
12536 }
12537 _ACEOF
12538 if ac_fn_c_try_compile "$LINENO"; then :
12539 eval "$as_gl_Symbol=yes"
12540 else
12541 eval "$as_gl_Symbol=no"
12542 fi
12543 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12544 fi
12545 eval ac_res=\$$as_gl_Symbol
12546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12547 $as_echo "$ac_res" >&6; }
12548 eval as_val=\$$as_gl_Symbol
12549 if test "x$as_val" = x""yes; then :
12550 cat >>confdefs.h <<_ACEOF
12551 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
12552 _ACEOF
12553
12554 eval ac_cv_have_decl_$gl_func=yes
12555 fi
12556 done
12557
12558
12559
12560
12561
12562 if test "$gl_cv_func_memchr_works" != yes; then
12563 REPLACE_STRSTR=1
12564 else
12565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
12566 $as_echo_n "checking whether strstr works... " >&6; }
12567 if test "${gl_cv_func_strstr_works_always+set}" = set; then :
12568 $as_echo_n "(cached) " >&6
12569 else
12570 if test "$cross_compiling" = yes; then :
12571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12572 /* end confdefs.h. */
12573
12574 #ifdef __GNU_LIBRARY__
12575 #include <features.h>
12576 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
12577 || defined __UCLIBC__
12578 Lucky user
12579 #endif
12580 #elif defined __CYGWIN__
12581 #include <cygwin/version.h>
12582 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
12583 Lucky user
12584 #endif
12585 #else
12586 Lucky user
12587 #endif
12588
12589 _ACEOF
12590 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12591 $EGREP "Lucky user" >/dev/null 2>&1; then :
12592 gl_cv_func_strstr_works_always="guessing yes"
12593 else
12594 gl_cv_func_strstr_works_always="guessing no"
12595 fi
12596 rm -f conftest*
12597
12598
12599 else
12600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12601 /* end confdefs.h. */
12602
12603 #include <string.h> /* for strstr */
12604 #define P "_EF_BF_BD"
12605 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
12606 #define NEEDLE P P P P P
12607
12608 int
12609 main ()
12610 {
12611 return !!strstr (HAYSTACK, NEEDLE);
12612
12613 ;
12614 return 0;
12615 }
12616 _ACEOF
12617 if ac_fn_c_try_run "$LINENO"; then :
12618 gl_cv_func_strstr_works_always=yes
12619 else
12620 gl_cv_func_strstr_works_always=no
12621 fi
12622 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12623 conftest.$ac_objext conftest.beam conftest.$ac_ext
12624 fi
12625
12626
12627 fi
12628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
12629 $as_echo "$gl_cv_func_strstr_works_always" >&6; }
12630 case "$gl_cv_func_strstr_works_always" in
12631 *yes) ;;
12632 *)
12633 REPLACE_STRSTR=1
12634 ;;
12635 esac
12636 fi
12637
12638 ac_fn_c_check_decl "$LINENO" "strtok_r" "ac_cv_have_decl_strtok_r" "$ac_includes_default"
12639 if test "x$ac_cv_have_decl_strtok_r" = x""yes; then :
12640 ac_have_decl=1
12641 else
12642 ac_have_decl=0
12643 fi
12644
12645 cat >>confdefs.h <<_ACEOF
12646 #define HAVE_DECL_STRTOK_R $ac_have_decl
12647 _ACEOF
12648
12649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
12650 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
12651 if test -z "$MKDIR_P"; then
12652 if test "${ac_cv_path_mkdir+set}" = set; then :
12653 $as_echo_n "(cached) " >&6
12654 else
12655 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12656 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
12657 do
12658 IFS=$as_save_IFS
12659 test -z "$as_dir" && as_dir=.
12660 for ac_prog in mkdir gmkdir; do
12661 for ac_exec_ext in '' $ac_executable_extensions; do
12662 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
12663 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
12664 'mkdir (GNU coreutils) '* | \
12665 'mkdir (coreutils) '* | \
12666 'mkdir (fileutils) '4.1*)
12667 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
12668 break 3;;
12669 esac
12670 done
12671 done
12672 done
12673 IFS=$as_save_IFS
12674
12675 fi
12676
12677 if test "${ac_cv_path_mkdir+set}" = set; then
12678 MKDIR_P="$ac_cv_path_mkdir -p"
12679 else
12680 # As a last resort, use the slow shell script. Don't cache a
12681 # value for MKDIR_P within a source directory, because that will
12682 # break other packages using the cache if that directory is
12683 # removed, or if the value is a relative name.
12684 test -d ./--version && rmdir ./--version
12685 MKDIR_P="$ac_install_sh -d"
12686 fi
12687 fi
12688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
12689 $as_echo "$MKDIR_P" >&6; }
12690
12691
12692
12693
12694
12695
12696
12697
12698
12699
12700
12701
12702
12703
12704
12705
12706
12707
12708
12709 if test $gl_cv_have_include_next = yes; then
12710 gl_cv_next_sys_types_h='<'sys/types.h'>'
12711 else
12712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
12713 $as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
12714 if test "${gl_cv_next_sys_types_h+set}" = set; then :
12715 $as_echo_n "(cached) " >&6
12716 else
12717
12718
12719
12720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12721 /* end confdefs.h. */
12722 #include <sys/types.h>
12723 _ACEOF
12724 case "$host_os" in
12725 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12726 *) gl_absname_cpp="$ac_cpp" ;;
12727 esac
12728
12729 case "$host_os" in
12730 mingw*)
12731 gl_dirsep_regex='[/\\]'
12732 ;;
12733 *)
12734 gl_dirsep_regex='\/'
12735 ;;
12736 esac
12737 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12738 gl_header_literal_regex=`echo 'sys/types.h' \
12739 | sed -e "$gl_make_literal_regex_sed"`
12740 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12741 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12742 s|^/[^/]|//&|
12743 p
12744 q
12745 }'
12746
12747 gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12748 sed -n "$gl_absolute_header_sed"`
12749
12750 gl_header=$gl_cv_absolute_sys_types_h
12751 gl_cv_next_sys_types_h='"'$gl_header'"'
12752
12753
12754 fi
12755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
12756 $as_echo "$gl_cv_next_sys_types_h" >&6; }
12757 fi
12758 NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
12759
12760 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12761 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12762 gl_next_as_first_directive='<'sys/types.h'>'
12763 else
12764 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12765 gl_next_as_first_directive=$gl_cv_next_sys_types_h
12766 fi
12767 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
12768
12769
12770
12771
12772
12773
12774
12775
12776
12777
12778
12779
12780 GNULIB_MKTIME=0;
12781 GNULIB_NANOSLEEP=0;
12782 GNULIB_STRPTIME=0;
12783 GNULIB_TIMEGM=0;
12784 GNULIB_TIME_R=0;
12785 GNULIB_TIME_RZ=0;
12786 HAVE_DECL_LOCALTIME_R=1;
12787 HAVE_NANOSLEEP=1;
12788 HAVE_STRPTIME=1;
12789 HAVE_TIMEGM=1;
12790 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
12791 REPLACE_MKTIME=GNULIB_PORTCHECK;
12792 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
12793 REPLACE_TIMEGM=GNULIB_PORTCHECK;
12794
12795 : ${GNULIB_GETTIMEOFDAY=0};
12796 REPLACE_GMTIME=0;
12797 REPLACE_LOCALTIME=0;
12798
12799
12800
12801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
12802 $as_echo_n "checking for struct timespec in <time.h>... " >&6; }
12803 if test "${gl_cv_sys_struct_timespec_in_time_h+set}" = set; then :
12804 $as_echo_n "(cached) " >&6
12805 else
12806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12807 /* end confdefs.h. */
12808 #include <time.h>
12809
12810 int
12811 main ()
12812 {
12813 static struct timespec x; x.tv_sec = x.tv_nsec;
12814 ;
12815 return 0;
12816 }
12817 _ACEOF
12818 if ac_fn_c_try_compile "$LINENO"; then :
12819 gl_cv_sys_struct_timespec_in_time_h=yes
12820 else
12821 gl_cv_sys_struct_timespec_in_time_h=no
12822 fi
12823 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12824 fi
12825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
12826 $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
12827
12828 TIME_H_DEFINES_STRUCT_TIMESPEC=0
12829 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
12830 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
12831 UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
12832 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
12833 TIME_H_DEFINES_STRUCT_TIMESPEC=1
12834 else
12835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
12836 $as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
12837 if test "${gl_cv_sys_struct_timespec_in_sys_time_h+set}" = set; then :
12838 $as_echo_n "(cached) " >&6
12839 else
12840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12841 /* end confdefs.h. */
12842 #include <sys/time.h>
12843
12844 int
12845 main ()
12846 {
12847 static struct timespec x; x.tv_sec = x.tv_nsec;
12848 ;
12849 return 0;
12850 }
12851 _ACEOF
12852 if ac_fn_c_try_compile "$LINENO"; then :
12853 gl_cv_sys_struct_timespec_in_sys_time_h=yes
12854 else
12855 gl_cv_sys_struct_timespec_in_sys_time_h=no
12856 fi
12857 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12858 fi
12859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
12860 $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
12861 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
12862 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
12863 else
12864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
12865 $as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
12866 if test "${gl_cv_sys_struct_timespec_in_pthread_h+set}" = set; then :
12867 $as_echo_n "(cached) " >&6
12868 else
12869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12870 /* end confdefs.h. */
12871 #include <pthread.h>
12872
12873 int
12874 main ()
12875 {
12876 static struct timespec x; x.tv_sec = x.tv_nsec;
12877 ;
12878 return 0;
12879 }
12880 _ACEOF
12881 if ac_fn_c_try_compile "$LINENO"; then :
12882 gl_cv_sys_struct_timespec_in_pthread_h=yes
12883 else
12884 gl_cv_sys_struct_timespec_in_pthread_h=no
12885 fi
12886 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12887 fi
12888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
12889 $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
12890 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
12891 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
12892 else
12893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
12894 $as_echo_n "checking for struct timespec in <unistd.h>... " >&6; }
12895 if test "${gl_cv_sys_struct_timespec_in_unistd_h+set}" = set; then :
12896 $as_echo_n "(cached) " >&6
12897 else
12898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12899 /* end confdefs.h. */
12900 #include <unistd.h>
12901
12902 int
12903 main ()
12904 {
12905 static struct timespec x; x.tv_sec = x.tv_nsec;
12906 ;
12907 return 0;
12908 }
12909 _ACEOF
12910 if ac_fn_c_try_compile "$LINENO"; then :
12911 gl_cv_sys_struct_timespec_in_unistd_h=yes
12912 else
12913 gl_cv_sys_struct_timespec_in_unistd_h=no
12914 fi
12915 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12916 fi
12917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5
12918 $as_echo "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
12919 if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
12920 UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
12921 fi
12922 fi
12923 fi
12924 fi
12925
12926
12927
12928
12929
12930
12931
12932
12933
12934
12935
12936
12937
12938
12939
12940
12941 if test $gl_cv_have_include_next = yes; then
12942 gl_cv_next_time_h='<'time.h'>'
12943 else
12944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
12945 $as_echo_n "checking absolute name of <time.h>... " >&6; }
12946 if test "${gl_cv_next_time_h+set}" = set; then :
12947 $as_echo_n "(cached) " >&6
12948 else
12949
12950
12951
12952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12953 /* end confdefs.h. */
12954 #include <time.h>
12955 _ACEOF
12956 case "$host_os" in
12957 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12958 *) gl_absname_cpp="$ac_cpp" ;;
12959 esac
12960
12961 case "$host_os" in
12962 mingw*)
12963 gl_dirsep_regex='[/\\]'
12964 ;;
12965 *)
12966 gl_dirsep_regex='\/'
12967 ;;
12968 esac
12969 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12970 gl_header_literal_regex=`echo 'time.h' \
12971 | sed -e "$gl_make_literal_regex_sed"`
12972 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12973 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12974 s|^/[^/]|//&|
12975 p
12976 q
12977 }'
12978
12979 gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12980 sed -n "$gl_absolute_header_sed"`
12981
12982 gl_header=$gl_cv_absolute_time_h
12983 gl_cv_next_time_h='"'$gl_header'"'
12984
12985
12986 fi
12987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
12988 $as_echo "$gl_cv_next_time_h" >&6; }
12989 fi
12990 NEXT_TIME_H=$gl_cv_next_time_h
12991
12992 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12993 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12994 gl_next_as_first_directive='<'time.h'>'
12995 else
12996 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12997 gl_next_as_first_directive=$gl_cv_next_time_h
12998 fi
12999 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
13000
13001
13002
13003
13004
13005
13006
13007
13008 ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
13009 if test "x$ac_cv_have_decl_unsetenv" = x""yes; then :
13010 ac_have_decl=1
13011 else
13012 ac_have_decl=0
13013 fi
13014
13015 cat >>confdefs.h <<_ACEOF
13016 #define HAVE_DECL_UNSETENV $ac_have_decl
13017 _ACEOF
13018
13019
13020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
13021 $as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
13022 if test "${gl_cv_header_wchar_h_correct_inline+set}" = set; then :
13023 $as_echo_n "(cached) " >&6
13024 else
13025 gl_cv_header_wchar_h_correct_inline=yes
13026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13027 /* end confdefs.h. */
13028
13029 #define wcstod renamed_wcstod
13030 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
13031 <wchar.h>.
13032 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
13033 included before <wchar.h>. */
13034 #include <stddef.h>
13035 #include <stdio.h>
13036 #include <time.h>
13037 #include <wchar.h>
13038 extern int zero (void);
13039 int main () { return zero(); }
13040
13041 _ACEOF
13042 save_ac_compile="$ac_compile"
13043 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
13044 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
13045 (eval $ac_compile) 2>&5
13046 ac_status=$?
13047 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13048 test $ac_status = 0; }; then
13049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13050 /* end confdefs.h. */
13051
13052 #define wcstod renamed_wcstod
13053 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
13054 <wchar.h>.
13055 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
13056 included before <wchar.h>. */
13057 #include <stddef.h>
13058 #include <stdio.h>
13059 #include <time.h>
13060 #include <wchar.h>
13061 int zero (void) { return 0; }
13062
13063 _ACEOF
13064 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
13065 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
13066 (eval $ac_compile) 2>&5
13067 ac_status=$?
13068 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13069 test $ac_status = 0; }; then
13070 if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
13071 :
13072 else
13073 gl_cv_header_wchar_h_correct_inline=no
13074 fi
13075 fi
13076 fi
13077 ac_compile="$save_ac_compile"
13078 rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
13079
13080 fi
13081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
13082 $as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
13083 if test $gl_cv_header_wchar_h_correct_inline = no; then
13084 as_fn_error "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
13085 This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
13086 C99 mode. You have four options:
13087 - Add the flag -fgnu89-inline to CC and reconfigure, or
13088 - Fix your include files, using parts of
13089 <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
13090 - Use a gcc version older than 4.3, or
13091 - Don't use the flags -std=c99 or -std=gnu99.
13092 Configuration aborted." "$LINENO" 5
13093 fi
13094
13095
13096
13097
13098
13099 if test $ac_cv_header_features_h = yes; then
13100 HAVE_FEATURES_H=1
13101 else
13102 HAVE_FEATURES_H=0
13103 fi
13104
13105
13106
13107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
13108 $as_echo_n "checking for wint_t... " >&6; }
13109 if test "${gt_cv_c_wint_t+set}" = set; then :
13110 $as_echo_n "(cached) " >&6
13111 else
13112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13113 /* end confdefs.h. */
13114
13115 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
13116 <wchar.h>.
13117 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
13118 before <wchar.h>. */
13119 #include <stddef.h>
13120 #include <stdio.h>
13121 #include <time.h>
13122 #include <wchar.h>
13123 wint_t foo = (wchar_t)'\0';
13124 int
13125 main ()
13126 {
13127
13128 ;
13129 return 0;
13130 }
13131 _ACEOF
13132 if ac_fn_c_try_compile "$LINENO"; then :
13133 gt_cv_c_wint_t=yes
13134 else
13135 gt_cv_c_wint_t=no
13136 fi
13137 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13138 fi
13139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
13140 $as_echo "$gt_cv_c_wint_t" >&6; }
13141 if test $gt_cv_c_wint_t = yes; then
13142
13143 $as_echo "#define HAVE_WINT_T 1" >>confdefs.h
13144
13145 fi
13146
13147
13148 GNULIB_ISWBLANK=0;
13149 GNULIB_WCTYPE=0;
13150 GNULIB_ISWCTYPE=0;
13151 GNULIB_WCTRANS=0;
13152 GNULIB_TOWCTRANS=0;
13153 HAVE_ISWBLANK=1;
13154 HAVE_WCTYPE_T=1;
13155 HAVE_WCTRANS_T=1;
13156 REPLACE_ISWBLANK=0;
13157
13158
13159
13160
13161 if false; then
13162 GL_COND_LIBTOOL_TRUE=
13163 GL_COND_LIBTOOL_FALSE='#'
13164 else
13165 GL_COND_LIBTOOL_TRUE='#'
13166 GL_COND_LIBTOOL_FALSE=
13167 fi
13168
13169 gl_cond_libtool=false
13170 gl_libdeps=
13171 gl_ltlibdeps=
13172 gl_m4_base='import/m4'
13173
13174
13175
13176
13177
13178
13179
13180
13181
13182 gl_source_base='import'
13183
13184
13185 if test $ac_cv_func_alloca_works = no; then
13186 :
13187 fi
13188
13189 # Define an additional variable used in the Makefile substitution.
13190 if test $ac_cv_working_alloca_h = yes; then
13191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
13192 $as_echo_n "checking for alloca as a compiler built-in... " >&6; }
13193 if test "${gl_cv_rpl_alloca+set}" = set; then :
13194 $as_echo_n "(cached) " >&6
13195 else
13196
13197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13198 /* end confdefs.h. */
13199
13200 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
13201 Need own alloca
13202 #endif
13203
13204 _ACEOF
13205 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13206 $EGREP "Need own alloca" >/dev/null 2>&1; then :
13207 gl_cv_rpl_alloca=yes
13208 else
13209 gl_cv_rpl_alloca=no
13210 fi
13211 rm -f conftest*
13212
13213
13214 fi
13215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
13216 $as_echo "$gl_cv_rpl_alloca" >&6; }
13217 if test $gl_cv_rpl_alloca = yes; then
13218
13219 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
13220
13221 ALLOCA_H=alloca.h
13222 else
13223 ALLOCA_H=
13224 fi
13225 else
13226 ALLOCA_H=alloca.h
13227 fi
13228
13229 if test -n "$ALLOCA_H"; then
13230 GL_GENERATE_ALLOCA_H_TRUE=
13231 GL_GENERATE_ALLOCA_H_FALSE='#'
13232 else
13233 GL_GENERATE_ALLOCA_H_TRUE='#'
13234 GL_GENERATE_ALLOCA_H_FALSE=
13235 fi
13236
13237
13238
13239
13240
13241
13242
13243
13244
13245
13246 gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
13247
13248
13249
13250
13251 if test $ac_cv_func_canonicalize_file_name = no; then
13252 HAVE_CANONICALIZE_FILE_NAME=0
13253 if test $ac_cv_func_realpath = no; then
13254 HAVE_REALPATH=0
13255 else
13256 case "$gl_cv_func_realpath_works" in
13257 *yes) ;;
13258 *) REPLACE_REALPATH=1 ;;
13259 esac
13260 fi
13261 else
13262 case "$gl_cv_func_realpath_works" in
13263 *yes)
13264 ;;
13265 *)
13266 REPLACE_CANONICALIZE_FILE_NAME=1
13267 REPLACE_REALPATH=1
13268 ;;
13269 esac
13270 fi
13271
13272 if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
13273
13274
13275
13276
13277
13278
13279
13280
13281 gl_LIBOBJS="$gl_LIBOBJS canonicalize-lgpl.$ac_objext"
13282
13283 fi
13284
13285
13286 cat >>confdefs.h <<_ACEOF
13287 #define GNULIB_CANONICALIZE_LGPL 1
13288 _ACEOF
13289
13290
13291
13292
13293
13294
13295
13296 GNULIB_CANONICALIZE_FILE_NAME=1
13297
13298
13299
13300
13301
13302 $as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
13303
13304
13305
13306
13307
13308
13309
13310
13311 GNULIB_REALPATH=1
13312
13313
13314
13315
13316
13317 $as_echo "#define GNULIB_TEST_REALPATH 1" >>confdefs.h
13318
13319
13320
13321
13322
13323
13324
13325
13326 GNULIB_CHDIR=1
13327
13328
13329
13330
13331
13332 $as_echo "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
13333
13334
13335
13336
13337
13338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this system has an arbitrary file name length limit" >&5
13339 $as_echo_n "checking whether this system has an arbitrary file name length limit... " >&6; }
13340 if test "${gl_cv_have_arbitrary_file_name_length_limit+set}" = set; then :
13341 $as_echo_n "(cached) " >&6
13342 else
13343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13344 /* end confdefs.h. */
13345
13346 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
13347 #if HAVE_UNISTD_H
13348 # include <unistd.h>
13349 #endif
13350 #include <limits.h>
13351 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
13352 # include <sys/param.h>
13353 #endif
13354 #if !defined PATH_MAX && defined MAXPATHLEN
13355 # define PATH_MAX MAXPATHLEN
13356 #endif
13357 #ifdef __hpux
13358 # undef PATH_MAX
13359 # define PATH_MAX 1024
13360 #endif
13361 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
13362 # undef PATH_MAX
13363 # define PATH_MAX 260
13364 #endif
13365
13366 #ifdef PATH_MAX
13367 have_arbitrary_file_name_length_limit
13368 #endif
13369 _ACEOF
13370 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13371 $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1; then :
13372 gl_cv_have_arbitrary_file_name_length_limit=yes
13373 else
13374 gl_cv_have_arbitrary_file_name_length_limit=no
13375 fi
13376 rm -f conftest*
13377
13378 fi
13379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_arbitrary_file_name_length_limit" >&5
13380 $as_echo "$gl_cv_have_arbitrary_file_name_length_limit" >&6; }
13381
13382 if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then
13383
13384
13385
13386
13387
13388
13389
13390
13391 gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext"
13392
13393 :
13394 fi
13395
13396
13397 $as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
13398
13399
13400
13401
13402
13403 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
13404 REPLACE_CLOSE=1
13405 fi
13406
13407
13408
13409
13410
13411 if test $ac_cv_header_sys_socket_h != yes; then
13412 for ac_header in winsock2.h
13413 do :
13414 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
13415 if test "x$ac_cv_header_winsock2_h" = x""yes; then :
13416 cat >>confdefs.h <<_ACEOF
13417 #define HAVE_WINSOCK2_H 1
13418 _ACEOF
13419
13420 fi
13421
13422 done
13423
13424 fi
13425 if test "$ac_cv_header_winsock2_h" = yes; then
13426 HAVE_WINSOCK2_H=1
13427 UNISTD_H_HAVE_WINSOCK2_H=1
13428 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
13429 else
13430 HAVE_WINSOCK2_H=0
13431 fi
13432
13433
13434 if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
13435 REPLACE_CLOSE=1
13436 fi
13437
13438
13439 if test $REPLACE_CLOSE = 0; then
13440
13441
13442
13443 if test $ac_cv_func_fchdir = no; then
13444 HAVE_FCHDIR=0
13445 fi
13446
13447 if test $HAVE_FCHDIR = 0; then
13448 REPLACE_CLOSE=1
13449 fi
13450 fi
13451
13452
13453 if test $REPLACE_CLOSE = 1; then
13454
13455
13456
13457
13458
13459
13460
13461
13462 gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
13463
13464 fi
13465
13466
13467
13468
13469
13470 GNULIB_CLOSE=1
13471
13472
13473
13474
13475
13476 $as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
13477
13478
13479
13480
13481
13482
13483 for ac_func in closedir
13484 do :
13485 ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir"
13486 if test "x$ac_cv_func_closedir" = x""yes; then :
13487 cat >>confdefs.h <<_ACEOF
13488 #define HAVE_CLOSEDIR 1
13489 _ACEOF
13490
13491 fi
13492 done
13493
13494 if test $ac_cv_func_closedir = no; then
13495 HAVE_CLOSEDIR=0
13496 fi
13497
13498
13499
13500
13501 if test $ac_cv_func_fchdir = no; then
13502 HAVE_FCHDIR=0
13503 fi
13504
13505 if test $HAVE_FCHDIR = 0; then
13506 if test $HAVE_CLOSEDIR = 1; then
13507 REPLACE_CLOSEDIR=1
13508 fi
13509 fi
13510
13511 case $host_os,$HAVE_CLOSEDIR in
13512 os2*,1)
13513 REPLACE_CLOSEDIR=1;;
13514 esac
13515
13516 if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
13517
13518
13519
13520
13521
13522
13523
13524
13525 gl_LIBOBJS="$gl_LIBOBJS closedir.$ac_objext"
13526
13527 fi
13528
13529
13530
13531
13532
13533 GNULIB_CLOSEDIR=1
13534
13535
13536
13537
13538
13539 $as_echo "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
13540
13541
13542
13543
13544 if test "x$datarootdir" = x; then
13545 datarootdir='${datadir}'
13546
13547 fi
13548 if test "x$docdir" = x; then
13549 docdir='${datarootdir}/doc/${PACKAGE}'
13550
13551 fi
13552 if test "x$htmldir" = x; then
13553 htmldir='${docdir}'
13554
13555 fi
13556 if test "x$dvidir" = x; then
13557 dvidir='${docdir}'
13558
13559 fi
13560 if test "x$pdfdir" = x; then
13561 pdfdir='${docdir}'
13562
13563 fi
13564 if test "x$psdir" = x; then
13565 psdir='${docdir}'
13566
13567 fi
13568 if test "x$lispdir" = x; then
13569 lispdir='${datarootdir}/emacs/site-lisp'
13570
13571 fi
13572 if test "x$localedir" = x; then
13573 localedir='${datarootdir}/locale'
13574
13575 fi
13576 if test "x$runstatedir" = x; then
13577 runstatedir='${localstatedir}/run'
13578
13579 fi
13580
13581 pkglibexecdir='${libexecdir}/${PACKAGE}'
13582
13583
13584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
13585 $as_echo_n "checking for d_ino member in directory struct... " >&6; }
13586 if test "${gl_cv_struct_dirent_d_ino+set}" = set; then :
13587 $as_echo_n "(cached) " >&6
13588 else
13589 if test "$cross_compiling" = yes; then :
13590 case "$host_os" in
13591 # Guess yes on glibc systems with Linux kernel.
13592 linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
13593 # If we don't know, assume the worst.
13594 *) gl_cv_struct_dirent_d_ino="guessing no" ;;
13595 esac
13596
13597 else
13598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13599 /* end confdefs.h. */
13600 #include <sys/types.h>
13601 #include <sys/stat.h>
13602 #include <dirent.h>
13603
13604 int
13605 main ()
13606 {
13607 DIR *dp = opendir (".");
13608 struct dirent *e;
13609 struct stat st;
13610 if (! dp)
13611 return 1;
13612 e = readdir (dp);
13613 if (! e)
13614 return 2;
13615 if (lstat (e->d_name, &st) != 0)
13616 return 3;
13617 if (e->d_ino != st.st_ino)
13618 return 4;
13619 closedir (dp);
13620 return 0;
13621
13622 ;
13623 return 0;
13624 }
13625 _ACEOF
13626 if ac_fn_c_try_run "$LINENO"; then :
13627 gl_cv_struct_dirent_d_ino=yes
13628 else
13629 gl_cv_struct_dirent_d_ino=no
13630 fi
13631 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13632 conftest.$ac_objext conftest.beam conftest.$ac_ext
13633 fi
13634
13635 fi
13636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5
13637 $as_echo "$gl_cv_struct_dirent_d_ino" >&6; }
13638 case "$gl_cv_struct_dirent_d_ino" in
13639 *yes)
13640
13641 $as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h
13642
13643 ;;
13644 esac
13645
13646
13647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_type member in directory struct" >&5
13648 $as_echo_n "checking for d_type member in directory struct... " >&6; }
13649 if test "${gl_cv_struct_dirent_d_type+set}" = set; then :
13650 $as_echo_n "(cached) " >&6
13651 else
13652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13653 /* end confdefs.h. */
13654
13655 #include <sys/types.h>
13656 #include <dirent.h>
13657
13658 int
13659 main ()
13660 {
13661 struct dirent dp; dp.d_type = 0;
13662 ;
13663 return 0;
13664 }
13665 _ACEOF
13666 if ac_fn_c_try_link "$LINENO"; then :
13667 gl_cv_struct_dirent_d_type=yes
13668 else
13669 gl_cv_struct_dirent_d_type=no
13670 fi
13671 rm -f core conftest.err conftest.$ac_objext \
13672 conftest$ac_exeext conftest.$ac_ext
13673
13674
13675 fi
13676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_type" >&5
13677 $as_echo "$gl_cv_struct_dirent_d_type" >&6; }
13678 if test $gl_cv_struct_dirent_d_type = yes; then
13679
13680 $as_echo "#define HAVE_STRUCT_DIRENT_D_TYPE 1" >>confdefs.h
13681
13682 fi
13683
13684
13685
13686
13687
13688
13689
13690
13691
13692
13693
13694
13695
13696
13697 if test $gl_cv_have_include_next = yes; then
13698 gl_cv_next_dirent_h='<'dirent.h'>'
13699 else
13700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
13701 $as_echo_n "checking absolute name of <dirent.h>... " >&6; }
13702 if test "${gl_cv_next_dirent_h+set}" = set; then :
13703 $as_echo_n "(cached) " >&6
13704 else
13705
13706 if test $ac_cv_header_dirent_h = yes; then
13707
13708
13709
13710
13711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13712 /* end confdefs.h. */
13713 #include <dirent.h>
13714 _ACEOF
13715 case "$host_os" in
13716 aix*) gl_absname_cpp="$ac_cpp -C" ;;
13717 *) gl_absname_cpp="$ac_cpp" ;;
13718 esac
13719
13720 case "$host_os" in
13721 mingw*)
13722 gl_dirsep_regex='[/\\]'
13723 ;;
13724 *)
13725 gl_dirsep_regex='\/'
13726 ;;
13727 esac
13728 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13729 gl_header_literal_regex=`echo 'dirent.h' \
13730 | sed -e "$gl_make_literal_regex_sed"`
13731 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13732 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13733 s|^/[^/]|//&|
13734 p
13735 q
13736 }'
13737
13738 gl_cv_absolute_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13739 sed -n "$gl_absolute_header_sed"`
13740
13741 gl_header=$gl_cv_absolute_dirent_h
13742 gl_cv_next_dirent_h='"'$gl_header'"'
13743 else
13744 gl_cv_next_dirent_h='<'dirent.h'>'
13745 fi
13746
13747
13748 fi
13749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
13750 $as_echo "$gl_cv_next_dirent_h" >&6; }
13751 fi
13752 NEXT_DIRENT_H=$gl_cv_next_dirent_h
13753
13754 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13755 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13756 gl_next_as_first_directive='<'dirent.h'>'
13757 else
13758 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13759 gl_next_as_first_directive=$gl_cv_next_dirent_h
13760 fi
13761 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
13762
13763
13764
13765
13766 if test $ac_cv_header_dirent_h = yes; then
13767 HAVE_DIRENT_H=1
13768 else
13769 HAVE_DIRENT_H=0
13770 fi
13771
13772
13773
13774 for gl_func in alphasort closedir dirfd fdopendir opendir readdir rewinddir scandir; do
13775 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
13776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
13777 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
13778 if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
13779 $as_echo_n "(cached) " >&6
13780 else
13781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13782 /* end confdefs.h. */
13783 #include <dirent.h>
13784
13785 int
13786 main ()
13787 {
13788 #undef $gl_func
13789 (void) $gl_func;
13790 ;
13791 return 0;
13792 }
13793 _ACEOF
13794 if ac_fn_c_try_compile "$LINENO"; then :
13795 eval "$as_gl_Symbol=yes"
13796 else
13797 eval "$as_gl_Symbol=no"
13798 fi
13799 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13800 fi
13801 eval ac_res=\$$as_gl_Symbol
13802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13803 $as_echo "$ac_res" >&6; }
13804 eval as_val=\$$as_gl_Symbol
13805 if test "x$as_val" = x""yes; then :
13806 cat >>confdefs.h <<_ACEOF
13807 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
13808 _ACEOF
13809
13810 eval ac_cv_have_decl_$gl_func=yes
13811 fi
13812 done
13813
13814
13815
13816
13817
13818
13819
13820 for ac_func in dirfd
13821 do :
13822 ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
13823 if test "x$ac_cv_func_dirfd" = x""yes; then :
13824 cat >>confdefs.h <<_ACEOF
13825 #define HAVE_DIRFD 1
13826 _ACEOF
13827
13828 fi
13829 done
13830
13831 ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
13832 #include <dirent.h>
13833 "
13834 if test "x$ac_cv_have_decl_dirfd" = x""yes; then :
13835 ac_have_decl=1
13836 else
13837 ac_have_decl=0
13838 fi
13839
13840 cat >>confdefs.h <<_ACEOF
13841 #define HAVE_DECL_DIRFD $ac_have_decl
13842 _ACEOF
13843
13844 if test $ac_cv_have_decl_dirfd = no; then
13845 HAVE_DECL_DIRFD=0
13846 fi
13847
13848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
13849 $as_echo_n "checking whether dirfd is a macro... " >&6; }
13850 if test "${gl_cv_func_dirfd_macro+set}" = set; then :
13851 $as_echo_n "(cached) " >&6
13852 else
13853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13854 /* end confdefs.h. */
13855
13856 #include <sys/types.h>
13857 #include <dirent.h>
13858 #ifdef dirfd
13859 dirent_header_defines_dirfd
13860 #endif
13861 _ACEOF
13862 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13863 $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1; then :
13864 gl_cv_func_dirfd_macro=yes
13865 else
13866 gl_cv_func_dirfd_macro=no
13867 fi
13868 rm -f conftest*
13869
13870 fi
13871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
13872 $as_echo "$gl_cv_func_dirfd_macro" >&6; }
13873
13874 # Use the replacement if we have no function or macro with that name,
13875 # or if OS/2 kLIBC whose dirfd() does not work.
13876 # Replace only if the system declares dirfd already.
13877 case $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro,$host_os,$ac_cv_have_decl_dirfd in
13878 no,no,*,yes | *,*,os2*,yes)
13879 REPLACE_DIRFD=1
13880
13881 $as_echo "#define REPLACE_DIRFD 1" >>confdefs.h
13882 ;;
13883 esac
13884
13885 if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \
13886 || test $REPLACE_DIRFD = 1; then
13887
13888
13889
13890
13891
13892
13893
13894
13895 gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext"
13896
13897
13898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
13899 $as_echo_n "checking how to get the file descriptor associated with an open DIR*... " >&6; }
13900 if test "${gl_cv_sys_dir_fd_member_name+set}" = set; then :
13901 $as_echo_n "(cached) " >&6
13902 else
13903
13904 dirfd_save_CFLAGS=$CFLAGS
13905 for ac_expr in d_fd dd_fd; do
13906
13907 CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
13908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13909 /* end confdefs.h. */
13910
13911 #include <sys/types.h>
13912 #include <dirent.h>
13913 int
13914 main ()
13915 {
13916 DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
13917 ;
13918 return 0;
13919 }
13920 _ACEOF
13921 if ac_fn_c_try_compile "$LINENO"; then :
13922 dir_fd_found=yes
13923
13924 fi
13925 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13926 CFLAGS=$dirfd_save_CFLAGS
13927 test "$dir_fd_found" = yes && break
13928 done
13929 test "$dir_fd_found" = yes || ac_expr=no_such_member
13930
13931 gl_cv_sys_dir_fd_member_name=$ac_expr
13932
13933
13934 fi
13935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
13936 $as_echo "$gl_cv_sys_dir_fd_member_name" >&6; }
13937 if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
13938
13939 cat >>confdefs.h <<_ACEOF
13940 #define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name
13941 _ACEOF
13942
13943 fi
13944
13945
13946 fi
13947
13948
13949
13950
13951
13952 GNULIB_DIRFD=1
13953
13954
13955
13956
13957
13958 $as_echo "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
13959
13960
13961
13962
13963
13964
13965
13966
13967
13968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
13969 $as_echo_n "checking whether // is distinct from /... " >&6; }
13970 if test "${gl_cv_double_slash_root+set}" = set; then :
13971 $as_echo_n "(cached) " >&6
13972 else
13973 if test x"$cross_compiling" = xyes ; then
13974 # When cross-compiling, there is no way to tell whether // is special
13975 # short of a list of hosts. However, the only known hosts to date
13976 # that have a distinct // are Apollo DomainOS (too old to port to),
13977 # Cygwin, and z/OS. If anyone knows of another system for which // has
13978 # special semantics and is distinct from /, please report it to
13979 # <bug-gnulib@gnu.org>.
13980 case $host in
13981 *-cygwin | i370-ibm-openedition)
13982 gl_cv_double_slash_root=yes ;;
13983 *)
13984 # Be optimistic and assume that / and // are the same when we
13985 # don't know.
13986 gl_cv_double_slash_root='unknown, assuming no' ;;
13987 esac
13988 else
13989 set x `ls -di / // 2>/dev/null`
13990 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
13991 gl_cv_double_slash_root=no
13992 else
13993 gl_cv_double_slash_root=yes
13994 fi
13995 fi
13996 fi
13997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
13998 $as_echo "$gl_cv_double_slash_root" >&6; }
13999 if test "$gl_cv_double_slash_root" = yes; then
14000
14001 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
14002
14003 fi
14004
14005
14006
14007
14008 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
14009 REPLACE_DUP=1
14010 fi
14011
14012
14013
14014
14015 if test $ac_cv_func_fchdir = no; then
14016 HAVE_FCHDIR=0
14017 fi
14018
14019 if test $HAVE_FCHDIR = 0; then
14020 REPLACE_DUP=1
14021 fi
14022
14023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup works" >&5
14024 $as_echo_n "checking whether dup works... " >&6; }
14025 if test "${gl_cv_func_dup_works+set}" = set; then :
14026 $as_echo_n "(cached) " >&6
14027 else
14028 if test "$cross_compiling" = yes; then :
14029 gl_cv_func_dup_works='guessing yes'
14030 else
14031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14032 /* end confdefs.h. */
14033 #include <unistd.h>
14034 #include <fcntl.h>
14035 #include <errno.h>
14036 int
14037 main ()
14038 {
14039 /* On OS/2 kLIBC, dup does not work on a directory fd. */
14040 int fd = open (".", O_RDONLY);
14041 return fd < 0 ? 1 : dup (fd) < 0 ? 2 : 0;
14042
14043 ;
14044 return 0;
14045 }
14046
14047 _ACEOF
14048 if ac_fn_c_try_run "$LINENO"; then :
14049 gl_cv_func_dup_works=yes
14050 else
14051 gl_cv_func_dup_works=no
14052 fi
14053 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14054 conftest.$ac_objext conftest.beam conftest.$ac_ext
14055 fi
14056
14057
14058 fi
14059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup_works" >&5
14060 $as_echo "$gl_cv_func_dup_works" >&6; }
14061 case "$gl_cv_func_dup_works" in
14062 *yes) ;;
14063 *)
14064 REPLACE_DUP=1
14065 ;;
14066 esac
14067
14068 if test $REPLACE_DUP = 1; then
14069
14070
14071
14072
14073
14074
14075
14076
14077 gl_LIBOBJS="$gl_LIBOBJS dup.$ac_objext"
14078
14079 :
14080 fi
14081
14082
14083
14084
14085
14086 GNULIB_DUP=1
14087
14088
14089
14090
14091
14092 $as_echo "#define GNULIB_TEST_DUP 1" >>confdefs.h
14093
14094
14095
14096
14097
14098
14099
14100
14101 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
14102
14103
14104 if test $HAVE_DUP2 = 1; then
14105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
14106 $as_echo_n "checking whether dup2 works... " >&6; }
14107 if test "${gl_cv_func_dup2_works+set}" = set; then :
14108 $as_echo_n "(cached) " >&6
14109 else
14110 if test "$cross_compiling" = yes; then :
14111 case "$host_os" in
14112 mingw*) # on this platform, dup2 always returns 0 for success
14113 gl_cv_func_dup2_works="guessing no" ;;
14114 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
14115 gl_cv_func_dup2_works="guessing no" ;;
14116 aix* | freebsd*)
14117 # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
14118 # not EBADF.
14119 gl_cv_func_dup2_works="guessing no" ;;
14120 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
14121 gl_cv_func_dup2_works="guessing no" ;;
14122 *-android*) # implemented using dup3(), which fails if oldfd == newfd
14123 gl_cv_func_dup2_works="guessing no" ;;
14124 os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
14125 gl_cv_func_dup2_works="guessing no" ;;
14126 *) gl_cv_func_dup2_works="guessing yes" ;;
14127 esac
14128 else
14129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14130 /* end confdefs.h. */
14131
14132 #include <errno.h>
14133 #include <fcntl.h>
14134 #include <limits.h>
14135 #include <sys/resource.h>
14136 #include <unistd.h>
14137 #ifndef RLIM_SAVED_CUR
14138 # define RLIM_SAVED_CUR RLIM_INFINITY
14139 #endif
14140 #ifndef RLIM_SAVED_MAX
14141 # define RLIM_SAVED_MAX RLIM_INFINITY
14142 #endif
14143
14144 int
14145 main ()
14146 {
14147 int result = 0;
14148 int bad_fd = INT_MAX;
14149 struct rlimit rlim;
14150 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
14151 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
14152 && rlim.rlim_cur != RLIM_INFINITY
14153 && rlim.rlim_cur != RLIM_SAVED_MAX
14154 && rlim.rlim_cur != RLIM_SAVED_CUR)
14155 bad_fd = rlim.rlim_cur;
14156 #ifdef FD_CLOEXEC
14157 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
14158 result |= 1;
14159 #endif
14160 if (dup2 (1, 1) != 1)
14161 result |= 2;
14162 #ifdef FD_CLOEXEC
14163 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
14164 result |= 4;
14165 #endif
14166 close (0);
14167 if (dup2 (0, 0) != -1)
14168 result |= 8;
14169 /* Many gnulib modules require POSIX conformance of EBADF. */
14170 if (dup2 (2, bad_fd) == -1 && errno != EBADF)
14171 result |= 16;
14172 /* Flush out some cygwin core dumps. */
14173 if (dup2 (2, -1) != -1 || errno != EBADF)
14174 result |= 32;
14175 dup2 (2, 255);
14176 dup2 (2, 256);
14177 /* On OS/2 kLIBC, dup2() does not work on a directory fd. */
14178 {
14179 int fd = open (".", O_RDONLY);
14180 if (fd == -1)
14181 result |= 64;
14182 else if (dup2 (fd, fd + 1) == -1)
14183 result |= 128;
14184
14185 close (fd);
14186 }
14187 return result;
14188 ;
14189 return 0;
14190 }
14191
14192 _ACEOF
14193 if ac_fn_c_try_run "$LINENO"; then :
14194 gl_cv_func_dup2_works=yes
14195 else
14196 gl_cv_func_dup2_works=no
14197 fi
14198 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14199 conftest.$ac_objext conftest.beam conftest.$ac_ext
14200 fi
14201
14202
14203 fi
14204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
14205 $as_echo "$gl_cv_func_dup2_works" >&6; }
14206 case "$gl_cv_func_dup2_works" in
14207 *yes) ;;
14208 *)
14209 REPLACE_DUP2=1
14210 for ac_func in setdtablesize
14211 do :
14212 ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
14213 if test "x$ac_cv_func_setdtablesize" = x""yes; then :
14214 cat >>confdefs.h <<_ACEOF
14215 #define HAVE_SETDTABLESIZE 1
14216 _ACEOF
14217
14218 fi
14219 done
14220
14221 ;;
14222 esac
14223 fi
14224
14225
14226
14227
14228 if test $ac_cv_func_fchdir = no; then
14229 HAVE_FCHDIR=0
14230 fi
14231
14232 if test $HAVE_FCHDIR = 0; then
14233 if test $HAVE_DUP2 = 1; then
14234 REPLACE_DUP2=1
14235 fi
14236 fi
14237
14238
14239 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
14240
14241
14242
14243
14244
14245
14246
14247
14248 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
14249
14250
14251 fi
14252
14253
14254
14255
14256
14257 GNULIB_DUP2=1
14258
14259
14260
14261
14262
14263 $as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h
14264
14265
14266
14267
14268
14269
14270
14271
14272
14273 GNULIB_ENVIRON=1
14274
14275
14276
14277
14278
14279 $as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
14280
14281
14282
14283
14284
14285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
14286 $as_echo_n "checking for error_at_line... " >&6; }
14287 if test "${ac_cv_lib_error_at_line+set}" = set; then :
14288 $as_echo_n "(cached) " >&6
14289 else
14290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14291 /* end confdefs.h. */
14292 #include <error.h>
14293 int
14294 main ()
14295 {
14296 error_at_line (0, 0, "", 0, "an error occurred");
14297 ;
14298 return 0;
14299 }
14300 _ACEOF
14301 if ac_fn_c_try_link "$LINENO"; then :
14302 ac_cv_lib_error_at_line=yes
14303 else
14304 ac_cv_lib_error_at_line=no
14305 fi
14306 rm -f core conftest.err conftest.$ac_objext \
14307 conftest$ac_exeext conftest.$ac_ext
14308 fi
14309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
14310 $as_echo "$ac_cv_lib_error_at_line" >&6; }
14311
14312 if test $ac_cv_lib_error_at_line = no; then
14313
14314
14315
14316
14317
14318
14319
14320
14321 gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
14322
14323
14324
14325 :
14326
14327 fi
14328
14329
14330
14331
14332
14333
14334
14335 if test $ac_cv_have_decl_fchdir = no; then
14336 HAVE_DECL_FCHDIR=0
14337 fi
14338
14339
14340 if test $HAVE_FCHDIR = 0; then
14341
14342
14343
14344
14345
14346
14347
14348
14349 gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext"
14350
14351 :
14352
14353 $as_echo "#define REPLACE_FCHDIR 1" >>confdefs.h
14354
14355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5
14356 $as_echo_n "checking whether open can visit directories... " >&6; }
14357 if test "${gl_cv_func_open_directory_works+set}" = set; then :
14358 $as_echo_n "(cached) " >&6
14359 else
14360 if test "$cross_compiling" = yes; then :
14361 case "$host_os" in
14362 # Guess yes on glibc systems.
14363 *-gnu*) gl_cv_func_open_directory_works="guessing yes" ;;
14364 # If we don't know, assume the worst.
14365 *) gl_cv_func_open_directory_works="guessing no" ;;
14366 esac
14367
14368 else
14369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14370 /* end confdefs.h. */
14371 #include <fcntl.h>
14372
14373 int
14374 main ()
14375 {
14376 return open(".", O_RDONLY) < 0;
14377 ;
14378 return 0;
14379 }
14380 _ACEOF
14381 if ac_fn_c_try_run "$LINENO"; then :
14382 gl_cv_func_open_directory_works=yes
14383 else
14384 gl_cv_func_open_directory_works=no
14385 fi
14386 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14387 conftest.$ac_objext conftest.beam conftest.$ac_ext
14388 fi
14389
14390 fi
14391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5
14392 $as_echo "$gl_cv_func_open_directory_works" >&6; }
14393 case "$gl_cv_func_open_directory_works" in
14394 *yes) ;;
14395 *)
14396
14397 $as_echo "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h
14398
14399 ;;
14400 esac
14401 fi
14402
14403
14404
14405
14406
14407
14408 GNULIB_FCHDIR=1
14409
14410
14411
14412
14413
14414 $as_echo "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h
14415
14416
14417
14418
14419
14420
14421
14422
14423 if test $ac_cv_func_fcntl = no; then
14424
14425
14426
14427 if test $ac_cv_func_fcntl = no; then
14428 HAVE_FCNTL=0
14429 else
14430 REPLACE_FCNTL=1
14431 fi
14432
14433 else
14434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
14435 $as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
14436 if test "${gl_cv_func_fcntl_f_dupfd_works+set}" = set; then :
14437 $as_echo_n "(cached) " >&6
14438 else
14439 if test "$cross_compiling" = yes; then :
14440 case $host_os in
14441 aix* | cygwin* | haiku*)
14442 gl_cv_func_fcntl_f_dupfd_works="guessing no" ;;
14443 *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;;
14444 esac
14445 else
14446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14447 /* end confdefs.h. */
14448 #include <errno.h>
14449 #include <fcntl.h>
14450 #include <limits.h>
14451 #include <sys/resource.h>
14452 #include <unistd.h>
14453 #ifndef RLIM_SAVED_CUR
14454 # define RLIM_SAVED_CUR RLIM_INFINITY
14455 #endif
14456 #ifndef RLIM_SAVED_MAX
14457 # define RLIM_SAVED_MAX RLIM_INFINITY
14458 #endif
14459
14460 int
14461 main ()
14462 {
14463 int result = 0;
14464 int bad_fd = INT_MAX;
14465 struct rlimit rlim;
14466 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
14467 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
14468 && rlim.rlim_cur != RLIM_INFINITY
14469 && rlim.rlim_cur != RLIM_SAVED_MAX
14470 && rlim.rlim_cur != RLIM_SAVED_CUR)
14471 bad_fd = rlim.rlim_cur;
14472 if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
14473 if (errno != EINVAL) result |= 2;
14474 if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
14475 if (errno != EINVAL) result |= 8;
14476 /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */
14477 {
14478 int fd;
14479 fd = open (".", O_RDONLY);
14480 if (fd == -1)
14481 result |= 16;
14482 else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1)
14483 result |= 32;
14484
14485 close (fd);
14486 }
14487 return result;
14488 ;
14489 return 0;
14490 }
14491 _ACEOF
14492 if ac_fn_c_try_run "$LINENO"; then :
14493 gl_cv_func_fcntl_f_dupfd_works=yes
14494 else
14495 gl_cv_func_fcntl_f_dupfd_works=no
14496 fi
14497 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14498 conftest.$ac_objext conftest.beam conftest.$ac_ext
14499 fi
14500
14501 fi
14502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
14503 $as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
14504 case $gl_cv_func_fcntl_f_dupfd_works in
14505 *yes) ;;
14506 *)
14507
14508
14509 if test $ac_cv_func_fcntl = no; then
14510 HAVE_FCNTL=0
14511 else
14512 REPLACE_FCNTL=1
14513 fi
14514
14515
14516 $as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
14517 ;;
14518 esac
14519
14520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
14521 $as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
14522 if test "${gl_cv_func_fcntl_f_dupfd_cloexec+set}" = set; then :
14523 $as_echo_n "(cached) " >&6
14524 else
14525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14526 /* end confdefs.h. */
14527
14528 #include <fcntl.h>
14529 #ifndef F_DUPFD_CLOEXEC
14530 choke me
14531 #endif
14532
14533 int
14534 main ()
14535 {
14536
14537 ;
14538 return 0;
14539 }
14540 _ACEOF
14541 if ac_fn_c_try_compile "$LINENO"; then :
14542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14543 /* end confdefs.h. */
14544
14545 #ifdef __linux__
14546 /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
14547 it to support the semantics on older kernels that failed with EINVAL. */
14548 choke me
14549 #endif
14550
14551 int
14552 main ()
14553 {
14554
14555 ;
14556 return 0;
14557 }
14558 _ACEOF
14559 if ac_fn_c_try_compile "$LINENO"; then :
14560 gl_cv_func_fcntl_f_dupfd_cloexec=yes
14561 else
14562 gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
14563 fi
14564 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14565 else
14566 gl_cv_func_fcntl_f_dupfd_cloexec=no
14567 fi
14568 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14569 fi
14570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
14571 $as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
14572 if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
14573
14574
14575
14576 if test $ac_cv_func_fcntl = no; then
14577 HAVE_FCNTL=0
14578 else
14579 REPLACE_FCNTL=1
14580 fi
14581
14582 fi
14583 fi
14584
14585
14586
14587
14588 if test $ac_cv_func_fchdir = no; then
14589 HAVE_FCHDIR=0
14590 fi
14591
14592 if test $HAVE_FCHDIR = 0; then
14593
14594
14595
14596 if test $ac_cv_func_fcntl = no; then
14597 HAVE_FCNTL=0
14598 else
14599 REPLACE_FCNTL=1
14600 fi
14601
14602 fi
14603
14604
14605 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
14606
14607
14608
14609
14610
14611
14612
14613
14614 gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
14615
14616 fi
14617
14618
14619
14620
14621
14622 GNULIB_FCNTL=1
14623
14624
14625
14626
14627
14628 $as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
14629
14630
14631
14632
14633
14634
14635
14636
14637
14638
14639
14640
14641
14642
14643 if test $gl_cv_have_include_next = yes; then
14644 gl_cv_next_fcntl_h='<'fcntl.h'>'
14645 else
14646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
14647 $as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
14648 if test "${gl_cv_next_fcntl_h+set}" = set; then :
14649 $as_echo_n "(cached) " >&6
14650 else
14651
14652
14653
14654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14655 /* end confdefs.h. */
14656 #include <fcntl.h>
14657 _ACEOF
14658 case "$host_os" in
14659 aix*) gl_absname_cpp="$ac_cpp -C" ;;
14660 *) gl_absname_cpp="$ac_cpp" ;;
14661 esac
14662
14663 case "$host_os" in
14664 mingw*)
14665 gl_dirsep_regex='[/\\]'
14666 ;;
14667 *)
14668 gl_dirsep_regex='\/'
14669 ;;
14670 esac
14671 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
14672 gl_header_literal_regex=`echo 'fcntl.h' \
14673 | sed -e "$gl_make_literal_regex_sed"`
14674 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14675 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14676 s|^/[^/]|//&|
14677 p
14678 q
14679 }'
14680
14681 gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14682 sed -n "$gl_absolute_header_sed"`
14683
14684 gl_header=$gl_cv_absolute_fcntl_h
14685 gl_cv_next_fcntl_h='"'$gl_header'"'
14686
14687
14688 fi
14689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
14690 $as_echo "$gl_cv_next_fcntl_h" >&6; }
14691 fi
14692 NEXT_FCNTL_H=$gl_cv_next_fcntl_h
14693
14694 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14695 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14696 gl_next_as_first_directive='<'fcntl.h'>'
14697 else
14698 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14699 gl_next_as_first_directive=$gl_cv_next_fcntl_h
14700 fi
14701 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
14702
14703
14704
14705
14706
14707
14708
14709
14710
14711
14712 for gl_func in fcntl openat; do
14713 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
14714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
14715 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
14716 if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
14717 $as_echo_n "(cached) " >&6
14718 else
14719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14720 /* end confdefs.h. */
14721 #include <fcntl.h>
14722
14723 int
14724 main ()
14725 {
14726 #undef $gl_func
14727 (void) $gl_func;
14728 ;
14729 return 0;
14730 }
14731 _ACEOF
14732 if ac_fn_c_try_compile "$LINENO"; then :
14733 eval "$as_gl_Symbol=yes"
14734 else
14735 eval "$as_gl_Symbol=no"
14736 fi
14737 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14738 fi
14739 eval ac_res=\$$as_gl_Symbol
14740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
14741 $as_echo "$ac_res" >&6; }
14742 eval as_val=\$$as_gl_Symbol
14743 if test "x$as_val" = x""yes; then :
14744 cat >>confdefs.h <<_ACEOF
14745 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
14746 _ACEOF
14747
14748 eval ac_cv_have_decl_$gl_func=yes
14749 fi
14750 done
14751
14752
14753
14754
14755
14756
14757
14758 ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
14759 #include <dirent.h>
14760
14761 "
14762 if test "x$ac_cv_have_decl_fdopendir" = x""yes; then :
14763 ac_have_decl=1
14764 else
14765 ac_have_decl=0
14766 fi
14767
14768 cat >>confdefs.h <<_ACEOF
14769 #define HAVE_DECL_FDOPENDIR $ac_have_decl
14770 _ACEOF
14771 if test $ac_have_decl = 1; then :
14772
14773 else
14774 HAVE_DECL_FDOPENDIR=0
14775 fi
14776
14777
14778 if test $ac_cv_func_fdopendir = no; then
14779 HAVE_FDOPENDIR=0
14780 else
14781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
14782 $as_echo_n "checking whether fdopendir works... " >&6; }
14783 if test "${gl_cv_func_fdopendir_works+set}" = set; then :
14784 $as_echo_n "(cached) " >&6
14785 else
14786 if test "$cross_compiling" = yes; then :
14787 case "$host_os" in
14788 # Guess yes on glibc systems.
14789 *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
14790 # If we don't know, assume the worst.
14791 *) gl_cv_func_fdopendir_works="guessing no" ;;
14792 esac
14793
14794 else
14795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14796 /* end confdefs.h. */
14797
14798 #include <dirent.h>
14799 #include <fcntl.h>
14800 #include <unistd.h>
14801 #if !HAVE_DECL_FDOPENDIR
14802 extern
14803 # ifdef __cplusplus
14804 "C"
14805 # endif
14806 DIR *fdopendir (int);
14807 #endif
14808
14809 int
14810 main ()
14811 {
14812 int result = 0;
14813 int fd = open ("conftest.c", O_RDONLY);
14814 if (fd < 0) result |= 1;
14815 if (fdopendir (fd)) result |= 2;
14816 if (close (fd)) result |= 4;
14817 return result;
14818 ;
14819 return 0;
14820 }
14821 _ACEOF
14822 if ac_fn_c_try_run "$LINENO"; then :
14823 gl_cv_func_fdopendir_works=yes
14824 else
14825 gl_cv_func_fdopendir_works=no
14826 fi
14827 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14828 conftest.$ac_objext conftest.beam conftest.$ac_ext
14829 fi
14830
14831 fi
14832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
14833 $as_echo "$gl_cv_func_fdopendir_works" >&6; }
14834 case "$gl_cv_func_fdopendir_works" in
14835 *yes) ;;
14836 *)
14837 REPLACE_FDOPENDIR=1
14838 ;;
14839 esac
14840 fi
14841
14842 if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
14843
14844
14845
14846
14847
14848
14849
14850
14851 gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
14852
14853 fi
14854
14855
14856
14857
14858
14859 GNULIB_FDOPENDIR=1
14860
14861
14862
14863
14864
14865 $as_echo "#define GNULIB_TEST_FDOPENDIR 1" >>confdefs.h
14866
14867
14868
14869
14870
14871 cat >>confdefs.h <<_ACEOF
14872 #define GNULIB_FDOPENDIR 1
14873 _ACEOF
14874
14875
14876
14877
14878
14879
14880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
14881 $as_echo_n "checking for flexible array member... " >&6; }
14882 if test "${ac_cv_c_flexmember+set}" = set; then :
14883 $as_echo_n "(cached) " >&6
14884 else
14885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14886 /* end confdefs.h. */
14887 #include <stdlib.h>
14888 #include <stdio.h>
14889 #include <stddef.h>
14890 struct s { int n; double d[]; };
14891 int
14892 main ()
14893 {
14894 int m = getchar ();
14895 size_t nbytes = offsetof (struct s, d) + m * sizeof (double);
14896 nbytes += sizeof (struct s) - 1;
14897 nbytes -= nbytes % sizeof (struct s);
14898 struct s *p = malloc (nbytes);
14899 p->d[0] = 0.0;
14900 return p->d != (double *) NULL;
14901 ;
14902 return 0;
14903 }
14904 _ACEOF
14905 if ac_fn_c_try_compile "$LINENO"; then :
14906 ac_cv_c_flexmember=yes
14907 else
14908 ac_cv_c_flexmember=no
14909 fi
14910 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14911 fi
14912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
14913 $as_echo "$ac_cv_c_flexmember" >&6; }
14914 if test $ac_cv_c_flexmember = yes; then
14915
14916 $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
14917
14918 else
14919 $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
14920
14921 fi
14922
14923
14924
14925
14926 FLOAT_H=
14927 REPLACE_FLOAT_LDBL=0
14928 case "$host_os" in
14929 aix* | beos* | openbsd* | mirbsd* | irix*)
14930 FLOAT_H=float.h
14931 ;;
14932 freebsd*)
14933 case "$host_cpu" in
14934 i[34567]86 )
14935 FLOAT_H=float.h
14936 ;;
14937 x86_64 )
14938 # On x86_64 systems, the C compiler may still be generating
14939 # 32-bit code.
14940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14941 /* end confdefs.h. */
14942 #if defined __LP64__ || defined __x86_64__ || defined __amd64__
14943 yes
14944 #endif
14945 _ACEOF
14946 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14947 $EGREP "yes" >/dev/null 2>&1; then :
14948
14949 else
14950 FLOAT_H=float.h
14951 fi
14952 rm -f conftest*
14953
14954 ;;
14955 esac
14956 ;;
14957 linux*)
14958 case "$host_cpu" in
14959 powerpc*)
14960 FLOAT_H=float.h
14961 ;;
14962 esac
14963 ;;
14964 esac
14965 case "$host_os" in
14966 aix* | freebsd* | linux*)
14967 if test -n "$FLOAT_H"; then
14968 REPLACE_FLOAT_LDBL=1
14969 fi
14970 ;;
14971 esac
14972
14973 REPLACE_ITOLD=0
14974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
14975 $as_echo_n "checking whether conversion from 'int' to 'long double' works... " >&6; }
14976 if test "${gl_cv_func_itold_works+set}" = set; then :
14977 $as_echo_n "(cached) " >&6
14978 else
14979
14980 if test "$cross_compiling" = yes; then :
14981 case "$host" in
14982 sparc*-*-linux*)
14983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14984 /* end confdefs.h. */
14985 #if defined __LP64__ || defined __arch64__
14986 yes
14987 #endif
14988 _ACEOF
14989 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14990 $EGREP "yes" >/dev/null 2>&1; then :
14991 gl_cv_func_itold_works="guessing no"
14992 else
14993 gl_cv_func_itold_works="guessing yes"
14994 fi
14995 rm -f conftest*
14996
14997 ;;
14998 *) gl_cv_func_itold_works="guessing yes" ;;
14999 esac
15000
15001 else
15002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15003 /* end confdefs.h. */
15004
15005 int i = -1;
15006 volatile long double ld;
15007 int main ()
15008 {
15009 ld += i * 1.0L;
15010 if (ld > 0)
15011 return 1;
15012 return 0;
15013 }
15014 _ACEOF
15015 if ac_fn_c_try_run "$LINENO"; then :
15016 gl_cv_func_itold_works=yes
15017 else
15018 gl_cv_func_itold_works=no
15019 fi
15020 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15021 conftest.$ac_objext conftest.beam conftest.$ac_ext
15022 fi
15023
15024
15025 fi
15026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
15027 $as_echo "$gl_cv_func_itold_works" >&6; }
15028 case "$gl_cv_func_itold_works" in
15029 *no)
15030 REPLACE_ITOLD=1
15031 FLOAT_H=float.h
15032 ;;
15033 esac
15034
15035 if test -n "$FLOAT_H"; then
15036
15037
15038
15039
15040
15041
15042
15043
15044 if test $gl_cv_have_include_next = yes; then
15045 gl_cv_next_float_h='<'float.h'>'
15046 else
15047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
15048 $as_echo_n "checking absolute name of <float.h>... " >&6; }
15049 if test "${gl_cv_next_float_h+set}" = set; then :
15050 $as_echo_n "(cached) " >&6
15051 else
15052
15053
15054
15055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15056 /* end confdefs.h. */
15057 #include <float.h>
15058 _ACEOF
15059 case "$host_os" in
15060 aix*) gl_absname_cpp="$ac_cpp -C" ;;
15061 *) gl_absname_cpp="$ac_cpp" ;;
15062 esac
15063
15064 case "$host_os" in
15065 mingw*)
15066 gl_dirsep_regex='[/\\]'
15067 ;;
15068 *)
15069 gl_dirsep_regex='\/'
15070 ;;
15071 esac
15072 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15073 gl_header_literal_regex=`echo 'float.h' \
15074 | sed -e "$gl_make_literal_regex_sed"`
15075 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15076 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15077 s|^/[^/]|//&|
15078 p
15079 q
15080 }'
15081
15082 gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15083 sed -n "$gl_absolute_header_sed"`
15084
15085 gl_header=$gl_cv_absolute_float_h
15086 gl_cv_next_float_h='"'$gl_header'"'
15087
15088
15089 fi
15090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
15091 $as_echo "$gl_cv_next_float_h" >&6; }
15092 fi
15093 NEXT_FLOAT_H=$gl_cv_next_float_h
15094
15095 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15096 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15097 gl_next_as_first_directive='<'float.h'>'
15098 else
15099 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15100 gl_next_as_first_directive=$gl_cv_next_float_h
15101 fi
15102 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
15103
15104
15105
15106
15107 fi
15108
15109 if test -n "$FLOAT_H"; then
15110 GL_GENERATE_FLOAT_H_TRUE=
15111 GL_GENERATE_FLOAT_H_FALSE='#'
15112 else
15113 GL_GENERATE_FLOAT_H_TRUE='#'
15114 GL_GENERATE_FLOAT_H_FALSE=
15115 fi
15116
15117
15118
15119 if test $REPLACE_FLOAT_LDBL = 1; then
15120
15121
15122
15123
15124
15125
15126
15127
15128 gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
15129
15130 fi
15131 if test $REPLACE_ITOLD = 1; then
15132
15133
15134
15135
15136
15137
15138
15139
15140 gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
15141
15142 fi
15143
15144
15145
15146
15147
15148 FNMATCH_H=
15149 gl_fnmatch_required_lowercase=`
15150 echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]'
15151 `
15152 gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}"
15153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5
15154 $as_echo_n "checking for working $gl_fnmatch_required fnmatch... " >&6; }
15155 if { as_var=$gl_fnmatch_cache_var; eval "test \"\${$as_var+set}\" = set"; }; then :
15156 $as_echo_n "(cached) " >&6
15157 else
15158 if test $gl_fnmatch_required = GNU; then
15159 gl_fnmatch_gnu_start=
15160 gl_fnmatch_gnu_end=
15161 else
15162 gl_fnmatch_gnu_start='#if 0'
15163 gl_fnmatch_gnu_end='#endif'
15164 fi
15165 if test "$cross_compiling" = yes; then :
15166 eval "$gl_fnmatch_cache_var=\"guessing no\""
15167 else
15168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15169 /* end confdefs.h. */
15170 #include <fnmatch.h>
15171 static int
15172 y (char const *pattern, char const *string, int flags)
15173 {
15174 return fnmatch (pattern, string, flags) == 0;
15175 }
15176 static int
15177 n (char const *pattern, char const *string, int flags)
15178 {
15179 return fnmatch (pattern, string, flags) == FNM_NOMATCH;
15180 }
15181
15182 int
15183 main ()
15184 {
15185 char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]";
15186 char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]";
15187 static char const A_1[] = { 'A' - 1, 0 };
15188 static char const A01[] = { 'A' + 1, 0 };
15189 static char const a_1[] = { 'a' - 1, 0 };
15190 static char const a01[] = { 'a' + 1, 0 };
15191 static char const bs_1[] = { '\\\\' - 1, 0 };
15192 static char const bs01[] = { '\\\\' + 1, 0 };
15193 int result = 0;
15194 if (!n ("a*", "", 0))
15195 return 1;
15196 if (!y ("a*", "abc", 0))
15197 return 1;
15198 if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */
15199 return 1;
15200 if (!n ("d*/*1", "d/s/1", FNM_PATHNAME))
15201 return 2;
15202 if (!y ("a\\\\bc", "abc", 0))
15203 return 3;
15204 if (!n ("a\\\\bc", "abc", FNM_NOESCAPE))
15205 return 3;
15206 if (!y ("*x", ".x", 0))
15207 return 4;
15208 if (!n ("*x", ".x", FNM_PERIOD))
15209 return 4;
15210 if (!y (Apat, "\\\\", 0))
15211 return 5;
15212 if (!y (Apat, "A", 0))
15213 return 5;
15214 if (!y (apat, "\\\\", 0))
15215 return 5;
15216 if (!y (apat, "a", 0))
15217 return 5;
15218 if (!(n (Apat, A_1, 0) == ('A' < '\\\\')))
15219 return 5;
15220 if (!(n (apat, a_1, 0) == ('a' < '\\\\')))
15221 return 5;
15222 if (!(y (Apat, A01, 0) == ('A' < '\\\\')))
15223 return 5;
15224 if (!(y (apat, a01, 0) == ('a' < '\\\\')))
15225 return 5;
15226 if (!(y (Apat, bs_1, 0) == ('A' < '\\\\')))
15227 return 5;
15228 if (!(y (apat, bs_1, 0) == ('a' < '\\\\')))
15229 return 5;
15230 if (!(n (Apat, bs01, 0) == ('A' < '\\\\')))
15231 return 5;
15232 if (!(n (apat, bs01, 0) == ('a' < '\\\\')))
15233 return 5;
15234 $gl_fnmatch_gnu_start
15235 if (!y ("xxXX", "xXxX", FNM_CASEFOLD))
15236 result |= 8;
15237 if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH))
15238 result |= 16;
15239 if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME))
15240 result |= 32;
15241 if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR))
15242 result |= 64;
15243 if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR))
15244 result |= 64;
15245 if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR))
15246 result |= 64;
15247 $gl_fnmatch_gnu_end
15248 return result;
15249
15250 ;
15251 return 0;
15252 }
15253 _ACEOF
15254 if ac_fn_c_try_run "$LINENO"; then :
15255 eval "$gl_fnmatch_cache_var=yes"
15256 else
15257 eval "$gl_fnmatch_cache_var=no"
15258 fi
15259 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15260 conftest.$ac_objext conftest.beam conftest.$ac_ext
15261 fi
15262
15263
15264 fi
15265 eval ac_res=\$$gl_fnmatch_cache_var
15266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15267 $as_echo "$ac_res" >&6; }
15268 eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\""
15269 if test "$gl_fnmatch_result" = yes; then
15270 rm -f "$gl_source_base/fnmatch.h"
15271 else
15272 FNMATCH_H=fnmatch.h
15273 fi
15274
15275 if test -n "$FNMATCH_H"; then
15276 GL_GENERATE_FNMATCH_H_TRUE=
15277 GL_GENERATE_FNMATCH_H_FALSE='#'
15278 else
15279 GL_GENERATE_FNMATCH_H_TRUE='#'
15280 GL_GENERATE_FNMATCH_H_FALSE=
15281 fi
15282
15283
15284 if test -n "$FNMATCH_H"; then
15285
15286
15287
15288
15289
15290
15291
15292
15293 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
15294
15295
15296
15297 cat >>confdefs.h <<_ACEOF
15298 #define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
15299 _ACEOF
15300
15301
15302 ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
15303 "
15304 if test "x$ac_cv_have_decl_isblank" = x""yes; then :
15305 ac_have_decl=1
15306 else
15307 ac_have_decl=0
15308 fi
15309
15310 cat >>confdefs.h <<_ACEOF
15311 #define HAVE_DECL_ISBLANK $ac_have_decl
15312 _ACEOF
15313
15314
15315
15316
15317 fi
15318
15319
15320
15321
15322
15323 if test -n "$FNMATCH_H"; then
15324
15325
15326
15327
15328
15329
15330
15331
15332 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
15333
15334
15335
15336 cat >>confdefs.h <<_ACEOF
15337 #define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
15338 _ACEOF
15339
15340
15341 ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
15342 "
15343 if test "x$ac_cv_have_decl_isblank" = x""yes; then :
15344 ac_have_decl=1
15345 else
15346 ac_have_decl=0
15347 fi
15348
15349 cat >>confdefs.h <<_ACEOF
15350 #define HAVE_DECL_ISBLANK $ac_have_decl
15351 _ACEOF
15352
15353
15354
15355
15356 fi
15357
15358
15359
15360 FREXP_LIBM=
15361 if test $gl_cv_func_frexp_no_libm = no; then
15362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used with libm" >&5
15363 $as_echo_n "checking whether frexp() can be used with libm... " >&6; }
15364 if test "${gl_cv_func_frexp_in_libm+set}" = set; then :
15365 $as_echo_n "(cached) " >&6
15366 else
15367
15368 save_LIBS="$LIBS"
15369 LIBS="$LIBS -lm"
15370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15371 /* end confdefs.h. */
15372 #include <math.h>
15373 double x;
15374 int
15375 main ()
15376 {
15377 int e; return frexp (x, &e) > 0;
15378 ;
15379 return 0;
15380 }
15381 _ACEOF
15382 if ac_fn_c_try_link "$LINENO"; then :
15383 gl_cv_func_frexp_in_libm=yes
15384 else
15385 gl_cv_func_frexp_in_libm=no
15386 fi
15387 rm -f core conftest.err conftest.$ac_objext \
15388 conftest$ac_exeext conftest.$ac_ext
15389 LIBS="$save_LIBS"
15390
15391 fi
15392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_in_libm" >&5
15393 $as_echo "$gl_cv_func_frexp_in_libm" >&6; }
15394 if test $gl_cv_func_frexp_in_libm = yes; then
15395 FREXP_LIBM=-lm
15396 fi
15397 fi
15398 if test $gl_cv_func_frexp_no_libm = yes \
15399 || test $gl_cv_func_frexp_in_libm = yes; then
15400 save_LIBS="$LIBS"
15401 LIBS="$LIBS $FREXP_LIBM"
15402
15403
15404
15405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
15406 $as_echo_n "checking whether frexp works... " >&6; }
15407 if test "${gl_cv_func_frexp_works+set}" = set; then :
15408 $as_echo_n "(cached) " >&6
15409 else
15410
15411 if test "$cross_compiling" = yes; then :
15412 case "$host_os" in
15413 netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";;
15414 *) gl_cv_func_frexp_works="guessing yes";;
15415 esac
15416
15417 else
15418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15419 /* end confdefs.h. */
15420
15421 #include <float.h>
15422 #include <math.h>
15423 #include <string.h>
15424 #if HAVE_DECL_ALARM
15425 # include <signal.h>
15426 # include <unistd.h>
15427 #endif
15428 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
15429 ICC 10.0 has a bug when optimizing the expression -zero.
15430 The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
15431 to PowerPC on Mac OS X 10.5. */
15432 #if defined __hpux || defined __sgi || defined __ICC
15433 static double
15434 compute_minus_zero (void)
15435 {
15436 return -DBL_MIN * DBL_MIN;
15437 }
15438 # define minus_zero compute_minus_zero ()
15439 #else
15440 double minus_zero = -0.0;
15441 #endif
15442 int main()
15443 {
15444 int result = 0;
15445 int i;
15446 volatile double x;
15447 double zero = 0.0;
15448 #if HAVE_DECL_ALARM
15449 /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
15450 number. Let the test fail in this case. */
15451 signal (SIGALRM, SIG_DFL);
15452 alarm (5);
15453 #endif
15454 /* Test on denormalized numbers. */
15455 for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
15456 ;
15457 if (x > 0.0)
15458 {
15459 int exp;
15460 double y = frexp (x, &exp);
15461 /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
15462 On NetBSD: y = 0.75. Correct: y = 0.5. */
15463 if (y != 0.5)
15464 result |= 1;
15465 }
15466 /* Test on infinite numbers. */
15467 x = 1.0 / zero;
15468 {
15469 int exp;
15470 double y = frexp (x, &exp);
15471 if (y != x)
15472 result |= 2;
15473 }
15474 /* Test on negative zero. */
15475 x = minus_zero;
15476 {
15477 int exp;
15478 double y = frexp (x, &exp);
15479 if (memcmp (&y, &x, sizeof x))
15480 result |= 4;
15481 }
15482 return result;
15483 }
15484 _ACEOF
15485 if ac_fn_c_try_run "$LINENO"; then :
15486 gl_cv_func_frexp_works=yes
15487 else
15488 gl_cv_func_frexp_works=no
15489 fi
15490 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15491 conftest.$ac_objext conftest.beam conftest.$ac_ext
15492 fi
15493
15494
15495 fi
15496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
15497 $as_echo "$gl_cv_func_frexp_works" >&6; }
15498
15499 LIBS="$save_LIBS"
15500 case "$gl_cv_func_frexp_works" in
15501 *yes) gl_func_frexp=yes ;;
15502 *) gl_func_frexp=no; REPLACE_FREXP=1; FREXP_LIBM= ;;
15503 esac
15504 else
15505 gl_func_frexp=no
15506 fi
15507 if test $gl_func_frexp = yes; then
15508
15509 $as_echo "#define HAVE_FREXP 1" >>confdefs.h
15510
15511 fi
15512
15513
15514 if test $gl_func_frexp != yes; then
15515
15516
15517
15518
15519
15520
15521
15522
15523 gl_LIBOBJS="$gl_LIBOBJS frexp.$ac_objext"
15524
15525 fi
15526
15527
15528
15529
15530
15531 GNULIB_FREXP=1
15532
15533
15534
15535
15536
15537 $as_echo "#define GNULIB_TEST_FREXP 1" >>confdefs.h
15538
15539
15540
15541
15542
15543
15544
15545
15546
15547 ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
15548 "
15549 if test "x$ac_cv_have_decl_frexpl" = x""yes; then :
15550
15551 else
15552 HAVE_DECL_FREXPL=0
15553 fi
15554
15555
15556 FREXPL_LIBM=
15557 if test $HAVE_DECL_FREXPL = 1; then
15558
15559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
15560 $as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; }
15561 if test "${gl_cv_func_frexpl_no_libm+set}" = set; then :
15562 $as_echo_n "(cached) " >&6
15563 else
15564
15565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15566 /* end confdefs.h. */
15567 #include <math.h>
15568 long double x;
15569 int
15570 main ()
15571 {
15572 int e; return frexpl (x, &e) > 0;
15573 ;
15574 return 0;
15575 }
15576 _ACEOF
15577 if ac_fn_c_try_link "$LINENO"; then :
15578 gl_cv_func_frexpl_no_libm=yes
15579 else
15580 gl_cv_func_frexpl_no_libm=no
15581 fi
15582 rm -f core conftest.err conftest.$ac_objext \
15583 conftest$ac_exeext conftest.$ac_ext
15584
15585 fi
15586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
15587 $as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
15588
15589 if test $gl_cv_func_frexpl_no_libm = no; then
15590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used with libm" >&5
15591 $as_echo_n "checking whether frexpl() can be used with libm... " >&6; }
15592 if test "${gl_cv_func_frexpl_in_libm+set}" = set; then :
15593 $as_echo_n "(cached) " >&6
15594 else
15595
15596 save_LIBS="$LIBS"
15597 LIBS="$LIBS -lm"
15598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15599 /* end confdefs.h. */
15600 #include <math.h>
15601 long double x;
15602 int
15603 main ()
15604 {
15605 int e; return frexpl (x, &e) > 0;
15606 ;
15607 return 0;
15608 }
15609 _ACEOF
15610 if ac_fn_c_try_link "$LINENO"; then :
15611 gl_cv_func_frexpl_in_libm=yes
15612 else
15613 gl_cv_func_frexpl_in_libm=no
15614 fi
15615 rm -f core conftest.err conftest.$ac_objext \
15616 conftest$ac_exeext conftest.$ac_ext
15617 LIBS="$save_LIBS"
15618
15619 fi
15620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_in_libm" >&5
15621 $as_echo "$gl_cv_func_frexpl_in_libm" >&6; }
15622 if test $gl_cv_func_frexpl_in_libm = yes; then
15623 FREXPL_LIBM=-lm
15624 fi
15625 fi
15626 if test $gl_cv_func_frexpl_no_libm = yes \
15627 || test $gl_cv_func_frexpl_in_libm = yes; then
15628 save_LIBS="$LIBS"
15629 LIBS="$LIBS $FREXPL_LIBM"
15630
15631
15632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
15633 $as_echo_n "checking whether frexpl works... " >&6; }
15634 if test "${gl_cv_func_frexpl_works+set}" = set; then :
15635 $as_echo_n "(cached) " >&6
15636 else
15637
15638 if test "$cross_compiling" = yes; then :
15639
15640 case "$host_os" in
15641 aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
15642 gl_cv_func_frexpl_works="guessing no";;
15643 *) gl_cv_func_frexpl_works="guessing yes";;
15644 esac
15645
15646 else
15647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15648 /* end confdefs.h. */
15649
15650 #include <float.h>
15651 #include <math.h>
15652 /* Override the values of <float.h>, like done in float.in.h. */
15653 #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
15654 # undef LDBL_MIN_EXP
15655 # define LDBL_MIN_EXP (-16381)
15656 #endif
15657 #if defined __i386__ && defined __FreeBSD__
15658 # undef LDBL_MIN_EXP
15659 # define LDBL_MIN_EXP (-16381)
15660 #endif
15661 #if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
15662 # undef LDBL_MIN_EXP
15663 # define LDBL_MIN_EXP DBL_MIN_EXP
15664 #endif
15665 #if defined __sgi && (LDBL_MANT_DIG >= 106)
15666 # if defined __GNUC__
15667 # undef LDBL_MIN_EXP
15668 # define LDBL_MIN_EXP DBL_MIN_EXP
15669 # endif
15670 #endif
15671 extern
15672 #ifdef __cplusplus
15673 "C"
15674 #endif
15675 long double frexpl (long double, int *);
15676 int main()
15677 {
15678 int result = 0;
15679 volatile long double x;
15680 /* Test on finite numbers that fails on AIX 5.1. */
15681 x = 16.0L;
15682 {
15683 int exp = -9999;
15684 frexpl (x, &exp);
15685 if (exp != 5)
15686 result |= 1;
15687 }
15688 /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
15689 function returns an invalid (incorrectly normalized) value: it returns
15690 y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
15691 but the correct result is
15692 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */
15693 x = 1.01L;
15694 {
15695 int exp = -9999;
15696 long double y = frexpl (x, &exp);
15697 if (!(exp == 1 && y == 0.505L))
15698 result |= 2;
15699 }
15700 /* Test on large finite numbers. This fails on BeOS at i = 16322, while
15701 LDBL_MAX_EXP = 16384.
15702 In the loop end test, we test x against Infinity, rather than comparing
15703 i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */
15704 {
15705 int i;
15706 for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
15707 {
15708 int exp = -9999;
15709 frexpl (x, &exp);
15710 if (exp != i)
15711 {
15712 result |= 4;
15713 break;
15714 }
15715 }
15716 }
15717 /* Test on denormalized numbers. */
15718 {
15719 int i;
15720 for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
15721 ;
15722 if (x > 0.0L)
15723 {
15724 int exp;
15725 long double y = frexpl (x, &exp);
15726 /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
15727 exp = -16382, y = 0.5. On Mac OS X 10.5: exp = -16384, y = 0.5. */
15728 if (exp != LDBL_MIN_EXP - 1)
15729 result |= 8;
15730 }
15731 }
15732 /* Test on infinite numbers. */
15733 x = 1.0L / 0.0L;
15734 {
15735 int exp;
15736 long double y = frexpl (x, &exp);
15737 if (y != x)
15738 result |= 16;
15739 }
15740 return result;
15741 }
15742 _ACEOF
15743 if ac_fn_c_try_run "$LINENO"; then :
15744 gl_cv_func_frexpl_works=yes
15745 else
15746 gl_cv_func_frexpl_works=no
15747 fi
15748 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15749 conftest.$ac_objext conftest.beam conftest.$ac_ext
15750 fi
15751
15752
15753 fi
15754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
15755 $as_echo "$gl_cv_func_frexpl_works" >&6; }
15756
15757 LIBS="$save_LIBS"
15758 case "$gl_cv_func_frexpl_works" in
15759 *yes) gl_func_frexpl=yes ;;
15760 *) gl_func_frexpl=no; REPLACE_FREXPL=1 ;;
15761 esac
15762 else
15763 gl_func_frexpl=no
15764 fi
15765 if test $gl_func_frexpl = yes; then
15766
15767 $as_echo "#define HAVE_FREXPL 1" >>confdefs.h
15768
15769 fi
15770 fi
15771 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
15772 if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then
15773
15774 FREXPL_LIBM="$FREXP_LIBM"
15775 else
15776 FREXPL_LIBM=
15777 fi
15778 fi
15779
15780
15781 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
15782
15783
15784
15785
15786
15787
15788
15789
15790 gl_LIBOBJS="$gl_LIBOBJS frexpl.$ac_objext"
15791
15792 fi
15793
15794
15795
15796
15797
15798 GNULIB_FREXPL=1
15799
15800
15801
15802
15803
15804 $as_echo "#define GNULIB_TEST_FREXPL 1" >>confdefs.h
15805
15806
15807
15808
15809
15810
15811
15812 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
15813 REPLACE_FSTAT=1
15814 fi
15815
15816
15817 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
15818 REPLACE_FSTAT=1
15819 fi
15820
15821
15822
15823
15824
15825 if test $ac_cv_func_fchdir = no; then
15826 HAVE_FCHDIR=0
15827 fi
15828
15829 if test $HAVE_FCHDIR = 0; then
15830 case "$gl_cv_func_open_directory_works" in
15831 *yes) ;;
15832 *)
15833 REPLACE_FSTAT=1
15834 ;;
15835 esac
15836 fi
15837
15838
15839 if test $REPLACE_FSTAT = 1; then
15840
15841
15842
15843
15844
15845
15846
15847
15848 gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
15849
15850 :
15851 fi
15852
15853
15854
15855
15856
15857 GNULIB_FSTAT=1
15858
15859
15860
15861
15862
15863 $as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
15864
15865
15866
15867
15868
15869
15870
15871
15872
15873 if test $ac_cv_func_fstatat = no; then
15874 HAVE_FSTATAT=0
15875 else
15876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
15877 $as_echo_n "checking whether fstatat (..., 0) works... " >&6; }
15878 if test "${gl_cv_func_fstatat_zero_flag+set}" = set; then :
15879 $as_echo_n "(cached) " >&6
15880 else
15881 if test "$cross_compiling" = yes; then :
15882 case "$host_os" in
15883 aix*) gl_cv_func_fstatat_zero_flag="guessing no";;
15884 *) gl_cv_func_fstatat_zero_flag="guessing yes";;
15885 esac
15886
15887 else
15888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15889 /* end confdefs.h. */
15890
15891 #include <fcntl.h>
15892 #include <sys/stat.h>
15893 int
15894 main (void)
15895 {
15896 struct stat a;
15897 return fstatat (AT_FDCWD, ".", &a, 0) != 0;
15898 }
15899
15900 _ACEOF
15901 if ac_fn_c_try_run "$LINENO"; then :
15902 gl_cv_func_fstatat_zero_flag=yes
15903 else
15904 gl_cv_func_fstatat_zero_flag=no
15905 fi
15906 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15907 conftest.$ac_objext conftest.beam conftest.$ac_ext
15908 fi
15909
15910
15911 fi
15912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
15913 $as_echo "$gl_cv_func_fstatat_zero_flag" >&6; }
15914
15915 case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
15916 *yes+*yes) ;;
15917 *) REPLACE_FSTATAT=1
15918 case $gl_cv_func_fstatat_zero_flag in
15919 *yes)
15920
15921 $as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
15922
15923 ;;
15924 esac
15925 ;;
15926 esac
15927 fi
15928
15929 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
15930
15931
15932
15933
15934
15935
15936
15937
15938 gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
15939
15940 fi
15941
15942
15943
15944
15945
15946 GNULIB_FSTATAT=1
15947
15948
15949
15950
15951
15952 $as_echo "#define GNULIB_TEST_FSTATAT 1" >>confdefs.h
15953
15954
15955
15956
15957
15958
15959
15960
15961 gl_abort_bug=no
15962 case "$host_os" in
15963 mingw*)
15964 gl_cv_func_getcwd_path_max=yes
15965 ;;
15966 *)
15967
15968
15969
15970
15971
15972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd handles long file names properly" >&5
15973 $as_echo_n "checking whether getcwd handles long file names properly... " >&6; }
15974 if test "${gl_cv_func_getcwd_path_max+set}" = set; then :
15975 $as_echo_n "(cached) " >&6
15976 else
15977 # Arrange for deletion of the temporary directory this test creates.
15978 ac_clean_files="$ac_clean_files confdir3"
15979 if test "$cross_compiling" = yes; then :
15980 case "$host_os" in
15981 aix*) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
15982 *) gl_cv_func_getcwd_path_max=no;;
15983 esac
15984 else
15985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15986 /* end confdefs.h. */
15987
15988 #include <errno.h>
15989 #include <stdlib.h>
15990 #if HAVE_UNISTD_H
15991 # include <unistd.h>
15992 #else
15993 # include <direct.h>
15994 #endif
15995 #include <string.h>
15996 #include <limits.h>
15997 #include <sys/stat.h>
15998 #include <sys/types.h>
15999 #include <fcntl.h>
16000
16001
16002 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
16003 #if HAVE_UNISTD_H
16004 # include <unistd.h>
16005 #endif
16006 #include <limits.h>
16007 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
16008 # include <sys/param.h>
16009 #endif
16010 #if !defined PATH_MAX && defined MAXPATHLEN
16011 # define PATH_MAX MAXPATHLEN
16012 #endif
16013 #ifdef __hpux
16014 # undef PATH_MAX
16015 # define PATH_MAX 1024
16016 #endif
16017 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
16018 # undef PATH_MAX
16019 # define PATH_MAX 260
16020 #endif
16021
16022
16023 #ifndef AT_FDCWD
16024 # define AT_FDCWD 0
16025 #endif
16026 #ifdef ENAMETOOLONG
16027 # define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG)
16028 #else
16029 # define is_ENAMETOOLONG(x) 0
16030 #endif
16031
16032 /* Use the getcwd function, not any macro. */
16033 #undef getcwd
16034
16035 /* Don't get link errors because mkdir is redefined to rpl_mkdir. */
16036 #undef mkdir
16037
16038 #ifndef S_IRWXU
16039 # define S_IRWXU 0700
16040 #endif
16041
16042 /* The length of this name must be 8. */
16043 #define DIR_NAME "confdir3"
16044 #define DIR_NAME_LEN 8
16045 #define DIR_NAME_SIZE (DIR_NAME_LEN + 1)
16046
16047 /* The length of "../". */
16048 #define DOTDOTSLASH_LEN 3
16049
16050 /* Leftover bytes in the buffer, to work around library or OS bugs. */
16051 #define BUF_SLOP 20
16052
16053 int
16054 main ()
16055 {
16056 #ifndef PATH_MAX
16057 /* The Hurd doesn't define this, so getcwd can't exhibit the bug --
16058 at least not on a local file system. And if we were to start worrying
16059 about remote file systems, we'd have to enable the wrapper function
16060 all of the time, just to be safe. That's not worth the cost. */
16061 exit (0);
16062 #elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \
16063 - DIR_NAME_SIZE - BUF_SLOP) \
16064 <= PATH_MAX)
16065 /* FIXME: Assuming there's a system for which this is true,
16066 this should be done in a compile test. */
16067 exit (0);
16068 #else
16069 char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1)
16070 + DIR_NAME_SIZE + BUF_SLOP];
16071 char *cwd = getcwd (buf, PATH_MAX);
16072 size_t initial_cwd_len;
16073 size_t cwd_len;
16074 int fail = 0;
16075 size_t n_chdirs = 0;
16076
16077 if (cwd == NULL)
16078 exit (10);
16079
16080 cwd_len = initial_cwd_len = strlen (cwd);
16081
16082 while (1)
16083 {
16084 size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN);
16085 char *c = NULL;
16086
16087 cwd_len += DIR_NAME_SIZE;
16088 /* If mkdir or chdir fails, it could be that this system cannot create
16089 any file with an absolute name longer than PATH_MAX, such as cygwin.
16090 If so, leave fail as 0, because the current working directory can't
16091 be too long for getcwd if it can't even be created. For other
16092 errors, be pessimistic and consider that as a failure, too. */
16093 if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0)
16094 {
16095 if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
16096 fail = 20;
16097 break;
16098 }
16099
16100 if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE)
16101 {
16102 struct stat sb;
16103
16104 c = getcwd (buf, PATH_MAX);
16105 if (!c && errno == ENOENT)
16106 {
16107 fail = 11;
16108 break;
16109 }
16110 if (c)
16111 {
16112 fail = 31;
16113 break;
16114 }
16115 if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
16116 {
16117 fail = 21;
16118 break;
16119 }
16120
16121 /* Our replacement needs to be able to stat() long ../../paths,
16122 so generate a path larger than PATH_MAX to check,
16123 avoiding the replacement if we can't stat(). */
16124 c = getcwd (buf, cwd_len + 1);
16125 if (c && !AT_FDCWD && stat (c, &sb) != 0 && is_ENAMETOOLONG (errno))
16126 {
16127 fail = 32;
16128 break;
16129 }
16130 }
16131
16132 if (dotdot_max <= cwd_len - initial_cwd_len)
16133 {
16134 if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len)
16135 break;
16136 c = getcwd (buf, cwd_len + 1);
16137 if (!c)
16138 {
16139 if (! (errno == ERANGE || errno == ENOENT
16140 || is_ENAMETOOLONG (errno)))
16141 {
16142 fail = 22;
16143 break;
16144 }
16145 if (AT_FDCWD || errno == ERANGE || errno == ENOENT)
16146 {
16147 fail = 12;
16148 break;
16149 }
16150 }
16151 }
16152
16153 if (c && strlen (c) != cwd_len)
16154 {
16155 fail = 23;
16156 break;
16157 }
16158 ++n_chdirs;
16159 }
16160
16161 /* Leaving behind such a deep directory is not polite.
16162 So clean up here, right away, even though the driving
16163 shell script would also clean up. */
16164 {
16165 size_t i;
16166
16167 /* Try rmdir first, in case the chdir failed. */
16168 rmdir (DIR_NAME);
16169 for (i = 0; i <= n_chdirs; i++)
16170 {
16171 if (chdir ("..") < 0)
16172 break;
16173 if (rmdir (DIR_NAME) != 0)
16174 break;
16175 }
16176 }
16177
16178 exit (fail);
16179 #endif
16180 }
16181
16182 _ACEOF
16183 if ac_fn_c_try_run "$LINENO"; then :
16184 gl_cv_func_getcwd_path_max=yes
16185 else
16186 case $? in
16187 10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';;
16188 31) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
16189 32) gl_cv_func_getcwd_path_max='yes, but with shorter paths';;
16190 *) gl_cv_func_getcwd_path_max=no;;
16191 esac
16192 fi
16193 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16194 conftest.$ac_objext conftest.beam conftest.$ac_ext
16195 fi
16196
16197
16198 fi
16199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_path_max" >&5
16200 $as_echo "$gl_cv_func_getcwd_path_max" >&6; }
16201
16202 case "$gl_cv_func_getcwd_null" in
16203 *yes)
16204
16205
16206
16207
16208 for ac_func in getpagesize
16209 do :
16210 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
16211 if test "x$ac_cv_func_getpagesize" = x""yes; then :
16212 cat >>confdefs.h <<_ACEOF
16213 #define HAVE_GETPAGESIZE 1
16214 _ACEOF
16215
16216 fi
16217 done
16218
16219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd aborts when 4k < cwd_length < 16k" >&5
16220 $as_echo_n "checking whether getcwd aborts when 4k < cwd_length < 16k... " >&6; }
16221 if test "${gl_cv_func_getcwd_abort_bug+set}" = set; then :
16222 $as_echo_n "(cached) " >&6
16223 else
16224 # Remove any remnants of a previous test.
16225 rm -rf confdir-14B---
16226 # Arrange for deletion of the temporary directory this test creates.
16227 ac_clean_files="$ac_clean_files confdir-14B---"
16228 if test "$cross_compiling" = yes; then :
16229 gl_cv_func_getcwd_abort_bug=yes
16230 else
16231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16232 /* end confdefs.h. */
16233
16234 #include <errno.h>
16235 #include <stdlib.h>
16236 #if HAVE_UNISTD_H
16237 # include <unistd.h>
16238 #else /* on Windows with MSVC */
16239 # include <direct.h>
16240 #endif
16241 #include <string.h>
16242 #include <sys/stat.h>
16243
16244
16245 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
16246 #if HAVE_UNISTD_H
16247 # include <unistd.h>
16248 #endif
16249 #include <limits.h>
16250 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
16251 # include <sys/param.h>
16252 #endif
16253 #if !defined PATH_MAX && defined MAXPATHLEN
16254 # define PATH_MAX MAXPATHLEN
16255 #endif
16256 #ifdef __hpux
16257 # undef PATH_MAX
16258 # define PATH_MAX 1024
16259 #endif
16260 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
16261 # undef PATH_MAX
16262 # define PATH_MAX 260
16263 #endif
16264
16265
16266 /* Don't get link errors because mkdir is redefined to rpl_mkdir. */
16267 #undef mkdir
16268
16269 #ifndef S_IRWXU
16270 # define S_IRWXU 0700
16271 #endif
16272
16273 /* FIXME: skip the run-test altogether on systems without getpagesize. */
16274 #if ! HAVE_GETPAGESIZE
16275 # define getpagesize() 0
16276 #endif
16277
16278 /* This size is chosen to be larger than PATH_MAX (4k), yet smaller than
16279 the 16kB pagesize on ia64 linux. Those conditions make the code below
16280 trigger a bug in glibc's getcwd implementation before 2.4.90-10. */
16281 #define TARGET_LEN (5 * 1024)
16282
16283 int
16284 main ()
16285 {
16286 char *cwd;
16287 size_t initial_cwd_len;
16288 int fail = 0;
16289
16290 /* The bug is triggered when PATH_MAX < getpagesize (), so skip
16291 this relatively expensive and invasive test if that's not true. */
16292 #ifdef PATH_MAX
16293 int bug_possible = PATH_MAX < getpagesize ();
16294 #else
16295 int bug_possible = 0;
16296 #endif
16297 if (! bug_possible)
16298 return 0;
16299
16300 cwd = getcwd (NULL, 0);
16301 if (cwd == NULL)
16302 return 2;
16303
16304 initial_cwd_len = strlen (cwd);
16305 free (cwd);
16306
16307 if (1)
16308 {
16309 static char const dir_name[] = "confdir-14B---";
16310 size_t desired_depth = ((TARGET_LEN - 1 - initial_cwd_len)
16311 / sizeof dir_name);
16312 size_t d;
16313 for (d = 0; d < desired_depth; d++)
16314 {
16315 if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0)
16316 {
16317 if (! (errno == ERANGE || errno == ENAMETOOLONG
16318 || errno == ENOENT))
16319 fail = 3; /* Unable to construct deep hierarchy. */
16320 break;
16321 }
16322 }
16323
16324 /* If libc has the bug in question, this invocation of getcwd
16325 results in a failed assertion. */
16326 cwd = getcwd (NULL, 0);
16327 if (cwd == NULL)
16328 fail = 4; /* getcwd didn't assert, but it failed for a long name
16329 where the answer could have been learned. */
16330 free (cwd);
16331
16332 /* Call rmdir first, in case the above chdir failed. */
16333 rmdir (dir_name);
16334 while (0 < d--)
16335 {
16336 if (chdir ("..") < 0)
16337 {
16338 fail = 5;
16339 break;
16340 }
16341 rmdir (dir_name);
16342 }
16343 }
16344
16345 return fail;
16346 }
16347
16348 _ACEOF
16349 if ac_fn_c_try_run "$LINENO"; then :
16350 gl_cv_func_getcwd_abort_bug=no
16351 else
16352 ret=$?
16353 if test $ret -ge 128 || test $ret = 4; then
16354 gl_cv_func_getcwd_abort_bug=yes
16355 else
16356 gl_cv_func_getcwd_abort_bug=no
16357 fi
16358 fi
16359 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16360 conftest.$ac_objext conftest.beam conftest.$ac_ext
16361 fi
16362
16363
16364 fi
16365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_abort_bug" >&5
16366 $as_echo "$gl_cv_func_getcwd_abort_bug" >&6; }
16367 if test $gl_cv_func_getcwd_abort_bug = yes; then :
16368 gl_abort_bug=yes
16369 fi
16370
16371 ;;
16372 esac
16373 ;;
16374 esac
16375 case "$gl_cv_func_getcwd_path_max" in
16376 "no"|"no, it has the AIX bug") ;;
16377 *)
16378
16379 $as_echo "#define HAVE_MINIMALLY_WORKING_GETCWD 1" >>confdefs.h
16380
16381 ;;
16382 esac
16383 case "$gl_cv_func_getcwd_path_max" in
16384 "no, but it is partly working")
16385
16386 $as_echo "#define HAVE_PARTLY_WORKING_GETCWD 1" >>confdefs.h
16387
16388 ;;
16389 "yes, but with shorter paths")
16390
16391 $as_echo "#define HAVE_GETCWD_SHORTER 1" >>confdefs.h
16392
16393 ;;
16394 esac
16395
16396 if { case "$gl_cv_func_getcwd_null" in *yes) false;; *) true;; esac; } \
16397 || test $gl_cv_func_getcwd_posix_signature != yes \
16398 || { case "$gl_cv_func_getcwd_path_max" in *yes*) false;; *) true;; esac; } \
16399 || test $gl_abort_bug = yes; then
16400 REPLACE_GETCWD=1
16401 fi
16402
16403 if test $REPLACE_GETCWD = 1; then
16404
16405
16406
16407
16408
16409
16410
16411
16412 gl_LIBOBJS="$gl_LIBOBJS getcwd.$ac_objext"
16413
16414
16415
16416
16417 :
16418
16419 fi
16420
16421
16422 cat >>confdefs.h <<_ACEOF
16423 #define GNULIB_GETCWD 1
16424 _ACEOF
16425
16426
16427
16428
16429
16430
16431
16432 GNULIB_GETCWD=1
16433
16434
16435
16436
16437
16438 $as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
16439
16440
16441
16442
16443
16444
16445
16446
16447 case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
16448 *yes,yes) ;;
16449 *)
16450 REPLACE_GETCWD=1
16451 ;;
16452 esac
16453
16454 if test $REPLACE_GETCWD = 1; then
16455
16456
16457
16458
16459
16460
16461
16462
16463 gl_LIBOBJS="$gl_LIBOBJS getcwd-lgpl.$ac_objext"
16464
16465 fi
16466
16467
16468
16469
16470
16471 GNULIB_GETCWD=1
16472
16473
16474
16475
16476
16477 $as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
16478
16479
16480
16481
16482
16483
16484
16485
16486 if test $ac_cv_func_getdtablesize = yes &&
16487 test $ac_cv_have_decl_getdtablesize = yes; then
16488 # Cygwin 1.7.25 automatically increases the RLIMIT_NOFILE soft limit
16489 # up to an unchangeable hard limit; all other platforms correctly
16490 # require setrlimit before getdtablesize() can report a larger value.
16491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
16492 $as_echo_n "checking whether getdtablesize works... " >&6; }
16493 if test "${gl_cv_func_getdtablesize_works+set}" = set; then :
16494 $as_echo_n "(cached) " >&6
16495 else
16496 if test "$cross_compiling" = yes; then :
16497 case "$host_os" in
16498 cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
16499 gl_cv_func_getdtablesize_works="guessing no" ;;
16500 *) gl_cv_func_getdtablesize_works="guessing yes" ;;
16501 esac
16502 else
16503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16504 /* end confdefs.h. */
16505
16506 #include <unistd.h>
16507 int
16508 main ()
16509 {
16510 int size = getdtablesize();
16511 if (dup2 (0, getdtablesize()) != -1)
16512 return 1;
16513 if (size != getdtablesize())
16514 return 2;
16515
16516 ;
16517 return 0;
16518 }
16519 _ACEOF
16520 if ac_fn_c_try_run "$LINENO"; then :
16521 gl_cv_func_getdtablesize_works=yes
16522 else
16523 gl_cv_func_getdtablesize_works=no
16524 fi
16525 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16526 conftest.$ac_objext conftest.beam conftest.$ac_ext
16527 fi
16528
16529
16530 fi
16531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
16532 $as_echo "$gl_cv_func_getdtablesize_works" >&6; }
16533 case "$gl_cv_func_getdtablesize_works" in
16534 *yes) ;;
16535 *) REPLACE_GETDTABLESIZE=1 ;;
16536 esac
16537 else
16538 HAVE_GETDTABLESIZE=0
16539 fi
16540
16541 if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
16542
16543
16544
16545
16546
16547
16548
16549
16550 gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
16551
16552 :
16553 fi
16554
16555
16556
16557
16558
16559 GNULIB_GETDTABLESIZE=1
16560
16561
16562
16563
16564
16565 $as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
16566
16567
16568
16569
16570
16571
16572
16573
16574
16575 if test $ac_cv_have_decl_getlogin_r = no; then
16576 HAVE_DECL_GETLOGIN_R=0
16577 fi
16578
16579
16580 if test $ac_cv_func_getlogin_r = no; then
16581 HAVE_GETLOGIN_R=0
16582 else
16583 HAVE_GETLOGIN_R=1
16584
16585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getlogin_r works with small buffers" >&5
16586 $as_echo_n "checking whether getlogin_r works with small buffers... " >&6; }
16587 if test "${gl_cv_func_getlogin_r_works+set}" = set; then :
16588 $as_echo_n "(cached) " >&6
16589 else
16590
16591 case "$host_os" in
16592 # Guess no on OSF/1.
16593 osf*) gl_cv_func_getlogin_r_works="guessing no" ;;
16594 # Guess yes otherwise.
16595 *) gl_cv_func_getlogin_r_works="guessing yes" ;;
16596 esac
16597 if test "$cross_compiling" = yes; then :
16598 :
16599 else
16600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16601 /* end confdefs.h. */
16602
16603 #include <stddef.h>
16604 #include <unistd.h>
16605 #if !HAVE_DECL_GETLOGIN_R
16606 extern
16607 # ifdef __cplusplus
16608 "C"
16609 # endif
16610 int getlogin_r (char *, size_t);
16611 #endif
16612 int
16613 main (void)
16614 {
16615 int result = 0;
16616 char buf[100];
16617
16618 if (getlogin_r (buf, 0) == 0)
16619 result |= 16;
16620 if (getlogin_r (buf, 1) == 0)
16621 result |= 17;
16622 return result;
16623 }
16624 _ACEOF
16625 if ac_fn_c_try_run "$LINENO"; then :
16626 gl_cv_func_getlogin_r_works=yes
16627 else
16628 case $? in
16629 16 | 17) gl_cv_func_getlogin_r_works=no ;;
16630 esac
16631
16632 fi
16633 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16634 conftest.$ac_objext conftest.beam conftest.$ac_ext
16635 fi
16636
16637
16638 fi
16639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getlogin_r_works" >&5
16640 $as_echo "$gl_cv_func_getlogin_r_works" >&6; }
16641 case "$gl_cv_func_getlogin_r_works" in
16642 *yes) ;;
16643 *) REPLACE_GETLOGIN_R=1 ;;
16644 esac
16645 fi
16646
16647 if test $HAVE_GETLOGIN_R = 0 || test $REPLACE_GETLOGIN_R = 1; then
16648
16649
16650
16651
16652
16653
16654
16655
16656 gl_LIBOBJS="$gl_LIBOBJS getlogin_r.$ac_objext"
16657
16658
16659
16660
16661 fi
16662
16663
16664
16665
16666
16667 GNULIB_GETLOGIN_R=1
16668
16669
16670
16671
16672
16673 $as_echo "#define GNULIB_TEST_GETLOGIN_R 1" >>confdefs.h
16674
16675
16676
16677
16678
16679
16680 ac_found=0
16681 ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
16682 "
16683 if test "x$ac_cv_have_decl_program_invocation_name" = x""yes; then :
16684 ac_have_decl=1
16685 else
16686 ac_have_decl=0
16687 fi
16688
16689 cat >>confdefs.h <<_ACEOF
16690 #define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
16691 _ACEOF
16692 if test $ac_have_decl = 1; then :
16693 ac_found=1
16694 fi
16695
16696 ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
16697 "
16698 if test "x$ac_cv_have_decl_program_invocation_short_name" = x""yes; then :
16699 ac_have_decl=1
16700 else
16701 ac_have_decl=0
16702 fi
16703
16704 cat >>confdefs.h <<_ACEOF
16705 #define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
16706 _ACEOF
16707 if test $ac_have_decl = 1; then :
16708 ac_found=1
16709 fi
16710
16711 ac_fn_c_check_decl "$LINENO" "__argv" "ac_cv_have_decl___argv" "#include <stdlib.h>
16712 "
16713 if test "x$ac_cv_have_decl___argv" = x""yes; then :
16714 ac_have_decl=1
16715 else
16716 ac_have_decl=0
16717 fi
16718
16719 cat >>confdefs.h <<_ACEOF
16720 #define HAVE_DECL___ARGV $ac_have_decl
16721 _ACEOF
16722 if test $ac_have_decl = 1; then :
16723 ac_found=1
16724 fi
16725
16726
16727 # Incur the cost of this test only if none of the above worked.
16728 if test $ac_found = 0; then
16729 # On OpenBSD 5.1, using the global __progname variable appears to be
16730 # the only way to implement getprogname.
16731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __progname is defined in default libraries" >&5
16732 $as_echo_n "checking whether __progname is defined in default libraries... " >&6; }
16733 if test "${gl_cv_var___progname+set}" = set; then :
16734 $as_echo_n "(cached) " >&6
16735 else
16736
16737 gl_cv_var___progname=
16738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16739 /* end confdefs.h. */
16740 extern char *__progname;
16741 int
16742 main ()
16743 {
16744 return *__progname;
16745
16746 ;
16747 return 0;
16748 }
16749 _ACEOF
16750 if ac_fn_c_try_link "$LINENO"; then :
16751 gl_cv_var___progname=yes
16752
16753 fi
16754 rm -f core conftest.err conftest.$ac_objext \
16755 conftest$ac_exeext conftest.$ac_ext
16756
16757
16758 fi
16759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var___progname" >&5
16760 $as_echo "$gl_cv_var___progname" >&6; }
16761 if test "$gl_cv_var___progname" = yes; then
16762
16763 $as_echo "#define HAVE_VAR___PROGNAME 1" >>confdefs.h
16764
16765 fi
16766 fi
16767
16768
16769
16770
16771
16772
16773
16774
16775
16776 gl_gettimeofday_timezone=void
16777 if test $ac_cv_func_gettimeofday != yes; then
16778 HAVE_GETTIMEOFDAY=0
16779 else
16780
16781
16782
16783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
16784 $as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
16785 if test "${gl_cv_func_gettimeofday_clobber+set}" = set; then :
16786 $as_echo_n "(cached) " >&6
16787 else
16788 if test "$cross_compiling" = yes; then :
16789 # When cross-compiling:
16790 case "$host_os" in
16791 # Guess all is fine on glibc systems.
16792 *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
16793 # If we don't know, assume the worst.
16794 *) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
16795 esac
16796
16797 else
16798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16799 /* end confdefs.h. */
16800 #include <string.h>
16801 #include <sys/time.h>
16802 #include <time.h>
16803 #include <stdlib.h>
16804
16805 int
16806 main ()
16807 {
16808
16809 time_t t = 0;
16810 struct tm *lt;
16811 struct tm saved_lt;
16812 struct timeval tv;
16813 lt = localtime (&t);
16814 saved_lt = *lt;
16815 gettimeofday (&tv, NULL);
16816 return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
16817
16818 ;
16819 return 0;
16820 }
16821 _ACEOF
16822 if ac_fn_c_try_run "$LINENO"; then :
16823 gl_cv_func_gettimeofday_clobber=no
16824 else
16825 gl_cv_func_gettimeofday_clobber=yes
16826 fi
16827 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16828 conftest.$ac_objext conftest.beam conftest.$ac_ext
16829 fi
16830
16831 fi
16832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
16833 $as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
16834
16835 case "$gl_cv_func_gettimeofday_clobber" in
16836 *yes)
16837 REPLACE_GETTIMEOFDAY=1
16838
16839 REPLACE_GMTIME=1
16840 REPLACE_LOCALTIME=1
16841
16842
16843 $as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
16844
16845 ;;
16846 esac
16847
16848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
16849 $as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
16850 if test "${gl_cv_func_gettimeofday_posix_signature+set}" = set; then :
16851 $as_echo_n "(cached) " >&6
16852 else
16853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16854 /* end confdefs.h. */
16855 #include <sys/time.h>
16856 struct timeval c;
16857 int gettimeofday (struct timeval *restrict, void *restrict);
16858
16859 int
16860 main ()
16861 {
16862 /* glibc uses struct timezone * rather than the POSIX void *
16863 if _GNU_SOURCE is defined. However, since the only portable
16864 use of gettimeofday uses NULL as the second parameter, and
16865 since the glibc definition is actually more typesafe, it is
16866 not worth wrapping this to get a compliant signature. */
16867 int (*f) (struct timeval *restrict, void *restrict)
16868 = gettimeofday;
16869 int x = f (&c, 0);
16870 return !(x | c.tv_sec | c.tv_usec);
16871
16872 ;
16873 return 0;
16874 }
16875 _ACEOF
16876 if ac_fn_c_try_compile "$LINENO"; then :
16877 gl_cv_func_gettimeofday_posix_signature=yes
16878 else
16879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16880 /* end confdefs.h. */
16881 #include <sys/time.h>
16882 int gettimeofday (struct timeval *restrict, struct timezone *restrict);
16883
16884 int
16885 main ()
16886 {
16887
16888 ;
16889 return 0;
16890 }
16891 _ACEOF
16892 if ac_fn_c_try_compile "$LINENO"; then :
16893 gl_cv_func_gettimeofday_posix_signature=almost
16894 else
16895 gl_cv_func_gettimeofday_posix_signature=no
16896 fi
16897 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16898 fi
16899 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16900 fi
16901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
16902 $as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
16903 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
16904 gl_gettimeofday_timezone='struct timezone'
16905 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
16906 REPLACE_GETTIMEOFDAY=1
16907 fi
16908 if test $REPLACE_STRUCT_TIMEVAL = 1; then
16909 REPLACE_GETTIMEOFDAY=1
16910 fi
16911
16912 fi
16913
16914 cat >>confdefs.h <<_ACEOF
16915 #define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
16916 _ACEOF
16917
16918
16919 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
16920
16921
16922
16923
16924
16925
16926
16927
16928 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
16929
16930
16931 for ac_header in sys/timeb.h
16932 do :
16933 ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
16934 if test "x$ac_cv_header_sys_timeb_h" = x""yes; then :
16935 cat >>confdefs.h <<_ACEOF
16936 #define HAVE_SYS_TIMEB_H 1
16937 _ACEOF
16938
16939 fi
16940
16941 done
16942
16943 for ac_func in _ftime
16944 do :
16945 ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
16946 if test "x$ac_cv_func__ftime" = x""yes; then :
16947 cat >>confdefs.h <<_ACEOF
16948 #define HAVE__FTIME 1
16949 _ACEOF
16950
16951 fi
16952 done
16953
16954
16955 fi
16956
16957
16958
16959
16960
16961 GNULIB_GETTIMEOFDAY=1
16962
16963
16964
16965
16966
16967 $as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
16968
16969
16970
16971 GLOB_H=
16972 for ac_header in glob.h
16973 do :
16974 ac_fn_c_check_header_mongrel "$LINENO" "glob.h" "ac_cv_header_glob_h" "$ac_includes_default"
16975 if test "x$ac_cv_header_glob_h" = x""yes; then :
16976 cat >>confdefs.h <<_ACEOF
16977 #define HAVE_GLOB_H 1
16978 _ACEOF
16979
16980 else
16981 GLOB_H=glob.h
16982 fi
16983
16984 done
16985
16986
16987 if test -z "$GLOB_H"; then
16988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU glob interface version 1" >&5
16989 $as_echo_n "checking for GNU glob interface version 1... " >&6; }
16990 if test "${gl_cv_gnu_glob_interface_version_1+set}" = set; then :
16991 $as_echo_n "(cached) " >&6
16992 else
16993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16994 /* end confdefs.h. */
16995 #include <gnu-versions.h>
16996 char a[_GNU_GLOB_INTERFACE_VERSION == 1 ? 1 : -1];
16997 _ACEOF
16998 if ac_fn_c_try_compile "$LINENO"; then :
16999 gl_cv_gnu_glob_interface_version_1=yes
17000 else
17001 gl_cv_gnu_glob_interface_version_1=no
17002 fi
17003 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17004 fi
17005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_gnu_glob_interface_version_1" >&5
17006 $as_echo "$gl_cv_gnu_glob_interface_version_1" >&6; }
17007
17008 if test "$gl_cv_gnu_glob_interface_version_1" = "no"; then
17009 GLOB_H=glob.h
17010 fi
17011 fi
17012
17013 if test -z "$GLOB_H"; then
17014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether glob lists broken symlinks" >&5
17015 $as_echo_n "checking whether glob lists broken symlinks... " >&6; }
17016 if test "${gl_cv_glob_lists_symlinks+set}" = set; then :
17017 $as_echo_n "(cached) " >&6
17018 else
17019 if ln -s conf-doesntexist conf$$-globtest 2>/dev/null; then
17020 gl_cv_glob_lists_symlinks=maybe
17021 else
17022 # If we can't make a symlink, then we cannot test this issue. Be
17023 # pessimistic about this.
17024 gl_cv_glob_lists_symlinks=no
17025 fi
17026
17027 if test $gl_cv_glob_lists_symlinks = maybe; then
17028 if test "$cross_compiling" = yes; then :
17029 gl_cv_glob_lists_symlinks=no
17030 else
17031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17032 /* end confdefs.h. */
17033
17034 #include <stddef.h>
17035 #include <glob.h>
17036 int
17037 main ()
17038 {
17039 glob_t found;
17040 if (glob ("conf*-globtest", 0, NULL, &found) == GLOB_NOMATCH) return 1;
17041 ;
17042 return 0;
17043 }
17044 _ACEOF
17045 if ac_fn_c_try_run "$LINENO"; then :
17046 gl_cv_glob_lists_symlinks=yes
17047 else
17048 gl_cv_glob_lists_symlinks=no
17049 fi
17050 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17051 conftest.$ac_objext conftest.beam conftest.$ac_ext
17052 fi
17053
17054 fi
17055 fi
17056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_glob_lists_symlinks" >&5
17057 $as_echo "$gl_cv_glob_lists_symlinks" >&6; }
17058
17059 if test $gl_cv_glob_lists_symlinks = no; then
17060 GLOB_H=glob.h
17061 fi
17062 fi
17063
17064 rm -f conf$$-globtest
17065
17066
17067 if test -n "$GLOB_H"; then
17068 GL_GENERATE_GLOB_H_TRUE=
17069 GL_GENERATE_GLOB_H_FALSE='#'
17070 else
17071 GL_GENERATE_GLOB_H_TRUE='#'
17072 GL_GENERATE_GLOB_H_FALSE=
17073 fi
17074
17075
17076 if test -n "$GLOB_H"; then
17077
17078
17079
17080
17081
17082
17083
17084
17085 gl_LIBOBJS="$gl_LIBOBJS glob.$ac_objext"
17086
17087
17088 if test $ac_cv_header_sys_cdefs_h = yes; then
17089 HAVE_SYS_CDEFS_H=1
17090 else
17091 HAVE_SYS_CDEFS_H=0
17092 fi
17093
17094
17095 fi
17096
17097 :
17098
17099
17100
17101
17102
17103
17104 PRIPTR_PREFIX=
17105 if test -n "$STDINT_H"; then
17106 PRIPTR_PREFIX='"l"'
17107 else
17108 for glpfx in '' l ll I64; do
17109 case $glpfx in
17110 '') gltype1='int';;
17111 l) gltype1='long int';;
17112 ll) gltype1='long long int';;
17113 I64) gltype1='__int64';;
17114 esac
17115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17116 /* end confdefs.h. */
17117 #include <stdint.h>
17118 extern intptr_t foo;
17119 extern $gltype1 foo;
17120 int
17121 main ()
17122 {
17123
17124 ;
17125 return 0;
17126 }
17127 _ACEOF
17128 if ac_fn_c_try_compile "$LINENO"; then :
17129 PRIPTR_PREFIX='"'$glpfx'"'
17130 fi
17131 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17132 test -n "$PRIPTR_PREFIX" && break
17133 done
17134 fi
17135
17136
17137
17138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
17139 $as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
17140 if test "${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+set}" = set; then :
17141 $as_echo_n "(cached) " >&6
17142 else
17143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17144 /* end confdefs.h. */
17145 /* Work also in C++ mode. */
17146 #define __STDC_LIMIT_MACROS 1
17147
17148 /* Work if build is not clean. */
17149 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
17150
17151 #include <limits.h>
17152 #if HAVE_STDINT_H
17153 #include <stdint.h>
17154 #endif
17155
17156 #if defined INT32_MAX && defined INTMAX_MAX
17157 #define CONDITION (INT32_MAX < INTMAX_MAX)
17158 #elif HAVE_LONG_LONG_INT
17159 #define CONDITION (sizeof (int) < sizeof (long long int))
17160 #else
17161 #define CONDITION 0
17162 #endif
17163 int test[CONDITION ? 1 : -1];
17164 int
17165 main ()
17166 {
17167
17168 ;
17169 return 0;
17170 }
17171 _ACEOF
17172 if ac_fn_c_try_compile "$LINENO"; then :
17173 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
17174 else
17175 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
17176 fi
17177 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17178 fi
17179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
17180 $as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
17181 if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
17182 INT32_MAX_LT_INTMAX_MAX=1;
17183 else
17184 INT32_MAX_LT_INTMAX_MAX=0;
17185 fi
17186
17187
17188 if test $APPLE_UNIVERSAL_BUILD = 0; then
17189
17190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
17191 $as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; }
17192 if test "${gl_cv_test_INT64_MAX_EQ_LONG_MAX+set}" = set; then :
17193 $as_echo_n "(cached) " >&6
17194 else
17195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17196 /* end confdefs.h. */
17197 /* Work also in C++ mode. */
17198 #define __STDC_LIMIT_MACROS 1
17199
17200 /* Work if build is not clean. */
17201 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
17202
17203 #include <limits.h>
17204 #if HAVE_STDINT_H
17205 #include <stdint.h>
17206 #endif
17207
17208 #if defined INT64_MAX
17209 #define CONDITION (INT64_MAX == LONG_MAX)
17210 #elif HAVE_LONG_LONG_INT
17211 #define CONDITION (sizeof (long long int) == sizeof (long int))
17212 #else
17213 #define CONDITION 0
17214 #endif
17215 int test[CONDITION ? 1 : -1];
17216 int
17217 main ()
17218 {
17219
17220 ;
17221 return 0;
17222 }
17223 _ACEOF
17224 if ac_fn_c_try_compile "$LINENO"; then :
17225 gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
17226 else
17227 gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
17228 fi
17229 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17230 fi
17231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
17232 $as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
17233 if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
17234 INT64_MAX_EQ_LONG_MAX=1;
17235 else
17236 INT64_MAX_EQ_LONG_MAX=0;
17237 fi
17238
17239
17240 else
17241 INT64_MAX_EQ_LONG_MAX=-1
17242 fi
17243
17244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
17245 $as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
17246 if test "${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+set}" = set; then :
17247 $as_echo_n "(cached) " >&6
17248 else
17249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17250 /* end confdefs.h. */
17251 /* Work also in C++ mode. */
17252 #define __STDC_LIMIT_MACROS 1
17253
17254 /* Work if build is not clean. */
17255 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
17256
17257 #include <limits.h>
17258 #if HAVE_STDINT_H
17259 #include <stdint.h>
17260 #endif
17261
17262 #if defined UINT32_MAX && defined UINTMAX_MAX
17263 #define CONDITION (UINT32_MAX < UINTMAX_MAX)
17264 #elif HAVE_LONG_LONG_INT
17265 #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
17266 #else
17267 #define CONDITION 0
17268 #endif
17269 int test[CONDITION ? 1 : -1];
17270 int
17271 main ()
17272 {
17273
17274 ;
17275 return 0;
17276 }
17277 _ACEOF
17278 if ac_fn_c_try_compile "$LINENO"; then :
17279 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
17280 else
17281 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
17282 fi
17283 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17284 fi
17285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
17286 $as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
17287 if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
17288 UINT32_MAX_LT_UINTMAX_MAX=1;
17289 else
17290 UINT32_MAX_LT_UINTMAX_MAX=0;
17291 fi
17292
17293
17294 if test $APPLE_UNIVERSAL_BUILD = 0; then
17295
17296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
17297 $as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
17298 if test "${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+set}" = set; then :
17299 $as_echo_n "(cached) " >&6
17300 else
17301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17302 /* end confdefs.h. */
17303 /* Work also in C++ mode. */
17304 #define __STDC_LIMIT_MACROS 1
17305
17306 /* Work if build is not clean. */
17307 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
17308
17309 #include <limits.h>
17310 #if HAVE_STDINT_H
17311 #include <stdint.h>
17312 #endif
17313
17314 #if defined UINT64_MAX
17315 #define CONDITION (UINT64_MAX == ULONG_MAX)
17316 #elif HAVE_LONG_LONG_INT
17317 #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
17318 #else
17319 #define CONDITION 0
17320 #endif
17321 int test[CONDITION ? 1 : -1];
17322 int
17323 main ()
17324 {
17325
17326 ;
17327 return 0;
17328 }
17329 _ACEOF
17330 if ac_fn_c_try_compile "$LINENO"; then :
17331 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
17332 else
17333 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
17334 fi
17335 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17336 fi
17337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
17338 $as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
17339 if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
17340 UINT64_MAX_EQ_ULONG_MAX=1;
17341 else
17342 UINT64_MAX_EQ_ULONG_MAX=0;
17343 fi
17344
17345
17346 else
17347 UINT64_MAX_EQ_ULONG_MAX=-1
17348 fi
17349
17350
17351
17352
17353
17354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
17355 $as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; }
17356 if test "${gl_cv_func_isnand_no_libm+set}" = set; then :
17357 $as_echo_n "(cached) " >&6
17358 else
17359
17360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17361 /* end confdefs.h. */
17362 #include <math.h>
17363 #if __GNUC__ >= 4
17364 # undef isnand
17365 # define isnand(x) __builtin_isnan ((double)(x))
17366 #else
17367 # undef isnand
17368 # define isnand(x) isnan ((double)(x))
17369 #endif
17370 double x;
17371 int
17372 main ()
17373 {
17374 return isnand (x);
17375 ;
17376 return 0;
17377 }
17378 _ACEOF
17379 if ac_fn_c_try_link "$LINENO"; then :
17380 gl_cv_func_isnand_no_libm=yes
17381 else
17382 gl_cv_func_isnand_no_libm=no
17383 fi
17384 rm -f core conftest.err conftest.$ac_objext \
17385 conftest$ac_exeext conftest.$ac_ext
17386
17387 fi
17388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
17389 $as_echo "$gl_cv_func_isnand_no_libm" >&6; }
17390
17391 gl_func_isnand_no_libm=$gl_cv_func_isnand_no_libm
17392 if test $gl_cv_func_isnand_no_libm = yes; then
17393
17394 $as_echo "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h
17395
17396 fi
17397
17398 if test $gl_func_isnand_no_libm != yes; then
17399
17400
17401
17402
17403
17404
17405
17406
17407 gl_LIBOBJS="$gl_LIBOBJS isnand.$ac_objext"
17408
17409
17410
17411
17412 fi
17413
17414
17415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
17416 $as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; }
17417 if test "${gl_cv_func_isnanl_no_libm+set}" = set; then :
17418 $as_echo_n "(cached) " >&6
17419 else
17420
17421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17422 /* end confdefs.h. */
17423 #include <math.h>
17424 #if __GNUC__ >= 4
17425 # undef isnanl
17426 # define isnanl(x) __builtin_isnanl ((long double)(x))
17427 #elif defined isnan
17428 # undef isnanl
17429 # define isnanl(x) isnan ((long double)(x))
17430 #endif
17431 long double x;
17432 int
17433 main ()
17434 {
17435 return isnanl (x);
17436 ;
17437 return 0;
17438 }
17439 _ACEOF
17440 if ac_fn_c_try_link "$LINENO"; then :
17441 gl_cv_func_isnanl_no_libm=yes
17442 else
17443 gl_cv_func_isnanl_no_libm=no
17444 fi
17445 rm -f core conftest.err conftest.$ac_objext \
17446 conftest$ac_exeext conftest.$ac_ext
17447
17448 fi
17449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
17450 $as_echo "$gl_cv_func_isnanl_no_libm" >&6; }
17451
17452 gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm
17453 if test $gl_func_isnanl_no_libm = yes; then
17454
17455
17456
17457
17458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
17459 $as_echo_n "checking whether isnanl works... " >&6; }
17460 if test "${gl_cv_func_isnanl_works+set}" = set; then :
17461 $as_echo_n "(cached) " >&6
17462 else
17463
17464 if test "$cross_compiling" = yes; then :
17465 gl_cv_func_isnanl_works="guessing yes"
17466 else
17467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17468 /* end confdefs.h. */
17469
17470 #include <float.h>
17471 #include <limits.h>
17472 #include <math.h>
17473 #if __GNUC__ >= 4
17474 # undef isnanl
17475 # define isnanl(x) __builtin_isnanl ((long double)(x))
17476 #elif defined isnan
17477 # undef isnanl
17478 # define isnanl(x) isnan ((long double)(x))
17479 #endif
17480 #define NWORDS \
17481 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
17482 typedef union { unsigned int word[NWORDS]; long double value; }
17483 memory_long_double;
17484 /* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
17485 runtime type conversion. */
17486 #ifdef __sgi
17487 static long double NaNl ()
17488 {
17489 double zero = 0.0;
17490 return zero / zero;
17491 }
17492 #else
17493 # define NaNl() (0.0L / 0.0L)
17494 #endif
17495 int main ()
17496 {
17497 int result = 0;
17498
17499 if (!isnanl (NaNl ()))
17500 result |= 1;
17501
17502 {
17503 memory_long_double m;
17504 unsigned int i;
17505
17506 /* The isnanl function should be immune against changes in the sign bit and
17507 in the mantissa bits. The xor operation twiddles a bit that can only be
17508 a sign bit or a mantissa bit (since the exponent never extends to
17509 bit 31). */
17510 m.value = NaNl ();
17511 m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
17512 for (i = 0; i < NWORDS; i++)
17513 m.word[i] |= 1;
17514 if (!isnanl (m.value))
17515 result |= 1;
17516 }
17517
17518 #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
17519 /* Representation of an 80-bit 'long double' as an initializer for a sequence
17520 of 'unsigned int' words. */
17521 # ifdef WORDS_BIGENDIAN
17522 # define LDBL80_WORDS(exponent,manthi,mantlo) \
17523 { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
17524 ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \
17525 (unsigned int) (mantlo) << 16 \
17526 }
17527 # else
17528 # define LDBL80_WORDS(exponent,manthi,mantlo) \
17529 { mantlo, manthi, exponent }
17530 # endif
17531 { /* Quiet NaN. */
17532 static memory_long_double x =
17533 { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
17534 if (!isnanl (x.value))
17535 result |= 2;
17536 }
17537 {
17538 /* Signalling NaN. */
17539 static memory_long_double x =
17540 { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
17541 if (!isnanl (x.value))
17542 result |= 2;
17543 }
17544 /* isnanl should return something even for noncanonical values. */
17545 { /* Pseudo-NaN. */
17546 static memory_long_double x =
17547 { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
17548 if (isnanl (x.value) && !isnanl (x.value))
17549 result |= 4;
17550 }
17551 { /* Pseudo-Infinity. */
17552 static memory_long_double x =
17553 { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
17554 if (isnanl (x.value) && !isnanl (x.value))
17555 result |= 8;
17556 }
17557 { /* Pseudo-Zero. */
17558 static memory_long_double x =
17559 { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
17560 if (isnanl (x.value) && !isnanl (x.value))
17561 result |= 16;
17562 }
17563 { /* Unnormalized number. */
17564 static memory_long_double x =
17565 { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
17566 if (isnanl (x.value) && !isnanl (x.value))
17567 result |= 32;
17568 }
17569 { /* Pseudo-Denormal. */
17570 static memory_long_double x =
17571 { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
17572 if (isnanl (x.value) && !isnanl (x.value))
17573 result |= 64;
17574 }
17575 #endif
17576
17577 return result;
17578 }
17579 _ACEOF
17580 if ac_fn_c_try_run "$LINENO"; then :
17581 gl_cv_func_isnanl_works=yes
17582 else
17583 gl_cv_func_isnanl_works=no
17584 fi
17585 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17586 conftest.$ac_objext conftest.beam conftest.$ac_ext
17587 fi
17588
17589
17590 fi
17591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
17592 $as_echo "$gl_cv_func_isnanl_works" >&6; }
17593
17594 case "$gl_cv_func_isnanl_works" in
17595 *yes) ;;
17596 *) gl_func_isnanl_no_libm=no ;;
17597 esac
17598 fi
17599 if test $gl_func_isnanl_no_libm = yes; then
17600
17601 $as_echo "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h
17602
17603 fi
17604
17605 if test $gl_func_isnanl_no_libm != yes; then
17606
17607
17608
17609
17610
17611
17612
17613
17614 gl_LIBOBJS="$gl_LIBOBJS isnanl.$ac_objext"
17615
17616
17617
17618
17619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
17620 $as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
17621 if test "${gl_cv_cc_long_double_expbit0+set}" = set; then :
17622 $as_echo_n "(cached) " >&6
17623 else
17624
17625 if test "$cross_compiling" = yes; then :
17626
17627 gl_cv_cc_long_double_expbit0="unknown"
17628
17629 else
17630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17631 /* end confdefs.h. */
17632
17633 #include <float.h>
17634 #include <stddef.h>
17635 #include <stdio.h>
17636 #include <string.h>
17637 #define NWORDS \
17638 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
17639 typedef union { long double value; unsigned int word[NWORDS]; }
17640 memory_long_double;
17641 static unsigned int ored_words[NWORDS];
17642 static unsigned int anded_words[NWORDS];
17643 static void add_to_ored_words (long double x)
17644 {
17645 memory_long_double m;
17646 size_t i;
17647 /* Clear it first, in case
17648 sizeof (long double) < sizeof (memory_long_double). */
17649 memset (&m, 0, sizeof (memory_long_double));
17650 m.value = x;
17651 for (i = 0; i < NWORDS; i++)
17652 {
17653 ored_words[i] |= m.word[i];
17654 anded_words[i] &= m.word[i];
17655 }
17656 }
17657 int main ()
17658 {
17659 size_t j;
17660 FILE *fp = fopen ("conftest.out", "w");
17661 if (fp == NULL)
17662 return 1;
17663 for (j = 0; j < NWORDS; j++)
17664 anded_words[j] = ~ (unsigned int) 0;
17665 add_to_ored_words (0.25L);
17666 add_to_ored_words (0.5L);
17667 add_to_ored_words (1.0L);
17668 add_to_ored_words (2.0L);
17669 add_to_ored_words (4.0L);
17670 /* Remove bits that are common (e.g. if representation of the first mantissa
17671 bit is explicit). */
17672 for (j = 0; j < NWORDS; j++)
17673 ored_words[j] &= ~anded_words[j];
17674 /* Now find the nonzero word. */
17675 for (j = 0; j < NWORDS; j++)
17676 if (ored_words[j] != 0)
17677 break;
17678 if (j < NWORDS)
17679 {
17680 size_t i;
17681 for (i = j + 1; i < NWORDS; i++)
17682 if (ored_words[i] != 0)
17683 {
17684 fprintf (fp, "unknown");
17685 return (fclose (fp) != 0);
17686 }
17687 for (i = 0; ; i++)
17688 if ((ored_words[j] >> i) & 1)
17689 {
17690 fprintf (fp, "word %d bit %d", (int) j, (int) i);
17691 return (fclose (fp) != 0);
17692 }
17693 }
17694 fprintf (fp, "unknown");
17695 return (fclose (fp) != 0);
17696 }
17697
17698 _ACEOF
17699 if ac_fn_c_try_run "$LINENO"; then :
17700 gl_cv_cc_long_double_expbit0=`cat conftest.out`
17701 else
17702 gl_cv_cc_long_double_expbit0="unknown"
17703 fi
17704 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17705 conftest.$ac_objext conftest.beam conftest.$ac_ext
17706 fi
17707
17708 rm -f conftest.out
17709
17710 fi
17711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
17712 $as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
17713 case "$gl_cv_cc_long_double_expbit0" in
17714 word*bit*)
17715 word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
17716 bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
17717
17718 cat >>confdefs.h <<_ACEOF
17719 #define LDBL_EXPBIT0_WORD $word
17720 _ACEOF
17721
17722
17723 cat >>confdefs.h <<_ACEOF
17724 #define LDBL_EXPBIT0_BIT $bit
17725 _ACEOF
17726
17727 ;;
17728 esac
17729
17730
17731
17732 fi
17733
17734
17735
17736
17737
17738
17739
17740
17741
17742
17743 LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
17744
17745
17746
17747
17748 if test $ac_cv_func_lstat = yes; then
17749
17750 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
17751 *no)
17752 REPLACE_LSTAT=1
17753 ;;
17754 esac
17755 else
17756 HAVE_LSTAT=0
17757 fi
17758
17759 if test $REPLACE_LSTAT = 1; then
17760
17761
17762
17763
17764
17765
17766
17767
17768 gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
17769
17770 :
17771 fi
17772
17773
17774
17775
17776
17777 GNULIB_LSTAT=1
17778
17779
17780
17781
17782
17783 $as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
17784
17785
17786
17787
17788
17789
17790 if test $gl_cv_func_malloc_posix = yes; then
17791
17792 $as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
17793
17794 else
17795 REPLACE_MALLOC=1
17796 fi
17797
17798 if test $REPLACE_MALLOC = 1; then
17799
17800
17801
17802
17803
17804
17805
17806
17807 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
17808
17809 fi
17810
17811
17812
17813
17814
17815 GNULIB_MALLOC_POSIX=1
17816
17817
17818
17819
17820
17821 $as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
17822
17823
17824
17825
17826
17827
17828
17829
17830
17831
17832
17833
17834
17835
17836
17837
17838
17839
17840 if test $gl_cv_have_include_next = yes; then
17841 gl_cv_next_math_h='<'math.h'>'
17842 else
17843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
17844 $as_echo_n "checking absolute name of <math.h>... " >&6; }
17845 if test "${gl_cv_next_math_h+set}" = set; then :
17846 $as_echo_n "(cached) " >&6
17847 else
17848
17849 if test $ac_cv_header_math_h = yes; then
17850
17851
17852
17853
17854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17855 /* end confdefs.h. */
17856 #include <math.h>
17857 _ACEOF
17858 case "$host_os" in
17859 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17860 *) gl_absname_cpp="$ac_cpp" ;;
17861 esac
17862
17863 case "$host_os" in
17864 mingw*)
17865 gl_dirsep_regex='[/\\]'
17866 ;;
17867 *)
17868 gl_dirsep_regex='\/'
17869 ;;
17870 esac
17871 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17872 gl_header_literal_regex=`echo 'math.h' \
17873 | sed -e "$gl_make_literal_regex_sed"`
17874 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17875 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17876 s|^/[^/]|//&|
17877 p
17878 q
17879 }'
17880
17881 gl_cv_absolute_math_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17882 sed -n "$gl_absolute_header_sed"`
17883
17884 gl_header=$gl_cv_absolute_math_h
17885 gl_cv_next_math_h='"'$gl_header'"'
17886 else
17887 gl_cv_next_math_h='<'math.h'>'
17888 fi
17889
17890
17891 fi
17892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
17893 $as_echo "$gl_cv_next_math_h" >&6; }
17894 fi
17895 NEXT_MATH_H=$gl_cv_next_math_h
17896
17897 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17898 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17899 gl_next_as_first_directive='<'math.h'>'
17900 else
17901 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17902 gl_next_as_first_directive=$gl_cv_next_math_h
17903 fi
17904 NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive
17905
17906
17907
17908
17909
17910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
17911 $as_echo_n "checking whether NAN macro works... " >&6; }
17912 if test "${gl_cv_header_math_nan_works+set}" = set; then :
17913 $as_echo_n "(cached) " >&6
17914 else
17915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17916 /* end confdefs.h. */
17917 #include <math.h>
17918 int
17919 main ()
17920 {
17921 /* Solaris 10 has a broken definition of NAN. Other platforms
17922 fail to provide NAN, or provide it only in C99 mode; this
17923 test only needs to fail when NAN is provided but wrong. */
17924 float f = 1.0f;
17925 #ifdef NAN
17926 f = NAN;
17927 #endif
17928 return f == 0;
17929 ;
17930 return 0;
17931 }
17932 _ACEOF
17933 if ac_fn_c_try_compile "$LINENO"; then :
17934 gl_cv_header_math_nan_works=yes
17935 else
17936 gl_cv_header_math_nan_works=no
17937 fi
17938 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17939 fi
17940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5
17941 $as_echo "$gl_cv_header_math_nan_works" >&6; }
17942 if test $gl_cv_header_math_nan_works = no; then
17943 REPLACE_NAN=1
17944 fi
17945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
17946 $as_echo_n "checking whether HUGE_VAL works... " >&6; }
17947 if test "${gl_cv_header_math_huge_val_works+set}" = set; then :
17948 $as_echo_n "(cached) " >&6
17949 else
17950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17951 /* end confdefs.h. */
17952 #include <math.h>
17953 int
17954 main ()
17955 {
17956 /* Solaris 10 has a broken definition of HUGE_VAL. */
17957 double d = HUGE_VAL;
17958 return d == 0;
17959 ;
17960 return 0;
17961 }
17962 _ACEOF
17963 if ac_fn_c_try_compile "$LINENO"; then :
17964 gl_cv_header_math_huge_val_works=yes
17965 else
17966 gl_cv_header_math_huge_val_works=no
17967 fi
17968 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17969 fi
17970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5
17971 $as_echo "$gl_cv_header_math_huge_val_works" >&6; }
17972 if test $gl_cv_header_math_huge_val_works = no; then
17973 REPLACE_HUGE_VAL=1
17974 fi
17975
17976
17977 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
17978 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
17979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
17980 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
17981 if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
17982 $as_echo_n "(cached) " >&6
17983 else
17984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17985 /* end confdefs.h. */
17986 #include <math.h>
17987 int
17988 main ()
17989 {
17990 #undef $gl_func
17991 (void) $gl_func;
17992 ;
17993 return 0;
17994 }
17995 _ACEOF
17996 if ac_fn_c_try_compile "$LINENO"; then :
17997 eval "$as_gl_Symbol=yes"
17998 else
17999 eval "$as_gl_Symbol=no"
18000 fi
18001 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18002 fi
18003 eval ac_res=\$$as_gl_Symbol
18004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18005 $as_echo "$ac_res" >&6; }
18006 eval as_val=\$$as_gl_Symbol
18007 if test "x$as_val" = x""yes; then :
18008 cat >>confdefs.h <<_ACEOF
18009 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
18010 _ACEOF
18011
18012 eval ac_cv_have_decl_$gl_func=yes
18013 fi
18014 done
18015
18016
18017
18018
18019
18020
18021
18022
18023
18024
18025
18026
18027 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
18028
18029
18030
18031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
18032 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
18033 if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then :
18034 $as_echo_n "(cached) " >&6
18035 else
18036
18037 case "$host_os" in
18038 # Guess no on AIX and OSF/1.
18039 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
18040 # Guess yes otherwise.
18041 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
18042 esac
18043 if test $LOCALE_JA != none; then
18044 if test "$cross_compiling" = yes; then :
18045 :
18046 else
18047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18048 /* end confdefs.h. */
18049
18050 #include <locale.h>
18051 #include <string.h>
18052 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18053 <wchar.h>.
18054 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18055 included before <wchar.h>. */
18056 #include <stddef.h>
18057 #include <stdio.h>
18058 #include <time.h>
18059 #include <wchar.h>
18060 int main ()
18061 {
18062 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
18063 {
18064 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
18065 mbstate_t state;
18066 wchar_t wc;
18067
18068 memset (&state, '\0', sizeof (mbstate_t));
18069 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
18070 if (mbsinit (&state))
18071 return 1;
18072 }
18073 return 0;
18074 }
18075 _ACEOF
18076 if ac_fn_c_try_run "$LINENO"; then :
18077 gl_cv_func_mbrtowc_incomplete_state=yes
18078 else
18079 gl_cv_func_mbrtowc_incomplete_state=no
18080 fi
18081 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18082 conftest.$ac_objext conftest.beam conftest.$ac_ext
18083 fi
18084
18085 fi
18086
18087 fi
18088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
18089 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
18090
18091
18092
18093
18094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
18095 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
18096 if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then :
18097 $as_echo_n "(cached) " >&6
18098 else
18099
18100 case "$host_os" in
18101 # Guess no on Solaris 8.
18102 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
18103 # Guess yes otherwise.
18104 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
18105 esac
18106 if test $LOCALE_ZH_CN != none; then
18107 if test "$cross_compiling" = yes; then :
18108 :
18109 else
18110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18111 /* end confdefs.h. */
18112
18113 #include <locale.h>
18114 #include <stdlib.h>
18115 #include <string.h>
18116 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18117 <wchar.h>.
18118 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18119 included before <wchar.h>. */
18120 #include <stddef.h>
18121 #include <stdio.h>
18122 #include <time.h>
18123 #include <wchar.h>
18124 int main ()
18125 {
18126 /* This fails on Solaris 8:
18127 mbrtowc returns 2, and sets wc to 0x00F0.
18128 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
18129 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
18130 {
18131 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
18132 mbstate_t state;
18133 wchar_t wc;
18134
18135 memset (&state, '\0', sizeof (mbstate_t));
18136 if (mbrtowc (&wc, input + 3, 6, &state) != 4
18137 && mbtowc (&wc, input + 3, 6) == 4)
18138 return 1;
18139 }
18140 return 0;
18141 }
18142 _ACEOF
18143 if ac_fn_c_try_run "$LINENO"; then :
18144 gl_cv_func_mbrtowc_sanitycheck=yes
18145 else
18146 gl_cv_func_mbrtowc_sanitycheck=no
18147 fi
18148 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18149 conftest.$ac_objext conftest.beam conftest.$ac_ext
18150 fi
18151
18152 fi
18153
18154 fi
18155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
18156 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
18157
18158 REPLACE_MBSTATE_T=0
18159 case "$gl_cv_func_mbrtowc_incomplete_state" in
18160 *yes) ;;
18161 *) REPLACE_MBSTATE_T=1 ;;
18162 esac
18163 case "$gl_cv_func_mbrtowc_sanitycheck" in
18164 *yes) ;;
18165 *) REPLACE_MBSTATE_T=1 ;;
18166 esac
18167 else
18168 REPLACE_MBSTATE_T=1
18169 fi
18170
18171
18172
18173 if test $ac_cv_func_mbrtowc = no; then
18174 HAVE_MBRTOWC=0
18175 ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
18176 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18177 <wchar.h>.
18178 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18179 included before <wchar.h>. */
18180 #include <stddef.h>
18181 #include <stdio.h>
18182 #include <time.h>
18183 #include <wchar.h>
18184
18185 "
18186 if test "x$ac_cv_have_decl_mbrtowc" = x""yes; then :
18187 ac_have_decl=1
18188 else
18189 ac_have_decl=0
18190 fi
18191
18192 cat >>confdefs.h <<_ACEOF
18193 #define HAVE_DECL_MBRTOWC $ac_have_decl
18194 _ACEOF
18195
18196 if test $ac_cv_have_decl_mbrtowc = yes; then
18197 REPLACE_MBRTOWC=1
18198 fi
18199 else
18200 if test $REPLACE_MBSTATE_T = 1; then
18201 REPLACE_MBRTOWC=1
18202 else
18203
18204
18205
18206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
18207 $as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
18208 if test "${gl_cv_func_mbrtowc_null_arg1+set}" = set; then :
18209 $as_echo_n "(cached) " >&6
18210 else
18211
18212 case "$host_os" in
18213 # Guess no on Solaris.
18214 solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
18215 # Guess yes otherwise.
18216 *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
18217 esac
18218 if test $LOCALE_FR_UTF8 != none; then
18219 if test "$cross_compiling" = yes; then :
18220 :
18221 else
18222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18223 /* end confdefs.h. */
18224
18225 #include <locale.h>
18226 #include <stdlib.h>
18227 #include <string.h>
18228 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18229 <wchar.h>.
18230 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18231 included before <wchar.h>. */
18232 #include <stddef.h>
18233 #include <stdio.h>
18234 #include <time.h>
18235 #include <wchar.h>
18236 int main ()
18237 {
18238 int result = 0;
18239
18240 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
18241 {
18242 char input[] = "\303\237er";
18243 mbstate_t state;
18244 wchar_t wc;
18245 size_t ret;
18246
18247 memset (&state, '\0', sizeof (mbstate_t));
18248 wc = (wchar_t) 0xBADFACE;
18249 ret = mbrtowc (&wc, input, 5, &state);
18250 if (ret != 2)
18251 result |= 1;
18252 if (!mbsinit (&state))
18253 result |= 2;
18254
18255 memset (&state, '\0', sizeof (mbstate_t));
18256 ret = mbrtowc (NULL, input, 5, &state);
18257 if (ret != 2) /* Solaris 7 fails here: ret is -1. */
18258 result |= 4;
18259 if (!mbsinit (&state))
18260 result |= 8;
18261 }
18262 return result;
18263 }
18264 _ACEOF
18265 if ac_fn_c_try_run "$LINENO"; then :
18266 gl_cv_func_mbrtowc_null_arg1=yes
18267 else
18268 gl_cv_func_mbrtowc_null_arg1=no
18269 fi
18270 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18271 conftest.$ac_objext conftest.beam conftest.$ac_ext
18272 fi
18273
18274 fi
18275
18276 fi
18277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
18278 $as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; }
18279
18280
18281
18282
18283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
18284 $as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
18285 if test "${gl_cv_func_mbrtowc_null_arg2+set}" = set; then :
18286 $as_echo_n "(cached) " >&6
18287 else
18288
18289 case "$host_os" in
18290 # Guess no on OSF/1.
18291 osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
18292 # Guess yes otherwise.
18293 *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
18294 esac
18295 if test $LOCALE_FR_UTF8 != none; then
18296 if test "$cross_compiling" = yes; then :
18297 :
18298 else
18299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18300 /* end confdefs.h. */
18301
18302 #include <locale.h>
18303 #include <string.h>
18304 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18305 <wchar.h>.
18306 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18307 included before <wchar.h>. */
18308 #include <stddef.h>
18309 #include <stdio.h>
18310 #include <time.h>
18311 #include <wchar.h>
18312 int main ()
18313 {
18314 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
18315 {
18316 mbstate_t state;
18317 wchar_t wc;
18318 int ret;
18319
18320 memset (&state, '\0', sizeof (mbstate_t));
18321 wc = (wchar_t) 0xBADFACE;
18322 mbrtowc (&wc, NULL, 5, &state);
18323 /* Check that wc was not modified. */
18324 if (wc != (wchar_t) 0xBADFACE)
18325 return 1;
18326 }
18327 return 0;
18328 }
18329 _ACEOF
18330 if ac_fn_c_try_run "$LINENO"; then :
18331 gl_cv_func_mbrtowc_null_arg2=yes
18332 else
18333 gl_cv_func_mbrtowc_null_arg2=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 fi
18340
18341 fi
18342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
18343 $as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; }
18344
18345
18346
18347
18348
18349
18350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
18351 $as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
18352 if test "${gl_cv_func_mbrtowc_retval+set}" = set; then :
18353 $as_echo_n "(cached) " >&6
18354 else
18355
18356 case "$host_os" in
18357 # Guess no on HP-UX, Solaris, native Windows.
18358 hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
18359 # Guess yes otherwise.
18360 *) gl_cv_func_mbrtowc_retval="guessing yes" ;;
18361 esac
18362 if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
18363 || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
18364 if test "$cross_compiling" = yes; then :
18365 :
18366 else
18367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18368 /* end confdefs.h. */
18369
18370 #include <locale.h>
18371 #include <string.h>
18372 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18373 <wchar.h>.
18374 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18375 included before <wchar.h>. */
18376 #include <stddef.h>
18377 #include <stdio.h>
18378 #include <time.h>
18379 #include <wchar.h>
18380 int main ()
18381 {
18382 int result = 0;
18383 int found_some_locale = 0;
18384 /* This fails on Solaris. */
18385 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
18386 {
18387 char input[] = "B\303\274\303\237er"; /* "Büßer" */
18388 mbstate_t state;
18389 wchar_t wc;
18390
18391 memset (&state, '\0', sizeof (mbstate_t));
18392 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
18393 {
18394 input[1] = '\0';
18395 if (mbrtowc (&wc, input + 2, 5, &state) != 1)
18396 result |= 1;
18397 }
18398 found_some_locale = 1;
18399 }
18400 /* This fails on HP-UX 11.11. */
18401 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
18402 {
18403 char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
18404 mbstate_t state;
18405 wchar_t wc;
18406
18407 memset (&state, '\0', sizeof (mbstate_t));
18408 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
18409 {
18410 input[1] = '\0';
18411 if (mbrtowc (&wc, input + 2, 5, &state) != 2)
18412 result |= 2;
18413 }
18414 found_some_locale = 1;
18415 }
18416 /* This fails on native Windows. */
18417 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
18418 {
18419 char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
18420 mbstate_t state;
18421 wchar_t wc;
18422
18423 memset (&state, '\0', sizeof (mbstate_t));
18424 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
18425 {
18426 input[3] = '\0';
18427 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
18428 result |= 4;
18429 }
18430 found_some_locale = 1;
18431 }
18432 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
18433 {
18434 char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
18435 mbstate_t state;
18436 wchar_t wc;
18437
18438 memset (&state, '\0', sizeof (mbstate_t));
18439 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
18440 {
18441 input[3] = '\0';
18442 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
18443 result |= 8;
18444 }
18445 found_some_locale = 1;
18446 }
18447 if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
18448 {
18449 char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
18450 mbstate_t state;
18451 wchar_t wc;
18452
18453 memset (&state, '\0', sizeof (mbstate_t));
18454 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
18455 {
18456 input[3] = '\0';
18457 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
18458 result |= 16;
18459 }
18460 found_some_locale = 1;
18461 }
18462 return (found_some_locale ? result : 77);
18463 }
18464 _ACEOF
18465 if ac_fn_c_try_run "$LINENO"; then :
18466 gl_cv_func_mbrtowc_retval=yes
18467 else
18468 if test $? != 77; then
18469 gl_cv_func_mbrtowc_retval=no
18470 fi
18471
18472 fi
18473 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18474 conftest.$ac_objext conftest.beam conftest.$ac_ext
18475 fi
18476
18477 fi
18478
18479 fi
18480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
18481 $as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
18482
18483
18484
18485
18486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
18487 $as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
18488 if test "${gl_cv_func_mbrtowc_nul_retval+set}" = set; then :
18489 $as_echo_n "(cached) " >&6
18490 else
18491
18492 case "$host_os" in
18493 # Guess no on Solaris 8 and 9.
18494 solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
18495 # Guess yes otherwise.
18496 *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
18497 esac
18498 if test $LOCALE_ZH_CN != none; then
18499 if test "$cross_compiling" = yes; then :
18500 :
18501 else
18502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18503 /* end confdefs.h. */
18504
18505 #include <locale.h>
18506 #include <string.h>
18507 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18508 <wchar.h>.
18509 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18510 included before <wchar.h>. */
18511 #include <stddef.h>
18512 #include <stdio.h>
18513 #include <time.h>
18514 #include <wchar.h>
18515 int main ()
18516 {
18517 /* This fails on Solaris 8 and 9. */
18518 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
18519 {
18520 mbstate_t state;
18521 wchar_t wc;
18522
18523 memset (&state, '\0', sizeof (mbstate_t));
18524 if (mbrtowc (&wc, "", 1, &state) != 0)
18525 return 1;
18526 }
18527 return 0;
18528 }
18529 _ACEOF
18530 if ac_fn_c_try_run "$LINENO"; then :
18531 gl_cv_func_mbrtowc_nul_retval=yes
18532 else
18533 gl_cv_func_mbrtowc_nul_retval=no
18534 fi
18535 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18536 conftest.$ac_objext conftest.beam conftest.$ac_ext
18537 fi
18538
18539 fi
18540
18541 fi
18542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
18543 $as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
18544
18545
18546
18547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5
18548 $as_echo_n "checking whether mbrtowc works on empty input... " >&6; }
18549 if test "${gl_cv_func_mbrtowc_empty_input+set}" = set; then :
18550 $as_echo_n "(cached) " >&6
18551 else
18552
18553 case "$host_os" in
18554 # Guess no on AIX and glibc systems.
18555 aix* | *-gnu*)
18556 gl_cv_func_mbrtowc_empty_input="guessing no" ;;
18557 *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
18558 esac
18559 if test "$cross_compiling" = yes; then :
18560 :
18561 else
18562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18563 /* end confdefs.h. */
18564
18565 #include <wchar.h>
18566 static wchar_t wc;
18567 static mbstate_t mbs;
18568 int
18569 main (void)
18570 {
18571 return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
18572 }
18573 _ACEOF
18574 if ac_fn_c_try_run "$LINENO"; then :
18575 gl_cv_func_mbrtowc_empty_input=yes
18576 else
18577 gl_cv_func_mbrtowc_empty_input=no
18578 fi
18579 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18580 conftest.$ac_objext conftest.beam conftest.$ac_ext
18581 fi
18582
18583
18584 fi
18585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5
18586 $as_echo "$gl_cv_func_mbrtowc_empty_input" >&6; }
18587
18588
18589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
18590 $as_echo_n "checking whether the C locale is free of encoding errors... " >&6; }
18591 if test "${gl_cv_C_locale_sans_EILSEQ+set}" = set; then :
18592 $as_echo_n "(cached) " >&6
18593 else
18594
18595 gl_cv_C_locale_sans_EILSEQ="guessing no"
18596
18597 if test "$cross_compiling" = yes; then :
18598 :
18599 else
18600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18601 /* end confdefs.h. */
18602 #include <limits.h>
18603 #include <locale.h>
18604 #include <wchar.h>
18605
18606 int
18607 main ()
18608 {
18609
18610 int i;
18611 char *locale = setlocale (LC_ALL, "C");
18612 if (! locale)
18613 return 1;
18614 for (i = CHAR_MIN; i <= CHAR_MAX; i++)
18615 {
18616 char c = i;
18617 wchar_t wc;
18618 mbstate_t mbs = { 0, };
18619 size_t ss = mbrtowc (&wc, &c, 1, &mbs);
18620 if (1 < ss)
18621 return 1;
18622 }
18623 return 0;
18624
18625 ;
18626 return 0;
18627 }
18628 _ACEOF
18629 if ac_fn_c_try_run "$LINENO"; then :
18630 gl_cv_C_locale_sans_EILSEQ=yes
18631 else
18632 gl_cv_C_locale_sans_EILSEQ=no
18633 fi
18634 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18635 conftest.$ac_objext conftest.beam conftest.$ac_ext
18636 fi
18637
18638 fi
18639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_C_locale_sans_EILSEQ" >&5
18640 $as_echo "$gl_cv_C_locale_sans_EILSEQ" >&6; }
18641
18642 case "$gl_cv_func_mbrtowc_null_arg1" in
18643 *yes) ;;
18644 *)
18645 $as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
18646
18647 REPLACE_MBRTOWC=1
18648 ;;
18649 esac
18650 case "$gl_cv_func_mbrtowc_null_arg2" in
18651 *yes) ;;
18652 *)
18653 $as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
18654
18655 REPLACE_MBRTOWC=1
18656 ;;
18657 esac
18658 case "$gl_cv_func_mbrtowc_retval" in
18659 *yes) ;;
18660 *)
18661 $as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
18662
18663 REPLACE_MBRTOWC=1
18664 ;;
18665 esac
18666 case "$gl_cv_func_mbrtowc_nul_retval" in
18667 *yes) ;;
18668 *)
18669 $as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
18670
18671 REPLACE_MBRTOWC=1
18672 ;;
18673 esac
18674 case "$gl_cv_func_mbrtowc_empty_input" in
18675 *yes) ;;
18676 *)
18677 $as_echo "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h
18678
18679 REPLACE_MBRTOWC=1
18680 ;;
18681 esac
18682 case $gl_cv_C_locale_sans_EILSEQ in
18683 *yes) ;;
18684 *)
18685 $as_echo "#define C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
18686
18687 REPLACE_MBRTOWC=1
18688 ;;
18689 esac
18690 fi
18691 fi
18692
18693 if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
18694
18695
18696
18697
18698
18699
18700
18701
18702 gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
18703
18704
18705 :
18706
18707 fi
18708
18709
18710
18711
18712
18713 GNULIB_MBRTOWC=1
18714
18715
18716
18717
18718
18719 $as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
18720
18721
18722
18723
18724
18725
18726
18727
18728
18729
18730
18731
18732
18733
18734 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
18735
18736
18737
18738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
18739 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
18740 if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then :
18741 $as_echo_n "(cached) " >&6
18742 else
18743
18744 case "$host_os" in
18745 # Guess no on AIX and OSF/1.
18746 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
18747 # Guess yes otherwise.
18748 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
18749 esac
18750 if test $LOCALE_JA != none; then
18751 if test "$cross_compiling" = yes; then :
18752 :
18753 else
18754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18755 /* end confdefs.h. */
18756
18757 #include <locale.h>
18758 #include <string.h>
18759 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18760 <wchar.h>.
18761 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18762 included before <wchar.h>. */
18763 #include <stddef.h>
18764 #include <stdio.h>
18765 #include <time.h>
18766 #include <wchar.h>
18767 int main ()
18768 {
18769 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
18770 {
18771 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
18772 mbstate_t state;
18773 wchar_t wc;
18774
18775 memset (&state, '\0', sizeof (mbstate_t));
18776 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
18777 if (mbsinit (&state))
18778 return 1;
18779 }
18780 return 0;
18781 }
18782 _ACEOF
18783 if ac_fn_c_try_run "$LINENO"; then :
18784 gl_cv_func_mbrtowc_incomplete_state=yes
18785 else
18786 gl_cv_func_mbrtowc_incomplete_state=no
18787 fi
18788 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18789 conftest.$ac_objext conftest.beam conftest.$ac_ext
18790 fi
18791
18792 fi
18793
18794 fi
18795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
18796 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
18797
18798
18799
18800
18801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
18802 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
18803 if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then :
18804 $as_echo_n "(cached) " >&6
18805 else
18806
18807 case "$host_os" in
18808 # Guess no on Solaris 8.
18809 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
18810 # Guess yes otherwise.
18811 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
18812 esac
18813 if test $LOCALE_ZH_CN != none; then
18814 if test "$cross_compiling" = yes; then :
18815 :
18816 else
18817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18818 /* end confdefs.h. */
18819
18820 #include <locale.h>
18821 #include <stdlib.h>
18822 #include <string.h>
18823 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18824 <wchar.h>.
18825 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18826 included before <wchar.h>. */
18827 #include <stddef.h>
18828 #include <stdio.h>
18829 #include <time.h>
18830 #include <wchar.h>
18831 int main ()
18832 {
18833 /* This fails on Solaris 8:
18834 mbrtowc returns 2, and sets wc to 0x00F0.
18835 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
18836 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
18837 {
18838 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
18839 mbstate_t state;
18840 wchar_t wc;
18841
18842 memset (&state, '\0', sizeof (mbstate_t));
18843 if (mbrtowc (&wc, input + 3, 6, &state) != 4
18844 && mbtowc (&wc, input + 3, 6) == 4)
18845 return 1;
18846 }
18847 return 0;
18848 }
18849 _ACEOF
18850 if ac_fn_c_try_run "$LINENO"; then :
18851 gl_cv_func_mbrtowc_sanitycheck=yes
18852 else
18853 gl_cv_func_mbrtowc_sanitycheck=no
18854 fi
18855 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18856 conftest.$ac_objext conftest.beam conftest.$ac_ext
18857 fi
18858
18859 fi
18860
18861 fi
18862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
18863 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
18864
18865 REPLACE_MBSTATE_T=0
18866 case "$gl_cv_func_mbrtowc_incomplete_state" in
18867 *yes) ;;
18868 *) REPLACE_MBSTATE_T=1 ;;
18869 esac
18870 case "$gl_cv_func_mbrtowc_sanitycheck" in
18871 *yes) ;;
18872 *) REPLACE_MBSTATE_T=1 ;;
18873 esac
18874 else
18875 REPLACE_MBSTATE_T=1
18876 fi
18877
18878
18879
18880 if test $ac_cv_func_mbsinit = no; then
18881 HAVE_MBSINIT=0
18882 ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
18883 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18884 <wchar.h>.
18885 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18886 included before <wchar.h>. */
18887 #include <stddef.h>
18888 #include <stdio.h>
18889 #include <time.h>
18890 #include <wchar.h>
18891
18892 "
18893 if test "x$ac_cv_have_decl_mbsinit" = x""yes; then :
18894 ac_have_decl=1
18895 else
18896 ac_have_decl=0
18897 fi
18898
18899 cat >>confdefs.h <<_ACEOF
18900 #define HAVE_DECL_MBSINIT $ac_have_decl
18901 _ACEOF
18902
18903 if test $ac_cv_have_decl_mbsinit = yes; then
18904 REPLACE_MBSINIT=1
18905 fi
18906 else
18907 if test $REPLACE_MBSTATE_T = 1; then
18908 REPLACE_MBSINIT=1
18909 else
18910 case "$host_os" in
18911 mingw*) REPLACE_MBSINIT=1 ;;
18912 esac
18913 fi
18914 fi
18915
18916 if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
18917
18918
18919
18920
18921
18922
18923
18924
18925 gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
18926
18927
18928 :
18929
18930 fi
18931
18932
18933
18934
18935
18936 GNULIB_MBSINIT=1
18937
18938
18939
18940
18941
18942 $as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
18943
18944
18945
18946
18947
18948
18949
18950
18951
18952
18953
18954
18955
18956 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
18957
18958
18959
18960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
18961 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
18962 if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then :
18963 $as_echo_n "(cached) " >&6
18964 else
18965
18966 case "$host_os" in
18967 # Guess no on AIX and OSF/1.
18968 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
18969 # Guess yes otherwise.
18970 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
18971 esac
18972 if test $LOCALE_JA != none; then
18973 if test "$cross_compiling" = yes; then :
18974 :
18975 else
18976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18977 /* end confdefs.h. */
18978
18979 #include <locale.h>
18980 #include <string.h>
18981 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18982 <wchar.h>.
18983 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18984 included before <wchar.h>. */
18985 #include <stddef.h>
18986 #include <stdio.h>
18987 #include <time.h>
18988 #include <wchar.h>
18989 int main ()
18990 {
18991 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
18992 {
18993 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
18994 mbstate_t state;
18995 wchar_t wc;
18996
18997 memset (&state, '\0', sizeof (mbstate_t));
18998 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
18999 if (mbsinit (&state))
19000 return 1;
19001 }
19002 return 0;
19003 }
19004 _ACEOF
19005 if ac_fn_c_try_run "$LINENO"; then :
19006 gl_cv_func_mbrtowc_incomplete_state=yes
19007 else
19008 gl_cv_func_mbrtowc_incomplete_state=no
19009 fi
19010 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19011 conftest.$ac_objext conftest.beam conftest.$ac_ext
19012 fi
19013
19014 fi
19015
19016 fi
19017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
19018 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
19019
19020
19021
19022
19023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
19024 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
19025 if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then :
19026 $as_echo_n "(cached) " >&6
19027 else
19028
19029 case "$host_os" in
19030 # Guess no on Solaris 8.
19031 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
19032 # Guess yes otherwise.
19033 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
19034 esac
19035 if test $LOCALE_ZH_CN != none; then
19036 if test "$cross_compiling" = yes; then :
19037 :
19038 else
19039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19040 /* end confdefs.h. */
19041
19042 #include <locale.h>
19043 #include <stdlib.h>
19044 #include <string.h>
19045 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19046 <wchar.h>.
19047 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19048 included before <wchar.h>. */
19049 #include <stddef.h>
19050 #include <stdio.h>
19051 #include <time.h>
19052 #include <wchar.h>
19053 int main ()
19054 {
19055 /* This fails on Solaris 8:
19056 mbrtowc returns 2, and sets wc to 0x00F0.
19057 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
19058 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
19059 {
19060 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
19061 mbstate_t state;
19062 wchar_t wc;
19063
19064 memset (&state, '\0', sizeof (mbstate_t));
19065 if (mbrtowc (&wc, input + 3, 6, &state) != 4
19066 && mbtowc (&wc, input + 3, 6) == 4)
19067 return 1;
19068 }
19069 return 0;
19070 }
19071 _ACEOF
19072 if ac_fn_c_try_run "$LINENO"; then :
19073 gl_cv_func_mbrtowc_sanitycheck=yes
19074 else
19075 gl_cv_func_mbrtowc_sanitycheck=no
19076 fi
19077 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19078 conftest.$ac_objext conftest.beam conftest.$ac_ext
19079 fi
19080
19081 fi
19082
19083 fi
19084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
19085 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
19086
19087 REPLACE_MBSTATE_T=0
19088 case "$gl_cv_func_mbrtowc_incomplete_state" in
19089 *yes) ;;
19090 *) REPLACE_MBSTATE_T=1 ;;
19091 esac
19092 case "$gl_cv_func_mbrtowc_sanitycheck" in
19093 *yes) ;;
19094 *) REPLACE_MBSTATE_T=1 ;;
19095 esac
19096 else
19097 REPLACE_MBSTATE_T=1
19098 fi
19099
19100
19101
19102 if test $ac_cv_func_mbsrtowcs = no; then
19103 HAVE_MBSRTOWCS=0
19104 ac_fn_c_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" "
19105 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19106 <wchar.h>.
19107 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19108 included before <wchar.h>. */
19109 #include <stddef.h>
19110 #include <stdio.h>
19111 #include <time.h>
19112 #include <wchar.h>
19113
19114 "
19115 if test "x$ac_cv_have_decl_mbsrtowcs" = x""yes; then :
19116 ac_have_decl=1
19117 else
19118 ac_have_decl=0
19119 fi
19120
19121 cat >>confdefs.h <<_ACEOF
19122 #define HAVE_DECL_MBSRTOWCS $ac_have_decl
19123 _ACEOF
19124
19125 if test $ac_cv_have_decl_mbsrtowcs = yes; then
19126 REPLACE_MBSRTOWCS=1
19127 fi
19128 else
19129 if test $REPLACE_MBSTATE_T = 1; then
19130 REPLACE_MBSRTOWCS=1
19131 else
19132
19133
19134
19135
19136
19137
19138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5
19139 $as_echo_n "checking whether mbsrtowcs works... " >&6; }
19140 if test "${gl_cv_func_mbsrtowcs_works+set}" = set; then :
19141 $as_echo_n "(cached) " >&6
19142 else
19143
19144 case "$host_os" in
19145 # Guess no on HP-UX, Solaris, mingw.
19146 hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;;
19147 # Guess yes otherwise.
19148 *) gl_cv_func_mbsrtowcs_works="guessing yes" ;;
19149 esac
19150 if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
19151 if test "$cross_compiling" = yes; then :
19152 :
19153 else
19154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19155 /* end confdefs.h. */
19156
19157 #include <locale.h>
19158 #include <string.h>
19159 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19160 <wchar.h>.
19161 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19162 included before <wchar.h>. */
19163 #include <stddef.h>
19164 #include <stdio.h>
19165 #include <time.h>
19166 #include <wchar.h>
19167 int main ()
19168 {
19169 int result = 0;
19170 /* Test whether the function supports a NULL destination argument.
19171 This fails on native Windows. */
19172 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
19173 {
19174 const char input[] = "\337er";
19175 const char *src = input;
19176 mbstate_t state;
19177
19178 memset (&state, '\0', sizeof (mbstate_t));
19179 if (mbsrtowcs (NULL, &src, 1, &state) != 3
19180 || src != input)
19181 result |= 1;
19182 }
19183 /* Test whether the function works when started with a conversion state
19184 in non-initial state. This fails on HP-UX 11.11 and Solaris 10. */
19185 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
19186 {
19187 const char input[] = "B\303\274\303\237er";
19188 mbstate_t state;
19189
19190 memset (&state, '\0', sizeof (mbstate_t));
19191 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
19192 if (!mbsinit (&state))
19193 {
19194 const char *src = input + 2;
19195 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
19196 result |= 2;
19197 }
19198 }
19199 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
19200 {
19201 const char input[] = "<\306\374\313\334\270\354>";
19202 mbstate_t state;
19203
19204 memset (&state, '\0', sizeof (mbstate_t));
19205 if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2))
19206 if (!mbsinit (&state))
19207 {
19208 const char *src = input + 4;
19209 if (mbsrtowcs (NULL, &src, 10, &state) != 3)
19210 result |= 4;
19211 }
19212 }
19213 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
19214 {
19215 const char input[] = "B\250\271\201\060\211\070er";
19216 mbstate_t state;
19217
19218 memset (&state, '\0', sizeof (mbstate_t));
19219 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
19220 if (!mbsinit (&state))
19221 {
19222 const char *src = input + 2;
19223 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
19224 result |= 8;
19225 }
19226 }
19227 return result;
19228 }
19229 _ACEOF
19230 if ac_fn_c_try_run "$LINENO"; then :
19231 gl_cv_func_mbsrtowcs_works=yes
19232 else
19233 gl_cv_func_mbsrtowcs_works=no
19234 fi
19235 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19236 conftest.$ac_objext conftest.beam conftest.$ac_ext
19237 fi
19238
19239 fi
19240
19241 fi
19242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5
19243 $as_echo "$gl_cv_func_mbsrtowcs_works" >&6; }
19244
19245 case "$gl_cv_func_mbsrtowcs_works" in
19246 *yes) ;;
19247 *) REPLACE_MBSRTOWCS=1 ;;
19248 esac
19249 fi
19250 fi
19251
19252 if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
19253
19254
19255
19256
19257
19258
19259
19260
19261 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs.$ac_objext"
19262
19263
19264
19265
19266
19267
19268
19269
19270
19271 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext"
19272
19273
19274 :
19275
19276 fi
19277
19278
19279
19280
19281
19282 GNULIB_MBSRTOWCS=1
19283
19284
19285
19286
19287
19288 $as_echo "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h
19289
19290
19291
19292
19293 if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
19294
19295
19296
19297
19298
19299
19300
19301
19302 gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
19303
19304
19305 for ac_header in bp-sym.h
19306 do :
19307 ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
19308 if test "x$ac_cv_header_bp_sym_h" = x""yes; then :
19309 cat >>confdefs.h <<_ACEOF
19310 #define HAVE_BP_SYM_H 1
19311 _ACEOF
19312
19313 fi
19314
19315 done
19316
19317
19318 fi
19319
19320
19321
19322
19323
19324 GNULIB_MEMCHR=1
19325
19326
19327
19328
19329
19330 $as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
19331
19332
19333
19334
19335
19336 if test $HAVE_DECL_MEMMEM = 1 && test $REPLACE_MEMMEM = 0; then
19337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works in linear time" >&5
19338 $as_echo_n "checking whether memmem works in linear time... " >&6; }
19339 if test "${gl_cv_func_memmem_works_fast+set}" = set; then :
19340 $as_echo_n "(cached) " >&6
19341 else
19342 if test "$cross_compiling" = yes; then :
19343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19344 /* end confdefs.h. */
19345
19346 #include <features.h>
19347 #ifdef __GNU_LIBRARY__
19348 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2)) \
19349 && !defined __UCLIBC__
19350 Lucky user
19351 #endif
19352 #endif
19353 #ifdef __CYGWIN__
19354 #include <cygwin/version.h>
19355 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 0)
19356 Lucky user
19357 #endif
19358 #endif
19359
19360 _ACEOF
19361 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19362 $EGREP "Lucky user" >/dev/null 2>&1; then :
19363 gl_cv_func_memmem_works_fast="guessing yes"
19364 else
19365 gl_cv_func_memmem_works_fast="guessing no"
19366 fi
19367 rm -f conftest*
19368
19369
19370 else
19371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19372 /* end confdefs.h. */
19373
19374 #include <signal.h> /* for signal */
19375 #include <string.h> /* for memmem */
19376 #include <stdlib.h> /* for malloc */
19377 #include <unistd.h> /* for alarm */
19378 static void quit (int sig) { _exit (sig + 128); }
19379
19380 int
19381 main ()
19382 {
19383
19384 int result = 0;
19385 size_t m = 1000000;
19386 char *haystack = (char *) malloc (2 * m + 1);
19387 char *needle = (char *) malloc (m + 1);
19388 /* Failure to compile this test due to missing alarm is okay,
19389 since all such platforms (mingw) also lack memmem. */
19390 signal (SIGALRM, quit);
19391 alarm (5);
19392 /* Check for quadratic performance. */
19393 if (haystack && needle)
19394 {
19395 memset (haystack, 'A', 2 * m);
19396 haystack[2 * m] = 'B';
19397 memset (needle, 'A', m);
19398 needle[m] = 'B';
19399 if (!memmem (haystack, 2 * m + 1, needle, m + 1))
19400 result |= 1;
19401 }
19402 return result;
19403
19404 ;
19405 return 0;
19406 }
19407 _ACEOF
19408 if ac_fn_c_try_run "$LINENO"; then :
19409 gl_cv_func_memmem_works_fast=yes
19410 else
19411 gl_cv_func_memmem_works_fast=no
19412 fi
19413 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19414 conftest.$ac_objext conftest.beam conftest.$ac_ext
19415 fi
19416
19417
19418 fi
19419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_fast" >&5
19420 $as_echo "$gl_cv_func_memmem_works_fast" >&6; }
19421 case "$gl_cv_func_memmem_works_fast" in
19422 *yes) ;;
19423 *)
19424 REPLACE_MEMMEM=1
19425 ;;
19426 esac
19427 fi
19428
19429 if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
19430
19431
19432
19433
19434
19435
19436
19437
19438 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
19439
19440 fi
19441
19442
19443
19444
19445 for ac_func in memmem
19446 do :
19447 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
19448 if test "x$ac_cv_func_memmem" = x""yes; then :
19449 cat >>confdefs.h <<_ACEOF
19450 #define HAVE_MEMMEM 1
19451 _ACEOF
19452
19453 fi
19454 done
19455
19456 if test $ac_cv_func_memmem = yes; then
19457 HAVE_MEMMEM=1
19458 else
19459 HAVE_MEMMEM=0
19460 fi
19461
19462 if test $ac_cv_have_decl_memmem = no; then
19463 HAVE_DECL_MEMMEM=0
19464 else
19465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
19466 $as_echo_n "checking whether memmem works... " >&6; }
19467 if test "${gl_cv_func_memmem_works_always+set}" = set; then :
19468 $as_echo_n "(cached) " >&6
19469 else
19470 if test "$cross_compiling" = yes; then :
19471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19472 /* end confdefs.h. */
19473
19474 #ifdef __GNU_LIBRARY__
19475 #include <features.h>
19476 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
19477 || __GLIBC_MINOR__ > 12)) \
19478 || (__GLIBC__ > 2)) \
19479 || defined __UCLIBC__
19480 Lucky user
19481 #endif
19482 #elif defined __CYGWIN__
19483 #include <cygwin/version.h>
19484 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
19485 Lucky user
19486 #endif
19487 #else
19488 Lucky user
19489 #endif
19490
19491 _ACEOF
19492 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19493 $EGREP "Lucky user" >/dev/null 2>&1; then :
19494 gl_cv_func_memmem_works_always="guessing yes"
19495 else
19496 gl_cv_func_memmem_works_always="guessing no"
19497 fi
19498 rm -f conftest*
19499
19500
19501 else
19502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19503 /* end confdefs.h. */
19504
19505 #include <string.h> /* for memmem */
19506 #define P "_EF_BF_BD"
19507 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
19508 #define NEEDLE P P P P P
19509
19510 int
19511 main ()
19512 {
19513
19514 int result = 0;
19515 if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
19516 result |= 1;
19517 /* Check for empty needle behavior. */
19518 {
19519 const char *haystack = "AAA";
19520 if (memmem (haystack, 3, NULL, 0) != haystack)
19521 result |= 2;
19522 }
19523 return result;
19524
19525 ;
19526 return 0;
19527 }
19528 _ACEOF
19529 if ac_fn_c_try_run "$LINENO"; then :
19530 gl_cv_func_memmem_works_always=yes
19531 else
19532 gl_cv_func_memmem_works_always=no
19533 fi
19534 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19535 conftest.$ac_objext conftest.beam conftest.$ac_ext
19536 fi
19537
19538
19539 fi
19540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
19541 $as_echo "$gl_cv_func_memmem_works_always" >&6; }
19542 case "$gl_cv_func_memmem_works_always" in
19543 *yes) ;;
19544 *)
19545 REPLACE_MEMMEM=1
19546 ;;
19547 esac
19548 fi
19549 :
19550
19551 if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
19552
19553
19554
19555
19556
19557
19558
19559
19560 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
19561
19562 fi
19563
19564
19565
19566
19567
19568 GNULIB_MEMMEM=1
19569
19570
19571
19572
19573
19574 $as_echo "#define GNULIB_TEST_MEMMEM 1" >>confdefs.h
19575
19576
19577
19578
19579
19580
19581
19582
19583
19584 for ac_func in mempcpy
19585 do :
19586 ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
19587 if test "x$ac_cv_func_mempcpy" = x""yes; then :
19588 cat >>confdefs.h <<_ACEOF
19589 #define HAVE_MEMPCPY 1
19590 _ACEOF
19591
19592 fi
19593 done
19594
19595 if test $ac_cv_func_mempcpy = no; then
19596 HAVE_MEMPCPY=0
19597 fi
19598
19599 if test $HAVE_MEMPCPY = 0; then
19600
19601
19602
19603
19604
19605
19606
19607
19608 gl_LIBOBJS="$gl_LIBOBJS mempcpy.$ac_objext"
19609
19610
19611 :
19612
19613 fi
19614
19615
19616
19617
19618
19619 GNULIB_MEMPCPY=1
19620
19621
19622
19623
19624
19625 $as_echo "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h
19626
19627
19628
19629
19630
19631
19632
19633
19634 if test $ac_cv_have_decl_memrchr = no; then
19635 HAVE_DECL_MEMRCHR=0
19636 fi
19637
19638 for ac_func in memrchr
19639 do :
19640 ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
19641 if test "x$ac_cv_func_memrchr" = x""yes; then :
19642 cat >>confdefs.h <<_ACEOF
19643 #define HAVE_MEMRCHR 1
19644 _ACEOF
19645
19646 fi
19647 done
19648
19649
19650 if test $ac_cv_func_memrchr = no; then
19651
19652
19653
19654
19655
19656
19657
19658
19659 gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
19660
19661 :
19662 fi
19663
19664
19665
19666
19667
19668 GNULIB_MEMRCHR=1
19669
19670
19671
19672
19673
19674 $as_echo "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h
19675
19676
19677
19678
19679 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
19680
19681
19682
19683
19684
19685
19686
19687
19688 gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
19689
19690 fi
19691
19692 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
19693
19694
19695
19696
19697
19698
19699
19700
19701 gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
19702
19703 fi
19704
19705
19706
19707 case "$host_os" in
19708 mingw* | pw*)
19709 REPLACE_OPEN=1
19710 ;;
19711 *)
19712
19713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
19714 $as_echo_n "checking whether open recognizes a trailing slash... " >&6; }
19715 if test "${gl_cv_func_open_slash+set}" = set; then :
19716 $as_echo_n "(cached) " >&6
19717 else
19718 # Assume that if we have lstat, we can also check symlinks.
19719 if test $ac_cv_func_lstat = yes; then
19720 touch conftest.tmp
19721 ln -s conftest.tmp conftest.lnk
19722 fi
19723 if test "$cross_compiling" = yes; then :
19724
19725 case "$host_os" in
19726 freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
19727 gl_cv_func_open_slash="guessing no" ;;
19728 *)
19729 gl_cv_func_open_slash="guessing yes" ;;
19730 esac
19731
19732 else
19733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19734 /* end confdefs.h. */
19735
19736 #include <fcntl.h>
19737 #if HAVE_UNISTD_H
19738 # include <unistd.h>
19739 #endif
19740 int main ()
19741 {
19742 int result = 0;
19743 #if HAVE_LSTAT
19744 if (open ("conftest.lnk/", O_RDONLY) != -1)
19745 result |= 1;
19746 #endif
19747 if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
19748 result |= 2;
19749 return result;
19750 }
19751 _ACEOF
19752 if ac_fn_c_try_run "$LINENO"; then :
19753 gl_cv_func_open_slash=yes
19754 else
19755 gl_cv_func_open_slash=no
19756 fi
19757 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19758 conftest.$ac_objext conftest.beam conftest.$ac_ext
19759 fi
19760
19761 rm -f conftest.sl conftest.tmp conftest.lnk
19762
19763 fi
19764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
19765 $as_echo "$gl_cv_func_open_slash" >&6; }
19766 case "$gl_cv_func_open_slash" in
19767 *no)
19768
19769 $as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
19770
19771 REPLACE_OPEN=1
19772 ;;
19773 esac
19774 ;;
19775 esac
19776
19777 if test $REPLACE_OPEN = 0; then
19778
19779
19780
19781 if test $ac_cv_func_fchdir = no; then
19782 HAVE_FCHDIR=0
19783 fi
19784
19785 if test $HAVE_FCHDIR = 0; then
19786 REPLACE_OPEN=1
19787 fi
19788 fi
19789
19790
19791
19792 if test $REPLACE_OPEN = 1; then
19793
19794
19795
19796
19797
19798
19799
19800
19801 gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
19802
19803
19804
19805 :
19806
19807 fi
19808
19809
19810
19811
19812
19813 GNULIB_OPEN=1
19814
19815
19816
19817
19818
19819 $as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h
19820
19821
19822
19823
19824
19825
19826
19827
19828 case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in
19829 yes+*yes)
19830 ;;
19831 yes+*)
19832 # Solaris 9 has *at functions, but uniformly mishandles trailing
19833 # slash in all of them.
19834 REPLACE_OPENAT=1
19835 ;;
19836 *)
19837 HAVE_OPENAT=0
19838 ;;
19839 esac
19840
19841 if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then
19842
19843
19844
19845
19846
19847
19848
19849
19850 gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext"
19851
19852
19853
19854 :
19855
19856 fi
19857
19858
19859 cat >>confdefs.h <<_ACEOF
19860 #define GNULIB_OPENAT 1
19861 _ACEOF
19862
19863
19864
19865
19866
19867
19868 GNULIB_OPENAT=1
19869
19870
19871
19872
19873
19874 $as_echo "#define GNULIB_TEST_OPENAT 1" >>confdefs.h
19875
19876
19877
19878
19879
19880
19881 for ac_func in opendir
19882 do :
19883 ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
19884 if test "x$ac_cv_func_opendir" = x""yes; then :
19885 cat >>confdefs.h <<_ACEOF
19886 #define HAVE_OPENDIR 1
19887 _ACEOF
19888
19889 fi
19890 done
19891
19892 if test $ac_cv_func_opendir = no; then
19893 HAVE_OPENDIR=0
19894 fi
19895
19896
19897
19898
19899 if test $ac_cv_func_fchdir = no; then
19900 HAVE_FCHDIR=0
19901 fi
19902
19903 if test $HAVE_FCHDIR = 0; then
19904 if test $HAVE_OPENDIR = 1; then
19905 REPLACE_OPENDIR=1
19906 fi
19907 fi
19908
19909 case $host_os,$HAVE_OPENDIR in
19910 os2*,1)
19911 REPLACE_OPENDIR=1;;
19912 esac
19913
19914 if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
19915
19916
19917
19918
19919
19920
19921
19922
19923 gl_LIBOBJS="$gl_LIBOBJS opendir.$ac_objext"
19924
19925 fi
19926
19927
19928
19929
19930
19931 GNULIB_OPENDIR=1
19932
19933
19934
19935
19936
19937 $as_echo "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
19938
19939
19940
19941
19942
19943
19944
19945
19946
19947
19948 for ac_func in rawmemchr
19949 do :
19950 ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
19951 if test "x$ac_cv_func_rawmemchr" = x""yes; then :
19952 cat >>confdefs.h <<_ACEOF
19953 #define HAVE_RAWMEMCHR 1
19954 _ACEOF
19955
19956 fi
19957 done
19958
19959 if test $ac_cv_func_rawmemchr = no; then
19960 HAVE_RAWMEMCHR=0
19961 fi
19962
19963 if test $HAVE_RAWMEMCHR = 0; then
19964
19965
19966
19967
19968
19969
19970
19971
19972 gl_LIBOBJS="$gl_LIBOBJS rawmemchr.$ac_objext"
19973
19974 :
19975 fi
19976
19977
19978
19979
19980
19981 GNULIB_RAWMEMCHR=1
19982
19983
19984
19985
19986
19987 $as_echo "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
19988
19989
19990
19991
19992
19993
19994 for ac_func in readdir
19995 do :
19996 ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir"
19997 if test "x$ac_cv_func_readdir" = x""yes; then :
19998 cat >>confdefs.h <<_ACEOF
19999 #define HAVE_READDIR 1
20000 _ACEOF
20001
20002 fi
20003 done
20004
20005 if test $ac_cv_func_readdir = no; then
20006 HAVE_READDIR=0
20007 fi
20008
20009 if test $HAVE_READDIR = 0; then
20010
20011
20012
20013
20014
20015
20016
20017
20018 gl_LIBOBJS="$gl_LIBOBJS readdir.$ac_objext"
20019
20020 fi
20021
20022
20023
20024
20025
20026 GNULIB_READDIR=1
20027
20028
20029
20030
20031
20032 $as_echo "#define GNULIB_TEST_READDIR 1" >>confdefs.h
20033
20034
20035
20036
20037
20038
20039 if test $ac_cv_func_readlink = no; then
20040 HAVE_READLINK=0
20041 else
20042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
20043 $as_echo_n "checking whether readlink signature is correct... " >&6; }
20044 if test "${gl_cv_decl_readlink_works+set}" = set; then :
20045 $as_echo_n "(cached) " >&6
20046 else
20047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20048 /* end confdefs.h. */
20049 #include <unistd.h>
20050 /* Cause compilation failure if original declaration has wrong type. */
20051 ssize_t readlink (const char *, char *, size_t);
20052 int
20053 main ()
20054 {
20055
20056 ;
20057 return 0;
20058 }
20059 _ACEOF
20060 if ac_fn_c_try_compile "$LINENO"; then :
20061 gl_cv_decl_readlink_works=yes
20062 else
20063 gl_cv_decl_readlink_works=no
20064 fi
20065 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20066 fi
20067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
20068 $as_echo "$gl_cv_decl_readlink_works" >&6; }
20069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
20070 $as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
20071 if test "${gl_cv_func_readlink_works+set}" = set; then :
20072 $as_echo_n "(cached) " >&6
20073 else
20074 # We have readlink, so assume ln -s works.
20075 ln -s conftest.no-such conftest.link
20076 ln -s conftest.link conftest.lnk2
20077 if test "$cross_compiling" = yes; then :
20078 case "$host_os" in
20079 # Guess yes on glibc systems.
20080 *-gnu*) gl_cv_func_readlink_works="guessing yes" ;;
20081 # If we don't know, assume the worst.
20082 *) gl_cv_func_readlink_works="guessing no" ;;
20083 esac
20084
20085 else
20086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20087 /* end confdefs.h. */
20088 #include <unistd.h>
20089
20090 int
20091 main ()
20092 {
20093 char buf[20];
20094 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
20095 ;
20096 return 0;
20097 }
20098 _ACEOF
20099 if ac_fn_c_try_run "$LINENO"; then :
20100 gl_cv_func_readlink_works=yes
20101 else
20102 gl_cv_func_readlink_works=no
20103 fi
20104 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20105 conftest.$ac_objext conftest.beam conftest.$ac_ext
20106 fi
20107
20108 rm -f conftest.link conftest.lnk2
20109 fi
20110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
20111 $as_echo "$gl_cv_func_readlink_works" >&6; }
20112 case "$gl_cv_func_readlink_works" in
20113 *yes)
20114 if test "$gl_cv_decl_readlink_works" != yes; then
20115 REPLACE_READLINK=1
20116 fi
20117 ;;
20118 *)
20119
20120 $as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
20121
20122 REPLACE_READLINK=1
20123 ;;
20124 esac
20125 fi
20126
20127 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
20128
20129
20130
20131
20132
20133
20134
20135
20136 gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
20137
20138
20139 :
20140
20141 fi
20142
20143
20144
20145
20146
20147 GNULIB_READLINK=1
20148
20149
20150
20151
20152
20153 $as_echo "#define GNULIB_TEST_READLINK 1" >>confdefs.h
20154
20155
20156
20157
20158
20159
20160 if test $gl_cv_func_malloc_posix = yes; then
20161
20162 $as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h
20163
20164 else
20165 REPLACE_REALLOC=1
20166 fi
20167
20168 if test $REPLACE_REALLOC = 1; then
20169
20170
20171
20172
20173
20174
20175
20176
20177 gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
20178
20179 fi
20180
20181
20182
20183
20184
20185 GNULIB_REALLOC_POSIX=1
20186
20187
20188
20189
20190
20191 $as_echo "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
20192
20193
20194
20195
20196
20197
20198
20199
20200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on destination" >&5
20201 $as_echo_n "checking whether rename honors trailing slash on destination... " >&6; }
20202 if test "${gl_cv_func_rename_slash_dst_works+set}" = set; then :
20203 $as_echo_n "(cached) " >&6
20204 else
20205 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
20206 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
20207 as_fn_error "cannot create temporary files" "$LINENO" 5
20208 # Assume that if we have lstat, we can also check symlinks.
20209 if test $ac_cv_func_lstat = yes; then
20210 ln -s conftest.f conftest.lnk
20211 fi
20212 if test "$cross_compiling" = yes; then :
20213 case "$host_os" in
20214 # Guess yes on glibc systems.
20215 *-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
20216 # If we don't know, assume the worst.
20217 *) gl_cv_func_rename_slash_dst_works="guessing no" ;;
20218 esac
20219
20220 else
20221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20222 /* end confdefs.h. */
20223
20224 # include <stdio.h>
20225 # include <stdlib.h>
20226
20227 int
20228 main ()
20229 {
20230 int result = 0;
20231 if (rename ("conftest.f1", "conftest.f2/") == 0)
20232 result |= 1;
20233 if (rename ("conftest.d1", "conftest.d2/") != 0)
20234 result |= 2;
20235 #if HAVE_LSTAT
20236 if (rename ("conftest.f", "conftest.lnk/") == 0)
20237 result |= 4;
20238 #endif
20239 return result;
20240
20241 ;
20242 return 0;
20243 }
20244 _ACEOF
20245 if ac_fn_c_try_run "$LINENO"; then :
20246 gl_cv_func_rename_slash_dst_works=yes
20247 else
20248 gl_cv_func_rename_slash_dst_works=no
20249 fi
20250 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20251 conftest.$ac_objext conftest.beam conftest.$ac_ext
20252 fi
20253
20254 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
20255
20256 fi
20257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_dst_works" >&5
20258 $as_echo "$gl_cv_func_rename_slash_dst_works" >&6; }
20259 case "$gl_cv_func_rename_slash_dst_works" in
20260 *yes) ;;
20261 *)
20262 REPLACE_RENAME=1
20263
20264 $as_echo "#define RENAME_TRAILING_SLASH_DEST_BUG 1" >>confdefs.h
20265
20266 ;;
20267 esac
20268
20269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on source" >&5
20270 $as_echo_n "checking whether rename honors trailing slash on source... " >&6; }
20271 if test "${gl_cv_func_rename_slash_src_works+set}" = set; then :
20272 $as_echo_n "(cached) " >&6
20273 else
20274 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
20275 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
20276 as_fn_error "cannot create temporary files" "$LINENO" 5
20277 # Assume that if we have lstat, we can also check symlinks.
20278 if test $ac_cv_func_lstat = yes; then
20279 ln -s conftest.f conftest.lnk
20280 fi
20281 if test "$cross_compiling" = yes; then :
20282 case "$host_os" in
20283 # Guess yes on glibc systems.
20284 *-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
20285 # If we don't know, assume the worst.
20286 *) gl_cv_func_rename_slash_src_works="guessing no" ;;
20287 esac
20288
20289 else
20290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20291 /* end confdefs.h. */
20292
20293 # include <stdio.h>
20294 # include <stdlib.h>
20295
20296 int
20297 main ()
20298 {
20299 int result = 0;
20300 if (rename ("conftest.f1/", "conftest.d3") == 0)
20301 result |= 1;
20302 if (rename ("conftest.d1/", "conftest.d2") != 0)
20303 result |= 2;
20304 #if HAVE_LSTAT
20305 if (rename ("conftest.lnk/", "conftest.f") == 0)
20306 result |= 4;
20307 #endif
20308 return result;
20309
20310 ;
20311 return 0;
20312 }
20313 _ACEOF
20314 if ac_fn_c_try_run "$LINENO"; then :
20315 gl_cv_func_rename_slash_src_works=yes
20316 else
20317 gl_cv_func_rename_slash_src_works=no
20318 fi
20319 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20320 conftest.$ac_objext conftest.beam conftest.$ac_ext
20321 fi
20322
20323 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
20324
20325 fi
20326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_src_works" >&5
20327 $as_echo "$gl_cv_func_rename_slash_src_works" >&6; }
20328 case "$gl_cv_func_rename_slash_src_works" in
20329 *yes) ;;
20330 *)
20331 REPLACE_RENAME=1
20332
20333 $as_echo "#define RENAME_TRAILING_SLASH_SOURCE_BUG 1" >>confdefs.h
20334
20335 ;;
20336 esac
20337
20338
20339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5
20340 $as_echo_n "checking whether rename manages hard links correctly... " >&6; }
20341 if test "${gl_cv_func_rename_link_works+set}" = set; then :
20342 $as_echo_n "(cached) " >&6
20343 else
20344 if test $ac_cv_func_link = yes; then
20345 rm -rf conftest.f conftest.f1
20346 if touch conftest.f && ln conftest.f conftest.f1 &&
20347 set x `ls -i conftest.f conftest.f1` && test "" = ""; then
20348 if test "$cross_compiling" = yes; then :
20349 case "$host_os" in
20350 # Guess yes on glibc systems.
20351 *-gnu*) gl_cv_func_rename_link_works="guessing yes" ;;
20352 # If we don't know, assume the worst.
20353 *) gl_cv_func_rename_link_works="guessing no" ;;
20354 esac
20355
20356 else
20357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20358 /* end confdefs.h. */
20359
20360 # include <stdio.h>
20361 # include <stdlib.h>
20362 # include <unistd.h>
20363
20364 int
20365 main ()
20366 {
20367 int result = 0;
20368 if (rename ("conftest.f", "conftest.f1"))
20369 result |= 1;
20370 if (unlink ("conftest.f1"))
20371 result |= 2;
20372 if (rename ("conftest.f", "conftest.f"))
20373 result |= 4;
20374 if (rename ("conftest.f1", "conftest.f1") == 0)
20375 result |= 8;
20376 return result;
20377
20378 ;
20379 return 0;
20380 }
20381 _ACEOF
20382 if ac_fn_c_try_run "$LINENO"; then :
20383 gl_cv_func_rename_link_works=yes
20384 else
20385 gl_cv_func_rename_link_works=no
20386 fi
20387 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20388 conftest.$ac_objext conftest.beam conftest.$ac_ext
20389 fi
20390
20391 else
20392 gl_cv_func_rename_link_works="guessing no"
20393 fi
20394 rm -rf conftest.f conftest.f1
20395 else
20396 gl_cv_func_rename_link_works=yes
20397 fi
20398
20399 fi
20400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_link_works" >&5
20401 $as_echo "$gl_cv_func_rename_link_works" >&6; }
20402 case "$gl_cv_func_rename_link_works" in
20403 *yes) ;;
20404 *)
20405 REPLACE_RENAME=1
20406
20407 $as_echo "#define RENAME_HARD_LINK_BUG 1" >>confdefs.h
20408
20409 ;;
20410 esac
20411
20412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages existing destinations correctly" >&5
20413 $as_echo_n "checking whether rename manages existing destinations correctly... " >&6; }
20414 if test "${gl_cv_func_rename_dest_works+set}" = set; then :
20415 $as_echo_n "(cached) " >&6
20416 else
20417 rm -rf conftest.f conftest.d1 conftest.d2
20418 touch conftest.f && mkdir conftest.d1 conftest.d2 ||
20419 as_fn_error "cannot create temporary files" "$LINENO" 5
20420 if test "$cross_compiling" = yes; then :
20421 case "$host_os" in
20422 # Guess yes on glibc systems.
20423 *-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;;
20424 # If we don't know, assume the worst.
20425 *) gl_cv_func_rename_dest_works="guessing no" ;;
20426 esac
20427
20428 else
20429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20430 /* end confdefs.h. */
20431
20432 # include <stdio.h>
20433 # include <stdlib.h>
20434
20435 int
20436 main ()
20437 {
20438 int result = 0;
20439 if (rename ("conftest.d1", "conftest.d2") != 0)
20440 result |= 1;
20441 if (rename ("conftest.d2", "conftest.f") == 0)
20442 result |= 2;
20443 return result;
20444
20445 ;
20446 return 0;
20447 }
20448 _ACEOF
20449 if ac_fn_c_try_run "$LINENO"; then :
20450 gl_cv_func_rename_dest_works=yes
20451 else
20452 gl_cv_func_rename_dest_works=no
20453 fi
20454 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20455 conftest.$ac_objext conftest.beam conftest.$ac_ext
20456 fi
20457
20458 rm -rf conftest.f conftest.d1 conftest.d2
20459
20460 fi
20461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_dest_works" >&5
20462 $as_echo "$gl_cv_func_rename_dest_works" >&6; }
20463 case "$gl_cv_func_rename_dest_works" in
20464 *yes) ;;
20465 *)
20466 REPLACE_RENAME=1
20467
20468 $as_echo "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h
20469
20470 ;;
20471 esac
20472
20473 if test $REPLACE_RENAME = 1; then
20474
20475
20476
20477
20478
20479
20480
20481
20482 gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext"
20483
20484 fi
20485
20486
20487
20488
20489
20490 GNULIB_RENAME=1
20491
20492
20493
20494
20495
20496 $as_echo "#define GNULIB_TEST_RENAME 1" >>confdefs.h
20497
20498
20499
20500
20501
20502
20503 for ac_func in rewinddir
20504 do :
20505 ac_fn_c_check_func "$LINENO" "rewinddir" "ac_cv_func_rewinddir"
20506 if test "x$ac_cv_func_rewinddir" = x""yes; then :
20507 cat >>confdefs.h <<_ACEOF
20508 #define HAVE_REWINDDIR 1
20509 _ACEOF
20510
20511 fi
20512 done
20513
20514 if test $ac_cv_func_rewinddir = no; then
20515 HAVE_REWINDDIR=0
20516 fi
20517
20518 if test $HAVE_REWINDDIR = 0; then
20519
20520
20521
20522
20523
20524
20525
20526
20527 gl_LIBOBJS="$gl_LIBOBJS rewinddir.$ac_objext"
20528
20529 fi
20530
20531
20532
20533
20534
20535 GNULIB_REWINDDIR=1
20536
20537
20538
20539
20540
20541 $as_echo "#define GNULIB_TEST_REWINDDIR 1" >>confdefs.h
20542
20543
20544
20545
20546
20547
20548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
20549 $as_echo_n "checking whether rmdir works... " >&6; }
20550 if test "${gl_cv_func_rmdir_works+set}" = set; then :
20551 $as_echo_n "(cached) " >&6
20552 else
20553 mkdir conftest.dir
20554 touch conftest.file
20555 if test "$cross_compiling" = yes; then :
20556 case "$host_os" in
20557 # Guess yes on glibc systems.
20558 *-gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
20559 # If we don't know, assume the worst.
20560 *) gl_cv_func_rmdir_works="guessing no" ;;
20561 esac
20562
20563 else
20564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20565 /* end confdefs.h. */
20566 #include <stdio.h>
20567 #include <errno.h>
20568 #if HAVE_UNISTD_H
20569 # include <unistd.h>
20570 #else /* on Windows with MSVC */
20571 # include <direct.h>
20572 #endif
20573
20574 int
20575 main ()
20576 {
20577 int result = 0;
20578 if (!rmdir ("conftest.file/"))
20579 result |= 1;
20580 else if (errno != ENOTDIR)
20581 result |= 2;
20582 if (!rmdir ("conftest.dir/./"))
20583 result |= 4;
20584 return result;
20585
20586 ;
20587 return 0;
20588 }
20589 _ACEOF
20590 if ac_fn_c_try_run "$LINENO"; then :
20591 gl_cv_func_rmdir_works=yes
20592 else
20593 gl_cv_func_rmdir_works=no
20594 fi
20595 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20596 conftest.$ac_objext conftest.beam conftest.$ac_ext
20597 fi
20598
20599 rm -rf conftest.dir conftest.file
20600 fi
20601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
20602 $as_echo "$gl_cv_func_rmdir_works" >&6; }
20603 case "$gl_cv_func_rmdir_works" in
20604 *yes) ;;
20605 *)
20606 REPLACE_RMDIR=1
20607 ;;
20608 esac
20609
20610 if test $REPLACE_RMDIR = 1; then
20611
20612
20613
20614
20615
20616
20617
20618
20619 gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext"
20620
20621 fi
20622
20623
20624
20625
20626
20627 GNULIB_RMDIR=1
20628
20629
20630
20631
20632
20633 $as_echo "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
20634
20635
20636
20637
20638
20639
20640
20641
20642 if test $ac_cv_func_setenv = no; then
20643 HAVE_SETENV=0
20644 else
20645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
20646 $as_echo_n "checking whether setenv validates arguments... " >&6; }
20647 if test "${gl_cv_func_setenv_works+set}" = set; then :
20648 $as_echo_n "(cached) " >&6
20649 else
20650 if test "$cross_compiling" = yes; then :
20651 case "$host_os" in
20652 # Guess yes on glibc systems.
20653 *-gnu*) gl_cv_func_setenv_works="guessing yes" ;;
20654 # If we don't know, assume the worst.
20655 *) gl_cv_func_setenv_works="guessing no" ;;
20656 esac
20657
20658 else
20659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20660 /* end confdefs.h. */
20661
20662 #include <stdlib.h>
20663 #include <errno.h>
20664 #include <string.h>
20665
20666 int
20667 main ()
20668 {
20669
20670 int result = 0;
20671 {
20672 if (setenv ("", "", 0) != -1)
20673 result |= 1;
20674 else if (errno != EINVAL)
20675 result |= 2;
20676 }
20677 {
20678 if (setenv ("a", "=", 1) != 0)
20679 result |= 4;
20680 else if (strcmp (getenv ("a"), "=") != 0)
20681 result |= 8;
20682 }
20683 return result;
20684
20685 ;
20686 return 0;
20687 }
20688 _ACEOF
20689 if ac_fn_c_try_run "$LINENO"; then :
20690 gl_cv_func_setenv_works=yes
20691 else
20692 gl_cv_func_setenv_works=no
20693 fi
20694 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20695 conftest.$ac_objext conftest.beam conftest.$ac_ext
20696 fi
20697
20698 fi
20699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
20700 $as_echo "$gl_cv_func_setenv_works" >&6; }
20701 case "$gl_cv_func_setenv_works" in
20702 *yes) ;;
20703 *)
20704 REPLACE_SETENV=1
20705 ;;
20706 esac
20707 fi
20708
20709 if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
20710
20711
20712
20713
20714
20715
20716
20717
20718 gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext"
20719
20720 fi
20721
20722
20723
20724
20725
20726 GNULIB_SETENV=1
20727
20728
20729
20730
20731
20732 $as_echo "#define GNULIB_TEST_SETENV 1" >>confdefs.h
20733
20734
20735
20736
20737
20738
20739
20740
20741
20742
20743
20744
20745
20746
20747 if test $gl_cv_have_include_next = yes; then
20748 gl_cv_next_signal_h='<'signal.h'>'
20749 else
20750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
20751 $as_echo_n "checking absolute name of <signal.h>... " >&6; }
20752 if test "${gl_cv_next_signal_h+set}" = set; then :
20753 $as_echo_n "(cached) " >&6
20754 else
20755
20756
20757
20758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20759 /* end confdefs.h. */
20760 #include <signal.h>
20761 _ACEOF
20762 case "$host_os" in
20763 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20764 *) gl_absname_cpp="$ac_cpp" ;;
20765 esac
20766
20767 case "$host_os" in
20768 mingw*)
20769 gl_dirsep_regex='[/\\]'
20770 ;;
20771 *)
20772 gl_dirsep_regex='\/'
20773 ;;
20774 esac
20775 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20776 gl_header_literal_regex=`echo 'signal.h' \
20777 | sed -e "$gl_make_literal_regex_sed"`
20778 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20779 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20780 s|^/[^/]|//&|
20781 p
20782 q
20783 }'
20784
20785 gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20786 sed -n "$gl_absolute_header_sed"`
20787
20788 gl_header=$gl_cv_absolute_signal_h
20789 gl_cv_next_signal_h='"'$gl_header'"'
20790
20791
20792 fi
20793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
20794 $as_echo "$gl_cv_next_signal_h" >&6; }
20795 fi
20796 NEXT_SIGNAL_H=$gl_cv_next_signal_h
20797
20798 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20799 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20800 gl_next_as_first_directive='<'signal.h'>'
20801 else
20802 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20803 gl_next_as_first_directive=$gl_cv_next_signal_h
20804 fi
20805 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
20806
20807
20808
20809
20810
20811 # AIX declares sig_atomic_t to already include volatile, and C89 compilers
20812 # then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
20813 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
20814 #include <signal.h>
20815
20816 "
20817 if test "x$ac_cv_type_volatile_sig_atomic_t" = x""yes; then :
20818
20819 else
20820 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
20821 fi
20822
20823
20824
20825
20826
20827
20828
20829 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
20830 #include <signal.h>
20831
20832 "
20833 if test "x$ac_cv_type_sighandler_t" = x""yes; then :
20834
20835 else
20836 HAVE_SIGHANDLER_T=0
20837 fi
20838
20839
20840
20841 for gl_func in pthread_sigmask sigaction sigaddset sigdelset sigemptyset sigfillset sigismember sigpending sigprocmask; do
20842 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
20843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
20844 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
20845 if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
20846 $as_echo_n "(cached) " >&6
20847 else
20848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20849 /* end confdefs.h. */
20850 #include <signal.h>
20851
20852 int
20853 main ()
20854 {
20855 #undef $gl_func
20856 (void) $gl_func;
20857 ;
20858 return 0;
20859 }
20860 _ACEOF
20861 if ac_fn_c_try_compile "$LINENO"; then :
20862 eval "$as_gl_Symbol=yes"
20863 else
20864 eval "$as_gl_Symbol=no"
20865 fi
20866 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20867 fi
20868 eval ac_res=\$$as_gl_Symbol
20869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20870 $as_echo "$ac_res" >&6; }
20871 eval as_val=\$$as_gl_Symbol
20872 if test "x$as_val" = x""yes; then :
20873 cat >>confdefs.h <<_ACEOF
20874 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
20875 _ACEOF
20876
20877 eval ac_cv_have_decl_$gl_func=yes
20878 fi
20879 done
20880
20881
20882
20883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
20884 $as_echo_n "checking for ssize_t... " >&6; }
20885 if test "${gt_cv_ssize_t+set}" = set; then :
20886 $as_echo_n "(cached) " >&6
20887 else
20888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20889 /* end confdefs.h. */
20890 #include <sys/types.h>
20891 int
20892 main ()
20893 {
20894 int x = sizeof (ssize_t *) + sizeof (ssize_t);
20895 return !x;
20896 ;
20897 return 0;
20898 }
20899 _ACEOF
20900 if ac_fn_c_try_compile "$LINENO"; then :
20901 gt_cv_ssize_t=yes
20902 else
20903 gt_cv_ssize_t=no
20904 fi
20905 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20906 fi
20907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
20908 $as_echo "$gt_cv_ssize_t" >&6; }
20909 if test $gt_cv_ssize_t = no; then
20910
20911 $as_echo "#define ssize_t int" >>confdefs.h
20912
20913 fi
20914
20915
20916
20917
20918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
20919 $as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
20920 if test "${gl_cv_func_stat_dir_slash+set}" = set; then :
20921 $as_echo_n "(cached) " >&6
20922 else
20923 if test "$cross_compiling" = yes; then :
20924 case $host_os in
20925 mingw*) gl_cv_func_stat_dir_slash="guessing no";;
20926 *) gl_cv_func_stat_dir_slash="guessing yes";;
20927 esac
20928 else
20929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20930 /* end confdefs.h. */
20931 #include <sys/stat.h>
20932
20933 int
20934 main ()
20935 {
20936 struct stat st; return stat (".", &st) != stat ("./", &st);
20937 ;
20938 return 0;
20939 }
20940 _ACEOF
20941 if ac_fn_c_try_run "$LINENO"; then :
20942 gl_cv_func_stat_dir_slash=yes
20943 else
20944 gl_cv_func_stat_dir_slash=no
20945 fi
20946 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20947 conftest.$ac_objext conftest.beam conftest.$ac_ext
20948 fi
20949
20950 fi
20951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
20952 $as_echo "$gl_cv_func_stat_dir_slash" >&6; }
20953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
20954 $as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
20955 if test "${gl_cv_func_stat_file_slash+set}" = set; then :
20956 $as_echo_n "(cached) " >&6
20957 else
20958 touch conftest.tmp
20959 # Assume that if we have lstat, we can also check symlinks.
20960 if test $ac_cv_func_lstat = yes; then
20961 ln -s conftest.tmp conftest.lnk
20962 fi
20963 if test "$cross_compiling" = yes; then :
20964 case "$host_os" in
20965 # Guess yes on glibc systems.
20966 *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
20967 # If we don't know, assume the worst.
20968 *) gl_cv_func_stat_file_slash="guessing no" ;;
20969 esac
20970
20971 else
20972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20973 /* end confdefs.h. */
20974 #include <sys/stat.h>
20975
20976 int
20977 main ()
20978 {
20979 int result = 0;
20980 struct stat st;
20981 if (!stat ("conftest.tmp/", &st))
20982 result |= 1;
20983 #if HAVE_LSTAT
20984 if (!stat ("conftest.lnk/", &st))
20985 result |= 2;
20986 #endif
20987 return result;
20988
20989 ;
20990 return 0;
20991 }
20992 _ACEOF
20993 if ac_fn_c_try_run "$LINENO"; then :
20994 gl_cv_func_stat_file_slash=yes
20995 else
20996 gl_cv_func_stat_file_slash=no
20997 fi
20998 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20999 conftest.$ac_objext conftest.beam conftest.$ac_ext
21000 fi
21001
21002 rm -f conftest.tmp conftest.lnk
21003 fi
21004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
21005 $as_echo "$gl_cv_func_stat_file_slash" >&6; }
21006 case $gl_cv_func_stat_dir_slash in
21007 *no) REPLACE_STAT=1
21008
21009 $as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
21010 ;;
21011 esac
21012 case $gl_cv_func_stat_file_slash in
21013 *no) REPLACE_STAT=1
21014
21015 $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
21016 ;;
21017 esac
21018
21019 if test $REPLACE_STAT = 1; then
21020
21021
21022
21023
21024
21025
21026
21027
21028 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
21029
21030 :
21031 fi
21032
21033
21034
21035
21036
21037 GNULIB_STAT=1
21038
21039
21040
21041
21042
21043 $as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h
21044
21045
21046
21047
21048
21049
21050 # Define two additional variables used in the Makefile substitution.
21051
21052 if test "$ac_cv_header_stdbool_h" = yes; then
21053 STDBOOL_H=''
21054 else
21055 STDBOOL_H='stdbool.h'
21056 fi
21057
21058 if test -n "$STDBOOL_H"; then
21059 GL_GENERATE_STDBOOL_H_TRUE=
21060 GL_GENERATE_STDBOOL_H_FALSE='#'
21061 else
21062 GL_GENERATE_STDBOOL_H_TRUE='#'
21063 GL_GENERATE_STDBOOL_H_FALSE=
21064 fi
21065
21066
21067 if test "$ac_cv_type__Bool" = yes; then
21068 HAVE__BOOL=1
21069 else
21070 HAVE__BOOL=0
21071 fi
21072
21073
21074
21075
21076
21077 STDDEF_H=
21078 ac_fn_c_check_type "$LINENO" "max_align_t" "ac_cv_type_max_align_t" "#include <stddef.h>
21079
21080 "
21081 if test "x$ac_cv_type_max_align_t" = x""yes; then :
21082
21083 else
21084 HAVE_MAX_ALIGN_T=0; STDDEF_H=stddef.h
21085 fi
21086
21087 if test $gt_cv_c_wchar_t = no; then
21088 HAVE_WCHAR_T=0
21089 STDDEF_H=stddef.h
21090 fi
21091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
21092 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
21093 if test "${gl_cv_decl_null_works+set}" = set; then :
21094 $as_echo_n "(cached) " >&6
21095 else
21096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21097 /* end confdefs.h. */
21098 #include <stddef.h>
21099 int test[2 * (sizeof NULL == sizeof (void *)) -1];
21100
21101 int
21102 main ()
21103 {
21104
21105 ;
21106 return 0;
21107 }
21108 _ACEOF
21109 if ac_fn_c_try_compile "$LINENO"; then :
21110 gl_cv_decl_null_works=yes
21111 else
21112 gl_cv_decl_null_works=no
21113 fi
21114 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21115 fi
21116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
21117 $as_echo "$gl_cv_decl_null_works" >&6; }
21118 if test $gl_cv_decl_null_works = no; then
21119 REPLACE_NULL=1
21120 STDDEF_H=stddef.h
21121 fi
21122
21123 if test -n "$STDDEF_H"; then
21124 GL_GENERATE_STDDEF_H_TRUE=
21125 GL_GENERATE_STDDEF_H_FALSE='#'
21126 else
21127 GL_GENERATE_STDDEF_H_TRUE='#'
21128 GL_GENERATE_STDDEF_H_FALSE=
21129 fi
21130
21131 if test -n "$STDDEF_H"; then
21132
21133
21134
21135
21136
21137
21138
21139
21140 if test $gl_cv_have_include_next = yes; then
21141 gl_cv_next_stddef_h='<'stddef.h'>'
21142 else
21143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
21144 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
21145 if test "${gl_cv_next_stddef_h+set}" = set; then :
21146 $as_echo_n "(cached) " >&6
21147 else
21148
21149
21150
21151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21152 /* end confdefs.h. */
21153 #include <stddef.h>
21154 _ACEOF
21155 case "$host_os" in
21156 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21157 *) gl_absname_cpp="$ac_cpp" ;;
21158 esac
21159
21160 case "$host_os" in
21161 mingw*)
21162 gl_dirsep_regex='[/\\]'
21163 ;;
21164 *)
21165 gl_dirsep_regex='\/'
21166 ;;
21167 esac
21168 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21169 gl_header_literal_regex=`echo 'stddef.h' \
21170 | sed -e "$gl_make_literal_regex_sed"`
21171 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21172 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21173 s|^/[^/]|//&|
21174 p
21175 q
21176 }'
21177
21178 gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21179 sed -n "$gl_absolute_header_sed"`
21180
21181 gl_header=$gl_cv_absolute_stddef_h
21182 gl_cv_next_stddef_h='"'$gl_header'"'
21183
21184
21185 fi
21186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
21187 $as_echo "$gl_cv_next_stddef_h" >&6; }
21188 fi
21189 NEXT_STDDEF_H=$gl_cv_next_stddef_h
21190
21191 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21192 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21193 gl_next_as_first_directive='<'stddef.h'>'
21194 else
21195 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21196 gl_next_as_first_directive=$gl_cv_next_stddef_h
21197 fi
21198 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
21199
21200
21201
21202
21203 fi
21204
21205
21206
21207
21208 $as_echo "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
21209
21210
21211
21212
21213
21214
21215
21216
21217
21218
21219 if test $gl_cv_have_include_next = yes; then
21220 gl_cv_next_stdio_h='<'stdio.h'>'
21221 else
21222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
21223 $as_echo_n "checking absolute name of <stdio.h>... " >&6; }
21224 if test "${gl_cv_next_stdio_h+set}" = set; then :
21225 $as_echo_n "(cached) " >&6
21226 else
21227
21228
21229
21230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21231 /* end confdefs.h. */
21232 #include <stdio.h>
21233 _ACEOF
21234 case "$host_os" in
21235 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21236 *) gl_absname_cpp="$ac_cpp" ;;
21237 esac
21238
21239 case "$host_os" in
21240 mingw*)
21241 gl_dirsep_regex='[/\\]'
21242 ;;
21243 *)
21244 gl_dirsep_regex='\/'
21245 ;;
21246 esac
21247 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21248 gl_header_literal_regex=`echo 'stdio.h' \
21249 | sed -e "$gl_make_literal_regex_sed"`
21250 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21251 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21252 s|^/[^/]|//&|
21253 p
21254 q
21255 }'
21256
21257 gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21258 sed -n "$gl_absolute_header_sed"`
21259
21260 gl_header=$gl_cv_absolute_stdio_h
21261 gl_cv_next_stdio_h='"'$gl_header'"'
21262
21263
21264 fi
21265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
21266 $as_echo "$gl_cv_next_stdio_h" >&6; }
21267 fi
21268 NEXT_STDIO_H=$gl_cv_next_stdio_h
21269
21270 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21271 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21272 gl_next_as_first_directive='<'stdio.h'>'
21273 else
21274 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21275 gl_next_as_first_directive=$gl_cv_next_stdio_h
21276 fi
21277 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
21278
21279
21280
21281
21282
21283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
21284 $as_echo_n "checking which flavor of printf attribute matches inttypes macros... " >&6; }
21285 if test "${gl_cv_func_printf_attribute_flavor+set}" = set; then :
21286 $as_echo_n "(cached) " >&6
21287 else
21288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21289 /* end confdefs.h. */
21290
21291 #define __STDC_FORMAT_MACROS 1
21292 #include <stdio.h>
21293 #include <inttypes.h>
21294 /* For non-mingw systems, compilation will trivially succeed.
21295 For mingw, compilation will succeed for older mingw (system
21296 printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
21297 #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) && \
21298 (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
21299 extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
21300 #endif
21301
21302 int
21303 main ()
21304 {
21305
21306 ;
21307 return 0;
21308 }
21309 _ACEOF
21310 if ac_fn_c_try_compile "$LINENO"; then :
21311 gl_cv_func_printf_attribute_flavor=system
21312 else
21313 gl_cv_func_printf_attribute_flavor=gnu
21314 fi
21315 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21316 fi
21317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
21318 $as_echo "$gl_cv_func_printf_attribute_flavor" >&6; }
21319 if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
21320
21321 $as_echo "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
21322
21323 fi
21324
21325 GNULIB_FSCANF=1
21326
21327
21328 cat >>confdefs.h <<_ACEOF
21329 #define GNULIB_FSCANF 1
21330 _ACEOF
21331
21332
21333 GNULIB_SCANF=1
21334
21335
21336 cat >>confdefs.h <<_ACEOF
21337 #define GNULIB_SCANF 1
21338 _ACEOF
21339
21340
21341 GNULIB_FGETC=1
21342 GNULIB_GETC=1
21343 GNULIB_GETCHAR=1
21344 GNULIB_FGETS=1
21345 GNULIB_FREAD=1
21346
21347
21348 GNULIB_FPRINTF=1
21349 GNULIB_PRINTF=1
21350 GNULIB_VFPRINTF=1
21351 GNULIB_VPRINTF=1
21352 GNULIB_FPUTC=1
21353 GNULIB_PUTC=1
21354 GNULIB_PUTCHAR=1
21355 GNULIB_FPUTS=1
21356 GNULIB_PUTS=1
21357 GNULIB_FWRITE=1
21358
21359
21360
21361
21362 for gl_func in dprintf fpurge fseeko ftello getdelim getline gets pclose popen renameat snprintf tmpfile vdprintf vsnprintf; do
21363 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
21364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
21365 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
21366 if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
21367 $as_echo_n "(cached) " >&6
21368 else
21369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21370 /* end confdefs.h. */
21371 #include <stdio.h>
21372
21373 int
21374 main ()
21375 {
21376 #undef $gl_func
21377 (void) $gl_func;
21378 ;
21379 return 0;
21380 }
21381 _ACEOF
21382 if ac_fn_c_try_compile "$LINENO"; then :
21383 eval "$as_gl_Symbol=yes"
21384 else
21385 eval "$as_gl_Symbol=no"
21386 fi
21387 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21388 fi
21389 eval ac_res=\$$as_gl_Symbol
21390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
21391 $as_echo "$ac_res" >&6; }
21392 eval as_val=\$$as_gl_Symbol
21393 if test "x$as_val" = x""yes; then :
21394 cat >>confdefs.h <<_ACEOF
21395 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
21396 _ACEOF
21397
21398 eval ac_cv_have_decl_$gl_func=yes
21399 fi
21400 done
21401
21402
21403
21404
21405
21406
21407
21408
21409
21410
21411
21412
21413 if test $gl_cv_have_include_next = yes; then
21414 gl_cv_next_stdlib_h='<'stdlib.h'>'
21415 else
21416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
21417 $as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
21418 if test "${gl_cv_next_stdlib_h+set}" = set; then :
21419 $as_echo_n "(cached) " >&6
21420 else
21421
21422
21423
21424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21425 /* end confdefs.h. */
21426 #include <stdlib.h>
21427 _ACEOF
21428 case "$host_os" in
21429 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21430 *) gl_absname_cpp="$ac_cpp" ;;
21431 esac
21432
21433 case "$host_os" in
21434 mingw*)
21435 gl_dirsep_regex='[/\\]'
21436 ;;
21437 *)
21438 gl_dirsep_regex='\/'
21439 ;;
21440 esac
21441 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21442 gl_header_literal_regex=`echo 'stdlib.h' \
21443 | sed -e "$gl_make_literal_regex_sed"`
21444 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21445 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21446 s|^/[^/]|//&|
21447 p
21448 q
21449 }'
21450
21451 gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21452 sed -n "$gl_absolute_header_sed"`
21453
21454 gl_header=$gl_cv_absolute_stdlib_h
21455 gl_cv_next_stdlib_h='"'$gl_header'"'
21456
21457
21458 fi
21459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
21460 $as_echo "$gl_cv_next_stdlib_h" >&6; }
21461 fi
21462 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
21463
21464 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21465 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21466 gl_next_as_first_directive='<'stdlib.h'>'
21467 else
21468 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21469 gl_next_as_first_directive=$gl_cv_next_stdlib_h
21470 fi
21471 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
21472
21473
21474
21475
21476
21477
21478 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
21479 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
21480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
21481 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
21482 if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
21483 $as_echo_n "(cached) " >&6
21484 else
21485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21486 /* end confdefs.h. */
21487 #include <stdlib.h>
21488 #if HAVE_SYS_LOADAVG_H
21489 # include <sys/loadavg.h>
21490 #endif
21491 #if HAVE_RANDOM_H
21492 # include <random.h>
21493 #endif
21494
21495 int
21496 main ()
21497 {
21498 #undef $gl_func
21499 (void) $gl_func;
21500 ;
21501 return 0;
21502 }
21503 _ACEOF
21504 if ac_fn_c_try_compile "$LINENO"; then :
21505 eval "$as_gl_Symbol=yes"
21506 else
21507 eval "$as_gl_Symbol=no"
21508 fi
21509 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21510 fi
21511 eval ac_res=\$$as_gl_Symbol
21512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
21513 $as_echo "$ac_res" >&6; }
21514 eval as_val=\$$as_gl_Symbol
21515 if test "x$as_val" = x""yes; then :
21516 cat >>confdefs.h <<_ACEOF
21517 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
21518 _ACEOF
21519
21520 eval ac_cv_have_decl_$gl_func=yes
21521 fi
21522 done
21523
21524
21525
21526
21527
21528
21529 for ac_func in strchrnul
21530 do :
21531 ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
21532 if test "x$ac_cv_func_strchrnul" = x""yes; then :
21533 cat >>confdefs.h <<_ACEOF
21534 #define HAVE_STRCHRNUL 1
21535 _ACEOF
21536
21537 fi
21538 done
21539
21540 if test $ac_cv_func_strchrnul = no; then
21541 HAVE_STRCHRNUL=0
21542 else
21543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5
21544 $as_echo_n "checking whether strchrnul works... " >&6; }
21545 if test "${gl_cv_func_strchrnul_works+set}" = set; then :
21546 $as_echo_n "(cached) " >&6
21547 else
21548 if test "$cross_compiling" = yes; then :
21549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21550 /* end confdefs.h. */
21551
21552 #if defined __CYGWIN__
21553 #include <cygwin/version.h>
21554 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9)
21555 Lucky user
21556 #endif
21557 #else
21558 Lucky user
21559 #endif
21560
21561 _ACEOF
21562 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21563 $EGREP "Lucky user" >/dev/null 2>&1; then :
21564 gl_cv_func_strchrnul_works="guessing yes"
21565 else
21566 gl_cv_func_strchrnul_works="guessing no"
21567 fi
21568 rm -f conftest*
21569
21570
21571 else
21572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21573 /* end confdefs.h. */
21574
21575 #include <string.h> /* for strchrnul */
21576
21577 int
21578 main ()
21579 {
21580 const char *buf = "a";
21581 return strchrnul (buf, 'b') != buf + 1;
21582
21583 ;
21584 return 0;
21585 }
21586 _ACEOF
21587 if ac_fn_c_try_run "$LINENO"; then :
21588 gl_cv_func_strchrnul_works=yes
21589 else
21590 gl_cv_func_strchrnul_works=no
21591 fi
21592 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21593 conftest.$ac_objext conftest.beam conftest.$ac_ext
21594 fi
21595
21596
21597 fi
21598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strchrnul_works" >&5
21599 $as_echo "$gl_cv_func_strchrnul_works" >&6; }
21600 case "$gl_cv_func_strchrnul_works" in
21601 *yes) ;;
21602 *) REPLACE_STRCHRNUL=1 ;;
21603 esac
21604 fi
21605
21606 if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
21607
21608
21609
21610
21611
21612
21613
21614
21615 gl_LIBOBJS="$gl_LIBOBJS strchrnul.$ac_objext"
21616
21617 :
21618 fi
21619
21620
21621
21622
21623
21624 GNULIB_STRCHRNUL=1
21625
21626
21627
21628
21629
21630 $as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
21631
21632
21633
21634
21635
21636
21637
21638 if test $ac_cv_func_strdup = yes; then
21639 if test $gl_cv_func_malloc_posix != yes; then
21640 REPLACE_STRDUP=1
21641 fi
21642 fi
21643
21644 if test $ac_cv_have_decl_strdup = no; then
21645 HAVE_DECL_STRDUP=0
21646 fi
21647
21648 if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
21649
21650
21651
21652
21653
21654
21655
21656
21657 gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext"
21658
21659 :
21660 fi
21661
21662
21663
21664
21665
21666 GNULIB_STRDUP=1
21667
21668
21669
21670
21671
21672 $as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
21673
21674
21675
21676
21677
21678
21679
21680
21681 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
21682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
21683 $as_echo_n "checking for working strerror function... " >&6; }
21684 if test "${gl_cv_func_working_strerror+set}" = set; then :
21685 $as_echo_n "(cached) " >&6
21686 else
21687 if test "$cross_compiling" = yes; then :
21688 case "$host_os" in
21689 # Guess yes on glibc systems.
21690 *-gnu*) gl_cv_func_working_strerror="guessing yes" ;;
21691 # If we don't know, assume the worst.
21692 *) gl_cv_func_working_strerror="guessing no" ;;
21693 esac
21694
21695 else
21696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21697 /* end confdefs.h. */
21698 #include <string.h>
21699
21700 int
21701 main ()
21702 {
21703 if (!*strerror (-2)) return 1;
21704 ;
21705 return 0;
21706 }
21707 _ACEOF
21708 if ac_fn_c_try_run "$LINENO"; then :
21709 gl_cv_func_working_strerror=yes
21710 else
21711 gl_cv_func_working_strerror=no
21712 fi
21713 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21714 conftest.$ac_objext conftest.beam conftest.$ac_ext
21715 fi
21716
21717
21718 fi
21719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
21720 $as_echo "$gl_cv_func_working_strerror" >&6; }
21721 case "$gl_cv_func_working_strerror" in
21722 *yes) ;;
21723 *)
21724 REPLACE_STRERROR=1
21725 ;;
21726 esac
21727
21728 else
21729 REPLACE_STRERROR=1
21730 fi
21731
21732 if test $REPLACE_STRERROR = 1; then
21733
21734
21735
21736
21737
21738
21739
21740
21741 gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
21742
21743 fi
21744
21745
21746 cat >>confdefs.h <<_ACEOF
21747 #define GNULIB_STRERROR 1
21748 _ACEOF
21749
21750
21751
21752
21753
21754
21755
21756 GNULIB_STRERROR=1
21757
21758
21759
21760
21761
21762 $as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
21763
21764
21765
21766
21767
21768 if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
21769
21770
21771
21772
21773
21774
21775
21776
21777 gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
21778
21779
21780
21781
21782
21783 if test $ac_cv_header_sys_socket_h != yes; then
21784 for ac_header in winsock2.h
21785 do :
21786 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
21787 if test "x$ac_cv_header_winsock2_h" = x""yes; then :
21788 cat >>confdefs.h <<_ACEOF
21789 #define HAVE_WINSOCK2_H 1
21790 _ACEOF
21791
21792 fi
21793
21794 done
21795
21796 fi
21797 if test "$ac_cv_header_winsock2_h" = yes; then
21798 HAVE_WINSOCK2_H=1
21799 UNISTD_H_HAVE_WINSOCK2_H=1
21800 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
21801 else
21802 HAVE_WINSOCK2_H=0
21803 fi
21804
21805
21806 fi
21807
21808
21809
21810
21811
21812 if test $REPLACE_STRSTR = 0; then
21813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works in linear time" >&5
21814 $as_echo_n "checking whether strstr works in linear time... " >&6; }
21815 if test "${gl_cv_func_strstr_linear+set}" = set; then :
21816 $as_echo_n "(cached) " >&6
21817 else
21818 if test "$cross_compiling" = yes; then :
21819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21820 /* end confdefs.h. */
21821
21822 #include <features.h>
21823 #ifdef __GNU_LIBRARY__
21824 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
21825 && !(defined __i386__ || defined __x86_64__) \
21826 && !defined __UCLIBC__
21827 Lucky user
21828 #endif
21829 #endif
21830 #ifdef __CYGWIN__
21831 #include <cygwin/version.h>
21832 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
21833 Lucky user
21834 #endif
21835 #endif
21836
21837 _ACEOF
21838 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21839 $EGREP "Lucky user" >/dev/null 2>&1; then :
21840 gl_cv_func_strstr_linear="guessing yes"
21841 else
21842 gl_cv_func_strstr_linear="guessing no"
21843 fi
21844 rm -f conftest*
21845
21846
21847 else
21848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21849 /* end confdefs.h. */
21850
21851 #ifdef __MVS__
21852 /* z/OS does not deliver signals while strstr() is running (thanks to
21853 restrictions on its LE runtime), which prevents us from limiting the
21854 running time of this test. */
21855 # error "This test does not work properly on z/OS"
21856 #endif
21857 #include <signal.h> /* for signal */
21858 #include <string.h> /* for strstr */
21859 #include <stdlib.h> /* for malloc */
21860 #include <unistd.h> /* for alarm */
21861 static void quit (int sig) { _exit (sig + 128); }
21862
21863 int
21864 main ()
21865 {
21866
21867 int result = 0;
21868 size_t m = 1000000;
21869 char *haystack = (char *) malloc (2 * m + 2);
21870 char *needle = (char *) malloc (m + 2);
21871 /* Failure to compile this test due to missing alarm is okay,
21872 since all such platforms (mingw) also have quadratic strstr. */
21873 signal (SIGALRM, quit);
21874 alarm (5);
21875 /* Check for quadratic performance. */
21876 if (haystack && needle)
21877 {
21878 memset (haystack, 'A', 2 * m);
21879 haystack[2 * m] = 'B';
21880 haystack[2 * m + 1] = 0;
21881 memset (needle, 'A', m);
21882 needle[m] = 'B';
21883 needle[m + 1] = 0;
21884 if (!strstr (haystack, needle))
21885 result |= 1;
21886 }
21887 return result;
21888
21889 ;
21890 return 0;
21891 }
21892 _ACEOF
21893 if ac_fn_c_try_run "$LINENO"; then :
21894 gl_cv_func_strstr_linear=yes
21895 else
21896 gl_cv_func_strstr_linear=no
21897 fi
21898 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21899 conftest.$ac_objext conftest.beam conftest.$ac_ext
21900 fi
21901
21902
21903 fi
21904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_linear" >&5
21905 $as_echo "$gl_cv_func_strstr_linear" >&6; }
21906 case "$gl_cv_func_strstr_linear" in
21907 *yes) ;;
21908 *)
21909 REPLACE_STRSTR=1
21910 ;;
21911 esac
21912 fi
21913
21914 if test $REPLACE_STRSTR = 1; then
21915
21916
21917
21918
21919
21920
21921
21922
21923 gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
21924
21925 fi
21926
21927
21928
21929 if test "$gl_cv_func_memchr_works" != yes; then
21930 REPLACE_STRSTR=1
21931 else
21932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
21933 $as_echo_n "checking whether strstr works... " >&6; }
21934 if test "${gl_cv_func_strstr_works_always+set}" = set; then :
21935 $as_echo_n "(cached) " >&6
21936 else
21937 if test "$cross_compiling" = yes; then :
21938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21939 /* end confdefs.h. */
21940
21941 #ifdef __GNU_LIBRARY__
21942 #include <features.h>
21943 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
21944 || defined __UCLIBC__
21945 Lucky user
21946 #endif
21947 #elif defined __CYGWIN__
21948 #include <cygwin/version.h>
21949 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
21950 Lucky user
21951 #endif
21952 #else
21953 Lucky user
21954 #endif
21955
21956 _ACEOF
21957 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21958 $EGREP "Lucky user" >/dev/null 2>&1; then :
21959 gl_cv_func_strstr_works_always="guessing yes"
21960 else
21961 gl_cv_func_strstr_works_always="guessing no"
21962 fi
21963 rm -f conftest*
21964
21965
21966 else
21967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21968 /* end confdefs.h. */
21969
21970 #include <string.h> /* for strstr */
21971 #define P "_EF_BF_BD"
21972 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
21973 #define NEEDLE P P P P P
21974
21975 int
21976 main ()
21977 {
21978 return !!strstr (HAYSTACK, NEEDLE);
21979
21980 ;
21981 return 0;
21982 }
21983 _ACEOF
21984 if ac_fn_c_try_run "$LINENO"; then :
21985 gl_cv_func_strstr_works_always=yes
21986 else
21987 gl_cv_func_strstr_works_always=no
21988 fi
21989 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21990 conftest.$ac_objext conftest.beam conftest.$ac_ext
21991 fi
21992
21993
21994 fi
21995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
21996 $as_echo "$gl_cv_func_strstr_works_always" >&6; }
21997 case "$gl_cv_func_strstr_works_always" in
21998 *yes) ;;
21999 *)
22000 REPLACE_STRSTR=1
22001 ;;
22002 esac
22003 fi
22004
22005 if test $REPLACE_STRSTR = 1; then
22006
22007
22008
22009
22010
22011
22012
22013
22014 gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
22015
22016 fi
22017
22018
22019
22020
22021
22022 GNULIB_STRSTR=1
22023
22024
22025
22026
22027
22028 $as_echo "#define GNULIB_TEST_STRSTR 1" >>confdefs.h
22029
22030
22031
22032
22033
22034
22035
22036 for ac_func in strtok_r
22037 do :
22038 ac_fn_c_check_func "$LINENO" "strtok_r" "ac_cv_func_strtok_r"
22039 if test "x$ac_cv_func_strtok_r" = x""yes; then :
22040 cat >>confdefs.h <<_ACEOF
22041 #define HAVE_STRTOK_R 1
22042 _ACEOF
22043
22044 fi
22045 done
22046
22047 if test $ac_cv_func_strtok_r = yes; then
22048 HAVE_STRTOK_R=1
22049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtok_r works" >&5
22050 $as_echo_n "checking whether strtok_r works... " >&6; }
22051 if test "${gl_cv_func_strtok_r_works+set}" = set; then :
22052 $as_echo_n "(cached) " >&6
22053 else
22054 if test "$cross_compiling" = yes; then :
22055
22056 case "$host_os" in
22057 # Guess no on glibc systems.
22058 *-gnu*) gl_cv_func_strtok_r_works="guessing no";;
22059 *) gl_cv_func_strtok_r_works="guessing yes";;
22060 esac
22061
22062 else
22063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22064 /* end confdefs.h. */
22065
22066 #ifndef __OPTIMIZE__
22067 # define __OPTIMIZE__ 1
22068 #endif
22069 #undef __OPTIMIZE_SIZE__
22070 #undef __NO_INLINE__
22071 #include <stdlib.h>
22072 #include <string.h>
22073
22074 int
22075 main ()
22076 {
22077 static const char dummy[] = "\177\01a";
22078 char delimiters[] = "xxxxxxxx";
22079 char *save_ptr = (char *) dummy;
22080 strtok_r (delimiters, "x", &save_ptr);
22081 strtok_r (NULL, "x", &save_ptr);
22082 return 0;
22083
22084 ;
22085 return 0;
22086 }
22087
22088 _ACEOF
22089 if ac_fn_c_try_run "$LINENO"; then :
22090 gl_cv_func_strtok_r_works=yes
22091 else
22092 gl_cv_func_strtok_r_works=no
22093 fi
22094 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22095 conftest.$ac_objext conftest.beam conftest.$ac_ext
22096 fi
22097
22098
22099 fi
22100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtok_r_works" >&5
22101 $as_echo "$gl_cv_func_strtok_r_works" >&6; }
22102 case "$gl_cv_func_strtok_r_works" in
22103 *no)
22104 UNDEFINE_STRTOK_R=1
22105 ;;
22106 esac
22107 else
22108 HAVE_STRTOK_R=0
22109 fi
22110
22111 if test $ac_cv_have_decl_strtok_r = no; then
22112 HAVE_DECL_STRTOK_R=0
22113 fi
22114
22115 if test $HAVE_STRTOK_R = 0 || test $REPLACE_STRTOK_R = 1; then
22116
22117
22118
22119
22120
22121
22122
22123
22124 gl_LIBOBJS="$gl_LIBOBJS strtok_r.$ac_objext"
22125
22126
22127 :
22128
22129 fi
22130
22131
22132
22133
22134
22135 GNULIB_STRTOK_R=1
22136
22137
22138
22139
22140
22141 $as_echo "#define GNULIB_TEST_STRTOK_R 1" >>confdefs.h
22142
22143
22144
22145
22146
22147
22148
22149
22150
22151
22152
22153
22154
22155
22156
22157
22158
22159 if test $gl_cv_have_include_next = yes; then
22160 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
22161 else
22162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
22163 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
22164 if test "${gl_cv_next_sys_stat_h+set}" = set; then :
22165 $as_echo_n "(cached) " >&6
22166 else
22167
22168 if test $ac_cv_header_sys_stat_h = yes; then
22169
22170
22171
22172
22173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22174 /* end confdefs.h. */
22175 #include <sys/stat.h>
22176 _ACEOF
22177 case "$host_os" in
22178 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22179 *) gl_absname_cpp="$ac_cpp" ;;
22180 esac
22181
22182 case "$host_os" in
22183 mingw*)
22184 gl_dirsep_regex='[/\\]'
22185 ;;
22186 *)
22187 gl_dirsep_regex='\/'
22188 ;;
22189 esac
22190 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22191 gl_header_literal_regex=`echo 'sys/stat.h' \
22192 | sed -e "$gl_make_literal_regex_sed"`
22193 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22194 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22195 s|^/[^/]|//&|
22196 p
22197 q
22198 }'
22199
22200 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22201 sed -n "$gl_absolute_header_sed"`
22202
22203 gl_header=$gl_cv_absolute_sys_stat_h
22204 gl_cv_next_sys_stat_h='"'$gl_header'"'
22205 else
22206 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
22207 fi
22208
22209
22210 fi
22211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
22212 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
22213 fi
22214 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
22215
22216 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22217 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22218 gl_next_as_first_directive='<'sys/stat.h'>'
22219 else
22220 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22221 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
22222 fi
22223 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
22224
22225
22226
22227
22228
22229
22230
22231
22232
22233
22234
22235 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
22236
22237 $as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
22238
22239 fi
22240
22241 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
22242 #include <sys/stat.h>
22243 "
22244 if test "x$ac_cv_type_nlink_t" = x""yes; then :
22245
22246 else
22247
22248 $as_echo "#define nlink_t int" >>confdefs.h
22249
22250 fi
22251
22252
22253
22254 for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do
22255 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
22256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
22257 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
22258 if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
22259 $as_echo_n "(cached) " >&6
22260 else
22261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22262 /* end confdefs.h. */
22263 #include <sys/stat.h>
22264
22265 int
22266 main ()
22267 {
22268 #undef $gl_func
22269 (void) $gl_func;
22270 ;
22271 return 0;
22272 }
22273 _ACEOF
22274 if ac_fn_c_try_compile "$LINENO"; then :
22275 eval "$as_gl_Symbol=yes"
22276 else
22277 eval "$as_gl_Symbol=no"
22278 fi
22279 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22280 fi
22281 eval ac_res=\$$as_gl_Symbol
22282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
22283 $as_echo "$ac_res" >&6; }
22284 eval as_val=\$$as_gl_Symbol
22285 if test "x$as_val" = x""yes; then :
22286 cat >>confdefs.h <<_ACEOF
22287 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
22288 _ACEOF
22289
22290 eval ac_cv_have_decl_$gl_func=yes
22291 fi
22292 done
22293
22294
22295
22296
22297
22298
22299
22300
22301
22302
22303
22304
22305
22306
22307
22308
22309
22310
22311
22312
22313
22314
22315
22316
22317 if test $gl_cv_have_include_next = yes; then
22318 gl_cv_next_unistd_h='<'unistd.h'>'
22319 else
22320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
22321 $as_echo_n "checking absolute name of <unistd.h>... " >&6; }
22322 if test "${gl_cv_next_unistd_h+set}" = set; then :
22323 $as_echo_n "(cached) " >&6
22324 else
22325
22326 if test $ac_cv_header_unistd_h = yes; then
22327
22328
22329
22330
22331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22332 /* end confdefs.h. */
22333 #include <unistd.h>
22334 _ACEOF
22335 case "$host_os" in
22336 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22337 *) gl_absname_cpp="$ac_cpp" ;;
22338 esac
22339
22340 case "$host_os" in
22341 mingw*)
22342 gl_dirsep_regex='[/\\]'
22343 ;;
22344 *)
22345 gl_dirsep_regex='\/'
22346 ;;
22347 esac
22348 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22349 gl_header_literal_regex=`echo 'unistd.h' \
22350 | sed -e "$gl_make_literal_regex_sed"`
22351 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22352 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22353 s|^/[^/]|//&|
22354 p
22355 q
22356 }'
22357
22358 gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22359 sed -n "$gl_absolute_header_sed"`
22360
22361 gl_header=$gl_cv_absolute_unistd_h
22362 gl_cv_next_unistd_h='"'$gl_header'"'
22363 else
22364 gl_cv_next_unistd_h='<'unistd.h'>'
22365 fi
22366
22367
22368 fi
22369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
22370 $as_echo "$gl_cv_next_unistd_h" >&6; }
22371 fi
22372 NEXT_UNISTD_H=$gl_cv_next_unistd_h
22373
22374 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22375 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22376 gl_next_as_first_directive='<'unistd.h'>'
22377 else
22378 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22379 gl_next_as_first_directive=$gl_cv_next_unistd_h
22380 fi
22381 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
22382
22383
22384
22385
22386 if test $ac_cv_header_unistd_h = yes; then
22387 HAVE_UNISTD_H=1
22388 else
22389 HAVE_UNISTD_H=0
22390 fi
22391
22392
22393
22394
22395
22396
22397
22398 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
22399 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
22400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
22401 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
22402 if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
22403 $as_echo_n "(cached) " >&6
22404 else
22405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22406 /* end confdefs.h. */
22407
22408 #if HAVE_UNISTD_H
22409 # include <unistd.h>
22410 #endif
22411 /* Some systems declare various items in the wrong headers. */
22412 #if !(defined __GLIBC__ && !defined __UCLIBC__)
22413 # include <fcntl.h>
22414 # include <stdio.h>
22415 # include <stdlib.h>
22416 # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
22417 # include <io.h>
22418 # endif
22419 #endif
22420
22421 int
22422 main ()
22423 {
22424 #undef $gl_func
22425 (void) $gl_func;
22426 ;
22427 return 0;
22428 }
22429 _ACEOF
22430 if ac_fn_c_try_compile "$LINENO"; then :
22431 eval "$as_gl_Symbol=yes"
22432 else
22433 eval "$as_gl_Symbol=no"
22434 fi
22435 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22436 fi
22437 eval ac_res=\$$as_gl_Symbol
22438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
22439 $as_echo "$ac_res" >&6; }
22440 eval as_val=\$$as_gl_Symbol
22441 if test "x$as_val" = x""yes; then :
22442 cat >>confdefs.h <<_ACEOF
22443 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
22444 _ACEOF
22445
22446 eval ac_cv_have_decl_$gl_func=yes
22447 fi
22448 done
22449
22450
22451
22452
22453
22454
22455
22456
22457 if test $ac_cv_have_decl_unsetenv = no; then
22458 HAVE_DECL_UNSETENV=0
22459 fi
22460 for ac_func in unsetenv
22461 do :
22462 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
22463 if test "x$ac_cv_func_unsetenv" = x""yes; then :
22464 cat >>confdefs.h <<_ACEOF
22465 #define HAVE_UNSETENV 1
22466 _ACEOF
22467
22468 fi
22469 done
22470
22471 if test $ac_cv_func_unsetenv = no; then
22472 HAVE_UNSETENV=0
22473 else
22474 HAVE_UNSETENV=1
22475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
22476 $as_echo_n "checking for unsetenv() return type... " >&6; }
22477 if test "${gt_cv_func_unsetenv_ret+set}" = set; then :
22478 $as_echo_n "(cached) " >&6
22479 else
22480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22481 /* end confdefs.h. */
22482
22483 #undef _BSD
22484 #define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
22485 #include <stdlib.h>
22486 extern
22487 #ifdef __cplusplus
22488 "C"
22489 #endif
22490 int unsetenv (const char *name);
22491
22492 int
22493 main ()
22494 {
22495
22496 ;
22497 return 0;
22498 }
22499 _ACEOF
22500 if ac_fn_c_try_compile "$LINENO"; then :
22501 gt_cv_func_unsetenv_ret='int'
22502 else
22503 gt_cv_func_unsetenv_ret='void'
22504 fi
22505 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22506 fi
22507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
22508 $as_echo "$gt_cv_func_unsetenv_ret" >&6; }
22509 if test $gt_cv_func_unsetenv_ret = 'void'; then
22510
22511 $as_echo "#define VOID_UNSETENV 1" >>confdefs.h
22512
22513 REPLACE_UNSETENV=1
22514 fi
22515
22516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
22517 $as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
22518 if test "${gl_cv_func_unsetenv_works+set}" = set; then :
22519 $as_echo_n "(cached) " >&6
22520 else
22521 if test "$cross_compiling" = yes; then :
22522 case "$host_os" in
22523 # Guess yes on glibc systems.
22524 *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
22525 # If we don't know, assume the worst.
22526 *) gl_cv_func_unsetenv_works="guessing no" ;;
22527 esac
22528
22529 else
22530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22531 /* end confdefs.h. */
22532
22533 #include <stdlib.h>
22534 #include <errno.h>
22535 extern char **environ;
22536
22537 int
22538 main ()
22539 {
22540
22541 char entry1[] = "a=1";
22542 char entry2[] = "b=2";
22543 char *env[] = { entry1, entry2, NULL };
22544 if (putenv ((char *) "a=1")) return 1;
22545 if (putenv (entry2)) return 2;
22546 entry2[0] = 'a';
22547 unsetenv ("a");
22548 if (getenv ("a")) return 3;
22549 if (!unsetenv ("") || errno != EINVAL) return 4;
22550 entry2[0] = 'b';
22551 environ = env;
22552 if (!getenv ("a")) return 5;
22553 entry2[0] = 'a';
22554 unsetenv ("a");
22555 if (getenv ("a")) return 6;
22556
22557 ;
22558 return 0;
22559 }
22560 _ACEOF
22561 if ac_fn_c_try_run "$LINENO"; then :
22562 gl_cv_func_unsetenv_works=yes
22563 else
22564 gl_cv_func_unsetenv_works=no
22565 fi
22566 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22567 conftest.$ac_objext conftest.beam conftest.$ac_ext
22568 fi
22569
22570 fi
22571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
22572 $as_echo "$gl_cv_func_unsetenv_works" >&6; }
22573 case "$gl_cv_func_unsetenv_works" in
22574 *yes) ;;
22575 *)
22576 REPLACE_UNSETENV=1
22577 ;;
22578 esac
22579 fi
22580
22581 if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
22582
22583
22584
22585
22586
22587
22588
22589
22590 gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
22591
22592
22593
22594
22595
22596 fi
22597
22598
22599
22600
22601
22602 GNULIB_UNSETENV=1
22603
22604
22605
22606
22607
22608 $as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
22609
22610
22611
22612
22613
22614
22615
22616
22617
22618
22619
22620
22621
22622
22623
22624 if test $gl_cv_have_include_next = yes; then
22625 gl_cv_next_wchar_h='<'wchar.h'>'
22626 else
22627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
22628 $as_echo_n "checking absolute name of <wchar.h>... " >&6; }
22629 if test "${gl_cv_next_wchar_h+set}" = set; then :
22630 $as_echo_n "(cached) " >&6
22631 else
22632
22633 if test $ac_cv_header_wchar_h = yes; then
22634
22635
22636
22637
22638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22639 /* end confdefs.h. */
22640 #include <wchar.h>
22641 _ACEOF
22642 case "$host_os" in
22643 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22644 *) gl_absname_cpp="$ac_cpp" ;;
22645 esac
22646
22647 case "$host_os" in
22648 mingw*)
22649 gl_dirsep_regex='[/\\]'
22650 ;;
22651 *)
22652 gl_dirsep_regex='\/'
22653 ;;
22654 esac
22655 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22656 gl_header_literal_regex=`echo 'wchar.h' \
22657 | sed -e "$gl_make_literal_regex_sed"`
22658 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22659 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22660 s|^/[^/]|//&|
22661 p
22662 q
22663 }'
22664
22665 gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22666 sed -n "$gl_absolute_header_sed"`
22667
22668 gl_header=$gl_cv_absolute_wchar_h
22669 gl_cv_next_wchar_h='"'$gl_header'"'
22670 else
22671 gl_cv_next_wchar_h='<'wchar.h'>'
22672 fi
22673
22674
22675 fi
22676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
22677 $as_echo "$gl_cv_next_wchar_h" >&6; }
22678 fi
22679 NEXT_WCHAR_H=$gl_cv_next_wchar_h
22680
22681 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22682 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22683 gl_next_as_first_directive='<'wchar.h'>'
22684 else
22685 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22686 gl_next_as_first_directive=$gl_cv_next_wchar_h
22687 fi
22688 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
22689
22690
22691
22692
22693 if test $ac_cv_header_wchar_h = yes; then
22694 HAVE_WCHAR_H=1
22695 else
22696 HAVE_WCHAR_H=0
22697 fi
22698
22699
22700
22701
22702
22703 if test $gt_cv_c_wint_t = yes; then
22704 HAVE_WINT_T=1
22705 else
22706 HAVE_WINT_T=0
22707 fi
22708
22709
22710
22711 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
22712 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
22713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
22714 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
22715 if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
22716 $as_echo_n "(cached) " >&6
22717 else
22718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22719 /* end confdefs.h. */
22720
22721 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22722 <wchar.h>.
22723 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22724 included before <wchar.h>. */
22725 #if !(defined __GLIBC__ && !defined __UCLIBC__)
22726 # include <stddef.h>
22727 # include <stdio.h>
22728 # include <time.h>
22729 #endif
22730 #include <wchar.h>
22731
22732 int
22733 main ()
22734 {
22735 #undef $gl_func
22736 (void) $gl_func;
22737 ;
22738 return 0;
22739 }
22740 _ACEOF
22741 if ac_fn_c_try_compile "$LINENO"; then :
22742 eval "$as_gl_Symbol=yes"
22743 else
22744 eval "$as_gl_Symbol=no"
22745 fi
22746 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22747 fi
22748 eval ac_res=\$$as_gl_Symbol
22749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
22750 $as_echo "$ac_res" >&6; }
22751 eval as_val=\$$as_gl_Symbol
22752 if test "x$as_val" = x""yes; then :
22753 cat >>confdefs.h <<_ACEOF
22754 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
22755 _ACEOF
22756
22757 eval ac_cv_have_decl_$gl_func=yes
22758 fi
22759 done
22760
22761
22762
22763
22764
22765
22766
22767 if test $ac_cv_func_iswcntrl = yes; then
22768 HAVE_ISWCNTRL=1
22769 else
22770 HAVE_ISWCNTRL=0
22771 fi
22772
22773
22774
22775 if test $gt_cv_c_wint_t = yes; then
22776 HAVE_WINT_T=1
22777 else
22778 HAVE_WINT_T=0
22779 fi
22780
22781
22782
22783
22784
22785
22786
22787
22788
22789
22790
22791 if test $gl_cv_have_include_next = yes; then
22792 gl_cv_next_wctype_h='<'wctype.h'>'
22793 else
22794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
22795 $as_echo_n "checking absolute name of <wctype.h>... " >&6; }
22796 if test "${gl_cv_next_wctype_h+set}" = set; then :
22797 $as_echo_n "(cached) " >&6
22798 else
22799
22800 if test $ac_cv_header_wctype_h = yes; then
22801
22802
22803
22804
22805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22806 /* end confdefs.h. */
22807 #include <wctype.h>
22808 _ACEOF
22809 case "$host_os" in
22810 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22811 *) gl_absname_cpp="$ac_cpp" ;;
22812 esac
22813
22814 case "$host_os" in
22815 mingw*)
22816 gl_dirsep_regex='[/\\]'
22817 ;;
22818 *)
22819 gl_dirsep_regex='\/'
22820 ;;
22821 esac
22822 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22823 gl_header_literal_regex=`echo 'wctype.h' \
22824 | sed -e "$gl_make_literal_regex_sed"`
22825 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22826 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22827 s|^/[^/]|//&|
22828 p
22829 q
22830 }'
22831
22832 gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22833 sed -n "$gl_absolute_header_sed"`
22834
22835 gl_header=$gl_cv_absolute_wctype_h
22836 gl_cv_next_wctype_h='"'$gl_header'"'
22837 else
22838 gl_cv_next_wctype_h='<'wctype.h'>'
22839 fi
22840
22841
22842 fi
22843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
22844 $as_echo "$gl_cv_next_wctype_h" >&6; }
22845 fi
22846 NEXT_WCTYPE_H=$gl_cv_next_wctype_h
22847
22848 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22849 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22850 gl_next_as_first_directive='<'wctype.h'>'
22851 else
22852 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22853 gl_next_as_first_directive=$gl_cv_next_wctype_h
22854 fi
22855 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
22856
22857
22858
22859
22860 if test $ac_cv_header_wctype_h = yes; then
22861 if test $ac_cv_func_iswcntrl = yes; then
22862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
22863 $as_echo_n "checking whether iswcntrl works... " >&6; }
22864 if test "${gl_cv_func_iswcntrl_works+set}" = set; then :
22865 $as_echo_n "(cached) " >&6
22866 else
22867
22868 if test "$cross_compiling" = yes; then :
22869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22870 /* end confdefs.h. */
22871 #include <stdlib.h>
22872 #if __GNU_LIBRARY__ == 1
22873 Linux libc5 i18n is broken.
22874 #endif
22875 int
22876 main ()
22877 {
22878
22879 ;
22880 return 0;
22881 }
22882 _ACEOF
22883 if ac_fn_c_try_compile "$LINENO"; then :
22884 gl_cv_func_iswcntrl_works="guessing yes"
22885 else
22886 gl_cv_func_iswcntrl_works="guessing no"
22887 fi
22888 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22889
22890 else
22891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22892 /* end confdefs.h. */
22893
22894 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
22895 included before <wchar.h>.
22896 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
22897 must be included before <wchar.h>. */
22898 #include <stddef.h>
22899 #include <stdio.h>
22900 #include <time.h>
22901 #include <wchar.h>
22902 #include <wctype.h>
22903 int main () { return iswprint ('x') == 0; }
22904
22905 _ACEOF
22906 if ac_fn_c_try_run "$LINENO"; then :
22907 gl_cv_func_iswcntrl_works=yes
22908 else
22909 gl_cv_func_iswcntrl_works=no
22910 fi
22911 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22912 conftest.$ac_objext conftest.beam conftest.$ac_ext
22913 fi
22914
22915
22916 fi
22917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
22918 $as_echo "$gl_cv_func_iswcntrl_works" >&6; }
22919 fi
22920 HAVE_WCTYPE_H=1
22921 else
22922 HAVE_WCTYPE_H=0
22923 fi
22924
22925
22926 case "$gl_cv_func_iswcntrl_works" in
22927 *yes) REPLACE_ISWCNTRL=0 ;;
22928 *) REPLACE_ISWCNTRL=1 ;;
22929 esac
22930
22931
22932 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
22933 :
22934 fi
22935
22936 if test $REPLACE_ISWCNTRL = 1; then
22937 REPLACE_TOWLOWER=1
22938 else
22939 for ac_func in towlower
22940 do :
22941 ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
22942 if test "x$ac_cv_func_towlower" = x""yes; then :
22943 cat >>confdefs.h <<_ACEOF
22944 #define HAVE_TOWLOWER 1
22945 _ACEOF
22946
22947 fi
22948 done
22949
22950 if test $ac_cv_func_towlower = yes; then
22951 REPLACE_TOWLOWER=0
22952 else
22953 ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
22954 included before <wchar.h>.
22955 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
22956 must be included before <wchar.h>. */
22957 #include <stddef.h>
22958 #include <stdio.h>
22959 #include <time.h>
22960 #include <wchar.h>
22961 #if HAVE_WCTYPE_H
22962 # include <wctype.h>
22963 #endif
22964
22965 "
22966 if test "x$ac_cv_have_decl_towlower" = x""yes; then :
22967 ac_have_decl=1
22968 else
22969 ac_have_decl=0
22970 fi
22971
22972 cat >>confdefs.h <<_ACEOF
22973 #define HAVE_DECL_TOWLOWER $ac_have_decl
22974 _ACEOF
22975
22976 if test $ac_cv_have_decl_towlower = yes; then
22977 REPLACE_TOWLOWER=1
22978 else
22979 REPLACE_TOWLOWER=0
22980 fi
22981 fi
22982 fi
22983
22984
22985 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
22986 :
22987 fi
22988
22989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
22990 $as_echo_n "checking for wctype_t... " >&6; }
22991 if test "${gl_cv_type_wctype_t+set}" = set; then :
22992 $as_echo_n "(cached) " >&6
22993 else
22994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22995 /* end confdefs.h. */
22996 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
22997 included before <wchar.h>.
22998 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
22999 must be included before <wchar.h>. */
23000 #include <stddef.h>
23001 #include <stdio.h>
23002 #include <time.h>
23003 #include <wchar.h>
23004 #if HAVE_WCTYPE_H
23005 # include <wctype.h>
23006 #endif
23007 wctype_t a;
23008
23009 int
23010 main ()
23011 {
23012
23013 ;
23014 return 0;
23015 }
23016 _ACEOF
23017 if ac_fn_c_try_compile "$LINENO"; then :
23018 gl_cv_type_wctype_t=yes
23019 else
23020 gl_cv_type_wctype_t=no
23021 fi
23022 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23023
23024 fi
23025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
23026 $as_echo "$gl_cv_type_wctype_t" >&6; }
23027 if test $gl_cv_type_wctype_t = no; then
23028 HAVE_WCTYPE_T=0
23029 fi
23030
23031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
23032 $as_echo_n "checking for wctrans_t... " >&6; }
23033 if test "${gl_cv_type_wctrans_t+set}" = set; then :
23034 $as_echo_n "(cached) " >&6
23035 else
23036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23037 /* end confdefs.h. */
23038 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
23039 included before <wchar.h>.
23040 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
23041 must be included before <wchar.h>. */
23042 #include <stddef.h>
23043 #include <stdio.h>
23044 #include <time.h>
23045 #include <wchar.h>
23046 #include <wctype.h>
23047 wctrans_t a;
23048
23049 int
23050 main ()
23051 {
23052
23053 ;
23054 return 0;
23055 }
23056 _ACEOF
23057 if ac_fn_c_try_compile "$LINENO"; then :
23058 gl_cv_type_wctrans_t=yes
23059 else
23060 gl_cv_type_wctrans_t=no
23061 fi
23062 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23063
23064 fi
23065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
23066 $as_echo "$gl_cv_type_wctrans_t" >&6; }
23067 if test $gl_cv_type_wctrans_t = no; then
23068 HAVE_WCTRANS_T=0
23069 fi
23070
23071
23072 for gl_func in wctype iswctype wctrans towctrans ; do
23073 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
23074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
23075 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
23076 if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
23077 $as_echo_n "(cached) " >&6
23078 else
23079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23080 /* end confdefs.h. */
23081
23082 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23083 <wchar.h>.
23084 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23085 included before <wchar.h>. */
23086 #if !(defined __GLIBC__ && !defined __UCLIBC__)
23087 # include <stddef.h>
23088 # include <stdio.h>
23089 # include <time.h>
23090 # include <wchar.h>
23091 #endif
23092 #include <wctype.h>
23093
23094 int
23095 main ()
23096 {
23097 #undef $gl_func
23098 (void) $gl_func;
23099 ;
23100 return 0;
23101 }
23102 _ACEOF
23103 if ac_fn_c_try_compile "$LINENO"; then :
23104 eval "$as_gl_Symbol=yes"
23105 else
23106 eval "$as_gl_Symbol=no"
23107 fi
23108 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23109 fi
23110 eval ac_res=\$$as_gl_Symbol
23111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
23112 $as_echo "$ac_res" >&6; }
23113 eval as_val=\$$as_gl_Symbol
23114 if test "x$as_val" = x""yes; then :
23115 cat >>confdefs.h <<_ACEOF
23116 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
23117 _ACEOF
23118
23119 eval ac_cv_have_decl_$gl_func=yes
23120 fi
23121 done
23122
23123
23124 # End of code from modules
23125
23126
23127
23128
23129
23130
23131
23132
23133
23134 gltests_libdeps=
23135 gltests_ltlibdeps=
23136
23137
23138
23139
23140
23141
23142
23143
23144
23145 gl_source_base='tests'
23146 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
23147
23148 gl_module_indicator_condition=$gltests_WITNESS
23149
23150
23151
23152
23153
23154
23155
23156
23157
23158 LIBGNU_LIBDEPS="$gl_libdeps"
23159
23160 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
23161
23162
23163
23164 # We don't use automake, but gnulib does. This line lets us generate
23165 # its Makefile.in.
23166 am__api_version='1.11'
23167
23168 # Find a good install program. We prefer a C program (faster),
23169 # so one script is as good as another. But avoid the broken or
23170 # incompatible versions:
23171 # SysV /etc/install, /usr/sbin/install
23172 # SunOS /usr/etc/install
23173 # IRIX /sbin/install
23174 # AIX /bin/install
23175 # AmigaOS /C/install, which installs bootblocks on floppy discs
23176 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
23177 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
23178 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
23179 # OS/2's system install, which has a completely different semantic
23180 # ./install, which can be erroneously created by make from ./install.sh.
23181 # Reject install programs that cannot install multiple files.
23182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
23183 $as_echo_n "checking for a BSD-compatible install... " >&6; }
23184 if test -z "$INSTALL"; then
23185 if test "${ac_cv_path_install+set}" = set; then :
23186 $as_echo_n "(cached) " >&6
23187 else
23188 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23189 for as_dir in $PATH
23190 do
23191 IFS=$as_save_IFS
23192 test -z "$as_dir" && as_dir=.
23193 # Account for people who put trailing slashes in PATH elements.
23194 case $as_dir/ in #((
23195 ./ | .// | /[cC]/* | \
23196 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
23197 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
23198 /usr/ucb/* ) ;;
23199 *)
23200 # OSF1 and SCO ODT 3.0 have their own names for install.
23201 # Don't use installbsd from OSF since it installs stuff as root
23202 # by default.
23203 for ac_prog in ginstall scoinst install; do
23204 for ac_exec_ext in '' $ac_executable_extensions; do
23205 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
23206 if test $ac_prog = install &&
23207 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
23208 # AIX install. It has an incompatible calling convention.
23209 :
23210 elif test $ac_prog = install &&
23211 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
23212 # program-specific install script used by HP pwplus--don't use.
23213 :
23214 else
23215 rm -rf conftest.one conftest.two conftest.dir
23216 echo one > conftest.one
23217 echo two > conftest.two
23218 mkdir conftest.dir
23219 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
23220 test -s conftest.one && test -s conftest.two &&
23221 test -s conftest.dir/conftest.one &&
23222 test -s conftest.dir/conftest.two
23223 then
23224 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
23225 break 3
23226 fi
23227 fi
23228 fi
23229 done
23230 done
23231 ;;
23232 esac
23233
23234 done
23235 IFS=$as_save_IFS
23236
23237 rm -rf conftest.one conftest.two conftest.dir
23238
23239 fi
23240 if test "${ac_cv_path_install+set}" = set; then
23241 INSTALL=$ac_cv_path_install
23242 else
23243 # As a last resort, use the slow shell script. Don't cache a
23244 # value for INSTALL within a source directory, because that will
23245 # break other packages using the cache if that directory is
23246 # removed, or if the value is a relative name.
23247 INSTALL=$ac_install_sh
23248 fi
23249 fi
23250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
23251 $as_echo "$INSTALL" >&6; }
23252
23253 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
23254 # It thinks the first close brace ends the variable substitution.
23255 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
23256
23257 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
23258
23259 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
23260
23261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
23262 $as_echo_n "checking whether build environment is sane... " >&6; }
23263 # Just in case
23264 sleep 1
23265 echo timestamp > conftest.file
23266 # Reject unsafe characters in $srcdir or the absolute working directory
23267 # name. Accept space and tab only in the latter.
23268 am_lf='
23269 '
23270 case `pwd` in
23271 *[\\\"\#\$\&\'\`$am_lf]*)
23272 as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
23273 esac
23274 case $srcdir in
23275 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
23276 as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
23277 esac
23278
23279 # Do `set' in a subshell so we don't clobber the current shell's
23280 # arguments. Must try -L first in case configure is actually a
23281 # symlink; some systems play weird games with the mod time of symlinks
23282 # (eg FreeBSD returns the mod time of the symlink's containing
23283 # directory).
23284 if (
23285 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
23286 if test "$*" = "X"; then
23287 # -L didn't work.
23288 set X `ls -t "$srcdir/configure" conftest.file`
23289 fi
23290 rm -f conftest.file
23291 if test "$*" != "X $srcdir/configure conftest.file" \
23292 && test "$*" != "X conftest.file $srcdir/configure"; then
23293
23294 # If neither matched, then we have a broken ls. This can happen
23295 # if, for instance, CONFIG_SHELL is bash and it inherits a
23296 # broken ls alias from the environment. This has actually
23297 # happened. Such a system could not be considered "sane".
23298 as_fn_error "ls -t appears to fail. Make sure there is not a broken
23299 alias in your environment" "$LINENO" 5
23300 fi
23301
23302 test "$2" = conftest.file
23303 )
23304 then
23305 # Ok.
23306 :
23307 else
23308 as_fn_error "newly created file is older than distributed files!
23309 Check your system clock" "$LINENO" 5
23310 fi
23311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23312 $as_echo "yes" >&6; }
23313 test "$program_prefix" != NONE &&
23314 program_transform_name="s&^&$program_prefix&;$program_transform_name"
23315 # Use a double $ so make ignores it.
23316 test "$program_suffix" != NONE &&
23317 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
23318 # Double any \ or $.
23319 # By default was `s,x,x', remove it if useless.
23320 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
23321 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
23322
23323 # expand $ac_aux_dir to an absolute path
23324 am_aux_dir=`cd $ac_aux_dir && pwd`
23325
23326 if test x"${MISSING+set}" != xset; then
23327 case $am_aux_dir in
23328 *\ * | *\ *)
23329 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
23330 *)
23331 MISSING="\${SHELL} $am_aux_dir/missing" ;;
23332 esac
23333 fi
23334 # Use eval to expand $SHELL
23335 if eval "$MISSING --run true"; then
23336 am_missing_run="$MISSING --run "
23337 else
23338 am_missing_run=
23339 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
23340 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
23341 fi
23342
23343 if test x"${install_sh}" != xset; then
23344 case $am_aux_dir in
23345 *\ * | *\ *)
23346 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
23347 *)
23348 install_sh="\${SHELL} $am_aux_dir/install-sh"
23349 esac
23350 fi
23351
23352 # Installed binaries are usually stripped using `strip' when the user
23353 # run `make install-strip'. However `strip' might not be the right
23354 # tool to use in cross-compilation environments, therefore Automake
23355 # will honor the `STRIP' environment variable to overrule this program.
23356 if test "$cross_compiling" != no; then
23357 if test -n "$ac_tool_prefix"; then
23358 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
23359 set dummy ${ac_tool_prefix}strip; ac_word=$2
23360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23361 $as_echo_n "checking for $ac_word... " >&6; }
23362 if test "${ac_cv_prog_STRIP+set}" = set; then :
23363 $as_echo_n "(cached) " >&6
23364 else
23365 if test -n "$STRIP"; then
23366 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
23367 else
23368 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23369 for as_dir in $PATH
23370 do
23371 IFS=$as_save_IFS
23372 test -z "$as_dir" && as_dir=.
23373 for ac_exec_ext in '' $ac_executable_extensions; do
23374 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23375 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
23376 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23377 break 2
23378 fi
23379 done
23380 done
23381 IFS=$as_save_IFS
23382
23383 fi
23384 fi
23385 STRIP=$ac_cv_prog_STRIP
23386 if test -n "$STRIP"; then
23387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
23388 $as_echo "$STRIP" >&6; }
23389 else
23390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23391 $as_echo "no" >&6; }
23392 fi
23393
23394
23395 fi
23396 if test -z "$ac_cv_prog_STRIP"; then
23397 ac_ct_STRIP=$STRIP
23398 # Extract the first word of "strip", so it can be a program name with args.
23399 set dummy strip; ac_word=$2
23400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23401 $as_echo_n "checking for $ac_word... " >&6; }
23402 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
23403 $as_echo_n "(cached) " >&6
23404 else
23405 if test -n "$ac_ct_STRIP"; then
23406 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
23407 else
23408 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23409 for as_dir in $PATH
23410 do
23411 IFS=$as_save_IFS
23412 test -z "$as_dir" && as_dir=.
23413 for ac_exec_ext in '' $ac_executable_extensions; do
23414 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23415 ac_cv_prog_ac_ct_STRIP="strip"
23416 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23417 break 2
23418 fi
23419 done
23420 done
23421 IFS=$as_save_IFS
23422
23423 fi
23424 fi
23425 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
23426 if test -n "$ac_ct_STRIP"; then
23427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
23428 $as_echo "$ac_ct_STRIP" >&6; }
23429 else
23430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23431 $as_echo "no" >&6; }
23432 fi
23433
23434 if test "x$ac_ct_STRIP" = x; then
23435 STRIP=":"
23436 else
23437 case $cross_compiling:$ac_tool_warned in
23438 yes:)
23439 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
23440 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
23441 ac_tool_warned=yes ;;
23442 esac
23443 STRIP=$ac_ct_STRIP
23444 fi
23445 else
23446 STRIP="$ac_cv_prog_STRIP"
23447 fi
23448
23449 fi
23450 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
23451
23452 mkdir_p="$MKDIR_P"
23453 case $mkdir_p in
23454 [\\/$]* | ?:[\\/]*) ;;
23455 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
23456 esac
23457
23458 for ac_prog in gawk mawk nawk awk
23459 do
23460 # Extract the first word of "$ac_prog", so it can be a program name with args.
23461 set dummy $ac_prog; ac_word=$2
23462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23463 $as_echo_n "checking for $ac_word... " >&6; }
23464 if test "${ac_cv_prog_AWK+set}" = set; then :
23465 $as_echo_n "(cached) " >&6
23466 else
23467 if test -n "$AWK"; then
23468 ac_cv_prog_AWK="$AWK" # Let the user override the test.
23469 else
23470 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23471 for as_dir in $PATH
23472 do
23473 IFS=$as_save_IFS
23474 test -z "$as_dir" && as_dir=.
23475 for ac_exec_ext in '' $ac_executable_extensions; do
23476 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23477 ac_cv_prog_AWK="$ac_prog"
23478 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23479 break 2
23480 fi
23481 done
23482 done
23483 IFS=$as_save_IFS
23484
23485 fi
23486 fi
23487 AWK=$ac_cv_prog_AWK
23488 if test -n "$AWK"; then
23489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
23490 $as_echo "$AWK" >&6; }
23491 else
23492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23493 $as_echo "no" >&6; }
23494 fi
23495
23496
23497 test -n "$AWK" && break
23498 done
23499
23500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
23501 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
23502 set x ${MAKE-make}
23503 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
23504 if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
23505 $as_echo_n "(cached) " >&6
23506 else
23507 cat >conftest.make <<\_ACEOF
23508 SHELL = /bin/sh
23509 all:
23510 @echo '@@@%%%=$(MAKE)=@@@%%%'
23511 _ACEOF
23512 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
23513 case `${MAKE-make} -f conftest.make 2>/dev/null` in
23514 *@@@%%%=?*=@@@%%%*)
23515 eval ac_cv_prog_make_${ac_make}_set=yes;;
23516 *)
23517 eval ac_cv_prog_make_${ac_make}_set=no;;
23518 esac
23519 rm -f conftest.make
23520 fi
23521 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
23522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23523 $as_echo "yes" >&6; }
23524 SET_MAKE=
23525 else
23526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23527 $as_echo "no" >&6; }
23528 SET_MAKE="MAKE=${MAKE-make}"
23529 fi
23530
23531 rm -rf .tst 2>/dev/null
23532 mkdir .tst 2>/dev/null
23533 if test -d .tst; then
23534 am__leading_dot=.
23535 else
23536 am__leading_dot=_
23537 fi
23538 rmdir .tst 2>/dev/null
23539
23540 DEPDIR="${am__leading_dot}deps"
23541
23542 ac_config_commands="$ac_config_commands depfiles"
23543
23544
23545 am_make=${MAKE-make}
23546 cat > confinc << 'END'
23547 am__doit:
23548 @echo this is the am__doit target
23549 .PHONY: am__doit
23550 END
23551 # If we don't find an include directive, just comment out the code.
23552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
23553 $as_echo_n "checking for style of include used by $am_make... " >&6; }
23554 am__include="#"
23555 am__quote=
23556 _am_result=none
23557 # First try GNU make style include.
23558 echo "include confinc" > confmf
23559 # Ignore all kinds of additional output from `make'.
23560 case `$am_make -s -f confmf 2> /dev/null` in #(
23561 *the\ am__doit\ target*)
23562 am__include=include
23563 am__quote=
23564 _am_result=GNU
23565 ;;
23566 esac
23567 # Now try BSD make style include.
23568 if test "$am__include" = "#"; then
23569 echo '.include "confinc"' > confmf
23570 case `$am_make -s -f confmf 2> /dev/null` in #(
23571 *the\ am__doit\ target*)
23572 am__include=.include
23573 am__quote="\""
23574 _am_result=BSD
23575 ;;
23576 esac
23577 fi
23578
23579
23580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
23581 $as_echo "$_am_result" >&6; }
23582 rm -f confinc confmf
23583
23584 # Check whether --enable-dependency-tracking was given.
23585 if test "${enable_dependency_tracking+set}" = set; then :
23586 enableval=$enable_dependency_tracking;
23587 fi
23588
23589 if test "x$enable_dependency_tracking" != xno; then
23590 am_depcomp="$ac_aux_dir/depcomp"
23591 AMDEPBACKSLASH='\'
23592 fi
23593 if test "x$enable_dependency_tracking" != xno; then
23594 AMDEP_TRUE=
23595 AMDEP_FALSE='#'
23596 else
23597 AMDEP_TRUE='#'
23598 AMDEP_FALSE=
23599 fi
23600
23601
23602 if test "`cd $srcdir && pwd`" != "`pwd`"; then
23603 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
23604 # is not polluted with repeated "-I."
23605 am__isrc=' -I$(srcdir)'
23606 # test to see if srcdir already configured
23607 if test -f $srcdir/config.status; then
23608 as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
23609 fi
23610 fi
23611
23612 # test whether we have cygpath
23613 if test -z "$CYGPATH_W"; then
23614 if (cygpath --version) >/dev/null 2>/dev/null; then
23615 CYGPATH_W='cygpath -w'
23616 else
23617 CYGPATH_W=echo
23618 fi
23619 fi
23620
23621
23622 # Define the identity of the package.
23623 PACKAGE=libgnu
23624 VERSION=UNUSED-VERSION
23625
23626
23627 # Some tools Automake needs.
23628
23629 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
23630
23631
23632 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
23633
23634
23635 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
23636
23637
23638 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
23639
23640
23641 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
23642
23643 # We need awk for the "check" target. The system "awk" is bad on
23644 # some platforms.
23645 # Always define AMTAR for backward compatibility.
23646
23647 AMTAR=${AMTAR-"${am_missing_run}tar"}
23648
23649 am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
23650
23651
23652
23653
23654 depcc="$CC" am_compiler_list=
23655
23656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
23657 $as_echo_n "checking dependency style of $depcc... " >&6; }
23658 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
23659 $as_echo_n "(cached) " >&6
23660 else
23661 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
23662 # We make a subdir and do the tests there. Otherwise we can end up
23663 # making bogus files that we don't know about and never remove. For
23664 # instance it was reported that on HP-UX the gcc test will end up
23665 # making a dummy file named `D' -- because `-MD' means `put the output
23666 # in D'.
23667 mkdir conftest.dir
23668 # Copy depcomp to subdir because otherwise we won't find it if we're
23669 # using a relative directory.
23670 cp "$am_depcomp" conftest.dir
23671 cd conftest.dir
23672 # We will build objects and dependencies in a subdirectory because
23673 # it helps to detect inapplicable dependency modes. For instance
23674 # both Tru64's cc and ICC support -MD to output dependencies as a
23675 # side effect of compilation, but ICC will put the dependencies in
23676 # the current directory while Tru64 will put them in the object
23677 # directory.
23678 mkdir sub
23679
23680 am_cv_CC_dependencies_compiler_type=none
23681 if test "$am_compiler_list" = ""; then
23682 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
23683 fi
23684 am__universal=false
23685 case " $depcc " in #(
23686 *\ -arch\ *\ -arch\ *) am__universal=true ;;
23687 esac
23688
23689 for depmode in $am_compiler_list; do
23690 # Setup a source with many dependencies, because some compilers
23691 # like to wrap large dependency lists on column 80 (with \), and
23692 # we should not choose a depcomp mode which is confused by this.
23693 #
23694 # We need to recreate these files for each test, as the compiler may
23695 # overwrite some of them when testing with obscure command lines.
23696 # This happens at least with the AIX C compiler.
23697 : > sub/conftest.c
23698 for i in 1 2 3 4 5 6; do
23699 echo '#include "conftst'$i'.h"' >> sub/conftest.c
23700 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
23701 # Solaris 8's {/usr,}/bin/sh.
23702 touch sub/conftst$i.h
23703 done
23704 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
23705
23706 # We check with `-c' and `-o' for the sake of the "dashmstdout"
23707 # mode. It turns out that the SunPro C++ compiler does not properly
23708 # handle `-M -o', and we need to detect this. Also, some Intel
23709 # versions had trouble with output in subdirs
23710 am__obj=sub/conftest.${OBJEXT-o}
23711 am__minus_obj="-o $am__obj"
23712 case $depmode in
23713 gcc)
23714 # This depmode causes a compiler race in universal mode.
23715 test "$am__universal" = false || continue
23716 ;;
23717 nosideeffect)
23718 # after this tag, mechanisms are not by side-effect, so they'll
23719 # only be used when explicitly requested
23720 if test "x$enable_dependency_tracking" = xyes; then
23721 continue
23722 else
23723 break
23724 fi
23725 ;;
23726 msvisualcpp | msvcmsys)
23727 # This compiler won't grok `-c -o', but also, the minuso test has
23728 # not run yet. These depmodes are late enough in the game, and
23729 # so weak that their functioning should not be impacted.
23730 am__obj=conftest.${OBJEXT-o}
23731 am__minus_obj=
23732 ;;
23733 none) break ;;
23734 esac
23735 if depmode=$depmode \
23736 source=sub/conftest.c object=$am__obj \
23737 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
23738 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
23739 >/dev/null 2>conftest.err &&
23740 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
23741 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
23742 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
23743 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
23744 # icc doesn't choke on unknown options, it will just issue warnings
23745 # or remarks (even with -Werror). So we grep stderr for any message
23746 # that says an option was ignored or not supported.
23747 # When given -MP, icc 7.0 and 7.1 complain thusly:
23748 # icc: Command line warning: ignoring option '-M'; no argument required
23749 # The diagnosis changed in icc 8.0:
23750 # icc: Command line remark: option '-MP' not supported
23751 if (grep 'ignoring option' conftest.err ||
23752 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
23753 am_cv_CC_dependencies_compiler_type=$depmode
23754 break
23755 fi
23756 fi
23757 done
23758
23759 cd ..
23760 rm -rf conftest.dir
23761 else
23762 am_cv_CC_dependencies_compiler_type=none
23763 fi
23764
23765 fi
23766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
23767 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
23768 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
23769
23770 if
23771 test "x$enable_dependency_tracking" != xno \
23772 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
23773 am__fastdepCC_TRUE=
23774 am__fastdepCC_FALSE='#'
23775 else
23776 am__fastdepCC_TRUE='#'
23777 am__fastdepCC_FALSE=
23778 fi
23779
23780
23781
23782
23783 # --------------------- #
23784 # Checks for programs. #
23785 # --------------------- #
23786
23787
23788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
23789 $as_echo_n "checking whether ln -s works... " >&6; }
23790 LN_S=$as_ln_s
23791 if test "$LN_S" = "ln -s"; then
23792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23793 $as_echo "yes" >&6; }
23794 else
23795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
23796 $as_echo "no, using $LN_S" >&6; }
23797 fi
23798
23799 if test -n "$ac_tool_prefix"; then
23800 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
23801 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
23802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23803 $as_echo_n "checking for $ac_word... " >&6; }
23804 if test "${ac_cv_prog_RANLIB+set}" = set; then :
23805 $as_echo_n "(cached) " >&6
23806 else
23807 if test -n "$RANLIB"; then
23808 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
23809 else
23810 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23811 for as_dir in $PATH
23812 do
23813 IFS=$as_save_IFS
23814 test -z "$as_dir" && as_dir=.
23815 for ac_exec_ext in '' $ac_executable_extensions; do
23816 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23817 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
23818 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23819 break 2
23820 fi
23821 done
23822 done
23823 IFS=$as_save_IFS
23824
23825 fi
23826 fi
23827 RANLIB=$ac_cv_prog_RANLIB
23828 if test -n "$RANLIB"; then
23829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
23830 $as_echo "$RANLIB" >&6; }
23831 else
23832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23833 $as_echo "no" >&6; }
23834 fi
23835
23836
23837 fi
23838 if test -z "$ac_cv_prog_RANLIB"; then
23839 ac_ct_RANLIB=$RANLIB
23840 # Extract the first word of "ranlib", so it can be a program name with args.
23841 set dummy ranlib; ac_word=$2
23842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23843 $as_echo_n "checking for $ac_word... " >&6; }
23844 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
23845 $as_echo_n "(cached) " >&6
23846 else
23847 if test -n "$ac_ct_RANLIB"; then
23848 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
23849 else
23850 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23851 for as_dir in $PATH
23852 do
23853 IFS=$as_save_IFS
23854 test -z "$as_dir" && as_dir=.
23855 for ac_exec_ext in '' $ac_executable_extensions; do
23856 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23857 ac_cv_prog_ac_ct_RANLIB="ranlib"
23858 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23859 break 2
23860 fi
23861 done
23862 done
23863 IFS=$as_save_IFS
23864
23865 fi
23866 fi
23867 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
23868 if test -n "$ac_ct_RANLIB"; then
23869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
23870 $as_echo "$ac_ct_RANLIB" >&6; }
23871 else
23872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23873 $as_echo "no" >&6; }
23874 fi
23875
23876 if test "x$ac_ct_RANLIB" = x; then
23877 RANLIB=":"
23878 else
23879 case $cross_compiling:$ac_tool_warned in
23880 yes:)
23881 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
23882 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
23883 ac_tool_warned=yes ;;
23884 esac
23885 RANLIB=$ac_ct_RANLIB
23886 fi
23887 else
23888 RANLIB="$ac_cv_prog_RANLIB"
23889 fi
23890
23891
23892 if test -n "$ac_tool_prefix"; then
23893 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
23894 set dummy ${ac_tool_prefix}ar; ac_word=$2
23895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23896 $as_echo_n "checking for $ac_word... " >&6; }
23897 if test "${ac_cv_prog_AR+set}" = set; then :
23898 $as_echo_n "(cached) " >&6
23899 else
23900 if test -n "$AR"; then
23901 ac_cv_prog_AR="$AR" # Let the user override the test.
23902 else
23903 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23904 for as_dir in $PATH
23905 do
23906 IFS=$as_save_IFS
23907 test -z "$as_dir" && as_dir=.
23908 for ac_exec_ext in '' $ac_executable_extensions; do
23909 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23910 ac_cv_prog_AR="${ac_tool_prefix}ar"
23911 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23912 break 2
23913 fi
23914 done
23915 done
23916 IFS=$as_save_IFS
23917
23918 fi
23919 fi
23920 AR=$ac_cv_prog_AR
23921 if test -n "$AR"; then
23922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
23923 $as_echo "$AR" >&6; }
23924 else
23925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23926 $as_echo "no" >&6; }
23927 fi
23928
23929
23930 fi
23931 if test -z "$ac_cv_prog_AR"; then
23932 ac_ct_AR=$AR
23933 # Extract the first word of "ar", so it can be a program name with args.
23934 set dummy ar; ac_word=$2
23935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23936 $as_echo_n "checking for $ac_word... " >&6; }
23937 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
23938 $as_echo_n "(cached) " >&6
23939 else
23940 if test -n "$ac_ct_AR"; then
23941 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
23942 else
23943 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23944 for as_dir in $PATH
23945 do
23946 IFS=$as_save_IFS
23947 test -z "$as_dir" && as_dir=.
23948 for ac_exec_ext in '' $ac_executable_extensions; do
23949 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23950 ac_cv_prog_ac_ct_AR="ar"
23951 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23952 break 2
23953 fi
23954 done
23955 done
23956 IFS=$as_save_IFS
23957
23958 fi
23959 fi
23960 ac_ct_AR=$ac_cv_prog_ac_ct_AR
23961 if test -n "$ac_ct_AR"; then
23962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
23963 $as_echo "$ac_ct_AR" >&6; }
23964 else
23965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23966 $as_echo "no" >&6; }
23967 fi
23968
23969 if test "x$ac_ct_AR" = x; then
23970 AR=""
23971 else
23972 case $cross_compiling:$ac_tool_warned in
23973 yes:)
23974 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
23975 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
23976 ac_tool_warned=yes ;;
23977 esac
23978 AR=$ac_ct_AR
23979 fi
23980 else
23981 AR="$ac_cv_prog_AR"
23982 fi
23983
23984
23985 # ---------------------- #
23986 # Checks for libraries. #
23987 # ---------------------- #
23988
23989 ac_config_files="$ac_config_files Makefile import/Makefile"
23990
23991 ac_config_commands="$ac_config_commands default"
23992
23993 cat >confcache <<\_ACEOF
23994 # This file is a shell script that caches the results of configure
23995 # tests run on this system so they can be shared between configure
23996 # scripts and configure runs, see configure's option --config-cache.
23997 # It is not useful on other systems. If it contains results you don't
23998 # want to keep, you may remove or edit it.
23999 #
24000 # config.status only pays attention to the cache file if you give it
24001 # the --recheck option to rerun configure.
24002 #
24003 # `ac_cv_env_foo' variables (set or unset) will be overridden when
24004 # loading this file, other *unset* `ac_cv_foo' will be assigned the
24005 # following values.
24006
24007 _ACEOF
24008
24009 # The following way of writing the cache mishandles newlines in values,
24010 # but we know of no workaround that is simple, portable, and efficient.
24011 # So, we kill variables containing newlines.
24012 # Ultrix sh set writes to stderr and can't be redirected directly,
24013 # and sets the high bit in the cache file unless we assign to the vars.
24014 (
24015 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
24016 eval ac_val=\$$ac_var
24017 case $ac_val in #(
24018 *${as_nl}*)
24019 case $ac_var in #(
24020 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
24021 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
24022 esac
24023 case $ac_var in #(
24024 _ | IFS | as_nl) ;; #(
24025 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
24026 *) { eval $ac_var=; unset $ac_var;} ;;
24027 esac ;;
24028 esac
24029 done
24030
24031 (set) 2>&1 |
24032 case $as_nl`(ac_space=' '; set) 2>&1` in #(
24033 *${as_nl}ac_space=\ *)
24034 # `set' does not quote correctly, so add quotes: double-quote
24035 # substitution turns \\\\ into \\, and sed turns \\ into \.
24036 sed -n \
24037 "s/'/'\\\\''/g;
24038 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
24039 ;; #(
24040 *)
24041 # `set' quotes correctly as required by POSIX, so do not add quotes.
24042 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
24043 ;;
24044 esac |
24045 sort
24046 ) |
24047 sed '
24048 /^ac_cv_env_/b end
24049 t clear
24050 :clear
24051 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
24052 t end
24053 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24054 :end' >>confcache
24055 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
24056 if test -w "$cache_file"; then
24057 test "x$cache_file" != "x/dev/null" &&
24058 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
24059 $as_echo "$as_me: updating cache $cache_file" >&6;}
24060 cat confcache >$cache_file
24061 else
24062 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
24063 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
24064 fi
24065 fi
24066 rm -f confcache
24067
24068 test "x$prefix" = xNONE && prefix=$ac_default_prefix
24069 # Let make expand exec_prefix.
24070 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24071
24072 DEFS=-DHAVE_CONFIG_H
24073
24074 ac_libobjs=
24075 ac_ltlibobjs=
24076 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
24077 # 1. Remove the extension, and $U if already installed.
24078 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
24079 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
24080 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
24081 # will be set to the directory where LIBOBJS objects are built.
24082 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
24083 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
24084 done
24085 LIBOBJS=$ac_libobjs
24086
24087 LTLIBOBJS=$ac_ltlibobjs
24088
24089
24090 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
24091 as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
24092 Usually this means the macro was only invoked conditionally." "$LINENO" 5
24093 fi
24094 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
24095 as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined.
24096 Usually this means the macro was only invoked conditionally." "$LINENO" 5
24097 fi
24098 if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
24099 as_fn_error "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
24100 Usually this means the macro was only invoked conditionally." "$LINENO" 5
24101 fi
24102 if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
24103 as_fn_error "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
24104 Usually this means the macro was only invoked conditionally." "$LINENO" 5
24105 fi
24106 if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
24107 as_fn_error "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
24108 Usually this means the macro was only invoked conditionally." "$LINENO" 5
24109 fi
24110 if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
24111 as_fn_error "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
24112 Usually this means the macro was only invoked conditionally." "$LINENO" 5
24113 fi
24114 if test -z "${GL_GENERATE_GLOB_H_TRUE}" && test -z "${GL_GENERATE_GLOB_H_FALSE}"; then
24115 as_fn_error "conditional \"GL_GENERATE_GLOB_H\" was never defined.
24116 Usually this means the macro was only invoked conditionally." "$LINENO" 5
24117 fi
24118 if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
24119 as_fn_error "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
24120 Usually this means the macro was only invoked conditionally." "$LINENO" 5
24121 fi
24122 if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
24123 as_fn_error "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
24124 Usually this means the macro was only invoked conditionally." "$LINENO" 5
24125 fi
24126 if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
24127 as_fn_error "conditional \"GL_GENERATE_STDINT_H\" was never defined.
24128 Usually this means the macro was only invoked conditionally." "$LINENO" 5
24129 fi
24130
24131
24132 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
24133 as_fn_error "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
24134 Usually this means the macro was only invoked conditionally." "$LINENO" 5
24135 fi
24136 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
24137 as_fn_error "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
24138 Usually this means the macro was only invoked conditionally." "$LINENO" 5
24139 fi
24140
24141 gl_libobjs=
24142 gl_ltlibobjs=
24143 if test -n "$gl_LIBOBJS"; then
24144 # Remove the extension.
24145 sed_drop_objext='s/\.o$//;s/\.obj$//'
24146 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
24147 gl_libobjs="$gl_libobjs $i.$ac_objext"
24148 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
24149 done
24150 fi
24151 gl_LIBOBJS=$gl_libobjs
24152
24153 gl_LTLIBOBJS=$gl_ltlibobjs
24154
24155
24156
24157 gltests_libobjs=
24158 gltests_ltlibobjs=
24159 if test -n "$gltests_LIBOBJS"; then
24160 # Remove the extension.
24161 sed_drop_objext='s/\.o$//;s/\.obj$//'
24162 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
24163 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
24164 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
24165 done
24166 fi
24167 gltests_LIBOBJS=$gltests_libobjs
24168
24169 gltests_LTLIBOBJS=$gltests_ltlibobjs
24170
24171
24172 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
24173 as_fn_error "conditional \"AMDEP\" was never defined.
24174 Usually this means the macro was only invoked conditionally." "$LINENO" 5
24175 fi
24176 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
24177 as_fn_error "conditional \"am__fastdepCC\" was never defined.
24178 Usually this means the macro was only invoked conditionally." "$LINENO" 5
24179 fi
24180 if test -n "$EXEEXT"; then
24181 am__EXEEXT_TRUE=
24182 am__EXEEXT_FALSE='#'
24183 else
24184 am__EXEEXT_TRUE='#'
24185 am__EXEEXT_FALSE=
24186 fi
24187
24188
24189 : ${CONFIG_STATUS=./config.status}
24190 ac_write_fail=0
24191 ac_clean_files_save=$ac_clean_files
24192 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
24193 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
24194 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
24195 as_write_fail=0
24196 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
24197 #! $SHELL
24198 # Generated by $as_me.
24199 # Run this file to recreate the current configuration.
24200 # Compiler output produced by configure, useful for debugging
24201 # configure, is in config.log if it exists.
24202
24203 debug=false
24204 ac_cs_recheck=false
24205 ac_cs_silent=false
24206
24207 SHELL=\${CONFIG_SHELL-$SHELL}
24208 export SHELL
24209 _ASEOF
24210 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
24211 ## -------------------- ##
24212 ## M4sh Initialization. ##
24213 ## -------------------- ##
24214
24215 # Be more Bourne compatible
24216 DUALCASE=1; export DUALCASE # for MKS sh
24217 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
24218 emulate sh
24219 NULLCMD=:
24220 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
24221 # is contrary to our usage. Disable this feature.
24222 alias -g '${1+"$@"}'='"$@"'
24223 setopt NO_GLOB_SUBST
24224 else
24225 case `(set -o) 2>/dev/null` in #(
24226 *posix*) :
24227 set -o posix ;; #(
24228 *) :
24229 ;;
24230 esac
24231 fi
24232
24233
24234 as_nl='
24235 '
24236 export as_nl
24237 # Printing a long string crashes Solaris 7 /usr/bin/printf.
24238 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
24239 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
24240 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
24241 # Prefer a ksh shell builtin over an external printf program on Solaris,
24242 # but without wasting forks for bash or zsh.
24243 if test -z "$BASH_VERSION$ZSH_VERSION" \
24244 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
24245 as_echo='print -r --'
24246 as_echo_n='print -rn --'
24247 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
24248 as_echo='printf %s\n'
24249 as_echo_n='printf %s'
24250 else
24251 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
24252 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
24253 as_echo_n='/usr/ucb/echo -n'
24254 else
24255 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
24256 as_echo_n_body='eval
24257 arg=$1;
24258 case $arg in #(
24259 *"$as_nl"*)
24260 expr "X$arg" : "X\\(.*\\)$as_nl";
24261 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
24262 esac;
24263 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
24264 '
24265 export as_echo_n_body
24266 as_echo_n='sh -c $as_echo_n_body as_echo'
24267 fi
24268 export as_echo_body
24269 as_echo='sh -c $as_echo_body as_echo'
24270 fi
24271
24272 # The user is always right.
24273 if test "${PATH_SEPARATOR+set}" != set; then
24274 PATH_SEPARATOR=:
24275 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
24276 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
24277 PATH_SEPARATOR=';'
24278 }
24279 fi
24280
24281
24282 # IFS
24283 # We need space, tab and new line, in precisely that order. Quoting is
24284 # there to prevent editors from complaining about space-tab.
24285 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
24286 # splitting by setting IFS to empty value.)
24287 IFS=" "" $as_nl"
24288
24289 # Find who we are. Look in the path if we contain no directory separator.
24290 case $0 in #((
24291 *[\\/]* ) as_myself=$0 ;;
24292 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24293 for as_dir in $PATH
24294 do
24295 IFS=$as_save_IFS
24296 test -z "$as_dir" && as_dir=.
24297 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
24298 done
24299 IFS=$as_save_IFS
24300
24301 ;;
24302 esac
24303 # We did not find ourselves, most probably we were run as `sh COMMAND'
24304 # in which case we are not to be found in the path.
24305 if test "x$as_myself" = x; then
24306 as_myself=$0
24307 fi
24308 if test ! -f "$as_myself"; then
24309 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
24310 exit 1
24311 fi
24312
24313 # Unset variables that we do not need and which cause bugs (e.g. in
24314 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
24315 # suppresses any "Segmentation fault" message there. '((' could
24316 # trigger a bug in pdksh 5.2.14.
24317 for as_var in BASH_ENV ENV MAIL MAILPATH
24318 do eval test x\${$as_var+set} = xset \
24319 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
24320 done
24321 PS1='$ '
24322 PS2='> '
24323 PS4='+ '
24324
24325 # NLS nuisances.
24326 LC_ALL=C
24327 export LC_ALL
24328 LANGUAGE=C
24329 export LANGUAGE
24330
24331 # CDPATH.
24332 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
24333
24334
24335 # as_fn_error ERROR [LINENO LOG_FD]
24336 # ---------------------------------
24337 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
24338 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
24339 # script with status $?, using 1 if that was 0.
24340 as_fn_error ()
24341 {
24342 as_status=$?; test $as_status -eq 0 && as_status=1
24343 if test "$3"; then
24344 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
24345 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
24346 fi
24347 $as_echo "$as_me: error: $1" >&2
24348 as_fn_exit $as_status
24349 } # as_fn_error
24350
24351
24352 # as_fn_set_status STATUS
24353 # -----------------------
24354 # Set $? to STATUS, without forking.
24355 as_fn_set_status ()
24356 {
24357 return $1
24358 } # as_fn_set_status
24359
24360 # as_fn_exit STATUS
24361 # -----------------
24362 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
24363 as_fn_exit ()
24364 {
24365 set +e
24366 as_fn_set_status $1
24367 exit $1
24368 } # as_fn_exit
24369
24370 # as_fn_unset VAR
24371 # ---------------
24372 # Portably unset VAR.
24373 as_fn_unset ()
24374 {
24375 { eval $1=; unset $1;}
24376 }
24377 as_unset=as_fn_unset
24378 # as_fn_append VAR VALUE
24379 # ----------------------
24380 # Append the text in VALUE to the end of the definition contained in VAR. Take
24381 # advantage of any shell optimizations that allow amortized linear growth over
24382 # repeated appends, instead of the typical quadratic growth present in naive
24383 # implementations.
24384 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
24385 eval 'as_fn_append ()
24386 {
24387 eval $1+=\$2
24388 }'
24389 else
24390 as_fn_append ()
24391 {
24392 eval $1=\$$1\$2
24393 }
24394 fi # as_fn_append
24395
24396 # as_fn_arith ARG...
24397 # ------------------
24398 # Perform arithmetic evaluation on the ARGs, and store the result in the
24399 # global $as_val. Take advantage of shells that can avoid forks. The arguments
24400 # must be portable across $(()) and expr.
24401 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
24402 eval 'as_fn_arith ()
24403 {
24404 as_val=$(( $* ))
24405 }'
24406 else
24407 as_fn_arith ()
24408 {
24409 as_val=`expr "$@" || test $? -eq 1`
24410 }
24411 fi # as_fn_arith
24412
24413
24414 if expr a : '\(a\)' >/dev/null 2>&1 &&
24415 test "X`expr 00001 : '.*\(...\)'`" = X001; then
24416 as_expr=expr
24417 else
24418 as_expr=false
24419 fi
24420
24421 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
24422 as_basename=basename
24423 else
24424 as_basename=false
24425 fi
24426
24427 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
24428 as_dirname=dirname
24429 else
24430 as_dirname=false
24431 fi
24432
24433 as_me=`$as_basename -- "$0" ||
24434 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
24435 X"$0" : 'X\(//\)$' \| \
24436 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
24437 $as_echo X/"$0" |
24438 sed '/^.*\/\([^/][^/]*\)\/*$/{
24439 s//\1/
24440 q
24441 }
24442 /^X\/\(\/\/\)$/{
24443 s//\1/
24444 q
24445 }
24446 /^X\/\(\/\).*/{
24447 s//\1/
24448 q
24449 }
24450 s/.*/./; q'`
24451
24452 # Avoid depending upon Character Ranges.
24453 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
24454 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
24455 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
24456 as_cr_digits='0123456789'
24457 as_cr_alnum=$as_cr_Letters$as_cr_digits
24458
24459 ECHO_C= ECHO_N= ECHO_T=
24460 case `echo -n x` in #(((((
24461 -n*)
24462 case `echo 'xy\c'` in
24463 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
24464 xy) ECHO_C='\c';;
24465 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
24466 ECHO_T=' ';;
24467 esac;;
24468 *)
24469 ECHO_N='-n';;
24470 esac
24471
24472 rm -f conf$$ conf$$.exe conf$$.file
24473 if test -d conf$$.dir; then
24474 rm -f conf$$.dir/conf$$.file
24475 else
24476 rm -f conf$$.dir
24477 mkdir conf$$.dir 2>/dev/null
24478 fi
24479 if (echo >conf$$.file) 2>/dev/null; then
24480 if ln -s conf$$.file conf$$ 2>/dev/null; then
24481 as_ln_s='ln -s'
24482 # ... but there are two gotchas:
24483 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
24484 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
24485 # In both cases, we have to default to `cp -p'.
24486 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
24487 as_ln_s='cp -p'
24488 elif ln conf$$.file conf$$ 2>/dev/null; then
24489 as_ln_s=ln
24490 else
24491 as_ln_s='cp -p'
24492 fi
24493 else
24494 as_ln_s='cp -p'
24495 fi
24496 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
24497 rmdir conf$$.dir 2>/dev/null
24498
24499
24500 # as_fn_mkdir_p
24501 # -------------
24502 # Create "$as_dir" as a directory, including parents if necessary.
24503 as_fn_mkdir_p ()
24504 {
24505
24506 case $as_dir in #(
24507 -*) as_dir=./$as_dir;;
24508 esac
24509 test -d "$as_dir" || eval $as_mkdir_p || {
24510 as_dirs=
24511 while :; do
24512 case $as_dir in #(
24513 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
24514 *) as_qdir=$as_dir;;
24515 esac
24516 as_dirs="'$as_qdir' $as_dirs"
24517 as_dir=`$as_dirname -- "$as_dir" ||
24518 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24519 X"$as_dir" : 'X\(//\)[^/]' \| \
24520 X"$as_dir" : 'X\(//\)$' \| \
24521 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
24522 $as_echo X"$as_dir" |
24523 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24524 s//\1/
24525 q
24526 }
24527 /^X\(\/\/\)[^/].*/{
24528 s//\1/
24529 q
24530 }
24531 /^X\(\/\/\)$/{
24532 s//\1/
24533 q
24534 }
24535 /^X\(\/\).*/{
24536 s//\1/
24537 q
24538 }
24539 s/.*/./; q'`
24540 test -d "$as_dir" && break
24541 done
24542 test -z "$as_dirs" || eval "mkdir $as_dirs"
24543 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
24544
24545
24546 } # as_fn_mkdir_p
24547 if mkdir -p . 2>/dev/null; then
24548 as_mkdir_p='mkdir -p "$as_dir"'
24549 else
24550 test -d ./-p && rmdir ./-p
24551 as_mkdir_p=false
24552 fi
24553
24554 if test -x / >/dev/null 2>&1; then
24555 as_test_x='test -x'
24556 else
24557 if ls -dL / >/dev/null 2>&1; then
24558 as_ls_L_option=L
24559 else
24560 as_ls_L_option=
24561 fi
24562 as_test_x='
24563 eval sh -c '\''
24564 if test -d "$1"; then
24565 test -d "$1/.";
24566 else
24567 case $1 in #(
24568 -*)set "./$1";;
24569 esac;
24570 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
24571 ???[sx]*):;;*)false;;esac;fi
24572 '\'' sh
24573 '
24574 fi
24575 as_executable_p=$as_test_x
24576
24577 # Sed expression to map a string onto a valid CPP name.
24578 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
24579
24580 # Sed expression to map a string onto a valid variable name.
24581 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
24582
24583
24584 exec 6>&1
24585 ## ----------------------------------- ##
24586 ## Main body of $CONFIG_STATUS script. ##
24587 ## ----------------------------------- ##
24588 _ASEOF
24589 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
24590
24591 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24592 # Save the log message, to keep $0 and so on meaningful, and to
24593 # report actual input values of CONFIG_FILES etc. instead of their
24594 # values after options handling.
24595 ac_log="
24596 This file was extended by $as_me, which was
24597 generated by GNU Autoconf 2.64. Invocation command line was
24598
24599 CONFIG_FILES = $CONFIG_FILES
24600 CONFIG_HEADERS = $CONFIG_HEADERS
24601 CONFIG_LINKS = $CONFIG_LINKS
24602 CONFIG_COMMANDS = $CONFIG_COMMANDS
24603 $ $0 $@
24604
24605 on `(hostname || uname -n) 2>/dev/null | sed 1q`
24606 "
24607
24608 _ACEOF
24609
24610 case $ac_config_files in *"
24611 "*) set x $ac_config_files; shift; ac_config_files=$*;;
24612 esac
24613
24614 case $ac_config_headers in *"
24615 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
24616 esac
24617
24618
24619 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
24620 # Files that config.status was made for.
24621 config_files="$ac_config_files"
24622 config_headers="$ac_config_headers"
24623 config_commands="$ac_config_commands"
24624
24625 _ACEOF
24626
24627 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24628 ac_cs_usage="\
24629 \`$as_me' instantiates files and other configuration actions
24630 from templates according to the current configuration. Unless the files
24631 and actions are specified as TAGs, all are instantiated by default.
24632
24633 Usage: $0 [OPTION]... [TAG]...
24634
24635 -h, --help print this help, then exit
24636 -V, --version print version number and configuration settings, then exit
24637 -q, --quiet, --silent
24638 do not print progress messages
24639 -d, --debug don't remove temporary files
24640 --recheck update $as_me by reconfiguring in the same conditions
24641 --file=FILE[:TEMPLATE]
24642 instantiate the configuration file FILE
24643 --header=FILE[:TEMPLATE]
24644 instantiate the configuration header FILE
24645
24646 Configuration files:
24647 $config_files
24648
24649 Configuration headers:
24650 $config_headers
24651
24652 Configuration commands:
24653 $config_commands
24654
24655 Report bugs to the package provider."
24656
24657 _ACEOF
24658 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
24659 ac_cs_version="\\
24660 config.status
24661 configured by $0, generated by GNU Autoconf 2.64,
24662 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
24663
24664 Copyright (C) 2009 Free Software Foundation, Inc.
24665 This config.status script is free software; the Free Software Foundation
24666 gives unlimited permission to copy, distribute and modify it."
24667
24668 ac_pwd='$ac_pwd'
24669 srcdir='$srcdir'
24670 INSTALL='$INSTALL'
24671 MKDIR_P='$MKDIR_P'
24672 AWK='$AWK'
24673 test -n "\$AWK" || AWK=awk
24674 _ACEOF
24675
24676 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24677 # The default lists apply if the user does not specify any file.
24678 ac_need_defaults=:
24679 while test $# != 0
24680 do
24681 case $1 in
24682 --*=*)
24683 ac_option=`expr "X$1" : 'X\([^=]*\)='`
24684 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
24685 ac_shift=:
24686 ;;
24687 *)
24688 ac_option=$1
24689 ac_optarg=$2
24690 ac_shift=shift
24691 ;;
24692 esac
24693
24694 case $ac_option in
24695 # Handling of the options.
24696 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24697 ac_cs_recheck=: ;;
24698 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
24699 $as_echo "$ac_cs_version"; exit ;;
24700 --debug | --debu | --deb | --de | --d | -d )
24701 debug=: ;;
24702 --file | --fil | --fi | --f )
24703 $ac_shift
24704 case $ac_optarg in
24705 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
24706 esac
24707 as_fn_append CONFIG_FILES " '$ac_optarg'"
24708 ac_need_defaults=false;;
24709 --header | --heade | --head | --hea )
24710 $ac_shift
24711 case $ac_optarg in
24712 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
24713 esac
24714 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
24715 ac_need_defaults=false;;
24716 --he | --h)
24717 # Conflict between --help and --header
24718 as_fn_error "ambiguous option: \`$1'
24719 Try \`$0 --help' for more information.";;
24720 --help | --hel | -h )
24721 $as_echo "$ac_cs_usage"; exit ;;
24722 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
24723 | -silent | --silent | --silen | --sile | --sil | --si | --s)
24724 ac_cs_silent=: ;;
24725
24726 # This is an error.
24727 -*) as_fn_error "unrecognized option: \`$1'
24728 Try \`$0 --help' for more information." ;;
24729
24730 *) as_fn_append ac_config_targets " $1"
24731 ac_need_defaults=false ;;
24732
24733 esac
24734 shift
24735 done
24736
24737 ac_configure_extra_args=
24738
24739 if $ac_cs_silent; then
24740 exec 6>/dev/null
24741 ac_configure_extra_args="$ac_configure_extra_args --silent"
24742 fi
24743
24744 _ACEOF
24745 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
24746 if \$ac_cs_recheck; then
24747 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
24748 shift
24749 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
24750 CONFIG_SHELL='$SHELL'
24751 export CONFIG_SHELL
24752 exec "\$@"
24753 fi
24754
24755 _ACEOF
24756 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24757 exec 5>>config.log
24758 {
24759 echo
24760 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
24761 ## Running $as_me. ##
24762 _ASBOX
24763 $as_echo "$ac_log"
24764 } >&5
24765
24766 _ACEOF
24767 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
24768 #
24769 # INIT-COMMANDS
24770 #
24771 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
24772
24773 _ACEOF
24774
24775 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24776
24777 # Handling of arguments.
24778 for ac_config_target in $ac_config_targets
24779 do
24780 case $ac_config_target in
24781 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
24782 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
24783 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
24784 "import/Makefile") CONFIG_FILES="$CONFIG_FILES import/Makefile" ;;
24785 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
24786
24787 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
24788 esac
24789 done
24790
24791
24792 # If the user did not use the arguments to specify the items to instantiate,
24793 # then the envvar interface is used. Set only those that are not.
24794 # We use the long form for the default assignment because of an extremely
24795 # bizarre bug on SunOS 4.1.3.
24796 if $ac_need_defaults; then
24797 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
24798 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
24799 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
24800 fi
24801
24802 # Have a temporary directory for convenience. Make it in the build tree
24803 # simply because there is no reason against having it here, and in addition,
24804 # creating and moving files from /tmp can sometimes cause problems.
24805 # Hook for its removal unless debugging.
24806 # Note that there is a small window in which the directory will not be cleaned:
24807 # after its creation but before its name has been assigned to `$tmp'.
24808 $debug ||
24809 {
24810 tmp=
24811 trap 'exit_status=$?
24812 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
24813 ' 0
24814 trap 'as_fn_exit 1' 1 2 13 15
24815 }
24816 # Create a (secure) tmp directory for tmp files.
24817
24818 {
24819 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
24820 test -n "$tmp" && test -d "$tmp"
24821 } ||
24822 {
24823 tmp=./conf$$-$RANDOM
24824 (umask 077 && mkdir "$tmp")
24825 } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
24826
24827 # Set up the scripts for CONFIG_FILES section.
24828 # No need to generate them if there are no CONFIG_FILES.
24829 # This happens for instance with `./config.status config.h'.
24830 if test -n "$CONFIG_FILES"; then
24831
24832
24833 ac_cr=`echo X | tr X '\015'`
24834 # On cygwin, bash can eat \r inside `` if the user requested igncr.
24835 # But we know of no other shell where ac_cr would be empty at this
24836 # point, so we can use a bashism as a fallback.
24837 if test "x$ac_cr" = x; then
24838 eval ac_cr=\$\'\\r\'
24839 fi
24840 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
24841 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
24842 ac_cs_awk_cr='\r'
24843 else
24844 ac_cs_awk_cr=$ac_cr
24845 fi
24846
24847 echo 'BEGIN {' >"$tmp/subs1.awk" &&
24848 _ACEOF
24849
24850
24851 {
24852 echo "cat >conf$$subs.awk <<_ACEOF" &&
24853 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
24854 echo "_ACEOF"
24855 } >conf$$subs.sh ||
24856 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
24857 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
24858 ac_delim='%!_!# '
24859 for ac_last_try in false false false false false :; do
24860 . ./conf$$subs.sh ||
24861 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
24862
24863 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
24864 if test $ac_delim_n = $ac_delim_num; then
24865 break
24866 elif $ac_last_try; then
24867 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
24868 else
24869 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
24870 fi
24871 done
24872 rm -f conf$$subs.sh
24873
24874 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
24875 cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
24876 _ACEOF
24877 sed -n '
24878 h
24879 s/^/S["/; s/!.*/"]=/
24880 p
24881 g
24882 s/^[^!]*!//
24883 :repl
24884 t repl
24885 s/'"$ac_delim"'$//
24886 t delim
24887 :nl
24888 h
24889 s/\(.\{148\}\).*/\1/
24890 t more1
24891 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
24892 p
24893 n
24894 b repl
24895 :more1
24896 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
24897 p
24898 g
24899 s/.\{148\}//
24900 t nl
24901 :delim
24902 h
24903 s/\(.\{148\}\).*/\1/
24904 t more2
24905 s/["\\]/\\&/g; s/^/"/; s/$/"/
24906 p
24907 b
24908 :more2
24909 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
24910 p
24911 g
24912 s/.\{148\}//
24913 t delim
24914 ' <conf$$subs.awk | sed '
24915 /^[^""]/{
24916 N
24917 s/\n//
24918 }
24919 ' >>$CONFIG_STATUS || ac_write_fail=1
24920 rm -f conf$$subs.awk
24921 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
24922 _ACAWK
24923 cat >>"\$tmp/subs1.awk" <<_ACAWK &&
24924 for (key in S) S_is_set[key] = 1
24925 FS = "\a"
24926
24927 }
24928 {
24929 line = $ 0
24930 nfields = split(line, field, "@")
24931 substed = 0
24932 len = length(field[1])
24933 for (i = 2; i < nfields; i++) {
24934 key = field[i]
24935 keylen = length(key)
24936 if (S_is_set[key]) {
24937 value = S[key]
24938 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
24939 len += length(value) + length(field[++i])
24940 substed = 1
24941 } else
24942 len += 1 + keylen
24943 }
24944
24945 print line
24946 }
24947
24948 _ACAWK
24949 _ACEOF
24950 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24951 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
24952 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
24953 else
24954 cat
24955 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
24956 || as_fn_error "could not setup config files machinery" "$LINENO" 5
24957 _ACEOF
24958
24959 # VPATH may cause trouble with some makes, so we remove $(srcdir),
24960 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
24961 # trailing colons and then remove the whole line if VPATH becomes empty
24962 # (actually we leave an empty line to preserve line numbers).
24963 if test "x$srcdir" = x.; then
24964 ac_vpsub='/^[ ]*VPATH[ ]*=/{
24965 s/:*\$(srcdir):*/:/
24966 s/:*\${srcdir}:*/:/
24967 s/:*@srcdir@:*/:/
24968 s/^\([^=]*=[ ]*\):*/\1/
24969 s/:*$//
24970 s/^[^=]*=[ ]*$//
24971 }'
24972 fi
24973
24974 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24975 fi # test -n "$CONFIG_FILES"
24976
24977 # Set up the scripts for CONFIG_HEADERS section.
24978 # No need to generate them if there are no CONFIG_HEADERS.
24979 # This happens for instance with `./config.status Makefile'.
24980 if test -n "$CONFIG_HEADERS"; then
24981 cat >"$tmp/defines.awk" <<\_ACAWK ||
24982 BEGIN {
24983 _ACEOF
24984
24985 # Transform confdefs.h into an awk script `defines.awk', embedded as
24986 # here-document in config.status, that substitutes the proper values into
24987 # config.h.in to produce config.h.
24988
24989 # Create a delimiter string that does not exist in confdefs.h, to ease
24990 # handling of long lines.
24991 ac_delim='%!_!# '
24992 for ac_last_try in false false :; do
24993 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
24994 if test -z "$ac_t"; then
24995 break
24996 elif $ac_last_try; then
24997 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
24998 else
24999 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
25000 fi
25001 done
25002
25003 # For the awk script, D is an array of macro values keyed by name,
25004 # likewise P contains macro parameters if any. Preserve backslash
25005 # newline sequences.
25006
25007 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
25008 sed -n '
25009 s/.\{148\}/&'"$ac_delim"'/g
25010 t rset
25011 :rset
25012 s/^[ ]*#[ ]*define[ ][ ]*/ /
25013 t def
25014 d
25015 :def
25016 s/\\$//
25017 t bsnl
25018 s/["\\]/\\&/g
25019 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
25020 D["\1"]=" \3"/p
25021 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
25022 d
25023 :bsnl
25024 s/["\\]/\\&/g
25025 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
25026 D["\1"]=" \3\\\\\\n"\\/p
25027 t cont
25028 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
25029 t cont
25030 d
25031 :cont
25032 n
25033 s/.\{148\}/&'"$ac_delim"'/g
25034 t clear
25035 :clear
25036 s/\\$//
25037 t bsnlc
25038 s/["\\]/\\&/g; s/^/"/; s/$/"/p
25039 d
25040 :bsnlc
25041 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
25042 b cont
25043 ' <confdefs.h | sed '
25044 s/'"$ac_delim"'/"\\\
25045 "/g' >>$CONFIG_STATUS || ac_write_fail=1
25046
25047 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25048 for (key in D) D_is_set[key] = 1
25049 FS = "\a"
25050 }
25051 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
25052 line = \$ 0
25053 split(line, arg, " ")
25054 if (arg[1] == "#") {
25055 defundef = arg[2]
25056 mac1 = arg[3]
25057 } else {
25058 defundef = substr(arg[1], 2)
25059 mac1 = arg[2]
25060 }
25061 split(mac1, mac2, "(") #)
25062 macro = mac2[1]
25063 prefix = substr(line, 1, index(line, defundef) - 1)
25064 if (D_is_set[macro]) {
25065 # Preserve the white space surrounding the "#".
25066 print prefix "define", macro P[macro] D[macro]
25067 next
25068 } else {
25069 # Replace #undef with comments. This is necessary, for example,
25070 # in the case of _POSIX_SOURCE, which is predefined and required
25071 # on some systems where configure will not decide to define it.
25072 if (defundef == "undef") {
25073 print "/*", prefix defundef, macro, "*/"
25074 next
25075 }
25076 }
25077 }
25078 { print }
25079 _ACAWK
25080 _ACEOF
25081 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25082 as_fn_error "could not setup config headers machinery" "$LINENO" 5
25083 fi # test -n "$CONFIG_HEADERS"
25084
25085
25086 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
25087 shift
25088 for ac_tag
25089 do
25090 case $ac_tag in
25091 :[FHLC]) ac_mode=$ac_tag; continue;;
25092 esac
25093 case $ac_mode$ac_tag in
25094 :[FHL]*:*);;
25095 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
25096 :[FH]-) ac_tag=-:-;;
25097 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
25098 esac
25099 ac_save_IFS=$IFS
25100 IFS=:
25101 set x $ac_tag
25102 IFS=$ac_save_IFS
25103 shift
25104 ac_file=$1
25105 shift
25106
25107 case $ac_mode in
25108 :L) ac_source=$1;;
25109 :[FH])
25110 ac_file_inputs=
25111 for ac_f
25112 do
25113 case $ac_f in
25114 -) ac_f="$tmp/stdin";;
25115 *) # Look for the file first in the build tree, then in the source tree
25116 # (if the path is not absolute). The absolute path cannot be DOS-style,
25117 # because $ac_f cannot contain `:'.
25118 test -f "$ac_f" ||
25119 case $ac_f in
25120 [\\/$]*) false;;
25121 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
25122 esac ||
25123 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
25124 esac
25125 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
25126 as_fn_append ac_file_inputs " '$ac_f'"
25127 done
25128
25129 # Let's still pretend it is `configure' which instantiates (i.e., don't
25130 # use $as_me), people would be surprised to read:
25131 # /* config.h. Generated by config.status. */
25132 configure_input='Generated from '`
25133 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
25134 `' by configure.'
25135 if test x"$ac_file" != x-; then
25136 configure_input="$ac_file. $configure_input"
25137 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
25138 $as_echo "$as_me: creating $ac_file" >&6;}
25139 fi
25140 # Neutralize special characters interpreted by sed in replacement strings.
25141 case $configure_input in #(
25142 *\&* | *\|* | *\\* )
25143 ac_sed_conf_input=`$as_echo "$configure_input" |
25144 sed 's/[\\\\&|]/\\\\&/g'`;; #(
25145 *) ac_sed_conf_input=$configure_input;;
25146 esac
25147
25148 case $ac_tag in
25149 *:-:* | *:-) cat >"$tmp/stdin" \
25150 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
25151 esac
25152 ;;
25153 esac
25154
25155 ac_dir=`$as_dirname -- "$ac_file" ||
25156 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25157 X"$ac_file" : 'X\(//\)[^/]' \| \
25158 X"$ac_file" : 'X\(//\)$' \| \
25159 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
25160 $as_echo X"$ac_file" |
25161 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25162 s//\1/
25163 q
25164 }
25165 /^X\(\/\/\)[^/].*/{
25166 s//\1/
25167 q
25168 }
25169 /^X\(\/\/\)$/{
25170 s//\1/
25171 q
25172 }
25173 /^X\(\/\).*/{
25174 s//\1/
25175 q
25176 }
25177 s/.*/./; q'`
25178 as_dir="$ac_dir"; as_fn_mkdir_p
25179 ac_builddir=.
25180
25181 case "$ac_dir" in
25182 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
25183 *)
25184 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
25185 # A ".." for each directory in $ac_dir_suffix.
25186 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
25187 case $ac_top_builddir_sub in
25188 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
25189 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
25190 esac ;;
25191 esac
25192 ac_abs_top_builddir=$ac_pwd
25193 ac_abs_builddir=$ac_pwd$ac_dir_suffix
25194 # for backward compatibility:
25195 ac_top_builddir=$ac_top_build_prefix
25196
25197 case $srcdir in
25198 .) # We are building in place.
25199 ac_srcdir=.
25200 ac_top_srcdir=$ac_top_builddir_sub
25201 ac_abs_top_srcdir=$ac_pwd ;;
25202 [\\/]* | ?:[\\/]* ) # Absolute name.
25203 ac_srcdir=$srcdir$ac_dir_suffix;
25204 ac_top_srcdir=$srcdir
25205 ac_abs_top_srcdir=$srcdir ;;
25206 *) # Relative name.
25207 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
25208 ac_top_srcdir=$ac_top_build_prefix$srcdir
25209 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
25210 esac
25211 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
25212
25213
25214 case $ac_mode in
25215 :F)
25216 #
25217 # CONFIG_FILE
25218 #
25219
25220 case $INSTALL in
25221 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
25222 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
25223 esac
25224 ac_MKDIR_P=$MKDIR_P
25225 case $MKDIR_P in
25226 [\\/$]* | ?:[\\/]* ) ;;
25227 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
25228 esac
25229 _ACEOF
25230
25231 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25232 # If the template does not know about datarootdir, expand it.
25233 # FIXME: This hack should be removed a few years after 2.60.
25234 ac_datarootdir_hack=; ac_datarootdir_seen=
25235 ac_sed_dataroot='
25236 /datarootdir/ {
25237 p
25238 q
25239 }
25240 /@datadir@/p
25241 /@docdir@/p
25242 /@infodir@/p
25243 /@localedir@/p
25244 /@mandir@/p'
25245 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
25246 *datarootdir*) ac_datarootdir_seen=yes;;
25247 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
25248 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
25249 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
25250 _ACEOF
25251 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25252 ac_datarootdir_hack='
25253 s&@datadir@&$datadir&g
25254 s&@docdir@&$docdir&g
25255 s&@infodir@&$infodir&g
25256 s&@localedir@&$localedir&g
25257 s&@mandir@&$mandir&g
25258 s&\\\${datarootdir}&$datarootdir&g' ;;
25259 esac
25260 _ACEOF
25261
25262 # Neutralize VPATH when `$srcdir' = `.'.
25263 # Shell code in configure.ac might set extrasub.
25264 # FIXME: do we really want to maintain this feature?
25265 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25266 ac_sed_extra="$ac_vpsub
25267 $extrasub
25268 _ACEOF
25269 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25270 :t
25271 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
25272 s|@configure_input@|$ac_sed_conf_input|;t t
25273 s&@top_builddir@&$ac_top_builddir_sub&;t t
25274 s&@top_build_prefix@&$ac_top_build_prefix&;t t
25275 s&@srcdir@&$ac_srcdir&;t t
25276 s&@abs_srcdir@&$ac_abs_srcdir&;t t
25277 s&@top_srcdir@&$ac_top_srcdir&;t t
25278 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
25279 s&@builddir@&$ac_builddir&;t t
25280 s&@abs_builddir@&$ac_abs_builddir&;t t
25281 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
25282 s&@INSTALL@&$ac_INSTALL&;t t
25283 s&@MKDIR_P@&$ac_MKDIR_P&;t t
25284 $ac_datarootdir_hack
25285 "
25286 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
25287 || as_fn_error "could not create $ac_file" "$LINENO" 5
25288
25289 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
25290 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
25291 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
25292 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25293 which seems to be undefined. Please make sure it is defined." >&5
25294 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25295 which seems to be undefined. Please make sure it is defined." >&2;}
25296
25297 rm -f "$tmp/stdin"
25298 case $ac_file in
25299 -) cat "$tmp/out" && rm -f "$tmp/out";;
25300 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
25301 esac \
25302 || as_fn_error "could not create $ac_file" "$LINENO" 5
25303 ;;
25304 :H)
25305 #
25306 # CONFIG_HEADER
25307 #
25308 if test x"$ac_file" != x-; then
25309 {
25310 $as_echo "/* $configure_input */" \
25311 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
25312 } >"$tmp/config.h" \
25313 || as_fn_error "could not create $ac_file" "$LINENO" 5
25314 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
25315 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
25316 $as_echo "$as_me: $ac_file is unchanged" >&6;}
25317 else
25318 rm -f "$ac_file"
25319 mv "$tmp/config.h" "$ac_file" \
25320 || as_fn_error "could not create $ac_file" "$LINENO" 5
25321 fi
25322 else
25323 $as_echo "/* $configure_input */" \
25324 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
25325 || as_fn_error "could not create -" "$LINENO" 5
25326 fi
25327 # Compute "$ac_file"'s index in $config_headers.
25328 _am_arg="$ac_file"
25329 _am_stamp_count=1
25330 for _am_header in $config_headers :; do
25331 case $_am_header in
25332 $_am_arg | $_am_arg:* )
25333 break ;;
25334 * )
25335 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
25336 esac
25337 done
25338 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
25339 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25340 X"$_am_arg" : 'X\(//\)[^/]' \| \
25341 X"$_am_arg" : 'X\(//\)$' \| \
25342 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
25343 $as_echo X"$_am_arg" |
25344 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25345 s//\1/
25346 q
25347 }
25348 /^X\(\/\/\)[^/].*/{
25349 s//\1/
25350 q
25351 }
25352 /^X\(\/\/\)$/{
25353 s//\1/
25354 q
25355 }
25356 /^X\(\/\).*/{
25357 s//\1/
25358 q
25359 }
25360 s/.*/./; q'`/stamp-h$_am_stamp_count
25361 ;;
25362
25363 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
25364 $as_echo "$as_me: executing $ac_file commands" >&6;}
25365 ;;
25366 esac
25367
25368
25369 case $ac_file$ac_mode in
25370 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
25371 # Autoconf 2.62 quotes --file arguments for eval, but not when files
25372 # are listed without --file. Let's play safe and only enable the eval
25373 # if we detect the quoting.
25374 case $CONFIG_FILES in
25375 *\'*) eval set x "$CONFIG_FILES" ;;
25376 *) set x $CONFIG_FILES ;;
25377 esac
25378 shift
25379 for mf
25380 do
25381 # Strip MF so we end up with the name of the file.
25382 mf=`echo "$mf" | sed -e 's/:.*$//'`
25383 # Check whether this is an Automake generated Makefile or not.
25384 # We used to match only the files named `Makefile.in', but
25385 # some people rename them; so instead we look at the file content.
25386 # Grep'ing the first line is not enough: some people post-process
25387 # each Makefile.in and add a new line on top of each file to say so.
25388 # Grep'ing the whole file is not good either: AIX grep has a line
25389 # limit of 2048, but all sed's we know have understand at least 4000.
25390 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
25391 dirpart=`$as_dirname -- "$mf" ||
25392 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25393 X"$mf" : 'X\(//\)[^/]' \| \
25394 X"$mf" : 'X\(//\)$' \| \
25395 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
25396 $as_echo X"$mf" |
25397 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25398 s//\1/
25399 q
25400 }
25401 /^X\(\/\/\)[^/].*/{
25402 s//\1/
25403 q
25404 }
25405 /^X\(\/\/\)$/{
25406 s//\1/
25407 q
25408 }
25409 /^X\(\/\).*/{
25410 s//\1/
25411 q
25412 }
25413 s/.*/./; q'`
25414 else
25415 continue
25416 fi
25417 # Extract the definition of DEPDIR, am__include, and am__quote
25418 # from the Makefile without running `make'.
25419 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
25420 test -z "$DEPDIR" && continue
25421 am__include=`sed -n 's/^am__include = //p' < "$mf"`
25422 test -z "am__include" && continue
25423 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
25424 # When using ansi2knr, U may be empty or an underscore; expand it
25425 U=`sed -n 's/^U = //p' < "$mf"`
25426 # Find all dependency output files, they are included files with
25427 # $(DEPDIR) in their names. We invoke sed twice because it is the
25428 # simplest approach to changing $(DEPDIR) to its actual value in the
25429 # expansion.
25430 for file in `sed -n "
25431 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
25432 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
25433 # Make sure the directory exists.
25434 test -f "$dirpart/$file" && continue
25435 fdir=`$as_dirname -- "$file" ||
25436 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25437 X"$file" : 'X\(//\)[^/]' \| \
25438 X"$file" : 'X\(//\)$' \| \
25439 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
25440 $as_echo X"$file" |
25441 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25442 s//\1/
25443 q
25444 }
25445 /^X\(\/\/\)[^/].*/{
25446 s//\1/
25447 q
25448 }
25449 /^X\(\/\/\)$/{
25450 s//\1/
25451 q
25452 }
25453 /^X\(\/\).*/{
25454 s//\1/
25455 q
25456 }
25457 s/.*/./; q'`
25458 as_dir=$dirpart/$fdir; as_fn_mkdir_p
25459 # echo "creating $dirpart/$file"
25460 echo '# dummy' > "$dirpart/$file"
25461 done
25462 done
25463 }
25464 ;;
25465 "default":C)
25466 case x$CONFIG_HEADERS in
25467 xconfig.h:config.in)
25468 echo > stamp-h ;;
25469 esac
25470 ;;
25471
25472 esac
25473 done # for ac_tag
25474
25475
25476 as_fn_exit 0
25477 _ACEOF
25478 ac_clean_files=$ac_clean_files_save
25479
25480 test $ac_write_fail = 0 ||
25481 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
25482
25483
25484 # configure is writing to config.log, and then calls config.status.
25485 # config.status does its own redirection, appending to config.log.
25486 # Unfortunately, on DOS this fails, as config.log is still kept open
25487 # by configure, so config.status won't be able to write to it; its
25488 # output is simply discarded. So we exec the FD to /dev/null,
25489 # effectively closing config.log, so it can be properly (re)opened and
25490 # appended to by config.status. When coming back to configure, we
25491 # need to make the FD available again.
25492 if test "$no_create" != yes; then
25493 ac_cs_success=:
25494 ac_config_status_args=
25495 test "$silent" = yes &&
25496 ac_config_status_args="$ac_config_status_args --quiet"
25497 exec 5>/dev/null
25498 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
25499 exec 5>>config.log
25500 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25501 # would make configure fail if this is the last instruction.
25502 $ac_cs_success || as_fn_exit $?
25503 fi
25504 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
25505 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
25506 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
25507 fi
25508
25509
25510 exit 0
This page took 0.744909 seconds and 4 git commands to generate.