]> git.proxmox.com Git - grub2.git/blob - configure
Prepare 2.06-13 release
[grub2.git] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for GRUB 2.06.
4 #
5 # Report bugs to <bug-grub@gnu.org>.
6 #
7 #
8 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
9 #
10 #
11 # This configure script is free software; the Free Software Foundation
12 # gives unlimited permission to copy, distribute and modify it.
13 ## -------------------- ##
14 ## M4sh Initialization. ##
15 ## -------------------- ##
16
17 # Be more Bourne compatible
18 DUALCASE=1; export DUALCASE # for MKS sh
19 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
20 emulate sh
21 NULLCMD=:
22 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
23 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
25 setopt NO_GLOB_SUBST
26 else
27 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
32 esac
33 fi
34
35
36 as_nl='
37 '
38 export as_nl
39 # Printing a long string crashes Solaris 7 /usr/bin/printf.
40 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43 # Prefer a ksh shell builtin over an external printf program on Solaris,
44 # but without wasting forks for bash or zsh.
45 if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52 else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
56 else
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
60 case $arg in #(
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
69 fi
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72 fi
73
74 # The user is always right.
75 if test "${PATH_SEPARATOR+set}" != set; then
76 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
81 fi
82
83
84 # IFS
85 # We need space, tab and new line, in precisely that order. Quoting is
86 # there to prevent editors from complaining about space-tab.
87 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
88 # splitting by setting IFS to empty value.)
89 IFS=" "" $as_nl"
90
91 # Find who we are. Look in the path if we contain no directory separator.
92 as_myself=
93 case $0 in #((
94 *[\\/]* ) as_myself=$0 ;;
95 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
96 for as_dir in $PATH
97 do
98 IFS=$as_save_IFS
99 test -z "$as_dir" && as_dir=.
100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101 done
102 IFS=$as_save_IFS
103
104 ;;
105 esac
106 # We did not find ourselves, most probably we were run as `sh COMMAND'
107 # in which case we are not to be found in the path.
108 if test "x$as_myself" = x; then
109 as_myself=$0
110 fi
111 if test ! -f "$as_myself"; then
112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113 exit 1
114 fi
115
116 # Unset variables that we do not need and which cause bugs (e.g. in
117 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
118 # suppresses any "Segmentation fault" message there. '((' could
119 # trigger a bug in pdksh 5.2.14.
120 for as_var in BASH_ENV ENV MAIL MAILPATH
121 do eval test x\${$as_var+set} = xset \
122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
123 done
124 PS1='$ '
125 PS2='> '
126 PS4='+ '
127
128 # NLS nuisances.
129 LC_ALL=C
130 export LC_ALL
131 LANGUAGE=C
132 export LANGUAGE
133
134 # CDPATH.
135 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
137 # Use a proper internal environment variable to ensure we don't fall
138 # into an infinite loop, continuously re-executing ourselves.
139 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140 _as_can_reexec=no; export _as_can_reexec;
141 # We cannot yet assume a decent shell, so we have to provide a
142 # neutralization value for shells without unset; and this also
143 # works around shells that cannot unset nonexistent variables.
144 # Preserve -v and -x to the replacement shell.
145 BASH_ENV=/dev/null
146 ENV=/dev/null
147 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148 case $- in # ((((
149 *v*x* | *x*v* ) as_opts=-vx ;;
150 *v* ) as_opts=-v ;;
151 *x* ) as_opts=-x ;;
152 * ) as_opts= ;;
153 esac
154 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155 # Admittedly, this is quite paranoid, since all the known shells bail
156 # out after a failed `exec'.
157 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158 as_fn_exit 255
159 fi
160 # We don't want this to propagate to other subprocesses.
161 { _as_can_reexec=; unset _as_can_reexec;}
162 if test "x$CONFIG_SHELL" = x; then
163 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164 emulate sh
165 NULLCMD=:
166 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167 # is contrary to our usage. Disable this feature.
168 alias -g '\${1+\"\$@\"}'='\"\$@\"'
169 setopt NO_GLOB_SUBST
170 else
171 case \`(set -o) 2>/dev/null\` in #(
172 *posix*) :
173 set -o posix ;; #(
174 *) :
175 ;;
176 esac
177 fi
178 "
179 as_required="as_fn_return () { (exit \$1); }
180 as_fn_success () { as_fn_return 0; }
181 as_fn_failure () { as_fn_return 1; }
182 as_fn_ret_success () { return 0; }
183 as_fn_ret_failure () { return 1; }
184
185 exitcode=0
186 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192 else
193 exitcode=1; echo positional parameters were not saved.
194 fi
195 test x\$exitcode = x0 || exit 1
196 test -x / || exit 1"
197 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201 test \$(( 1 + 1 )) = 2 || exit 1"
202 if (eval "$as_required") 2>/dev/null; then :
203 as_have_required=yes
204 else
205 as_have_required=no
206 fi
207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209 else
210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211 as_found=false
212 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213 do
214 IFS=$as_save_IFS
215 test -z "$as_dir" && as_dir=.
216 as_found=:
217 case $as_dir in #(
218 /*)
219 for as_base in sh bash ksh sh5; do
220 # Try only shells that exist, to save several forks.
221 as_shell=$as_dir/$as_base
222 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 CONFIG_SHELL=$as_shell as_have_required=yes
225 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226 break 2
227 fi
228 fi
229 done;;
230 esac
231 as_found=false
232 done
233 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235 CONFIG_SHELL=$SHELL as_have_required=yes
236 fi; }
237 IFS=$as_save_IFS
238
239
240 if test "x$CONFIG_SHELL" != x; then :
241 export CONFIG_SHELL
242 # We cannot yet assume a decent shell, so we have to provide a
243 # neutralization value for shells without unset; and this also
244 # works around shells that cannot unset nonexistent variables.
245 # Preserve -v and -x to the replacement shell.
246 BASH_ENV=/dev/null
247 ENV=/dev/null
248 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249 case $- in # ((((
250 *v*x* | *x*v* ) as_opts=-vx ;;
251 *v* ) as_opts=-v ;;
252 *x* ) as_opts=-x ;;
253 * ) as_opts= ;;
254 esac
255 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256 # Admittedly, this is quite paranoid, since all the known shells bail
257 # out after a failed `exec'.
258 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259 exit 255
260 fi
261
262 if test x$as_have_required = xno; then :
263 $as_echo "$0: This script requires a shell more modern than all"
264 $as_echo "$0: the shells that I found on your system."
265 if test x${ZSH_VERSION+set} = xset ; then
266 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268 else
269 $as_echo "$0: Please tell bug-autoconf@gnu.org and bug-grub@gnu.org
270 $0: about your system, including any error possibly output
271 $0: before this message. Then install a modern shell, or
272 $0: manually run the script under such a shell if you do
273 $0: have one."
274 fi
275 exit 1
276 fi
277 fi
278 fi
279 SHELL=${CONFIG_SHELL-/bin/sh}
280 export SHELL
281 # Unset more variables known to interfere with behavior of common tools.
282 CLICOLOR_FORCE= GREP_OPTIONS=
283 unset CLICOLOR_FORCE GREP_OPTIONS
284
285 ## --------------------- ##
286 ## M4sh Shell Functions. ##
287 ## --------------------- ##
288 # as_fn_unset VAR
289 # ---------------
290 # Portably unset VAR.
291 as_fn_unset ()
292 {
293 { eval $1=; unset $1;}
294 }
295 as_unset=as_fn_unset
296
297 # as_fn_set_status STATUS
298 # -----------------------
299 # Set $? to STATUS, without forking.
300 as_fn_set_status ()
301 {
302 return $1
303 } # as_fn_set_status
304
305 # as_fn_exit STATUS
306 # -----------------
307 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308 as_fn_exit ()
309 {
310 set +e
311 as_fn_set_status $1
312 exit $1
313 } # as_fn_exit
314
315 # as_fn_mkdir_p
316 # -------------
317 # Create "$as_dir" as a directory, including parents if necessary.
318 as_fn_mkdir_p ()
319 {
320
321 case $as_dir in #(
322 -*) as_dir=./$as_dir;;
323 esac
324 test -d "$as_dir" || eval $as_mkdir_p || {
325 as_dirs=
326 while :; do
327 case $as_dir in #(
328 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329 *) as_qdir=$as_dir;;
330 esac
331 as_dirs="'$as_qdir' $as_dirs"
332 as_dir=`$as_dirname -- "$as_dir" ||
333 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334 X"$as_dir" : 'X\(//\)[^/]' \| \
335 X"$as_dir" : 'X\(//\)$' \| \
336 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337 $as_echo X"$as_dir" |
338 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339 s//\1/
340 q
341 }
342 /^X\(\/\/\)[^/].*/{
343 s//\1/
344 q
345 }
346 /^X\(\/\/\)$/{
347 s//\1/
348 q
349 }
350 /^X\(\/\).*/{
351 s//\1/
352 q
353 }
354 s/.*/./; q'`
355 test -d "$as_dir" && break
356 done
357 test -z "$as_dirs" || eval "mkdir $as_dirs"
358 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
359
360
361 } # as_fn_mkdir_p
362
363 # as_fn_executable_p FILE
364 # -----------------------
365 # Test if FILE is an executable regular file.
366 as_fn_executable_p ()
367 {
368 test -f "$1" && test -x "$1"
369 } # as_fn_executable_p
370 # as_fn_append VAR VALUE
371 # ----------------------
372 # Append the text in VALUE to the end of the definition contained in VAR. Take
373 # advantage of any shell optimizations that allow amortized linear growth over
374 # repeated appends, instead of the typical quadratic growth present in naive
375 # implementations.
376 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377 eval 'as_fn_append ()
378 {
379 eval $1+=\$2
380 }'
381 else
382 as_fn_append ()
383 {
384 eval $1=\$$1\$2
385 }
386 fi # as_fn_append
387
388 # as_fn_arith ARG...
389 # ------------------
390 # Perform arithmetic evaluation on the ARGs, and store the result in the
391 # global $as_val. Take advantage of shells that can avoid forks. The arguments
392 # must be portable across $(()) and expr.
393 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394 eval 'as_fn_arith ()
395 {
396 as_val=$(( $* ))
397 }'
398 else
399 as_fn_arith ()
400 {
401 as_val=`expr "$@" || test $? -eq 1`
402 }
403 fi # as_fn_arith
404
405
406 # as_fn_error STATUS ERROR [LINENO LOG_FD]
407 # ----------------------------------------
408 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
410 # script with STATUS, using 1 if that was 0.
411 as_fn_error ()
412 {
413 as_status=$1; test $as_status -eq 0 && as_status=1
414 if test "$4"; then
415 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
417 fi
418 $as_echo "$as_me: error: $2" >&2
419 as_fn_exit $as_status
420 } # as_fn_error
421
422 if expr a : '\(a\)' >/dev/null 2>&1 &&
423 test "X`expr 00001 : '.*\(...\)'`" = X001; then
424 as_expr=expr
425 else
426 as_expr=false
427 fi
428
429 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430 as_basename=basename
431 else
432 as_basename=false
433 fi
434
435 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436 as_dirname=dirname
437 else
438 as_dirname=false
439 fi
440
441 as_me=`$as_basename -- "$0" ||
442 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443 X"$0" : 'X\(//\)$' \| \
444 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
445 $as_echo X/"$0" |
446 sed '/^.*\/\([^/][^/]*\)\/*$/{
447 s//\1/
448 q
449 }
450 /^X\/\(\/\/\)$/{
451 s//\1/
452 q
453 }
454 /^X\/\(\/\).*/{
455 s//\1/
456 q
457 }
458 s/.*/./; q'`
459
460 # Avoid depending upon Character Ranges.
461 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464 as_cr_digits='0123456789'
465 as_cr_alnum=$as_cr_Letters$as_cr_digits
466
467
468 as_lineno_1=$LINENO as_lineno_1a=$LINENO
469 as_lineno_2=$LINENO as_lineno_2a=$LINENO
470 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
473 sed -n '
474 p
475 /[$]LINENO/=
476 ' <$as_myself |
477 sed '
478 s/[$]LINENO.*/&-/
479 t lineno
480 b
481 :lineno
482 N
483 :loop
484 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
485 t loop
486 s/-\n.*//
487 ' >$as_me.lineno &&
488 chmod +x "$as_me.lineno" ||
489 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
490
491 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492 # already done that, so ensure we don't try to do so again and fall
493 # in an infinite loop. This has already happened in practice.
494 _as_can_reexec=no; export _as_can_reexec
495 # Don't try to exec as it changes $[0], causing all sort of problems
496 # (the dirname of $[0] is not the place where we might find the
497 # original and so on. Autoconf is especially sensitive to this).
498 . "./$as_me.lineno"
499 # Exit status is that of the last command.
500 exit
501 }
502
503 ECHO_C= ECHO_N= ECHO_T=
504 case `echo -n x` in #(((((
505 -n*)
506 case `echo 'xy\c'` in
507 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
508 xy) ECHO_C='\c';;
509 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
510 ECHO_T=' ';;
511 esac;;
512 *)
513 ECHO_N='-n';;
514 esac
515
516 rm -f conf$$ conf$$.exe conf$$.file
517 if test -d conf$$.dir; then
518 rm -f conf$$.dir/conf$$.file
519 else
520 rm -f conf$$.dir
521 mkdir conf$$.dir 2>/dev/null
522 fi
523 if (echo >conf$$.file) 2>/dev/null; then
524 if ln -s conf$$.file conf$$ 2>/dev/null; then
525 as_ln_s='ln -s'
526 # ... but there are two gotchas:
527 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
529 # In both cases, we have to default to `cp -pR'.
530 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
531 as_ln_s='cp -pR'
532 elif ln conf$$.file conf$$ 2>/dev/null; then
533 as_ln_s=ln
534 else
535 as_ln_s='cp -pR'
536 fi
537 else
538 as_ln_s='cp -pR'
539 fi
540 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541 rmdir conf$$.dir 2>/dev/null
542
543 if mkdir -p . 2>/dev/null; then
544 as_mkdir_p='mkdir -p "$as_dir"'
545 else
546 test -d ./-p && rmdir ./-p
547 as_mkdir_p=false
548 fi
549
550 as_test_x='test -x'
551 as_executable_p=as_fn_executable_p
552
553 # Sed expression to map a string onto a valid CPP name.
554 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
555
556 # Sed expression to map a string onto a valid variable name.
557 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
558
559
560 test -n "$DJDIR" || exec 7<&0 </dev/null
561 exec 6>&1
562
563 # Name of the host.
564 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
565 # so uname gets run too.
566 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
568 #
569 # Initializations.
570 #
571 ac_default_prefix=/usr/local
572 ac_clean_files=
573 ac_config_libobj_dir=.
574 LIBOBJS=
575 cross_compiling=no
576 subdirs=
577 MFLAGS=
578 MAKEFLAGS=
579
580 # Identity of this package.
581 PACKAGE_NAME='GRUB'
582 PACKAGE_TARNAME='grub'
583 PACKAGE_VERSION='2.06'
584 PACKAGE_STRING='GRUB 2.06'
585 PACKAGE_BUGREPORT='bug-grub@gnu.org'
586 PACKAGE_URL=''
587
588 ac_unique_file="include/grub/dl.h"
589 # Factoring default headers for most tests.
590 ac_includes_default="\
591 #include <stdio.h>
592 #ifdef HAVE_SYS_TYPES_H
593 # include <sys/types.h>
594 #endif
595 #ifdef HAVE_SYS_STAT_H
596 # include <sys/stat.h>
597 #endif
598 #ifdef STDC_HEADERS
599 # include <stdlib.h>
600 # include <stddef.h>
601 #else
602 # ifdef HAVE_STDLIB_H
603 # include <stdlib.h>
604 # endif
605 #endif
606 #ifdef HAVE_STRING_H
607 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
608 # include <memory.h>
609 # endif
610 # include <string.h>
611 #endif
612 #ifdef HAVE_STRINGS_H
613 # include <strings.h>
614 #endif
615 #ifdef HAVE_INTTYPES_H
616 # include <inttypes.h>
617 #endif
618 #ifdef HAVE_STDINT_H
619 # include <stdint.h>
620 #endif
621 #ifdef HAVE_UNISTD_H
622 # include <unistd.h>
623 #endif"
624
625 gl_use_threads_default=
626 gt_needs=
627 ac_header_list=
628 ac_func_list=
629 gl_fnmatch_required=POSIX
630 gl_getopt_required=POSIX
631 ac_subst_vars='gltests_LTLIBOBJS
632 gltests_LIBOBJS
633 gl_LTLIBOBJS
634 gl_LIBOBJS
635 am__EXEEXT_FALSE
636 am__EXEEXT_TRUE
637 LTLIBOBJS
638 LIBOBJS
639 COND_HAVE_EXEC_FALSE
640 COND_HAVE_EXEC_TRUE
641 COND_STARFIELD_FALSE
642 COND_STARFIELD_TRUE
643 COND_HAVE_ASM_USCORE_FALSE
644 COND_HAVE_ASM_USCORE_TRUE
645 COND_HAVE_CXX_FALSE
646 COND_HAVE_CXX_TRUE
647 COND_ENABLE_BOOT_TIME_STATS_FALSE
648 COND_ENABLE_BOOT_TIME_STATS_TRUE
649 COND_ENABLE_CACHE_STATS_FALSE
650 COND_ENABLE_CACHE_STATS_TRUE
651 COND_ENABLE_EFIEMU_FALSE
652 COND_ENABLE_EFIEMU_TRUE
653 COND_APPLE_LINKER_FALSE
654 COND_APPLE_LINKER_TRUE
655 HAVE_FONT_SOURCE
656 COND_HAVE_FONT_SOURCE_FALSE
657 COND_HAVE_FONT_SOURCE_TRUE
658 COND_GRUB_MOUNT_FALSE
659 COND_GRUB_MOUNT_TRUE
660 COND_GRUB_MKFONT_FALSE
661 COND_GRUB_MKFONT_TRUE
662 COND_GRUB_EMU_PCI_FALSE
663 COND_GRUB_EMU_PCI_TRUE
664 COND_GRUB_EMU_SDL_FALSE
665 COND_GRUB_EMU_SDL_TRUE
666 COND_MAN_PAGES_FALSE
667 COND_MAN_PAGES_TRUE
668 COND_HOST_ILLUMOS_FALSE
669 COND_HOST_ILLUMOS_TRUE
670 COND_HOST_XNU_FALSE
671 COND_HOST_XNU_TRUE
672 COND_HOST_KFREEBSD_FALSE
673 COND_HOST_KFREEBSD_TRUE
674 COND_HOST_WINDOWS_FALSE
675 COND_HOST_WINDOWS_TRUE
676 COND_HOST_NETBSD_FALSE
677 COND_HOST_NETBSD_TRUE
678 COND_HOST_LINUX_FALSE
679 COND_HOST_LINUX_TRUE
680 COND_HOST_HURD_FALSE
681 COND_HOST_HURD_TRUE
682 COND_riscv64_efi_FALSE
683 COND_riscv64_efi_TRUE
684 COND_riscv32_efi_FALSE
685 COND_riscv32_efi_TRUE
686 COND_riscv64_FALSE
687 COND_riscv64_TRUE
688 COND_riscv32_FALSE
689 COND_riscv32_TRUE
690 COND_arm64_efi_FALSE
691 COND_arm64_efi_TRUE
692 COND_arm64_FALSE
693 COND_arm64_TRUE
694 COND_arm_efi_FALSE
695 COND_arm_efi_TRUE
696 COND_arm_coreboot_FALSE
697 COND_arm_coreboot_TRUE
698 COND_arm_uboot_FALSE
699 COND_arm_uboot_TRUE
700 COND_arm_FALSE
701 COND_arm_TRUE
702 COND_mipseb_FALSE
703 COND_mipseb_TRUE
704 COND_mipsel_FALSE
705 COND_mipsel_TRUE
706 COND_mips_FALSE
707 COND_mips_TRUE
708 COND_powerpc_ieee1275_FALSE
709 COND_powerpc_ieee1275_TRUE
710 COND_sparc64_emu_FALSE
711 COND_sparc64_emu_TRUE
712 COND_sparc64_ieee1275_FALSE
713 COND_sparc64_ieee1275_TRUE
714 COND_mips_arc_FALSE
715 COND_mips_arc_TRUE
716 COND_mips_qemu_mips_FALSE
717 COND_mips_qemu_mips_TRUE
718 COND_mips_loongson_FALSE
719 COND_mips_loongson_TRUE
720 COND_x86_64_xen_FALSE
721 COND_x86_64_xen_TRUE
722 COND_i386_xen_pvh_FALSE
723 COND_i386_xen_pvh_TRUE
724 COND_i386_xen_FALSE
725 COND_i386_xen_TRUE
726 COND_x86_64_efi_FALSE
727 COND_x86_64_efi_TRUE
728 COND_i386_multiboot_FALSE
729 COND_i386_multiboot_TRUE
730 COND_i386_coreboot_FALSE
731 COND_i386_coreboot_TRUE
732 COND_i386_ieee1275_FALSE
733 COND_i386_ieee1275_TRUE
734 COND_i386_qemu_FALSE
735 COND_i386_qemu_TRUE
736 COND_ia64_efi_FALSE
737 COND_ia64_efi_TRUE
738 COND_i386_efi_FALSE
739 COND_i386_efi_TRUE
740 COND_i386_pc_FALSE
741 COND_i386_pc_TRUE
742 COND_emu_FALSE
743 COND_emu_TRUE
744 COND_real_platform_FALSE
745 COND_real_platform_TRUE
746 BUILD_LIBM
747 HOST_CCASFLAGS
748 HOST_CPPFLAGS
749 HOST_LDFLAGS
750 HOST_CFLAGS
751 TARGET_APPLE_LINKER
752 TARGET_IMG_BASE_LDOPT
753 TARGET_IMG_CFLAGS
754 TARGET_IMG_LDFLAGS
755 TARGET_CCASFLAGS
756 TARGET_CPPFLAGS
757 TARGET_LDFLAGS
758 TARGET_CFLAGS
759 TARGET_CC_VERSION
760 TARGET_MODULE_FORMAT
761 TARGET_OBJ2ELF
762 TARGET_CCAS
763 TARGET_CPP
764 GRUB_PLATFORM
765 GRUB_TARGET_CPU
766 END_SYMBOL
767 BSS_START_SYMBOL
768 HAVE_ASM_USCORE
769 GRUB_BOOT_MACHINE_LINK_ADDR
770 LIBNVPAIR
771 LIBZFS
772 LIBLZMA
773 LIBGEOM
774 LIBDEVMAPPER
775 enable_grub_mount
776 FONT_SOURCE
777 DJVU_FONT_SOURCE
778 BUILD_FREETYPE_LIBS
779 BUILD_FREETYPE_CFLAGS
780 BUILD_WORDS_BIGENDIAN
781 BUILD_SIZEOF_VOID_P
782 BUILD_SIZEOF_LONG
783 enable_grub_mkfont
784 FREETYPE_LIBS
785 FREETYPE_CFLAGS
786 enable_grub_emu_pci
787 enable_grub_emu_sdl
788 LIBPCIACCESS
789 LIBSDL
790 BOOT_TIME_STATS
791 DISK_CACHE_STATS
792 TARGET_NMFLAGS_DEFINED_ONLY
793 TARGET_NMFLAGS_MINUS_P
794 TARGET_LDFLAGS_OLDMAGIC
795 EFIEMU64_LINK_FORMAT
796 enable_efiemu
797 TARGET_OBJCONV
798 BUILD_LDFLAGS
799 BUILD_CPPFLAGS
800 BUILD_CFLAGS
801 HOST_CC
802 TARGET_RANLIB
803 TARGET_NM
804 TARGET_STRIP
805 TARGET_OBJCOPY
806 ac_ct_TARGET_CC
807 TARGET_CC
808 LIBGNU_LTLIBDEPS
809 LIBGNU_LIBDEPS
810 gltests_WITNESS
811 REPLACE_TOWLOWER
812 REPLACE_ISWCNTRL
813 HAVE_WCTYPE_H
814 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
815 NEXT_WCTYPE_H
816 HAVE_ISWCNTRL
817 REPLACE_ISWBLANK
818 HAVE_WCTRANS_T
819 HAVE_WCTYPE_T
820 HAVE_ISWBLANK
821 GNULIB_TOWCTRANS
822 GNULIB_WCTRANS
823 GNULIB_ISWCTYPE
824 GNULIB_WCTYPE
825 GNULIB_ISWBLANK
826 HAVE_CRTDEFS_H
827 HAVE_WINT_T
828 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
829 NEXT_WCHAR_H
830 HAVE_FEATURES_H
831 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE
832 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE
833 LIBUNISTRING_UNIWIDTH_H
834 LIBUNISTRING_UNITYPES_H
835 HAVE_UNISTD_H
836 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
837 NEXT_UNISTD_H
838 UNISTD_H_DEFINES_STRUCT_TIMESPEC
839 PTHREAD_H_DEFINES_STRUCT_TIMESPEC
840 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
841 TIME_H_DEFINES_STRUCT_TIMESPEC
842 NEXT_AS_FIRST_DIRECTIVE_TIME_H
843 NEXT_TIME_H
844 REPLACE_LOCALTIME
845 REPLACE_GMTIME
846 GNULIB_GETTIMEOFDAY
847 REPLACE_TZSET
848 REPLACE_TIMEGM
849 REPLACE_STRFTIME
850 REPLACE_NANOSLEEP
851 REPLACE_MKTIME
852 REPLACE_LOCALTIME_R
853 REPLACE_CTIME
854 HAVE_TIMEZONE_T
855 HAVE_TZSET
856 HAVE_TIMEGM
857 HAVE_STRPTIME
858 HAVE_NANOSLEEP
859 HAVE_DECL_LOCALTIME_R
860 GNULIB_TZSET
861 GNULIB_TIME_RZ
862 GNULIB_TIME_R
863 GNULIB_TIMEGM
864 GNULIB_STRPTIME
865 GNULIB_STRFTIME
866 GNULIB_NANOSLEEP
867 GNULIB_LOCALTIME
868 GNULIB_MKTIME
869 GNULIB_CTIME
870 GL_GENERATE_SYSEXITS_H_FALSE
871 GL_GENERATE_SYSEXITS_H_TRUE
872 SYSEXITS_H
873 HAVE_SYSEXITS_H
874 NEXT_AS_FIRST_DIRECTIVE_SYSEXITS_H
875 NEXT_SYSEXITS_H
876 WINDOWS_STAT_INODES
877 WINDOWS_64_BIT_OFF_T
878 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
879 NEXT_SYS_TYPES_H
880 HAVE_STRINGS_H
881 NEXT_AS_FIRST_DIRECTIVE_STRINGS_H
882 NEXT_STRINGS_H
883 NEXT_AS_FIRST_DIRECTIVE_STRING_H
884 NEXT_STRING_H
885 HAVE_DECL_STRNCASECMP
886 HAVE_STRCASECMP
887 HAVE_FFS
888 GNULIB_FFS
889 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
890 NEXT_STDLIB_H
891 NEXT_AS_FIRST_DIRECTIVE_STDIO_H
892 NEXT_STDIO_H
893 GL_GENERATE_STDINT_H_FALSE
894 GL_GENERATE_STDINT_H_TRUE
895 STDINT_H
896 HAVE_SYS_INTTYPES_H
897 HAVE_SYS_BITYPES_H
898 HAVE_C99_STDINT_H
899 WINT_T_SUFFIX
900 WCHAR_T_SUFFIX
901 SIG_ATOMIC_T_SUFFIX
902 SIZE_T_SUFFIX
903 PTRDIFF_T_SUFFIX
904 HAVE_SIGNED_WINT_T
905 HAVE_SIGNED_WCHAR_T
906 HAVE_SIGNED_SIG_ATOMIC_T
907 BITSIZEOF_WINT_T
908 BITSIZEOF_WCHAR_T
909 BITSIZEOF_SIG_ATOMIC_T
910 BITSIZEOF_SIZE_T
911 BITSIZEOF_PTRDIFF_T
912 HAVE_STDINT_H
913 NEXT_AS_FIRST_DIRECTIVE_STDINT_H
914 NEXT_STDINT_H
915 HAVE_SYS_TYPES_H
916 HAVE_INTTYPES_H
917 HAVE_WCHAR_H
918 HAVE_UNSIGNED_LONG_LONG_INT
919 HAVE_LONG_LONG_INT
920 GNULIB_OVERRIDES_WINT_T
921 HAVE__BOOL
922 GL_GENERATE_STDBOOL_H_FALSE
923 GL_GENERATE_STDBOOL_H_TRUE
924 STDBOOL_H
925 GL_GENERATE_STDALIGN_H_FALSE
926 GL_GENERATE_STDALIGN_H_TRUE
927 STDALIGN_H
928 GLIBC21
929 APPLE_UNIVERSAL_BUILD
930 UNDEFINE_STRTOK_R
931 REPLACE_STRSIGNAL
932 REPLACE_STRERROR_R
933 REPLACE_STRERROR
934 REPLACE_STRTOK_R
935 REPLACE_STRCASESTR
936 REPLACE_STRSTR
937 REPLACE_STRNLEN
938 REPLACE_STRNDUP
939 REPLACE_STRNCAT
940 REPLACE_STRDUP
941 REPLACE_STRCHRNUL
942 REPLACE_STPNCPY
943 REPLACE_MEMMEM
944 REPLACE_MEMCHR
945 HAVE_STRVERSCMP
946 HAVE_DECL_STRSIGNAL
947 HAVE_DECL_STRERROR_R
948 HAVE_DECL_STRTOK_R
949 HAVE_STRCASESTR
950 HAVE_STRSEP
951 HAVE_STRPBRK
952 HAVE_DECL_STRNLEN
953 HAVE_DECL_STRNDUP
954 HAVE_DECL_STRDUP
955 HAVE_STRCHRNUL
956 HAVE_STPNCPY
957 HAVE_STPCPY
958 HAVE_RAWMEMCHR
959 HAVE_DECL_MEMRCHR
960 HAVE_MEMPCPY
961 HAVE_DECL_MEMMEM
962 HAVE_MEMCHR
963 HAVE_FFSLL
964 HAVE_FFSL
965 HAVE_EXPLICIT_BZERO
966 HAVE_MBSLEN
967 GNULIB_STRVERSCMP
968 GNULIB_STRSIGNAL
969 GNULIB_STRERROR_R
970 GNULIB_STRERROR
971 GNULIB_MBSTOK_R
972 GNULIB_MBSSEP
973 GNULIB_MBSSPN
974 GNULIB_MBSPBRK
975 GNULIB_MBSCSPN
976 GNULIB_MBSCASESTR
977 GNULIB_MBSPCASECMP
978 GNULIB_MBSNCASECMP
979 GNULIB_MBSCASECMP
980 GNULIB_MBSSTR
981 GNULIB_MBSRCHR
982 GNULIB_MBSCHR
983 GNULIB_MBSNLEN
984 GNULIB_MBSLEN
985 GNULIB_STRTOK_R
986 GNULIB_STRCASESTR
987 GNULIB_STRSTR
988 GNULIB_STRSEP
989 GNULIB_STRPBRK
990 GNULIB_STRNLEN
991 GNULIB_STRNDUP
992 GNULIB_STRNCAT
993 GNULIB_STRDUP
994 GNULIB_STRCHRNUL
995 GNULIB_STPNCPY
996 GNULIB_STPCPY
997 GNULIB_RAWMEMCHR
998 GNULIB_MEMRCHR
999 GNULIB_MEMPCPY
1000 GNULIB_MEMMEM
1001 GNULIB_MEMCHR
1002 GNULIB_FFSLL
1003 GNULIB_FFSL
1004 GNULIB_EXPLICIT_BZERO
1005 LOCALE_FR_UTF8
1006 LOCALE_ZH_CN
1007 LOCALE_JA
1008 REPLACE_WCTOMB
1009 REPLACE_UNSETENV
1010 REPLACE_STRTOD
1011 REPLACE_SETENV
1012 REPLACE_REALPATH
1013 REPLACE_REALLOC
1014 REPLACE_RANDOM_R
1015 REPLACE_QSORT_R
1016 REPLACE_PUTENV
1017 REPLACE_PTSNAME_R
1018 REPLACE_PTSNAME
1019 REPLACE_MKSTEMP
1020 REPLACE_MBTOWC
1021 REPLACE_MALLOC
1022 REPLACE_CANONICALIZE_FILE_NAME
1023 REPLACE_CALLOC
1024 HAVE_DECL_UNSETENV
1025 HAVE_UNLOCKPT
1026 HAVE_SYS_LOADAVG_H
1027 HAVE_STRUCT_RANDOM_DATA
1028 HAVE_STRTOULL
1029 HAVE_STRTOLL
1030 HAVE_STRTOD
1031 HAVE_DECL_SETSTATE
1032 HAVE_DECL_SETENV
1033 HAVE_SETENV
1034 HAVE_SECURE_GETENV
1035 HAVE_RPMATCH
1036 HAVE_REALPATH
1037 HAVE_REALLOCARRAY
1038 HAVE_RANDOM_R
1039 HAVE_RANDOM_H
1040 HAVE_RANDOM
1041 HAVE_QSORT_R
1042 HAVE_PTSNAME_R
1043 HAVE_PTSNAME
1044 HAVE_POSIX_OPENPT
1045 HAVE_MKSTEMPS
1046 HAVE_MKSTEMP
1047 HAVE_MKOSTEMPS
1048 HAVE_MKOSTEMP
1049 HAVE_MKDTEMP
1050 HAVE_DECL_INITSTATE
1051 HAVE_GRANTPT
1052 HAVE_GETSUBOPT
1053 HAVE_DECL_GETLOADAVG
1054 HAVE_CANONICALIZE_FILE_NAME
1055 HAVE_ATOLL
1056 HAVE__EXIT
1057 GNULIB_WCTOMB
1058 GNULIB_UNSETENV
1059 GNULIB_UNLOCKPT
1060 GNULIB_SYSTEM_POSIX
1061 GNULIB_STRTOULL
1062 GNULIB_STRTOLL
1063 GNULIB_STRTOD
1064 GNULIB_SETENV
1065 GNULIB_SECURE_GETENV
1066 GNULIB_RPMATCH
1067 GNULIB_REALPATH
1068 GNULIB_REALLOC_POSIX
1069 GNULIB_REALLOCARRAY
1070 GNULIB_RANDOM_R
1071 GNULIB_RANDOM
1072 GNULIB_QSORT_R
1073 GNULIB_PUTENV
1074 GNULIB_PTSNAME_R
1075 GNULIB_PTSNAME
1076 GNULIB_POSIX_OPENPT
1077 GNULIB_MKSTEMPS
1078 GNULIB_MKSTEMP
1079 GNULIB_MKOSTEMPS
1080 GNULIB_MKOSTEMP
1081 GNULIB_MKDTEMP
1082 GNULIB_MBTOWC
1083 GNULIB_MALLOC_POSIX
1084 GNULIB_GRANTPT
1085 GNULIB_GETSUBOPT
1086 GNULIB_GETLOADAVG
1087 GNULIB_CANONICALIZE_FILE_NAME
1088 GNULIB_CALLOC_POSIX
1089 GNULIB_ATOLL
1090 GNULIB__EXIT
1091 LTLIBMULTITHREAD
1092 LIBMULTITHREAD
1093 LTLIBTHREAD
1094 LIBTHREAD
1095 LIBPTH_PREFIX
1096 LTLIBPTH
1097 LIBPTH
1098 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H
1099 NEXT_LOCALE_H
1100 HAVE_XLOCALE_H
1101 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
1102 NEXT_STDDEF_H
1103 GL_GENERATE_STDDEF_H_FALSE
1104 GL_GENERATE_STDDEF_H_TRUE
1105 STDDEF_H
1106 HAVE_WCHAR_T
1107 HAVE_MAX_ALIGN_T
1108 REPLACE_NULL
1109 REPLACE_STRUCT_LCONV
1110 REPLACE_FREELOCALE
1111 REPLACE_DUPLOCALE
1112 REPLACE_NEWLOCALE
1113 REPLACE_SETLOCALE
1114 REPLACE_LOCALECONV
1115 HAVE_FREELOCALE
1116 HAVE_DUPLOCALE
1117 HAVE_NEWLOCALE
1118 GNULIB_LOCALENAME
1119 GNULIB_DUPLOCALE
1120 GNULIB_SETLOCALE
1121 GNULIB_LOCALECONV
1122 LOCALCHARSET_TESTS_ENVIRONMENT
1123 GL_GENERATE_LIMITS_H_FALSE
1124 GL_GENERATE_LIMITS_H_TRUE
1125 LIMITS_H
1126 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H
1127 NEXT_LIMITS_H
1128 HAVE_LANGINFO_YESEXPR
1129 HAVE_LANGINFO_ERA
1130 HAVE_LANGINFO_ALTMON
1131 HAVE_LANGINFO_T_FMT_AMPM
1132 HAVE_LANGINFO_CODESET
1133 HAVE_LANGINFO_H
1134 NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H
1135 NEXT_LANGINFO_H
1136 REPLACE_NL_LANGINFO
1137 HAVE_NL_LANGINFO
1138 GNULIB_NL_LANGINFO
1139 GNULIB_GL_UNISTD_H_GETOPT
1140 GETOPT_CDEFS_H
1141 GETOPT_H
1142 HAVE_SYS_CDEFS_H
1143 HAVE_GETOPT_H
1144 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
1145 NEXT_GETOPT_H
1146 REPLACE_VSPRINTF
1147 REPLACE_VSNPRINTF
1148 REPLACE_VPRINTF
1149 REPLACE_VFPRINTF
1150 REPLACE_VDPRINTF
1151 REPLACE_VASPRINTF
1152 REPLACE_TMPFILE
1153 REPLACE_STDIO_WRITE_FUNCS
1154 REPLACE_STDIO_READ_FUNCS
1155 REPLACE_SPRINTF
1156 REPLACE_SNPRINTF
1157 REPLACE_RENAMEAT
1158 REPLACE_RENAME
1159 REPLACE_REMOVE
1160 REPLACE_PRINTF
1161 REPLACE_POPEN
1162 REPLACE_PERROR
1163 REPLACE_OBSTACK_PRINTF
1164 REPLACE_GETLINE
1165 REPLACE_GETDELIM
1166 REPLACE_FTELLO
1167 REPLACE_FTELL
1168 REPLACE_FSEEKO
1169 REPLACE_FSEEK
1170 REPLACE_FREOPEN
1171 REPLACE_FPURGE
1172 REPLACE_FPRINTF
1173 REPLACE_FOPEN
1174 REPLACE_FFLUSH
1175 REPLACE_FDOPEN
1176 REPLACE_FCLOSE
1177 REPLACE_DPRINTF
1178 HAVE_VDPRINTF
1179 HAVE_VASPRINTF
1180 HAVE_RENAMEAT
1181 HAVE_POPEN
1182 HAVE_PCLOSE
1183 HAVE_FTELLO
1184 HAVE_FSEEKO
1185 HAVE_DPRINTF
1186 HAVE_DECL_VSNPRINTF
1187 HAVE_DECL_SNPRINTF
1188 HAVE_DECL_OBSTACK_PRINTF
1189 HAVE_DECL_GETLINE
1190 HAVE_DECL_GETDELIM
1191 HAVE_DECL_FTELLO
1192 HAVE_DECL_FSEEKO
1193 HAVE_DECL_FPURGE
1194 GNULIB_VSPRINTF_POSIX
1195 GNULIB_VSNPRINTF
1196 GNULIB_VPRINTF_POSIX
1197 GNULIB_VPRINTF
1198 GNULIB_VFPRINTF_POSIX
1199 GNULIB_VFPRINTF
1200 GNULIB_VDPRINTF
1201 GNULIB_VSCANF
1202 GNULIB_VFSCANF
1203 GNULIB_VASPRINTF
1204 GNULIB_TMPFILE
1205 GNULIB_STDIO_H_SIGPIPE
1206 GNULIB_STDIO_H_NONBLOCKING
1207 GNULIB_SPRINTF_POSIX
1208 GNULIB_SNPRINTF
1209 GNULIB_SCANF
1210 GNULIB_RENAMEAT
1211 GNULIB_RENAME
1212 GNULIB_REMOVE
1213 GNULIB_PUTS
1214 GNULIB_PUTCHAR
1215 GNULIB_PUTC
1216 GNULIB_PRINTF_POSIX
1217 GNULIB_PRINTF
1218 GNULIB_POPEN
1219 GNULIB_PERROR
1220 GNULIB_PCLOSE
1221 GNULIB_OBSTACK_PRINTF_POSIX
1222 GNULIB_OBSTACK_PRINTF
1223 GNULIB_GETLINE
1224 GNULIB_GETDELIM
1225 GNULIB_GETCHAR
1226 GNULIB_GETC
1227 GNULIB_FWRITE
1228 GNULIB_FTELLO
1229 GNULIB_FTELL
1230 GNULIB_FSEEKO
1231 GNULIB_FSEEK
1232 GNULIB_FSCANF
1233 GNULIB_FREOPEN
1234 GNULIB_FREAD
1235 GNULIB_FPUTS
1236 GNULIB_FPUTC
1237 GNULIB_FPURGE
1238 GNULIB_FPRINTF_POSIX
1239 GNULIB_FPRINTF
1240 GNULIB_FOPEN
1241 GNULIB_FGETS
1242 GNULIB_FGETC
1243 GNULIB_FFLUSH
1244 GNULIB_FDOPEN
1245 GNULIB_FCLOSE
1246 GNULIB_DPRINTF
1247 WINDOWS_64_BIT_ST_SIZE
1248 WINDOWS_STAT_TIMESPEC
1249 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
1250 NEXT_SYS_STAT_H
1251 REPLACE_UTIMENSAT
1252 REPLACE_STAT
1253 REPLACE_MKNOD
1254 REPLACE_MKFIFO
1255 REPLACE_MKDIR
1256 REPLACE_LSTAT
1257 REPLACE_FUTIMENS
1258 REPLACE_FSTATAT
1259 REPLACE_FSTAT
1260 HAVE_UTIMENSAT
1261 HAVE_MKNODAT
1262 HAVE_MKNOD
1263 HAVE_MKFIFOAT
1264 HAVE_MKFIFO
1265 HAVE_MKDIRAT
1266 HAVE_LSTAT
1267 HAVE_LCHMOD
1268 HAVE_FUTIMENS
1269 HAVE_FSTATAT
1270 HAVE_FCHMODAT
1271 GNULIB_OVERRIDES_STRUCT_STAT
1272 GNULIB_UTIMENSAT
1273 GNULIB_STAT
1274 GNULIB_MKNODAT
1275 GNULIB_MKNOD
1276 GNULIB_MKFIFOAT
1277 GNULIB_MKFIFO
1278 GNULIB_MKDIRAT
1279 GNULIB_LSTAT
1280 GNULIB_LCHMOD
1281 GNULIB_FUTIMENS
1282 GNULIB_FSTATAT
1283 GNULIB_FSTAT
1284 GNULIB_FCHMODAT
1285 GL_GENERATE_FNMATCH_H_FALSE
1286 GL_GENERATE_FNMATCH_H_TRUE
1287 FNMATCH_H
1288 HAVE_FNMATCH_H
1289 NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H
1290 NEXT_FNMATCH_H
1291 REPLACE_FNMATCH
1292 HAVE_FNMATCH
1293 GNULIB_FNMATCH
1294 REPLACE_ITOLD
1295 GL_GENERATE_FLOAT_H_FALSE
1296 GL_GENERATE_FLOAT_H_TRUE
1297 FLOAT_H
1298 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1299 NEXT_FLOAT_H
1300 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1301 NEXT_FCNTL_H
1302 REPLACE_OPENAT
1303 REPLACE_OPEN
1304 REPLACE_FCNTL
1305 HAVE_OPENAT
1306 HAVE_FCNTL
1307 GNULIB_OPENAT
1308 GNULIB_OPEN
1309 GNULIB_NONBLOCKING
1310 GNULIB_FCNTL
1311 EOVERFLOW_VALUE
1312 EOVERFLOW_HIDDEN
1313 ENOLINK_VALUE
1314 ENOLINK_HIDDEN
1315 EMULTIHOP_VALUE
1316 EMULTIHOP_HIDDEN
1317 GL_GENERATE_ERRNO_H_FALSE
1318 GL_GENERATE_ERRNO_H_TRUE
1319 ERRNO_H
1320 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1321 NEXT_ERRNO_H
1322 HAVE_DIRENT_H
1323 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1324 NEXT_DIRENT_H
1325 PRAGMA_COLUMNS
1326 PRAGMA_SYSTEM_HEADER
1327 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1328 INCLUDE_NEXT
1329 REPLACE_FDOPENDIR
1330 REPLACE_DIRFD
1331 REPLACE_CLOSEDIR
1332 REPLACE_OPENDIR
1333 HAVE_ALPHASORT
1334 HAVE_SCANDIR
1335 HAVE_FDOPENDIR
1336 HAVE_DECL_FDOPENDIR
1337 HAVE_DECL_DIRFD
1338 HAVE_CLOSEDIR
1339 HAVE_REWINDDIR
1340 HAVE_READDIR
1341 HAVE_OPENDIR
1342 GNULIB_ALPHASORT
1343 GNULIB_SCANDIR
1344 GNULIB_FDOPENDIR
1345 GNULIB_DIRFD
1346 GNULIB_CLOSEDIR
1347 GNULIB_REWINDDIR
1348 GNULIB_READDIR
1349 GNULIB_OPENDIR
1350 HAVE_WINSOCK2_H
1351 HAVE_MSVC_INVALID_PARAMETER_HANDLER
1352 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1353 UNISTD_H_HAVE_WINSOCK2_H
1354 REPLACE_WRITE
1355 REPLACE_USLEEP
1356 REPLACE_UNLINKAT
1357 REPLACE_UNLINK
1358 REPLACE_TTYNAME_R
1359 REPLACE_TRUNCATE
1360 REPLACE_SYMLINKAT
1361 REPLACE_SYMLINK
1362 REPLACE_SLEEP
1363 REPLACE_RMDIR
1364 REPLACE_READLINKAT
1365 REPLACE_READLINK
1366 REPLACE_READ
1367 REPLACE_PWRITE
1368 REPLACE_PREAD
1369 REPLACE_LSEEK
1370 REPLACE_LINKAT
1371 REPLACE_LINK
1372 REPLACE_LCHOWN
1373 REPLACE_ISATTY
1374 REPLACE_GETPASS
1375 REPLACE_GETPAGESIZE
1376 REPLACE_GETGROUPS
1377 REPLACE_GETLOGIN_R
1378 REPLACE_GETDTABLESIZE
1379 REPLACE_GETDOMAINNAME
1380 REPLACE_GETCWD
1381 REPLACE_FTRUNCATE
1382 REPLACE_FCHOWNAT
1383 REPLACE_FACCESSAT
1384 REPLACE_DUP2
1385 REPLACE_DUP
1386 REPLACE_CLOSE
1387 REPLACE_CHOWN
1388 HAVE_SYS_PARAM_H
1389 HAVE_OS_H
1390 HAVE_DECL_TTYNAME_R
1391 HAVE_DECL_TRUNCATE
1392 HAVE_DECL_SETHOSTNAME
1393 HAVE_DECL_GETUSERSHELL
1394 HAVE_DECL_GETPAGESIZE
1395 HAVE_DECL_GETLOGIN_R
1396 HAVE_DECL_GETLOGIN
1397 HAVE_DECL_GETDOMAINNAME
1398 HAVE_DECL_FDATASYNC
1399 HAVE_DECL_FCHDIR
1400 HAVE_DECL_ENVIRON
1401 HAVE_USLEEP
1402 HAVE_UNLINKAT
1403 HAVE_SYMLINKAT
1404 HAVE_SYMLINK
1405 HAVE_SLEEP
1406 HAVE_SETHOSTNAME
1407 HAVE_READLINKAT
1408 HAVE_READLINK
1409 HAVE_PWRITE
1410 HAVE_PREAD
1411 HAVE_PIPE2
1412 HAVE_PIPE
1413 HAVE_LINKAT
1414 HAVE_LINK
1415 HAVE_LCHOWN
1416 HAVE_GROUP_MEMBER
1417 HAVE_GETPASS
1418 HAVE_GETPAGESIZE
1419 HAVE_GETLOGIN
1420 HAVE_GETHOSTNAME
1421 HAVE_GETGROUPS
1422 HAVE_GETDTABLESIZE
1423 HAVE_FTRUNCATE
1424 HAVE_FSYNC
1425 HAVE_FDATASYNC
1426 HAVE_FCHOWNAT
1427 HAVE_FCHDIR
1428 HAVE_FACCESSAT
1429 HAVE_EUIDACCESS
1430 HAVE_DUP3
1431 HAVE_DUP2
1432 HAVE_CHOWN
1433 GNULIB_WRITE
1434 GNULIB_USLEEP
1435 GNULIB_UNLINKAT
1436 GNULIB_UNLINK
1437 GNULIB_UNISTD_H_SIGPIPE
1438 GNULIB_UNISTD_H_NONBLOCKING
1439 GNULIB_TTYNAME_R
1440 GNULIB_TRUNCATE
1441 GNULIB_SYMLINKAT
1442 GNULIB_SYMLINK
1443 GNULIB_SLEEP
1444 GNULIB_SETHOSTNAME
1445 GNULIB_RMDIR
1446 GNULIB_READLINKAT
1447 GNULIB_READLINK
1448 GNULIB_READ
1449 GNULIB_PWRITE
1450 GNULIB_PREAD
1451 GNULIB_PIPE2
1452 GNULIB_PIPE
1453 GNULIB_LSEEK
1454 GNULIB_LINKAT
1455 GNULIB_LINK
1456 GNULIB_LCHOWN
1457 GNULIB_ISATTY
1458 GNULIB_GROUP_MEMBER
1459 GNULIB_GETUSERSHELL
1460 GNULIB_GETPASS
1461 GNULIB_GETPAGESIZE
1462 GNULIB_GETLOGIN_R
1463 GNULIB_GETLOGIN
1464 GNULIB_GETHOSTNAME
1465 GNULIB_GETGROUPS
1466 GNULIB_GETDTABLESIZE
1467 GNULIB_GETDOMAINNAME
1468 GNULIB_GETCWD
1469 GNULIB_FTRUNCATE
1470 GNULIB_FSYNC
1471 GNULIB_FDATASYNC
1472 GNULIB_FCHOWNAT
1473 GNULIB_FCHDIR
1474 GNULIB_FACCESSAT
1475 GNULIB_EUIDACCESS
1476 GNULIB_ENVIRON
1477 GNULIB_DUP3
1478 GNULIB_DUP2
1479 GNULIB_DUP
1480 GNULIB_CLOSE
1481 GNULIB_CHOWN
1482 GNULIB_CHDIR
1483 LOCALE_FR
1484 REPLACE_WCSFTIME
1485 REPLACE_WCSWIDTH
1486 REPLACE_WCWIDTH
1487 REPLACE_WCSNRTOMBS
1488 REPLACE_WCSRTOMBS
1489 REPLACE_WCRTOMB
1490 REPLACE_MBSNRTOWCS
1491 REPLACE_MBSRTOWCS
1492 REPLACE_MBRLEN
1493 REPLACE_MBRTOWC
1494 REPLACE_MBSINIT
1495 REPLACE_WCTOB
1496 REPLACE_BTOWC
1497 REPLACE_MBSTATE_T
1498 HAVE_DECL_WCWIDTH
1499 HAVE_DECL_WCTOB
1500 HAVE_WCSFTIME
1501 HAVE_WCSWIDTH
1502 HAVE_WCSTOK
1503 HAVE_WCSSTR
1504 HAVE_WCSPBRK
1505 HAVE_WCSSPN
1506 HAVE_WCSCSPN
1507 HAVE_WCSRCHR
1508 HAVE_WCSCHR
1509 HAVE_WCSDUP
1510 HAVE_WCSXFRM
1511 HAVE_WCSCOLL
1512 HAVE_WCSNCASECMP
1513 HAVE_WCSCASECMP
1514 HAVE_WCSNCMP
1515 HAVE_WCSCMP
1516 HAVE_WCSNCAT
1517 HAVE_WCSCAT
1518 HAVE_WCPNCPY
1519 HAVE_WCSNCPY
1520 HAVE_WCPCPY
1521 HAVE_WCSCPY
1522 HAVE_WCSNLEN
1523 HAVE_WCSLEN
1524 HAVE_WMEMSET
1525 HAVE_WMEMMOVE
1526 HAVE_WMEMCPY
1527 HAVE_WMEMCMP
1528 HAVE_WMEMCHR
1529 HAVE_WCSNRTOMBS
1530 HAVE_WCSRTOMBS
1531 HAVE_WCRTOMB
1532 HAVE_MBSNRTOWCS
1533 HAVE_MBSRTOWCS
1534 HAVE_MBRLEN
1535 HAVE_MBRTOWC
1536 HAVE_MBSINIT
1537 HAVE_BTOWC
1538 GNULIB_WCSFTIME
1539 GNULIB_WCSWIDTH
1540 GNULIB_WCSTOK
1541 GNULIB_WCSSTR
1542 GNULIB_WCSPBRK
1543 GNULIB_WCSSPN
1544 GNULIB_WCSCSPN
1545 GNULIB_WCSRCHR
1546 GNULIB_WCSCHR
1547 GNULIB_WCSDUP
1548 GNULIB_WCSXFRM
1549 GNULIB_WCSCOLL
1550 GNULIB_WCSNCASECMP
1551 GNULIB_WCSCASECMP
1552 GNULIB_WCSNCMP
1553 GNULIB_WCSCMP
1554 GNULIB_WCSNCAT
1555 GNULIB_WCSCAT
1556 GNULIB_WCPNCPY
1557 GNULIB_WCSNCPY
1558 GNULIB_WCPCPY
1559 GNULIB_WCSCPY
1560 GNULIB_WCSNLEN
1561 GNULIB_WCSLEN
1562 GNULIB_WMEMSET
1563 GNULIB_WMEMMOVE
1564 GNULIB_WMEMCPY
1565 GNULIB_WMEMCMP
1566 GNULIB_WMEMCHR
1567 GNULIB_WCWIDTH
1568 GNULIB_WCSNRTOMBS
1569 GNULIB_WCSRTOMBS
1570 GNULIB_WCRTOMB
1571 GNULIB_MBSNRTOWCS
1572 GNULIB_MBSRTOWCS
1573 GNULIB_MBRLEN
1574 GNULIB_MBRTOWC
1575 GNULIB_MBSINIT
1576 GNULIB_WCTOB
1577 GNULIB_BTOWC
1578 GL_GENERATE_ALLOCA_H_FALSE
1579 GL_GENERATE_ALLOCA_H_TRUE
1580 ALLOCA_H
1581 ALLOCA
1582 GL_COND_LIBTOOL_FALSE
1583 GL_COND_LIBTOOL_TRUE
1584 BUILD_SHEBANG
1585 BUILD_EXEEXT
1586 BUILD_CC
1587 LIBUTIL
1588 HELP2MAN
1589 POSUB
1590 LTLIBINTL
1591 LIBINTL
1592 INTLLIBS
1593 LTLIBICONV
1594 LIBICONV
1595 INTL_MACOSX_LIBS
1596 XGETTEXT_EXTRA_OPTIONS
1597 MSGMERGE
1598 XGETTEXT_015
1599 XGETTEXT
1600 GMSGFMT_015
1601 MSGFMT_015
1602 GMSGFMT
1603 MSGFMT
1604 GETTEXT_MACRO_VERSION
1605 USE_NLS
1606 SED
1607 HAVE_CXX
1608 pkgpyexecdir
1609 pyexecdir
1610 pkgpythondir
1611 pythondir
1612 PYTHON_PLATFORM
1613 PYTHON_EXEC_PREFIX
1614 PYTHON_PREFIX
1615 PYTHON_VERSION
1616 PYTHON
1617 am__fastdepCCAS_FALSE
1618 am__fastdepCCAS_TRUE
1619 CCASDEPMODE
1620 CCASFLAGS
1621 CCAS
1622 am__fastdepCXX_FALSE
1623 am__fastdepCXX_TRUE
1624 CXXDEPMODE
1625 ac_ct_CXX
1626 CXXFLAGS
1627 CXX
1628 ARFLAGS
1629 AR
1630 EGREP
1631 GREP
1632 CPP
1633 LN_S
1634 YFLAGS
1635 LEXLIB
1636 am__fastdepCC_FALSE
1637 am__fastdepCC_TRUE
1638 CCDEPMODE
1639 am__nodep
1640 AMDEPBACKSLASH
1641 AMDEP_FALSE
1642 AMDEP_TRUE
1643 am__quote
1644 am__include
1645 DEPDIR
1646 OBJEXT
1647 EXEEXT
1648 ac_ct_CC
1649 CPPFLAGS
1650 LDFLAGS
1651 CFLAGS
1652 CC
1653 LEX_OUTPUT_ROOT
1654 LEX
1655 RANLIB
1656 YACC
1657 CMP
1658 grubdirname
1659 bootdirname
1660 platform
1661 host_kernel
1662 TARGET_DECOMPRESSOR_LINK_ADDR
1663 TARGET_LINK_ADDR
1664 grub_file
1665 grub_render_label
1666 grub_sparc64_setup
1667 grub_set_default
1668 grub_script_check
1669 grub_reboot
1670 grub_probe
1671 grub_mkrescue
1672 grub_mkrelpath
1673 grub_mkpasswd_pbkdf2
1674 grub_mklayout
1675 grub_glue_efi
1676 grub_mkimage
1677 grub_mkfont
1678 grub_mkconfig
1679 grub_install
1680 grub_editenv
1681 grub_bios_setup
1682 PKG_CONFIG_LIBDIR
1683 PKG_CONFIG_PATH
1684 PKG_CONFIG
1685 AM_BACKSLASH
1686 AM_DEFAULT_VERBOSITY
1687 AM_DEFAULT_V
1688 AM_V
1689 am__untar
1690 am__tar
1691 AMTAR
1692 am__leading_dot
1693 SET_MAKE
1694 AWK
1695 mkdir_p
1696 MKDIR_P
1697 INSTALL_STRIP_PROGRAM
1698 STRIP
1699 install_sh
1700 MAKEINFO
1701 AUTOHEADER
1702 AUTOMAKE
1703 AUTOCONF
1704 ACLOCAL
1705 VERSION
1706 PACKAGE
1707 CYGPATH_W
1708 am__isrc
1709 INSTALL_DATA
1710 INSTALL_SCRIPT
1711 INSTALL_PROGRAM
1712 target_os
1713 target_vendor
1714 target_cpu
1715 target
1716 host_os
1717 host_vendor
1718 host_cpu
1719 host
1720 build_os
1721 build_vendor
1722 build_cpu
1723 build
1724 target_alias
1725 host_alias
1726 build_alias
1727 LIBS
1728 ECHO_T
1729 ECHO_N
1730 ECHO_C
1731 DEFS
1732 mandir
1733 localedir
1734 libdir
1735 psdir
1736 pdfdir
1737 dvidir
1738 htmldir
1739 infodir
1740 docdir
1741 oldincludedir
1742 includedir
1743 runstatedir
1744 localstatedir
1745 sharedstatedir
1746 sysconfdir
1747 datadir
1748 datarootdir
1749 libexecdir
1750 sbindir
1751 bindir
1752 program_transform_name
1753 prefix
1754 exec_prefix
1755 PACKAGE_URL
1756 PACKAGE_BUGREPORT
1757 PACKAGE_STRING
1758 PACKAGE_VERSION
1759 PACKAGE_TARNAME
1760 PACKAGE_NAME
1761 PATH_SEPARATOR
1762 SHELL'
1763 ac_subst_files=''
1764 ac_user_opts='
1765 enable_option_checking
1766 enable_silent_rules
1767 with_platform
1768 with_bootdir
1769 with_grubdir
1770 enable_dependency_tracking
1771 enable_largefile
1772 enable_threads
1773 enable_nls
1774 with_gnu_ld
1775 enable_rpath
1776 with_libiconv_prefix
1777 with_libintl_prefix
1778 with_libpth_prefix
1779 with_included_regex
1780 enable_efiemu
1781 enable_stack_protector
1782 enable_mm_debug
1783 enable_cache_stats
1784 enable_boot_time
1785 enable_grub_emu_sdl
1786 enable_grub_emu_pci
1787 enable_grub_mkfont
1788 enable_grub_themes
1789 enable_grub_mount
1790 enable_device_mapper
1791 enable_liblzma
1792 enable_libzfs
1793 enable_werror
1794 '
1795 ac_precious_vars='build_alias
1796 host_alias
1797 target_alias
1798 PKG_CONFIG
1799 PKG_CONFIG_PATH
1800 PKG_CONFIG_LIBDIR
1801 CC
1802 CFLAGS
1803 LDFLAGS
1804 LIBS
1805 CPPFLAGS
1806 YACC
1807 YFLAGS
1808 CPP
1809 CXX
1810 CXXFLAGS
1811 CCC
1812 CCAS
1813 CCASFLAGS
1814 PYTHON
1815 FREETYPE_CFLAGS
1816 FREETYPE_LIBS
1817 BUILD_FREETYPE_CFLAGS
1818 BUILD_FREETYPE_LIBS'
1819
1820
1821 # Initialize some variables set by options.
1822 ac_init_help=
1823 ac_init_version=false
1824 ac_unrecognized_opts=
1825 ac_unrecognized_sep=
1826 # The variables have the same names as the options, with
1827 # dashes changed to underlines.
1828 cache_file=/dev/null
1829 exec_prefix=NONE
1830 no_create=
1831 no_recursion=
1832 prefix=NONE
1833 program_prefix=NONE
1834 program_suffix=NONE
1835 program_transform_name=s,x,x,
1836 silent=
1837 site=
1838 srcdir=
1839 verbose=
1840 x_includes=NONE
1841 x_libraries=NONE
1842
1843 # Installation directory options.
1844 # These are left unexpanded so users can "make install exec_prefix=/foo"
1845 # and all the variables that are supposed to be based on exec_prefix
1846 # by default will actually change.
1847 # Use braces instead of parens because sh, perl, etc. also accept them.
1848 # (The list follows the same order as the GNU Coding Standards.)
1849 bindir='${exec_prefix}/bin'
1850 sbindir='${exec_prefix}/sbin'
1851 libexecdir='${exec_prefix}/libexec'
1852 datarootdir='${prefix}/share'
1853 datadir='${datarootdir}'
1854 sysconfdir='${prefix}/etc'
1855 sharedstatedir='${prefix}/com'
1856 localstatedir='${prefix}/var'
1857 runstatedir='${localstatedir}/run'
1858 includedir='${prefix}/include'
1859 oldincludedir='/usr/include'
1860 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1861 infodir='${datarootdir}/info'
1862 htmldir='${docdir}'
1863 dvidir='${docdir}'
1864 pdfdir='${docdir}'
1865 psdir='${docdir}'
1866 libdir='${exec_prefix}/lib'
1867 localedir='${datarootdir}/locale'
1868 mandir='${datarootdir}/man'
1869
1870 ac_prev=
1871 ac_dashdash=
1872 for ac_option
1873 do
1874 # If the previous option needs an argument, assign it.
1875 if test -n "$ac_prev"; then
1876 eval $ac_prev=\$ac_option
1877 ac_prev=
1878 continue
1879 fi
1880
1881 case $ac_option in
1882 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1883 *=) ac_optarg= ;;
1884 *) ac_optarg=yes ;;
1885 esac
1886
1887 # Accept the important Cygnus configure options, so we can diagnose typos.
1888
1889 case $ac_dashdash$ac_option in
1890 --)
1891 ac_dashdash=yes ;;
1892
1893 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1894 ac_prev=bindir ;;
1895 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1896 bindir=$ac_optarg ;;
1897
1898 -build | --build | --buil | --bui | --bu)
1899 ac_prev=build_alias ;;
1900 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1901 build_alias=$ac_optarg ;;
1902
1903 -cache-file | --cache-file | --cache-fil | --cache-fi \
1904 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1905 ac_prev=cache_file ;;
1906 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1907 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1908 cache_file=$ac_optarg ;;
1909
1910 --config-cache | -C)
1911 cache_file=config.cache ;;
1912
1913 -datadir | --datadir | --datadi | --datad)
1914 ac_prev=datadir ;;
1915 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1916 datadir=$ac_optarg ;;
1917
1918 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1919 | --dataroo | --dataro | --datar)
1920 ac_prev=datarootdir ;;
1921 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1922 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1923 datarootdir=$ac_optarg ;;
1924
1925 -disable-* | --disable-*)
1926 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1927 # Reject names that are not valid shell variable names.
1928 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1929 as_fn_error $? "invalid feature name: $ac_useropt"
1930 ac_useropt_orig=$ac_useropt
1931 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1932 case $ac_user_opts in
1933 *"
1934 "enable_$ac_useropt"
1935 "*) ;;
1936 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1937 ac_unrecognized_sep=', ';;
1938 esac
1939 eval enable_$ac_useropt=no ;;
1940
1941 -docdir | --docdir | --docdi | --doc | --do)
1942 ac_prev=docdir ;;
1943 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1944 docdir=$ac_optarg ;;
1945
1946 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1947 ac_prev=dvidir ;;
1948 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1949 dvidir=$ac_optarg ;;
1950
1951 -enable-* | --enable-*)
1952 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1953 # Reject names that are not valid shell variable names.
1954 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1955 as_fn_error $? "invalid feature name: $ac_useropt"
1956 ac_useropt_orig=$ac_useropt
1957 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1958 case $ac_user_opts in
1959 *"
1960 "enable_$ac_useropt"
1961 "*) ;;
1962 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1963 ac_unrecognized_sep=', ';;
1964 esac
1965 eval enable_$ac_useropt=\$ac_optarg ;;
1966
1967 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1968 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1969 | --exec | --exe | --ex)
1970 ac_prev=exec_prefix ;;
1971 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1972 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1973 | --exec=* | --exe=* | --ex=*)
1974 exec_prefix=$ac_optarg ;;
1975
1976 -gas | --gas | --ga | --g)
1977 # Obsolete; use --with-gas.
1978 with_gas=yes ;;
1979
1980 -help | --help | --hel | --he | -h)
1981 ac_init_help=long ;;
1982 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1983 ac_init_help=recursive ;;
1984 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1985 ac_init_help=short ;;
1986
1987 -host | --host | --hos | --ho)
1988 ac_prev=host_alias ;;
1989 -host=* | --host=* | --hos=* | --ho=*)
1990 host_alias=$ac_optarg ;;
1991
1992 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1993 ac_prev=htmldir ;;
1994 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1995 | --ht=*)
1996 htmldir=$ac_optarg ;;
1997
1998 -includedir | --includedir | --includedi | --included | --include \
1999 | --includ | --inclu | --incl | --inc)
2000 ac_prev=includedir ;;
2001 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
2002 | --includ=* | --inclu=* | --incl=* | --inc=*)
2003 includedir=$ac_optarg ;;
2004
2005 -infodir | --infodir | --infodi | --infod | --info | --inf)
2006 ac_prev=infodir ;;
2007 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
2008 infodir=$ac_optarg ;;
2009
2010 -libdir | --libdir | --libdi | --libd)
2011 ac_prev=libdir ;;
2012 -libdir=* | --libdir=* | --libdi=* | --libd=*)
2013 libdir=$ac_optarg ;;
2014
2015 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
2016 | --libexe | --libex | --libe)
2017 ac_prev=libexecdir ;;
2018 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
2019 | --libexe=* | --libex=* | --libe=*)
2020 libexecdir=$ac_optarg ;;
2021
2022 -localedir | --localedir | --localedi | --localed | --locale)
2023 ac_prev=localedir ;;
2024 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
2025 localedir=$ac_optarg ;;
2026
2027 -localstatedir | --localstatedir | --localstatedi | --localstated \
2028 | --localstate | --localstat | --localsta | --localst | --locals)
2029 ac_prev=localstatedir ;;
2030 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
2031 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
2032 localstatedir=$ac_optarg ;;
2033
2034 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
2035 ac_prev=mandir ;;
2036 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
2037 mandir=$ac_optarg ;;
2038
2039 -nfp | --nfp | --nf)
2040 # Obsolete; use --without-fp.
2041 with_fp=no ;;
2042
2043 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
2044 | --no-cr | --no-c | -n)
2045 no_create=yes ;;
2046
2047 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
2048 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
2049 no_recursion=yes ;;
2050
2051 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
2052 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
2053 | --oldin | --oldi | --old | --ol | --o)
2054 ac_prev=oldincludedir ;;
2055 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
2056 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
2057 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
2058 oldincludedir=$ac_optarg ;;
2059
2060 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
2061 ac_prev=prefix ;;
2062 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
2063 prefix=$ac_optarg ;;
2064
2065 -program-prefix | --program-prefix | --program-prefi | --program-pref \
2066 | --program-pre | --program-pr | --program-p)
2067 ac_prev=program_prefix ;;
2068 -program-prefix=* | --program-prefix=* | --program-prefi=* \
2069 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
2070 program_prefix=$ac_optarg ;;
2071
2072 -program-suffix | --program-suffix | --program-suffi | --program-suff \
2073 | --program-suf | --program-su | --program-s)
2074 ac_prev=program_suffix ;;
2075 -program-suffix=* | --program-suffix=* | --program-suffi=* \
2076 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
2077 program_suffix=$ac_optarg ;;
2078
2079 -program-transform-name | --program-transform-name \
2080 | --program-transform-nam | --program-transform-na \
2081 | --program-transform-n | --program-transform- \
2082 | --program-transform | --program-transfor \
2083 | --program-transfo | --program-transf \
2084 | --program-trans | --program-tran \
2085 | --progr-tra | --program-tr | --program-t)
2086 ac_prev=program_transform_name ;;
2087 -program-transform-name=* | --program-transform-name=* \
2088 | --program-transform-nam=* | --program-transform-na=* \
2089 | --program-transform-n=* | --program-transform-=* \
2090 | --program-transform=* | --program-transfor=* \
2091 | --program-transfo=* | --program-transf=* \
2092 | --program-trans=* | --program-tran=* \
2093 | --progr-tra=* | --program-tr=* | --program-t=*)
2094 program_transform_name=$ac_optarg ;;
2095
2096 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
2097 ac_prev=pdfdir ;;
2098 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
2099 pdfdir=$ac_optarg ;;
2100
2101 -psdir | --psdir | --psdi | --psd | --ps)
2102 ac_prev=psdir ;;
2103 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
2104 psdir=$ac_optarg ;;
2105
2106 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2107 | -silent | --silent | --silen | --sile | --sil)
2108 silent=yes ;;
2109
2110 -runstatedir | --runstatedir | --runstatedi | --runstated \
2111 | --runstate | --runstat | --runsta | --runst | --runs \
2112 | --run | --ru | --r)
2113 ac_prev=runstatedir ;;
2114 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
2115 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
2116 | --run=* | --ru=* | --r=*)
2117 runstatedir=$ac_optarg ;;
2118
2119 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
2120 ac_prev=sbindir ;;
2121 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
2122 | --sbi=* | --sb=*)
2123 sbindir=$ac_optarg ;;
2124
2125 -sharedstatedir | --sharedstatedir | --sharedstatedi \
2126 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
2127 | --sharedst | --shareds | --shared | --share | --shar \
2128 | --sha | --sh)
2129 ac_prev=sharedstatedir ;;
2130 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
2131 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
2132 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
2133 | --sha=* | --sh=*)
2134 sharedstatedir=$ac_optarg ;;
2135
2136 -site | --site | --sit)
2137 ac_prev=site ;;
2138 -site=* | --site=* | --sit=*)
2139 site=$ac_optarg ;;
2140
2141 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2142 ac_prev=srcdir ;;
2143 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2144 srcdir=$ac_optarg ;;
2145
2146 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
2147 | --syscon | --sysco | --sysc | --sys | --sy)
2148 ac_prev=sysconfdir ;;
2149 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
2150 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
2151 sysconfdir=$ac_optarg ;;
2152
2153 -target | --target | --targe | --targ | --tar | --ta | --t)
2154 ac_prev=target_alias ;;
2155 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
2156 target_alias=$ac_optarg ;;
2157
2158 -v | -verbose | --verbose | --verbos | --verbo | --verb)
2159 verbose=yes ;;
2160
2161 -version | --version | --versio | --versi | --vers | -V)
2162 ac_init_version=: ;;
2163
2164 -with-* | --with-*)
2165 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
2166 # Reject names that are not valid shell variable names.
2167 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2168 as_fn_error $? "invalid package name: $ac_useropt"
2169 ac_useropt_orig=$ac_useropt
2170 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2171 case $ac_user_opts in
2172 *"
2173 "with_$ac_useropt"
2174 "*) ;;
2175 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
2176 ac_unrecognized_sep=', ';;
2177 esac
2178 eval with_$ac_useropt=\$ac_optarg ;;
2179
2180 -without-* | --without-*)
2181 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
2182 # Reject names that are not valid shell variable names.
2183 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2184 as_fn_error $? "invalid package name: $ac_useropt"
2185 ac_useropt_orig=$ac_useropt
2186 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2187 case $ac_user_opts in
2188 *"
2189 "with_$ac_useropt"
2190 "*) ;;
2191 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
2192 ac_unrecognized_sep=', ';;
2193 esac
2194 eval with_$ac_useropt=no ;;
2195
2196 --x)
2197 # Obsolete; use --with-x.
2198 with_x=yes ;;
2199
2200 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
2201 | --x-incl | --x-inc | --x-in | --x-i)
2202 ac_prev=x_includes ;;
2203 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
2204 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
2205 x_includes=$ac_optarg ;;
2206
2207 -x-libraries | --x-libraries | --x-librarie | --x-librari \
2208 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
2209 ac_prev=x_libraries ;;
2210 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
2211 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
2212 x_libraries=$ac_optarg ;;
2213
2214 -*) as_fn_error $? "unrecognized option: \`$ac_option'
2215 Try \`$0 --help' for more information"
2216 ;;
2217
2218 *=*)
2219 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
2220 # Reject names that are not valid shell variable names.
2221 case $ac_envvar in #(
2222 '' | [0-9]* | *[!_$as_cr_alnum]* )
2223 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
2224 esac
2225 eval $ac_envvar=\$ac_optarg
2226 export $ac_envvar ;;
2227
2228 *)
2229 # FIXME: should be removed in autoconf 3.0.
2230 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
2231 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
2232 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
2233 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
2234 ;;
2235
2236 esac
2237 done
2238
2239 if test -n "$ac_prev"; then
2240 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
2241 as_fn_error $? "missing argument to $ac_option"
2242 fi
2243
2244 if test -n "$ac_unrecognized_opts"; then
2245 case $enable_option_checking in
2246 no) ;;
2247 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
2248 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2249 esac
2250 fi
2251
2252 # Check all directory arguments for consistency.
2253 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
2254 datadir sysconfdir sharedstatedir localstatedir includedir \
2255 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2256 libdir localedir mandir runstatedir
2257 do
2258 eval ac_val=\$$ac_var
2259 # Remove trailing slashes.
2260 case $ac_val in
2261 */ )
2262 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2263 eval $ac_var=\$ac_val;;
2264 esac
2265 # Be sure to have absolute directory names.
2266 case $ac_val in
2267 [\\/$]* | ?:[\\/]* ) continue;;
2268 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2269 esac
2270 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
2271 done
2272
2273 # There might be people who depend on the old broken behavior: `$host'
2274 # used to hold the argument of --host etc.
2275 # FIXME: To remove some day.
2276 build=$build_alias
2277 host=$host_alias
2278 target=$target_alias
2279
2280 # FIXME: To remove some day.
2281 if test "x$host_alias" != x; then
2282 if test "x$build_alias" = x; then
2283 cross_compiling=maybe
2284 elif test "x$build_alias" != "x$host_alias"; then
2285 cross_compiling=yes
2286 fi
2287 fi
2288
2289 ac_tool_prefix=
2290 test -n "$host_alias" && ac_tool_prefix=$host_alias-
2291
2292 test "$silent" = yes && exec 6>/dev/null
2293
2294
2295 ac_pwd=`pwd` && test -n "$ac_pwd" &&
2296 ac_ls_di=`ls -di .` &&
2297 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2298 as_fn_error $? "working directory cannot be determined"
2299 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2300 as_fn_error $? "pwd does not report name of working directory"
2301
2302
2303 # Find the source files, if location was not specified.
2304 if test -z "$srcdir"; then
2305 ac_srcdir_defaulted=yes
2306 # Try the directory containing this script, then the parent directory.
2307 ac_confdir=`$as_dirname -- "$as_myself" ||
2308 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2309 X"$as_myself" : 'X\(//\)[^/]' \| \
2310 X"$as_myself" : 'X\(//\)$' \| \
2311 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2312 $as_echo X"$as_myself" |
2313 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2314 s//\1/
2315 q
2316 }
2317 /^X\(\/\/\)[^/].*/{
2318 s//\1/
2319 q
2320 }
2321 /^X\(\/\/\)$/{
2322 s//\1/
2323 q
2324 }
2325 /^X\(\/\).*/{
2326 s//\1/
2327 q
2328 }
2329 s/.*/./; q'`
2330 srcdir=$ac_confdir
2331 if test ! -r "$srcdir/$ac_unique_file"; then
2332 srcdir=..
2333 fi
2334 else
2335 ac_srcdir_defaulted=no
2336 fi
2337 if test ! -r "$srcdir/$ac_unique_file"; then
2338 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2339 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
2340 fi
2341 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2342 ac_abs_confdir=`(
2343 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
2344 pwd)`
2345 # When building in place, set srcdir=.
2346 if test "$ac_abs_confdir" = "$ac_pwd"; then
2347 srcdir=.
2348 fi
2349 # Remove unnecessary trailing slashes from srcdir.
2350 # Double slashes in file names in object file debugging info
2351 # mess up M-x gdb in Emacs.
2352 case $srcdir in
2353 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2354 esac
2355 for ac_var in $ac_precious_vars; do
2356 eval ac_env_${ac_var}_set=\${${ac_var}+set}
2357 eval ac_env_${ac_var}_value=\$${ac_var}
2358 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2359 eval ac_cv_env_${ac_var}_value=\$${ac_var}
2360 done
2361
2362 #
2363 # Report the --help message.
2364 #
2365 if test "$ac_init_help" = "long"; then
2366 # Omit some internal or obsolete options to make the list less imposing.
2367 # This message is too long to be a string in the A/UX 3.1 sh.
2368 cat <<_ACEOF
2369 \`configure' configures GRUB 2.06 to adapt to many kinds of systems.
2370
2371 Usage: $0 [OPTION]... [VAR=VALUE]...
2372
2373 To assign environment variables (e.g., CC, CFLAGS...), specify them as
2374 VAR=VALUE. See below for descriptions of some of the useful variables.
2375
2376 Defaults for the options are specified in brackets.
2377
2378 Configuration:
2379 -h, --help display this help and exit
2380 --help=short display options specific to this package
2381 --help=recursive display the short help of all the included packages
2382 -V, --version display version information and exit
2383 -q, --quiet, --silent do not print \`checking ...' messages
2384 --cache-file=FILE cache test results in FILE [disabled]
2385 -C, --config-cache alias for \`--cache-file=config.cache'
2386 -n, --no-create do not create output files
2387 --srcdir=DIR find the sources in DIR [configure dir or \`..']
2388
2389 Installation directories:
2390 --prefix=PREFIX install architecture-independent files in PREFIX
2391 [$ac_default_prefix]
2392 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
2393 [PREFIX]
2394
2395 By default, \`make install' will install all the files in
2396 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
2397 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2398 for instance \`--prefix=\$HOME'.
2399
2400 For better control, use the options below.
2401
2402 Fine tuning of the installation directories:
2403 --bindir=DIR user executables [EPREFIX/bin]
2404 --sbindir=DIR system admin executables [EPREFIX/sbin]
2405 --libexecdir=DIR program executables [EPREFIX/libexec]
2406 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
2407 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
2408 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
2409 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
2410 --libdir=DIR object code libraries [EPREFIX/lib]
2411 --includedir=DIR C header files [PREFIX/include]
2412 --oldincludedir=DIR C header files for non-gcc [/usr/include]
2413 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
2414 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
2415 --infodir=DIR info documentation [DATAROOTDIR/info]
2416 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
2417 --mandir=DIR man documentation [DATAROOTDIR/man]
2418 --docdir=DIR documentation root [DATAROOTDIR/doc/grub]
2419 --htmldir=DIR html documentation [DOCDIR]
2420 --dvidir=DIR dvi documentation [DOCDIR]
2421 --pdfdir=DIR pdf documentation [DOCDIR]
2422 --psdir=DIR ps documentation [DOCDIR]
2423 _ACEOF
2424
2425 cat <<\_ACEOF
2426
2427 Program names:
2428 --program-prefix=PREFIX prepend PREFIX to installed program names
2429 --program-suffix=SUFFIX append SUFFIX to installed program names
2430 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
2431
2432 System types:
2433 --build=BUILD configure for building on BUILD [guessed]
2434 --host=HOST cross-compile to build programs to run on HOST [BUILD]
2435 --target=TARGET configure for building compilers for TARGET [HOST]
2436 _ACEOF
2437 fi
2438
2439 if test -n "$ac_init_help"; then
2440 case $ac_init_help in
2441 short | recursive ) echo "Configuration of GRUB 2.06:";;
2442 esac
2443 cat <<\_ACEOF
2444
2445 Optional Features:
2446 --disable-option-checking ignore unrecognized --enable/--with options
2447 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
2448 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
2449 --enable-silent-rules less verbose build output (undo: "make V=1")
2450 --disable-silent-rules verbose build output (undo: "make V=0")
2451 --enable-dependency-tracking
2452 do not reject slow dependency extractors
2453 --disable-dependency-tracking
2454 speeds up one-time build
2455 --disable-largefile omit support for large files
2456 --enable-threads={posix|solaris|pth|windows}
2457 specify multithreading API
2458 --disable-threads build without multithread safety
2459 --disable-nls do not use Native Language Support
2460 --disable-rpath do not hardcode runtime library paths
2461 --enable-efiemu build and install the efiemu runtimes
2462 (default=guessed)
2463 --enable-stack-protector
2464 enable the stack protector
2465 --enable-mm-debug include memory manager debugging
2466 --enable-cache-stats enable disk cache statistics collection
2467 --enable-boot-time enable boot time statistics collection
2468 --enable-grub-emu-sdl build and install the `grub-emu' debugging utility
2469 with SDL support (default=guessed)
2470 --enable-grub-emu-pci build and install the `grub-emu' debugging utility
2471 with PCI support (potentially dangerous)
2472 (default=no)
2473 --enable-grub-mkfont build and install the `grub-mkfont' utility
2474 (default=guessed)
2475 --enable-grub-themes build and install GRUB themes (default=guessed)
2476 --enable-grub-mount build and install the `grub-mount' utility
2477 (default=guessed)
2478 --enable-device-mapper enable Linux device-mapper support (default=guessed)
2479 --enable-liblzma enable liblzma integration (default=guessed)
2480 --enable-libzfs enable libzfs integration (default=guessed)
2481 --disable-werror do not use -Werror when building GRUB
2482
2483 Optional Packages:
2484 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
2485 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
2486 --with-platform=PLATFORM
2487 select the host platform [[guessed]]
2488 --with-bootdir=DIR set the name of /boot directory [[guessed]]
2489 --with-grubdir=DIR set the name of grub directory [[guessed]]
2490 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
2491 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
2492 --without-libiconv-prefix don't search for libiconv in includedir and libdir
2493 --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib
2494 --without-libintl-prefix don't search for libintl in includedir and libdir
2495 --with-libpth-prefix[=DIR] search for libpth in DIR/include and DIR/lib
2496 --without-libpth-prefix don't search for libpth in includedir and libdir
2497 --without-included-regex
2498 don't compile regex; this is the default on systems
2499 with recent-enough versions of the GNU C Library
2500 (use with caution on other systems).
2501
2502 Some influential environment variables:
2503 PKG_CONFIG path to pkg-config utility
2504 PKG_CONFIG_PATH
2505 directories to add to pkg-config's search path
2506 PKG_CONFIG_LIBDIR
2507 path overriding pkg-config's built-in search path
2508 CC C compiler command
2509 CFLAGS C compiler flags
2510 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2511 nonstandard directory <lib dir>
2512 LIBS libraries to pass to the linker, e.g. -l<library>
2513 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2514 you have headers in a nonstandard directory <include dir>
2515 YACC The `Yet Another Compiler Compiler' implementation to use.
2516 Defaults to the first program found out of: `bison -y', `byacc',
2517 `yacc'.
2518 YFLAGS The list of arguments that will be passed by default to $YACC.
2519 This script will default YFLAGS to the empty string to avoid a
2520 default value of `-d' given by some make applications.
2521 CPP C preprocessor
2522 CXX C++ compiler command
2523 CXXFLAGS C++ compiler flags
2524 CCAS assembler compiler command (defaults to CC)
2525 CCASFLAGS assembler compiler flags (defaults to CFLAGS)
2526 PYTHON the Python interpreter
2527 FREETYPE_CFLAGS
2528 C compiler flags for FREETYPE, overriding pkg-config
2529 FREETYPE_LIBS
2530 linker flags for FREETYPE, overriding pkg-config
2531 BUILD_FREETYPE_CFLAGS
2532 C compiler flags for BUILD_FREETYPE, overriding pkg-config
2533 BUILD_FREETYPE_LIBS
2534 linker flags for BUILD_FREETYPE, overriding pkg-config
2535
2536 Use these variables to override the choices made by `configure' or to help
2537 it to find libraries and programs with nonstandard names/locations.
2538
2539 Report bugs to <bug-grub@gnu.org>.
2540 _ACEOF
2541 ac_status=$?
2542 fi
2543
2544 if test "$ac_init_help" = "recursive"; then
2545 # If there are subdirs, report their specific --help.
2546 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2547 test -d "$ac_dir" ||
2548 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2549 continue
2550 ac_builddir=.
2551
2552 case "$ac_dir" in
2553 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2554 *)
2555 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2556 # A ".." for each directory in $ac_dir_suffix.
2557 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2558 case $ac_top_builddir_sub in
2559 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2560 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2561 esac ;;
2562 esac
2563 ac_abs_top_builddir=$ac_pwd
2564 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2565 # for backward compatibility:
2566 ac_top_builddir=$ac_top_build_prefix
2567
2568 case $srcdir in
2569 .) # We are building in place.
2570 ac_srcdir=.
2571 ac_top_srcdir=$ac_top_builddir_sub
2572 ac_abs_top_srcdir=$ac_pwd ;;
2573 [\\/]* | ?:[\\/]* ) # Absolute name.
2574 ac_srcdir=$srcdir$ac_dir_suffix;
2575 ac_top_srcdir=$srcdir
2576 ac_abs_top_srcdir=$srcdir ;;
2577 *) # Relative name.
2578 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2579 ac_top_srcdir=$ac_top_build_prefix$srcdir
2580 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2581 esac
2582 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2583
2584 cd "$ac_dir" || { ac_status=$?; continue; }
2585 # Check for guested configure.
2586 if test -f "$ac_srcdir/configure.gnu"; then
2587 echo &&
2588 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2589 elif test -f "$ac_srcdir/configure"; then
2590 echo &&
2591 $SHELL "$ac_srcdir/configure" --help=recursive
2592 else
2593 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2594 fi || ac_status=$?
2595 cd "$ac_pwd" || { ac_status=$?; break; }
2596 done
2597 fi
2598
2599 test -n "$ac_init_help" && exit $ac_status
2600 if $ac_init_version; then
2601 cat <<\_ACEOF
2602 GRUB configure 2.06
2603 generated by GNU Autoconf 2.69
2604
2605 Copyright (C) 2012 Free Software Foundation, Inc.
2606 This configure script is free software; the Free Software Foundation
2607 gives unlimited permission to copy, distribute and modify it.
2608 _ACEOF
2609 exit
2610 fi
2611
2612 ## ------------------------ ##
2613 ## Autoconf initialization. ##
2614 ## ------------------------ ##
2615
2616 # ac_fn_c_try_compile LINENO
2617 # --------------------------
2618 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2619 ac_fn_c_try_compile ()
2620 {
2621 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2622 rm -f conftest.$ac_objext
2623 if { { ac_try="$ac_compile"
2624 case "(($ac_try" in
2625 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2626 *) ac_try_echo=$ac_try;;
2627 esac
2628 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2629 $as_echo "$ac_try_echo"; } >&5
2630 (eval "$ac_compile") 2>conftest.err
2631 ac_status=$?
2632 if test -s conftest.err; then
2633 grep -v '^ *+' conftest.err >conftest.er1
2634 cat conftest.er1 >&5
2635 mv -f conftest.er1 conftest.err
2636 fi
2637 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2638 test $ac_status = 0; } && {
2639 test -z "$ac_c_werror_flag" ||
2640 test ! -s conftest.err
2641 } && test -s conftest.$ac_objext; then :
2642 ac_retval=0
2643 else
2644 $as_echo "$as_me: failed program was:" >&5
2645 sed 's/^/| /' conftest.$ac_ext >&5
2646
2647 ac_retval=1
2648 fi
2649 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2650 as_fn_set_status $ac_retval
2651
2652 } # ac_fn_c_try_compile
2653
2654 # ac_fn_c_try_link LINENO
2655 # -----------------------
2656 # Try to link conftest.$ac_ext, and return whether this succeeded.
2657 ac_fn_c_try_link ()
2658 {
2659 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2660 rm -f conftest.$ac_objext conftest$ac_exeext
2661 if { { ac_try="$ac_link"
2662 case "(($ac_try" in
2663 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2664 *) ac_try_echo=$ac_try;;
2665 esac
2666 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2667 $as_echo "$ac_try_echo"; } >&5
2668 (eval "$ac_link") 2>conftest.err
2669 ac_status=$?
2670 if test -s conftest.err; then
2671 grep -v '^ *+' conftest.err >conftest.er1
2672 cat conftest.er1 >&5
2673 mv -f conftest.er1 conftest.err
2674 fi
2675 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2676 test $ac_status = 0; } && {
2677 test -z "$ac_c_werror_flag" ||
2678 test ! -s conftest.err
2679 } && test -s conftest$ac_exeext && {
2680 test "$cross_compiling" = yes ||
2681 test -x conftest$ac_exeext
2682 }; then :
2683 ac_retval=0
2684 else
2685 $as_echo "$as_me: failed program was:" >&5
2686 sed 's/^/| /' conftest.$ac_ext >&5
2687
2688 ac_retval=1
2689 fi
2690 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2691 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2692 # interfere with the next link command; also delete a directory that is
2693 # left behind by Apple's compiler. We do this before executing the actions.
2694 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2695 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2696 as_fn_set_status $ac_retval
2697
2698 } # ac_fn_c_try_link
2699
2700 # ac_fn_c_try_cpp LINENO
2701 # ----------------------
2702 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2703 ac_fn_c_try_cpp ()
2704 {
2705 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2706 if { { ac_try="$ac_cpp conftest.$ac_ext"
2707 case "(($ac_try" in
2708 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2709 *) ac_try_echo=$ac_try;;
2710 esac
2711 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2712 $as_echo "$ac_try_echo"; } >&5
2713 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2714 ac_status=$?
2715 if test -s conftest.err; then
2716 grep -v '^ *+' conftest.err >conftest.er1
2717 cat conftest.er1 >&5
2718 mv -f conftest.er1 conftest.err
2719 fi
2720 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2721 test $ac_status = 0; } > conftest.i && {
2722 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2723 test ! -s conftest.err
2724 }; then :
2725 ac_retval=0
2726 else
2727 $as_echo "$as_me: failed program was:" >&5
2728 sed 's/^/| /' conftest.$ac_ext >&5
2729
2730 ac_retval=1
2731 fi
2732 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2733 as_fn_set_status $ac_retval
2734
2735 } # ac_fn_c_try_cpp
2736
2737 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2738 # -------------------------------------------------------
2739 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2740 # the include files in INCLUDES and setting the cache variable VAR
2741 # accordingly.
2742 ac_fn_c_check_header_mongrel ()
2743 {
2744 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2745 if eval \${$3+:} false; then :
2746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2747 $as_echo_n "checking for $2... " >&6; }
2748 if eval \${$3+:} false; then :
2749 $as_echo_n "(cached) " >&6
2750 fi
2751 eval ac_res=\$$3
2752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2753 $as_echo "$ac_res" >&6; }
2754 else
2755 # Is the header compilable?
2756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2757 $as_echo_n "checking $2 usability... " >&6; }
2758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2759 /* end confdefs.h. */
2760 $4
2761 #include <$2>
2762 _ACEOF
2763 if ac_fn_c_try_compile "$LINENO"; then :
2764 ac_header_compiler=yes
2765 else
2766 ac_header_compiler=no
2767 fi
2768 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2770 $as_echo "$ac_header_compiler" >&6; }
2771
2772 # Is the header present?
2773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2774 $as_echo_n "checking $2 presence... " >&6; }
2775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2776 /* end confdefs.h. */
2777 #include <$2>
2778 _ACEOF
2779 if ac_fn_c_try_cpp "$LINENO"; then :
2780 ac_header_preproc=yes
2781 else
2782 ac_header_preproc=no
2783 fi
2784 rm -f conftest.err conftest.i conftest.$ac_ext
2785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2786 $as_echo "$ac_header_preproc" >&6; }
2787
2788 # So? What about this header?
2789 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2790 yes:no: )
2791 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2792 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2793 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2794 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2795 ;;
2796 no:yes:* )
2797 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2798 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2799 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2800 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2801 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2802 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2803 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2804 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2805 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2806 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2807 ( $as_echo "## ------------------------------- ##
2808 ## Report this to bug-grub@gnu.org ##
2809 ## ------------------------------- ##"
2810 ) | sed "s/^/$as_me: WARNING: /" >&2
2811 ;;
2812 esac
2813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2814 $as_echo_n "checking for $2... " >&6; }
2815 if eval \${$3+:} false; then :
2816 $as_echo_n "(cached) " >&6
2817 else
2818 eval "$3=\$ac_header_compiler"
2819 fi
2820 eval ac_res=\$$3
2821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2822 $as_echo "$ac_res" >&6; }
2823 fi
2824 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2825
2826 } # ac_fn_c_check_header_mongrel
2827
2828 # ac_fn_c_try_run LINENO
2829 # ----------------------
2830 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2831 # that executables *can* be run.
2832 ac_fn_c_try_run ()
2833 {
2834 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2835 if { { ac_try="$ac_link"
2836 case "(($ac_try" in
2837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2838 *) ac_try_echo=$ac_try;;
2839 esac
2840 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2841 $as_echo "$ac_try_echo"; } >&5
2842 (eval "$ac_link") 2>&5
2843 ac_status=$?
2844 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2845 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2846 { { case "(($ac_try" in
2847 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2848 *) ac_try_echo=$ac_try;;
2849 esac
2850 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2851 $as_echo "$ac_try_echo"; } >&5
2852 (eval "$ac_try") 2>&5
2853 ac_status=$?
2854 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2855 test $ac_status = 0; }; }; then :
2856 ac_retval=0
2857 else
2858 $as_echo "$as_me: program exited with status $ac_status" >&5
2859 $as_echo "$as_me: failed program was:" >&5
2860 sed 's/^/| /' conftest.$ac_ext >&5
2861
2862 ac_retval=$ac_status
2863 fi
2864 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2865 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2866 as_fn_set_status $ac_retval
2867
2868 } # ac_fn_c_try_run
2869
2870 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2871 # -------------------------------------------------------
2872 # Tests whether HEADER exists and can be compiled using the include files in
2873 # INCLUDES, setting the cache variable VAR accordingly.
2874 ac_fn_c_check_header_compile ()
2875 {
2876 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2878 $as_echo_n "checking for $2... " >&6; }
2879 if eval \${$3+:} false; then :
2880 $as_echo_n "(cached) " >&6
2881 else
2882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2883 /* end confdefs.h. */
2884 $4
2885 #include <$2>
2886 _ACEOF
2887 if ac_fn_c_try_compile "$LINENO"; then :
2888 eval "$3=yes"
2889 else
2890 eval "$3=no"
2891 fi
2892 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2893 fi
2894 eval ac_res=\$$3
2895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2896 $as_echo "$ac_res" >&6; }
2897 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2898
2899 } # ac_fn_c_check_header_compile
2900
2901 # ac_fn_cxx_try_compile LINENO
2902 # ----------------------------
2903 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2904 ac_fn_cxx_try_compile ()
2905 {
2906 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2907 rm -f conftest.$ac_objext
2908 if { { ac_try="$ac_compile"
2909 case "(($ac_try" in
2910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2911 *) ac_try_echo=$ac_try;;
2912 esac
2913 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2914 $as_echo "$ac_try_echo"; } >&5
2915 (eval "$ac_compile") 2>conftest.err
2916 ac_status=$?
2917 if test -s conftest.err; then
2918 grep -v '^ *+' conftest.err >conftest.er1
2919 cat conftest.er1 >&5
2920 mv -f conftest.er1 conftest.err
2921 fi
2922 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2923 test $ac_status = 0; } && {
2924 test -z "$ac_cxx_werror_flag" ||
2925 test ! -s conftest.err
2926 } && test -s conftest.$ac_objext; then :
2927 ac_retval=0
2928 else
2929 $as_echo "$as_me: failed program was:" >&5
2930 sed 's/^/| /' conftest.$ac_ext >&5
2931
2932 ac_retval=1
2933 fi
2934 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2935 as_fn_set_status $ac_retval
2936
2937 } # ac_fn_cxx_try_compile
2938
2939 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2940 # --------------------------------------------
2941 # Tries to find the compile-time value of EXPR in a program that includes
2942 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2943 # computed
2944 ac_fn_c_compute_int ()
2945 {
2946 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2947 if test "$cross_compiling" = yes; then
2948 # Depending upon the size, compute the lo and hi bounds.
2949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2950 /* end confdefs.h. */
2951 $4
2952 int
2953 main (void)
2954 {
2955 static int test_array [1 - 2 * !(($2) >= 0)];
2956 test_array [0] = 0;
2957 return test_array [0];
2958
2959 ;
2960 return 0;
2961 }
2962 _ACEOF
2963 if ac_fn_c_try_compile "$LINENO"; then :
2964 ac_lo=0 ac_mid=0
2965 while :; do
2966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2967 /* end confdefs.h. */
2968 $4
2969 int
2970 main (void)
2971 {
2972 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2973 test_array [0] = 0;
2974 return test_array [0];
2975
2976 ;
2977 return 0;
2978 }
2979 _ACEOF
2980 if ac_fn_c_try_compile "$LINENO"; then :
2981 ac_hi=$ac_mid; break
2982 else
2983 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2984 if test $ac_lo -le $ac_mid; then
2985 ac_lo= ac_hi=
2986 break
2987 fi
2988 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2989 fi
2990 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2991 done
2992 else
2993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2994 /* end confdefs.h. */
2995 $4
2996 int
2997 main (void)
2998 {
2999 static int test_array [1 - 2 * !(($2) < 0)];
3000 test_array [0] = 0;
3001 return test_array [0];
3002
3003 ;
3004 return 0;
3005 }
3006 _ACEOF
3007 if ac_fn_c_try_compile "$LINENO"; then :
3008 ac_hi=-1 ac_mid=-1
3009 while :; do
3010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3011 /* end confdefs.h. */
3012 $4
3013 int
3014 main (void)
3015 {
3016 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
3017 test_array [0] = 0;
3018 return test_array [0];
3019
3020 ;
3021 return 0;
3022 }
3023 _ACEOF
3024 if ac_fn_c_try_compile "$LINENO"; then :
3025 ac_lo=$ac_mid; break
3026 else
3027 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
3028 if test $ac_mid -le $ac_hi; then
3029 ac_lo= ac_hi=
3030 break
3031 fi
3032 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
3033 fi
3034 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3035 done
3036 else
3037 ac_lo= ac_hi=
3038 fi
3039 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3040 fi
3041 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3042 # Binary search between lo and hi bounds.
3043 while test "x$ac_lo" != "x$ac_hi"; do
3044 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
3045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3046 /* end confdefs.h. */
3047 $4
3048 int
3049 main (void)
3050 {
3051 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3052 test_array [0] = 0;
3053 return test_array [0];
3054
3055 ;
3056 return 0;
3057 }
3058 _ACEOF
3059 if ac_fn_c_try_compile "$LINENO"; then :
3060 ac_hi=$ac_mid
3061 else
3062 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
3063 fi
3064 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3065 done
3066 case $ac_lo in #((
3067 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
3068 '') ac_retval=1 ;;
3069 esac
3070 else
3071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3072 /* end confdefs.h. */
3073 $4
3074 static long int longval () { return $2; }
3075 static unsigned long int ulongval () { return $2; }
3076 #include <stdio.h>
3077 #include <stdlib.h>
3078 int
3079 main (void)
3080 {
3081
3082 FILE *f = fopen ("conftest.val", "w");
3083 if (! f)
3084 return 1;
3085 if (($2) < 0)
3086 {
3087 long int i = longval ();
3088 if (i != ($2))
3089 return 1;
3090 fprintf (f, "%ld", i);
3091 }
3092 else
3093 {
3094 unsigned long int i = ulongval ();
3095 if (i != ($2))
3096 return 1;
3097 fprintf (f, "%lu", i);
3098 }
3099 /* Do not output a trailing newline, as this causes \r\n confusion
3100 on some platforms. */
3101 return ferror (f) || fclose (f) != 0;
3102
3103 ;
3104 return 0;
3105 }
3106 _ACEOF
3107 if ac_fn_c_try_run "$LINENO"; then :
3108 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
3109 else
3110 ac_retval=1
3111 fi
3112 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3113 conftest.$ac_objext conftest.beam conftest.$ac_ext
3114 rm -f conftest.val
3115
3116 fi
3117 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3118 as_fn_set_status $ac_retval
3119
3120 } # ac_fn_c_compute_int
3121
3122 # ac_fn_c_check_func LINENO FUNC VAR
3123 # ----------------------------------
3124 # Tests whether FUNC exists, setting the cache variable VAR accordingly
3125 ac_fn_c_check_func ()
3126 {
3127 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3129 $as_echo_n "checking for $2... " >&6; }
3130 if eval \${$3+:} false; then :
3131 $as_echo_n "(cached) " >&6
3132 else
3133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3134 /* end confdefs.h. */
3135 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
3136 For example, HP-UX 11i <limits.h> declares gettimeofday. */
3137 #define $2 innocuous_$2
3138
3139 /* System header to define __stub macros and hopefully few prototypes,
3140 which can conflict with char $2 (); below.
3141 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3142 <limits.h> exists even on freestanding compilers. */
3143
3144 #ifdef __STDC__
3145 # include <limits.h>
3146 #else
3147 # include <assert.h>
3148 #endif
3149
3150 #undef $2
3151
3152 /* Override any GCC internal prototype to avoid an error.
3153 Use char because int might match the return type of a GCC
3154 builtin and then its argument prototype would still apply. */
3155 #ifdef __cplusplus
3156 extern "C"
3157 #endif
3158 char $2 ();
3159 /* The GNU C library defines this for functions which it implements
3160 to always fail with ENOSYS. Some functions are actually named
3161 something starting with __ and the normal name is an alias. */
3162 #if defined __stub_$2 || defined __stub___$2
3163 choke me
3164 #endif
3165
3166 int
3167 main (void)
3168 {
3169 return $2 ();
3170 ;
3171 return 0;
3172 }
3173 _ACEOF
3174 if ac_fn_c_try_link "$LINENO"; then :
3175 eval "$3=yes"
3176 else
3177 eval "$3=no"
3178 fi
3179 rm -f core conftest.err conftest.$ac_objext \
3180 conftest$ac_exeext conftest.$ac_ext
3181 fi
3182 eval ac_res=\$$3
3183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3184 $as_echo "$ac_res" >&6; }
3185 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3186
3187 } # ac_fn_c_check_func
3188
3189 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
3190 # ----------------------------------------------------
3191 # Tries to find if the field MEMBER exists in type AGGR, after including
3192 # INCLUDES, setting cache variable VAR accordingly.
3193 ac_fn_c_check_member ()
3194 {
3195 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
3197 $as_echo_n "checking for $2.$3... " >&6; }
3198 if eval \${$4+:} false; then :
3199 $as_echo_n "(cached) " >&6
3200 else
3201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3202 /* end confdefs.h. */
3203 $5
3204 int
3205 main (void)
3206 {
3207 static $2 ac_aggr;
3208 if (ac_aggr.$3)
3209 return 0;
3210 ;
3211 return 0;
3212 }
3213 _ACEOF
3214 if ac_fn_c_try_compile "$LINENO"; then :
3215 eval "$4=yes"
3216 else
3217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3218 /* end confdefs.h. */
3219 $5
3220 int
3221 main (void)
3222 {
3223 static $2 ac_aggr;
3224 if (sizeof ac_aggr.$3)
3225 return 0;
3226 ;
3227 return 0;
3228 }
3229 _ACEOF
3230 if ac_fn_c_try_compile "$LINENO"; then :
3231 eval "$4=yes"
3232 else
3233 eval "$4=no"
3234 fi
3235 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3236 fi
3237 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3238 fi
3239 eval ac_res=\$$4
3240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3241 $as_echo "$ac_res" >&6; }
3242 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3243
3244 } # ac_fn_c_check_member
3245
3246 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
3247 # -------------------------------------------
3248 # Tests whether TYPE exists after having included INCLUDES, setting cache
3249 # variable VAR accordingly.
3250 ac_fn_c_check_type ()
3251 {
3252 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3254 $as_echo_n "checking for $2... " >&6; }
3255 if eval \${$3+:} false; then :
3256 $as_echo_n "(cached) " >&6
3257 else
3258 eval "$3=no"
3259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3260 /* end confdefs.h. */
3261 $4
3262 int
3263 main (void)
3264 {
3265 if (sizeof ($2))
3266 return 0;
3267 ;
3268 return 0;
3269 }
3270 _ACEOF
3271 if ac_fn_c_try_compile "$LINENO"; then :
3272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3273 /* end confdefs.h. */
3274 $4
3275 int
3276 main (void)
3277 {
3278 if (sizeof (($2)))
3279 return 0;
3280 ;
3281 return 0;
3282 }
3283 _ACEOF
3284 if ac_fn_c_try_compile "$LINENO"; then :
3285
3286 else
3287 eval "$3=yes"
3288 fi
3289 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3290 fi
3291 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3292 fi
3293 eval ac_res=\$$3
3294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3295 $as_echo "$ac_res" >&6; }
3296 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3297
3298 } # ac_fn_c_check_type
3299
3300 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
3301 # ---------------------------------------------
3302 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
3303 # accordingly.
3304 ac_fn_c_check_decl ()
3305 {
3306 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3307 as_decl_name=`echo $2|sed 's/ *(.*//'`
3308 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
3309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
3310 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
3311 if eval \${$3+:} false; then :
3312 $as_echo_n "(cached) " >&6
3313 else
3314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3315 /* end confdefs.h. */
3316 $4
3317 int
3318 main (void)
3319 {
3320 #ifndef $as_decl_name
3321 #ifdef __cplusplus
3322 (void) $as_decl_use;
3323 #else
3324 (void) $as_decl_name;
3325 #endif
3326 #endif
3327
3328 ;
3329 return 0;
3330 }
3331 _ACEOF
3332 if ac_fn_c_try_compile "$LINENO"; then :
3333 eval "$3=yes"
3334 else
3335 eval "$3=no"
3336 fi
3337 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3338 fi
3339 eval ac_res=\$$3
3340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3341 $as_echo "$ac_res" >&6; }
3342 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3343
3344 } # ac_fn_c_check_decl
3345 cat >config.log <<_ACEOF
3346 This file contains any messages produced by compilers while
3347 running configure, to aid debugging if configure makes a mistake.
3348
3349 It was created by GRUB $as_me 2.06, which was
3350 generated by GNU Autoconf 2.69. Invocation command line was
3351
3352 $ $0 $@
3353
3354 _ACEOF
3355 exec 5>>config.log
3356 {
3357 cat <<_ASUNAME
3358 ## --------- ##
3359 ## Platform. ##
3360 ## --------- ##
3361
3362 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3363 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3364 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3365 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3366 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3367
3368 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3369 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
3370
3371 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
3372 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
3373 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3374 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
3375 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
3376 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
3377 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
3378
3379 _ASUNAME
3380
3381 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3382 for as_dir in $PATH
3383 do
3384 IFS=$as_save_IFS
3385 test -z "$as_dir" && as_dir=.
3386 $as_echo "PATH: $as_dir"
3387 done
3388 IFS=$as_save_IFS
3389
3390 } >&5
3391
3392 cat >&5 <<_ACEOF
3393
3394
3395 ## ----------- ##
3396 ## Core tests. ##
3397 ## ----------- ##
3398
3399 _ACEOF
3400
3401
3402 # Keep a trace of the command line.
3403 # Strip out --no-create and --no-recursion so they do not pile up.
3404 # Strip out --silent because we don't want to record it for future runs.
3405 # Also quote any args containing shell meta-characters.
3406 # Make two passes to allow for proper duplicate-argument suppression.
3407 ac_configure_args=
3408 ac_configure_args0=
3409 ac_configure_args1=
3410 ac_must_keep_next=false
3411 for ac_pass in 1 2
3412 do
3413 for ac_arg
3414 do
3415 case $ac_arg in
3416 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3417 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3418 | -silent | --silent | --silen | --sile | --sil)
3419 continue ;;
3420 *\'*)
3421 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3422 esac
3423 case $ac_pass in
3424 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3425 2)
3426 as_fn_append ac_configure_args1 " '$ac_arg'"
3427 if test $ac_must_keep_next = true; then
3428 ac_must_keep_next=false # Got value, back to normal.
3429 else
3430 case $ac_arg in
3431 *=* | --config-cache | -C | -disable-* | --disable-* \
3432 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3433 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3434 | -with-* | --with-* | -without-* | --without-* | --x)
3435 case "$ac_configure_args0 " in
3436 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3437 esac
3438 ;;
3439 -* ) ac_must_keep_next=true ;;
3440 esac
3441 fi
3442 as_fn_append ac_configure_args " '$ac_arg'"
3443 ;;
3444 esac
3445 done
3446 done
3447 { ac_configure_args0=; unset ac_configure_args0;}
3448 { ac_configure_args1=; unset ac_configure_args1;}
3449
3450 # When interrupted or exit'd, cleanup temporary files, and complete
3451 # config.log. We remove comments because anyway the quotes in there
3452 # would cause problems or look ugly.
3453 # WARNING: Use '\'' to represent an apostrophe within the trap.
3454 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3455 trap 'exit_status=$?
3456 # Save into config.log some information that might help in debugging.
3457 {
3458 echo
3459
3460 $as_echo "## ---------------- ##
3461 ## Cache variables. ##
3462 ## ---------------- ##"
3463 echo
3464 # The following way of writing the cache mishandles newlines in values,
3465 (
3466 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3467 eval ac_val=\$$ac_var
3468 case $ac_val in #(
3469 *${as_nl}*)
3470 case $ac_var in #(
3471 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3472 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3473 esac
3474 case $ac_var in #(
3475 _ | IFS | as_nl) ;; #(
3476 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3477 *) { eval $ac_var=; unset $ac_var;} ;;
3478 esac ;;
3479 esac
3480 done
3481 (set) 2>&1 |
3482 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3483 *${as_nl}ac_space=\ *)
3484 sed -n \
3485 "s/'\''/'\''\\\\'\'''\''/g;
3486 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3487 ;; #(
3488 *)
3489 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3490 ;;
3491 esac |
3492 sort
3493 )
3494 echo
3495
3496 $as_echo "## ----------------- ##
3497 ## Output variables. ##
3498 ## ----------------- ##"
3499 echo
3500 for ac_var in $ac_subst_vars
3501 do
3502 eval ac_val=\$$ac_var
3503 case $ac_val in
3504 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3505 esac
3506 $as_echo "$ac_var='\''$ac_val'\''"
3507 done | sort
3508 echo
3509
3510 if test -n "$ac_subst_files"; then
3511 $as_echo "## ------------------- ##
3512 ## File substitutions. ##
3513 ## ------------------- ##"
3514 echo
3515 for ac_var in $ac_subst_files
3516 do
3517 eval ac_val=\$$ac_var
3518 case $ac_val in
3519 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3520 esac
3521 $as_echo "$ac_var='\''$ac_val'\''"
3522 done | sort
3523 echo
3524 fi
3525
3526 if test -s confdefs.h; then
3527 $as_echo "## ----------- ##
3528 ## confdefs.h. ##
3529 ## ----------- ##"
3530 echo
3531 cat confdefs.h
3532 echo
3533 fi
3534 test "$ac_signal" != 0 &&
3535 $as_echo "$as_me: caught signal $ac_signal"
3536 $as_echo "$as_me: exit $exit_status"
3537 } >&5
3538 rm -f core *.core core.conftest.* &&
3539 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3540 exit $exit_status
3541 ' 0
3542 for ac_signal in 1 2 13 15; do
3543 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3544 done
3545 ac_signal=0
3546
3547 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3548 rm -f -r conftest* confdefs.h
3549
3550 $as_echo "/* confdefs.h */" > confdefs.h
3551
3552 # Predefined preprocessor variables.
3553
3554 cat >>confdefs.h <<_ACEOF
3555 #define PACKAGE_NAME "$PACKAGE_NAME"
3556 _ACEOF
3557
3558 cat >>confdefs.h <<_ACEOF
3559 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3560 _ACEOF
3561
3562 cat >>confdefs.h <<_ACEOF
3563 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3564 _ACEOF
3565
3566 cat >>confdefs.h <<_ACEOF
3567 #define PACKAGE_STRING "$PACKAGE_STRING"
3568 _ACEOF
3569
3570 cat >>confdefs.h <<_ACEOF
3571 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3572 _ACEOF
3573
3574 cat >>confdefs.h <<_ACEOF
3575 #define PACKAGE_URL "$PACKAGE_URL"
3576 _ACEOF
3577
3578
3579 # Let the site file select an alternate cache file if it wants to.
3580 # Prefer an explicitly selected file to automatically selected ones.
3581 ac_site_file1=NONE
3582 ac_site_file2=NONE
3583 if test -n "$CONFIG_SITE"; then
3584 # We do not want a PATH search for config.site.
3585 case $CONFIG_SITE in #((
3586 -*) ac_site_file1=./$CONFIG_SITE;;
3587 */*) ac_site_file1=$CONFIG_SITE;;
3588 *) ac_site_file1=./$CONFIG_SITE;;
3589 esac
3590 elif test "x$prefix" != xNONE; then
3591 ac_site_file1=$prefix/share/config.site
3592 ac_site_file2=$prefix/etc/config.site
3593 else
3594 ac_site_file1=$ac_default_prefix/share/config.site
3595 ac_site_file2=$ac_default_prefix/etc/config.site
3596 fi
3597 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3598 do
3599 test "x$ac_site_file" = xNONE && continue
3600 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3601 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3602 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3603 sed 's/^/| /' "$ac_site_file" >&5
3604 . "$ac_site_file" \
3605 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3606 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3607 as_fn_error $? "failed to load site script $ac_site_file
3608 See \`config.log' for more details" "$LINENO" 5; }
3609 fi
3610 done
3611
3612 if test -r "$cache_file"; then
3613 # Some versions of bash will fail to source /dev/null (special files
3614 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
3615 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3616 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3617 $as_echo "$as_me: loading cache $cache_file" >&6;}
3618 case $cache_file in
3619 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3620 *) . "./$cache_file";;
3621 esac
3622 fi
3623 else
3624 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3625 $as_echo "$as_me: creating cache $cache_file" >&6;}
3626 >$cache_file
3627 fi
3628
3629 gt_needs="$gt_needs "
3630 as_fn_append ac_header_list " sys/types.h"
3631 as_fn_append ac_func_list " flockfile"
3632 as_fn_append ac_func_list " funlockfile"
3633 as_fn_append ac_header_list " features.h"
3634 as_fn_append ac_header_list " linewrap.h"
3635 as_fn_append ac_func_list " btowc"
3636 as_fn_append ac_header_list " unistd.h"
3637 as_fn_append ac_header_list " sys/param.h"
3638 as_fn_append ac_func_list " _set_invalid_parameter_handler"
3639 as_fn_append ac_header_list " sys/socket.h"
3640 as_fn_append ac_func_list " fchdir"
3641 as_fn_append ac_header_list " dirent.h"
3642 as_fn_append ac_func_list " fcntl"
3643 as_fn_append ac_func_list " symlink"
3644 as_fn_append ac_func_list " mempcpy"
3645 as_fn_append ac_header_list " fnmatch.h"
3646 as_fn_append ac_func_list " fnmatch"
3647 as_fn_append ac_func_list " isblank"
3648 as_fn_append ac_func_list " iswctype"
3649 as_fn_append ac_func_list " mbsrtowcs"
3650 as_fn_append ac_func_list " wmemchr"
3651 as_fn_append ac_func_list " wmemcpy"
3652 as_fn_append ac_func_list " wmempcpy"
3653 as_fn_append ac_header_list " wctype.h"
3654 as_fn_append ac_header_list " sys/stat.h"
3655 as_fn_append ac_func_list " getdelim"
3656 as_fn_append ac_func_list " getdtablesize"
3657 gl_getopt_required=GNU
3658 as_fn_append ac_header_list " getopt.h"
3659 as_fn_append ac_header_list " sys/cdefs.h"
3660 as_fn_append ac_func_list " getprogname"
3661 as_fn_append ac_func_list " getexecname"
3662 as_fn_append ac_header_list " langinfo.h"
3663 as_fn_append ac_header_list " limits.h"
3664 as_fn_append ac_header_list " xlocale.h"
3665 as_fn_append ac_func_list " mbsinit"
3666 as_fn_append ac_func_list " mbrtowc"
3667 as_fn_append ac_header_list " wchar.h"
3668 as_fn_append ac_func_list " isascii"
3669 as_fn_append ac_header_list " sys/mman.h"
3670 as_fn_append ac_func_list " mprotect"
3671 as_fn_append ac_func_list " nl_langinfo"
3672 as_fn_append ac_func_list " lstat"
3673 as_fn_append ac_func_list " openat"
3674 as_fn_append ac_header_list " malloc.h"
3675 as_fn_append ac_func_list " sleep"
3676 as_fn_append ac_header_list " sys/time.h"
3677 as_fn_append ac_header_list " stdint.h"
3678 as_fn_append ac_func_list " strdup"
3679 as_fn_append ac_header_list " strings.h"
3680 as_fn_append ac_func_list " strndup"
3681 as_fn_append ac_header_list " sysexits.h"
3682 as_fn_append ac_func_list " pipe"
3683 as_fn_append ac_func_list " vasnprintf"
3684 as_fn_append ac_func_list " snprintf"
3685 as_fn_append ac_header_list " crtdefs.h"
3686 as_fn_append ac_func_list " wcrtomb"
3687 as_fn_append ac_func_list " iswcntrl"
3688 as_fn_append ac_func_list " wcwidth"
3689 # Check that the precious variables saved in the cache have kept the same
3690 # value.
3691 ac_cache_corrupted=false
3692 for ac_var in $ac_precious_vars; do
3693 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3694 eval ac_new_set=\$ac_env_${ac_var}_set
3695 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3696 eval ac_new_val=\$ac_env_${ac_var}_value
3697 case $ac_old_set,$ac_new_set in
3698 set,)
3699 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3700 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3701 ac_cache_corrupted=: ;;
3702 ,set)
3703 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3704 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3705 ac_cache_corrupted=: ;;
3706 ,);;
3707 *)
3708 if test "x$ac_old_val" != "x$ac_new_val"; then
3709 # differences in whitespace do not lead to failure.
3710 ac_old_val_w=`echo x $ac_old_val`
3711 ac_new_val_w=`echo x $ac_new_val`
3712 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3713 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3714 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3715 ac_cache_corrupted=:
3716 else
3717 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3718 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3719 eval $ac_var=\$ac_old_val
3720 fi
3721 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3722 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3723 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3724 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
3725 fi;;
3726 esac
3727 # Pass precious variables to config.status.
3728 if test "$ac_new_set" = set; then
3729 case $ac_new_val in
3730 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3731 *) ac_arg=$ac_var=$ac_new_val ;;
3732 esac
3733 case " $ac_configure_args " in
3734 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3735 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3736 esac
3737 fi
3738 done
3739 if $ac_cache_corrupted; then
3740 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3741 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3742 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3743 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3744 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3745 fi
3746 ## -------------------- ##
3747 ## Main body of script. ##
3748 ## -------------------- ##
3749
3750 ac_ext=c
3751 ac_cpp='$CPP $CPPFLAGS'
3752 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3753 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3754 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3755
3756
3757
3758 ac_aux_dir=
3759 for ac_dir in build-aux "$srcdir"/build-aux; do
3760 if test -f "$ac_dir/install-sh"; then
3761 ac_aux_dir=$ac_dir
3762 ac_install_sh="$ac_aux_dir/install-sh -c"
3763 break
3764 elif test -f "$ac_dir/install.sh"; then
3765 ac_aux_dir=$ac_dir
3766 ac_install_sh="$ac_aux_dir/install.sh -c"
3767 break
3768 elif test -f "$ac_dir/shtool"; then
3769 ac_aux_dir=$ac_dir
3770 ac_install_sh="$ac_aux_dir/shtool install -c"
3771 break
3772 fi
3773 done
3774 if test -z "$ac_aux_dir"; then
3775 as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
3776 fi
3777
3778 # These three variables are undocumented and unsupported,
3779 # and are intended to be withdrawn in a future Autoconf release.
3780 # They can cause serious problems if a builder's source tree is in a directory
3781 # whose full name contains unusual characters.
3782 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3783 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3784 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
3785
3786
3787
3788 # We don't want -g -O2 by default in CFLAGS
3789 : ${CFLAGS=""}
3790
3791 # Checks for build, host and target systems.
3792 # Make sure we can run config.sub.
3793 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3794 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
3795
3796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3797 $as_echo_n "checking build system type... " >&6; }
3798 if ${ac_cv_build+:} false; then :
3799 $as_echo_n "(cached) " >&6
3800 else
3801 ac_build_alias=$build_alias
3802 test "x$ac_build_alias" = x &&
3803 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3804 test "x$ac_build_alias" = x &&
3805 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
3806 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3807 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3808
3809 fi
3810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3811 $as_echo "$ac_cv_build" >&6; }
3812 case $ac_cv_build in
3813 *-*-*) ;;
3814 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
3815 esac
3816 build=$ac_cv_build
3817 ac_save_IFS=$IFS; IFS='-'
3818 set x $ac_cv_build
3819 shift
3820 build_cpu=$1
3821 build_vendor=$2
3822 shift; shift
3823 # Remember, the first character of IFS is used to create $*,
3824 # except with old shells:
3825 build_os=$*
3826 IFS=$ac_save_IFS
3827 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
3828
3829
3830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3831 $as_echo_n "checking host system type... " >&6; }
3832 if ${ac_cv_host+:} false; then :
3833 $as_echo_n "(cached) " >&6
3834 else
3835 if test "x$host_alias" = x; then
3836 ac_cv_host=$ac_cv_build
3837 else
3838 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
3839 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
3840 fi
3841
3842 fi
3843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3844 $as_echo "$ac_cv_host" >&6; }
3845 case $ac_cv_host in
3846 *-*-*) ;;
3847 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
3848 esac
3849 host=$ac_cv_host
3850 ac_save_IFS=$IFS; IFS='-'
3851 set x $ac_cv_host
3852 shift
3853 host_cpu=$1
3854 host_vendor=$2
3855 shift; shift
3856 # Remember, the first character of IFS is used to create $*,
3857 # except with old shells:
3858 host_os=$*
3859 IFS=$ac_save_IFS
3860 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3861
3862
3863 save_program_prefix="${program_prefix}"
3864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
3865 $as_echo_n "checking target system type... " >&6; }
3866 if ${ac_cv_target+:} false; then :
3867 $as_echo_n "(cached) " >&6
3868 else
3869 if test "x$target_alias" = x; then
3870 ac_cv_target=$ac_cv_host
3871 else
3872 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
3873 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
3874 fi
3875
3876 fi
3877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
3878 $as_echo "$ac_cv_target" >&6; }
3879 case $ac_cv_target in
3880 *-*-*) ;;
3881 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
3882 esac
3883 target=$ac_cv_target
3884 ac_save_IFS=$IFS; IFS='-'
3885 set x $ac_cv_target
3886 shift
3887 target_cpu=$1
3888 target_vendor=$2
3889 shift; shift
3890 # Remember, the first character of IFS is used to create $*,
3891 # except with old shells:
3892 target_os=$*
3893 IFS=$ac_save_IFS
3894 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
3895
3896
3897 # The aliases save the names the user supplied, while $host etc.
3898 # will get canonicalized.
3899 test -n "$target_alias" &&
3900 test "$program_prefix$program_suffix$program_transform_name" = \
3901 NONENONEs,x,x, &&
3902 program_prefix=${target_alias}-
3903 program_prefix="${save_program_prefix}"
3904
3905 am__api_version='1.15'
3906
3907 # Find a good install program. We prefer a C program (faster),
3908 # so one script is as good as another. But avoid the broken or
3909 # incompatible versions:
3910 # SysV /etc/install, /usr/sbin/install
3911 # SunOS /usr/etc/install
3912 # IRIX /sbin/install
3913 # AIX /bin/install
3914 # AmigaOS /C/install, which installs bootblocks on floppy discs
3915 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3916 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3917 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3918 # OS/2's system install, which has a completely different semantic
3919 # ./install, which can be erroneously created by make from ./install.sh.
3920 # Reject install programs that cannot install multiple files.
3921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3922 $as_echo_n "checking for a BSD-compatible install... " >&6; }
3923 if test -z "$INSTALL"; then
3924 if ${ac_cv_path_install+:} false; then :
3925 $as_echo_n "(cached) " >&6
3926 else
3927 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3928 for as_dir in $PATH
3929 do
3930 IFS=$as_save_IFS
3931 test -z "$as_dir" && as_dir=.
3932 # Account for people who put trailing slashes in PATH elements.
3933 case $as_dir/ in #((
3934 ./ | .// | /[cC]/* | \
3935 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3936 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3937 /usr/ucb/* ) ;;
3938 *)
3939 # OSF1 and SCO ODT 3.0 have their own names for install.
3940 # Don't use installbsd from OSF since it installs stuff as root
3941 # by default.
3942 for ac_prog in ginstall scoinst install; do
3943 for ac_exec_ext in '' $ac_executable_extensions; do
3944 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3945 if test $ac_prog = install &&
3946 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3947 # AIX install. It has an incompatible calling convention.
3948 :
3949 elif test $ac_prog = install &&
3950 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3951 # program-specific install script used by HP pwplus--don't use.
3952 :
3953 else
3954 rm -rf conftest.one conftest.two conftest.dir
3955 echo one > conftest.one
3956 echo two > conftest.two
3957 mkdir conftest.dir
3958 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3959 test -s conftest.one && test -s conftest.two &&
3960 test -s conftest.dir/conftest.one &&
3961 test -s conftest.dir/conftest.two
3962 then
3963 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3964 break 3
3965 fi
3966 fi
3967 fi
3968 done
3969 done
3970 ;;
3971 esac
3972
3973 done
3974 IFS=$as_save_IFS
3975
3976 rm -rf conftest.one conftest.two conftest.dir
3977
3978 fi
3979 if test "${ac_cv_path_install+set}" = set; then
3980 INSTALL=$ac_cv_path_install
3981 else
3982 # As a last resort, use the slow shell script. Don't cache a
3983 # value for INSTALL within a source directory, because that will
3984 # break other packages using the cache if that directory is
3985 # removed, or if the value is a relative name.
3986 INSTALL=$ac_install_sh
3987 fi
3988 fi
3989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3990 $as_echo "$INSTALL" >&6; }
3991
3992 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3993 # It thinks the first close brace ends the variable substitution.
3994 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3995
3996 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3997
3998 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3999
4000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
4001 $as_echo_n "checking whether build environment is sane... " >&6; }
4002 # Reject unsafe characters in $srcdir or the absolute working directory
4003 # name. Accept space and tab only in the latter.
4004 am_lf='
4005 '
4006 case `pwd` in
4007 *[\\\"\#\$\&\'\`$am_lf]*)
4008 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
4009 esac
4010 case $srcdir in
4011 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
4012 as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
4013 esac
4014
4015 # Do 'set' in a subshell so we don't clobber the current shell's
4016 # arguments. Must try -L first in case configure is actually a
4017 # symlink; some systems play weird games with the mod time of symlinks
4018 # (eg FreeBSD returns the mod time of the symlink's containing
4019 # directory).
4020 if (
4021 am_has_slept=no
4022 for am_try in 1 2; do
4023 echo "timestamp, slept: $am_has_slept" > conftest.file
4024 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
4025 if test "$*" = "X"; then
4026 # -L didn't work.
4027 set X `ls -t "$srcdir/configure" conftest.file`
4028 fi
4029 if test "$*" != "X $srcdir/configure conftest.file" \
4030 && test "$*" != "X conftest.file $srcdir/configure"; then
4031
4032 # If neither matched, then we have a broken ls. This can happen
4033 # if, for instance, CONFIG_SHELL is bash and it inherits a
4034 # broken ls alias from the environment. This has actually
4035 # happened. Such a system could not be considered "sane".
4036 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
4037 alias in your environment" "$LINENO" 5
4038 fi
4039 if test "$2" = conftest.file || test $am_try -eq 2; then
4040 break
4041 fi
4042 # Just in case.
4043 sleep 1
4044 am_has_slept=yes
4045 done
4046 test "$2" = conftest.file
4047 )
4048 then
4049 # Ok.
4050 :
4051 else
4052 as_fn_error $? "newly created file is older than distributed files!
4053 Check your system clock" "$LINENO" 5
4054 fi
4055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4056 $as_echo "yes" >&6; }
4057 # If we didn't sleep, we still need to ensure time stamps of config.status and
4058 # generated files are strictly newer.
4059 am_sleep_pid=
4060 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
4061 ( sleep 1 ) &
4062 am_sleep_pid=$!
4063 fi
4064
4065 rm -f conftest.file
4066
4067 test "$program_prefix" != NONE &&
4068 program_transform_name="s&^&$program_prefix&;$program_transform_name"
4069 # Use a double $ so make ignores it.
4070 test "$program_suffix" != NONE &&
4071 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
4072 # Double any \ or $.
4073 # By default was `s,x,x', remove it if useless.
4074 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
4075 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
4076
4077 # Expand $ac_aux_dir to an absolute path.
4078 am_aux_dir=`cd "$ac_aux_dir" && pwd`
4079
4080 if test x"${MISSING+set}" != xset; then
4081 case $am_aux_dir in
4082 *\ * | *\ *)
4083 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
4084 *)
4085 MISSING="\${SHELL} $am_aux_dir/missing" ;;
4086 esac
4087 fi
4088 # Use eval to expand $SHELL
4089 if eval "$MISSING --is-lightweight"; then
4090 am_missing_run="$MISSING "
4091 else
4092 am_missing_run=
4093 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
4094 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
4095 fi
4096
4097 if test x"${install_sh+set}" != xset; then
4098 case $am_aux_dir in
4099 *\ * | *\ *)
4100 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4101 *)
4102 install_sh="\${SHELL} $am_aux_dir/install-sh"
4103 esac
4104 fi
4105
4106 # Installed binaries are usually stripped using 'strip' when the user
4107 # run "make install-strip". However 'strip' might not be the right
4108 # tool to use in cross-compilation environments, therefore Automake
4109 # will honor the 'STRIP' environment variable to overrule this program.
4110 if test "$cross_compiling" != no; then
4111 if test -n "$ac_tool_prefix"; then
4112 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4113 set dummy ${ac_tool_prefix}strip; ac_word=$2
4114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4115 $as_echo_n "checking for $ac_word... " >&6; }
4116 if ${ac_cv_prog_STRIP+:} false; then :
4117 $as_echo_n "(cached) " >&6
4118 else
4119 if test -n "$STRIP"; then
4120 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4121 else
4122 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4123 for as_dir in $PATH
4124 do
4125 IFS=$as_save_IFS
4126 test -z "$as_dir" && as_dir=.
4127 for ac_exec_ext in '' $ac_executable_extensions; do
4128 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4129 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4130 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4131 break 2
4132 fi
4133 done
4134 done
4135 IFS=$as_save_IFS
4136
4137 fi
4138 fi
4139 STRIP=$ac_cv_prog_STRIP
4140 if test -n "$STRIP"; then
4141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4142 $as_echo "$STRIP" >&6; }
4143 else
4144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4145 $as_echo "no" >&6; }
4146 fi
4147
4148
4149 fi
4150 if test -z "$ac_cv_prog_STRIP"; then
4151 ac_ct_STRIP=$STRIP
4152 # Extract the first word of "strip", so it can be a program name with args.
4153 set dummy strip; ac_word=$2
4154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4155 $as_echo_n "checking for $ac_word... " >&6; }
4156 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
4157 $as_echo_n "(cached) " >&6
4158 else
4159 if test -n "$ac_ct_STRIP"; then
4160 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4161 else
4162 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4163 for as_dir in $PATH
4164 do
4165 IFS=$as_save_IFS
4166 test -z "$as_dir" && as_dir=.
4167 for ac_exec_ext in '' $ac_executable_extensions; do
4168 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4169 ac_cv_prog_ac_ct_STRIP="strip"
4170 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4171 break 2
4172 fi
4173 done
4174 done
4175 IFS=$as_save_IFS
4176
4177 fi
4178 fi
4179 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4180 if test -n "$ac_ct_STRIP"; then
4181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4182 $as_echo "$ac_ct_STRIP" >&6; }
4183 else
4184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4185 $as_echo "no" >&6; }
4186 fi
4187
4188 if test "x$ac_ct_STRIP" = x; then
4189 STRIP=":"
4190 else
4191 case $cross_compiling:$ac_tool_warned in
4192 yes:)
4193 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4194 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4195 ac_tool_warned=yes ;;
4196 esac
4197 STRIP=$ac_ct_STRIP
4198 fi
4199 else
4200 STRIP="$ac_cv_prog_STRIP"
4201 fi
4202
4203 fi
4204 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4205
4206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
4207 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
4208 if test -z "$MKDIR_P"; then
4209 if ${ac_cv_path_mkdir+:} false; then :
4210 $as_echo_n "(cached) " >&6
4211 else
4212 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4213 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
4214 do
4215 IFS=$as_save_IFS
4216 test -z "$as_dir" && as_dir=.
4217 for ac_prog in mkdir gmkdir; do
4218 for ac_exec_ext in '' $ac_executable_extensions; do
4219 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
4220 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
4221 'mkdir (GNU coreutils) '* | \
4222 'mkdir (coreutils) '* | \
4223 'mkdir (fileutils) '4.1*)
4224 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
4225 break 3;;
4226 esac
4227 done
4228 done
4229 done
4230 IFS=$as_save_IFS
4231
4232 fi
4233
4234 test -d ./--version && rmdir ./--version
4235 if test "${ac_cv_path_mkdir+set}" = set; then
4236 MKDIR_P="$ac_cv_path_mkdir -p"
4237 else
4238 # As a last resort, use the slow shell script. Don't cache a
4239 # value for MKDIR_P within a source directory, because that will
4240 # break other packages using the cache if that directory is
4241 # removed, or if the value is a relative name.
4242 MKDIR_P="$ac_install_sh -d"
4243 fi
4244 fi
4245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
4246 $as_echo "$MKDIR_P" >&6; }
4247
4248 for ac_prog in gawk mawk nawk awk
4249 do
4250 # Extract the first word of "$ac_prog", so it can be a program name with args.
4251 set dummy $ac_prog; ac_word=$2
4252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4253 $as_echo_n "checking for $ac_word... " >&6; }
4254 if ${ac_cv_prog_AWK+:} false; then :
4255 $as_echo_n "(cached) " >&6
4256 else
4257 if test -n "$AWK"; then
4258 ac_cv_prog_AWK="$AWK" # Let the user override the test.
4259 else
4260 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4261 for as_dir in $PATH
4262 do
4263 IFS=$as_save_IFS
4264 test -z "$as_dir" && as_dir=.
4265 for ac_exec_ext in '' $ac_executable_extensions; do
4266 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4267 ac_cv_prog_AWK="$ac_prog"
4268 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4269 break 2
4270 fi
4271 done
4272 done
4273 IFS=$as_save_IFS
4274
4275 fi
4276 fi
4277 AWK=$ac_cv_prog_AWK
4278 if test -n "$AWK"; then
4279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4280 $as_echo "$AWK" >&6; }
4281 else
4282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4283 $as_echo "no" >&6; }
4284 fi
4285
4286
4287 test -n "$AWK" && break
4288 done
4289
4290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4291 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4292 set x ${MAKE-make}
4293 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4294 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
4295 $as_echo_n "(cached) " >&6
4296 else
4297 cat >conftest.make <<\_ACEOF
4298 SHELL = /bin/sh
4299 all:
4300 @echo '@@@%%%=$(MAKE)=@@@%%%'
4301 _ACEOF
4302 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
4303 case `${MAKE-make} -f conftest.make 2>/dev/null` in
4304 *@@@%%%=?*=@@@%%%*)
4305 eval ac_cv_prog_make_${ac_make}_set=yes;;
4306 *)
4307 eval ac_cv_prog_make_${ac_make}_set=no;;
4308 esac
4309 rm -f conftest.make
4310 fi
4311 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4313 $as_echo "yes" >&6; }
4314 SET_MAKE=
4315 else
4316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4317 $as_echo "no" >&6; }
4318 SET_MAKE="MAKE=${MAKE-make}"
4319 fi
4320
4321 rm -rf .tst 2>/dev/null
4322 mkdir .tst 2>/dev/null
4323 if test -d .tst; then
4324 am__leading_dot=.
4325 else
4326 am__leading_dot=_
4327 fi
4328 rmdir .tst 2>/dev/null
4329
4330 # Check whether --enable-silent-rules was given.
4331 if test "${enable_silent_rules+set}" = set; then :
4332 enableval=$enable_silent_rules;
4333 fi
4334
4335 case $enable_silent_rules in # (((
4336 yes) AM_DEFAULT_VERBOSITY=0;;
4337 no) AM_DEFAULT_VERBOSITY=1;;
4338 *) AM_DEFAULT_VERBOSITY=1;;
4339 esac
4340 am_make=${MAKE-make}
4341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
4342 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
4343 if ${am_cv_make_support_nested_variables+:} false; then :
4344 $as_echo_n "(cached) " >&6
4345 else
4346 if $as_echo 'TRUE=$(BAR$(V))
4347 BAR0=false
4348 BAR1=true
4349 V=1
4350 am__doit:
4351 @$(TRUE)
4352 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
4353 am_cv_make_support_nested_variables=yes
4354 else
4355 am_cv_make_support_nested_variables=no
4356 fi
4357 fi
4358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
4359 $as_echo "$am_cv_make_support_nested_variables" >&6; }
4360 if test $am_cv_make_support_nested_variables = yes; then
4361 AM_V='$(V)'
4362 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
4363 else
4364 AM_V=$AM_DEFAULT_VERBOSITY
4365 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
4366 fi
4367 AM_BACKSLASH='\'
4368
4369 if test "`cd $srcdir && pwd`" != "`pwd`"; then
4370 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
4371 # is not polluted with repeated "-I."
4372 am__isrc=' -I$(srcdir)'
4373 # test to see if srcdir already configured
4374 if test -f $srcdir/config.status; then
4375 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
4376 fi
4377 fi
4378
4379 # test whether we have cygpath
4380 if test -z "$CYGPATH_W"; then
4381 if (cygpath --version) >/dev/null 2>/dev/null; then
4382 CYGPATH_W='cygpath -w'
4383 else
4384 CYGPATH_W=echo
4385 fi
4386 fi
4387
4388
4389 # Define the identity of the package.
4390 PACKAGE='grub'
4391 VERSION='2.06'
4392
4393
4394 cat >>confdefs.h <<_ACEOF
4395 #define PACKAGE "$PACKAGE"
4396 _ACEOF
4397
4398
4399 cat >>confdefs.h <<_ACEOF
4400 #define VERSION "$VERSION"
4401 _ACEOF
4402
4403 # Some tools Automake needs.
4404
4405 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
4406
4407
4408 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
4409
4410
4411 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
4412
4413
4414 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
4415
4416
4417 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
4418
4419 # For better backward compatibility. To be removed once Automake 1.9.x
4420 # dies out for good. For more background, see:
4421 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
4422 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
4423 mkdir_p='$(MKDIR_P)'
4424
4425 # We need awk for the "check" target (and possibly the TAP driver). The
4426 # system "awk" is bad on some platforms.
4427 # Always define AMTAR for backward compatibility. Yes, it's still used
4428 # in the wild :-( We should find a proper way to deprecate it ...
4429 AMTAR='$${TAR-tar}'
4430
4431
4432 # We'll loop over all known methods to create a tar archive until one works.
4433 _am_tools='gnutar pax cpio none'
4434
4435 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
4436
4437
4438
4439
4440
4441
4442 # POSIX will say in a future version that running "rm -f" with no argument
4443 # is OK; and we want to be able to make that assumption in our Makefile
4444 # recipes. So use an aggressive probe to check that the usage we want is
4445 # actually supported "in the wild" to an acceptable degree.
4446 # See automake bug#10828.
4447 # To make any issue more visible, cause the running configure to be aborted
4448 # by default if the 'rm' program in use doesn't match our expectations; the
4449 # user can still override this though.
4450 if rm -f && rm -fr && rm -rf; then : OK; else
4451 cat >&2 <<'END'
4452 Oops!
4453
4454 Your 'rm' program seems unable to run without file operands specified
4455 on the command line, even when the '-f' option is present. This is contrary
4456 to the behaviour of most rm programs out there, and not conforming with
4457 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
4458
4459 Please tell bug-automake@gnu.org about your system, including the value
4460 of your $PATH and any error possibly output before this message. This
4461 can help us improve future automake versions.
4462
4463 END
4464 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
4465 echo 'Configuration will proceed anyway, since you have set the' >&2
4466 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
4467 echo >&2
4468 else
4469 cat >&2 <<'END'
4470 Aborting the configuration process, to ensure you take notice of the issue.
4471
4472 You can download and install GNU coreutils to get an 'rm' implementation
4473 that behaves properly: <http://www.gnu.org/software/coreutils/>.
4474
4475 If you want to complete the configuration process using your problematic
4476 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
4477 to "yes", and re-run configure.
4478
4479 END
4480 as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
4481 fi
4482 fi
4483
4484
4485
4486 ac_config_headers="$ac_config_headers config-util.h"
4487
4488
4489 # Explicitly check for pkg-config early on, since otherwise conditional
4490 # calls are problematic.
4491
4492
4493
4494
4495
4496
4497
4498 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
4499 if test -n "$ac_tool_prefix"; then
4500 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
4501 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
4502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4503 $as_echo_n "checking for $ac_word... " >&6; }
4504 if ${ac_cv_path_PKG_CONFIG+:} false; then :
4505 $as_echo_n "(cached) " >&6
4506 else
4507 case $PKG_CONFIG in
4508 [\\/]* | ?:[\\/]*)
4509 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
4510 ;;
4511 *)
4512 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4513 for as_dir in $PATH
4514 do
4515 IFS=$as_save_IFS
4516 test -z "$as_dir" && as_dir=.
4517 for ac_exec_ext in '' $ac_executable_extensions; do
4518 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4519 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
4520 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4521 break 2
4522 fi
4523 done
4524 done
4525 IFS=$as_save_IFS
4526
4527 ;;
4528 esac
4529 fi
4530 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
4531 if test -n "$PKG_CONFIG"; then
4532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
4533 $as_echo "$PKG_CONFIG" >&6; }
4534 else
4535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4536 $as_echo "no" >&6; }
4537 fi
4538
4539
4540 fi
4541 if test -z "$ac_cv_path_PKG_CONFIG"; then
4542 ac_pt_PKG_CONFIG=$PKG_CONFIG
4543 # Extract the first word of "pkg-config", so it can be a program name with args.
4544 set dummy pkg-config; ac_word=$2
4545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4546 $as_echo_n "checking for $ac_word... " >&6; }
4547 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
4548 $as_echo_n "(cached) " >&6
4549 else
4550 case $ac_pt_PKG_CONFIG in
4551 [\\/]* | ?:[\\/]*)
4552 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
4553 ;;
4554 *)
4555 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4556 for as_dir in $PATH
4557 do
4558 IFS=$as_save_IFS
4559 test -z "$as_dir" && as_dir=.
4560 for ac_exec_ext in '' $ac_executable_extensions; do
4561 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4562 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
4563 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4564 break 2
4565 fi
4566 done
4567 done
4568 IFS=$as_save_IFS
4569
4570 ;;
4571 esac
4572 fi
4573 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
4574 if test -n "$ac_pt_PKG_CONFIG"; then
4575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
4576 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
4577 else
4578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4579 $as_echo "no" >&6; }
4580 fi
4581
4582 if test "x$ac_pt_PKG_CONFIG" = x; then
4583 PKG_CONFIG=""
4584 else
4585 case $cross_compiling:$ac_tool_warned in
4586 yes:)
4587 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4588 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4589 ac_tool_warned=yes ;;
4590 esac
4591 PKG_CONFIG=$ac_pt_PKG_CONFIG
4592 fi
4593 else
4594 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
4595 fi
4596
4597 fi
4598 if test -n "$PKG_CONFIG"; then
4599 _pkg_min_version=0.9.0
4600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
4601 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
4602 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
4603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4604 $as_echo "yes" >&6; }
4605 else
4606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4607 $as_echo "no" >&6; }
4608 PKG_CONFIG=""
4609 fi
4610 fi
4611
4612 # Program name transformations
4613
4614 grub_bios_setup=`$as_echo grub-bios-setup | sed "$program_transform_name"`
4615
4616 grub_editenv=`$as_echo grub-editenv | sed "$program_transform_name"`
4617
4618 grub_install=`$as_echo grub-install | sed "$program_transform_name"`
4619
4620 grub_mkconfig=`$as_echo grub-mkconfig | sed "$program_transform_name"`
4621
4622 grub_mkfont=`$as_echo grub-mkfont | sed "$program_transform_name"`
4623
4624 grub_mkimage=`$as_echo grub-mkimage | sed "$program_transform_name"`
4625
4626 grub_glue_efi=`$as_echo grub-glue-efi | sed "$program_transform_name"`
4627
4628 grub_mklayout=`$as_echo grub-mklayout | sed "$program_transform_name"`
4629
4630 grub_mkpasswd_pbkdf2=`$as_echo grub-mkpasswd-pbkdf2 | sed "$program_transform_name"`
4631
4632 grub_mkrelpath=`$as_echo grub-mkrelpath | sed "$program_transform_name"`
4633
4634 grub_mkrescue=`$as_echo grub-mkrescue | sed "$program_transform_name"`
4635
4636 grub_probe=`$as_echo grub-probe | sed "$program_transform_name"`
4637
4638 grub_reboot=`$as_echo grub-reboot | sed "$program_transform_name"`
4639
4640 grub_script_check=`$as_echo grub-script-check | sed "$program_transform_name"`
4641
4642 grub_set_default=`$as_echo grub-set-default | sed "$program_transform_name"`
4643
4644 grub_sparc64_setup=`$as_echo grub-sparc64-setup | sed "$program_transform_name"`
4645
4646 grub_render_label=`$as_echo grub-render-label | sed "$program_transform_name"`
4647
4648 grub_file=`$as_echo grub-file | sed "$program_transform_name"`
4649
4650
4651 # Optimization flag. Allow user to override.
4652 if test "x$TARGET_CFLAGS" = x; then
4653 TARGET_CFLAGS=-Os
4654 fi
4655
4656 # Enable support for "restrict" keyword and other
4657 # features from gnu99 C language standard.
4658 BUILD_CFLAGS="-std=gnu99 $BUILD_CFLAGS"
4659 HOST_CFLAGS="-std=gnu99 $HOST_CFLAGS"
4660 TARGET_CFLAGS="-std=gnu99 $TARGET_CFLAGS"
4661
4662 # Default HOST_CPPFLAGS
4663 HOST_CPPFLAGS="$HOST_CPPFLAGS -Wall -W"
4664 HOST_CPPFLAGS="$HOST_CPPFLAGS -DGRUB_UTIL=1"
4665
4666 TARGET_CPPFLAGS="$TARGET_CPPFLAGS -Wall -W"
4667
4668 case "$target_cpu" in
4669 i[3456]86) target_cpu=i386 ;;
4670 amd64) target_cpu=x86_64 ;;
4671 sparc) target_cpu=sparc64 ;;
4672 mipsel|mips64el)
4673 target_cpu=mipsel
4674 machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_CPU_MIPSEL=1"
4675 ;;
4676 mips|mips64)
4677 target_cpu=mips
4678 machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_CPU_MIPS=1"
4679 ;;
4680 arm*)
4681 target_cpu=arm
4682 ;;
4683 aarch64*)
4684 target_cpu=arm64
4685 ;;
4686 riscv32*)
4687 target_cpu=riscv32
4688 ;;
4689 riscv64*)
4690 target_cpu=riscv64
4691 ;;
4692 esac
4693
4694 # Specify the platform (such as firmware).
4695
4696 # Check whether --with-platform was given.
4697 if test "${with_platform+set}" = set; then :
4698 withval=$with_platform;
4699 fi
4700
4701
4702 # Guess the platform if not specified.
4703 if test "x$with_platform" = x; then
4704 case "$target_cpu"-"$target_vendor" in
4705 i386-apple) platform=efi ;;
4706 i386-*) platform=pc ;;
4707 x86_64-apple) platform=efi ;;
4708 x86_64-*) platform=pc ;;
4709 powerpc-*) platform=ieee1275 ;;
4710 powerpc64-*) platform=ieee1275 ;;
4711 powerpc64le-*) platform=ieee1275 ;;
4712 sparc64-*) platform=ieee1275 ;;
4713 mipsel-*) platform=loongson ;;
4714 mips-*) platform=arc ;;
4715 ia64-*) platform=efi ;;
4716 arm-*) platform=uboot ;;
4717 arm64-*) platform=efi ;;
4718 riscv32-*) platform=efi ;;
4719 riscv64-*) platform=efi ;;
4720 *)
4721 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unsupported CPU: \"$target_cpu\" - only building utilities" >&5
4722 $as_echo "$as_me: WARNING: unsupported CPU: \"$target_cpu\" - only building utilities" >&2;}
4723 platform=none
4724 ;;
4725 esac
4726 else
4727 platform="$with_platform"
4728 fi
4729
4730 case "$target_cpu"-"$platform" in
4731 x86_64-efi) ;;
4732 x86_64-emu) ;;
4733 x86_64-xen) ;;
4734 x86_64-none) ;;
4735 x86_64-*) target_cpu=i386 ;;
4736 powerpc64-ieee1275) target_cpu=powerpc ;;
4737 powerpc64le-ieee1275) target_cpu=powerpc ;;
4738 esac
4739
4740 # Check if the platform is supported, make final adjustments.
4741 case "$target_cpu"-"$platform" in
4742 i386-efi) ;;
4743 x86_64-efi) ;;
4744 i386-xen) ;;
4745 i386-xen_pvh) ;;
4746 x86_64-xen) ;;
4747 i386-pc) ;;
4748 i386-multiboot) ;;
4749 i386-coreboot) ;;
4750 i386-linuxbios) platform=coreboot ;;
4751 i386-ieee1275) ;;
4752 i386-qemu) ;;
4753 powerpc-ieee1275) ;;
4754 sparc64-ieee1275) ;;
4755 ia64-efi) ;;
4756 mips-qemu_mips) ;;
4757 mips-qemu-mips) platform=qemu_mips;;
4758 mips-arc) ;;
4759 mipsel-arc) ;;
4760 mipsel-qemu_mips) ;;
4761 mipsel-qemu-mips) platform=qemu_mips;;
4762 mipsel-yeeloong) platform=loongson ;;
4763 mipsel-fuloong) platform=loongson ;;
4764 mipsel-loongson) ;;
4765 arm-uboot) ;;
4766 arm-coreboot) ;;
4767 arm-efi) ;;
4768 arm64-efi) ;;
4769 riscv32-efi) ;;
4770 riscv64-efi) ;;
4771 *-emu) ;;
4772 *-none) ;;
4773 *) as_fn_error $? "platform \"$platform\" is not supported for target CPU \"$target_cpu\"" "$LINENO" 5 ;;
4774 esac
4775
4776 if test x$platform != xemu ; then
4777 case "$target_cpu" in
4778 i386 | powerpc) target_m32=1 ;;
4779 x86_64 | sparc64) target_m64=1 ;;
4780 esac
4781 fi
4782
4783 if test x"$target_cpu-$platform" = xsparc64-emu ; then
4784 target_m64=1
4785 fi
4786
4787 case "$target_os" in
4788 windows* | mingw32*) target_os=cygwin ;;
4789 esac
4790
4791 # This normalizes the names, and creates a new variable ("host_kernel")
4792 # while at it, since the mapping is not always 1:1 (e.g. different OSes
4793 # using the same kernel type).
4794 case "$host_os" in
4795 gnu*) host_kernel=hurd ;;
4796 linux*) host_kernel=linux ;;
4797 freebsd* | kfreebsd*-gnu) host_kernel=kfreebsd ;;
4798 netbsd*) host_kernel=netbsd ;;
4799 solaris*) host_kernel=illumos ;;
4800 darwin*) host_kernel=xnu ;;
4801 cygwin | windows* | mingw32*) host_kernel=windows ;;
4802 esac
4803
4804 case "$host_os" in
4805 cygwin) have_exec=y ;;
4806 windows* | mingw32*) have_exec=n ;;
4807 aros*) have_exec=n ;;
4808 *) have_exec=y;;
4809 esac
4810
4811 case "$platform" in
4812 coreboot) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_COREBOOT=1" ;;
4813 multiboot) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_MULTIBOOT=1" ;;
4814 efi) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_EFI=1" ;;
4815 xen) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_XEN=1" ;;
4816 xen_pvh) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_XEN_PVH=1" ;;
4817 ieee1275) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_IEEE1275=1" ;;
4818 uboot) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_UBOOT=1" ;;
4819 qemu) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_QEMU=1" ;;
4820 pc) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_PCBIOS=1" ;;
4821 emu) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_EMU=1" ;;
4822 loongson) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_MIPS_LOONGSON=1" ;;
4823 qemu_mips) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_MIPS_QEMU_MIPS=1" ;;
4824 arc) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_ARC=1" ;;
4825 esac
4826 if test x${target_cpu} = xmipsel ; then
4827 machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE=`echo mips_$platform | sed y,abcdefghijklmnopqrstuvwxyz,ABCDEFGHIJKLMNOPQRSTUVWXYZ,`"
4828 else
4829 machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE=`echo ${target_cpu}_$platform | sed y,abcdefghijklmnopqrstuvwxyz,ABCDEFGHIJKLMNOPQRSTUVWXYZ,`"
4830 fi
4831
4832 case "${target_cpu}-$platform" in
4833 mips-arc)
4834 TARGET_LINK_ADDR=0x88200000
4835 TARGET_DECOMPRESSOR_LINK_ADDR=0x88100000
4836 ;;
4837 mipsel-arc)
4838 TARGET_LINK_ADDR=0x80700000
4839 TARGET_DECOMPRESSOR_LINK_ADDR=0x80600000
4840 ;;
4841 mips*-qemu_mips | mips*-loongson)
4842 TARGET_DECOMPRESSOR_LINK_ADDR=0x80100000
4843 ;;
4844 esac
4845
4846
4847
4848
4849 TARGET_CPPFLAGS="$TARGET_CPPFLAGS $machine_CPPFLAGS"
4850
4851
4852
4853
4854
4855
4856
4857
4858 # Define default variables
4859
4860 have_with_bootdir=n
4861
4862 # Check whether --with-bootdir was given.
4863 if test "${with_bootdir+set}" = set; then :
4864 withval=$with_bootdir; have_with_bootdir=y
4865 else
4866 have_with_bootdir=n
4867 fi
4868
4869 if test x$have_with_bootdir = xy; then
4870 bootdirname="$with_bootdir"
4871 else
4872 case "$host_os" in
4873 netbsd* | openbsd*)
4874 # Because /boot is used for the boot block in NetBSD and OpenBSD,
4875 bootdirname='' ;;
4876 *) bootdirname='boot' ;;
4877 esac
4878 fi
4879
4880
4881
4882 cat >>confdefs.h <<_ACEOF
4883 #define GRUB_BOOT_DIR_NAME "$bootdirname"
4884 _ACEOF
4885
4886
4887
4888 # Check whether --with-grubdir was given.
4889 if test "${with_grubdir+set}" = set; then :
4890 withval=$with_grubdir; grubdirname="$with_grubdir"
4891 else
4892 grubdirname="$PACKAGE"
4893 fi
4894
4895
4896
4897
4898 cat >>confdefs.h <<_ACEOF
4899 #define GRUB_DIR_NAME "$grubdirname"
4900 _ACEOF
4901
4902
4903 #
4904 # Checks for build programs.
4905 #
4906
4907 # Although cmp is listed in the GNU Coding Standards as a command which
4908 # can used directly, OpenBSD lacks cmp in the default installation.
4909 for ac_prog in cmp
4910 do
4911 # Extract the first word of "$ac_prog", so it can be a program name with args.
4912 set dummy $ac_prog; ac_word=$2
4913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4914 $as_echo_n "checking for $ac_word... " >&6; }
4915 if ${ac_cv_prog_CMP+:} false; then :
4916 $as_echo_n "(cached) " >&6
4917 else
4918 if test -n "$CMP"; then
4919 ac_cv_prog_CMP="$CMP" # Let the user override the test.
4920 else
4921 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4922 for as_dir in $PATH
4923 do
4924 IFS=$as_save_IFS
4925 test -z "$as_dir" && as_dir=.
4926 for ac_exec_ext in '' $ac_executable_extensions; do
4927 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4928 ac_cv_prog_CMP="$ac_prog"
4929 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4930 break 2
4931 fi
4932 done
4933 done
4934 IFS=$as_save_IFS
4935
4936 fi
4937 fi
4938 CMP=$ac_cv_prog_CMP
4939 if test -n "$CMP"; then
4940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4941 $as_echo "$CMP" >&6; }
4942 else
4943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4944 $as_echo "no" >&6; }
4945 fi
4946
4947
4948 test -n "$CMP" && break
4949 done
4950
4951 if test "x$CMP" = x; then
4952 as_fn_error $? "cmp is not found" "$LINENO" 5
4953 fi
4954
4955 for ac_prog in bison
4956 do
4957 # Extract the first word of "$ac_prog", so it can be a program name with args.
4958 set dummy $ac_prog; ac_word=$2
4959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4960 $as_echo_n "checking for $ac_word... " >&6; }
4961 if ${ac_cv_prog_YACC+:} false; then :
4962 $as_echo_n "(cached) " >&6
4963 else
4964 if test -n "$YACC"; then
4965 ac_cv_prog_YACC="$YACC" # Let the user override the test.
4966 else
4967 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4968 for as_dir in $PATH
4969 do
4970 IFS=$as_save_IFS
4971 test -z "$as_dir" && as_dir=.
4972 for ac_exec_ext in '' $ac_executable_extensions; do
4973 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4974 ac_cv_prog_YACC="$ac_prog"
4975 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4976 break 2
4977 fi
4978 done
4979 done
4980 IFS=$as_save_IFS
4981
4982 fi
4983 fi
4984 YACC=$ac_cv_prog_YACC
4985 if test -n "$YACC"; then
4986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
4987 $as_echo "$YACC" >&6; }
4988 else
4989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4990 $as_echo "no" >&6; }
4991 fi
4992
4993
4994 test -n "$YACC" && break
4995 done
4996
4997 if test "x$YACC" = x; then
4998 as_fn_error $? "bison is not found" "$LINENO" 5
4999 fi
5000
5001 if test -n "$ac_tool_prefix"; then
5002 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5003 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5005 $as_echo_n "checking for $ac_word... " >&6; }
5006 if ${ac_cv_prog_RANLIB+:} false; then :
5007 $as_echo_n "(cached) " >&6
5008 else
5009 if test -n "$RANLIB"; then
5010 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5011 else
5012 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5013 for as_dir in $PATH
5014 do
5015 IFS=$as_save_IFS
5016 test -z "$as_dir" && as_dir=.
5017 for ac_exec_ext in '' $ac_executable_extensions; do
5018 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5019 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5020 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5021 break 2
5022 fi
5023 done
5024 done
5025 IFS=$as_save_IFS
5026
5027 fi
5028 fi
5029 RANLIB=$ac_cv_prog_RANLIB
5030 if test -n "$RANLIB"; then
5031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5032 $as_echo "$RANLIB" >&6; }
5033 else
5034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5035 $as_echo "no" >&6; }
5036 fi
5037
5038
5039 fi
5040 if test -z "$ac_cv_prog_RANLIB"; then
5041 ac_ct_RANLIB=$RANLIB
5042 # Extract the first word of "ranlib", so it can be a program name with args.
5043 set dummy ranlib; ac_word=$2
5044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5045 $as_echo_n "checking for $ac_word... " >&6; }
5046 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
5047 $as_echo_n "(cached) " >&6
5048 else
5049 if test -n "$ac_ct_RANLIB"; then
5050 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5051 else
5052 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5053 for as_dir in $PATH
5054 do
5055 IFS=$as_save_IFS
5056 test -z "$as_dir" && as_dir=.
5057 for ac_exec_ext in '' $ac_executable_extensions; do
5058 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5059 ac_cv_prog_ac_ct_RANLIB="ranlib"
5060 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5061 break 2
5062 fi
5063 done
5064 done
5065 IFS=$as_save_IFS
5066
5067 fi
5068 fi
5069 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5070 if test -n "$ac_ct_RANLIB"; then
5071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5072 $as_echo "$ac_ct_RANLIB" >&6; }
5073 else
5074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5075 $as_echo "no" >&6; }
5076 fi
5077
5078 if test "x$ac_ct_RANLIB" = x; then
5079 RANLIB=":"
5080 else
5081 case $cross_compiling:$ac_tool_warned in
5082 yes:)
5083 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5084 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5085 ac_tool_warned=yes ;;
5086 esac
5087 RANLIB=$ac_ct_RANLIB
5088 fi
5089 else
5090 RANLIB="$ac_cv_prog_RANLIB"
5091 fi
5092
5093
5094 for ac_prog in gawk mawk nawk awk
5095 do
5096 # Extract the first word of "$ac_prog", so it can be a program name with args.
5097 set dummy $ac_prog; ac_word=$2
5098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5099 $as_echo_n "checking for $ac_word... " >&6; }
5100 if ${ac_cv_prog_AWK+:} false; then :
5101 $as_echo_n "(cached) " >&6
5102 else
5103 if test -n "$AWK"; then
5104 ac_cv_prog_AWK="$AWK" # Let the user override the test.
5105 else
5106 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5107 for as_dir in $PATH
5108 do
5109 IFS=$as_save_IFS
5110 test -z "$as_dir" && as_dir=.
5111 for ac_exec_ext in '' $ac_executable_extensions; do
5112 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5113 ac_cv_prog_AWK="$ac_prog"
5114 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5115 break 2
5116 fi
5117 done
5118 done
5119 IFS=$as_save_IFS
5120
5121 fi
5122 fi
5123 AWK=$ac_cv_prog_AWK
5124 if test -n "$AWK"; then
5125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5126 $as_echo "$AWK" >&6; }
5127 else
5128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5129 $as_echo "no" >&6; }
5130 fi
5131
5132
5133 test -n "$AWK" && break
5134 done
5135
5136 DEPDIR="${am__leading_dot}deps"
5137
5138 ac_config_commands="$ac_config_commands depfiles"
5139
5140
5141 am_make=${MAKE-make}
5142 cat > confinc << 'END'
5143 am__doit:
5144 @echo this is the am__doit target
5145 .PHONY: am__doit
5146 END
5147 # If we don't find an include directive, just comment out the code.
5148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
5149 $as_echo_n "checking for style of include used by $am_make... " >&6; }
5150 am__include="#"
5151 am__quote=
5152 _am_result=none
5153 # First try GNU make style include.
5154 echo "include confinc" > confmf
5155 # Ignore all kinds of additional output from 'make'.
5156 case `$am_make -s -f confmf 2> /dev/null` in #(
5157 *the\ am__doit\ target*)
5158 am__include=include
5159 am__quote=
5160 _am_result=GNU
5161 ;;
5162 esac
5163 # Now try BSD make style include.
5164 if test "$am__include" = "#"; then
5165 echo '.include "confinc"' > confmf
5166 case `$am_make -s -f confmf 2> /dev/null` in #(
5167 *the\ am__doit\ target*)
5168 am__include=.include
5169 am__quote="\""
5170 _am_result=BSD
5171 ;;
5172 esac
5173 fi
5174
5175
5176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
5177 $as_echo "$_am_result" >&6; }
5178 rm -f confinc confmf
5179
5180 # Check whether --enable-dependency-tracking was given.
5181 if test "${enable_dependency_tracking+set}" = set; then :
5182 enableval=$enable_dependency_tracking;
5183 fi
5184
5185 if test "x$enable_dependency_tracking" != xno; then
5186 am_depcomp="$ac_aux_dir/depcomp"
5187 AMDEPBACKSLASH='\'
5188 am__nodep='_no'
5189 fi
5190 if test "x$enable_dependency_tracking" != xno; then
5191 AMDEP_TRUE=
5192 AMDEP_FALSE='#'
5193 else
5194 AMDEP_TRUE='#'
5195 AMDEP_FALSE=
5196 fi
5197
5198
5199 ac_ext=c
5200 ac_cpp='$CPP $CPPFLAGS'
5201 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5202 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5203 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5204 if test -n "$ac_tool_prefix"; then
5205 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
5206 set dummy ${ac_tool_prefix}gcc; ac_word=$2
5207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5208 $as_echo_n "checking for $ac_word... " >&6; }
5209 if ${ac_cv_prog_CC+:} false; then :
5210 $as_echo_n "(cached) " >&6
5211 else
5212 if test -n "$CC"; then
5213 ac_cv_prog_CC="$CC" # Let the user override the test.
5214 else
5215 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5216 for as_dir in $PATH
5217 do
5218 IFS=$as_save_IFS
5219 test -z "$as_dir" && as_dir=.
5220 for ac_exec_ext in '' $ac_executable_extensions; do
5221 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5222 ac_cv_prog_CC="${ac_tool_prefix}gcc"
5223 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5224 break 2
5225 fi
5226 done
5227 done
5228 IFS=$as_save_IFS
5229
5230 fi
5231 fi
5232 CC=$ac_cv_prog_CC
5233 if test -n "$CC"; then
5234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5235 $as_echo "$CC" >&6; }
5236 else
5237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5238 $as_echo "no" >&6; }
5239 fi
5240
5241
5242 fi
5243 if test -z "$ac_cv_prog_CC"; then
5244 ac_ct_CC=$CC
5245 # Extract the first word of "gcc", so it can be a program name with args.
5246 set dummy gcc; ac_word=$2
5247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5248 $as_echo_n "checking for $ac_word... " >&6; }
5249 if ${ac_cv_prog_ac_ct_CC+:} false; then :
5250 $as_echo_n "(cached) " >&6
5251 else
5252 if test -n "$ac_ct_CC"; then
5253 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5254 else
5255 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5256 for as_dir in $PATH
5257 do
5258 IFS=$as_save_IFS
5259 test -z "$as_dir" && as_dir=.
5260 for ac_exec_ext in '' $ac_executable_extensions; do
5261 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5262 ac_cv_prog_ac_ct_CC="gcc"
5263 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5264 break 2
5265 fi
5266 done
5267 done
5268 IFS=$as_save_IFS
5269
5270 fi
5271 fi
5272 ac_ct_CC=$ac_cv_prog_ac_ct_CC
5273 if test -n "$ac_ct_CC"; then
5274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5275 $as_echo "$ac_ct_CC" >&6; }
5276 else
5277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5278 $as_echo "no" >&6; }
5279 fi
5280
5281 if test "x$ac_ct_CC" = x; then
5282 CC=""
5283 else
5284 case $cross_compiling:$ac_tool_warned in
5285 yes:)
5286 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5287 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5288 ac_tool_warned=yes ;;
5289 esac
5290 CC=$ac_ct_CC
5291 fi
5292 else
5293 CC="$ac_cv_prog_CC"
5294 fi
5295
5296 if test -z "$CC"; then
5297 if test -n "$ac_tool_prefix"; then
5298 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
5299 set dummy ${ac_tool_prefix}cc; ac_word=$2
5300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5301 $as_echo_n "checking for $ac_word... " >&6; }
5302 if ${ac_cv_prog_CC+:} false; then :
5303 $as_echo_n "(cached) " >&6
5304 else
5305 if test -n "$CC"; then
5306 ac_cv_prog_CC="$CC" # Let the user override the test.
5307 else
5308 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5309 for as_dir in $PATH
5310 do
5311 IFS=$as_save_IFS
5312 test -z "$as_dir" && as_dir=.
5313 for ac_exec_ext in '' $ac_executable_extensions; do
5314 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5315 ac_cv_prog_CC="${ac_tool_prefix}cc"
5316 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5317 break 2
5318 fi
5319 done
5320 done
5321 IFS=$as_save_IFS
5322
5323 fi
5324 fi
5325 CC=$ac_cv_prog_CC
5326 if test -n "$CC"; then
5327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5328 $as_echo "$CC" >&6; }
5329 else
5330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5331 $as_echo "no" >&6; }
5332 fi
5333
5334
5335 fi
5336 fi
5337 if test -z "$CC"; then
5338 # Extract the first word of "cc", so it can be a program name with args.
5339 set dummy cc; ac_word=$2
5340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5341 $as_echo_n "checking for $ac_word... " >&6; }
5342 if ${ac_cv_prog_CC+:} false; then :
5343 $as_echo_n "(cached) " >&6
5344 else
5345 if test -n "$CC"; then
5346 ac_cv_prog_CC="$CC" # Let the user override the test.
5347 else
5348 ac_prog_rejected=no
5349 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5350 for as_dir in $PATH
5351 do
5352 IFS=$as_save_IFS
5353 test -z "$as_dir" && as_dir=.
5354 for ac_exec_ext in '' $ac_executable_extensions; do
5355 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5356 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
5357 ac_prog_rejected=yes
5358 continue
5359 fi
5360 ac_cv_prog_CC="cc"
5361 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5362 break 2
5363 fi
5364 done
5365 done
5366 IFS=$as_save_IFS
5367
5368 if test $ac_prog_rejected = yes; then
5369 # We found a bogon in the path, so make sure we never use it.
5370 set dummy $ac_cv_prog_CC
5371 shift
5372 if test $# != 0; then
5373 # We chose a different compiler from the bogus one.
5374 # However, it has the same basename, so the bogon will be chosen
5375 # first if we set CC to just the basename; use the full file name.
5376 shift
5377 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
5378 fi
5379 fi
5380 fi
5381 fi
5382 CC=$ac_cv_prog_CC
5383 if test -n "$CC"; then
5384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5385 $as_echo "$CC" >&6; }
5386 else
5387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5388 $as_echo "no" >&6; }
5389 fi
5390
5391
5392 fi
5393 if test -z "$CC"; then
5394 if test -n "$ac_tool_prefix"; then
5395 for ac_prog in cl.exe
5396 do
5397 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5398 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5400 $as_echo_n "checking for $ac_word... " >&6; }
5401 if ${ac_cv_prog_CC+:} false; then :
5402 $as_echo_n "(cached) " >&6
5403 else
5404 if test -n "$CC"; then
5405 ac_cv_prog_CC="$CC" # Let the user override the test.
5406 else
5407 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5408 for as_dir in $PATH
5409 do
5410 IFS=$as_save_IFS
5411 test -z "$as_dir" && as_dir=.
5412 for ac_exec_ext in '' $ac_executable_extensions; do
5413 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5414 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
5415 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5416 break 2
5417 fi
5418 done
5419 done
5420 IFS=$as_save_IFS
5421
5422 fi
5423 fi
5424 CC=$ac_cv_prog_CC
5425 if test -n "$CC"; then
5426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5427 $as_echo "$CC" >&6; }
5428 else
5429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5430 $as_echo "no" >&6; }
5431 fi
5432
5433
5434 test -n "$CC" && break
5435 done
5436 fi
5437 if test -z "$CC"; then
5438 ac_ct_CC=$CC
5439 for ac_prog in cl.exe
5440 do
5441 # Extract the first word of "$ac_prog", so it can be a program name with args.
5442 set dummy $ac_prog; ac_word=$2
5443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5444 $as_echo_n "checking for $ac_word... " >&6; }
5445 if ${ac_cv_prog_ac_ct_CC+:} false; then :
5446 $as_echo_n "(cached) " >&6
5447 else
5448 if test -n "$ac_ct_CC"; then
5449 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5450 else
5451 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5452 for as_dir in $PATH
5453 do
5454 IFS=$as_save_IFS
5455 test -z "$as_dir" && as_dir=.
5456 for ac_exec_ext in '' $ac_executable_extensions; do
5457 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5458 ac_cv_prog_ac_ct_CC="$ac_prog"
5459 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5460 break 2
5461 fi
5462 done
5463 done
5464 IFS=$as_save_IFS
5465
5466 fi
5467 fi
5468 ac_ct_CC=$ac_cv_prog_ac_ct_CC
5469 if test -n "$ac_ct_CC"; then
5470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5471 $as_echo "$ac_ct_CC" >&6; }
5472 else
5473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5474 $as_echo "no" >&6; }
5475 fi
5476
5477
5478 test -n "$ac_ct_CC" && break
5479 done
5480
5481 if test "x$ac_ct_CC" = x; then
5482 CC=""
5483 else
5484 case $cross_compiling:$ac_tool_warned in
5485 yes:)
5486 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5487 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5488 ac_tool_warned=yes ;;
5489 esac
5490 CC=$ac_ct_CC
5491 fi
5492 fi
5493
5494 fi
5495
5496
5497 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5498 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5499 as_fn_error $? "no acceptable C compiler found in \$PATH
5500 See \`config.log' for more details" "$LINENO" 5; }
5501
5502 # Provide some information about the compiler.
5503 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
5504 set X $ac_compile
5505 ac_compiler=$2
5506 for ac_option in --version -v -V -qversion; do
5507 { { ac_try="$ac_compiler $ac_option >&5"
5508 case "(($ac_try" in
5509 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5510 *) ac_try_echo=$ac_try;;
5511 esac
5512 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5513 $as_echo "$ac_try_echo"; } >&5
5514 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
5515 ac_status=$?
5516 if test -s conftest.err; then
5517 sed '10a\
5518 ... rest of stderr output deleted ...
5519 10q' conftest.err >conftest.er1
5520 cat conftest.er1 >&5
5521 fi
5522 rm -f conftest.er1 conftest.err
5523 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5524 test $ac_status = 0; }
5525 done
5526
5527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5528 /* end confdefs.h. */
5529
5530 int
5531 main (void)
5532 {
5533
5534 ;
5535 return 0;
5536 }
5537 _ACEOF
5538 ac_clean_files_save=$ac_clean_files
5539 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
5540 # Try to create an executable without -o first, disregard a.out.
5541 # It will help us diagnose broken compilers, and finding out an intuition
5542 # of exeext.
5543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
5544 $as_echo_n "checking whether the C compiler works... " >&6; }
5545 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
5546
5547 # The possible output files:
5548 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
5549
5550 ac_rmfiles=
5551 for ac_file in $ac_files
5552 do
5553 case $ac_file in
5554 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5555 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
5556 esac
5557 done
5558 rm -f $ac_rmfiles
5559
5560 if { { ac_try="$ac_link_default"
5561 case "(($ac_try" in
5562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5563 *) ac_try_echo=$ac_try;;
5564 esac
5565 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5566 $as_echo "$ac_try_echo"; } >&5
5567 (eval "$ac_link_default") 2>&5
5568 ac_status=$?
5569 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5570 test $ac_status = 0; }; then :
5571 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
5572 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
5573 # in a Makefile. We should not override ac_cv_exeext if it was cached,
5574 # so that the user can short-circuit this test for compilers unknown to
5575 # Autoconf.
5576 for ac_file in $ac_files ''
5577 do
5578 test -f "$ac_file" || continue
5579 case $ac_file in
5580 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
5581 ;;
5582 [ab].out )
5583 # We found the default executable, but exeext='' is most
5584 # certainly right.
5585 break;;
5586 *.* )
5587 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
5588 then :; else
5589 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5590 fi
5591 # We set ac_cv_exeext here because the later test for it is not
5592 # safe: cross compilers may not add the suffix if given an `-o'
5593 # argument, so we may need to know it at that point already.
5594 # Even if this section looks crufty: it has the advantage of
5595 # actually working.
5596 break;;
5597 * )
5598 break;;
5599 esac
5600 done
5601 test "$ac_cv_exeext" = no && ac_cv_exeext=
5602
5603 else
5604 ac_file=''
5605 fi
5606 if test -z "$ac_file"; then :
5607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5608 $as_echo "no" >&6; }
5609 $as_echo "$as_me: failed program was:" >&5
5610 sed 's/^/| /' conftest.$ac_ext >&5
5611
5612 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5613 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5614 as_fn_error 77 "C compiler cannot create executables
5615 See \`config.log' for more details" "$LINENO" 5; }
5616 else
5617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5618 $as_echo "yes" >&6; }
5619 fi
5620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
5621 $as_echo_n "checking for C compiler default output file name... " >&6; }
5622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
5623 $as_echo "$ac_file" >&6; }
5624 ac_exeext=$ac_cv_exeext
5625
5626 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
5627 ac_clean_files=$ac_clean_files_save
5628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
5629 $as_echo_n "checking for suffix of executables... " >&6; }
5630 if { { ac_try="$ac_link"
5631 case "(($ac_try" in
5632 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5633 *) ac_try_echo=$ac_try;;
5634 esac
5635 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5636 $as_echo "$ac_try_echo"; } >&5
5637 (eval "$ac_link") 2>&5
5638 ac_status=$?
5639 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5640 test $ac_status = 0; }; then :
5641 # If both `conftest.exe' and `conftest' are `present' (well, observable)
5642 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
5643 # work properly (i.e., refer to `conftest.exe'), while it won't with
5644 # `rm'.
5645 for ac_file in conftest.exe conftest conftest.*; do
5646 test -f "$ac_file" || continue
5647 case $ac_file in
5648 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5649 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5650 break;;
5651 * ) break;;
5652 esac
5653 done
5654 else
5655 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5656 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5657 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
5658 See \`config.log' for more details" "$LINENO" 5; }
5659 fi
5660 rm -f conftest conftest$ac_cv_exeext
5661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
5662 $as_echo "$ac_cv_exeext" >&6; }
5663
5664 rm -f conftest.$ac_ext
5665 EXEEXT=$ac_cv_exeext
5666 ac_exeext=$EXEEXT
5667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5668 /* end confdefs.h. */
5669 #include <stdio.h>
5670 int
5671 main (void)
5672 {
5673 FILE *f = fopen ("conftest.out", "w");
5674 return ferror (f) || fclose (f) != 0;
5675
5676 ;
5677 return 0;
5678 }
5679 _ACEOF
5680 ac_clean_files="$ac_clean_files conftest.out"
5681 # Check that the compiler produces executables we can run. If not, either
5682 # the compiler is broken, or we cross compile.
5683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
5684 $as_echo_n "checking whether we are cross compiling... " >&6; }
5685 if test "$cross_compiling" != yes; then
5686 { { ac_try="$ac_link"
5687 case "(($ac_try" in
5688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5689 *) ac_try_echo=$ac_try;;
5690 esac
5691 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5692 $as_echo "$ac_try_echo"; } >&5
5693 (eval "$ac_link") 2>&5
5694 ac_status=$?
5695 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5696 test $ac_status = 0; }
5697 if { ac_try='./conftest$ac_cv_exeext'
5698 { { case "(($ac_try" in
5699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5700 *) ac_try_echo=$ac_try;;
5701 esac
5702 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5703 $as_echo "$ac_try_echo"; } >&5
5704 (eval "$ac_try") 2>&5
5705 ac_status=$?
5706 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5707 test $ac_status = 0; }; }; then
5708 cross_compiling=no
5709 else
5710 if test "$cross_compiling" = maybe; then
5711 cross_compiling=yes
5712 else
5713 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5714 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5715 as_fn_error $? "cannot run C compiled programs.
5716 If you meant to cross compile, use \`--host'.
5717 See \`config.log' for more details" "$LINENO" 5; }
5718 fi
5719 fi
5720 fi
5721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
5722 $as_echo "$cross_compiling" >&6; }
5723
5724 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
5725 ac_clean_files=$ac_clean_files_save
5726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
5727 $as_echo_n "checking for suffix of object files... " >&6; }
5728 if ${ac_cv_objext+:} false; then :
5729 $as_echo_n "(cached) " >&6
5730 else
5731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5732 /* end confdefs.h. */
5733
5734 int
5735 main (void)
5736 {
5737
5738 ;
5739 return 0;
5740 }
5741 _ACEOF
5742 rm -f conftest.o conftest.obj
5743 if { { ac_try="$ac_compile"
5744 case "(($ac_try" in
5745 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5746 *) ac_try_echo=$ac_try;;
5747 esac
5748 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5749 $as_echo "$ac_try_echo"; } >&5
5750 (eval "$ac_compile") 2>&5
5751 ac_status=$?
5752 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5753 test $ac_status = 0; }; then :
5754 for ac_file in conftest.o conftest.obj conftest.*; do
5755 test -f "$ac_file" || continue;
5756 case $ac_file in
5757 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
5758 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
5759 break;;
5760 esac
5761 done
5762 else
5763 $as_echo "$as_me: failed program was:" >&5
5764 sed 's/^/| /' conftest.$ac_ext >&5
5765
5766 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5767 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5768 as_fn_error $? "cannot compute suffix of object files: cannot compile
5769 See \`config.log' for more details" "$LINENO" 5; }
5770 fi
5771 rm -f conftest.$ac_cv_objext conftest.$ac_ext
5772 fi
5773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
5774 $as_echo "$ac_cv_objext" >&6; }
5775 OBJEXT=$ac_cv_objext
5776 ac_objext=$OBJEXT
5777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
5778 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
5779 if ${ac_cv_c_compiler_gnu+:} false; then :
5780 $as_echo_n "(cached) " >&6
5781 else
5782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5783 /* end confdefs.h. */
5784
5785 int
5786 main (void)
5787 {
5788 #ifndef __GNUC__
5789 choke me
5790 #endif
5791
5792 ;
5793 return 0;
5794 }
5795 _ACEOF
5796 if ac_fn_c_try_compile "$LINENO"; then :
5797 ac_compiler_gnu=yes
5798 else
5799 ac_compiler_gnu=no
5800 fi
5801 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5802 ac_cv_c_compiler_gnu=$ac_compiler_gnu
5803
5804 fi
5805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
5806 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
5807 if test $ac_compiler_gnu = yes; then
5808 GCC=yes
5809 else
5810 GCC=
5811 fi
5812 ac_test_CFLAGS=${CFLAGS+set}
5813 ac_save_CFLAGS=$CFLAGS
5814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
5815 $as_echo_n "checking whether $CC accepts -g... " >&6; }
5816 if ${ac_cv_prog_cc_g+:} false; then :
5817 $as_echo_n "(cached) " >&6
5818 else
5819 ac_save_c_werror_flag=$ac_c_werror_flag
5820 ac_c_werror_flag=yes
5821 ac_cv_prog_cc_g=no
5822 CFLAGS="-g"
5823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5824 /* end confdefs.h. */
5825
5826 int
5827 main (void)
5828 {
5829
5830 ;
5831 return 0;
5832 }
5833 _ACEOF
5834 if ac_fn_c_try_compile "$LINENO"; then :
5835 ac_cv_prog_cc_g=yes
5836 else
5837 CFLAGS=""
5838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5839 /* end confdefs.h. */
5840
5841 int
5842 main (void)
5843 {
5844
5845 ;
5846 return 0;
5847 }
5848 _ACEOF
5849 if ac_fn_c_try_compile "$LINENO"; then :
5850
5851 else
5852 ac_c_werror_flag=$ac_save_c_werror_flag
5853 CFLAGS="-g"
5854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5855 /* end confdefs.h. */
5856
5857 int
5858 main (void)
5859 {
5860
5861 ;
5862 return 0;
5863 }
5864 _ACEOF
5865 if ac_fn_c_try_compile "$LINENO"; then :
5866 ac_cv_prog_cc_g=yes
5867 fi
5868 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5869 fi
5870 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5871 fi
5872 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5873 ac_c_werror_flag=$ac_save_c_werror_flag
5874 fi
5875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5876 $as_echo "$ac_cv_prog_cc_g" >&6; }
5877 if test "$ac_test_CFLAGS" = set; then
5878 CFLAGS=$ac_save_CFLAGS
5879 elif test $ac_cv_prog_cc_g = yes; then
5880 if test "$GCC" = yes; then
5881 CFLAGS="-g -O2"
5882 else
5883 CFLAGS="-g"
5884 fi
5885 else
5886 if test "$GCC" = yes; then
5887 CFLAGS="-O2"
5888 else
5889 CFLAGS=
5890 fi
5891 fi
5892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5893 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
5894 if ${ac_cv_prog_cc_c89+:} false; then :
5895 $as_echo_n "(cached) " >&6
5896 else
5897 ac_cv_prog_cc_c89=no
5898 ac_save_CC=$CC
5899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5900 /* end confdefs.h. */
5901 #include <stdarg.h>
5902 #include <stdio.h>
5903 struct stat;
5904 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
5905 struct buf { int x; };
5906 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5907 static char *e (p, i)
5908 char **p;
5909 int i;
5910 {
5911 return p[i];
5912 }
5913 static char *f (char * (*g) (char **, int), char **p, ...)
5914 {
5915 char *s;
5916 va_list v;
5917 va_start (v,p);
5918 s = g (p, va_arg (v,int));
5919 va_end (v);
5920 return s;
5921 }
5922
5923 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
5924 function prototypes and stuff, but not '\xHH' hex character constants.
5925 These don't provoke an error unfortunately, instead are silently treated
5926 as 'x'. The following induces an error, until -std is added to get
5927 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
5928 array size at least. It's necessary to write '\x00'==0 to get something
5929 that's true only with -std. */
5930 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5931
5932 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5933 inside strings and character constants. */
5934 #define FOO(x) 'x'
5935 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5936
5937 int test (int i, double x);
5938 struct s1 {int (*f) (int a);};
5939 struct s2 {int (*f) (double a);};
5940 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5941 int argc;
5942 char **argv;
5943 int
5944 main (void)
5945 {
5946 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5947 ;
5948 return 0;
5949 }
5950 _ACEOF
5951 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5952 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5953 do
5954 CC="$ac_save_CC $ac_arg"
5955 if ac_fn_c_try_compile "$LINENO"; then :
5956 ac_cv_prog_cc_c89=$ac_arg
5957 fi
5958 rm -f core conftest.err conftest.$ac_objext
5959 test "x$ac_cv_prog_cc_c89" != "xno" && break
5960 done
5961 rm -f conftest.$ac_ext
5962 CC=$ac_save_CC
5963
5964 fi
5965 # AC_CACHE_VAL
5966 case "x$ac_cv_prog_cc_c89" in
5967 x)
5968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5969 $as_echo "none needed" >&6; } ;;
5970 xno)
5971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5972 $as_echo "unsupported" >&6; } ;;
5973 *)
5974 CC="$CC $ac_cv_prog_cc_c89"
5975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5976 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5977 esac
5978 if test "x$ac_cv_prog_cc_c89" != xno; then :
5979
5980 fi
5981
5982 ac_ext=c
5983 ac_cpp='$CPP $CPPFLAGS'
5984 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5985 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5986 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5987
5988 ac_ext=c
5989 ac_cpp='$CPP $CPPFLAGS'
5990 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5991 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5992 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
5994 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
5995 if ${am_cv_prog_cc_c_o+:} false; then :
5996 $as_echo_n "(cached) " >&6
5997 else
5998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5999 /* end confdefs.h. */
6000
6001 int
6002 main (void)
6003 {
6004
6005 ;
6006 return 0;
6007 }
6008 _ACEOF
6009 # Make sure it works both with $CC and with simple cc.
6010 # Following AC_PROG_CC_C_O, we do the test twice because some
6011 # compilers refuse to overwrite an existing .o file with -o,
6012 # though they will create one.
6013 am_cv_prog_cc_c_o=yes
6014 for am_i in 1 2; do
6015 if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
6016 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
6017 ac_status=$?
6018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6019 (exit $ac_status); } \
6020 && test -f conftest2.$ac_objext; then
6021 : OK
6022 else
6023 am_cv_prog_cc_c_o=no
6024 break
6025 fi
6026 done
6027 rm -f core conftest*
6028 unset am_i
6029 fi
6030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
6031 $as_echo "$am_cv_prog_cc_c_o" >&6; }
6032 if test "$am_cv_prog_cc_c_o" != yes; then
6033 # Losing compiler, so override with the script.
6034 # FIXME: It is wrong to rewrite CC.
6035 # But if we don't then we get into trouble of one sort or another.
6036 # A longer-term fix would be to have automake use am__CC in this case,
6037 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
6038 CC="$am_aux_dir/compile $CC"
6039 fi
6040 ac_ext=c
6041 ac_cpp='$CPP $CPPFLAGS'
6042 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6043 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6044 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6045
6046
6047 depcc="$CC" am_compiler_list=
6048
6049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6050 $as_echo_n "checking dependency style of $depcc... " >&6; }
6051 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
6052 $as_echo_n "(cached) " >&6
6053 else
6054 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
6055 # We make a subdir and do the tests there. Otherwise we can end up
6056 # making bogus files that we don't know about and never remove. For
6057 # instance it was reported that on HP-UX the gcc test will end up
6058 # making a dummy file named 'D' -- because '-MD' means "put the output
6059 # in D".
6060 rm -rf conftest.dir
6061 mkdir conftest.dir
6062 # Copy depcomp to subdir because otherwise we won't find it if we're
6063 # using a relative directory.
6064 cp "$am_depcomp" conftest.dir
6065 cd conftest.dir
6066 # We will build objects and dependencies in a subdirectory because
6067 # it helps to detect inapplicable dependency modes. For instance
6068 # both Tru64's cc and ICC support -MD to output dependencies as a
6069 # side effect of compilation, but ICC will put the dependencies in
6070 # the current directory while Tru64 will put them in the object
6071 # directory.
6072 mkdir sub
6073
6074 am_cv_CC_dependencies_compiler_type=none
6075 if test "$am_compiler_list" = ""; then
6076 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6077 fi
6078 am__universal=false
6079 case " $depcc " in #(
6080 *\ -arch\ *\ -arch\ *) am__universal=true ;;
6081 esac
6082
6083 for depmode in $am_compiler_list; do
6084 # Setup a source with many dependencies, because some compilers
6085 # like to wrap large dependency lists on column 80 (with \), and
6086 # we should not choose a depcomp mode which is confused by this.
6087 #
6088 # We need to recreate these files for each test, as the compiler may
6089 # overwrite some of them when testing with obscure command lines.
6090 # This happens at least with the AIX C compiler.
6091 : > sub/conftest.c
6092 for i in 1 2 3 4 5 6; do
6093 echo '#include "conftst'$i'.h"' >> sub/conftest.c
6094 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
6095 # Solaris 10 /bin/sh.
6096 echo '/* dummy */' > sub/conftst$i.h
6097 done
6098 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
6099
6100 # We check with '-c' and '-o' for the sake of the "dashmstdout"
6101 # mode. It turns out that the SunPro C++ compiler does not properly
6102 # handle '-M -o', and we need to detect this. Also, some Intel
6103 # versions had trouble with output in subdirs.
6104 am__obj=sub/conftest.${OBJEXT-o}
6105 am__minus_obj="-o $am__obj"
6106 case $depmode in
6107 gcc)
6108 # This depmode causes a compiler race in universal mode.
6109 test "$am__universal" = false || continue
6110 ;;
6111 nosideeffect)
6112 # After this tag, mechanisms are not by side-effect, so they'll
6113 # only be used when explicitly requested.
6114 if test "x$enable_dependency_tracking" = xyes; then
6115 continue
6116 else
6117 break
6118 fi
6119 ;;
6120 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
6121 # This compiler won't grok '-c -o', but also, the minuso test has
6122 # not run yet. These depmodes are late enough in the game, and
6123 # so weak that their functioning should not be impacted.
6124 am__obj=conftest.${OBJEXT-o}
6125 am__minus_obj=
6126 ;;
6127 none) break ;;
6128 esac
6129 if depmode=$depmode \
6130 source=sub/conftest.c object=$am__obj \
6131 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6132 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
6133 >/dev/null 2>conftest.err &&
6134 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
6135 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
6136 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
6137 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
6138 # icc doesn't choke on unknown options, it will just issue warnings
6139 # or remarks (even with -Werror). So we grep stderr for any message
6140 # that says an option was ignored or not supported.
6141 # When given -MP, icc 7.0 and 7.1 complain thusly:
6142 # icc: Command line warning: ignoring option '-M'; no argument required
6143 # The diagnosis changed in icc 8.0:
6144 # icc: Command line remark: option '-MP' not supported
6145 if (grep 'ignoring option' conftest.err ||
6146 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6147 am_cv_CC_dependencies_compiler_type=$depmode
6148 break
6149 fi
6150 fi
6151 done
6152
6153 cd ..
6154 rm -rf conftest.dir
6155 else
6156 am_cv_CC_dependencies_compiler_type=none
6157 fi
6158
6159 fi
6160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6161 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
6162 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6163
6164 if
6165 test "x$enable_dependency_tracking" != xno \
6166 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
6167 am__fastdepCC_TRUE=
6168 am__fastdepCC_FALSE='#'
6169 else
6170 am__fastdepCC_TRUE='#'
6171 am__fastdepCC_FALSE=
6172 fi
6173
6174
6175
6176 for ac_prog in flex lex
6177 do
6178 # Extract the first word of "$ac_prog", so it can be a program name with args.
6179 set dummy $ac_prog; ac_word=$2
6180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6181 $as_echo_n "checking for $ac_word... " >&6; }
6182 if ${ac_cv_prog_LEX+:} false; then :
6183 $as_echo_n "(cached) " >&6
6184 else
6185 if test -n "$LEX"; then
6186 ac_cv_prog_LEX="$LEX" # Let the user override the test.
6187 else
6188 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6189 for as_dir in $PATH
6190 do
6191 IFS=$as_save_IFS
6192 test -z "$as_dir" && as_dir=.
6193 for ac_exec_ext in '' $ac_executable_extensions; do
6194 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6195 ac_cv_prog_LEX="$ac_prog"
6196 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6197 break 2
6198 fi
6199 done
6200 done
6201 IFS=$as_save_IFS
6202
6203 fi
6204 fi
6205 LEX=$ac_cv_prog_LEX
6206 if test -n "$LEX"; then
6207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
6208 $as_echo "$LEX" >&6; }
6209 else
6210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6211 $as_echo "no" >&6; }
6212 fi
6213
6214
6215 test -n "$LEX" && break
6216 done
6217 test -n "$LEX" || LEX=":"
6218
6219 if test "x$LEX" != "x:"; then
6220 cat >conftest.l <<_ACEOF
6221 %%
6222 a { ECHO; }
6223 b { REJECT; }
6224 c { yymore (); }
6225 d { yyless (1); }
6226 e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument. */
6227 yyless ((input () != 0)); }
6228 f { unput (yytext[0]); }
6229 . { BEGIN INITIAL; }
6230 %%
6231 #ifdef YYTEXT_POINTER
6232 extern char *yytext;
6233 #endif
6234 int
6235 main (void)
6236 {
6237 return ! yylex () + ! yywrap ();
6238 }
6239 _ACEOF
6240 { { ac_try="$LEX conftest.l"
6241 case "(($ac_try" in
6242 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6243 *) ac_try_echo=$ac_try;;
6244 esac
6245 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
6246 $as_echo "$ac_try_echo"; } >&5
6247 (eval "$LEX conftest.l") 2>&5
6248 ac_status=$?
6249 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6250 test $ac_status = 0; }
6251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5
6252 $as_echo_n "checking lex output file root... " >&6; }
6253 if ${ac_cv_prog_lex_root+:} false; then :
6254 $as_echo_n "(cached) " >&6
6255 else
6256
6257 if test -f lex.yy.c; then
6258 ac_cv_prog_lex_root=lex.yy
6259 elif test -f lexyy.c; then
6260 ac_cv_prog_lex_root=lexyy
6261 else
6262 as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5
6263 fi
6264 fi
6265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
6266 $as_echo "$ac_cv_prog_lex_root" >&6; }
6267 LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
6268
6269 if test -z "${LEXLIB+set}"; then
6270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5
6271 $as_echo_n "checking lex library... " >&6; }
6272 if ${ac_cv_lib_lex+:} false; then :
6273 $as_echo_n "(cached) " >&6
6274 else
6275
6276 ac_save_LIBS=$LIBS
6277 ac_cv_lib_lex='none needed'
6278 for ac_lib in '' -lfl -ll; do
6279 LIBS="$ac_lib $ac_save_LIBS"
6280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6281 /* end confdefs.h. */
6282 `cat $LEX_OUTPUT_ROOT.c`
6283 _ACEOF
6284 if ac_fn_c_try_link "$LINENO"; then :
6285 ac_cv_lib_lex=$ac_lib
6286 fi
6287 rm -f core conftest.err conftest.$ac_objext \
6288 conftest$ac_exeext conftest.$ac_ext
6289 test "$ac_cv_lib_lex" != 'none needed' && break
6290 done
6291 LIBS=$ac_save_LIBS
6292
6293 fi
6294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5
6295 $as_echo "$ac_cv_lib_lex" >&6; }
6296 test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex
6297 fi
6298
6299
6300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
6301 $as_echo_n "checking whether yytext is a pointer... " >&6; }
6302 if ${ac_cv_prog_lex_yytext_pointer+:} false; then :
6303 $as_echo_n "(cached) " >&6
6304 else
6305 # POSIX says lex can declare yytext either as a pointer or an array; the
6306 # default is implementation-dependent. Figure out which it is, since
6307 # not all implementations provide the %pointer and %array declarations.
6308 ac_cv_prog_lex_yytext_pointer=no
6309 ac_save_LIBS=$LIBS
6310 LIBS="$LEXLIB $ac_save_LIBS"
6311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6312 /* end confdefs.h. */
6313
6314 #define YYTEXT_POINTER 1
6315 `cat $LEX_OUTPUT_ROOT.c`
6316 _ACEOF
6317 if ac_fn_c_try_link "$LINENO"; then :
6318 ac_cv_prog_lex_yytext_pointer=yes
6319 fi
6320 rm -f core conftest.err conftest.$ac_objext \
6321 conftest$ac_exeext conftest.$ac_ext
6322 LIBS=$ac_save_LIBS
6323
6324 fi
6325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5
6326 $as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; }
6327 if test $ac_cv_prog_lex_yytext_pointer = yes; then
6328
6329 $as_echo "#define YYTEXT_POINTER 1" >>confdefs.h
6330
6331 fi
6332 rm -f conftest.l $LEX_OUTPUT_ROOT.c
6333
6334 fi
6335 for ac_prog in 'bison -y' byacc
6336 do
6337 # Extract the first word of "$ac_prog", so it can be a program name with args.
6338 set dummy $ac_prog; ac_word=$2
6339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6340 $as_echo_n "checking for $ac_word... " >&6; }
6341 if ${ac_cv_prog_YACC+:} false; then :
6342 $as_echo_n "(cached) " >&6
6343 else
6344 if test -n "$YACC"; then
6345 ac_cv_prog_YACC="$YACC" # Let the user override the test.
6346 else
6347 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6348 for as_dir in $PATH
6349 do
6350 IFS=$as_save_IFS
6351 test -z "$as_dir" && as_dir=.
6352 for ac_exec_ext in '' $ac_executable_extensions; do
6353 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6354 ac_cv_prog_YACC="$ac_prog"
6355 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6356 break 2
6357 fi
6358 done
6359 done
6360 IFS=$as_save_IFS
6361
6362 fi
6363 fi
6364 YACC=$ac_cv_prog_YACC
6365 if test -n "$YACC"; then
6366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
6367 $as_echo "$YACC" >&6; }
6368 else
6369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6370 $as_echo "no" >&6; }
6371 fi
6372
6373
6374 test -n "$YACC" && break
6375 done
6376 test -n "$YACC" || YACC="yacc"
6377
6378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
6379 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
6380 set x ${MAKE-make}
6381 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
6382 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
6383 $as_echo_n "(cached) " >&6
6384 else
6385 cat >conftest.make <<\_ACEOF
6386 SHELL = /bin/sh
6387 all:
6388 @echo '@@@%%%=$(MAKE)=@@@%%%'
6389 _ACEOF
6390 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
6391 case `${MAKE-make} -f conftest.make 2>/dev/null` in
6392 *@@@%%%=?*=@@@%%%*)
6393 eval ac_cv_prog_make_${ac_make}_set=yes;;
6394 *)
6395 eval ac_cv_prog_make_${ac_make}_set=no;;
6396 esac
6397 rm -f conftest.make
6398 fi
6399 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
6400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6401 $as_echo "yes" >&6; }
6402 SET_MAKE=
6403 else
6404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6405 $as_echo "no" >&6; }
6406 SET_MAKE="MAKE=${MAKE-make}"
6407 fi
6408
6409
6410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
6411 $as_echo_n "checking whether ln -s works... " >&6; }
6412 LN_S=$as_ln_s
6413 if test "$LN_S" = "ln -s"; then
6414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6415 $as_echo "yes" >&6; }
6416 else
6417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
6418 $as_echo "no, using $LN_S" >&6; }
6419 fi
6420
6421
6422 if test "x$LEX" = "x:"; then
6423 as_fn_error $? "flex is not found" "$LINENO" 5
6424 else
6425 version=`$LEX --version | $AWK '{ split($2,x,"."); print x[1]*10000+x[2]*100+x[3]; }'`
6426 if test -n "$version" -a "$version" -ge 20535; then
6427 :
6428 else
6429 as_fn_error $? "flex is too old. GRUB requires 2.5.35 or above" "$LINENO" 5
6430 fi
6431 fi
6432
6433 # These are not a "must".
6434 for ac_prog in makeinfo true
6435 do
6436 # Extract the first word of "$ac_prog", so it can be a program name with args.
6437 set dummy $ac_prog; ac_word=$2
6438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6439 $as_echo_n "checking for $ac_word... " >&6; }
6440 if ${ac_cv_path_MAKEINFO+:} false; then :
6441 $as_echo_n "(cached) " >&6
6442 else
6443 case $MAKEINFO in
6444 [\\/]* | ?:[\\/]*)
6445 ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path.
6446 ;;
6447 *)
6448 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6449 for as_dir in $PATH
6450 do
6451 IFS=$as_save_IFS
6452 test -z "$as_dir" && as_dir=.
6453 for ac_exec_ext in '' $ac_executable_extensions; do
6454 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6455 ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext"
6456 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6457 break 2
6458 fi
6459 done
6460 done
6461 IFS=$as_save_IFS
6462
6463 ;;
6464 esac
6465 fi
6466 MAKEINFO=$ac_cv_path_MAKEINFO
6467 if test -n "$MAKEINFO"; then
6468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5
6469 $as_echo "$MAKEINFO" >&6; }
6470 else
6471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6472 $as_echo "no" >&6; }
6473 fi
6474
6475
6476 test -n "$MAKEINFO" && break
6477 done
6478
6479
6480 #
6481 # Checks for host programs.
6482 #
6483
6484 ac_ext=c
6485 ac_cpp='$CPP $CPPFLAGS'
6486 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6487 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6488 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6489 if test -n "$ac_tool_prefix"; then
6490 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
6491 set dummy ${ac_tool_prefix}gcc; ac_word=$2
6492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6493 $as_echo_n "checking for $ac_word... " >&6; }
6494 if ${ac_cv_prog_CC+:} false; then :
6495 $as_echo_n "(cached) " >&6
6496 else
6497 if test -n "$CC"; then
6498 ac_cv_prog_CC="$CC" # Let the user override the test.
6499 else
6500 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6501 for as_dir in $PATH
6502 do
6503 IFS=$as_save_IFS
6504 test -z "$as_dir" && as_dir=.
6505 for ac_exec_ext in '' $ac_executable_extensions; do
6506 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6507 ac_cv_prog_CC="${ac_tool_prefix}gcc"
6508 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6509 break 2
6510 fi
6511 done
6512 done
6513 IFS=$as_save_IFS
6514
6515 fi
6516 fi
6517 CC=$ac_cv_prog_CC
6518 if test -n "$CC"; then
6519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6520 $as_echo "$CC" >&6; }
6521 else
6522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6523 $as_echo "no" >&6; }
6524 fi
6525
6526
6527 fi
6528 if test -z "$ac_cv_prog_CC"; then
6529 ac_ct_CC=$CC
6530 # Extract the first word of "gcc", so it can be a program name with args.
6531 set dummy gcc; ac_word=$2
6532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6533 $as_echo_n "checking for $ac_word... " >&6; }
6534 if ${ac_cv_prog_ac_ct_CC+:} false; then :
6535 $as_echo_n "(cached) " >&6
6536 else
6537 if test -n "$ac_ct_CC"; then
6538 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
6539 else
6540 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6541 for as_dir in $PATH
6542 do
6543 IFS=$as_save_IFS
6544 test -z "$as_dir" && as_dir=.
6545 for ac_exec_ext in '' $ac_executable_extensions; do
6546 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6547 ac_cv_prog_ac_ct_CC="gcc"
6548 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6549 break 2
6550 fi
6551 done
6552 done
6553 IFS=$as_save_IFS
6554
6555 fi
6556 fi
6557 ac_ct_CC=$ac_cv_prog_ac_ct_CC
6558 if test -n "$ac_ct_CC"; then
6559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
6560 $as_echo "$ac_ct_CC" >&6; }
6561 else
6562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6563 $as_echo "no" >&6; }
6564 fi
6565
6566 if test "x$ac_ct_CC" = x; then
6567 CC=""
6568 else
6569 case $cross_compiling:$ac_tool_warned in
6570 yes:)
6571 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6572 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6573 ac_tool_warned=yes ;;
6574 esac
6575 CC=$ac_ct_CC
6576 fi
6577 else
6578 CC="$ac_cv_prog_CC"
6579 fi
6580
6581 if test -z "$CC"; then
6582 if test -n "$ac_tool_prefix"; then
6583 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
6584 set dummy ${ac_tool_prefix}cc; ac_word=$2
6585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6586 $as_echo_n "checking for $ac_word... " >&6; }
6587 if ${ac_cv_prog_CC+:} false; then :
6588 $as_echo_n "(cached) " >&6
6589 else
6590 if test -n "$CC"; then
6591 ac_cv_prog_CC="$CC" # Let the user override the test.
6592 else
6593 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6594 for as_dir in $PATH
6595 do
6596 IFS=$as_save_IFS
6597 test -z "$as_dir" && as_dir=.
6598 for ac_exec_ext in '' $ac_executable_extensions; do
6599 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6600 ac_cv_prog_CC="${ac_tool_prefix}cc"
6601 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6602 break 2
6603 fi
6604 done
6605 done
6606 IFS=$as_save_IFS
6607
6608 fi
6609 fi
6610 CC=$ac_cv_prog_CC
6611 if test -n "$CC"; then
6612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6613 $as_echo "$CC" >&6; }
6614 else
6615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6616 $as_echo "no" >&6; }
6617 fi
6618
6619
6620 fi
6621 fi
6622 if test -z "$CC"; then
6623 # Extract the first word of "cc", so it can be a program name with args.
6624 set dummy cc; ac_word=$2
6625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6626 $as_echo_n "checking for $ac_word... " >&6; }
6627 if ${ac_cv_prog_CC+:} false; then :
6628 $as_echo_n "(cached) " >&6
6629 else
6630 if test -n "$CC"; then
6631 ac_cv_prog_CC="$CC" # Let the user override the test.
6632 else
6633 ac_prog_rejected=no
6634 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6635 for as_dir in $PATH
6636 do
6637 IFS=$as_save_IFS
6638 test -z "$as_dir" && as_dir=.
6639 for ac_exec_ext in '' $ac_executable_extensions; do
6640 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6641 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
6642 ac_prog_rejected=yes
6643 continue
6644 fi
6645 ac_cv_prog_CC="cc"
6646 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6647 break 2
6648 fi
6649 done
6650 done
6651 IFS=$as_save_IFS
6652
6653 if test $ac_prog_rejected = yes; then
6654 # We found a bogon in the path, so make sure we never use it.
6655 set dummy $ac_cv_prog_CC
6656 shift
6657 if test $# != 0; then
6658 # We chose a different compiler from the bogus one.
6659 # However, it has the same basename, so the bogon will be chosen
6660 # first if we set CC to just the basename; use the full file name.
6661 shift
6662 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
6663 fi
6664 fi
6665 fi
6666 fi
6667 CC=$ac_cv_prog_CC
6668 if test -n "$CC"; then
6669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6670 $as_echo "$CC" >&6; }
6671 else
6672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6673 $as_echo "no" >&6; }
6674 fi
6675
6676
6677 fi
6678 if test -z "$CC"; then
6679 if test -n "$ac_tool_prefix"; then
6680 for ac_prog in cl.exe
6681 do
6682 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6683 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6685 $as_echo_n "checking for $ac_word... " >&6; }
6686 if ${ac_cv_prog_CC+:} false; then :
6687 $as_echo_n "(cached) " >&6
6688 else
6689 if test -n "$CC"; then
6690 ac_cv_prog_CC="$CC" # Let the user override the test.
6691 else
6692 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6693 for as_dir in $PATH
6694 do
6695 IFS=$as_save_IFS
6696 test -z "$as_dir" && as_dir=.
6697 for ac_exec_ext in '' $ac_executable_extensions; do
6698 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6699 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
6700 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6701 break 2
6702 fi
6703 done
6704 done
6705 IFS=$as_save_IFS
6706
6707 fi
6708 fi
6709 CC=$ac_cv_prog_CC
6710 if test -n "$CC"; then
6711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6712 $as_echo "$CC" >&6; }
6713 else
6714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6715 $as_echo "no" >&6; }
6716 fi
6717
6718
6719 test -n "$CC" && break
6720 done
6721 fi
6722 if test -z "$CC"; then
6723 ac_ct_CC=$CC
6724 for ac_prog in cl.exe
6725 do
6726 # Extract the first word of "$ac_prog", so it can be a program name with args.
6727 set dummy $ac_prog; ac_word=$2
6728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6729 $as_echo_n "checking for $ac_word... " >&6; }
6730 if ${ac_cv_prog_ac_ct_CC+:} false; then :
6731 $as_echo_n "(cached) " >&6
6732 else
6733 if test -n "$ac_ct_CC"; then
6734 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
6735 else
6736 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6737 for as_dir in $PATH
6738 do
6739 IFS=$as_save_IFS
6740 test -z "$as_dir" && as_dir=.
6741 for ac_exec_ext in '' $ac_executable_extensions; do
6742 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6743 ac_cv_prog_ac_ct_CC="$ac_prog"
6744 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6745 break 2
6746 fi
6747 done
6748 done
6749 IFS=$as_save_IFS
6750
6751 fi
6752 fi
6753 ac_ct_CC=$ac_cv_prog_ac_ct_CC
6754 if test -n "$ac_ct_CC"; then
6755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
6756 $as_echo "$ac_ct_CC" >&6; }
6757 else
6758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6759 $as_echo "no" >&6; }
6760 fi
6761
6762
6763 test -n "$ac_ct_CC" && break
6764 done
6765
6766 if test "x$ac_ct_CC" = x; then
6767 CC=""
6768 else
6769 case $cross_compiling:$ac_tool_warned in
6770 yes:)
6771 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6772 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6773 ac_tool_warned=yes ;;
6774 esac
6775 CC=$ac_ct_CC
6776 fi
6777 fi
6778
6779 fi
6780
6781
6782 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6783 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6784 as_fn_error $? "no acceptable C compiler found in \$PATH
6785 See \`config.log' for more details" "$LINENO" 5; }
6786
6787 # Provide some information about the compiler.
6788 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
6789 set X $ac_compile
6790 ac_compiler=$2
6791 for ac_option in --version -v -V -qversion; do
6792 { { ac_try="$ac_compiler $ac_option >&5"
6793 case "(($ac_try" in
6794 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6795 *) ac_try_echo=$ac_try;;
6796 esac
6797 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
6798 $as_echo "$ac_try_echo"; } >&5
6799 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
6800 ac_status=$?
6801 if test -s conftest.err; then
6802 sed '10a\
6803 ... rest of stderr output deleted ...
6804 10q' conftest.err >conftest.er1
6805 cat conftest.er1 >&5
6806 fi
6807 rm -f conftest.er1 conftest.err
6808 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6809 test $ac_status = 0; }
6810 done
6811
6812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
6813 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
6814 if ${ac_cv_c_compiler_gnu+:} false; then :
6815 $as_echo_n "(cached) " >&6
6816 else
6817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6818 /* end confdefs.h. */
6819
6820 int
6821 main (void)
6822 {
6823 #ifndef __GNUC__
6824 choke me
6825 #endif
6826
6827 ;
6828 return 0;
6829 }
6830 _ACEOF
6831 if ac_fn_c_try_compile "$LINENO"; then :
6832 ac_compiler_gnu=yes
6833 else
6834 ac_compiler_gnu=no
6835 fi
6836 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6837 ac_cv_c_compiler_gnu=$ac_compiler_gnu
6838
6839 fi
6840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
6841 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
6842 if test $ac_compiler_gnu = yes; then
6843 GCC=yes
6844 else
6845 GCC=
6846 fi
6847 ac_test_CFLAGS=${CFLAGS+set}
6848 ac_save_CFLAGS=$CFLAGS
6849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
6850 $as_echo_n "checking whether $CC accepts -g... " >&6; }
6851 if ${ac_cv_prog_cc_g+:} false; then :
6852 $as_echo_n "(cached) " >&6
6853 else
6854 ac_save_c_werror_flag=$ac_c_werror_flag
6855 ac_c_werror_flag=yes
6856 ac_cv_prog_cc_g=no
6857 CFLAGS="-g"
6858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6859 /* end confdefs.h. */
6860
6861 int
6862 main (void)
6863 {
6864
6865 ;
6866 return 0;
6867 }
6868 _ACEOF
6869 if ac_fn_c_try_compile "$LINENO"; then :
6870 ac_cv_prog_cc_g=yes
6871 else
6872 CFLAGS=""
6873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6874 /* end confdefs.h. */
6875
6876 int
6877 main (void)
6878 {
6879
6880 ;
6881 return 0;
6882 }
6883 _ACEOF
6884 if ac_fn_c_try_compile "$LINENO"; then :
6885
6886 else
6887 ac_c_werror_flag=$ac_save_c_werror_flag
6888 CFLAGS="-g"
6889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6890 /* end confdefs.h. */
6891
6892 int
6893 main (void)
6894 {
6895
6896 ;
6897 return 0;
6898 }
6899 _ACEOF
6900 if ac_fn_c_try_compile "$LINENO"; then :
6901 ac_cv_prog_cc_g=yes
6902 fi
6903 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6904 fi
6905 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6906 fi
6907 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6908 ac_c_werror_flag=$ac_save_c_werror_flag
6909 fi
6910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
6911 $as_echo "$ac_cv_prog_cc_g" >&6; }
6912 if test "$ac_test_CFLAGS" = set; then
6913 CFLAGS=$ac_save_CFLAGS
6914 elif test $ac_cv_prog_cc_g = yes; then
6915 if test "$GCC" = yes; then
6916 CFLAGS="-g -O2"
6917 else
6918 CFLAGS="-g"
6919 fi
6920 else
6921 if test "$GCC" = yes; then
6922 CFLAGS="-O2"
6923 else
6924 CFLAGS=
6925 fi
6926 fi
6927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
6928 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
6929 if ${ac_cv_prog_cc_c89+:} false; then :
6930 $as_echo_n "(cached) " >&6
6931 else
6932 ac_cv_prog_cc_c89=no
6933 ac_save_CC=$CC
6934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6935 /* end confdefs.h. */
6936 #include <stdarg.h>
6937 #include <stdio.h>
6938 struct stat;
6939 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
6940 struct buf { int x; };
6941 FILE * (*rcsopen) (struct buf *, struct stat *, int);
6942 static char *e (p, i)
6943 char **p;
6944 int i;
6945 {
6946 return p[i];
6947 }
6948 static char *f (char * (*g) (char **, int), char **p, ...)
6949 {
6950 char *s;
6951 va_list v;
6952 va_start (v,p);
6953 s = g (p, va_arg (v,int));
6954 va_end (v);
6955 return s;
6956 }
6957
6958 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
6959 function prototypes and stuff, but not '\xHH' hex character constants.
6960 These don't provoke an error unfortunately, instead are silently treated
6961 as 'x'. The following induces an error, until -std is added to get
6962 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
6963 array size at least. It's necessary to write '\x00'==0 to get something
6964 that's true only with -std. */
6965 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
6966
6967 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
6968 inside strings and character constants. */
6969 #define FOO(x) 'x'
6970 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
6971
6972 int test (int i, double x);
6973 struct s1 {int (*f) (int a);};
6974 struct s2 {int (*f) (double a);};
6975 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
6976 int argc;
6977 char **argv;
6978 int
6979 main (void)
6980 {
6981 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
6982 ;
6983 return 0;
6984 }
6985 _ACEOF
6986 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
6987 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6988 do
6989 CC="$ac_save_CC $ac_arg"
6990 if ac_fn_c_try_compile "$LINENO"; then :
6991 ac_cv_prog_cc_c89=$ac_arg
6992 fi
6993 rm -f core conftest.err conftest.$ac_objext
6994 test "x$ac_cv_prog_cc_c89" != "xno" && break
6995 done
6996 rm -f conftest.$ac_ext
6997 CC=$ac_save_CC
6998
6999 fi
7000 # AC_CACHE_VAL
7001 case "x$ac_cv_prog_cc_c89" in
7002 x)
7003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
7004 $as_echo "none needed" >&6; } ;;
7005 xno)
7006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
7007 $as_echo "unsupported" >&6; } ;;
7008 *)
7009 CC="$CC $ac_cv_prog_cc_c89"
7010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
7011 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
7012 esac
7013 if test "x$ac_cv_prog_cc_c89" != xno; then :
7014
7015 fi
7016
7017 ac_ext=c
7018 ac_cpp='$CPP $CPPFLAGS'
7019 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7020 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7021 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7022
7023 ac_ext=c
7024 ac_cpp='$CPP $CPPFLAGS'
7025 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7026 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7027 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
7029 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
7030 if ${am_cv_prog_cc_c_o+:} false; then :
7031 $as_echo_n "(cached) " >&6
7032 else
7033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7034 /* end confdefs.h. */
7035
7036 int
7037 main (void)
7038 {
7039
7040 ;
7041 return 0;
7042 }
7043 _ACEOF
7044 # Make sure it works both with $CC and with simple cc.
7045 # Following AC_PROG_CC_C_O, we do the test twice because some
7046 # compilers refuse to overwrite an existing .o file with -o,
7047 # though they will create one.
7048 am_cv_prog_cc_c_o=yes
7049 for am_i in 1 2; do
7050 if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
7051 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
7052 ac_status=$?
7053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7054 (exit $ac_status); } \
7055 && test -f conftest2.$ac_objext; then
7056 : OK
7057 else
7058 am_cv_prog_cc_c_o=no
7059 break
7060 fi
7061 done
7062 rm -f core conftest*
7063 unset am_i
7064 fi
7065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
7066 $as_echo "$am_cv_prog_cc_c_o" >&6; }
7067 if test "$am_cv_prog_cc_c_o" != yes; then
7068 # Losing compiler, so override with the script.
7069 # FIXME: It is wrong to rewrite CC.
7070 # But if we don't then we get into trouble of one sort or another.
7071 # A longer-term fix would be to have automake use am__CC in this case,
7072 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
7073 CC="$am_aux_dir/compile $CC"
7074 fi
7075 ac_ext=c
7076 ac_cpp='$CPP $CPPFLAGS'
7077 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7078 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7079 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7080
7081
7082 depcc="$CC" am_compiler_list=
7083
7084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
7085 $as_echo_n "checking dependency style of $depcc... " >&6; }
7086 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
7087 $as_echo_n "(cached) " >&6
7088 else
7089 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
7090 # We make a subdir and do the tests there. Otherwise we can end up
7091 # making bogus files that we don't know about and never remove. For
7092 # instance it was reported that on HP-UX the gcc test will end up
7093 # making a dummy file named 'D' -- because '-MD' means "put the output
7094 # in D".
7095 rm -rf conftest.dir
7096 mkdir conftest.dir
7097 # Copy depcomp to subdir because otherwise we won't find it if we're
7098 # using a relative directory.
7099 cp "$am_depcomp" conftest.dir
7100 cd conftest.dir
7101 # We will build objects and dependencies in a subdirectory because
7102 # it helps to detect inapplicable dependency modes. For instance
7103 # both Tru64's cc and ICC support -MD to output dependencies as a
7104 # side effect of compilation, but ICC will put the dependencies in
7105 # the current directory while Tru64 will put them in the object
7106 # directory.
7107 mkdir sub
7108
7109 am_cv_CC_dependencies_compiler_type=none
7110 if test "$am_compiler_list" = ""; then
7111 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
7112 fi
7113 am__universal=false
7114 case " $depcc " in #(
7115 *\ -arch\ *\ -arch\ *) am__universal=true ;;
7116 esac
7117
7118 for depmode in $am_compiler_list; do
7119 # Setup a source with many dependencies, because some compilers
7120 # like to wrap large dependency lists on column 80 (with \), and
7121 # we should not choose a depcomp mode which is confused by this.
7122 #
7123 # We need to recreate these files for each test, as the compiler may
7124 # overwrite some of them when testing with obscure command lines.
7125 # This happens at least with the AIX C compiler.
7126 : > sub/conftest.c
7127 for i in 1 2 3 4 5 6; do
7128 echo '#include "conftst'$i'.h"' >> sub/conftest.c
7129 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
7130 # Solaris 10 /bin/sh.
7131 echo '/* dummy */' > sub/conftst$i.h
7132 done
7133 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
7134
7135 # We check with '-c' and '-o' for the sake of the "dashmstdout"
7136 # mode. It turns out that the SunPro C++ compiler does not properly
7137 # handle '-M -o', and we need to detect this. Also, some Intel
7138 # versions had trouble with output in subdirs.
7139 am__obj=sub/conftest.${OBJEXT-o}
7140 am__minus_obj="-o $am__obj"
7141 case $depmode in
7142 gcc)
7143 # This depmode causes a compiler race in universal mode.
7144 test "$am__universal" = false || continue
7145 ;;
7146 nosideeffect)
7147 # After this tag, mechanisms are not by side-effect, so they'll
7148 # only be used when explicitly requested.
7149 if test "x$enable_dependency_tracking" = xyes; then
7150 continue
7151 else
7152 break
7153 fi
7154 ;;
7155 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
7156 # This compiler won't grok '-c -o', but also, the minuso test has
7157 # not run yet. These depmodes are late enough in the game, and
7158 # so weak that their functioning should not be impacted.
7159 am__obj=conftest.${OBJEXT-o}
7160 am__minus_obj=
7161 ;;
7162 none) break ;;
7163 esac
7164 if depmode=$depmode \
7165 source=sub/conftest.c object=$am__obj \
7166 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
7167 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
7168 >/dev/null 2>conftest.err &&
7169 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
7170 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
7171 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
7172 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
7173 # icc doesn't choke on unknown options, it will just issue warnings
7174 # or remarks (even with -Werror). So we grep stderr for any message
7175 # that says an option was ignored or not supported.
7176 # When given -MP, icc 7.0 and 7.1 complain thusly:
7177 # icc: Command line warning: ignoring option '-M'; no argument required
7178 # The diagnosis changed in icc 8.0:
7179 # icc: Command line remark: option '-MP' not supported
7180 if (grep 'ignoring option' conftest.err ||
7181 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
7182 am_cv_CC_dependencies_compiler_type=$depmode
7183 break
7184 fi
7185 fi
7186 done
7187
7188 cd ..
7189 rm -rf conftest.dir
7190 else
7191 am_cv_CC_dependencies_compiler_type=none
7192 fi
7193
7194 fi
7195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
7196 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
7197 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
7198
7199 if
7200 test "x$enable_dependency_tracking" != xno \
7201 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
7202 am__fastdepCC_TRUE=
7203 am__fastdepCC_FALSE='#'
7204 else
7205 am__fastdepCC_TRUE='#'
7206 am__fastdepCC_FALSE=
7207 fi
7208
7209
7210 ac_ext=c
7211 ac_cpp='$CPP $CPPFLAGS'
7212 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7213 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7214 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
7216 $as_echo_n "checking how to run the C preprocessor... " >&6; }
7217 # On Suns, sometimes $CPP names a directory.
7218 if test -n "$CPP" && test -d "$CPP"; then
7219 CPP=
7220 fi
7221 if test -z "$CPP"; then
7222 if ${ac_cv_prog_CPP+:} false; then :
7223 $as_echo_n "(cached) " >&6
7224 else
7225 # Double quotes because CPP needs to be expanded
7226 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
7227 do
7228 ac_preproc_ok=false
7229 for ac_c_preproc_warn_flag in '' yes
7230 do
7231 # Use a header file that comes with gcc, so configuring glibc
7232 # with a fresh cross-compiler works.
7233 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7234 # <limits.h> exists even on freestanding compilers.
7235 # On the NeXT, cc -E runs the code through the compiler's parser,
7236 # not just through cpp. "Syntax error" is here to catch this case.
7237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7238 /* end confdefs.h. */
7239 #ifdef __STDC__
7240 # include <limits.h>
7241 #else
7242 # include <assert.h>
7243 #endif
7244 Syntax error
7245 _ACEOF
7246 if ac_fn_c_try_cpp "$LINENO"; then :
7247
7248 else
7249 # Broken: fails on valid input.
7250 continue
7251 fi
7252 rm -f conftest.err conftest.i conftest.$ac_ext
7253
7254 # OK, works on sane cases. Now check whether nonexistent headers
7255 # can be detected and how.
7256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7257 /* end confdefs.h. */
7258 #include <ac_nonexistent.h>
7259 _ACEOF
7260 if ac_fn_c_try_cpp "$LINENO"; then :
7261 # Broken: success on invalid input.
7262 continue
7263 else
7264 # Passes both tests.
7265 ac_preproc_ok=:
7266 break
7267 fi
7268 rm -f conftest.err conftest.i conftest.$ac_ext
7269
7270 done
7271 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7272 rm -f conftest.i conftest.err conftest.$ac_ext
7273 if $ac_preproc_ok; then :
7274 break
7275 fi
7276
7277 done
7278 ac_cv_prog_CPP=$CPP
7279
7280 fi
7281 CPP=$ac_cv_prog_CPP
7282 else
7283 ac_cv_prog_CPP=$CPP
7284 fi
7285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
7286 $as_echo "$CPP" >&6; }
7287 ac_preproc_ok=false
7288 for ac_c_preproc_warn_flag in '' yes
7289 do
7290 # Use a header file that comes with gcc, so configuring glibc
7291 # with a fresh cross-compiler works.
7292 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7293 # <limits.h> exists even on freestanding compilers.
7294 # On the NeXT, cc -E runs the code through the compiler's parser,
7295 # not just through cpp. "Syntax error" is here to catch this case.
7296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7297 /* end confdefs.h. */
7298 #ifdef __STDC__
7299 # include <limits.h>
7300 #else
7301 # include <assert.h>
7302 #endif
7303 Syntax error
7304 _ACEOF
7305 if ac_fn_c_try_cpp "$LINENO"; then :
7306
7307 else
7308 # Broken: fails on valid input.
7309 continue
7310 fi
7311 rm -f conftest.err conftest.i conftest.$ac_ext
7312
7313 # OK, works on sane cases. Now check whether nonexistent headers
7314 # can be detected and how.
7315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7316 /* end confdefs.h. */
7317 #include <ac_nonexistent.h>
7318 _ACEOF
7319 if ac_fn_c_try_cpp "$LINENO"; then :
7320 # Broken: success on invalid input.
7321 continue
7322 else
7323 # Passes both tests.
7324 ac_preproc_ok=:
7325 break
7326 fi
7327 rm -f conftest.err conftest.i conftest.$ac_ext
7328
7329 done
7330 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7331 rm -f conftest.i conftest.err conftest.$ac_ext
7332 if $ac_preproc_ok; then :
7333
7334 else
7335 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7336 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7337 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
7338 See \`config.log' for more details" "$LINENO" 5; }
7339 fi
7340
7341 ac_ext=c
7342 ac_cpp='$CPP $CPPFLAGS'
7343 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7344 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7345 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7346
7347
7348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
7349 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
7350 if ${ac_cv_path_GREP+:} false; then :
7351 $as_echo_n "(cached) " >&6
7352 else
7353 if test -z "$GREP"; then
7354 ac_path_GREP_found=false
7355 # Loop through the user's path and test for each of PROGNAME-LIST
7356 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7357 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
7358 do
7359 IFS=$as_save_IFS
7360 test -z "$as_dir" && as_dir=.
7361 for ac_prog in grep ggrep; do
7362 for ac_exec_ext in '' $ac_executable_extensions; do
7363 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
7364 as_fn_executable_p "$ac_path_GREP" || continue
7365 # Check for GNU ac_path_GREP and select it if it is found.
7366 # Check for GNU $ac_path_GREP
7367 case `"$ac_path_GREP" --version 2>&1` in
7368 *GNU*)
7369 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
7370 *)
7371 ac_count=0
7372 $as_echo_n 0123456789 >"conftest.in"
7373 while :
7374 do
7375 cat "conftest.in" "conftest.in" >"conftest.tmp"
7376 mv "conftest.tmp" "conftest.in"
7377 cp "conftest.in" "conftest.nl"
7378 $as_echo 'GREP' >> "conftest.nl"
7379 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
7380 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
7381 as_fn_arith $ac_count + 1 && ac_count=$as_val
7382 if test $ac_count -gt ${ac_path_GREP_max-0}; then
7383 # Best one so far, save it but keep looking for a better one
7384 ac_cv_path_GREP="$ac_path_GREP"
7385 ac_path_GREP_max=$ac_count
7386 fi
7387 # 10*(2^10) chars as input seems more than enough
7388 test $ac_count -gt 10 && break
7389 done
7390 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
7391 esac
7392
7393 $ac_path_GREP_found && break 3
7394 done
7395 done
7396 done
7397 IFS=$as_save_IFS
7398 if test -z "$ac_cv_path_GREP"; then
7399 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
7400 fi
7401 else
7402 ac_cv_path_GREP=$GREP
7403 fi
7404
7405 fi
7406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
7407 $as_echo "$ac_cv_path_GREP" >&6; }
7408 GREP="$ac_cv_path_GREP"
7409
7410
7411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
7412 $as_echo_n "checking for egrep... " >&6; }
7413 if ${ac_cv_path_EGREP+:} false; then :
7414 $as_echo_n "(cached) " >&6
7415 else
7416 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
7417 then ac_cv_path_EGREP="$GREP -E"
7418 else
7419 if test -z "$EGREP"; then
7420 ac_path_EGREP_found=false
7421 # Loop through the user's path and test for each of PROGNAME-LIST
7422 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7423 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
7424 do
7425 IFS=$as_save_IFS
7426 test -z "$as_dir" && as_dir=.
7427 for ac_prog in egrep; do
7428 for ac_exec_ext in '' $ac_executable_extensions; do
7429 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
7430 as_fn_executable_p "$ac_path_EGREP" || continue
7431 # Check for GNU ac_path_EGREP and select it if it is found.
7432 # Check for GNU $ac_path_EGREP
7433 case `"$ac_path_EGREP" --version 2>&1` in
7434 *GNU*)
7435 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
7436 *)
7437 ac_count=0
7438 $as_echo_n 0123456789 >"conftest.in"
7439 while :
7440 do
7441 cat "conftest.in" "conftest.in" >"conftest.tmp"
7442 mv "conftest.tmp" "conftest.in"
7443 cp "conftest.in" "conftest.nl"
7444 $as_echo 'EGREP' >> "conftest.nl"
7445 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
7446 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
7447 as_fn_arith $ac_count + 1 && ac_count=$as_val
7448 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
7449 # Best one so far, save it but keep looking for a better one
7450 ac_cv_path_EGREP="$ac_path_EGREP"
7451 ac_path_EGREP_max=$ac_count
7452 fi
7453 # 10*(2^10) chars as input seems more than enough
7454 test $ac_count -gt 10 && break
7455 done
7456 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
7457 esac
7458
7459 $ac_path_EGREP_found && break 3
7460 done
7461 done
7462 done
7463 IFS=$as_save_IFS
7464 if test -z "$ac_cv_path_EGREP"; then
7465 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
7466 fi
7467 else
7468 ac_cv_path_EGREP=$EGREP
7469 fi
7470
7471 fi
7472 fi
7473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
7474 $as_echo "$ac_cv_path_EGREP" >&6; }
7475 EGREP="$ac_cv_path_EGREP"
7476
7477
7478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7479 $as_echo_n "checking for ANSI C header files... " >&6; }
7480 if ${ac_cv_header_stdc+:} false; then :
7481 $as_echo_n "(cached) " >&6
7482 else
7483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7484 /* end confdefs.h. */
7485 #include <stdlib.h>
7486 #include <stdarg.h>
7487 #include <string.h>
7488 #include <float.h>
7489
7490 int
7491 main (void)
7492 {
7493
7494 ;
7495 return 0;
7496 }
7497 _ACEOF
7498 if ac_fn_c_try_compile "$LINENO"; then :
7499 ac_cv_header_stdc=yes
7500 else
7501 ac_cv_header_stdc=no
7502 fi
7503 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7504
7505 if test $ac_cv_header_stdc = yes; then
7506 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7508 /* end confdefs.h. */
7509 #include <string.h>
7510
7511 _ACEOF
7512 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7513 $EGREP "memchr" >/dev/null 2>&1; then :
7514
7515 else
7516 ac_cv_header_stdc=no
7517 fi
7518 rm -f conftest*
7519
7520 fi
7521
7522 if test $ac_cv_header_stdc = yes; then
7523 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7525 /* end confdefs.h. */
7526 #include <stdlib.h>
7527
7528 _ACEOF
7529 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7530 $EGREP "free" >/dev/null 2>&1; then :
7531
7532 else
7533 ac_cv_header_stdc=no
7534 fi
7535 rm -f conftest*
7536
7537 fi
7538
7539 if test $ac_cv_header_stdc = yes; then
7540 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7541 if test "$cross_compiling" = yes; then :
7542 :
7543 else
7544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7545 /* end confdefs.h. */
7546 #include <ctype.h>
7547 #include <stdlib.h>
7548 #if ((' ' & 0x0FF) == 0x020)
7549 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7550 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7551 #else
7552 # define ISLOWER(c) \
7553 (('a' <= (c) && (c) <= 'i') \
7554 || ('j' <= (c) && (c) <= 'r') \
7555 || ('s' <= (c) && (c) <= 'z'))
7556 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7557 #endif
7558
7559 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7560 int
7561 main ()
7562 {
7563 int i;
7564 for (i = 0; i < 256; i++)
7565 if (XOR (islower (i), ISLOWER (i))
7566 || toupper (i) != TOUPPER (i))
7567 return 2;
7568 return 0;
7569 }
7570 _ACEOF
7571 if ac_fn_c_try_run "$LINENO"; then :
7572
7573 else
7574 ac_cv_header_stdc=no
7575 fi
7576 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7577 conftest.$ac_objext conftest.beam conftest.$ac_ext
7578 fi
7579
7580 fi
7581 fi
7582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7583 $as_echo "$ac_cv_header_stdc" >&6; }
7584 if test $ac_cv_header_stdc = yes; then
7585
7586 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
7587
7588 fi
7589
7590 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
7591 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
7592 inttypes.h stdint.h unistd.h
7593 do :
7594 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7595 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
7596 "
7597 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7598 cat >>confdefs.h <<_ACEOF
7599 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7600 _ACEOF
7601
7602 fi
7603
7604 done
7605
7606
7607
7608 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
7609 if test "x$ac_cv_header_minix_config_h" = xyes; then :
7610 MINIX=yes
7611 else
7612 MINIX=
7613 fi
7614
7615
7616 if test "$MINIX" = yes; then
7617
7618 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
7619
7620
7621 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
7622
7623
7624 $as_echo "#define _MINIX 1" >>confdefs.h
7625
7626
7627 $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
7628
7629 fi
7630
7631
7632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
7633 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
7634 if ${ac_cv_safe_to_define___extensions__+:} false; then :
7635 $as_echo_n "(cached) " >&6
7636 else
7637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7638 /* end confdefs.h. */
7639
7640 # define __EXTENSIONS__ 1
7641 $ac_includes_default
7642 int
7643 main (void)
7644 {
7645
7646 ;
7647 return 0;
7648 }
7649 _ACEOF
7650 if ac_fn_c_try_compile "$LINENO"; then :
7651 ac_cv_safe_to_define___extensions__=yes
7652 else
7653 ac_cv_safe_to_define___extensions__=no
7654 fi
7655 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7656 fi
7657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
7658 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
7659 test $ac_cv_safe_to_define___extensions__ = yes &&
7660 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
7661
7662 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
7663
7664 $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
7665
7666 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
7667
7668 $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
7669
7670 $as_echo "#define _OPENBSD_SOURCE 1" >>confdefs.h
7671
7672 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
7673
7674 $as_echo "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
7675
7676 $as_echo "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
7677
7678 $as_echo "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
7679
7680 $as_echo "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
7681
7682 $as_echo "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
7683
7684 $as_echo "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
7685
7686 $as_echo "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
7687
7688 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
7689
7690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
7691 $as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; }
7692 if ${ac_cv_should_define__xopen_source+:} false; then :
7693 $as_echo_n "(cached) " >&6
7694 else
7695 ac_cv_should_define__xopen_source=no
7696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7697 /* end confdefs.h. */
7698
7699 #include <wchar.h>
7700 mbstate_t x;
7701 int
7702 main (void)
7703 {
7704
7705 ;
7706 return 0;
7707 }
7708 _ACEOF
7709 if ac_fn_c_try_compile "$LINENO"; then :
7710
7711 else
7712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7713 /* end confdefs.h. */
7714
7715 #define _XOPEN_SOURCE 500
7716 #include <wchar.h>
7717 mbstate_t x;
7718 int
7719 main (void)
7720 {
7721
7722 ;
7723 return 0;
7724 }
7725 _ACEOF
7726 if ac_fn_c_try_compile "$LINENO"; then :
7727 ac_cv_should_define__xopen_source=yes
7728 fi
7729 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7730 fi
7731 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7732 fi
7733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
7734 $as_echo "$ac_cv_should_define__xopen_source" >&6; }
7735 test $ac_cv_should_define__xopen_source = yes &&
7736 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
7737
7738 $as_echo "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
7751 $as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
7752 if ${gl_cv_c_amsterdam_compiler+:} false; then :
7753 $as_echo_n "(cached) " >&6
7754 else
7755
7756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7757 /* end confdefs.h. */
7758
7759 #ifdef __ACK__
7760 Amsterdam
7761 #endif
7762
7763 _ACEOF
7764 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7765 $EGREP "Amsterdam" >/dev/null 2>&1; then :
7766 gl_cv_c_amsterdam_compiler=yes
7767 else
7768 gl_cv_c_amsterdam_compiler=no
7769 fi
7770 rm -f conftest*
7771
7772
7773 fi
7774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
7775 $as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
7776
7777 if test $gl_cv_c_amsterdam_compiler = yes; then
7778 if test -z "$AR"; then
7779 AR='cc -c.a'
7780 fi
7781 if test -z "$ARFLAGS"; then
7782 ARFLAGS='-o'
7783 fi
7784 else
7785 :
7786 fi
7787
7788 if test -n "$ac_tool_prefix"; then
7789 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7790 set dummy ${ac_tool_prefix}ar; ac_word=$2
7791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7792 $as_echo_n "checking for $ac_word... " >&6; }
7793 if ${ac_cv_prog_AR+:} false; then :
7794 $as_echo_n "(cached) " >&6
7795 else
7796 if test -n "$AR"; then
7797 ac_cv_prog_AR="$AR" # Let the user override the test.
7798 else
7799 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7800 for as_dir in $PATH
7801 do
7802 IFS=$as_save_IFS
7803 test -z "$as_dir" && as_dir=.
7804 for ac_exec_ext in '' $ac_executable_extensions; do
7805 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7806 ac_cv_prog_AR="${ac_tool_prefix}ar"
7807 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7808 break 2
7809 fi
7810 done
7811 done
7812 IFS=$as_save_IFS
7813
7814 fi
7815 fi
7816 AR=$ac_cv_prog_AR
7817 if test -n "$AR"; then
7818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7819 $as_echo "$AR" >&6; }
7820 else
7821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7822 $as_echo "no" >&6; }
7823 fi
7824
7825
7826 fi
7827 if test -z "$ac_cv_prog_AR"; then
7828 ac_ct_AR=$AR
7829 # Extract the first word of "ar", so it can be a program name with args.
7830 set dummy ar; ac_word=$2
7831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7832 $as_echo_n "checking for $ac_word... " >&6; }
7833 if ${ac_cv_prog_ac_ct_AR+:} false; then :
7834 $as_echo_n "(cached) " >&6
7835 else
7836 if test -n "$ac_ct_AR"; then
7837 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7838 else
7839 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7840 for as_dir in $PATH
7841 do
7842 IFS=$as_save_IFS
7843 test -z "$as_dir" && as_dir=.
7844 for ac_exec_ext in '' $ac_executable_extensions; do
7845 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7846 ac_cv_prog_ac_ct_AR="ar"
7847 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7848 break 2
7849 fi
7850 done
7851 done
7852 IFS=$as_save_IFS
7853
7854 fi
7855 fi
7856 ac_ct_AR=$ac_cv_prog_ac_ct_AR
7857 if test -n "$ac_ct_AR"; then
7858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7859 $as_echo "$ac_ct_AR" >&6; }
7860 else
7861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7862 $as_echo "no" >&6; }
7863 fi
7864
7865 if test "x$ac_ct_AR" = x; then
7866 AR="ar"
7867 else
7868 case $cross_compiling:$ac_tool_warned in
7869 yes:)
7870 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7871 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7872 ac_tool_warned=yes ;;
7873 esac
7874 AR=$ac_ct_AR
7875 fi
7876 else
7877 AR="$ac_cv_prog_AR"
7878 fi
7879
7880 if test -z "$ARFLAGS"; then
7881 ARFLAGS='cr'
7882 fi
7883
7884
7885
7886 if test -z "$RANLIB"; then
7887 if test $gl_cv_c_amsterdam_compiler = yes; then
7888 RANLIB=':'
7889 else
7890 if test -n "$ac_tool_prefix"; then
7891 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7892 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7894 $as_echo_n "checking for $ac_word... " >&6; }
7895 if ${ac_cv_prog_RANLIB+:} false; then :
7896 $as_echo_n "(cached) " >&6
7897 else
7898 if test -n "$RANLIB"; then
7899 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7900 else
7901 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7902 for as_dir in $PATH
7903 do
7904 IFS=$as_save_IFS
7905 test -z "$as_dir" && as_dir=.
7906 for ac_exec_ext in '' $ac_executable_extensions; do
7907 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7908 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7909 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7910 break 2
7911 fi
7912 done
7913 done
7914 IFS=$as_save_IFS
7915
7916 fi
7917 fi
7918 RANLIB=$ac_cv_prog_RANLIB
7919 if test -n "$RANLIB"; then
7920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7921 $as_echo "$RANLIB" >&6; }
7922 else
7923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7924 $as_echo "no" >&6; }
7925 fi
7926
7927
7928 fi
7929 if test -z "$ac_cv_prog_RANLIB"; then
7930 ac_ct_RANLIB=$RANLIB
7931 # Extract the first word of "ranlib", so it can be a program name with args.
7932 set dummy ranlib; ac_word=$2
7933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7934 $as_echo_n "checking for $ac_word... " >&6; }
7935 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
7936 $as_echo_n "(cached) " >&6
7937 else
7938 if test -n "$ac_ct_RANLIB"; then
7939 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7940 else
7941 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7942 for as_dir in $PATH
7943 do
7944 IFS=$as_save_IFS
7945 test -z "$as_dir" && as_dir=.
7946 for ac_exec_ext in '' $ac_executable_extensions; do
7947 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7948 ac_cv_prog_ac_ct_RANLIB="ranlib"
7949 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7950 break 2
7951 fi
7952 done
7953 done
7954 IFS=$as_save_IFS
7955
7956 fi
7957 fi
7958 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7959 if test -n "$ac_ct_RANLIB"; then
7960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7961 $as_echo "$ac_ct_RANLIB" >&6; }
7962 else
7963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7964 $as_echo "no" >&6; }
7965 fi
7966
7967 if test "x$ac_ct_RANLIB" = x; then
7968 RANLIB=":"
7969 else
7970 case $cross_compiling:$ac_tool_warned in
7971 yes:)
7972 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7973 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7974 ac_tool_warned=yes ;;
7975 esac
7976 RANLIB=$ac_ct_RANLIB
7977 fi
7978 else
7979 RANLIB="$ac_cv_prog_RANLIB"
7980 fi
7981
7982 fi
7983 fi
7984
7985
7986
7987 # Check whether --enable-largefile was given.
7988 if test "${enable_largefile+set}" = set; then :
7989 enableval=$enable_largefile;
7990 fi
7991
7992 if test "$enable_largefile" != no; then
7993
7994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
7995 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
7996 if ${ac_cv_sys_largefile_CC+:} false; then :
7997 $as_echo_n "(cached) " >&6
7998 else
7999 ac_cv_sys_largefile_CC=no
8000 if test "$GCC" != yes; then
8001 ac_save_CC=$CC
8002 while :; do
8003 # IRIX 6.2 and later do not support large files by default,
8004 # so use the C compiler's -n32 option if that helps.
8005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8006 /* end confdefs.h. */
8007 #include <sys/types.h>
8008 /* Check that off_t can represent 2**63 - 1 correctly.
8009 We can't simply define LARGE_OFF_T to be 9223372036854775807,
8010 since some C++ compilers masquerading as C compilers
8011 incorrectly reject 9223372036854775807. */
8012 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8013 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8014 && LARGE_OFF_T % 2147483647 == 1)
8015 ? 1 : -1];
8016 int
8017 main (void)
8018 {
8019
8020 ;
8021 return 0;
8022 }
8023 _ACEOF
8024 if ac_fn_c_try_compile "$LINENO"; then :
8025 break
8026 fi
8027 rm -f core conftest.err conftest.$ac_objext
8028 CC="$CC -n32"
8029 if ac_fn_c_try_compile "$LINENO"; then :
8030 ac_cv_sys_largefile_CC=' -n32'; break
8031 fi
8032 rm -f core conftest.err conftest.$ac_objext
8033 break
8034 done
8035 CC=$ac_save_CC
8036 rm -f conftest.$ac_ext
8037 fi
8038 fi
8039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
8040 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
8041 if test "$ac_cv_sys_largefile_CC" != no; then
8042 CC=$CC$ac_cv_sys_largefile_CC
8043 fi
8044
8045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
8046 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
8047 if ${ac_cv_sys_file_offset_bits+:} false; then :
8048 $as_echo_n "(cached) " >&6
8049 else
8050 while :; do
8051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8052 /* end confdefs.h. */
8053 #include <sys/types.h>
8054 /* Check that off_t can represent 2**63 - 1 correctly.
8055 We can't simply define LARGE_OFF_T to be 9223372036854775807,
8056 since some C++ compilers masquerading as C compilers
8057 incorrectly reject 9223372036854775807. */
8058 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8059 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8060 && LARGE_OFF_T % 2147483647 == 1)
8061 ? 1 : -1];
8062 int
8063 main (void)
8064 {
8065
8066 ;
8067 return 0;
8068 }
8069 _ACEOF
8070 if ac_fn_c_try_compile "$LINENO"; then :
8071 ac_cv_sys_file_offset_bits=no; break
8072 fi
8073 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8075 /* end confdefs.h. */
8076 #define _FILE_OFFSET_BITS 64
8077 #include <sys/types.h>
8078 /* Check that off_t can represent 2**63 - 1 correctly.
8079 We can't simply define LARGE_OFF_T to be 9223372036854775807,
8080 since some C++ compilers masquerading as C compilers
8081 incorrectly reject 9223372036854775807. */
8082 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8083 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8084 && LARGE_OFF_T % 2147483647 == 1)
8085 ? 1 : -1];
8086 int
8087 main (void)
8088 {
8089
8090 ;
8091 return 0;
8092 }
8093 _ACEOF
8094 if ac_fn_c_try_compile "$LINENO"; then :
8095 ac_cv_sys_file_offset_bits=64; break
8096 fi
8097 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8098 ac_cv_sys_file_offset_bits=unknown
8099 break
8100 done
8101 fi
8102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
8103 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
8104 case $ac_cv_sys_file_offset_bits in #(
8105 no | unknown) ;;
8106 *)
8107 cat >>confdefs.h <<_ACEOF
8108 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
8109 _ACEOF
8110 ;;
8111 esac
8112 rm -rf conftest*
8113 if test $ac_cv_sys_file_offset_bits = unknown; then
8114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
8115 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
8116 if ${ac_cv_sys_large_files+:} false; then :
8117 $as_echo_n "(cached) " >&6
8118 else
8119 while :; do
8120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8121 /* end confdefs.h. */
8122 #include <sys/types.h>
8123 /* Check that off_t can represent 2**63 - 1 correctly.
8124 We can't simply define LARGE_OFF_T to be 9223372036854775807,
8125 since some C++ compilers masquerading as C compilers
8126 incorrectly reject 9223372036854775807. */
8127 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8128 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8129 && LARGE_OFF_T % 2147483647 == 1)
8130 ? 1 : -1];
8131 int
8132 main (void)
8133 {
8134
8135 ;
8136 return 0;
8137 }
8138 _ACEOF
8139 if ac_fn_c_try_compile "$LINENO"; then :
8140 ac_cv_sys_large_files=no; break
8141 fi
8142 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8144 /* end confdefs.h. */
8145 #define _LARGE_FILES 1
8146 #include <sys/types.h>
8147 /* Check that off_t can represent 2**63 - 1 correctly.
8148 We can't simply define LARGE_OFF_T to be 9223372036854775807,
8149 since some C++ compilers masquerading as C compilers
8150 incorrectly reject 9223372036854775807. */
8151 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8152 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8153 && LARGE_OFF_T % 2147483647 == 1)
8154 ? 1 : -1];
8155 int
8156 main (void)
8157 {
8158
8159 ;
8160 return 0;
8161 }
8162 _ACEOF
8163 if ac_fn_c_try_compile "$LINENO"; then :
8164 ac_cv_sys_large_files=1; break
8165 fi
8166 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8167 ac_cv_sys_large_files=unknown
8168 break
8169 done
8170 fi
8171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
8172 $as_echo "$ac_cv_sys_large_files" >&6; }
8173 case $ac_cv_sys_large_files in #(
8174 no | unknown) ;;
8175 *)
8176 cat >>confdefs.h <<_ACEOF
8177 #define _LARGE_FILES $ac_cv_sys_large_files
8178 _ACEOF
8179 ;;
8180 esac
8181 rm -rf conftest*
8182 fi
8183
8184
8185 $as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
8186
8187 fi
8188
8189
8190
8191
8192
8193
8194 # Check whether --enable-threads was given.
8195 if test "${enable_threads+set}" = set; then :
8196 enableval=$enable_threads; gl_use_threads=$enableval
8197 else
8198 if test -n "$gl_use_threads_default"; then
8199 gl_use_threads="$gl_use_threads_default"
8200 else
8201 case "$host_os" in
8202 osf*) gl_use_threads=no ;;
8203 cygwin*)
8204 case `uname -r` in
8205 1.[0-5].*) gl_use_threads=no ;;
8206 *) gl_use_threads=yes ;;
8207 esac
8208 ;;
8209 *) gl_use_threads=yes ;;
8210 esac
8211 fi
8212
8213 fi
8214
8215 if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
8216 # For using <pthread.h>:
8217 case "$host_os" in
8218 osf*)
8219 # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
8220 # groks <pthread.h>. cc also understands the flag -pthread, but
8221 # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
8222 # 2. putting a flag into CPPFLAGS that has an effect on the linker
8223 # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
8224 # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
8225 CPPFLAGS="$CPPFLAGS -D_REENTRANT"
8226 ;;
8227 esac
8228 # Some systems optimize for single-threaded programs by default, and
8229 # need special flags to disable these optimizations. For example, the
8230 # definition of 'errno' in <errno.h>.
8231 case "$host_os" in
8232 aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
8233 solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
8234 esac
8235 fi
8236
8237
8238
8239 # Pre-early section.
8240
8241
8242
8243
8244 # Code from module absolute-header:
8245 # Code from module alloca:
8246 # Code from module alloca-opt:
8247 # Code from module argp:
8248 # Code from module assure:
8249 # Code from module at-internal:
8250 # Code from module base64:
8251 # Code from module btowc:
8252 # Code from module builtin-expect:
8253 # Code from module chdir:
8254 # Code from module chdir-long:
8255 # Code from module cloexec:
8256 # Code from module close:
8257 # Code from module dirent:
8258 # Code from module dirfd:
8259 # Code from module dirname-lgpl:
8260 # Code from module dosname:
8261 # Code from module double-slash-root:
8262 # Code from module dup2:
8263 # Code from module errno:
8264 # Code from module error:
8265 # Code from module exitfail:
8266 # Code from module extensions:
8267 # Code from module extern-inline:
8268 # Code from module fchdir:
8269 # Code from module fcntl:
8270 # Code from module fcntl-h:
8271 # Code from module fd-hook:
8272 # Code from module fd-safer-flag:
8273 # Code from module filename:
8274 # Code from module filenamecat-lgpl:
8275 # Code from module flexmember:
8276 # Code from module float:
8277 # Code from module fnmatch:
8278 # Code from module fnmatch-h:
8279 # Code from module fstat:
8280 # Code from module getcwd-lgpl:
8281 # Code from module getdelim:
8282 # Code from module getdtablesize:
8283 # Code from module getline:
8284 # Code from module getopt-gnu:
8285 # Code from module getopt-posix:
8286 # Code from module getprogname:
8287 # Code from module gettext-h:
8288 # Code from module gitlog-to-changelog:
8289 # Code from module hard-locale:
8290 # Code from module havelib:
8291 # Code from module include_next:
8292 # Code from module intprops:
8293 # Code from module langinfo:
8294 # Code from module largefile:
8295
8296 # Code from module libc-config:
8297 # Code from module limits-h:
8298 # Code from module localcharset:
8299 # Code from module locale:
8300 # Code from module localeconv:
8301 # Code from module lock:
8302 # Code from module malloc-gnu:
8303 # Code from module malloc-posix:
8304 # Code from module malloca:
8305 # Code from module mbrtowc:
8306 # Code from module mbsinit:
8307 # Code from module mbsrtowcs:
8308 # Code from module mbswidth:
8309 # Code from module mbtowc:
8310 # Code from module memchr:
8311 # Code from module mempcpy:
8312 # Code from module memrchr:
8313 # Code from module msvc-inval:
8314 # Code from module msvc-nothrow:
8315 # Code from module multiarch:
8316 # Code from module nl_langinfo:
8317 # Code from module nocrash:
8318 # Code from module open:
8319 # Code from module openat:
8320 # Code from module openat-die:
8321 # Code from module openat-h:
8322 # Code from module pathmax:
8323 # Code from module progname:
8324 # Code from module rawmemchr:
8325 # Code from module realloc-gnu:
8326 # Code from module realloc-posix:
8327 # Code from module regex:
8328 # Code from module save-cwd:
8329 # Code from module size_max:
8330 # Code from module sleep:
8331 # Code from module snippet/_Noreturn:
8332 # Code from module snippet/arg-nonnull:
8333 # Code from module snippet/c++defs:
8334 # Code from module snippet/warn-on-use:
8335 # Code from module ssize_t:
8336 # Code from module stat:
8337 # Code from module stat-time:
8338 # Code from module stdalign:
8339 # Code from module stdbool:
8340 # Code from module stddef:
8341 # Code from module stdint:
8342 # Code from module stdio:
8343 # Code from module stdlib:
8344 # Code from module strcase:
8345 # Code from module strchrnul:
8346 # Code from module strdup-posix:
8347 # Code from module streq:
8348 # Code from module strerror:
8349 # Code from module strerror-override:
8350 # Code from module string:
8351 # Code from module strings:
8352 # Code from module strndup:
8353 # Code from module strnlen:
8354 # Code from module strnlen1:
8355 # Code from module sys_stat:
8356 # Code from module sys_types:
8357 # Code from module sysexits:
8358 # Code from module threadlib:
8359
8360
8361
8362 # Code from module time:
8363 # Code from module unistd:
8364 # Code from module unistd-safer:
8365 # Code from module unitypes:
8366 # Code from module uniwidth/base:
8367 # Code from module uniwidth/width:
8368 # Code from module vasnprintf:
8369 # Code from module verify:
8370 # Code from module vsnprintf:
8371 # Code from module wchar:
8372 # Code from module wcrtomb:
8373 # Code from module wctype-h:
8374 # Code from module wcwidth:
8375 # Code from module xalloc-oversized:
8376 # Code from module xsize:
8377
8378 ac_ext=cpp
8379 ac_cpp='$CXXCPP $CPPFLAGS'
8380 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8381 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8382 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
8383 if test -z "$CXX"; then
8384 if test -n "$CCC"; then
8385 CXX=$CCC
8386 else
8387 if test -n "$ac_tool_prefix"; then
8388 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
8389 do
8390 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8391 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8393 $as_echo_n "checking for $ac_word... " >&6; }
8394 if ${ac_cv_prog_CXX+:} false; then :
8395 $as_echo_n "(cached) " >&6
8396 else
8397 if test -n "$CXX"; then
8398 ac_cv_prog_CXX="$CXX" # Let the user override the test.
8399 else
8400 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8401 for as_dir in $PATH
8402 do
8403 IFS=$as_save_IFS
8404 test -z "$as_dir" && as_dir=.
8405 for ac_exec_ext in '' $ac_executable_extensions; do
8406 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8407 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
8408 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8409 break 2
8410 fi
8411 done
8412 done
8413 IFS=$as_save_IFS
8414
8415 fi
8416 fi
8417 CXX=$ac_cv_prog_CXX
8418 if test -n "$CXX"; then
8419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
8420 $as_echo "$CXX" >&6; }
8421 else
8422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8423 $as_echo "no" >&6; }
8424 fi
8425
8426
8427 test -n "$CXX" && break
8428 done
8429 fi
8430 if test -z "$CXX"; then
8431 ac_ct_CXX=$CXX
8432 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
8433 do
8434 # Extract the first word of "$ac_prog", so it can be a program name with args.
8435 set dummy $ac_prog; ac_word=$2
8436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8437 $as_echo_n "checking for $ac_word... " >&6; }
8438 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
8439 $as_echo_n "(cached) " >&6
8440 else
8441 if test -n "$ac_ct_CXX"; then
8442 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
8443 else
8444 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8445 for as_dir in $PATH
8446 do
8447 IFS=$as_save_IFS
8448 test -z "$as_dir" && as_dir=.
8449 for ac_exec_ext in '' $ac_executable_extensions; do
8450 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8451 ac_cv_prog_ac_ct_CXX="$ac_prog"
8452 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8453 break 2
8454 fi
8455 done
8456 done
8457 IFS=$as_save_IFS
8458
8459 fi
8460 fi
8461 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
8462 if test -n "$ac_ct_CXX"; then
8463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
8464 $as_echo "$ac_ct_CXX" >&6; }
8465 else
8466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8467 $as_echo "no" >&6; }
8468 fi
8469
8470
8471 test -n "$ac_ct_CXX" && break
8472 done
8473
8474 if test "x$ac_ct_CXX" = x; then
8475 CXX="g++"
8476 else
8477 case $cross_compiling:$ac_tool_warned in
8478 yes:)
8479 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8480 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8481 ac_tool_warned=yes ;;
8482 esac
8483 CXX=$ac_ct_CXX
8484 fi
8485 fi
8486
8487 fi
8488 fi
8489 # Provide some information about the compiler.
8490 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
8491 set X $ac_compile
8492 ac_compiler=$2
8493 for ac_option in --version -v -V -qversion; do
8494 { { ac_try="$ac_compiler $ac_option >&5"
8495 case "(($ac_try" in
8496 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8497 *) ac_try_echo=$ac_try;;
8498 esac
8499 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
8500 $as_echo "$ac_try_echo"; } >&5
8501 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
8502 ac_status=$?
8503 if test -s conftest.err; then
8504 sed '10a\
8505 ... rest of stderr output deleted ...
8506 10q' conftest.err >conftest.er1
8507 cat conftest.er1 >&5
8508 fi
8509 rm -f conftest.er1 conftest.err
8510 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8511 test $ac_status = 0; }
8512 done
8513
8514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
8515 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
8516 if ${ac_cv_cxx_compiler_gnu+:} false; then :
8517 $as_echo_n "(cached) " >&6
8518 else
8519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8520 /* end confdefs.h. */
8521
8522 int
8523 main ()
8524 {
8525 #ifndef __GNUC__
8526 choke me
8527 #endif
8528
8529 ;
8530 return 0;
8531 }
8532 _ACEOF
8533 if ac_fn_cxx_try_compile "$LINENO"; then :
8534 ac_compiler_gnu=yes
8535 else
8536 ac_compiler_gnu=no
8537 fi
8538 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8539 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
8540
8541 fi
8542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
8543 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
8544 if test $ac_compiler_gnu = yes; then
8545 GXX=yes
8546 else
8547 GXX=
8548 fi
8549 ac_test_CXXFLAGS=${CXXFLAGS+set}
8550 ac_save_CXXFLAGS=$CXXFLAGS
8551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
8552 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
8553 if ${ac_cv_prog_cxx_g+:} false; then :
8554 $as_echo_n "(cached) " >&6
8555 else
8556 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
8557 ac_cxx_werror_flag=yes
8558 ac_cv_prog_cxx_g=no
8559 CXXFLAGS="-g"
8560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8561 /* end confdefs.h. */
8562
8563 int
8564 main ()
8565 {
8566
8567 ;
8568 return 0;
8569 }
8570 _ACEOF
8571 if ac_fn_cxx_try_compile "$LINENO"; then :
8572 ac_cv_prog_cxx_g=yes
8573 else
8574 CXXFLAGS=""
8575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8576 /* end confdefs.h. */
8577
8578 int
8579 main ()
8580 {
8581
8582 ;
8583 return 0;
8584 }
8585 _ACEOF
8586 if ac_fn_cxx_try_compile "$LINENO"; then :
8587
8588 else
8589 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
8590 CXXFLAGS="-g"
8591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8592 /* end confdefs.h. */
8593
8594 int
8595 main ()
8596 {
8597
8598 ;
8599 return 0;
8600 }
8601 _ACEOF
8602 if ac_fn_cxx_try_compile "$LINENO"; then :
8603 ac_cv_prog_cxx_g=yes
8604 fi
8605 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8606 fi
8607 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8608 fi
8609 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8610 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
8611 fi
8612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
8613 $as_echo "$ac_cv_prog_cxx_g" >&6; }
8614 if test "$ac_test_CXXFLAGS" = set; then
8615 CXXFLAGS=$ac_save_CXXFLAGS
8616 elif test $ac_cv_prog_cxx_g = yes; then
8617 if test "$GXX" = yes; then
8618 CXXFLAGS="-g -O2"
8619 else
8620 CXXFLAGS="-g"
8621 fi
8622 else
8623 if test "$GXX" = yes; then
8624 CXXFLAGS="-O2"
8625 else
8626 CXXFLAGS=
8627 fi
8628 fi
8629 ac_ext=c
8630 ac_cpp='$CPP $CPPFLAGS'
8631 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8632 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8633 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8634
8635 depcc="$CXX" am_compiler_list=
8636
8637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
8638 $as_echo_n "checking dependency style of $depcc... " >&6; }
8639 if ${am_cv_CXX_dependencies_compiler_type+:} false; then :
8640 $as_echo_n "(cached) " >&6
8641 else
8642 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
8643 # We make a subdir and do the tests there. Otherwise we can end up
8644 # making bogus files that we don't know about and never remove. For
8645 # instance it was reported that on HP-UX the gcc test will end up
8646 # making a dummy file named 'D' -- because '-MD' means "put the output
8647 # in D".
8648 rm -rf conftest.dir
8649 mkdir conftest.dir
8650 # Copy depcomp to subdir because otherwise we won't find it if we're
8651 # using a relative directory.
8652 cp "$am_depcomp" conftest.dir
8653 cd conftest.dir
8654 # We will build objects and dependencies in a subdirectory because
8655 # it helps to detect inapplicable dependency modes. For instance
8656 # both Tru64's cc and ICC support -MD to output dependencies as a
8657 # side effect of compilation, but ICC will put the dependencies in
8658 # the current directory while Tru64 will put them in the object
8659 # directory.
8660 mkdir sub
8661
8662 am_cv_CXX_dependencies_compiler_type=none
8663 if test "$am_compiler_list" = ""; then
8664 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
8665 fi
8666 am__universal=false
8667 case " $depcc " in #(
8668 *\ -arch\ *\ -arch\ *) am__universal=true ;;
8669 esac
8670
8671 for depmode in $am_compiler_list; do
8672 # Setup a source with many dependencies, because some compilers
8673 # like to wrap large dependency lists on column 80 (with \), and
8674 # we should not choose a depcomp mode which is confused by this.
8675 #
8676 # We need to recreate these files for each test, as the compiler may
8677 # overwrite some of them when testing with obscure command lines.
8678 # This happens at least with the AIX C compiler.
8679 : > sub/conftest.c
8680 for i in 1 2 3 4 5 6; do
8681 echo '#include "conftst'$i'.h"' >> sub/conftest.c
8682 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
8683 # Solaris 10 /bin/sh.
8684 echo '/* dummy */' > sub/conftst$i.h
8685 done
8686 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
8687
8688 # We check with '-c' and '-o' for the sake of the "dashmstdout"
8689 # mode. It turns out that the SunPro C++ compiler does not properly
8690 # handle '-M -o', and we need to detect this. Also, some Intel
8691 # versions had trouble with output in subdirs.
8692 am__obj=sub/conftest.${OBJEXT-o}
8693 am__minus_obj="-o $am__obj"
8694 case $depmode in
8695 gcc)
8696 # This depmode causes a compiler race in universal mode.
8697 test "$am__universal" = false || continue
8698 ;;
8699 nosideeffect)
8700 # After this tag, mechanisms are not by side-effect, so they'll
8701 # only be used when explicitly requested.
8702 if test "x$enable_dependency_tracking" = xyes; then
8703 continue
8704 else
8705 break
8706 fi
8707 ;;
8708 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
8709 # This compiler won't grok '-c -o', but also, the minuso test has
8710 # not run yet. These depmodes are late enough in the game, and
8711 # so weak that their functioning should not be impacted.
8712 am__obj=conftest.${OBJEXT-o}
8713 am__minus_obj=
8714 ;;
8715 none) break ;;
8716 esac
8717 if depmode=$depmode \
8718 source=sub/conftest.c object=$am__obj \
8719 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
8720 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
8721 >/dev/null 2>conftest.err &&
8722 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
8723 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
8724 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
8725 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
8726 # icc doesn't choke on unknown options, it will just issue warnings
8727 # or remarks (even with -Werror). So we grep stderr for any message
8728 # that says an option was ignored or not supported.
8729 # When given -MP, icc 7.0 and 7.1 complain thusly:
8730 # icc: Command line warning: ignoring option '-M'; no argument required
8731 # The diagnosis changed in icc 8.0:
8732 # icc: Command line remark: option '-MP' not supported
8733 if (grep 'ignoring option' conftest.err ||
8734 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
8735 am_cv_CXX_dependencies_compiler_type=$depmode
8736 break
8737 fi
8738 fi
8739 done
8740
8741 cd ..
8742 rm -rf conftest.dir
8743 else
8744 am_cv_CXX_dependencies_compiler_type=none
8745 fi
8746
8747 fi
8748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
8749 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
8750 CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
8751
8752 if
8753 test "x$enable_dependency_tracking" != xno \
8754 && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
8755 am__fastdepCXX_TRUE=
8756 am__fastdepCXX_FALSE='#'
8757 else
8758 am__fastdepCXX_TRUE='#'
8759 am__fastdepCXX_FALSE=
8760 fi
8761
8762
8763
8764 # By default we simply use the C compiler to build assembly code.
8765
8766 test "${CCAS+set}" = set || CCAS=$CC
8767 test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
8768
8769
8770
8771 depcc="$CCAS" am_compiler_list=
8772
8773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
8774 $as_echo_n "checking dependency style of $depcc... " >&6; }
8775 if ${am_cv_CCAS_dependencies_compiler_type+:} false; then :
8776 $as_echo_n "(cached) " >&6
8777 else
8778 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
8779 # We make a subdir and do the tests there. Otherwise we can end up
8780 # making bogus files that we don't know about and never remove. For
8781 # instance it was reported that on HP-UX the gcc test will end up
8782 # making a dummy file named 'D' -- because '-MD' means "put the output
8783 # in D".
8784 rm -rf conftest.dir
8785 mkdir conftest.dir
8786 # Copy depcomp to subdir because otherwise we won't find it if we're
8787 # using a relative directory.
8788 cp "$am_depcomp" conftest.dir
8789 cd conftest.dir
8790 # We will build objects and dependencies in a subdirectory because
8791 # it helps to detect inapplicable dependency modes. For instance
8792 # both Tru64's cc and ICC support -MD to output dependencies as a
8793 # side effect of compilation, but ICC will put the dependencies in
8794 # the current directory while Tru64 will put them in the object
8795 # directory.
8796 mkdir sub
8797
8798 am_cv_CCAS_dependencies_compiler_type=none
8799 if test "$am_compiler_list" = ""; then
8800 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
8801 fi
8802 am__universal=false
8803
8804
8805 for depmode in $am_compiler_list; do
8806 # Setup a source with many dependencies, because some compilers
8807 # like to wrap large dependency lists on column 80 (with \), and
8808 # we should not choose a depcomp mode which is confused by this.
8809 #
8810 # We need to recreate these files for each test, as the compiler may
8811 # overwrite some of them when testing with obscure command lines.
8812 # This happens at least with the AIX C compiler.
8813 : > sub/conftest.c
8814 for i in 1 2 3 4 5 6; do
8815 echo '#include "conftst'$i'.h"' >> sub/conftest.c
8816 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
8817 # Solaris 10 /bin/sh.
8818 echo '/* dummy */' > sub/conftst$i.h
8819 done
8820 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
8821
8822 # We check with '-c' and '-o' for the sake of the "dashmstdout"
8823 # mode. It turns out that the SunPro C++ compiler does not properly
8824 # handle '-M -o', and we need to detect this. Also, some Intel
8825 # versions had trouble with output in subdirs.
8826 am__obj=sub/conftest.${OBJEXT-o}
8827 am__minus_obj="-o $am__obj"
8828 case $depmode in
8829 gcc)
8830 # This depmode causes a compiler race in universal mode.
8831 test "$am__universal" = false || continue
8832 ;;
8833 nosideeffect)
8834 # After this tag, mechanisms are not by side-effect, so they'll
8835 # only be used when explicitly requested.
8836 if test "x$enable_dependency_tracking" = xyes; then
8837 continue
8838 else
8839 break
8840 fi
8841 ;;
8842 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
8843 # This compiler won't grok '-c -o', but also, the minuso test has
8844 # not run yet. These depmodes are late enough in the game, and
8845 # so weak that their functioning should not be impacted.
8846 am__obj=conftest.${OBJEXT-o}
8847 am__minus_obj=
8848 ;;
8849 none) break ;;
8850 esac
8851 if depmode=$depmode \
8852 source=sub/conftest.c object=$am__obj \
8853 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
8854 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
8855 >/dev/null 2>conftest.err &&
8856 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
8857 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
8858 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
8859 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
8860 # icc doesn't choke on unknown options, it will just issue warnings
8861 # or remarks (even with -Werror). So we grep stderr for any message
8862 # that says an option was ignored or not supported.
8863 # When given -MP, icc 7.0 and 7.1 complain thusly:
8864 # icc: Command line warning: ignoring option '-M'; no argument required
8865 # The diagnosis changed in icc 8.0:
8866 # icc: Command line remark: option '-MP' not supported
8867 if (grep 'ignoring option' conftest.err ||
8868 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
8869 am_cv_CCAS_dependencies_compiler_type=$depmode
8870 break
8871 fi
8872 fi
8873 done
8874
8875 cd ..
8876 rm -rf conftest.dir
8877 else
8878 am_cv_CCAS_dependencies_compiler_type=none
8879 fi
8880
8881 fi
8882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CCAS_dependencies_compiler_type" >&5
8883 $as_echo "$am_cv_CCAS_dependencies_compiler_type" >&6; }
8884 CCASDEPMODE=depmode=$am_cv_CCAS_dependencies_compiler_type
8885
8886 if
8887 test "x$enable_dependency_tracking" != xno \
8888 && test "$am_cv_CCAS_dependencies_compiler_type" = gcc3; then
8889 am__fastdepCCAS_TRUE=
8890 am__fastdepCCAS_FALSE='#'
8891 else
8892 am__fastdepCCAS_TRUE='#'
8893 am__fastdepCCAS_FALSE=
8894 fi
8895
8896
8897
8898
8899
8900
8901
8902
8903 if test -n "$PYTHON"; then
8904 # If the user set $PYTHON, use it and don't search something else.
8905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON version is >= 2.6" >&5
8906 $as_echo_n "checking whether $PYTHON version is >= 2.6... " >&6; }
8907 prog="import sys
8908 # split strings by '.' and convert to numeric. Append some zeros
8909 # because we need at least 4 digits for the hex conversion.
8910 # map returns an iterator in Python 3.0 and a list in 2.x
8911 minver = list(map(int, '2.6'.split('.'))) + [0, 0, 0]
8912 minverhex = 0
8913 # xrange is not present in Python 3.0 and range returns an iterator
8914 for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i]
8915 sys.exit(sys.hexversion < minverhex)"
8916 if { echo "$as_me:$LINENO: $PYTHON -c "$prog"" >&5
8917 ($PYTHON -c "$prog") >&5 2>&5
8918 ac_status=$?
8919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8920 (exit $ac_status); }; then :
8921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8922 $as_echo "yes" >&6; }
8923 else
8924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8925 $as_echo "no" >&6; }
8926 as_fn_error $? "Python interpreter is too old" "$LINENO" 5
8927 fi
8928 am_display_PYTHON=$PYTHON
8929 else
8930 # Otherwise, try each interpreter until we find one that satisfies
8931 # VERSION.
8932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a Python interpreter with version >= 2.6" >&5
8933 $as_echo_n "checking for a Python interpreter with version >= 2.6... " >&6; }
8934 if ${am_cv_pathless_PYTHON+:} false; then :
8935 $as_echo_n "(cached) " >&6
8936 else
8937
8938 for am_cv_pathless_PYTHON in python python2 python3 python3.3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 none; do
8939 test "$am_cv_pathless_PYTHON" = none && break
8940 prog="import sys
8941 # split strings by '.' and convert to numeric. Append some zeros
8942 # because we need at least 4 digits for the hex conversion.
8943 # map returns an iterator in Python 3.0 and a list in 2.x
8944 minver = list(map(int, '2.6'.split('.'))) + [0, 0, 0]
8945 minverhex = 0
8946 # xrange is not present in Python 3.0 and range returns an iterator
8947 for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i]
8948 sys.exit(sys.hexversion < minverhex)"
8949 if { echo "$as_me:$LINENO: $am_cv_pathless_PYTHON -c "$prog"" >&5
8950 ($am_cv_pathless_PYTHON -c "$prog") >&5 2>&5
8951 ac_status=$?
8952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8953 (exit $ac_status); }; then :
8954 break
8955 fi
8956 done
8957 fi
8958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_pathless_PYTHON" >&5
8959 $as_echo "$am_cv_pathless_PYTHON" >&6; }
8960 # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
8961 if test "$am_cv_pathless_PYTHON" = none; then
8962 PYTHON=:
8963 else
8964 # Extract the first word of "$am_cv_pathless_PYTHON", so it can be a program name with args.
8965 set dummy $am_cv_pathless_PYTHON; ac_word=$2
8966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8967 $as_echo_n "checking for $ac_word... " >&6; }
8968 if ${ac_cv_path_PYTHON+:} false; then :
8969 $as_echo_n "(cached) " >&6
8970 else
8971 case $PYTHON in
8972 [\\/]* | ?:[\\/]*)
8973 ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
8974 ;;
8975 *)
8976 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8977 for as_dir in $PATH
8978 do
8979 IFS=$as_save_IFS
8980 test -z "$as_dir" && as_dir=.
8981 for ac_exec_ext in '' $ac_executable_extensions; do
8982 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8983 ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
8984 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8985 break 2
8986 fi
8987 done
8988 done
8989 IFS=$as_save_IFS
8990
8991 ;;
8992 esac
8993 fi
8994 PYTHON=$ac_cv_path_PYTHON
8995 if test -n "$PYTHON"; then
8996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
8997 $as_echo "$PYTHON" >&6; }
8998 else
8999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9000 $as_echo "no" >&6; }
9001 fi
9002
9003
9004 fi
9005 am_display_PYTHON=$am_cv_pathless_PYTHON
9006 fi
9007
9008
9009 if test "$PYTHON" = :; then
9010 as_fn_error $? "no suitable Python interpreter found" "$LINENO" 5
9011 else
9012
9013
9014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON version" >&5
9015 $as_echo_n "checking for $am_display_PYTHON version... " >&6; }
9016 if ${am_cv_python_version+:} false; then :
9017 $as_echo_n "(cached) " >&6
9018 else
9019 am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[:3])"`
9020 fi
9021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_version" >&5
9022 $as_echo "$am_cv_python_version" >&6; }
9023 PYTHON_VERSION=$am_cv_python_version
9024
9025
9026
9027 PYTHON_PREFIX='${prefix}'
9028
9029 PYTHON_EXEC_PREFIX='${exec_prefix}'
9030
9031
9032
9033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON platform" >&5
9034 $as_echo_n "checking for $am_display_PYTHON platform... " >&6; }
9035 if ${am_cv_python_platform+:} false; then :
9036 $as_echo_n "(cached) " >&6
9037 else
9038 am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`
9039 fi
9040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_platform" >&5
9041 $as_echo "$am_cv_python_platform" >&6; }
9042 PYTHON_PLATFORM=$am_cv_python_platform
9043
9044
9045 # Just factor out some code duplication.
9046 am_python_setup_sysconfig="\
9047 import sys
9048 # Prefer sysconfig over distutils.sysconfig, for better compatibility
9049 # with python 3.x. See automake bug#10227.
9050 try:
9051 import sysconfig
9052 except ImportError:
9053 can_use_sysconfig = 0
9054 else:
9055 can_use_sysconfig = 1
9056 # Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs:
9057 # <https://github.com/pypa/virtualenv/issues/118>
9058 try:
9059 from platform import python_implementation
9060 if python_implementation() == 'CPython' and sys.version[:3] == '2.7':
9061 can_use_sysconfig = 0
9062 except ImportError:
9063 pass"
9064
9065
9066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON script directory" >&5
9067 $as_echo_n "checking for $am_display_PYTHON script directory... " >&6; }
9068 if ${am_cv_python_pythondir+:} false; then :
9069 $as_echo_n "(cached) " >&6
9070 else
9071 if test "x$prefix" = xNONE
9072 then
9073 am_py_prefix=$ac_default_prefix
9074 else
9075 am_py_prefix=$prefix
9076 fi
9077 am_cv_python_pythondir=`$PYTHON -c "
9078 $am_python_setup_sysconfig
9079 if can_use_sysconfig:
9080 sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'})
9081 else:
9082 from distutils import sysconfig
9083 sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix')
9084 sys.stdout.write(sitedir)"`
9085 case $am_cv_python_pythondir in
9086 $am_py_prefix*)
9087 am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
9088 am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"`
9089 ;;
9090 *)
9091 case $am_py_prefix in
9092 /usr|/System*) ;;
9093 *)
9094 am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages
9095 ;;
9096 esac
9097 ;;
9098 esac
9099
9100 fi
9101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pythondir" >&5
9102 $as_echo "$am_cv_python_pythondir" >&6; }
9103 pythondir=$am_cv_python_pythondir
9104
9105
9106
9107 pkgpythondir=\${pythondir}/$PACKAGE
9108
9109
9110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON extension module directory" >&5
9111 $as_echo_n "checking for $am_display_PYTHON extension module directory... " >&6; }
9112 if ${am_cv_python_pyexecdir+:} false; then :
9113 $as_echo_n "(cached) " >&6
9114 else
9115 if test "x$exec_prefix" = xNONE
9116 then
9117 am_py_exec_prefix=$am_py_prefix
9118 else
9119 am_py_exec_prefix=$exec_prefix
9120 fi
9121 am_cv_python_pyexecdir=`$PYTHON -c "
9122 $am_python_setup_sysconfig
9123 if can_use_sysconfig:
9124 sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_prefix'})
9125 else:
9126 from distutils import sysconfig
9127 sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_prefix')
9128 sys.stdout.write(sitedir)"`
9129 case $am_cv_python_pyexecdir in
9130 $am_py_exec_prefix*)
9131 am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
9132 am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"`
9133 ;;
9134 *)
9135 case $am_py_exec_prefix in
9136 /usr|/System*) ;;
9137 *)
9138 am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages
9139 ;;
9140 esac
9141 ;;
9142 esac
9143
9144 fi
9145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pyexecdir" >&5
9146 $as_echo "$am_cv_python_pyexecdir" >&6; }
9147 pyexecdir=$am_cv_python_pyexecdir
9148
9149
9150
9151 pkgpyexecdir=\${pyexecdir}/$PACKAGE
9152
9153
9154
9155 fi
9156
9157
9158
9159 # Must be GCC.
9160 test "x$GCC" = xyes || as_fn_error $? "GCC is required" "$LINENO" 5
9161
9162 # Extract the first word of "$CXX", so it can be a program name with args.
9163 set dummy $CXX; ac_word=$2
9164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9165 $as_echo_n "checking for $ac_word... " >&6; }
9166 if ${ac_cv_prog_HAVE_CXX+:} false; then :
9167 $as_echo_n "(cached) " >&6
9168 else
9169 if test -n "$HAVE_CXX"; then
9170 ac_cv_prog_HAVE_CXX="$HAVE_CXX" # Let the user override the test.
9171 else
9172 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9173 for as_dir in $PATH
9174 do
9175 IFS=$as_save_IFS
9176 test -z "$as_dir" && as_dir=.
9177 for ac_exec_ext in '' $ac_executable_extensions; do
9178 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9179 ac_cv_prog_HAVE_CXX="yes"
9180 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9181 break 2
9182 fi
9183 done
9184 done
9185 IFS=$as_save_IFS
9186
9187 test -z "$ac_cv_prog_HAVE_CXX" && ac_cv_prog_HAVE_CXX="no"
9188 fi
9189 fi
9190 HAVE_CXX=$ac_cv_prog_HAVE_CXX
9191 if test -n "$HAVE_CXX"; then
9192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_CXX" >&5
9193 $as_echo "$HAVE_CXX" >&6; }
9194 else
9195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9196 $as_echo "no" >&6; }
9197 fi
9198
9199
9200
9201
9202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
9203 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
9204 if ${ac_cv_path_SED+:} false; then :
9205 $as_echo_n "(cached) " >&6
9206 else
9207 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
9208 for ac_i in 1 2 3 4 5 6 7; do
9209 ac_script="$ac_script$as_nl$ac_script"
9210 done
9211 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
9212 { ac_script=; unset ac_script;}
9213 if test -z "$SED"; then
9214 ac_path_SED_found=false
9215 # Loop through the user's path and test for each of PROGNAME-LIST
9216 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9217 for as_dir in $PATH
9218 do
9219 IFS=$as_save_IFS
9220 test -z "$as_dir" && as_dir=.
9221 for ac_prog in sed gsed; do
9222 for ac_exec_ext in '' $ac_executable_extensions; do
9223 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
9224 as_fn_executable_p "$ac_path_SED" || continue
9225 # Check for GNU ac_path_SED and select it if it is found.
9226 # Check for GNU $ac_path_SED
9227 case `"$ac_path_SED" --version 2>&1` in
9228 *GNU*)
9229 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
9230 *)
9231 ac_count=0
9232 $as_echo_n 0123456789 >"conftest.in"
9233 while :
9234 do
9235 cat "conftest.in" "conftest.in" >"conftest.tmp"
9236 mv "conftest.tmp" "conftest.in"
9237 cp "conftest.in" "conftest.nl"
9238 $as_echo '' >> "conftest.nl"
9239 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
9240 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
9241 as_fn_arith $ac_count + 1 && ac_count=$as_val
9242 if test $ac_count -gt ${ac_path_SED_max-0}; then
9243 # Best one so far, save it but keep looking for a better one
9244 ac_cv_path_SED="$ac_path_SED"
9245 ac_path_SED_max=$ac_count
9246 fi
9247 # 10*(2^10) chars as input seems more than enough
9248 test $ac_count -gt 10 && break
9249 done
9250 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
9251 esac
9252
9253 $ac_path_SED_found && break 3
9254 done
9255 done
9256 done
9257 IFS=$as_save_IFS
9258 if test -z "$ac_cv_path_SED"; then
9259 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
9260 fi
9261 else
9262 ac_cv_path_SED=$SED
9263 fi
9264
9265 fi
9266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
9267 $as_echo "$ac_cv_path_SED" >&6; }
9268 SED="$ac_cv_path_SED"
9269 rm -f conftest.sed
9270
9271
9272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
9273 $as_echo_n "checking whether NLS is requested... " >&6; }
9274 # Check whether --enable-nls was given.
9275 if test "${enable_nls+set}" = set; then :
9276 enableval=$enable_nls; USE_NLS=$enableval
9277 else
9278 USE_NLS=yes
9279 fi
9280
9281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
9282 $as_echo "$USE_NLS" >&6; }
9283
9284
9285
9286
9287 GETTEXT_MACRO_VERSION=0.18
9288
9289
9290
9291
9292 # Prepare PATH_SEPARATOR.
9293 # The user is always right.
9294 if test "${PATH_SEPARATOR+set}" != set; then
9295 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
9296 # contains only /bin. Note that ksh looks also at the FPATH variable,
9297 # so we have to set that as well for the test.
9298 PATH_SEPARATOR=:
9299 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
9300 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
9301 || PATH_SEPARATOR=';'
9302 }
9303 fi
9304
9305 # Find out how to test for executable files. Don't use a zero-byte file,
9306 # as systems may use methods other than mode bits to determine executability.
9307 cat >conf$$.file <<_ASEOF
9308 #! /bin/sh
9309 exit 0
9310 _ASEOF
9311 chmod +x conf$$.file
9312 if test -x conf$$.file >/dev/null 2>&1; then
9313 ac_executable_p="test -x"
9314 else
9315 ac_executable_p="test -f"
9316 fi
9317 rm -f conf$$.file
9318
9319 # Extract the first word of "msgfmt", so it can be a program name with args.
9320 set dummy msgfmt; ac_word=$2
9321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9322 $as_echo_n "checking for $ac_word... " >&6; }
9323 if ${ac_cv_path_MSGFMT+:} false; then :
9324 $as_echo_n "(cached) " >&6
9325 else
9326 case "$MSGFMT" in
9327 [\\/]* | ?:[\\/]*)
9328 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
9329 ;;
9330 *)
9331 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
9332 for ac_dir in $PATH; do
9333 IFS="$ac_save_IFS"
9334 test -z "$ac_dir" && ac_dir=.
9335 for ac_exec_ext in '' $ac_executable_extensions; do
9336 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
9337 echo "$as_me: trying $ac_dir/$ac_word..." >&5
9338 if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 &&
9339 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
9340 ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
9341 break 2
9342 fi
9343 fi
9344 done
9345 done
9346 IFS="$ac_save_IFS"
9347 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
9348 ;;
9349 esac
9350 fi
9351 MSGFMT="$ac_cv_path_MSGFMT"
9352 if test "$MSGFMT" != ":"; then
9353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
9354 $as_echo "$MSGFMT" >&6; }
9355 else
9356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9357 $as_echo "no" >&6; }
9358 fi
9359
9360 # Extract the first word of "gmsgfmt", so it can be a program name with args.
9361 set dummy gmsgfmt; ac_word=$2
9362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9363 $as_echo_n "checking for $ac_word... " >&6; }
9364 if ${ac_cv_path_GMSGFMT+:} false; then :
9365 $as_echo_n "(cached) " >&6
9366 else
9367 case $GMSGFMT in
9368 [\\/]* | ?:[\\/]*)
9369 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
9370 ;;
9371 *)
9372 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9373 for as_dir in $PATH
9374 do
9375 IFS=$as_save_IFS
9376 test -z "$as_dir" && as_dir=.
9377 for ac_exec_ext in '' $ac_executable_extensions; do
9378 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9379 ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
9380 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9381 break 2
9382 fi
9383 done
9384 done
9385 IFS=$as_save_IFS
9386
9387 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
9388 ;;
9389 esac
9390 fi
9391 GMSGFMT=$ac_cv_path_GMSGFMT
9392 if test -n "$GMSGFMT"; then
9393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
9394 $as_echo "$GMSGFMT" >&6; }
9395 else
9396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9397 $as_echo "no" >&6; }
9398 fi
9399
9400
9401
9402 case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
9403 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
9404 *) MSGFMT_015=$MSGFMT ;;
9405 esac
9406
9407 case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
9408 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
9409 *) GMSGFMT_015=$GMSGFMT ;;
9410 esac
9411
9412
9413
9414 # Prepare PATH_SEPARATOR.
9415 # The user is always right.
9416 if test "${PATH_SEPARATOR+set}" != set; then
9417 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
9418 # contains only /bin. Note that ksh looks also at the FPATH variable,
9419 # so we have to set that as well for the test.
9420 PATH_SEPARATOR=:
9421 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
9422 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
9423 || PATH_SEPARATOR=';'
9424 }
9425 fi
9426
9427 # Find out how to test for executable files. Don't use a zero-byte file,
9428 # as systems may use methods other than mode bits to determine executability.
9429 cat >conf$$.file <<_ASEOF
9430 #! /bin/sh
9431 exit 0
9432 _ASEOF
9433 chmod +x conf$$.file
9434 if test -x conf$$.file >/dev/null 2>&1; then
9435 ac_executable_p="test -x"
9436 else
9437 ac_executable_p="test -f"
9438 fi
9439 rm -f conf$$.file
9440
9441 # Extract the first word of "xgettext", so it can be a program name with args.
9442 set dummy xgettext; ac_word=$2
9443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9444 $as_echo_n "checking for $ac_word... " >&6; }
9445 if ${ac_cv_path_XGETTEXT+:} false; then :
9446 $as_echo_n "(cached) " >&6
9447 else
9448 case "$XGETTEXT" in
9449 [\\/]* | ?:[\\/]*)
9450 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
9451 ;;
9452 *)
9453 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
9454 for ac_dir in $PATH; do
9455 IFS="$ac_save_IFS"
9456 test -z "$ac_dir" && ac_dir=.
9457 for ac_exec_ext in '' $ac_executable_extensions; do
9458 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
9459 echo "$as_me: trying $ac_dir/$ac_word..." >&5
9460 if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 &&
9461 (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
9462 ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
9463 break 2
9464 fi
9465 fi
9466 done
9467 done
9468 IFS="$ac_save_IFS"
9469 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
9470 ;;
9471 esac
9472 fi
9473 XGETTEXT="$ac_cv_path_XGETTEXT"
9474 if test "$XGETTEXT" != ":"; then
9475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
9476 $as_echo "$XGETTEXT" >&6; }
9477 else
9478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9479 $as_echo "no" >&6; }
9480 fi
9481
9482 rm -f messages.po
9483
9484 case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
9485 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
9486 *) XGETTEXT_015=$XGETTEXT ;;
9487 esac
9488
9489
9490
9491 # Prepare PATH_SEPARATOR.
9492 # The user is always right.
9493 if test "${PATH_SEPARATOR+set}" != set; then
9494 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
9495 # contains only /bin. Note that ksh looks also at the FPATH variable,
9496 # so we have to set that as well for the test.
9497 PATH_SEPARATOR=:
9498 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
9499 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
9500 || PATH_SEPARATOR=';'
9501 }
9502 fi
9503
9504 # Find out how to test for executable files. Don't use a zero-byte file,
9505 # as systems may use methods other than mode bits to determine executability.
9506 cat >conf$$.file <<_ASEOF
9507 #! /bin/sh
9508 exit 0
9509 _ASEOF
9510 chmod +x conf$$.file
9511 if test -x conf$$.file >/dev/null 2>&1; then
9512 ac_executable_p="test -x"
9513 else
9514 ac_executable_p="test -f"
9515 fi
9516 rm -f conf$$.file
9517
9518 # Extract the first word of "msgmerge", so it can be a program name with args.
9519 set dummy msgmerge; ac_word=$2
9520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9521 $as_echo_n "checking for $ac_word... " >&6; }
9522 if ${ac_cv_path_MSGMERGE+:} false; then :
9523 $as_echo_n "(cached) " >&6
9524 else
9525 case "$MSGMERGE" in
9526 [\\/]* | ?:[\\/]*)
9527 ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
9528 ;;
9529 *)
9530 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
9531 for ac_dir in $PATH; do
9532 IFS="$ac_save_IFS"
9533 test -z "$ac_dir" && ac_dir=.
9534 for ac_exec_ext in '' $ac_executable_extensions; do
9535 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
9536 echo "$as_me: trying $ac_dir/$ac_word..." >&5
9537 if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then
9538 ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
9539 break 2
9540 fi
9541 fi
9542 done
9543 done
9544 IFS="$ac_save_IFS"
9545 test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
9546 ;;
9547 esac
9548 fi
9549 MSGMERGE="$ac_cv_path_MSGMERGE"
9550 if test "$MSGMERGE" != ":"; then
9551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
9552 $as_echo "$MSGMERGE" >&6; }
9553 else
9554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9555 $as_echo "no" >&6; }
9556 fi
9557
9558
9559 test -n "$localedir" || localedir='${datadir}/locale'
9560
9561
9562 test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
9563
9564
9565 ac_config_commands="$ac_config_commands po-directories"
9566
9567
9568
9569 if test "X$prefix" = "XNONE"; then
9570 acl_final_prefix="$ac_default_prefix"
9571 else
9572 acl_final_prefix="$prefix"
9573 fi
9574 if test "X$exec_prefix" = "XNONE"; then
9575 acl_final_exec_prefix='${prefix}'
9576 else
9577 acl_final_exec_prefix="$exec_prefix"
9578 fi
9579 acl_save_prefix="$prefix"
9580 prefix="$acl_final_prefix"
9581 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
9582 prefix="$acl_save_prefix"
9583
9584
9585
9586 # Check whether --with-gnu-ld was given.
9587 if test "${with_gnu_ld+set}" = set; then :
9588 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
9589 else
9590 with_gnu_ld=no
9591 fi
9592
9593 # Prepare PATH_SEPARATOR.
9594 # The user is always right.
9595 if test "${PATH_SEPARATOR+set}" != set; then
9596 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
9597 # contains only /bin. Note that ksh looks also at the FPATH variable,
9598 # so we have to set that as well for the test.
9599 PATH_SEPARATOR=:
9600 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
9601 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
9602 || PATH_SEPARATOR=';'
9603 }
9604 fi
9605
9606 if test -n "$LD"; then
9607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld" >&5
9608 $as_echo_n "checking for ld... " >&6; }
9609 elif test "$GCC" = yes; then
9610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
9611 $as_echo_n "checking for ld used by $CC... " >&6; }
9612 elif test "$with_gnu_ld" = yes; then
9613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
9614 $as_echo_n "checking for GNU ld... " >&6; }
9615 else
9616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
9617 $as_echo_n "checking for non-GNU ld... " >&6; }
9618 fi
9619 if test -n "$LD"; then
9620 # Let the user override the test with a path.
9621 :
9622 else
9623 if ${acl_cv_path_LD+:} false; then :
9624 $as_echo_n "(cached) " >&6
9625 else
9626
9627 acl_cv_path_LD= # Final result of this test
9628 ac_prog=ld # Program to search in $PATH
9629 if test "$GCC" = yes; then
9630 # Check if gcc -print-prog-name=ld gives a path.
9631 case $host in
9632 *-*-mingw*)
9633 # gcc leaves a trailing carriage return which upsets mingw
9634 acl_output=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
9635 *)
9636 acl_output=`($CC -print-prog-name=ld) 2>&5` ;;
9637 esac
9638 case $acl_output in
9639 # Accept absolute paths.
9640 [\\/]* | ?:[\\/]*)
9641 re_direlt='/[^/][^/]*/\.\./'
9642 # Canonicalize the pathname of ld
9643 acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'`
9644 while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do
9645 acl_output=`echo $acl_output | sed "s%$re_direlt%/%"`
9646 done
9647 # Got the pathname. No search in PATH is needed.
9648 acl_cv_path_LD="$acl_output"
9649 ac_prog=
9650 ;;
9651 "")
9652 # If it fails, then pretend we aren't using GCC.
9653 ;;
9654 *)
9655 # If it is relative, then search for the first ld in PATH.
9656 with_gnu_ld=unknown
9657 ;;
9658 esac
9659 fi
9660 if test -n "$ac_prog"; then
9661 # Search for $ac_prog in $PATH.
9662 acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
9663 for ac_dir in $PATH; do
9664 IFS="$acl_save_ifs"
9665 test -z "$ac_dir" && ac_dir=.
9666 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
9667 acl_cv_path_LD="$ac_dir/$ac_prog"
9668 # Check to see if the program is GNU ld. I'd rather use --version,
9669 # but apparently some variants of GNU ld only accept -v.
9670 # Break only if it was the GNU/non-GNU ld that we prefer.
9671 case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
9672 *GNU* | *'with BFD'*)
9673 test "$with_gnu_ld" != no && break
9674 ;;
9675 *)
9676 test "$with_gnu_ld" != yes && break
9677 ;;
9678 esac
9679 fi
9680 done
9681 IFS="$acl_save_ifs"
9682 fi
9683 case $host in
9684 *-*-aix*)
9685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9686 /* end confdefs.h. */
9687 #if defined __powerpc64__ || defined _ARCH_PPC64
9688 int ok;
9689 #else
9690 error fail
9691 #endif
9692
9693 _ACEOF
9694 if ac_fn_c_try_compile "$LINENO"; then :
9695 # The compiler produces 64-bit code. Add option '-b64' so that the
9696 # linker groks 64-bit object files.
9697 case "$acl_cv_path_LD " in
9698 *" -b64 "*) ;;
9699 *) acl_cv_path_LD="$acl_cv_path_LD -b64" ;;
9700 esac
9701
9702 fi
9703 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9704 ;;
9705 sparc64-*-netbsd*)
9706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9707 /* end confdefs.h. */
9708 #if defined __sparcv9 || defined __arch64__
9709 int ok;
9710 #else
9711 error fail
9712 #endif
9713
9714 _ACEOF
9715 if ac_fn_c_try_compile "$LINENO"; then :
9716
9717 else
9718 # The compiler produces 32-bit code. Add option '-m elf32_sparc'
9719 # so that the linker groks 32-bit object files.
9720 case "$acl_cv_path_LD " in
9721 *" -m elf32_sparc "*) ;;
9722 *) acl_cv_path_LD="$acl_cv_path_LD -m elf32_sparc" ;;
9723 esac
9724
9725 fi
9726 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9727 ;;
9728 esac
9729
9730 fi
9731
9732 LD="$acl_cv_path_LD"
9733 fi
9734 if test -n "$LD"; then
9735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
9736 $as_echo "$LD" >&6; }
9737 else
9738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9739 $as_echo "no" >&6; }
9740 as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
9741 fi
9742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
9743 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
9744 if ${acl_cv_prog_gnu_ld+:} false; then :
9745 $as_echo_n "(cached) " >&6
9746 else
9747 # I'd rather use --version here, but apparently some GNU lds only accept -v.
9748 case `$LD -v 2>&1 </dev/null` in
9749 *GNU* | *'with BFD'*)
9750 acl_cv_prog_gnu_ld=yes
9751 ;;
9752 *)
9753 acl_cv_prog_gnu_ld=no
9754 ;;
9755 esac
9756 fi
9757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
9758 $as_echo "$acl_cv_prog_gnu_ld" >&6; }
9759 with_gnu_ld=$acl_cv_prog_gnu_ld
9760
9761
9762
9763
9764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
9765 $as_echo_n "checking for shared library run path origin... " >&6; }
9766 if ${acl_cv_rpath+:} false; then :
9767 $as_echo_n "(cached) " >&6
9768 else
9769
9770 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
9771 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
9772 . ./conftest.sh
9773 rm -f ./conftest.sh
9774 acl_cv_rpath=done
9775
9776 fi
9777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
9778 $as_echo "$acl_cv_rpath" >&6; }
9779 wl="$acl_cv_wl"
9780 acl_libext="$acl_cv_libext"
9781 acl_shlibext="$acl_cv_shlibext"
9782 acl_libname_spec="$acl_cv_libname_spec"
9783 acl_library_names_spec="$acl_cv_library_names_spec"
9784 acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
9785 acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
9786 acl_hardcode_direct="$acl_cv_hardcode_direct"
9787 acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
9788 # Check whether --enable-rpath was given.
9789 if test "${enable_rpath+set}" = set; then :
9790 enableval=$enable_rpath; :
9791 else
9792 enable_rpath=yes
9793 fi
9794
9795
9796
9797
9798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking 32-bit host C ABI" >&5
9799 $as_echo_n "checking 32-bit host C ABI... " >&6; }
9800 if ${gl_cv_host_cpu_c_abi_32bit+:} false; then :
9801 $as_echo_n "(cached) " >&6
9802 else
9803 if test -n "$gl_cv_host_cpu_c_abi"; then
9804 case "$gl_cv_host_cpu_c_abi" in
9805 i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc)
9806 gl_cv_host_cpu_c_abi_32bit=yes ;;
9807 *)
9808 gl_cv_host_cpu_c_abi_32bit=no ;;
9809 esac
9810 else
9811 case "$host_cpu" in
9812
9813 i[4567]86 )
9814 gl_cv_host_cpu_c_abi_32bit=yes
9815 ;;
9816
9817 x86_64 )
9818 # On x86_64 systems, the C compiler may be generating code in one of
9819 # these ABIs:
9820 # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64.
9821 # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64
9822 # with native Windows (mingw, MSVC).
9823 # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32.
9824 # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386.
9825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9826 /* end confdefs.h. */
9827 #if (defined __x86_64__ || defined __amd64__ \
9828 || defined _M_X64 || defined _M_AMD64) \
9829 && !(defined __ILP32__ || defined _ILP32)
9830 int ok;
9831 #else
9832 error fail
9833 #endif
9834
9835 _ACEOF
9836 if ac_fn_c_try_compile "$LINENO"; then :
9837 gl_cv_host_cpu_c_abi_32bit=no
9838 else
9839 gl_cv_host_cpu_c_abi_32bit=yes
9840 fi
9841 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9842 ;;
9843
9844 arm* | aarch64 )
9845 # Assume arm with EABI.
9846 # On arm64 systems, the C compiler may be generating code in one of
9847 # these ABIs:
9848 # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64.
9849 # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32.
9850 # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf.
9851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9852 /* end confdefs.h. */
9853 #if defined __aarch64__ && !(defined __ILP32__ || defined _ILP32)
9854 int ok;
9855 #else
9856 error fail
9857 #endif
9858
9859 _ACEOF
9860 if ac_fn_c_try_compile "$LINENO"; then :
9861 gl_cv_host_cpu_c_abi_32bit=no
9862 else
9863 gl_cv_host_cpu_c_abi_32bit=yes
9864 fi
9865 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9866 ;;
9867
9868 hppa1.0 | hppa1.1 | hppa2.0* | hppa64 )
9869 # On hppa, the C compiler may be generating 32-bit code or 64-bit
9870 # code. In the latter case, it defines _LP64 and __LP64__.
9871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9872 /* end confdefs.h. */
9873 #ifdef __LP64__
9874 int ok;
9875 #else
9876 error fail
9877 #endif
9878
9879 _ACEOF
9880 if ac_fn_c_try_compile "$LINENO"; then :
9881 gl_cv_host_cpu_c_abi_32bit=no
9882 else
9883 gl_cv_host_cpu_c_abi_32bit=yes
9884 fi
9885 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9886 ;;
9887
9888 ia64* )
9889 # On ia64 on HP-UX, the C compiler may be generating 64-bit code or
9890 # 32-bit code. In the latter case, it defines _ILP32.
9891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9892 /* end confdefs.h. */
9893 #ifdef _ILP32
9894 int ok;
9895 #else
9896 error fail
9897 #endif
9898
9899 _ACEOF
9900 if ac_fn_c_try_compile "$LINENO"; then :
9901 gl_cv_host_cpu_c_abi_32bit=yes
9902 else
9903 gl_cv_host_cpu_c_abi_32bit=no
9904 fi
9905 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9906 ;;
9907
9908 mips* )
9909 # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this
9910 # at 32.
9911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9912 /* end confdefs.h. */
9913 #if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64)
9914 int ok;
9915 #else
9916 error fail
9917 #endif
9918
9919 _ACEOF
9920 if ac_fn_c_try_compile "$LINENO"; then :
9921 gl_cv_host_cpu_c_abi_32bit=no
9922 else
9923 gl_cv_host_cpu_c_abi_32bit=yes
9924 fi
9925 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9926 ;;
9927
9928 powerpc* )
9929 # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD.
9930 # No need to distinguish them here; the caller may distinguish
9931 # them based on the OS.
9932 # On powerpc64 systems, the C compiler may still be generating
9933 # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may
9934 # be generating 64-bit code.
9935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9936 /* end confdefs.h. */
9937 #if defined __powerpc64__ || defined _ARCH_PPC64
9938 int ok;
9939 #else
9940 error fail
9941 #endif
9942
9943 _ACEOF
9944 if ac_fn_c_try_compile "$LINENO"; then :
9945 gl_cv_host_cpu_c_abi_32bit=no
9946 else
9947 gl_cv_host_cpu_c_abi_32bit=yes
9948 fi
9949 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9950 ;;
9951
9952 rs6000 )
9953 gl_cv_host_cpu_c_abi_32bit=yes
9954 ;;
9955
9956 riscv32 | riscv64 )
9957 # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d.
9958 # Size of 'long' and 'void *':
9959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9960 /* end confdefs.h. */
9961 #if defined __LP64__
9962 int ok;
9963 #else
9964 error fail
9965 #endif
9966
9967 _ACEOF
9968 if ac_fn_c_try_compile "$LINENO"; then :
9969 gl_cv_host_cpu_c_abi_32bit=no
9970 else
9971 gl_cv_host_cpu_c_abi_32bit=yes
9972 fi
9973 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9974 ;;
9975
9976 s390* )
9977 # On s390x, the C compiler may be generating 64-bit (= s390x) code
9978 # or 31-bit (= s390) code.
9979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9980 /* end confdefs.h. */
9981 #if defined __LP64__ || defined __s390x__
9982 int ok;
9983 #else
9984 error fail
9985 #endif
9986
9987 _ACEOF
9988 if ac_fn_c_try_compile "$LINENO"; then :
9989 gl_cv_host_cpu_c_abi_32bit=no
9990 else
9991 gl_cv_host_cpu_c_abi_32bit=yes
9992 fi
9993 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9994 ;;
9995
9996 sparc | sparc64 )
9997 # UltraSPARCs running Linux have `uname -m` = "sparc64", but the
9998 # C compiler still generates 32-bit code.
9999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10000 /* end confdefs.h. */
10001 #if defined __sparcv9 || defined __arch64__
10002 int ok;
10003 #else
10004 error fail
10005 #endif
10006
10007 _ACEOF
10008 if ac_fn_c_try_compile "$LINENO"; then :
10009 gl_cv_host_cpu_c_abi_32bit=no
10010 else
10011 gl_cv_host_cpu_c_abi_32bit=yes
10012 fi
10013 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10014 ;;
10015
10016 *)
10017 gl_cv_host_cpu_c_abi_32bit=no
10018 ;;
10019 esac
10020 fi
10021
10022 fi
10023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_host_cpu_c_abi_32bit" >&5
10024 $as_echo "$gl_cv_host_cpu_c_abi_32bit" >&6; }
10025
10026 HOST_CPU_C_ABI_32BIT="$gl_cv_host_cpu_c_abi_32bit"
10027
10028
10029
10030
10031
10032 case "$host_os" in
10033 solaris*)
10034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
10035 $as_echo_n "checking for 64-bit host... " >&6; }
10036 if ${gl_cv_solaris_64bit+:} false; then :
10037 $as_echo_n "(cached) " >&6
10038 else
10039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10040 /* end confdefs.h. */
10041 #ifdef _LP64
10042 int ok;
10043 #else
10044 error fail
10045 #endif
10046
10047 _ACEOF
10048 if ac_fn_c_try_compile "$LINENO"; then :
10049 gl_cv_solaris_64bit=yes
10050 else
10051 gl_cv_solaris_64bit=no
10052 fi
10053 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10054
10055 fi
10056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5
10057 $as_echo "$gl_cv_solaris_64bit" >&6; };;
10058 esac
10059
10060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the common suffixes of directories in the library search path" >&5
10061 $as_echo_n "checking for the common suffixes of directories in the library search path... " >&6; }
10062 if ${acl_cv_libdirstems+:} false; then :
10063 $as_echo_n "(cached) " >&6
10064 else
10065 acl_libdirstem=lib
10066 acl_libdirstem2=
10067 case "$host_os" in
10068 solaris*)
10069 if test $gl_cv_solaris_64bit = yes; then
10070 acl_libdirstem=lib/64
10071 case "$host_cpu" in
10072 sparc*) acl_libdirstem2=lib/sparcv9 ;;
10073 i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
10074 esac
10075 fi
10076 ;;
10077 *)
10078 if test "$HOST_CPU_C_ABI_32BIT" != yes; then
10079 searchpath=`(if test -f /usr/bin/gcc \
10080 && LC_ALL=C /usr/bin/gcc -print-search-dirs >/dev/null 2>/dev/null; then \
10081 LC_ALL=C /usr/bin/gcc -print-search-dirs; \
10082 else \
10083 LC_ALL=C $CC -print-search-dirs; \
10084 fi) 2>/dev/null \
10085 | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
10086 if test -n "$searchpath"; then
10087 acl_save_IFS="${IFS= }"; IFS=":"
10088 for searchdir in $searchpath; do
10089 if test -d "$searchdir"; then
10090 case "$searchdir" in
10091 */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
10092 */../ | */.. )
10093 # Better ignore directories of this form. They are misleading.
10094 ;;
10095 *) searchdir=`cd "$searchdir" && pwd`
10096 case "$searchdir" in
10097 */lib64 ) acl_libdirstem=lib64 ;;
10098 esac ;;
10099 esac
10100 fi
10101 done
10102 IFS="$acl_save_IFS"
10103 fi
10104 fi
10105 ;;
10106 esac
10107 test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
10108 acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2"
10109
10110 fi
10111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_libdirstems" >&5
10112 $as_echo "$acl_cv_libdirstems" >&6; }
10113 # Decompose acl_cv_libdirstems into acl_libdirstem and acl_libdirstem2.
10114 acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'`
10115 acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e '/,/s/.*,//'`
10116
10117
10118
10119
10120
10121
10122
10123
10124
10125
10126
10127 use_additional=yes
10128
10129 acl_save_prefix="$prefix"
10130 prefix="$acl_final_prefix"
10131 acl_save_exec_prefix="$exec_prefix"
10132 exec_prefix="$acl_final_exec_prefix"
10133
10134 eval additional_includedir=\"$includedir\"
10135 eval additional_libdir=\"$libdir\"
10136
10137 exec_prefix="$acl_save_exec_prefix"
10138 prefix="$acl_save_prefix"
10139
10140
10141 # Check whether --with-libiconv-prefix was given.
10142 if test "${with_libiconv_prefix+set}" = set; then :
10143 withval=$with_libiconv_prefix;
10144 if test "X$withval" = "Xno"; then
10145 use_additional=no
10146 else
10147 if test "X$withval" = "X"; then
10148
10149 acl_save_prefix="$prefix"
10150 prefix="$acl_final_prefix"
10151 acl_save_exec_prefix="$exec_prefix"
10152 exec_prefix="$acl_final_exec_prefix"
10153
10154 eval additional_includedir=\"$includedir\"
10155 eval additional_libdir=\"$libdir\"
10156
10157 exec_prefix="$acl_save_exec_prefix"
10158 prefix="$acl_save_prefix"
10159
10160 else
10161 additional_includedir="$withval/include"
10162 additional_libdir="$withval/$acl_libdirstem"
10163 if test "$acl_libdirstem2" != "$acl_libdirstem" \
10164 && test ! -d "$withval/$acl_libdirstem"; then
10165 additional_libdir="$withval/$acl_libdirstem2"
10166 fi
10167 fi
10168 fi
10169
10170 fi
10171
10172 LIBICONV=
10173 LTLIBICONV=
10174 INCICONV=
10175 LIBICONV_PREFIX=
10176 HAVE_LIBICONV=
10177 rpathdirs=
10178 ltrpathdirs=
10179 names_already_handled=
10180 names_next_round='iconv '
10181 while test -n "$names_next_round"; do
10182 names_this_round="$names_next_round"
10183 names_next_round=
10184 for name in $names_this_round; do
10185 already_handled=
10186 for n in $names_already_handled; do
10187 if test "$n" = "$name"; then
10188 already_handled=yes
10189 break
10190 fi
10191 done
10192 if test -z "$already_handled"; then
10193 names_already_handled="$names_already_handled $name"
10194 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
10195 eval value=\"\$HAVE_LIB$uppername\"
10196 if test -n "$value"; then
10197 if test "$value" = yes; then
10198 eval value=\"\$LIB$uppername\"
10199 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
10200 eval value=\"\$LTLIB$uppername\"
10201 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
10202 else
10203 :
10204 fi
10205 else
10206 found_dir=
10207 found_la=
10208 found_so=
10209 found_a=
10210 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
10211 if test -n "$acl_shlibext"; then
10212 shrext=".$acl_shlibext" # typically: shrext=.so
10213 else
10214 shrext=
10215 fi
10216 if test $use_additional = yes; then
10217 dir="$additional_libdir"
10218 if test -n "$acl_shlibext"; then
10219 if test -f "$dir/$libname$shrext"; then
10220 found_dir="$dir"
10221 found_so="$dir/$libname$shrext"
10222 else
10223 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
10224 ver=`(cd "$dir" && \
10225 for f in "$libname$shrext".*; do echo "$f"; done \
10226 | sed -e "s,^$libname$shrext\\\\.,," \
10227 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
10228 | sed 1q ) 2>/dev/null`
10229 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
10230 found_dir="$dir"
10231 found_so="$dir/$libname$shrext.$ver"
10232 fi
10233 else
10234 eval library_names=\"$acl_library_names_spec\"
10235 for f in $library_names; do
10236 if test -f "$dir/$f"; then
10237 found_dir="$dir"
10238 found_so="$dir/$f"
10239 break
10240 fi
10241 done
10242 fi
10243 fi
10244 fi
10245 if test "X$found_dir" = "X"; then
10246 if test -f "$dir/$libname.$acl_libext"; then
10247 found_dir="$dir"
10248 found_a="$dir/$libname.$acl_libext"
10249 fi
10250 fi
10251 if test "X$found_dir" != "X"; then
10252 if test -f "$dir/$libname.la"; then
10253 found_la="$dir/$libname.la"
10254 fi
10255 fi
10256 fi
10257 if test "X$found_dir" = "X"; then
10258 for x in $LDFLAGS $LTLIBICONV; do
10259
10260 acl_save_prefix="$prefix"
10261 prefix="$acl_final_prefix"
10262 acl_save_exec_prefix="$exec_prefix"
10263 exec_prefix="$acl_final_exec_prefix"
10264 eval x=\"$x\"
10265 exec_prefix="$acl_save_exec_prefix"
10266 prefix="$acl_save_prefix"
10267
10268 case "$x" in
10269 -L*)
10270 dir=`echo "X$x" | sed -e 's/^X-L//'`
10271 if test -n "$acl_shlibext"; then
10272 if test -f "$dir/$libname$shrext"; then
10273 found_dir="$dir"
10274 found_so="$dir/$libname$shrext"
10275 else
10276 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
10277 ver=`(cd "$dir" && \
10278 for f in "$libname$shrext".*; do echo "$f"; done \
10279 | sed -e "s,^$libname$shrext\\\\.,," \
10280 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
10281 | sed 1q ) 2>/dev/null`
10282 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
10283 found_dir="$dir"
10284 found_so="$dir/$libname$shrext.$ver"
10285 fi
10286 else
10287 eval library_names=\"$acl_library_names_spec\"
10288 for f in $library_names; do
10289 if test -f "$dir/$f"; then
10290 found_dir="$dir"
10291 found_so="$dir/$f"
10292 break
10293 fi
10294 done
10295 fi
10296 fi
10297 fi
10298 if test "X$found_dir" = "X"; then
10299 if test -f "$dir/$libname.$acl_libext"; then
10300 found_dir="$dir"
10301 found_a="$dir/$libname.$acl_libext"
10302 fi
10303 fi
10304 if test "X$found_dir" != "X"; then
10305 if test -f "$dir/$libname.la"; then
10306 found_la="$dir/$libname.la"
10307 fi
10308 fi
10309 ;;
10310 esac
10311 if test "X$found_dir" != "X"; then
10312 break
10313 fi
10314 done
10315 fi
10316 if test "X$found_dir" != "X"; then
10317 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
10318 if test "X$found_so" != "X"; then
10319 if test "$enable_rpath" = no \
10320 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
10321 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
10322 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10323 else
10324 haveit=
10325 for x in $ltrpathdirs; do
10326 if test "X$x" = "X$found_dir"; then
10327 haveit=yes
10328 break
10329 fi
10330 done
10331 if test -z "$haveit"; then
10332 ltrpathdirs="$ltrpathdirs $found_dir"
10333 fi
10334 if test "$acl_hardcode_direct" = yes; then
10335 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10336 else
10337 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
10338 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10339 haveit=
10340 for x in $rpathdirs; do
10341 if test "X$x" = "X$found_dir"; then
10342 haveit=yes
10343 break
10344 fi
10345 done
10346 if test -z "$haveit"; then
10347 rpathdirs="$rpathdirs $found_dir"
10348 fi
10349 else
10350 haveit=
10351 for x in $LDFLAGS $LIBICONV; do
10352
10353 acl_save_prefix="$prefix"
10354 prefix="$acl_final_prefix"
10355 acl_save_exec_prefix="$exec_prefix"
10356 exec_prefix="$acl_final_exec_prefix"
10357 eval x=\"$x\"
10358 exec_prefix="$acl_save_exec_prefix"
10359 prefix="$acl_save_prefix"
10360
10361 if test "X$x" = "X-L$found_dir"; then
10362 haveit=yes
10363 break
10364 fi
10365 done
10366 if test -z "$haveit"; then
10367 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
10368 fi
10369 if test "$acl_hardcode_minus_L" != no; then
10370 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10371 else
10372 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
10373 fi
10374 fi
10375 fi
10376 fi
10377 else
10378 if test "X$found_a" != "X"; then
10379 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
10380 else
10381 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
10382 fi
10383 fi
10384 additional_includedir=
10385 case "$found_dir" in
10386 */$acl_libdirstem | */$acl_libdirstem/)
10387 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
10388 if test "$name" = 'iconv'; then
10389 LIBICONV_PREFIX="$basedir"
10390 fi
10391 additional_includedir="$basedir/include"
10392 ;;
10393 */$acl_libdirstem2 | */$acl_libdirstem2/)
10394 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
10395 if test "$name" = 'iconv'; then
10396 LIBICONV_PREFIX="$basedir"
10397 fi
10398 additional_includedir="$basedir/include"
10399 ;;
10400 esac
10401 if test "X$additional_includedir" != "X"; then
10402 if test "X$additional_includedir" != "X/usr/include"; then
10403 haveit=
10404 if test "X$additional_includedir" = "X/usr/local/include"; then
10405 if test -n "$GCC"; then
10406 case $host_os in
10407 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
10408 esac
10409 fi
10410 fi
10411 if test -z "$haveit"; then
10412 for x in $CPPFLAGS $INCICONV; do
10413
10414 acl_save_prefix="$prefix"
10415 prefix="$acl_final_prefix"
10416 acl_save_exec_prefix="$exec_prefix"
10417 exec_prefix="$acl_final_exec_prefix"
10418 eval x=\"$x\"
10419 exec_prefix="$acl_save_exec_prefix"
10420 prefix="$acl_save_prefix"
10421
10422 if test "X$x" = "X-I$additional_includedir"; then
10423 haveit=yes
10424 break
10425 fi
10426 done
10427 if test -z "$haveit"; then
10428 if test -d "$additional_includedir"; then
10429 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
10430 fi
10431 fi
10432 fi
10433 fi
10434 fi
10435 if test -n "$found_la"; then
10436 save_libdir="$libdir"
10437 case "$found_la" in
10438 */* | *\\*) . "$found_la" ;;
10439 *) . "./$found_la" ;;
10440 esac
10441 libdir="$save_libdir"
10442 for dep in $dependency_libs; do
10443 case "$dep" in
10444 -L*)
10445 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10446 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
10447 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
10448 haveit=
10449 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
10450 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
10451 if test -n "$GCC"; then
10452 case $host_os in
10453 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
10454 esac
10455 fi
10456 fi
10457 if test -z "$haveit"; then
10458 haveit=
10459 for x in $LDFLAGS $LIBICONV; do
10460
10461 acl_save_prefix="$prefix"
10462 prefix="$acl_final_prefix"
10463 acl_save_exec_prefix="$exec_prefix"
10464 exec_prefix="$acl_final_exec_prefix"
10465 eval x=\"$x\"
10466 exec_prefix="$acl_save_exec_prefix"
10467 prefix="$acl_save_prefix"
10468
10469 if test "X$x" = "X-L$additional_libdir"; then
10470 haveit=yes
10471 break
10472 fi
10473 done
10474 if test -z "$haveit"; then
10475 if test -d "$additional_libdir"; then
10476 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
10477 fi
10478 fi
10479 haveit=
10480 for x in $LDFLAGS $LTLIBICONV; do
10481
10482 acl_save_prefix="$prefix"
10483 prefix="$acl_final_prefix"
10484 acl_save_exec_prefix="$exec_prefix"
10485 exec_prefix="$acl_final_exec_prefix"
10486 eval x=\"$x\"
10487 exec_prefix="$acl_save_exec_prefix"
10488 prefix="$acl_save_prefix"
10489
10490 if test "X$x" = "X-L$additional_libdir"; then
10491 haveit=yes
10492 break
10493 fi
10494 done
10495 if test -z "$haveit"; then
10496 if test -d "$additional_libdir"; then
10497 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
10498 fi
10499 fi
10500 fi
10501 fi
10502 ;;
10503 -R*)
10504 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10505 if test "$enable_rpath" != no; then
10506 haveit=
10507 for x in $rpathdirs; do
10508 if test "X$x" = "X$dir"; then
10509 haveit=yes
10510 break
10511 fi
10512 done
10513 if test -z "$haveit"; then
10514 rpathdirs="$rpathdirs $dir"
10515 fi
10516 haveit=
10517 for x in $ltrpathdirs; do
10518 if test "X$x" = "X$dir"; then
10519 haveit=yes
10520 break
10521 fi
10522 done
10523 if test -z "$haveit"; then
10524 ltrpathdirs="$ltrpathdirs $dir"
10525 fi
10526 fi
10527 ;;
10528 -l*)
10529 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10530 ;;
10531 *.la)
10532 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10533 ;;
10534 *)
10535 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
10536 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
10537 ;;
10538 esac
10539 done
10540 fi
10541 else
10542 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
10543 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
10544 fi
10545 fi
10546 fi
10547 done
10548 done
10549 if test "X$rpathdirs" != "X"; then
10550 if test -n "$acl_hardcode_libdir_separator"; then
10551 alldirs=
10552 for found_dir in $rpathdirs; do
10553 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
10554 done
10555 acl_save_libdir="$libdir"
10556 libdir="$alldirs"
10557 eval flag=\"$acl_hardcode_libdir_flag_spec\"
10558 libdir="$acl_save_libdir"
10559 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
10560 else
10561 for found_dir in $rpathdirs; do
10562 acl_save_libdir="$libdir"
10563 libdir="$found_dir"
10564 eval flag=\"$acl_hardcode_libdir_flag_spec\"
10565 libdir="$acl_save_libdir"
10566 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
10567 done
10568 fi
10569 fi
10570 if test "X$ltrpathdirs" != "X"; then
10571 for found_dir in $ltrpathdirs; do
10572 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
10573 done
10574 fi
10575
10576
10577
10578
10579
10580
10581
10582
10583
10584
10585
10586
10587
10588
10589
10590
10591
10592
10593
10594
10595
10596
10597
10598
10599
10600
10601
10602
10603
10604
10605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
10606 $as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; }
10607 if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then :
10608 $as_echo_n "(cached) " >&6
10609 else
10610 gt_save_LIBS="$LIBS"
10611 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
10612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10613 /* end confdefs.h. */
10614 #include <CoreFoundation/CFPreferences.h>
10615 int
10616 main (void)
10617 {
10618 CFPreferencesCopyAppValue(NULL, NULL)
10619 ;
10620 return 0;
10621 }
10622 _ACEOF
10623 if ac_fn_c_try_link "$LINENO"; then :
10624 gt_cv_func_CFPreferencesCopyAppValue=yes
10625 else
10626 gt_cv_func_CFPreferencesCopyAppValue=no
10627 fi
10628 rm -f core conftest.err conftest.$ac_objext \
10629 conftest$ac_exeext conftest.$ac_ext
10630 LIBS="$gt_save_LIBS"
10631 fi
10632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
10633 $as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
10634 if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
10635
10636 $as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
10637
10638 fi
10639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5
10640 $as_echo_n "checking for CFLocaleCopyCurrent... " >&6; }
10641 if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then :
10642 $as_echo_n "(cached) " >&6
10643 else
10644 gt_save_LIBS="$LIBS"
10645 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
10646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10647 /* end confdefs.h. */
10648 #include <CoreFoundation/CFLocale.h>
10649 int
10650 main (void)
10651 {
10652 CFLocaleCopyCurrent();
10653 ;
10654 return 0;
10655 }
10656 _ACEOF
10657 if ac_fn_c_try_link "$LINENO"; then :
10658 gt_cv_func_CFLocaleCopyCurrent=yes
10659 else
10660 gt_cv_func_CFLocaleCopyCurrent=no
10661 fi
10662 rm -f core conftest.err conftest.$ac_objext \
10663 conftest$ac_exeext conftest.$ac_ext
10664 LIBS="$gt_save_LIBS"
10665 fi
10666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
10667 $as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; }
10668 if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
10669
10670 $as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h
10671
10672 fi
10673 INTL_MACOSX_LIBS=
10674 if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
10675 INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
10676 fi
10677
10678
10679
10680
10681
10682
10683 LIBINTL=
10684 LTLIBINTL=
10685 POSUB=
10686
10687 case " $gt_needs " in
10688 *" need-formatstring-macros "*) gt_api_version=3 ;;
10689 *" need-ngettext "*) gt_api_version=2 ;;
10690 *) gt_api_version=1 ;;
10691 esac
10692 gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
10693 gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
10694
10695 if test "$USE_NLS" = "yes"; then
10696 gt_use_preinstalled_gnugettext=no
10697
10698
10699 if test $gt_api_version -ge 3; then
10700 gt_revision_test_code='
10701 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
10702 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
10703 #endif
10704 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
10705 '
10706 else
10707 gt_revision_test_code=
10708 fi
10709 if test $gt_api_version -ge 2; then
10710 gt_expression_test_code=' + * ngettext ("", "", 0)'
10711 else
10712 gt_expression_test_code=
10713 fi
10714
10715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5
10716 $as_echo_n "checking for GNU gettext in libc... " >&6; }
10717 if eval \${$gt_func_gnugettext_libc+:} false; then :
10718 $as_echo_n "(cached) " >&6
10719 else
10720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10721 /* end confdefs.h. */
10722
10723 #include <libintl.h>
10724 $gt_revision_test_code
10725 extern int _nl_msg_cat_cntr;
10726 extern int *_nl_domain_bindings;
10727
10728 int
10729 main (void)
10730 {
10731
10732 bindtextdomain ("", "");
10733 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings
10734
10735 ;
10736 return 0;
10737 }
10738 _ACEOF
10739 if ac_fn_c_try_link "$LINENO"; then :
10740 eval "$gt_func_gnugettext_libc=yes"
10741 else
10742 eval "$gt_func_gnugettext_libc=no"
10743 fi
10744 rm -f core conftest.err conftest.$ac_objext \
10745 conftest$ac_exeext conftest.$ac_ext
10746 fi
10747 eval ac_res=\$$gt_func_gnugettext_libc
10748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10749 $as_echo "$ac_res" >&6; }
10750
10751 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
10752
10753
10754
10755
10756
10757 am_save_CPPFLAGS="$CPPFLAGS"
10758
10759 for element in $INCICONV; do
10760 haveit=
10761 for x in $CPPFLAGS; do
10762
10763 acl_save_prefix="$prefix"
10764 prefix="$acl_final_prefix"
10765 acl_save_exec_prefix="$exec_prefix"
10766 exec_prefix="$acl_final_exec_prefix"
10767 eval x=\"$x\"
10768 exec_prefix="$acl_save_exec_prefix"
10769 prefix="$acl_save_prefix"
10770
10771 if test "X$x" = "X$element"; then
10772 haveit=yes
10773 break
10774 fi
10775 done
10776 if test -z "$haveit"; then
10777 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10778 fi
10779 done
10780
10781
10782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
10783 $as_echo_n "checking for iconv... " >&6; }
10784 if ${am_cv_func_iconv+:} false; then :
10785 $as_echo_n "(cached) " >&6
10786 else
10787
10788 am_cv_func_iconv="no, consider installing GNU libiconv"
10789 am_cv_lib_iconv=no
10790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10791 /* end confdefs.h. */
10792
10793 #include <stdlib.h>
10794 #include <iconv.h>
10795
10796 int
10797 main (void)
10798 {
10799 iconv_t cd = iconv_open("","");
10800 iconv(cd,NULL,NULL,NULL,NULL);
10801 iconv_close(cd);
10802 ;
10803 return 0;
10804 }
10805 _ACEOF
10806 if ac_fn_c_try_link "$LINENO"; then :
10807 am_cv_func_iconv=yes
10808 fi
10809 rm -f core conftest.err conftest.$ac_objext \
10810 conftest$ac_exeext conftest.$ac_ext
10811 if test "$am_cv_func_iconv" != yes; then
10812 am_save_LIBS="$LIBS"
10813 LIBS="$LIBS $LIBICONV"
10814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10815 /* end confdefs.h. */
10816
10817 #include <stdlib.h>
10818 #include <iconv.h>
10819
10820 int
10821 main (void)
10822 {
10823 iconv_t cd = iconv_open("","");
10824 iconv(cd,NULL,NULL,NULL,NULL);
10825 iconv_close(cd);
10826 ;
10827 return 0;
10828 }
10829 _ACEOF
10830 if ac_fn_c_try_link "$LINENO"; then :
10831 am_cv_lib_iconv=yes
10832 am_cv_func_iconv=yes
10833 fi
10834 rm -f core conftest.err conftest.$ac_objext \
10835 conftest$ac_exeext conftest.$ac_ext
10836 LIBS="$am_save_LIBS"
10837 fi
10838
10839 fi
10840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
10841 $as_echo "$am_cv_func_iconv" >&6; }
10842 if test "$am_cv_func_iconv" = yes; then
10843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
10844 $as_echo_n "checking for working iconv... " >&6; }
10845 if ${am_cv_func_iconv_works+:} false; then :
10846 $as_echo_n "(cached) " >&6
10847 else
10848
10849 am_save_LIBS="$LIBS"
10850 if test $am_cv_lib_iconv = yes; then
10851 LIBS="$LIBS $LIBICONV"
10852 fi
10853 if test "$cross_compiling" = yes; then :
10854
10855 case "$host_os" in
10856 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
10857 *) am_cv_func_iconv_works="guessing yes" ;;
10858 esac
10859
10860 else
10861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10862 /* end confdefs.h. */
10863
10864 #include <iconv.h>
10865 #include <string.h>
10866 int main ()
10867 {
10868 int result = 0;
10869 /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
10870 returns. */
10871 {
10872 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
10873 if (cd_utf8_to_88591 != (iconv_t)(-1))
10874 {
10875 static const char input[] = "\342\202\254"; /* EURO SIGN */
10876 char buf[10];
10877 const char *inptr = input;
10878 size_t inbytesleft = strlen (input);
10879 char *outptr = buf;
10880 size_t outbytesleft = sizeof (buf);
10881 size_t res = iconv (cd_utf8_to_88591,
10882 (char **) &inptr, &inbytesleft,
10883 &outptr, &outbytesleft);
10884 if (res == 0)
10885 result |= 1;
10886 iconv_close (cd_utf8_to_88591);
10887 }
10888 }
10889 /* Test against Solaris 10 bug: Failures are not distinguishable from
10890 successful returns. */
10891 {
10892 iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
10893 if (cd_ascii_to_88591 != (iconv_t)(-1))
10894 {
10895 static const char input[] = "\263";
10896 char buf[10];
10897 const char *inptr = input;
10898 size_t inbytesleft = strlen (input);
10899 char *outptr = buf;
10900 size_t outbytesleft = sizeof (buf);
10901 size_t res = iconv (cd_ascii_to_88591,
10902 (char **) &inptr, &inbytesleft,
10903 &outptr, &outbytesleft);
10904 if (res == 0)
10905 result |= 2;
10906 iconv_close (cd_ascii_to_88591);
10907 }
10908 }
10909 /* Test against AIX 6.1..7.1 bug: Buffer overrun. */
10910 {
10911 iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
10912 if (cd_88591_to_utf8 != (iconv_t)(-1))
10913 {
10914 static const char input[] = "\304";
10915 static char buf[2] = { (char)0xDE, (char)0xAD };
10916 const char *inptr = input;
10917 size_t inbytesleft = 1;
10918 char *outptr = buf;
10919 size_t outbytesleft = 1;
10920 size_t res = iconv (cd_88591_to_utf8,
10921 (char **) &inptr, &inbytesleft,
10922 &outptr, &outbytesleft);
10923 if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
10924 result |= 4;
10925 iconv_close (cd_88591_to_utf8);
10926 }
10927 }
10928 #if 0 /* This bug could be worked around by the caller. */
10929 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
10930 {
10931 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
10932 if (cd_88591_to_utf8 != (iconv_t)(-1))
10933 {
10934 static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
10935 char buf[50];
10936 const char *inptr = input;
10937 size_t inbytesleft = strlen (input);
10938 char *outptr = buf;
10939 size_t outbytesleft = sizeof (buf);
10940 size_t res = iconv (cd_88591_to_utf8,
10941 (char **) &inptr, &inbytesleft,
10942 &outptr, &outbytesleft);
10943 if ((int)res > 0)
10944 result |= 8;
10945 iconv_close (cd_88591_to_utf8);
10946 }
10947 }
10948 #endif
10949 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
10950 provided. */
10951 if (/* Try standardized names. */
10952 iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
10953 /* Try IRIX, OSF/1 names. */
10954 && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
10955 /* Try AIX names. */
10956 && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
10957 /* Try HP-UX names. */
10958 && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
10959 result |= 16;
10960 return result;
10961 }
10962 _ACEOF
10963 if ac_fn_c_try_run "$LINENO"; then :
10964 am_cv_func_iconv_works=yes
10965 else
10966 am_cv_func_iconv_works=no
10967 fi
10968 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10969 conftest.$ac_objext conftest.beam conftest.$ac_ext
10970 fi
10971
10972 LIBS="$am_save_LIBS"
10973
10974 fi
10975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
10976 $as_echo "$am_cv_func_iconv_works" >&6; }
10977 case "$am_cv_func_iconv_works" in
10978 *no) am_func_iconv=no am_cv_lib_iconv=no ;;
10979 *) am_func_iconv=yes ;;
10980 esac
10981 else
10982 am_func_iconv=no am_cv_lib_iconv=no
10983 fi
10984 if test "$am_func_iconv" = yes; then
10985
10986 $as_echo "#define HAVE_ICONV 1" >>confdefs.h
10987
10988 fi
10989 if test "$am_cv_lib_iconv" = yes; then
10990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
10991 $as_echo_n "checking how to link with libiconv... " >&6; }
10992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
10993 $as_echo "$LIBICONV" >&6; }
10994 else
10995 CPPFLAGS="$am_save_CPPFLAGS"
10996 LIBICONV=
10997 LTLIBICONV=
10998 fi
10999
11000
11001
11002
11003
11004
11005
11006
11007
11008
11009 use_additional=yes
11010
11011 acl_save_prefix="$prefix"
11012 prefix="$acl_final_prefix"
11013 acl_save_exec_prefix="$exec_prefix"
11014 exec_prefix="$acl_final_exec_prefix"
11015
11016 eval additional_includedir=\"$includedir\"
11017 eval additional_libdir=\"$libdir\"
11018
11019 exec_prefix="$acl_save_exec_prefix"
11020 prefix="$acl_save_prefix"
11021
11022
11023 # Check whether --with-libintl-prefix was given.
11024 if test "${with_libintl_prefix+set}" = set; then :
11025 withval=$with_libintl_prefix;
11026 if test "X$withval" = "Xno"; then
11027 use_additional=no
11028 else
11029 if test "X$withval" = "X"; then
11030
11031 acl_save_prefix="$prefix"
11032 prefix="$acl_final_prefix"
11033 acl_save_exec_prefix="$exec_prefix"
11034 exec_prefix="$acl_final_exec_prefix"
11035
11036 eval additional_includedir=\"$includedir\"
11037 eval additional_libdir=\"$libdir\"
11038
11039 exec_prefix="$acl_save_exec_prefix"
11040 prefix="$acl_save_prefix"
11041
11042 else
11043 additional_includedir="$withval/include"
11044 additional_libdir="$withval/$acl_libdirstem"
11045 if test "$acl_libdirstem2" != "$acl_libdirstem" \
11046 && test ! -d "$withval/$acl_libdirstem"; then
11047 additional_libdir="$withval/$acl_libdirstem2"
11048 fi
11049 fi
11050 fi
11051
11052 fi
11053
11054 LIBINTL=
11055 LTLIBINTL=
11056 INCINTL=
11057 LIBINTL_PREFIX=
11058 HAVE_LIBINTL=
11059 rpathdirs=
11060 ltrpathdirs=
11061 names_already_handled=
11062 names_next_round='intl '
11063 while test -n "$names_next_round"; do
11064 names_this_round="$names_next_round"
11065 names_next_round=
11066 for name in $names_this_round; do
11067 already_handled=
11068 for n in $names_already_handled; do
11069 if test "$n" = "$name"; then
11070 already_handled=yes
11071 break
11072 fi
11073 done
11074 if test -z "$already_handled"; then
11075 names_already_handled="$names_already_handled $name"
11076 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
11077 eval value=\"\$HAVE_LIB$uppername\"
11078 if test -n "$value"; then
11079 if test "$value" = yes; then
11080 eval value=\"\$LIB$uppername\"
11081 test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
11082 eval value=\"\$LTLIB$uppername\"
11083 test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
11084 else
11085 :
11086 fi
11087 else
11088 found_dir=
11089 found_la=
11090 found_so=
11091 found_a=
11092 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
11093 if test -n "$acl_shlibext"; then
11094 shrext=".$acl_shlibext" # typically: shrext=.so
11095 else
11096 shrext=
11097 fi
11098 if test $use_additional = yes; then
11099 dir="$additional_libdir"
11100 if test -n "$acl_shlibext"; then
11101 if test -f "$dir/$libname$shrext"; then
11102 found_dir="$dir"
11103 found_so="$dir/$libname$shrext"
11104 else
11105 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
11106 ver=`(cd "$dir" && \
11107 for f in "$libname$shrext".*; do echo "$f"; done \
11108 | sed -e "s,^$libname$shrext\\\\.,," \
11109 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
11110 | sed 1q ) 2>/dev/null`
11111 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
11112 found_dir="$dir"
11113 found_so="$dir/$libname$shrext.$ver"
11114 fi
11115 else
11116 eval library_names=\"$acl_library_names_spec\"
11117 for f in $library_names; do
11118 if test -f "$dir/$f"; then
11119 found_dir="$dir"
11120 found_so="$dir/$f"
11121 break
11122 fi
11123 done
11124 fi
11125 fi
11126 fi
11127 if test "X$found_dir" = "X"; then
11128 if test -f "$dir/$libname.$acl_libext"; then
11129 found_dir="$dir"
11130 found_a="$dir/$libname.$acl_libext"
11131 fi
11132 fi
11133 if test "X$found_dir" != "X"; then
11134 if test -f "$dir/$libname.la"; then
11135 found_la="$dir/$libname.la"
11136 fi
11137 fi
11138 fi
11139 if test "X$found_dir" = "X"; then
11140 for x in $LDFLAGS $LTLIBINTL; do
11141
11142 acl_save_prefix="$prefix"
11143 prefix="$acl_final_prefix"
11144 acl_save_exec_prefix="$exec_prefix"
11145 exec_prefix="$acl_final_exec_prefix"
11146 eval x=\"$x\"
11147 exec_prefix="$acl_save_exec_prefix"
11148 prefix="$acl_save_prefix"
11149
11150 case "$x" in
11151 -L*)
11152 dir=`echo "X$x" | sed -e 's/^X-L//'`
11153 if test -n "$acl_shlibext"; then
11154 if test -f "$dir/$libname$shrext"; then
11155 found_dir="$dir"
11156 found_so="$dir/$libname$shrext"
11157 else
11158 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
11159 ver=`(cd "$dir" && \
11160 for f in "$libname$shrext".*; do echo "$f"; done \
11161 | sed -e "s,^$libname$shrext\\\\.,," \
11162 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
11163 | sed 1q ) 2>/dev/null`
11164 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
11165 found_dir="$dir"
11166 found_so="$dir/$libname$shrext.$ver"
11167 fi
11168 else
11169 eval library_names=\"$acl_library_names_spec\"
11170 for f in $library_names; do
11171 if test -f "$dir/$f"; then
11172 found_dir="$dir"
11173 found_so="$dir/$f"
11174 break
11175 fi
11176 done
11177 fi
11178 fi
11179 fi
11180 if test "X$found_dir" = "X"; then
11181 if test -f "$dir/$libname.$acl_libext"; then
11182 found_dir="$dir"
11183 found_a="$dir/$libname.$acl_libext"
11184 fi
11185 fi
11186 if test "X$found_dir" != "X"; then
11187 if test -f "$dir/$libname.la"; then
11188 found_la="$dir/$libname.la"
11189 fi
11190 fi
11191 ;;
11192 esac
11193 if test "X$found_dir" != "X"; then
11194 break
11195 fi
11196 done
11197 fi
11198 if test "X$found_dir" != "X"; then
11199 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
11200 if test "X$found_so" != "X"; then
11201 if test "$enable_rpath" = no \
11202 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
11203 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
11204 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
11205 else
11206 haveit=
11207 for x in $ltrpathdirs; do
11208 if test "X$x" = "X$found_dir"; then
11209 haveit=yes
11210 break
11211 fi
11212 done
11213 if test -z "$haveit"; then
11214 ltrpathdirs="$ltrpathdirs $found_dir"
11215 fi
11216 if test "$acl_hardcode_direct" = yes; then
11217 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
11218 else
11219 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
11220 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
11221 haveit=
11222 for x in $rpathdirs; do
11223 if test "X$x" = "X$found_dir"; then
11224 haveit=yes
11225 break
11226 fi
11227 done
11228 if test -z "$haveit"; then
11229 rpathdirs="$rpathdirs $found_dir"
11230 fi
11231 else
11232 haveit=
11233 for x in $LDFLAGS $LIBINTL; do
11234
11235 acl_save_prefix="$prefix"
11236 prefix="$acl_final_prefix"
11237 acl_save_exec_prefix="$exec_prefix"
11238 exec_prefix="$acl_final_exec_prefix"
11239 eval x=\"$x\"
11240 exec_prefix="$acl_save_exec_prefix"
11241 prefix="$acl_save_prefix"
11242
11243 if test "X$x" = "X-L$found_dir"; then
11244 haveit=yes
11245 break
11246 fi
11247 done
11248 if test -z "$haveit"; then
11249 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
11250 fi
11251 if test "$acl_hardcode_minus_L" != no; then
11252 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
11253 else
11254 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
11255 fi
11256 fi
11257 fi
11258 fi
11259 else
11260 if test "X$found_a" != "X"; then
11261 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
11262 else
11263 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
11264 fi
11265 fi
11266 additional_includedir=
11267 case "$found_dir" in
11268 */$acl_libdirstem | */$acl_libdirstem/)
11269 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
11270 if test "$name" = 'intl'; then
11271 LIBINTL_PREFIX="$basedir"
11272 fi
11273 additional_includedir="$basedir/include"
11274 ;;
11275 */$acl_libdirstem2 | */$acl_libdirstem2/)
11276 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
11277 if test "$name" = 'intl'; then
11278 LIBINTL_PREFIX="$basedir"
11279 fi
11280 additional_includedir="$basedir/include"
11281 ;;
11282 esac
11283 if test "X$additional_includedir" != "X"; then
11284 if test "X$additional_includedir" != "X/usr/include"; then
11285 haveit=
11286 if test "X$additional_includedir" = "X/usr/local/include"; then
11287 if test -n "$GCC"; then
11288 case $host_os in
11289 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
11290 esac
11291 fi
11292 fi
11293 if test -z "$haveit"; then
11294 for x in $CPPFLAGS $INCINTL; do
11295
11296 acl_save_prefix="$prefix"
11297 prefix="$acl_final_prefix"
11298 acl_save_exec_prefix="$exec_prefix"
11299 exec_prefix="$acl_final_exec_prefix"
11300 eval x=\"$x\"
11301 exec_prefix="$acl_save_exec_prefix"
11302 prefix="$acl_save_prefix"
11303
11304 if test "X$x" = "X-I$additional_includedir"; then
11305 haveit=yes
11306 break
11307 fi
11308 done
11309 if test -z "$haveit"; then
11310 if test -d "$additional_includedir"; then
11311 INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
11312 fi
11313 fi
11314 fi
11315 fi
11316 fi
11317 if test -n "$found_la"; then
11318 save_libdir="$libdir"
11319 case "$found_la" in
11320 */* | *\\*) . "$found_la" ;;
11321 *) . "./$found_la" ;;
11322 esac
11323 libdir="$save_libdir"
11324 for dep in $dependency_libs; do
11325 case "$dep" in
11326 -L*)
11327 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
11328 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
11329 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
11330 haveit=
11331 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
11332 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
11333 if test -n "$GCC"; then
11334 case $host_os in
11335 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
11336 esac
11337 fi
11338 fi
11339 if test -z "$haveit"; then
11340 haveit=
11341 for x in $LDFLAGS $LIBINTL; do
11342
11343 acl_save_prefix="$prefix"
11344 prefix="$acl_final_prefix"
11345 acl_save_exec_prefix="$exec_prefix"
11346 exec_prefix="$acl_final_exec_prefix"
11347 eval x=\"$x\"
11348 exec_prefix="$acl_save_exec_prefix"
11349 prefix="$acl_save_prefix"
11350
11351 if test "X$x" = "X-L$additional_libdir"; then
11352 haveit=yes
11353 break
11354 fi
11355 done
11356 if test -z "$haveit"; then
11357 if test -d "$additional_libdir"; then
11358 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir"
11359 fi
11360 fi
11361 haveit=
11362 for x in $LDFLAGS $LTLIBINTL; do
11363
11364 acl_save_prefix="$prefix"
11365 prefix="$acl_final_prefix"
11366 acl_save_exec_prefix="$exec_prefix"
11367 exec_prefix="$acl_final_exec_prefix"
11368 eval x=\"$x\"
11369 exec_prefix="$acl_save_exec_prefix"
11370 prefix="$acl_save_prefix"
11371
11372 if test "X$x" = "X-L$additional_libdir"; then
11373 haveit=yes
11374 break
11375 fi
11376 done
11377 if test -z "$haveit"; then
11378 if test -d "$additional_libdir"; then
11379 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir"
11380 fi
11381 fi
11382 fi
11383 fi
11384 ;;
11385 -R*)
11386 dir=`echo "X$dep" | sed -e 's/^X-R//'`
11387 if test "$enable_rpath" != no; then
11388 haveit=
11389 for x in $rpathdirs; do
11390 if test "X$x" = "X$dir"; then
11391 haveit=yes
11392 break
11393 fi
11394 done
11395 if test -z "$haveit"; then
11396 rpathdirs="$rpathdirs $dir"
11397 fi
11398 haveit=
11399 for x in $ltrpathdirs; do
11400 if test "X$x" = "X$dir"; then
11401 haveit=yes
11402 break
11403 fi
11404 done
11405 if test -z "$haveit"; then
11406 ltrpathdirs="$ltrpathdirs $dir"
11407 fi
11408 fi
11409 ;;
11410 -l*)
11411 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
11412 ;;
11413 *.la)
11414 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
11415 ;;
11416 *)
11417 LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
11418 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
11419 ;;
11420 esac
11421 done
11422 fi
11423 else
11424 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
11425 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
11426 fi
11427 fi
11428 fi
11429 done
11430 done
11431 if test "X$rpathdirs" != "X"; then
11432 if test -n "$acl_hardcode_libdir_separator"; then
11433 alldirs=
11434 for found_dir in $rpathdirs; do
11435 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
11436 done
11437 acl_save_libdir="$libdir"
11438 libdir="$alldirs"
11439 eval flag=\"$acl_hardcode_libdir_flag_spec\"
11440 libdir="$acl_save_libdir"
11441 LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
11442 else
11443 for found_dir in $rpathdirs; do
11444 acl_save_libdir="$libdir"
11445 libdir="$found_dir"
11446 eval flag=\"$acl_hardcode_libdir_flag_spec\"
11447 libdir="$acl_save_libdir"
11448 LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
11449 done
11450 fi
11451 fi
11452 if test "X$ltrpathdirs" != "X"; then
11453 for found_dir in $ltrpathdirs; do
11454 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
11455 done
11456 fi
11457
11458
11459
11460
11461
11462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5
11463 $as_echo_n "checking for GNU gettext in libintl... " >&6; }
11464 if eval \${$gt_func_gnugettext_libintl+:} false; then :
11465 $as_echo_n "(cached) " >&6
11466 else
11467 gt_save_CPPFLAGS="$CPPFLAGS"
11468 CPPFLAGS="$CPPFLAGS $INCINTL"
11469 gt_save_LIBS="$LIBS"
11470 LIBS="$LIBS $LIBINTL"
11471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11472 /* end confdefs.h. */
11473
11474 #include <libintl.h>
11475 $gt_revision_test_code
11476 extern int _nl_msg_cat_cntr;
11477 extern
11478 #ifdef __cplusplus
11479 "C"
11480 #endif
11481 const char *_nl_expand_alias (const char *);
11482
11483 int
11484 main (void)
11485 {
11486
11487 bindtextdomain ("", "");
11488 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
11489
11490 ;
11491 return 0;
11492 }
11493 _ACEOF
11494 if ac_fn_c_try_link "$LINENO"; then :
11495 eval "$gt_func_gnugettext_libintl=yes"
11496 else
11497 eval "$gt_func_gnugettext_libintl=no"
11498 fi
11499 rm -f core conftest.err conftest.$ac_objext \
11500 conftest$ac_exeext conftest.$ac_ext
11501 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
11502 LIBS="$LIBS $LIBICONV"
11503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11504 /* end confdefs.h. */
11505
11506 #include <libintl.h>
11507 $gt_revision_test_code
11508 extern int _nl_msg_cat_cntr;
11509 extern
11510 #ifdef __cplusplus
11511 "C"
11512 #endif
11513 const char *_nl_expand_alias (const char *);
11514
11515 int
11516 main (void)
11517 {
11518
11519 bindtextdomain ("", "");
11520 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
11521
11522 ;
11523 return 0;
11524 }
11525 _ACEOF
11526 if ac_fn_c_try_link "$LINENO"; then :
11527 LIBINTL="$LIBINTL $LIBICONV"
11528 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
11529 eval "$gt_func_gnugettext_libintl=yes"
11530
11531 fi
11532 rm -f core conftest.err conftest.$ac_objext \
11533 conftest$ac_exeext conftest.$ac_ext
11534 fi
11535 CPPFLAGS="$gt_save_CPPFLAGS"
11536 LIBS="$gt_save_LIBS"
11537 fi
11538 eval ac_res=\$$gt_func_gnugettext_libintl
11539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11540 $as_echo "$ac_res" >&6; }
11541 fi
11542
11543 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
11544 || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
11545 && test "$PACKAGE" != gettext-runtime \
11546 && test "$PACKAGE" != gettext-tools; }; then
11547 gt_use_preinstalled_gnugettext=yes
11548 else
11549 LIBINTL=
11550 LTLIBINTL=
11551 INCINTL=
11552 fi
11553
11554
11555
11556 if test -n "$INTL_MACOSX_LIBS"; then
11557 if test "$gt_use_preinstalled_gnugettext" = "yes" \
11558 || test "$nls_cv_use_gnu_gettext" = "yes"; then
11559 LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
11560 LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
11561 fi
11562 fi
11563
11564 if test "$gt_use_preinstalled_gnugettext" = "yes" \
11565 || test "$nls_cv_use_gnu_gettext" = "yes"; then
11566
11567 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
11568
11569 else
11570 USE_NLS=no
11571 fi
11572 fi
11573
11574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5
11575 $as_echo_n "checking whether to use NLS... " >&6; }
11576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
11577 $as_echo "$USE_NLS" >&6; }
11578 if test "$USE_NLS" = "yes"; then
11579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5
11580 $as_echo_n "checking where the gettext function comes from... " >&6; }
11581 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
11582 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
11583 gt_source="external libintl"
11584 else
11585 gt_source="libc"
11586 fi
11587 else
11588 gt_source="included intl directory"
11589 fi
11590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5
11591 $as_echo "$gt_source" >&6; }
11592 fi
11593
11594 if test "$USE_NLS" = "yes"; then
11595
11596 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
11597 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
11598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5
11599 $as_echo_n "checking how to link with libintl... " >&6; }
11600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5
11601 $as_echo "$LIBINTL" >&6; }
11602
11603 for element in $INCINTL; do
11604 haveit=
11605 for x in $CPPFLAGS; do
11606
11607 acl_save_prefix="$prefix"
11608 prefix="$acl_final_prefix"
11609 acl_save_exec_prefix="$exec_prefix"
11610 exec_prefix="$acl_final_exec_prefix"
11611 eval x=\"$x\"
11612 exec_prefix="$acl_save_exec_prefix"
11613 prefix="$acl_save_prefix"
11614
11615 if test "X$x" = "X$element"; then
11616 haveit=yes
11617 break
11618 fi
11619 done
11620 if test -z "$haveit"; then
11621 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
11622 fi
11623 done
11624
11625 fi
11626
11627
11628 $as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
11629
11630
11631 $as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h
11632
11633 fi
11634
11635 POSUB=po
11636 fi
11637
11638
11639
11640 INTLLIBS="$LIBINTL"
11641
11642
11643
11644
11645
11646
11647
11648 # Check whether --enable-largefile was given.
11649 if test "${enable_largefile+set}" = set; then :
11650 enableval=$enable_largefile;
11651 fi
11652
11653 if test "$enable_largefile" != no; then
11654
11655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
11656 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
11657 if ${ac_cv_sys_largefile_CC+:} false; then :
11658 $as_echo_n "(cached) " >&6
11659 else
11660 ac_cv_sys_largefile_CC=no
11661 if test "$GCC" != yes; then
11662 ac_save_CC=$CC
11663 while :; do
11664 # IRIX 6.2 and later do not support large files by default,
11665 # so use the C compiler's -n32 option if that helps.
11666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11667 /* end confdefs.h. */
11668 #include <sys/types.h>
11669 /* Check that off_t can represent 2**63 - 1 correctly.
11670 We can't simply define LARGE_OFF_T to be 9223372036854775807,
11671 since some C++ compilers masquerading as C compilers
11672 incorrectly reject 9223372036854775807. */
11673 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11674 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11675 && LARGE_OFF_T % 2147483647 == 1)
11676 ? 1 : -1];
11677 int
11678 main (void)
11679 {
11680
11681 ;
11682 return 0;
11683 }
11684 _ACEOF
11685 if ac_fn_c_try_compile "$LINENO"; then :
11686 break
11687 fi
11688 rm -f core conftest.err conftest.$ac_objext
11689 CC="$CC -n32"
11690 if ac_fn_c_try_compile "$LINENO"; then :
11691 ac_cv_sys_largefile_CC=' -n32'; break
11692 fi
11693 rm -f core conftest.err conftest.$ac_objext
11694 break
11695 done
11696 CC=$ac_save_CC
11697 rm -f conftest.$ac_ext
11698 fi
11699 fi
11700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
11701 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
11702 if test "$ac_cv_sys_largefile_CC" != no; then
11703 CC=$CC$ac_cv_sys_largefile_CC
11704 fi
11705
11706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
11707 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
11708 if ${ac_cv_sys_file_offset_bits+:} false; then :
11709 $as_echo_n "(cached) " >&6
11710 else
11711 while :; do
11712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11713 /* end confdefs.h. */
11714 #include <sys/types.h>
11715 /* Check that off_t can represent 2**63 - 1 correctly.
11716 We can't simply define LARGE_OFF_T to be 9223372036854775807,
11717 since some C++ compilers masquerading as C compilers
11718 incorrectly reject 9223372036854775807. */
11719 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11720 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11721 && LARGE_OFF_T % 2147483647 == 1)
11722 ? 1 : -1];
11723 int
11724 main (void)
11725 {
11726
11727 ;
11728 return 0;
11729 }
11730 _ACEOF
11731 if ac_fn_c_try_compile "$LINENO"; then :
11732 ac_cv_sys_file_offset_bits=no; break
11733 fi
11734 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11736 /* end confdefs.h. */
11737 #define _FILE_OFFSET_BITS 64
11738 #include <sys/types.h>
11739 /* Check that off_t can represent 2**63 - 1 correctly.
11740 We can't simply define LARGE_OFF_T to be 9223372036854775807,
11741 since some C++ compilers masquerading as C compilers
11742 incorrectly reject 9223372036854775807. */
11743 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11744 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11745 && LARGE_OFF_T % 2147483647 == 1)
11746 ? 1 : -1];
11747 int
11748 main (void)
11749 {
11750
11751 ;
11752 return 0;
11753 }
11754 _ACEOF
11755 if ac_fn_c_try_compile "$LINENO"; then :
11756 ac_cv_sys_file_offset_bits=64; break
11757 fi
11758 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11759 ac_cv_sys_file_offset_bits=unknown
11760 break
11761 done
11762 fi
11763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
11764 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
11765 case $ac_cv_sys_file_offset_bits in #(
11766 no | unknown) ;;
11767 *)
11768 cat >>confdefs.h <<_ACEOF
11769 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
11770 _ACEOF
11771 ;;
11772 esac
11773 rm -rf conftest*
11774 if test $ac_cv_sys_file_offset_bits = unknown; then
11775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
11776 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
11777 if ${ac_cv_sys_large_files+:} false; then :
11778 $as_echo_n "(cached) " >&6
11779 else
11780 while :; do
11781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11782 /* end confdefs.h. */
11783 #include <sys/types.h>
11784 /* Check that off_t can represent 2**63 - 1 correctly.
11785 We can't simply define LARGE_OFF_T to be 9223372036854775807,
11786 since some C++ compilers masquerading as C compilers
11787 incorrectly reject 9223372036854775807. */
11788 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11789 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11790 && LARGE_OFF_T % 2147483647 == 1)
11791 ? 1 : -1];
11792 int
11793 main (void)
11794 {
11795
11796 ;
11797 return 0;
11798 }
11799 _ACEOF
11800 if ac_fn_c_try_compile "$LINENO"; then :
11801 ac_cv_sys_large_files=no; break
11802 fi
11803 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11805 /* end confdefs.h. */
11806 #define _LARGE_FILES 1
11807 #include <sys/types.h>
11808 /* Check that off_t can represent 2**63 - 1 correctly.
11809 We can't simply define LARGE_OFF_T to be 9223372036854775807,
11810 since some C++ compilers masquerading as C compilers
11811 incorrectly reject 9223372036854775807. */
11812 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11813 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11814 && LARGE_OFF_T % 2147483647 == 1)
11815 ? 1 : -1];
11816 int
11817 main (void)
11818 {
11819
11820 ;
11821 return 0;
11822 }
11823 _ACEOF
11824 if ac_fn_c_try_compile "$LINENO"; then :
11825 ac_cv_sys_large_files=1; break
11826 fi
11827 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11828 ac_cv_sys_large_files=unknown
11829 break
11830 done
11831 fi
11832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
11833 $as_echo "$ac_cv_sys_large_files" >&6; }
11834 case $ac_cv_sys_large_files in #(
11835 no | unknown) ;;
11836 *)
11837 cat >>confdefs.h <<_ACEOF
11838 #define _LARGE_FILES $ac_cv_sys_large_files
11839 _ACEOF
11840 ;;
11841 esac
11842 rm -rf conftest*
11843 fi
11844
11845
11846 $as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
11847
11848 fi
11849
11850
11851 # Identify characteristics of the host architecture.
11852 unset ac_cv_c_bigendian
11853
11854 if test x"$target_cpu-$platform" = xsparc64-emu ; then
11855 CFLAGS="$CFLAGS -m64"
11856 HOST_CFLAGS="$HOST_CFLAGS -m64"
11857 fi
11858
11859 CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=64"
11860 HOST_CPPFLAGS="$HOST_CPPFLAGS -D_FILE_OFFSET_BITS=64"
11861
11862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
11863 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
11864 if ${ac_cv_c_bigendian+:} false; then :
11865 $as_echo_n "(cached) " >&6
11866 else
11867 ac_cv_c_bigendian=unknown
11868 # See if we're dealing with a universal compiler.
11869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11870 /* end confdefs.h. */
11871 #ifndef __APPLE_CC__
11872 not a universal capable compiler
11873 #endif
11874 typedef int dummy;
11875
11876 _ACEOF
11877 if ac_fn_c_try_compile "$LINENO"; then :
11878
11879 # Check for potential -arch flags. It is not universal unless
11880 # there are at least two -arch flags with different values.
11881 ac_arch=
11882 ac_prev=
11883 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
11884 if test -n "$ac_prev"; then
11885 case $ac_word in
11886 i?86 | x86_64 | ppc | ppc64)
11887 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
11888 ac_arch=$ac_word
11889 else
11890 ac_cv_c_bigendian=universal
11891 break
11892 fi
11893 ;;
11894 esac
11895 ac_prev=
11896 elif test "x$ac_word" = "x-arch"; then
11897 ac_prev=arch
11898 fi
11899 done
11900 fi
11901 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11902 if test $ac_cv_c_bigendian = unknown; then
11903 # See if sys/param.h defines the BYTE_ORDER macro.
11904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11905 /* end confdefs.h. */
11906 #include <sys/types.h>
11907 #include <sys/param.h>
11908
11909 int
11910 main (void)
11911 {
11912 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
11913 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
11914 && LITTLE_ENDIAN)
11915 bogus endian macros
11916 #endif
11917
11918 ;
11919 return 0;
11920 }
11921 _ACEOF
11922 if ac_fn_c_try_compile "$LINENO"; then :
11923 # It does; now see whether it defined to BIG_ENDIAN or not.
11924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11925 /* end confdefs.h. */
11926 #include <sys/types.h>
11927 #include <sys/param.h>
11928
11929 int
11930 main (void)
11931 {
11932 #if BYTE_ORDER != BIG_ENDIAN
11933 not big endian
11934 #endif
11935
11936 ;
11937 return 0;
11938 }
11939 _ACEOF
11940 if ac_fn_c_try_compile "$LINENO"; then :
11941 ac_cv_c_bigendian=yes
11942 else
11943 ac_cv_c_bigendian=no
11944 fi
11945 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11946 fi
11947 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11948 fi
11949 if test $ac_cv_c_bigendian = unknown; then
11950 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
11951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11952 /* end confdefs.h. */
11953 #include <limits.h>
11954
11955 int
11956 main (void)
11957 {
11958 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
11959 bogus endian macros
11960 #endif
11961
11962 ;
11963 return 0;
11964 }
11965 _ACEOF
11966 if ac_fn_c_try_compile "$LINENO"; then :
11967 # It does; now see whether it defined to _BIG_ENDIAN or not.
11968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11969 /* end confdefs.h. */
11970 #include <limits.h>
11971
11972 int
11973 main (void)
11974 {
11975 #ifndef _BIG_ENDIAN
11976 not big endian
11977 #endif
11978
11979 ;
11980 return 0;
11981 }
11982 _ACEOF
11983 if ac_fn_c_try_compile "$LINENO"; then :
11984 ac_cv_c_bigendian=yes
11985 else
11986 ac_cv_c_bigendian=no
11987 fi
11988 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11989 fi
11990 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11991 fi
11992 if test $ac_cv_c_bigendian = unknown; then
11993 # Compile a test program.
11994 if test "$cross_compiling" = yes; then :
11995 # Try to guess by grepping values from an object file.
11996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11997 /* end confdefs.h. */
11998 short int ascii_mm[] =
11999 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12000 short int ascii_ii[] =
12001 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12002 int use_ascii (int i) {
12003 return ascii_mm[i] + ascii_ii[i];
12004 }
12005 short int ebcdic_ii[] =
12006 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12007 short int ebcdic_mm[] =
12008 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12009 int use_ebcdic (int i) {
12010 return ebcdic_mm[i] + ebcdic_ii[i];
12011 }
12012 extern int foo;
12013
12014 int
12015 main (void)
12016 {
12017 return use_ascii (foo) == use_ebcdic (foo);
12018 ;
12019 return 0;
12020 }
12021 _ACEOF
12022 if ac_fn_c_try_compile "$LINENO"; then :
12023 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12024 ac_cv_c_bigendian=yes
12025 fi
12026 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12027 if test "$ac_cv_c_bigendian" = unknown; then
12028 ac_cv_c_bigendian=no
12029 else
12030 # finding both strings is unlikely to happen, but who knows?
12031 ac_cv_c_bigendian=unknown
12032 fi
12033 fi
12034 fi
12035 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12036 else
12037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12038 /* end confdefs.h. */
12039 $ac_includes_default
12040 int
12041 main (void)
12042 {
12043
12044 /* Are we little or big endian? From Harbison&Steele. */
12045 union
12046 {
12047 long int l;
12048 char c[sizeof (long int)];
12049 } u;
12050 u.l = 1;
12051 return u.c[sizeof (long int) - 1] == 1;
12052
12053 ;
12054 return 0;
12055 }
12056 _ACEOF
12057 if ac_fn_c_try_run "$LINENO"; then :
12058 ac_cv_c_bigendian=no
12059 else
12060 ac_cv_c_bigendian=yes
12061 fi
12062 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12063 conftest.$ac_objext conftest.beam conftest.$ac_ext
12064 fi
12065
12066 fi
12067 fi
12068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12069 $as_echo "$ac_cv_c_bigendian" >&6; }
12070 case $ac_cv_c_bigendian in #(
12071 yes)
12072 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12073 ;; #(
12074 no)
12075 ;; #(
12076 universal)
12077
12078 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12079
12080 ;; #(
12081 *)
12082 as_fn_error $? "unknown endianness
12083 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12084 esac
12085
12086 # The cast to long int works around a bug in the HP C Compiler
12087 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12088 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12089 # This bug is HP SR number 8606223364.
12090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
12091 $as_echo_n "checking size of void *... " >&6; }
12092 if ${ac_cv_sizeof_void_p+:} false; then :
12093 $as_echo_n "(cached) " >&6
12094 else
12095 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
12096
12097 else
12098 if test "$ac_cv_type_void_p" = yes; then
12099 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12100 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12101 as_fn_error 77 "cannot compute sizeof (void *)
12102 See \`config.log' for more details" "$LINENO" 5; }
12103 else
12104 ac_cv_sizeof_void_p=0
12105 fi
12106 fi
12107
12108 fi
12109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
12110 $as_echo "$ac_cv_sizeof_void_p" >&6; }
12111
12112
12113
12114 cat >>confdefs.h <<_ACEOF
12115 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
12116 _ACEOF
12117
12118
12119 # The cast to long int works around a bug in the HP C Compiler
12120 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12121 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12122 # This bug is HP SR number 8606223364.
12123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
12124 $as_echo_n "checking size of long... " >&6; }
12125 if ${ac_cv_sizeof_long+:} false; then :
12126 $as_echo_n "(cached) " >&6
12127 else
12128 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
12129
12130 else
12131 if test "$ac_cv_type_long" = yes; then
12132 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12133 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12134 as_fn_error 77 "cannot compute sizeof (long)
12135 See \`config.log' for more details" "$LINENO" 5; }
12136 else
12137 ac_cv_sizeof_long=0
12138 fi
12139 fi
12140
12141 fi
12142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
12143 $as_echo "$ac_cv_sizeof_long" >&6; }
12144
12145
12146
12147 cat >>confdefs.h <<_ACEOF
12148 #define SIZEOF_LONG $ac_cv_sizeof_long
12149 _ACEOF
12150
12151
12152
12153 case "$host_os" in
12154 cygwin | windows* | mingw32*)
12155 HOST_CPPFLAGS="$HOST_CPPFLAGS -DUNICODE=1 -D_WIN32_WINNT=0x0500"
12156 CPPFLAGS="$CPPFLAGS -DUNICODE=1 -D_WIN32_WINNT=0x0500"
12157 # The cast to long int works around a bug in the HP C Compiler
12158 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12159 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12160 # This bug is HP SR number 8606223364.
12161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of TCHAR" >&5
12162 $as_echo_n "checking size of TCHAR... " >&6; }
12163 if ${ac_cv_sizeof_TCHAR+:} false; then :
12164 $as_echo_n "(cached) " >&6
12165 else
12166 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (TCHAR))" "ac_cv_sizeof_TCHAR" "#include <windows.h>
12167 "; then :
12168
12169 else
12170 if test "$ac_cv_type_TCHAR" = yes; then
12171 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12172 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12173 as_fn_error 77 "cannot compute sizeof (TCHAR)
12174 See \`config.log' for more details" "$LINENO" 5; }
12175 else
12176 ac_cv_sizeof_TCHAR=0
12177 fi
12178 fi
12179
12180 fi
12181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_TCHAR" >&5
12182 $as_echo "$ac_cv_sizeof_TCHAR" >&6; }
12183
12184
12185
12186 cat >>confdefs.h <<_ACEOF
12187 #define SIZEOF_TCHAR $ac_cv_sizeof_TCHAR
12188 _ACEOF
12189
12190
12191 ;;
12192 esac
12193
12194 case "$host_os" in
12195 cygwin | windows* | mingw32* | aros*)
12196 ;;
12197 *)
12198 # The cast to long int works around a bug in the HP C Compiler
12199 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12200 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12201 # This bug is HP SR number 8606223364.
12202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
12203 $as_echo_n "checking size of off_t... " >&6; }
12204 if ${ac_cv_sizeof_off_t+:} false; then :
12205 $as_echo_n "(cached) " >&6
12206 else
12207 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"; then :
12208
12209 else
12210 if test "$ac_cv_type_off_t" = yes; then
12211 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12212 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12213 as_fn_error 77 "cannot compute sizeof (off_t)
12214 See \`config.log' for more details" "$LINENO" 5; }
12215 else
12216 ac_cv_sizeof_off_t=0
12217 fi
12218 fi
12219
12220 fi
12221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
12222 $as_echo "$ac_cv_sizeof_off_t" >&6; }
12223
12224
12225
12226 cat >>confdefs.h <<_ACEOF
12227 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
12228 _ACEOF
12229
12230
12231 if test x"$ac_cv_sizeof_off_t" != x8 ; then
12232 # The cast to long int works around a bug in the HP C Compiler
12233 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12234 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12235 # This bug is HP SR number 8606223364.
12236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off64_t" >&5
12237 $as_echo_n "checking size of off64_t... " >&6; }
12238 if ${ac_cv_sizeof_off64_t+:} false; then :
12239 $as_echo_n "(cached) " >&6
12240 else
12241 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off64_t))" "ac_cv_sizeof_off64_t" "$ac_includes_default"; then :
12242
12243 else
12244 if test "$ac_cv_type_off64_t" = yes; then
12245 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12246 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12247 as_fn_error 77 "cannot compute sizeof (off64_t)
12248 See \`config.log' for more details" "$LINENO" 5; }
12249 else
12250 ac_cv_sizeof_off64_t=0
12251 fi
12252 fi
12253
12254 fi
12255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off64_t" >&5
12256 $as_echo "$ac_cv_sizeof_off64_t" >&6; }
12257
12258
12259
12260 cat >>confdefs.h <<_ACEOF
12261 #define SIZEOF_OFF64_T $ac_cv_sizeof_off64_t
12262 _ACEOF
12263
12264
12265 test x"$ac_cv_sizeof_off64_t" = x8 || as_fn_error $? "Large file support is required" "$LINENO" 5
12266 fi;;
12267 esac
12268
12269 if test x$USE_NLS = xno; then
12270 HOST_CFLAGS="$HOST_CFLAGS -fno-builtin-gettext"
12271 fi
12272
12273 if test "x$cross_compiling" = xyes; then
12274 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot generate manual pages while cross compiling" >&5
12275 $as_echo "$as_me: WARNING: cannot generate manual pages while cross compiling" >&2;}
12276 else
12277 # Extract the first word of "help2man", so it can be a program name with args.
12278 set dummy help2man; ac_word=$2
12279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12280 $as_echo_n "checking for $ac_word... " >&6; }
12281 if ${ac_cv_path_HELP2MAN+:} false; then :
12282 $as_echo_n "(cached) " >&6
12283 else
12284 case $HELP2MAN in
12285 [\\/]* | ?:[\\/]*)
12286 ac_cv_path_HELP2MAN="$HELP2MAN" # Let the user override the test with a path.
12287 ;;
12288 *)
12289 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12290 for as_dir in $PATH
12291 do
12292 IFS=$as_save_IFS
12293 test -z "$as_dir" && as_dir=.
12294 for ac_exec_ext in '' $ac_executable_extensions; do
12295 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12296 ac_cv_path_HELP2MAN="$as_dir/$ac_word$ac_exec_ext"
12297 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12298 break 2
12299 fi
12300 done
12301 done
12302 IFS=$as_save_IFS
12303
12304 ;;
12305 esac
12306 fi
12307 HELP2MAN=$ac_cv_path_HELP2MAN
12308 if test -n "$HELP2MAN"; then
12309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HELP2MAN" >&5
12310 $as_echo "$HELP2MAN" >&6; }
12311 else
12312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12313 $as_echo "no" >&6; }
12314 fi
12315
12316
12317 fi
12318
12319 # Check for functions and headers.
12320 for ac_func in posix_memalign memalign getextmntent atexit
12321 do :
12322 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12323 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12324 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12325 cat >>confdefs.h <<_ACEOF
12326 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12327 _ACEOF
12328
12329 fi
12330 done
12331
12332 for ac_header in sys/param.h sys/mount.h sys/mnttab.h limits.h
12333 do :
12334 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12335 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12336 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12337 cat >>confdefs.h <<_ACEOF
12338 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12339 _ACEOF
12340
12341 fi
12342
12343 done
12344
12345
12346 # glibc 2.25 still includes sys/sysmacros.h in sys/types.h but emits deprecation
12347 # warning which causes compilation failure later with -Werror. So use -Werror here
12348 # as well to force proper sys/sysmacros.h detection.
12349 SAVED_CFLAGS="$CFLAGS"
12350 CFLAGS="$HOST_CFLAGS -Werror"
12351
12352
12353
12354 for ac_header in $ac_header_list
12355 do :
12356 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12357 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
12358 "
12359 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12360 cat >>confdefs.h <<_ACEOF
12361 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12362 _ACEOF
12363
12364 fi
12365
12366 done
12367
12368
12369
12370
12371 ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
12372 if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
12373
12374 $as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
12375
12376 fi
12377
12378
12379 if test $ac_cv_header_sys_mkdev_h = no; then
12380 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
12381 if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
12382
12383 $as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
12384
12385 fi
12386
12387
12388 fi
12389
12390 CFLAGS="$SAVED_CFLAGS"
12391
12392 ac_fn_c_check_member "$LINENO" "struct statfs" "f_fstypename" "ac_cv_member_struct_statfs_f_fstypename" "$ac_includes_default
12393 #include <sys/param.h>
12394 #include <sys/mount.h>
12395 "
12396 if test "x$ac_cv_member_struct_statfs_f_fstypename" = xyes; then :
12397
12398 cat >>confdefs.h <<_ACEOF
12399 #define HAVE_STRUCT_STATFS_F_FSTYPENAME 1
12400 _ACEOF
12401
12402
12403 fi
12404
12405
12406 ac_fn_c_check_member "$LINENO" "struct statfs" "f_mntfromname" "ac_cv_member_struct_statfs_f_mntfromname" "$ac_includes_default
12407 #include <sys/param.h>
12408 #include <sys/mount.h>
12409 "
12410 if test "x$ac_cv_member_struct_statfs_f_mntfromname" = xyes; then :
12411
12412 cat >>confdefs.h <<_ACEOF
12413 #define HAVE_STRUCT_STATFS_F_MNTFROMNAME 1
12414 _ACEOF
12415
12416
12417 fi
12418
12419
12420 # For opendisk() and getrawpartition() on NetBSD.
12421 # Used in util/deviceiter.c and in util/hostdisk.c.
12422 ac_fn_c_check_header_mongrel "$LINENO" "util.h" "ac_cv_header_util_h" "$ac_includes_default"
12423 if test "x$ac_cv_header_util_h" = xyes; then :
12424
12425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opendisk in -lutil" >&5
12426 $as_echo_n "checking for opendisk in -lutil... " >&6; }
12427 if ${ac_cv_lib_util_opendisk+:} false; then :
12428 $as_echo_n "(cached) " >&6
12429 else
12430 ac_check_lib_save_LIBS=$LIBS
12431 LIBS="-lutil $LIBS"
12432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12433 /* end confdefs.h. */
12434
12435 /* Override any GCC internal prototype to avoid an error.
12436 Use char because int might match the return type of a GCC
12437 builtin and then its argument prototype would still apply. */
12438 #ifdef __cplusplus
12439 extern "C"
12440 #endif
12441 char opendisk ();
12442 int
12443 main (void)
12444 {
12445 return opendisk ();
12446 ;
12447 return 0;
12448 }
12449 _ACEOF
12450 if ac_fn_c_try_link "$LINENO"; then :
12451 ac_cv_lib_util_opendisk=yes
12452 else
12453 ac_cv_lib_util_opendisk=no
12454 fi
12455 rm -f core conftest.err conftest.$ac_objext \
12456 conftest$ac_exeext conftest.$ac_ext
12457 LIBS=$ac_check_lib_save_LIBS
12458 fi
12459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_opendisk" >&5
12460 $as_echo "$ac_cv_lib_util_opendisk" >&6; }
12461 if test "x$ac_cv_lib_util_opendisk" = xyes; then :
12462
12463 LIBUTIL="-lutil"
12464
12465 $as_echo "#define HAVE_OPENDISK 1" >>confdefs.h
12466
12467
12468 fi
12469
12470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getrawpartition in -lutil" >&5
12471 $as_echo_n "checking for getrawpartition in -lutil... " >&6; }
12472 if ${ac_cv_lib_util_getrawpartition+:} false; then :
12473 $as_echo_n "(cached) " >&6
12474 else
12475 ac_check_lib_save_LIBS=$LIBS
12476 LIBS="-lutil $LIBS"
12477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12478 /* end confdefs.h. */
12479
12480 /* Override any GCC internal prototype to avoid an error.
12481 Use char because int might match the return type of a GCC
12482 builtin and then its argument prototype would still apply. */
12483 #ifdef __cplusplus
12484 extern "C"
12485 #endif
12486 char getrawpartition ();
12487 int
12488 main (void)
12489 {
12490 return getrawpartition ();
12491 ;
12492 return 0;
12493 }
12494 _ACEOF
12495 if ac_fn_c_try_link "$LINENO"; then :
12496 ac_cv_lib_util_getrawpartition=yes
12497 else
12498 ac_cv_lib_util_getrawpartition=no
12499 fi
12500 rm -f core conftest.err conftest.$ac_objext \
12501 conftest$ac_exeext conftest.$ac_ext
12502 LIBS=$ac_check_lib_save_LIBS
12503 fi
12504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_getrawpartition" >&5
12505 $as_echo "$ac_cv_lib_util_getrawpartition" >&6; }
12506 if test "x$ac_cv_lib_util_getrawpartition" = xyes; then :
12507
12508 LIBUTIL="-lutil"
12509
12510 $as_echo "#define HAVE_GETRAWPARTITION 1" >>confdefs.h
12511
12512
12513 fi
12514
12515
12516 fi
12517
12518
12519
12520
12521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wtrampolines work" >&5
12522 $as_echo_n "checking whether -Wtrampolines work... " >&6; }
12523 if ${grub_cv_host_cc_wtrampolines+:} false; then :
12524 $as_echo_n "(cached) " >&6
12525 else
12526
12527 SAVED_CFLAGS="$CFLAGS"
12528 CFLAGS="$HOST_CFLAGS -Wtrampolines -Werror"
12529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12530 /* end confdefs.h. */
12531 #include <stdarg.h>
12532 int va_arg_func (int fixed, va_list args);
12533 int
12534 main (void)
12535 {
12536
12537 ;
12538 return 0;
12539 }
12540 _ACEOF
12541 if ac_fn_c_try_compile "$LINENO"; then :
12542 grub_cv_host_cc_wtrampolines=yes
12543 else
12544 grub_cv_host_cc_wtrampolines=no
12545 fi
12546 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12547 CFLAGS="$SAVED_CFLAGS"
12548
12549 fi
12550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $grub_cv_host_cc_wtrampolines" >&5
12551 $as_echo "$grub_cv_host_cc_wtrampolines" >&6; }
12552
12553 if test x"$grub_host_cv_cc_wtrampolines" = xyes ; then
12554 HOST_CFLAGS="$HOST_CFLAGS -Wtrampolines"
12555 fi
12556
12557 #
12558 # Check for host and build compilers.
12559 #
12560 HOST_CC=$CC
12561 for ac_prog in gcc egcs cc
12562 do
12563 # Extract the first word of "$ac_prog", so it can be a program name with args.
12564 set dummy $ac_prog; ac_word=$2
12565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12566 $as_echo_n "checking for $ac_word... " >&6; }
12567 if ${ac_cv_prog_BUILD_CC+:} false; then :
12568 $as_echo_n "(cached) " >&6
12569 else
12570 if test -n "$BUILD_CC"; then
12571 ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
12572 else
12573 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12574 for as_dir in $PATH
12575 do
12576 IFS=$as_save_IFS
12577 test -z "$as_dir" && as_dir=.
12578 for ac_exec_ext in '' $ac_executable_extensions; do
12579 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12580 ac_cv_prog_BUILD_CC="$ac_prog"
12581 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12582 break 2
12583 fi
12584 done
12585 done
12586 IFS=$as_save_IFS
12587
12588 fi
12589 fi
12590 BUILD_CC=$ac_cv_prog_BUILD_CC
12591 if test -n "$BUILD_CC"; then
12592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
12593 $as_echo "$BUILD_CC" >&6; }
12594 else
12595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12596 $as_echo "no" >&6; }
12597 fi
12598
12599
12600 test -n "$BUILD_CC" && break
12601 done
12602
12603 test -z "$BUILD_CC" && as_fn_error $? "none of gcc, egcs and cc is found. set BUILD_CC manually." "$LINENO" 5
12604 BUILD_CPP="$BUILD_CC -E"
12605
12606 case "$build_os" in
12607 haiku*) BUILD_LIBM= ;;
12608 *) BUILD_LIBM=-lm ;;
12609 esac
12610
12611
12612 case "$build_os" in
12613 cygwin*|mingw32*|mingw64*) BUILD_EXEEXT=.exe ;;
12614 *) BUILD_EXEEXT= ;;
12615 esac
12616
12617
12618 # In some build environments like termux /bin/sh is not a valid
12619 # shebang. Use $SHELL instead if it's executable and /bin/sh isn't
12620 BUILD_SHEBANG=/bin/sh
12621 for she in /bin/sh "$SHELL"; do
12622 if test -x "$she" ; then
12623 BUILD_SHEBANG="$she"
12624 fi
12625 done
12626
12627
12628 # For gnulib.
12629
12630
12631
12632
12633
12634 LIBC_FATAL_STDERR_=1
12635 export LIBC_FATAL_STDERR_
12636
12637 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
12638 if test "x$ac_cv_type_size_t" = xyes; then :
12639
12640 else
12641
12642 cat >>confdefs.h <<_ACEOF
12643 #define size_t unsigned int
12644 _ACEOF
12645
12646 fi
12647
12648 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
12649 # for constant arguments. Useless!
12650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
12651 $as_echo_n "checking for working alloca.h... " >&6; }
12652 if ${ac_cv_working_alloca_h+:} false; then :
12653 $as_echo_n "(cached) " >&6
12654 else
12655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12656 /* end confdefs.h. */
12657 #include <alloca.h>
12658 int
12659 main (void)
12660 {
12661 char *p = (char *) alloca (2 * sizeof (int));
12662 if (p) return 0;
12663 ;
12664 return 0;
12665 }
12666 _ACEOF
12667 if ac_fn_c_try_link "$LINENO"; then :
12668 ac_cv_working_alloca_h=yes
12669 else
12670 ac_cv_working_alloca_h=no
12671 fi
12672 rm -f core conftest.err conftest.$ac_objext \
12673 conftest$ac_exeext conftest.$ac_ext
12674 fi
12675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
12676 $as_echo "$ac_cv_working_alloca_h" >&6; }
12677 if test $ac_cv_working_alloca_h = yes; then
12678
12679 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
12680
12681 fi
12682
12683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
12684 $as_echo_n "checking for alloca... " >&6; }
12685 if ${ac_cv_func_alloca_works+:} false; then :
12686 $as_echo_n "(cached) " >&6
12687 else
12688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12689 /* end confdefs.h. */
12690 #ifdef __GNUC__
12691 # define alloca __builtin_alloca
12692 #else
12693 # ifdef _MSC_VER
12694 # include <malloc.h>
12695 # define alloca _alloca
12696 # else
12697 # ifdef HAVE_ALLOCA_H
12698 # include <alloca.h>
12699 # else
12700 # ifdef _AIX
12701 #pragma alloca
12702 # else
12703 # ifndef alloca /* predefined by HP cc +Olibcalls */
12704 void *alloca (size_t);
12705 # endif
12706 # endif
12707 # endif
12708 # endif
12709 #endif
12710
12711 int
12712 main (void)
12713 {
12714 char *p = (char *) alloca (1);
12715 if (p) return 0;
12716 ;
12717 return 0;
12718 }
12719 _ACEOF
12720 if ac_fn_c_try_link "$LINENO"; then :
12721 ac_cv_func_alloca_works=yes
12722 else
12723 ac_cv_func_alloca_works=no
12724 fi
12725 rm -f core conftest.err conftest.$ac_objext \
12726 conftest$ac_exeext conftest.$ac_ext
12727 fi
12728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
12729 $as_echo "$ac_cv_func_alloca_works" >&6; }
12730
12731 if test $ac_cv_func_alloca_works = yes; then
12732
12733 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
12734
12735 else
12736 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
12737 # that cause trouble. Some versions do not even contain alloca or
12738 # contain a buggy version. If you still want to use their alloca,
12739 # use ar to extract alloca.o from them instead of compiling alloca.c.
12740
12741
12742
12743
12744
12745 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
12746
12747 $as_echo "#define C_ALLOCA 1" >>confdefs.h
12748
12749
12750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
12751 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
12752 if ${ac_cv_os_cray+:} false; then :
12753 $as_echo_n "(cached) " >&6
12754 else
12755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12756 /* end confdefs.h. */
12757 #if defined CRAY && ! defined CRAY2
12758 webecray
12759 #else
12760 wenotbecray
12761 #endif
12762
12763 _ACEOF
12764 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12765 $EGREP "webecray" >/dev/null 2>&1; then :
12766 ac_cv_os_cray=yes
12767 else
12768 ac_cv_os_cray=no
12769 fi
12770 rm -f conftest*
12771
12772 fi
12773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
12774 $as_echo "$ac_cv_os_cray" >&6; }
12775 if test $ac_cv_os_cray = yes; then
12776 for ac_func in _getb67 GETB67 getb67; do
12777 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12778 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12779 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12780
12781 cat >>confdefs.h <<_ACEOF
12782 #define CRAY_STACKSEG_END $ac_func
12783 _ACEOF
12784
12785 break
12786 fi
12787
12788 done
12789 fi
12790
12791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
12792 $as_echo_n "checking stack direction for C alloca... " >&6; }
12793 if ${ac_cv_c_stack_direction+:} false; then :
12794 $as_echo_n "(cached) " >&6
12795 else
12796 if test "$cross_compiling" = yes; then :
12797 ac_cv_c_stack_direction=0
12798 else
12799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12800 /* end confdefs.h. */
12801 $ac_includes_default
12802 int
12803 find_stack_direction (int *addr, int depth)
12804 {
12805 int dir, dummy = 0;
12806 if (! addr)
12807 addr = &dummy;
12808 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
12809 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
12810 return dir + dummy;
12811 }
12812
12813 int
12814 main (int argc, char **argv)
12815 {
12816 return find_stack_direction (0, argc + !argv + 20) < 0;
12817 }
12818 _ACEOF
12819 if ac_fn_c_try_run "$LINENO"; then :
12820 ac_cv_c_stack_direction=1
12821 else
12822 ac_cv_c_stack_direction=-1
12823 fi
12824 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12825 conftest.$ac_objext conftest.beam conftest.$ac_ext
12826 fi
12827
12828 fi
12829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
12830 $as_echo "$ac_cv_c_stack_direction" >&6; }
12831 cat >>confdefs.h <<_ACEOF
12832 #define STACK_DIRECTION $ac_cv_c_stack_direction
12833 _ACEOF
12834
12835
12836 fi
12837
12838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12839 $as_echo_n "checking for inline... " >&6; }
12840 if ${ac_cv_c_inline+:} false; then :
12841 $as_echo_n "(cached) " >&6
12842 else
12843 ac_cv_c_inline=no
12844 for ac_kw in inline __inline__ __inline; do
12845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12846 /* end confdefs.h. */
12847 #ifndef __cplusplus
12848 typedef int foo_t;
12849 static $ac_kw foo_t static_foo () {return 0; }
12850 $ac_kw foo_t foo () {return 0; }
12851 #endif
12852
12853 _ACEOF
12854 if ac_fn_c_try_compile "$LINENO"; then :
12855 ac_cv_c_inline=$ac_kw
12856 fi
12857 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12858 test "$ac_cv_c_inline" != no && break
12859 done
12860
12861 fi
12862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12863 $as_echo "$ac_cv_c_inline" >&6; }
12864
12865 case $ac_cv_c_inline in
12866 inline | yes) ;;
12867 *)
12868 case $ac_cv_c_inline in
12869 no) ac_val=;;
12870 *) ac_val=$ac_cv_c_inline;;
12871 esac
12872 cat >>confdefs.h <<_ACEOF
12873 #ifndef __cplusplus
12874 #define inline $ac_val
12875 #endif
12876 _ACEOF
12877 ;;
12878 esac
12879
12880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
12881 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
12882 if ${ac_cv_c_restrict+:} false; then :
12883 $as_echo_n "(cached) " >&6
12884 else
12885 ac_cv_c_restrict=no
12886 # The order here caters to the fact that C++ does not require restrict.
12887 for ac_kw in __restrict __restrict__ _Restrict restrict; do
12888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12889 /* end confdefs.h. */
12890 typedef int *int_ptr;
12891 int foo (int_ptr $ac_kw ip) { return ip[0]; }
12892 int bar (int [$ac_kw]); /* Catch GCC bug 14050. */
12893 int bar (int ip[$ac_kw]) { return ip[0]; }
12894
12895 int
12896 main (void)
12897 {
12898 int s[1];
12899 int *$ac_kw t = s;
12900 t[0] = 0;
12901 return foo (t) + bar (t);
12902
12903 ;
12904 return 0;
12905 }
12906 _ACEOF
12907 if ac_fn_c_try_compile "$LINENO"; then :
12908 ac_cv_c_restrict=$ac_kw
12909 fi
12910 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12911 test "$ac_cv_c_restrict" != no && break
12912 done
12913
12914 fi
12915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
12916 $as_echo "$ac_cv_c_restrict" >&6; }
12917
12918 case $ac_cv_c_restrict in
12919 restrict) ;;
12920 no) $as_echo "#define restrict /**/" >>confdefs.h
12921 ;;
12922 *) cat >>confdefs.h <<_ACEOF
12923 #define restrict $ac_cv_c_restrict
12924 _ACEOF
12925 ;;
12926 esac
12927
12928 ac_fn_c_check_decl "$LINENO" "clearerr_unlocked" "ac_cv_have_decl_clearerr_unlocked" "$ac_includes_default"
12929 if test "x$ac_cv_have_decl_clearerr_unlocked" = xyes; then :
12930 ac_have_decl=1
12931 else
12932 ac_have_decl=0
12933 fi
12934
12935 cat >>confdefs.h <<_ACEOF
12936 #define HAVE_DECL_CLEARERR_UNLOCKED $ac_have_decl
12937 _ACEOF
12938
12939 ac_fn_c_check_decl "$LINENO" "feof_unlocked" "ac_cv_have_decl_feof_unlocked" "$ac_includes_default"
12940 if test "x$ac_cv_have_decl_feof_unlocked" = xyes; then :
12941 ac_have_decl=1
12942 else
12943 ac_have_decl=0
12944 fi
12945
12946 cat >>confdefs.h <<_ACEOF
12947 #define HAVE_DECL_FEOF_UNLOCKED $ac_have_decl
12948 _ACEOF
12949
12950 ac_fn_c_check_decl "$LINENO" "ferror_unlocked" "ac_cv_have_decl_ferror_unlocked" "$ac_includes_default"
12951 if test "x$ac_cv_have_decl_ferror_unlocked" = xyes; then :
12952 ac_have_decl=1
12953 else
12954 ac_have_decl=0
12955 fi
12956
12957 cat >>confdefs.h <<_ACEOF
12958 #define HAVE_DECL_FERROR_UNLOCKED $ac_have_decl
12959 _ACEOF
12960
12961 ac_fn_c_check_decl "$LINENO" "fflush_unlocked" "ac_cv_have_decl_fflush_unlocked" "$ac_includes_default"
12962 if test "x$ac_cv_have_decl_fflush_unlocked" = xyes; then :
12963 ac_have_decl=1
12964 else
12965 ac_have_decl=0
12966 fi
12967
12968 cat >>confdefs.h <<_ACEOF
12969 #define HAVE_DECL_FFLUSH_UNLOCKED $ac_have_decl
12970 _ACEOF
12971
12972 ac_fn_c_check_decl "$LINENO" "fgets_unlocked" "ac_cv_have_decl_fgets_unlocked" "$ac_includes_default"
12973 if test "x$ac_cv_have_decl_fgets_unlocked" = xyes; then :
12974 ac_have_decl=1
12975 else
12976 ac_have_decl=0
12977 fi
12978
12979 cat >>confdefs.h <<_ACEOF
12980 #define HAVE_DECL_FGETS_UNLOCKED $ac_have_decl
12981 _ACEOF
12982
12983 ac_fn_c_check_decl "$LINENO" "fputc_unlocked" "ac_cv_have_decl_fputc_unlocked" "$ac_includes_default"
12984 if test "x$ac_cv_have_decl_fputc_unlocked" = xyes; then :
12985 ac_have_decl=1
12986 else
12987 ac_have_decl=0
12988 fi
12989
12990 cat >>confdefs.h <<_ACEOF
12991 #define HAVE_DECL_FPUTC_UNLOCKED $ac_have_decl
12992 _ACEOF
12993
12994 ac_fn_c_check_decl "$LINENO" "fputs_unlocked" "ac_cv_have_decl_fputs_unlocked" "$ac_includes_default"
12995 if test "x$ac_cv_have_decl_fputs_unlocked" = xyes; then :
12996 ac_have_decl=1
12997 else
12998 ac_have_decl=0
12999 fi
13000
13001 cat >>confdefs.h <<_ACEOF
13002 #define HAVE_DECL_FPUTS_UNLOCKED $ac_have_decl
13003 _ACEOF
13004
13005 ac_fn_c_check_decl "$LINENO" "fread_unlocked" "ac_cv_have_decl_fread_unlocked" "$ac_includes_default"
13006 if test "x$ac_cv_have_decl_fread_unlocked" = xyes; then :
13007 ac_have_decl=1
13008 else
13009 ac_have_decl=0
13010 fi
13011
13012 cat >>confdefs.h <<_ACEOF
13013 #define HAVE_DECL_FREAD_UNLOCKED $ac_have_decl
13014 _ACEOF
13015
13016 ac_fn_c_check_decl "$LINENO" "fwrite_unlocked" "ac_cv_have_decl_fwrite_unlocked" "$ac_includes_default"
13017 if test "x$ac_cv_have_decl_fwrite_unlocked" = xyes; then :
13018 ac_have_decl=1
13019 else
13020 ac_have_decl=0
13021 fi
13022
13023 cat >>confdefs.h <<_ACEOF
13024 #define HAVE_DECL_FWRITE_UNLOCKED $ac_have_decl
13025 _ACEOF
13026
13027 ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
13028 if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
13029 ac_have_decl=1
13030 else
13031 ac_have_decl=0
13032 fi
13033
13034 cat >>confdefs.h <<_ACEOF
13035 #define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
13036 _ACEOF
13037
13038 ac_fn_c_check_decl "$LINENO" "getchar_unlocked" "ac_cv_have_decl_getchar_unlocked" "$ac_includes_default"
13039 if test "x$ac_cv_have_decl_getchar_unlocked" = xyes; then :
13040 ac_have_decl=1
13041 else
13042 ac_have_decl=0
13043 fi
13044
13045 cat >>confdefs.h <<_ACEOF
13046 #define HAVE_DECL_GETCHAR_UNLOCKED $ac_have_decl
13047 _ACEOF
13048
13049 ac_fn_c_check_decl "$LINENO" "putc_unlocked" "ac_cv_have_decl_putc_unlocked" "$ac_includes_default"
13050 if test "x$ac_cv_have_decl_putc_unlocked" = xyes; then :
13051 ac_have_decl=1
13052 else
13053 ac_have_decl=0
13054 fi
13055
13056 cat >>confdefs.h <<_ACEOF
13057 #define HAVE_DECL_PUTC_UNLOCKED $ac_have_decl
13058 _ACEOF
13059
13060 ac_fn_c_check_decl "$LINENO" "putchar_unlocked" "ac_cv_have_decl_putchar_unlocked" "$ac_includes_default"
13061 if test "x$ac_cv_have_decl_putchar_unlocked" = xyes; then :
13062 ac_have_decl=1
13063 else
13064 ac_have_decl=0
13065 fi
13066
13067 cat >>confdefs.h <<_ACEOF
13068 #define HAVE_DECL_PUTCHAR_UNLOCKED $ac_have_decl
13069 _ACEOF
13070
13071
13072
13073
13074 for ac_func in $ac_func_list
13075 do :
13076 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13077 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13078 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13079 cat >>confdefs.h <<_ACEOF
13080 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13081 _ACEOF
13082
13083 fi
13084 done
13085
13086
13087
13088
13089
13090
13091
13092
13093
13094 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
13095 if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
13096 ac_have_decl=1
13097 else
13098 ac_have_decl=0
13099 fi
13100
13101 cat >>confdefs.h <<_ACEOF
13102 #define HAVE_DECL_STRERROR_R $ac_have_decl
13103 _ACEOF
13104
13105 for ac_func in strerror_r
13106 do :
13107 ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
13108 if test "x$ac_cv_func_strerror_r" = xyes; then :
13109 cat >>confdefs.h <<_ACEOF
13110 #define HAVE_STRERROR_R 1
13111 _ACEOF
13112
13113 fi
13114 done
13115
13116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
13117 $as_echo_n "checking whether strerror_r returns char *... " >&6; }
13118 if ${ac_cv_func_strerror_r_char_p+:} false; then :
13119 $as_echo_n "(cached) " >&6
13120 else
13121
13122 ac_cv_func_strerror_r_char_p=no
13123 if test $ac_cv_have_decl_strerror_r = yes; then
13124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13125 /* end confdefs.h. */
13126 $ac_includes_default
13127 int
13128 main (void)
13129 {
13130
13131 char buf[100];
13132 char x = *strerror_r (0, buf, sizeof buf);
13133 char *p = strerror_r (0, buf, sizeof buf);
13134 return !p || x;
13135
13136 ;
13137 return 0;
13138 }
13139 _ACEOF
13140 if ac_fn_c_try_compile "$LINENO"; then :
13141 ac_cv_func_strerror_r_char_p=yes
13142 fi
13143 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13144 else
13145 # strerror_r is not declared. Choose between
13146 # systems that have relatively inaccessible declarations for the
13147 # function. BeOS and DEC UNIX 4.0 fall in this category, but the
13148 # former has a strerror_r that returns char*, while the latter
13149 # has a strerror_r that returns `int'.
13150 # This test should segfault on the DEC system.
13151 if test "$cross_compiling" = yes; then :
13152 :
13153 else
13154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13155 /* end confdefs.h. */
13156 $ac_includes_default
13157 extern char *strerror_r ();
13158 int
13159 main (void)
13160 {
13161 char buf[100];
13162 char x = *strerror_r (0, buf, sizeof buf);
13163 return ! isalpha (x);
13164 ;
13165 return 0;
13166 }
13167 _ACEOF
13168 if ac_fn_c_try_run "$LINENO"; then :
13169 ac_cv_func_strerror_r_char_p=yes
13170 fi
13171 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13172 conftest.$ac_objext conftest.beam conftest.$ac_ext
13173 fi
13174
13175 fi
13176
13177 fi
13178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
13179 $as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
13180 if test $ac_cv_func_strerror_r_char_p = yes; then
13181
13182 $as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
13183
13184 fi
13185
13186
13187 XGETTEXT_EXTRA_OPTIONS=
13188
13189
13190 GNULIB_BTOWC=0;
13191 GNULIB_WCTOB=0;
13192 GNULIB_MBSINIT=0;
13193 GNULIB_MBRTOWC=0;
13194 GNULIB_MBRLEN=0;
13195 GNULIB_MBSRTOWCS=0;
13196 GNULIB_MBSNRTOWCS=0;
13197 GNULIB_WCRTOMB=0;
13198 GNULIB_WCSRTOMBS=0;
13199 GNULIB_WCSNRTOMBS=0;
13200 GNULIB_WCWIDTH=0;
13201 GNULIB_WMEMCHR=0;
13202 GNULIB_WMEMCMP=0;
13203 GNULIB_WMEMCPY=0;
13204 GNULIB_WMEMMOVE=0;
13205 GNULIB_WMEMSET=0;
13206 GNULIB_WCSLEN=0;
13207 GNULIB_WCSNLEN=0;
13208 GNULIB_WCSCPY=0;
13209 GNULIB_WCPCPY=0;
13210 GNULIB_WCSNCPY=0;
13211 GNULIB_WCPNCPY=0;
13212 GNULIB_WCSCAT=0;
13213 GNULIB_WCSNCAT=0;
13214 GNULIB_WCSCMP=0;
13215 GNULIB_WCSNCMP=0;
13216 GNULIB_WCSCASECMP=0;
13217 GNULIB_WCSNCASECMP=0;
13218 GNULIB_WCSCOLL=0;
13219 GNULIB_WCSXFRM=0;
13220 GNULIB_WCSDUP=0;
13221 GNULIB_WCSCHR=0;
13222 GNULIB_WCSRCHR=0;
13223 GNULIB_WCSCSPN=0;
13224 GNULIB_WCSSPN=0;
13225 GNULIB_WCSPBRK=0;
13226 GNULIB_WCSSTR=0;
13227 GNULIB_WCSTOK=0;
13228 GNULIB_WCSWIDTH=0;
13229 GNULIB_WCSFTIME=0;
13230 HAVE_BTOWC=1;
13231 HAVE_MBSINIT=1;
13232 HAVE_MBRTOWC=1;
13233 HAVE_MBRLEN=1;
13234 HAVE_MBSRTOWCS=1;
13235 HAVE_MBSNRTOWCS=1;
13236 HAVE_WCRTOMB=1;
13237 HAVE_WCSRTOMBS=1;
13238 HAVE_WCSNRTOMBS=1;
13239 HAVE_WMEMCHR=1;
13240 HAVE_WMEMCMP=1;
13241 HAVE_WMEMCPY=1;
13242 HAVE_WMEMMOVE=1;
13243 HAVE_WMEMSET=1;
13244 HAVE_WCSLEN=1;
13245 HAVE_WCSNLEN=1;
13246 HAVE_WCSCPY=1;
13247 HAVE_WCPCPY=1;
13248 HAVE_WCSNCPY=1;
13249 HAVE_WCPNCPY=1;
13250 HAVE_WCSCAT=1;
13251 HAVE_WCSNCAT=1;
13252 HAVE_WCSCMP=1;
13253 HAVE_WCSNCMP=1;
13254 HAVE_WCSCASECMP=1;
13255 HAVE_WCSNCASECMP=1;
13256 HAVE_WCSCOLL=1;
13257 HAVE_WCSXFRM=1;
13258 HAVE_WCSDUP=1;
13259 HAVE_WCSCHR=1;
13260 HAVE_WCSRCHR=1;
13261 HAVE_WCSCSPN=1;
13262 HAVE_WCSSPN=1;
13263 HAVE_WCSPBRK=1;
13264 HAVE_WCSSTR=1;
13265 HAVE_WCSTOK=1;
13266 HAVE_WCSWIDTH=1;
13267 HAVE_WCSFTIME=1;
13268 HAVE_DECL_WCTOB=1;
13269 HAVE_DECL_WCWIDTH=1;
13270 REPLACE_MBSTATE_T=0;
13271 REPLACE_BTOWC=0;
13272 REPLACE_WCTOB=0;
13273 REPLACE_MBSINIT=0;
13274 REPLACE_MBRTOWC=0;
13275 REPLACE_MBRLEN=0;
13276 REPLACE_MBSRTOWCS=0;
13277 REPLACE_MBSNRTOWCS=0;
13278 REPLACE_WCRTOMB=0;
13279 REPLACE_WCSRTOMBS=0;
13280 REPLACE_WCSNRTOMBS=0;
13281 REPLACE_WCWIDTH=0;
13282 REPLACE_WCSWIDTH=0;
13283 REPLACE_WCSFTIME=0;
13284
13285
13286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
13287 $as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
13288 if ${gl_cv_header_wchar_h_correct_inline+:} false; then :
13289 $as_echo_n "(cached) " >&6
13290 else
13291 gl_cv_header_wchar_h_correct_inline=yes
13292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13293 /* end confdefs.h. */
13294
13295 #define wcstod renamed_wcstod
13296 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
13297 <wchar.h>.
13298 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
13299 included before <wchar.h>. */
13300 #include <stddef.h>
13301 #include <stdio.h>
13302 #include <time.h>
13303 #include <wchar.h>
13304 extern int zero (void);
13305 int main () { return zero(); }
13306
13307 _ACEOF
13308 save_ac_compile="$ac_compile"
13309 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
13310 if echo '#include "conftest.c"' >conftest1.c &&
13311 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
13312 (eval $ac_compile) 2>&5
13313 ac_status=$?
13314 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13315 test $ac_status = 0; }; then
13316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13317 /* end confdefs.h. */
13318
13319 #define wcstod renamed_wcstod
13320 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
13321 <wchar.h>.
13322 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
13323 included before <wchar.h>. */
13324 #include <stddef.h>
13325 #include <stdio.h>
13326 #include <time.h>
13327 #include <wchar.h>
13328 int zero (void) { return 0; }
13329
13330 _ACEOF
13331 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
13332 if echo '#include "conftest.c"' >conftest2.c &&
13333 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
13334 (eval $ac_compile) 2>&5
13335 ac_status=$?
13336 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13337 test $ac_status = 0; }; then
13338 if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
13339 :
13340 else
13341 gl_cv_header_wchar_h_correct_inline=no
13342 fi
13343 fi
13344 fi
13345 ac_compile="$save_ac_compile"
13346 rm -f conftest12.c conftest12.$ac_objext conftest$ac_exeext
13347
13348 fi
13349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
13350 $as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
13351 if test $gl_cv_header_wchar_h_correct_inline = no; then
13352 as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
13353 This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
13354 C99 mode. You have four options:
13355 - Add the flag -fgnu89-inline to CC and reconfigure, or
13356 - Fix your include files, using parts of
13357 <https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
13358 - Use a gcc version older than 4.3, or
13359 - Don't use the flags -std=c99 or -std=gnu99.
13360 Configuration aborted." "$LINENO" 5
13361 fi
13362
13363
13364
13365
13366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13367 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
13368 if ${am_cv_langinfo_codeset+:} false; then :
13369 $as_echo_n "(cached) " >&6
13370 else
13371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13372 /* end confdefs.h. */
13373 #include <langinfo.h>
13374 int
13375 main (void)
13376 {
13377 char* cs = nl_langinfo(CODESET); return !cs;
13378 ;
13379 return 0;
13380 }
13381 _ACEOF
13382 if ac_fn_c_try_link "$LINENO"; then :
13383 am_cv_langinfo_codeset=yes
13384 else
13385 am_cv_langinfo_codeset=no
13386 fi
13387 rm -f core conftest.err conftest.$ac_objext \
13388 conftest$ac_exeext conftest.$ac_ext
13389
13390 fi
13391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13392 $as_echo "$am_cv_langinfo_codeset" >&6; }
13393 if test $am_cv_langinfo_codeset = yes; then
13394
13395 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
13396
13397 fi
13398
13399
13400
13401
13402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
13403 $as_echo_n "checking for a traditional french locale... " >&6; }
13404 if ${gt_cv_locale_fr+:} false; then :
13405 $as_echo_n "(cached) " >&6
13406 else
13407
13408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13409 /* end confdefs.h. */
13410
13411 #include <locale.h>
13412 #include <time.h>
13413 #if HAVE_LANGINFO_CODESET
13414 # include <langinfo.h>
13415 #endif
13416 #include <stdlib.h>
13417 #include <string.h>
13418 struct tm t;
13419 char buf[16];
13420 int main () {
13421 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
13422 imitates locale dependent behaviour by looking at the environment
13423 variables, and all locales use the UTF-8 encoding. */
13424 #if defined __BEOS__ || defined __HAIKU__
13425 return 1;
13426 #else
13427 /* Check whether the given locale name is recognized by the system. */
13428 # if defined _WIN32 && !defined __CYGWIN__
13429 /* On native Windows, setlocale(category, "") looks at the system settings,
13430 not at the environment variables. Also, when an encoding suffix such
13431 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
13432 category of the locale to "C". */
13433 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
13434 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
13435 return 1;
13436 # else
13437 if (setlocale (LC_ALL, "") == NULL) return 1;
13438 # endif
13439 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
13440 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
13441 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
13442 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
13443 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
13444 some unit tests fail.
13445 On MirBSD 10, when an unsupported locale is specified, setlocale()
13446 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
13447 # if HAVE_LANGINFO_CODESET
13448 {
13449 const char *cs = nl_langinfo (CODESET);
13450 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
13451 || strcmp (cs, "UTF-8") == 0)
13452 return 1;
13453 }
13454 # endif
13455 # ifdef __CYGWIN__
13456 /* On Cygwin, avoid locale names without encoding suffix, because the
13457 locale_charset() function relies on the encoding suffix. Note that
13458 LC_ALL is set on the command line. */
13459 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
13460 # endif
13461 /* Check whether in the abbreviation of the second month, the second
13462 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
13463 one byte long. This excludes the UTF-8 encoding. */
13464 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
13465 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
13466 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
13467 /* Check whether the decimal separator is a comma.
13468 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
13469 are nl_langinfo(RADIXCHAR) are both ".". */
13470 if (localeconv () ->decimal_point[0] != ',') return 1;
13471 # endif
13472 return 0;
13473 #endif
13474 }
13475
13476 _ACEOF
13477 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
13478 (eval $ac_link) 2>&5
13479 ac_status=$?
13480 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13481 test $ac_status = 0; } && test -s conftest$ac_exeext; then
13482 case "$host_os" in
13483 # Handle native Windows specially, because there setlocale() interprets
13484 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
13485 # "fr" or "fra" as "French" or "French_France.1252",
13486 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
13487 # "ja" as "Japanese" or "Japanese_Japan.932",
13488 # and similar.
13489 mingw*)
13490 # Test for the native Windows locale name.
13491 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
13492 gt_cv_locale_fr=French_France.1252
13493 else
13494 # None found.
13495 gt_cv_locale_fr=none
13496 fi
13497 ;;
13498 *)
13499 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
13500 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
13501 # configure script would override the LC_ALL setting. Likewise for
13502 # LC_CTYPE, which is also set at the beginning of the configure script.
13503 # Test for the usual locale name.
13504 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
13505 gt_cv_locale_fr=fr_FR
13506 else
13507 # Test for the locale name with explicit encoding suffix.
13508 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
13509 gt_cv_locale_fr=fr_FR.ISO-8859-1
13510 else
13511 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
13512 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
13513 gt_cv_locale_fr=fr_FR.ISO8859-1
13514 else
13515 # Test for the HP-UX locale name.
13516 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
13517 gt_cv_locale_fr=fr_FR.iso88591
13518 else
13519 # Test for the Solaris 7 locale name.
13520 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
13521 gt_cv_locale_fr=fr
13522 else
13523 # None found.
13524 gt_cv_locale_fr=none
13525 fi
13526 fi
13527 fi
13528 fi
13529 fi
13530 ;;
13531 esac
13532 fi
13533 rm -fr conftest*
13534
13535 fi
13536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
13537 $as_echo "$gt_cv_locale_fr" >&6; }
13538 LOCALE_FR=$gt_cv_locale_fr
13539
13540
13541
13542 GNULIB_CHDIR=0;
13543 GNULIB_CHOWN=0;
13544 GNULIB_CLOSE=0;
13545 GNULIB_DUP=0;
13546 GNULIB_DUP2=0;
13547 GNULIB_DUP3=0;
13548 GNULIB_ENVIRON=0;
13549 GNULIB_EUIDACCESS=0;
13550 GNULIB_FACCESSAT=0;
13551 GNULIB_FCHDIR=0;
13552 GNULIB_FCHOWNAT=0;
13553 GNULIB_FDATASYNC=0;
13554 GNULIB_FSYNC=0;
13555 GNULIB_FTRUNCATE=0;
13556 GNULIB_GETCWD=0;
13557 GNULIB_GETDOMAINNAME=0;
13558 GNULIB_GETDTABLESIZE=0;
13559 GNULIB_GETGROUPS=0;
13560 GNULIB_GETHOSTNAME=0;
13561 GNULIB_GETLOGIN=0;
13562 GNULIB_GETLOGIN_R=0;
13563 GNULIB_GETPAGESIZE=0;
13564 GNULIB_GETPASS=0;
13565 GNULIB_GETUSERSHELL=0;
13566 GNULIB_GROUP_MEMBER=0;
13567 GNULIB_ISATTY=0;
13568 GNULIB_LCHOWN=0;
13569 GNULIB_LINK=0;
13570 GNULIB_LINKAT=0;
13571 GNULIB_LSEEK=0;
13572 GNULIB_PIPE=0;
13573 GNULIB_PIPE2=0;
13574 GNULIB_PREAD=0;
13575 GNULIB_PWRITE=0;
13576 GNULIB_READ=0;
13577 GNULIB_READLINK=0;
13578 GNULIB_READLINKAT=0;
13579 GNULIB_RMDIR=0;
13580 GNULIB_SETHOSTNAME=0;
13581 GNULIB_SLEEP=0;
13582 GNULIB_SYMLINK=0;
13583 GNULIB_SYMLINKAT=0;
13584 GNULIB_TRUNCATE=0;
13585 GNULIB_TTYNAME_R=0;
13586 GNULIB_UNISTD_H_NONBLOCKING=0;
13587 GNULIB_UNISTD_H_SIGPIPE=0;
13588 GNULIB_UNLINK=0;
13589 GNULIB_UNLINKAT=0;
13590 GNULIB_USLEEP=0;
13591 GNULIB_WRITE=0;
13592 HAVE_CHOWN=1;
13593 HAVE_DUP2=1;
13594 HAVE_DUP3=1;
13595 HAVE_EUIDACCESS=1;
13596 HAVE_FACCESSAT=1;
13597 HAVE_FCHDIR=1;
13598 HAVE_FCHOWNAT=1;
13599 HAVE_FDATASYNC=1;
13600 HAVE_FSYNC=1;
13601 HAVE_FTRUNCATE=1;
13602 HAVE_GETDTABLESIZE=1;
13603 HAVE_GETGROUPS=1;
13604 HAVE_GETHOSTNAME=1;
13605 HAVE_GETLOGIN=1;
13606 HAVE_GETPAGESIZE=1;
13607 HAVE_GETPASS=1;
13608 HAVE_GROUP_MEMBER=1;
13609 HAVE_LCHOWN=1;
13610 HAVE_LINK=1;
13611 HAVE_LINKAT=1;
13612 HAVE_PIPE=1;
13613 HAVE_PIPE2=1;
13614 HAVE_PREAD=1;
13615 HAVE_PWRITE=1;
13616 HAVE_READLINK=1;
13617 HAVE_READLINKAT=1;
13618 HAVE_SETHOSTNAME=1;
13619 HAVE_SLEEP=1;
13620 HAVE_SYMLINK=1;
13621 HAVE_SYMLINKAT=1;
13622 HAVE_UNLINKAT=1;
13623 HAVE_USLEEP=1;
13624 HAVE_DECL_ENVIRON=1;
13625 HAVE_DECL_FCHDIR=1;
13626 HAVE_DECL_FDATASYNC=1;
13627 HAVE_DECL_GETDOMAINNAME=1;
13628 HAVE_DECL_GETLOGIN=1;
13629 HAVE_DECL_GETLOGIN_R=1;
13630 HAVE_DECL_GETPAGESIZE=1;
13631 HAVE_DECL_GETUSERSHELL=1;
13632 HAVE_DECL_SETHOSTNAME=1;
13633 HAVE_DECL_TRUNCATE=1;
13634 HAVE_DECL_TTYNAME_R=1;
13635 HAVE_OS_H=0;
13636 HAVE_SYS_PARAM_H=0;
13637 REPLACE_CHOWN=0;
13638 REPLACE_CLOSE=0;
13639 REPLACE_DUP=0;
13640 REPLACE_DUP2=0;
13641 REPLACE_FACCESSAT=0;
13642 REPLACE_FCHOWNAT=0;
13643 REPLACE_FTRUNCATE=0;
13644 REPLACE_GETCWD=0;
13645 REPLACE_GETDOMAINNAME=0;
13646 REPLACE_GETDTABLESIZE=0;
13647 REPLACE_GETLOGIN_R=0;
13648 REPLACE_GETGROUPS=0;
13649 REPLACE_GETPAGESIZE=0;
13650 REPLACE_GETPASS=0;
13651 REPLACE_ISATTY=0;
13652 REPLACE_LCHOWN=0;
13653 REPLACE_LINK=0;
13654 REPLACE_LINKAT=0;
13655 REPLACE_LSEEK=0;
13656 REPLACE_PREAD=0;
13657 REPLACE_PWRITE=0;
13658 REPLACE_READ=0;
13659 REPLACE_READLINK=0;
13660 REPLACE_READLINKAT=0;
13661 REPLACE_RMDIR=0;
13662 REPLACE_SLEEP=0;
13663 REPLACE_SYMLINK=0;
13664 REPLACE_SYMLINKAT=0;
13665 REPLACE_TRUNCATE=0;
13666 REPLACE_TTYNAME_R=0;
13667 REPLACE_UNLINK=0;
13668 REPLACE_UNLINKAT=0;
13669 REPLACE_USLEEP=0;
13670 REPLACE_WRITE=0;
13671 UNISTD_H_HAVE_WINSOCK2_H=0;
13672 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
13673
13674
13675
13676
13677
13678
13679
13680
13681
13682
13683
13684
13685
13686 if test $ac_cv_func__set_invalid_parameter_handler = yes; then
13687 HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
13688
13689 $as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
13690
13691 else
13692 HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
13693 fi
13694
13695
13696
13697
13698
13699
13700
13701 GNULIB_OPENDIR=0;
13702 GNULIB_READDIR=0;
13703 GNULIB_REWINDDIR=0;
13704 GNULIB_CLOSEDIR=0;
13705 GNULIB_DIRFD=0;
13706 GNULIB_FDOPENDIR=0;
13707 GNULIB_SCANDIR=0;
13708 GNULIB_ALPHASORT=0;
13709 HAVE_OPENDIR=1;
13710 HAVE_READDIR=1;
13711 HAVE_REWINDDIR=1;
13712 HAVE_CLOSEDIR=1;
13713 HAVE_DECL_DIRFD=1;
13714 HAVE_DECL_FDOPENDIR=1;
13715 HAVE_FDOPENDIR=1;
13716 HAVE_SCANDIR=1;
13717 HAVE_ALPHASORT=1;
13718 REPLACE_OPENDIR=0;
13719 REPLACE_CLOSEDIR=0;
13720 REPLACE_DIRFD=0;
13721 REPLACE_FDOPENDIR=0;
13722
13723
13724
13725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
13726 $as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
13727 if ${gl_cv_have_include_next+:} false; then :
13728 $as_echo_n "(cached) " >&6
13729 else
13730 rm -rf conftestd1a conftestd1b conftestd2
13731 mkdir conftestd1a conftestd1b conftestd2
13732 cat <<EOF > conftestd1a/conftest.h
13733 #define DEFINED_IN_CONFTESTD1
13734 #include_next <conftest.h>
13735 #ifdef DEFINED_IN_CONFTESTD2
13736 int foo;
13737 #else
13738 #error "include_next doesn't work"
13739 #endif
13740 EOF
13741 cat <<EOF > conftestd1b/conftest.h
13742 #define DEFINED_IN_CONFTESTD1
13743 #include <stdio.h>
13744 #include_next <conftest.h>
13745 #ifdef DEFINED_IN_CONFTESTD2
13746 int foo;
13747 #else
13748 #error "include_next doesn't work"
13749 #endif
13750 EOF
13751 cat <<EOF > conftestd2/conftest.h
13752 #ifndef DEFINED_IN_CONFTESTD1
13753 #error "include_next test doesn't work"
13754 #endif
13755 #define DEFINED_IN_CONFTESTD2
13756 EOF
13757 gl_save_CPPFLAGS="$CPPFLAGS"
13758 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
13759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13760 /* end confdefs.h. */
13761 #include <conftest.h>
13762 _ACEOF
13763 if ac_fn_c_try_compile "$LINENO"; then :
13764 gl_cv_have_include_next=yes
13765 else
13766 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
13767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13768 /* end confdefs.h. */
13769 #include <conftest.h>
13770 _ACEOF
13771 if ac_fn_c_try_compile "$LINENO"; then :
13772 gl_cv_have_include_next=buggy
13773 else
13774 gl_cv_have_include_next=no
13775 fi
13776 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13777
13778 fi
13779 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13780 CPPFLAGS="$gl_save_CPPFLAGS"
13781 rm -rf conftestd1a conftestd1b conftestd2
13782
13783 fi
13784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
13785 $as_echo "$gl_cv_have_include_next" >&6; }
13786 PRAGMA_SYSTEM_HEADER=
13787 if test $gl_cv_have_include_next = yes; then
13788 INCLUDE_NEXT=include_next
13789 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
13790 if test -n "$GCC"; then
13791 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
13792 fi
13793 else
13794 if test $gl_cv_have_include_next = buggy; then
13795 INCLUDE_NEXT=include
13796 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
13797 else
13798 INCLUDE_NEXT=include
13799 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
13800 fi
13801 fi
13802
13803
13804
13805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
13806 $as_echo_n "checking whether system header files limit the line length... " >&6; }
13807 if ${gl_cv_pragma_columns+:} false; then :
13808 $as_echo_n "(cached) " >&6
13809 else
13810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13811 /* end confdefs.h. */
13812
13813 #ifdef __TANDEM
13814 choke me
13815 #endif
13816
13817 _ACEOF
13818 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13819 $EGREP "choke me" >/dev/null 2>&1; then :
13820 gl_cv_pragma_columns=yes
13821 else
13822 gl_cv_pragma_columns=no
13823 fi
13824 rm -f conftest*
13825
13826
13827 fi
13828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
13829 $as_echo "$gl_cv_pragma_columns" >&6; }
13830 if test $gl_cv_pragma_columns = yes; then
13831 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
13832 else
13833 PRAGMA_COLUMNS=
13834 fi
13835
13836
13837
13838
13839
13840
13841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
13842 $as_echo_n "checking whether // is distinct from /... " >&6; }
13843 if ${gl_cv_double_slash_root+:} false; then :
13844 $as_echo_n "(cached) " >&6
13845 else
13846 if test x"$cross_compiling" = xyes ; then
13847 # When cross-compiling, there is no way to tell whether // is special
13848 # short of a list of hosts. However, the only known hosts to date
13849 # that have a distinct // are Apollo DomainOS (too old to port to),
13850 # Cygwin, and z/OS. If anyone knows of another system for which // has
13851 # special semantics and is distinct from /, please report it to
13852 # <bug-gnulib@gnu.org>.
13853 case $host in
13854 *-cygwin | i370-ibm-openedition)
13855 gl_cv_double_slash_root=yes ;;
13856 *)
13857 # Be optimistic and assume that / and // are the same when we
13858 # don't know.
13859 gl_cv_double_slash_root='unknown, assuming no' ;;
13860 esac
13861 else
13862 set x `ls -di / // 2>/dev/null`
13863 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
13864 gl_cv_double_slash_root=no
13865 else
13866 gl_cv_double_slash_root=yes
13867 fi
13868 fi
13869 fi
13870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
13871 $as_echo "$gl_cv_double_slash_root" >&6; }
13872 if test "$gl_cv_double_slash_root" = yes; then
13873
13874 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
13875
13876 fi
13877
13878
13879
13880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
13881 $as_echo_n "checking for complete errno.h... " >&6; }
13882 if ${gl_cv_header_errno_h_complete+:} false; then :
13883 $as_echo_n "(cached) " >&6
13884 else
13885
13886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13887 /* end confdefs.h. */
13888
13889 #include <errno.h>
13890 #if !defined ETXTBSY
13891 booboo
13892 #endif
13893 #if !defined ENOMSG
13894 booboo
13895 #endif
13896 #if !defined EIDRM
13897 booboo
13898 #endif
13899 #if !defined ENOLINK
13900 booboo
13901 #endif
13902 #if !defined EPROTO
13903 booboo
13904 #endif
13905 #if !defined EMULTIHOP
13906 booboo
13907 #endif
13908 #if !defined EBADMSG
13909 booboo
13910 #endif
13911 #if !defined EOVERFLOW
13912 booboo
13913 #endif
13914 #if !defined ENOTSUP
13915 booboo
13916 #endif
13917 #if !defined ENETRESET
13918 booboo
13919 #endif
13920 #if !defined ECONNABORTED
13921 booboo
13922 #endif
13923 #if !defined ESTALE
13924 booboo
13925 #endif
13926 #if !defined EDQUOT
13927 booboo
13928 #endif
13929 #if !defined ECANCELED
13930 booboo
13931 #endif
13932 #if !defined EOWNERDEAD
13933 booboo
13934 #endif
13935 #if !defined ENOTRECOVERABLE
13936 booboo
13937 #endif
13938 #if !defined EILSEQ
13939 booboo
13940 #endif
13941
13942 _ACEOF
13943 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13944 $EGREP "booboo" >/dev/null 2>&1; then :
13945 gl_cv_header_errno_h_complete=no
13946 else
13947 gl_cv_header_errno_h_complete=yes
13948 fi
13949 rm -f conftest*
13950
13951
13952 fi
13953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
13954 $as_echo "$gl_cv_header_errno_h_complete" >&6; }
13955 if test $gl_cv_header_errno_h_complete = yes; then
13956 ERRNO_H=''
13957 else
13958
13959
13960
13961
13962
13963
13964
13965
13966 if test $gl_cv_have_include_next = yes; then
13967 gl_cv_next_errno_h='<'errno.h'>'
13968 else
13969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
13970 $as_echo_n "checking absolute name of <errno.h>... " >&6; }
13971 if ${gl_cv_next_errno_h+:} false; then :
13972 $as_echo_n "(cached) " >&6
13973 else
13974
13975
13976
13977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13978 /* end confdefs.h. */
13979 #include <errno.h>
13980 _ACEOF
13981 case "$host_os" in
13982 aix*) gl_absname_cpp="$ac_cpp -C" ;;
13983 *) gl_absname_cpp="$ac_cpp" ;;
13984 esac
13985
13986 case "$host_os" in
13987 mingw*)
13988 gl_dirsep_regex='[/\\]'
13989 ;;
13990 *)
13991 gl_dirsep_regex='\/'
13992 ;;
13993 esac
13994 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13995 gl_header_literal_regex=`echo 'errno.h' \
13996 | sed -e "$gl_make_literal_regex_sed"`
13997 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13998 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13999 s|^/[^/]|//&|
14000 p
14001 q
14002 }'
14003
14004 gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14005 sed -n "$gl_absolute_header_sed"`
14006
14007 gl_header=$gl_cv_absolute_errno_h
14008 gl_cv_next_errno_h='"'$gl_header'"'
14009
14010
14011 fi
14012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
14013 $as_echo "$gl_cv_next_errno_h" >&6; }
14014 fi
14015 NEXT_ERRNO_H=$gl_cv_next_errno_h
14016
14017 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14018 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14019 gl_next_as_first_directive='<'errno.h'>'
14020 else
14021 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14022 gl_next_as_first_directive=$gl_cv_next_errno_h
14023 fi
14024 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
14025
14026
14027
14028
14029 ERRNO_H='errno.h'
14030 fi
14031
14032 if test -n "$ERRNO_H"; then
14033 GL_GENERATE_ERRNO_H_TRUE=
14034 GL_GENERATE_ERRNO_H_FALSE='#'
14035 else
14036 GL_GENERATE_ERRNO_H_TRUE='#'
14037 GL_GENERATE_ERRNO_H_FALSE=
14038 fi
14039
14040
14041 if test -n "$ERRNO_H"; then
14042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
14043 $as_echo_n "checking for EMULTIHOP value... " >&6; }
14044 if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then :
14045 $as_echo_n "(cached) " >&6
14046 else
14047
14048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14049 /* end confdefs.h. */
14050
14051 #include <errno.h>
14052 #ifdef EMULTIHOP
14053 yes
14054 #endif
14055
14056 _ACEOF
14057 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14058 $EGREP "yes" >/dev/null 2>&1; then :
14059 gl_cv_header_errno_h_EMULTIHOP=yes
14060 else
14061 gl_cv_header_errno_h_EMULTIHOP=no
14062 fi
14063 rm -f conftest*
14064
14065 if test $gl_cv_header_errno_h_EMULTIHOP = no; then
14066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14067 /* end confdefs.h. */
14068
14069 #define _XOPEN_SOURCE_EXTENDED 1
14070 #include <errno.h>
14071 #ifdef EMULTIHOP
14072 yes
14073 #endif
14074
14075 _ACEOF
14076 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14077 $EGREP "yes" >/dev/null 2>&1; then :
14078 gl_cv_header_errno_h_EMULTIHOP=hidden
14079 fi
14080 rm -f conftest*
14081
14082 if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
14083 if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
14084 #define _XOPEN_SOURCE_EXTENDED 1
14085 #include <errno.h>
14086 /* The following two lines are a workaround against an autoconf-2.52 bug. */
14087 #include <stdio.h>
14088 #include <stdlib.h>
14089 "; then :
14090
14091 fi
14092
14093 fi
14094 fi
14095
14096 fi
14097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
14098 $as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
14099 case $gl_cv_header_errno_h_EMULTIHOP in
14100 yes | no)
14101 EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
14102 ;;
14103 *)
14104 EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
14105 ;;
14106 esac
14107
14108
14109 fi
14110
14111
14112 if test -n "$ERRNO_H"; then
14113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
14114 $as_echo_n "checking for ENOLINK value... " >&6; }
14115 if ${gl_cv_header_errno_h_ENOLINK+:} false; then :
14116 $as_echo_n "(cached) " >&6
14117 else
14118
14119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14120 /* end confdefs.h. */
14121
14122 #include <errno.h>
14123 #ifdef ENOLINK
14124 yes
14125 #endif
14126
14127 _ACEOF
14128 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14129 $EGREP "yes" >/dev/null 2>&1; then :
14130 gl_cv_header_errno_h_ENOLINK=yes
14131 else
14132 gl_cv_header_errno_h_ENOLINK=no
14133 fi
14134 rm -f conftest*
14135
14136 if test $gl_cv_header_errno_h_ENOLINK = no; then
14137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14138 /* end confdefs.h. */
14139
14140 #define _XOPEN_SOURCE_EXTENDED 1
14141 #include <errno.h>
14142 #ifdef ENOLINK
14143 yes
14144 #endif
14145
14146 _ACEOF
14147 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14148 $EGREP "yes" >/dev/null 2>&1; then :
14149 gl_cv_header_errno_h_ENOLINK=hidden
14150 fi
14151 rm -f conftest*
14152
14153 if test $gl_cv_header_errno_h_ENOLINK = hidden; then
14154 if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
14155 #define _XOPEN_SOURCE_EXTENDED 1
14156 #include <errno.h>
14157 /* The following two lines are a workaround against an autoconf-2.52 bug. */
14158 #include <stdio.h>
14159 #include <stdlib.h>
14160 "; then :
14161
14162 fi
14163
14164 fi
14165 fi
14166
14167 fi
14168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
14169 $as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
14170 case $gl_cv_header_errno_h_ENOLINK in
14171 yes | no)
14172 ENOLINK_HIDDEN=0; ENOLINK_VALUE=
14173 ;;
14174 *)
14175 ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
14176 ;;
14177 esac
14178
14179
14180 fi
14181
14182
14183 if test -n "$ERRNO_H"; then
14184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
14185 $as_echo_n "checking for EOVERFLOW value... " >&6; }
14186 if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then :
14187 $as_echo_n "(cached) " >&6
14188 else
14189
14190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14191 /* end confdefs.h. */
14192
14193 #include <errno.h>
14194 #ifdef EOVERFLOW
14195 yes
14196 #endif
14197
14198 _ACEOF
14199 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14200 $EGREP "yes" >/dev/null 2>&1; then :
14201 gl_cv_header_errno_h_EOVERFLOW=yes
14202 else
14203 gl_cv_header_errno_h_EOVERFLOW=no
14204 fi
14205 rm -f conftest*
14206
14207 if test $gl_cv_header_errno_h_EOVERFLOW = no; then
14208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14209 /* end confdefs.h. */
14210
14211 #define _XOPEN_SOURCE_EXTENDED 1
14212 #include <errno.h>
14213 #ifdef EOVERFLOW
14214 yes
14215 #endif
14216
14217 _ACEOF
14218 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14219 $EGREP "yes" >/dev/null 2>&1; then :
14220 gl_cv_header_errno_h_EOVERFLOW=hidden
14221 fi
14222 rm -f conftest*
14223
14224 if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
14225 if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
14226 #define _XOPEN_SOURCE_EXTENDED 1
14227 #include <errno.h>
14228 /* The following two lines are a workaround against an autoconf-2.52 bug. */
14229 #include <stdio.h>
14230 #include <stdlib.h>
14231 "; then :
14232
14233 fi
14234
14235 fi
14236 fi
14237
14238 fi
14239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
14240 $as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
14241 case $gl_cv_header_errno_h_EOVERFLOW in
14242 yes | no)
14243 EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
14244 ;;
14245 *)
14246 EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
14247 ;;
14248 esac
14249
14250
14251 fi
14252
14253
14254
14255
14256
14257 ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default"
14258 if test "x$ac_cv_have_decl_fchdir" = xyes; then :
14259 ac_have_decl=1
14260 else
14261 ac_have_decl=0
14262 fi
14263
14264 cat >>confdefs.h <<_ACEOF
14265 #define HAVE_DECL_FCHDIR $ac_have_decl
14266 _ACEOF
14267
14268
14269 GNULIB_FCNTL=0;
14270 GNULIB_NONBLOCKING=0;
14271 GNULIB_OPEN=0;
14272 GNULIB_OPENAT=0;
14273 HAVE_FCNTL=1;
14274 HAVE_OPENAT=1;
14275 REPLACE_FCNTL=0;
14276 REPLACE_OPEN=0;
14277 REPLACE_OPENAT=0;
14278
14279
14280
14281
14282
14283
14284
14285
14286
14287
14288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
14289 $as_echo_n "checking for working fcntl.h... " >&6; }
14290 if ${gl_cv_header_working_fcntl_h+:} false; then :
14291 $as_echo_n "(cached) " >&6
14292 else
14293 if test "$cross_compiling" = yes; then :
14294 case "$host_os" in
14295 # Guess 'no' on native Windows.
14296 mingw*) gl_cv_header_working_fcntl_h='no' ;;
14297 *) gl_cv_header_working_fcntl_h=cross-compiling ;;
14298 esac
14299
14300 else
14301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14302 /* end confdefs.h. */
14303 #include <sys/types.h>
14304 #include <sys/stat.h>
14305 #if HAVE_UNISTD_H
14306 # include <unistd.h>
14307 #else /* on Windows with MSVC */
14308 # include <io.h>
14309 # include <stdlib.h>
14310 # defined sleep(n) _sleep ((n) * 1000)
14311 #endif
14312 #include <fcntl.h>
14313 #ifndef O_NOATIME
14314 #define O_NOATIME 0
14315 #endif
14316 #ifndef O_NOFOLLOW
14317 #define O_NOFOLLOW 0
14318 #endif
14319 static int const constants[] =
14320 {
14321 O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
14322 O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
14323 };
14324
14325 int
14326 main (void)
14327 {
14328
14329 int result = !constants;
14330 #if HAVE_SYMLINK
14331 {
14332 static char const sym[] = "conftest.sym";
14333 if (symlink ("/dev/null", sym) != 0)
14334 result |= 2;
14335 else
14336 {
14337 int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
14338 if (fd >= 0)
14339 {
14340 close (fd);
14341 result |= 4;
14342 }
14343 }
14344 if (unlink (sym) != 0 || symlink (".", sym) != 0)
14345 result |= 2;
14346 else
14347 {
14348 int fd = open (sym, O_RDONLY | O_NOFOLLOW);
14349 if (fd >= 0)
14350 {
14351 close (fd);
14352 result |= 4;
14353 }
14354 }
14355 unlink (sym);
14356 }
14357 #endif
14358 {
14359 static char const file[] = "confdefs.h";
14360 int fd = open (file, O_RDONLY | O_NOATIME);
14361 if (fd < 0)
14362 result |= 8;
14363 else
14364 {
14365 struct stat st0;
14366 if (fstat (fd, &st0) != 0)
14367 result |= 16;
14368 else
14369 {
14370 char c;
14371 sleep (1);
14372 if (read (fd, &c, 1) != 1)
14373 result |= 24;
14374 else
14375 {
14376 if (close (fd) != 0)
14377 result |= 32;
14378 else
14379 {
14380 struct stat st1;
14381 if (stat (file, &st1) != 0)
14382 result |= 40;
14383 else
14384 if (st0.st_atime != st1.st_atime)
14385 result |= 64;
14386 }
14387 }
14388 }
14389 }
14390 }
14391 return result;
14392 ;
14393 return 0;
14394 }
14395 _ACEOF
14396 if ac_fn_c_try_run "$LINENO"; then :
14397 gl_cv_header_working_fcntl_h=yes
14398 else
14399 case $? in #(
14400 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
14401 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
14402 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
14403 *) gl_cv_header_working_fcntl_h='no';;
14404 esac
14405 fi
14406 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14407 conftest.$ac_objext conftest.beam conftest.$ac_ext
14408 fi
14409
14410
14411 fi
14412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
14413 $as_echo "$gl_cv_header_working_fcntl_h" >&6; }
14414
14415 case $gl_cv_header_working_fcntl_h in #(
14416 *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
14417 *) ac_val=1;;
14418 esac
14419
14420 cat >>confdefs.h <<_ACEOF
14421 #define HAVE_WORKING_O_NOATIME $ac_val
14422 _ACEOF
14423
14424
14425 case $gl_cv_header_working_fcntl_h in #(
14426 *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
14427 *) ac_val=1;;
14428 esac
14429
14430 cat >>confdefs.h <<_ACEOF
14431 #define HAVE_WORKING_O_NOFOLLOW $ac_val
14432 _ACEOF
14433
14434
14435 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
14436 if test "x$ac_cv_type_pid_t" = xyes; then :
14437
14438 else
14439
14440 cat >>confdefs.h <<_ACEOF
14441 #define pid_t int
14442 _ACEOF
14443
14444 fi
14445
14446 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
14447 if test "x$ac_cv_type_mode_t" = xyes; then :
14448
14449 else
14450
14451 cat >>confdefs.h <<_ACEOF
14452 #define mode_t int
14453 _ACEOF
14454
14455 fi
14456
14457
14458
14459
14460 GNULIB_FNMATCH=0;
14461 HAVE_FNMATCH=1;
14462 REPLACE_FNMATCH=0;
14463
14464
14465
14466
14467
14468
14469
14470
14471
14472
14473
14474
14475
14476
14477
14478
14479 if test $gl_cv_have_include_next = yes; then
14480 gl_cv_next_fnmatch_h='<'fnmatch.h'>'
14481 else
14482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fnmatch.h>" >&5
14483 $as_echo_n "checking absolute name of <fnmatch.h>... " >&6; }
14484 if ${gl_cv_next_fnmatch_h+:} false; then :
14485 $as_echo_n "(cached) " >&6
14486 else
14487
14488 if test $ac_cv_header_fnmatch_h = yes; then
14489
14490
14491
14492
14493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14494 /* end confdefs.h. */
14495 #include <fnmatch.h>
14496 _ACEOF
14497 case "$host_os" in
14498 aix*) gl_absname_cpp="$ac_cpp -C" ;;
14499 *) gl_absname_cpp="$ac_cpp" ;;
14500 esac
14501
14502 case "$host_os" in
14503 mingw*)
14504 gl_dirsep_regex='[/\\]'
14505 ;;
14506 *)
14507 gl_dirsep_regex='\/'
14508 ;;
14509 esac
14510 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
14511 gl_header_literal_regex=`echo 'fnmatch.h' \
14512 | sed -e "$gl_make_literal_regex_sed"`
14513 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14514 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14515 s|^/[^/]|//&|
14516 p
14517 q
14518 }'
14519
14520 gl_cv_absolute_fnmatch_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14521 sed -n "$gl_absolute_header_sed"`
14522
14523 gl_header=$gl_cv_absolute_fnmatch_h
14524 gl_cv_next_fnmatch_h='"'$gl_header'"'
14525 else
14526 gl_cv_next_fnmatch_h='<'fnmatch.h'>'
14527 fi
14528
14529
14530 fi
14531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fnmatch_h" >&5
14532 $as_echo "$gl_cv_next_fnmatch_h" >&6; }
14533 fi
14534 NEXT_FNMATCH_H=$gl_cv_next_fnmatch_h
14535
14536 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14537 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14538 gl_next_as_first_directive='<'fnmatch.h'>'
14539 else
14540 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14541 gl_next_as_first_directive=$gl_cv_next_fnmatch_h
14542 fi
14543 NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H=$gl_next_as_first_directive
14544
14545
14546
14547
14548
14549
14550
14551 if test $ac_cv_header_fnmatch_h = yes; then
14552 HAVE_FNMATCH_H=1
14553 else
14554 HAVE_FNMATCH_H=0
14555 fi
14556
14557
14558 FNMATCH_H=''
14559 if false; then
14560 FNMATCH_H=fnmatch.h
14561 else
14562 if test $ac_cv_header_fnmatch_h != yes; then
14563 FNMATCH_H=fnmatch.h
14564 fi
14565 fi
14566
14567
14568 if test -n "$FNMATCH_H"; then
14569 GL_GENERATE_FNMATCH_H_TRUE=
14570 GL_GENERATE_FNMATCH_H_FALSE='#'
14571 else
14572 GL_GENERATE_FNMATCH_H_TRUE='#'
14573 GL_GENERATE_FNMATCH_H_FALSE=
14574 fi
14575
14576
14577
14578
14579
14580
14581
14582
14583
14584
14585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
14586 $as_echo_n "checking for mbstate_t... " >&6; }
14587 if ${ac_cv_type_mbstate_t+:} false; then :
14588 $as_echo_n "(cached) " >&6
14589 else
14590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14591 /* end confdefs.h. */
14592 $ac_includes_default
14593 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
14594 <wchar.h>.
14595 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
14596 included before <wchar.h>. */
14597 #include <stddef.h>
14598 #include <stdio.h>
14599 #include <time.h>
14600 #include <wchar.h>
14601 int
14602 main (void)
14603 {
14604 mbstate_t x; return sizeof x;
14605 ;
14606 return 0;
14607 }
14608 _ACEOF
14609 if ac_fn_c_try_compile "$LINENO"; then :
14610 ac_cv_type_mbstate_t=yes
14611 else
14612 ac_cv_type_mbstate_t=no
14613 fi
14614 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14615 fi
14616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
14617 $as_echo "$ac_cv_type_mbstate_t" >&6; }
14618 if test $ac_cv_type_mbstate_t = yes; then
14619
14620 $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
14621
14622 else
14623
14624 $as_echo "#define mbstate_t int" >>confdefs.h
14625
14626 fi
14627
14628
14629
14630
14631
14632
14633
14634
14635
14636
14637
14638
14639
14640
14641
14642
14643 GNULIB_FCHMODAT=0;
14644 GNULIB_FSTAT=0;
14645 GNULIB_FSTATAT=0;
14646 GNULIB_FUTIMENS=0;
14647 GNULIB_LCHMOD=0;
14648 GNULIB_LSTAT=0;
14649 GNULIB_MKDIRAT=0;
14650 GNULIB_MKFIFO=0;
14651 GNULIB_MKFIFOAT=0;
14652 GNULIB_MKNOD=0;
14653 GNULIB_MKNODAT=0;
14654 GNULIB_STAT=0;
14655 GNULIB_UTIMENSAT=0;
14656 GNULIB_OVERRIDES_STRUCT_STAT=0;
14657 HAVE_FCHMODAT=1;
14658 HAVE_FSTATAT=1;
14659 HAVE_FUTIMENS=1;
14660 HAVE_LCHMOD=1;
14661 HAVE_LSTAT=1;
14662 HAVE_MKDIRAT=1;
14663 HAVE_MKFIFO=1;
14664 HAVE_MKFIFOAT=1;
14665 HAVE_MKNOD=1;
14666 HAVE_MKNODAT=1;
14667 HAVE_UTIMENSAT=1;
14668 REPLACE_FSTAT=0;
14669 REPLACE_FSTATAT=0;
14670 REPLACE_FUTIMENS=0;
14671 REPLACE_LSTAT=0;
14672 REPLACE_MKDIR=0;
14673 REPLACE_MKFIFO=0;
14674 REPLACE_MKNOD=0;
14675 REPLACE_STAT=0;
14676 REPLACE_UTIMENSAT=0;
14677
14678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
14679 $as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
14680 if ${ac_cv_header_stat_broken+:} false; then :
14681 $as_echo_n "(cached) " >&6
14682 else
14683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14684 /* end confdefs.h. */
14685 #include <sys/types.h>
14686 #include <sys/stat.h>
14687
14688 #if defined S_ISBLK && defined S_IFDIR
14689 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
14690 #endif
14691
14692 #if defined S_ISBLK && defined S_IFCHR
14693 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
14694 #endif
14695
14696 #if defined S_ISLNK && defined S_IFREG
14697 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
14698 #endif
14699
14700 #if defined S_ISSOCK && defined S_IFREG
14701 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
14702 #endif
14703
14704 _ACEOF
14705 if ac_fn_c_try_compile "$LINENO"; then :
14706 ac_cv_header_stat_broken=no
14707 else
14708 ac_cv_header_stat_broken=yes
14709 fi
14710 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14711 fi
14712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
14713 $as_echo "$ac_cv_header_stat_broken" >&6; }
14714 if test $ac_cv_header_stat_broken = yes; then
14715
14716 $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
14717
14718 fi
14719
14720
14721
14722
14723
14724 case "$host_os" in
14725 mingw*)
14726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
14727 $as_echo_n "checking for 64-bit off_t... " >&6; }
14728 if ${gl_cv_type_off_t_64+:} false; then :
14729 $as_echo_n "(cached) " >&6
14730 else
14731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14732 /* end confdefs.h. */
14733 #include <sys/types.h>
14734 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
14735
14736 int
14737 main (void)
14738 {
14739
14740 ;
14741 return 0;
14742 }
14743 _ACEOF
14744 if ac_fn_c_try_compile "$LINENO"; then :
14745 gl_cv_type_off_t_64=yes
14746 else
14747 gl_cv_type_off_t_64=no
14748 fi
14749 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14750
14751 fi
14752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
14753 $as_echo "$gl_cv_type_off_t_64" >&6; }
14754 if test $gl_cv_type_off_t_64 = no; then
14755 WINDOWS_64_BIT_OFF_T=1
14756 else
14757 WINDOWS_64_BIT_OFF_T=0
14758 fi
14759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit st_size" >&5
14760 $as_echo_n "checking for 64-bit st_size... " >&6; }
14761 if ${gl_cv_member_st_size_64+:} false; then :
14762 $as_echo_n "(cached) " >&6
14763 else
14764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14765 /* end confdefs.h. */
14766 #include <sys/types.h>
14767 struct stat buf;
14768 int verify_st_size_size[sizeof (buf.st_size) >= 8 ? 1 : -1];
14769
14770 int
14771 main (void)
14772 {
14773
14774 ;
14775 return 0;
14776 }
14777 _ACEOF
14778 if ac_fn_c_try_compile "$LINENO"; then :
14779 gl_cv_member_st_size_64=yes
14780 else
14781 gl_cv_member_st_size_64=no
14782 fi
14783 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14784
14785 fi
14786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_member_st_size_64" >&5
14787 $as_echo "$gl_cv_member_st_size_64" >&6; }
14788 if test $gl_cv_member_st_size_64 = no; then
14789 WINDOWS_64_BIT_ST_SIZE=1
14790 else
14791 WINDOWS_64_BIT_ST_SIZE=0
14792 fi
14793 ;;
14794 *)
14795 WINDOWS_64_BIT_OFF_T=0
14796 WINDOWS_64_BIT_ST_SIZE=0
14797 ;;
14798 esac
14799
14800
14801
14802
14803
14804
14805
14806
14807
14808
14809
14810
14811
14812
14813
14814 if test $gl_cv_have_include_next = yes; then
14815 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
14816 else
14817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
14818 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
14819 if ${gl_cv_next_sys_stat_h+:} false; then :
14820 $as_echo_n "(cached) " >&6
14821 else
14822
14823 if test $ac_cv_header_sys_stat_h = yes; then
14824
14825
14826
14827
14828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14829 /* end confdefs.h. */
14830 #include <sys/stat.h>
14831 _ACEOF
14832 case "$host_os" in
14833 aix*) gl_absname_cpp="$ac_cpp -C" ;;
14834 *) gl_absname_cpp="$ac_cpp" ;;
14835 esac
14836
14837 case "$host_os" in
14838 mingw*)
14839 gl_dirsep_regex='[/\\]'
14840 ;;
14841 *)
14842 gl_dirsep_regex='\/'
14843 ;;
14844 esac
14845 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
14846 gl_header_literal_regex=`echo 'sys/stat.h' \
14847 | sed -e "$gl_make_literal_regex_sed"`
14848 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14849 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14850 s|^/[^/]|//&|
14851 p
14852 q
14853 }'
14854
14855 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14856 sed -n "$gl_absolute_header_sed"`
14857
14858 gl_header=$gl_cv_absolute_sys_stat_h
14859 gl_cv_next_sys_stat_h='"'$gl_header'"'
14860 else
14861 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
14862 fi
14863
14864
14865 fi
14866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
14867 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
14868 fi
14869 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
14870
14871 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14872 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14873 gl_next_as_first_directive='<'sys/stat.h'>'
14874 else
14875 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14876 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
14877 fi
14878 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
14879
14880
14881
14882
14883
14884
14885
14886
14887 WINDOWS_STAT_TIMESPEC=0
14888
14889
14890
14891
14892
14893
14894
14895
14896 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
14897 #include <sys/stat.h>
14898 "
14899 if test "x$ac_cv_type_nlink_t" = xyes; then :
14900
14901 else
14902
14903 $as_echo "#define nlink_t int" >>confdefs.h
14904
14905 fi
14906
14907
14908
14909
14910
14911
14912
14913
14914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
14915 $as_echo_n "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
14916 if ${gl_cv_func_getcwd_null+:} false; then :
14917 $as_echo_n "(cached) " >&6
14918 else
14919 if test "$cross_compiling" = yes; then :
14920 case "$host_os" in
14921 # Guess yes on glibc systems.
14922 *-gnu* | gnu*) gl_cv_func_getcwd_null="guessing yes";;
14923 # Guess yes on Cygwin.
14924 cygwin*) gl_cv_func_getcwd_null="guessing yes";;
14925 # If we don't know, assume the worst.
14926 *) gl_cv_func_getcwd_null="guessing no";;
14927 esac
14928
14929 else
14930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14931 /* end confdefs.h. */
14932
14933 # include <stdlib.h>
14934 # if HAVE_UNISTD_H
14935 # include <unistd.h>
14936 # else /* on Windows with MSVC */
14937 # include <direct.h>
14938 # endif
14939 # ifndef getcwd
14940 char *getcwd ();
14941 # endif
14942
14943 int
14944 main (void)
14945 {
14946
14947 #if defined _WIN32 && ! defined __CYGWIN__
14948 /* mingw cwd does not start with '/', but getcwd does allocate.
14949 However, mingw fails to honor non-zero size. */
14950 #else
14951 if (chdir ("/") != 0)
14952 return 1;
14953 else
14954 {
14955 char *f = getcwd (NULL, 0);
14956 if (! f)
14957 return 2;
14958 if (f[0] != '/')
14959 { free (f); return 3; }
14960 if (f[1] != '\0')
14961 { free (f); return 4; }
14962 free (f);
14963 return 0;
14964 }
14965 #endif
14966
14967 ;
14968 return 0;
14969 }
14970 _ACEOF
14971 if ac_fn_c_try_run "$LINENO"; then :
14972 gl_cv_func_getcwd_null=yes
14973 else
14974 gl_cv_func_getcwd_null=no
14975 fi
14976 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14977 conftest.$ac_objext conftest.beam conftest.$ac_ext
14978 fi
14979
14980 fi
14981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
14982 $as_echo "$gl_cv_func_getcwd_null" >&6; }
14983
14984
14985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
14986 $as_echo_n "checking for getcwd with POSIX signature... " >&6; }
14987 if ${gl_cv_func_getcwd_posix_signature+:} false; then :
14988 $as_echo_n "(cached) " >&6
14989 else
14990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14991 /* end confdefs.h. */
14992 #include <unistd.h>
14993 int
14994 main (void)
14995 {
14996 extern
14997 #ifdef __cplusplus
14998 "C"
14999 #endif
15000 char *getcwd (char *, size_t);
15001
15002 ;
15003 return 0;
15004 }
15005
15006 _ACEOF
15007 if ac_fn_c_try_compile "$LINENO"; then :
15008 gl_cv_func_getcwd_posix_signature=yes
15009 else
15010 gl_cv_func_getcwd_posix_signature=no
15011 fi
15012 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15013
15014 fi
15015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
15016 $as_echo "$gl_cv_func_getcwd_posix_signature" >&6; }
15017
15018
15019 GNULIB_DPRINTF=0;
15020 GNULIB_FCLOSE=0;
15021 GNULIB_FDOPEN=0;
15022 GNULIB_FFLUSH=0;
15023 GNULIB_FGETC=0;
15024 GNULIB_FGETS=0;
15025 GNULIB_FOPEN=0;
15026 GNULIB_FPRINTF=0;
15027 GNULIB_FPRINTF_POSIX=0;
15028 GNULIB_FPURGE=0;
15029 GNULIB_FPUTC=0;
15030 GNULIB_FPUTS=0;
15031 GNULIB_FREAD=0;
15032 GNULIB_FREOPEN=0;
15033 GNULIB_FSCANF=0;
15034 GNULIB_FSEEK=0;
15035 GNULIB_FSEEKO=0;
15036 GNULIB_FTELL=0;
15037 GNULIB_FTELLO=0;
15038 GNULIB_FWRITE=0;
15039 GNULIB_GETC=0;
15040 GNULIB_GETCHAR=0;
15041 GNULIB_GETDELIM=0;
15042 GNULIB_GETLINE=0;
15043 GNULIB_OBSTACK_PRINTF=0;
15044 GNULIB_OBSTACK_PRINTF_POSIX=0;
15045 GNULIB_PCLOSE=0;
15046 GNULIB_PERROR=0;
15047 GNULIB_POPEN=0;
15048 GNULIB_PRINTF=0;
15049 GNULIB_PRINTF_POSIX=0;
15050 GNULIB_PUTC=0;
15051 GNULIB_PUTCHAR=0;
15052 GNULIB_PUTS=0;
15053 GNULIB_REMOVE=0;
15054 GNULIB_RENAME=0;
15055 GNULIB_RENAMEAT=0;
15056 GNULIB_SCANF=0;
15057 GNULIB_SNPRINTF=0;
15058 GNULIB_SPRINTF_POSIX=0;
15059 GNULIB_STDIO_H_NONBLOCKING=0;
15060 GNULIB_STDIO_H_SIGPIPE=0;
15061 GNULIB_TMPFILE=0;
15062 GNULIB_VASPRINTF=0;
15063 GNULIB_VFSCANF=0;
15064 GNULIB_VSCANF=0;
15065 GNULIB_VDPRINTF=0;
15066 GNULIB_VFPRINTF=0;
15067 GNULIB_VFPRINTF_POSIX=0;
15068 GNULIB_VPRINTF=0;
15069 GNULIB_VPRINTF_POSIX=0;
15070 GNULIB_VSNPRINTF=0;
15071 GNULIB_VSPRINTF_POSIX=0;
15072 HAVE_DECL_FPURGE=1;
15073 HAVE_DECL_FSEEKO=1;
15074 HAVE_DECL_FTELLO=1;
15075 HAVE_DECL_GETDELIM=1;
15076 HAVE_DECL_GETLINE=1;
15077 HAVE_DECL_OBSTACK_PRINTF=1;
15078 HAVE_DECL_SNPRINTF=1;
15079 HAVE_DECL_VSNPRINTF=1;
15080 HAVE_DPRINTF=1;
15081 HAVE_FSEEKO=1;
15082 HAVE_FTELLO=1;
15083 HAVE_PCLOSE=1;
15084 HAVE_POPEN=1;
15085 HAVE_RENAMEAT=1;
15086 HAVE_VASPRINTF=1;
15087 HAVE_VDPRINTF=1;
15088 REPLACE_DPRINTF=0;
15089 REPLACE_FCLOSE=0;
15090 REPLACE_FDOPEN=0;
15091 REPLACE_FFLUSH=0;
15092 REPLACE_FOPEN=0;
15093 REPLACE_FPRINTF=0;
15094 REPLACE_FPURGE=0;
15095 REPLACE_FREOPEN=0;
15096 REPLACE_FSEEK=0;
15097 REPLACE_FSEEKO=0;
15098 REPLACE_FTELL=0;
15099 REPLACE_FTELLO=0;
15100 REPLACE_GETDELIM=0;
15101 REPLACE_GETLINE=0;
15102 REPLACE_OBSTACK_PRINTF=0;
15103 REPLACE_PERROR=0;
15104 REPLACE_POPEN=0;
15105 REPLACE_PRINTF=0;
15106 REPLACE_REMOVE=0;
15107 REPLACE_RENAME=0;
15108 REPLACE_RENAMEAT=0;
15109 REPLACE_SNPRINTF=0;
15110 REPLACE_SPRINTF=0;
15111 REPLACE_STDIO_READ_FUNCS=0;
15112 REPLACE_STDIO_WRITE_FUNCS=0;
15113 REPLACE_TMPFILE=0;
15114 REPLACE_VASPRINTF=0;
15115 REPLACE_VDPRINTF=0;
15116 REPLACE_VFPRINTF=0;
15117 REPLACE_VPRINTF=0;
15118 REPLACE_VSNPRINTF=0;
15119 REPLACE_VSPRINTF=0;
15120
15121 ac_fn_c_check_decl "$LINENO" "getdelim" "ac_cv_have_decl_getdelim" "$ac_includes_default"
15122 if test "x$ac_cv_have_decl_getdelim" = xyes; then :
15123 ac_have_decl=1
15124 else
15125 ac_have_decl=0
15126 fi
15127
15128 cat >>confdefs.h <<_ACEOF
15129 #define HAVE_DECL_GETDELIM $ac_have_decl
15130 _ACEOF
15131
15132
15133
15134
15135
15136 ac_fn_c_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default"
15137 if test "x$ac_cv_have_decl_getdtablesize" = xyes; then :
15138 ac_have_decl=1
15139 else
15140 ac_have_decl=0
15141 fi
15142
15143 cat >>confdefs.h <<_ACEOF
15144 #define HAVE_DECL_GETDTABLESIZE $ac_have_decl
15145 _ACEOF
15146
15147 ac_fn_c_check_decl "$LINENO" "getline" "ac_cv_have_decl_getline" "$ac_includes_default"
15148 if test "x$ac_cv_have_decl_getline" = xyes; then :
15149 ac_have_decl=1
15150 else
15151 ac_have_decl=0
15152 fi
15153
15154 cat >>confdefs.h <<_ACEOF
15155 #define HAVE_DECL_GETLINE $ac_have_decl
15156 _ACEOF
15157
15158
15159
15160
15161
15162
15163
15164
15165
15166
15167
15168
15169
15170
15171
15172
15173 if test $gl_cv_have_include_next = yes; then
15174 gl_cv_next_getopt_h='<'getopt.h'>'
15175 else
15176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
15177 $as_echo_n "checking absolute name of <getopt.h>... " >&6; }
15178 if ${gl_cv_next_getopt_h+:} false; then :
15179 $as_echo_n "(cached) " >&6
15180 else
15181
15182 if test $ac_cv_header_getopt_h = yes; then
15183
15184
15185
15186
15187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15188 /* end confdefs.h. */
15189 #include <getopt.h>
15190 _ACEOF
15191 case "$host_os" in
15192 aix*) gl_absname_cpp="$ac_cpp -C" ;;
15193 *) gl_absname_cpp="$ac_cpp" ;;
15194 esac
15195
15196 case "$host_os" in
15197 mingw*)
15198 gl_dirsep_regex='[/\\]'
15199 ;;
15200 *)
15201 gl_dirsep_regex='\/'
15202 ;;
15203 esac
15204 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15205 gl_header_literal_regex=`echo 'getopt.h' \
15206 | sed -e "$gl_make_literal_regex_sed"`
15207 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15208 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15209 s|^/[^/]|//&|
15210 p
15211 q
15212 }'
15213
15214 gl_cv_absolute_getopt_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15215 sed -n "$gl_absolute_header_sed"`
15216
15217 gl_header=$gl_cv_absolute_getopt_h
15218 gl_cv_next_getopt_h='"'$gl_header'"'
15219 else
15220 gl_cv_next_getopt_h='<'getopt.h'>'
15221 fi
15222
15223
15224 fi
15225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
15226 $as_echo "$gl_cv_next_getopt_h" >&6; }
15227 fi
15228 NEXT_GETOPT_H=$gl_cv_next_getopt_h
15229
15230 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15231 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15232 gl_next_as_first_directive='<'getopt.h'>'
15233 else
15234 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15235 gl_next_as_first_directive=$gl_cv_next_getopt_h
15236 fi
15237 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
15238
15239
15240
15241
15242 if test $ac_cv_header_getopt_h = yes; then
15243 HAVE_GETOPT_H=1
15244 else
15245 HAVE_GETOPT_H=0
15246 fi
15247
15248
15249 gl_replace_getopt=
15250
15251 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
15252 for ac_header in getopt.h
15253 do :
15254 ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
15255 if test "x$ac_cv_header_getopt_h" = xyes; then :
15256 cat >>confdefs.h <<_ACEOF
15257 #define HAVE_GETOPT_H 1
15258 _ACEOF
15259
15260 else
15261 gl_replace_getopt=yes
15262 fi
15263
15264 done
15265
15266 fi
15267
15268 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
15269 for ac_func in getopt_long_only
15270 do :
15271 ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
15272 if test "x$ac_cv_func_getopt_long_only" = xyes; then :
15273 cat >>confdefs.h <<_ACEOF
15274 #define HAVE_GETOPT_LONG_ONLY 1
15275 _ACEOF
15276
15277 else
15278 gl_replace_getopt=yes
15279 fi
15280 done
15281
15282 fi
15283
15284 if test -z "$gl_replace_getopt"; then
15285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
15286 $as_echo_n "checking whether getopt is POSIX compatible... " >&6; }
15287 if ${gl_cv_func_getopt_posix+:} false; then :
15288 $as_echo_n "(cached) " >&6
15289 else
15290
15291 if test $cross_compiling = no; then
15292 if test "$cross_compiling" = yes; then :
15293 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15294 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15295 as_fn_error $? "cannot run test program while cross compiling
15296 See \`config.log' for more details" "$LINENO" 5; }
15297 else
15298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15299 /* end confdefs.h. */
15300
15301 #include <unistd.h>
15302 #include <stdlib.h>
15303 #include <string.h>
15304
15305 int
15306 main ()
15307 {
15308 static char program[] = "program";
15309 static char a[] = "-a";
15310 static char foo[] = "foo";
15311 static char bar[] = "bar";
15312 char *argv[] = { program, a, foo, bar, NULL };
15313 int c;
15314
15315 c = getopt (4, argv, "ab");
15316 if (!(c == 'a'))
15317 return 1;
15318 c = getopt (4, argv, "ab");
15319 if (!(c == -1))
15320 return 2;
15321 if (!(optind == 2))
15322 return 3;
15323 return 0;
15324 }
15325
15326 _ACEOF
15327 if ac_fn_c_try_run "$LINENO"; then :
15328 gl_cv_func_getopt_posix=maybe
15329 else
15330 gl_cv_func_getopt_posix=no
15331 fi
15332 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15333 conftest.$ac_objext conftest.beam conftest.$ac_ext
15334 fi
15335
15336 if test $gl_cv_func_getopt_posix = maybe; then
15337 if test "$cross_compiling" = yes; then :
15338 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15339 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15340 as_fn_error $? "cannot run test program while cross compiling
15341 See \`config.log' for more details" "$LINENO" 5; }
15342 else
15343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15344 /* end confdefs.h. */
15345
15346 #include <unistd.h>
15347 #include <stdlib.h>
15348 #include <string.h>
15349
15350 int
15351 main ()
15352 {
15353 static char program[] = "program";
15354 static char donald[] = "donald";
15355 static char p[] = "-p";
15356 static char billy[] = "billy";
15357 static char duck[] = "duck";
15358 static char a[] = "-a";
15359 static char bar[] = "bar";
15360 char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
15361 int c;
15362
15363 c = getopt (7, argv, "+abp:q:");
15364 if (!(c == -1))
15365 return 4;
15366 if (!(strcmp (argv[0], "program") == 0))
15367 return 5;
15368 if (!(strcmp (argv[1], "donald") == 0))
15369 return 6;
15370 if (!(strcmp (argv[2], "-p") == 0))
15371 return 7;
15372 if (!(strcmp (argv[3], "billy") == 0))
15373 return 8;
15374 if (!(strcmp (argv[4], "duck") == 0))
15375 return 9;
15376 if (!(strcmp (argv[5], "-a") == 0))
15377 return 10;
15378 if (!(strcmp (argv[6], "bar") == 0))
15379 return 11;
15380 if (!(optind == 1))
15381 return 12;
15382 return 0;
15383 }
15384
15385 _ACEOF
15386 if ac_fn_c_try_run "$LINENO"; then :
15387 gl_cv_func_getopt_posix=maybe
15388 else
15389 gl_cv_func_getopt_posix=no
15390 fi
15391 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15392 conftest.$ac_objext conftest.beam conftest.$ac_ext
15393 fi
15394
15395 fi
15396 if test $gl_cv_func_getopt_posix = maybe; then
15397 if test "$cross_compiling" = yes; then :
15398 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15399 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15400 as_fn_error $? "cannot run test program while cross compiling
15401 See \`config.log' for more details" "$LINENO" 5; }
15402 else
15403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15404 /* end confdefs.h. */
15405
15406 #include <unistd.h>
15407 #include <stdlib.h>
15408 #include <string.h>
15409
15410 int
15411 main ()
15412 {
15413 static char program[] = "program";
15414 static char ab[] = "-ab";
15415 char *argv[3] = { program, ab, NULL };
15416 if (getopt (2, argv, "ab:") != 'a')
15417 return 13;
15418 if (getopt (2, argv, "ab:") != '?')
15419 return 14;
15420 if (optopt != 'b')
15421 return 15;
15422 if (optind != 2)
15423 return 16;
15424 return 0;
15425 }
15426
15427 _ACEOF
15428 if ac_fn_c_try_run "$LINENO"; then :
15429 gl_cv_func_getopt_posix=yes
15430 else
15431 gl_cv_func_getopt_posix=no
15432 fi
15433 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15434 conftest.$ac_objext conftest.beam conftest.$ac_ext
15435 fi
15436
15437 fi
15438 else
15439 case "$host_os" in
15440 darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
15441 *) gl_cv_func_getopt_posix="guessing yes";;
15442 esac
15443 fi
15444
15445 fi
15446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
15447 $as_echo "$gl_cv_func_getopt_posix" >&6; }
15448 case "$gl_cv_func_getopt_posix" in
15449 *no) gl_replace_getopt=yes ;;
15450 esac
15451 fi
15452
15453 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
15454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
15455 $as_echo_n "checking for working GNU getopt function... " >&6; }
15456 if ${gl_cv_func_getopt_gnu+:} false; then :
15457 $as_echo_n "(cached) " >&6
15458 else
15459 # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
15460 # optstring is necessary for programs like m4 that have POSIX-mandated
15461 # semantics for supporting options interspersed with files.
15462 # Also, since getopt_long is a GNU extension, we require optind=0.
15463 # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
15464 # so take care to revert to the correct (non-)export state.
15465 gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
15466 case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
15467 xx) gl_had_POSIXLY_CORRECT=exported ;;
15468 x) gl_had_POSIXLY_CORRECT=yes ;;
15469 *) gl_had_POSIXLY_CORRECT= ;;
15470 esac
15471 POSIXLY_CORRECT=1
15472 export POSIXLY_CORRECT
15473 if test "$cross_compiling" = yes; then :
15474 gl_cv_func_getopt_gnu="guessing no"
15475
15476 else
15477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15478 /* end confdefs.h. */
15479 #include <getopt.h>
15480 #include <stddef.h>
15481 #include <string.h>
15482
15483 #include <stdlib.h>
15484 #if defined __MACH__ && defined __APPLE__
15485 /* Avoid a crash on Mac OS X. */
15486 #include <mach/mach.h>
15487 #include <mach/mach_error.h>
15488 #include <mach/thread_status.h>
15489 #include <mach/exception.h>
15490 #include <mach/task.h>
15491 #include <pthread.h>
15492 /* The exception port on which our thread listens. */
15493 static mach_port_t our_exception_port;
15494 /* The main function of the thread listening for exceptions of type
15495 EXC_BAD_ACCESS. */
15496 static void *
15497 mach_exception_thread (void *arg)
15498 {
15499 /* Buffer for a message to be received. */
15500 struct {
15501 mach_msg_header_t head;
15502 mach_msg_body_t msgh_body;
15503 char data[1024];
15504 } msg;
15505 mach_msg_return_t retval;
15506 /* Wait for a message on the exception port. */
15507 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
15508 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
15509 if (retval != MACH_MSG_SUCCESS)
15510 abort ();
15511 exit (1);
15512 }
15513 static void
15514 nocrash_init (void)
15515 {
15516 mach_port_t self = mach_task_self ();
15517 /* Allocate a port on which the thread shall listen for exceptions. */
15518 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
15519 == KERN_SUCCESS) {
15520 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
15521 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
15522 MACH_MSG_TYPE_MAKE_SEND)
15523 == KERN_SUCCESS) {
15524 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
15525 for us. */
15526 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
15527 /* Create the thread listening on the exception port. */
15528 pthread_attr_t attr;
15529 pthread_t thread;
15530 if (pthread_attr_init (&attr) == 0
15531 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
15532 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
15533 pthread_attr_destroy (&attr);
15534 /* Replace the exception port info for these exceptions with our own.
15535 Note that we replace the exception port for the entire task, not only
15536 for a particular thread. This has the effect that when our exception
15537 port gets the message, the thread specific exception port has already
15538 been asked, and we don't need to bother about it.
15539 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
15540 task_set_exception_ports (self, mask, our_exception_port,
15541 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
15542 }
15543 }
15544 }
15545 }
15546 #elif defined _WIN32 && ! defined __CYGWIN__
15547 /* Avoid a crash on native Windows. */
15548 #define WIN32_LEAN_AND_MEAN
15549 #include <windows.h>
15550 #include <winerror.h>
15551 static LONG WINAPI
15552 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
15553 {
15554 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
15555 {
15556 case EXCEPTION_ACCESS_VIOLATION:
15557 case EXCEPTION_IN_PAGE_ERROR:
15558 case EXCEPTION_STACK_OVERFLOW:
15559 case EXCEPTION_GUARD_PAGE:
15560 case EXCEPTION_PRIV_INSTRUCTION:
15561 case EXCEPTION_ILLEGAL_INSTRUCTION:
15562 case EXCEPTION_DATATYPE_MISALIGNMENT:
15563 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
15564 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
15565 exit (1);
15566 }
15567 return EXCEPTION_CONTINUE_SEARCH;
15568 }
15569 static void
15570 nocrash_init (void)
15571 {
15572 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
15573 }
15574 #else
15575 /* Avoid a crash on POSIX systems. */
15576 #include <signal.h>
15577 #include <unistd.h>
15578 /* A POSIX signal handler. */
15579 static void
15580 exception_handler (int sig)
15581 {
15582 _exit (1);
15583 }
15584 static void
15585 nocrash_init (void)
15586 {
15587 #ifdef SIGSEGV
15588 signal (SIGSEGV, exception_handler);
15589 #endif
15590 #ifdef SIGBUS
15591 signal (SIGBUS, exception_handler);
15592 #endif
15593 }
15594 #endif
15595
15596
15597 int
15598 main (void)
15599 {
15600
15601 int result = 0;
15602
15603 nocrash_init();
15604
15605 /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
15606 and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
15607 OSF/1 5.1, Solaris 10. */
15608 {
15609 static char conftest[] = "conftest";
15610 static char plus[] = "-+";
15611 char *argv[3] = { conftest, plus, NULL };
15612 opterr = 0;
15613 if (getopt (2, argv, "+a") != '?')
15614 result |= 1;
15615 }
15616 /* This code succeeds on glibc 2.8, mingw,
15617 and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
15618 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */
15619 {
15620 static char program[] = "program";
15621 static char p[] = "-p";
15622 static char foo[] = "foo";
15623 static char bar[] = "bar";
15624 char *argv[] = { program, p, foo, bar, NULL };
15625
15626 optind = 1;
15627 if (getopt (4, argv, "p::") != 'p')
15628 result |= 2;
15629 else if (optarg != NULL)
15630 result |= 4;
15631 else if (getopt (4, argv, "p::") != -1)
15632 result |= 6;
15633 else if (optind != 2)
15634 result |= 8;
15635 }
15636 /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */
15637 {
15638 static char program[] = "program";
15639 static char foo[] = "foo";
15640 static char p[] = "-p";
15641 char *argv[] = { program, foo, p, NULL };
15642 optind = 0;
15643 if (getopt (3, argv, "-p") != 1)
15644 result |= 16;
15645 else if (getopt (3, argv, "-p") != 'p')
15646 result |= 16;
15647 }
15648 /* This code fails on glibc 2.11. */
15649 {
15650 static char program[] = "program";
15651 static char b[] = "-b";
15652 static char a[] = "-a";
15653 char *argv[] = { program, b, a, NULL };
15654 optind = opterr = 0;
15655 if (getopt (3, argv, "+:a:b") != 'b')
15656 result |= 32;
15657 else if (getopt (3, argv, "+:a:b") != ':')
15658 result |= 32;
15659 }
15660 /* This code dumps core on glibc 2.14. */
15661 {
15662 static char program[] = "program";
15663 static char w[] = "-W";
15664 static char dummy[] = "dummy";
15665 char *argv[] = { program, w, dummy, NULL };
15666 optind = opterr = 1;
15667 if (getopt (3, argv, "W;") != 'W')
15668 result |= 64;
15669 }
15670 return result;
15671
15672 ;
15673 return 0;
15674 }
15675 _ACEOF
15676 if ac_fn_c_try_run "$LINENO"; then :
15677 gl_cv_func_getopt_gnu=yes
15678 else
15679 gl_cv_func_getopt_gnu=no
15680 fi
15681 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15682 conftest.$ac_objext conftest.beam conftest.$ac_ext
15683 fi
15684
15685 case $gl_had_POSIXLY_CORRECT in
15686 exported) ;;
15687 yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
15688 *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
15689 esac
15690
15691 fi
15692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
15693 $as_echo "$gl_cv_func_getopt_gnu" >&6; }
15694 if test "$gl_cv_func_getopt_gnu" != yes; then
15695 gl_replace_getopt=yes
15696 else
15697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5
15698 $as_echo_n "checking for working GNU getopt_long function... " >&6; }
15699 if ${gl_cv_func_getopt_long_gnu+:} false; then :
15700 $as_echo_n "(cached) " >&6
15701 else
15702 if test "$cross_compiling" = yes; then :
15703 case "$host_os" in
15704 openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
15705 *) gl_cv_func_getopt_long_gnu="guessing yes";;
15706 esac
15707
15708 else
15709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15710 /* end confdefs.h. */
15711 #include <getopt.h>
15712 #include <stddef.h>
15713 #include <string.h>
15714
15715 int
15716 main (void)
15717 {
15718 static const struct option long_options[] =
15719 {
15720 { "xtremely-",no_argument, NULL, 1003 },
15721 { "xtra", no_argument, NULL, 1001 },
15722 { "xtreme", no_argument, NULL, 1002 },
15723 { "xtremely", no_argument, NULL, 1003 },
15724 { NULL, 0, NULL, 0 }
15725 };
15726 /* This code fails on OpenBSD 5.0. */
15727 {
15728 static char program[] = "program";
15729 static char xtremel[] = "--xtremel";
15730 char *argv[] = { program, xtremel, NULL };
15731 int option_index;
15732 optind = 1; opterr = 0;
15733 if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
15734 return 1;
15735 }
15736 return 0;
15737
15738 ;
15739 return 0;
15740 }
15741 _ACEOF
15742 if ac_fn_c_try_run "$LINENO"; then :
15743 gl_cv_func_getopt_long_gnu=yes
15744 else
15745 gl_cv_func_getopt_long_gnu=no
15746 fi
15747 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15748 conftest.$ac_objext conftest.beam conftest.$ac_ext
15749 fi
15750
15751
15752 fi
15753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5
15754 $as_echo "$gl_cv_func_getopt_long_gnu" >&6; }
15755 case "$gl_cv_func_getopt_long_gnu" in
15756 *yes) ;;
15757 *) gl_replace_getopt=yes ;;
15758 esac
15759 fi
15760 fi
15761
15762
15763
15764
15765
15766
15767
15768
15769 GNULIB_NL_LANGINFO=0;
15770 HAVE_NL_LANGINFO=1;
15771 REPLACE_NL_LANGINFO=0;
15772
15773
15774
15775
15776
15777
15778
15779
15780
15781
15782
15783
15784
15785
15786
15787 if test $gl_cv_have_include_next = yes; then
15788 gl_cv_next_limits_h='<'limits.h'>'
15789 else
15790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5
15791 $as_echo_n "checking absolute name of <limits.h>... " >&6; }
15792 if ${gl_cv_next_limits_h+:} false; then :
15793 $as_echo_n "(cached) " >&6
15794 else
15795
15796 if test $ac_cv_header_limits_h = yes; then
15797
15798
15799
15800
15801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15802 /* end confdefs.h. */
15803 #include <limits.h>
15804 _ACEOF
15805 case "$host_os" in
15806 aix*) gl_absname_cpp="$ac_cpp -C" ;;
15807 *) gl_absname_cpp="$ac_cpp" ;;
15808 esac
15809
15810 case "$host_os" in
15811 mingw*)
15812 gl_dirsep_regex='[/\\]'
15813 ;;
15814 *)
15815 gl_dirsep_regex='\/'
15816 ;;
15817 esac
15818 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15819 gl_header_literal_regex=`echo 'limits.h' \
15820 | sed -e "$gl_make_literal_regex_sed"`
15821 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15822 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15823 s|^/[^/]|//&|
15824 p
15825 q
15826 }'
15827
15828 gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15829 sed -n "$gl_absolute_header_sed"`
15830
15831 gl_header=$gl_cv_absolute_limits_h
15832 gl_cv_next_limits_h='"'$gl_header'"'
15833 else
15834 gl_cv_next_limits_h='<'limits.h'>'
15835 fi
15836
15837
15838 fi
15839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
15840 $as_echo "$gl_cv_next_limits_h" >&6; }
15841 fi
15842 NEXT_LIMITS_H=$gl_cv_next_limits_h
15843
15844 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15845 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15846 gl_next_as_first_directive='<'limits.h'>'
15847 else
15848 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15849 gl_next_as_first_directive=$gl_cv_next_limits_h
15850 fi
15851 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive
15852
15853
15854
15855
15856
15857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc." >&5
15858 $as_echo_n "checking whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc.... " >&6; }
15859 if ${gl_cv_header_limits_width+:} false; then :
15860 $as_echo_n "(cached) " >&6
15861 else
15862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15863 /* end confdefs.h. */
15864 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
15865 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
15866 #endif
15867 #include <limits.h>
15868 long long llm = LLONG_MAX;
15869 int wb = WORD_BIT;
15870 int ullw = ULLONG_WIDTH;
15871
15872 int
15873 main (void)
15874 {
15875
15876 ;
15877 return 0;
15878 }
15879 _ACEOF
15880 if ac_fn_c_try_compile "$LINENO"; then :
15881 gl_cv_header_limits_width=yes
15882 else
15883 gl_cv_header_limits_width=no
15884 fi
15885 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15886 fi
15887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5
15888 $as_echo "$gl_cv_header_limits_width" >&6; }
15889 if test "$gl_cv_header_limits_width" = yes; then
15890 LIMITS_H=
15891 else
15892 LIMITS_H=limits.h
15893 fi
15894
15895 if test -n "$LIMITS_H"; then
15896 GL_GENERATE_LIMITS_H_TRUE=
15897 GL_GENERATE_LIMITS_H_FALSE='#'
15898 else
15899 GL_GENERATE_LIMITS_H_TRUE='#'
15900 GL_GENERATE_LIMITS_H_FALSE=
15901 fi
15902
15903
15904
15905 GNULIB_LOCALECONV=0;
15906 GNULIB_SETLOCALE=0;
15907 GNULIB_DUPLOCALE=0;
15908 GNULIB_LOCALENAME=0;
15909 HAVE_NEWLOCALE=1;
15910 HAVE_DUPLOCALE=1;
15911 HAVE_FREELOCALE=1;
15912 REPLACE_LOCALECONV=0;
15913 REPLACE_SETLOCALE=0;
15914 REPLACE_NEWLOCALE=0;
15915 REPLACE_DUPLOCALE=0;
15916 REPLACE_FREELOCALE=0;
15917 REPLACE_STRUCT_LCONV=0;
15918
15919
15920 REPLACE_NULL=0;
15921 HAVE_MAX_ALIGN_T=1;
15922 HAVE_WCHAR_T=1;
15923
15924
15925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
15926 $as_echo_n "checking for wchar_t... " >&6; }
15927 if ${gt_cv_c_wchar_t+:} false; then :
15928 $as_echo_n "(cached) " >&6
15929 else
15930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15931 /* end confdefs.h. */
15932 #include <stddef.h>
15933 wchar_t foo = (wchar_t)'\0';
15934 int
15935 main (void)
15936 {
15937
15938 ;
15939 return 0;
15940 }
15941 _ACEOF
15942 if ac_fn_c_try_compile "$LINENO"; then :
15943 gt_cv_c_wchar_t=yes
15944 else
15945 gt_cv_c_wchar_t=no
15946 fi
15947 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15948 fi
15949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
15950 $as_echo "$gt_cv_c_wchar_t" >&6; }
15951 if test $gt_cv_c_wchar_t = yes; then
15952
15953 $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
15954
15955 fi
15956
15957
15958
15959
15960 STDDEF_H=
15961
15962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5
15963 $as_echo_n "checking for good max_align_t... " >&6; }
15964 if ${gl_cv_type_max_align_t+:} false; then :
15965 $as_echo_n "(cached) " >&6
15966 else
15967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15968 /* end confdefs.h. */
15969 #include <stddef.h>
15970 unsigned int s = sizeof (max_align_t);
15971 #if defined __GNUC__ || defined __IBM__ALIGNOF__
15972 int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
15973 int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1];
15974 #endif
15975
15976 int
15977 main (void)
15978 {
15979
15980 ;
15981 return 0;
15982 }
15983 _ACEOF
15984 if ac_fn_c_try_compile "$LINENO"; then :
15985 gl_cv_type_max_align_t=yes
15986 else
15987 gl_cv_type_max_align_t=no
15988 fi
15989 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15990
15991 fi
15992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5
15993 $as_echo "$gl_cv_type_max_align_t" >&6; }
15994 if test $gl_cv_type_max_align_t = no; then
15995 HAVE_MAX_ALIGN_T=0
15996 STDDEF_H=stddef.h
15997 fi
15998
15999 if test $gt_cv_c_wchar_t = no; then
16000 HAVE_WCHAR_T=0
16001 STDDEF_H=stddef.h
16002 fi
16003
16004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
16005 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
16006 if ${gl_cv_decl_null_works+:} false; then :
16007 $as_echo_n "(cached) " >&6
16008 else
16009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16010 /* end confdefs.h. */
16011 #include <stddef.h>
16012 int test[2 * (sizeof NULL == sizeof (void *)) -1];
16013
16014 int
16015 main (void)
16016 {
16017
16018 ;
16019 return 0;
16020 }
16021 _ACEOF
16022 if ac_fn_c_try_compile "$LINENO"; then :
16023 gl_cv_decl_null_works=yes
16024 else
16025 gl_cv_decl_null_works=no
16026 fi
16027 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16028 fi
16029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
16030 $as_echo "$gl_cv_decl_null_works" >&6; }
16031 if test $gl_cv_decl_null_works = no; then
16032 REPLACE_NULL=1
16033 STDDEF_H=stddef.h
16034 fi
16035
16036
16037 if test -n "$STDDEF_H"; then
16038 GL_GENERATE_STDDEF_H_TRUE=
16039 GL_GENERATE_STDDEF_H_FALSE='#'
16040 else
16041 GL_GENERATE_STDDEF_H_TRUE='#'
16042 GL_GENERATE_STDDEF_H_FALSE=
16043 fi
16044
16045 if test -n "$STDDEF_H"; then
16046
16047
16048
16049
16050
16051
16052
16053
16054 if test $gl_cv_have_include_next = yes; then
16055 gl_cv_next_stddef_h='<'stddef.h'>'
16056 else
16057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
16058 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
16059 if ${gl_cv_next_stddef_h+:} false; then :
16060 $as_echo_n "(cached) " >&6
16061 else
16062
16063
16064
16065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16066 /* end confdefs.h. */
16067 #include <stddef.h>
16068 _ACEOF
16069 case "$host_os" in
16070 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16071 *) gl_absname_cpp="$ac_cpp" ;;
16072 esac
16073
16074 case "$host_os" in
16075 mingw*)
16076 gl_dirsep_regex='[/\\]'
16077 ;;
16078 *)
16079 gl_dirsep_regex='\/'
16080 ;;
16081 esac
16082 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16083 gl_header_literal_regex=`echo 'stddef.h' \
16084 | sed -e "$gl_make_literal_regex_sed"`
16085 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16086 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16087 s|^/[^/]|//&|
16088 p
16089 q
16090 }'
16091
16092 gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16093 sed -n "$gl_absolute_header_sed"`
16094
16095 gl_header=$gl_cv_absolute_stddef_h
16096 gl_cv_next_stddef_h='"'$gl_header'"'
16097
16098
16099 fi
16100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
16101 $as_echo "$gl_cv_next_stddef_h" >&6; }
16102 fi
16103 NEXT_STDDEF_H=$gl_cv_next_stddef_h
16104
16105 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16106 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16107 gl_next_as_first_directive='<'stddef.h'>'
16108 else
16109 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
16110 gl_next_as_first_directive=$gl_cv_next_stddef_h
16111 fi
16112 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
16113
16114
16115
16116
16117 fi
16118
16119
16120
16121
16122
16123 gl_threads_api=none
16124 LIBTHREAD=
16125 LTLIBTHREAD=
16126 LIBMULTITHREAD=
16127 LTLIBMULTITHREAD=
16128 if test "$gl_use_threads" != no; then
16129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
16130 $as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
16131 if ${gl_cv_have_weak+:} false; then :
16132 $as_echo_n "(cached) " >&6
16133 else
16134 gl_cv_have_weak=no
16135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16136 /* end confdefs.h. */
16137 extern void xyzzy ();
16138 #pragma weak xyzzy
16139 int
16140 main (void)
16141 {
16142 xyzzy();
16143 ;
16144 return 0;
16145 }
16146 _ACEOF
16147 if ac_fn_c_try_link "$LINENO"; then :
16148 gl_cv_have_weak=maybe
16149 fi
16150 rm -f core conftest.err conftest.$ac_objext \
16151 conftest$ac_exeext conftest.$ac_ext
16152 if test $gl_cv_have_weak = maybe; then
16153 if test "$cross_compiling" = yes; then :
16154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16155 /* end confdefs.h. */
16156 #ifdef __ELF__
16157 Extensible Linking Format
16158 #endif
16159
16160 _ACEOF
16161 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16162 $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
16163 gl_cv_have_weak="guessing yes"
16164 else
16165 gl_cv_have_weak="guessing no"
16166 fi
16167 rm -f conftest*
16168
16169
16170 else
16171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16172 /* end confdefs.h. */
16173
16174 #include <stdio.h>
16175 #pragma weak fputs
16176 int main ()
16177 {
16178 return (fputs == NULL);
16179 }
16180 _ACEOF
16181 if ac_fn_c_try_run "$LINENO"; then :
16182 gl_cv_have_weak=yes
16183 else
16184 gl_cv_have_weak=no
16185 fi
16186 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16187 conftest.$ac_objext conftest.beam conftest.$ac_ext
16188 fi
16189
16190 fi
16191 case " $LDFLAGS " in
16192 *" -static "*) gl_cv_have_weak=no ;;
16193 esac
16194
16195 fi
16196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
16197 $as_echo "$gl_cv_have_weak" >&6; }
16198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker supports --as-needed" >&5
16199 $as_echo_n "checking whether the linker supports --as-needed... " >&6; }
16200 if ${gl_cv_linker_have_as_needed+:} false; then :
16201 $as_echo_n "(cached) " >&6
16202 else
16203 if test -n "$GCC"; then
16204 gl_saved_ldflags="$LDFLAGS"
16205 LDFLAGS="$gl_saved_ldflags -Wl,--as-needed -Wl,--no-as-needed"
16206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16207 /* end confdefs.h. */
16208
16209 int
16210 main (void)
16211 {
16212
16213 ;
16214 return 0;
16215 }
16216 _ACEOF
16217 if ac_fn_c_try_link "$LINENO"; then :
16218 gl_cv_linker_have_as_needed=yes
16219 else
16220 gl_cv_linker_have_as_needed=no
16221 fi
16222 rm -f core conftest.err conftest.$ac_objext \
16223 conftest$ac_exeext conftest.$ac_ext
16224 LDFLAGS="$gl_saved_ldflags"
16225 else
16226 gl_cv_linker_have_as_needed=no
16227 fi
16228
16229 fi
16230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_linker_have_as_needed" >&5
16231 $as_echo "$gl_cv_linker_have_as_needed" >&6; }
16232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker supports --push-state" >&5
16233 $as_echo_n "checking whether the linker supports --push-state... " >&6; }
16234 if ${gl_cv_linker_have_push_state+:} false; then :
16235 $as_echo_n "(cached) " >&6
16236 else
16237 if test -n "$GCC"; then
16238 gl_saved_ldflags="$LDFLAGS"
16239 LDFLAGS="$gl_saved_ldflags -Wl,--push-state -Wl,--pop-state"
16240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16241 /* end confdefs.h. */
16242
16243 int
16244 main (void)
16245 {
16246
16247 ;
16248 return 0;
16249 }
16250 _ACEOF
16251 if ac_fn_c_try_link "$LINENO"; then :
16252 gl_cv_linker_have_push_state=yes
16253 else
16254 gl_cv_linker_have_push_state=no
16255 fi
16256 rm -f core conftest.err conftest.$ac_objext \
16257 conftest$ac_exeext conftest.$ac_ext
16258 LDFLAGS="$gl_saved_ldflags"
16259 else
16260 gl_cv_linker_have_push_state=no
16261 fi
16262
16263 fi
16264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_linker_have_push_state" >&5
16265 $as_echo "$gl_cv_linker_have_push_state" >&6; }
16266 if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
16267 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
16268 # it groks <pthread.h>. It's added above, in gl_THREADLIB_EARLY_BODY.
16269 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
16270 if test "x$ac_cv_header_pthread_h" = xyes; then :
16271 gl_have_pthread_h=yes
16272 else
16273 gl_have_pthread_h=no
16274 fi
16275
16276
16277 if test "$gl_have_pthread_h" = yes; then
16278 # Other possible tests:
16279 # -lpthreads (FSU threads, PCthreads)
16280 # -lgthreads
16281 gl_have_pthread=
16282 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
16283 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
16284 # the second one only in libpthread, and lock.c needs it.
16285 #
16286 # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
16287 # needs -pthread for some reason. See:
16288 # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
16289 save_LIBS=$LIBS
16290 for gl_pthread in '' '-pthread'; do
16291 LIBS="$LIBS $gl_pthread"
16292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16293 /* end confdefs.h. */
16294 #include <pthread.h>
16295 pthread_mutex_t m;
16296 pthread_mutexattr_t ma;
16297
16298 int
16299 main (void)
16300 {
16301 pthread_mutex_lock (&m);
16302 pthread_mutexattr_init (&ma);
16303 ;
16304 return 0;
16305 }
16306 _ACEOF
16307 if ac_fn_c_try_link "$LINENO"; then :
16308 gl_have_pthread=yes
16309 LIBTHREAD=$gl_pthread LTLIBTHREAD=$gl_pthread
16310 LIBMULTITHREAD=$gl_pthread LTLIBMULTITHREAD=$gl_pthread
16311 fi
16312 rm -f core conftest.err conftest.$ac_objext \
16313 conftest$ac_exeext conftest.$ac_ext
16314 LIBS=$save_LIBS
16315 test -n "$gl_have_pthread" && break
16316 done
16317
16318 # Test for libpthread by looking for pthread_kill. (Not pthread_self,
16319 # since it is defined as a macro on OSF/1.)
16320 if test -n "$gl_have_pthread" && test -z "$LIBTHREAD"; then
16321 # The program links fine without libpthread. But it may actually
16322 # need to link with libpthread in order to create multiple threads.
16323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
16324 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
16325 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
16326 $as_echo_n "(cached) " >&6
16327 else
16328 ac_check_lib_save_LIBS=$LIBS
16329 LIBS="-lpthread $LIBS"
16330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16331 /* end confdefs.h. */
16332
16333 /* Override any GCC internal prototype to avoid an error.
16334 Use char because int might match the return type of a GCC
16335 builtin and then its argument prototype would still apply. */
16336 #ifdef __cplusplus
16337 extern "C"
16338 #endif
16339 char pthread_kill ();
16340 int
16341 main (void)
16342 {
16343 return pthread_kill ();
16344 ;
16345 return 0;
16346 }
16347 _ACEOF
16348 if ac_fn_c_try_link "$LINENO"; then :
16349 ac_cv_lib_pthread_pthread_kill=yes
16350 else
16351 ac_cv_lib_pthread_pthread_kill=no
16352 fi
16353 rm -f core conftest.err conftest.$ac_objext \
16354 conftest$ac_exeext conftest.$ac_ext
16355 LIBS=$ac_check_lib_save_LIBS
16356 fi
16357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
16358 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
16359 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
16360 LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
16361 # On Solaris and HP-UX, most pthread functions exist also in libc.
16362 # Therefore pthread_in_use() needs to actually try to create a
16363 # thread: pthread_create from libc will fail, whereas
16364 # pthread_create will actually create a thread.
16365 # On Solaris 10 or newer, this test is no longer needed, because
16366 # libc contains the fully functional pthread functions.
16367 case "$host_os" in
16368 solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
16369
16370 $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
16371
16372 esac
16373
16374 fi
16375
16376 elif test -z "$gl_have_pthread"; then
16377 # Some library is needed. Try libpthread and libc_r.
16378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
16379 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
16380 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
16381 $as_echo_n "(cached) " >&6
16382 else
16383 ac_check_lib_save_LIBS=$LIBS
16384 LIBS="-lpthread $LIBS"
16385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16386 /* end confdefs.h. */
16387
16388 /* Override any GCC internal prototype to avoid an error.
16389 Use char because int might match the return type of a GCC
16390 builtin and then its argument prototype would still apply. */
16391 #ifdef __cplusplus
16392 extern "C"
16393 #endif
16394 char pthread_kill ();
16395 int
16396 main (void)
16397 {
16398 return pthread_kill ();
16399 ;
16400 return 0;
16401 }
16402 _ACEOF
16403 if ac_fn_c_try_link "$LINENO"; then :
16404 ac_cv_lib_pthread_pthread_kill=yes
16405 else
16406 ac_cv_lib_pthread_pthread_kill=no
16407 fi
16408 rm -f core conftest.err conftest.$ac_objext \
16409 conftest$ac_exeext conftest.$ac_ext
16410 LIBS=$ac_check_lib_save_LIBS
16411 fi
16412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
16413 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
16414 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
16415 gl_have_pthread=yes
16416 LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread
16417 LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
16418 fi
16419
16420 if test -z "$gl_have_pthread"; then
16421 # For FreeBSD 4.
16422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
16423 $as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
16424 if ${ac_cv_lib_c_r_pthread_kill+:} false; then :
16425 $as_echo_n "(cached) " >&6
16426 else
16427 ac_check_lib_save_LIBS=$LIBS
16428 LIBS="-lc_r $LIBS"
16429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16430 /* end confdefs.h. */
16431
16432 /* Override any GCC internal prototype to avoid an error.
16433 Use char because int might match the return type of a GCC
16434 builtin and then its argument prototype would still apply. */
16435 #ifdef __cplusplus
16436 extern "C"
16437 #endif
16438 char pthread_kill ();
16439 int
16440 main (void)
16441 {
16442 return pthread_kill ();
16443 ;
16444 return 0;
16445 }
16446 _ACEOF
16447 if ac_fn_c_try_link "$LINENO"; then :
16448 ac_cv_lib_c_r_pthread_kill=yes
16449 else
16450 ac_cv_lib_c_r_pthread_kill=no
16451 fi
16452 rm -f core conftest.err conftest.$ac_objext \
16453 conftest$ac_exeext conftest.$ac_ext
16454 LIBS=$ac_check_lib_save_LIBS
16455 fi
16456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
16457 $as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
16458 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then :
16459 gl_have_pthread=yes
16460 LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r
16461 LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r
16462 fi
16463
16464 fi
16465 fi
16466 if test -n "$gl_have_pthread"; then
16467 gl_threads_api=posix
16468
16469 $as_echo "#define USE_POSIX_THREADS 1" >>confdefs.h
16470
16471 if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
16472 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
16473
16474 $as_echo "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h
16475
16476 LIBTHREAD=
16477 LTLIBTHREAD=
16478 case "$LIBMULTITHREAD" in
16479 "") ;;
16480 -pthread)
16481 if test $gl_cv_linker_have_as_needed = yes; then
16482 if test $gl_cv_linker_have_push_state = yes; then
16483 LIBMULTITHREAD="$LIBMULTITHREAD -Wl,--push-state -Wl,--no-as-needed -lpthread -Wl,--pop-state"
16484 else
16485 LIBMULTITHREAD="$LIBMULTITHREAD -Wl,--no-as-needed -lpthread"
16486 fi
16487 fi
16488 ;;
16489 *)
16490 if test $gl_cv_linker_have_as_needed = yes; then
16491 if test $gl_cv_linker_have_push_state = yes; then
16492 LIBMULTITHREAD="-Wl,--push-state -Wl,--no-as-needed $LIBMULTITHREAD -Wl,--pop-state"
16493 else
16494 LIBMULTITHREAD="-Wl,--no-as-needed $LIBMULTITHREAD"
16495 fi
16496 fi
16497 ;;
16498 esac
16499 # TODO: May need to modify LTLIBMULTITHREAD similarly.
16500 fi
16501 fi
16502 fi
16503 fi
16504 fi
16505 if test -z "$gl_have_pthread"; then
16506 if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then
16507 gl_have_solaristhread=
16508 gl_save_LIBS="$LIBS"
16509 LIBS="$LIBS -lthread"
16510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16511 /* end confdefs.h. */
16512
16513 #include <thread.h>
16514 #include <synch.h>
16515
16516 int
16517 main (void)
16518 {
16519 thr_self();
16520 ;
16521 return 0;
16522 }
16523 _ACEOF
16524 if ac_fn_c_try_link "$LINENO"; then :
16525 gl_have_solaristhread=yes
16526 fi
16527 rm -f core conftest.err conftest.$ac_objext \
16528 conftest$ac_exeext conftest.$ac_ext
16529 LIBS="$gl_save_LIBS"
16530 if test -n "$gl_have_solaristhread"; then
16531 gl_threads_api=solaris
16532 LIBTHREAD=-lthread
16533 LTLIBTHREAD=-lthread
16534 LIBMULTITHREAD="$LIBTHREAD"
16535 LTLIBMULTITHREAD="$LTLIBTHREAD"
16536
16537 $as_echo "#define USE_SOLARIS_THREADS 1" >>confdefs.h
16538
16539 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
16540
16541 $as_echo "#define USE_SOLARIS_THREADS_WEAK 1" >>confdefs.h
16542
16543 LIBTHREAD=
16544 LTLIBTHREAD=
16545 if test $gl_cv_linker_have_as_needed = yes; then
16546 if test $gl_cv_linker_have_push_state = yes; then
16547 LIBMULTITHREAD="-Wl,--push-state -Wl,--no-as-needed $LIBMULTITHREAD -Wl,--pop-state"
16548 else
16549 LIBMULTITHREAD="-Wl,--no-as-needed $LIBMULTITHREAD"
16550 fi
16551 fi
16552 # TODO: May need to modify LTLIBMULTITHREAD similarly.
16553 fi
16554 fi
16555 fi
16556 fi
16557 if test "$gl_use_threads" = pth; then
16558 gl_save_CPPFLAGS="$CPPFLAGS"
16559
16560
16561
16562
16563
16564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libpth" >&5
16565 $as_echo_n "checking how to link with libpth... " >&6; }
16566 if ${ac_cv_libpth_libs+:} false; then :
16567 $as_echo_n "(cached) " >&6
16568 else
16569
16570
16571
16572
16573
16574
16575
16576 use_additional=yes
16577
16578 acl_save_prefix="$prefix"
16579 prefix="$acl_final_prefix"
16580 acl_save_exec_prefix="$exec_prefix"
16581 exec_prefix="$acl_final_exec_prefix"
16582
16583 eval additional_includedir=\"$includedir\"
16584 eval additional_libdir=\"$libdir\"
16585
16586 exec_prefix="$acl_save_exec_prefix"
16587 prefix="$acl_save_prefix"
16588
16589
16590 # Check whether --with-libpth-prefix was given.
16591 if test "${with_libpth_prefix+set}" = set; then :
16592 withval=$with_libpth_prefix;
16593 if test "X$withval" = "Xno"; then
16594 use_additional=no
16595 else
16596 if test "X$withval" = "X"; then
16597
16598 acl_save_prefix="$prefix"
16599 prefix="$acl_final_prefix"
16600 acl_save_exec_prefix="$exec_prefix"
16601 exec_prefix="$acl_final_exec_prefix"
16602
16603 eval additional_includedir=\"$includedir\"
16604 eval additional_libdir=\"$libdir\"
16605
16606 exec_prefix="$acl_save_exec_prefix"
16607 prefix="$acl_save_prefix"
16608
16609 else
16610 additional_includedir="$withval/include"
16611 additional_libdir="$withval/$acl_libdirstem"
16612 if test "$acl_libdirstem2" != "$acl_libdirstem" \
16613 && test ! -d "$withval/$acl_libdirstem"; then
16614 additional_libdir="$withval/$acl_libdirstem2"
16615 fi
16616 fi
16617 fi
16618
16619 fi
16620
16621 LIBPTH=
16622 LTLIBPTH=
16623 INCPTH=
16624 LIBPTH_PREFIX=
16625 HAVE_LIBPTH=
16626 rpathdirs=
16627 ltrpathdirs=
16628 names_already_handled=
16629 names_next_round='pth '
16630 while test -n "$names_next_round"; do
16631 names_this_round="$names_next_round"
16632 names_next_round=
16633 for name in $names_this_round; do
16634 already_handled=
16635 for n in $names_already_handled; do
16636 if test "$n" = "$name"; then
16637 already_handled=yes
16638 break
16639 fi
16640 done
16641 if test -z "$already_handled"; then
16642 names_already_handled="$names_already_handled $name"
16643 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
16644 eval value=\"\$HAVE_LIB$uppername\"
16645 if test -n "$value"; then
16646 if test "$value" = yes; then
16647 eval value=\"\$LIB$uppername\"
16648 test -z "$value" || LIBPTH="${LIBPTH}${LIBPTH:+ }$value"
16649 eval value=\"\$LTLIB$uppername\"
16650 test -z "$value" || LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$value"
16651 else
16652 :
16653 fi
16654 else
16655 found_dir=
16656 found_la=
16657 found_so=
16658 found_a=
16659 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
16660 if test -n "$acl_shlibext"; then
16661 shrext=".$acl_shlibext" # typically: shrext=.so
16662 else
16663 shrext=
16664 fi
16665 if test $use_additional = yes; then
16666 dir="$additional_libdir"
16667 if test -n "$acl_shlibext"; then
16668 if test -f "$dir/$libname$shrext"; then
16669 found_dir="$dir"
16670 found_so="$dir/$libname$shrext"
16671 else
16672 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
16673 ver=`(cd "$dir" && \
16674 for f in "$libname$shrext".*; do echo "$f"; done \
16675 | sed -e "s,^$libname$shrext\\\\.,," \
16676 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
16677 | sed 1q ) 2>/dev/null`
16678 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
16679 found_dir="$dir"
16680 found_so="$dir/$libname$shrext.$ver"
16681 fi
16682 else
16683 eval library_names=\"$acl_library_names_spec\"
16684 for f in $library_names; do
16685 if test -f "$dir/$f"; then
16686 found_dir="$dir"
16687 found_so="$dir/$f"
16688 break
16689 fi
16690 done
16691 fi
16692 fi
16693 fi
16694 if test "X$found_dir" = "X"; then
16695 if test -f "$dir/$libname.$acl_libext"; then
16696 found_dir="$dir"
16697 found_a="$dir/$libname.$acl_libext"
16698 fi
16699 fi
16700 if test "X$found_dir" != "X"; then
16701 if test -f "$dir/$libname.la"; then
16702 found_la="$dir/$libname.la"
16703 fi
16704 fi
16705 fi
16706 if test "X$found_dir" = "X"; then
16707 for x in $LDFLAGS $LTLIBPTH; do
16708
16709 acl_save_prefix="$prefix"
16710 prefix="$acl_final_prefix"
16711 acl_save_exec_prefix="$exec_prefix"
16712 exec_prefix="$acl_final_exec_prefix"
16713 eval x=\"$x\"
16714 exec_prefix="$acl_save_exec_prefix"
16715 prefix="$acl_save_prefix"
16716
16717 case "$x" in
16718 -L*)
16719 dir=`echo "X$x" | sed -e 's/^X-L//'`
16720 if test -n "$acl_shlibext"; then
16721 if test -f "$dir/$libname$shrext"; then
16722 found_dir="$dir"
16723 found_so="$dir/$libname$shrext"
16724 else
16725 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
16726 ver=`(cd "$dir" && \
16727 for f in "$libname$shrext".*; do echo "$f"; done \
16728 | sed -e "s,^$libname$shrext\\\\.,," \
16729 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
16730 | sed 1q ) 2>/dev/null`
16731 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
16732 found_dir="$dir"
16733 found_so="$dir/$libname$shrext.$ver"
16734 fi
16735 else
16736 eval library_names=\"$acl_library_names_spec\"
16737 for f in $library_names; do
16738 if test -f "$dir/$f"; then
16739 found_dir="$dir"
16740 found_so="$dir/$f"
16741 break
16742 fi
16743 done
16744 fi
16745 fi
16746 fi
16747 if test "X$found_dir" = "X"; then
16748 if test -f "$dir/$libname.$acl_libext"; then
16749 found_dir="$dir"
16750 found_a="$dir/$libname.$acl_libext"
16751 fi
16752 fi
16753 if test "X$found_dir" != "X"; then
16754 if test -f "$dir/$libname.la"; then
16755 found_la="$dir/$libname.la"
16756 fi
16757 fi
16758 ;;
16759 esac
16760 if test "X$found_dir" != "X"; then
16761 break
16762 fi
16763 done
16764 fi
16765 if test "X$found_dir" != "X"; then
16766 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$found_dir -l$name"
16767 if test "X$found_so" != "X"; then
16768 if test "$enable_rpath" = no \
16769 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
16770 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
16771 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
16772 else
16773 haveit=
16774 for x in $ltrpathdirs; do
16775 if test "X$x" = "X$found_dir"; then
16776 haveit=yes
16777 break
16778 fi
16779 done
16780 if test -z "$haveit"; then
16781 ltrpathdirs="$ltrpathdirs $found_dir"
16782 fi
16783 if test "$acl_hardcode_direct" = yes; then
16784 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
16785 else
16786 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
16787 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
16788 haveit=
16789 for x in $rpathdirs; do
16790 if test "X$x" = "X$found_dir"; then
16791 haveit=yes
16792 break
16793 fi
16794 done
16795 if test -z "$haveit"; then
16796 rpathdirs="$rpathdirs $found_dir"
16797 fi
16798 else
16799 haveit=
16800 for x in $LDFLAGS $LIBPTH; do
16801
16802 acl_save_prefix="$prefix"
16803 prefix="$acl_final_prefix"
16804 acl_save_exec_prefix="$exec_prefix"
16805 exec_prefix="$acl_final_exec_prefix"
16806 eval x=\"$x\"
16807 exec_prefix="$acl_save_exec_prefix"
16808 prefix="$acl_save_prefix"
16809
16810 if test "X$x" = "X-L$found_dir"; then
16811 haveit=yes
16812 break
16813 fi
16814 done
16815 if test -z "$haveit"; then
16816 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir"
16817 fi
16818 if test "$acl_hardcode_minus_L" != no; then
16819 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
16820 else
16821 LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
16822 fi
16823 fi
16824 fi
16825 fi
16826 else
16827 if test "X$found_a" != "X"; then
16828 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_a"
16829 else
16830 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir -l$name"
16831 fi
16832 fi
16833 additional_includedir=
16834 case "$found_dir" in
16835 */$acl_libdirstem | */$acl_libdirstem/)
16836 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
16837 if test "$name" = 'pth'; then
16838 LIBPTH_PREFIX="$basedir"
16839 fi
16840 additional_includedir="$basedir/include"
16841 ;;
16842 */$acl_libdirstem2 | */$acl_libdirstem2/)
16843 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
16844 if test "$name" = 'pth'; then
16845 LIBPTH_PREFIX="$basedir"
16846 fi
16847 additional_includedir="$basedir/include"
16848 ;;
16849 esac
16850 if test "X$additional_includedir" != "X"; then
16851 if test "X$additional_includedir" != "X/usr/include"; then
16852 haveit=
16853 if test "X$additional_includedir" = "X/usr/local/include"; then
16854 if test -n "$GCC"; then
16855 case $host_os in
16856 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
16857 esac
16858 fi
16859 fi
16860 if test -z "$haveit"; then
16861 for x in $CPPFLAGS $INCPTH; do
16862
16863 acl_save_prefix="$prefix"
16864 prefix="$acl_final_prefix"
16865 acl_save_exec_prefix="$exec_prefix"
16866 exec_prefix="$acl_final_exec_prefix"
16867 eval x=\"$x\"
16868 exec_prefix="$acl_save_exec_prefix"
16869 prefix="$acl_save_prefix"
16870
16871 if test "X$x" = "X-I$additional_includedir"; then
16872 haveit=yes
16873 break
16874 fi
16875 done
16876 if test -z "$haveit"; then
16877 if test -d "$additional_includedir"; then
16878 INCPTH="${INCPTH}${INCPTH:+ }-I$additional_includedir"
16879 fi
16880 fi
16881 fi
16882 fi
16883 fi
16884 if test -n "$found_la"; then
16885 save_libdir="$libdir"
16886 case "$found_la" in
16887 */* | *\\*) . "$found_la" ;;
16888 *) . "./$found_la" ;;
16889 esac
16890 libdir="$save_libdir"
16891 for dep in $dependency_libs; do
16892 case "$dep" in
16893 -L*)
16894 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
16895 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
16896 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
16897 haveit=
16898 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
16899 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
16900 if test -n "$GCC"; then
16901 case $host_os in
16902 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
16903 esac
16904 fi
16905 fi
16906 if test -z "$haveit"; then
16907 haveit=
16908 for x in $LDFLAGS $LIBPTH; do
16909
16910 acl_save_prefix="$prefix"
16911 prefix="$acl_final_prefix"
16912 acl_save_exec_prefix="$exec_prefix"
16913 exec_prefix="$acl_final_exec_prefix"
16914 eval x=\"$x\"
16915 exec_prefix="$acl_save_exec_prefix"
16916 prefix="$acl_save_prefix"
16917
16918 if test "X$x" = "X-L$additional_libdir"; then
16919 haveit=yes
16920 break
16921 fi
16922 done
16923 if test -z "$haveit"; then
16924 if test -d "$additional_libdir"; then
16925 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$additional_libdir"
16926 fi
16927 fi
16928 haveit=
16929 for x in $LDFLAGS $LTLIBPTH; do
16930
16931 acl_save_prefix="$prefix"
16932 prefix="$acl_final_prefix"
16933 acl_save_exec_prefix="$exec_prefix"
16934 exec_prefix="$acl_final_exec_prefix"
16935 eval x=\"$x\"
16936 exec_prefix="$acl_save_exec_prefix"
16937 prefix="$acl_save_prefix"
16938
16939 if test "X$x" = "X-L$additional_libdir"; then
16940 haveit=yes
16941 break
16942 fi
16943 done
16944 if test -z "$haveit"; then
16945 if test -d "$additional_libdir"; then
16946 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$additional_libdir"
16947 fi
16948 fi
16949 fi
16950 fi
16951 ;;
16952 -R*)
16953 dir=`echo "X$dep" | sed -e 's/^X-R//'`
16954 if test "$enable_rpath" != no; then
16955 haveit=
16956 for x in $rpathdirs; do
16957 if test "X$x" = "X$dir"; then
16958 haveit=yes
16959 break
16960 fi
16961 done
16962 if test -z "$haveit"; then
16963 rpathdirs="$rpathdirs $dir"
16964 fi
16965 haveit=
16966 for x in $ltrpathdirs; do
16967 if test "X$x" = "X$dir"; then
16968 haveit=yes
16969 break
16970 fi
16971 done
16972 if test -z "$haveit"; then
16973 ltrpathdirs="$ltrpathdirs $dir"
16974 fi
16975 fi
16976 ;;
16977 -l*)
16978 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
16979 ;;
16980 *.la)
16981 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
16982 ;;
16983 *)
16984 LIBPTH="${LIBPTH}${LIBPTH:+ }$dep"
16985 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$dep"
16986 ;;
16987 esac
16988 done
16989 fi
16990 else
16991 LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
16992 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-l$name"
16993 fi
16994 fi
16995 fi
16996 done
16997 done
16998 if test "X$rpathdirs" != "X"; then
16999 if test -n "$acl_hardcode_libdir_separator"; then
17000 alldirs=
17001 for found_dir in $rpathdirs; do
17002 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
17003 done
17004 acl_save_libdir="$libdir"
17005 libdir="$alldirs"
17006 eval flag=\"$acl_hardcode_libdir_flag_spec\"
17007 libdir="$acl_save_libdir"
17008 LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
17009 else
17010 for found_dir in $rpathdirs; do
17011 acl_save_libdir="$libdir"
17012 libdir="$found_dir"
17013 eval flag=\"$acl_hardcode_libdir_flag_spec\"
17014 libdir="$acl_save_libdir"
17015 LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
17016 done
17017 fi
17018 fi
17019 if test "X$ltrpathdirs" != "X"; then
17020 for found_dir in $ltrpathdirs; do
17021 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-R$found_dir"
17022 done
17023 fi
17024
17025
17026
17027
17028
17029 ac_cv_libpth_libs="$LIBPTH"
17030 ac_cv_libpth_ltlibs="$LTLIBPTH"
17031 ac_cv_libpth_cppflags="$INCPTH"
17032 ac_cv_libpth_prefix="$LIBPTH_PREFIX"
17033
17034 fi
17035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libpth_libs" >&5
17036 $as_echo "$ac_cv_libpth_libs" >&6; }
17037 LIBPTH="$ac_cv_libpth_libs"
17038 LTLIBPTH="$ac_cv_libpth_ltlibs"
17039 INCPTH="$ac_cv_libpth_cppflags"
17040 LIBPTH_PREFIX="$ac_cv_libpth_prefix"
17041
17042 for element in $INCPTH; do
17043 haveit=
17044 for x in $CPPFLAGS; do
17045
17046 acl_save_prefix="$prefix"
17047 prefix="$acl_final_prefix"
17048 acl_save_exec_prefix="$exec_prefix"
17049 exec_prefix="$acl_final_exec_prefix"
17050 eval x=\"$x\"
17051 exec_prefix="$acl_save_exec_prefix"
17052 prefix="$acl_save_prefix"
17053
17054 if test "X$x" = "X$element"; then
17055 haveit=yes
17056 break
17057 fi
17058 done
17059 if test -z "$haveit"; then
17060 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
17061 fi
17062 done
17063
17064
17065
17066
17067 HAVE_LIBPTH=yes
17068
17069
17070
17071 gl_have_pth=
17072 gl_save_LIBS="$LIBS"
17073 LIBS="$LIBS $LIBPTH"
17074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17075 /* end confdefs.h. */
17076 #include <pth.h>
17077 int
17078 main (void)
17079 {
17080 pth_self();
17081 ;
17082 return 0;
17083 }
17084 _ACEOF
17085 if ac_fn_c_try_link "$LINENO"; then :
17086 gl_have_pth=yes
17087 fi
17088 rm -f core conftest.err conftest.$ac_objext \
17089 conftest$ac_exeext conftest.$ac_ext
17090 LIBS="$gl_save_LIBS"
17091 if test -n "$gl_have_pth"; then
17092 gl_threads_api=pth
17093 LIBTHREAD="$LIBPTH"
17094 LTLIBTHREAD="$LTLIBPTH"
17095 LIBMULTITHREAD="$LIBTHREAD"
17096 LTLIBMULTITHREAD="$LTLIBTHREAD"
17097
17098 $as_echo "#define USE_PTH_THREADS 1" >>confdefs.h
17099
17100 if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
17101 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
17102
17103 $as_echo "#define USE_PTH_THREADS_WEAK 1" >>confdefs.h
17104
17105 LIBTHREAD=
17106 LTLIBTHREAD=
17107 if test $gl_cv_linker_have_as_needed = yes; then
17108 if test $gl_cv_linker_have_push_state = yes; then
17109 LIBMULTITHREAD="-Wl,--push-state -Wl,--no-as-needed $LIBMULTITHREAD -Wl,--pop-state"
17110 else
17111 LIBMULTITHREAD="-Wl,--no-as-needed $LIBMULTITHREAD"
17112 fi
17113 fi
17114 # TODO: May need to modify LTLIBMULTITHREAD similarly.
17115 fi
17116 fi
17117 else
17118 CPPFLAGS="$gl_save_CPPFLAGS"
17119 fi
17120 fi
17121 if test -z "$gl_have_pthread"; then
17122 case "$gl_use_threads" in
17123 yes | windows | win32) # The 'win32' is for backward compatibility.
17124 if { case "$host_os" in
17125 mingw*) true;;
17126 *) false;;
17127 esac
17128 }; then
17129 gl_threads_api=windows
17130
17131 $as_echo "#define USE_WINDOWS_THREADS 1" >>confdefs.h
17132
17133 fi
17134 ;;
17135 esac
17136 fi
17137 fi
17138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5
17139 $as_echo_n "checking for multithread API to use... " >&6; }
17140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5
17141 $as_echo "$gl_threads_api" >&6; }
17142
17143
17144
17145
17146
17147
17148
17149
17150
17151
17152 GNULIB__EXIT=0;
17153 GNULIB_ATOLL=0;
17154 GNULIB_CALLOC_POSIX=0;
17155 GNULIB_CANONICALIZE_FILE_NAME=0;
17156 GNULIB_GETLOADAVG=0;
17157 GNULIB_GETSUBOPT=0;
17158 GNULIB_GRANTPT=0;
17159 GNULIB_MALLOC_POSIX=0;
17160 GNULIB_MBTOWC=0;
17161 GNULIB_MKDTEMP=0;
17162 GNULIB_MKOSTEMP=0;
17163 GNULIB_MKOSTEMPS=0;
17164 GNULIB_MKSTEMP=0;
17165 GNULIB_MKSTEMPS=0;
17166 GNULIB_POSIX_OPENPT=0;
17167 GNULIB_PTSNAME=0;
17168 GNULIB_PTSNAME_R=0;
17169 GNULIB_PUTENV=0;
17170 GNULIB_QSORT_R=0;
17171 GNULIB_RANDOM=0;
17172 GNULIB_RANDOM_R=0;
17173 GNULIB_REALLOCARRAY=0;
17174 GNULIB_REALLOC_POSIX=0;
17175 GNULIB_REALPATH=0;
17176 GNULIB_RPMATCH=0;
17177 GNULIB_SECURE_GETENV=0;
17178 GNULIB_SETENV=0;
17179 GNULIB_STRTOD=0;
17180 GNULIB_STRTOLL=0;
17181 GNULIB_STRTOULL=0;
17182 GNULIB_SYSTEM_POSIX=0;
17183 GNULIB_UNLOCKPT=0;
17184 GNULIB_UNSETENV=0;
17185 GNULIB_WCTOMB=0;
17186 HAVE__EXIT=1;
17187 HAVE_ATOLL=1;
17188 HAVE_CANONICALIZE_FILE_NAME=1;
17189 HAVE_DECL_GETLOADAVG=1;
17190 HAVE_GETSUBOPT=1;
17191 HAVE_GRANTPT=1;
17192 HAVE_DECL_INITSTATE=1;
17193 HAVE_MKDTEMP=1;
17194 HAVE_MKOSTEMP=1;
17195 HAVE_MKOSTEMPS=1;
17196 HAVE_MKSTEMP=1;
17197 HAVE_MKSTEMPS=1;
17198 HAVE_POSIX_OPENPT=1;
17199 HAVE_PTSNAME=1;
17200 HAVE_PTSNAME_R=1;
17201 HAVE_QSORT_R=1;
17202 HAVE_RANDOM=1;
17203 HAVE_RANDOM_H=1;
17204 HAVE_RANDOM_R=1;
17205 HAVE_REALLOCARRAY=1;
17206 HAVE_REALPATH=1;
17207 HAVE_RPMATCH=1;
17208 HAVE_SECURE_GETENV=1;
17209 HAVE_SETENV=1;
17210 HAVE_DECL_SETENV=1;
17211 HAVE_DECL_SETSTATE=1;
17212 HAVE_STRTOD=1;
17213 HAVE_STRTOLL=1;
17214 HAVE_STRTOULL=1;
17215 HAVE_STRUCT_RANDOM_DATA=1;
17216 HAVE_SYS_LOADAVG_H=0;
17217 HAVE_UNLOCKPT=1;
17218 HAVE_DECL_UNSETENV=1;
17219 REPLACE_CALLOC=0;
17220 REPLACE_CANONICALIZE_FILE_NAME=0;
17221 REPLACE_MALLOC=0;
17222 REPLACE_MBTOWC=0;
17223 REPLACE_MKSTEMP=0;
17224 REPLACE_PTSNAME=0;
17225 REPLACE_PTSNAME_R=0;
17226 REPLACE_PUTENV=0;
17227 REPLACE_QSORT_R=0;
17228 REPLACE_RANDOM_R=0;
17229 REPLACE_REALLOC=0;
17230 REPLACE_REALPATH=0;
17231 REPLACE_SETENV=0;
17232 REPLACE_STRTOD=0;
17233 REPLACE_UNSETENV=0;
17234 REPLACE_WCTOMB=0;
17235
17236
17237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
17238 $as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
17239 if ${gl_cv_func_malloc_posix+:} false; then :
17240 $as_echo_n "(cached) " >&6
17241 else
17242
17243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17244 /* end confdefs.h. */
17245
17246 int
17247 main (void)
17248 {
17249 #if defined _WIN32 && ! defined __CYGWIN__
17250 choke me
17251 #endif
17252
17253 ;
17254 return 0;
17255 }
17256 _ACEOF
17257 if ac_fn_c_try_compile "$LINENO"; then :
17258 gl_cv_func_malloc_posix=yes
17259 else
17260 gl_cv_func_malloc_posix=no
17261 fi
17262 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17263
17264 fi
17265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
17266 $as_echo "$gl_cv_func_malloc_posix" >&6; }
17267
17268
17269
17270 for ac_header in stdlib.h
17271 do :
17272 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
17273 if test "x$ac_cv_header_stdlib_h" = xyes; then :
17274 cat >>confdefs.h <<_ACEOF
17275 #define HAVE_STDLIB_H 1
17276 _ACEOF
17277
17278 fi
17279
17280 done
17281
17282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
17283 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
17284 if ${ac_cv_func_malloc_0_nonnull+:} false; then :
17285 $as_echo_n "(cached) " >&6
17286 else
17287 if test "$cross_compiling" = yes; then :
17288 case "$host_os" in
17289 # Guess yes on platforms where we know the result.
17290 *-gnu* | gnu* | freebsd* | netbsd* | openbsd* \
17291 | hpux* | solaris* | cygwin* | mingw*)
17292 ac_cv_func_malloc_0_nonnull=yes ;;
17293 # If we don't know, assume the worst.
17294 *) ac_cv_func_malloc_0_nonnull=no ;;
17295 esac
17296
17297 else
17298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17299 /* end confdefs.h. */
17300 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
17301 # include <stdlib.h>
17302 #else
17303 char *malloc ();
17304 #endif
17305
17306 int
17307 main (void)
17308 {
17309 char *p = malloc (0);
17310 int result = !p;
17311 free (p);
17312 return result;
17313 ;
17314 return 0;
17315 }
17316
17317 _ACEOF
17318 if ac_fn_c_try_run "$LINENO"; then :
17319 ac_cv_func_malloc_0_nonnull=yes
17320 else
17321 ac_cv_func_malloc_0_nonnull=no
17322 fi
17323 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17324 conftest.$ac_objext conftest.beam conftest.$ac_ext
17325 fi
17326
17327
17328 fi
17329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
17330 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
17331 if test $ac_cv_func_malloc_0_nonnull = yes; then :
17332 gl_cv_func_malloc_0_nonnull=1
17333 else
17334 gl_cv_func_malloc_0_nonnull=0
17335 fi
17336
17337
17338 cat >>confdefs.h <<_ACEOF
17339 #define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
17340 _ACEOF
17341
17342
17343
17344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
17345 $as_echo_n "checking for unsigned long long int... " >&6; }
17346 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
17347 $as_echo_n "(cached) " >&6
17348 else
17349 ac_cv_type_unsigned_long_long_int=yes
17350 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
17351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17352 /* end confdefs.h. */
17353
17354 /* For now, do not test the preprocessor; as of 2007 there are too many
17355 implementations with broken preprocessors. Perhaps this can
17356 be revisited in 2012. In the meantime, code should not expect
17357 #if to work with literals wider than 32 bits. */
17358 /* Test literals. */
17359 long long int ll = 9223372036854775807ll;
17360 long long int nll = -9223372036854775807LL;
17361 unsigned long long int ull = 18446744073709551615ULL;
17362 /* Test constant expressions. */
17363 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
17364 ? 1 : -1)];
17365 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
17366 ? 1 : -1)];
17367 int i = 63;
17368 int
17369 main (void)
17370 {
17371 /* Test availability of runtime routines for shift and division. */
17372 long long int llmax = 9223372036854775807ll;
17373 unsigned long long int ullmax = 18446744073709551615ull;
17374 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
17375 | (llmax / ll) | (llmax % ll)
17376 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
17377 | (ullmax / ull) | (ullmax % ull));
17378 ;
17379 return 0;
17380 }
17381
17382 _ACEOF
17383 if ac_fn_c_try_link "$LINENO"; then :
17384
17385 else
17386 ac_cv_type_unsigned_long_long_int=no
17387 fi
17388 rm -f core conftest.err conftest.$ac_objext \
17389 conftest$ac_exeext conftest.$ac_ext
17390 fi
17391 fi
17392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
17393 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
17394 if test $ac_cv_type_unsigned_long_long_int = yes; then
17395
17396 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
17397
17398 fi
17399
17400
17401
17402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
17403 $as_echo_n "checking for long long int... " >&6; }
17404 if ${ac_cv_type_long_long_int+:} false; then :
17405 $as_echo_n "(cached) " >&6
17406 else
17407 ac_cv_type_long_long_int=yes
17408 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
17409 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
17410 if test $ac_cv_type_long_long_int = yes; then
17411 if test "$cross_compiling" = yes; then :
17412 :
17413 else
17414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17415 /* end confdefs.h. */
17416 #include <limits.h>
17417 #ifndef LLONG_MAX
17418 # define HALF \
17419 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
17420 # define LLONG_MAX (HALF - 1 + HALF)
17421 #endif
17422 int
17423 main (void)
17424 {
17425 long long int n = 1;
17426 int i;
17427 for (i = 0; ; i++)
17428 {
17429 long long int m = n << i;
17430 if (m >> i != n)
17431 return 1;
17432 if (LLONG_MAX / 2 < m)
17433 break;
17434 }
17435 return 0;
17436 ;
17437 return 0;
17438 }
17439 _ACEOF
17440 if ac_fn_c_try_run "$LINENO"; then :
17441
17442 else
17443 ac_cv_type_long_long_int=no
17444 fi
17445 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17446 conftest.$ac_objext conftest.beam conftest.$ac_ext
17447 fi
17448
17449 fi
17450 fi
17451 fi
17452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
17453 $as_echo "$ac_cv_type_long_long_int" >&6; }
17454 if test $ac_cv_type_long_long_int = yes; then
17455
17456 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
17457
17458 fi
17459
17460
17461
17462
17463
17464
17465
17466
17467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
17468 $as_echo_n "checking for a traditional japanese locale... " >&6; }
17469 if ${gt_cv_locale_ja+:} false; then :
17470 $as_echo_n "(cached) " >&6
17471 else
17472
17473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17474 /* end confdefs.h. */
17475
17476 #include <locale.h>
17477 #include <time.h>
17478 #if HAVE_LANGINFO_CODESET
17479 # include <langinfo.h>
17480 #endif
17481 #include <stdlib.h>
17482 #include <string.h>
17483 struct tm t;
17484 char buf[16];
17485 int main ()
17486 {
17487 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
17488 imitates locale dependent behaviour by looking at the environment
17489 variables, and all locales use the UTF-8 encoding. */
17490 #if defined __BEOS__ || defined __HAIKU__
17491 return 1;
17492 #else
17493 /* Check whether the given locale name is recognized by the system. */
17494 # if defined _WIN32 && !defined __CYGWIN__
17495 /* On native Windows, setlocale(category, "") looks at the system settings,
17496 not at the environment variables. Also, when an encoding suffix such
17497 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
17498 category of the locale to "C". */
17499 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
17500 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
17501 return 1;
17502 # else
17503 if (setlocale (LC_ALL, "") == NULL) return 1;
17504 # endif
17505 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
17506 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
17507 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
17508 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
17509 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
17510 some unit tests fail.
17511 On MirBSD 10, when an unsupported locale is specified, setlocale()
17512 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
17513 # if HAVE_LANGINFO_CODESET
17514 {
17515 const char *cs = nl_langinfo (CODESET);
17516 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
17517 || strcmp (cs, "UTF-8") == 0)
17518 return 1;
17519 }
17520 # endif
17521 # ifdef __CYGWIN__
17522 /* On Cygwin, avoid locale names without encoding suffix, because the
17523 locale_charset() function relies on the encoding suffix. Note that
17524 LC_ALL is set on the command line. */
17525 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
17526 # endif
17527 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
17528 on Cygwin 1.5.x. */
17529 if (MB_CUR_MAX == 1)
17530 return 1;
17531 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
17532 This excludes the UTF-8 encoding (except on MirBSD). */
17533 {
17534 const char *p;
17535 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
17536 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
17537 for (p = buf; *p != '\0'; p++)
17538 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
17539 return 1;
17540 }
17541 return 0;
17542 #endif
17543 }
17544
17545 _ACEOF
17546 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
17547 (eval $ac_link) 2>&5
17548 ac_status=$?
17549 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17550 test $ac_status = 0; } && test -s conftest$ac_exeext; then
17551 case "$host_os" in
17552 # Handle native Windows specially, because there setlocale() interprets
17553 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
17554 # "fr" or "fra" as "French" or "French_France.1252",
17555 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
17556 # "ja" as "Japanese" or "Japanese_Japan.932",
17557 # and similar.
17558 mingw*)
17559 # Note that on native Windows, the Japanese locale is
17560 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
17561 # cannot use it here.
17562 gt_cv_locale_ja=none
17563 ;;
17564 *)
17565 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
17566 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
17567 # configure script would override the LC_ALL setting. Likewise for
17568 # LC_CTYPE, which is also set at the beginning of the configure script.
17569 # Test for the AIX locale name.
17570 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
17571 gt_cv_locale_ja=ja_JP
17572 else
17573 # Test for the locale name with explicit encoding suffix.
17574 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
17575 gt_cv_locale_ja=ja_JP.EUC-JP
17576 else
17577 # Test for the HP-UX, OSF/1, NetBSD locale name.
17578 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
17579 gt_cv_locale_ja=ja_JP.eucJP
17580 else
17581 # Test for the IRIX, FreeBSD locale name.
17582 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
17583 gt_cv_locale_ja=ja_JP.EUC
17584 else
17585 # Test for the Solaris 7 locale name.
17586 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
17587 gt_cv_locale_ja=ja
17588 else
17589 # Special test for NetBSD 1.6.
17590 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
17591 gt_cv_locale_ja=ja_JP.eucJP
17592 else
17593 # None found.
17594 gt_cv_locale_ja=none
17595 fi
17596 fi
17597 fi
17598 fi
17599 fi
17600 fi
17601 ;;
17602 esac
17603 fi
17604 rm -fr conftest*
17605
17606 fi
17607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
17608 $as_echo "$gt_cv_locale_ja" >&6; }
17609 LOCALE_JA=$gt_cv_locale_ja
17610
17611
17612
17613
17614
17615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
17616 $as_echo_n "checking for a transitional chinese locale... " >&6; }
17617 if ${gt_cv_locale_zh_CN+:} false; then :
17618 $as_echo_n "(cached) " >&6
17619 else
17620
17621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17622 /* end confdefs.h. */
17623
17624 #include <locale.h>
17625 #include <stdlib.h>
17626 #include <time.h>
17627 #if HAVE_LANGINFO_CODESET
17628 # include <langinfo.h>
17629 #endif
17630 #include <stdlib.h>
17631 #include <string.h>
17632 struct tm t;
17633 char buf[16];
17634 int main ()
17635 {
17636 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
17637 imitates locale dependent behaviour by looking at the environment
17638 variables, and all locales use the UTF-8 encoding. */
17639 #if defined __BEOS__ || defined __HAIKU__
17640 return 1;
17641 #else
17642 /* Check whether the given locale name is recognized by the system. */
17643 # if defined _WIN32 && !defined __CYGWIN__
17644 /* On native Windows, setlocale(category, "") looks at the system settings,
17645 not at the environment variables. Also, when an encoding suffix such
17646 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
17647 category of the locale to "C". */
17648 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
17649 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
17650 return 1;
17651 # else
17652 if (setlocale (LC_ALL, "") == NULL) return 1;
17653 # endif
17654 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
17655 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
17656 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
17657 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
17658 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
17659 some unit tests fail.
17660 On MirBSD 10, when an unsupported locale is specified, setlocale()
17661 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
17662 # if HAVE_LANGINFO_CODESET
17663 {
17664 const char *cs = nl_langinfo (CODESET);
17665 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
17666 || strcmp (cs, "UTF-8") == 0)
17667 return 1;
17668 }
17669 # endif
17670 # ifdef __CYGWIN__
17671 /* On Cygwin, avoid locale names without encoding suffix, because the
17672 locale_charset() function relies on the encoding suffix. Note that
17673 LC_ALL is set on the command line. */
17674 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
17675 # endif
17676 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
17677 This excludes the UTF-8 encoding (except on MirBSD). */
17678 {
17679 const char *p;
17680 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
17681 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
17682 for (p = buf; *p != '\0'; p++)
17683 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
17684 return 1;
17685 }
17686 /* Check whether a typical GB18030 multibyte sequence is recognized as a
17687 single wide character. This excludes the GB2312 and GBK encodings. */
17688 if (mblen ("\203\062\332\066", 5) != 4)
17689 return 1;
17690 return 0;
17691 #endif
17692 }
17693
17694 _ACEOF
17695 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
17696 (eval $ac_link) 2>&5
17697 ac_status=$?
17698 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17699 test $ac_status = 0; } && test -s conftest$ac_exeext; then
17700 case "$host_os" in
17701 # Handle native Windows specially, because there setlocale() interprets
17702 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
17703 # "fr" or "fra" as "French" or "French_France.1252",
17704 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
17705 # "ja" as "Japanese" or "Japanese_Japan.932",
17706 # and similar.
17707 mingw*)
17708 # Test for the hypothetical native Windows locale name.
17709 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
17710 gt_cv_locale_zh_CN=Chinese_China.54936
17711 else
17712 # None found.
17713 gt_cv_locale_zh_CN=none
17714 fi
17715 ;;
17716 solaris2.8)
17717 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
17718 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
17719 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
17720 gt_cv_locale_zh_CN=none
17721 ;;
17722 *)
17723 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
17724 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
17725 # configure script would override the LC_ALL setting. Likewise for
17726 # LC_CTYPE, which is also set at the beginning of the configure script.
17727 # Test for the locale name without encoding suffix.
17728 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
17729 gt_cv_locale_zh_CN=zh_CN
17730 else
17731 # Test for the locale name with explicit encoding suffix.
17732 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
17733 gt_cv_locale_zh_CN=zh_CN.GB18030
17734 else
17735 # None found.
17736 gt_cv_locale_zh_CN=none
17737 fi
17738 fi
17739 ;;
17740 esac
17741 else
17742 # If there was a link error, due to mblen(), the system is so old that
17743 # it certainly doesn't have a chinese locale.
17744 gt_cv_locale_zh_CN=none
17745 fi
17746 rm -fr conftest*
17747
17748 fi
17749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
17750 $as_echo "$gt_cv_locale_zh_CN" >&6; }
17751 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
17752
17753
17754
17755
17756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
17757 $as_echo_n "checking for a french Unicode locale... " >&6; }
17758 if ${gt_cv_locale_fr_utf8+:} false; then :
17759 $as_echo_n "(cached) " >&6
17760 else
17761
17762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17763 /* end confdefs.h. */
17764
17765 #include <locale.h>
17766 #include <time.h>
17767 #if HAVE_LANGINFO_CODESET
17768 # include <langinfo.h>
17769 #endif
17770 #include <stdlib.h>
17771 #include <string.h>
17772 struct tm t;
17773 char buf[16];
17774 int main () {
17775 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
17776 imitates locale dependent behaviour by looking at the environment
17777 variables, and all locales use the UTF-8 encoding. */
17778 #if !(defined __BEOS__ || defined __HAIKU__)
17779 /* Check whether the given locale name is recognized by the system. */
17780 # if defined _WIN32 && !defined __CYGWIN__
17781 /* On native Windows, setlocale(category, "") looks at the system settings,
17782 not at the environment variables. Also, when an encoding suffix such
17783 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
17784 category of the locale to "C". */
17785 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
17786 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
17787 return 1;
17788 # else
17789 if (setlocale (LC_ALL, "") == NULL) return 1;
17790 # endif
17791 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
17792 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
17793 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
17794 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
17795 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
17796 some unit tests fail. */
17797 # if HAVE_LANGINFO_CODESET
17798 {
17799 const char *cs = nl_langinfo (CODESET);
17800 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
17801 return 1;
17802 }
17803 # endif
17804 # ifdef __CYGWIN__
17805 /* On Cygwin, avoid locale names without encoding suffix, because the
17806 locale_charset() function relies on the encoding suffix. Note that
17807 LC_ALL is set on the command line. */
17808 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
17809 # endif
17810 /* Check whether in the abbreviation of the second month, the second
17811 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
17812 two bytes long, with UTF-8 encoding. */
17813 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
17814 if (strftime (buf, sizeof (buf), "%b", &t) < 4
17815 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
17816 return 1;
17817 #endif
17818 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
17819 /* Check whether the decimal separator is a comma.
17820 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
17821 are nl_langinfo(RADIXCHAR) are both ".". */
17822 if (localeconv () ->decimal_point[0] != ',') return 1;
17823 #endif
17824 return 0;
17825 }
17826
17827 _ACEOF
17828 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
17829 (eval $ac_link) 2>&5
17830 ac_status=$?
17831 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17832 test $ac_status = 0; } && test -s conftest$ac_exeext; then
17833 case "$host_os" in
17834 # Handle native Windows specially, because there setlocale() interprets
17835 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
17836 # "fr" or "fra" as "French" or "French_France.1252",
17837 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
17838 # "ja" as "Japanese" or "Japanese_Japan.932",
17839 # and similar.
17840 mingw*)
17841 # Test for the hypothetical native Windows locale name.
17842 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
17843 gt_cv_locale_fr_utf8=French_France.65001
17844 else
17845 # None found.
17846 gt_cv_locale_fr_utf8=none
17847 fi
17848 ;;
17849 *)
17850 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
17851 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
17852 # configure script would override the LC_ALL setting. Likewise for
17853 # LC_CTYPE, which is also set at the beginning of the configure script.
17854 # Test for the usual locale name.
17855 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
17856 gt_cv_locale_fr_utf8=fr_FR
17857 else
17858 # Test for the locale name with explicit encoding suffix.
17859 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
17860 gt_cv_locale_fr_utf8=fr_FR.UTF-8
17861 else
17862 # Test for the Solaris 7 locale name.
17863 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
17864 gt_cv_locale_fr_utf8=fr.UTF-8
17865 else
17866 # None found.
17867 gt_cv_locale_fr_utf8=none
17868 fi
17869 fi
17870 fi
17871 ;;
17872 esac
17873 fi
17874 rm -fr conftest*
17875
17876 fi
17877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
17878 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
17879 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
17880
17881
17882
17883
17884
17885
17886
17887
17888
17889
17890
17891 GNULIB_EXPLICIT_BZERO=0;
17892 GNULIB_FFSL=0;
17893 GNULIB_FFSLL=0;
17894 GNULIB_MEMCHR=0;
17895 GNULIB_MEMMEM=0;
17896 GNULIB_MEMPCPY=0;
17897 GNULIB_MEMRCHR=0;
17898 GNULIB_RAWMEMCHR=0;
17899 GNULIB_STPCPY=0;
17900 GNULIB_STPNCPY=0;
17901 GNULIB_STRCHRNUL=0;
17902 GNULIB_STRDUP=0;
17903 GNULIB_STRNCAT=0;
17904 GNULIB_STRNDUP=0;
17905 GNULIB_STRNLEN=0;
17906 GNULIB_STRPBRK=0;
17907 GNULIB_STRSEP=0;
17908 GNULIB_STRSTR=0;
17909 GNULIB_STRCASESTR=0;
17910 GNULIB_STRTOK_R=0;
17911 GNULIB_MBSLEN=0;
17912 GNULIB_MBSNLEN=0;
17913 GNULIB_MBSCHR=0;
17914 GNULIB_MBSRCHR=0;
17915 GNULIB_MBSSTR=0;
17916 GNULIB_MBSCASECMP=0;
17917 GNULIB_MBSNCASECMP=0;
17918 GNULIB_MBSPCASECMP=0;
17919 GNULIB_MBSCASESTR=0;
17920 GNULIB_MBSCSPN=0;
17921 GNULIB_MBSPBRK=0;
17922 GNULIB_MBSSPN=0;
17923 GNULIB_MBSSEP=0;
17924 GNULIB_MBSTOK_R=0;
17925 GNULIB_STRERROR=0;
17926 GNULIB_STRERROR_R=0;
17927 GNULIB_STRSIGNAL=0;
17928 GNULIB_STRVERSCMP=0;
17929 HAVE_MBSLEN=0;
17930 HAVE_EXPLICIT_BZERO=1;
17931 HAVE_FFSL=1;
17932 HAVE_FFSLL=1;
17933 HAVE_MEMCHR=1;
17934 HAVE_DECL_MEMMEM=1;
17935 HAVE_MEMPCPY=1;
17936 HAVE_DECL_MEMRCHR=1;
17937 HAVE_RAWMEMCHR=1;
17938 HAVE_STPCPY=1;
17939 HAVE_STPNCPY=1;
17940 HAVE_STRCHRNUL=1;
17941 HAVE_DECL_STRDUP=1;
17942 HAVE_DECL_STRNDUP=1;
17943 HAVE_DECL_STRNLEN=1;
17944 HAVE_STRPBRK=1;
17945 HAVE_STRSEP=1;
17946 HAVE_STRCASESTR=1;
17947 HAVE_DECL_STRTOK_R=1;
17948 HAVE_DECL_STRERROR_R=1;
17949 HAVE_DECL_STRSIGNAL=1;
17950 HAVE_STRVERSCMP=1;
17951 REPLACE_MEMCHR=0;
17952 REPLACE_MEMMEM=0;
17953 REPLACE_STPNCPY=0;
17954 REPLACE_STRCHRNUL=0;
17955 REPLACE_STRDUP=0;
17956 REPLACE_STRNCAT=0;
17957 REPLACE_STRNDUP=0;
17958 REPLACE_STRNLEN=0;
17959 REPLACE_STRSTR=0;
17960 REPLACE_STRCASESTR=0;
17961 REPLACE_STRTOK_R=0;
17962 REPLACE_STRERROR=0;
17963 REPLACE_STRERROR_R=0;
17964 REPLACE_STRSIGNAL=0;
17965 UNDEFINE_STRTOK_R=0;
17966
17967
17968
17969
17970
17971
17972 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
17973 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
17974 # irrelevant for anonymous mappings.
17975 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
17976 if test "x$ac_cv_func_mmap" = xyes; then :
17977 gl_have_mmap=yes
17978 else
17979 gl_have_mmap=no
17980 fi
17981
17982
17983 # Try to allow MAP_ANONYMOUS.
17984 gl_have_mmap_anonymous=no
17985 if test $gl_have_mmap = yes; then
17986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
17987 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
17988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17989 /* end confdefs.h. */
17990
17991 #include <sys/mman.h>
17992 #ifdef MAP_ANONYMOUS
17993 I cannot identify this map
17994 #endif
17995
17996 _ACEOF
17997 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17998 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
17999 gl_have_mmap_anonymous=yes
18000 fi
18001 rm -f conftest*
18002
18003 if test $gl_have_mmap_anonymous != yes; then
18004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18005 /* end confdefs.h. */
18006
18007 #include <sys/mman.h>
18008 #ifdef MAP_ANON
18009 I cannot identify this map
18010 #endif
18011
18012 _ACEOF
18013 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18014 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
18015
18016 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
18017
18018 gl_have_mmap_anonymous=yes
18019 fi
18020 rm -f conftest*
18021
18022 fi
18023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
18024 $as_echo "$gl_have_mmap_anonymous" >&6; }
18025 if test $gl_have_mmap_anonymous = yes; then
18026
18027 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
18028
18029 fi
18030 fi
18031
18032
18033
18034
18035
18036
18037 if test $HAVE_MEMCHR = 1; then
18038 # Detect platform-specific bugs in some versions of glibc:
18039 # memchr should not dereference anything with length 0
18040 # https://bugzilla.redhat.com/show_bug.cgi?id=499689
18041 # memchr should not dereference overestimated length after a match
18042 # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
18043 # https://sourceware.org/bugzilla/show_bug.cgi?id=10162
18044 # Assume that memchr works on platforms that lack mprotect.
18045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
18046 $as_echo_n "checking whether memchr works... " >&6; }
18047 if ${gl_cv_func_memchr_works+:} false; then :
18048 $as_echo_n "(cached) " >&6
18049 else
18050 if test "$cross_compiling" = yes; then :
18051 case "$host_os" in
18052 # Guess yes on native Windows.
18053 mingw*) gl_cv_func_memchr_works="guessing yes" ;;
18054 # Be pessimistic for now.
18055 *) gl_cv_func_memchr_works="guessing no" ;;
18056 esac
18057
18058 else
18059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18060 /* end confdefs.h. */
18061
18062 #include <string.h>
18063 #if HAVE_SYS_MMAN_H
18064 # include <fcntl.h>
18065 # include <unistd.h>
18066 # include <sys/types.h>
18067 # include <sys/mman.h>
18068 # ifndef MAP_FILE
18069 # define MAP_FILE 0
18070 # endif
18071 #endif
18072
18073 int
18074 main (void)
18075 {
18076
18077 int result = 0;
18078 char *fence = NULL;
18079 #if HAVE_SYS_MMAN_H && HAVE_MPROTECT
18080 # if HAVE_MAP_ANONYMOUS
18081 const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
18082 const int fd = -1;
18083 # else /* !HAVE_MAP_ANONYMOUS */
18084 const int flags = MAP_FILE | MAP_PRIVATE;
18085 int fd = open ("/dev/zero", O_RDONLY, 0666);
18086 if (fd >= 0)
18087 # endif
18088 {
18089 int pagesize = getpagesize ();
18090 char *two_pages =
18091 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
18092 flags, fd, 0);
18093 if (two_pages != (char *)(-1)
18094 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
18095 fence = two_pages + pagesize;
18096 }
18097 #endif
18098 if (fence)
18099 {
18100 if (memchr (fence, 0, 0))
18101 result |= 1;
18102 strcpy (fence - 9, "12345678");
18103 if (memchr (fence - 9, 0, 79) != fence - 1)
18104 result |= 2;
18105 if (memchr (fence - 1, 0, 3) != fence - 1)
18106 result |= 4;
18107 }
18108 return result;
18109
18110 ;
18111 return 0;
18112 }
18113 _ACEOF
18114 if ac_fn_c_try_run "$LINENO"; then :
18115 gl_cv_func_memchr_works=yes
18116 else
18117 gl_cv_func_memchr_works=no
18118 fi
18119 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18120 conftest.$ac_objext conftest.beam conftest.$ac_ext
18121 fi
18122
18123
18124 fi
18125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
18126 $as_echo "$gl_cv_func_memchr_works" >&6; }
18127 case "$gl_cv_func_memchr_works" in
18128 *yes) ;;
18129 *) REPLACE_MEMCHR=1 ;;
18130 esac
18131 fi
18132
18133 ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
18134 if test "x$ac_cv_have_decl_memrchr" = xyes; then :
18135 ac_have_decl=1
18136 else
18137 ac_have_decl=0
18138 fi
18139
18140 cat >>confdefs.h <<_ACEOF
18141 #define HAVE_DECL_MEMRCHR $ac_have_decl
18142 _ACEOF
18143
18144
18145
18146
18147
18148 gl_cv_c_multiarch=no
18149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18150 /* end confdefs.h. */
18151 #ifndef __APPLE_CC__
18152 not a universal capable compiler
18153 #endif
18154 typedef int dummy;
18155
18156 _ACEOF
18157 if ac_fn_c_try_compile "$LINENO"; then :
18158
18159 arch=
18160 prev=
18161 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
18162 if test -n "$prev"; then
18163 case $word in
18164 i?86 | x86_64 | ppc | ppc64)
18165 if test -z "$arch" || test "$arch" = "$word"; then
18166 arch="$word"
18167 else
18168 gl_cv_c_multiarch=yes
18169 fi
18170 ;;
18171 esac
18172 prev=
18173 else
18174 if test "x$word" = "x-arch"; then
18175 prev=arch
18176 fi
18177 fi
18178 done
18179
18180 fi
18181 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18182 if test $gl_cv_c_multiarch = yes; then
18183 APPLE_UNIVERSAL_BUILD=1
18184 else
18185 APPLE_UNIVERSAL_BUILD=0
18186 fi
18187
18188
18189
18190
18191
18192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for O_CLOEXEC" >&5
18193 $as_echo_n "checking for O_CLOEXEC... " >&6; }
18194 if ${gl_cv_macro_O_CLOEXEC+:} false; then :
18195 $as_echo_n "(cached) " >&6
18196 else
18197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18198 /* end confdefs.h. */
18199 #include <fcntl.h>
18200 #ifndef O_CLOEXEC
18201 choke me;
18202 #endif
18203
18204 int
18205 main (void)
18206 {
18207 return O_CLOEXEC;
18208 ;
18209 return 0;
18210 }
18211 _ACEOF
18212 if ac_fn_c_try_compile "$LINENO"; then :
18213 gl_cv_macro_O_CLOEXEC=yes
18214 else
18215 gl_cv_macro_O_CLOEXEC=no
18216 fi
18217 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18218 fi
18219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_macro_O_CLOEXEC" >&5
18220 $as_echo "$gl_cv_macro_O_CLOEXEC" >&6; }
18221
18222
18223
18224
18225
18226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
18227 $as_echo_n "checking for promoted mode_t type... " >&6; }
18228 if ${gl_cv_promoted_mode_t+:} false; then :
18229 $as_echo_n "(cached) " >&6
18230 else
18231
18232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18233 /* end confdefs.h. */
18234 #include <sys/types.h>
18235 int
18236 main (void)
18237 {
18238 typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
18239 ;
18240 return 0;
18241 }
18242 _ACEOF
18243 if ac_fn_c_try_compile "$LINENO"; then :
18244 gl_cv_promoted_mode_t='int'
18245 else
18246 gl_cv_promoted_mode_t='mode_t'
18247 fi
18248 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18249
18250 fi
18251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
18252 $as_echo "$gl_cv_promoted_mode_t" >&6; }
18253
18254 cat >>confdefs.h <<_ACEOF
18255 #define PROMOTED_MODE_T $gl_cv_promoted_mode_t
18256 _ACEOF
18257
18258
18259
18260
18261
18262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
18263 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
18264 if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
18265 $as_echo_n "(cached) " >&6
18266 else
18267 rm -f conftest.sym conftest.file
18268 echo >conftest.file
18269 if test "$cross_compiling" = yes; then :
18270 case "$host_os" in
18271 linux-* | linux)
18272 # Guess yes on Linux systems.
18273 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
18274 *-gnu* | gnu*)
18275 # Guess yes on glibc systems.
18276 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
18277 mingw*)
18278 # Guess no on native Windows.
18279 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
18280 *)
18281 # If we don't know, assume the worst.
18282 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
18283 esac
18284
18285 else
18286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18287 /* end confdefs.h. */
18288 $ac_includes_default
18289 int
18290 main (void)
18291 {
18292 struct stat sbuf;
18293 if (symlink ("conftest.file", "conftest.sym") != 0)
18294 return 1;
18295 /* Linux will dereference the symlink and fail, as required by
18296 POSIX. That is better in the sense that it means we will not
18297 have to compile and use the lstat wrapper. */
18298 return lstat ("conftest.sym/", &sbuf) == 0;
18299
18300 ;
18301 return 0;
18302 }
18303 _ACEOF
18304 if ac_fn_c_try_run "$LINENO"; then :
18305 gl_cv_func_lstat_dereferences_slashed_symlink=yes
18306 else
18307 gl_cv_func_lstat_dereferences_slashed_symlink=no
18308 fi
18309 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18310 conftest.$ac_objext conftest.beam conftest.$ac_ext
18311 fi
18312
18313 rm -f conftest.sym conftest.file
18314
18315 fi
18316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
18317 $as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
18318 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
18319 *yes)
18320
18321 cat >>confdefs.h <<_ACEOF
18322 #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
18323 _ACEOF
18324
18325 ;;
18326 esac
18327
18328 ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
18329 if test "x$ac_cv_have_decl_alarm" = xyes; then :
18330 ac_have_decl=1
18331 else
18332 ac_have_decl=0
18333 fi
18334
18335 cat >>confdefs.h <<_ACEOF
18336 #define HAVE_DECL_ALARM $ac_have_decl
18337 _ACEOF
18338
18339
18340
18341
18342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5
18343 $as_echo_n "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; }
18344 if ${ac_cv_gnu_library_2_1+:} false; then :
18345 $as_echo_n "(cached) " >&6
18346 else
18347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18348 /* end confdefs.h. */
18349
18350 #include <features.h>
18351 #ifdef __GNU_LIBRARY__
18352 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
18353 Lucky GNU user
18354 #endif
18355 #endif
18356 #ifdef __UCLIBC__
18357 Lucky user
18358 #endif
18359
18360 _ACEOF
18361 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18362 $EGREP "Lucky" >/dev/null 2>&1; then :
18363 ac_cv_gnu_library_2_1=yes
18364 else
18365 ac_cv_gnu_library_2_1=no
18366 fi
18367 rm -f conftest*
18368
18369
18370
18371 fi
18372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
18373 $as_echo "$ac_cv_gnu_library_2_1" >&6; }
18374
18375 GLIBC21="$ac_cv_gnu_library_2_1"
18376
18377
18378
18379
18380
18381
18382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
18383 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
18384 if ${ac_cv_header_stdbool_h+:} false; then :
18385 $as_echo_n "(cached) " >&6
18386 else
18387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18388 /* end confdefs.h. */
18389
18390 #include <stdbool.h>
18391
18392 #ifdef __cplusplus
18393 typedef bool Bool;
18394 #else
18395 typedef _Bool Bool;
18396 #ifndef bool
18397 "error: bool is not defined"
18398 #endif
18399 #ifndef false
18400 "error: false is not defined"
18401 #endif
18402 #if false
18403 "error: false is not 0"
18404 #endif
18405 #ifndef true
18406 "error: true is not defined"
18407 #endif
18408 #if true != 1
18409 "error: true is not 1"
18410 #endif
18411 #endif
18412
18413 #ifndef __bool_true_false_are_defined
18414 "error: __bool_true_false_are_defined is not defined"
18415 #endif
18416
18417 struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
18418
18419 char a[true == 1 ? 1 : -1];
18420 char b[false == 0 ? 1 : -1];
18421 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
18422 char d[(bool) 0.5 == true ? 1 : -1];
18423 /* See body of main program for 'e'. */
18424 char f[(Bool) 0.0 == false ? 1 : -1];
18425 char g[true];
18426 char h[sizeof (Bool)];
18427 char i[sizeof s.t];
18428 enum { j = false, k = true, l = false * true, m = true * 256 };
18429 /* The following fails for
18430 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
18431 Bool n[m];
18432 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
18433 char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
18434 /* Catch a bug in an HP-UX C compiler. See
18435 https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
18436 https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html
18437 */
18438 Bool q = true;
18439 Bool *pq = &q;
18440 bool *qq = &q;
18441
18442 int
18443 main (void)
18444 {
18445
18446 bool e = &s;
18447 *pq |= q; *pq |= ! q;
18448 *qq |= q; *qq |= ! q;
18449 /* Refer to every declared value, to avoid compiler optimizations. */
18450 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
18451 + !m + !n + !o + !p + !q + !pq + !qq);
18452
18453 ;
18454 return 0;
18455 }
18456 _ACEOF
18457 if ac_fn_c_try_compile "$LINENO"; then :
18458 ac_cv_header_stdbool_h=yes
18459 else
18460 ac_cv_header_stdbool_h=no
18461 fi
18462 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18463 fi
18464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
18465 $as_echo "$ac_cv_header_stdbool_h" >&6; }
18466 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
18467 if test "x$ac_cv_type__Bool" = xyes; then :
18468
18469 cat >>confdefs.h <<_ACEOF
18470 #define HAVE__BOOL 1
18471 _ACEOF
18472
18473
18474 fi
18475
18476
18477
18478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
18479 $as_echo_n "checking for wint_t... " >&6; }
18480 if ${gt_cv_c_wint_t+:} false; then :
18481 $as_echo_n "(cached) " >&6
18482 else
18483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18484 /* end confdefs.h. */
18485
18486 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18487 <wchar.h>.
18488 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
18489 before <wchar.h>. */
18490 #include <stddef.h>
18491 #include <stdio.h>
18492 #include <time.h>
18493 #include <wchar.h>
18494 wint_t foo = (wchar_t)'\0';
18495 int
18496 main (void)
18497 {
18498
18499 ;
18500 return 0;
18501 }
18502 _ACEOF
18503 if ac_fn_c_try_compile "$LINENO"; then :
18504 gt_cv_c_wint_t=yes
18505 else
18506 gt_cv_c_wint_t=no
18507 fi
18508 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18509 fi
18510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
18511 $as_echo "$gt_cv_c_wint_t" >&6; }
18512 if test $gt_cv_c_wint_t = yes; then
18513
18514 $as_echo "#define HAVE_WINT_T 1" >>confdefs.h
18515
18516
18517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wint_t is too small" >&5
18518 $as_echo_n "checking whether wint_t is too small... " >&6; }
18519 if ${gl_cv_type_wint_t_too_small+:} false; then :
18520 $as_echo_n "(cached) " >&6
18521 else
18522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18523 /* end confdefs.h. */
18524
18525 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18526 <wchar.h>.
18527 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18528 included before <wchar.h>. */
18529 #if !(defined __GLIBC__ && !defined __UCLIBC__)
18530 # include <stddef.h>
18531 # include <stdio.h>
18532 # include <time.h>
18533 #endif
18534 #include <wchar.h>
18535 int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1];
18536
18537 int
18538 main (void)
18539 {
18540
18541 ;
18542 return 0;
18543 }
18544 _ACEOF
18545 if ac_fn_c_try_compile "$LINENO"; then :
18546 gl_cv_type_wint_t_too_small=no
18547 else
18548 gl_cv_type_wint_t_too_small=yes
18549 fi
18550 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18551 fi
18552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wint_t_too_small" >&5
18553 $as_echo "$gl_cv_type_wint_t_too_small" >&6; }
18554 if test $gl_cv_type_wint_t_too_small = yes; then
18555 GNULIB_OVERRIDES_WINT_T=1
18556 else
18557 GNULIB_OVERRIDES_WINT_T=0
18558 fi
18559 else
18560 GNULIB_OVERRIDES_WINT_T=0
18561 fi
18562
18563
18564
18565
18566
18567
18568
18569
18570
18571
18572 if test $ac_cv_type_long_long_int = yes; then
18573 HAVE_LONG_LONG_INT=1
18574 else
18575 HAVE_LONG_LONG_INT=0
18576 fi
18577
18578
18579 if test $ac_cv_type_unsigned_long_long_int = yes; then
18580 HAVE_UNSIGNED_LONG_LONG_INT=1
18581 else
18582 HAVE_UNSIGNED_LONG_LONG_INT=0
18583 fi
18584
18585
18586
18587 if test $ac_cv_header_wchar_h = yes; then
18588 HAVE_WCHAR_H=1
18589 else
18590 HAVE_WCHAR_H=0
18591 fi
18592
18593
18594 if test $ac_cv_header_inttypes_h = yes; then
18595 HAVE_INTTYPES_H=1
18596 else
18597 HAVE_INTTYPES_H=0
18598 fi
18599
18600
18601 if test $ac_cv_header_sys_types_h = yes; then
18602 HAVE_SYS_TYPES_H=1
18603 else
18604 HAVE_SYS_TYPES_H=0
18605 fi
18606
18607
18608
18609
18610
18611
18612
18613
18614
18615
18616
18617 if test $gl_cv_have_include_next = yes; then
18618 gl_cv_next_stdint_h='<'stdint.h'>'
18619 else
18620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
18621 $as_echo_n "checking absolute name of <stdint.h>... " >&6; }
18622 if ${gl_cv_next_stdint_h+:} false; then :
18623 $as_echo_n "(cached) " >&6
18624 else
18625
18626 if test $ac_cv_header_stdint_h = yes; then
18627
18628
18629
18630
18631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18632 /* end confdefs.h. */
18633 #include <stdint.h>
18634 _ACEOF
18635 case "$host_os" in
18636 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18637 *) gl_absname_cpp="$ac_cpp" ;;
18638 esac
18639
18640 case "$host_os" in
18641 mingw*)
18642 gl_dirsep_regex='[/\\]'
18643 ;;
18644 *)
18645 gl_dirsep_regex='\/'
18646 ;;
18647 esac
18648 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18649 gl_header_literal_regex=`echo 'stdint.h' \
18650 | sed -e "$gl_make_literal_regex_sed"`
18651 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18652 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18653 s|^/[^/]|//&|
18654 p
18655 q
18656 }'
18657
18658 gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18659 sed -n "$gl_absolute_header_sed"`
18660
18661 gl_header=$gl_cv_absolute_stdint_h
18662 gl_cv_next_stdint_h='"'$gl_header'"'
18663 else
18664 gl_cv_next_stdint_h='<'stdint.h'>'
18665 fi
18666
18667
18668 fi
18669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
18670 $as_echo "$gl_cv_next_stdint_h" >&6; }
18671 fi
18672 NEXT_STDINT_H=$gl_cv_next_stdint_h
18673
18674 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18675 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18676 gl_next_as_first_directive='<'stdint.h'>'
18677 else
18678 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18679 gl_next_as_first_directive=$gl_cv_next_stdint_h
18680 fi
18681 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
18682
18683
18684
18685
18686 if test $ac_cv_header_stdint_h = yes; then
18687 HAVE_STDINT_H=1
18688 else
18689 HAVE_STDINT_H=0
18690 fi
18691
18692
18693 if test $ac_cv_header_stdint_h = yes; then
18694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
18695 $as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
18696 if ${gl_cv_header_working_stdint_h+:} false; then :
18697 $as_echo_n "(cached) " >&6
18698 else
18699 gl_cv_header_working_stdint_h=no
18700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18701 /* end confdefs.h. */
18702
18703
18704 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
18705 #define __STDC_CONSTANT_MACROS 1
18706 #define __STDC_LIMIT_MACROS 1
18707 #include <stdint.h>
18708 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
18709 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
18710 #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
18711 #endif
18712
18713
18714 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18715 included before <wchar.h>. */
18716 #include <stddef.h>
18717 #include <signal.h>
18718 #if HAVE_WCHAR_H
18719 # include <stdio.h>
18720 # include <time.h>
18721 # include <wchar.h>
18722 #endif
18723
18724
18725 #ifdef INT8_MAX
18726 int8_t a1 = INT8_MAX;
18727 int8_t a1min = INT8_MIN;
18728 #endif
18729 #ifdef INT16_MAX
18730 int16_t a2 = INT16_MAX;
18731 int16_t a2min = INT16_MIN;
18732 #endif
18733 #ifdef INT32_MAX
18734 int32_t a3 = INT32_MAX;
18735 int32_t a3min = INT32_MIN;
18736 #endif
18737 #ifdef INT64_MAX
18738 int64_t a4 = INT64_MAX;
18739 int64_t a4min = INT64_MIN;
18740 #endif
18741 #ifdef UINT8_MAX
18742 uint8_t b1 = UINT8_MAX;
18743 #else
18744 typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
18745 #endif
18746 #ifdef UINT16_MAX
18747 uint16_t b2 = UINT16_MAX;
18748 #endif
18749 #ifdef UINT32_MAX
18750 uint32_t b3 = UINT32_MAX;
18751 #endif
18752 #ifdef UINT64_MAX
18753 uint64_t b4 = UINT64_MAX;
18754 #endif
18755 int_least8_t c1 = INT8_C (0x7f);
18756 int_least8_t c1max = INT_LEAST8_MAX;
18757 int_least8_t c1min = INT_LEAST8_MIN;
18758 int_least16_t c2 = INT16_C (0x7fff);
18759 int_least16_t c2max = INT_LEAST16_MAX;
18760 int_least16_t c2min = INT_LEAST16_MIN;
18761 int_least32_t c3 = INT32_C (0x7fffffff);
18762 int_least32_t c3max = INT_LEAST32_MAX;
18763 int_least32_t c3min = INT_LEAST32_MIN;
18764 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
18765 int_least64_t c4max = INT_LEAST64_MAX;
18766 int_least64_t c4min = INT_LEAST64_MIN;
18767 uint_least8_t d1 = UINT8_C (0xff);
18768 uint_least8_t d1max = UINT_LEAST8_MAX;
18769 uint_least16_t d2 = UINT16_C (0xffff);
18770 uint_least16_t d2max = UINT_LEAST16_MAX;
18771 uint_least32_t d3 = UINT32_C (0xffffffff);
18772 uint_least32_t d3max = UINT_LEAST32_MAX;
18773 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
18774 uint_least64_t d4max = UINT_LEAST64_MAX;
18775 int_fast8_t e1 = INT_FAST8_MAX;
18776 int_fast8_t e1min = INT_FAST8_MIN;
18777 int_fast16_t e2 = INT_FAST16_MAX;
18778 int_fast16_t e2min = INT_FAST16_MIN;
18779 int_fast32_t e3 = INT_FAST32_MAX;
18780 int_fast32_t e3min = INT_FAST32_MIN;
18781 int_fast64_t e4 = INT_FAST64_MAX;
18782 int_fast64_t e4min = INT_FAST64_MIN;
18783 uint_fast8_t f1 = UINT_FAST8_MAX;
18784 uint_fast16_t f2 = UINT_FAST16_MAX;
18785 uint_fast32_t f3 = UINT_FAST32_MAX;
18786 uint_fast64_t f4 = UINT_FAST64_MAX;
18787 #ifdef INTPTR_MAX
18788 intptr_t g = INTPTR_MAX;
18789 intptr_t gmin = INTPTR_MIN;
18790 #endif
18791 #ifdef UINTPTR_MAX
18792 uintptr_t h = UINTPTR_MAX;
18793 #endif
18794 intmax_t i = INTMAX_MAX;
18795 uintmax_t j = UINTMAX_MAX;
18796
18797 /* Check that SIZE_MAX has the correct type, if possible. */
18798 #if 201112 <= __STDC_VERSION__
18799 int k = _Generic (SIZE_MAX, size_t: 0);
18800 #elif (2 <= __GNUC__ || defined __IBM__TYPEOF__ \
18801 || (0x5110 <= __SUNPRO_C && !__STDC__))
18802 extern size_t k;
18803 extern __typeof__ (SIZE_MAX) k;
18804 #endif
18805
18806 #include <limits.h> /* for CHAR_BIT */
18807 #define TYPE_MINIMUM(t) \
18808 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
18809 #define TYPE_MAXIMUM(t) \
18810 ((t) ((t) 0 < (t) -1 \
18811 ? (t) -1 \
18812 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
18813 struct s {
18814 int check_PTRDIFF:
18815 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
18816 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
18817 ? 1 : -1;
18818 /* Detect bug in FreeBSD 6.0 / ia64. */
18819 int check_SIG_ATOMIC:
18820 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
18821 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
18822 ? 1 : -1;
18823 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
18824 int check_WCHAR:
18825 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
18826 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
18827 ? 1 : -1;
18828 /* Detect bug in mingw. */
18829 int check_WINT:
18830 WINT_MIN == TYPE_MINIMUM (wint_t)
18831 && WINT_MAX == TYPE_MAXIMUM (wint_t)
18832 ? 1 : -1;
18833
18834 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
18835 int check_UINT8_C:
18836 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
18837 int check_UINT16_C:
18838 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
18839
18840 /* Detect bugs in OpenBSD 3.9 stdint.h. */
18841 #ifdef UINT8_MAX
18842 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
18843 #endif
18844 #ifdef UINT16_MAX
18845 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
18846 #endif
18847 #ifdef UINT32_MAX
18848 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
18849 #endif
18850 #ifdef UINT64_MAX
18851 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
18852 #endif
18853 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
18854 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
18855 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
18856 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
18857 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
18858 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
18859 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
18860 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
18861 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
18862 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
18863 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
18864 };
18865
18866 int
18867 main (void)
18868 {
18869
18870 ;
18871 return 0;
18872 }
18873 _ACEOF
18874 if ac_fn_c_try_compile "$LINENO"; then :
18875 if test "$cross_compiling" = yes; then :
18876 case "$host_os" in
18877 # Guess yes on native Windows.
18878 mingw*) gl_cv_header_working_stdint_h="guessing yes" ;;
18879 # In general, assume it works.
18880 *) gl_cv_header_working_stdint_h="guessing yes" ;;
18881 esac
18882
18883 else
18884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18885 /* end confdefs.h. */
18886
18887
18888 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
18889 #define __STDC_CONSTANT_MACROS 1
18890 #define __STDC_LIMIT_MACROS 1
18891 #include <stdint.h>
18892
18893
18894 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18895 included before <wchar.h>. */
18896 #include <stddef.h>
18897 #include <signal.h>
18898 #if HAVE_WCHAR_H
18899 # include <stdio.h>
18900 # include <time.h>
18901 # include <wchar.h>
18902 #endif
18903
18904
18905 #include <stdio.h>
18906 #include <string.h>
18907 #define MVAL(macro) MVAL1(macro)
18908 #define MVAL1(expression) #expression
18909 static const char *macro_values[] =
18910 {
18911 #ifdef INT8_MAX
18912 MVAL (INT8_MAX),
18913 #endif
18914 #ifdef INT16_MAX
18915 MVAL (INT16_MAX),
18916 #endif
18917 #ifdef INT32_MAX
18918 MVAL (INT32_MAX),
18919 #endif
18920 #ifdef INT64_MAX
18921 MVAL (INT64_MAX),
18922 #endif
18923 #ifdef UINT8_MAX
18924 MVAL (UINT8_MAX),
18925 #endif
18926 #ifdef UINT16_MAX
18927 MVAL (UINT16_MAX),
18928 #endif
18929 #ifdef UINT32_MAX
18930 MVAL (UINT32_MAX),
18931 #endif
18932 #ifdef UINT64_MAX
18933 MVAL (UINT64_MAX),
18934 #endif
18935 NULL
18936 };
18937
18938 int
18939 main (void)
18940 {
18941
18942 const char **mv;
18943 for (mv = macro_values; *mv != NULL; mv++)
18944 {
18945 const char *value = *mv;
18946 /* Test whether it looks like a cast expression. */
18947 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
18948 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
18949 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
18950 || strncmp (value, "((int)"/*)*/, 6) == 0
18951 || strncmp (value, "((signed short)"/*)*/, 15) == 0
18952 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
18953 return mv - macro_values + 1;
18954 }
18955 return 0;
18956
18957 ;
18958 return 0;
18959 }
18960 _ACEOF
18961 if ac_fn_c_try_run "$LINENO"; then :
18962 gl_cv_header_working_stdint_h=yes
18963 fi
18964 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18965 conftest.$ac_objext conftest.beam conftest.$ac_ext
18966 fi
18967
18968
18969 fi
18970 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18971
18972 fi
18973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
18974 $as_echo "$gl_cv_header_working_stdint_h" >&6; }
18975 fi
18976
18977 HAVE_C99_STDINT_H=0
18978 HAVE_SYS_BITYPES_H=0
18979 HAVE_SYS_INTTYPES_H=0
18980 STDINT_H=stdint.h
18981 case "$gl_cv_header_working_stdint_h" in
18982 *yes)
18983 HAVE_C99_STDINT_H=1
18984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h predates C++11" >&5
18985 $as_echo_n "checking whether stdint.h predates C++11... " >&6; }
18986 if ${gl_cv_header_stdint_predates_cxx11_h+:} false; then :
18987 $as_echo_n "(cached) " >&6
18988 else
18989 gl_cv_header_stdint_predates_cxx11_h=yes
18990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18991 /* end confdefs.h. */
18992
18993
18994 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
18995 #include <stdint.h>
18996
18997
18998 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18999 included before <wchar.h>. */
19000 #include <stddef.h>
19001 #include <signal.h>
19002 #if HAVE_WCHAR_H
19003 # include <stdio.h>
19004 # include <time.h>
19005 # include <wchar.h>
19006 #endif
19007
19008
19009 intmax_t im = INTMAX_MAX;
19010 int32_t i32 = INT32_C (0x7fffffff);
19011
19012 int
19013 main (void)
19014 {
19015
19016 ;
19017 return 0;
19018 }
19019 _ACEOF
19020 if ac_fn_c_try_compile "$LINENO"; then :
19021 gl_cv_header_stdint_predates_cxx11_h=no
19022 fi
19023 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19024 fi
19025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_predates_cxx11_h" >&5
19026 $as_echo "$gl_cv_header_stdint_predates_cxx11_h" >&6; }
19027
19028 if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then
19029
19030 $as_echo "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
19031
19032
19033 $as_echo "#define __STDC_LIMIT_MACROS 1" >>confdefs.h
19034
19035 fi
19036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5
19037 $as_echo_n "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; }
19038 if ${gl_cv_header_stdint_width+:} false; then :
19039 $as_echo_n "(cached) " >&6
19040 else
19041 gl_cv_header_stdint_width=no
19042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19043 /* end confdefs.h. */
19044
19045 /* Work if build is not clean. */
19046 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
19047 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
19048 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
19049 #endif
19050 #include <stdint.h>
19051
19052 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19053 included before <wchar.h>. */
19054 #include <stddef.h>
19055 #include <signal.h>
19056 #if HAVE_WCHAR_H
19057 # include <stdio.h>
19058 # include <time.h>
19059 # include <wchar.h>
19060 #endif
19061
19062 int iw = UINTMAX_WIDTH;
19063
19064 int
19065 main (void)
19066 {
19067
19068 ;
19069 return 0;
19070 }
19071 _ACEOF
19072 if ac_fn_c_try_compile "$LINENO"; then :
19073 gl_cv_header_stdint_width=yes
19074 fi
19075 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19076 fi
19077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5
19078 $as_echo "$gl_cv_header_stdint_width" >&6; }
19079 if test "$gl_cv_header_stdint_width" = yes; then
19080 STDINT_H=
19081 fi
19082 ;;
19083 *)
19084 for ac_header in sys/inttypes.h sys/bitypes.h
19085 do :
19086 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
19087 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
19088 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
19089 cat >>confdefs.h <<_ACEOF
19090 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
19091 _ACEOF
19092
19093 fi
19094
19095 done
19096
19097 if test $ac_cv_header_sys_inttypes_h = yes; then
19098 HAVE_SYS_INTTYPES_H=1
19099 fi
19100 if test $ac_cv_header_sys_bitypes_h = yes; then
19101 HAVE_SYS_BITYPES_H=1
19102 fi
19103
19104
19105 if test $APPLE_UNIVERSAL_BUILD = 0; then
19106
19107
19108 for gltype in ptrdiff_t size_t ; do
19109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
19110 $as_echo_n "checking for bit size of $gltype... " >&6; }
19111 if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
19112 $as_echo_n "(cached) " >&6
19113 else
19114 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
19115 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19116 included before <wchar.h>. */
19117 #include <stddef.h>
19118 #include <signal.h>
19119 #if HAVE_WCHAR_H
19120 # include <stdio.h>
19121 # include <time.h>
19122 # include <wchar.h>
19123 #endif
19124
19125 #include <limits.h>"; then :
19126
19127 else
19128 result=unknown
19129 fi
19130
19131 eval gl_cv_bitsizeof_${gltype}=\$result
19132
19133 fi
19134 eval ac_res=\$gl_cv_bitsizeof_${gltype}
19135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19136 $as_echo "$ac_res" >&6; }
19137 eval result=\$gl_cv_bitsizeof_${gltype}
19138 if test $result = unknown; then
19139 result=0
19140 fi
19141 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
19142 cat >>confdefs.h <<_ACEOF
19143 #define BITSIZEOF_${GLTYPE} $result
19144 _ACEOF
19145
19146 eval BITSIZEOF_${GLTYPE}=\$result
19147 done
19148
19149
19150 fi
19151
19152
19153 for gltype in sig_atomic_t wchar_t wint_t ; do
19154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
19155 $as_echo_n "checking for bit size of $gltype... " >&6; }
19156 if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
19157 $as_echo_n "(cached) " >&6
19158 else
19159 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
19160 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19161 included before <wchar.h>. */
19162 #include <stddef.h>
19163 #include <signal.h>
19164 #if HAVE_WCHAR_H
19165 # include <stdio.h>
19166 # include <time.h>
19167 # include <wchar.h>
19168 #endif
19169
19170 #include <limits.h>"; then :
19171
19172 else
19173 result=unknown
19174 fi
19175
19176 eval gl_cv_bitsizeof_${gltype}=\$result
19177
19178 fi
19179 eval ac_res=\$gl_cv_bitsizeof_${gltype}
19180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19181 $as_echo "$ac_res" >&6; }
19182 eval result=\$gl_cv_bitsizeof_${gltype}
19183 if test $result = unknown; then
19184 result=0
19185 fi
19186 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
19187 cat >>confdefs.h <<_ACEOF
19188 #define BITSIZEOF_${GLTYPE} $result
19189 _ACEOF
19190
19191 eval BITSIZEOF_${GLTYPE}=\$result
19192 done
19193
19194
19195
19196
19197 for gltype in sig_atomic_t wchar_t wint_t ; do
19198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
19199 $as_echo_n "checking whether $gltype is signed... " >&6; }
19200 if eval \${gl_cv_type_${gltype}_signed+:} false; then :
19201 $as_echo_n "(cached) " >&6
19202 else
19203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19204 /* end confdefs.h. */
19205
19206 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19207 included before <wchar.h>. */
19208 #include <stddef.h>
19209 #include <signal.h>
19210 #if HAVE_WCHAR_H
19211 # include <stdio.h>
19212 # include <time.h>
19213 # include <wchar.h>
19214 #endif
19215
19216 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
19217 int
19218 main (void)
19219 {
19220
19221 ;
19222 return 0;
19223 }
19224 _ACEOF
19225 if ac_fn_c_try_compile "$LINENO"; then :
19226 result=yes
19227 else
19228 result=no
19229 fi
19230 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19231 eval gl_cv_type_${gltype}_signed=\$result
19232
19233 fi
19234 eval ac_res=\$gl_cv_type_${gltype}_signed
19235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19236 $as_echo "$ac_res" >&6; }
19237 eval result=\$gl_cv_type_${gltype}_signed
19238 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
19239 if test "$result" = yes; then
19240 cat >>confdefs.h <<_ACEOF
19241 #define HAVE_SIGNED_${GLTYPE} 1
19242 _ACEOF
19243
19244 eval HAVE_SIGNED_${GLTYPE}=1
19245 else
19246 eval HAVE_SIGNED_${GLTYPE}=0
19247 fi
19248 done
19249
19250
19251 gl_cv_type_ptrdiff_t_signed=yes
19252 gl_cv_type_size_t_signed=no
19253 if test $APPLE_UNIVERSAL_BUILD = 0; then
19254
19255
19256 for gltype in ptrdiff_t size_t ; do
19257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
19258 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
19259 if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
19260 $as_echo_n "(cached) " >&6
19261 else
19262 eval gl_cv_type_${gltype}_suffix=no
19263 eval result=\$gl_cv_type_${gltype}_signed
19264 if test "$result" = yes; then
19265 glsufu=
19266 else
19267 glsufu=u
19268 fi
19269 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
19270 case $glsuf in
19271 '') gltype1='int';;
19272 l) gltype1='long int';;
19273 ll) gltype1='long long int';;
19274 i64) gltype1='__int64';;
19275 u) gltype1='unsigned int';;
19276 ul) gltype1='unsigned long int';;
19277 ull) gltype1='unsigned long long int';;
19278 ui64)gltype1='unsigned __int64';;
19279 esac
19280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19281 /* end confdefs.h. */
19282
19283 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19284 included before <wchar.h>. */
19285 #include <stddef.h>
19286 #include <signal.h>
19287 #if HAVE_WCHAR_H
19288 # include <stdio.h>
19289 # include <time.h>
19290 # include <wchar.h>
19291 #endif
19292
19293 extern $gltype foo;
19294 extern $gltype1 foo;
19295 int
19296 main (void)
19297 {
19298
19299 ;
19300 return 0;
19301 }
19302 _ACEOF
19303 if ac_fn_c_try_compile "$LINENO"; then :
19304 eval gl_cv_type_${gltype}_suffix=\$glsuf
19305 fi
19306 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19307 eval result=\$gl_cv_type_${gltype}_suffix
19308 test "$result" != no && break
19309 done
19310 fi
19311 eval ac_res=\$gl_cv_type_${gltype}_suffix
19312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19313 $as_echo "$ac_res" >&6; }
19314 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
19315 eval result=\$gl_cv_type_${gltype}_suffix
19316 test "$result" = no && result=
19317 eval ${GLTYPE}_SUFFIX=\$result
19318 cat >>confdefs.h <<_ACEOF
19319 #define ${GLTYPE}_SUFFIX $result
19320 _ACEOF
19321
19322 done
19323
19324
19325 fi
19326
19327
19328 for gltype in sig_atomic_t wchar_t wint_t ; do
19329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
19330 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
19331 if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
19332 $as_echo_n "(cached) " >&6
19333 else
19334 eval gl_cv_type_${gltype}_suffix=no
19335 eval result=\$gl_cv_type_${gltype}_signed
19336 if test "$result" = yes; then
19337 glsufu=
19338 else
19339 glsufu=u
19340 fi
19341 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
19342 case $glsuf in
19343 '') gltype1='int';;
19344 l) gltype1='long int';;
19345 ll) gltype1='long long int';;
19346 i64) gltype1='__int64';;
19347 u) gltype1='unsigned int';;
19348 ul) gltype1='unsigned long int';;
19349 ull) gltype1='unsigned long long int';;
19350 ui64)gltype1='unsigned __int64';;
19351 esac
19352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19353 /* end confdefs.h. */
19354
19355 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19356 included before <wchar.h>. */
19357 #include <stddef.h>
19358 #include <signal.h>
19359 #if HAVE_WCHAR_H
19360 # include <stdio.h>
19361 # include <time.h>
19362 # include <wchar.h>
19363 #endif
19364
19365 extern $gltype foo;
19366 extern $gltype1 foo;
19367 int
19368 main (void)
19369 {
19370
19371 ;
19372 return 0;
19373 }
19374 _ACEOF
19375 if ac_fn_c_try_compile "$LINENO"; then :
19376 eval gl_cv_type_${gltype}_suffix=\$glsuf
19377 fi
19378 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19379 eval result=\$gl_cv_type_${gltype}_suffix
19380 test "$result" != no && break
19381 done
19382 fi
19383 eval ac_res=\$gl_cv_type_${gltype}_suffix
19384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19385 $as_echo "$ac_res" >&6; }
19386 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
19387 eval result=\$gl_cv_type_${gltype}_suffix
19388 test "$result" = no && result=
19389 eval ${GLTYPE}_SUFFIX=\$result
19390 cat >>confdefs.h <<_ACEOF
19391 #define ${GLTYPE}_SUFFIX $result
19392 _ACEOF
19393
19394 done
19395
19396
19397
19398 if test $GNULIB_OVERRIDES_WINT_T = 1; then
19399 BITSIZEOF_WINT_T=32
19400 fi
19401
19402 ;;
19403 esac
19404
19405
19406
19407 LIMITS_H='limits.h'
19408 if test -n "$LIMITS_H"; then
19409 GL_GENERATE_LIMITS_H_TRUE=
19410 GL_GENERATE_LIMITS_H_FALSE='#'
19411 else
19412 GL_GENERATE_LIMITS_H_TRUE='#'
19413 GL_GENERATE_LIMITS_H_FALSE=
19414 fi
19415
19416
19417
19418
19419
19420
19421
19422 if test -n "$STDINT_H"; then
19423 GL_GENERATE_STDINT_H_TRUE=
19424 GL_GENERATE_STDINT_H_FALSE='#'
19425 else
19426 GL_GENERATE_STDINT_H_TRUE='#'
19427 GL_GENERATE_STDINT_H_FALSE=
19428 fi
19429
19430
19431
19432 GNULIB_FFS=0;
19433 HAVE_FFS=1;
19434 HAVE_STRCASECMP=1;
19435 HAVE_DECL_STRNCASECMP=1;
19436
19437
19438
19439 ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
19440 if test "x$ac_cv_have_decl_strdup" = xyes; then :
19441 ac_have_decl=1
19442 else
19443 ac_have_decl=0
19444 fi
19445
19446 cat >>confdefs.h <<_ACEOF
19447 #define HAVE_DECL_STRDUP $ac_have_decl
19448 _ACEOF
19449
19450
19451 REPLACE_STRERROR_0=0
19452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
19453 $as_echo_n "checking whether strerror(0) succeeds... " >&6; }
19454 if ${gl_cv_func_strerror_0_works+:} false; then :
19455 $as_echo_n "(cached) " >&6
19456 else
19457 if test "$cross_compiling" = yes; then :
19458 case "$host_os" in
19459 # Guess yes on glibc systems.
19460 *-gnu* | gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
19461 # Guess yes on native Windows.
19462 mingw*) gl_cv_func_strerror_0_works="guessing yes" ;;
19463 # If we don't know, assume the worst.
19464 *) gl_cv_func_strerror_0_works="guessing no" ;;
19465 esac
19466
19467 else
19468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19469 /* end confdefs.h. */
19470 #include <string.h>
19471 #include <errno.h>
19472
19473 int
19474 main (void)
19475 {
19476 int result = 0;
19477 char *str;
19478 errno = 0;
19479 str = strerror (0);
19480 if (!*str) result |= 1;
19481 if (errno) result |= 2;
19482 if (strstr (str, "nknown") || strstr (str, "ndefined"))
19483 result |= 4;
19484 return result;
19485 ;
19486 return 0;
19487 }
19488 _ACEOF
19489 if ac_fn_c_try_run "$LINENO"; then :
19490 gl_cv_func_strerror_0_works=yes
19491 else
19492 gl_cv_func_strerror_0_works=no
19493 fi
19494 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19495 conftest.$ac_objext conftest.beam conftest.$ac_ext
19496 fi
19497
19498
19499 fi
19500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
19501 $as_echo "$gl_cv_func_strerror_0_works" >&6; }
19502 case "$gl_cv_func_strerror_0_works" in
19503 *yes) ;;
19504 *)
19505 REPLACE_STRERROR_0=1
19506
19507 $as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h
19508
19509 ;;
19510 esac
19511
19512
19513
19514
19515
19516
19517
19518
19519
19520
19521
19522
19523 if test $gl_cv_have_include_next = yes; then
19524 gl_cv_next_string_h='<'string.h'>'
19525 else
19526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
19527 $as_echo_n "checking absolute name of <string.h>... " >&6; }
19528 if ${gl_cv_next_string_h+:} false; then :
19529 $as_echo_n "(cached) " >&6
19530 else
19531
19532
19533
19534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19535 /* end confdefs.h. */
19536 #include <string.h>
19537 _ACEOF
19538 case "$host_os" in
19539 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19540 *) gl_absname_cpp="$ac_cpp" ;;
19541 esac
19542
19543 case "$host_os" in
19544 mingw*)
19545 gl_dirsep_regex='[/\\]'
19546 ;;
19547 *)
19548 gl_dirsep_regex='\/'
19549 ;;
19550 esac
19551 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19552 gl_header_literal_regex=`echo 'string.h' \
19553 | sed -e "$gl_make_literal_regex_sed"`
19554 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19555 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19556 s|^/[^/]|//&|
19557 p
19558 q
19559 }'
19560
19561 gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19562 sed -n "$gl_absolute_header_sed"`
19563
19564 gl_header=$gl_cv_absolute_string_h
19565 gl_cv_next_string_h='"'$gl_header'"'
19566
19567
19568 fi
19569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
19570 $as_echo "$gl_cv_next_string_h" >&6; }
19571 fi
19572 NEXT_STRING_H=$gl_cv_next_string_h
19573
19574 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19575 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19576 gl_next_as_first_directive='<'string.h'>'
19577 else
19578 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19579 gl_next_as_first_directive=$gl_cv_next_string_h
19580 fi
19581 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
19582
19583
19584
19585
19586
19587
19588
19589
19590
19591
19592
19593
19594
19595
19596
19597
19598
19599
19600
19601
19602
19603
19604
19605 if test $gl_cv_have_include_next = yes; then
19606 gl_cv_next_strings_h='<'strings.h'>'
19607 else
19608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <strings.h>" >&5
19609 $as_echo_n "checking absolute name of <strings.h>... " >&6; }
19610 if ${gl_cv_next_strings_h+:} false; then :
19611 $as_echo_n "(cached) " >&6
19612 else
19613
19614 if test $ac_cv_header_strings_h = yes; then
19615
19616
19617
19618
19619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19620 /* end confdefs.h. */
19621 #include <strings.h>
19622 _ACEOF
19623 case "$host_os" in
19624 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19625 *) gl_absname_cpp="$ac_cpp" ;;
19626 esac
19627
19628 case "$host_os" in
19629 mingw*)
19630 gl_dirsep_regex='[/\\]'
19631 ;;
19632 *)
19633 gl_dirsep_regex='\/'
19634 ;;
19635 esac
19636 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19637 gl_header_literal_regex=`echo 'strings.h' \
19638 | sed -e "$gl_make_literal_regex_sed"`
19639 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19640 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19641 s|^/[^/]|//&|
19642 p
19643 q
19644 }'
19645
19646 gl_cv_absolute_strings_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19647 sed -n "$gl_absolute_header_sed"`
19648
19649 gl_header=$gl_cv_absolute_strings_h
19650 gl_cv_next_strings_h='"'$gl_header'"'
19651 else
19652 gl_cv_next_strings_h='<'strings.h'>'
19653 fi
19654
19655
19656 fi
19657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_strings_h" >&5
19658 $as_echo "$gl_cv_next_strings_h" >&6; }
19659 fi
19660 NEXT_STRINGS_H=$gl_cv_next_strings_h
19661
19662 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19663 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19664 gl_next_as_first_directive='<'strings.h'>'
19665 else
19666 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19667 gl_next_as_first_directive=$gl_cv_next_strings_h
19668 fi
19669 NEXT_AS_FIRST_DIRECTIVE_STRINGS_H=$gl_next_as_first_directive
19670
19671
19672
19673
19674 if test $ac_cv_header_strings_h = yes; then
19675 HAVE_STRINGS_H=1
19676 else
19677 HAVE_STRINGS_H=0
19678 fi
19679
19680
19681
19682
19683
19684
19685 ac_fn_c_check_decl "$LINENO" "strndup" "ac_cv_have_decl_strndup" "$ac_includes_default"
19686 if test "x$ac_cv_have_decl_strndup" = xyes; then :
19687 ac_have_decl=1
19688 else
19689 ac_have_decl=0
19690 fi
19691
19692 cat >>confdefs.h <<_ACEOF
19693 #define HAVE_DECL_STRNDUP $ac_have_decl
19694 _ACEOF
19695
19696
19697
19698 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
19699 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
19700 ac_have_decl=1
19701 else
19702 ac_have_decl=0
19703 fi
19704
19705 cat >>confdefs.h <<_ACEOF
19706 #define HAVE_DECL_STRNLEN $ac_have_decl
19707 _ACEOF
19708
19709
19710
19711
19712
19713
19714
19715
19716
19717
19718
19719 $as_echo "#define _USE_STD_STAT 1" >>confdefs.h
19720
19721
19722
19723
19724
19725
19726
19727
19728
19729
19730
19731 if test $gl_cv_have_include_next = yes; then
19732 gl_cv_next_sys_types_h='<'sys/types.h'>'
19733 else
19734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
19735 $as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
19736 if ${gl_cv_next_sys_types_h+:} false; then :
19737 $as_echo_n "(cached) " >&6
19738 else
19739
19740
19741
19742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19743 /* end confdefs.h. */
19744 #include <sys/types.h>
19745 _ACEOF
19746 case "$host_os" in
19747 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19748 *) gl_absname_cpp="$ac_cpp" ;;
19749 esac
19750
19751 case "$host_os" in
19752 mingw*)
19753 gl_dirsep_regex='[/\\]'
19754 ;;
19755 *)
19756 gl_dirsep_regex='\/'
19757 ;;
19758 esac
19759 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19760 gl_header_literal_regex=`echo 'sys/types.h' \
19761 | sed -e "$gl_make_literal_regex_sed"`
19762 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19763 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19764 s|^/[^/]|//&|
19765 p
19766 q
19767 }'
19768
19769 gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19770 sed -n "$gl_absolute_header_sed"`
19771
19772 gl_header=$gl_cv_absolute_sys_types_h
19773 gl_cv_next_sys_types_h='"'$gl_header'"'
19774
19775
19776 fi
19777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
19778 $as_echo "$gl_cv_next_sys_types_h" >&6; }
19779 fi
19780 NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
19781
19782 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19783 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19784 gl_next_as_first_directive='<'sys/types.h'>'
19785 else
19786 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19787 gl_next_as_first_directive=$gl_cv_next_sys_types_h
19788 fi
19789 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
19790
19791
19792
19793
19794
19795
19796
19797
19798
19799
19800
19801
19802 WINDOWS_STAT_INODES=0
19803
19804
19805
19806
19807
19808
19809 GNULIB_CTIME=0;
19810 GNULIB_MKTIME=0;
19811 GNULIB_LOCALTIME=0;
19812 GNULIB_NANOSLEEP=0;
19813 GNULIB_STRFTIME=0;
19814 GNULIB_STRPTIME=0;
19815 GNULIB_TIMEGM=0;
19816 GNULIB_TIME_R=0;
19817 GNULIB_TIME_RZ=0;
19818 GNULIB_TZSET=0;
19819 HAVE_DECL_LOCALTIME_R=1;
19820 HAVE_NANOSLEEP=1;
19821 HAVE_STRPTIME=1;
19822 HAVE_TIMEGM=1;
19823 HAVE_TZSET=1;
19824 HAVE_TIMEZONE_T=0;
19825 REPLACE_CTIME=GNULIB_PORTCHECK;
19826 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
19827 REPLACE_MKTIME=GNULIB_PORTCHECK;
19828 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
19829 REPLACE_STRFTIME=GNULIB_PORTCHECK;
19830 REPLACE_TIMEGM=GNULIB_PORTCHECK;
19831 REPLACE_TZSET=GNULIB_PORTCHECK;
19832
19833 : ${GNULIB_GETTIMEOFDAY=0};
19834 REPLACE_GMTIME=0;
19835 REPLACE_LOCALTIME=0;
19836
19837
19838
19839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
19840 $as_echo_n "checking for struct timespec in <time.h>... " >&6; }
19841 if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then :
19842 $as_echo_n "(cached) " >&6
19843 else
19844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19845 /* end confdefs.h. */
19846 #include <time.h>
19847
19848 int
19849 main (void)
19850 {
19851 static struct timespec x; x.tv_sec = x.tv_nsec;
19852 ;
19853 return 0;
19854 }
19855 _ACEOF
19856 if ac_fn_c_try_compile "$LINENO"; then :
19857 gl_cv_sys_struct_timespec_in_time_h=yes
19858 else
19859 gl_cv_sys_struct_timespec_in_time_h=no
19860 fi
19861 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19862 fi
19863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
19864 $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
19865
19866 TIME_H_DEFINES_STRUCT_TIMESPEC=0
19867 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
19868 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
19869 UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
19870 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
19871 TIME_H_DEFINES_STRUCT_TIMESPEC=1
19872 else
19873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
19874 $as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
19875 if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then :
19876 $as_echo_n "(cached) " >&6
19877 else
19878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19879 /* end confdefs.h. */
19880 #include <sys/time.h>
19881
19882 int
19883 main (void)
19884 {
19885 static struct timespec x; x.tv_sec = x.tv_nsec;
19886 ;
19887 return 0;
19888 }
19889 _ACEOF
19890 if ac_fn_c_try_compile "$LINENO"; then :
19891 gl_cv_sys_struct_timespec_in_sys_time_h=yes
19892 else
19893 gl_cv_sys_struct_timespec_in_sys_time_h=no
19894 fi
19895 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19896 fi
19897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
19898 $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
19899 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
19900 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
19901 else
19902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
19903 $as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
19904 if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then :
19905 $as_echo_n "(cached) " >&6
19906 else
19907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19908 /* end confdefs.h. */
19909 #include <pthread.h>
19910
19911 int
19912 main (void)
19913 {
19914 static struct timespec x; x.tv_sec = x.tv_nsec;
19915 ;
19916 return 0;
19917 }
19918 _ACEOF
19919 if ac_fn_c_try_compile "$LINENO"; then :
19920 gl_cv_sys_struct_timespec_in_pthread_h=yes
19921 else
19922 gl_cv_sys_struct_timespec_in_pthread_h=no
19923 fi
19924 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19925 fi
19926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
19927 $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
19928 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
19929 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
19930 else
19931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
19932 $as_echo_n "checking for struct timespec in <unistd.h>... " >&6; }
19933 if ${gl_cv_sys_struct_timespec_in_unistd_h+:} false; then :
19934 $as_echo_n "(cached) " >&6
19935 else
19936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19937 /* end confdefs.h. */
19938 #include <unistd.h>
19939
19940 int
19941 main (void)
19942 {
19943 static struct timespec x; x.tv_sec = x.tv_nsec;
19944 ;
19945 return 0;
19946 }
19947 _ACEOF
19948 if ac_fn_c_try_compile "$LINENO"; then :
19949 gl_cv_sys_struct_timespec_in_unistd_h=yes
19950 else
19951 gl_cv_sys_struct_timespec_in_unistd_h=no
19952 fi
19953 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19954 fi
19955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5
19956 $as_echo "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
19957 if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
19958 UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
19959 fi
19960 fi
19961 fi
19962 fi
19963
19964
19965
19966
19967
19968
19969
19970
19971
19972
19973
19974
19975
19976
19977
19978
19979 if test $gl_cv_have_include_next = yes; then
19980 gl_cv_next_time_h='<'time.h'>'
19981 else
19982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
19983 $as_echo_n "checking absolute name of <time.h>... " >&6; }
19984 if ${gl_cv_next_time_h+:} false; then :
19985 $as_echo_n "(cached) " >&6
19986 else
19987
19988
19989
19990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19991 /* end confdefs.h. */
19992 #include <time.h>
19993 _ACEOF
19994 case "$host_os" in
19995 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19996 *) gl_absname_cpp="$ac_cpp" ;;
19997 esac
19998
19999 case "$host_os" in
20000 mingw*)
20001 gl_dirsep_regex='[/\\]'
20002 ;;
20003 *)
20004 gl_dirsep_regex='\/'
20005 ;;
20006 esac
20007 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20008 gl_header_literal_regex=`echo 'time.h' \
20009 | sed -e "$gl_make_literal_regex_sed"`
20010 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20011 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20012 s|^/[^/]|//&|
20013 p
20014 q
20015 }'
20016
20017 gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20018 sed -n "$gl_absolute_header_sed"`
20019
20020 gl_header=$gl_cv_absolute_time_h
20021 gl_cv_next_time_h='"'$gl_header'"'
20022
20023
20024 fi
20025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
20026 $as_echo "$gl_cv_next_time_h" >&6; }
20027 fi
20028 NEXT_TIME_H=$gl_cv_next_time_h
20029
20030 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20031 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20032 gl_next_as_first_directive='<'time.h'>'
20033 else
20034 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20035 gl_next_as_first_directive=$gl_cv_next_time_h
20036 fi
20037 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
20038
20039
20040
20041
20042
20043
20044
20045
20046
20047
20048
20049
20050
20051
20052 gl_libunistring_sed_extract_major='/^[0-9]/{s/^\([0-9]*\).*/\1/p;q;}
20053 i\
20054 0
20055 q
20056 '
20057 gl_libunistring_sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{s/^[0-9]*[.]\([0-9]*\).*/\1/p;q;}
20058 i\
20059 0
20060 q
20061 '
20062 gl_libunistring_sed_extract_subminor='/^[0-9][0-9]*[.][0-9][0-9]*[.][0-9]/{s/^[0-9]*[.][0-9]*[.]\([0-9]*\).*/\1/p;q;}
20063 i\
20064 0
20065 q
20066 '
20067
20068
20069 if test "$HAVE_LIBUNISTRING" = yes; then
20070 LIBUNISTRING_VERSION_MAJOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_major"`
20071 LIBUNISTRING_VERSION_MINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_minor"`
20072 LIBUNISTRING_VERSION_SUBMINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_subminor"`
20073 fi
20074
20075
20076
20077
20078
20079 if test $ac_cv_header_features_h = yes; then
20080 HAVE_FEATURES_H=1
20081 else
20082 HAVE_FEATURES_H=0
20083 fi
20084
20085
20086
20087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
20088 $as_echo_n "checking for inttypes.h... " >&6; }
20089 if ${gl_cv_header_inttypes_h+:} false; then :
20090 $as_echo_n "(cached) " >&6
20091 else
20092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20093 /* end confdefs.h. */
20094
20095 #include <sys/types.h>
20096 #include <inttypes.h>
20097
20098 int
20099 main (void)
20100 {
20101 uintmax_t i = (uintmax_t) -1; return !i;
20102 ;
20103 return 0;
20104 }
20105 _ACEOF
20106 if ac_fn_c_try_compile "$LINENO"; then :
20107 gl_cv_header_inttypes_h=yes
20108 else
20109 gl_cv_header_inttypes_h=no
20110 fi
20111 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20112 fi
20113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5
20114 $as_echo "$gl_cv_header_inttypes_h" >&6; }
20115 if test $gl_cv_header_inttypes_h = yes; then
20116
20117 cat >>confdefs.h <<_ACEOF
20118 #define HAVE_INTTYPES_H_WITH_UINTMAX 1
20119 _ACEOF
20120
20121 fi
20122
20123
20124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5
20125 $as_echo_n "checking for stdint.h... " >&6; }
20126 if ${gl_cv_header_stdint_h+:} false; then :
20127 $as_echo_n "(cached) " >&6
20128 else
20129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20130 /* end confdefs.h. */
20131 #include <sys/types.h>
20132 #include <stdint.h>
20133 int
20134 main (void)
20135 {
20136 uintmax_t i = (uintmax_t) -1; return !i;
20137 ;
20138 return 0;
20139 }
20140 _ACEOF
20141 if ac_fn_c_try_compile "$LINENO"; then :
20142 gl_cv_header_stdint_h=yes
20143 else
20144 gl_cv_header_stdint_h=no
20145 fi
20146 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20147 fi
20148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5
20149 $as_echo "$gl_cv_header_stdint_h" >&6; }
20150 if test $gl_cv_header_stdint_h = yes; then
20151
20152 cat >>confdefs.h <<_ACEOF
20153 #define HAVE_STDINT_H_WITH_UINTMAX 1
20154 _ACEOF
20155
20156 fi
20157
20158
20159
20160
20161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
20162 $as_echo_n "checking for intmax_t... " >&6; }
20163 if ${gt_cv_c_intmax_t+:} false; then :
20164 $as_echo_n "(cached) " >&6
20165 else
20166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20167 /* end confdefs.h. */
20168
20169 #include <stddef.h>
20170 #include <stdlib.h>
20171 #if HAVE_STDINT_H_WITH_UINTMAX
20172 #include <stdint.h>
20173 #endif
20174 #if HAVE_INTTYPES_H_WITH_UINTMAX
20175 #include <inttypes.h>
20176 #endif
20177
20178 int
20179 main (void)
20180 {
20181 intmax_t x = -1; return !x;
20182 ;
20183 return 0;
20184 }
20185 _ACEOF
20186 if ac_fn_c_try_compile "$LINENO"; then :
20187 gt_cv_c_intmax_t=yes
20188 else
20189 gt_cv_c_intmax_t=no
20190 fi
20191 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20192 fi
20193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5
20194 $as_echo "$gt_cv_c_intmax_t" >&6; }
20195 if test $gt_cv_c_intmax_t = yes; then
20196
20197 $as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h
20198
20199 else
20200
20201 test $ac_cv_type_long_long_int = yes \
20202 && ac_type='long long' \
20203 || ac_type='long'
20204
20205 cat >>confdefs.h <<_ACEOF
20206 #define intmax_t $ac_type
20207 _ACEOF
20208
20209 fi
20210
20211
20212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
20213 $as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
20214 if ${gl_cv_cc_double_expbit0+:} false; then :
20215 $as_echo_n "(cached) " >&6
20216 else
20217
20218 if test "$cross_compiling" = yes; then :
20219
20220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20221 /* end confdefs.h. */
20222
20223 #if defined arm || defined __arm || defined __arm__
20224 mixed_endianness
20225 #endif
20226
20227 _ACEOF
20228 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20229 $EGREP "mixed_endianness" >/dev/null 2>&1; then :
20230 gl_cv_cc_double_expbit0="unknown"
20231 else
20232
20233 :
20234 if ${ac_cv_c_bigendian+:} false; then :
20235 $as_echo_n "(cached) " >&6
20236 else
20237 ac_cv_c_bigendian=unknown
20238 # See if we're dealing with a universal compiler.
20239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20240 /* end confdefs.h. */
20241 #ifndef __APPLE_CC__
20242 not a universal capable compiler
20243 #endif
20244 typedef int dummy;
20245
20246 _ACEOF
20247 if ac_fn_c_try_compile "$LINENO"; then :
20248
20249 # Check for potential -arch flags. It is not universal unless
20250 # there are at least two -arch flags with different values.
20251 ac_arch=
20252 ac_prev=
20253 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
20254 if test -n "$ac_prev"; then
20255 case $ac_word in
20256 i?86 | x86_64 | ppc | ppc64)
20257 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
20258 ac_arch=$ac_word
20259 else
20260 ac_cv_c_bigendian=universal
20261 break
20262 fi
20263 ;;
20264 esac
20265 ac_prev=
20266 elif test "x$ac_word" = "x-arch"; then
20267 ac_prev=arch
20268 fi
20269 done
20270 fi
20271 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20272 if test $ac_cv_c_bigendian = unknown; then
20273 # See if sys/param.h defines the BYTE_ORDER macro.
20274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20275 /* end confdefs.h. */
20276 #include <sys/types.h>
20277 #include <sys/param.h>
20278
20279 int
20280 main (void)
20281 {
20282 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
20283 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
20284 && LITTLE_ENDIAN)
20285 bogus endian macros
20286 #endif
20287
20288 ;
20289 return 0;
20290 }
20291 _ACEOF
20292 if ac_fn_c_try_compile "$LINENO"; then :
20293 # It does; now see whether it defined to BIG_ENDIAN or not.
20294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20295 /* end confdefs.h. */
20296 #include <sys/types.h>
20297 #include <sys/param.h>
20298
20299 int
20300 main (void)
20301 {
20302 #if BYTE_ORDER != BIG_ENDIAN
20303 not big endian
20304 #endif
20305
20306 ;
20307 return 0;
20308 }
20309 _ACEOF
20310 if ac_fn_c_try_compile "$LINENO"; then :
20311 ac_cv_c_bigendian=yes
20312 else
20313 ac_cv_c_bigendian=no
20314 fi
20315 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20316 fi
20317 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20318 fi
20319 if test $ac_cv_c_bigendian = unknown; then
20320 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
20321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20322 /* end confdefs.h. */
20323 #include <limits.h>
20324
20325 int
20326 main (void)
20327 {
20328 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
20329 bogus endian macros
20330 #endif
20331
20332 ;
20333 return 0;
20334 }
20335 _ACEOF
20336 if ac_fn_c_try_compile "$LINENO"; then :
20337 # It does; now see whether it defined to _BIG_ENDIAN or not.
20338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20339 /* end confdefs.h. */
20340 #include <limits.h>
20341
20342 int
20343 main (void)
20344 {
20345 #ifndef _BIG_ENDIAN
20346 not big endian
20347 #endif
20348
20349 ;
20350 return 0;
20351 }
20352 _ACEOF
20353 if ac_fn_c_try_compile "$LINENO"; then :
20354 ac_cv_c_bigendian=yes
20355 else
20356 ac_cv_c_bigendian=no
20357 fi
20358 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20359 fi
20360 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20361 fi
20362 if test $ac_cv_c_bigendian = unknown; then
20363 # Compile a test program.
20364 if test "$cross_compiling" = yes; then :
20365 # Try to guess by grepping values from an object file.
20366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20367 /* end confdefs.h. */
20368 short int ascii_mm[] =
20369 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
20370 short int ascii_ii[] =
20371 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
20372 int use_ascii (int i) {
20373 return ascii_mm[i] + ascii_ii[i];
20374 }
20375 short int ebcdic_ii[] =
20376 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
20377 short int ebcdic_mm[] =
20378 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
20379 int use_ebcdic (int i) {
20380 return ebcdic_mm[i] + ebcdic_ii[i];
20381 }
20382 extern int foo;
20383
20384 int
20385 main (void)
20386 {
20387 return use_ascii (foo) == use_ebcdic (foo);
20388 ;
20389 return 0;
20390 }
20391 _ACEOF
20392 if ac_fn_c_try_compile "$LINENO"; then :
20393 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
20394 ac_cv_c_bigendian=yes
20395 fi
20396 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
20397 if test "$ac_cv_c_bigendian" = unknown; then
20398 ac_cv_c_bigendian=no
20399 else
20400 # finding both strings is unlikely to happen, but who knows?
20401 ac_cv_c_bigendian=unknown
20402 fi
20403 fi
20404 fi
20405 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20406 else
20407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20408 /* end confdefs.h. */
20409 $ac_includes_default
20410 int
20411 main (void)
20412 {
20413
20414 /* Are we little or big endian? From Harbison&Steele. */
20415 union
20416 {
20417 long int l;
20418 char c[sizeof (long int)];
20419 } u;
20420 u.l = 1;
20421 return u.c[sizeof (long int) - 1] == 1;
20422
20423 ;
20424 return 0;
20425 }
20426 _ACEOF
20427 if ac_fn_c_try_run "$LINENO"; then :
20428 ac_cv_c_bigendian=no
20429 else
20430 ac_cv_c_bigendian=yes
20431 fi
20432 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20433 conftest.$ac_objext conftest.beam conftest.$ac_ext
20434 fi
20435
20436 fi
20437 fi
20438 :
20439 case $ac_cv_c_bigendian in #(
20440 yes)
20441 gl_cv_cc_double_expbit0="word 0 bit 20";; #(
20442 no)
20443 gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
20444 universal)
20445
20446 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
20447
20448 ;; #(
20449 *)
20450 gl_cv_cc_double_expbit0="unknown" ;;
20451 esac
20452
20453
20454 fi
20455 rm -f conftest*
20456
20457
20458 else
20459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20460 /* end confdefs.h. */
20461
20462 #include <float.h>
20463 #include <stddef.h>
20464 #include <stdio.h>
20465 #include <string.h>
20466 #define NWORDS \
20467 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
20468 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
20469 static unsigned int ored_words[NWORDS];
20470 static unsigned int anded_words[NWORDS];
20471 static void add_to_ored_words (double x)
20472 {
20473 memory_double m;
20474 size_t i;
20475 /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
20476 memset (&m, 0, sizeof (memory_double));
20477 m.value = x;
20478 for (i = 0; i < NWORDS; i++)
20479 {
20480 ored_words[i] |= m.word[i];
20481 anded_words[i] &= m.word[i];
20482 }
20483 }
20484 int main ()
20485 {
20486 size_t j;
20487 FILE *fp = fopen ("conftest.out", "w");
20488 if (fp == NULL)
20489 return 1;
20490 for (j = 0; j < NWORDS; j++)
20491 anded_words[j] = ~ (unsigned int) 0;
20492 add_to_ored_words (0.25);
20493 add_to_ored_words (0.5);
20494 add_to_ored_words (1.0);
20495 add_to_ored_words (2.0);
20496 add_to_ored_words (4.0);
20497 /* Remove bits that are common (e.g. if representation of the first mantissa
20498 bit is explicit). */
20499 for (j = 0; j < NWORDS; j++)
20500 ored_words[j] &= ~anded_words[j];
20501 /* Now find the nonzero word. */
20502 for (j = 0; j < NWORDS; j++)
20503 if (ored_words[j] != 0)
20504 break;
20505 if (j < NWORDS)
20506 {
20507 size_t i;
20508 for (i = j + 1; i < NWORDS; i++)
20509 if (ored_words[i] != 0)
20510 {
20511 fprintf (fp, "unknown");
20512 return (fclose (fp) != 0);
20513 }
20514 for (i = 0; ; i++)
20515 if ((ored_words[j] >> i) & 1)
20516 {
20517 fprintf (fp, "word %d bit %d", (int) j, (int) i);
20518 return (fclose (fp) != 0);
20519 }
20520 }
20521 fprintf (fp, "unknown");
20522 return (fclose (fp) != 0);
20523 }
20524
20525 _ACEOF
20526 if ac_fn_c_try_run "$LINENO"; then :
20527 gl_cv_cc_double_expbit0=`cat conftest.out`
20528 else
20529 gl_cv_cc_double_expbit0="unknown"
20530 fi
20531 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20532 conftest.$ac_objext conftest.beam conftest.$ac_ext
20533 fi
20534
20535 rm -f conftest.out
20536
20537 fi
20538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
20539 $as_echo "$gl_cv_cc_double_expbit0" >&6; }
20540 case "$gl_cv_cc_double_expbit0" in
20541 word*bit*)
20542 word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
20543 bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
20544
20545 cat >>confdefs.h <<_ACEOF
20546 #define DBL_EXPBIT0_WORD $word
20547 _ACEOF
20548
20549
20550 cat >>confdefs.h <<_ACEOF
20551 #define DBL_EXPBIT0_BIT $bit
20552 _ACEOF
20553
20554 ;;
20555 esac
20556
20557
20558
20559
20560
20561
20562
20563
20564
20565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5
20566 $as_echo_n "checking whether snprintf returns a byte count as in C99... " >&6; }
20567 if ${gl_cv_func_snprintf_retval_c99+:} false; then :
20568 $as_echo_n "(cached) " >&6
20569 else
20570
20571 if test "$cross_compiling" = yes; then :
20572 case "$host_os" in
20573 # Guess yes on glibc systems.
20574 *-gnu* | gnu*) gl_cv_func_snprintf_retval_c99="guessing yes";;
20575 # Guess yes on FreeBSD >= 5.
20576 freebsd[1-4].*) gl_cv_func_snprintf_retval_c99="guessing no";;
20577 freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
20578 # Guess yes on Mac OS X >= 10.3.
20579 darwin[1-6].*) gl_cv_func_snprintf_retval_c99="guessing no";;
20580 darwin*) gl_cv_func_snprintf_retval_c99="guessing yes";;
20581 # Guess yes on OpenBSD >= 3.9.
20582 openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
20583 gl_cv_func_snprintf_retval_c99="guessing no";;
20584 openbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
20585 # Guess yes on Solaris >= 2.10.
20586 solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
20587 solaris*) gl_cv_func_printf_sizes_c99="guessing no";;
20588 # Guess yes on AIX >= 4.
20589 aix[1-3]*) gl_cv_func_snprintf_retval_c99="guessing no";;
20590 aix*) gl_cv_func_snprintf_retval_c99="guessing yes";;
20591 # Guess yes on NetBSD >= 3.
20592 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
20593 gl_cv_func_snprintf_retval_c99="guessing no";;
20594 netbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
20595 # Guess yes on BeOS.
20596 beos*) gl_cv_func_snprintf_retval_c99="guessing yes";;
20597 # Guess yes on MSVC, no on mingw.
20598 mingw*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20599 /* end confdefs.h. */
20600
20601 #ifdef _MSC_VER
20602 Known
20603 #endif
20604
20605 _ACEOF
20606 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20607 $EGREP "Known" >/dev/null 2>&1; then :
20608 gl_cv_func_snprintf_retval_c99="guessing yes"
20609 else
20610 gl_cv_func_snprintf_retval_c99="guessing no"
20611 fi
20612 rm -f conftest*
20613
20614 ;;
20615 # If we don't know, assume the worst.
20616 *) gl_cv_func_snprintf_retval_c99="guessing no";;
20617 esac
20618
20619 else
20620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20621 /* end confdefs.h. */
20622
20623 #include <stdio.h>
20624 #include <string.h>
20625 #if HAVE_SNPRINTF
20626 # define my_snprintf snprintf
20627 #else
20628 # include <stdarg.h>
20629 static int my_snprintf (char *buf, int size, const char *format, ...)
20630 {
20631 va_list args;
20632 int ret;
20633 va_start (args, format);
20634 ret = vsnprintf (buf, size, format, args);
20635 va_end (args);
20636 return ret;
20637 }
20638 #endif
20639 static char buf[100];
20640 int main ()
20641 {
20642 strcpy (buf, "ABCDEF");
20643 if (my_snprintf (buf, 3, "%d %d", 4567, 89) != 7)
20644 return 1;
20645 if (my_snprintf (buf, 0, "%d %d", 4567, 89) != 7)
20646 return 2;
20647 if (my_snprintf (NULL, 0, "%d %d", 4567, 89) != 7)
20648 return 3;
20649 return 0;
20650 }
20651 _ACEOF
20652 if ac_fn_c_try_run "$LINENO"; then :
20653 gl_cv_func_snprintf_retval_c99=yes
20654 else
20655 gl_cv_func_snprintf_retval_c99=no
20656 fi
20657 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20658 conftest.$ac_objext conftest.beam conftest.$ac_ext
20659 fi
20660
20661
20662 fi
20663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_retval_c99" >&5
20664 $as_echo "$gl_cv_func_snprintf_retval_c99" >&6; }
20665
20666
20667
20668
20669
20670
20671 for ac_func in snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb
20672 do :
20673 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20674 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
20675 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
20676 cat >>confdefs.h <<_ACEOF
20677 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
20678 _ACEOF
20679
20680 fi
20681 done
20682
20683 ac_fn_c_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include <stdio.h>
20684 "
20685 if test "x$ac_cv_have_decl__snprintf" = xyes; then :
20686 ac_have_decl=1
20687 else
20688 ac_have_decl=0
20689 fi
20690
20691 cat >>confdefs.h <<_ACEOF
20692 #define HAVE_DECL__SNPRINTF $ac_have_decl
20693 _ACEOF
20694
20695
20696
20697 case "$gl_cv_func_snprintf_retval_c99" in
20698 *yes)
20699
20700 $as_echo "#define HAVE_SNPRINTF_RETVAL_C99 1" >>confdefs.h
20701
20702 ;;
20703 esac
20704
20705 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
20706 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
20707 ac_have_decl=1
20708 else
20709 ac_have_decl=0
20710 fi
20711
20712 cat >>confdefs.h <<_ACEOF
20713 #define HAVE_DECL_VSNPRINTF $ac_have_decl
20714 _ACEOF
20715
20716
20717
20718
20719
20720 if test $ac_cv_header_crtdefs_h = yes; then
20721 HAVE_CRTDEFS_H=1
20722 else
20723 HAVE_CRTDEFS_H=0
20724 fi
20725
20726
20727
20728
20729
20730 GNULIB_ISWBLANK=0;
20731 GNULIB_WCTYPE=0;
20732 GNULIB_ISWCTYPE=0;
20733 GNULIB_WCTRANS=0;
20734 GNULIB_TOWCTRANS=0;
20735 HAVE_ISWBLANK=1;
20736 HAVE_WCTYPE_T=1;
20737 HAVE_WCTRANS_T=1;
20738 REPLACE_ISWBLANK=0;
20739
20740
20741
20742
20743
20744
20745 if false; then
20746 GL_COND_LIBTOOL_TRUE=
20747 GL_COND_LIBTOOL_FALSE='#'
20748 else
20749 GL_COND_LIBTOOL_TRUE='#'
20750 GL_COND_LIBTOOL_FALSE=
20751 fi
20752
20753 gl_cond_libtool=false
20754 gl_libdeps=
20755 gl_ltlibdeps=
20756 gl_m4_base='m4'
20757
20758
20759
20760
20761
20762
20763
20764
20765
20766 gl_source_base='grub-core/lib/gnulib'
20767
20768
20769 if test $ac_cv_func_alloca_works = no; then
20770 :
20771 fi
20772
20773 # Define an additional variable used in the Makefile substitution.
20774 if test $ac_cv_working_alloca_h = yes; then
20775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
20776 $as_echo_n "checking for alloca as a compiler built-in... " >&6; }
20777 if ${gl_cv_rpl_alloca+:} false; then :
20778 $as_echo_n "(cached) " >&6
20779 else
20780
20781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20782 /* end confdefs.h. */
20783
20784 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
20785 Need own alloca
20786 #endif
20787
20788 _ACEOF
20789 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20790 $EGREP "Need own alloca" >/dev/null 2>&1; then :
20791 gl_cv_rpl_alloca=yes
20792 else
20793 gl_cv_rpl_alloca=no
20794 fi
20795 rm -f conftest*
20796
20797
20798 fi
20799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
20800 $as_echo "$gl_cv_rpl_alloca" >&6; }
20801 if test $gl_cv_rpl_alloca = yes; then
20802
20803 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
20804
20805 ALLOCA_H=alloca.h
20806 else
20807 ALLOCA_H=
20808 fi
20809 else
20810 ALLOCA_H=alloca.h
20811 fi
20812
20813 if test -n "$ALLOCA_H"; then
20814 GL_GENERATE_ALLOCA_H_TRUE=
20815 GL_GENERATE_ALLOCA_H_FALSE='#'
20816 else
20817 GL_GENERATE_ALLOCA_H_TRUE='#'
20818 GL_GENERATE_ALLOCA_H_FALSE=
20819 fi
20820
20821
20822
20823
20824
20825
20826
20827 ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
20828 "
20829 if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
20830 ac_have_decl=1
20831 else
20832 ac_have_decl=0
20833 fi
20834
20835 cat >>confdefs.h <<_ACEOF
20836 #define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
20837 _ACEOF
20838 if test $ac_have_decl = 1; then :
20839
20840 else
20841
20842 $as_echo "#define GNULIB_PROGRAM_INVOCATION_NAME 1" >>confdefs.h
20843
20844 fi
20845
20846 ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
20847 "
20848 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
20849 ac_have_decl=1
20850 else
20851 ac_have_decl=0
20852 fi
20853
20854 cat >>confdefs.h <<_ACEOF
20855 #define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
20856 _ACEOF
20857 if test $ac_have_decl = 1; then :
20858
20859 else
20860
20861 $as_echo "#define GNULIB_PROGRAM_INVOCATION_SHORT_NAME 1" >>confdefs.h
20862
20863 fi
20864
20865
20866 # Check if program_invocation_name and program_invocation_short_name
20867 # are defined elsewhere. It is improbable that only one of them will
20868 # be defined and other not, I prefer to stay on the safe side and to
20869 # test each one separately.
20870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether program_invocation_name is defined" >&5
20871 $as_echo_n "checking whether program_invocation_name is defined... " >&6; }
20872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20873 /* end confdefs.h. */
20874 #include <argp.h>
20875 int
20876 main (void)
20877 {
20878 program_invocation_name = "test";
20879 ;
20880 return 0;
20881 }
20882 _ACEOF
20883 if ac_fn_c_try_link "$LINENO"; then :
20884
20885 $as_echo "#define HAVE_PROGRAM_INVOCATION_NAME 1" >>confdefs.h
20886
20887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20888 $as_echo "yes" >&6; }
20889 else
20890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20891 $as_echo "no" >&6; }
20892 fi
20893 rm -f core conftest.err conftest.$ac_objext \
20894 conftest$ac_exeext conftest.$ac_ext
20895
20896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether program_invocation_short_name is defined" >&5
20897 $as_echo_n "checking whether program_invocation_short_name is defined... " >&6; }
20898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20899 /* end confdefs.h. */
20900 #include <argp.h>
20901 int
20902 main (void)
20903 {
20904 program_invocation_short_name = "test";
20905 ;
20906 return 0;
20907 }
20908 _ACEOF
20909 if ac_fn_c_try_link "$LINENO"; then :
20910
20911 $as_echo "#define HAVE_PROGRAM_INVOCATION_SHORT_NAME 1" >>confdefs.h
20912
20913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20914 $as_echo "yes" >&6; }
20915 else
20916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20917 $as_echo "no" >&6; }
20918 fi
20919 rm -f core conftest.err conftest.$ac_objext \
20920 conftest$ac_exeext conftest.$ac_ext
20921
20922
20923
20924
20925
20926
20927
20928
20929
20930
20931
20932
20933
20934
20935
20936
20937
20938
20939
20940
20941 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=argp_error:2:c-format"
20942
20943
20944
20945 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=argp_failure:4:c-format"
20946
20947
20948
20949
20950
20951
20952
20953
20954
20955 gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
20956
20957
20958
20959
20960
20961
20962
20963
20964
20965
20966
20967
20968 if test $ac_cv_func_btowc = no; then
20969 HAVE_BTOWC=0
20970 else
20971
20972
20973
20974
20975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(0) is correct" >&5
20976 $as_echo_n "checking whether btowc(0) is correct... " >&6; }
20977 if ${gl_cv_func_btowc_nul+:} false; then :
20978 $as_echo_n "(cached) " >&6
20979 else
20980
20981 if test "$cross_compiling" = yes; then :
20982
20983 case "$host_os" in
20984 # Guess no on Cygwin.
20985 cygwin*) gl_cv_func_btowc_nul="guessing no" ;;
20986 # Guess yes on native Windows.
20987 mingw*) gl_cv_func_btowc_nul="guessing yes" ;;
20988 # Guess yes otherwise.
20989 *) gl_cv_func_btowc_nul="guessing yes" ;;
20990 esac
20991
20992 else
20993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20994 /* end confdefs.h. */
20995
20996 #include <string.h>
20997 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20998 <wchar.h>.
20999 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21000 included before <wchar.h>. */
21001 #include <stddef.h>
21002 #include <stdio.h>
21003 #include <time.h>
21004 #include <wchar.h>
21005 int main ()
21006 {
21007 if (btowc ('\0') != 0)
21008 return 1;
21009 return 0;
21010 }
21011 _ACEOF
21012 if ac_fn_c_try_run "$LINENO"; then :
21013 gl_cv_func_btowc_nul=yes
21014 else
21015 gl_cv_func_btowc_nul=no
21016 fi
21017 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21018 conftest.$ac_objext conftest.beam conftest.$ac_ext
21019 fi
21020
21021
21022 fi
21023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_nul" >&5
21024 $as_echo "$gl_cv_func_btowc_nul" >&6; }
21025
21026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(EOF) is correct" >&5
21027 $as_echo_n "checking whether btowc(EOF) is correct... " >&6; }
21028 if ${gl_cv_func_btowc_eof+:} false; then :
21029 $as_echo_n "(cached) " >&6
21030 else
21031
21032 case "$host_os" in
21033 # Guess no on IRIX.
21034 irix*) gl_cv_func_btowc_eof="guessing no" ;;
21035 # Guess yes on native Windows.
21036 mingw*) gl_cv_func_btowc_eof="guessing yes" ;;
21037 # Guess yes otherwise.
21038 *) gl_cv_func_btowc_eof="guessing yes" ;;
21039 esac
21040 if test $LOCALE_FR != none; then
21041 if test "$cross_compiling" = yes; then :
21042 :
21043 else
21044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21045 /* end confdefs.h. */
21046
21047 #include <locale.h>
21048 #include <string.h>
21049 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21050 <wchar.h>.
21051 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21052 included before <wchar.h>. */
21053 #include <stddef.h>
21054 #include <stdio.h>
21055 #include <time.h>
21056 #include <wchar.h>
21057 int main ()
21058 {
21059 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
21060 {
21061 if (btowc (EOF) != WEOF)
21062 return 1;
21063 }
21064 return 0;
21065 }
21066 _ACEOF
21067 if ac_fn_c_try_run "$LINENO"; then :
21068 gl_cv_func_btowc_eof=yes
21069 else
21070 gl_cv_func_btowc_eof=no
21071 fi
21072 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21073 conftest.$ac_objext conftest.beam conftest.$ac_ext
21074 fi
21075
21076 fi
21077
21078 fi
21079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5
21080 $as_echo "$gl_cv_func_btowc_eof" >&6; }
21081
21082 case "$gl_cv_func_btowc_nul" in
21083 *yes) ;;
21084 *) REPLACE_BTOWC=1 ;;
21085 esac
21086 case "$gl_cv_func_btowc_eof" in
21087 *yes) ;;
21088 *) REPLACE_BTOWC=1 ;;
21089 esac
21090 fi
21091
21092 if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
21093
21094
21095
21096
21097
21098
21099
21100
21101 gl_LIBOBJS="$gl_LIBOBJS btowc.$ac_objext"
21102
21103
21104 :
21105
21106 fi
21107
21108
21109
21110
21111
21112 GNULIB_BTOWC=1
21113
21114
21115
21116
21117
21118 $as_echo "#define GNULIB_TEST_BTOWC 1" >>confdefs.h
21119
21120
21121
21122
21123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_expect" >&5
21124 $as_echo_n "checking for __builtin_expect... " >&6; }
21125 if ${gl_cv___builtin_expect+:} false; then :
21126 $as_echo_n "(cached) " >&6
21127 else
21128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21129 /* end confdefs.h. */
21130
21131 int
21132 main (int argc, char **argv)
21133 {
21134 argc = __builtin_expect (argc, 100);
21135 return argv[argc != 100][0];
21136 }
21137 _ACEOF
21138 if ac_fn_c_try_link "$LINENO"; then :
21139 gl_cv___builtin_expect=yes
21140 else
21141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21142 /* end confdefs.h. */
21143
21144 #include <builtins.h>
21145 int
21146 main (int argc, char **argv)
21147 {
21148 argc = __builtin_expect (argc, 100);
21149 return argv[argc != 100][0];
21150 }
21151 _ACEOF
21152 if ac_fn_c_try_link "$LINENO"; then :
21153 gl_cv___builtin_expect="in <builtins.h>"
21154 else
21155 gl_cv___builtin_expect=no
21156 fi
21157 rm -f core conftest.err conftest.$ac_objext \
21158 conftest$ac_exeext conftest.$ac_ext
21159 fi
21160 rm -f core conftest.err conftest.$ac_objext \
21161 conftest$ac_exeext conftest.$ac_ext
21162 fi
21163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv___builtin_expect" >&5
21164 $as_echo "$gl_cv___builtin_expect" >&6; }
21165 if test "$gl_cv___builtin_expect" = yes; then
21166 $as_echo "#define HAVE___BUILTIN_EXPECT 1" >>confdefs.h
21167
21168 elif test "$gl_cv___builtin_expect" = "in <builtins.h>"; then
21169 $as_echo "#define HAVE___BUILTIN_EXPECT 2" >>confdefs.h
21170
21171 fi
21172
21173
21174
21175
21176
21177
21178
21179 GNULIB_CHDIR=1
21180
21181
21182
21183
21184
21185 $as_echo "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
21186
21187
21188
21189
21190
21191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this system has an arbitrary file name length limit" >&5
21192 $as_echo_n "checking whether this system has an arbitrary file name length limit... " >&6; }
21193 if ${gl_cv_have_arbitrary_file_name_length_limit+:} false; then :
21194 $as_echo_n "(cached) " >&6
21195 else
21196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21197 /* end confdefs.h. */
21198
21199 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
21200 #if HAVE_UNISTD_H
21201 # include <unistd.h>
21202 #endif
21203 #include <limits.h>
21204 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
21205 # include <sys/param.h>
21206 #endif
21207 #if !defined PATH_MAX && defined MAXPATHLEN
21208 # define PATH_MAX MAXPATHLEN
21209 #endif
21210 #ifdef __hpux
21211 # undef PATH_MAX
21212 # define PATH_MAX 1024
21213 #endif
21214 #if defined _WIN32 && ! defined __CYGWIN__
21215 # undef PATH_MAX
21216 # define PATH_MAX 260
21217 #endif
21218
21219 #ifdef PATH_MAX
21220 have_arbitrary_file_name_length_limit
21221 #endif
21222 _ACEOF
21223 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21224 $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1; then :
21225 gl_cv_have_arbitrary_file_name_length_limit=yes
21226 else
21227 gl_cv_have_arbitrary_file_name_length_limit=no
21228 fi
21229 rm -f conftest*
21230
21231 fi
21232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_arbitrary_file_name_length_limit" >&5
21233 $as_echo "$gl_cv_have_arbitrary_file_name_length_limit" >&6; }
21234
21235 if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then
21236
21237
21238
21239
21240
21241
21242
21243
21244 gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext"
21245
21246 :
21247 fi
21248
21249
21250 $as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
21251
21252
21253
21254
21255
21256
21257 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
21258 REPLACE_CLOSE=1
21259 fi
21260
21261
21262
21263
21264
21265
21266 if test $ac_cv_header_sys_socket_h != yes; then
21267 for ac_header in winsock2.h
21268 do :
21269 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
21270 if test "x$ac_cv_header_winsock2_h" = xyes; then :
21271 cat >>confdefs.h <<_ACEOF
21272 #define HAVE_WINSOCK2_H 1
21273 _ACEOF
21274
21275 fi
21276
21277 done
21278
21279 fi
21280 if test "$ac_cv_header_winsock2_h" = yes; then
21281 HAVE_WINSOCK2_H=1
21282 UNISTD_H_HAVE_WINSOCK2_H=1
21283 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
21284 else
21285 HAVE_WINSOCK2_H=0
21286 fi
21287
21288
21289 if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
21290 REPLACE_CLOSE=1
21291 fi
21292
21293
21294 if test $REPLACE_CLOSE = 0; then
21295
21296
21297
21298 if test $ac_cv_func_fchdir = no; then
21299 HAVE_FCHDIR=0
21300 fi
21301
21302 if test $HAVE_FCHDIR = 0; then
21303 REPLACE_CLOSE=1
21304 fi
21305 fi
21306
21307
21308 if test $REPLACE_CLOSE = 1; then
21309
21310
21311
21312
21313
21314
21315
21316
21317 gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
21318
21319 fi
21320
21321
21322
21323
21324
21325 GNULIB_CLOSE=1
21326
21327
21328
21329
21330
21331 $as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
21332
21333
21334
21335
21336
21337
21338
21339
21340
21341
21342
21343
21344
21345
21346
21347 if test $gl_cv_have_include_next = yes; then
21348 gl_cv_next_dirent_h='<'dirent.h'>'
21349 else
21350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
21351 $as_echo_n "checking absolute name of <dirent.h>... " >&6; }
21352 if ${gl_cv_next_dirent_h+:} false; then :
21353 $as_echo_n "(cached) " >&6
21354 else
21355
21356 if test $ac_cv_header_dirent_h = yes; then
21357
21358
21359
21360
21361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21362 /* end confdefs.h. */
21363 #include <dirent.h>
21364 _ACEOF
21365 case "$host_os" in
21366 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21367 *) gl_absname_cpp="$ac_cpp" ;;
21368 esac
21369
21370 case "$host_os" in
21371 mingw*)
21372 gl_dirsep_regex='[/\\]'
21373 ;;
21374 *)
21375 gl_dirsep_regex='\/'
21376 ;;
21377 esac
21378 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21379 gl_header_literal_regex=`echo 'dirent.h' \
21380 | sed -e "$gl_make_literal_regex_sed"`
21381 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21382 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21383 s|^/[^/]|//&|
21384 p
21385 q
21386 }'
21387
21388 gl_cv_absolute_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21389 sed -n "$gl_absolute_header_sed"`
21390
21391 gl_header=$gl_cv_absolute_dirent_h
21392 gl_cv_next_dirent_h='"'$gl_header'"'
21393 else
21394 gl_cv_next_dirent_h='<'dirent.h'>'
21395 fi
21396
21397
21398 fi
21399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
21400 $as_echo "$gl_cv_next_dirent_h" >&6; }
21401 fi
21402 NEXT_DIRENT_H=$gl_cv_next_dirent_h
21403
21404 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21405 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21406 gl_next_as_first_directive='<'dirent.h'>'
21407 else
21408 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21409 gl_next_as_first_directive=$gl_cv_next_dirent_h
21410 fi
21411 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
21412
21413
21414
21415
21416 if test $ac_cv_header_dirent_h = yes; then
21417 HAVE_DIRENT_H=1
21418 else
21419 HAVE_DIRENT_H=0
21420 fi
21421
21422
21423
21424
21425
21426
21427
21428
21429
21430
21431
21432 for ac_func in dirfd
21433 do :
21434 ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
21435 if test "x$ac_cv_func_dirfd" = xyes; then :
21436 cat >>confdefs.h <<_ACEOF
21437 #define HAVE_DIRFD 1
21438 _ACEOF
21439
21440 fi
21441 done
21442
21443 ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
21444 #include <dirent.h>
21445 "
21446 if test "x$ac_cv_have_decl_dirfd" = xyes; then :
21447 ac_have_decl=1
21448 else
21449 ac_have_decl=0
21450 fi
21451
21452 cat >>confdefs.h <<_ACEOF
21453 #define HAVE_DECL_DIRFD $ac_have_decl
21454 _ACEOF
21455
21456 if test $ac_cv_have_decl_dirfd = no; then
21457 HAVE_DECL_DIRFD=0
21458 fi
21459
21460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
21461 $as_echo_n "checking whether dirfd is a macro... " >&6; }
21462 if ${gl_cv_func_dirfd_macro+:} false; then :
21463 $as_echo_n "(cached) " >&6
21464 else
21465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21466 /* end confdefs.h. */
21467
21468 #include <sys/types.h>
21469 #include <dirent.h>
21470 #ifdef dirfd
21471 dirent_header_defines_dirfd
21472 #endif
21473 _ACEOF
21474 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21475 $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1; then :
21476 gl_cv_func_dirfd_macro=yes
21477 else
21478 gl_cv_func_dirfd_macro=no
21479 fi
21480 rm -f conftest*
21481
21482 fi
21483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
21484 $as_echo "$gl_cv_func_dirfd_macro" >&6; }
21485
21486 # Use the replacement if we have no function or macro with that name,
21487 # or if OS/2 kLIBC whose dirfd() does not work.
21488 # Replace only if the system declares dirfd already.
21489 case $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro,$host_os,$ac_cv_have_decl_dirfd in
21490 no,no,*,yes | *,*,os2*,yes)
21491 REPLACE_DIRFD=1
21492
21493 $as_echo "#define REPLACE_DIRFD 1" >>confdefs.h
21494 ;;
21495 esac
21496
21497 if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \
21498 || test $REPLACE_DIRFD = 1; then
21499
21500
21501
21502
21503
21504
21505
21506
21507 gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext"
21508
21509
21510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
21511 $as_echo_n "checking how to get the file descriptor associated with an open DIR*... " >&6; }
21512 if ${gl_cv_sys_dir_fd_member_name+:} false; then :
21513 $as_echo_n "(cached) " >&6
21514 else
21515
21516 dirfd_save_CFLAGS=$CFLAGS
21517 for ac_expr in d_fd dd_fd; do
21518
21519 CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
21520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21521 /* end confdefs.h. */
21522
21523 #include <sys/types.h>
21524 #include <dirent.h>
21525 int
21526 main (void)
21527 {
21528 DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
21529 ;
21530 return 0;
21531 }
21532 _ACEOF
21533 if ac_fn_c_try_compile "$LINENO"; then :
21534 dir_fd_found=yes
21535
21536 fi
21537 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21538 CFLAGS=$dirfd_save_CFLAGS
21539 test "$dir_fd_found" = yes && break
21540 done
21541 test "$dir_fd_found" = yes || ac_expr=no_such_member
21542
21543 gl_cv_sys_dir_fd_member_name=$ac_expr
21544
21545
21546 fi
21547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
21548 $as_echo "$gl_cv_sys_dir_fd_member_name" >&6; }
21549 if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
21550
21551 cat >>confdefs.h <<_ACEOF
21552 #define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name
21553 _ACEOF
21554
21555 fi
21556
21557
21558 fi
21559
21560
21561
21562
21563
21564 GNULIB_DIRFD=1
21565
21566
21567
21568
21569
21570 $as_echo "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
21571
21572
21573
21574
21575
21576
21577
21578
21579
21580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
21581 $as_echo_n "checking whether // is distinct from /... " >&6; }
21582 if ${gl_cv_double_slash_root+:} false; then :
21583 $as_echo_n "(cached) " >&6
21584 else
21585 if test x"$cross_compiling" = xyes ; then
21586 # When cross-compiling, there is no way to tell whether // is special
21587 # short of a list of hosts. However, the only known hosts to date
21588 # that have a distinct // are Apollo DomainOS (too old to port to),
21589 # Cygwin, and z/OS. If anyone knows of another system for which // has
21590 # special semantics and is distinct from /, please report it to
21591 # <bug-gnulib@gnu.org>.
21592 case $host in
21593 *-cygwin | i370-ibm-openedition)
21594 gl_cv_double_slash_root=yes ;;
21595 *)
21596 # Be optimistic and assume that / and // are the same when we
21597 # don't know.
21598 gl_cv_double_slash_root='unknown, assuming no' ;;
21599 esac
21600 else
21601 set x `ls -di / // 2>/dev/null`
21602 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
21603 gl_cv_double_slash_root=no
21604 else
21605 gl_cv_double_slash_root=yes
21606 fi
21607 fi
21608 fi
21609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
21610 $as_echo "$gl_cv_double_slash_root" >&6; }
21611 if test "$gl_cv_double_slash_root" = yes; then
21612
21613 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
21614
21615 fi
21616
21617
21618
21619
21620
21621
21622 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
21623
21624
21625 if test $HAVE_DUP2 = 1; then
21626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
21627 $as_echo_n "checking whether dup2 works... " >&6; }
21628 if ${gl_cv_func_dup2_works+:} false; then :
21629 $as_echo_n "(cached) " >&6
21630 else
21631 if test "$cross_compiling" = yes; then :
21632 case "$host_os" in
21633 mingw*) # on this platform, dup2 always returns 0 for success
21634 gl_cv_func_dup2_works="guessing no" ;;
21635 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
21636 gl_cv_func_dup2_works="guessing no" ;;
21637 aix* | freebsd*)
21638 # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
21639 # not EBADF.
21640 gl_cv_func_dup2_works="guessing no" ;;
21641 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
21642 gl_cv_func_dup2_works="guessing no" ;;
21643 *-android*) # implemented using dup3(), which fails if oldfd == newfd
21644 gl_cv_func_dup2_works="guessing no" ;;
21645 os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
21646 gl_cv_func_dup2_works="guessing no" ;;
21647 *) gl_cv_func_dup2_works="guessing yes" ;;
21648 esac
21649 else
21650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21651 /* end confdefs.h. */
21652
21653 #include <errno.h>
21654 #include <fcntl.h>
21655 #include <limits.h>
21656 #include <sys/resource.h>
21657 #include <unistd.h>
21658 #ifndef RLIM_SAVED_CUR
21659 # define RLIM_SAVED_CUR RLIM_INFINITY
21660 #endif
21661 #ifndef RLIM_SAVED_MAX
21662 # define RLIM_SAVED_MAX RLIM_INFINITY
21663 #endif
21664
21665 int
21666 main (void)
21667 {
21668 int result = 0;
21669 int bad_fd = INT_MAX;
21670 struct rlimit rlim;
21671 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
21672 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
21673 && rlim.rlim_cur != RLIM_INFINITY
21674 && rlim.rlim_cur != RLIM_SAVED_MAX
21675 && rlim.rlim_cur != RLIM_SAVED_CUR)
21676 bad_fd = rlim.rlim_cur;
21677 #ifdef FD_CLOEXEC
21678 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
21679 result |= 1;
21680 #endif
21681 if (dup2 (1, 1) != 1)
21682 result |= 2;
21683 #ifdef FD_CLOEXEC
21684 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
21685 result |= 4;
21686 #endif
21687 close (0);
21688 if (dup2 (0, 0) != -1)
21689 result |= 8;
21690 /* Many gnulib modules require POSIX conformance of EBADF. */
21691 if (dup2 (2, bad_fd) == -1 && errno != EBADF)
21692 result |= 16;
21693 /* Flush out some cygwin core dumps. */
21694 if (dup2 (2, -1) != -1 || errno != EBADF)
21695 result |= 32;
21696 dup2 (2, 255);
21697 dup2 (2, 256);
21698 /* On OS/2 kLIBC, dup2() does not work on a directory fd. */
21699 {
21700 int fd = open (".", O_RDONLY);
21701 if (fd == -1)
21702 result |= 64;
21703 else if (dup2 (fd, fd + 1) == -1)
21704 result |= 128;
21705
21706 close (fd);
21707 }
21708 return result;
21709 ;
21710 return 0;
21711 }
21712
21713 _ACEOF
21714 if ac_fn_c_try_run "$LINENO"; then :
21715 gl_cv_func_dup2_works=yes
21716 else
21717 gl_cv_func_dup2_works=no
21718 fi
21719 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21720 conftest.$ac_objext conftest.beam conftest.$ac_ext
21721 fi
21722
21723
21724 fi
21725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
21726 $as_echo "$gl_cv_func_dup2_works" >&6; }
21727 case "$gl_cv_func_dup2_works" in
21728 *yes) ;;
21729 *)
21730 REPLACE_DUP2=1
21731 for ac_func in setdtablesize
21732 do :
21733 ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
21734 if test "x$ac_cv_func_setdtablesize" = xyes; then :
21735 cat >>confdefs.h <<_ACEOF
21736 #define HAVE_SETDTABLESIZE 1
21737 _ACEOF
21738
21739 fi
21740 done
21741
21742 ;;
21743 esac
21744 fi
21745
21746
21747
21748
21749 if test $ac_cv_func_fchdir = no; then
21750 HAVE_FCHDIR=0
21751 fi
21752
21753 if test $HAVE_FCHDIR = 0; then
21754 if test $HAVE_DUP2 = 1; then
21755 REPLACE_DUP2=1
21756 fi
21757 fi
21758
21759
21760 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
21761
21762
21763
21764
21765
21766
21767
21768
21769 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
21770
21771
21772 fi
21773
21774
21775
21776
21777
21778 GNULIB_DUP2=1
21779
21780
21781
21782
21783
21784 $as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h
21785
21786
21787
21788
21789
21790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
21791 $as_echo_n "checking for error_at_line... " >&6; }
21792 if ${ac_cv_lib_error_at_line+:} false; then :
21793 $as_echo_n "(cached) " >&6
21794 else
21795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21796 /* end confdefs.h. */
21797 #include <error.h>
21798 int
21799 main (void)
21800 {
21801 error_at_line (0, 0, "", 0, "an error occurred");
21802 ;
21803 return 0;
21804 }
21805 _ACEOF
21806 if ac_fn_c_try_link "$LINENO"; then :
21807 ac_cv_lib_error_at_line=yes
21808 else
21809 ac_cv_lib_error_at_line=no
21810 fi
21811 rm -f core conftest.err conftest.$ac_objext \
21812 conftest$ac_exeext conftest.$ac_ext
21813 fi
21814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
21815 $as_echo "$ac_cv_lib_error_at_line" >&6; }
21816
21817 if test $ac_cv_lib_error_at_line = no; then
21818
21819
21820
21821
21822
21823
21824
21825
21826 gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
21827
21828
21829
21830 :
21831
21832 fi
21833
21834
21835 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format"
21836
21837
21838
21839 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format"
21840
21841
21842
21843
21844
21845
21846
21847 if test $ac_cv_have_decl_fchdir = no; then
21848 HAVE_DECL_FCHDIR=0
21849 fi
21850
21851
21852 if test $HAVE_FCHDIR = 0; then
21853
21854
21855
21856
21857
21858
21859
21860
21861 gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext"
21862
21863 :
21864
21865 $as_echo "#define REPLACE_FCHDIR 1" >>confdefs.h
21866
21867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5
21868 $as_echo_n "checking whether open can visit directories... " >&6; }
21869 if ${gl_cv_func_open_directory_works+:} false; then :
21870 $as_echo_n "(cached) " >&6
21871 else
21872 if test "$cross_compiling" = yes; then :
21873 case "$host_os" in
21874 # Guess yes on Linux systems.
21875 linux-* | linux) gl_cv_func_open_directory_works="guessing yes" ;;
21876 # Guess yes on glibc systems.
21877 *-gnu* | gnu*) gl_cv_func_open_directory_works="guessing yes" ;;
21878 # Guess no on native Windows.
21879 mingw*) gl_cv_func_open_directory_works="guessing no" ;;
21880 # If we don't know, assume the worst.
21881 *) gl_cv_func_open_directory_works="guessing no" ;;
21882 esac
21883
21884 else
21885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21886 /* end confdefs.h. */
21887 #include <fcntl.h>
21888
21889 int
21890 main (void)
21891 {
21892 return open(".", O_RDONLY) < 0;
21893 ;
21894 return 0;
21895 }
21896 _ACEOF
21897 if ac_fn_c_try_run "$LINENO"; then :
21898 gl_cv_func_open_directory_works=yes
21899 else
21900 gl_cv_func_open_directory_works=no
21901 fi
21902 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21903 conftest.$ac_objext conftest.beam conftest.$ac_ext
21904 fi
21905
21906 fi
21907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5
21908 $as_echo "$gl_cv_func_open_directory_works" >&6; }
21909 case "$gl_cv_func_open_directory_works" in
21910 *yes) ;;
21911 *)
21912
21913 $as_echo "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h
21914
21915 ;;
21916 esac
21917 fi
21918
21919
21920
21921
21922
21923
21924 GNULIB_FCHDIR=1
21925
21926
21927
21928
21929
21930 $as_echo "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h
21931
21932
21933
21934
21935
21936
21937
21938
21939 if test $ac_cv_func_fcntl = no; then
21940
21941
21942
21943 if test $ac_cv_func_fcntl = no; then
21944 HAVE_FCNTL=0
21945 else
21946 REPLACE_FCNTL=1
21947 fi
21948
21949 else
21950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
21951 $as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
21952 if ${gl_cv_func_fcntl_f_dupfd_works+:} false; then :
21953 $as_echo_n "(cached) " >&6
21954 else
21955 if test "$cross_compiling" = yes; then :
21956 case $host_os in
21957 aix* | cygwin* | haiku*)
21958 gl_cv_func_fcntl_f_dupfd_works="guessing no" ;;
21959 *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;;
21960 esac
21961 else
21962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21963 /* end confdefs.h. */
21964 #include <errno.h>
21965 #include <fcntl.h>
21966 #include <limits.h>
21967 #include <sys/resource.h>
21968 #include <unistd.h>
21969 #ifndef RLIM_SAVED_CUR
21970 # define RLIM_SAVED_CUR RLIM_INFINITY
21971 #endif
21972 #ifndef RLIM_SAVED_MAX
21973 # define RLIM_SAVED_MAX RLIM_INFINITY
21974 #endif
21975
21976 int
21977 main (void)
21978 {
21979 int result = 0;
21980 int bad_fd = INT_MAX;
21981 struct rlimit rlim;
21982 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
21983 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
21984 && rlim.rlim_cur != RLIM_INFINITY
21985 && rlim.rlim_cur != RLIM_SAVED_MAX
21986 && rlim.rlim_cur != RLIM_SAVED_CUR)
21987 bad_fd = rlim.rlim_cur;
21988 if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
21989 if (errno != EINVAL) result |= 2;
21990 if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
21991 if (errno != EINVAL) result |= 8;
21992 /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */
21993 {
21994 int fd;
21995 fd = open (".", O_RDONLY);
21996 if (fd == -1)
21997 result |= 16;
21998 else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1)
21999 result |= 32;
22000
22001 close (fd);
22002 }
22003 return result;
22004 ;
22005 return 0;
22006 }
22007 _ACEOF
22008 if ac_fn_c_try_run "$LINENO"; then :
22009 gl_cv_func_fcntl_f_dupfd_works=yes
22010 else
22011 gl_cv_func_fcntl_f_dupfd_works=no
22012 fi
22013 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22014 conftest.$ac_objext conftest.beam conftest.$ac_ext
22015 fi
22016
22017 fi
22018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
22019 $as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
22020 case $gl_cv_func_fcntl_f_dupfd_works in
22021 *yes) ;;
22022 *)
22023
22024
22025 if test $ac_cv_func_fcntl = no; then
22026 HAVE_FCNTL=0
22027 else
22028 REPLACE_FCNTL=1
22029 fi
22030
22031
22032 $as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
22033 ;;
22034 esac
22035
22036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
22037 $as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
22038 if ${gl_cv_func_fcntl_f_dupfd_cloexec+:} false; then :
22039 $as_echo_n "(cached) " >&6
22040 else
22041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22042 /* end confdefs.h. */
22043
22044 #include <fcntl.h>
22045 #ifndef F_DUPFD_CLOEXEC
22046 choke me
22047 #endif
22048
22049 int
22050 main (void)
22051 {
22052
22053 ;
22054 return 0;
22055 }
22056 _ACEOF
22057 if ac_fn_c_try_compile "$LINENO"; then :
22058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22059 /* end confdefs.h. */
22060
22061 #ifdef __linux__
22062 /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
22063 it to support the semantics on older kernels that failed with EINVAL. */
22064 choke me
22065 #endif
22066
22067 int
22068 main (void)
22069 {
22070
22071 ;
22072 return 0;
22073 }
22074 _ACEOF
22075 if ac_fn_c_try_compile "$LINENO"; then :
22076 gl_cv_func_fcntl_f_dupfd_cloexec=yes
22077 else
22078 gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
22079 fi
22080 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22081 else
22082 gl_cv_func_fcntl_f_dupfd_cloexec=no
22083 fi
22084 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22085 fi
22086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
22087 $as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
22088 if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
22089
22090
22091
22092 if test $ac_cv_func_fcntl = no; then
22093 HAVE_FCNTL=0
22094 else
22095 REPLACE_FCNTL=1
22096 fi
22097
22098 fi
22099 fi
22100
22101
22102
22103
22104 if test $ac_cv_func_fchdir = no; then
22105 HAVE_FCHDIR=0
22106 fi
22107
22108 if test $HAVE_FCHDIR = 0; then
22109
22110
22111
22112 if test $ac_cv_func_fcntl = no; then
22113 HAVE_FCNTL=0
22114 else
22115 REPLACE_FCNTL=1
22116 fi
22117
22118 fi
22119
22120
22121 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
22122
22123
22124
22125
22126
22127
22128
22129
22130 gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
22131
22132 fi
22133
22134
22135
22136
22137
22138 GNULIB_FCNTL=1
22139
22140
22141
22142
22143
22144 $as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
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_fcntl_h='<'fcntl.h'>'
22161 else
22162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
22163 $as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
22164 if ${gl_cv_next_fcntl_h+:} false; then :
22165 $as_echo_n "(cached) " >&6
22166 else
22167
22168
22169
22170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22171 /* end confdefs.h. */
22172 #include <fcntl.h>
22173 _ACEOF
22174 case "$host_os" in
22175 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22176 *) gl_absname_cpp="$ac_cpp" ;;
22177 esac
22178
22179 case "$host_os" in
22180 mingw*)
22181 gl_dirsep_regex='[/\\]'
22182 ;;
22183 *)
22184 gl_dirsep_regex='\/'
22185 ;;
22186 esac
22187 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22188 gl_header_literal_regex=`echo 'fcntl.h' \
22189 | sed -e "$gl_make_literal_regex_sed"`
22190 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22191 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22192 s|^/[^/]|//&|
22193 p
22194 q
22195 }'
22196
22197 gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22198 sed -n "$gl_absolute_header_sed"`
22199
22200 gl_header=$gl_cv_absolute_fcntl_h
22201 gl_cv_next_fcntl_h='"'$gl_header'"'
22202
22203
22204 fi
22205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
22206 $as_echo "$gl_cv_next_fcntl_h" >&6; }
22207 fi
22208 NEXT_FCNTL_H=$gl_cv_next_fcntl_h
22209
22210 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22211 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22212 gl_next_as_first_directive='<'fcntl.h'>'
22213 else
22214 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22215 gl_next_as_first_directive=$gl_cv_next_fcntl_h
22216 fi
22217 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
22218
22219
22220
22221
22222
22223
22224
22225
22226
22227
22228
22229
22230
22231
22232
22233 cat >>confdefs.h <<_ACEOF
22234 #define GNULIB_FD_SAFER_FLAG 1
22235 _ACEOF
22236
22237
22238
22239
22240
22241
22242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
22243 $as_echo_n "checking for flexible array member... " >&6; }
22244 if ${ac_cv_c_flexmember+:} false; then :
22245 $as_echo_n "(cached) " >&6
22246 else
22247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22248 /* end confdefs.h. */
22249 #include <stdlib.h>
22250 #include <stdio.h>
22251 #include <stddef.h>
22252 struct m { struct m *next, **list; char name[]; };
22253 struct s { struct s *p; struct m *m; int n; double d[]; };
22254 int
22255 main (void)
22256 {
22257 int m = getchar ();
22258 size_t nbytes = offsetof (struct s, d) + m * sizeof (double);
22259 nbytes += sizeof (struct s) - 1;
22260 nbytes -= nbytes % sizeof (struct s);
22261 struct s *p = malloc (nbytes);
22262 p->p = p;
22263 p->m = NULL;
22264 p->d[0] = 0.0;
22265 return p->d != (double *) NULL;
22266 ;
22267 return 0;
22268 }
22269 _ACEOF
22270 if ac_fn_c_try_compile "$LINENO"; then :
22271 ac_cv_c_flexmember=yes
22272 else
22273 ac_cv_c_flexmember=no
22274 fi
22275 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22276 fi
22277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
22278 $as_echo "$ac_cv_c_flexmember" >&6; }
22279 if test $ac_cv_c_flexmember = yes; then
22280
22281 $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
22282
22283 else
22284 $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
22285
22286 fi
22287
22288
22289
22290
22291 FLOAT_H=
22292 REPLACE_FLOAT_LDBL=0
22293 case "$host_os" in
22294 aix* | beos* | openbsd* | mirbsd* | irix*)
22295 FLOAT_H=float.h
22296 ;;
22297 freebsd* | dragonfly*)
22298 case "$host_cpu" in
22299 i[34567]86 )
22300 FLOAT_H=float.h
22301 ;;
22302 x86_64 )
22303 # On x86_64 systems, the C compiler may still be generating
22304 # 32-bit code.
22305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22306 /* end confdefs.h. */
22307 #if defined __LP64__ || defined __x86_64__ || defined __amd64__
22308 int ok;
22309 #else
22310 error fail
22311 #endif
22312
22313 _ACEOF
22314 if ac_fn_c_try_compile "$LINENO"; then :
22315
22316 else
22317 FLOAT_H=float.h
22318 fi
22319 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22320 ;;
22321 esac
22322 ;;
22323 linux*)
22324 case "$host_cpu" in
22325 powerpc*)
22326 FLOAT_H=float.h
22327 ;;
22328 esac
22329 ;;
22330 esac
22331 case "$host_os" in
22332 aix* | freebsd* | dragonfly* | linux*)
22333 if test -n "$FLOAT_H"; then
22334 REPLACE_FLOAT_LDBL=1
22335 fi
22336 ;;
22337 esac
22338
22339 REPLACE_ITOLD=0
22340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
22341 $as_echo_n "checking whether conversion from 'int' to 'long double' works... " >&6; }
22342 if ${gl_cv_func_itold_works+:} false; then :
22343 $as_echo_n "(cached) " >&6
22344 else
22345
22346 if test "$cross_compiling" = yes; then :
22347 case "$host" in
22348 sparc*-*-linux*)
22349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22350 /* end confdefs.h. */
22351 #if defined __LP64__ || defined __arch64__
22352 int ok;
22353 #else
22354 error fail
22355 #endif
22356
22357 _ACEOF
22358 if ac_fn_c_try_compile "$LINENO"; then :
22359 gl_cv_func_itold_works="guessing no"
22360 else
22361 gl_cv_func_itold_works="guessing yes"
22362 fi
22363 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22364 ;;
22365 # Guess yes on native Windows.
22366 mingw*) gl_cv_func_itold_works="guessing yes" ;;
22367 *) gl_cv_func_itold_works="guessing yes" ;;
22368 esac
22369
22370 else
22371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22372 /* end confdefs.h. */
22373
22374 int i = -1;
22375 volatile long double ld;
22376 int main ()
22377 {
22378 ld += i * 1.0L;
22379 if (ld > 0)
22380 return 1;
22381 return 0;
22382 }
22383 _ACEOF
22384 if ac_fn_c_try_run "$LINENO"; then :
22385 gl_cv_func_itold_works=yes
22386 else
22387 gl_cv_func_itold_works=no
22388 fi
22389 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22390 conftest.$ac_objext conftest.beam conftest.$ac_ext
22391 fi
22392
22393
22394 fi
22395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
22396 $as_echo "$gl_cv_func_itold_works" >&6; }
22397 case "$gl_cv_func_itold_works" in
22398 *no)
22399 REPLACE_ITOLD=1
22400 FLOAT_H=float.h
22401 ;;
22402 esac
22403
22404 if test -n "$FLOAT_H"; then
22405
22406
22407
22408
22409
22410
22411
22412
22413 if test $gl_cv_have_include_next = yes; then
22414 gl_cv_next_float_h='<'float.h'>'
22415 else
22416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
22417 $as_echo_n "checking absolute name of <float.h>... " >&6; }
22418 if ${gl_cv_next_float_h+:} false; then :
22419 $as_echo_n "(cached) " >&6
22420 else
22421
22422
22423
22424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22425 /* end confdefs.h. */
22426 #include <float.h>
22427 _ACEOF
22428 case "$host_os" in
22429 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22430 *) gl_absname_cpp="$ac_cpp" ;;
22431 esac
22432
22433 case "$host_os" in
22434 mingw*)
22435 gl_dirsep_regex='[/\\]'
22436 ;;
22437 *)
22438 gl_dirsep_regex='\/'
22439 ;;
22440 esac
22441 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22442 gl_header_literal_regex=`echo 'float.h' \
22443 | sed -e "$gl_make_literal_regex_sed"`
22444 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22445 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22446 s|^/[^/]|//&|
22447 p
22448 q
22449 }'
22450
22451 gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22452 sed -n "$gl_absolute_header_sed"`
22453
22454 gl_header=$gl_cv_absolute_float_h
22455 gl_cv_next_float_h='"'$gl_header'"'
22456
22457
22458 fi
22459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
22460 $as_echo "$gl_cv_next_float_h" >&6; }
22461 fi
22462 NEXT_FLOAT_H=$gl_cv_next_float_h
22463
22464 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22465 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22466 gl_next_as_first_directive='<'float.h'>'
22467 else
22468 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22469 gl_next_as_first_directive=$gl_cv_next_float_h
22470 fi
22471 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
22472
22473
22474
22475
22476 fi
22477
22478 if test -n "$FLOAT_H"; then
22479 GL_GENERATE_FLOAT_H_TRUE=
22480 GL_GENERATE_FLOAT_H_FALSE='#'
22481 else
22482 GL_GENERATE_FLOAT_H_TRUE='#'
22483 GL_GENERATE_FLOAT_H_FALSE=
22484 fi
22485
22486
22487
22488 if test $REPLACE_FLOAT_LDBL = 1; then
22489
22490
22491
22492
22493
22494
22495
22496
22497 gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
22498
22499 fi
22500 if test $REPLACE_ITOLD = 1; then
22501
22502
22503
22504
22505
22506
22507
22508
22509 gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
22510
22511 fi
22512
22513
22514
22515
22516 gl_fnmatch_required_lowercase=`
22517 echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]'
22518 `
22519
22520 if test $ac_cv_func_fnmatch = no; then
22521 HAVE_FNMATCH=0
22522 else
22523 gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}"
22524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5
22525 $as_echo_n "checking for working $gl_fnmatch_required fnmatch... " >&6; }
22526 if eval \${$gl_fnmatch_cache_var+:} false; then :
22527 $as_echo_n "(cached) " >&6
22528 else
22529 if test $gl_fnmatch_required = GNU; then
22530 gl_fnmatch_gnu_start=
22531 gl_fnmatch_gnu_end=
22532 else
22533 gl_fnmatch_gnu_start='#if 0'
22534 gl_fnmatch_gnu_end='#endif'
22535 fi
22536 if test "$cross_compiling" = yes; then :
22537 eval "$gl_fnmatch_cache_var=\"guessing no\""
22538 else
22539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22540 /* end confdefs.h. */
22541 #include <fnmatch.h>
22542 static int
22543 y (char const *pattern, char const *string, int flags)
22544 {
22545 return fnmatch (pattern, string, flags) == 0;
22546 }
22547 static int
22548 n (char const *pattern, char const *string, int flags)
22549 {
22550 return fnmatch (pattern, string, flags) == FNM_NOMATCH;
22551 }
22552
22553 int
22554 main (void)
22555 {
22556 char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]";
22557 char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]";
22558 static char const A_1[] = { 'A' - 1, 0 };
22559 static char const A01[] = { 'A' + 1, 0 };
22560 static char const a_1[] = { 'a' - 1, 0 };
22561 static char const a01[] = { 'a' + 1, 0 };
22562 static char const bs_1[] = { '\\\\' - 1, 0 };
22563 static char const bs01[] = { '\\\\' + 1, 0 };
22564 int result = 0;
22565 if (!n ("a*", "", 0))
22566 return 1;
22567 if (!y ("a*", "abc", 0))
22568 return 1;
22569 if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */
22570 return 1;
22571 if (!n ("d*/*1", "d/s/1", FNM_PATHNAME))
22572 return 2;
22573 if (!y ("a\\\\bc", "abc", 0))
22574 return 3;
22575 if (!n ("a\\\\bc", "abc", FNM_NOESCAPE))
22576 return 3;
22577 if (!y ("*x", ".x", 0))
22578 return 4;
22579 if (!n ("*x", ".x", FNM_PERIOD))
22580 return 4;
22581 if (!y (Apat, "\\\\", 0))
22582 return 5;
22583 if (!y (Apat, "A", 0))
22584 return 5;
22585 if (!y (apat, "\\\\", 0))
22586 return 5;
22587 if (!y (apat, "a", 0))
22588 return 5;
22589 if (!(n (Apat, A_1, 0) == ('A' < '\\\\')))
22590 return 5;
22591 if (!(n (apat, a_1, 0) == ('a' < '\\\\')))
22592 return 5;
22593 if (!(y (Apat, A01, 0) == ('A' < '\\\\')))
22594 return 5;
22595 if (!(y (apat, a01, 0) == ('a' < '\\\\')))
22596 return 5;
22597 if (!(y (Apat, bs_1, 0) == ('A' < '\\\\')))
22598 return 5;
22599 if (!(y (apat, bs_1, 0) == ('a' < '\\\\')))
22600 return 5;
22601 if (!(n (Apat, bs01, 0) == ('A' < '\\\\')))
22602 return 5;
22603 if (!(n (apat, bs01, 0) == ('a' < '\\\\')))
22604 return 5;
22605 $gl_fnmatch_gnu_start
22606 if (!y ("xxXX", "xXxX", FNM_CASEFOLD))
22607 result |= 8;
22608 if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH))
22609 result |= 16;
22610 if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME))
22611 result |= 32;
22612 if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR))
22613 result |= 64;
22614 if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR))
22615 result |= 64;
22616 if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR))
22617 result |= 64;
22618 $gl_fnmatch_gnu_end
22619 return result;
22620
22621 ;
22622 return 0;
22623 }
22624 _ACEOF
22625 if ac_fn_c_try_run "$LINENO"; then :
22626 eval "$gl_fnmatch_cache_var=yes"
22627 else
22628 eval "$gl_fnmatch_cache_var=no"
22629 fi
22630 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22631 conftest.$ac_objext conftest.beam conftest.$ac_ext
22632 fi
22633
22634
22635 fi
22636 eval ac_res=\$$gl_fnmatch_cache_var
22637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
22638 $as_echo "$ac_res" >&6; }
22639 eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\""
22640 if test "$gl_fnmatch_result" != yes; then
22641 REPLACE_FNMATCH=1
22642 fi
22643 fi
22644 if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
22645
22646
22647 FNMATCH_H='fnmatch.h'
22648 if test -n "$FNMATCH_H"; then
22649 GL_GENERATE_FNMATCH_H_TRUE=
22650 GL_GENERATE_FNMATCH_H_FALSE='#'
22651 else
22652 GL_GENERATE_FNMATCH_H_TRUE='#'
22653 GL_GENERATE_FNMATCH_H_FALSE=
22654 fi
22655
22656
22657 fi
22658
22659 if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
22660
22661
22662
22663
22664
22665
22666
22667
22668 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
22669
22670
22671
22672 ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
22673 "
22674 if test "x$ac_cv_have_decl_isblank" = xyes; then :
22675 ac_have_decl=1
22676 else
22677 ac_have_decl=0
22678 fi
22679
22680 cat >>confdefs.h <<_ACEOF
22681 #define HAVE_DECL_ISBLANK $ac_have_decl
22682 _ACEOF
22683
22684
22685
22686
22687 fi
22688
22689
22690
22691
22692
22693 GNULIB_FNMATCH=1
22694
22695
22696
22697
22698
22699 $as_echo "#define GNULIB_TEST_FNMATCH 1" >>confdefs.h
22700
22701
22702
22703
22704
22705
22706
22707
22708 case "$host_os" in
22709 mingw* | solaris*)
22710 REPLACE_FSTAT=1
22711 ;;
22712 esac
22713
22714
22715
22716
22717
22718 if test $ac_cv_func_fchdir = no; then
22719 HAVE_FCHDIR=0
22720 fi
22721
22722 if test $HAVE_FCHDIR = 0; then
22723 case "$gl_cv_func_open_directory_works" in
22724 *yes) ;;
22725 *)
22726 REPLACE_FSTAT=1
22727 ;;
22728 esac
22729 fi
22730
22731
22732 if test $REPLACE_FSTAT = 1; then
22733
22734
22735
22736
22737
22738
22739
22740
22741 gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
22742
22743 case "$host_os" in
22744 mingw*)
22745
22746
22747
22748
22749
22750
22751
22752
22753 gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
22754
22755 ;;
22756 esac
22757
22758
22759 :
22760
22761 fi
22762
22763
22764
22765
22766
22767 GNULIB_FSTAT=1
22768
22769
22770
22771
22772
22773 $as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
22774
22775
22776
22777
22778
22779
22780
22781
22782 case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
22783 *yes,yes) ;;
22784 *)
22785 REPLACE_GETCWD=1
22786 ;;
22787 esac
22788
22789 if test $REPLACE_GETCWD = 1; then
22790
22791
22792
22793
22794
22795
22796
22797
22798 gl_LIBOBJS="$gl_LIBOBJS getcwd-lgpl.$ac_objext"
22799
22800 fi
22801
22802
22803
22804
22805
22806 GNULIB_GETCWD=1
22807
22808
22809
22810
22811
22812 $as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
22813
22814
22815
22816
22817
22818
22819
22820
22821
22822
22823
22824 if test $ac_cv_func_getdelim = yes; then
22825 HAVE_GETDELIM=1
22826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getdelim function" >&5
22827 $as_echo_n "checking for working getdelim function... " >&6; }
22828 if ${gl_cv_func_working_getdelim+:} false; then :
22829 $as_echo_n "(cached) " >&6
22830 else
22831 echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
22832 if test "$cross_compiling" = yes; then :
22833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22834 /* end confdefs.h. */
22835
22836 #include <features.h>
22837 #ifdef __GNU_LIBRARY__
22838 #if (__GLIBC__ >= 2) && !defined __UCLIBC__
22839 Lucky GNU user
22840 #endif
22841 #endif
22842
22843 _ACEOF
22844 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22845 $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
22846 gl_cv_func_working_getdelim="guessing yes"
22847 else
22848 gl_cv_func_working_getdelim="guessing no"
22849 fi
22850 rm -f conftest*
22851
22852
22853 else
22854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22855 /* end confdefs.h. */
22856
22857 # include <stdio.h>
22858 # include <stdlib.h>
22859 # include <string.h>
22860 int main ()
22861 {
22862 FILE *in = fopen ("./conftest.data", "r");
22863 if (!in)
22864 return 1;
22865 {
22866 /* Test result for a NULL buffer and a zero size.
22867 Based on a test program from Karl Heuer. */
22868 char *line = NULL;
22869 size_t siz = 0;
22870 int len = getdelim (&line, &siz, '\n', in);
22871 if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
22872 { free (line); fclose (in); return 2; }
22873 }
22874 {
22875 /* Test result for a NULL buffer and a non-zero size.
22876 This crashes on FreeBSD 8.0. */
22877 char *line = NULL;
22878 size_t siz = (size_t)(~0) / 4;
22879 if (getdelim (&line, &siz, '\n', in) == -1)
22880 { fclose (in); return 3; }
22881 free (line);
22882 }
22883 fclose (in);
22884 return 0;
22885 }
22886
22887 _ACEOF
22888 if ac_fn_c_try_run "$LINENO"; then :
22889 gl_cv_func_working_getdelim=yes
22890 else
22891 gl_cv_func_working_getdelim=no
22892 fi
22893 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22894 conftest.$ac_objext conftest.beam conftest.$ac_ext
22895 fi
22896
22897 fi
22898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_getdelim" >&5
22899 $as_echo "$gl_cv_func_working_getdelim" >&6; }
22900 case "$gl_cv_func_working_getdelim" in
22901 *no)
22902 REPLACE_GETDELIM=1
22903 ;;
22904 esac
22905 else
22906 HAVE_GETDELIM=0
22907 fi
22908
22909 if test $ac_cv_have_decl_getdelim = no; then
22910 HAVE_DECL_GETDELIM=0
22911 fi
22912
22913 if test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1; then
22914
22915
22916
22917
22918
22919
22920
22921
22922 gl_LIBOBJS="$gl_LIBOBJS getdelim.$ac_objext"
22923
22924
22925 for ac_func in flockfile funlockfile
22926 do :
22927 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
22928 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
22929 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
22930 cat >>confdefs.h <<_ACEOF
22931 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
22932 _ACEOF
22933
22934 fi
22935 done
22936
22937 ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
22938 if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
22939 ac_have_decl=1
22940 else
22941 ac_have_decl=0
22942 fi
22943
22944 cat >>confdefs.h <<_ACEOF
22945 #define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
22946 _ACEOF
22947
22948
22949 fi
22950
22951
22952
22953
22954
22955 GNULIB_GETDELIM=1
22956
22957
22958
22959
22960
22961 $as_echo "#define GNULIB_TEST_GETDELIM 1" >>confdefs.h
22962
22963
22964
22965
22966
22967
22968
22969
22970 if test $ac_cv_func_getdtablesize = yes &&
22971 test $ac_cv_have_decl_getdtablesize = yes; then
22972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
22973 $as_echo_n "checking whether getdtablesize works... " >&6; }
22974 if ${gl_cv_func_getdtablesize_works+:} false; then :
22975 $as_echo_n "(cached) " >&6
22976 else
22977 case "$host_os" in
22978 vms*) gl_cv_func_getdtablesize_works="no (limitation)" ;;
22979 *)
22980 if test "$cross_compiling" = yes; then :
22981 case "$host_os" in
22982 cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
22983 gl_cv_func_getdtablesize_works="guessing no" ;;
22984 *) gl_cv_func_getdtablesize_works="guessing yes" ;;
22985 esac
22986
22987 else
22988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22989 /* end confdefs.h. */
22990
22991 #include <unistd.h>
22992 int
22993 main (void)
22994 {
22995 int size = getdtablesize();
22996 if (dup2 (0, getdtablesize()) != -1)
22997 return 1;
22998 if (size != getdtablesize())
22999 return 2;
23000
23001 ;
23002 return 0;
23003 }
23004 _ACEOF
23005 if ac_fn_c_try_run "$LINENO"; then :
23006 gl_cv_func_getdtablesize_works=yes
23007 else
23008 gl_cv_func_getdtablesize_works=no
23009 fi
23010 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23011 conftest.$ac_objext conftest.beam conftest.$ac_ext
23012 fi
23013
23014 ;;
23015 esac
23016
23017 fi
23018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
23019 $as_echo "$gl_cv_func_getdtablesize_works" >&6; }
23020 case "$gl_cv_func_getdtablesize_works" in
23021 *yes | "no (limitation)") ;;
23022 *) REPLACE_GETDTABLESIZE=1 ;;
23023 esac
23024 else
23025 HAVE_GETDTABLESIZE=0
23026 fi
23027
23028 if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
23029
23030
23031
23032
23033
23034
23035
23036
23037 gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
23038
23039 :
23040 fi
23041
23042
23043
23044
23045
23046 GNULIB_GETDTABLESIZE=1
23047
23048
23049
23050
23051
23052 $as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
23053
23054
23055
23056
23057
23058
23059
23060
23061
23062
23063 gl_getline_needs_run_time_check=no
23064 ac_fn_c_check_func "$LINENO" "getline" "ac_cv_func_getline"
23065 if test "x$ac_cv_func_getline" = xyes; then :
23066 gl_getline_needs_run_time_check=yes
23067 else
23068 am_cv_func_working_getline=no
23069 fi
23070
23071 if test $gl_getline_needs_run_time_check = yes; then
23072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getline function" >&5
23073 $as_echo_n "checking for working getline function... " >&6; }
23074 if ${am_cv_func_working_getline+:} false; then :
23075 $as_echo_n "(cached) " >&6
23076 else
23077 echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
23078 if test "$cross_compiling" = yes; then :
23079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23080 /* end confdefs.h. */
23081
23082 #include <features.h>
23083 #ifdef __GNU_LIBRARY__
23084 #if (__GLIBC__ >= 2) && !defined __UCLIBC__
23085 Lucky GNU user
23086 #endif
23087 #endif
23088
23089 _ACEOF
23090 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23091 $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
23092 am_cv_func_working_getline="guessing yes"
23093 else
23094 am_cv_func_working_getline="guessing no"
23095 fi
23096 rm -f conftest*
23097
23098
23099 else
23100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23101 /* end confdefs.h. */
23102
23103 # include <stdio.h>
23104 # include <stdlib.h>
23105 # include <string.h>
23106 int main ()
23107 {
23108 FILE *in = fopen ("./conftest.data", "r");
23109 if (!in)
23110 return 1;
23111 {
23112 /* Test result for a NULL buffer and a zero size.
23113 Based on a test program from Karl Heuer. */
23114 char *line = NULL;
23115 size_t siz = 0;
23116 int len = getline (&line, &siz, in);
23117 if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
23118 { free (line); fclose (in); return 2; }
23119 free (line);
23120 }
23121 {
23122 /* Test result for a NULL buffer and a non-zero size.
23123 This crashes on FreeBSD 8.0. */
23124 char *line = NULL;
23125 size_t siz = (size_t)(~0) / 4;
23126 if (getline (&line, &siz, in) == -1)
23127 { fclose (in); return 3; }
23128 free (line);
23129 }
23130 fclose (in);
23131 return 0;
23132 }
23133
23134 _ACEOF
23135 if ac_fn_c_try_run "$LINENO"; then :
23136 am_cv_func_working_getline=yes
23137 else
23138 am_cv_func_working_getline=no
23139 fi
23140 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23141 conftest.$ac_objext conftest.beam conftest.$ac_ext
23142 fi
23143
23144 fi
23145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_working_getline" >&5
23146 $as_echo "$am_cv_func_working_getline" >&6; }
23147 fi
23148
23149 if test $ac_cv_have_decl_getline = no; then
23150 HAVE_DECL_GETLINE=0
23151 fi
23152
23153 case "$am_cv_func_working_getline" in
23154 *no)
23155 REPLACE_GETLINE=1
23156 ;;
23157 esac
23158
23159 if test $REPLACE_GETLINE = 1; then
23160
23161
23162
23163
23164
23165
23166
23167
23168 gl_LIBOBJS="$gl_LIBOBJS getline.$ac_objext"
23169
23170
23171 :
23172
23173 fi
23174
23175
23176
23177
23178
23179 GNULIB_GETLINE=1
23180
23181
23182
23183
23184
23185 $as_echo "#define GNULIB_TEST_GETLINE 1" >>confdefs.h
23186
23187
23188
23189
23190
23191
23192
23193
23194
23195
23196
23197
23198 REPLACE_GETOPT=1
23199
23200 if test $REPLACE_GETOPT = 1; then
23201
23202
23203 if test $ac_cv_header_sys_cdefs_h = yes; then
23204 HAVE_SYS_CDEFS_H=1
23205 else
23206 HAVE_SYS_CDEFS_H=0
23207 fi
23208
23209
23210
23211 $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
23212
23213 GETOPT_H=getopt.h
23214 GETOPT_CDEFS_H=getopt-cdefs.h
23215
23216
23217
23218 fi
23219
23220 if test $REPLACE_GETOPT = 1; then
23221
23222
23223
23224
23225
23226
23227
23228
23229 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
23230
23231
23232
23233
23234
23235
23236
23237
23238
23239 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
23240
23241 GNULIB_GL_UNISTD_H_GETOPT=1
23242 fi
23243
23244
23245
23246
23247 ac_found=0
23248 ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
23249 "
23250 if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
23251 ac_have_decl=1
23252 else
23253 ac_have_decl=0
23254 fi
23255
23256 cat >>confdefs.h <<_ACEOF
23257 #define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
23258 _ACEOF
23259 if test $ac_have_decl = 1; then :
23260 ac_found=1
23261 fi
23262
23263 ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
23264 "
23265 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
23266 ac_have_decl=1
23267 else
23268 ac_have_decl=0
23269 fi
23270
23271 cat >>confdefs.h <<_ACEOF
23272 #define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
23273 _ACEOF
23274 if test $ac_have_decl = 1; then :
23275 ac_found=1
23276 fi
23277
23278 ac_fn_c_check_decl "$LINENO" "__argv" "ac_cv_have_decl___argv" "#include <stdlib.h>
23279 "
23280 if test "x$ac_cv_have_decl___argv" = xyes; then :
23281 ac_have_decl=1
23282 else
23283 ac_have_decl=0
23284 fi
23285
23286 cat >>confdefs.h <<_ACEOF
23287 #define HAVE_DECL___ARGV $ac_have_decl
23288 _ACEOF
23289 if test $ac_have_decl = 1; then :
23290 ac_found=1
23291 fi
23292
23293
23294 # Incur the cost of this test only if none of the above worked.
23295 if test $ac_found = 0; then
23296 # On OpenBSD 5.1, using the global __progname variable appears to be
23297 # the only way to implement getprogname.
23298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __progname is defined in default libraries" >&5
23299 $as_echo_n "checking whether __progname is defined in default libraries... " >&6; }
23300 if ${gl_cv_var___progname+:} false; then :
23301 $as_echo_n "(cached) " >&6
23302 else
23303
23304 gl_cv_var___progname=
23305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23306 /* end confdefs.h. */
23307 extern char *__progname;
23308 int
23309 main (void)
23310 {
23311 return *__progname;
23312
23313 ;
23314 return 0;
23315 }
23316 _ACEOF
23317 if ac_fn_c_try_link "$LINENO"; then :
23318 gl_cv_var___progname=yes
23319
23320 fi
23321 rm -f core conftest.err conftest.$ac_objext \
23322 conftest$ac_exeext conftest.$ac_ext
23323
23324
23325 fi
23326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var___progname" >&5
23327 $as_echo "$gl_cv_var___progname" >&6; }
23328 if test "$gl_cv_var___progname" = yes; then
23329
23330 $as_echo "#define HAVE_VAR___PROGNAME 1" >>confdefs.h
23331
23332 fi
23333 fi
23334
23335
23336
23337
23338
23339
23340
23341
23342
23343
23344
23345
23346
23347
23348
23349
23350
23351 if test $gl_cv_have_include_next = yes; then
23352 gl_cv_next_langinfo_h='<'langinfo.h'>'
23353 else
23354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <langinfo.h>" >&5
23355 $as_echo_n "checking absolute name of <langinfo.h>... " >&6; }
23356 if ${gl_cv_next_langinfo_h+:} false; then :
23357 $as_echo_n "(cached) " >&6
23358 else
23359
23360 if test $ac_cv_header_langinfo_h = yes; then
23361
23362
23363
23364
23365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23366 /* end confdefs.h. */
23367 #include <langinfo.h>
23368 _ACEOF
23369 case "$host_os" in
23370 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23371 *) gl_absname_cpp="$ac_cpp" ;;
23372 esac
23373
23374 case "$host_os" in
23375 mingw*)
23376 gl_dirsep_regex='[/\\]'
23377 ;;
23378 *)
23379 gl_dirsep_regex='\/'
23380 ;;
23381 esac
23382 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23383 gl_header_literal_regex=`echo 'langinfo.h' \
23384 | sed -e "$gl_make_literal_regex_sed"`
23385 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23386 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23387 s|^/[^/]|//&|
23388 p
23389 q
23390 }'
23391
23392 gl_cv_absolute_langinfo_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23393 sed -n "$gl_absolute_header_sed"`
23394
23395 gl_header=$gl_cv_absolute_langinfo_h
23396 gl_cv_next_langinfo_h='"'$gl_header'"'
23397 else
23398 gl_cv_next_langinfo_h='<'langinfo.h'>'
23399 fi
23400
23401
23402 fi
23403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_langinfo_h" >&5
23404 $as_echo "$gl_cv_next_langinfo_h" >&6; }
23405 fi
23406 NEXT_LANGINFO_H=$gl_cv_next_langinfo_h
23407
23408 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23409 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23410 gl_next_as_first_directive='<'langinfo.h'>'
23411 else
23412 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23413 gl_next_as_first_directive=$gl_cv_next_langinfo_h
23414 fi
23415 NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H=$gl_next_as_first_directive
23416
23417
23418
23419
23420
23421 HAVE_LANGINFO_CODESET=0
23422 HAVE_LANGINFO_T_FMT_AMPM=0
23423 HAVE_LANGINFO_ALTMON=0
23424 HAVE_LANGINFO_ERA=0
23425 HAVE_LANGINFO_YESEXPR=0
23426
23427 if test $ac_cv_header_langinfo_h = yes; then
23428 HAVE_LANGINFO_H=1
23429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines CODESET" >&5
23430 $as_echo_n "checking whether langinfo.h defines CODESET... " >&6; }
23431 if ${gl_cv_header_langinfo_codeset+:} false; then :
23432 $as_echo_n "(cached) " >&6
23433 else
23434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23435 /* end confdefs.h. */
23436 #include <langinfo.h>
23437 int a = CODESET;
23438
23439 int
23440 main (void)
23441 {
23442
23443 ;
23444 return 0;
23445 }
23446 _ACEOF
23447 if ac_fn_c_try_compile "$LINENO"; then :
23448 gl_cv_header_langinfo_codeset=yes
23449 else
23450 gl_cv_header_langinfo_codeset=no
23451 fi
23452 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23453
23454 fi
23455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_codeset" >&5
23456 $as_echo "$gl_cv_header_langinfo_codeset" >&6; }
23457 if test $gl_cv_header_langinfo_codeset = yes; then
23458 HAVE_LANGINFO_CODESET=1
23459 fi
23460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines T_FMT_AMPM" >&5
23461 $as_echo_n "checking whether langinfo.h defines T_FMT_AMPM... " >&6; }
23462 if ${gl_cv_header_langinfo_t_fmt_ampm+:} false; then :
23463 $as_echo_n "(cached) " >&6
23464 else
23465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23466 /* end confdefs.h. */
23467 #include <langinfo.h>
23468 int a = T_FMT_AMPM;
23469
23470 int
23471 main (void)
23472 {
23473
23474 ;
23475 return 0;
23476 }
23477 _ACEOF
23478 if ac_fn_c_try_compile "$LINENO"; then :
23479 gl_cv_header_langinfo_t_fmt_ampm=yes
23480 else
23481 gl_cv_header_langinfo_t_fmt_ampm=no
23482 fi
23483 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23484
23485 fi
23486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_t_fmt_ampm" >&5
23487 $as_echo "$gl_cv_header_langinfo_t_fmt_ampm" >&6; }
23488 if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then
23489 HAVE_LANGINFO_T_FMT_AMPM=1
23490 fi
23491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ALTMON_1" >&5
23492 $as_echo_n "checking whether langinfo.h defines ALTMON_1... " >&6; }
23493 if ${gl_cv_header_langinfo_altmon+:} false; then :
23494 $as_echo_n "(cached) " >&6
23495 else
23496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23497 /* end confdefs.h. */
23498 #include <langinfo.h>
23499 int a = ALTMON_1;
23500
23501 int
23502 main (void)
23503 {
23504
23505 ;
23506 return 0;
23507 }
23508 _ACEOF
23509 if ac_fn_c_try_compile "$LINENO"; then :
23510 gl_cv_header_langinfo_altmon=yes
23511 else
23512 gl_cv_header_langinfo_altmon=no
23513 fi
23514 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23515
23516 fi
23517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_altmon" >&5
23518 $as_echo "$gl_cv_header_langinfo_altmon" >&6; }
23519 if test $gl_cv_header_langinfo_altmon = yes; then
23520 HAVE_LANGINFO_ALTMON=1
23521 fi
23522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ERA" >&5
23523 $as_echo_n "checking whether langinfo.h defines ERA... " >&6; }
23524 if ${gl_cv_header_langinfo_era+:} false; then :
23525 $as_echo_n "(cached) " >&6
23526 else
23527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23528 /* end confdefs.h. */
23529 #include <langinfo.h>
23530 int a = ERA;
23531
23532 int
23533 main (void)
23534 {
23535
23536 ;
23537 return 0;
23538 }
23539 _ACEOF
23540 if ac_fn_c_try_compile "$LINENO"; then :
23541 gl_cv_header_langinfo_era=yes
23542 else
23543 gl_cv_header_langinfo_era=no
23544 fi
23545 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23546
23547 fi
23548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_era" >&5
23549 $as_echo "$gl_cv_header_langinfo_era" >&6; }
23550 if test $gl_cv_header_langinfo_era = yes; then
23551 HAVE_LANGINFO_ERA=1
23552 fi
23553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines YESEXPR" >&5
23554 $as_echo_n "checking whether langinfo.h defines YESEXPR... " >&6; }
23555 if ${gl_cv_header_langinfo_yesexpr+:} false; then :
23556 $as_echo_n "(cached) " >&6
23557 else
23558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23559 /* end confdefs.h. */
23560 #include <langinfo.h>
23561 int a = YESEXPR;
23562
23563 int
23564 main (void)
23565 {
23566
23567 ;
23568 return 0;
23569 }
23570 _ACEOF
23571 if ac_fn_c_try_compile "$LINENO"; then :
23572 gl_cv_header_langinfo_yesexpr=yes
23573 else
23574 gl_cv_header_langinfo_yesexpr=no
23575 fi
23576 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23577
23578 fi
23579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_yesexpr" >&5
23580 $as_echo "$gl_cv_header_langinfo_yesexpr" >&6; }
23581 if test $gl_cv_header_langinfo_yesexpr = yes; then
23582 HAVE_LANGINFO_YESEXPR=1
23583 fi
23584 else
23585 HAVE_LANGINFO_H=0
23586 fi
23587
23588
23589
23590
23591
23592
23593
23594
23595
23596
23597
23598
23599
23600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the __inline keyword" >&5
23601 $as_echo_n "checking whether the compiler supports the __inline keyword... " >&6; }
23602 if ${gl_cv_c___inline+:} false; then :
23603 $as_echo_n "(cached) " >&6
23604 else
23605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23606 /* end confdefs.h. */
23607 typedef int foo_t;
23608 static __inline foo_t foo (void) { return 0; }
23609 int
23610 main (void)
23611 {
23612 return foo ();
23613 ;
23614 return 0;
23615 }
23616 _ACEOF
23617 if ac_fn_c_try_compile "$LINENO"; then :
23618 gl_cv_c___inline=yes
23619 else
23620 gl_cv_c___inline=no
23621 fi
23622 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23623 fi
23624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c___inline" >&5
23625 $as_echo "$gl_cv_c___inline" >&6; }
23626 if test $gl_cv_c___inline = yes; then
23627
23628 $as_echo "#define HAVE___INLINE 1" >>confdefs.h
23629
23630 fi
23631
23632
23633
23634
23635
23636 LOCALCHARSET_TESTS_ENVIRONMENT=
23637
23638
23639
23640
23641
23642
23643
23644
23645
23646 case "$host_os" in
23647 solaris*)
23648
23649 $as_echo "#define _LCONV_C99 1" >>confdefs.h
23650
23651 ;;
23652 esac
23653
23654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5
23655 $as_echo_n "checking whether locale.h conforms to POSIX:2001... " >&6; }
23656 if ${gl_cv_header_locale_h_posix2001+:} false; then :
23657 $as_echo_n "(cached) " >&6
23658 else
23659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23660 /* end confdefs.h. */
23661 #include <locale.h>
23662 int x = LC_MESSAGES;
23663 int y = sizeof (((struct lconv *) 0)->decimal_point);
23664 int
23665 main (void)
23666 {
23667
23668 ;
23669 return 0;
23670 }
23671 _ACEOF
23672 if ac_fn_c_try_compile "$LINENO"; then :
23673 gl_cv_header_locale_h_posix2001=yes
23674 else
23675 gl_cv_header_locale_h_posix2001=no
23676 fi
23677 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23678 fi
23679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_h_posix2001" >&5
23680 $as_echo "$gl_cv_header_locale_h_posix2001" >&6; }
23681
23682
23683 if test $ac_cv_header_xlocale_h = yes; then
23684 HAVE_XLOCALE_H=1
23685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5
23686 $as_echo_n "checking whether locale.h defines locale_t... " >&6; }
23687 if ${gl_cv_header_locale_has_locale_t+:} false; then :
23688 $as_echo_n "(cached) " >&6
23689 else
23690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23691 /* end confdefs.h. */
23692 #include <locale.h>
23693 locale_t x;
23694 int
23695 main (void)
23696 {
23697
23698 ;
23699 return 0;
23700 }
23701 _ACEOF
23702 if ac_fn_c_try_compile "$LINENO"; then :
23703 gl_cv_header_locale_has_locale_t=yes
23704 else
23705 gl_cv_header_locale_has_locale_t=no
23706 fi
23707 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23708
23709 fi
23710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_has_locale_t" >&5
23711 $as_echo "$gl_cv_header_locale_has_locale_t" >&6; }
23712 if test $gl_cv_header_locale_has_locale_t = yes; then
23713 gl_cv_header_locale_h_needs_xlocale_h=no
23714 else
23715 gl_cv_header_locale_h_needs_xlocale_h=yes
23716 fi
23717 else
23718 HAVE_XLOCALE_H=0
23719 gl_cv_header_locale_h_needs_xlocale_h=no
23720 fi
23721
23722
23723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct lconv is properly defined" >&5
23724 $as_echo_n "checking whether struct lconv is properly defined... " >&6; }
23725 if ${gl_cv_sys_struct_lconv_ok+:} false; then :
23726 $as_echo_n "(cached) " >&6
23727 else
23728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23729 /* end confdefs.h. */
23730 #include <locale.h>
23731 struct lconv l;
23732 int x = sizeof (l.decimal_point);
23733 int y = sizeof (l.int_p_cs_precedes);
23734 int
23735 main (void)
23736 {
23737
23738 ;
23739 return 0;
23740 }
23741 _ACEOF
23742 if ac_fn_c_try_compile "$LINENO"; then :
23743 gl_cv_sys_struct_lconv_ok=yes
23744 else
23745 gl_cv_sys_struct_lconv_ok=no
23746 fi
23747 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23748
23749 fi
23750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_lconv_ok" >&5
23751 $as_echo "$gl_cv_sys_struct_lconv_ok" >&6; }
23752 if test $gl_cv_sys_struct_lconv_ok = no; then
23753 REPLACE_STRUCT_LCONV=1
23754 fi
23755
23756
23757
23758
23759
23760
23761
23762
23763
23764 if test $gl_cv_have_include_next = yes; then
23765 gl_cv_next_locale_h='<'locale.h'>'
23766 else
23767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <locale.h>" >&5
23768 $as_echo_n "checking absolute name of <locale.h>... " >&6; }
23769 if ${gl_cv_next_locale_h+:} false; then :
23770 $as_echo_n "(cached) " >&6
23771 else
23772
23773
23774
23775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23776 /* end confdefs.h. */
23777 #include <locale.h>
23778 _ACEOF
23779 case "$host_os" in
23780 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23781 *) gl_absname_cpp="$ac_cpp" ;;
23782 esac
23783
23784 case "$host_os" in
23785 mingw*)
23786 gl_dirsep_regex='[/\\]'
23787 ;;
23788 *)
23789 gl_dirsep_regex='\/'
23790 ;;
23791 esac
23792 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23793 gl_header_literal_regex=`echo 'locale.h' \
23794 | sed -e "$gl_make_literal_regex_sed"`
23795 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23796 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23797 s|^/[^/]|//&|
23798 p
23799 q
23800 }'
23801
23802 gl_cv_absolute_locale_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23803 sed -n "$gl_absolute_header_sed"`
23804
23805 gl_header=$gl_cv_absolute_locale_h
23806 gl_cv_next_locale_h='"'$gl_header'"'
23807
23808
23809 fi
23810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_locale_h" >&5
23811 $as_echo "$gl_cv_next_locale_h" >&6; }
23812 fi
23813 NEXT_LOCALE_H=$gl_cv_next_locale_h
23814
23815 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23816 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23817 gl_next_as_first_directive='<'locale.h'>'
23818 else
23819 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23820 gl_next_as_first_directive=$gl_cv_next_locale_h
23821 fi
23822 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H=$gl_next_as_first_directive
23823
23824
23825
23826
23827
23828
23829
23830
23831
23832
23833
23834
23835
23836 if test $REPLACE_STRUCT_LCONV = 1; then
23837 REPLACE_LOCALECONV=1
23838 fi
23839
23840 if test $REPLACE_LOCALECONV = 1; then
23841
23842
23843
23844
23845
23846
23847
23848
23849 gl_LIBOBJS="$gl_LIBOBJS localeconv.$ac_objext"
23850
23851
23852 ac_fn_c_check_member "$LINENO" "struct lconv" "decimal_point" "ac_cv_member_struct_lconv_decimal_point" "#include <locale.h>
23853 "
23854 if test "x$ac_cv_member_struct_lconv_decimal_point" = xyes; then :
23855
23856 cat >>confdefs.h <<_ACEOF
23857 #define HAVE_STRUCT_LCONV_DECIMAL_POINT 1
23858 _ACEOF
23859
23860
23861 fi
23862
23863
23864 fi
23865
23866
23867
23868
23869
23870 GNULIB_LOCALECONV=1
23871
23872
23873
23874
23875
23876 $as_echo "#define GNULIB_TEST_LOCALECONV 1" >>confdefs.h
23877
23878
23879
23880
23881
23882 if test "$gl_threads_api" = posix; then
23883 # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
23884 # pthread_rwlock_* functions.
23885 has_rwlock=false
23886 ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
23887 "
23888 if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then :
23889 has_rwlock=true
23890
23891 $as_echo "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
23892
23893 fi
23894
23895 if $has_rwlock; then
23896
23897
23898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_rwlock_rdlock prefers a writer to a reader" >&5
23899 $as_echo_n "checking whether pthread_rwlock_rdlock prefers a writer to a reader... " >&6; }
23900 if ${gl_cv_pthread_rwlock_rdlock_prefer_writer+:} false; then :
23901 $as_echo_n "(cached) " >&6
23902 else
23903 save_LIBS="$LIBS"
23904 LIBS="$LIBS $LIBMULTITHREAD"
23905 if test "$cross_compiling" = yes; then :
23906 gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing yes"
23907 else
23908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23909 /* end confdefs.h. */
23910
23911 #include <errno.h>
23912 #include <pthread.h>
23913 #include <stdlib.h>
23914 #include <unistd.h>
23915
23916 #define SUCCEED() exit (0)
23917 #define FAILURE() exit (1)
23918 #define UNEXPECTED(n) (exit (10 + (n)))
23919
23920 /* The main thread creates the waiting writer and the requesting reader threads
23921 in the default way; this guarantees that they have the same priority.
23922 We can reuse the main thread as first reader thread. */
23923
23924 static pthread_rwlock_t lock;
23925 static pthread_t reader1;
23926 static pthread_t writer;
23927 static pthread_t reader2;
23928 static pthread_t timer;
23929 /* Used to pass control from writer to reader2 and from reader2 to timer,
23930 as in a relay race.
23931 Passing control from one running thread to another running thread
23932 is most likely faster than to create the second thread. */
23933 static pthread_mutex_t baton;
23934
23935 static void *
23936 timer_func (void *ignored)
23937 {
23938 /* Step 13 (can be before or after step 12):
23939 The timer thread takes the baton, then waits a moment to make sure
23940 it can tell whether the second reader thread is blocked at step 12. */
23941 if (pthread_mutex_lock (&baton))
23942 UNEXPECTED (13);
23943 usleep (100000);
23944 /* By the time we get here, it's clear that the second reader thread is
23945 blocked at step 12. This is the desired behaviour. */
23946 SUCCEED ();
23947 }
23948
23949 static void *
23950 reader2_func (void *ignored)
23951 {
23952 int err;
23953
23954 /* Step 8 (can be before or after step 7):
23955 The second reader thread takes the baton, then waits a moment to make sure
23956 the writer thread has reached step 7. */
23957 if (pthread_mutex_lock (&baton))
23958 UNEXPECTED (8);
23959 usleep (100000);
23960 /* Step 9: The second reader thread requests the lock. */
23961 err = pthread_rwlock_tryrdlock (&lock);
23962 if (err == 0)
23963 FAILURE ();
23964 else if (err != EBUSY)
23965 UNEXPECTED (9);
23966 /* Step 10: Launch a timer, to test whether the next call blocks. */
23967 if (pthread_create (&timer, NULL, timer_func, NULL))
23968 UNEXPECTED (10);
23969 /* Step 11: Release the baton. */
23970 if (pthread_mutex_unlock (&baton))
23971 UNEXPECTED (11);
23972 /* Step 12: The second reader thread requests the lock. */
23973 err = pthread_rwlock_rdlock (&lock);
23974 if (err == 0)
23975 FAILURE ();
23976 else
23977 UNEXPECTED (12);
23978 }
23979
23980 static void *
23981 writer_func (void *ignored)
23982 {
23983 /* Step 4: Take the baton, so that the second reader thread does not go ahead
23984 too early. */
23985 if (pthread_mutex_lock (&baton))
23986 UNEXPECTED (4);
23987 /* Step 5: Create the second reader thread. */
23988 if (pthread_create (&reader2, NULL, reader2_func, NULL))
23989 UNEXPECTED (5);
23990 /* Step 6: Release the baton. */
23991 if (pthread_mutex_unlock (&baton))
23992 UNEXPECTED (6);
23993 /* Step 7: The writer thread requests the lock. */
23994 if (pthread_rwlock_wrlock (&lock))
23995 UNEXPECTED (7);
23996 return NULL;
23997 }
23998
23999 int
24000 main ()
24001 {
24002 reader1 = pthread_self ();
24003
24004 /* Step 1: The main thread initializes the lock and the baton. */
24005 if (pthread_rwlock_init (&lock, NULL))
24006 UNEXPECTED (1);
24007 if (pthread_mutex_init (&baton, NULL))
24008 UNEXPECTED (1);
24009 /* Step 2: The main thread acquires the lock as a reader. */
24010 if (pthread_rwlock_rdlock (&lock))
24011 UNEXPECTED (2);
24012 /* Step 3: Create the writer thread. */
24013 if (pthread_create (&writer, NULL, writer_func, NULL))
24014 UNEXPECTED (3);
24015 /* Job done. Go to sleep. */
24016 for (;;)
24017 {
24018 sleep (1);
24019 }
24020 }
24021
24022 _ACEOF
24023 if ac_fn_c_try_run "$LINENO"; then :
24024 gl_cv_pthread_rwlock_rdlock_prefer_writer=yes
24025 else
24026 gl_cv_pthread_rwlock_rdlock_prefer_writer=no
24027 fi
24028 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24029 conftest.$ac_objext conftest.beam conftest.$ac_ext
24030 fi
24031
24032 LIBS="$save_LIBS"
24033
24034 fi
24035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pthread_rwlock_rdlock_prefer_writer" >&5
24036 $as_echo "$gl_cv_pthread_rwlock_rdlock_prefer_writer" >&6; }
24037 case "$gl_cv_pthread_rwlock_rdlock_prefer_writer" in
24038 *yes)
24039
24040 $as_echo "#define HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER 1" >>confdefs.h
24041
24042 ;;
24043 esac
24044
24045 fi
24046 # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
24047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24048 /* end confdefs.h. */
24049
24050 #include <pthread.h>
24051 int
24052 main (void)
24053 {
24054
24055 #if __FreeBSD__ == 4
24056 error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
24057 #elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \
24058 && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
24059 error "No, in Mac OS X < 10.7 recursive mutexes actually don't work."
24060 #else
24061 int x = (int)PTHREAD_MUTEX_RECURSIVE;
24062 return !x;
24063 #endif
24064
24065 ;
24066 return 0;
24067 }
24068 _ACEOF
24069 if ac_fn_c_try_compile "$LINENO"; then :
24070
24071 $as_echo "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h
24072
24073 fi
24074 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24075 fi
24076 :
24077
24078
24079
24080 cat >>confdefs.h <<_ACEOF
24081 #define GNULIB_LOCK 1
24082 _ACEOF
24083
24084
24085
24086
24087
24088 for ac_header in stdlib.h
24089 do :
24090 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
24091 if test "x$ac_cv_header_stdlib_h" = xyes; then :
24092 cat >>confdefs.h <<_ACEOF
24093 #define HAVE_STDLIB_H 1
24094 _ACEOF
24095
24096 fi
24097
24098 done
24099
24100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
24101 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
24102 if ${ac_cv_func_malloc_0_nonnull+:} false; then :
24103 $as_echo_n "(cached) " >&6
24104 else
24105 if test "$cross_compiling" = yes; then :
24106 case "$host_os" in
24107 # Guess yes on platforms where we know the result.
24108 *-gnu* | gnu* | freebsd* | netbsd* | openbsd* \
24109 | hpux* | solaris* | cygwin* | mingw*)
24110 ac_cv_func_malloc_0_nonnull=yes ;;
24111 # If we don't know, assume the worst.
24112 *) ac_cv_func_malloc_0_nonnull=no ;;
24113 esac
24114
24115 else
24116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24117 /* end confdefs.h. */
24118 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
24119 # include <stdlib.h>
24120 #else
24121 char *malloc ();
24122 #endif
24123
24124 int
24125 main (void)
24126 {
24127 char *p = malloc (0);
24128 int result = !p;
24129 free (p);
24130 return result;
24131 ;
24132 return 0;
24133 }
24134
24135 _ACEOF
24136 if ac_fn_c_try_run "$LINENO"; then :
24137 ac_cv_func_malloc_0_nonnull=yes
24138 else
24139 ac_cv_func_malloc_0_nonnull=no
24140 fi
24141 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24142 conftest.$ac_objext conftest.beam conftest.$ac_ext
24143 fi
24144
24145
24146 fi
24147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
24148 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
24149 if test $ac_cv_func_malloc_0_nonnull = yes; then :
24150
24151 $as_echo "#define HAVE_MALLOC_GNU 1" >>confdefs.h
24152
24153 else
24154 $as_echo "#define HAVE_MALLOC_GNU 0" >>confdefs.h
24155
24156 REPLACE_MALLOC=1
24157
24158 fi
24159
24160
24161 if test $REPLACE_MALLOC = 1; then
24162
24163
24164
24165
24166
24167
24168
24169
24170 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
24171
24172 fi
24173
24174
24175 cat >>confdefs.h <<_ACEOF
24176 #define GNULIB_MALLOC_GNU 1
24177 _ACEOF
24178
24179
24180
24181
24182
24183 if test $gl_cv_func_malloc_posix = yes; then
24184
24185 $as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
24186
24187 else
24188 REPLACE_MALLOC=1
24189 fi
24190
24191 if test $REPLACE_MALLOC = 1; then
24192
24193
24194
24195
24196
24197
24198
24199
24200 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
24201
24202 fi
24203
24204
24205
24206
24207
24208 GNULIB_MALLOC_POSIX=1
24209
24210
24211
24212
24213
24214 $as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
24215
24216
24217
24218
24219
24220
24221
24222
24223
24224
24225
24226
24227
24228
24229
24230
24231
24232 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
24233
24234
24235
24236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
24237 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
24238 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
24239 $as_echo_n "(cached) " >&6
24240 else
24241
24242 case "$host_os" in
24243 # Guess no on AIX and OSF/1.
24244 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
24245 # Guess yes otherwise.
24246 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
24247 esac
24248 if test $LOCALE_JA != none; then
24249 if test "$cross_compiling" = yes; then :
24250 :
24251 else
24252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24253 /* end confdefs.h. */
24254
24255 #include <locale.h>
24256 #include <string.h>
24257 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
24258 <wchar.h>.
24259 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
24260 included before <wchar.h>. */
24261 #include <stddef.h>
24262 #include <stdio.h>
24263 #include <time.h>
24264 #include <wchar.h>
24265 int main ()
24266 {
24267 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
24268 {
24269 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
24270 mbstate_t state;
24271 wchar_t wc;
24272
24273 memset (&state, '\0', sizeof (mbstate_t));
24274 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
24275 if (mbsinit (&state))
24276 return 2;
24277 }
24278 return 0;
24279 }
24280 _ACEOF
24281 if ac_fn_c_try_run "$LINENO"; then :
24282 gl_cv_func_mbrtowc_incomplete_state=yes
24283 else
24284 gl_cv_func_mbrtowc_incomplete_state=no
24285 fi
24286 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24287 conftest.$ac_objext conftest.beam conftest.$ac_ext
24288 fi
24289
24290 fi
24291
24292 fi
24293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
24294 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
24295
24296
24297
24298
24299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
24300 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
24301 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
24302 $as_echo_n "(cached) " >&6
24303 else
24304
24305 case "$host_os" in
24306 # Guess no on Solaris 8.
24307 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
24308 # Guess yes otherwise.
24309 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
24310 esac
24311 if test $LOCALE_ZH_CN != none; then
24312 if test "$cross_compiling" = yes; then :
24313 :
24314 else
24315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24316 /* end confdefs.h. */
24317
24318 #include <locale.h>
24319 #include <stdlib.h>
24320 #include <string.h>
24321 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
24322 <wchar.h>.
24323 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
24324 included before <wchar.h>. */
24325 #include <stddef.h>
24326 #include <stdio.h>
24327 #include <time.h>
24328 #include <wchar.h>
24329 int main ()
24330 {
24331 /* This fails on Solaris 8:
24332 mbrtowc returns 2, and sets wc to 0x00F0.
24333 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
24334 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
24335 {
24336 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
24337 mbstate_t state;
24338 wchar_t wc;
24339
24340 memset (&state, '\0', sizeof (mbstate_t));
24341 if (mbrtowc (&wc, input + 3, 6, &state) != 4
24342 && mbtowc (&wc, input + 3, 6) == 4)
24343 return 2;
24344 }
24345 return 0;
24346 }
24347 _ACEOF
24348 if ac_fn_c_try_run "$LINENO"; then :
24349 gl_cv_func_mbrtowc_sanitycheck=yes
24350 else
24351 gl_cv_func_mbrtowc_sanitycheck=no
24352 fi
24353 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24354 conftest.$ac_objext conftest.beam conftest.$ac_ext
24355 fi
24356
24357 fi
24358
24359 fi
24360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
24361 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
24362
24363 REPLACE_MBSTATE_T=0
24364 case "$gl_cv_func_mbrtowc_incomplete_state" in
24365 *yes) ;;
24366 *) REPLACE_MBSTATE_T=1 ;;
24367 esac
24368 case "$gl_cv_func_mbrtowc_sanitycheck" in
24369 *yes) ;;
24370 *) REPLACE_MBSTATE_T=1 ;;
24371 esac
24372 else
24373 REPLACE_MBSTATE_T=1
24374 fi
24375
24376
24377
24378 if test $ac_cv_func_mbrtowc = no; then
24379 HAVE_MBRTOWC=0
24380 ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
24381 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
24382 <wchar.h>.
24383 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
24384 included before <wchar.h>. */
24385 #include <stddef.h>
24386 #include <stdio.h>
24387 #include <time.h>
24388 #include <wchar.h>
24389
24390 "
24391 if test "x$ac_cv_have_decl_mbrtowc" = xyes; then :
24392 ac_have_decl=1
24393 else
24394 ac_have_decl=0
24395 fi
24396
24397 cat >>confdefs.h <<_ACEOF
24398 #define HAVE_DECL_MBRTOWC $ac_have_decl
24399 _ACEOF
24400
24401 if test $ac_cv_have_decl_mbrtowc = yes; then
24402 REPLACE_MBRTOWC=1
24403 fi
24404 else
24405 if test $REPLACE_MBSTATE_T = 1; then
24406 REPLACE_MBRTOWC=1
24407 else
24408
24409
24410
24411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
24412 $as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
24413 if ${gl_cv_func_mbrtowc_null_arg1+:} false; then :
24414 $as_echo_n "(cached) " >&6
24415 else
24416
24417 case "$host_os" in
24418 # Guess no on Solaris.
24419 solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
24420 # Guess yes otherwise.
24421 *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
24422 esac
24423 if test $LOCALE_FR_UTF8 != none; then
24424 if test "$cross_compiling" = yes; then :
24425 :
24426 else
24427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24428 /* end confdefs.h. */
24429
24430 #include <locale.h>
24431 #include <stdlib.h>
24432 #include <string.h>
24433 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
24434 <wchar.h>.
24435 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
24436 included before <wchar.h>. */
24437 #include <stddef.h>
24438 #include <stdio.h>
24439 #include <time.h>
24440 #include <wchar.h>
24441 int main ()
24442 {
24443 int result = 0;
24444
24445 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
24446 {
24447 char input[] = "\303\237er";
24448 mbstate_t state;
24449 wchar_t wc;
24450 size_t ret;
24451
24452 memset (&state, '\0', sizeof (mbstate_t));
24453 wc = (wchar_t) 0xBADFACE;
24454 ret = mbrtowc (&wc, input, 5, &state);
24455 if (ret != 2)
24456 result |= 1;
24457 if (!mbsinit (&state))
24458 result |= 2;
24459
24460 memset (&state, '\0', sizeof (mbstate_t));
24461 ret = mbrtowc (NULL, input, 5, &state);
24462 if (ret != 2) /* Solaris 7 fails here: ret is -1. */
24463 result |= 4;
24464 if (!mbsinit (&state))
24465 result |= 8;
24466 }
24467 return result;
24468 }
24469 _ACEOF
24470 if ac_fn_c_try_run "$LINENO"; then :
24471 gl_cv_func_mbrtowc_null_arg1=yes
24472 else
24473 gl_cv_func_mbrtowc_null_arg1=no
24474 fi
24475 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24476 conftest.$ac_objext conftest.beam conftest.$ac_ext
24477 fi
24478
24479 fi
24480
24481 fi
24482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
24483 $as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; }
24484
24485
24486
24487
24488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
24489 $as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
24490 if ${gl_cv_func_mbrtowc_null_arg2+:} false; then :
24491 $as_echo_n "(cached) " >&6
24492 else
24493
24494 case "$host_os" in
24495 # Guess no on OSF/1.
24496 osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
24497 # Guess yes otherwise.
24498 *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
24499 esac
24500 if test $LOCALE_FR_UTF8 != none; then
24501 if test "$cross_compiling" = yes; then :
24502 :
24503 else
24504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24505 /* end confdefs.h. */
24506
24507 #include <locale.h>
24508 #include <string.h>
24509 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
24510 <wchar.h>.
24511 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
24512 included before <wchar.h>. */
24513 #include <stddef.h>
24514 #include <stdio.h>
24515 #include <time.h>
24516 #include <wchar.h>
24517 int main ()
24518 {
24519 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
24520 {
24521 mbstate_t state;
24522 wchar_t wc;
24523 int ret;
24524
24525 memset (&state, '\0', sizeof (mbstate_t));
24526 wc = (wchar_t) 0xBADFACE;
24527 mbrtowc (&wc, NULL, 5, &state);
24528 /* Check that wc was not modified. */
24529 if (wc != (wchar_t) 0xBADFACE)
24530 return 2;
24531 }
24532 return 0;
24533 }
24534 _ACEOF
24535 if ac_fn_c_try_run "$LINENO"; then :
24536 gl_cv_func_mbrtowc_null_arg2=yes
24537 else
24538 gl_cv_func_mbrtowc_null_arg2=no
24539 fi
24540 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24541 conftest.$ac_objext conftest.beam conftest.$ac_ext
24542 fi
24543
24544 fi
24545
24546 fi
24547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
24548 $as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; }
24549
24550
24551
24552
24553
24554
24555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
24556 $as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
24557 if ${gl_cv_func_mbrtowc_retval+:} false; then :
24558 $as_echo_n "(cached) " >&6
24559 else
24560
24561 case "$host_os" in
24562 # Guess no on HP-UX, Solaris, native Windows.
24563 hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
24564 # Guess yes otherwise.
24565 *) gl_cv_func_mbrtowc_retval="guessing yes" ;;
24566 esac
24567 if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
24568 || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
24569 if test "$cross_compiling" = yes; then :
24570 :
24571 else
24572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24573 /* end confdefs.h. */
24574
24575 #include <locale.h>
24576 #include <string.h>
24577 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
24578 <wchar.h>.
24579 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
24580 included before <wchar.h>. */
24581 #include <stddef.h>
24582 #include <stdio.h>
24583 #include <time.h>
24584 #include <wchar.h>
24585 int main ()
24586 {
24587 int result = 0;
24588 int found_some_locale = 0;
24589 /* This fails on Solaris. */
24590 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
24591 {
24592 char input[] = "B\303\274\303\237er"; /* "Büßer" */
24593 mbstate_t state;
24594 wchar_t wc;
24595
24596 memset (&state, '\0', sizeof (mbstate_t));
24597 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
24598 {
24599 input[1] = '\0';
24600 if (mbrtowc (&wc, input + 2, 5, &state) != 1)
24601 result |= 1;
24602 }
24603 found_some_locale = 1;
24604 }
24605 /* This fails on HP-UX 11.11. */
24606 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
24607 {
24608 char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
24609 mbstate_t state;
24610 wchar_t wc;
24611
24612 memset (&state, '\0', sizeof (mbstate_t));
24613 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
24614 {
24615 input[1] = '\0';
24616 if (mbrtowc (&wc, input + 2, 5, &state) != 2)
24617 result |= 2;
24618 }
24619 found_some_locale = 1;
24620 }
24621 /* This fails on native Windows. */
24622 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
24623 {
24624 char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
24625 mbstate_t state;
24626 wchar_t wc;
24627
24628 memset (&state, '\0', sizeof (mbstate_t));
24629 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
24630 {
24631 input[3] = '\0';
24632 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
24633 result |= 4;
24634 }
24635 found_some_locale = 1;
24636 }
24637 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
24638 {
24639 char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
24640 mbstate_t state;
24641 wchar_t wc;
24642
24643 memset (&state, '\0', sizeof (mbstate_t));
24644 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
24645 {
24646 input[3] = '\0';
24647 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
24648 result |= 8;
24649 }
24650 found_some_locale = 1;
24651 }
24652 if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
24653 {
24654 char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
24655 mbstate_t state;
24656 wchar_t wc;
24657
24658 memset (&state, '\0', sizeof (mbstate_t));
24659 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
24660 {
24661 input[3] = '\0';
24662 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
24663 result |= 16;
24664 }
24665 found_some_locale = 1;
24666 }
24667 return (found_some_locale ? result : 77);
24668 }
24669 _ACEOF
24670 if ac_fn_c_try_run "$LINENO"; then :
24671 gl_cv_func_mbrtowc_retval=yes
24672 else
24673 if test $? != 77; then
24674 gl_cv_func_mbrtowc_retval=no
24675 fi
24676
24677 fi
24678 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24679 conftest.$ac_objext conftest.beam conftest.$ac_ext
24680 fi
24681
24682 fi
24683
24684 fi
24685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
24686 $as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
24687
24688
24689
24690
24691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
24692 $as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
24693 if ${gl_cv_func_mbrtowc_nul_retval+:} false; then :
24694 $as_echo_n "(cached) " >&6
24695 else
24696
24697 case "$host_os" in
24698 # Guess no on Solaris 8 and 9.
24699 solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
24700 # Guess yes otherwise.
24701 *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
24702 esac
24703 if test $LOCALE_ZH_CN != none; then
24704 if test "$cross_compiling" = yes; then :
24705 :
24706 else
24707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24708 /* end confdefs.h. */
24709
24710 #include <locale.h>
24711 #include <string.h>
24712 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
24713 <wchar.h>.
24714 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
24715 included before <wchar.h>. */
24716 #include <stddef.h>
24717 #include <stdio.h>
24718 #include <time.h>
24719 #include <wchar.h>
24720 int main ()
24721 {
24722 /* This fails on Solaris 8 and 9. */
24723 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
24724 {
24725 mbstate_t state;
24726 wchar_t wc;
24727
24728 memset (&state, '\0', sizeof (mbstate_t));
24729 if (mbrtowc (&wc, "", 1, &state) != 0)
24730 return 2;
24731 }
24732 return 0;
24733 }
24734 _ACEOF
24735 if ac_fn_c_try_run "$LINENO"; then :
24736 gl_cv_func_mbrtowc_nul_retval=yes
24737 else
24738 gl_cv_func_mbrtowc_nul_retval=no
24739 fi
24740 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24741 conftest.$ac_objext conftest.beam conftest.$ac_ext
24742 fi
24743
24744 fi
24745
24746 fi
24747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
24748 $as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
24749
24750
24751
24752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5
24753 $as_echo_n "checking whether mbrtowc works on empty input... " >&6; }
24754 if ${gl_cv_func_mbrtowc_empty_input+:} false; then :
24755 $as_echo_n "(cached) " >&6
24756 else
24757
24758 case "$host_os" in
24759 # Guess no on AIX and glibc systems.
24760 aix* | *-gnu* | gnu*) gl_cv_func_mbrtowc_empty_input="guessing no" ;;
24761 # Guess yes on native Windows.
24762 mingw*) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
24763 *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
24764 esac
24765 if test "$cross_compiling" = yes; then :
24766 :
24767 else
24768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24769 /* end confdefs.h. */
24770
24771 #include <wchar.h>
24772 static wchar_t wc;
24773 static mbstate_t mbs;
24774 int
24775 main (void)
24776 {
24777 return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
24778 }
24779 _ACEOF
24780 if ac_fn_c_try_run "$LINENO"; then :
24781 gl_cv_func_mbrtowc_empty_input=yes
24782 else
24783 gl_cv_func_mbrtowc_empty_input=no
24784 fi
24785 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24786 conftest.$ac_objext conftest.beam conftest.$ac_ext
24787 fi
24788
24789
24790 fi
24791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5
24792 $as_echo "$gl_cv_func_mbrtowc_empty_input" >&6; }
24793
24794
24795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
24796 $as_echo_n "checking whether the C locale is free of encoding errors... " >&6; }
24797 if ${gl_cv_C_locale_sans_EILSEQ+:} false; then :
24798 $as_echo_n "(cached) " >&6
24799 else
24800
24801 gl_cv_C_locale_sans_EILSEQ="guessing no"
24802
24803 if test "$cross_compiling" = yes; then :
24804 case "$host_os" in
24805 # Guess yes on native Windows.
24806 mingw*) gl_cv_C_locale_sans_EILSEQ="guessing yes" ;;
24807 esac
24808
24809 else
24810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24811 /* end confdefs.h. */
24812 #include <limits.h>
24813 #include <locale.h>
24814 #include <wchar.h>
24815
24816 int
24817 main (void)
24818 {
24819
24820 int i;
24821 char *locale = setlocale (LC_ALL, "C");
24822 if (! locale)
24823 return 2;
24824 for (i = CHAR_MIN; i <= CHAR_MAX; i++)
24825 {
24826 char c = i;
24827 wchar_t wc;
24828 mbstate_t mbs = { 0, };
24829 size_t ss = mbrtowc (&wc, &c, 1, &mbs);
24830 if (1 < ss)
24831 return 3;
24832 }
24833 return 0;
24834
24835 ;
24836 return 0;
24837 }
24838 _ACEOF
24839 if ac_fn_c_try_run "$LINENO"; then :
24840 gl_cv_C_locale_sans_EILSEQ=yes
24841 else
24842 gl_cv_C_locale_sans_EILSEQ=no
24843 fi
24844 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24845 conftest.$ac_objext conftest.beam conftest.$ac_ext
24846 fi
24847
24848
24849 fi
24850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_C_locale_sans_EILSEQ" >&5
24851 $as_echo "$gl_cv_C_locale_sans_EILSEQ" >&6; }
24852
24853 case "$gl_cv_func_mbrtowc_null_arg1" in
24854 *yes) ;;
24855 *)
24856 $as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
24857
24858 REPLACE_MBRTOWC=1
24859 ;;
24860 esac
24861 case "$gl_cv_func_mbrtowc_null_arg2" in
24862 *yes) ;;
24863 *)
24864 $as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
24865
24866 REPLACE_MBRTOWC=1
24867 ;;
24868 esac
24869 case "$gl_cv_func_mbrtowc_retval" in
24870 *yes) ;;
24871 *)
24872 $as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
24873
24874 REPLACE_MBRTOWC=1
24875 ;;
24876 esac
24877 case "$gl_cv_func_mbrtowc_nul_retval" in
24878 *yes) ;;
24879 *)
24880 $as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
24881
24882 REPLACE_MBRTOWC=1
24883 ;;
24884 esac
24885 case "$gl_cv_func_mbrtowc_empty_input" in
24886 *yes) ;;
24887 *)
24888 $as_echo "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h
24889
24890 REPLACE_MBRTOWC=1
24891 ;;
24892 esac
24893 case $gl_cv_C_locale_sans_EILSEQ in
24894 *yes) ;;
24895 *)
24896 $as_echo "#define C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
24897
24898 REPLACE_MBRTOWC=1
24899 ;;
24900 esac
24901 fi
24902 fi
24903
24904 if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
24905
24906
24907
24908
24909
24910
24911
24912
24913 gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
24914
24915
24916
24917 :
24918
24919 fi
24920
24921
24922
24923
24924
24925 GNULIB_MBRTOWC=1
24926
24927
24928
24929
24930
24931 $as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
24932
24933
24934
24935
24936
24937
24938
24939
24940
24941
24942
24943
24944
24945
24946 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
24947
24948
24949
24950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
24951 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
24952 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
24953 $as_echo_n "(cached) " >&6
24954 else
24955
24956 case "$host_os" in
24957 # Guess no on AIX and OSF/1.
24958 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
24959 # Guess yes otherwise.
24960 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
24961 esac
24962 if test $LOCALE_JA != none; then
24963 if test "$cross_compiling" = yes; then :
24964 :
24965 else
24966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24967 /* end confdefs.h. */
24968
24969 #include <locale.h>
24970 #include <string.h>
24971 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
24972 <wchar.h>.
24973 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
24974 included before <wchar.h>. */
24975 #include <stddef.h>
24976 #include <stdio.h>
24977 #include <time.h>
24978 #include <wchar.h>
24979 int main ()
24980 {
24981 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
24982 {
24983 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
24984 mbstate_t state;
24985 wchar_t wc;
24986
24987 memset (&state, '\0', sizeof (mbstate_t));
24988 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
24989 if (mbsinit (&state))
24990 return 2;
24991 }
24992 return 0;
24993 }
24994 _ACEOF
24995 if ac_fn_c_try_run "$LINENO"; then :
24996 gl_cv_func_mbrtowc_incomplete_state=yes
24997 else
24998 gl_cv_func_mbrtowc_incomplete_state=no
24999 fi
25000 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25001 conftest.$ac_objext conftest.beam conftest.$ac_ext
25002 fi
25003
25004 fi
25005
25006 fi
25007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
25008 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
25009
25010
25011
25012
25013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
25014 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
25015 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
25016 $as_echo_n "(cached) " >&6
25017 else
25018
25019 case "$host_os" in
25020 # Guess no on Solaris 8.
25021 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
25022 # Guess yes otherwise.
25023 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
25024 esac
25025 if test $LOCALE_ZH_CN != none; then
25026 if test "$cross_compiling" = yes; then :
25027 :
25028 else
25029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25030 /* end confdefs.h. */
25031
25032 #include <locale.h>
25033 #include <stdlib.h>
25034 #include <string.h>
25035 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
25036 <wchar.h>.
25037 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
25038 included before <wchar.h>. */
25039 #include <stddef.h>
25040 #include <stdio.h>
25041 #include <time.h>
25042 #include <wchar.h>
25043 int main ()
25044 {
25045 /* This fails on Solaris 8:
25046 mbrtowc returns 2, and sets wc to 0x00F0.
25047 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
25048 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
25049 {
25050 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
25051 mbstate_t state;
25052 wchar_t wc;
25053
25054 memset (&state, '\0', sizeof (mbstate_t));
25055 if (mbrtowc (&wc, input + 3, 6, &state) != 4
25056 && mbtowc (&wc, input + 3, 6) == 4)
25057 return 2;
25058 }
25059 return 0;
25060 }
25061 _ACEOF
25062 if ac_fn_c_try_run "$LINENO"; then :
25063 gl_cv_func_mbrtowc_sanitycheck=yes
25064 else
25065 gl_cv_func_mbrtowc_sanitycheck=no
25066 fi
25067 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25068 conftest.$ac_objext conftest.beam conftest.$ac_ext
25069 fi
25070
25071 fi
25072
25073 fi
25074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
25075 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
25076
25077 REPLACE_MBSTATE_T=0
25078 case "$gl_cv_func_mbrtowc_incomplete_state" in
25079 *yes) ;;
25080 *) REPLACE_MBSTATE_T=1 ;;
25081 esac
25082 case "$gl_cv_func_mbrtowc_sanitycheck" in
25083 *yes) ;;
25084 *) REPLACE_MBSTATE_T=1 ;;
25085 esac
25086 else
25087 REPLACE_MBSTATE_T=1
25088 fi
25089
25090
25091
25092 if test $ac_cv_func_mbsinit = no; then
25093 HAVE_MBSINIT=0
25094 ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
25095 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
25096 <wchar.h>.
25097 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
25098 included before <wchar.h>. */
25099 #include <stddef.h>
25100 #include <stdio.h>
25101 #include <time.h>
25102 #include <wchar.h>
25103
25104 "
25105 if test "x$ac_cv_have_decl_mbsinit" = xyes; then :
25106 ac_have_decl=1
25107 else
25108 ac_have_decl=0
25109 fi
25110
25111 cat >>confdefs.h <<_ACEOF
25112 #define HAVE_DECL_MBSINIT $ac_have_decl
25113 _ACEOF
25114
25115 if test $ac_cv_have_decl_mbsinit = yes; then
25116 REPLACE_MBSINIT=1
25117 fi
25118 else
25119 if test $REPLACE_MBSTATE_T = 1; then
25120 REPLACE_MBSINIT=1
25121 else
25122 case "$host_os" in
25123 mingw*) REPLACE_MBSINIT=1 ;;
25124 esac
25125 fi
25126 fi
25127
25128 if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
25129
25130
25131
25132
25133
25134
25135
25136
25137 gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
25138
25139
25140 :
25141
25142 fi
25143
25144
25145
25146
25147
25148 GNULIB_MBSINIT=1
25149
25150
25151
25152
25153
25154 $as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
25155
25156
25157
25158
25159
25160
25161
25162
25163
25164
25165
25166
25167
25168 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
25169
25170
25171
25172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
25173 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
25174 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
25175 $as_echo_n "(cached) " >&6
25176 else
25177
25178 case "$host_os" in
25179 # Guess no on AIX and OSF/1.
25180 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
25181 # Guess yes otherwise.
25182 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
25183 esac
25184 if test $LOCALE_JA != none; then
25185 if test "$cross_compiling" = yes; then :
25186 :
25187 else
25188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25189 /* end confdefs.h. */
25190
25191 #include <locale.h>
25192 #include <string.h>
25193 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
25194 <wchar.h>.
25195 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
25196 included before <wchar.h>. */
25197 #include <stddef.h>
25198 #include <stdio.h>
25199 #include <time.h>
25200 #include <wchar.h>
25201 int main ()
25202 {
25203 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
25204 {
25205 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
25206 mbstate_t state;
25207 wchar_t wc;
25208
25209 memset (&state, '\0', sizeof (mbstate_t));
25210 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
25211 if (mbsinit (&state))
25212 return 2;
25213 }
25214 return 0;
25215 }
25216 _ACEOF
25217 if ac_fn_c_try_run "$LINENO"; then :
25218 gl_cv_func_mbrtowc_incomplete_state=yes
25219 else
25220 gl_cv_func_mbrtowc_incomplete_state=no
25221 fi
25222 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25223 conftest.$ac_objext conftest.beam conftest.$ac_ext
25224 fi
25225
25226 fi
25227
25228 fi
25229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
25230 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
25231
25232
25233
25234
25235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
25236 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
25237 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
25238 $as_echo_n "(cached) " >&6
25239 else
25240
25241 case "$host_os" in
25242 # Guess no on Solaris 8.
25243 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
25244 # Guess yes otherwise.
25245 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
25246 esac
25247 if test $LOCALE_ZH_CN != none; then
25248 if test "$cross_compiling" = yes; then :
25249 :
25250 else
25251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25252 /* end confdefs.h. */
25253
25254 #include <locale.h>
25255 #include <stdlib.h>
25256 #include <string.h>
25257 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
25258 <wchar.h>.
25259 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
25260 included before <wchar.h>. */
25261 #include <stddef.h>
25262 #include <stdio.h>
25263 #include <time.h>
25264 #include <wchar.h>
25265 int main ()
25266 {
25267 /* This fails on Solaris 8:
25268 mbrtowc returns 2, and sets wc to 0x00F0.
25269 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
25270 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
25271 {
25272 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
25273 mbstate_t state;
25274 wchar_t wc;
25275
25276 memset (&state, '\0', sizeof (mbstate_t));
25277 if (mbrtowc (&wc, input + 3, 6, &state) != 4
25278 && mbtowc (&wc, input + 3, 6) == 4)
25279 return 2;
25280 }
25281 return 0;
25282 }
25283 _ACEOF
25284 if ac_fn_c_try_run "$LINENO"; then :
25285 gl_cv_func_mbrtowc_sanitycheck=yes
25286 else
25287 gl_cv_func_mbrtowc_sanitycheck=no
25288 fi
25289 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25290 conftest.$ac_objext conftest.beam conftest.$ac_ext
25291 fi
25292
25293 fi
25294
25295 fi
25296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
25297 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
25298
25299 REPLACE_MBSTATE_T=0
25300 case "$gl_cv_func_mbrtowc_incomplete_state" in
25301 *yes) ;;
25302 *) REPLACE_MBSTATE_T=1 ;;
25303 esac
25304 case "$gl_cv_func_mbrtowc_sanitycheck" in
25305 *yes) ;;
25306 *) REPLACE_MBSTATE_T=1 ;;
25307 esac
25308 else
25309 REPLACE_MBSTATE_T=1
25310 fi
25311
25312
25313
25314 if test $ac_cv_func_mbsrtowcs = no; then
25315 HAVE_MBSRTOWCS=0
25316 ac_fn_c_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" "
25317 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
25318 <wchar.h>.
25319 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
25320 included before <wchar.h>. */
25321 #include <stddef.h>
25322 #include <stdio.h>
25323 #include <time.h>
25324 #include <wchar.h>
25325
25326 "
25327 if test "x$ac_cv_have_decl_mbsrtowcs" = xyes; then :
25328 ac_have_decl=1
25329 else
25330 ac_have_decl=0
25331 fi
25332
25333 cat >>confdefs.h <<_ACEOF
25334 #define HAVE_DECL_MBSRTOWCS $ac_have_decl
25335 _ACEOF
25336
25337 if test $ac_cv_have_decl_mbsrtowcs = yes; then
25338 REPLACE_MBSRTOWCS=1
25339 fi
25340 else
25341 if test $REPLACE_MBSTATE_T = 1; then
25342 REPLACE_MBSRTOWCS=1
25343 else
25344
25345
25346
25347
25348
25349
25350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5
25351 $as_echo_n "checking whether mbsrtowcs works... " >&6; }
25352 if ${gl_cv_func_mbsrtowcs_works+:} false; then :
25353 $as_echo_n "(cached) " >&6
25354 else
25355
25356 case "$host_os" in
25357 # Guess no on HP-UX, Solaris, mingw.
25358 hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;;
25359 # Guess yes otherwise.
25360 *) gl_cv_func_mbsrtowcs_works="guessing yes" ;;
25361 esac
25362 if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
25363 if test "$cross_compiling" = yes; then :
25364 :
25365 else
25366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25367 /* end confdefs.h. */
25368
25369 #include <locale.h>
25370 #include <string.h>
25371 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
25372 <wchar.h>.
25373 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
25374 included before <wchar.h>. */
25375 #include <stddef.h>
25376 #include <stdio.h>
25377 #include <time.h>
25378 #include <wchar.h>
25379 int main ()
25380 {
25381 int result = 0;
25382 /* Test whether the function supports a NULL destination argument.
25383 This fails on native Windows. */
25384 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
25385 {
25386 const char input[] = "\337er";
25387 const char *src = input;
25388 mbstate_t state;
25389
25390 memset (&state, '\0', sizeof (mbstate_t));
25391 if (mbsrtowcs (NULL, &src, 1, &state) != 3
25392 || src != input)
25393 result |= 1;
25394 }
25395 /* Test whether the function works when started with a conversion state
25396 in non-initial state. This fails on HP-UX 11.11 and Solaris 10. */
25397 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
25398 {
25399 const char input[] = "B\303\274\303\237er";
25400 mbstate_t state;
25401
25402 memset (&state, '\0', sizeof (mbstate_t));
25403 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
25404 if (!mbsinit (&state))
25405 {
25406 const char *src = input + 2;
25407 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
25408 result |= 2;
25409 }
25410 }
25411 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
25412 {
25413 const char input[] = "<\306\374\313\334\270\354>";
25414 mbstate_t state;
25415
25416 memset (&state, '\0', sizeof (mbstate_t));
25417 if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2))
25418 if (!mbsinit (&state))
25419 {
25420 const char *src = input + 4;
25421 if (mbsrtowcs (NULL, &src, 10, &state) != 3)
25422 result |= 4;
25423 }
25424 }
25425 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
25426 {
25427 const char input[] = "B\250\271\201\060\211\070er";
25428 mbstate_t state;
25429
25430 memset (&state, '\0', sizeof (mbstate_t));
25431 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
25432 if (!mbsinit (&state))
25433 {
25434 const char *src = input + 2;
25435 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
25436 result |= 8;
25437 }
25438 }
25439 return result;
25440 }
25441 _ACEOF
25442 if ac_fn_c_try_run "$LINENO"; then :
25443 gl_cv_func_mbsrtowcs_works=yes
25444 else
25445 gl_cv_func_mbsrtowcs_works=no
25446 fi
25447 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25448 conftest.$ac_objext conftest.beam conftest.$ac_ext
25449 fi
25450
25451 fi
25452
25453 fi
25454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5
25455 $as_echo "$gl_cv_func_mbsrtowcs_works" >&6; }
25456
25457 case "$gl_cv_func_mbsrtowcs_works" in
25458 *yes) ;;
25459 *) REPLACE_MBSRTOWCS=1 ;;
25460 esac
25461 fi
25462 fi
25463
25464 if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
25465
25466
25467
25468
25469
25470
25471
25472
25473 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs.$ac_objext"
25474
25475
25476
25477
25478
25479
25480
25481
25482
25483 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext"
25484
25485
25486 :
25487
25488 fi
25489
25490
25491
25492
25493
25494 GNULIB_MBSRTOWCS=1
25495
25496
25497
25498
25499
25500 $as_echo "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h
25501
25502
25503
25504
25505
25506
25507
25508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbswidth is declared in <wchar.h>" >&5
25509 $as_echo_n "checking whether mbswidth is declared in <wchar.h>... " >&6; }
25510 if ${ac_cv_have_decl_mbswidth+:} false; then :
25511 $as_echo_n "(cached) " >&6
25512 else
25513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25514 /* end confdefs.h. */
25515
25516 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
25517 <wchar.h>.
25518 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
25519 before <wchar.h>. */
25520 #include <stddef.h>
25521 #include <stdio.h>
25522 #include <time.h>
25523 #include <wchar.h>
25524
25525 int
25526 main (void)
25527 {
25528
25529 char *p = (char *) mbswidth;
25530 return !p;
25531
25532 ;
25533 return 0;
25534 }
25535 _ACEOF
25536 if ac_fn_c_try_compile "$LINENO"; then :
25537 ac_cv_have_decl_mbswidth=yes
25538 else
25539 ac_cv_have_decl_mbswidth=no
25540 fi
25541 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25542 fi
25543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_decl_mbswidth" >&5
25544 $as_echo "$ac_cv_have_decl_mbswidth" >&6; }
25545 if test $ac_cv_have_decl_mbswidth = yes; then
25546 ac_val=1
25547 else
25548 ac_val=0
25549 fi
25550
25551 cat >>confdefs.h <<_ACEOF
25552 #define HAVE_DECL_MBSWIDTH_IN_WCHAR_H $ac_val
25553 _ACEOF
25554
25555
25556
25557
25558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
25559 $as_echo_n "checking for mbstate_t... " >&6; }
25560 if ${ac_cv_type_mbstate_t+:} false; then :
25561 $as_echo_n "(cached) " >&6
25562 else
25563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25564 /* end confdefs.h. */
25565 $ac_includes_default
25566 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
25567 <wchar.h>.
25568 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
25569 included before <wchar.h>. */
25570 #include <stddef.h>
25571 #include <stdio.h>
25572 #include <time.h>
25573 #include <wchar.h>
25574 int
25575 main (void)
25576 {
25577 mbstate_t x; return sizeof x;
25578 ;
25579 return 0;
25580 }
25581 _ACEOF
25582 if ac_fn_c_try_compile "$LINENO"; then :
25583 ac_cv_type_mbstate_t=yes
25584 else
25585 ac_cv_type_mbstate_t=no
25586 fi
25587 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25588 fi
25589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
25590 $as_echo "$ac_cv_type_mbstate_t" >&6; }
25591 if test $ac_cv_type_mbstate_t = yes; then
25592
25593 $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
25594
25595 else
25596
25597 $as_echo "#define mbstate_t int" >>confdefs.h
25598
25599 fi
25600
25601
25602
25603
25604
25605 if false; then
25606 REPLACE_MBTOWC=1
25607 fi
25608
25609 if test $REPLACE_MBTOWC = 1; then
25610
25611
25612
25613
25614
25615
25616
25617
25618 gl_LIBOBJS="$gl_LIBOBJS mbtowc.$ac_objext"
25619
25620
25621 :
25622
25623 fi
25624
25625
25626
25627
25628
25629 GNULIB_MBTOWC=1
25630
25631
25632
25633
25634
25635 $as_echo "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h
25636
25637
25638
25639
25640 if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
25641
25642
25643
25644
25645
25646
25647
25648
25649 gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
25650
25651
25652 for ac_header in bp-sym.h
25653 do :
25654 ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
25655 if test "x$ac_cv_header_bp_sym_h" = xyes; then :
25656 cat >>confdefs.h <<_ACEOF
25657 #define HAVE_BP_SYM_H 1
25658 _ACEOF
25659
25660 fi
25661
25662 done
25663
25664
25665 fi
25666
25667
25668
25669
25670
25671 GNULIB_MEMCHR=1
25672
25673
25674
25675
25676
25677 $as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
25678
25679
25680
25681
25682
25683
25684
25685
25686
25687 for ac_func in mempcpy
25688 do :
25689 ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
25690 if test "x$ac_cv_func_mempcpy" = xyes; then :
25691 cat >>confdefs.h <<_ACEOF
25692 #define HAVE_MEMPCPY 1
25693 _ACEOF
25694
25695 fi
25696 done
25697
25698 if test $ac_cv_func_mempcpy = no; then
25699 HAVE_MEMPCPY=0
25700 fi
25701
25702 if test $HAVE_MEMPCPY = 0; then
25703
25704
25705
25706
25707
25708
25709
25710
25711 gl_LIBOBJS="$gl_LIBOBJS mempcpy.$ac_objext"
25712
25713
25714 :
25715
25716 fi
25717
25718
25719
25720
25721
25722 GNULIB_MEMPCPY=1
25723
25724
25725
25726
25727
25728 $as_echo "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h
25729
25730
25731
25732
25733
25734
25735
25736
25737 if test $ac_cv_have_decl_memrchr = no; then
25738 HAVE_DECL_MEMRCHR=0
25739 fi
25740
25741 for ac_func in memrchr
25742 do :
25743 ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
25744 if test "x$ac_cv_func_memrchr" = xyes; then :
25745 cat >>confdefs.h <<_ACEOF
25746 #define HAVE_MEMRCHR 1
25747 _ACEOF
25748
25749 fi
25750 done
25751
25752
25753 if test $ac_cv_func_memrchr = no; then
25754
25755
25756
25757
25758
25759
25760
25761
25762 gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
25763
25764 :
25765 fi
25766
25767
25768
25769
25770
25771 GNULIB_MEMRCHR=1
25772
25773
25774
25775
25776
25777 $as_echo "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h
25778
25779
25780
25781
25782 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
25783
25784
25785
25786
25787
25788
25789
25790
25791 gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
25792
25793 fi
25794
25795 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
25796
25797
25798
25799
25800
25801
25802
25803
25804 gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
25805
25806 fi
25807
25808
25809 cat >>confdefs.h <<_ACEOF
25810 #define GNULIB_MSVC_NOTHROW 1
25811 _ACEOF
25812
25813
25814
25815
25816
25817
25818
25819 if test $ac_cv_func_nl_langinfo = yes; then
25820 # On Irix 6.5, YESEXPR is defined, but nl_langinfo(YESEXPR) is broken.
25821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether YESEXPR works" >&5
25822 $as_echo_n "checking whether YESEXPR works... " >&6; }
25823 if ${gl_cv_func_nl_langinfo_yesexpr_works+:} false; then :
25824 $as_echo_n "(cached) " >&6
25825 else
25826 if test "$cross_compiling" = yes; then :
25827
25828 case "$host_os" in
25829 # Guess no on irix systems.
25830 irix*) gl_cv_func_nl_langinfo_yesexpr_works="guessing no";;
25831 # Guess yes elsewhere.
25832 *) gl_cv_func_nl_langinfo_yesexpr_works="guessing yes";;
25833 esac
25834
25835 else
25836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25837 /* end confdefs.h. */
25838 #include <langinfo.h>
25839
25840 int
25841 main (void)
25842 {
25843 return !*nl_langinfo(YESEXPR);
25844
25845 ;
25846 return 0;
25847 }
25848 _ACEOF
25849 if ac_fn_c_try_run "$LINENO"; then :
25850 gl_cv_func_nl_langinfo_yesexpr_works=yes
25851 else
25852 gl_cv_func_nl_langinfo_yesexpr_works=no
25853 fi
25854 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25855 conftest.$ac_objext conftest.beam conftest.$ac_ext
25856 fi
25857
25858
25859 fi
25860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nl_langinfo_yesexpr_works" >&5
25861 $as_echo "$gl_cv_func_nl_langinfo_yesexpr_works" >&6; }
25862 case $gl_cv_func_nl_langinfo_yesexpr_works in
25863 *yes) FUNC_NL_LANGINFO_YESEXPR_WORKS=1 ;;
25864 *) FUNC_NL_LANGINFO_YESEXPR_WORKS=0 ;;
25865 esac
25866
25867 cat >>confdefs.h <<_ACEOF
25868 #define FUNC_NL_LANGINFO_YESEXPR_WORKS $FUNC_NL_LANGINFO_YESEXPR_WORKS
25869 _ACEOF
25870
25871 if test $HAVE_LANGINFO_CODESET = 1 \
25872 && test $HAVE_LANGINFO_T_FMT_AMPM = 1 \
25873 && test $HAVE_LANGINFO_ALTMON = 1 \
25874 && test $HAVE_LANGINFO_ERA = 1 \
25875 && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1; then
25876 :
25877 else
25878 REPLACE_NL_LANGINFO=1
25879
25880 $as_echo "#define REPLACE_NL_LANGINFO 1" >>confdefs.h
25881
25882 fi
25883 else
25884 HAVE_NL_LANGINFO=0
25885 fi
25886
25887 if test $HAVE_NL_LANGINFO = 0 || test $REPLACE_NL_LANGINFO = 1; then
25888
25889
25890
25891
25892
25893
25894
25895
25896 gl_LIBOBJS="$gl_LIBOBJS nl_langinfo.$ac_objext"
25897
25898 fi
25899
25900
25901
25902
25903
25904 GNULIB_NL_LANGINFO=1
25905
25906
25907
25908
25909
25910 $as_echo "#define GNULIB_TEST_NL_LANGINFO 1" >>confdefs.h
25911
25912
25913
25914
25915
25916
25917 case "$host_os" in
25918 mingw* | pw*)
25919 REPLACE_OPEN=1
25920 ;;
25921 *)
25922
25923 if test "$gl_cv_macro_O_CLOEXEC" != yes; then
25924 REPLACE_OPEN=1
25925 fi
25926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
25927 $as_echo_n "checking whether open recognizes a trailing slash... " >&6; }
25928 if ${gl_cv_func_open_slash+:} false; then :
25929 $as_echo_n "(cached) " >&6
25930 else
25931 # Assume that if we have lstat, we can also check symlinks.
25932 if test $ac_cv_func_lstat = yes; then
25933 touch conftest.tmp
25934 ln -s conftest.tmp conftest.lnk
25935 fi
25936 if test "$cross_compiling" = yes; then :
25937
25938 case "$host_os" in
25939 freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
25940 gl_cv_func_open_slash="guessing no" ;;
25941 *)
25942 gl_cv_func_open_slash="guessing yes" ;;
25943 esac
25944
25945 else
25946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25947 /* end confdefs.h. */
25948
25949 #include <fcntl.h>
25950 #if HAVE_UNISTD_H
25951 # include <unistd.h>
25952 #endif
25953 int main ()
25954 {
25955 int result = 0;
25956 #if HAVE_LSTAT
25957 if (open ("conftest.lnk/", O_RDONLY) != -1)
25958 result |= 1;
25959 #endif
25960 if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
25961 result |= 2;
25962 return result;
25963 }
25964 _ACEOF
25965 if ac_fn_c_try_run "$LINENO"; then :
25966 gl_cv_func_open_slash=yes
25967 else
25968 gl_cv_func_open_slash=no
25969 fi
25970 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25971 conftest.$ac_objext conftest.beam conftest.$ac_ext
25972 fi
25973
25974 rm -f conftest.sl conftest.tmp conftest.lnk
25975
25976 fi
25977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
25978 $as_echo "$gl_cv_func_open_slash" >&6; }
25979 case "$gl_cv_func_open_slash" in
25980 *no)
25981
25982 $as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
25983
25984 REPLACE_OPEN=1
25985 ;;
25986 esac
25987 ;;
25988 esac
25989
25990 if test $REPLACE_OPEN = 0; then
25991
25992
25993
25994 if test $ac_cv_func_fchdir = no; then
25995 HAVE_FCHDIR=0
25996 fi
25997
25998 if test $HAVE_FCHDIR = 0; then
25999 REPLACE_OPEN=1
26000 fi
26001 fi
26002
26003
26004
26005 if test $REPLACE_OPEN = 1; then
26006
26007
26008
26009
26010
26011
26012
26013
26014 gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
26015
26016
26017
26018 :
26019
26020 fi
26021
26022
26023
26024
26025
26026 GNULIB_OPEN=1
26027
26028
26029
26030
26031
26032 $as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h
26033
26034
26035
26036
26037
26038
26039
26040
26041
26042 case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink+$gl_cv_macro_O_CLOEXEC in
26043 yes+*yes+yes)
26044 ;;
26045 yes+*)
26046 # Solaris 10 lacks O_CLOEXEC.
26047 # Solaris 9 has *at functions, but uniformly mishandles trailing
26048 # slash in all of them.
26049 REPLACE_OPENAT=1
26050 ;;
26051 *)
26052 HAVE_OPENAT=0
26053 ;;
26054 esac
26055
26056 if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then
26057
26058
26059
26060
26061
26062
26063
26064
26065 gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext"
26066
26067
26068
26069 :
26070
26071 fi
26072
26073
26074 cat >>confdefs.h <<_ACEOF
26075 #define GNULIB_OPENAT 1
26076 _ACEOF
26077
26078
26079
26080
26081
26082
26083 GNULIB_OPENAT=1
26084
26085
26086
26087
26088
26089 $as_echo "#define GNULIB_TEST_OPENAT 1" >>confdefs.h
26090
26091
26092
26093
26094
26095
26096 ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
26097 "
26098 if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
26099 ac_have_decl=1
26100 else
26101 ac_have_decl=0
26102 fi
26103
26104 cat >>confdefs.h <<_ACEOF
26105 #define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
26106 _ACEOF
26107
26108 ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
26109 "
26110 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
26111 ac_have_decl=1
26112 else
26113 ac_have_decl=0
26114 fi
26115
26116 cat >>confdefs.h <<_ACEOF
26117 #define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
26118 _ACEOF
26119
26120
26121
26122
26123
26124 for ac_func in rawmemchr
26125 do :
26126 ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
26127 if test "x$ac_cv_func_rawmemchr" = xyes; then :
26128 cat >>confdefs.h <<_ACEOF
26129 #define HAVE_RAWMEMCHR 1
26130 _ACEOF
26131
26132 fi
26133 done
26134
26135 if test $ac_cv_func_rawmemchr = no; then
26136 HAVE_RAWMEMCHR=0
26137 fi
26138
26139 if test $HAVE_RAWMEMCHR = 0; then
26140
26141
26142
26143
26144
26145
26146
26147
26148 gl_LIBOBJS="$gl_LIBOBJS rawmemchr.$ac_objext"
26149
26150 :
26151 fi
26152
26153
26154
26155
26156
26157 GNULIB_RAWMEMCHR=1
26158
26159
26160
26161
26162
26163 $as_echo "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
26164
26165
26166
26167
26168
26169
26170 for ac_header in stdlib.h
26171 do :
26172 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
26173 if test "x$ac_cv_header_stdlib_h" = xyes; then :
26174 cat >>confdefs.h <<_ACEOF
26175 #define HAVE_STDLIB_H 1
26176 _ACEOF
26177
26178 fi
26179
26180 done
26181
26182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5
26183 $as_echo_n "checking for GNU libc compatible realloc... " >&6; }
26184 if ${ac_cv_func_realloc_0_nonnull+:} false; then :
26185 $as_echo_n "(cached) " >&6
26186 else
26187 if test "$cross_compiling" = yes; then :
26188 case "$host_os" in
26189 # Guess yes on platforms where we know the result.
26190 *-gnu* | gnu* | freebsd* | netbsd* | openbsd* \
26191 | hpux* | solaris* | cygwin* | mingw*)
26192 ac_cv_func_realloc_0_nonnull=yes ;;
26193 # If we don't know, assume the worst.
26194 *) ac_cv_func_realloc_0_nonnull=no ;;
26195 esac
26196
26197 else
26198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26199 /* end confdefs.h. */
26200 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
26201 # include <stdlib.h>
26202 #else
26203 char *realloc ();
26204 #endif
26205
26206 int
26207 main (void)
26208 {
26209 char *p = realloc (0, 0);
26210 int result = !p;
26211 free (p);
26212 return result;
26213 ;
26214 return 0;
26215 }
26216
26217 _ACEOF
26218 if ac_fn_c_try_run "$LINENO"; then :
26219 ac_cv_func_realloc_0_nonnull=yes
26220 else
26221 ac_cv_func_realloc_0_nonnull=no
26222 fi
26223 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26224 conftest.$ac_objext conftest.beam conftest.$ac_ext
26225 fi
26226
26227
26228 fi
26229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5
26230 $as_echo "$ac_cv_func_realloc_0_nonnull" >&6; }
26231 if test $ac_cv_func_realloc_0_nonnull = yes; then :
26232
26233 $as_echo "#define HAVE_REALLOC_GNU 1" >>confdefs.h
26234
26235 else
26236 $as_echo "#define HAVE_REALLOC_GNU 0" >>confdefs.h
26237
26238 REPLACE_REALLOC=1
26239
26240 fi
26241
26242
26243 if test $REPLACE_REALLOC = 1; then
26244
26245
26246
26247
26248
26249
26250
26251
26252 gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
26253
26254 fi
26255
26256
26257 cat >>confdefs.h <<_ACEOF
26258 #define GNULIB_REALLOC_GNU 1
26259 _ACEOF
26260
26261
26262
26263
26264
26265 if test $gl_cv_func_malloc_posix = yes; then
26266
26267 $as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h
26268
26269 else
26270 REPLACE_REALLOC=1
26271 fi
26272
26273 if test $REPLACE_REALLOC = 1; then
26274
26275
26276
26277
26278
26279
26280
26281
26282 gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
26283
26284 fi
26285
26286
26287
26288
26289
26290 GNULIB_REALLOC_POSIX=1
26291
26292
26293
26294
26295
26296 $as_echo "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
26297
26298
26299
26300
26301
26302 # Check whether --with-included-regex was given.
26303 if test "${with_included_regex+set}" = set; then :
26304 withval=$with_included_regex;
26305 fi
26306
26307
26308 case $with_included_regex in #(
26309 yes|no) ac_use_included_regex=$with_included_regex
26310 ;;
26311 '')
26312 # If the system regex support is good enough that it passes the
26313 # following run test, then default to *not* using the included regex.c.
26314 # If cross compiling, assume the test would fail and use the included
26315 # regex.c.
26316
26317
26318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working re_compile_pattern" >&5
26319 $as_echo_n "checking for working re_compile_pattern... " >&6; }
26320 if ${gl_cv_func_re_compile_pattern_working+:} false; then :
26321 $as_echo_n "(cached) " >&6
26322 else
26323 if test "$cross_compiling" = yes; then :
26324 case "$host_os" in
26325 # Guess no on native Windows.
26326 mingw*) gl_cv_func_re_compile_pattern_working="guessing no" ;;
26327 # Otherwise, assume it is not working.
26328 *) gl_cv_func_re_compile_pattern_working="guessing no" ;;
26329 esac
26330
26331 else
26332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26333 /* end confdefs.h. */
26334 #include <regex.h>
26335
26336 #include <locale.h>
26337 #include <limits.h>
26338 #include <string.h>
26339
26340 #if defined M_CHECK_ACTION || HAVE_DECL_ALARM
26341 # include <signal.h>
26342 # include <unistd.h>
26343 #endif
26344
26345 #if HAVE_MALLOC_H
26346 # include <malloc.h>
26347 #endif
26348
26349 #ifdef M_CHECK_ACTION
26350 /* Exit with distinguishable exit code. */
26351 static void sigabrt_no_core (int sig) { raise (SIGTERM); }
26352 #endif
26353
26354 int
26355 main (void)
26356 {
26357 int result = 0;
26358 static struct re_pattern_buffer regex;
26359 unsigned char folded_chars[UCHAR_MAX + 1];
26360 int i;
26361 const char *s;
26362 struct re_registers regs;
26363
26364 /* Some builds of glibc go into an infinite loop on this
26365 test. Use alarm to force death, and mallopt to avoid
26366 malloc recursion in diagnosing the corrupted heap. */
26367 #if HAVE_DECL_ALARM
26368 signal (SIGALRM, SIG_DFL);
26369 alarm (2);
26370 #endif
26371 #ifdef M_CHECK_ACTION
26372 signal (SIGABRT, sigabrt_no_core);
26373 mallopt (M_CHECK_ACTION, 2);
26374 #endif
26375
26376 if (setlocale (LC_ALL, "en_US.UTF-8"))
26377 {
26378 {
26379 /* https://sourceware.org/ml/libc-hacker/2006-09/msg00008.html
26380 This test needs valgrind to catch the bug on Debian
26381 GNU/Linux 3.1 x86, but it might catch the bug better
26382 on other platforms and it shouldn't hurt to try the
26383 test here. */
26384 static char const pat[] = "insert into";
26385 static char const data[] =
26386 "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK";
26387 re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
26388 | RE_ICASE);
26389 memset (&regex, 0, sizeof regex);
26390 s = re_compile_pattern (pat, sizeof pat - 1, &regex);
26391 if (s)
26392 result |= 1;
26393 else if (re_search (&regex, data, sizeof data - 1,
26394 0, sizeof data - 1, &regs)
26395 != -1)
26396 result |= 1;
26397 regfree (&regex);
26398 }
26399
26400 {
26401 /* This test is from glibc bug 15078.
26402 The test case is from Andreas Schwab in
26403 <https://sourceware.org/ml/libc-alpha/2013-01/msg00967.html>.
26404 */
26405 static char const pat[] = "[^x]x";
26406 static char const data[] =
26407 /* <U1000><U103B><U103D><U1014><U103A><U102F><U1015><U103A> */
26408 "\xe1\x80\x80"
26409 "\xe1\x80\xbb"
26410 "\xe1\x80\xbd"
26411 "\xe1\x80\x94"
26412 "\xe1\x80\xba"
26413 "\xe1\x80\xaf"
26414 "\xe1\x80\x95"
26415 "\xe1\x80\xba"
26416 "x";
26417 re_set_syntax (0);
26418 memset (&regex, 0, sizeof regex);
26419 s = re_compile_pattern (pat, sizeof pat - 1, &regex);
26420 if (s)
26421 result |= 1;
26422 else
26423 {
26424 i = re_search (&regex, data, sizeof data - 1,
26425 0, sizeof data - 1, 0);
26426 if (i != 0 && i != 21)
26427 result |= 1;
26428 }
26429 regfree (&regex);
26430 }
26431
26432 if (! setlocale (LC_ALL, "C"))
26433 return 1;
26434 }
26435
26436 /* This test is from glibc bug 3957, reported by Andrew Mackey. */
26437 re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE);
26438 memset (&regex, 0, sizeof regex);
26439 s = re_compile_pattern ("a[^x]b", 6, &regex);
26440 if (s)
26441 result |= 2;
26442 /* This should fail, but succeeds for glibc-2.5. */
26443 else if (re_search (&regex, "a\nb", 3, 0, 3, &regs) != -1)
26444 result |= 2;
26445
26446 /* This regular expression is from Spencer ere test number 75
26447 in grep-2.3. */
26448 re_set_syntax (RE_SYNTAX_POSIX_EGREP);
26449 memset (&regex, 0, sizeof regex);
26450 for (i = 0; i <= UCHAR_MAX; i++)
26451 folded_chars[i] = i;
26452 regex.translate = folded_chars;
26453 s = re_compile_pattern ("a[[:]:]]b\n", 11, &regex);
26454 /* This should fail with _Invalid character class name_ error. */
26455 if (!s)
26456 result |= 4;
26457
26458 /* Ensure that [b-a] is diagnosed as invalid, when
26459 using RE_NO_EMPTY_RANGES. */
26460 re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES);
26461 memset (&regex, 0, sizeof regex);
26462 s = re_compile_pattern ("a[b-a]", 6, &regex);
26463 if (s == 0)
26464 result |= 8;
26465
26466 /* This should succeed, but does not for glibc-2.1.3. */
26467 memset (&regex, 0, sizeof regex);
26468 s = re_compile_pattern ("{1", 2, &regex);
26469 if (s)
26470 result |= 8;
26471
26472 /* The following example is derived from a problem report
26473 against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>. */
26474 memset (&regex, 0, sizeof regex);
26475 s = re_compile_pattern ("[an\371]*n", 7, &regex);
26476 if (s)
26477 result |= 8;
26478 /* This should match, but does not for glibc-2.2.1. */
26479 else if (re_match (&regex, "an", 2, 0, &regs) != 2)
26480 result |= 8;
26481
26482 memset (&regex, 0, sizeof regex);
26483 s = re_compile_pattern ("x", 1, &regex);
26484 if (s)
26485 result |= 8;
26486 /* glibc-2.2.93 does not work with a negative RANGE argument. */
26487 else if (re_search (&regex, "wxy", 3, 2, -2, &regs) != 1)
26488 result |= 8;
26489
26490 /* The version of regex.c in older versions of gnulib
26491 ignored RE_ICASE. Detect that problem too. */
26492 re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE);
26493 memset (&regex, 0, sizeof regex);
26494 s = re_compile_pattern ("x", 1, &regex);
26495 if (s)
26496 result |= 16;
26497 else if (re_search (&regex, "WXY", 3, 0, 3, &regs) < 0)
26498 result |= 16;
26499
26500 /* Catch a bug reported by Vin Shelton in
26501 https://lists.gnu.org/r/bug-coreutils/2007-06/msg00089.html
26502 */
26503 re_set_syntax (RE_SYNTAX_POSIX_BASIC
26504 & ~RE_CONTEXT_INVALID_DUP
26505 & ~RE_NO_EMPTY_RANGES);
26506 memset (&regex, 0, sizeof regex);
26507 s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, &regex);
26508 if (s)
26509 result |= 32;
26510
26511 /* REG_STARTEND was added to glibc on 2004-01-15.
26512 Reject older versions. */
26513 if (! REG_STARTEND)
26514 result |= 64;
26515
26516 /* Matching with the compiled form of this regexp would provoke
26517 an assertion failure prior to glibc-2.28:
26518 regexec.c:1375: pop_fail_stack: Assertion 'num >= 0' failed
26519 With glibc-2.28, compilation fails and reports the invalid
26520 back reference. */
26521 re_set_syntax (RE_SYNTAX_POSIX_EGREP);
26522 memset (&regex, 0, sizeof regex);
26523 s = re_compile_pattern ("0|()0|\\1|0", 10, &regex);
26524 if (!s || strcmp (s, "Invalid back reference"))
26525 result |= 64;
26526
26527 #if 0
26528 /* It would be nice to reject hosts whose regoff_t values are too
26529 narrow (including glibc on hosts with 64-bit ptrdiff_t and
26530 32-bit int), but we should wait until glibc implements this
26531 feature. Otherwise, support for equivalence classes and
26532 multibyte collation symbols would always be broken except
26533 when compiling --without-included-regex. */
26534 if (sizeof (regoff_t) < sizeof (ptrdiff_t)
26535 || sizeof (regoff_t) < sizeof (ssize_t))
26536 result |= 64;
26537 #endif
26538
26539 return result;
26540
26541 ;
26542 return 0;
26543 }
26544 _ACEOF
26545 if ac_fn_c_try_run "$LINENO"; then :
26546 gl_cv_func_re_compile_pattern_working=yes
26547 else
26548 gl_cv_func_re_compile_pattern_working=no
26549 fi
26550 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26551 conftest.$ac_objext conftest.beam conftest.$ac_ext
26552 fi
26553
26554
26555 fi
26556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_re_compile_pattern_working" >&5
26557 $as_echo "$gl_cv_func_re_compile_pattern_working" >&6; }
26558 case "$gl_cv_func_re_compile_pattern_working" in #(
26559 *yes) ac_use_included_regex=no;; #(
26560 *no) ac_use_included_regex=yes;;
26561 esac
26562 ;;
26563 *) as_fn_error $? "Invalid value for --with-included-regex: $with_included_regex" "$LINENO" 5
26564 ;;
26565 esac
26566
26567 if test $ac_use_included_regex = yes; then
26568
26569 $as_echo "#define _REGEX_INCLUDE_LIMITS_H 1" >>confdefs.h
26570
26571
26572 $as_echo "#define _REGEX_LARGE_OFFSETS 1" >>confdefs.h
26573
26574
26575 $as_echo "#define re_syntax_options rpl_re_syntax_options" >>confdefs.h
26576
26577
26578 $as_echo "#define re_set_syntax rpl_re_set_syntax" >>confdefs.h
26579
26580
26581 $as_echo "#define re_compile_pattern rpl_re_compile_pattern" >>confdefs.h
26582
26583
26584 $as_echo "#define re_compile_fastmap rpl_re_compile_fastmap" >>confdefs.h
26585
26586
26587 $as_echo "#define re_search rpl_re_search" >>confdefs.h
26588
26589
26590 $as_echo "#define re_search_2 rpl_re_search_2" >>confdefs.h
26591
26592
26593 $as_echo "#define re_match rpl_re_match" >>confdefs.h
26594
26595
26596 $as_echo "#define re_match_2 rpl_re_match_2" >>confdefs.h
26597
26598
26599 $as_echo "#define re_set_registers rpl_re_set_registers" >>confdefs.h
26600
26601
26602 $as_echo "#define re_comp rpl_re_comp" >>confdefs.h
26603
26604
26605 $as_echo "#define re_exec rpl_re_exec" >>confdefs.h
26606
26607
26608 $as_echo "#define regcomp rpl_regcomp" >>confdefs.h
26609
26610
26611 $as_echo "#define regexec rpl_regexec" >>confdefs.h
26612
26613
26614 $as_echo "#define regerror rpl_regerror" >>confdefs.h
26615
26616
26617 $as_echo "#define regfree rpl_regfree" >>confdefs.h
26618
26619 fi
26620
26621 if test $ac_use_included_regex = yes; then
26622
26623
26624
26625
26626
26627
26628
26629
26630 gl_LIBOBJS="$gl_LIBOBJS regex.$ac_objext"
26631
26632
26633
26634
26635
26636
26637
26638
26639 for ac_header in libintl.h
26640 do :
26641 ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
26642 if test "x$ac_cv_header_libintl_h" = xyes; then :
26643 cat >>confdefs.h <<_ACEOF
26644 #define HAVE_LIBINTL_H 1
26645 _ACEOF
26646
26647 fi
26648
26649 done
26650
26651
26652 ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
26653 "
26654 if test "x$ac_cv_have_decl_isblank" = xyes; then :
26655 ac_have_decl=1
26656 else
26657 ac_have_decl=0
26658 fi
26659
26660 cat >>confdefs.h <<_ACEOF
26661 #define HAVE_DECL_ISBLANK $ac_have_decl
26662 _ACEOF
26663
26664
26665 fi
26666
26667
26668
26669
26670 for ac_header in stdint.h
26671 do :
26672 ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
26673 if test "x$ac_cv_header_stdint_h" = xyes; then :
26674 cat >>confdefs.h <<_ACEOF
26675 #define HAVE_STDINT_H 1
26676 _ACEOF
26677
26678 fi
26679
26680 done
26681
26682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5
26683 $as_echo_n "checking for SIZE_MAX... " >&6; }
26684 if ${gl_cv_size_max+:} false; then :
26685 $as_echo_n "(cached) " >&6
26686 else
26687
26688 gl_cv_size_max=
26689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26690 /* end confdefs.h. */
26691
26692 #include <limits.h>
26693 #if HAVE_STDINT_H
26694 #include <stdint.h>
26695 #endif
26696 #ifdef SIZE_MAX
26697 Found it
26698 #endif
26699
26700 _ACEOF
26701 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26702 $EGREP "Found it" >/dev/null 2>&1; then :
26703 gl_cv_size_max=yes
26704 fi
26705 rm -f conftest*
26706
26707 if test -z "$gl_cv_size_max"; then
26708 if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1" "#include <stddef.h>
26709 #include <limits.h>"; then :
26710
26711 else
26712 size_t_bits_minus_1=
26713 fi
26714
26715 if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint" "#include <stddef.h>"; then :
26716
26717 else
26718 fits_in_uint=
26719 fi
26720
26721 if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
26722 if test $fits_in_uint = 1; then
26723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26724 /* end confdefs.h. */
26725 #include <stddef.h>
26726 extern size_t foo;
26727 extern unsigned long foo;
26728
26729 int
26730 main (void)
26731 {
26732
26733 ;
26734 return 0;
26735 }
26736 _ACEOF
26737 if ac_fn_c_try_compile "$LINENO"; then :
26738 fits_in_uint=0
26739 fi
26740 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26741 fi
26742 if test $fits_in_uint = 1; then
26743 gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
26744 else
26745 gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
26746 fi
26747 else
26748 gl_cv_size_max='((size_t)~(size_t)0)'
26749 fi
26750 fi
26751
26752 fi
26753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5
26754 $as_echo "$gl_cv_size_max" >&6; }
26755 if test "$gl_cv_size_max" != yes; then
26756
26757 cat >>confdefs.h <<_ACEOF
26758 #define SIZE_MAX $gl_cv_size_max
26759 _ACEOF
26760
26761 fi
26762
26763
26764
26765
26766 ac_fn_c_check_decl "$LINENO" "sleep" "ac_cv_have_decl_sleep" "#include <unistd.h>
26767 "
26768 if test "x$ac_cv_have_decl_sleep" = xyes; then :
26769 ac_have_decl=1
26770 else
26771 ac_have_decl=0
26772 fi
26773
26774 cat >>confdefs.h <<_ACEOF
26775 #define HAVE_DECL_SLEEP $ac_have_decl
26776 _ACEOF
26777
26778
26779 if test $ac_cv_have_decl_sleep != yes; then
26780 HAVE_SLEEP=0
26781 else
26782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working sleep" >&5
26783 $as_echo_n "checking for working sleep... " >&6; }
26784 if ${gl_cv_func_sleep_works+:} false; then :
26785 $as_echo_n "(cached) " >&6
26786 else
26787 if test "$cross_compiling" = yes; then :
26788 case "$host_os" in
26789 # Guess yes on glibc systems.
26790 *-gnu* | gnu*) gl_cv_func_sleep_works="guessing yes" ;;
26791 # Guess no on native Windows.
26792 mingw*) gl_cv_func_sleep_works="guessing no" ;;
26793 # If we don't know, assume the worst.
26794 *) gl_cv_func_sleep_works="guessing no" ;;
26795 esac
26796
26797 else
26798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26799 /* end confdefs.h. */
26800
26801 #include <errno.h>
26802 #include <unistd.h>
26803 #include <signal.h>
26804 static void
26805 handle_alarm (int sig)
26806 {
26807 if (sig != SIGALRM)
26808 _exit (2);
26809 }
26810
26811 int
26812 main (void)
26813 {
26814
26815 /* Failure to compile this test due to missing alarm is okay,
26816 since all such platforms (mingw) also lack sleep. */
26817 unsigned int pentecost = 50 * 24 * 60 * 60; /* 50 days. */
26818 unsigned int remaining;
26819 signal (SIGALRM, handle_alarm);
26820 alarm (1);
26821 remaining = sleep (pentecost);
26822 if (remaining > pentecost)
26823 return 3;
26824 if (remaining <= pentecost - 10)
26825 return 4;
26826 return 0;
26827
26828 ;
26829 return 0;
26830 }
26831 _ACEOF
26832 if ac_fn_c_try_run "$LINENO"; then :
26833 gl_cv_func_sleep_works=yes
26834 else
26835 gl_cv_func_sleep_works=no
26836 fi
26837 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26838 conftest.$ac_objext conftest.beam conftest.$ac_ext
26839 fi
26840
26841 fi
26842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_sleep_works" >&5
26843 $as_echo "$gl_cv_func_sleep_works" >&6; }
26844 case "$gl_cv_func_sleep_works" in
26845 *yes) ;;
26846 *)
26847 REPLACE_SLEEP=1
26848 ;;
26849 esac
26850 fi
26851
26852 if test $HAVE_SLEEP = 0 || test $REPLACE_SLEEP = 1; then
26853
26854
26855
26856
26857
26858
26859
26860
26861 gl_LIBOBJS="$gl_LIBOBJS sleep.$ac_objext"
26862
26863 fi
26864
26865
26866
26867
26868
26869 GNULIB_SLEEP=1
26870
26871
26872
26873
26874
26875 $as_echo "#define GNULIB_TEST_SLEEP 1" >>confdefs.h
26876
26877
26878
26879
26880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
26881 $as_echo_n "checking for ssize_t... " >&6; }
26882 if ${gt_cv_ssize_t+:} false; then :
26883 $as_echo_n "(cached) " >&6
26884 else
26885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26886 /* end confdefs.h. */
26887 #include <sys/types.h>
26888 int
26889 main (void)
26890 {
26891 int x = sizeof (ssize_t *) + sizeof (ssize_t);
26892 return !x;
26893 ;
26894 return 0;
26895 }
26896 _ACEOF
26897 if ac_fn_c_try_compile "$LINENO"; then :
26898 gt_cv_ssize_t=yes
26899 else
26900 gt_cv_ssize_t=no
26901 fi
26902 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26903 fi
26904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
26905 $as_echo "$gt_cv_ssize_t" >&6; }
26906 if test $gt_cv_ssize_t = no; then
26907
26908 $as_echo "#define ssize_t int" >>confdefs.h
26909
26910 fi
26911
26912
26913
26914
26915
26916 case "$host_os" in
26917 mingw*)
26918 REPLACE_STAT=1
26919 ;;
26920 *)
26921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
26922 $as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
26923 if ${gl_cv_func_stat_file_slash+:} false; then :
26924 $as_echo_n "(cached) " >&6
26925 else
26926 touch conftest.tmp
26927 # Assume that if we have lstat, we can also check symlinks.
26928 if test $ac_cv_func_lstat = yes; then
26929 ln -s conftest.tmp conftest.lnk
26930 fi
26931 if test "$cross_compiling" = yes; then :
26932 case "$host_os" in
26933 # Guess yes on Linux systems.
26934 linux-* | linux) gl_cv_func_stat_file_slash="guessing yes" ;;
26935 # Guess yes on glibc systems.
26936 *-gnu* | gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
26937 # If we don't know, assume the worst.
26938 *) gl_cv_func_stat_file_slash="guessing no" ;;
26939 esac
26940
26941 else
26942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26943 /* end confdefs.h. */
26944 #include <sys/stat.h>
26945
26946 int
26947 main (void)
26948 {
26949 int result = 0;
26950 struct stat st;
26951 if (!stat ("conftest.tmp/", &st))
26952 result |= 1;
26953 #if HAVE_LSTAT
26954 if (!stat ("conftest.lnk/", &st))
26955 result |= 2;
26956 #endif
26957 return result;
26958
26959 ;
26960 return 0;
26961 }
26962 _ACEOF
26963 if ac_fn_c_try_run "$LINENO"; then :
26964 gl_cv_func_stat_file_slash=yes
26965 else
26966 gl_cv_func_stat_file_slash=no
26967 fi
26968 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26969 conftest.$ac_objext conftest.beam conftest.$ac_ext
26970 fi
26971
26972 rm -f conftest.tmp conftest.lnk
26973 fi
26974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
26975 $as_echo "$gl_cv_func_stat_file_slash" >&6; }
26976 case $gl_cv_func_stat_file_slash in
26977 *no)
26978 REPLACE_STAT=1
26979
26980 $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
26981 ;;
26982 esac
26983 case $host_os in
26984 solaris*)
26985 REPLACE_FSTAT=1 ;;
26986 esac
26987 ;;
26988 esac
26989
26990 if test $REPLACE_STAT = 1; then
26991
26992
26993
26994
26995
26996
26997
26998
26999 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
27000
27001 case "$host_os" in
27002 mingw*)
27003
27004
27005
27006
27007
27008
27009
27010
27011 gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
27012
27013 ;;
27014 esac
27015
27016
27017 :
27018
27019 fi
27020
27021
27022
27023
27024
27025 GNULIB_STAT=1
27026
27027
27028
27029
27030
27031 $as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h
27032
27033
27034
27035
27036
27037
27038
27039 ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.tv_nsec" "ac_cv_member_struct_stat_st_atim_tv_nsec" "#include <sys/types.h>
27040 #include <sys/stat.h>
27041 "
27042 if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes; then :
27043
27044 cat >>confdefs.h <<_ACEOF
27045 #define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
27046 _ACEOF
27047
27048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
27049 $as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
27050 if ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+:} false; then :
27051 $as_echo_n "(cached) " >&6
27052 else
27053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27054 /* end confdefs.h. */
27055
27056 #include <sys/types.h>
27057 #include <sys/stat.h>
27058 #if HAVE_SYS_TIME_H
27059 # include <sys/time.h>
27060 #endif
27061 #include <time.h>
27062 struct timespec ts;
27063 struct stat st;
27064
27065 int
27066 main (void)
27067 {
27068
27069 st.st_atim = ts;
27070
27071 ;
27072 return 0;
27073 }
27074 _ACEOF
27075 if ac_fn_c_try_compile "$LINENO"; then :
27076 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
27077 else
27078 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
27079 fi
27080 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27081 fi
27082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
27083 $as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
27084 if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
27085
27086 $as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
27087
27088 fi
27089 else
27090 ac_fn_c_check_member "$LINENO" "struct stat" "st_atimespec.tv_nsec" "ac_cv_member_struct_stat_st_atimespec_tv_nsec" "#include <sys/types.h>
27091 #include <sys/stat.h>
27092 "
27093 if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes; then :
27094
27095 cat >>confdefs.h <<_ACEOF
27096 #define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
27097 _ACEOF
27098
27099
27100 else
27101 ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
27102 #include <sys/stat.h>
27103 "
27104 if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes; then :
27105
27106 cat >>confdefs.h <<_ACEOF
27107 #define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
27108 _ACEOF
27109
27110
27111 else
27112 ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.st__tim.tv_nsec" "ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" "#include <sys/types.h>
27113 #include <sys/stat.h>
27114 "
27115 if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes; then :
27116
27117 cat >>confdefs.h <<_ACEOF
27118 #define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
27119 _ACEOF
27120
27121
27122 fi
27123
27124 fi
27125
27126 fi
27127
27128 fi
27129
27130
27131
27132
27133
27134 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimespec.tv_nsec" "ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" "#include <sys/types.h>
27135 #include <sys/stat.h>
27136 "
27137 if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes; then :
27138
27139 cat >>confdefs.h <<_ACEOF
27140 #define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
27141 _ACEOF
27142
27143
27144 else
27145 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
27146 #include <sys/stat.h>
27147 "
27148 if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes; then :
27149
27150 cat >>confdefs.h <<_ACEOF
27151 #define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
27152 _ACEOF
27153
27154
27155 else
27156 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtim.tv_nsec" "ac_cv_member_struct_stat_st_birthtim_tv_nsec" "#include <sys/types.h>
27157 #include <sys/stat.h>
27158 "
27159 if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes; then :
27160
27161 cat >>confdefs.h <<_ACEOF
27162 #define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
27163 _ACEOF
27164
27165
27166 fi
27167
27168 fi
27169
27170 fi
27171
27172
27173
27174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
27175 $as_echo_n "checking for working stdalign.h... " >&6; }
27176 if ${gl_cv_header_working_stdalign_h+:} false; then :
27177 $as_echo_n "(cached) " >&6
27178 else
27179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27180 /* end confdefs.h. */
27181 #include <stdalign.h>
27182 #include <stddef.h>
27183
27184 /* Test that alignof yields a result consistent with offsetof.
27185 This catches GCC bug 52023
27186 <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
27187 #ifdef __cplusplus
27188 template <class t> struct alignof_helper { char a; t b; };
27189 # define ao(type) offsetof (alignof_helper<type>, b)
27190 #else
27191 # define ao(type) offsetof (struct { char a; type b; }, b)
27192 #endif
27193 char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
27194 char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
27195 char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
27196
27197 /* Test _Alignas only on platforms where gnulib can help. */
27198 #if \
27199 ((defined __cplusplus && 201103 <= __cplusplus) \
27200 || (defined __APPLE__ && defined __MACH__ \
27201 ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
27202 : __GNUC__) \
27203 || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \
27204 || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__ \
27205 || 1300 <= _MSC_VER)
27206 struct alignas_test { char c; char alignas (8) alignas_8; };
27207 char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
27208 ? 1 : -1];
27209 #endif
27210
27211 int
27212 main (void)
27213 {
27214
27215 ;
27216 return 0;
27217 }
27218 _ACEOF
27219 if ac_fn_c_try_compile "$LINENO"; then :
27220 gl_cv_header_working_stdalign_h=yes
27221 else
27222 gl_cv_header_working_stdalign_h=no
27223 fi
27224 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27225 fi
27226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
27227 $as_echo "$gl_cv_header_working_stdalign_h" >&6; }
27228
27229 if test $gl_cv_header_working_stdalign_h = yes; then
27230 STDALIGN_H=''
27231 else
27232 STDALIGN_H='stdalign.h'
27233 fi
27234
27235
27236 if test -n "$STDALIGN_H"; then
27237 GL_GENERATE_STDALIGN_H_TRUE=
27238 GL_GENERATE_STDALIGN_H_FALSE='#'
27239 else
27240 GL_GENERATE_STDALIGN_H_TRUE='#'
27241 GL_GENERATE_STDALIGN_H_FALSE=
27242 fi
27243
27244
27245
27246
27247
27248 # Define two additional variables used in the Makefile substitution.
27249
27250 if test "$ac_cv_header_stdbool_h" = yes; then
27251 STDBOOL_H=''
27252 else
27253 STDBOOL_H='stdbool.h'
27254 fi
27255
27256 if test -n "$STDBOOL_H"; then
27257 GL_GENERATE_STDBOOL_H_TRUE=
27258 GL_GENERATE_STDBOOL_H_FALSE='#'
27259 else
27260 GL_GENERATE_STDBOOL_H_TRUE='#'
27261 GL_GENERATE_STDBOOL_H_FALSE=
27262 fi
27263
27264
27265 if test "$ac_cv_type__Bool" = yes; then
27266 HAVE__BOOL=1
27267 else
27268 HAVE__BOOL=0
27269 fi
27270
27271
27272
27273
27274
27275 STDDEF_H=
27276
27277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5
27278 $as_echo_n "checking for good max_align_t... " >&6; }
27279 if ${gl_cv_type_max_align_t+:} false; then :
27280 $as_echo_n "(cached) " >&6
27281 else
27282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27283 /* end confdefs.h. */
27284 #include <stddef.h>
27285 unsigned int s = sizeof (max_align_t);
27286 #if defined __GNUC__ || defined __IBM__ALIGNOF__
27287 int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
27288 int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1];
27289 #endif
27290
27291 int
27292 main (void)
27293 {
27294
27295 ;
27296 return 0;
27297 }
27298 _ACEOF
27299 if ac_fn_c_try_compile "$LINENO"; then :
27300 gl_cv_type_max_align_t=yes
27301 else
27302 gl_cv_type_max_align_t=no
27303 fi
27304 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27305
27306 fi
27307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5
27308 $as_echo "$gl_cv_type_max_align_t" >&6; }
27309 if test $gl_cv_type_max_align_t = no; then
27310 HAVE_MAX_ALIGN_T=0
27311 STDDEF_H=stddef.h
27312 fi
27313
27314 if test $gt_cv_c_wchar_t = no; then
27315 HAVE_WCHAR_T=0
27316 STDDEF_H=stddef.h
27317 fi
27318
27319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
27320 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
27321 if ${gl_cv_decl_null_works+:} false; then :
27322 $as_echo_n "(cached) " >&6
27323 else
27324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27325 /* end confdefs.h. */
27326 #include <stddef.h>
27327 int test[2 * (sizeof NULL == sizeof (void *)) -1];
27328
27329 int
27330 main (void)
27331 {
27332
27333 ;
27334 return 0;
27335 }
27336 _ACEOF
27337 if ac_fn_c_try_compile "$LINENO"; then :
27338 gl_cv_decl_null_works=yes
27339 else
27340 gl_cv_decl_null_works=no
27341 fi
27342 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27343 fi
27344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
27345 $as_echo "$gl_cv_decl_null_works" >&6; }
27346 if test $gl_cv_decl_null_works = no; then
27347 REPLACE_NULL=1
27348 STDDEF_H=stddef.h
27349 fi
27350
27351
27352 if test -n "$STDDEF_H"; then
27353 GL_GENERATE_STDDEF_H_TRUE=
27354 GL_GENERATE_STDDEF_H_FALSE='#'
27355 else
27356 GL_GENERATE_STDDEF_H_TRUE='#'
27357 GL_GENERATE_STDDEF_H_FALSE=
27358 fi
27359
27360 if test -n "$STDDEF_H"; then
27361
27362
27363
27364
27365
27366
27367
27368
27369 if test $gl_cv_have_include_next = yes; then
27370 gl_cv_next_stddef_h='<'stddef.h'>'
27371 else
27372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
27373 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
27374 if ${gl_cv_next_stddef_h+:} false; then :
27375 $as_echo_n "(cached) " >&6
27376 else
27377
27378
27379
27380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27381 /* end confdefs.h. */
27382 #include <stddef.h>
27383 _ACEOF
27384 case "$host_os" in
27385 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27386 *) gl_absname_cpp="$ac_cpp" ;;
27387 esac
27388
27389 case "$host_os" in
27390 mingw*)
27391 gl_dirsep_regex='[/\\]'
27392 ;;
27393 *)
27394 gl_dirsep_regex='\/'
27395 ;;
27396 esac
27397 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27398 gl_header_literal_regex=`echo 'stddef.h' \
27399 | sed -e "$gl_make_literal_regex_sed"`
27400 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27401 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27402 s|^/[^/]|//&|
27403 p
27404 q
27405 }'
27406
27407 gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27408 sed -n "$gl_absolute_header_sed"`
27409
27410 gl_header=$gl_cv_absolute_stddef_h
27411 gl_cv_next_stddef_h='"'$gl_header'"'
27412
27413
27414 fi
27415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
27416 $as_echo "$gl_cv_next_stddef_h" >&6; }
27417 fi
27418 NEXT_STDDEF_H=$gl_cv_next_stddef_h
27419
27420 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27421 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27422 gl_next_as_first_directive='<'stddef.h'>'
27423 else
27424 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27425 gl_next_as_first_directive=$gl_cv_next_stddef_h
27426 fi
27427 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
27428
27429
27430
27431
27432 fi
27433
27434
27435
27436
27437 $as_echo "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
27438
27439
27440
27441
27442
27443
27444
27445
27446
27447
27448 if test $gl_cv_have_include_next = yes; then
27449 gl_cv_next_stdio_h='<'stdio.h'>'
27450 else
27451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
27452 $as_echo_n "checking absolute name of <stdio.h>... " >&6; }
27453 if ${gl_cv_next_stdio_h+:} false; then :
27454 $as_echo_n "(cached) " >&6
27455 else
27456
27457
27458
27459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27460 /* end confdefs.h. */
27461 #include <stdio.h>
27462 _ACEOF
27463 case "$host_os" in
27464 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27465 *) gl_absname_cpp="$ac_cpp" ;;
27466 esac
27467
27468 case "$host_os" in
27469 mingw*)
27470 gl_dirsep_regex='[/\\]'
27471 ;;
27472 *)
27473 gl_dirsep_regex='\/'
27474 ;;
27475 esac
27476 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27477 gl_header_literal_regex=`echo 'stdio.h' \
27478 | sed -e "$gl_make_literal_regex_sed"`
27479 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27480 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27481 s|^/[^/]|//&|
27482 p
27483 q
27484 }'
27485
27486 gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27487 sed -n "$gl_absolute_header_sed"`
27488
27489 gl_header=$gl_cv_absolute_stdio_h
27490 gl_cv_next_stdio_h='"'$gl_header'"'
27491
27492
27493 fi
27494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
27495 $as_echo "$gl_cv_next_stdio_h" >&6; }
27496 fi
27497 NEXT_STDIO_H=$gl_cv_next_stdio_h
27498
27499 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27500 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27501 gl_next_as_first_directive='<'stdio.h'>'
27502 else
27503 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27504 gl_next_as_first_directive=$gl_cv_next_stdio_h
27505 fi
27506 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
27507
27508
27509
27510
27511
27512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
27513 $as_echo_n "checking which flavor of printf attribute matches inttypes macros... " >&6; }
27514 if ${gl_cv_func_printf_attribute_flavor+:} false; then :
27515 $as_echo_n "(cached) " >&6
27516 else
27517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27518 /* end confdefs.h. */
27519
27520 #define __STDC_FORMAT_MACROS 1
27521 #include <stdio.h>
27522 #include <inttypes.h>
27523 /* For non-mingw systems, compilation will trivially succeed.
27524 For mingw, compilation will succeed for older mingw (system
27525 printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
27526 #if (defined _WIN32 && ! defined __CYGWIN__) && \
27527 (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
27528 extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
27529 #endif
27530
27531 int
27532 main (void)
27533 {
27534
27535 ;
27536 return 0;
27537 }
27538 _ACEOF
27539 if ac_fn_c_try_compile "$LINENO"; then :
27540 gl_cv_func_printf_attribute_flavor=system
27541 else
27542 gl_cv_func_printf_attribute_flavor=gnu
27543 fi
27544 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27545 fi
27546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
27547 $as_echo "$gl_cv_func_printf_attribute_flavor" >&6; }
27548 if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
27549
27550 $as_echo "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
27551
27552 fi
27553
27554 GNULIB_FSCANF=1
27555
27556
27557 cat >>confdefs.h <<_ACEOF
27558 #define GNULIB_FSCANF 1
27559 _ACEOF
27560
27561
27562 GNULIB_SCANF=1
27563
27564
27565 cat >>confdefs.h <<_ACEOF
27566 #define GNULIB_SCANF 1
27567 _ACEOF
27568
27569
27570 GNULIB_FGETC=1
27571 GNULIB_GETC=1
27572 GNULIB_GETCHAR=1
27573 GNULIB_FGETS=1
27574 GNULIB_FREAD=1
27575
27576
27577 GNULIB_FPRINTF=1
27578 GNULIB_PRINTF=1
27579 GNULIB_VFPRINTF=1
27580 GNULIB_VPRINTF=1
27581 GNULIB_FPUTC=1
27582 GNULIB_PUTC=1
27583 GNULIB_PUTCHAR=1
27584 GNULIB_FPUTS=1
27585 GNULIB_PUTS=1
27586 GNULIB_FWRITE=1
27587
27588
27589
27590
27591
27592
27593
27594
27595
27596
27597
27598
27599
27600
27601
27602
27603
27604 if test $gl_cv_have_include_next = yes; then
27605 gl_cv_next_stdlib_h='<'stdlib.h'>'
27606 else
27607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
27608 $as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
27609 if ${gl_cv_next_stdlib_h+:} false; then :
27610 $as_echo_n "(cached) " >&6
27611 else
27612
27613
27614
27615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27616 /* end confdefs.h. */
27617 #include <stdlib.h>
27618 _ACEOF
27619 case "$host_os" in
27620 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27621 *) gl_absname_cpp="$ac_cpp" ;;
27622 esac
27623
27624 case "$host_os" in
27625 mingw*)
27626 gl_dirsep_regex='[/\\]'
27627 ;;
27628 *)
27629 gl_dirsep_regex='\/'
27630 ;;
27631 esac
27632 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27633 gl_header_literal_regex=`echo 'stdlib.h' \
27634 | sed -e "$gl_make_literal_regex_sed"`
27635 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27636 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27637 s|^/[^/]|//&|
27638 p
27639 q
27640 }'
27641
27642 gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27643 sed -n "$gl_absolute_header_sed"`
27644
27645 gl_header=$gl_cv_absolute_stdlib_h
27646 gl_cv_next_stdlib_h='"'$gl_header'"'
27647
27648
27649 fi
27650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
27651 $as_echo "$gl_cv_next_stdlib_h" >&6; }
27652 fi
27653 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
27654
27655 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27656 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27657 gl_next_as_first_directive='<'stdlib.h'>'
27658 else
27659 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27660 gl_next_as_first_directive=$gl_cv_next_stdlib_h
27661 fi
27662 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
27663
27664
27665
27666
27667
27668
27669
27670
27671
27672
27673
27674
27675 for ac_func in strcasecmp
27676 do :
27677 ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
27678 if test "x$ac_cv_func_strcasecmp" = xyes; then :
27679 cat >>confdefs.h <<_ACEOF
27680 #define HAVE_STRCASECMP 1
27681 _ACEOF
27682
27683 fi
27684 done
27685
27686 if test $ac_cv_func_strcasecmp = no; then
27687 HAVE_STRCASECMP=0
27688 fi
27689
27690
27691
27692 for ac_func in strncasecmp
27693 do :
27694 ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp"
27695 if test "x$ac_cv_func_strncasecmp" = xyes; then :
27696 cat >>confdefs.h <<_ACEOF
27697 #define HAVE_STRNCASECMP 1
27698 _ACEOF
27699
27700 fi
27701 done
27702
27703 if test $ac_cv_func_strncasecmp = yes; then
27704 HAVE_STRNCASECMP=1
27705 else
27706 HAVE_STRNCASECMP=0
27707 fi
27708 ac_fn_c_check_decl "$LINENO" "strncasecmp" "ac_cv_have_decl_strncasecmp" "$ac_includes_default"
27709 if test "x$ac_cv_have_decl_strncasecmp" = xyes; then :
27710 ac_have_decl=1
27711 else
27712 ac_have_decl=0
27713 fi
27714
27715 cat >>confdefs.h <<_ACEOF
27716 #define HAVE_DECL_STRNCASECMP $ac_have_decl
27717 _ACEOF
27718
27719 if test $ac_cv_have_decl_strncasecmp = no; then
27720 HAVE_DECL_STRNCASECMP=0
27721 fi
27722
27723
27724 if test $HAVE_STRCASECMP = 0; then
27725
27726
27727
27728
27729
27730
27731
27732
27733 gl_LIBOBJS="$gl_LIBOBJS strcasecmp.$ac_objext"
27734
27735
27736 :
27737
27738 fi
27739 if test $HAVE_STRNCASECMP = 0; then
27740
27741
27742
27743
27744
27745
27746
27747
27748 gl_LIBOBJS="$gl_LIBOBJS strncasecmp.$ac_objext"
27749
27750
27751 :
27752
27753 fi
27754
27755
27756
27757
27758 for ac_func in strchrnul
27759 do :
27760 ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
27761 if test "x$ac_cv_func_strchrnul" = xyes; then :
27762 cat >>confdefs.h <<_ACEOF
27763 #define HAVE_STRCHRNUL 1
27764 _ACEOF
27765
27766 fi
27767 done
27768
27769 if test $ac_cv_func_strchrnul = no; then
27770 HAVE_STRCHRNUL=0
27771 else
27772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5
27773 $as_echo_n "checking whether strchrnul works... " >&6; }
27774 if ${gl_cv_func_strchrnul_works+:} false; then :
27775 $as_echo_n "(cached) " >&6
27776 else
27777 if test "$cross_compiling" = yes; then :
27778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27779 /* end confdefs.h. */
27780
27781 #if defined __CYGWIN__
27782 #include <cygwin/version.h>
27783 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9)
27784 Lucky user
27785 #endif
27786 #else
27787 Lucky user
27788 #endif
27789
27790 _ACEOF
27791 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27792 $EGREP "Lucky user" >/dev/null 2>&1; then :
27793 gl_cv_func_strchrnul_works="guessing yes"
27794 else
27795 gl_cv_func_strchrnul_works="guessing no"
27796 fi
27797 rm -f conftest*
27798
27799
27800 else
27801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27802 /* end confdefs.h. */
27803
27804 #include <string.h> /* for strchrnul */
27805
27806 int
27807 main (void)
27808 {
27809 const char *buf = "a";
27810 return strchrnul (buf, 'b') != buf + 1;
27811
27812 ;
27813 return 0;
27814 }
27815 _ACEOF
27816 if ac_fn_c_try_run "$LINENO"; then :
27817 gl_cv_func_strchrnul_works=yes
27818 else
27819 gl_cv_func_strchrnul_works=no
27820 fi
27821 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27822 conftest.$ac_objext conftest.beam conftest.$ac_ext
27823 fi
27824
27825
27826 fi
27827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strchrnul_works" >&5
27828 $as_echo "$gl_cv_func_strchrnul_works" >&6; }
27829 case "$gl_cv_func_strchrnul_works" in
27830 *yes) ;;
27831 *) REPLACE_STRCHRNUL=1 ;;
27832 esac
27833 fi
27834
27835 if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
27836
27837
27838
27839
27840
27841
27842
27843
27844 gl_LIBOBJS="$gl_LIBOBJS strchrnul.$ac_objext"
27845
27846 :
27847 fi
27848
27849
27850
27851
27852
27853 GNULIB_STRCHRNUL=1
27854
27855
27856
27857
27858
27859 $as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
27860
27861
27862
27863
27864
27865
27866
27867 if test $ac_cv_func_strdup = yes; then
27868 if test $gl_cv_func_malloc_posix != yes; then
27869 REPLACE_STRDUP=1
27870 fi
27871 fi
27872
27873 if test $ac_cv_have_decl_strdup = no; then
27874 HAVE_DECL_STRDUP=0
27875 fi
27876
27877 if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
27878
27879
27880
27881
27882
27883
27884
27885
27886 gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext"
27887
27888 :
27889 fi
27890
27891
27892
27893
27894
27895 GNULIB_STRDUP=1
27896
27897
27898
27899
27900
27901 $as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
27902
27903
27904
27905
27906
27907
27908
27909
27910 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
27911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
27912 $as_echo_n "checking for working strerror function... " >&6; }
27913 if ${gl_cv_func_working_strerror+:} false; then :
27914 $as_echo_n "(cached) " >&6
27915 else
27916 if test "$cross_compiling" = yes; then :
27917 case "$host_os" in
27918 # Guess yes on glibc systems.
27919 *-gnu* | gnu*) gl_cv_func_working_strerror="guessing yes" ;;
27920 # If we don't know, assume the worst.
27921 *) gl_cv_func_working_strerror="guessing no" ;;
27922 esac
27923
27924 else
27925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27926 /* end confdefs.h. */
27927 #include <string.h>
27928
27929 int
27930 main (void)
27931 {
27932 if (!*strerror (-2)) return 1;
27933 ;
27934 return 0;
27935 }
27936 _ACEOF
27937 if ac_fn_c_try_run "$LINENO"; then :
27938 gl_cv_func_working_strerror=yes
27939 else
27940 gl_cv_func_working_strerror=no
27941 fi
27942 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27943 conftest.$ac_objext conftest.beam conftest.$ac_ext
27944 fi
27945
27946
27947 fi
27948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
27949 $as_echo "$gl_cv_func_working_strerror" >&6; }
27950 case "$gl_cv_func_working_strerror" in
27951 *yes) ;;
27952 *)
27953 REPLACE_STRERROR=1
27954 ;;
27955 esac
27956
27957 else
27958 REPLACE_STRERROR=1
27959 fi
27960
27961 if test $REPLACE_STRERROR = 1; then
27962
27963
27964
27965
27966
27967
27968
27969
27970 gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
27971
27972 fi
27973
27974
27975 cat >>confdefs.h <<_ACEOF
27976 #define GNULIB_STRERROR 1
27977 _ACEOF
27978
27979
27980
27981
27982
27983
27984
27985 GNULIB_STRERROR=1
27986
27987
27988
27989
27990
27991 $as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
27992
27993
27994
27995
27996
27997 if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
27998
27999
28000
28001
28002
28003
28004
28005
28006 gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
28007
28008
28009
28010
28011
28012 if test $ac_cv_header_sys_socket_h != yes; then
28013 for ac_header in winsock2.h
28014 do :
28015 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
28016 if test "x$ac_cv_header_winsock2_h" = xyes; then :
28017 cat >>confdefs.h <<_ACEOF
28018 #define HAVE_WINSOCK2_H 1
28019 _ACEOF
28020
28021 fi
28022
28023 done
28024
28025 fi
28026 if test "$ac_cv_header_winsock2_h" = yes; then
28027 HAVE_WINSOCK2_H=1
28028 UNISTD_H_HAVE_WINSOCK2_H=1
28029 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
28030 else
28031 HAVE_WINSOCK2_H=0
28032 fi
28033
28034
28035 fi
28036
28037
28038
28039
28040
28041
28042
28043
28044
28045
28046
28047
28048 if test $ac_cv_have_decl_strndup = no; then
28049 HAVE_DECL_STRNDUP=0
28050 fi
28051
28052 if test $ac_cv_func_strndup = yes; then
28053 HAVE_STRNDUP=1
28054 # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'.
28055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strndup" >&5
28056 $as_echo_n "checking for working strndup... " >&6; }
28057 if ${gl_cv_func_strndup_works+:} false; then :
28058 $as_echo_n "(cached) " >&6
28059 else
28060 if test "$cross_compiling" = yes; then :
28061
28062 case $host_os in
28063 aix | aix[3-6]*) gl_cv_func_strndup_works="guessing no";;
28064 *) gl_cv_func_strndup_works="guessing yes";;
28065 esac
28066
28067 else
28068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28069 /* end confdefs.h. */
28070
28071 #include <string.h>
28072 #include <stdlib.h>
28073 int
28074 main (void)
28075 {
28076
28077 #if !HAVE_DECL_STRNDUP
28078 extern
28079 #ifdef __cplusplus
28080 "C"
28081 #endif
28082 char *strndup (const char *, size_t);
28083 #endif
28084 int result;
28085 char *s;
28086 s = strndup ("some longer string", 15);
28087 free (s);
28088 s = strndup ("shorter string", 13);
28089 result = s[13] != '\0';
28090 free (s);
28091 return result;
28092 ;
28093 return 0;
28094 }
28095 _ACEOF
28096 if ac_fn_c_try_run "$LINENO"; then :
28097 gl_cv_func_strndup_works=yes
28098 else
28099 gl_cv_func_strndup_works=no
28100 fi
28101 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28102 conftest.$ac_objext conftest.beam conftest.$ac_ext
28103 fi
28104
28105 fi
28106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strndup_works" >&5
28107 $as_echo "$gl_cv_func_strndup_works" >&6; }
28108 case $gl_cv_func_strndup_works in
28109 *no) REPLACE_STRNDUP=1 ;;
28110 esac
28111 else
28112 HAVE_STRNDUP=0
28113 fi
28114
28115 if test $HAVE_STRNDUP = 0 || test $REPLACE_STRNDUP = 1; then
28116
28117
28118
28119
28120
28121
28122
28123
28124 gl_LIBOBJS="$gl_LIBOBJS strndup.$ac_objext"
28125
28126 fi
28127
28128
28129
28130
28131
28132 GNULIB_STRNDUP=1
28133
28134
28135
28136
28137
28138 $as_echo "#define GNULIB_TEST_STRNDUP 1" >>confdefs.h
28139
28140
28141
28142
28143
28144
28145
28146
28147
28148 if test $ac_cv_have_decl_strnlen = no; then
28149 HAVE_DECL_STRNLEN=0
28150 else
28151
28152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5
28153 $as_echo_n "checking for working strnlen... " >&6; }
28154 if ${ac_cv_func_strnlen_working+:} false; then :
28155 $as_echo_n "(cached) " >&6
28156 else
28157 if test "$cross_compiling" = yes; then :
28158 # Guess no on AIX systems, yes otherwise.
28159 case "$host_os" in
28160 aix*) ac_cv_func_strnlen_working=no;;
28161 *) ac_cv_func_strnlen_working=yes;;
28162 esac
28163 else
28164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28165 /* end confdefs.h. */
28166 $ac_includes_default
28167 int
28168 main (void)
28169 {
28170
28171 #define S "foobar"
28172 #define S_LEN (sizeof S - 1)
28173
28174 /* At least one implementation is buggy: that of AIX 4.3 would
28175 give strnlen (S, 1) == 3. */
28176
28177 int i;
28178 for (i = 0; i < S_LEN + 1; ++i)
28179 {
28180 int expected = i <= S_LEN ? i : S_LEN;
28181 if (strnlen (S, i) != expected)
28182 return 1;
28183 }
28184 return 0;
28185
28186 ;
28187 return 0;
28188 }
28189 _ACEOF
28190 if ac_fn_c_try_run "$LINENO"; then :
28191 ac_cv_func_strnlen_working=yes
28192 else
28193 ac_cv_func_strnlen_working=no
28194 fi
28195 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28196 conftest.$ac_objext conftest.beam conftest.$ac_ext
28197 fi
28198
28199 fi
28200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5
28201 $as_echo "$ac_cv_func_strnlen_working" >&6; }
28202 test $ac_cv_func_strnlen_working = no && :
28203
28204
28205 if test $ac_cv_func_strnlen_working = no; then
28206 REPLACE_STRNLEN=1
28207 fi
28208 fi
28209
28210 if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
28211
28212
28213
28214
28215
28216
28217
28218
28219 gl_LIBOBJS="$gl_LIBOBJS strnlen.$ac_objext"
28220
28221 :
28222 fi
28223
28224
28225
28226
28227
28228 GNULIB_STRNLEN=1
28229
28230
28231
28232
28233
28234 $as_echo "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h
28235
28236
28237
28238
28239
28240
28241
28242
28243
28244
28245
28246
28247
28248
28249
28250
28251
28252 if test $gl_cv_have_include_next = yes; then
28253 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
28254 else
28255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
28256 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
28257 if ${gl_cv_next_sys_stat_h+:} false; then :
28258 $as_echo_n "(cached) " >&6
28259 else
28260
28261 if test $ac_cv_header_sys_stat_h = yes; then
28262
28263
28264
28265
28266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28267 /* end confdefs.h. */
28268 #include <sys/stat.h>
28269 _ACEOF
28270 case "$host_os" in
28271 aix*) gl_absname_cpp="$ac_cpp -C" ;;
28272 *) gl_absname_cpp="$ac_cpp" ;;
28273 esac
28274
28275 case "$host_os" in
28276 mingw*)
28277 gl_dirsep_regex='[/\\]'
28278 ;;
28279 *)
28280 gl_dirsep_regex='\/'
28281 ;;
28282 esac
28283 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28284 gl_header_literal_regex=`echo 'sys/stat.h' \
28285 | sed -e "$gl_make_literal_regex_sed"`
28286 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28287 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28288 s|^/[^/]|//&|
28289 p
28290 q
28291 }'
28292
28293 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28294 sed -n "$gl_absolute_header_sed"`
28295
28296 gl_header=$gl_cv_absolute_sys_stat_h
28297 gl_cv_next_sys_stat_h='"'$gl_header'"'
28298 else
28299 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
28300 fi
28301
28302
28303 fi
28304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
28305 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
28306 fi
28307 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
28308
28309 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28310 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28311 gl_next_as_first_directive='<'sys/stat.h'>'
28312 else
28313 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28314 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
28315 fi
28316 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
28317
28318
28319
28320
28321
28322
28323
28324
28325 WINDOWS_STAT_TIMESPEC=0
28326
28327
28328
28329
28330
28331
28332
28333
28334 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
28335 #include <sys/stat.h>
28336 "
28337 if test "x$ac_cv_type_nlink_t" = xyes; then :
28338
28339 else
28340
28341 $as_echo "#define nlink_t int" >>confdefs.h
28342
28343 fi
28344
28345
28346
28347
28348
28349
28350
28351
28352
28353
28354
28355 if test $ac_cv_header_sysexits_h = yes; then
28356 HAVE_SYSEXITS_H=1
28357
28358
28359
28360
28361
28362
28363
28364
28365
28366 if test $gl_cv_have_include_next = yes; then
28367 gl_cv_next_sysexits_h='<'sysexits.h'>'
28368 else
28369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sysexits.h>" >&5
28370 $as_echo_n "checking absolute name of <sysexits.h>... " >&6; }
28371 if ${gl_cv_next_sysexits_h+:} false; then :
28372 $as_echo_n "(cached) " >&6
28373 else
28374
28375 if test $ac_cv_header_sysexits_h = yes; then
28376
28377
28378
28379
28380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28381 /* end confdefs.h. */
28382 #include <sysexits.h>
28383 _ACEOF
28384 case "$host_os" in
28385 aix*) gl_absname_cpp="$ac_cpp -C" ;;
28386 *) gl_absname_cpp="$ac_cpp" ;;
28387 esac
28388
28389 case "$host_os" in
28390 mingw*)
28391 gl_dirsep_regex='[/\\]'
28392 ;;
28393 *)
28394 gl_dirsep_regex='\/'
28395 ;;
28396 esac
28397 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28398 gl_header_literal_regex=`echo 'sysexits.h' \
28399 | sed -e "$gl_make_literal_regex_sed"`
28400 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28401 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28402 s|^/[^/]|//&|
28403 p
28404 q
28405 }'
28406
28407 gl_cv_absolute_sysexits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28408 sed -n "$gl_absolute_header_sed"`
28409
28410 gl_header=$gl_cv_absolute_sysexits_h
28411 gl_cv_next_sysexits_h='"'$gl_header'"'
28412 else
28413 gl_cv_next_sysexits_h='<'sysexits.h'>'
28414 fi
28415
28416
28417 fi
28418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sysexits_h" >&5
28419 $as_echo "$gl_cv_next_sysexits_h" >&6; }
28420 fi
28421 NEXT_SYSEXITS_H=$gl_cv_next_sysexits_h
28422
28423 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28424 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28425 gl_next_as_first_directive='<'sysexits.h'>'
28426 else
28427 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28428 gl_next_as_first_directive=$gl_cv_next_sysexits_h
28429 fi
28430 NEXT_AS_FIRST_DIRECTIVE_SYSEXITS_H=$gl_next_as_first_directive
28431
28432
28433
28434
28435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28436 /* end confdefs.h. */
28437 #include <sysexits.h>
28438 int
28439 main (void)
28440 {
28441 switch (0)
28442 {
28443 case EX_OK:
28444 case EX_USAGE:
28445 case EX_DATAERR:
28446 case EX_NOINPUT:
28447 case EX_NOUSER:
28448 case EX_NOHOST:
28449 case EX_UNAVAILABLE:
28450 case EX_SOFTWARE:
28451 case EX_OSERR:
28452 case EX_OSFILE:
28453 case EX_CANTCREAT:
28454 case EX_IOERR:
28455 case EX_TEMPFAIL:
28456 case EX_PROTOCOL:
28457 case EX_NOPERM:
28458 case EX_CONFIG:
28459 break;
28460 }
28461
28462 ;
28463 return 0;
28464 }
28465 _ACEOF
28466 if ac_fn_c_try_compile "$LINENO"; then :
28467 SYSEXITS_H=
28468 else
28469 SYSEXITS_H=sysexits.h
28470 fi
28471 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28472 else
28473 HAVE_SYSEXITS_H=0
28474 SYSEXITS_H=sysexits.h
28475 fi
28476
28477
28478 if test -n "$SYSEXITS_H"; then
28479 GL_GENERATE_SYSEXITS_H_TRUE=
28480 GL_GENERATE_SYSEXITS_H_FALSE='#'
28481 else
28482 GL_GENERATE_SYSEXITS_H_TRUE='#'
28483 GL_GENERATE_SYSEXITS_H_FALSE=
28484 fi
28485
28486
28487
28488
28489
28490
28491
28492
28493
28494
28495
28496
28497
28498
28499
28500
28501
28502
28503
28504
28505
28506 if test $gl_cv_have_include_next = yes; then
28507 gl_cv_next_unistd_h='<'unistd.h'>'
28508 else
28509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
28510 $as_echo_n "checking absolute name of <unistd.h>... " >&6; }
28511 if ${gl_cv_next_unistd_h+:} false; then :
28512 $as_echo_n "(cached) " >&6
28513 else
28514
28515 if test $ac_cv_header_unistd_h = yes; then
28516
28517
28518
28519
28520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28521 /* end confdefs.h. */
28522 #include <unistd.h>
28523 _ACEOF
28524 case "$host_os" in
28525 aix*) gl_absname_cpp="$ac_cpp -C" ;;
28526 *) gl_absname_cpp="$ac_cpp" ;;
28527 esac
28528
28529 case "$host_os" in
28530 mingw*)
28531 gl_dirsep_regex='[/\\]'
28532 ;;
28533 *)
28534 gl_dirsep_regex='\/'
28535 ;;
28536 esac
28537 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28538 gl_header_literal_regex=`echo 'unistd.h' \
28539 | sed -e "$gl_make_literal_regex_sed"`
28540 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28541 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28542 s|^/[^/]|//&|
28543 p
28544 q
28545 }'
28546
28547 gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28548 sed -n "$gl_absolute_header_sed"`
28549
28550 gl_header=$gl_cv_absolute_unistd_h
28551 gl_cv_next_unistd_h='"'$gl_header'"'
28552 else
28553 gl_cv_next_unistd_h='<'unistd.h'>'
28554 fi
28555
28556
28557 fi
28558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
28559 $as_echo "$gl_cv_next_unistd_h" >&6; }
28560 fi
28561 NEXT_UNISTD_H=$gl_cv_next_unistd_h
28562
28563 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28564 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28565 gl_next_as_first_directive='<'unistd.h'>'
28566 else
28567 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28568 gl_next_as_first_directive=$gl_cv_next_unistd_h
28569 fi
28570 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
28571
28572
28573
28574
28575 if test $ac_cv_header_unistd_h = yes; then
28576 HAVE_UNISTD_H=1
28577 else
28578 HAVE_UNISTD_H=0
28579 fi
28580
28581
28582
28583
28584
28585
28586
28587
28588
28589
28590
28591
28592
28593
28594
28595 if { test "$HAVE_LIBUNISTRING" != yes \
28596 || {
28597
28598
28599
28600 test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
28601 || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
28602 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
28603 || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
28604 && test $LIBUNISTRING_VERSION_SUBMINOR -lt 4
28605 }
28606 }
28607 }
28608
28609
28610
28611
28612 }
28613 }; then
28614 LIBUNISTRING_UNITYPES_H='unitypes.h'
28615 else
28616 LIBUNISTRING_UNITYPES_H=
28617 fi
28618
28619
28620
28621
28622 if { test "$HAVE_LIBUNISTRING" != yes \
28623 || {
28624
28625
28626
28627 test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
28628 || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
28629 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
28630 || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
28631 && test $LIBUNISTRING_VERSION_SUBMINOR -lt 4
28632 }
28633 }
28634 }
28635
28636
28637
28638
28639 }
28640 }; then
28641 LIBUNISTRING_UNIWIDTH_H='uniwidth.h'
28642 else
28643 LIBUNISTRING_UNIWIDTH_H=
28644 fi
28645
28646
28647
28648
28649 if { test "$HAVE_LIBUNISTRING" != yes \
28650 || {
28651
28652
28653
28654 test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
28655 || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
28656 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
28657 || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
28658 && test $LIBUNISTRING_VERSION_SUBMINOR -lt 8
28659 }
28660 }
28661 }
28662
28663
28664
28665
28666 }
28667 }; then
28668 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE=
28669 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE='#'
28670 else
28671 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE='#'
28672 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE=
28673 fi
28674
28675
28676
28677
28678 if test $ac_cv_func_vasnprintf = no; then
28679
28680
28681
28682
28683
28684
28685
28686
28687
28688
28689 gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
28690
28691
28692
28693
28694
28695
28696
28697
28698
28699 gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
28700
28701
28702
28703
28704
28705
28706
28707
28708
28709 gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
28710
28711
28712
28713
28714
28715
28716
28717
28718
28719 gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
28720
28721 if test $ac_cv_func_vasnprintf = yes; then
28722
28723 $as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
28724
28725 fi
28726
28727
28728
28729
28730
28731
28732
28733
28734
28735
28736
28737 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
28738 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
28739
28740 else
28741
28742 $as_echo "#define ptrdiff_t long" >>confdefs.h
28743
28744
28745 fi
28746
28747
28748
28749
28750
28751
28752
28753 fi
28754
28755
28756
28757 gl_cv_func_vsnprintf_usable=no
28758 for ac_func in vsnprintf
28759 do :
28760 ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
28761 if test "x$ac_cv_func_vsnprintf" = xyes; then :
28762 cat >>confdefs.h <<_ACEOF
28763 #define HAVE_VSNPRINTF 1
28764 _ACEOF
28765
28766 fi
28767 done
28768
28769 if test $ac_cv_func_vsnprintf = yes; then
28770
28771
28772
28773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5
28774 $as_echo_n "checking whether snprintf respects a size of 1... " >&6; }
28775 if ${gl_cv_func_snprintf_size1+:} false; then :
28776 $as_echo_n "(cached) " >&6
28777 else
28778
28779 if test "$cross_compiling" = yes; then :
28780 case "$host_os" in
28781 # Guess yes on native Windows.
28782 mingw*) gl_cv_func_snprintf_size1="guessing yes" ;;
28783 *) gl_cv_func_snprintf_size1="guessing yes" ;;
28784 esac
28785
28786 else
28787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28788 /* end confdefs.h. */
28789
28790 #include <stdio.h>
28791 #if HAVE_SNPRINTF
28792 # define my_snprintf snprintf
28793 #else
28794 # include <stdarg.h>
28795 static int my_snprintf (char *buf, int size, const char *format, ...)
28796 {
28797 va_list args;
28798 int ret;
28799 va_start (args, format);
28800 ret = vsnprintf (buf, size, format, args);
28801 va_end (args);
28802 return ret;
28803 }
28804 #endif
28805 int main()
28806 {
28807 static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
28808 my_snprintf (buf, 1, "%d", 12345);
28809 return buf[1] != 'E';
28810 }
28811 _ACEOF
28812 if ac_fn_c_try_run "$LINENO"; then :
28813 gl_cv_func_snprintf_size1=yes
28814 else
28815 gl_cv_func_snprintf_size1=no
28816 fi
28817 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28818 conftest.$ac_objext conftest.beam conftest.$ac_ext
28819 fi
28820
28821
28822 fi
28823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5
28824 $as_echo "$gl_cv_func_snprintf_size1" >&6; }
28825
28826 case "$gl_cv_func_snprintf_size1" in
28827 *yes)
28828
28829 case "$gl_cv_func_snprintf_retval_c99" in
28830 *yes)
28831
28832
28833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
28834 $as_echo_n "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
28835 if ${gl_cv_func_printf_positions+:} false; then :
28836 $as_echo_n "(cached) " >&6
28837 else
28838
28839 if test "$cross_compiling" = yes; then :
28840
28841 case "$host_os" in
28842 netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
28843 gl_cv_func_printf_positions="guessing no";;
28844 beos*) gl_cv_func_printf_positions="guessing no";;
28845 # Guess no on native Windows.
28846 mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
28847 *) gl_cv_func_printf_positions="guessing yes";;
28848 esac
28849
28850 else
28851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28852 /* end confdefs.h. */
28853
28854 #include <stdio.h>
28855 #include <string.h>
28856 /* The string "%2$d %1$d", with dollar characters protected from the shell's
28857 dollar expansion (possibly an autoconf bug). */
28858 static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
28859 static char buf[100];
28860 int main ()
28861 {
28862 sprintf (buf, format, 33, 55);
28863 return (strcmp (buf, "55 33") != 0);
28864 }
28865 _ACEOF
28866 if ac_fn_c_try_run "$LINENO"; then :
28867 gl_cv_func_printf_positions=yes
28868 else
28869 gl_cv_func_printf_positions=no
28870 fi
28871 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28872 conftest.$ac_objext conftest.beam conftest.$ac_ext
28873 fi
28874
28875
28876 fi
28877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
28878 $as_echo "$gl_cv_func_printf_positions" >&6; }
28879
28880 case "$gl_cv_func_printf_positions" in
28881 *yes)
28882 gl_cv_func_vsnprintf_usable=yes
28883 ;;
28884 esac
28885 ;;
28886 esac
28887 ;;
28888 esac
28889 fi
28890 if test $gl_cv_func_vsnprintf_usable = no; then
28891
28892
28893
28894
28895
28896
28897
28898
28899
28900
28901 gl_LIBOBJS="$gl_LIBOBJS vsnprintf.$ac_objext"
28902
28903 if test $ac_cv_func_vsnprintf = yes; then
28904 REPLACE_VSNPRINTF=1
28905 else
28906
28907 if test $ac_cv_have_decl_vsnprintf = yes; then
28908 REPLACE_VSNPRINTF=1
28909 fi
28910 fi
28911 :
28912
28913 fi
28914
28915 if test $ac_cv_have_decl_vsnprintf = no; then
28916 HAVE_DECL_VSNPRINTF=0
28917 fi
28918
28919
28920
28921
28922
28923
28924 GNULIB_VSNPRINTF=1
28925
28926
28927
28928
28929
28930 $as_echo "#define GNULIB_TEST_VSNPRINTF 1" >>confdefs.h
28931
28932
28933
28934
28935
28936
28937
28938
28939
28940
28941
28942
28943
28944
28945
28946 if test $gl_cv_have_include_next = yes; then
28947 gl_cv_next_wchar_h='<'wchar.h'>'
28948 else
28949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
28950 $as_echo_n "checking absolute name of <wchar.h>... " >&6; }
28951 if ${gl_cv_next_wchar_h+:} false; then :
28952 $as_echo_n "(cached) " >&6
28953 else
28954
28955 if test $ac_cv_header_wchar_h = yes; then
28956
28957
28958
28959
28960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28961 /* end confdefs.h. */
28962 #include <wchar.h>
28963 _ACEOF
28964 case "$host_os" in
28965 aix*) gl_absname_cpp="$ac_cpp -C" ;;
28966 *) gl_absname_cpp="$ac_cpp" ;;
28967 esac
28968
28969 case "$host_os" in
28970 mingw*)
28971 gl_dirsep_regex='[/\\]'
28972 ;;
28973 *)
28974 gl_dirsep_regex='\/'
28975 ;;
28976 esac
28977 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28978 gl_header_literal_regex=`echo 'wchar.h' \
28979 | sed -e "$gl_make_literal_regex_sed"`
28980 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28981 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28982 s|^/[^/]|//&|
28983 p
28984 q
28985 }'
28986
28987 gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28988 sed -n "$gl_absolute_header_sed"`
28989
28990 gl_header=$gl_cv_absolute_wchar_h
28991 gl_cv_next_wchar_h='"'$gl_header'"'
28992 else
28993 gl_cv_next_wchar_h='<'wchar.h'>'
28994 fi
28995
28996
28997 fi
28998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
28999 $as_echo "$gl_cv_next_wchar_h" >&6; }
29000 fi
29001 NEXT_WCHAR_H=$gl_cv_next_wchar_h
29002
29003 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29004 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29005 gl_next_as_first_directive='<'wchar.h'>'
29006 else
29007 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29008 gl_next_as_first_directive=$gl_cv_next_wchar_h
29009 fi
29010 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
29011
29012
29013
29014
29015 if test $ac_cv_header_wchar_h = yes; then
29016 HAVE_WCHAR_H=1
29017 else
29018 HAVE_WCHAR_H=0
29019 fi
29020
29021
29022
29023
29024
29025 if test $gt_cv_c_wint_t = yes; then
29026 HAVE_WINT_T=1
29027 else
29028 HAVE_WINT_T=0
29029 fi
29030
29031
29032
29033
29034
29035
29036
29037
29038
29039
29040
29041
29042
29043
29044
29045
29046
29047
29048 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
29049
29050
29051
29052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
29053 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
29054 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
29055 $as_echo_n "(cached) " >&6
29056 else
29057
29058 case "$host_os" in
29059 # Guess no on AIX and OSF/1.
29060 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
29061 # Guess yes otherwise.
29062 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
29063 esac
29064 if test $LOCALE_JA != none; then
29065 if test "$cross_compiling" = yes; then :
29066 :
29067 else
29068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29069 /* end confdefs.h. */
29070
29071 #include <locale.h>
29072 #include <string.h>
29073 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
29074 <wchar.h>.
29075 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
29076 included before <wchar.h>. */
29077 #include <stddef.h>
29078 #include <stdio.h>
29079 #include <time.h>
29080 #include <wchar.h>
29081 int main ()
29082 {
29083 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
29084 {
29085 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
29086 mbstate_t state;
29087 wchar_t wc;
29088
29089 memset (&state, '\0', sizeof (mbstate_t));
29090 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
29091 if (mbsinit (&state))
29092 return 2;
29093 }
29094 return 0;
29095 }
29096 _ACEOF
29097 if ac_fn_c_try_run "$LINENO"; then :
29098 gl_cv_func_mbrtowc_incomplete_state=yes
29099 else
29100 gl_cv_func_mbrtowc_incomplete_state=no
29101 fi
29102 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29103 conftest.$ac_objext conftest.beam conftest.$ac_ext
29104 fi
29105
29106 fi
29107
29108 fi
29109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
29110 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
29111
29112
29113
29114
29115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
29116 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
29117 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
29118 $as_echo_n "(cached) " >&6
29119 else
29120
29121 case "$host_os" in
29122 # Guess no on Solaris 8.
29123 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
29124 # Guess yes otherwise.
29125 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
29126 esac
29127 if test $LOCALE_ZH_CN != none; then
29128 if test "$cross_compiling" = yes; then :
29129 :
29130 else
29131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29132 /* end confdefs.h. */
29133
29134 #include <locale.h>
29135 #include <stdlib.h>
29136 #include <string.h>
29137 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
29138 <wchar.h>.
29139 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
29140 included before <wchar.h>. */
29141 #include <stddef.h>
29142 #include <stdio.h>
29143 #include <time.h>
29144 #include <wchar.h>
29145 int main ()
29146 {
29147 /* This fails on Solaris 8:
29148 mbrtowc returns 2, and sets wc to 0x00F0.
29149 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
29150 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
29151 {
29152 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
29153 mbstate_t state;
29154 wchar_t wc;
29155
29156 memset (&state, '\0', sizeof (mbstate_t));
29157 if (mbrtowc (&wc, input + 3, 6, &state) != 4
29158 && mbtowc (&wc, input + 3, 6) == 4)
29159 return 2;
29160 }
29161 return 0;
29162 }
29163 _ACEOF
29164 if ac_fn_c_try_run "$LINENO"; then :
29165 gl_cv_func_mbrtowc_sanitycheck=yes
29166 else
29167 gl_cv_func_mbrtowc_sanitycheck=no
29168 fi
29169 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29170 conftest.$ac_objext conftest.beam conftest.$ac_ext
29171 fi
29172
29173 fi
29174
29175 fi
29176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
29177 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
29178
29179 REPLACE_MBSTATE_T=0
29180 case "$gl_cv_func_mbrtowc_incomplete_state" in
29181 *yes) ;;
29182 *) REPLACE_MBSTATE_T=1 ;;
29183 esac
29184 case "$gl_cv_func_mbrtowc_sanitycheck" in
29185 *yes) ;;
29186 *) REPLACE_MBSTATE_T=1 ;;
29187 esac
29188 else
29189 REPLACE_MBSTATE_T=1
29190 fi
29191
29192
29193
29194 if test $ac_cv_func_wcrtomb = no; then
29195 HAVE_WCRTOMB=0
29196 ac_fn_c_check_decl "$LINENO" "wcrtomb" "ac_cv_have_decl_wcrtomb" "
29197 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
29198 <wchar.h>.
29199 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
29200 included before <wchar.h>. */
29201 #include <stddef.h>
29202 #include <stdio.h>
29203 #include <time.h>
29204 #include <wchar.h>
29205
29206 "
29207 if test "x$ac_cv_have_decl_wcrtomb" = xyes; then :
29208 ac_have_decl=1
29209 else
29210 ac_have_decl=0
29211 fi
29212
29213 cat >>confdefs.h <<_ACEOF
29214 #define HAVE_DECL_WCRTOMB $ac_have_decl
29215 _ACEOF
29216
29217 if test $ac_cv_have_decl_wcrtomb = yes; then
29218 REPLACE_WCRTOMB=1
29219 fi
29220 else
29221 if test $REPLACE_MBSTATE_T = 1; then
29222 REPLACE_WCRTOMB=1
29223 else
29224
29225
29226
29227
29228
29229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb return value is correct" >&5
29230 $as_echo_n "checking whether wcrtomb return value is correct... " >&6; }
29231 if ${gl_cv_func_wcrtomb_retval+:} false; then :
29232 $as_echo_n "(cached) " >&6
29233 else
29234
29235 case "$host_os" in
29236 # Guess no on AIX 4, OSF/1 and Solaris.
29237 aix4* | osf* | solaris*) gl_cv_func_wcrtomb_retval="guessing no" ;;
29238 # Guess yes on native Windows.
29239 mingw*) gl_cv_func_wcrtomb_retval="guessing yes" ;;
29240 # Guess yes otherwise.
29241 *) gl_cv_func_wcrtomb_retval="guessing yes" ;;
29242 esac
29243 if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
29244 if test "$cross_compiling" = yes; then :
29245 :
29246 else
29247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29248 /* end confdefs.h. */
29249
29250 #include <locale.h>
29251 #include <string.h>
29252 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
29253 <wchar.h>.
29254 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
29255 included before <wchar.h>. */
29256 #include <stddef.h>
29257 #include <stdio.h>
29258 #include <time.h>
29259 #include <wchar.h>
29260 int main ()
29261 {
29262 int result = 0;
29263 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
29264 {
29265 if (wcrtomb (NULL, 0, NULL) != 1)
29266 result |= 1;
29267 }
29268 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
29269 {
29270 if (wcrtomb (NULL, 0, NULL) != 1)
29271 result |= 2;
29272 }
29273 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
29274 {
29275 if (wcrtomb (NULL, 0, NULL) != 1)
29276 result |= 4;
29277 }
29278 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
29279 {
29280 if (wcrtomb (NULL, 0, NULL) != 1)
29281 result |= 8;
29282 }
29283 return result;
29284 }
29285 _ACEOF
29286 if ac_fn_c_try_run "$LINENO"; then :
29287 gl_cv_func_wcrtomb_retval=yes
29288 else
29289 gl_cv_func_wcrtomb_retval=no
29290 fi
29291 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29292 conftest.$ac_objext conftest.beam conftest.$ac_ext
29293 fi
29294
29295 fi
29296
29297 fi
29298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcrtomb_retval" >&5
29299 $as_echo "$gl_cv_func_wcrtomb_retval" >&6; }
29300 case "$gl_cv_func_wcrtomb_retval" in
29301 *yes) ;;
29302 *) REPLACE_WCRTOMB=1 ;;
29303 esac
29304 fi
29305 fi
29306
29307 if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then
29308
29309
29310
29311
29312
29313
29314
29315
29316 gl_LIBOBJS="$gl_LIBOBJS wcrtomb.$ac_objext"
29317
29318
29319 :
29320
29321 fi
29322
29323
29324
29325
29326
29327 GNULIB_WCRTOMB=1
29328
29329
29330
29331
29332
29333 $as_echo "#define GNULIB_TEST_WCRTOMB 1" >>confdefs.h
29334
29335
29336
29337
29338
29339
29340
29341
29342 if test $ac_cv_func_iswcntrl = yes; then
29343 HAVE_ISWCNTRL=1
29344 else
29345 HAVE_ISWCNTRL=0
29346 fi
29347
29348
29349
29350 if test $gt_cv_c_wint_t = yes; then
29351 HAVE_WINT_T=1
29352 else
29353 HAVE_WINT_T=0
29354 fi
29355
29356
29357
29358
29359
29360
29361
29362
29363
29364
29365
29366
29367
29368 if test $gl_cv_have_include_next = yes; then
29369 gl_cv_next_wctype_h='<'wctype.h'>'
29370 else
29371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
29372 $as_echo_n "checking absolute name of <wctype.h>... " >&6; }
29373 if ${gl_cv_next_wctype_h+:} false; then :
29374 $as_echo_n "(cached) " >&6
29375 else
29376
29377 if test $ac_cv_header_wctype_h = yes; then
29378
29379
29380
29381
29382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29383 /* end confdefs.h. */
29384 #include <wctype.h>
29385 _ACEOF
29386 case "$host_os" in
29387 aix*) gl_absname_cpp="$ac_cpp -C" ;;
29388 *) gl_absname_cpp="$ac_cpp" ;;
29389 esac
29390
29391 case "$host_os" in
29392 mingw*)
29393 gl_dirsep_regex='[/\\]'
29394 ;;
29395 *)
29396 gl_dirsep_regex='\/'
29397 ;;
29398 esac
29399 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29400 gl_header_literal_regex=`echo 'wctype.h' \
29401 | sed -e "$gl_make_literal_regex_sed"`
29402 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29403 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29404 s|^/[^/]|//&|
29405 p
29406 q
29407 }'
29408
29409 gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29410 sed -n "$gl_absolute_header_sed"`
29411
29412 gl_header=$gl_cv_absolute_wctype_h
29413 gl_cv_next_wctype_h='"'$gl_header'"'
29414 else
29415 gl_cv_next_wctype_h='<'wctype.h'>'
29416 fi
29417
29418
29419 fi
29420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
29421 $as_echo "$gl_cv_next_wctype_h" >&6; }
29422 fi
29423 NEXT_WCTYPE_H=$gl_cv_next_wctype_h
29424
29425 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29426 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29427 gl_next_as_first_directive='<'wctype.h'>'
29428 else
29429 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29430 gl_next_as_first_directive=$gl_cv_next_wctype_h
29431 fi
29432 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
29433
29434
29435
29436
29437 if test $ac_cv_header_wctype_h = yes; then
29438 if test $ac_cv_func_iswcntrl = yes; then
29439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
29440 $as_echo_n "checking whether iswcntrl works... " >&6; }
29441 if ${gl_cv_func_iswcntrl_works+:} false; then :
29442 $as_echo_n "(cached) " >&6
29443 else
29444
29445 if test "$cross_compiling" = yes; then :
29446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29447 /* end confdefs.h. */
29448 #include <stdlib.h>
29449 #if __GNU_LIBRARY__ == 1
29450 Linux libc5 i18n is broken.
29451 #endif
29452 int
29453 main (void)
29454 {
29455
29456 ;
29457 return 0;
29458 }
29459 _ACEOF
29460 if ac_fn_c_try_compile "$LINENO"; then :
29461 gl_cv_func_iswcntrl_works="guessing yes"
29462 else
29463 gl_cv_func_iswcntrl_works="guessing no"
29464 fi
29465 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29466
29467 else
29468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29469 /* end confdefs.h. */
29470
29471 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
29472 included before <wchar.h>.
29473 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
29474 must be included before <wchar.h>. */
29475 #include <stddef.h>
29476 #include <stdio.h>
29477 #include <time.h>
29478 #include <wchar.h>
29479 #include <wctype.h>
29480 int main () { return iswprint ('x') == 0; }
29481
29482 _ACEOF
29483 if ac_fn_c_try_run "$LINENO"; then :
29484 gl_cv_func_iswcntrl_works=yes
29485 else
29486 gl_cv_func_iswcntrl_works=no
29487 fi
29488 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29489 conftest.$ac_objext conftest.beam conftest.$ac_ext
29490 fi
29491
29492
29493 fi
29494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
29495 $as_echo "$gl_cv_func_iswcntrl_works" >&6; }
29496 fi
29497 HAVE_WCTYPE_H=1
29498 else
29499 HAVE_WCTYPE_H=0
29500 fi
29501
29502
29503 case "$gl_cv_func_iswcntrl_works" in
29504 *yes) REPLACE_ISWCNTRL=0 ;;
29505 *) REPLACE_ISWCNTRL=1 ;;
29506 esac
29507
29508
29509 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
29510 :
29511 fi
29512
29513 if test $REPLACE_ISWCNTRL = 1; then
29514 REPLACE_TOWLOWER=1
29515 else
29516 for ac_func in towlower
29517 do :
29518 ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
29519 if test "x$ac_cv_func_towlower" = xyes; then :
29520 cat >>confdefs.h <<_ACEOF
29521 #define HAVE_TOWLOWER 1
29522 _ACEOF
29523
29524 fi
29525 done
29526
29527 if test $ac_cv_func_towlower = yes; then
29528 REPLACE_TOWLOWER=0
29529 else
29530 ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
29531 included before <wchar.h>.
29532 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
29533 must be included before <wchar.h>. */
29534 #include <stddef.h>
29535 #include <stdio.h>
29536 #include <time.h>
29537 #include <wchar.h>
29538 #if HAVE_WCTYPE_H
29539 # include <wctype.h>
29540 #endif
29541
29542 "
29543 if test "x$ac_cv_have_decl_towlower" = xyes; then :
29544 ac_have_decl=1
29545 else
29546 ac_have_decl=0
29547 fi
29548
29549 cat >>confdefs.h <<_ACEOF
29550 #define HAVE_DECL_TOWLOWER $ac_have_decl
29551 _ACEOF
29552
29553 if test $ac_cv_have_decl_towlower = yes; then
29554 REPLACE_TOWLOWER=1
29555 else
29556 REPLACE_TOWLOWER=0
29557 fi
29558 fi
29559 fi
29560
29561
29562 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
29563 :
29564 fi
29565
29566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
29567 $as_echo_n "checking for wctype_t... " >&6; }
29568 if ${gl_cv_type_wctype_t+:} false; then :
29569 $as_echo_n "(cached) " >&6
29570 else
29571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29572 /* end confdefs.h. */
29573 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
29574 included before <wchar.h>.
29575 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
29576 must be included before <wchar.h>. */
29577 #include <stddef.h>
29578 #include <stdio.h>
29579 #include <time.h>
29580 #include <wchar.h>
29581 #if HAVE_WCTYPE_H
29582 # include <wctype.h>
29583 #endif
29584 wctype_t a;
29585
29586 int
29587 main (void)
29588 {
29589
29590 ;
29591 return 0;
29592 }
29593 _ACEOF
29594 if ac_fn_c_try_compile "$LINENO"; then :
29595 gl_cv_type_wctype_t=yes
29596 else
29597 gl_cv_type_wctype_t=no
29598 fi
29599 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29600
29601 fi
29602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
29603 $as_echo "$gl_cv_type_wctype_t" >&6; }
29604 if test $gl_cv_type_wctype_t = no; then
29605 HAVE_WCTYPE_T=0
29606 fi
29607
29608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
29609 $as_echo_n "checking for wctrans_t... " >&6; }
29610 if ${gl_cv_type_wctrans_t+:} false; then :
29611 $as_echo_n "(cached) " >&6
29612 else
29613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29614 /* end confdefs.h. */
29615 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
29616 included before <wchar.h>.
29617 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
29618 must be included before <wchar.h>. */
29619 #include <stddef.h>
29620 #include <stdio.h>
29621 #include <time.h>
29622 #include <wchar.h>
29623 #include <wctype.h>
29624 wctrans_t a;
29625
29626 int
29627 main (void)
29628 {
29629
29630 ;
29631 return 0;
29632 }
29633 _ACEOF
29634 if ac_fn_c_try_compile "$LINENO"; then :
29635 gl_cv_type_wctrans_t=yes
29636 else
29637 gl_cv_type_wctrans_t=no
29638 fi
29639 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29640
29641 fi
29642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
29643 $as_echo "$gl_cv_type_wctrans_t" >&6; }
29644 if test $gl_cv_type_wctrans_t = no; then
29645 HAVE_WCTRANS_T=0
29646 fi
29647
29648
29649
29650
29651
29652
29653
29654
29655
29656
29657
29658
29659
29660
29661
29662
29663 ac_fn_c_check_decl "$LINENO" "wcwidth" "ac_cv_have_decl_wcwidth" "
29664 /* AIX 3.2.5 declares wcwidth in <string.h>. */
29665 #include <string.h>
29666 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
29667 <wchar.h>.
29668 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
29669 before <wchar.h>. */
29670 #include <stddef.h>
29671 #include <stdio.h>
29672 #include <time.h>
29673 #include <wchar.h>
29674
29675 "
29676 if test "x$ac_cv_have_decl_wcwidth" = xyes; then :
29677 ac_have_decl=1
29678 else
29679 ac_have_decl=0
29680 fi
29681
29682 cat >>confdefs.h <<_ACEOF
29683 #define HAVE_DECL_WCWIDTH $ac_have_decl
29684 _ACEOF
29685
29686 if test $ac_cv_have_decl_wcwidth != yes; then
29687 HAVE_DECL_WCWIDTH=0
29688 fi
29689
29690 if test $ac_cv_func_wcwidth != yes; then
29691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcwidth is a macro" >&5
29692 $as_echo_n "checking whether wcwidth is a macro... " >&6; }
29693 if ${gl_cv_func_wcwidth_macro+:} false; then :
29694 $as_echo_n "(cached) " >&6
29695 else
29696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29697 /* end confdefs.h. */
29698
29699 #include <wchar.h>
29700 #ifdef wcwidth
29701 wchar_header_defines_wcwidth
29702 #endif
29703 _ACEOF
29704 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
29705 $EGREP "wchar_header_defines_wcwidth" >/dev/null 2>&1; then :
29706 gl_cv_func_wcwidth_macro=yes
29707 else
29708 gl_cv_func_wcwidth_macro=no
29709 fi
29710 rm -f conftest*
29711
29712
29713 fi
29714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcwidth_macro" >&5
29715 $as_echo "$gl_cv_func_wcwidth_macro" >&6; }
29716 fi
29717
29718 if test $ac_cv_func_wcwidth = yes || test $gl_cv_func_wcwidth_macro = yes; then
29719 HAVE_WCWIDTH=1
29720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcwidth works reasonably in UTF-8 locales" >&5
29721 $as_echo_n "checking whether wcwidth works reasonably in UTF-8 locales... " >&6; }
29722 if ${gl_cv_func_wcwidth_works+:} false; then :
29723 $as_echo_n "(cached) " >&6
29724 else
29725
29726 if test "$cross_compiling" = yes; then :
29727
29728 case "$host_os" in
29729 # Guess yes on glibc and AIX 7 systems.
29730 *-gnu* | gnu* | aix[7-9]*) gl_cv_func_wcwidth_works="guessing yes";;
29731 *) gl_cv_func_wcwidth_works="guessing no";;
29732 esac
29733
29734 else
29735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29736 /* end confdefs.h. */
29737
29738 #include <locale.h>
29739 /* AIX 3.2.5 declares wcwidth in <string.h>. */
29740 #include <string.h>
29741 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
29742 <wchar.h>.
29743 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
29744 before <wchar.h>. */
29745 #include <stddef.h>
29746 #include <stdio.h>
29747 #include <time.h>
29748 #include <wchar.h>
29749 #if !HAVE_DECL_WCWIDTH
29750 extern
29751 # ifdef __cplusplus
29752 "C"
29753 # endif
29754 int wcwidth (int);
29755 #endif
29756 int main ()
29757 {
29758 int result = 0;
29759 if (setlocale (LC_ALL, "fr_FR.UTF-8") != NULL)
29760 {
29761 if (wcwidth (0x0301) > 0)
29762 result |= 1;
29763 if (wcwidth (0x05B0) > 0)
29764 result |= 2;
29765 if (wcwidth (0x200B) > 0)
29766 result |= 4;
29767 if (wcwidth (0xFF1A) == 0)
29768 result |= 8;
29769 }
29770 return result;
29771 }
29772 _ACEOF
29773 if ac_fn_c_try_run "$LINENO"; then :
29774 gl_cv_func_wcwidth_works=yes
29775 else
29776 gl_cv_func_wcwidth_works=no
29777 fi
29778 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29779 conftest.$ac_objext conftest.beam conftest.$ac_ext
29780 fi
29781
29782
29783 fi
29784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcwidth_works" >&5
29785 $as_echo "$gl_cv_func_wcwidth_works" >&6; }
29786 case "$gl_cv_func_wcwidth_works" in
29787 *yes) ;;
29788 *no) REPLACE_WCWIDTH=1 ;;
29789 esac
29790 else
29791 HAVE_WCWIDTH=0
29792 fi
29793
29794 if test $HAVE_WCWIDTH = 0 || test $REPLACE_WCWIDTH = 1; then
29795
29796
29797
29798
29799
29800
29801
29802
29803 gl_LIBOBJS="$gl_LIBOBJS wcwidth.$ac_objext"
29804
29805
29806
29807 :
29808
29809 fi
29810
29811
29812
29813
29814
29815 GNULIB_WCWIDTH=1
29816
29817
29818
29819
29820
29821 $as_echo "#define GNULIB_TEST_WCWIDTH 1" >>confdefs.h
29822
29823
29824
29825
29826
29827 for ac_header in stdint.h
29828 do :
29829 ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
29830 if test "x$ac_cv_header_stdint_h" = xyes; then :
29831 cat >>confdefs.h <<_ACEOF
29832 #define HAVE_STDINT_H 1
29833 _ACEOF
29834
29835 fi
29836
29837 done
29838
29839
29840 # End of code from modules
29841
29842
29843
29844
29845
29846
29847
29848
29849
29850 gltests_libdeps=
29851 gltests_ltlibdeps=
29852
29853
29854
29855
29856
29857
29858
29859
29860
29861 gl_source_base='tests'
29862 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
29863
29864 gl_module_indicator_condition=$gltests_WITNESS
29865
29866
29867
29868
29869
29870
29871
29872
29873
29874 LIBGNU_LIBDEPS="$gl_libdeps"
29875
29876 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
29877
29878
29879
29880 WARN_FLAGS="-Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wmain -Wmissing-braces -Wmissing-format-attribute -Wmultichar -Wparentheses -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wswitch -Wtrigraphs -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -Wwrite-strings -Wnested-externs -Wstrict-prototypes"
29881 EXTRA_WARN_FLAGS="-Wextra -Wattributes -Wendif-labels -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wmissing-field-initializers -Wnonnull -Woverflow -Wvla -Wpointer-to-int-cast -Wstrict-aliasing -Wvariadic-macros -Wvolatile-register-var -Wpointer-sign -Wmissing-include-dirs -Wmissing-prototypes -Wmissing-declarations -Wformat=2"
29882
29883 HOST_CFLAGS="$HOST_CFLAGS $WARN_FLAGS -Wcast-align"
29884
29885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which extra warnings work" >&5
29886 $as_echo_n "checking which extra warnings work... " >&6; }
29887 if ${grub_cv_cc_w_extra_flags+:} false; then :
29888 $as_echo_n "(cached) " >&6
29889 else
29890
29891 SAVED_CFLAGS="$CFLAGS"
29892 grub_cv_cc_w_extra_flags=
29893 for x in $EXTRA_WARN_FLAGS; do
29894 CFLAGS="$HOST_CFLAGS $x -Werror"
29895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29896 /* end confdefs.h. */
29897
29898 int
29899 main (void)
29900 {
29901
29902 ;
29903 return 0;
29904 }
29905 _ACEOF
29906 if ac_fn_c_try_link "$LINENO"; then :
29907 flag=1
29908 else
29909 flag=0
29910 fi
29911 rm -f core conftest.err conftest.$ac_objext \
29912 conftest$ac_exeext conftest.$ac_ext
29913 if test x$flag = x1 ; then
29914 grub_cv_cc_w_extra_flags="$grub_cv_cc_w_extra_flags $x"
29915 fi
29916 done
29917 CFLAGS="$SAVED_CFLAGS"
29918
29919 fi
29920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $grub_cv_cc_w_extra_flags" >&5
29921 $as_echo "$grub_cv_cc_w_extra_flags" >&6; }
29922
29923 HOST_CFLAGS="$HOST_CFLAGS $grub_cv_cc_w_extra_flags"
29924
29925 #
29926 # Check for target programs.
29927 #
29928
29929 # Find tools for the target.
29930 if test "x$target_alias" != x && test "x$host_alias" != "x$target_alias"; then
29931 tmp_ac_tool_prefix="$ac_tool_prefix"
29932 ac_tool_prefix=$target_alias-
29933
29934 if test -n "$ac_tool_prefix"; then
29935 for ac_prog in gcc egcs cc
29936 do
29937 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29938 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29940 $as_echo_n "checking for $ac_word... " >&6; }
29941 if ${ac_cv_prog_TARGET_CC+:} false; then :
29942 $as_echo_n "(cached) " >&6
29943 else
29944 if test -n "$TARGET_CC"; then
29945 ac_cv_prog_TARGET_CC="$TARGET_CC" # Let the user override the test.
29946 else
29947 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29948 for as_dir in $PATH
29949 do
29950 IFS=$as_save_IFS
29951 test -z "$as_dir" && as_dir=.
29952 for ac_exec_ext in '' $ac_executable_extensions; do
29953 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29954 ac_cv_prog_TARGET_CC="$ac_tool_prefix$ac_prog"
29955 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29956 break 2
29957 fi
29958 done
29959 done
29960 IFS=$as_save_IFS
29961
29962 fi
29963 fi
29964 TARGET_CC=$ac_cv_prog_TARGET_CC
29965 if test -n "$TARGET_CC"; then
29966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TARGET_CC" >&5
29967 $as_echo "$TARGET_CC" >&6; }
29968 else
29969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29970 $as_echo "no" >&6; }
29971 fi
29972
29973
29974 test -n "$TARGET_CC" && break
29975 done
29976 fi
29977 if test -z "$TARGET_CC"; then
29978 ac_ct_TARGET_CC=$TARGET_CC
29979 for ac_prog in gcc egcs cc
29980 do
29981 # Extract the first word of "$ac_prog", so it can be a program name with args.
29982 set dummy $ac_prog; ac_word=$2
29983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29984 $as_echo_n "checking for $ac_word... " >&6; }
29985 if ${ac_cv_prog_ac_ct_TARGET_CC+:} false; then :
29986 $as_echo_n "(cached) " >&6
29987 else
29988 if test -n "$ac_ct_TARGET_CC"; then
29989 ac_cv_prog_ac_ct_TARGET_CC="$ac_ct_TARGET_CC" # Let the user override the test.
29990 else
29991 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29992 for as_dir in $PATH
29993 do
29994 IFS=$as_save_IFS
29995 test -z "$as_dir" && as_dir=.
29996 for ac_exec_ext in '' $ac_executable_extensions; do
29997 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29998 ac_cv_prog_ac_ct_TARGET_CC="$ac_prog"
29999 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30000 break 2
30001 fi
30002 done
30003 done
30004 IFS=$as_save_IFS
30005
30006 fi
30007 fi
30008 ac_ct_TARGET_CC=$ac_cv_prog_ac_ct_TARGET_CC
30009 if test -n "$ac_ct_TARGET_CC"; then
30010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_TARGET_CC" >&5
30011 $as_echo "$ac_ct_TARGET_CC" >&6; }
30012 else
30013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30014 $as_echo "no" >&6; }
30015 fi
30016
30017
30018 test -n "$ac_ct_TARGET_CC" && break
30019 done
30020
30021 if test "x$ac_ct_TARGET_CC" = x; then
30022 TARGET_CC="as_fn_error $? "none of gcc, egcs and cc is found. set TARGET_CC manually." "$LINENO" 5"
30023 else
30024 case $cross_compiling:$ac_tool_warned in
30025 yes:)
30026 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30027 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30028 ac_tool_warned=yes ;;
30029 esac
30030 TARGET_CC=$ac_ct_TARGET_CC
30031 fi
30032 fi
30033
30034 if test -n "$ac_tool_prefix"; then
30035 # Extract the first word of "${ac_tool_prefix}objcopy", so it can be a program name with args.
30036 set dummy ${ac_tool_prefix}objcopy; ac_word=$2
30037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30038 $as_echo_n "checking for $ac_word... " >&6; }
30039 if ${ac_cv_prog_TARGET_OBJCOPY+:} false; then :
30040 $as_echo_n "(cached) " >&6
30041 else
30042 if test -n "$TARGET_OBJCOPY"; then
30043 ac_cv_prog_TARGET_OBJCOPY="$TARGET_OBJCOPY" # Let the user override the test.
30044 else
30045 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30046 for as_dir in $PATH
30047 do
30048 IFS=$as_save_IFS
30049 test -z "$as_dir" && as_dir=.
30050 for ac_exec_ext in '' $ac_executable_extensions; do
30051 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30052 ac_cv_prog_TARGET_OBJCOPY="${ac_tool_prefix}objcopy"
30053 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30054 break 2
30055 fi
30056 done
30057 done
30058 IFS=$as_save_IFS
30059
30060 fi
30061 fi
30062 TARGET_OBJCOPY=$ac_cv_prog_TARGET_OBJCOPY
30063 if test -n "$TARGET_OBJCOPY"; then
30064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TARGET_OBJCOPY" >&5
30065 $as_echo "$TARGET_OBJCOPY" >&6; }
30066 else
30067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30068 $as_echo "no" >&6; }
30069 fi
30070
30071
30072 fi
30073 if test -z "$ac_cv_prog_TARGET_OBJCOPY"; then
30074 ac_ct_TARGET_OBJCOPY=$TARGET_OBJCOPY
30075 # Extract the first word of "objcopy", so it can be a program name with args.
30076 set dummy objcopy; ac_word=$2
30077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30078 $as_echo_n "checking for $ac_word... " >&6; }
30079 if ${ac_cv_prog_ac_ct_TARGET_OBJCOPY+:} false; then :
30080 $as_echo_n "(cached) " >&6
30081 else
30082 if test -n "$ac_ct_TARGET_OBJCOPY"; then
30083 ac_cv_prog_ac_ct_TARGET_OBJCOPY="$ac_ct_TARGET_OBJCOPY" # Let the user override the test.
30084 else
30085 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30086 for as_dir in $PATH
30087 do
30088 IFS=$as_save_IFS
30089 test -z "$as_dir" && as_dir=.
30090 for ac_exec_ext in '' $ac_executable_extensions; do
30091 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30092 ac_cv_prog_ac_ct_TARGET_OBJCOPY="objcopy"
30093 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30094 break 2
30095 fi
30096 done
30097 done
30098 IFS=$as_save_IFS
30099
30100 fi
30101 fi
30102 ac_ct_TARGET_OBJCOPY=$ac_cv_prog_ac_ct_TARGET_OBJCOPY
30103 if test -n "$ac_ct_TARGET_OBJCOPY"; then
30104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_TARGET_OBJCOPY" >&5
30105 $as_echo "$ac_ct_TARGET_OBJCOPY" >&6; }
30106 else
30107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30108 $as_echo "no" >&6; }
30109 fi
30110
30111 if test "x$ac_ct_TARGET_OBJCOPY" = x; then
30112 TARGET_OBJCOPY=""
30113 else
30114 case $cross_compiling:$ac_tool_warned in
30115 yes:)
30116 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30117 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30118 ac_tool_warned=yes ;;
30119 esac
30120 TARGET_OBJCOPY=$ac_ct_TARGET_OBJCOPY
30121 fi
30122 else
30123 TARGET_OBJCOPY="$ac_cv_prog_TARGET_OBJCOPY"
30124 fi
30125
30126 if test -n "$ac_tool_prefix"; then
30127 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
30128 set dummy ${ac_tool_prefix}strip; ac_word=$2
30129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30130 $as_echo_n "checking for $ac_word... " >&6; }
30131 if ${ac_cv_prog_TARGET_STRIP+:} false; then :
30132 $as_echo_n "(cached) " >&6
30133 else
30134 if test -n "$TARGET_STRIP"; then
30135 ac_cv_prog_TARGET_STRIP="$TARGET_STRIP" # Let the user override the test.
30136 else
30137 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30138 for as_dir in $PATH
30139 do
30140 IFS=$as_save_IFS
30141 test -z "$as_dir" && as_dir=.
30142 for ac_exec_ext in '' $ac_executable_extensions; do
30143 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30144 ac_cv_prog_TARGET_STRIP="${ac_tool_prefix}strip"
30145 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30146 break 2
30147 fi
30148 done
30149 done
30150 IFS=$as_save_IFS
30151
30152 fi
30153 fi
30154 TARGET_STRIP=$ac_cv_prog_TARGET_STRIP
30155 if test -n "$TARGET_STRIP"; then
30156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TARGET_STRIP" >&5
30157 $as_echo "$TARGET_STRIP" >&6; }
30158 else
30159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30160 $as_echo "no" >&6; }
30161 fi
30162
30163
30164 fi
30165 if test -z "$ac_cv_prog_TARGET_STRIP"; then
30166 ac_ct_TARGET_STRIP=$TARGET_STRIP
30167 # Extract the first word of "strip", so it can be a program name with args.
30168 set dummy strip; ac_word=$2
30169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30170 $as_echo_n "checking for $ac_word... " >&6; }
30171 if ${ac_cv_prog_ac_ct_TARGET_STRIP+:} false; then :
30172 $as_echo_n "(cached) " >&6
30173 else
30174 if test -n "$ac_ct_TARGET_STRIP"; then
30175 ac_cv_prog_ac_ct_TARGET_STRIP="$ac_ct_TARGET_STRIP" # Let the user override the test.
30176 else
30177 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30178 for as_dir in $PATH
30179 do
30180 IFS=$as_save_IFS
30181 test -z "$as_dir" && as_dir=.
30182 for ac_exec_ext in '' $ac_executable_extensions; do
30183 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30184 ac_cv_prog_ac_ct_TARGET_STRIP="strip"
30185 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30186 break 2
30187 fi
30188 done
30189 done
30190 IFS=$as_save_IFS
30191
30192 fi
30193 fi
30194 ac_ct_TARGET_STRIP=$ac_cv_prog_ac_ct_TARGET_STRIP
30195 if test -n "$ac_ct_TARGET_STRIP"; then
30196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_TARGET_STRIP" >&5
30197 $as_echo "$ac_ct_TARGET_STRIP" >&6; }
30198 else
30199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30200 $as_echo "no" >&6; }
30201 fi
30202
30203 if test "x$ac_ct_TARGET_STRIP" = x; then
30204 TARGET_STRIP=""
30205 else
30206 case $cross_compiling:$ac_tool_warned in
30207 yes:)
30208 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30209 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30210 ac_tool_warned=yes ;;
30211 esac
30212 TARGET_STRIP=$ac_ct_TARGET_STRIP
30213 fi
30214 else
30215 TARGET_STRIP="$ac_cv_prog_TARGET_STRIP"
30216 fi
30217
30218 if test -n "$ac_tool_prefix"; then
30219 # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
30220 set dummy ${ac_tool_prefix}nm; ac_word=$2
30221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30222 $as_echo_n "checking for $ac_word... " >&6; }
30223 if ${ac_cv_prog_TARGET_NM+:} false; then :
30224 $as_echo_n "(cached) " >&6
30225 else
30226 if test -n "$TARGET_NM"; then
30227 ac_cv_prog_TARGET_NM="$TARGET_NM" # Let the user override the test.
30228 else
30229 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30230 for as_dir in $PATH
30231 do
30232 IFS=$as_save_IFS
30233 test -z "$as_dir" && as_dir=.
30234 for ac_exec_ext in '' $ac_executable_extensions; do
30235 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30236 ac_cv_prog_TARGET_NM="${ac_tool_prefix}nm"
30237 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30238 break 2
30239 fi
30240 done
30241 done
30242 IFS=$as_save_IFS
30243
30244 fi
30245 fi
30246 TARGET_NM=$ac_cv_prog_TARGET_NM
30247 if test -n "$TARGET_NM"; then
30248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TARGET_NM" >&5
30249 $as_echo "$TARGET_NM" >&6; }
30250 else
30251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30252 $as_echo "no" >&6; }
30253 fi
30254
30255
30256 fi
30257 if test -z "$ac_cv_prog_TARGET_NM"; then
30258 ac_ct_TARGET_NM=$TARGET_NM
30259 # Extract the first word of "nm", so it can be a program name with args.
30260 set dummy nm; ac_word=$2
30261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30262 $as_echo_n "checking for $ac_word... " >&6; }
30263 if ${ac_cv_prog_ac_ct_TARGET_NM+:} false; then :
30264 $as_echo_n "(cached) " >&6
30265 else
30266 if test -n "$ac_ct_TARGET_NM"; then
30267 ac_cv_prog_ac_ct_TARGET_NM="$ac_ct_TARGET_NM" # Let the user override the test.
30268 else
30269 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30270 for as_dir in $PATH
30271 do
30272 IFS=$as_save_IFS
30273 test -z "$as_dir" && as_dir=.
30274 for ac_exec_ext in '' $ac_executable_extensions; do
30275 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30276 ac_cv_prog_ac_ct_TARGET_NM="nm"
30277 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30278 break 2
30279 fi
30280 done
30281 done
30282 IFS=$as_save_IFS
30283
30284 fi
30285 fi
30286 ac_ct_TARGET_NM=$ac_cv_prog_ac_ct_TARGET_NM
30287 if test -n "$ac_ct_TARGET_NM"; then
30288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_TARGET_NM" >&5
30289 $as_echo "$ac_ct_TARGET_NM" >&6; }
30290 else
30291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30292 $as_echo "no" >&6; }
30293 fi
30294
30295 if test "x$ac_ct_TARGET_NM" = x; then
30296 TARGET_NM=""
30297 else
30298 case $cross_compiling:$ac_tool_warned in
30299 yes:)
30300 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30301 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30302 ac_tool_warned=yes ;;
30303 esac
30304 TARGET_NM=$ac_ct_TARGET_NM
30305 fi
30306 else
30307 TARGET_NM="$ac_cv_prog_TARGET_NM"
30308 fi
30309
30310 if test -n "$ac_tool_prefix"; then
30311 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
30312 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
30313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30314 $as_echo_n "checking for $ac_word... " >&6; }
30315 if ${ac_cv_prog_TARGET_RANLIB+:} false; then :
30316 $as_echo_n "(cached) " >&6
30317 else
30318 if test -n "$TARGET_RANLIB"; then
30319 ac_cv_prog_TARGET_RANLIB="$TARGET_RANLIB" # Let the user override the test.
30320 else
30321 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30322 for as_dir in $PATH
30323 do
30324 IFS=$as_save_IFS
30325 test -z "$as_dir" && as_dir=.
30326 for ac_exec_ext in '' $ac_executable_extensions; do
30327 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30328 ac_cv_prog_TARGET_RANLIB="${ac_tool_prefix}ranlib"
30329 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30330 break 2
30331 fi
30332 done
30333 done
30334 IFS=$as_save_IFS
30335
30336 fi
30337 fi
30338 TARGET_RANLIB=$ac_cv_prog_TARGET_RANLIB
30339 if test -n "$TARGET_RANLIB"; then
30340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TARGET_RANLIB" >&5
30341 $as_echo "$TARGET_RANLIB" >&6; }
30342 else
30343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30344 $as_echo "no" >&6; }
30345 fi
30346
30347
30348 fi
30349 if test -z "$ac_cv_prog_TARGET_RANLIB"; then
30350 ac_ct_TARGET_RANLIB=$TARGET_RANLIB
30351 # Extract the first word of "ranlib", so it can be a program name with args.
30352 set dummy ranlib; ac_word=$2
30353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30354 $as_echo_n "checking for $ac_word... " >&6; }
30355 if ${ac_cv_prog_ac_ct_TARGET_RANLIB+:} false; then :
30356 $as_echo_n "(cached) " >&6
30357 else
30358 if test -n "$ac_ct_TARGET_RANLIB"; then
30359 ac_cv_prog_ac_ct_TARGET_RANLIB="$ac_ct_TARGET_RANLIB" # Let the user override the test.
30360 else
30361 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30362 for as_dir in $PATH
30363 do
30364 IFS=$as_save_IFS
30365 test -z "$as_dir" && as_dir=.
30366 for ac_exec_ext in '' $ac_executable_extensions; do
30367 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30368 ac_cv_prog_ac_ct_TARGET_RANLIB="ranlib"
30369 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30370 break 2
30371 fi
30372 done
30373 done
30374 IFS=$as_save_IFS
30375
30376 fi
30377 fi
30378 ac_ct_TARGET_RANLIB=$ac_cv_prog_ac_ct_TARGET_RANLIB
30379 if test -n "$ac_ct_TARGET_RANLIB"; then
30380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_TARGET_RANLIB" >&5
30381 $as_echo "$ac_ct_TARGET_RANLIB" >&6; }
30382 else
30383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30384 $as_echo "no" >&6; }
30385 fi
30386
30387 if test "x$ac_ct_TARGET_RANLIB" = x; then
30388 TARGET_RANLIB=""
30389 else
30390 case $cross_compiling:$ac_tool_warned in
30391 yes:)
30392 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30393 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30394 ac_tool_warned=yes ;;
30395 esac
30396 TARGET_RANLIB=$ac_ct_TARGET_RANLIB
30397 fi
30398 else
30399 TARGET_RANLIB="$ac_cv_prog_TARGET_RANLIB"
30400 fi
30401
30402
30403 ac_tool_prefix="$tmp_ac_tool_prefix"
30404 else
30405 if test "x$TARGET_CC" = x; then
30406 TARGET_CC=$CC
30407 fi
30408 if test -n "$ac_tool_prefix"; then
30409 # Extract the first word of "${ac_tool_prefix}objcopy", so it can be a program name with args.
30410 set dummy ${ac_tool_prefix}objcopy; ac_word=$2
30411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30412 $as_echo_n "checking for $ac_word... " >&6; }
30413 if ${ac_cv_prog_TARGET_OBJCOPY+:} false; then :
30414 $as_echo_n "(cached) " >&6
30415 else
30416 if test -n "$TARGET_OBJCOPY"; then
30417 ac_cv_prog_TARGET_OBJCOPY="$TARGET_OBJCOPY" # Let the user override the test.
30418 else
30419 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30420 for as_dir in $PATH
30421 do
30422 IFS=$as_save_IFS
30423 test -z "$as_dir" && as_dir=.
30424 for ac_exec_ext in '' $ac_executable_extensions; do
30425 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30426 ac_cv_prog_TARGET_OBJCOPY="${ac_tool_prefix}objcopy"
30427 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30428 break 2
30429 fi
30430 done
30431 done
30432 IFS=$as_save_IFS
30433
30434 fi
30435 fi
30436 TARGET_OBJCOPY=$ac_cv_prog_TARGET_OBJCOPY
30437 if test -n "$TARGET_OBJCOPY"; then
30438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TARGET_OBJCOPY" >&5
30439 $as_echo "$TARGET_OBJCOPY" >&6; }
30440 else
30441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30442 $as_echo "no" >&6; }
30443 fi
30444
30445
30446 fi
30447 if test -z "$ac_cv_prog_TARGET_OBJCOPY"; then
30448 ac_ct_TARGET_OBJCOPY=$TARGET_OBJCOPY
30449 # Extract the first word of "objcopy", so it can be a program name with args.
30450 set dummy objcopy; ac_word=$2
30451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30452 $as_echo_n "checking for $ac_word... " >&6; }
30453 if ${ac_cv_prog_ac_ct_TARGET_OBJCOPY+:} false; then :
30454 $as_echo_n "(cached) " >&6
30455 else
30456 if test -n "$ac_ct_TARGET_OBJCOPY"; then
30457 ac_cv_prog_ac_ct_TARGET_OBJCOPY="$ac_ct_TARGET_OBJCOPY" # Let the user override the test.
30458 else
30459 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30460 for as_dir in $PATH
30461 do
30462 IFS=$as_save_IFS
30463 test -z "$as_dir" && as_dir=.
30464 for ac_exec_ext in '' $ac_executable_extensions; do
30465 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30466 ac_cv_prog_ac_ct_TARGET_OBJCOPY="objcopy"
30467 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30468 break 2
30469 fi
30470 done
30471 done
30472 IFS=$as_save_IFS
30473
30474 fi
30475 fi
30476 ac_ct_TARGET_OBJCOPY=$ac_cv_prog_ac_ct_TARGET_OBJCOPY
30477 if test -n "$ac_ct_TARGET_OBJCOPY"; then
30478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_TARGET_OBJCOPY" >&5
30479 $as_echo "$ac_ct_TARGET_OBJCOPY" >&6; }
30480 else
30481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30482 $as_echo "no" >&6; }
30483 fi
30484
30485 if test "x$ac_ct_TARGET_OBJCOPY" = x; then
30486 TARGET_OBJCOPY=""
30487 else
30488 case $cross_compiling:$ac_tool_warned in
30489 yes:)
30490 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30491 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30492 ac_tool_warned=yes ;;
30493 esac
30494 TARGET_OBJCOPY=$ac_ct_TARGET_OBJCOPY
30495 fi
30496 else
30497 TARGET_OBJCOPY="$ac_cv_prog_TARGET_OBJCOPY"
30498 fi
30499
30500 if test -n "$ac_tool_prefix"; then
30501 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
30502 set dummy ${ac_tool_prefix}strip; ac_word=$2
30503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30504 $as_echo_n "checking for $ac_word... " >&6; }
30505 if ${ac_cv_prog_TARGET_STRIP+:} false; then :
30506 $as_echo_n "(cached) " >&6
30507 else
30508 if test -n "$TARGET_STRIP"; then
30509 ac_cv_prog_TARGET_STRIP="$TARGET_STRIP" # Let the user override the test.
30510 else
30511 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30512 for as_dir in $PATH
30513 do
30514 IFS=$as_save_IFS
30515 test -z "$as_dir" && as_dir=.
30516 for ac_exec_ext in '' $ac_executable_extensions; do
30517 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30518 ac_cv_prog_TARGET_STRIP="${ac_tool_prefix}strip"
30519 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30520 break 2
30521 fi
30522 done
30523 done
30524 IFS=$as_save_IFS
30525
30526 fi
30527 fi
30528 TARGET_STRIP=$ac_cv_prog_TARGET_STRIP
30529 if test -n "$TARGET_STRIP"; then
30530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TARGET_STRIP" >&5
30531 $as_echo "$TARGET_STRIP" >&6; }
30532 else
30533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30534 $as_echo "no" >&6; }
30535 fi
30536
30537
30538 fi
30539 if test -z "$ac_cv_prog_TARGET_STRIP"; then
30540 ac_ct_TARGET_STRIP=$TARGET_STRIP
30541 # Extract the first word of "strip", so it can be a program name with args.
30542 set dummy strip; ac_word=$2
30543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30544 $as_echo_n "checking for $ac_word... " >&6; }
30545 if ${ac_cv_prog_ac_ct_TARGET_STRIP+:} false; then :
30546 $as_echo_n "(cached) " >&6
30547 else
30548 if test -n "$ac_ct_TARGET_STRIP"; then
30549 ac_cv_prog_ac_ct_TARGET_STRIP="$ac_ct_TARGET_STRIP" # Let the user override the test.
30550 else
30551 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30552 for as_dir in $PATH
30553 do
30554 IFS=$as_save_IFS
30555 test -z "$as_dir" && as_dir=.
30556 for ac_exec_ext in '' $ac_executable_extensions; do
30557 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30558 ac_cv_prog_ac_ct_TARGET_STRIP="strip"
30559 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30560 break 2
30561 fi
30562 done
30563 done
30564 IFS=$as_save_IFS
30565
30566 fi
30567 fi
30568 ac_ct_TARGET_STRIP=$ac_cv_prog_ac_ct_TARGET_STRIP
30569 if test -n "$ac_ct_TARGET_STRIP"; then
30570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_TARGET_STRIP" >&5
30571 $as_echo "$ac_ct_TARGET_STRIP" >&6; }
30572 else
30573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30574 $as_echo "no" >&6; }
30575 fi
30576
30577 if test "x$ac_ct_TARGET_STRIP" = x; then
30578 TARGET_STRIP=""
30579 else
30580 case $cross_compiling:$ac_tool_warned in
30581 yes:)
30582 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30583 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30584 ac_tool_warned=yes ;;
30585 esac
30586 TARGET_STRIP=$ac_ct_TARGET_STRIP
30587 fi
30588 else
30589 TARGET_STRIP="$ac_cv_prog_TARGET_STRIP"
30590 fi
30591
30592 if test -n "$ac_tool_prefix"; then
30593 # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
30594 set dummy ${ac_tool_prefix}nm; ac_word=$2
30595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30596 $as_echo_n "checking for $ac_word... " >&6; }
30597 if ${ac_cv_prog_TARGET_NM+:} false; then :
30598 $as_echo_n "(cached) " >&6
30599 else
30600 if test -n "$TARGET_NM"; then
30601 ac_cv_prog_TARGET_NM="$TARGET_NM" # Let the user override the test.
30602 else
30603 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30604 for as_dir in $PATH
30605 do
30606 IFS=$as_save_IFS
30607 test -z "$as_dir" && as_dir=.
30608 for ac_exec_ext in '' $ac_executable_extensions; do
30609 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30610 ac_cv_prog_TARGET_NM="${ac_tool_prefix}nm"
30611 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30612 break 2
30613 fi
30614 done
30615 done
30616 IFS=$as_save_IFS
30617
30618 fi
30619 fi
30620 TARGET_NM=$ac_cv_prog_TARGET_NM
30621 if test -n "$TARGET_NM"; then
30622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TARGET_NM" >&5
30623 $as_echo "$TARGET_NM" >&6; }
30624 else
30625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30626 $as_echo "no" >&6; }
30627 fi
30628
30629
30630 fi
30631 if test -z "$ac_cv_prog_TARGET_NM"; then
30632 ac_ct_TARGET_NM=$TARGET_NM
30633 # Extract the first word of "nm", so it can be a program name with args.
30634 set dummy nm; ac_word=$2
30635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30636 $as_echo_n "checking for $ac_word... " >&6; }
30637 if ${ac_cv_prog_ac_ct_TARGET_NM+:} false; then :
30638 $as_echo_n "(cached) " >&6
30639 else
30640 if test -n "$ac_ct_TARGET_NM"; then
30641 ac_cv_prog_ac_ct_TARGET_NM="$ac_ct_TARGET_NM" # Let the user override the test.
30642 else
30643 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30644 for as_dir in $PATH
30645 do
30646 IFS=$as_save_IFS
30647 test -z "$as_dir" && as_dir=.
30648 for ac_exec_ext in '' $ac_executable_extensions; do
30649 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30650 ac_cv_prog_ac_ct_TARGET_NM="nm"
30651 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30652 break 2
30653 fi
30654 done
30655 done
30656 IFS=$as_save_IFS
30657
30658 fi
30659 fi
30660 ac_ct_TARGET_NM=$ac_cv_prog_ac_ct_TARGET_NM
30661 if test -n "$ac_ct_TARGET_NM"; then
30662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_TARGET_NM" >&5
30663 $as_echo "$ac_ct_TARGET_NM" >&6; }
30664 else
30665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30666 $as_echo "no" >&6; }
30667 fi
30668
30669 if test "x$ac_ct_TARGET_NM" = x; then
30670 TARGET_NM=""
30671 else
30672 case $cross_compiling:$ac_tool_warned in
30673 yes:)
30674 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30675 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30676 ac_tool_warned=yes ;;
30677 esac
30678 TARGET_NM=$ac_ct_TARGET_NM
30679 fi
30680 else
30681 TARGET_NM="$ac_cv_prog_TARGET_NM"
30682 fi
30683
30684 if test -n "$ac_tool_prefix"; then
30685 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
30686 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
30687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30688 $as_echo_n "checking for $ac_word... " >&6; }
30689 if ${ac_cv_prog_TARGET_RANLIB+:} false; then :
30690 $as_echo_n "(cached) " >&6
30691 else
30692 if test -n "$TARGET_RANLIB"; then
30693 ac_cv_prog_TARGET_RANLIB="$TARGET_RANLIB" # Let the user override the test.
30694 else
30695 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30696 for as_dir in $PATH
30697 do
30698 IFS=$as_save_IFS
30699 test -z "$as_dir" && as_dir=.
30700 for ac_exec_ext in '' $ac_executable_extensions; do
30701 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30702 ac_cv_prog_TARGET_RANLIB="${ac_tool_prefix}ranlib"
30703 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30704 break 2
30705 fi
30706 done
30707 done
30708 IFS=$as_save_IFS
30709
30710 fi
30711 fi
30712 TARGET_RANLIB=$ac_cv_prog_TARGET_RANLIB
30713 if test -n "$TARGET_RANLIB"; then
30714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TARGET_RANLIB" >&5
30715 $as_echo "$TARGET_RANLIB" >&6; }
30716 else
30717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30718 $as_echo "no" >&6; }
30719 fi
30720
30721
30722 fi
30723 if test -z "$ac_cv_prog_TARGET_RANLIB"; then
30724 ac_ct_TARGET_RANLIB=$TARGET_RANLIB
30725 # Extract the first word of "ranlib", so it can be a program name with args.
30726 set dummy ranlib; ac_word=$2
30727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30728 $as_echo_n "checking for $ac_word... " >&6; }
30729 if ${ac_cv_prog_ac_ct_TARGET_RANLIB+:} false; then :
30730 $as_echo_n "(cached) " >&6
30731 else
30732 if test -n "$ac_ct_TARGET_RANLIB"; then
30733 ac_cv_prog_ac_ct_TARGET_RANLIB="$ac_ct_TARGET_RANLIB" # Let the user override the test.
30734 else
30735 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30736 for as_dir in $PATH
30737 do
30738 IFS=$as_save_IFS
30739 test -z "$as_dir" && as_dir=.
30740 for ac_exec_ext in '' $ac_executable_extensions; do
30741 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30742 ac_cv_prog_ac_ct_TARGET_RANLIB="ranlib"
30743 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30744 break 2
30745 fi
30746 done
30747 done
30748 IFS=$as_save_IFS
30749
30750 fi
30751 fi
30752 ac_ct_TARGET_RANLIB=$ac_cv_prog_ac_ct_TARGET_RANLIB
30753 if test -n "$ac_ct_TARGET_RANLIB"; then
30754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_TARGET_RANLIB" >&5
30755 $as_echo "$ac_ct_TARGET_RANLIB" >&6; }
30756 else
30757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30758 $as_echo "no" >&6; }
30759 fi
30760
30761 if test "x$ac_ct_TARGET_RANLIB" = x; then
30762 TARGET_RANLIB=""
30763 else
30764 case $cross_compiling:$ac_tool_warned in
30765 yes:)
30766 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30767 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30768 ac_tool_warned=yes ;;
30769 esac
30770 TARGET_RANLIB=$ac_ct_TARGET_RANLIB
30771 fi
30772 else
30773 TARGET_RANLIB="$ac_cv_prog_TARGET_RANLIB"
30774 fi
30775
30776 fi
30777
30778
30779
30780
30781
30782
30783
30784
30785
30786
30787
30788
30789 # Test the C compiler for the target environment.
30790 tmp_CC="$CC"
30791 tmp_CFLAGS="$CFLAGS"
30792 tmp_LDFLAGS="$LDFLAGS"
30793 tmp_CPPFLAGS="$CPPFLAGS"
30794 tmp_LIBS="$LIBS"
30795 CC="$TARGET_CC"
30796 CFLAGS="$TARGET_CFLAGS"
30797 CPPFLAGS="$TARGET_CPPFLAGS"
30798 LDFLAGS="$TARGET_LDFLAGS"
30799 LIBS=""
30800
30801 if test "x$target_m32" = x1; then
30802 # Force 32-bit mode.
30803 TARGET_CFLAGS="$TARGET_CFLAGS -m32"
30804 TARGET_CCASFLAGS="$TARGET_CCASFLAGS -m32"
30805 TARGET_CPPFLAGS="$TARGET_CPPFLAGS -m32"
30806 TARGET_LDFLAGS="$TARGET_LDFLAGS -m32"
30807 TARGET_MODULE_FORMAT="elf32"
30808 fi
30809
30810 if test "x$target_m64" = x1; then
30811 # Force 64-bit mode.
30812 TARGET_CFLAGS="$TARGET_CFLAGS -m64"
30813 TARGET_CCASFLAGS="$TARGET_CCASFLAGS -m64"
30814 TARGET_CPPFLAGS="$TARGET_CPPFLAGS -m64"
30815 TARGET_LDFLAGS="$TARGET_LDFLAGS -m64"
30816 TARGET_MODULE_FORMAT="elf64"
30817 fi
30818
30819 # debug flags.
30820 TARGET_CFLAGS="$TARGET_CFLAGS $WARN_FLAGS -g -Wredundant-decls -Wmissing-prototypes -Wmissing-declarations"
30821 TARGET_CCASFLAGS="$TARGET_CCASFLAGS -g"
30822
30823 if test "x$target_cpu" != xi386 && test "x$target_cpu" != xx86_64; then
30824 TARGET_CFLAGS="$TARGET_CFLAGS -Wcast-align"
30825 fi
30826
30827 TARGET_CC_VERSION="$(LC_ALL=C $TARGET_CC --version | head -n1)"
30828
30829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which extra warnings work" >&5
30830 $as_echo_n "checking which extra warnings work... " >&6; }
30831 if ${grub_cv_target_cc_w_extra_flags+:} false; then :
30832 $as_echo_n "(cached) " >&6
30833 else
30834
30835 LDFLAGS="$TARGET_LDFLAGS -nostdlib -static"
30836
30837 grub_cv_target_cc_w_extra_flags=
30838 for x in $EXTRA_WARN_FLAGS; do
30839 CFLAGS="$TARGET_CFLAGS $x -Werror"
30840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30841 /* end confdefs.h. */
30842
30843 asm (".globl start; start:");
30844 void __main (void);
30845 void __main (void) {}
30846 int main (void);
30847
30848 int
30849 main (void)
30850 {
30851
30852 ;
30853 return 0;
30854 }
30855 _ACEOF
30856 if ac_fn_c_try_link "$LINENO"; then :
30857 flag=1
30858 else
30859 flag=0
30860 fi
30861 rm -f core conftest.err conftest.$ac_objext \
30862 conftest$ac_exeext conftest.$ac_ext
30863 if test x$flag = x1 ; then
30864 grub_cv_target_cc_w_extra_flags="$grub_cv_target_cc_w_extra_flags $x"
30865 fi
30866 done
30867
30868 fi
30869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $grub_cv_target_cc_w_extra_flags" >&5
30870 $as_echo "$grub_cv_target_cc_w_extra_flags" >&6; }
30871
30872 TARGET_CFLAGS="$TARGET_CFLAGS $grub_cv_target_cc_w_extra_flags"
30873
30874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiling with clang" >&5
30875 $as_echo_n "checking if compiling with clang... " >&6; }
30876 if ${grub_cv_cc_target_clang+:} false; then :
30877 $as_echo_n "(cached) " >&6
30878 else
30879
30880 CFLAGS="$TARGET_CFLAGS"
30881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30882 /* end confdefs.h. */
30883
30884 int
30885 main (void)
30886 {
30887
30888 #ifdef __clang__
30889 #error "is clang"
30890 #endif
30891
30892 ;
30893 return 0;
30894 }
30895 _ACEOF
30896 if ac_fn_c_try_compile "$LINENO"; then :
30897 grub_cv_cc_target_clang=no
30898 else
30899 grub_cv_cc_target_clang=yes
30900 fi
30901 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30902 fi
30903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $grub_cv_cc_target_clang" >&5
30904 $as_echo "$grub_cv_cc_target_clang" >&6; }
30905
30906 if test x$target_cpu = xpowerpc -o x$target_cpu = xmips; then
30907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for options to get big-endian compilation" >&5
30908 $as_echo_n "checking for options to get big-endian compilation... " >&6; }
30909 if ${grub_cv_target_cc_big_endian+:} false; then :
30910 $as_echo_n "(cached) " >&6
30911 else
30912
30913 grub_cv_target_cc_big_endian=no
30914 for cand in "-target $target_cpu -Wl,-EB" "-target $target_cpu" \
30915 "-target $target_cpu-linux-gnu -Wl,-EB" "-target $target_cpu-linux-gnu" \
30916 "-EB" "-mbig-endian"; do
30917 if test x"$grub_cv_target_cc_big_endian" != xno ; then
30918 break
30919 fi
30920 CFLAGS="$TARGET_CFLAGS $cand -Werror"
30921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30922 /* end confdefs.h. */
30923
30924 #if defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) && (__ORDER_BIG_ENDIAN__ != __BYTE_ORDER__)
30925 #error still little endian
30926 #endif
30927 asm (".globl start; start:");
30928 asm (".globl _start; _start:");
30929 asm (".globl __start; __start:");
30930 void __main (void);
30931 void __main (void) {}
30932 int main (void);
30933
30934 int
30935 main (void)
30936 {
30937
30938 ;
30939 return 0;
30940 }
30941 _ACEOF
30942 if ac_fn_c_try_link "$LINENO"; then :
30943 grub_cv_target_cc_big_endian="$cand"
30944 fi
30945 rm -f core conftest.err conftest.$ac_objext \
30946 conftest$ac_exeext conftest.$ac_ext
30947 done
30948
30949 fi
30950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $grub_cv_target_cc_big_endian" >&5
30951 $as_echo "$grub_cv_target_cc_big_endian" >&6; }
30952
30953 if test x"$grub_cv_target_cc_big_endian" = xno ; then
30954 as_fn_error $? "could not force big-endian" "$LINENO" 5
30955 fi
30956
30957 skip_linkflags="$(echo "$grub_cv_target_cc_big_endian"|sed 's@-Wl,-EB@@')"
30958
30959 TARGET_CFLAGS="$TARGET_CFLAGS $skip_linkflags"
30960 TARGET_CPPFLAGS="$TARGET_CPPFLAGS $skip_linkflags"
30961 TARGET_CCASFLAGS="$TARGET_CCASFLAGS $skip_linkflags"
30962 TARGET_LDFLAGS="$TARGET_LDFLAGS $grub_cv_target_cc_big_endian"
30963 elif test x$target_cpu = xmipsel; then
30964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for options to get little-endian compilation" >&5
30965 $as_echo_n "checking for options to get little-endian compilation... " >&6; }
30966 if ${grub_cv_target_cc_little_endian+:} false; then :
30967 $as_echo_n "(cached) " >&6
30968 else
30969
30970 grub_cv_target_cc_little_endian=no
30971 for cand in "-target $target_cpu -Wl,-EL" "-target $target_cpu" \
30972 "-target $target_cpu-linux-gnu -Wl,-EL" "-target $target_cpu-linux-gnu" \
30973 "-EL"; do
30974 if test x"$grub_cv_target_cc_little_endian" != xno ; then
30975 break
30976 fi
30977 CFLAGS="$TARGET_CFLAGS $cand -Werror"
30978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30979 /* end confdefs.h. */
30980
30981 #if defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) && (__ORDER_BIG_ENDIAN__ == __BYTE_ORDER__)
30982 #error still big endian
30983 #endif
30984 asm (".globl start; start:");
30985 asm (".globl _start; _start:");
30986 asm (".globl __start; __start:");
30987 void __main (void);
30988 void __main (void) {}
30989 int main (void);
30990
30991 int
30992 main (void)
30993 {
30994
30995 ;
30996 return 0;
30997 }
30998 _ACEOF
30999 if ac_fn_c_try_link "$LINENO"; then :
31000 grub_cv_target_cc_little_endian="$cand"
31001 fi
31002 rm -f core conftest.err conftest.$ac_objext \
31003 conftest$ac_exeext conftest.$ac_ext
31004 done
31005
31006 fi
31007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $grub_cv_target_cc_little_endian" >&5
31008 $as_echo "$grub_cv_target_cc_little_endian" >&6; }
31009
31010 if test x"$grub_cv_target_cc_little_endian" = xno ; then
31011 as_fn_error $? "could not force little-endian" "$LINENO" 5
31012 fi
31013
31014 skip_linkflags="$(echo "$grub_cv_target_cc_little_endian"|sed 's@-Wl,-EL@@')"
31015
31016 TARGET_CFLAGS="$TARGET_CFLAGS $skip_linkflags"
31017 TARGET_CPPFLAGS="$TARGET_CPPFLAGS $skip_linkflags"
31018 TARGET_CCASFLAGS="$TARGET_CCASFLAGS $skip_linkflags"
31019 TARGET_LDFLAGS="$TARGET_LDFLAGS $grub_cv_target_cc_little_endian"
31020 fi
31021
31022 # GRUB code is N32-compliant but it's experimental and we would prefer to
31023 # avoid having too much variety when it doesn't result in any real improvement.
31024 # Moreover N64 isn't supported.
31025 if test "x$target_cpu" = xmips || test "x$target_cpu" = xmipsel ; then
31026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for options to force MIPS o32 ABI" >&5
31027 $as_echo_n "checking for options to force MIPS o32 ABI... " >&6; }
31028 if ${grub_cv_target_cc_mips_o32_abi+:} false; then :
31029 $as_echo_n "(cached) " >&6
31030 else
31031
31032 grub_cv_target_cc_mips_o32_abi=no
31033 for arg in "" "-mabi=32" "-target $target_cpu -mabi=32" ; do
31034 if test x"$grub_cv_target_cc_mips_o32_abi" != xno ; then
31035 break
31036 fi
31037 CFLAGS="$TARGET_CFLAGS $arg -Werror"
31038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31039 /* end confdefs.h. */
31040
31041 #if !defined(_ABIO32) || !defined(_MIPS_SIM) || (_MIPS_SIM != _ABIO32)
31042 #error not o32 ABI
31043 #endif
31044 asm (".globl start; start:");
31045 asm (".globl _start; _start:");
31046 asm (".globl __start; __start:");
31047 void __main (void);
31048 void __main (void) {}
31049 int main (void);
31050
31051 int
31052 main (void)
31053 {
31054
31055 ;
31056 return 0;
31057 }
31058 _ACEOF
31059 if ac_fn_c_try_link "$LINENO"; then :
31060 grub_cv_target_cc_mips_o32_abi="$arg"
31061 fi
31062 rm -f core conftest.err conftest.$ac_objext \
31063 conftest$ac_exeext conftest.$ac_ext
31064 done
31065
31066 fi
31067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $grub_cv_target_cc_mips_o32_abi" >&5
31068 $as_echo "$grub_cv_target_cc_mips_o32_abi" >&6; }
31069
31070 if test x"$grub_cv_target_cc_mips_o32_abi" = xno ; then
31071 as_fn_error $? "could not force MIPS o32 ABI" "$LINENO" 5
31072 fi
31073
31074 TARGET_CFLAGS="$TARGET_CFLAGS $grub_cv_target_cc_mips_o32_abi"
31075 TARGET_CCASFLAGS="$TARGET_CCASFLAGS $grub_cv_target_cc_mips_o32_abi"
31076 fi
31077
31078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for options to compile assembly" >&5
31079 $as_echo_n "checking for options to compile assembly... " >&6; }
31080 if ${grub_cv_cc_target_asm_compile+:} false; then :
31081 $as_echo_n "(cached) " >&6
31082 else
31083
31084 test_program=
31085 case "x$target_cpu-$platform" in
31086 xmips-* | xmipsel-*)
31087 test_program=mips
31088 ;;
31089 xi386-pc)
31090 test_program=i386-pc
31091 ;;
31092 xi386-* | xx86_64-*)
31093 test_program=i386
31094 ;;
31095 xpowerpc-* | xsparc64-* | xarm-*)
31096 test_program=$target_cpu
31097 ;;
31098 esac
31099 if test x"$test_program" = x ; then
31100 grub_cv_cc_target_asm_compile=
31101 else
31102 found=no
31103 for arg in "" "-no-integrated-as"; do
31104 cmdline="$TARGET_CC -c -o /dev/null $TARGET_CCASFLAGS $arg $TARGET_CPPFLAGS $srcdir/asm-tests/$test_program.S"
31105 echo "Running $cmdline" >&5
31106 if $cmdline >&5 2>&5; then
31107 grub_cv_cc_target_asm_compile="$arg"
31108 found=yes
31109 break
31110 fi
31111 done
31112 if test x"$found" = xno ; then
31113 as_fn_error $? "could not compile assembly" "$LINENO" 5
31114 fi
31115 fi
31116
31117 fi
31118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $grub_cv_cc_target_asm_compile" >&5
31119 $as_echo "$grub_cv_cc_target_asm_compile" >&6; }
31120
31121 TARGET_CCASFLAGS="$TARGET_CCASFLAGS $grub_cv_cc_target_asm_compile"
31122
31123 if test "x$target_cpu" = xi386 && test "x$platform" != xemu; then
31124 TARGET_CFLAGS="$TARGET_CFLAGS -march=i386"
31125 fi
31126
31127 if test "x$grub_cv_cc_target_clang" = xno && test "x$target_cpu" = xi386 && test "x$platform" != xemu && test "x$platform" != xefi; then
31128 TARGET_CFLAGS="$TARGET_CFLAGS -mrtd -mregparm=3"
31129 fi
31130
31131 # on mips redirect cache flushing function to non-existant one.
31132 if test "x$target_cpu" = xmips || test "x$target_cpu" = xmipsel ; then
31133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -mflush-func=grub_red_herring works" >&5
31134 $as_echo_n "checking whether -mflush-func=grub_red_herring works... " >&6; }
31135 if ${grub_cv_cc_mflush_func+:} false; then :
31136 $as_echo_n "(cached) " >&6
31137 else
31138
31139 CFLAGS="$TARGET_CFLAGS -mflush-func=grub_red_herring -Werror"
31140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31141 /* end confdefs.h. */
31142
31143 int
31144 main (void)
31145 {
31146
31147 ;
31148 return 0;
31149 }
31150 _ACEOF
31151 if ac_fn_c_try_compile "$LINENO"; then :
31152 grub_cv_cc_mflush_func=yes
31153 else
31154 grub_cv_cc_mflush_func=no
31155 fi
31156 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31157
31158 fi
31159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $grub_cv_cc_mflush_func" >&5
31160 $as_echo "$grub_cv_cc_mflush_func" >&6; }
31161
31162 if test "x$grub_cv_cc_mflush_func" = xyes; then
31163 TARGET_CFLAGS="$TARGET_CFLAGS -mflush-func=grub_red_herring"
31164 fi
31165 fi
31166
31167
31168 # Force no alignment to save space on i386.
31169 if test "x$target_cpu" = xi386; then
31170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -falign-loops works" >&5
31171 $as_echo_n "checking whether -falign-loops works... " >&6; }
31172 if ${grub_cv_cc_falign_loop+:} false; then :
31173 $as_echo_n "(cached) " >&6
31174 else
31175
31176 CFLAGS="$TARGET_CFLAGS -falign-loops=1 -Werror"
31177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31178 /* end confdefs.h. */
31179
31180 int
31181 main (void)
31182 {
31183
31184 ;
31185 return 0;
31186 }
31187 _ACEOF
31188 if ac_fn_c_try_compile "$LINENO"; then :
31189 grub_cv_cc_falign_loop=yes
31190 else
31191 grub_cv_cc_falign_loop=no
31192 fi
31193 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31194
31195 fi
31196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $grub_cv_cc_falign_loop" >&5
31197 $as_echo "$grub_cv_cc_falign_loop" >&6; }
31198
31199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -malign-loops works" >&5
31200 $as_echo_n "checking whether -malign-loops works... " >&6; }
31201 if ${grub_cv_cc_malign_loop+:} false; then :
31202 $as_echo_n "(cached) " >&6
31203 else
31204
31205 CFLAGS="$TARGET_CFLAGS -malign-loops=1 -Werror"
31206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31207 /* end confdefs.h. */
31208
31209 int
31210 main (void)
31211 {
31212
31213 ;
31214 return 0;
31215 }
31216 _ACEOF
31217 if ac_fn_c_try_compile "$LINENO"; then :
31218 grub_cv_cc_malign_loop=yes
31219 else
31220 grub_cv_cc_malign_loop=no
31221 fi
31222 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31223
31224 fi
31225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $grub_cv_cc_malign_loop" >&5
31226 $as_echo "$grub_cv_cc_malign_loop" >&6; }
31227
31228 if test "x$grub_cv_cc_falign_loop" = xyes; then
31229 TARGET_CFLAGS="$TARGET_CFLAGS -falign-jumps=1 -falign-loops=1 -falign-functions=1"
31230 elif test "x$grub_cv_cc_malign_loop" = xyes; then
31231 TARGET_CFLAGS="$TARGET_CFLAGS -malign-jumps=1 -malign-loops=1 -malign-functions=1"
31232 fi
31233 fi
31234
31235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -freg-struct-return works" >&5
31236 $as_echo_n "checking whether -freg-struct-return works... " >&6; }
31237 if ${grub_cv_cc_freg_struct_return+:} false; then :
31238 $as_echo_n "(cached) " >&6
31239 else
31240
31241 CFLAGS="$TARGET_CFLAGS -freg-struct-return -Werror"
31242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31243 /* end confdefs.h. */
31244
31245 int
31246 main (void)
31247 {
31248
31249 ;
31250 return 0;
31251 }
31252 _ACEOF
31253 if ac_fn_c_try_compile "$LINENO"; then :
31254 grub_cv_cc_freg_struct_return=yes
31255 else
31256 grub_cv_cc_freg_struct_return=no
31257 fi
31258 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31259
31260 fi
31261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $grub_cv_cc_freg_struct_return" >&5
31262 $as_echo "$grub_cv_cc_freg_struct_return" >&6; }
31263
31264 if test "x$grub_cv_cc_freg_struct_return" = xyes; then
31265 TARGET_CFLAGS="$TARGET_CFLAGS -freg-struct-return"
31266 fi
31267
31268 if ( test "x$target_cpu" = xi386 || test "x$target_cpu" = xx86_64 ) && test "x$platform" != xemu; then
31269 # Some toolchains enable these features by default, but they need
31270 # registers that aren't set up properly in GRUB.
31271 TARGET_CFLAGS="$TARGET_CFLAGS -mno-mmx -mno-sse -mno-sse2 -mno-sse3 -mno-3dnow"
31272 fi
31273
31274 # GRUB doesn't use float or doubles at all. Yet some toolchains may decide
31275 # that floats are a good fit to run instead of what's written in the code.
31276 # Given that floating point unit is disabled (if present to begin with)
31277 # when GRUB is running which may result in various hard crashes.
31278 if test x"$platform" != xemu ; then
31279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for options to get soft-float" >&5
31280 $as_echo_n "checking for options to get soft-float... " >&6; }
31281 if ${grub_cv_target_cc_soft_float+:} false; then :
31282 $as_echo_n "(cached) " >&6
31283 else
31284
31285 grub_cv_target_cc_soft_float=no
31286 if test "x$target_cpu" = xarm64; then
31287 CFLAGS="$TARGET_CFLAGS -mgeneral-regs-only -Werror"
31288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31289 /* end confdefs.h. */
31290
31291 int
31292 main (void)
31293 {
31294
31295 ;
31296 return 0;
31297 }
31298 _ACEOF
31299 if ac_fn_c_try_compile "$LINENO"; then :
31300 grub_cv_target_cc_soft_float="-mgeneral-regs-only"
31301 fi
31302 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31303 fi
31304 if test "x$target_cpu" = xriscv32; then
31305 CFLAGS="$TARGET_CFLAGS -march=rv32imac -mabi=ilp32 -Werror"
31306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31307 /* end confdefs.h. */
31308
31309 int
31310 main (void)
31311 {
31312
31313 ;
31314 return 0;
31315 }
31316 _ACEOF
31317 if ac_fn_c_try_compile "$LINENO"; then :
31318 grub_cv_target_cc_soft_float="-march=rv32imac -mabi=ilp32"
31319 fi
31320 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31321 fi
31322 if test "x$target_cpu" = xriscv64; then
31323 CFLAGS="$TARGET_CFLAGS -march=rv64imac -mabi=lp64 -Werror"
31324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31325 /* end confdefs.h. */
31326
31327 int
31328 main (void)
31329 {
31330
31331 ;
31332 return 0;
31333 }
31334 _ACEOF
31335 if ac_fn_c_try_compile "$LINENO"; then :
31336 grub_cv_target_cc_soft_float="-march=rv64imac -mabi=lp64"
31337 fi
31338 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31339 fi
31340 if test "x$target_cpu" = xia64; then
31341 CFLAGS="$TARGET_CFLAGS -mno-inline-float-divide -mno-inline-sqrt -Werror"
31342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31343 /* end confdefs.h. */
31344
31345 int
31346 main (void)
31347 {
31348
31349 ;
31350 return 0;
31351 }
31352 _ACEOF
31353 if ac_fn_c_try_compile "$LINENO"; then :
31354 grub_cv_target_cc_soft_float="-mno-inline-float-divide -mno-inline-sqrt"
31355 fi
31356 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31357 fi
31358 if test "x$target_cpu" = xsh4; then
31359 CFLAGS="$TARGET_CFLAGS -m4-nofpu -Werror"
31360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31361 /* end confdefs.h. */
31362
31363 int
31364 main (void)
31365 {
31366
31367 ;
31368 return 0;
31369 }
31370 _ACEOF
31371 if ac_fn_c_try_compile "$LINENO"; then :
31372 grub_cv_target_cc_soft_float="-m4-nofpu"
31373 fi
31374 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31375 fi
31376 for cand in "-msoft-float -Xclang -msoft-float -Xclang -no-implicit-float" \
31377 "-Xclang -msoft-float -Xclang -no-implicit-float" \
31378 "-Xclang -msoft-float" "-msoft-float"; do
31379 if test x"$grub_cv_target_cc_soft_float" != xno ; then
31380 break
31381 fi
31382 CFLAGS="$TARGET_CFLAGS $cand -Werror"
31383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31384 /* end confdefs.h. */
31385
31386 int
31387 main (void)
31388 {
31389
31390 ;
31391 return 0;
31392 }
31393 _ACEOF
31394 if ac_fn_c_try_compile "$LINENO"; then :
31395 grub_cv_target_cc_soft_float="$cand"
31396 fi
31397 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31398 done
31399
31400 fi
31401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $grub_cv_target_cc_soft_float" >&5
31402 $as_echo "$grub_cv_target_cc_soft_float" >&6; }
31403
31404 if test x"$grub_cv_target_cc_soft_float" = xno ; then
31405 as_fn_error $? "could not force soft-float" "$LINENO" 5
31406 fi
31407
31408 case x"$grub_cv_target_cc_soft_float" in
31409 x*"-Xclang"*)
31410 # A trick so that clang doesn't see it on link stаge
31411 TARGET_CPPFLAGS="$TARGET_CPPFLAGS $grub_cv_target_cc_soft_float"
31412 ;;
31413 *)
31414 TARGET_CFLAGS="$TARGET_CFLAGS $grub_cv_target_cc_soft_float"
31415 ;;
31416 esac
31417 TARGET_CCASFLAGS="$TARGET_CCASFLAGS $grub_cv_target_cc_soft_float"
31418
31419 fi
31420
31421 if test x"$target_cpu" = xsparc64 ; then
31422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for options to reserve application registers" >&5
31423 $as_echo_n "checking for options to reserve application registers... " >&6; }
31424 if ${grub_cv_target_cc_mno_app_regs+:} false; then :
31425 $as_echo_n "(cached) " >&6
31426 else
31427
31428 grub_cv_target_cc_mno_app_regs=no
31429 for cand in "-mllvm -sparc-reserve-app-registers" \
31430 "-mno-app-regs"; do
31431 if test x"$grub_cv_target_cc_mno_app_regs" != xno ; then
31432 break
31433 fi
31434 CFLAGS="$TARGET_CFLAGS $cand -Werror"
31435 CPPFLAGS="$TARGET_CPPFLAGS"
31436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31437 /* end confdefs.h. */
31438
31439 int
31440 main (void)
31441 {
31442
31443 ;
31444 return 0;
31445 }
31446 _ACEOF
31447 if ac_fn_c_try_compile "$LINENO"; then :
31448 grub_cv_target_cc_mno_app_regs="$cand"
31449 fi
31450 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31451 done
31452
31453 fi
31454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $grub_cv_target_cc_mno_app_regs" >&5
31455 $as_echo "$grub_cv_target_cc_mno_app_regs" >&6; }
31456
31457 if test x"$grub_cv_target_cc_mno_app_regs" = xno ; then
31458 as_fn_error $? "could not reserve application registers" "$LINENO" 5
31459 fi
31460 if test x"$grub_cv_target_cc_mno_app_regs" = x"-mllvm -sparc-reserve-app-registers" ; then
31461 # A trick so that clang doesn't see it on link stаge
31462 TARGET_CPPFLAGS="$TARGET_CPPFLAGS $grub_cv_target_cc_mno_app_regs"
31463 else
31464 TARGET_CFLAGS="$TARGET_CFLAGS $grub_cv_target_cc_mno_app_regs"
31465 fi
31466
31467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for no-relax options" >&5
31468 $as_echo_n "checking for no-relax options... " >&6; }
31469 if ${grub_cv_target_cc_mno_relax+:} false; then :
31470 $as_echo_n "(cached) " >&6
31471 else
31472
31473 grub_cv_target_cc_mno_relax=no
31474 for cand in "-mno-relax" "-Wl,--no-relax"; do
31475 if test x"$grub_cv_target_cc_mno_relax" != xno ; then
31476 break
31477 fi
31478 LDFLAGS="$TARGET_LDFLAGS $cand -nostdlib -static"
31479 CFLAGS="$TARGET_CFLAGS -Werror"
31480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31481 /* end confdefs.h. */
31482
31483 asm (".globl start; start:");
31484 void __main (void);
31485 void __main (void) {}
31486 int main (void);
31487
31488 int
31489 main (void)
31490 {
31491
31492 ;
31493 return 0;
31494 }
31495 _ACEOF
31496 if ac_fn_c_try_link "$LINENO"; then :
31497 grub_cv_target_cc_mno_relax="$cand"
31498 fi
31499 rm -f core conftest.err conftest.$ac_objext \
31500 conftest$ac_exeext conftest.$ac_ext
31501 done
31502
31503 fi
31504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $grub_cv_target_cc_mno_relax" >&5
31505 $as_echo "$grub_cv_target_cc_mno_relax" >&6; }
31506 LDFLAGS="$TARGET_LDFLAGS"
31507 CFLAGS="$TARGET_CFLAGS"
31508
31509 if test x"$grub_cv_target_cc_mno_relax" = xno ; then
31510 as_fn_error $? "could not find no-relax options" "$LINENO" 5
31511 fi
31512 TARGET_LDFLAGS="$TARGET_LDFLAGS $grub_cv_target_cc_mno_relax"
31513 fi
31514
31515 # By default, GCC 4.4 generates .eh_frame sections containing unwind
31516 # information in some cases where it previously did not. GRUB doesn't need
31517 # these and they just use up vital space. Restore the old compiler
31518 # behaviour.
31519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fno-dwarf2-cfi-asm works" >&5
31520 $as_echo_n "checking whether -fno-dwarf2-cfi-asm works... " >&6; }
31521 if ${grub_cv_cc_fno_dwarf2_cfi_asm+:} false; then :
31522 $as_echo_n "(cached) " >&6
31523 else
31524
31525 CFLAGS="$TARGET_CFLAGS -fno-dwarf2-cfi-asm"
31526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31527 /* end confdefs.h. */
31528
31529 int
31530 main (void)
31531 {
31532
31533 ;
31534 return 0;
31535 }
31536 _ACEOF
31537 if ac_fn_c_try_compile "$LINENO"; then :
31538 grub_cv_cc_fno_dwarf2_cfi_asm=yes
31539 else
31540 grub_cv_cc_fno_dwarf2_cfi_asm=no
31541 fi
31542 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31543
31544 fi
31545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $grub_cv_cc_fno_dwarf2_cfi_asm" >&5
31546 $as_echo "$grub_cv_cc_fno_dwarf2_cfi_asm" >&6; }
31547
31548 if test "x$grub_cv_cc_fno_dwarf2_cfi_asm" = xyes; then
31549 TARGET_CFLAGS="$TARGET_CFLAGS -fno-dwarf2-cfi-asm"
31550 fi
31551
31552 if test x"$target_os" = xcygwin; then
31553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether option -fno-reorder-functions works" >&5
31554 $as_echo_n "checking whether option -fno-reorder-functions works... " >&6; }
31555 if ${grub_cv_cc_no_reorder_functions+:} false; then :
31556 $as_echo_n "(cached) " >&6
31557 else
31558
31559 CFLAGS="$TARGET_CFLAGS -fno-reorder-functions"
31560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31561 /* end confdefs.h. */
31562
31563 int
31564 main (void)
31565 {
31566
31567 ;
31568 return 0;
31569 }
31570 _ACEOF
31571 if ac_fn_c_try_compile "$LINENO"; then :
31572 grub_cv_cc_no_reorder_functions=yes
31573 else
31574 grub_cv_cc_no_reorder_functions=no
31575 fi
31576 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31577
31578 fi
31579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $grub_cv_cc_no_reorder_functions" >&5
31580 $as_echo "$grub_cv_cc_no_reorder_functions" >&6; }
31581 fi
31582
31583 if test x"$target_os" = xcygwin && test "x$grub_cv_cc_no_reorder_functions" = xyes; then
31584 TARGET_CFLAGS="$TARGET_CFLAGS -fno-reorder-functions"
31585 fi
31586
31587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -mno-stack-arg-probe works" >&5
31588 $as_echo_n "checking whether -mno-stack-arg-probe works... " >&6; }
31589 if ${grub_cv_cc_mno_stack_arg_probe+:} false; then :
31590 $as_echo_n "(cached) " >&6
31591 else
31592
31593 CFLAGS="$TARGET_CFLAGS -mno-stack-arg-probe"
31594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31595 /* end confdefs.h. */
31596
31597 int
31598 main (void)
31599 {
31600
31601 ;
31602 return 0;
31603 }
31604 _ACEOF
31605 if ac_fn_c_try_compile "$LINENO"; then :
31606 grub_cv_cc_mno_stack_arg_probe=yes
31607 else
31608 grub_cv_cc_mno_stack_arg_probe=no
31609 fi
31610 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31611
31612 fi
31613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $grub_cv_cc_mno_stack_arg_probe" >&5
31614 $as_echo "$grub_cv_cc_mno_stack_arg_probe" >&6; }
31615
31616 if test "x$grub_cv_cc_mno_stack_arg_probe" = xyes; then
31617 TARGET_CFLAGS="$TARGET_CFLAGS -mno-stack-arg-probe"
31618 fi
31619
31620
31621 # By default, GCC 4.6 generates .eh_frame sections containing unwind
31622 # information in some cases where it previously did not. GRUB doesn't need
31623 # these and they just use up vital space. Restore the old compiler
31624 # behaviour.
31625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fno-asynchronous-unwind-tables works" >&5
31626 $as_echo_n "checking whether -fno-asynchronous-unwind-tables works... " >&6; }
31627 if ${grub_cv_cc_fno_asynchronous_unwind_tables+:} false; then :
31628 $as_echo_n "(cached) " >&6
31629 else
31630
31631 CFLAGS="$TARGET_CFLAGS -fno-asynchronous-unwind-tables"
31632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31633 /* end confdefs.h. */
31634
31635 int
31636 main (void)
31637 {
31638
31639 ;
31640 return 0;
31641 }
31642 _ACEOF
31643 if ac_fn_c_try_compile "$LINENO"; then :
31644 grub_cv_cc_fno_asynchronous_unwind_tables=yes
31645 else
31646 grub_cv_cc_fno_asynchronous_unwind_tables=no
31647 fi
31648 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31649
31650 fi
31651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $grub_cv_cc_fno_asynchronous_unwind_tables" >&5
31652 $as_echo "$grub_cv_cc_fno_asynchronous_unwind_tables" >&6; }
31653
31654 if test "x$grub_cv_cc_fno_asynchronous_unwind_tables" = xyes; then
31655 TARGET_CFLAGS="$TARGET_CFLAGS -fno-asynchronous-unwind-tables"
31656 fi
31657
31658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fno-unwind-tables works" >&5
31659 $as_echo_n "checking whether -fno-unwind-tables works... " >&6; }
31660 if ${grub_cv_cc_fno_unwind_tables+:} false; then :
31661 $as_echo_n "(cached) " >&6
31662 else
31663
31664 CFLAGS="$TARGET_CFLAGS -fno-unwind-tables"
31665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31666 /* end confdefs.h. */
31667
31668 int
31669 main (void)
31670 {
31671
31672 ;
31673 return 0;
31674 }
31675 _ACEOF
31676 if ac_fn_c_try_compile "$LINENO"; then :
31677 grub_cv_cc_fno_unwind_tables=yes
31678 else
31679 grub_cv_cc_fno_unwind_tables=no
31680 fi
31681 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31682
31683 fi
31684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $grub_cv_cc_fno_unwind_tables" >&5
31685 $as_echo "$grub_cv_cc_fno_unwind_tables" >&6; }
31686
31687 if test "x$grub_cv_cc_fno_unwind_tables" = xyes; then
31688 TARGET_CFLAGS="$TARGET_CFLAGS -fno-unwind-tables"
31689 fi
31690
31691 # Do not generate .ident sections.
31692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fno-ident works" >&5
31693 $as_echo_n "checking whether -fno-ident works... " >&6; }
31694 if ${grub_cv_cc_fno_ident+:} false; then :
31695 $as_echo_n "(cached) " >&6
31696 else
31697
31698 CFLAGS="$TARGET_CFLAGS -fno-ident"
31699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31700 /* end confdefs.h. */
31701
31702 int
31703 main (void)
31704 {
31705
31706 ;
31707 return 0;
31708 }
31709 _ACEOF
31710 if ac_fn_c_try_compile "$LINENO"; then :
31711 grub_cv_cc_fno_ident=yes
31712 else
31713 grub_cv_cc_fno_ident=no
31714 fi
31715 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31716
31717 fi
31718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $grub_cv_cc_fno_ident" >&5
31719 $as_echo "$grub_cv_cc_fno_ident" >&6; }
31720
31721 if test "x$grub_cv_cc_fno_ident" = xyes; then
31722 TARGET_CFLAGS="$TARGET_CFLAGS -fno-ident"
31723 fi
31724
31725 CFLAGS="$TARGET_CFLAGS"
31726
31727
31728 if test x"$platform" = xemu ; then
31729 TARGET_OBJ2ELF=
31730 grub_cv_target_cc_link_format=
31731 case "$host_os" in
31732 *darwin* | *mac*)
31733 grub_cv_target_cc_link_format="-arch,${target_cpu}"
31734 TARGET_LDFLAGS="$TARGET_LDFLAGS -Wl,$grub_cv_target_cc_link_format"
31735 ;;
31736 *windows* | *cygwin* | *mingw*)
31737 if test x${target_cpu} = xi386 ; then
31738 grub_cv_target_cc_link_format=-mi386pe
31739 TARGET_OBJ2ELF='./build-grub-pe2elf$(BUILD_EXEEXT)'
31740 fi
31741 if test x${target_cpu} = xx86_64 ; then
31742 grub_cv_target_cc_link_format=-mi386pep
31743 TARGET_OBJ2ELF='./build-grub-pep2elf$(BUILD_EXEEXT)'
31744 fi
31745 TARGET_LDFLAGS="$TARGET_LDFLAGS -Wl,$grub_cv_target_cc_link_format"
31746 ;;
31747 esac
31748 elif test x"$target_cpu" = xi386 || test x"$target_cpu" = xx86_64; then
31749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target linking format" >&5
31750 $as_echo_n "checking for target linking format... " >&6; }
31751 if ${grub_cv_target_cc_link_format+:} false; then :
31752 $as_echo_n "(cached) " >&6
31753 else
31754
31755 grub_cv_target_cc_link_format=unknown
31756 for format in -melf_${target_cpu} -melf_${target_cpu}_fbsd -melf_${target_cpu}_obsd -melf_${target_cpu}_haiku -mi386pe -mi386pep -arch,${target_cpu}; do
31757 if test x${target_cpu} != xi386 && test x$format = x-mi386pe; then
31758 continue
31759 fi
31760 if test x${target_cpu} != xx86_64 && test x$format = x-mi386pep; then
31761 continue
31762 fi
31763 CFLAGS="$TARGET_CFLAGS"
31764 LDFLAGS="$TARGET_LDFLAGS -Wl,$format -nostdlib -static"
31765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31766 /* end confdefs.h. */
31767
31768 asm (".globl start; start:");
31769 asm (".globl _start; _start:");
31770 asm (".globl __start; __start:");
31771 void __main (void);
31772 void __main (void) {}
31773
31774 int
31775 main (void)
31776 {
31777
31778 ;
31779 return 0;
31780 }
31781 _ACEOF
31782 if ac_fn_c_try_link "$LINENO"; then :
31783 flag=1
31784 else
31785 flag=0
31786 fi
31787 rm -f core conftest.err conftest.$ac_objext \
31788 conftest$ac_exeext conftest.$ac_ext
31789 if test x"$flag" = x1; then
31790 grub_cv_target_cc_link_format="$format"
31791 break
31792 fi
31793 done
31794 fi
31795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $grub_cv_target_cc_link_format" >&5
31796 $as_echo "$grub_cv_target_cc_link_format" >&6; }
31797 if test x"$grub_cv_target_cc_link_format" = xunknown; then
31798 as_fn_error $? "no suitable link format found" "$LINENO" 5
31799 fi
31800 TARGET_LDFLAGS="$TARGET_LDFLAGS -Wl,$grub_cv_target_cc_link_format"
31801 if test x"$grub_cv_target_cc_link_format" = x-mi386pe ; then
31802 TARGET_OBJ2ELF='./build-grub-pe2elf$(BUILD_EXEEXT)'
31803 fi
31804 if test x"$grub_cv_target_cc_link_format" = x-mi386pep ; then
31805 TARGET_OBJ2ELF='./build-grub-pep2elf$(BUILD_EXEEXT)'
31806 fi
31807 fi
31808
31809 if test x$grub_cv_target_cc_link_format = x-arch,i386 || test x$grub_cv_target_cc_link_format = x-arch,x86_64; then
31810 TARGET_APPLE_LINKER=1
31811 # Extract the first word of "objconv", so it can be a program name with args.
31812 set dummy objconv; ac_word=$2
31813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31814 $as_echo_n "checking for $ac_word... " >&6; }
31815 if ${ac_cv_prog_TARGET_OBJCONV+:} false; then :
31816 $as_echo_n "(cached) " >&6
31817 else
31818 if test -n "$TARGET_OBJCONV"; then
31819 ac_cv_prog_TARGET_OBJCONV="$TARGET_OBJCONV" # Let the user override the test.
31820 else
31821 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31822 for as_dir in $PATH
31823 do
31824 IFS=$as_save_IFS
31825 test -z "$as_dir" && as_dir=.
31826 for ac_exec_ext in '' $ac_executable_extensions; do
31827 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31828 ac_cv_prog_TARGET_OBJCONV="objconv"
31829 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31830 break 2
31831 fi
31832 done
31833 done
31834 IFS=$as_save_IFS
31835
31836 fi
31837 fi
31838 TARGET_OBJCONV=$ac_cv_prog_TARGET_OBJCONV
31839 if test -n "$TARGET_OBJCONV"; then
31840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TARGET_OBJCONV" >&5
31841 $as_echo "$TARGET_OBJCONV" >&6; }
31842 else
31843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31844 $as_echo "no" >&6; }
31845 fi
31846
31847
31848 if test "x$TARGET_OBJCONV" = x ; then
31849 # Extract the first word of "objconv", so it can be a program name with args.
31850 set dummy objconv; ac_word=$2
31851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31852 $as_echo_n "checking for $ac_word... " >&6; }
31853 if ${ac_cv_prog_TARGET_OBJCONV+:} false; then :
31854 $as_echo_n "(cached) " >&6
31855 else
31856 if test -n "$TARGET_OBJCONV"; then
31857 ac_cv_prog_TARGET_OBJCONV="$TARGET_OBJCONV" # Let the user override the test.
31858 else
31859 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31860 for as_dir in .
31861 do
31862 IFS=$as_save_IFS
31863 test -z "$as_dir" && as_dir=.
31864 for ac_exec_ext in '' $ac_executable_extensions; do
31865 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31866 ac_cv_prog_TARGET_OBJCONV="./objconv"
31867 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31868 break 2
31869 fi
31870 done
31871 done
31872 IFS=$as_save_IFS
31873
31874 fi
31875 fi
31876 TARGET_OBJCONV=$ac_cv_prog_TARGET_OBJCONV
31877 if test -n "$TARGET_OBJCONV"; then
31878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TARGET_OBJCONV" >&5
31879 $as_echo "$TARGET_OBJCONV" >&6; }
31880 else
31881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31882 $as_echo "no" >&6; }
31883 fi
31884
31885
31886 fi
31887 if test "x$TARGET_OBJCONV" = x ; then
31888 as_fn_error $? "objconv not found which is required when building with apple compiler" "$LINENO" 5
31889 fi
31890 TARGET_IMG_LDSCRIPT=
31891 TARGET_IMG_CFLAGS="-static"
31892 TARGET_IMG_LDFLAGS='-nostdlib -static -Wl,-preload -Wl,-segalign,20'
31893 TARGET_IMG_LDFLAGS_AC='-nostdlib -static -Wl,-preload -Wl,-segalign,20'
31894 TARGET_IMG_BASE_LDOPT="-Wl,-image_base"
31895 TARGET_LDFLAGS_OLDMAGIC=""
31896 elif test x$grub_cv_target_cc_link_format = x-mi386pe || test x$grub_cv_target_cc_link_format = x-mi386pep ; then
31897 TARGET_APPLE_LINKER=0
31898 TARGET_LDFLAGS_OLDMAGIC="-Wl,-N"
31899 TARGET_IMG_LDSCRIPT='$(top_srcdir)'"/${grub_coredir}/conf/i386-cygwin-img-ld.sc"
31900 TARGET_IMG_LDFLAGS="-Wl,-T${TARGET_IMG_LDSCRIPT}"
31901 TARGET_IMG_LDFLAGS_AC="-Wl,-T${srcdir}/${grub_coredir}/conf/i386-cygwin-img-ld.sc"
31902 TARGET_IMG_BASE_LDOPT="-Wl,-Ttext"
31903 TARGET_IMG_CFLAGS=
31904 else
31905 TARGET_APPLE_LINKER=0
31906 TARGET_LDFLAGS_OLDMAGIC="-Wl,-N"
31907 TARGET_IMG_LDSCRIPT=
31908 TARGET_IMG_LDFLAGS='-Wl,-N'
31909 TARGET_IMG_LDFLAGS_AC='-Wl,-N'
31910 TARGET_IMG_BASE_LDOPT="-Wl,-Ttext"
31911 TARGET_IMG_CFLAGS=
31912 fi
31913
31914 CFLAGS="$TARGET_CFLAGS"
31915
31916 # Check whether --enable-efiemu was given.
31917 if test "${enable_efiemu+set}" = set; then :
31918 enableval=$enable_efiemu;
31919 fi
31920
31921 if test x"$enable_efiemu" = xno ; then
31922 efiemu_excuse="explicitly disabled"
31923 fi
31924
31925 if test x"$grub_cv_target_cc_link_format" = x-mi386pe || test x"$grub_cv_target_cc_link_format" = x-mi386pep ; then
31926 efiemu_excuse="not available on cygwin"
31927 fi
31928 if test x"$target_cpu" != xi386 ; then
31929 efiemu_excuse="only available on i386"
31930 fi
31931 if test x"$platform" = xefi ; then
31932 efiemu_excuse="not available on efi"
31933 fi
31934
31935 if test x"$efiemu_excuse" = x ; then
31936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether options required for efiemu work" >&5
31937 $as_echo_n "checking whether options required for efiemu work... " >&6; }
31938 if ${grub_cv_cc_efiemu+:} false; then :
31939 $as_echo_n "(cached) " >&6
31940 else
31941
31942 CFLAGS="-m64 -nostdlib -O2 -mcmodel=large -mno-red-zone"
31943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31944 /* end confdefs.h. */
31945
31946 int
31947 main (void)
31948 {
31949
31950 ;
31951 return 0;
31952 }
31953 _ACEOF
31954 if ac_fn_c_try_compile "$LINENO"; then :
31955 grub_cv_cc_efiemu=yes
31956 else
31957 grub_cv_cc_efiemu=no
31958 fi
31959 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31960
31961 fi
31962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $grub_cv_cc_efiemu" >&5
31963 $as_echo "$grub_cv_cc_efiemu" >&6; }
31964 if test x$grub_cv_cc_efiemu = xno; then
31965 efiemu_excuse="cannot compile with -m64 -mcmodel=large -mno-red-zone -nostdlib"
31966 fi
31967 fi
31968 if test x"$efiemu_excuse" = x ; then
31969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for efiemu64 linking format" >&5
31970 $as_echo_n "checking for efiemu64 linking format... " >&6; }
31971 if ${grub_cv_target_cc_efiemu64_link_format+:} false; then :
31972 $as_echo_n "(cached) " >&6
31973 else
31974
31975 grub_cv_target_cc_efiemu64_link_format=unknown
31976 for format in -melf_x86_64 -melf_x86_64_fbsd -melf_x86_64_obsd -melf_x86_64_haiku -arch,x86_64; do
31977 CFLAGS="-m64 -nostdlib -O2 -mcmodel=large -mno-red-zone"
31978 LDFLAGS="-m64 -Wl,$format -nostdlib -static"
31979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31980 /* end confdefs.h. */
31981
31982 asm (".globl start; start:");
31983 asm (".globl _start; _start:");
31984 asm (".globl __start; __start:");
31985 void __main (void);
31986 void __main (void) {}
31987
31988 int
31989 main (void)
31990 {
31991
31992 ;
31993 return 0;
31994 }
31995 _ACEOF
31996 if ac_fn_c_try_link "$LINENO"; then :
31997 flag=1
31998 else
31999 flag=0
32000 fi
32001 rm -f core conftest.err conftest.$ac_objext \
32002 conftest$ac_exeext conftest.$ac_ext
32003 if test x"$flag" = x1; then
32004 grub_cv_target_cc_efiemu64_link_format="$format"
32005 break
32006 fi
32007 done
32008 fi
32009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $grub_cv_target_cc_efiemu64_link_format" >&5
32010 $as_echo "$grub_cv_target_cc_efiemu64_link_format" >&6; }
32011 if test x"$grub_cv_target_cc_efiemu64_link_format" = xunknown; then
32012 efiemu_excuse="no suitable link format for efiemu64 found"
32013 else
32014 EFIEMU64_LINK_FORMAT="-Wl,$grub_cv_target_cc_efiemu64_link_format"
32015 fi
32016 fi
32017 if test x"$enable_efiemu" = xyes && test x"$efiemu_excuse" != x ; then
32018 as_fn_error $? "efiemu runtime was explicitly requested but can't be compiled ($efiemu_excuse)" "$LINENO" 5
32019 fi
32020 if test x"$efiemu_excuse" = x ; then
32021 enable_efiemu=yes
32022 else
32023 enable_efiemu=no
32024 fi
32025
32026
32027
32028 CFLAGS="$TARGET_CFLAGS"
32029
32030
32031
32032
32033 LDFLAGS="$TARGET_LDFLAGS"
32034
32035 if test "$target_cpu" = x86_64 || test "$target_cpu" = sparc64 || test "$target_cpu" = riscv64 ; then
32036 # Use large model to support 4G memory
32037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether option -mcmodel=large works" >&5
32038 $as_echo_n "checking whether option -mcmodel=large works... " >&6; }
32039 if ${grub_cv_cc_mcmodel+:} false; then :
32040 $as_echo_n "(cached) " >&6
32041 else
32042
32043 CFLAGS="$TARGET_CFLAGS -mcmodel=large"
32044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32045 /* end confdefs.h. */
32046
32047 int
32048 main (void)
32049 {
32050
32051 ;
32052 return 0;
32053 }
32054 _ACEOF
32055 if ac_fn_c_try_compile "$LINENO"; then :
32056 grub_cv_cc_mcmodel=yes
32057 else
32058 grub_cv_cc_mcmodel=no
32059 fi
32060 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32061
32062 fi
32063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $grub_cv_cc_mcmodel" >&5
32064 $as_echo "$grub_cv_cc_mcmodel" >&6; }
32065 if test "x$grub_cv_cc_mcmodel" = xyes; then
32066 TARGET_CFLAGS="$TARGET_CFLAGS -mcmodel=large"
32067 elif test "$target_cpu" = sparc64 || test "$target_cpu" = riscv64; then
32068 TARGET_CFLAGS="$TARGET_CFLAGS -mcmodel=medany"
32069 fi
32070 fi
32071
32072 if test "$target_cpu"-"$platform" = x86_64-efi; then
32073 # EFI writes to stack below %rsp, we must not use the red zone
32074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether option -mno-red-zone works" >&5
32075 $as_echo_n "checking whether option -mno-red-zone works... " >&6; }
32076 if ${grub_cv_cc_no_red_zone+:} false; then :
32077 $as_echo_n "(cached) " >&6
32078 else
32079
32080 CFLAGS="$TARGET_CFLAGS -mno-red-zone"
32081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32082 /* end confdefs.h. */
32083
32084 int
32085 main (void)
32086 {
32087
32088 ;
32089 return 0;
32090 }
32091 _ACEOF
32092 if ac_fn_c_try_compile "$LINENO"; then :
32093 grub_cv_cc_no_red_zone=yes
32094 else
32095 grub_cv_cc_no_red_zone=no
32096 fi
32097 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32098
32099 fi
32100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $grub_cv_cc_no_red_zone" >&5
32101 $as_echo "$grub_cv_cc_no_red_zone" >&6; }
32102 if test "x$grub_cv_cc_no_red_zone" = xno; then
32103 as_fn_error $? "-mno-red-zone not supported, upgrade your gcc" "$LINENO" 5
32104 fi
32105
32106 TARGET_CFLAGS="$TARGET_CFLAGS -mno-red-zone"
32107 fi
32108
32109 if test "x$target_cpu" = xarm; then
32110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for options to disable movt and movw" >&5
32111 $as_echo_n "checking for options to disable movt and movw... " >&6; }
32112 if ${grub_cv_target_cc_mno_movt+:} false; then :
32113 $as_echo_n "(cached) " >&6
32114 else
32115
32116 grub_cv_target_cc_mno_movt=no
32117 for cand in "-mno-movt" \
32118 "-mllvm -arm-use-movt=0" \
32119 "-mword-relocations"; do
32120 if test x"$grub_cv_target_cc_mno_movt" != xno ; then
32121 break
32122 fi
32123 CFLAGS="$TARGET_CFLAGS $cand -Werror"
32124 CPPFLAGS="$TARGET_CPPFLAGS"
32125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32126 /* end confdefs.h. */
32127
32128 int
32129 main (void)
32130 {
32131
32132 ;
32133 return 0;
32134 }
32135 _ACEOF
32136 if ac_fn_c_try_compile "$LINENO"; then :
32137 grub_cv_target_cc_mno_movt="$cand"
32138 fi
32139 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32140 done
32141
32142 fi
32143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $grub_cv_target_cc_mno_movt" >&5
32144 $as_echo "$grub_cv_target_cc_mno_movt" >&6; }
32145
32146 if test x"$grub_cv_target_cc_mno_movt" != xno ; then
32147 # A trick so that clang doesn't see it on link stage
32148 TARGET_CPPFLAGS="$TARGET_CPPFLAGS $grub_cv_target_cc_mno_movt"
32149 fi
32150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether option -mthumb-interwork works" >&5
32151 $as_echo_n "checking whether option -mthumb-interwork works... " >&6; }
32152 if ${grub_cv_cc_mthumb_interwork+:} false; then :
32153 $as_echo_n "(cached) " >&6
32154 else
32155
32156 CFLAGS="$TARGET_CFLAGS -mthumb-interwork -Werror"
32157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32158 /* end confdefs.h. */
32159
32160 int
32161 main (void)
32162 {
32163
32164 ;
32165 return 0;
32166 }
32167 _ACEOF
32168 if ac_fn_c_try_compile "$LINENO"; then :
32169 grub_cv_cc_mthumb_interwork=yes
32170 else
32171 grub_cv_cc_mthumb_interwork=no
32172 fi
32173 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32174
32175 fi
32176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $grub_cv_cc_mthumb_interwork" >&5
32177 $as_echo "$grub_cv_cc_mthumb_interwork" >&6; }
32178 if test "x$grub_cv_cc_mthumb_interwork" = xyes; then
32179 TARGET_CFLAGS="$TARGET_CFLAGS -mthumb-interwork"
32180 # Clang defaults to thumb interworking
32181 elif test "x$grub_cv_cc_target_clang" = xno ; then
32182 as_fn_error $? "your compiler doesn't support -mthumb-interwork" "$LINENO" 5
32183 fi
32184 fi
32185
32186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether option -Qn works" >&5
32187 $as_echo_n "checking whether option -Qn works... " >&6; }
32188 if ${grub_cv_target_cc_qn+:} false; then :
32189 $as_echo_n "(cached) " >&6
32190 else
32191
32192 CFLAGS="$TARGET_CFLAGS -Qn -Qunused-arguments -Werror"
32193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32194 /* end confdefs.h. */
32195
32196 int
32197 main (void)
32198 {
32199
32200 ;
32201 return 0;
32202 }
32203 _ACEOF
32204 if ac_fn_c_try_compile "$LINENO"; then :
32205 grub_cv_target_cc_qn=yes
32206 else
32207 grub_cv_target_cc_qn=no
32208 fi
32209 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32210 fi
32211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $grub_cv_target_cc_qn" >&5
32212 $as_echo "$grub_cv_target_cc_qn" >&6; }
32213 if test "x$grub_cv_target_cc_qn" = xyes; then
32214 TARGET_CFLAGS="$TARGET_CFLAGS -Qn -Qunused-arguments"
32215 fi
32216
32217 #
32218 # Compiler features.
32219 #
32220
32221 CFLAGS="$TARGET_CFLAGS"
32222
32223 # Position independent executable.
32224
32225 # Position independent executable.
32226 pie_possible=yes
32227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`$CC' has \`-fPIE' as default" >&5
32228 $as_echo_n "checking whether \`$CC' has \`-fPIE' as default... " >&6; }
32229 # Is this a reliable test case?
32230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32231 /* end confdefs.h. */
32232
32233 #ifdef __PIE__
32234 int main() {
32235 return 0;
32236 }
32237 #else
32238 #error NO __PIE__ DEFINED
32239 #endif
32240
32241 _ACEOF
32242
32243 # `$CC -c -o ...' might not be portable. But, oh, well... Is calling
32244 # `ac_compile' like this correct, after all?
32245 if eval "$ac_compile -S -o conftest.s" 2> /dev/null; then
32246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32247 $as_echo "yes" >&6; }
32248 # Should we clear up other files as well, having called `AC_LANG_CONFTEST'?
32249 rm -f conftest.s
32250 else
32251 pie_possible=no
32252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32253 $as_echo "no" >&6; }
32254 fi
32255
32256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether linker accepts -no-pie" >&5
32257 $as_echo_n "checking whether linker accepts -no-pie... " >&6; }
32258 if ${grub_cv_cc_ld_no_pie+:} false; then :
32259 $as_echo_n "(cached) " >&6
32260 else
32261 save_LDFLAGS="$LDFLAGS"
32262 LDFLAGS="$LDFLAGS -no-pie -nostdlib -Werror"
32263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32264 /* end confdefs.h. */
32265
32266 int
32267 main (void)
32268 {
32269
32270 ;
32271 return 0;
32272 }
32273 _ACEOF
32274 if ac_fn_c_try_link "$LINENO"; then :
32275 grub_cv_cc_ld_no_pie=yes
32276 else
32277 grub_cv_cc_ld_no_pie=no
32278 fi
32279 rm -f core conftest.err conftest.$ac_objext \
32280 conftest$ac_exeext conftest.$ac_ext
32281 LDFLAGS="$save_LDFLAGS"
32282
32283 fi
32284
32285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $grub_cv_cc_ld_no_pie" >&5
32286 $as_echo "$grub_cv_cc_ld_no_pie" >&6; }
32287 nopie_possible=no
32288 if test "x$grub_cv_cc_ld_no_pie" = xyes ; then
32289 nopie_possible=yes
32290 fi
32291
32292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether linker accepts -nopie" >&5
32293 $as_echo_n "checking whether linker accepts -nopie... " >&6; }
32294 if ${grub_cv_cc_ld_no_pie_oneword+:} false; then :
32295 $as_echo_n "(cached) " >&6
32296 else
32297 save_LDFLAGS="$LDFLAGS"
32298 LDFLAGS="$LDFLAGS -nopie -nostdlib -Werror"
32299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32300 /* end confdefs.h. */
32301
32302 int
32303 main (void)
32304 {
32305
32306 ;
32307 return 0;
32308 }
32309 _ACEOF
32310 if ac_fn_c_try_link "$LINENO"; then :
32311 grub_cv_cc_ld_no_pie_oneword=yes
32312 else
32313 grub_cv_cc_ld_no_pie_oneword=no
32314 fi
32315 rm -f core conftest.err conftest.$ac_objext \
32316 conftest$ac_exeext conftest.$ac_ext
32317 LDFLAGS="$save_LDFLAGS"
32318
32319 fi
32320
32321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $grub_cv_cc_ld_no_pie_oneword" >&5
32322 $as_echo "$grub_cv_cc_ld_no_pie_oneword" >&6; }
32323 nopie_oneword_possible=no
32324 if test "x$grub_cv_cc_ld_no_pie_oneword" = xyes ; then
32325 nopie_oneword_possible=yes
32326 fi
32327
32328
32329 # Position independent executable.
32330 link_nopie_needed=no
32331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether linker needs disabling of PIE to work" >&5
32332 $as_echo_n "checking whether linker needs disabling of PIE to work... " >&6; }
32333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32334 /* end confdefs.h. */
32335
32336 _ACEOF
32337
32338 if eval "$ac_compile -Wl,-r,-d -nostdlib -Werror -o conftest.o" 2> /dev/null; then
32339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32340 $as_echo "no" >&6; }
32341 # Should we clear up other files as well, having called `AC_LANG_CONFTEST'?
32342 rm -f conftest.o
32343 else
32344 link_nopie_needed=yes
32345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32346 $as_echo "yes" >&6; }
32347 fi
32348
32349 # Need that, because some distributions ship compilers that include
32350 # `-fPIE' or '-fpie' and '-pie' in the default specs.
32351 if [ x"$pie_possible" = xyes ]; then
32352 TARGET_CFLAGS="$TARGET_CFLAGS -fno-PIE -fno-pie"
32353 TARGET_CCASFLAGS="$TARGET_CCASFLAGS -fno-PIE -fno-pie"
32354 fi
32355
32356 if [ x"$link_nopie_needed" = xyes ] || [ x"$pie_possible" = xyes ]; then
32357 if [ x"$nopie_possible" = xyes ]; then
32358 TARGET_LDFLAGS="$TARGET_LDFLAGS -no-pie"
32359 fi
32360 if [ x"$nopie_oneword_possible" = xyes ]; then
32361 TARGET_LDFLAGS="$TARGET_LDFLAGS -nopie"
32362 fi
32363 fi
32364
32365 CFLAGS="$TARGET_CFLAGS"
32366 LDFLAGS="$TARGET_LDFLAGS"
32367
32368 # Position independent executable.
32369
32370 # Position independent executable.
32371 pic_possible=yes
32372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`$CC' has \`-fPIC' as default" >&5
32373 $as_echo_n "checking whether \`$CC' has \`-fPIC' as default... " >&6; }
32374 # Is this a reliable test case?
32375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32376 /* end confdefs.h. */
32377
32378 #ifdef __PIC__
32379 int main() {
32380 return 0;
32381 }
32382 #else
32383 #error NO __PIC__ DEFINED
32384 #endif
32385
32386 _ACEOF
32387
32388 # `$CC -c -o ...' might not be portable. But, oh, well... Is calling
32389 # `ac_compile' like this correct, after all?
32390 if eval "$ac_compile -S -o conftest.s" 2> /dev/null; then
32391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32392 $as_echo "yes" >&6; }
32393 # Should we clear up other files as well, having called `AC_LANG_CONFTEST'?
32394 rm -f conftest.s
32395 else
32396 pic_possible=no
32397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32398 $as_echo "no" >&6; }
32399 fi
32400
32401 # On most platforms we don't want PIC as it only makes relocations harder
32402 # and code less efficient. On mips we want to have one got table per module
32403 # and reload $gp in every function.
32404 # GCC implements it using symbol __gnu_local_gp in non-PIC as well.
32405 # However with clang we need PIC for this reloading to happen.
32406 # With arm64 we need relocations that are in some way representable in
32407 # PE as we need to support arm64-efi. Without -fPIC clang generates
32408 # movk's which aren't representable.
32409 # Since default varies across dictributions use either -fPIC or -fno-PIC
32410 # explicitly.
32411 if ( test x$target_cpu = xmips || test x$target_cpu = xmipsel || test x$target_cpu = xarm64 ) && test "x$grub_cv_cc_target_clang" = xyes ; then
32412 TARGET_CFLAGS="$TARGET_CFLAGS -fPIC"
32413 elif [ x"$pic_possible" = xyes ]; then
32414 TARGET_CFLAGS="$TARGET_CFLAGS -fno-PIC"
32415 fi
32416
32417 CFLAGS="$TARGET_CFLAGS"
32418
32419 # Stack smashing protector.
32420
32421 # Stack smashing protector.
32422 ssp_possible=yes
32423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`$CC' accepts \`-fstack-protector'" >&5
32424 $as_echo_n "checking whether \`$CC' accepts \`-fstack-protector'... " >&6; }
32425 # Is this a reliable test case?
32426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32427 /* end confdefs.h. */
32428
32429 void foo (void) { volatile char a[8]; a[3]; }
32430
32431 _ACEOF
32432 # `$CC -c -o ...' might not be portable. But, oh, well... Is calling
32433 # `ac_compile' like this correct, after all?
32434 if eval "$ac_compile -S -fstack-protector -o conftest.s" 2> /dev/null; then
32435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32436 $as_echo "yes" >&6; }
32437 # Should we clear up other files as well, having called `AC_LANG_CONFTEST'?
32438 rm -f conftest.s
32439 else
32440 ssp_possible=no
32441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32442 $as_echo "no" >&6; }
32443 fi
32444 # Strong stack smashing protector.
32445 ssp_strong_possible=yes
32446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`$CC' accepts \`-fstack-protector-strong'" >&5
32447 $as_echo_n "checking whether \`$CC' accepts \`-fstack-protector-strong'... " >&6; }
32448 # Is this a reliable test case?
32449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32450 /* end confdefs.h. */
32451
32452 void foo (void) { volatile char a[8]; a[3]; }
32453
32454 _ACEOF
32455 # `$CC -c -o ...' might not be portable. But, oh, well... Is calling
32456 # `ac_compile' like this correct, after all?
32457 if eval "$ac_compile -S -fstack-protector-strong -o conftest.s" 2> /dev/null; then
32458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32459 $as_echo "yes" >&6; }
32460 # Should we clear up other files as well, having called `AC_LANG_CONFTEST'?
32461 rm -f conftest.s
32462 else
32463 ssp_strong_possible=no
32464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32465 $as_echo "no" >&6; }
32466 fi
32467 # Global stack smashing protector.
32468 ssp_global_possible=yes
32469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`$CC' accepts \`-mstack-protector-guard=global'" >&5
32470 $as_echo_n "checking whether \`$CC' accepts \`-mstack-protector-guard=global'... " >&6; }
32471 # Is this a reliable test case?
32472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32473 /* end confdefs.h. */
32474
32475 void foo (void) { volatile char a[8]; a[3]; }
32476
32477 _ACEOF
32478 # `$CC -c -o ...' might not be portable. But, oh, well... Is calling
32479 # `ac_compile' like this correct, after all?
32480 if eval "$ac_compile -S -fstack-protector -mstack-protector-guard=global -o conftest.s" 2> /dev/null; then
32481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32482 $as_echo "yes" >&6; }
32483 # Should we clear up other files as well, having called `AC_LANG_CONFTEST'?
32484 rm -f conftest.s
32485 else
32486 ssp_global_possible=no
32487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32488 $as_echo "no" >&6; }
32489 fi
32490
32491 # Check whether --enable-stack-protector was given.
32492 if test "${enable_stack_protector+set}" = set; then :
32493 enableval=$enable_stack_protector;
32494 else
32495 enable_stack_protector=no
32496 fi
32497
32498 if test "x$enable_stack_protector" = xno; then
32499 if test "x$ssp_possible" = xyes; then
32500 # Need that, because some distributions ship compilers that include
32501 # `-fstack-protector' in the default specs.
32502 TARGET_CFLAGS="$TARGET_CFLAGS -fno-stack-protector"
32503 fi
32504 elif test "x$platform" != xefi; then
32505 as_fn_error $? "--enable-stack-protector is only supported on EFI platforms" "$LINENO" 5
32506 elif test "x$ssp_global_possible" != xyes; then
32507 as_fn_error $? "--enable-stack-protector is not supported (compiler doesn't support -mstack-protector-guard=global)" "$LINENO" 5
32508 else
32509 TARGET_CFLAGS="$TARGET_CFLAGS -mstack-protector-guard=global"
32510 if test "x$enable_stack_protector" = xyes; then
32511 if test "x$ssp_possible" != xyes; then
32512 as_fn_error $? "--enable-stack-protector is not supported (compiler doesn't support -fstack-protector)" "$LINENO" 5
32513 fi
32514 TARGET_CFLAGS="$TARGET_CFLAGS -fstack-protector"
32515 elif test "x$enable_stack_protector" = xstrong; then
32516 if test "x$ssp_strong_possible" != xyes; then
32517 as_fn_error $? "--enable-stack-protector=strong is not supported (compiler doesn't support -fstack-protector-strong)" "$LINENO" 5
32518 fi
32519 TARGET_CFLAGS="$TARGET_CFLAGS -fstack-protector-strong"
32520 else
32521 # Note, -fstack-protector-all requires that the protector is disabled for
32522 # functions that appear in the call stack when the canary is initialized.
32523 as_fn_error $? "invalid value $enable_stack_protector for --enable-stack-protector" "$LINENO" 5
32524 fi
32525 TARGET_CPPFLAGS="$TARGET_CPPFLAGS -DGRUB_STACK_PROTECTOR=1"
32526 fi
32527
32528 CFLAGS="$TARGET_CFLAGS"
32529
32530
32531 # Smashing stack arg probe.
32532 sap_possible=yes
32533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`$CC' accepts \`-mstack-arg-probe'" >&5
32534 $as_echo_n "checking whether \`$CC' accepts \`-mstack-arg-probe'... " >&6; }
32535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32536 /* end confdefs.h. */
32537
32538 void foo (void) { volatile char a[8]; a[3]; }
32539
32540 _ACEOF
32541 if eval "$ac_compile -S -mstack-arg-probe -Werror -o conftest.s" 2> /dev/null; then
32542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32543 $as_echo "yes" >&6; }
32544 # Should we clear up other files as well, having called `AC_LANG_CONFTEST'?
32545 rm -f conftest.s
32546 else
32547 sap_possible=no
32548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32549 $as_echo "no" >&6; }
32550 fi
32551
32552 # Cygwin's GCC uses alloca() to probe the stackframe on static
32553 # stack allocations above some threshold.
32554 if test x"$sap_possible" = xyes; then
32555 TARGET_CFLAGS="$TARGET_CFLAGS -mno-stack-arg-probe"
32556 fi
32557
32558 CFLAGS="$TARGET_CFLAGS"
32559
32560 # -mno-unaligned-access -mstrict-align
32561 if test "$target_cpu" = arm; then
32562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compile options to get strict alignment" >&5
32563 $as_echo_n "checking for compile options to get strict alignment... " >&6; }
32564 if ${grub_cv_target_cc_strict_align+:} false; then :
32565 $as_echo_n "(cached) " >&6
32566 else
32567
32568 grub_cv_target_cc_strict_align=
32569 for arg in -mno-unaligned-access "-Xclang -mstrict-align" -mstrict-align; do
32570 CFLAGS="$TARGET_CFLAGS $arg -Werror"
32571 LDFLAGS="$TARGET_LDFLAGS"
32572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32573 /* end confdefs.h. */
32574
32575 int
32576 main (void)
32577 {
32578
32579 ;
32580 return 0;
32581 }
32582 _ACEOF
32583 if ac_fn_c_try_compile "$LINENO"; then :
32584 flag=1
32585 else
32586 flag=0
32587 fi
32588 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32589 if test x"$flag" = x1; then
32590 grub_cv_target_cc_strict_align="$arg"
32591 break
32592 fi
32593 done
32594 fi
32595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $grub_cv_target_cc_strict_align" >&5
32596 $as_echo "$grub_cv_target_cc_strict_align" >&6; }
32597
32598 TARGET_CFLAGS="$TARGET_CFLAGS $grub_cv_target_cc_strict_align"
32599 if test x"$grub_cv_target_cc_strict_align" = x"-Xclang -mstrict-align"; then
32600 TARGET_LDFLAGS="$TARGET_LDFLAGS -Qunused-arguments"
32601 fi
32602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler generates unaligned accesses" >&5
32603 $as_echo_n "checking if compiler generates unaligned accesses... " >&6; }
32604 if ${grub_cv_cc_target_emits_unaligned+:} false; then :
32605 $as_echo_n "(cached) " >&6
32606 else
32607 CFLAGS="$TARGET_CFLAGS"
32608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32609 /* end confdefs.h. */
32610
32611 int
32612 main (void)
32613 {
32614
32615 #ifdef __ARM_FEATURE_UNALIGNED
32616 #error "unaligned"
32617 #endif
32618
32619 ;
32620 return 0;
32621 }
32622 _ACEOF
32623 if ac_fn_c_try_compile "$LINENO"; then :
32624 grub_cv_cc_target_emits_unaligned=no
32625 else
32626 grub_cv_cc_target_emits_unaligned=yes
32627 fi
32628 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32629 fi
32630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $grub_cv_cc_target_emits_unaligned" >&5
32631 $as_echo "$grub_cv_cc_target_emits_unaligned" >&6; }
32632 if test x$grub_cv_cc_target_emits_unaligned = xyes; then
32633 as_fn_error $? "compiler generates unaligned accesses" "$LINENO" 5
32634 fi
32635 fi
32636
32637 # Set them to their new values for the tests below.
32638 CC="$TARGET_CC"
32639 if test x"$platform" = xemu ; then
32640 CFLAGS="$TARGET_CFLAGS -Wno-error"
32641 elif test "x$TARGET_APPLE_LINKER" = x1 ; then
32642 CFLAGS="$TARGET_CFLAGS -nostdlib -static -Wno-error"
32643 else
32644 CFLAGS="$TARGET_CFLAGS -nostdlib -Wno-error"
32645 fi
32646 CPPFLAGS="$TARGET_CPPFLAGS"
32647
32648
32649
32650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C symbols get an underscore after compilation" >&5
32651 $as_echo_n "checking if C symbols get an underscore after compilation... " >&6; }
32652 if ${grub_cv_asm_uscore+:} false; then :
32653 $as_echo_n "(cached) " >&6
32654 else
32655 cat > conftest.c <<\EOF
32656 int func (int *);
32657 int
32658 func (int *list)
32659 {
32660 *list = 0;
32661 return *list;
32662 }
32663 EOF
32664
32665 if { ac_try='${CC-cc} ${CFLAGS} -S conftest.c'
32666 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
32667 (eval $ac_try) 2>&5
32668 ac_status=$?
32669 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32670 test $ac_status = 0; }; } && test -s conftest.s; then
32671 true
32672 else
32673 as_fn_error $? "${CC-cc} failed to produce assembly code" "$LINENO" 5
32674 fi
32675
32676 if $EGREP '(^|^_[:alnum])_func' conftest.s >/dev/null 2>&1; then
32677 HAVE_ASM_USCORE=1
32678 grub_cv_asm_uscore=yes
32679 else
32680 HAVE_ASM_USCORE=0
32681 grub_cv_asm_uscore=no
32682 fi
32683
32684 rm -f conftest*
32685 fi
32686
32687
32688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $grub_cv_asm_uscore" >&5
32689 $as_echo "$grub_cv_asm_uscore" >&6; }
32690
32691 if test "x$TARGET_APPLE_LINKER" = x0 && test x"$platform" != xemu; then
32692 if test x$grub_cv_asm_uscore = xyes; then
32693 DEFSYM="-Wl,--defsym,_abort=_main -Wl,--defsym,__main=_main"
32694 else
32695 DEFSYM="-Wl,--defsym,abort=main -Wl,--defsym,_main=main -Wl,--defsym,__main=main"
32696 fi
32697 CFLAGS="$TARGET_CFLAGS -nostdlib $DEFSYM"
32698 fi
32699
32700 # Check for libgcc symbols
32701 if test x"$platform" = xemu; then
32702 for ac_func in __udivsi3 __umodsi3 __divsi3 __modsi3 __divdi3 __moddi3 __udivdi3 __umoddi3 __ctzdi2 __ctzsi2 __clzdi2 __aeabi_uidiv __aeabi_uidivmod __aeabi_idiv __aeabi_idivmod __aeabi_ulcmp __muldi3 __aeabi_lmul __aeabi_memcpy __aeabi_memcpy4 __aeabi_memcpy8 __aeabi_memclr __aeabi_memclr4 __aeabi_memclr8 __aeabi_memset __aeabi_lasr __aeabi_llsl __aeabi_llsr _restgpr_14_x __ucmpdi2 __ashldi3 __ashrdi3 __lshrdi3 __bswapsi2 __bswapdi2 __bzero __register_frame_info __deregister_frame_info ___chkstk_ms __chkstk_ms
32703 do :
32704 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
32705 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
32706 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
32707 cat >>confdefs.h <<_ACEOF
32708 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
32709 _ACEOF
32710
32711 fi
32712 done
32713
32714 fi
32715
32716 if test "x$TARGET_APPLE_LINKER" = x1 ; then
32717 CFLAGS="$TARGET_CFLAGS -nostdlib -static"
32718 else
32719 CFLAGS="$TARGET_CFLAGS -nostdlib"
32720 fi
32721 LIBS=""
32722
32723 # Defined in aclocal.m4.
32724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether target compiler is working" >&5
32725 $as_echo_n "checking whether target compiler is working... " >&6; }
32726 if ${grub_cv_prog_target_cc+:} false; then :
32727 $as_echo_n "(cached) " >&6
32728 else
32729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32730 /* end confdefs.h. */
32731
32732 asm (".globl start; start:");
32733 void __main (void);
32734 void __main (void) {}
32735 int main (void);
32736
32737 int
32738 main (void)
32739 {
32740
32741 ;
32742 return 0;
32743 }
32744 _ACEOF
32745 if ac_fn_c_try_link "$LINENO"; then :
32746 grub_cv_prog_target_cc=yes
32747 else
32748 grub_cv_prog_target_cc=no
32749 fi
32750 rm -f core conftest.err conftest.$ac_objext \
32751 conftest$ac_exeext conftest.$ac_ext
32752
32753 fi
32754
32755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $grub_cv_prog_target_cc" >&5
32756 $as_echo "$grub_cv_prog_target_cc" >&6; }
32757
32758 if test "x$grub_cv_prog_target_cc" = xno; then
32759 as_fn_error $? "cannot compile for the target" "$LINENO" 5
32760 fi
32761
32762 if test "x$TARGET_APPLE_LINKER" != x1 ; then
32763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${TARGET_OBJCOPY} works for absolute addresses" >&5
32764 $as_echo_n "checking whether ${TARGET_OBJCOPY} works for absolute addresses... " >&6; }
32765 if ${grub_cv_prog_objcopy_absolute+:} false; then :
32766 $as_echo_n "(cached) " >&6
32767 else
32768 cat > conftest.c <<\EOF
32769 void cmain (void);
32770 void
32771 cmain (void)
32772 {
32773 *((int *) 0x1000) = 2;
32774 }
32775 EOF
32776
32777 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
32778 (eval $ac_compile) 2>&5
32779 ac_status=$?
32780 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32781 test $ac_status = 0; } && test -s conftest.o; then :
32782 else
32783 as_fn_error $? "${CC-cc} cannot compile C source code" "$LINENO" 5
32784 fi
32785 grub_cv_prog_objcopy_absolute=yes
32786 for link_addr in 0x2000 0x8000 0x7C00; do
32787 if { ac_try='${CC-cc} ${TARGET_CFLAGS} ${TARGET_LDFLAGS} -nostdlib ${TARGET_IMG_LDFLAGS_AC} ${TARGET_IMG_BASE_LDOPT},$link_addr conftest.o -o conftest.exec'
32788 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
32789 (eval $ac_try) 2>&5
32790 ac_status=$?
32791 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32792 test $ac_status = 0; }; }; then :
32793 else
32794 as_fn_error $? "${CC-cc} cannot link at address $link_addr" "$LINENO" 5
32795 fi
32796 if { ac_try='${TARGET_OBJCOPY-objcopy} --only-section=.text -O binary conftest.exec conftest'
32797 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
32798 (eval $ac_try) 2>&5
32799 ac_status=$?
32800 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32801 test $ac_status = 0; }; }; then :
32802 else
32803 as_fn_error $? "${TARGET_OBJCOPY-objcopy} cannot create binary files" "$LINENO" 5
32804 fi
32805 if test ! -f conftest.old || { ac_try='cmp -s conftest.old conftest'
32806 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
32807 (eval $ac_try) 2>&5
32808 ac_status=$?
32809 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32810 test $ac_status = 0; }; }; then
32811 mv -f conftest conftest.old
32812 else
32813 grub_cv_prog_objcopy_absolute=no
32814 break
32815 fi
32816 done
32817 rm -f conftest*
32818 fi
32819
32820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $grub_cv_prog_objcopy_absolute" >&5
32821 $as_echo "$grub_cv_prog_objcopy_absolute" >&6; }
32822
32823 if test "x$grub_cv_prog_objcopy_absolute" = xno; then
32824 as_fn_error $? "GRUB requires a working absolute objcopy; upgrade your binutils" "$LINENO" 5
32825 fi
32826
32827 fi
32828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether linker accepts --build-id=none" >&5
32829 $as_echo_n "checking whether linker accepts --build-id=none... " >&6; }
32830 if ${grub_cv_prog_ld_build_id_none+:} false; then :
32831 $as_echo_n "(cached) " >&6
32832 else
32833 save_LDFLAGS="$LDFLAGS"
32834 LDFLAGS="$LDFLAGS -Wl,--build-id=none"
32835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32836 /* end confdefs.h. */
32837
32838 int
32839 main (void)
32840 {
32841
32842 ;
32843 return 0;
32844 }
32845 _ACEOF
32846 if ac_fn_c_try_link "$LINENO"; then :
32847 grub_cv_prog_ld_build_id_none=yes
32848 else
32849 grub_cv_prog_ld_build_id_none=no
32850 fi
32851 rm -f core conftest.err conftest.$ac_objext \
32852 conftest$ac_exeext conftest.$ac_ext
32853 LDFLAGS="$save_LDFLAGS"
32854
32855 fi
32856
32857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $grub_cv_prog_ld_build_id_none" >&5
32858 $as_echo "$grub_cv_prog_ld_build_id_none" >&6; }
32859
32860 if test "x$grub_cv_prog_ld_build_id_none" = xyes; then
32861 TARGET_LDFLAGS="$TARGET_LDFLAGS -Wl,--build-id=none"
32862 fi
32863
32864 if test "x$target_cpu" = xi386; then
32865 if test "$platform" != emu && test "x$TARGET_APPLE_LINKER" != x1 ; then
32866 if test ! -z "$TARGET_IMG_LDSCRIPT"; then
32867 # Check symbols provided by linker script.
32868 CFLAGS="$TARGET_CFLAGS -nostdlib ${TARGET_IMG_LDFLAGS_AC} ${TARGET_IMG_BASE_LDOPT},0x8000"
32869 fi
32870
32871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if __bss_start is defined by the compiler" >&5
32872 $as_echo_n "checking if __bss_start is defined by the compiler... " >&6; }
32873 if ${grub_cv_check_uscore_uscore_bss_start_symbol+:} false; then :
32874 $as_echo_n "(cached) " >&6
32875 else
32876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32877 /* end confdefs.h. */
32878
32879 asm (".globl start; start:");
32880 void __main (void);
32881 void __main (void) {}
32882 int main (void);
32883
32884 int
32885 main (void)
32886 {
32887 asm ("incl __bss_start")
32888 ;
32889 return 0;
32890 }
32891 _ACEOF
32892 if ac_fn_c_try_link "$LINENO"; then :
32893 grub_cv_check_uscore_uscore_bss_start_symbol=yes
32894 else
32895 grub_cv_check_uscore_uscore_bss_start_symbol=no
32896 fi
32897 rm -f core conftest.err conftest.$ac_objext \
32898 conftest$ac_exeext conftest.$ac_ext
32899 fi
32900
32901
32902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $grub_cv_check_uscore_uscore_bss_start_symbol" >&5
32903 $as_echo "$grub_cv_check_uscore_uscore_bss_start_symbol" >&6; }
32904
32905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if edata is defined by the compiler" >&5
32906 $as_echo_n "checking if edata is defined by the compiler... " >&6; }
32907 if ${grub_cv_check_edata_symbol+:} false; then :
32908 $as_echo_n "(cached) " >&6
32909 else
32910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32911 /* end confdefs.h. */
32912
32913 asm (".globl start; start:");
32914 void __main (void);
32915 void __main (void) {}
32916 int main (void);
32917 int
32918 main (void)
32919 {
32920 asm ("incl edata")
32921 ;
32922 return 0;
32923 }
32924 _ACEOF
32925 if ac_fn_c_try_link "$LINENO"; then :
32926 grub_cv_check_edata_symbol=yes
32927 else
32928 grub_cv_check_edata_symbol=no
32929 fi
32930 rm -f core conftest.err conftest.$ac_objext \
32931 conftest$ac_exeext conftest.$ac_ext
32932 fi
32933
32934
32935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $grub_cv_check_edata_symbol" >&5
32936 $as_echo "$grub_cv_check_edata_symbol" >&6; }
32937
32938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if _edata is defined by the compiler" >&5
32939 $as_echo_n "checking if _edata is defined by the compiler... " >&6; }
32940 if ${grub_cv_check_uscore_edata_symbol+:} false; then :
32941 $as_echo_n "(cached) " >&6
32942 else
32943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32944 /* end confdefs.h. */
32945
32946 asm (".globl start; start:");
32947 void __main (void);
32948 void __main (void) {}
32949 int main (void);
32950 int
32951 main (void)
32952 {
32953 asm ("incl _edata")
32954 ;
32955 return 0;
32956 }
32957 _ACEOF
32958 if ac_fn_c_try_link "$LINENO"; then :
32959 grub_cv_check_uscore_edata_symbol=yes
32960 else
32961 grub_cv_check_uscore_edata_symbol=no
32962 fi
32963 rm -f core conftest.err conftest.$ac_objext \
32964 conftest$ac_exeext conftest.$ac_ext
32965 fi
32966
32967
32968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $grub_cv_check_uscore_edata_symbol" >&5
32969 $as_echo "$grub_cv_check_uscore_edata_symbol" >&6; }
32970
32971 if test "x$grub_cv_check_uscore_uscore_bss_start_symbol" = xyes; then
32972 BSS_START_SYMBOL=__bss_start
32973 elif test "x$grub_cv_check_edata_symbol" = xyes; then
32974 BSS_START_SYMBOL=edata
32975 elif test "x$grub_cv_check_uscore_edata_symbol" = xyes; then
32976 BSS_START_SYMBOL=_edata
32977 else
32978 as_fn_error $? "none of __bss_start, edata or _edata is defined" "$LINENO" 5
32979 fi
32980
32981
32982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if end is defined by the compiler" >&5
32983 $as_echo_n "checking if end is defined by the compiler... " >&6; }
32984 if ${grub_cv_check_end_symbol+:} false; then :
32985 $as_echo_n "(cached) " >&6
32986 else
32987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32988 /* end confdefs.h. */
32989
32990 asm (".globl start; start:");
32991 void __main (void);
32992 void __main (void) {}
32993 int main (void);
32994 int
32995 main (void)
32996 {
32997 asm ("incl end")
32998 ;
32999 return 0;
33000 }
33001 _ACEOF
33002 if ac_fn_c_try_link "$LINENO"; then :
33003 grub_cv_check_end_symbol=yes
33004 else
33005 grub_cv_check_end_symbol=no
33006 fi
33007 rm -f core conftest.err conftest.$ac_objext \
33008 conftest$ac_exeext conftest.$ac_ext
33009 fi
33010
33011
33012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $grub_cv_check_end_symbol" >&5
33013 $as_echo "$grub_cv_check_end_symbol" >&6; }
33014
33015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if _end is defined by the compiler" >&5
33016 $as_echo_n "checking if _end is defined by the compiler... " >&6; }
33017 if ${grub_cv_check_uscore_end_symbol+:} false; then :
33018 $as_echo_n "(cached) " >&6
33019 else
33020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33021 /* end confdefs.h. */
33022
33023 asm (".globl start; start:");
33024 void __main (void);
33025 void __main (void) {}
33026 int main (void);
33027 int
33028 main (void)
33029 {
33030 asm ("incl _end")
33031 ;
33032 return 0;
33033 }
33034 _ACEOF
33035 if ac_fn_c_try_link "$LINENO"; then :
33036 grub_cv_check_uscore_end_symbol=yes
33037 else
33038 grub_cv_check_uscore_end_symbol=no
33039 fi
33040 rm -f core conftest.err conftest.$ac_objext \
33041 conftest$ac_exeext conftest.$ac_ext
33042 fi
33043
33044
33045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $grub_cv_check_uscore_end_symbol" >&5
33046 $as_echo "$grub_cv_check_uscore_end_symbol" >&6; }
33047
33048 if test "x$grub_cv_check_end_symbol" = xyes; then
33049 END_SYMBOL=end
33050 elif test "x$grub_cv_check_uscore_end_symbol" = xyes; then
33051 END_SYMBOL=_end
33052 else
33053 as_fn_error $? "neither end nor _end is defined" "$LINENO" 5
33054 fi
33055
33056 fi
33057 CFLAGS="$TARGET_CFLAGS"
33058 fi
33059
33060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether nm works" >&5
33061 $as_echo_n "checking whether nm works... " >&6; }
33062 if ${grub_cv_prog_nm_works+:} false; then :
33063 $as_echo_n "(cached) " >&6
33064 else
33065
33066 nm_works_tmp_dir="$(mktemp -d "./confXXXXXX")"
33067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33068 /* end confdefs.h. */
33069
33070 int
33071 main (void)
33072 {
33073
33074 ;
33075 return 0;
33076 }
33077 _ACEOF
33078 $TARGET_CC $TARGET_CFLAGS -c conftest.c -o "$nm_works_tmp_dir/ef"
33079 if $TARGET_NM "$nm_works_tmp_dir/ef" > /dev/null; then
33080 grub_cv_prog_nm_works=yes
33081 else
33082 grub_cv_prog_nm_minus_p=no
33083 fi
33084 rm "$nm_works_tmp_dir/ef"
33085 rmdir "$nm_works_tmp_dir"
33086
33087 fi
33088
33089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $grub_cv_prog_nm_works" >&5
33090 $as_echo "$grub_cv_prog_nm_works" >&6; }
33091
33092 if test "x$grub_cv_prog_nm_works" != xyes; then
33093 as_fn_error $? "nm does not work" "$LINENO" 5
33094 fi
33095
33096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether nm accepts -P" >&5
33097 $as_echo_n "checking whether nm accepts -P... " >&6; }
33098 if ${grub_cv_prog_nm_minus_p+:} false; then :
33099 $as_echo_n "(cached) " >&6
33100 else
33101
33102 nm_minus_p_tmp_dir="$(mktemp -d "./confXXXXXX")"
33103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33104 /* end confdefs.h. */
33105
33106 int
33107 main (void)
33108 {
33109
33110 ;
33111 return 0;
33112 }
33113 _ACEOF
33114 $TARGET_CC $TARGET_CFLAGS -c conftest.c -o "$nm_minus_p_tmp_dir/ef"
33115 if $TARGET_NM -P "$nm_minus_p_tmp_dir/ef" 2>&1 > /dev/null; then
33116 grub_cv_prog_nm_minus_p=yes
33117 else
33118 grub_cv_prog_nm_minus_p=no
33119 fi
33120 rm "$nm_minus_p_tmp_dir/ef"
33121 rmdir "$nm_minus_p_tmp_dir"
33122
33123 fi
33124
33125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $grub_cv_prog_nm_minus_p" >&5
33126 $as_echo "$grub_cv_prog_nm_minus_p" >&6; }
33127
33128 if test "x$grub_cv_prog_nm_minus_p" = xyes; then
33129 TARGET_NMFLAGS_MINUS_P="-P"
33130 else
33131 TARGET_NMFLAGS_MINUS_P=
33132 fi
33133
33134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether nm accepts --defined-only" >&5
33135 $as_echo_n "checking whether nm accepts --defined-only... " >&6; }
33136 if ${grub_cv_prog_nm_defined_only+:} false; then :
33137 $as_echo_n "(cached) " >&6
33138 else
33139
33140 nm_defined_only_tmp_dir="$(mktemp -d "./confXXXXXX")"
33141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33142 /* end confdefs.h. */
33143
33144 int
33145 main (void)
33146 {
33147
33148 ;
33149 return 0;
33150 }
33151 _ACEOF
33152 $TARGET_CC $TARGET_CFLAGS -c conftest.c -o "$nm_defined_only_tmp_dir/ef"
33153 if $TARGET_NM --defined-only "$nm_defined_only_tmp_dir/ef" 2>&1 > /dev/null; then
33154 grub_cv_prog_nm_defined_only=yes
33155 else
33156 grub_cv_prog_nm_defined_only=no
33157 fi
33158 rm "$nm_defined_only_tmp_dir/ef"
33159 rmdir "$nm_defined_only_tmp_dir"
33160
33161 fi
33162
33163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $grub_cv_prog_nm_defined_only" >&5
33164 $as_echo "$grub_cv_prog_nm_defined_only" >&6; }
33165
33166 if test "x$grub_cv_prog_nm_defined_only" = xyes; then
33167 TARGET_NMFLAGS_DEFINED_ONLY=--defined-only
33168 else
33169 TARGET_NMFLAGS_DEFINED_ONLY=
33170 fi
33171
33172
33173
33174
33175 if test "$platform" != emu; then
33176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -nostdinc -isystem works" >&5
33177 $as_echo_n "checking whether -nostdinc -isystem works... " >&6; }
33178 if ${grub_cv_cc_isystem+:} false; then :
33179 $as_echo_n "(cached) " >&6
33180 else
33181
33182 SAVED_CPPFLAGS="$CPPFLAGS"
33183 CPPFLAGS="$TARGET_CPPFLAGS -nostdlib -nostdinc -isystem `$TARGET_CC -print-file-name=include`"
33184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33185 /* end confdefs.h. */
33186 #include <stdarg.h>
33187 #include <stddef.h>
33188 int va_arg_func (int fixed, va_list args);
33189 int
33190 main (void)
33191 {
33192
33193 ;
33194 return 0;
33195 }
33196 _ACEOF
33197 if ac_fn_c_try_compile "$LINENO"; then :
33198 grub_cv_cc_isystem=yes
33199 else
33200 grub_cv_cc_isystem=no
33201 fi
33202 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33203 CPPFLAGS="$SAVED_CPPFLAGS"
33204
33205 fi
33206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $grub_cv_cc_isystem" >&5
33207 $as_echo "$grub_cv_cc_isystem" >&6; }
33208
33209 if test x"$grub_cv_cc_isystem" = xyes ; then
33210 TARGET_CPPFLAGS="$TARGET_CPPFLAGS -nostdinc -isystem `$TARGET_CC -print-file-name=include`"
33211 fi
33212 fi
33213
33214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wtrampolines work" >&5
33215 $as_echo_n "checking whether -Wtrampolines work... " >&6; }
33216 if ${grub_cv_cc_wtrampolines+:} false; then :
33217 $as_echo_n "(cached) " >&6
33218 else
33219
33220 CFLAGS="$TARGET_CFLAGS -Wtrampolines -Werror"
33221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33222 /* end confdefs.h. */
33223 #include <stdarg.h>
33224 int va_arg_func (int fixed, va_list args);
33225 int
33226 main (void)
33227 {
33228
33229 ;
33230 return 0;
33231 }
33232 _ACEOF
33233 if ac_fn_c_try_compile "$LINENO"; then :
33234 grub_cv_cc_wtrampolines=yes
33235 else
33236 grub_cv_cc_wtrampolines=no
33237 fi
33238 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33239
33240 fi
33241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $grub_cv_cc_wtrampolines" >&5
33242 $as_echo "$grub_cv_cc_wtrampolines" >&6; }
33243
33244 if test x"$grub_cv_cc_wtrampolines" = xyes ; then
33245 TARGET_CFLAGS="$TARGET_CFLAGS -Wtrampolines"
33246 fi
33247
33248 # Restore the flags.
33249 CC="$tmp_CC"
33250 CFLAGS="$tmp_CFLAGS"
33251 CPPFLAGS="$tmp_CPPFLAGS"
33252 LDFLAGS="$tmp_LDFLAGS"
33253 LIBS="$tmp_LIBS"
33254
33255 #
33256 # Check for options.
33257 #
33258
33259 # Memory manager debugging.
33260 # Check whether --enable-mm-debug was given.
33261 if test "${enable_mm_debug+set}" = set; then :
33262 enableval=$enable_mm_debug;
33263 fi
33264
33265 if test x$enable_mm_debug = xyes; then
33266
33267 $as_echo "#define MM_DEBUG 1" >>confdefs.h
33268
33269 fi
33270
33271 # Check whether --enable-cache-stats was given.
33272 if test "${enable_cache_stats+set}" = set; then :
33273 enableval=$enable_cache_stats;
33274 fi
33275
33276
33277 if test x$enable_cache_stats = xyes; then
33278 DISK_CACHE_STATS=1
33279 else
33280 DISK_CACHE_STATS=0
33281 fi
33282
33283
33284 # Check whether --enable-boot-time was given.
33285 if test "${enable_boot_time+set}" = set; then :
33286 enableval=$enable_boot_time;
33287 fi
33288
33289
33290 if test x$enable_boot_time = xyes; then
33291 BOOT_TIME_STATS=1
33292 else
33293 BOOT_TIME_STATS=0
33294 fi
33295
33296
33297 # Check whether --enable-grub-emu-sdl was given.
33298 if test "${enable_grub_emu_sdl+set}" = set; then :
33299 enableval=$enable_grub_emu_sdl;
33300 fi
33301
33302
33303 # Check whether --enable-grub-emu-pci was given.
33304 if test "${enable_grub_emu_pci+set}" = set; then :
33305 enableval=$enable_grub_emu_pci;
33306 fi
33307
33308
33309 if test "$platform" = emu; then
33310
33311 if test x"$enable_grub_emu_sdl" = xno ; then
33312 grub_emu_sdl_excuse="explicitly disabled"
33313 fi
33314 if [ x"$grub_emu_sdl_excuse" = x ]; then
33315 # Check for libSDL libraries.
33316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SDL_Init in -lSDL" >&5
33317 $as_echo_n "checking for SDL_Init in -lSDL... " >&6; }
33318 if ${ac_cv_lib_SDL_SDL_Init+:} false; then :
33319 $as_echo_n "(cached) " >&6
33320 else
33321 ac_check_lib_save_LIBS=$LIBS
33322 LIBS="-lSDL $LIBS"
33323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33324 /* end confdefs.h. */
33325
33326 /* Override any GCC internal prototype to avoid an error.
33327 Use char because int might match the return type of a GCC
33328 builtin and then its argument prototype would still apply. */
33329 #ifdef __cplusplus
33330 extern "C"
33331 #endif
33332 char SDL_Init ();
33333 int
33334 main (void)
33335 {
33336 return SDL_Init ();
33337 ;
33338 return 0;
33339 }
33340 _ACEOF
33341 if ac_fn_c_try_link "$LINENO"; then :
33342 ac_cv_lib_SDL_SDL_Init=yes
33343 else
33344 ac_cv_lib_SDL_SDL_Init=no
33345 fi
33346 rm -f core conftest.err conftest.$ac_objext \
33347 conftest$ac_exeext conftest.$ac_ext
33348 LIBS=$ac_check_lib_save_LIBS
33349 fi
33350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SDL_SDL_Init" >&5
33351 $as_echo "$ac_cv_lib_SDL_SDL_Init" >&6; }
33352 if test "x$ac_cv_lib_SDL_SDL_Init" = xyes; then :
33353 LIBSDL="-lSDL"
33354 else
33355 grub_emu_sdl_excuse="libSDL libraries are required to build \`grub-emu' with SDL support"
33356 fi
33357
33358
33359 fi
33360
33361 if [ x"$grub_emu_sdl_excuse" = x ]; then
33362 # Check for headers.
33363 for ac_header in SDL/SDL.h
33364 do :
33365 ac_fn_c_check_header_mongrel "$LINENO" "SDL/SDL.h" "ac_cv_header_SDL_SDL_h" "$ac_includes_default"
33366 if test "x$ac_cv_header_SDL_SDL_h" = xyes; then :
33367 cat >>confdefs.h <<_ACEOF
33368 #define HAVE_SDL_SDL_H 1
33369 _ACEOF
33370
33371 else
33372 grub_emu_sdl_excuse="libSDL header file is required to build \`grub-emu' with SDL support"
33373 fi
33374
33375 done
33376
33377 fi
33378
33379 if test x"enable_grub_emu_sdl" = xyes && test x"$grub_emu_sdl_excuse" != x ; then
33380 as_fn_error $? "SDL support for grub-emu was explicitly requested but can't be compiled ($grub_emu_sdl_excuse)" "$LINENO" 5
33381 fi
33382 if test x"$grub_emu_sdl_excuse" = x ; then
33383 enable_grub_emu_sdl=yes
33384 else
33385 enable_grub_emu_sdl=no
33386 fi
33387
33388 if test x"$enable_grub_emu_pci" != xyes ; then
33389 grub_emu_pci_excuse="not enabled"
33390 fi
33391
33392 if [ x"$grub_emu_pci_excuse" = x ]; then
33393 # Check for libpci libraries.
33394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pci_system_init in -lpciaccess" >&5
33395 $as_echo_n "checking for pci_system_init in -lpciaccess... " >&6; }
33396 if ${ac_cv_lib_pciaccess_pci_system_init+:} false; then :
33397 $as_echo_n "(cached) " >&6
33398 else
33399 ac_check_lib_save_LIBS=$LIBS
33400 LIBS="-lpciaccess $LIBS"
33401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33402 /* end confdefs.h. */
33403
33404 /* Override any GCC internal prototype to avoid an error.
33405 Use char because int might match the return type of a GCC
33406 builtin and then its argument prototype would still apply. */
33407 #ifdef __cplusplus
33408 extern "C"
33409 #endif
33410 char pci_system_init ();
33411 int
33412 main (void)
33413 {
33414 return pci_system_init ();
33415 ;
33416 return 0;
33417 }
33418 _ACEOF
33419 if ac_fn_c_try_link "$LINENO"; then :
33420 ac_cv_lib_pciaccess_pci_system_init=yes
33421 else
33422 ac_cv_lib_pciaccess_pci_system_init=no
33423 fi
33424 rm -f core conftest.err conftest.$ac_objext \
33425 conftest$ac_exeext conftest.$ac_ext
33426 LIBS=$ac_check_lib_save_LIBS
33427 fi
33428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pciaccess_pci_system_init" >&5
33429 $as_echo "$ac_cv_lib_pciaccess_pci_system_init" >&6; }
33430 if test "x$ac_cv_lib_pciaccess_pci_system_init" = xyes; then :
33431 LIBPCIACCESS="-lpciaccess"
33432 else
33433 grub_emu_pci_excuse="need libpciaccess library"
33434 fi
33435
33436
33437 fi
33438 if [ x"$grub_emu_pci_excuse" = x ]; then
33439 # Check for headers.
33440 for ac_header in pciaccess.h
33441 do :
33442 ac_fn_c_check_header_mongrel "$LINENO" "pciaccess.h" "ac_cv_header_pciaccess_h" "$ac_includes_default"
33443 if test "x$ac_cv_header_pciaccess_h" = xyes; then :
33444 cat >>confdefs.h <<_ACEOF
33445 #define HAVE_PCIACCESS_H 1
33446 _ACEOF
33447
33448 else
33449 grub_emu_pci_excuse="need libpciaccess headers"
33450 fi
33451
33452 done
33453
33454 fi
33455
33456 if test x"$grub_emu_pci_excuse" = x ; then
33457 enable_grub_emu_pci=yes
33458 else
33459
33460 enable_grub_emu_pci=no
33461 fi
33462
33463
33464
33465
33466 else
33467
33468 # Ignore --enable-emu-* if platform is not emu
33469 enable_grub_emu_sdl=no
33470 enable_grub_emu_pci=no
33471 fi
33472
33473 # Check whether --enable-grub-mkfont was given.
33474 if test "${enable_grub_mkfont+set}" = set; then :
33475 enableval=$enable_grub_mkfont;
33476 fi
33477
33478 if test x"$enable_grub_mkfont" = xno ; then
33479 grub_mkfont_excuse="explicitly disabled"
33480 fi
33481
33482 unset ac_cv_header_ft2build_h
33483
33484 if test x"$grub_mkfont_excuse" = x ; then
33485 # Check for freetype libraries.
33486
33487 pkg_failed=no
33488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
33489 $as_echo_n "checking for FREETYPE... " >&6; }
33490
33491 if test -n "$FREETYPE_CFLAGS"; then
33492 pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
33493 elif test -n "$PKG_CONFIG"; then
33494 if test -n "$PKG_CONFIG" && \
33495 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
33496 ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
33497 ac_status=$?
33498 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33499 test $ac_status = 0; }; then
33500 pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
33501 test "x$?" != "x0" && pkg_failed=yes
33502 else
33503 pkg_failed=yes
33504 fi
33505 else
33506 pkg_failed=untried
33507 fi
33508 if test -n "$FREETYPE_LIBS"; then
33509 pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
33510 elif test -n "$PKG_CONFIG"; then
33511 if test -n "$PKG_CONFIG" && \
33512 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
33513 ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
33514 ac_status=$?
33515 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33516 test $ac_status = 0; }; then
33517 pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
33518 test "x$?" != "x0" && pkg_failed=yes
33519 else
33520 pkg_failed=yes
33521 fi
33522 else
33523 pkg_failed=untried
33524 fi
33525
33526
33527
33528 if test $pkg_failed = yes; then
33529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33530 $as_echo "no" >&6; }
33531
33532 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
33533 _pkg_short_errors_supported=yes
33534 else
33535 _pkg_short_errors_supported=no
33536 fi
33537 if test $_pkg_short_errors_supported = yes; then
33538 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "freetype2" 2>&1`
33539 else
33540 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "freetype2" 2>&1`
33541 fi
33542 # Put the nasty error message in config.log where it belongs
33543 echo "$FREETYPE_PKG_ERRORS" >&5
33544
33545 grub_mkfont_excuse="need freetype2 library"
33546 elif test $pkg_failed = untried; then
33547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33548 $as_echo "no" >&6; }
33549 grub_mkfont_excuse="need freetype2 library"
33550 else
33551 FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
33552 FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
33553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33554 $as_echo "yes" >&6; }
33555
33556 SAVED_CPPFLAGS="$CPPFLAGS"
33557 SAVED_LIBS="$LIBS"
33558 CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS"
33559 LIBS="$LIBS $FREETYPE_LIBS"
33560 for ac_header in ft2build.h
33561 do :
33562 ac_fn_c_check_header_mongrel "$LINENO" "ft2build.h" "ac_cv_header_ft2build_h" "$ac_includes_default"
33563 if test "x$ac_cv_header_ft2build_h" = xyes; then :
33564 cat >>confdefs.h <<_ACEOF
33565 #define HAVE_FT2BUILD_H 1
33566 _ACEOF
33567
33568 else
33569 grub_mkfont_excuse="need freetype2 headers"
33570 fi
33571
33572 done
33573
33574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33575 /* end confdefs.h. */
33576
33577 /* Override any GCC internal prototype to avoid an error.
33578 Use char because int might match the return type of a GCC
33579 builtin and then its argument prototype would still apply. */
33580 #ifdef __cplusplus
33581 extern "C"
33582 #endif
33583 char FT_Load_Glyph ();
33584 int
33585 main (void)
33586 {
33587 return FT_Load_Glyph ();
33588 ;
33589 return 0;
33590 }
33591 _ACEOF
33592 if ac_fn_c_try_link "$LINENO"; then :
33593
33594 else
33595 grub_mkfont_excuse="freetype2 library unusable"
33596 fi
33597 rm -f core conftest.err conftest.$ac_objext \
33598 conftest$ac_exeext conftest.$ac_ext
33599 CPPFLAGS="$SAVED_CPPFLAGS"
33600 LIBS="$SAVED_LIBS"
33601
33602 fi
33603 fi
33604
33605 if test x"$enable_grub_mkfont" = xyes && test x"$grub_mkfont_excuse" != x ; then
33606 as_fn_error $? "grub-mkfont was explicitly requested but can't be compiled ($grub_mkfont_excuse)" "$LINENO" 5
33607 fi
33608 if test x"$grub_mkfont_excuse" = x ; then
33609 enable_grub_mkfont=yes
33610 else
33611 enable_grub_mkfont=no
33612 fi
33613
33614
33615 SAVED_CC="$CC"
33616 SAVED_CPP="$CPP"
33617 SAVED_CFLAGS="$CFLAGS"
33618 SAVED_CPPFLAGS="$CPPFLAGS"
33619 SAVED_LDFLAGS="$LDFLAGS"
33620 CC="$BUILD_CC"
33621 CPP="$BUILD_CPP"
33622 CFLAGS="$BUILD_CFLAGS"
33623 CPPFLAGS="$BUILD_CPPFLAGS"
33624 LDFLAGS="$BUILD_LDFAGS"
33625
33626 unset ac_cv_c_bigendian
33627 unset ac_cv_header_ft2build_h
33628
33629 if ac_fn_c_compute_int "$LINENO" "sizeof (void *)" "BUILD_SIZEOF_VOID_P" ""; then :
33630
33631 fi
33632
33633 if ac_fn_c_compute_int "$LINENO" "sizeof (long)" "BUILD_SIZEOF_LONG" ""; then :
33634
33635 fi
33636
33637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
33638 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
33639 if ${ac_cv_c_bigendian+:} false; then :
33640 $as_echo_n "(cached) " >&6
33641 else
33642 ac_cv_c_bigendian=unknown
33643 # See if we're dealing with a universal compiler.
33644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33645 /* end confdefs.h. */
33646 #ifndef __APPLE_CC__
33647 not a universal capable compiler
33648 #endif
33649 typedef int dummy;
33650
33651 _ACEOF
33652 if ac_fn_c_try_compile "$LINENO"; then :
33653
33654 # Check for potential -arch flags. It is not universal unless
33655 # there are at least two -arch flags with different values.
33656 ac_arch=
33657 ac_prev=
33658 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
33659 if test -n "$ac_prev"; then
33660 case $ac_word in
33661 i?86 | x86_64 | ppc | ppc64)
33662 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
33663 ac_arch=$ac_word
33664 else
33665 ac_cv_c_bigendian=universal
33666 break
33667 fi
33668 ;;
33669 esac
33670 ac_prev=
33671 elif test "x$ac_word" = "x-arch"; then
33672 ac_prev=arch
33673 fi
33674 done
33675 fi
33676 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33677 if test $ac_cv_c_bigendian = unknown; then
33678 # See if sys/param.h defines the BYTE_ORDER macro.
33679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33680 /* end confdefs.h. */
33681 #include <sys/types.h>
33682 #include <sys/param.h>
33683
33684 int
33685 main (void)
33686 {
33687 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
33688 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
33689 && LITTLE_ENDIAN)
33690 bogus endian macros
33691 #endif
33692
33693 ;
33694 return 0;
33695 }
33696 _ACEOF
33697 if ac_fn_c_try_compile "$LINENO"; then :
33698 # It does; now see whether it defined to BIG_ENDIAN or not.
33699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33700 /* end confdefs.h. */
33701 #include <sys/types.h>
33702 #include <sys/param.h>
33703
33704 int
33705 main (void)
33706 {
33707 #if BYTE_ORDER != BIG_ENDIAN
33708 not big endian
33709 #endif
33710
33711 ;
33712 return 0;
33713 }
33714 _ACEOF
33715 if ac_fn_c_try_compile "$LINENO"; then :
33716 ac_cv_c_bigendian=yes
33717 else
33718 ac_cv_c_bigendian=no
33719 fi
33720 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33721 fi
33722 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33723 fi
33724 if test $ac_cv_c_bigendian = unknown; then
33725 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
33726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33727 /* end confdefs.h. */
33728 #include <limits.h>
33729
33730 int
33731 main (void)
33732 {
33733 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
33734 bogus endian macros
33735 #endif
33736
33737 ;
33738 return 0;
33739 }
33740 _ACEOF
33741 if ac_fn_c_try_compile "$LINENO"; then :
33742 # It does; now see whether it defined to _BIG_ENDIAN or not.
33743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33744 /* end confdefs.h. */
33745 #include <limits.h>
33746
33747 int
33748 main (void)
33749 {
33750 #ifndef _BIG_ENDIAN
33751 not big endian
33752 #endif
33753
33754 ;
33755 return 0;
33756 }
33757 _ACEOF
33758 if ac_fn_c_try_compile "$LINENO"; then :
33759 ac_cv_c_bigendian=yes
33760 else
33761 ac_cv_c_bigendian=no
33762 fi
33763 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33764 fi
33765 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33766 fi
33767 if test $ac_cv_c_bigendian = unknown; then
33768 # Compile a test program.
33769 if test "$cross_compiling" = yes; then :
33770 # Try to guess by grepping values from an object file.
33771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33772 /* end confdefs.h. */
33773 short int ascii_mm[] =
33774 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
33775 short int ascii_ii[] =
33776 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
33777 int use_ascii (int i) {
33778 return ascii_mm[i] + ascii_ii[i];
33779 }
33780 short int ebcdic_ii[] =
33781 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
33782 short int ebcdic_mm[] =
33783 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
33784 int use_ebcdic (int i) {
33785 return ebcdic_mm[i] + ebcdic_ii[i];
33786 }
33787 extern int foo;
33788
33789 int
33790 main (void)
33791 {
33792 return use_ascii (foo) == use_ebcdic (foo);
33793 ;
33794 return 0;
33795 }
33796 _ACEOF
33797 if ac_fn_c_try_compile "$LINENO"; then :
33798 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
33799 ac_cv_c_bigendian=yes
33800 fi
33801 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
33802 if test "$ac_cv_c_bigendian" = unknown; then
33803 ac_cv_c_bigendian=no
33804 else
33805 # finding both strings is unlikely to happen, but who knows?
33806 ac_cv_c_bigendian=unknown
33807 fi
33808 fi
33809 fi
33810 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33811 else
33812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33813 /* end confdefs.h. */
33814 $ac_includes_default
33815 int
33816 main (void)
33817 {
33818
33819 /* Are we little or big endian? From Harbison&Steele. */
33820 union
33821 {
33822 long int l;
33823 char c[sizeof (long int)];
33824 } u;
33825 u.l = 1;
33826 return u.c[sizeof (long int) - 1] == 1;
33827
33828 ;
33829 return 0;
33830 }
33831 _ACEOF
33832 if ac_fn_c_try_run "$LINENO"; then :
33833 ac_cv_c_bigendian=no
33834 else
33835 ac_cv_c_bigendian=yes
33836 fi
33837 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33838 conftest.$ac_objext conftest.beam conftest.$ac_ext
33839 fi
33840
33841 fi
33842 fi
33843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
33844 $as_echo "$ac_cv_c_bigendian" >&6; }
33845 case $ac_cv_c_bigendian in #(
33846 yes)
33847 BUILD_WORDS_BIGENDIAN=1;; #(
33848 no)
33849 BUILD_WORDS_BIGENDIAN=0 ;; #(
33850 universal)
33851 BUILD_WORDS_BIGENDIAN=err
33852 ;; #(
33853 *)
33854 BUILD_WORDS_BIGENDIAN=err ;;
33855 esac
33856
33857
33858 if test x$BUILD_WORDS_BIGENDIAN = xerr ; then
33859 as_fn_error $? "couldnt determine build endianness" "$LINENO" 5
33860 fi
33861
33862
33863
33864
33865
33866 if test x"$grub_build_mkfont_excuse" = x ; then
33867 # Check for freetype libraries.
33868 SAVED_PKG_CONFIG="$PKG_CONFIG"
33869 test -z "$BUILD_PKG_CONFIG" || PKG_CONFIG="$BUILD_PKG_CONFIG"
33870
33871 pkg_failed=no
33872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_FREETYPE" >&5
33873 $as_echo_n "checking for BUILD_FREETYPE... " >&6; }
33874
33875 if test -n "$BUILD_FREETYPE_CFLAGS"; then
33876 pkg_cv_BUILD_FREETYPE_CFLAGS="$BUILD_FREETYPE_CFLAGS"
33877 elif test -n "$PKG_CONFIG"; then
33878 if test -n "$PKG_CONFIG" && \
33879 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
33880 ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
33881 ac_status=$?
33882 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33883 test $ac_status = 0; }; then
33884 pkg_cv_BUILD_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
33885 test "x$?" != "x0" && pkg_failed=yes
33886 else
33887 pkg_failed=yes
33888 fi
33889 else
33890 pkg_failed=untried
33891 fi
33892 if test -n "$BUILD_FREETYPE_LIBS"; then
33893 pkg_cv_BUILD_FREETYPE_LIBS="$BUILD_FREETYPE_LIBS"
33894 elif test -n "$PKG_CONFIG"; then
33895 if test -n "$PKG_CONFIG" && \
33896 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
33897 ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
33898 ac_status=$?
33899 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33900 test $ac_status = 0; }; then
33901 pkg_cv_BUILD_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
33902 test "x$?" != "x0" && pkg_failed=yes
33903 else
33904 pkg_failed=yes
33905 fi
33906 else
33907 pkg_failed=untried
33908 fi
33909
33910
33911
33912 if test $pkg_failed = yes; then
33913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33914 $as_echo "no" >&6; }
33915
33916 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
33917 _pkg_short_errors_supported=yes
33918 else
33919 _pkg_short_errors_supported=no
33920 fi
33921 if test $_pkg_short_errors_supported = yes; then
33922 BUILD_FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "freetype2" 2>&1`
33923 else
33924 BUILD_FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "freetype2" 2>&1`
33925 fi
33926 # Put the nasty error message in config.log where it belongs
33927 echo "$BUILD_FREETYPE_PKG_ERRORS" >&5
33928
33929 grub_build_mkfont_excuse="need freetype2 library"
33930 elif test $pkg_failed = untried; then
33931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33932 $as_echo "no" >&6; }
33933 grub_build_mkfont_excuse="need freetype2 library"
33934 else
33935 BUILD_FREETYPE_CFLAGS=$pkg_cv_BUILD_FREETYPE_CFLAGS
33936 BUILD_FREETYPE_LIBS=$pkg_cv_BUILD_FREETYPE_LIBS
33937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33938 $as_echo "yes" >&6; }
33939
33940 SAVED_CPPFLAGS_2="$CPPFLAGS"
33941 SAVED_LIBS="$LIBS"
33942 CPPFLAGS="$CPPFLAGS $BUILD_FREETYPE_CFLAGS"
33943 LIBS="$LIBS $BUILD_FREETYPE_LIBS"
33944 for ac_header in ft2build.h
33945 do :
33946 ac_fn_c_check_header_mongrel "$LINENO" "ft2build.h" "ac_cv_header_ft2build_h" "$ac_includes_default"
33947 if test "x$ac_cv_header_ft2build_h" = xyes; then :
33948 cat >>confdefs.h <<_ACEOF
33949 #define HAVE_FT2BUILD_H 1
33950 _ACEOF
33951
33952 else
33953 grub_build_mkfont_excuse="need freetype2 headers"
33954 fi
33955
33956 done
33957
33958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33959 /* end confdefs.h. */
33960
33961 /* Override any GCC internal prototype to avoid an error.
33962 Use char because int might match the return type of a GCC
33963 builtin and then its argument prototype would still apply. */
33964 #ifdef __cplusplus
33965 extern "C"
33966 #endif
33967 char FT_Load_Glyph ();
33968 int
33969 main (void)
33970 {
33971 return FT_Load_Glyph ();
33972 ;
33973 return 0;
33974 }
33975 _ACEOF
33976 if ac_fn_c_try_link "$LINENO"; then :
33977
33978 else
33979 grub_build_mkfont_excuse="freetype2 library unusable"
33980 fi
33981 rm -f core conftest.err conftest.$ac_objext \
33982 conftest$ac_exeext conftest.$ac_ext
33983 LIBS="$SAVED_LIBS"
33984 CPPFLAGS="$SAVED_CPPFLAGS_2"
33985
33986 fi
33987 PKG_CONFIG="$SAVED_PKG_CONFIG"
33988 fi
33989
33990 if test x"$enable_build_grub_mkfont" = xyes && test x"$grub_build_mkfont_excuse" != x ; then
33991 as_fn_error $? "build-grub-mkfont was explicitly requested but can't be compiled ($grub_build_mkfont_excuse)" "$LINENO" 5
33992 fi
33993 if test x"$grub_build_mkfont_excuse" = x ; then
33994 enable_build_grub_mkfont=yes
33995 else
33996 enable_build_grub_mkfont=no
33997 fi
33998 if test x"$enable_build_grub_mkfont" = xno && ( test "x$platform" = xqemu || test "x$platform" = xloongson || test "x$platform" = xqemu_mips || test "x$platform" = xcoreboot ); then
33999 if test x"$grub_build_mkfont_excuse" = x ; then
34000 as_fn_error $? "qemu, coreboot and loongson ports need build-time grub-mkfont" "$LINENO" 5
34001 else
34002 as_fn_error $? "qemu, coreboot and loongson ports need build-time grub-mkfont ($grub_build_mkfont_excuse)" "$LINENO" 5
34003 fi
34004 fi
34005
34006 CC="$SAVED_CC"
34007 CPP="$SAVED_CPP"
34008 CFLAGS="$SAVED_CFLAGS"
34009 CPPFLAGS="$SAVED_CPPFLAGS"
34010 LDFLAGS="$SAVED_LDFLAGS"
34011
34012
34013 DJVU_FONT_SOURCE=
34014
34015 starfield_excuse=
34016
34017 # Check whether --enable-grub-themes was given.
34018 if test "${enable_grub_themes+set}" = set; then :
34019 enableval=$enable_grub_themes;
34020 fi
34021
34022 if test x"$enable_grub_themes" = xno ; then
34023 starfield_excuse="explicitly disabled"
34024 fi
34025
34026 if test x"$starfield_excuse" = x && test x"$enable_build_grub_mkfont" = xno ; then
34027 starfield_excuse="No build-time grub-mkfont"
34028 fi
34029
34030 if test x"$starfield_excuse" = x; then
34031 for ext in pcf pcf.gz bdf bdf.gz ttf ttf.gz; do
34032 for dir in . /usr/src /usr/share/fonts/X11/misc /usr/share/fonts/truetype/ttf-dejavu /usr/share/fonts/dejavu /usr/share/fonts/truetype; do
34033 if test -f "$dir/DejaVuSans.$ext"; then
34034 DJVU_FONT_SOURCE="$dir/DejaVuSans.$ext"
34035 break 2
34036 fi
34037 done
34038 done
34039
34040 if test "x$DJVU_FONT_SOURCE" = x; then
34041 starfield_excuse="No DejaVu found"
34042 fi
34043 fi
34044
34045 if test x"$enable_grub_themes" = xyes && test x"$starfield_excuse" != x; then
34046 as_fn_error $? "themes were explicitly requested but requirements are not satisfied ($starfield_excuse)" "$LINENO" 5
34047 fi
34048
34049
34050
34051 FONT_SOURCE=
34052
34053 for ext in pcf pcf.gz bdf bdf.gz ttf ttf.gz; do
34054 for dir in . /usr/src /usr/share/fonts/X11/misc /usr/share/fonts/unifont /usr/share/fonts/uni /usr/share/fonts/truetype/unifont /usr/share/fonts/misc; do
34055 if test -f "$dir/unifont.$ext"; then
34056 md5="$(md5sum "$dir/unifont.$ext"|awk '{ print $1; }')"
34057 # PCF and BDF from version 6.3 isn't hanled properly by libfreetype.
34058 if test "$md5" = 0a54834d2788c83886a3e1785a6a1e61 || test "$md5" = 28f2565c7a41d8d407e2551159385edb || test "$md5" = dae5e588461b3b92b87b6ffee734f936 || test "$md5" = 4a3d687aa5bb329ed05f4263a1016791 ; then
34059 continue
34060 fi
34061 FONT_SOURCE="$dir/unifont.$ext"
34062 break 2
34063 fi
34064 done
34065 done
34066
34067 if test x"$enable_build_grub_mkfont" = xno ; then
34068 FONT_SOURCE=
34069 fi
34070
34071 if test "x$FONT_SOURCE" = x && ( test "x$platform" = xqemu || test "x$platform" = xloongson || test "x$platform" = xqemu_mips || test "x$platform" = xcoreboot ); then
34072 if test x"$grub_build_mkfont_excuse" = x ; then
34073 as_fn_error $? "qemu, coreboot and loongson ports need unifont" "$LINENO" 5
34074 else
34075 as_fn_error $? "qemu, coreboot and loongson ports need unifont ($grub_build_mkfont_excuse)" "$LINENO" 5
34076 fi
34077 fi
34078
34079
34080
34081 if test x"$FONT_SOURCE" = x && test x"$DJVU_FONT_SOURCE" = x && test x"$grub_build_mkfont_excuse" = x; then
34082 grub_build_mkfont_excuse="no fonts"
34083 fi
34084
34085
34086 # Check whether --enable-grub-mount was given.
34087 if test "${enable_grub_mount+set}" = set; then :
34088 enableval=$enable_grub_mount;
34089 fi
34090
34091 if test x"$enable_grub_mount" = xno ; then
34092 grub_mount_excuse="explicitly disabled"
34093 fi
34094
34095 if test x"$grub_mount_excuse" = x ; then
34096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fuse_main_real in -lfuse" >&5
34097 $as_echo_n "checking for fuse_main_real in -lfuse... " >&6; }
34098 if ${ac_cv_lib_fuse_fuse_main_real+:} false; then :
34099 $as_echo_n "(cached) " >&6
34100 else
34101 ac_check_lib_save_LIBS=$LIBS
34102 LIBS="-lfuse $LIBS"
34103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34104 /* end confdefs.h. */
34105
34106 /* Override any GCC internal prototype to avoid an error.
34107 Use char because int might match the return type of a GCC
34108 builtin and then its argument prototype would still apply. */
34109 #ifdef __cplusplus
34110 extern "C"
34111 #endif
34112 char fuse_main_real ();
34113 int
34114 main (void)
34115 {
34116 return fuse_main_real ();
34117 ;
34118 return 0;
34119 }
34120 _ACEOF
34121 if ac_fn_c_try_link "$LINENO"; then :
34122 ac_cv_lib_fuse_fuse_main_real=yes
34123 else
34124 ac_cv_lib_fuse_fuse_main_real=no
34125 fi
34126 rm -f core conftest.err conftest.$ac_objext \
34127 conftest$ac_exeext conftest.$ac_ext
34128 LIBS=$ac_check_lib_save_LIBS
34129 fi
34130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fuse_fuse_main_real" >&5
34131 $as_echo "$ac_cv_lib_fuse_fuse_main_real" >&6; }
34132 if test "x$ac_cv_lib_fuse_fuse_main_real" = xyes; then :
34133 cat >>confdefs.h <<_ACEOF
34134 #define HAVE_LIBFUSE 1
34135 _ACEOF
34136
34137 LIBS="-lfuse $LIBS"
34138
34139 else
34140 grub_mount_excuse="need FUSE library"
34141 fi
34142
34143 fi
34144
34145 if test x"$grub_mount_excuse" = x ; then
34146 # Check for fuse headers.
34147 SAVED_CPPFLAGS="$CPPFLAGS"
34148 CPPFLAGS="$CPPFLAGS -DFUSE_USE_VERSION=26"
34149 for ac_header in fuse/fuse.h
34150 do :
34151 ac_fn_c_check_header_mongrel "$LINENO" "fuse/fuse.h" "ac_cv_header_fuse_fuse_h" "$ac_includes_default"
34152 if test "x$ac_cv_header_fuse_fuse_h" = xyes; then :
34153 cat >>confdefs.h <<_ACEOF
34154 #define HAVE_FUSE_FUSE_H 1
34155 _ACEOF
34156
34157 else
34158 grub_mount_excuse="need FUSE headers"
34159 fi
34160
34161 done
34162
34163 CPPFLAGS="$SAVED_CPPFLAGS"
34164 fi
34165
34166 if test x"$enable_grub_mount" = xyes && test x"$grub_mount_excuse" != x ; then
34167 as_fn_error $? "grub-mount was explicitly requested but can't be compiled ($grub_mount_excuse)" "$LINENO" 5
34168 fi
34169 if test x"$grub_mount_excuse" = x ; then
34170 enable_grub_mount=yes
34171 else
34172 enable_grub_mount=no
34173 fi
34174
34175
34176 # Check whether --enable-device-mapper was given.
34177 if test "${enable_device_mapper+set}" = set; then :
34178 enableval=$enable_device_mapper;
34179 fi
34180
34181 if test x"$enable_device_mapper" = xno ; then
34182 device_mapper_excuse="explicitly disabled"
34183 fi
34184
34185 if test x"$device_mapper_excuse" = x ; then
34186 # Check for device-mapper header.
34187 ac_fn_c_check_header_mongrel "$LINENO" "libdevmapper.h" "ac_cv_header_libdevmapper_h" "$ac_includes_default"
34188 if test "x$ac_cv_header_libdevmapper_h" = xyes; then :
34189
34190 else
34191 device_mapper_excuse="need libdevmapper header"
34192 fi
34193
34194
34195 fi
34196
34197 if test x"$device_mapper_excuse" = x ; then
34198 # Check for device-mapper library.
34199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dm_task_create in -ldevmapper" >&5
34200 $as_echo_n "checking for dm_task_create in -ldevmapper... " >&6; }
34201 if ${ac_cv_lib_devmapper_dm_task_create+:} false; then :
34202 $as_echo_n "(cached) " >&6
34203 else
34204 ac_check_lib_save_LIBS=$LIBS
34205 LIBS="-ldevmapper $LIBS"
34206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34207 /* end confdefs.h. */
34208
34209 /* Override any GCC internal prototype to avoid an error.
34210 Use char because int might match the return type of a GCC
34211 builtin and then its argument prototype would still apply. */
34212 #ifdef __cplusplus
34213 extern "C"
34214 #endif
34215 char dm_task_create ();
34216 int
34217 main (void)
34218 {
34219 return dm_task_create ();
34220 ;
34221 return 0;
34222 }
34223 _ACEOF
34224 if ac_fn_c_try_link "$LINENO"; then :
34225 ac_cv_lib_devmapper_dm_task_create=yes
34226 else
34227 ac_cv_lib_devmapper_dm_task_create=no
34228 fi
34229 rm -f core conftest.err conftest.$ac_objext \
34230 conftest$ac_exeext conftest.$ac_ext
34231 LIBS=$ac_check_lib_save_LIBS
34232 fi
34233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_devmapper_dm_task_create" >&5
34234 $as_echo "$ac_cv_lib_devmapper_dm_task_create" >&6; }
34235 if test "x$ac_cv_lib_devmapper_dm_task_create" = xyes; then :
34236 cat >>confdefs.h <<_ACEOF
34237 #define HAVE_LIBDEVMAPPER 1
34238 _ACEOF
34239
34240 LIBS="-ldevmapper $LIBS"
34241
34242 else
34243 device_mapper_excuse="need devmapper library"
34244 fi
34245
34246 fi
34247
34248 if test x"$device_mapper_excuse" = x ; then
34249 # Check for device-mapper library.
34250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dm_log_with_errno_init in -ldevmapper" >&5
34251 $as_echo_n "checking for dm_log_with_errno_init in -ldevmapper... " >&6; }
34252 if ${ac_cv_lib_devmapper_dm_log_with_errno_init+:} false; then :
34253 $as_echo_n "(cached) " >&6
34254 else
34255 ac_check_lib_save_LIBS=$LIBS
34256 LIBS="-ldevmapper $LIBS"
34257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34258 /* end confdefs.h. */
34259
34260 /* Override any GCC internal prototype to avoid an error.
34261 Use char because int might match the return type of a GCC
34262 builtin and then its argument prototype would still apply. */
34263 #ifdef __cplusplus
34264 extern "C"
34265 #endif
34266 char dm_log_with_errno_init ();
34267 int
34268 main (void)
34269 {
34270 return dm_log_with_errno_init ();
34271 ;
34272 return 0;
34273 }
34274 _ACEOF
34275 if ac_fn_c_try_link "$LINENO"; then :
34276 ac_cv_lib_devmapper_dm_log_with_errno_init=yes
34277 else
34278 ac_cv_lib_devmapper_dm_log_with_errno_init=no
34279 fi
34280 rm -f core conftest.err conftest.$ac_objext \
34281 conftest$ac_exeext conftest.$ac_ext
34282 LIBS=$ac_check_lib_save_LIBS
34283 fi
34284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_devmapper_dm_log_with_errno_init" >&5
34285 $as_echo "$ac_cv_lib_devmapper_dm_log_with_errno_init" >&6; }
34286 if test "x$ac_cv_lib_devmapper_dm_log_with_errno_init" = xyes; then :
34287 cat >>confdefs.h <<_ACEOF
34288 #define HAVE_LIBDEVMAPPER 1
34289 _ACEOF
34290
34291 LIBS="-ldevmapper $LIBS"
34292
34293 else
34294 device_mapper_excuse="need devmapper library"
34295 fi
34296
34297 fi
34298
34299 if test x"$device_mapper_excuse" = x ; then
34300 LIBDEVMAPPER="-ldevmapper"
34301
34302 $as_echo "#define HAVE_DEVICE_MAPPER 1" >>confdefs.h
34303
34304 fi
34305
34306
34307
34308 LIBGEOM=
34309 if test x$host_kernel = xkfreebsd; then
34310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for geom_gettree in -lgeom" >&5
34311 $as_echo_n "checking for geom_gettree in -lgeom... " >&6; }
34312 if ${ac_cv_lib_geom_geom_gettree+:} false; then :
34313 $as_echo_n "(cached) " >&6
34314 else
34315 ac_check_lib_save_LIBS=$LIBS
34316 LIBS="-lgeom $LIBS"
34317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34318 /* end confdefs.h. */
34319
34320 /* Override any GCC internal prototype to avoid an error.
34321 Use char because int might match the return type of a GCC
34322 builtin and then its argument prototype would still apply. */
34323 #ifdef __cplusplus
34324 extern "C"
34325 #endif
34326 char geom_gettree ();
34327 int
34328 main (void)
34329 {
34330 return geom_gettree ();
34331 ;
34332 return 0;
34333 }
34334 _ACEOF
34335 if ac_fn_c_try_link "$LINENO"; then :
34336 ac_cv_lib_geom_geom_gettree=yes
34337 else
34338 ac_cv_lib_geom_geom_gettree=no
34339 fi
34340 rm -f core conftest.err conftest.$ac_objext \
34341 conftest$ac_exeext conftest.$ac_ext
34342 LIBS=$ac_check_lib_save_LIBS
34343 fi
34344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_geom_geom_gettree" >&5
34345 $as_echo "$ac_cv_lib_geom_geom_gettree" >&6; }
34346 if test "x$ac_cv_lib_geom_geom_gettree" = xyes; then :
34347 cat >>confdefs.h <<_ACEOF
34348 #define HAVE_LIBGEOM 1
34349 _ACEOF
34350
34351 LIBS="-lgeom $LIBS"
34352
34353 else
34354 as_fn_error $? "Your platform requires libgeom" "$LINENO" 5
34355 fi
34356
34357 LIBGEOM="-lgeom"
34358 fi
34359
34360
34361
34362 # Check whether --enable-liblzma was given.
34363 if test "${enable_liblzma+set}" = set; then :
34364 enableval=$enable_liblzma;
34365 fi
34366
34367 if test x"$enable_liblzma" = xno ; then
34368 liblzma_excuse="explicitly disabled"
34369 fi
34370
34371 if test x"$liblzma_excuse" = x ; then
34372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lzma_code in -llzma" >&5
34373 $as_echo_n "checking for lzma_code in -llzma... " >&6; }
34374 if ${ac_cv_lib_lzma_lzma_code+:} false; then :
34375 $as_echo_n "(cached) " >&6
34376 else
34377 ac_check_lib_save_LIBS=$LIBS
34378 LIBS="-llzma $LIBS"
34379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34380 /* end confdefs.h. */
34381
34382 /* Override any GCC internal prototype to avoid an error.
34383 Use char because int might match the return type of a GCC
34384 builtin and then its argument prototype would still apply. */
34385 #ifdef __cplusplus
34386 extern "C"
34387 #endif
34388 char lzma_code ();
34389 int
34390 main (void)
34391 {
34392 return lzma_code ();
34393 ;
34394 return 0;
34395 }
34396 _ACEOF
34397 if ac_fn_c_try_link "$LINENO"; then :
34398 ac_cv_lib_lzma_lzma_code=yes
34399 else
34400 ac_cv_lib_lzma_lzma_code=no
34401 fi
34402 rm -f core conftest.err conftest.$ac_objext \
34403 conftest$ac_exeext conftest.$ac_ext
34404 LIBS=$ac_check_lib_save_LIBS
34405 fi
34406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lzma_lzma_code" >&5
34407 $as_echo "$ac_cv_lib_lzma_lzma_code" >&6; }
34408 if test "x$ac_cv_lib_lzma_lzma_code" = xyes; then :
34409 cat >>confdefs.h <<_ACEOF
34410 #define HAVE_LIBLZMA 1
34411 _ACEOF
34412
34413 LIBS="-llzma $LIBS"
34414
34415 else
34416 liblzma_excuse="need lzma library"
34417 fi
34418
34419 fi
34420 if test x"$liblzma_excuse" = x ; then
34421 ac_fn_c_check_header_mongrel "$LINENO" "lzma.h" "ac_cv_header_lzma_h" "$ac_includes_default"
34422 if test "x$ac_cv_header_lzma_h" = xyes; then :
34423
34424 else
34425 liblzma_excuse="need lzma header"
34426 fi
34427
34428
34429 fi
34430
34431 if test x"$enable_liblzma" = xyes && test x"$liblzma_excuse" != x ; then
34432 as_fn_error $? "liblzma support was explicitly requested but requirements are not satisfied ($liblzma_excuse)" "$LINENO" 5
34433 fi
34434
34435
34436 if test x"$liblzma_excuse" = x ; then
34437 LIBLZMA="-llzma"
34438
34439 $as_echo "#define USE_LIBLZMA 1" >>confdefs.h
34440
34441 fi
34442
34443
34444
34445 # Check whether --enable-libzfs was given.
34446 if test "${enable_libzfs+set}" = set; then :
34447 enableval=$enable_libzfs;
34448 fi
34449
34450 if test x"$enable_libzfs" = xno ; then
34451 libzfs_excuse="explicitly disabled"
34452 fi
34453
34454 if test x"$libzfs_excuse" = x ; then
34455 # Only check for system headers if libzfs support has not been disabled.
34456 for ac_header in libzfs.h libnvpair.h
34457 do :
34458 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
34459 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
34460 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
34461 cat >>confdefs.h <<_ACEOF
34462 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
34463 _ACEOF
34464
34465 fi
34466
34467 done
34468
34469 fi
34470
34471 if test x"$libzfs_excuse" = x ; then
34472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libzfs_init in -lzfs" >&5
34473 $as_echo_n "checking for libzfs_init in -lzfs... " >&6; }
34474 if ${ac_cv_lib_zfs_libzfs_init+:} false; then :
34475 $as_echo_n "(cached) " >&6
34476 else
34477 ac_check_lib_save_LIBS=$LIBS
34478 LIBS="-lzfs $LIBS"
34479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34480 /* end confdefs.h. */
34481
34482 /* Override any GCC internal prototype to avoid an error.
34483 Use char because int might match the return type of a GCC
34484 builtin and then its argument prototype would still apply. */
34485 #ifdef __cplusplus
34486 extern "C"
34487 #endif
34488 char libzfs_init ();
34489 int
34490 main (void)
34491 {
34492 return libzfs_init ();
34493 ;
34494 return 0;
34495 }
34496 _ACEOF
34497 if ac_fn_c_try_link "$LINENO"; then :
34498 ac_cv_lib_zfs_libzfs_init=yes
34499 else
34500 ac_cv_lib_zfs_libzfs_init=no
34501 fi
34502 rm -f core conftest.err conftest.$ac_objext \
34503 conftest$ac_exeext conftest.$ac_ext
34504 LIBS=$ac_check_lib_save_LIBS
34505 fi
34506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_zfs_libzfs_init" >&5
34507 $as_echo "$ac_cv_lib_zfs_libzfs_init" >&6; }
34508 if test "x$ac_cv_lib_zfs_libzfs_init" = xyes; then :
34509 cat >>confdefs.h <<_ACEOF
34510 #define HAVE_LIBZFS 1
34511 _ACEOF
34512
34513 LIBS="-lzfs $LIBS"
34514
34515 else
34516 libzfs_excuse="need zfs library"
34517 fi
34518
34519 fi
34520
34521 if test x"$libzfs_excuse" = x ; then
34522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nvlist_lookup_string in -lnvpair" >&5
34523 $as_echo_n "checking for nvlist_lookup_string in -lnvpair... " >&6; }
34524 if ${ac_cv_lib_nvpair_nvlist_lookup_string+:} false; then :
34525 $as_echo_n "(cached) " >&6
34526 else
34527 ac_check_lib_save_LIBS=$LIBS
34528 LIBS="-lnvpair $LIBS"
34529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34530 /* end confdefs.h. */
34531
34532 /* Override any GCC internal prototype to avoid an error.
34533 Use char because int might match the return type of a GCC
34534 builtin and then its argument prototype would still apply. */
34535 #ifdef __cplusplus
34536 extern "C"
34537 #endif
34538 char nvlist_lookup_string ();
34539 int
34540 main (void)
34541 {
34542 return nvlist_lookup_string ();
34543 ;
34544 return 0;
34545 }
34546 _ACEOF
34547 if ac_fn_c_try_link "$LINENO"; then :
34548 ac_cv_lib_nvpair_nvlist_lookup_string=yes
34549 else
34550 ac_cv_lib_nvpair_nvlist_lookup_string=no
34551 fi
34552 rm -f core conftest.err conftest.$ac_objext \
34553 conftest$ac_exeext conftest.$ac_ext
34554 LIBS=$ac_check_lib_save_LIBS
34555 fi
34556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nvpair_nvlist_lookup_string" >&5
34557 $as_echo "$ac_cv_lib_nvpair_nvlist_lookup_string" >&6; }
34558 if test "x$ac_cv_lib_nvpair_nvlist_lookup_string" = xyes; then :
34559 cat >>confdefs.h <<_ACEOF
34560 #define HAVE_LIBNVPAIR 1
34561 _ACEOF
34562
34563 LIBS="-lnvpair $LIBS"
34564
34565 else
34566 libzfs_excuse="need nvpair library"
34567 fi
34568
34569 fi
34570
34571 if test x"$enable_libzfs" = xyes && test x"$libzfs_excuse" != x ; then
34572 as_fn_error $? "libzfs support was explicitly requested but requirements are not satisfied ($libzfs_excuse)" "$LINENO" 5
34573 fi
34574
34575 if test x"$libzfs_excuse" = x ; then
34576 # We need both libzfs and libnvpair for a successful build.
34577 LIBZFS="-lzfs"
34578
34579 $as_echo "#define HAVE_LIBZFS 1" >>confdefs.h
34580
34581 LIBNVPAIR="-lnvpair"
34582
34583 $as_echo "#define HAVE_LIBNVPAIR 1" >>confdefs.h
34584
34585 fi
34586
34587
34588
34589
34590 LIBS=""
34591
34592
34593 if test x$target_cpu = xi386 -a x$platform = xqemu; then :
34594 GRUB_BOOT_MACHINE_LINK_ADDR=0xffe00
34595
34596 fi
34597
34598
34599
34600
34601
34602
34603
34604 # Check whether --enable-werror was given.
34605 if test "${enable_werror+set}" = set; then :
34606 enableval=$enable_werror;
34607 fi
34608
34609 if test x"$enable_werror" != xno ; then
34610 TARGET_CFLAGS="$TARGET_CFLAGS -Werror"
34611 HOST_CFLAGS="$HOST_CFLAGS -Werror"
34612 fi
34613
34614 TARGET_CPP="$TARGET_CC -E"
34615 TARGET_CCAS=$TARGET_CC
34616
34617 # Includes which include make-time substitutions. They must come last
34618 # as to avoid executing top_builddir in shell.
34619 HOST_CPPFLAGS="$HOST_CPPFLAGS -I\$(top_builddir)/include"
34620 TARGET_CPPFLAGS="$TARGET_CPPFLAGS -I\$(top_srcdir)/include"
34621 TARGET_CPPFLAGS="$TARGET_CPPFLAGS -I\$(top_builddir)/include"
34622
34623 GRUB_TARGET_CPU="${target_cpu}"
34624 GRUB_PLATFORM="${platform}"
34625
34626
34627
34628
34629
34630
34631
34632
34633
34634
34635
34636
34637
34638
34639
34640
34641
34642
34643
34644
34645
34646
34647
34648
34649
34650
34651
34652
34653 #
34654 # Automake conditionals
34655 #
34656
34657 if test x$platform != xnone; then
34658 COND_real_platform_TRUE=
34659 COND_real_platform_FALSE='#'
34660 else
34661 COND_real_platform_TRUE='#'
34662 COND_real_platform_FALSE=
34663 fi
34664
34665 if test x$platform = xemu; then
34666 COND_emu_TRUE=
34667 COND_emu_FALSE='#'
34668 else
34669 COND_emu_TRUE='#'
34670 COND_emu_FALSE=
34671 fi
34672
34673 if test x$target_cpu = xi386 -a x$platform = xpc; then
34674 COND_i386_pc_TRUE=
34675 COND_i386_pc_FALSE='#'
34676 else
34677 COND_i386_pc_TRUE='#'
34678 COND_i386_pc_FALSE=
34679 fi
34680
34681 if test x$target_cpu = xi386 -a x$platform = xefi; then
34682 COND_i386_efi_TRUE=
34683 COND_i386_efi_FALSE='#'
34684 else
34685 COND_i386_efi_TRUE='#'
34686 COND_i386_efi_FALSE=
34687 fi
34688
34689 if test x$target_cpu = xia64 -a x$platform = xefi; then
34690 COND_ia64_efi_TRUE=
34691 COND_ia64_efi_FALSE='#'
34692 else
34693 COND_ia64_efi_TRUE='#'
34694 COND_ia64_efi_FALSE=
34695 fi
34696
34697 if test x$target_cpu = xi386 -a x$platform = xqemu; then
34698 COND_i386_qemu_TRUE=
34699 COND_i386_qemu_FALSE='#'
34700 else
34701 COND_i386_qemu_TRUE='#'
34702 COND_i386_qemu_FALSE=
34703 fi
34704
34705 if test x$target_cpu = xi386 -a x$platform = xieee1275; then
34706 COND_i386_ieee1275_TRUE=
34707 COND_i386_ieee1275_FALSE='#'
34708 else
34709 COND_i386_ieee1275_TRUE='#'
34710 COND_i386_ieee1275_FALSE=
34711 fi
34712
34713 if test x$target_cpu = xi386 -a x$platform = xcoreboot; then
34714 COND_i386_coreboot_TRUE=
34715 COND_i386_coreboot_FALSE='#'
34716 else
34717 COND_i386_coreboot_TRUE='#'
34718 COND_i386_coreboot_FALSE=
34719 fi
34720
34721 if test x$target_cpu = xi386 -a x$platform = xmultiboot; then
34722 COND_i386_multiboot_TRUE=
34723 COND_i386_multiboot_FALSE='#'
34724 else
34725 COND_i386_multiboot_TRUE='#'
34726 COND_i386_multiboot_FALSE=
34727 fi
34728
34729 if test x$target_cpu = xx86_64 -a x$platform = xefi; then
34730 COND_x86_64_efi_TRUE=
34731 COND_x86_64_efi_FALSE='#'
34732 else
34733 COND_x86_64_efi_TRUE='#'
34734 COND_x86_64_efi_FALSE=
34735 fi
34736
34737 if test x$target_cpu = xi386 -a x$platform = xxen; then
34738 COND_i386_xen_TRUE=
34739 COND_i386_xen_FALSE='#'
34740 else
34741 COND_i386_xen_TRUE='#'
34742 COND_i386_xen_FALSE=
34743 fi
34744
34745 if test x$target_cpu = xi386 -a x$platform = xxen_pvh; then
34746 COND_i386_xen_pvh_TRUE=
34747 COND_i386_xen_pvh_FALSE='#'
34748 else
34749 COND_i386_xen_pvh_TRUE='#'
34750 COND_i386_xen_pvh_FALSE=
34751 fi
34752
34753 if test x$target_cpu = xx86_64 -a x$platform = xxen; then
34754 COND_x86_64_xen_TRUE=
34755 COND_x86_64_xen_FALSE='#'
34756 else
34757 COND_x86_64_xen_TRUE='#'
34758 COND_x86_64_xen_FALSE=
34759 fi
34760
34761 if test x$target_cpu = xmipsel -a x$platform = xloongson; then
34762 COND_mips_loongson_TRUE=
34763 COND_mips_loongson_FALSE='#'
34764 else
34765 COND_mips_loongson_TRUE='#'
34766 COND_mips_loongson_FALSE=
34767 fi
34768
34769 if test "(" x$target_cpu = xmips -o x$target_cpu = xmipsel ")" -a x$platform = xqemu_mips; then
34770 COND_mips_qemu_mips_TRUE=
34771 COND_mips_qemu_mips_FALSE='#'
34772 else
34773 COND_mips_qemu_mips_TRUE='#'
34774 COND_mips_qemu_mips_FALSE=
34775 fi
34776
34777 if test "(" x$target_cpu = xmips -o x$target_cpu = xmipsel ")" -a x$platform = xarc; then
34778 COND_mips_arc_TRUE=
34779 COND_mips_arc_FALSE='#'
34780 else
34781 COND_mips_arc_TRUE='#'
34782 COND_mips_arc_FALSE=
34783 fi
34784
34785 if test x$target_cpu = xsparc64 -a x$platform = xieee1275; then
34786 COND_sparc64_ieee1275_TRUE=
34787 COND_sparc64_ieee1275_FALSE='#'
34788 else
34789 COND_sparc64_ieee1275_TRUE='#'
34790 COND_sparc64_ieee1275_FALSE=
34791 fi
34792
34793 if test x$target_cpu = xsparc64 -a x$platform = xemu; then
34794 COND_sparc64_emu_TRUE=
34795 COND_sparc64_emu_FALSE='#'
34796 else
34797 COND_sparc64_emu_TRUE='#'
34798 COND_sparc64_emu_FALSE=
34799 fi
34800
34801 if test x$target_cpu = xpowerpc -a x$platform = xieee1275; then
34802 COND_powerpc_ieee1275_TRUE=
34803 COND_powerpc_ieee1275_FALSE='#'
34804 else
34805 COND_powerpc_ieee1275_TRUE='#'
34806 COND_powerpc_ieee1275_FALSE=
34807 fi
34808
34809 if test x$target_cpu = xmips -o x$target_cpu = xmipsel; then
34810 COND_mips_TRUE=
34811 COND_mips_FALSE='#'
34812 else
34813 COND_mips_TRUE='#'
34814 COND_mips_FALSE=
34815 fi
34816
34817 if test x$target_cpu = xmipsel; then
34818 COND_mipsel_TRUE=
34819 COND_mipsel_FALSE='#'
34820 else
34821 COND_mipsel_TRUE='#'
34822 COND_mipsel_FALSE=
34823 fi
34824
34825 if test x$target_cpu = xmips; then
34826 COND_mipseb_TRUE=
34827 COND_mipseb_FALSE='#'
34828 else
34829 COND_mipseb_TRUE='#'
34830 COND_mipseb_FALSE=
34831 fi
34832
34833 if test x$target_cpu = xarm ; then
34834 COND_arm_TRUE=
34835 COND_arm_FALSE='#'
34836 else
34837 COND_arm_TRUE='#'
34838 COND_arm_FALSE=
34839 fi
34840
34841 if test x$target_cpu = xarm -a x$platform = xuboot; then
34842 COND_arm_uboot_TRUE=
34843 COND_arm_uboot_FALSE='#'
34844 else
34845 COND_arm_uboot_TRUE='#'
34846 COND_arm_uboot_FALSE=
34847 fi
34848
34849 if test x$target_cpu = xarm -a x$platform = xcoreboot; then
34850 COND_arm_coreboot_TRUE=
34851 COND_arm_coreboot_FALSE='#'
34852 else
34853 COND_arm_coreboot_TRUE='#'
34854 COND_arm_coreboot_FALSE=
34855 fi
34856
34857 if test x$target_cpu = xarm -a x$platform = xefi; then
34858 COND_arm_efi_TRUE=
34859 COND_arm_efi_FALSE='#'
34860 else
34861 COND_arm_efi_TRUE='#'
34862 COND_arm_efi_FALSE=
34863 fi
34864
34865 if test x$target_cpu = xarm64 ; then
34866 COND_arm64_TRUE=
34867 COND_arm64_FALSE='#'
34868 else
34869 COND_arm64_TRUE='#'
34870 COND_arm64_FALSE=
34871 fi
34872
34873 if test x$target_cpu = xarm64 -a x$platform = xefi; then
34874 COND_arm64_efi_TRUE=
34875 COND_arm64_efi_FALSE='#'
34876 else
34877 COND_arm64_efi_TRUE='#'
34878 COND_arm64_efi_FALSE=
34879 fi
34880
34881 if test x$target_cpu = xriscv32 ; then
34882 COND_riscv32_TRUE=
34883 COND_riscv32_FALSE='#'
34884 else
34885 COND_riscv32_TRUE='#'
34886 COND_riscv32_FALSE=
34887 fi
34888
34889 if test x$target_cpu = xriscv64 ; then
34890 COND_riscv64_TRUE=
34891 COND_riscv64_FALSE='#'
34892 else
34893 COND_riscv64_TRUE='#'
34894 COND_riscv64_FALSE=
34895 fi
34896
34897 if test x$target_cpu = xriscv32 -a x$platform = xefi; then
34898 COND_riscv32_efi_TRUE=
34899 COND_riscv32_efi_FALSE='#'
34900 else
34901 COND_riscv32_efi_TRUE='#'
34902 COND_riscv32_efi_FALSE=
34903 fi
34904
34905 if test x$target_cpu = xriscv64 -a x$platform = xefi; then
34906 COND_riscv64_efi_TRUE=
34907 COND_riscv64_efi_FALSE='#'
34908 else
34909 COND_riscv64_efi_TRUE='#'
34910 COND_riscv64_efi_FALSE=
34911 fi
34912
34913
34914 if test x$host_kernel = xhurd; then
34915 COND_HOST_HURD_TRUE=
34916 COND_HOST_HURD_FALSE='#'
34917 else
34918 COND_HOST_HURD_TRUE='#'
34919 COND_HOST_HURD_FALSE=
34920 fi
34921
34922 if test x$host_kernel = xlinux; then
34923 COND_HOST_LINUX_TRUE=
34924 COND_HOST_LINUX_FALSE='#'
34925 else
34926 COND_HOST_LINUX_TRUE='#'
34927 COND_HOST_LINUX_FALSE=
34928 fi
34929
34930 if test x$host_kernel = xnetbsd; then
34931 COND_HOST_NETBSD_TRUE=
34932 COND_HOST_NETBSD_FALSE='#'
34933 else
34934 COND_HOST_NETBSD_TRUE='#'
34935 COND_HOST_NETBSD_FALSE=
34936 fi
34937
34938 if test x$host_kernel = xwindows; then
34939 COND_HOST_WINDOWS_TRUE=
34940 COND_HOST_WINDOWS_FALSE='#'
34941 else
34942 COND_HOST_WINDOWS_TRUE='#'
34943 COND_HOST_WINDOWS_FALSE=
34944 fi
34945
34946 if test x$host_kernel = xkfreebsd; then
34947 COND_HOST_KFREEBSD_TRUE=
34948 COND_HOST_KFREEBSD_FALSE='#'
34949 else
34950 COND_HOST_KFREEBSD_TRUE='#'
34951 COND_HOST_KFREEBSD_FALSE=
34952 fi
34953
34954 if test x$host_kernel = xxnu; then
34955 COND_HOST_XNU_TRUE=
34956 COND_HOST_XNU_FALSE='#'
34957 else
34958 COND_HOST_XNU_TRUE='#'
34959 COND_HOST_XNU_FALSE=
34960 fi
34961
34962 if test x$host_kernel = xillumos; then
34963 COND_HOST_ILLUMOS_TRUE=
34964 COND_HOST_ILLUMOS_FALSE='#'
34965 else
34966 COND_HOST_ILLUMOS_TRUE='#'
34967 COND_HOST_ILLUMOS_FALSE=
34968 fi
34969
34970
34971 if test x$cross_compiling = xno -a x$HELP2MAN != x; then
34972 COND_MAN_PAGES_TRUE=
34973 COND_MAN_PAGES_FALSE='#'
34974 else
34975 COND_MAN_PAGES_TRUE='#'
34976 COND_MAN_PAGES_FALSE=
34977 fi
34978
34979 if test x$enable_grub_emu_sdl = xyes; then
34980 COND_GRUB_EMU_SDL_TRUE=
34981 COND_GRUB_EMU_SDL_FALSE='#'
34982 else
34983 COND_GRUB_EMU_SDL_TRUE='#'
34984 COND_GRUB_EMU_SDL_FALSE=
34985 fi
34986
34987 if test x$enable_grub_emu_pci = xyes; then
34988 COND_GRUB_EMU_PCI_TRUE=
34989 COND_GRUB_EMU_PCI_FALSE='#'
34990 else
34991 COND_GRUB_EMU_PCI_TRUE='#'
34992 COND_GRUB_EMU_PCI_FALSE=
34993 fi
34994
34995 if test x$enable_grub_mkfont = xyes; then
34996 COND_GRUB_MKFONT_TRUE=
34997 COND_GRUB_MKFONT_FALSE='#'
34998 else
34999 COND_GRUB_MKFONT_TRUE='#'
35000 COND_GRUB_MKFONT_FALSE=
35001 fi
35002
35003 if test x$enable_grub_mount = xyes; then
35004 COND_GRUB_MOUNT_TRUE=
35005 COND_GRUB_MOUNT_FALSE='#'
35006 else
35007 COND_GRUB_MOUNT_TRUE='#'
35008 COND_GRUB_MOUNT_FALSE=
35009 fi
35010
35011 if test x$FONT_SOURCE != x; then
35012 COND_HAVE_FONT_SOURCE_TRUE=
35013 COND_HAVE_FONT_SOURCE_FALSE='#'
35014 else
35015 COND_HAVE_FONT_SOURCE_TRUE='#'
35016 COND_HAVE_FONT_SOURCE_FALSE=
35017 fi
35018
35019 if test x$FONT_SOURCE != x ; then
35020 HAVE_FONT_SOURCE=1
35021 else
35022 HAVE_FONT_SOURCE=0
35023 fi
35024
35025 if test x$TARGET_APPLE_LINKER = x1; then
35026 COND_APPLE_LINKER_TRUE=
35027 COND_APPLE_LINKER_FALSE='#'
35028 else
35029 COND_APPLE_LINKER_TRUE='#'
35030 COND_APPLE_LINKER_FALSE=
35031 fi
35032
35033 if test x$enable_efiemu = xyes; then
35034 COND_ENABLE_EFIEMU_TRUE=
35035 COND_ENABLE_EFIEMU_FALSE='#'
35036 else
35037 COND_ENABLE_EFIEMU_TRUE='#'
35038 COND_ENABLE_EFIEMU_FALSE=
35039 fi
35040
35041 if test x$DISK_CACHE_STATS = x1; then
35042 COND_ENABLE_CACHE_STATS_TRUE=
35043 COND_ENABLE_CACHE_STATS_FALSE='#'
35044 else
35045 COND_ENABLE_CACHE_STATS_TRUE='#'
35046 COND_ENABLE_CACHE_STATS_FALSE=
35047 fi
35048
35049 if test x$BOOT_TIME_STATS = x1; then
35050 COND_ENABLE_BOOT_TIME_STATS_TRUE=
35051 COND_ENABLE_BOOT_TIME_STATS_FALSE='#'
35052 else
35053 COND_ENABLE_BOOT_TIME_STATS_TRUE='#'
35054 COND_ENABLE_BOOT_TIME_STATS_FALSE=
35055 fi
35056
35057
35058 if test x$HAVE_CXX = xyes; then
35059 COND_HAVE_CXX_TRUE=
35060 COND_HAVE_CXX_FALSE='#'
35061 else
35062 COND_HAVE_CXX_TRUE='#'
35063 COND_HAVE_CXX_FALSE=
35064 fi
35065
35066
35067 if test x$HAVE_ASM_USCORE = x1; then
35068 COND_HAVE_ASM_USCORE_TRUE=
35069 COND_HAVE_ASM_USCORE_FALSE='#'
35070 else
35071 COND_HAVE_ASM_USCORE_TRUE='#'
35072 COND_HAVE_ASM_USCORE_FALSE=
35073 fi
35074
35075 if test "x$starfield_excuse" = x; then
35076 COND_STARFIELD_TRUE=
35077 COND_STARFIELD_FALSE='#'
35078 else
35079 COND_STARFIELD_TRUE='#'
35080 COND_STARFIELD_FALSE=
35081 fi
35082
35083 if test "x$have_exec" = xy; then
35084 COND_HAVE_EXEC_TRUE=
35085 COND_HAVE_EXEC_FALSE='#'
35086 else
35087 COND_HAVE_EXEC_TRUE='#'
35088 COND_HAVE_EXEC_FALSE=
35089 fi
35090
35091
35092 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
35093 test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
35094 datarootdir="$(eval echo "$datarootdir")"
35095 grub_libdir="$(eval echo "$libdir")"
35096 grub_localedir="$(eval echo "$localedir")"
35097 grub_datadir="$(eval echo "$datadir")"
35098 grub_sysconfdir="$(eval echo "$sysconfdir")"
35099
35100 cat >>confdefs.h <<_ACEOF
35101 #define LOCALEDIR "$grub_localedir"
35102 _ACEOF
35103
35104
35105 cat >>confdefs.h <<_ACEOF
35106 #define GRUB_LIBDIR "$grub_libdir"
35107 _ACEOF
35108
35109
35110 cat >>confdefs.h <<_ACEOF
35111 #define GRUB_DATADIR "$grub_datadir"
35112 _ACEOF
35113
35114
35115 cat >>confdefs.h <<_ACEOF
35116 #define GRUB_SYSCONFDIR "$grub_sysconfdir"
35117 _ACEOF
35118
35119
35120
35121 # Output files.
35122 if test "$platform" != none; then
35123 cpudir="${target_cpu}"
35124 if test x${cpudir} = xmipsel; then
35125 cpudir=mips;
35126 fi
35127
35128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s can handle directories properly" >&5
35129 $as_echo_n "checking whether ln -s can handle directories properly... " >&6; }
35130 mkdir testdir 2>/dev/null
35131 case $srcdir in
35132 [\\/$]* | ?:[\\/]* ) reldir=$srcdir/include/grub/util ;;
35133 *) reldir=../$srcdir/include/grub/util ;;
35134 esac
35135 if ln -s $reldir testdir/util 2>/dev/null && rm -f testdir/util 2>/dev/null ; then
35136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35137 $as_echo "yes" >&6; }
35138 link_dir=yes
35139 else
35140 link_dir=no
35141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35142 $as_echo "no" >&6; }
35143 fi
35144 rm -rf testdir
35145
35146 if test x"$link_dir" = xyes ; then
35147 ac_config_links="$ac_config_links include/grub/cpu:include/grub/$cpudir"
35148
35149 if test "$platform" != emu ; then
35150 ac_config_links="$ac_config_links include/grub/machine:include/grub/$cpudir/$platform"
35151
35152 fi
35153 else
35154 mkdir -p include/grub 2>/dev/null
35155 rm -rf include/grub/cpu
35156 cp -rp $srcdir/include/grub/$cpudir include/grub/cpu 2>/dev/null
35157 if test "$platform" != emu ; then
35158 rm -rf include/grub/machine
35159 cp -rp $srcdir/include/grub/$cpudir/$platform include/grub/machine 2>/dev/null
35160 fi
35161 fi
35162 else
35163 # Just enough to stop the compiler failing with -I$(srcdir)/include.
35164 mkdir -p include 2>/dev/null
35165 rm -rf include/grub/cpu include/grub/machine
35166 fi
35167
35168 ac_config_files="$ac_config_files Makefile"
35169
35170 ac_config_files="$ac_config_files grub-core/Makefile"
35171
35172 ac_config_files="$ac_config_files grub-core/lib/gnulib/Makefile"
35173
35174 ac_config_files="$ac_config_files po/Makefile.in"
35175
35176 ac_config_files="$ac_config_files docs/Makefile"
35177
35178 ac_config_files="$ac_config_files util/bash-completion.d/Makefile"
35179
35180 ac_config_files="$ac_config_files stamp-h"
35181
35182 ac_config_files="$ac_config_files config.h"
35183
35184
35185 cat >confcache <<\_ACEOF
35186 # This file is a shell script that caches the results of configure
35187 # tests run on this system so they can be shared between configure
35188 # scripts and configure runs, see configure's option --config-cache.
35189 # It is not useful on other systems. If it contains results you don't
35190 # want to keep, you may remove or edit it.
35191 #
35192 # config.status only pays attention to the cache file if you give it
35193 # the --recheck option to rerun configure.
35194 #
35195 # `ac_cv_env_foo' variables (set or unset) will be overridden when
35196 # loading this file, other *unset* `ac_cv_foo' will be assigned the
35197 # following values.
35198
35199 _ACEOF
35200
35201 # The following way of writing the cache mishandles newlines in values,
35202 # but we know of no workaround that is simple, portable, and efficient.
35203 # So, we kill variables containing newlines.
35204 # Ultrix sh set writes to stderr and can't be redirected directly,
35205 # and sets the high bit in the cache file unless we assign to the vars.
35206 (
35207 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
35208 eval ac_val=\$$ac_var
35209 case $ac_val in #(
35210 *${as_nl}*)
35211 case $ac_var in #(
35212 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
35213 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
35214 esac
35215 case $ac_var in #(
35216 _ | IFS | as_nl) ;; #(
35217 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
35218 *) { eval $ac_var=; unset $ac_var;} ;;
35219 esac ;;
35220 esac
35221 done
35222
35223 (set) 2>&1 |
35224 case $as_nl`(ac_space=' '; set) 2>&1` in #(
35225 *${as_nl}ac_space=\ *)
35226 # `set' does not quote correctly, so add quotes: double-quote
35227 # substitution turns \\\\ into \\, and sed turns \\ into \.
35228 sed -n \
35229 "s/'/'\\\\''/g;
35230 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
35231 ;; #(
35232 *)
35233 # `set' quotes correctly as required by POSIX, so do not add quotes.
35234 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
35235 ;;
35236 esac |
35237 sort
35238 ) |
35239 sed '
35240 /^ac_cv_env_/b end
35241 t clear
35242 :clear
35243 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
35244 t end
35245 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
35246 :end' >>confcache
35247 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
35248 if test -w "$cache_file"; then
35249 if test "x$cache_file" != "x/dev/null"; then
35250 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
35251 $as_echo "$as_me: updating cache $cache_file" >&6;}
35252 if test ! -f "$cache_file" || test -h "$cache_file"; then
35253 cat confcache >"$cache_file"
35254 else
35255 case $cache_file in #(
35256 */* | ?:*)
35257 mv -f confcache "$cache_file"$$ &&
35258 mv -f "$cache_file"$$ "$cache_file" ;; #(
35259 *)
35260 mv -f confcache "$cache_file" ;;
35261 esac
35262 fi
35263 fi
35264 else
35265 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
35266 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
35267 fi
35268 fi
35269 rm -f confcache
35270
35271 test "x$prefix" = xNONE && prefix=$ac_default_prefix
35272 # Let make expand exec_prefix.
35273 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
35274
35275 DEFS=-DHAVE_CONFIG_H
35276
35277 ac_libobjs=
35278 ac_ltlibobjs=
35279 U=
35280 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
35281 # 1. Remove the extension, and $U if already installed.
35282 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
35283 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
35284 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
35285 # will be set to the directory where LIBOBJS objects are built.
35286 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
35287 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
35288 done
35289 LIBOBJS=$ac_libobjs
35290
35291 LTLIBOBJS=$ac_ltlibobjs
35292
35293
35294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
35295 $as_echo_n "checking that generated files are newer than configure... " >&6; }
35296 if test -n "$am_sleep_pid"; then
35297 # Hide warnings about reused PIDs.
35298 wait $am_sleep_pid 2>/dev/null
35299 fi
35300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
35301 $as_echo "done" >&6; }
35302 if test -n "$EXEEXT"; then
35303 am__EXEEXT_TRUE=
35304 am__EXEEXT_FALSE='#'
35305 else
35306 am__EXEEXT_TRUE='#'
35307 am__EXEEXT_FALSE=
35308 fi
35309
35310 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
35311 as_fn_error $? "conditional \"AMDEP\" was never defined.
35312 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35313 fi
35314 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
35315 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
35316 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35317 fi
35318 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
35319 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
35320 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35321 fi
35322 if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
35323 as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
35324 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35325 fi
35326 if test -z "${am__fastdepCCAS_TRUE}" && test -z "${am__fastdepCCAS_FALSE}"; then
35327 as_fn_error $? "conditional \"am__fastdepCCAS\" was never defined.
35328 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35329 fi
35330
35331 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
35332 as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
35333 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35334 fi
35335 if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
35336 as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
35337 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35338 fi
35339 if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
35340 as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
35341 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35342 fi
35343 if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
35344 as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
35345 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35346 fi
35347 if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
35348 as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
35349 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35350 fi
35351 if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
35352 as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
35353 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35354 fi
35355 if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
35356 as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
35357 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35358 fi
35359 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
35360 as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
35361 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35362 fi
35363 if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
35364 as_fn_error $? "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
35365 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35366 fi
35367 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
35368 as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
35369 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35370 fi
35371 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
35372 as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
35373 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35374 fi
35375 if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
35376 as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
35377 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35378 fi
35379 if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
35380 as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
35381 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35382 fi
35383 if test -z "${GL_GENERATE_SYSEXITS_H_TRUE}" && test -z "${GL_GENERATE_SYSEXITS_H_FALSE}"; then
35384 as_fn_error $? "conditional \"GL_GENERATE_SYSEXITS_H\" was never defined.
35385 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35386 fi
35387 if test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE}"; then
35388 as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH\" was never defined.
35389 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35390 fi
35391
35392
35393 gl_libobjs=
35394 gl_ltlibobjs=
35395 if test -n "$gl_LIBOBJS"; then
35396 # Remove the extension.
35397 sed_drop_objext='s/\.o$//;s/\.obj$//'
35398 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
35399 gl_libobjs="$gl_libobjs $i.$ac_objext"
35400 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
35401 done
35402 fi
35403 gl_LIBOBJS=$gl_libobjs
35404
35405 gl_LTLIBOBJS=$gl_ltlibobjs
35406
35407
35408
35409 gltests_libobjs=
35410 gltests_ltlibobjs=
35411 if test -n "$gltests_LIBOBJS"; then
35412 # Remove the extension.
35413 sed_drop_objext='s/\.o$//;s/\.obj$//'
35414 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
35415 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
35416 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
35417 done
35418 fi
35419 gltests_LIBOBJS=$gltests_libobjs
35420
35421 gltests_LTLIBOBJS=$gltests_ltlibobjs
35422
35423
35424 if test -z "${COND_real_platform_TRUE}" && test -z "${COND_real_platform_FALSE}"; then
35425 as_fn_error $? "conditional \"COND_real_platform\" was never defined.
35426 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35427 fi
35428 if test -z "${COND_emu_TRUE}" && test -z "${COND_emu_FALSE}"; then
35429 as_fn_error $? "conditional \"COND_emu\" was never defined.
35430 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35431 fi
35432 if test -z "${COND_i386_pc_TRUE}" && test -z "${COND_i386_pc_FALSE}"; then
35433 as_fn_error $? "conditional \"COND_i386_pc\" was never defined.
35434 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35435 fi
35436 if test -z "${COND_i386_efi_TRUE}" && test -z "${COND_i386_efi_FALSE}"; then
35437 as_fn_error $? "conditional \"COND_i386_efi\" was never defined.
35438 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35439 fi
35440 if test -z "${COND_ia64_efi_TRUE}" && test -z "${COND_ia64_efi_FALSE}"; then
35441 as_fn_error $? "conditional \"COND_ia64_efi\" was never defined.
35442 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35443 fi
35444 if test -z "${COND_i386_qemu_TRUE}" && test -z "${COND_i386_qemu_FALSE}"; then
35445 as_fn_error $? "conditional \"COND_i386_qemu\" was never defined.
35446 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35447 fi
35448 if test -z "${COND_i386_ieee1275_TRUE}" && test -z "${COND_i386_ieee1275_FALSE}"; then
35449 as_fn_error $? "conditional \"COND_i386_ieee1275\" was never defined.
35450 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35451 fi
35452 if test -z "${COND_i386_coreboot_TRUE}" && test -z "${COND_i386_coreboot_FALSE}"; then
35453 as_fn_error $? "conditional \"COND_i386_coreboot\" was never defined.
35454 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35455 fi
35456 if test -z "${COND_i386_multiboot_TRUE}" && test -z "${COND_i386_multiboot_FALSE}"; then
35457 as_fn_error $? "conditional \"COND_i386_multiboot\" was never defined.
35458 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35459 fi
35460 if test -z "${COND_x86_64_efi_TRUE}" && test -z "${COND_x86_64_efi_FALSE}"; then
35461 as_fn_error $? "conditional \"COND_x86_64_efi\" was never defined.
35462 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35463 fi
35464 if test -z "${COND_i386_xen_TRUE}" && test -z "${COND_i386_xen_FALSE}"; then
35465 as_fn_error $? "conditional \"COND_i386_xen\" was never defined.
35466 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35467 fi
35468 if test -z "${COND_i386_xen_pvh_TRUE}" && test -z "${COND_i386_xen_pvh_FALSE}"; then
35469 as_fn_error $? "conditional \"COND_i386_xen_pvh\" was never defined.
35470 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35471 fi
35472 if test -z "${COND_x86_64_xen_TRUE}" && test -z "${COND_x86_64_xen_FALSE}"; then
35473 as_fn_error $? "conditional \"COND_x86_64_xen\" was never defined.
35474 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35475 fi
35476 if test -z "${COND_mips_loongson_TRUE}" && test -z "${COND_mips_loongson_FALSE}"; then
35477 as_fn_error $? "conditional \"COND_mips_loongson\" was never defined.
35478 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35479 fi
35480 if test -z "${COND_mips_qemu_mips_TRUE}" && test -z "${COND_mips_qemu_mips_FALSE}"; then
35481 as_fn_error $? "conditional \"COND_mips_qemu_mips\" was never defined.
35482 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35483 fi
35484 if test -z "${COND_mips_arc_TRUE}" && test -z "${COND_mips_arc_FALSE}"; then
35485 as_fn_error $? "conditional \"COND_mips_arc\" was never defined.
35486 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35487 fi
35488 if test -z "${COND_sparc64_ieee1275_TRUE}" && test -z "${COND_sparc64_ieee1275_FALSE}"; then
35489 as_fn_error $? "conditional \"COND_sparc64_ieee1275\" was never defined.
35490 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35491 fi
35492 if test -z "${COND_sparc64_emu_TRUE}" && test -z "${COND_sparc64_emu_FALSE}"; then
35493 as_fn_error $? "conditional \"COND_sparc64_emu\" was never defined.
35494 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35495 fi
35496 if test -z "${COND_powerpc_ieee1275_TRUE}" && test -z "${COND_powerpc_ieee1275_FALSE}"; then
35497 as_fn_error $? "conditional \"COND_powerpc_ieee1275\" was never defined.
35498 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35499 fi
35500 if test -z "${COND_mips_TRUE}" && test -z "${COND_mips_FALSE}"; then
35501 as_fn_error $? "conditional \"COND_mips\" was never defined.
35502 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35503 fi
35504 if test -z "${COND_mipsel_TRUE}" && test -z "${COND_mipsel_FALSE}"; then
35505 as_fn_error $? "conditional \"COND_mipsel\" was never defined.
35506 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35507 fi
35508 if test -z "${COND_mipseb_TRUE}" && test -z "${COND_mipseb_FALSE}"; then
35509 as_fn_error $? "conditional \"COND_mipseb\" was never defined.
35510 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35511 fi
35512 if test -z "${COND_arm_TRUE}" && test -z "${COND_arm_FALSE}"; then
35513 as_fn_error $? "conditional \"COND_arm\" was never defined.
35514 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35515 fi
35516 if test -z "${COND_arm_uboot_TRUE}" && test -z "${COND_arm_uboot_FALSE}"; then
35517 as_fn_error $? "conditional \"COND_arm_uboot\" was never defined.
35518 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35519 fi
35520 if test -z "${COND_arm_coreboot_TRUE}" && test -z "${COND_arm_coreboot_FALSE}"; then
35521 as_fn_error $? "conditional \"COND_arm_coreboot\" was never defined.
35522 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35523 fi
35524 if test -z "${COND_arm_efi_TRUE}" && test -z "${COND_arm_efi_FALSE}"; then
35525 as_fn_error $? "conditional \"COND_arm_efi\" was never defined.
35526 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35527 fi
35528 if test -z "${COND_arm64_TRUE}" && test -z "${COND_arm64_FALSE}"; then
35529 as_fn_error $? "conditional \"COND_arm64\" was never defined.
35530 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35531 fi
35532 if test -z "${COND_arm64_efi_TRUE}" && test -z "${COND_arm64_efi_FALSE}"; then
35533 as_fn_error $? "conditional \"COND_arm64_efi\" was never defined.
35534 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35535 fi
35536 if test -z "${COND_riscv32_TRUE}" && test -z "${COND_riscv32_FALSE}"; then
35537 as_fn_error $? "conditional \"COND_riscv32\" was never defined.
35538 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35539 fi
35540 if test -z "${COND_riscv64_TRUE}" && test -z "${COND_riscv64_FALSE}"; then
35541 as_fn_error $? "conditional \"COND_riscv64\" was never defined.
35542 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35543 fi
35544 if test -z "${COND_riscv32_efi_TRUE}" && test -z "${COND_riscv32_efi_FALSE}"; then
35545 as_fn_error $? "conditional \"COND_riscv32_efi\" was never defined.
35546 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35547 fi
35548 if test -z "${COND_riscv64_efi_TRUE}" && test -z "${COND_riscv64_efi_FALSE}"; then
35549 as_fn_error $? "conditional \"COND_riscv64_efi\" was never defined.
35550 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35551 fi
35552 if test -z "${COND_HOST_HURD_TRUE}" && test -z "${COND_HOST_HURD_FALSE}"; then
35553 as_fn_error $? "conditional \"COND_HOST_HURD\" was never defined.
35554 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35555 fi
35556 if test -z "${COND_HOST_LINUX_TRUE}" && test -z "${COND_HOST_LINUX_FALSE}"; then
35557 as_fn_error $? "conditional \"COND_HOST_LINUX\" was never defined.
35558 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35559 fi
35560 if test -z "${COND_HOST_NETBSD_TRUE}" && test -z "${COND_HOST_NETBSD_FALSE}"; then
35561 as_fn_error $? "conditional \"COND_HOST_NETBSD\" was never defined.
35562 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35563 fi
35564 if test -z "${COND_HOST_WINDOWS_TRUE}" && test -z "${COND_HOST_WINDOWS_FALSE}"; then
35565 as_fn_error $? "conditional \"COND_HOST_WINDOWS\" was never defined.
35566 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35567 fi
35568 if test -z "${COND_HOST_KFREEBSD_TRUE}" && test -z "${COND_HOST_KFREEBSD_FALSE}"; then
35569 as_fn_error $? "conditional \"COND_HOST_KFREEBSD\" was never defined.
35570 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35571 fi
35572 if test -z "${COND_HOST_XNU_TRUE}" && test -z "${COND_HOST_XNU_FALSE}"; then
35573 as_fn_error $? "conditional \"COND_HOST_XNU\" was never defined.
35574 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35575 fi
35576 if test -z "${COND_HOST_ILLUMOS_TRUE}" && test -z "${COND_HOST_ILLUMOS_FALSE}"; then
35577 as_fn_error $? "conditional \"COND_HOST_ILLUMOS\" was never defined.
35578 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35579 fi
35580 if test -z "${COND_MAN_PAGES_TRUE}" && test -z "${COND_MAN_PAGES_FALSE}"; then
35581 as_fn_error $? "conditional \"COND_MAN_PAGES\" was never defined.
35582 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35583 fi
35584 if test -z "${COND_GRUB_EMU_SDL_TRUE}" && test -z "${COND_GRUB_EMU_SDL_FALSE}"; then
35585 as_fn_error $? "conditional \"COND_GRUB_EMU_SDL\" was never defined.
35586 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35587 fi
35588 if test -z "${COND_GRUB_EMU_PCI_TRUE}" && test -z "${COND_GRUB_EMU_PCI_FALSE}"; then
35589 as_fn_error $? "conditional \"COND_GRUB_EMU_PCI\" was never defined.
35590 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35591 fi
35592 if test -z "${COND_GRUB_MKFONT_TRUE}" && test -z "${COND_GRUB_MKFONT_FALSE}"; then
35593 as_fn_error $? "conditional \"COND_GRUB_MKFONT\" was never defined.
35594 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35595 fi
35596 if test -z "${COND_GRUB_MOUNT_TRUE}" && test -z "${COND_GRUB_MOUNT_FALSE}"; then
35597 as_fn_error $? "conditional \"COND_GRUB_MOUNT\" was never defined.
35598 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35599 fi
35600 if test -z "${COND_HAVE_FONT_SOURCE_TRUE}" && test -z "${COND_HAVE_FONT_SOURCE_FALSE}"; then
35601 as_fn_error $? "conditional \"COND_HAVE_FONT_SOURCE\" was never defined.
35602 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35603 fi
35604 if test -z "${COND_APPLE_LINKER_TRUE}" && test -z "${COND_APPLE_LINKER_FALSE}"; then
35605 as_fn_error $? "conditional \"COND_APPLE_LINKER\" was never defined.
35606 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35607 fi
35608 if test -z "${COND_ENABLE_EFIEMU_TRUE}" && test -z "${COND_ENABLE_EFIEMU_FALSE}"; then
35609 as_fn_error $? "conditional \"COND_ENABLE_EFIEMU\" was never defined.
35610 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35611 fi
35612 if test -z "${COND_ENABLE_CACHE_STATS_TRUE}" && test -z "${COND_ENABLE_CACHE_STATS_FALSE}"; then
35613 as_fn_error $? "conditional \"COND_ENABLE_CACHE_STATS\" was never defined.
35614 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35615 fi
35616 if test -z "${COND_ENABLE_BOOT_TIME_STATS_TRUE}" && test -z "${COND_ENABLE_BOOT_TIME_STATS_FALSE}"; then
35617 as_fn_error $? "conditional \"COND_ENABLE_BOOT_TIME_STATS\" was never defined.
35618 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35619 fi
35620 if test -z "${COND_HAVE_CXX_TRUE}" && test -z "${COND_HAVE_CXX_FALSE}"; then
35621 as_fn_error $? "conditional \"COND_HAVE_CXX\" was never defined.
35622 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35623 fi
35624 if test -z "${COND_HAVE_ASM_USCORE_TRUE}" && test -z "${COND_HAVE_ASM_USCORE_FALSE}"; then
35625 as_fn_error $? "conditional \"COND_HAVE_ASM_USCORE\" was never defined.
35626 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35627 fi
35628 if test -z "${COND_STARFIELD_TRUE}" && test -z "${COND_STARFIELD_FALSE}"; then
35629 as_fn_error $? "conditional \"COND_STARFIELD\" was never defined.
35630 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35631 fi
35632 if test -z "${COND_HAVE_EXEC_TRUE}" && test -z "${COND_HAVE_EXEC_FALSE}"; then
35633 as_fn_error $? "conditional \"COND_HAVE_EXEC\" was never defined.
35634 Usually this means the macro was only invoked conditionally." "$LINENO" 5
35635 fi
35636
35637 : "${CONFIG_STATUS=./config.status}"
35638 ac_write_fail=0
35639 ac_clean_files_save=$ac_clean_files
35640 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
35641 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
35642 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
35643 as_write_fail=0
35644 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
35645 #! $SHELL
35646 # Generated by $as_me.
35647 # Run this file to recreate the current configuration.
35648 # Compiler output produced by configure, useful for debugging
35649 # configure, is in config.log if it exists.
35650
35651 debug=false
35652 ac_cs_recheck=false
35653 ac_cs_silent=false
35654
35655 SHELL=\${CONFIG_SHELL-$SHELL}
35656 export SHELL
35657 _ASEOF
35658 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
35659 ## -------------------- ##
35660 ## M4sh Initialization. ##
35661 ## -------------------- ##
35662
35663 # Be more Bourne compatible
35664 DUALCASE=1; export DUALCASE # for MKS sh
35665 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
35666 emulate sh
35667 NULLCMD=:
35668 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
35669 # is contrary to our usage. Disable this feature.
35670 alias -g '${1+"$@"}'='"$@"'
35671 setopt NO_GLOB_SUBST
35672 else
35673 case `(set -o) 2>/dev/null` in #(
35674 *posix*) :
35675 set -o posix ;; #(
35676 *) :
35677 ;;
35678 esac
35679 fi
35680
35681
35682 as_nl='
35683 '
35684 export as_nl
35685 # Printing a long string crashes Solaris 7 /usr/bin/printf.
35686 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
35687 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
35688 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
35689 # Prefer a ksh shell builtin over an external printf program on Solaris,
35690 # but without wasting forks for bash or zsh.
35691 if test -z "$BASH_VERSION$ZSH_VERSION" \
35692 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
35693 as_echo='print -r --'
35694 as_echo_n='print -rn --'
35695 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
35696 as_echo='printf %s\n'
35697 as_echo_n='printf %s'
35698 else
35699 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
35700 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
35701 as_echo_n='/usr/ucb/echo -n'
35702 else
35703 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
35704 as_echo_n_body='eval
35705 arg=$1;
35706 case $arg in #(
35707 *"$as_nl"*)
35708 expr "X$arg" : "X\\(.*\\)$as_nl";
35709 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
35710 esac;
35711 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
35712 '
35713 export as_echo_n_body
35714 as_echo_n='sh -c $as_echo_n_body as_echo'
35715 fi
35716 export as_echo_body
35717 as_echo='sh -c $as_echo_body as_echo'
35718 fi
35719
35720 # The user is always right.
35721 if test "${PATH_SEPARATOR+set}" != set; then
35722 PATH_SEPARATOR=:
35723 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
35724 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
35725 PATH_SEPARATOR=';'
35726 }
35727 fi
35728
35729
35730 # IFS
35731 # We need space, tab and new line, in precisely that order. Quoting is
35732 # there to prevent editors from complaining about space-tab.
35733 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
35734 # splitting by setting IFS to empty value.)
35735 IFS=" "" $as_nl"
35736
35737 # Find who we are. Look in the path if we contain no directory separator.
35738 as_myself=
35739 case $0 in #((
35740 *[\\/]* ) as_myself=$0 ;;
35741 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35742 for as_dir in $PATH
35743 do
35744 IFS=$as_save_IFS
35745 test -z "$as_dir" && as_dir=.
35746 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
35747 done
35748 IFS=$as_save_IFS
35749
35750 ;;
35751 esac
35752 # We did not find ourselves, most probably we were run as `sh COMMAND'
35753 # in which case we are not to be found in the path.
35754 if test "x$as_myself" = x; then
35755 as_myself=$0
35756 fi
35757 if test ! -f "$as_myself"; then
35758 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
35759 exit 1
35760 fi
35761
35762 # Unset variables that we do not need and which cause bugs (e.g. in
35763 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
35764 # suppresses any "Segmentation fault" message there. '((' could
35765 # trigger a bug in pdksh 5.2.14.
35766 for as_var in BASH_ENV ENV MAIL MAILPATH
35767 do eval test x\${$as_var+set} = xset \
35768 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
35769 done
35770 PS1='$ '
35771 PS2='> '
35772 PS4='+ '
35773
35774 # NLS nuisances.
35775 LC_ALL=C
35776 export LC_ALL
35777 LANGUAGE=C
35778 export LANGUAGE
35779
35780 # CDPATH.
35781 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
35782
35783
35784 # as_fn_error STATUS ERROR [LINENO LOG_FD]
35785 # ----------------------------------------
35786 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
35787 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
35788 # script with STATUS, using 1 if that was 0.
35789 as_fn_error ()
35790 {
35791 as_status=$1; test $as_status -eq 0 && as_status=1
35792 if test "$4"; then
35793 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
35794 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
35795 fi
35796 $as_echo "$as_me: error: $2" >&2
35797 as_fn_exit $as_status
35798 } # as_fn_error
35799
35800
35801 # as_fn_set_status STATUS
35802 # -----------------------
35803 # Set $? to STATUS, without forking.
35804 as_fn_set_status ()
35805 {
35806 return $1
35807 } # as_fn_set_status
35808
35809 # as_fn_exit STATUS
35810 # -----------------
35811 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
35812 as_fn_exit ()
35813 {
35814 set +e
35815 as_fn_set_status $1
35816 exit $1
35817 } # as_fn_exit
35818
35819 # as_fn_unset VAR
35820 # ---------------
35821 # Portably unset VAR.
35822 as_fn_unset ()
35823 {
35824 { eval $1=; unset $1;}
35825 }
35826 as_unset=as_fn_unset
35827 # as_fn_append VAR VALUE
35828 # ----------------------
35829 # Append the text in VALUE to the end of the definition contained in VAR. Take
35830 # advantage of any shell optimizations that allow amortized linear growth over
35831 # repeated appends, instead of the typical quadratic growth present in naive
35832 # implementations.
35833 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
35834 eval 'as_fn_append ()
35835 {
35836 eval $1+=\$2
35837 }'
35838 else
35839 as_fn_append ()
35840 {
35841 eval $1=\$$1\$2
35842 }
35843 fi # as_fn_append
35844
35845 # as_fn_arith ARG...
35846 # ------------------
35847 # Perform arithmetic evaluation on the ARGs, and store the result in the
35848 # global $as_val. Take advantage of shells that can avoid forks. The arguments
35849 # must be portable across $(()) and expr.
35850 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
35851 eval 'as_fn_arith ()
35852 {
35853 as_val=$(( $* ))
35854 }'
35855 else
35856 as_fn_arith ()
35857 {
35858 as_val=`expr "$@" || test $? -eq 1`
35859 }
35860 fi # as_fn_arith
35861
35862
35863 if expr a : '\(a\)' >/dev/null 2>&1 &&
35864 test "X`expr 00001 : '.*\(...\)'`" = X001; then
35865 as_expr=expr
35866 else
35867 as_expr=false
35868 fi
35869
35870 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
35871 as_basename=basename
35872 else
35873 as_basename=false
35874 fi
35875
35876 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
35877 as_dirname=dirname
35878 else
35879 as_dirname=false
35880 fi
35881
35882 as_me=`$as_basename -- "$0" ||
35883 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
35884 X"$0" : 'X\(//\)$' \| \
35885 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
35886 $as_echo X/"$0" |
35887 sed '/^.*\/\([^/][^/]*\)\/*$/{
35888 s//\1/
35889 q
35890 }
35891 /^X\/\(\/\/\)$/{
35892 s//\1/
35893 q
35894 }
35895 /^X\/\(\/\).*/{
35896 s//\1/
35897 q
35898 }
35899 s/.*/./; q'`
35900
35901 # Avoid depending upon Character Ranges.
35902 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
35903 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
35904 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
35905 as_cr_digits='0123456789'
35906 as_cr_alnum=$as_cr_Letters$as_cr_digits
35907
35908 ECHO_C= ECHO_N= ECHO_T=
35909 case `echo -n x` in #(((((
35910 -n*)
35911 case `echo 'xy\c'` in
35912 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
35913 xy) ECHO_C='\c';;
35914 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
35915 ECHO_T=' ';;
35916 esac;;
35917 *)
35918 ECHO_N='-n';;
35919 esac
35920
35921 rm -f conf$$ conf$$.exe conf$$.file
35922 if test -d conf$$.dir; then
35923 rm -f conf$$.dir/conf$$.file
35924 else
35925 rm -f conf$$.dir
35926 mkdir conf$$.dir 2>/dev/null
35927 fi
35928 if (echo >conf$$.file) 2>/dev/null; then
35929 if ln -s conf$$.file conf$$ 2>/dev/null; then
35930 as_ln_s='ln -s'
35931 # ... but there are two gotchas:
35932 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
35933 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
35934 # In both cases, we have to default to `cp -pR'.
35935 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
35936 as_ln_s='cp -pR'
35937 elif ln conf$$.file conf$$ 2>/dev/null; then
35938 as_ln_s=ln
35939 else
35940 as_ln_s='cp -pR'
35941 fi
35942 else
35943 as_ln_s='cp -pR'
35944 fi
35945 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
35946 rmdir conf$$.dir 2>/dev/null
35947
35948
35949 # as_fn_mkdir_p
35950 # -------------
35951 # Create "$as_dir" as a directory, including parents if necessary.
35952 as_fn_mkdir_p ()
35953 {
35954
35955 case $as_dir in #(
35956 -*) as_dir=./$as_dir;;
35957 esac
35958 test -d "$as_dir" || eval $as_mkdir_p || {
35959 as_dirs=
35960 while :; do
35961 case $as_dir in #(
35962 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
35963 *) as_qdir=$as_dir;;
35964 esac
35965 as_dirs="'$as_qdir' $as_dirs"
35966 as_dir=`$as_dirname -- "$as_dir" ||
35967 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
35968 X"$as_dir" : 'X\(//\)[^/]' \| \
35969 X"$as_dir" : 'X\(//\)$' \| \
35970 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
35971 $as_echo X"$as_dir" |
35972 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
35973 s//\1/
35974 q
35975 }
35976 /^X\(\/\/\)[^/].*/{
35977 s//\1/
35978 q
35979 }
35980 /^X\(\/\/\)$/{
35981 s//\1/
35982 q
35983 }
35984 /^X\(\/\).*/{
35985 s//\1/
35986 q
35987 }
35988 s/.*/./; q'`
35989 test -d "$as_dir" && break
35990 done
35991 test -z "$as_dirs" || eval "mkdir $as_dirs"
35992 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
35993
35994
35995 } # as_fn_mkdir_p
35996 if mkdir -p . 2>/dev/null; then
35997 as_mkdir_p='mkdir -p "$as_dir"'
35998 else
35999 test -d ./-p && rmdir ./-p
36000 as_mkdir_p=false
36001 fi
36002
36003
36004 # as_fn_executable_p FILE
36005 # -----------------------
36006 # Test if FILE is an executable regular file.
36007 as_fn_executable_p ()
36008 {
36009 test -f "$1" && test -x "$1"
36010 } # as_fn_executable_p
36011 as_test_x='test -x'
36012 as_executable_p=as_fn_executable_p
36013
36014 # Sed expression to map a string onto a valid CPP name.
36015 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
36016
36017 # Sed expression to map a string onto a valid variable name.
36018 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
36019
36020
36021 exec 6>&1
36022 ## ----------------------------------- ##
36023 ## Main body of $CONFIG_STATUS script. ##
36024 ## ----------------------------------- ##
36025 _ASEOF
36026 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
36027
36028 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36029 # Save the log message, to keep $0 and so on meaningful, and to
36030 # report actual input values of CONFIG_FILES etc. instead of their
36031 # values after options handling.
36032 ac_log="
36033 This file was extended by GRUB $as_me 2.06, which was
36034 generated by GNU Autoconf 2.69. Invocation command line was
36035
36036 CONFIG_FILES = $CONFIG_FILES
36037 CONFIG_HEADERS = $CONFIG_HEADERS
36038 CONFIG_LINKS = $CONFIG_LINKS
36039 CONFIG_COMMANDS = $CONFIG_COMMANDS
36040 $ $0 $@
36041
36042 on `(hostname || uname -n) 2>/dev/null | sed 1q`
36043 "
36044
36045 _ACEOF
36046
36047 case $ac_config_files in *"
36048 "*) set x $ac_config_files; shift; ac_config_files=$*;;
36049 esac
36050
36051 case $ac_config_headers in *"
36052 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
36053 esac
36054
36055
36056 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36057 # Files that config.status was made for.
36058 config_files="$ac_config_files"
36059 config_headers="$ac_config_headers"
36060 config_links="$ac_config_links"
36061 config_commands="$ac_config_commands"
36062
36063 _ACEOF
36064
36065 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36066 ac_cs_usage="\
36067 \`$as_me' instantiates files and other configuration actions
36068 from templates according to the current configuration. Unless the files
36069 and actions are specified as TAGs, all are instantiated by default.
36070
36071 Usage: $0 [OPTION]... [TAG]...
36072
36073 -h, --help print this help, then exit
36074 -V, --version print version number and configuration settings, then exit
36075 --config print configuration, then exit
36076 -q, --quiet, --silent
36077 do not print progress messages
36078 -d, --debug don't remove temporary files
36079 --recheck update $as_me by reconfiguring in the same conditions
36080 --file=FILE[:TEMPLATE]
36081 instantiate the configuration file FILE
36082 --header=FILE[:TEMPLATE]
36083 instantiate the configuration header FILE
36084
36085 Configuration files:
36086 $config_files
36087
36088 Configuration headers:
36089 $config_headers
36090
36091 Configuration links:
36092 $config_links
36093
36094 Configuration commands:
36095 $config_commands
36096
36097 Report bugs to <bug-grub@gnu.org>."
36098
36099 _ACEOF
36100 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36101 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
36102 ac_cs_version="\\
36103 GRUB config.status 2.06
36104 configured by $0, generated by GNU Autoconf 2.69,
36105 with options \\"\$ac_cs_config\\"
36106
36107 Copyright (C) 2012 Free Software Foundation, Inc.
36108 This config.status script is free software; the Free Software Foundation
36109 gives unlimited permission to copy, distribute and modify it."
36110
36111 ac_pwd='$ac_pwd'
36112 srcdir='$srcdir'
36113 INSTALL='$INSTALL'
36114 MKDIR_P='$MKDIR_P'
36115 AWK='$AWK'
36116 test -n "\$AWK" || AWK=awk
36117 _ACEOF
36118
36119 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36120 # The default lists apply if the user does not specify any file.
36121 ac_need_defaults=:
36122 while test $# != 0
36123 do
36124 case $1 in
36125 --*=?*)
36126 ac_option=`expr "X$1" : 'X\([^=]*\)='`
36127 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
36128 ac_shift=:
36129 ;;
36130 --*=)
36131 ac_option=`expr "X$1" : 'X\([^=]*\)='`
36132 ac_optarg=
36133 ac_shift=:
36134 ;;
36135 *)
36136 ac_option=$1
36137 ac_optarg=$2
36138 ac_shift=shift
36139 ;;
36140 esac
36141
36142 case $ac_option in
36143 # Handling of the options.
36144 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
36145 ac_cs_recheck=: ;;
36146 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
36147 $as_echo "$ac_cs_version"; exit ;;
36148 --config | --confi | --conf | --con | --co | --c )
36149 $as_echo "$ac_cs_config"; exit ;;
36150 --debug | --debu | --deb | --de | --d | -d )
36151 debug=: ;;
36152 --file | --fil | --fi | --f )
36153 $ac_shift
36154 case $ac_optarg in
36155 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
36156 '') as_fn_error $? "missing file argument" ;;
36157 esac
36158 as_fn_append CONFIG_FILES " '$ac_optarg'"
36159 ac_need_defaults=false;;
36160 --header | --heade | --head | --hea )
36161 $ac_shift
36162 case $ac_optarg in
36163 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
36164 esac
36165 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
36166 ac_need_defaults=false;;
36167 --he | --h)
36168 # Conflict between --help and --header
36169 as_fn_error $? "ambiguous option: \`$1'
36170 Try \`$0 --help' for more information.";;
36171 --help | --hel | -h )
36172 $as_echo "$ac_cs_usage"; exit ;;
36173 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
36174 | -silent | --silent | --silen | --sile | --sil | --si | --s)
36175 ac_cs_silent=: ;;
36176
36177 # This is an error.
36178 -*) as_fn_error $? "unrecognized option: \`$1'
36179 Try \`$0 --help' for more information." ;;
36180
36181 *) as_fn_append ac_config_targets " $1"
36182 ac_need_defaults=false ;;
36183
36184 esac
36185 shift
36186 done
36187
36188 ac_configure_extra_args=
36189
36190 if $ac_cs_silent; then
36191 exec 6>/dev/null
36192 ac_configure_extra_args="$ac_configure_extra_args --silent"
36193 fi
36194
36195 _ACEOF
36196 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36197 if \$ac_cs_recheck; then
36198 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
36199 shift
36200 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
36201 CONFIG_SHELL='$SHELL'
36202 export CONFIG_SHELL
36203 exec "\$@"
36204 fi
36205
36206 _ACEOF
36207 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36208 exec 5>>config.log
36209 {
36210 echo
36211 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
36212 ## Running $as_me. ##
36213 _ASBOX
36214 $as_echo "$ac_log"
36215 } >&5
36216
36217 _ACEOF
36218 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36219 #
36220 # INIT-COMMANDS
36221 #
36222 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
36223 # Capture the value of obsolete ALL_LINGUAS because we need it to compute
36224 # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
36225 # from automake < 1.5.
36226 eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
36227 # Capture the value of LINGUAS because we need it to compute CATALOGS.
36228 LINGUAS="${LINGUAS-%UNSET%}"
36229
36230
36231 _ACEOF
36232
36233 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36234
36235 # Handling of arguments.
36236 for ac_config_target in $ac_config_targets
36237 do
36238 case $ac_config_target in
36239 "config-util.h") CONFIG_HEADERS="$CONFIG_HEADERS config-util.h" ;;
36240 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
36241 "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;;
36242 "include/grub/cpu") CONFIG_LINKS="$CONFIG_LINKS include/grub/cpu:include/grub/$cpudir" ;;
36243 "include/grub/machine") CONFIG_LINKS="$CONFIG_LINKS include/grub/machine:include/grub/$cpudir/$platform" ;;
36244 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
36245 "grub-core/Makefile") CONFIG_FILES="$CONFIG_FILES grub-core/Makefile" ;;
36246 "grub-core/lib/gnulib/Makefile") CONFIG_FILES="$CONFIG_FILES grub-core/lib/gnulib/Makefile" ;;
36247 "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
36248 "docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;;
36249 "util/bash-completion.d/Makefile") CONFIG_FILES="$CONFIG_FILES util/bash-completion.d/Makefile" ;;
36250 "stamp-h") CONFIG_FILES="$CONFIG_FILES stamp-h" ;;
36251 "config.h") CONFIG_FILES="$CONFIG_FILES config.h" ;;
36252
36253 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
36254 esac
36255 done
36256
36257
36258 # If the user did not use the arguments to specify the items to instantiate,
36259 # then the envvar interface is used. Set only those that are not.
36260 # We use the long form for the default assignment because of an extremely
36261 # bizarre bug on SunOS 4.1.3.
36262 if $ac_need_defaults; then
36263 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
36264 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
36265 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
36266 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
36267 fi
36268
36269 # Have a temporary directory for convenience. Make it in the build tree
36270 # simply because there is no reason against having it here, and in addition,
36271 # creating and moving files from /tmp can sometimes cause problems.
36272 # Hook for its removal unless debugging.
36273 # Note that there is a small window in which the directory will not be cleaned:
36274 # after its creation but before its name has been assigned to `$tmp'.
36275 $debug ||
36276 {
36277 tmp= ac_tmp=
36278 trap 'exit_status=$?
36279 : "${ac_tmp:=$tmp}"
36280 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
36281 ' 0
36282 trap 'as_fn_exit 1' 1 2 13 15
36283 }
36284 # Create a (secure) tmp directory for tmp files.
36285
36286 {
36287 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
36288 test -d "$tmp"
36289 } ||
36290 {
36291 tmp=./conf$$-$RANDOM
36292 (umask 077 && mkdir "$tmp")
36293 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
36294 ac_tmp=$tmp
36295
36296 # Set up the scripts for CONFIG_FILES section.
36297 # No need to generate them if there are no CONFIG_FILES.
36298 # This happens for instance with `./config.status config.h'.
36299 if test -n "$CONFIG_FILES"; then
36300
36301
36302 ac_cr=`echo X | tr X '\015'`
36303 # On cygwin, bash can eat \r inside `` if the user requested igncr.
36304 # But we know of no other shell where ac_cr would be empty at this
36305 # point, so we can use a bashism as a fallback.
36306 if test "x$ac_cr" = x; then
36307 eval ac_cr=\$\'\\r\'
36308 fi
36309 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
36310 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
36311 ac_cs_awk_cr='\\r'
36312 else
36313 ac_cs_awk_cr=$ac_cr
36314 fi
36315
36316 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
36317 _ACEOF
36318
36319
36320 {
36321 echo "cat >conf$$subs.awk <<_ACEOF" &&
36322 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
36323 echo "_ACEOF"
36324 } >conf$$subs.sh ||
36325 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
36326 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
36327 ac_delim='%!_!# '
36328 for ac_last_try in false false false false false :; do
36329 . ./conf$$subs.sh ||
36330 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
36331
36332 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
36333 if test $ac_delim_n = $ac_delim_num; then
36334 break
36335 elif $ac_last_try; then
36336 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
36337 else
36338 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
36339 fi
36340 done
36341 rm -f conf$$subs.sh
36342
36343 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36344 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
36345 _ACEOF
36346 sed -n '
36347 h
36348 s/^/S["/; s/!.*/"]=/
36349 p
36350 g
36351 s/^[^!]*!//
36352 :repl
36353 t repl
36354 s/'"$ac_delim"'$//
36355 t delim
36356 :nl
36357 h
36358 s/\(.\{148\}\)..*/\1/
36359 t more1
36360 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
36361 p
36362 n
36363 b repl
36364 :more1
36365 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
36366 p
36367 g
36368 s/.\{148\}//
36369 t nl
36370 :delim
36371 h
36372 s/\(.\{148\}\)..*/\1/
36373 t more2
36374 s/["\\]/\\&/g; s/^/"/; s/$/"/
36375 p
36376 b
36377 :more2
36378 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
36379 p
36380 g
36381 s/.\{148\}//
36382 t delim
36383 ' <conf$$subs.awk | sed '
36384 /^[^""]/{
36385 N
36386 s/\n//
36387 }
36388 ' >>$CONFIG_STATUS || ac_write_fail=1
36389 rm -f conf$$subs.awk
36390 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36391 _ACAWK
36392 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
36393 for (key in S) S_is_set[key] = 1
36394 FS = "\a"
36395
36396 }
36397 {
36398 line = $ 0
36399 nfields = split(line, field, "@")
36400 substed = 0
36401 len = length(field[1])
36402 for (i = 2; i < nfields; i++) {
36403 key = field[i]
36404 keylen = length(key)
36405 if (S_is_set[key]) {
36406 value = S[key]
36407 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
36408 len += length(value) + length(field[++i])
36409 substed = 1
36410 } else
36411 len += 1 + keylen
36412 }
36413
36414 print line
36415 }
36416
36417 _ACAWK
36418 _ACEOF
36419 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36420 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
36421 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
36422 else
36423 cat
36424 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
36425 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
36426 _ACEOF
36427
36428 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
36429 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
36430 # trailing colons and then remove the whole line if VPATH becomes empty
36431 # (actually we leave an empty line to preserve line numbers).
36432 if test "x$srcdir" = x.; then
36433 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
36434 h
36435 s///
36436 s/^/:/
36437 s/[ ]*$/:/
36438 s/:\$(srcdir):/:/g
36439 s/:\${srcdir}:/:/g
36440 s/:@srcdir@:/:/g
36441 s/^:*//
36442 s/:*$//
36443 x
36444 s/\(=[ ]*\).*/\1/
36445 G
36446 s/\n//
36447 s/^[^=]*=[ ]*$//
36448 }'
36449 fi
36450
36451 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36452 fi # test -n "$CONFIG_FILES"
36453
36454 # Set up the scripts for CONFIG_HEADERS section.
36455 # No need to generate them if there are no CONFIG_HEADERS.
36456 # This happens for instance with `./config.status Makefile'.
36457 if test -n "$CONFIG_HEADERS"; then
36458 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
36459 BEGIN {
36460 _ACEOF
36461
36462 # Transform confdefs.h into an awk script `defines.awk', embedded as
36463 # here-document in config.status, that substitutes the proper values into
36464 # config.h.in to produce config.h.
36465
36466 # Create a delimiter string that does not exist in confdefs.h, to ease
36467 # handling of long lines.
36468 ac_delim='%!_!# '
36469 for ac_last_try in false false :; do
36470 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
36471 if test -z "$ac_tt"; then
36472 break
36473 elif $ac_last_try; then
36474 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
36475 else
36476 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
36477 fi
36478 done
36479
36480 # For the awk script, D is an array of macro values keyed by name,
36481 # likewise P contains macro parameters if any. Preserve backslash
36482 # newline sequences.
36483
36484 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
36485 sed -n '
36486 s/.\{148\}/&'"$ac_delim"'/g
36487 t rset
36488 :rset
36489 s/^[ ]*#[ ]*define[ ][ ]*/ /
36490 t def
36491 d
36492 :def
36493 s/\\$//
36494 t bsnl
36495 s/["\\]/\\&/g
36496 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
36497 D["\1"]=" \3"/p
36498 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
36499 d
36500 :bsnl
36501 s/["\\]/\\&/g
36502 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
36503 D["\1"]=" \3\\\\\\n"\\/p
36504 t cont
36505 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
36506 t cont
36507 d
36508 :cont
36509 n
36510 s/.\{148\}/&'"$ac_delim"'/g
36511 t clear
36512 :clear
36513 s/\\$//
36514 t bsnlc
36515 s/["\\]/\\&/g; s/^/"/; s/$/"/p
36516 d
36517 :bsnlc
36518 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
36519 b cont
36520 ' <confdefs.h | sed '
36521 s/'"$ac_delim"'/"\\\
36522 "/g' >>$CONFIG_STATUS || ac_write_fail=1
36523
36524 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36525 for (key in D) D_is_set[key] = 1
36526 FS = "\a"
36527 }
36528 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
36529 line = \$ 0
36530 split(line, arg, " ")
36531 if (arg[1] == "#") {
36532 defundef = arg[2]
36533 mac1 = arg[3]
36534 } else {
36535 defundef = substr(arg[1], 2)
36536 mac1 = arg[2]
36537 }
36538 split(mac1, mac2, "(") #)
36539 macro = mac2[1]
36540 prefix = substr(line, 1, index(line, defundef) - 1)
36541 if (D_is_set[macro]) {
36542 # Preserve the white space surrounding the "#".
36543 print prefix "define", macro P[macro] D[macro]
36544 next
36545 } else {
36546 # Replace #undef with comments. This is necessary, for example,
36547 # in the case of _POSIX_SOURCE, which is predefined and required
36548 # on some systems where configure will not decide to define it.
36549 if (defundef == "undef") {
36550 print "/*", prefix defundef, macro, "*/"
36551 next
36552 }
36553 }
36554 }
36555 { print }
36556 _ACAWK
36557 _ACEOF
36558 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36559 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
36560 fi # test -n "$CONFIG_HEADERS"
36561
36562
36563 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
36564 shift
36565 for ac_tag
36566 do
36567 case $ac_tag in
36568 :[FHLC]) ac_mode=$ac_tag; continue;;
36569 esac
36570 case $ac_mode$ac_tag in
36571 :[FHL]*:*);;
36572 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
36573 :[FH]-) ac_tag=-:-;;
36574 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
36575 esac
36576 ac_save_IFS=$IFS
36577 IFS=:
36578 set x $ac_tag
36579 IFS=$ac_save_IFS
36580 shift
36581 ac_file=$1
36582 shift
36583
36584 case $ac_mode in
36585 :L) ac_source=$1;;
36586 :[FH])
36587 ac_file_inputs=
36588 for ac_f
36589 do
36590 case $ac_f in
36591 -) ac_f="$ac_tmp/stdin";;
36592 *) # Look for the file first in the build tree, then in the source tree
36593 # (if the path is not absolute). The absolute path cannot be DOS-style,
36594 # because $ac_f cannot contain `:'.
36595 test -f "$ac_f" ||
36596 case $ac_f in
36597 [\\/$]*) false;;
36598 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
36599 esac ||
36600 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
36601 esac
36602 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
36603 as_fn_append ac_file_inputs " '$ac_f'"
36604 done
36605
36606 # Let's still pretend it is `configure' which instantiates (i.e., don't
36607 # use $as_me), people would be surprised to read:
36608 # /* config.h. Generated by config.status. */
36609 configure_input='Generated from '`
36610 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
36611 `' by configure.'
36612 if test x"$ac_file" != x-; then
36613 configure_input="$ac_file. $configure_input"
36614 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
36615 $as_echo "$as_me: creating $ac_file" >&6;}
36616 fi
36617 # Neutralize special characters interpreted by sed in replacement strings.
36618 case $configure_input in #(
36619 *\&* | *\|* | *\\* )
36620 ac_sed_conf_input=`$as_echo "$configure_input" |
36621 sed 's/[\\\\&|]/\\\\&/g'`;; #(
36622 *) ac_sed_conf_input=$configure_input;;
36623 esac
36624
36625 case $ac_tag in
36626 *:-:* | *:-) cat >"$ac_tmp/stdin" \
36627 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
36628 esac
36629 ;;
36630 esac
36631
36632 ac_dir=`$as_dirname -- "$ac_file" ||
36633 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
36634 X"$ac_file" : 'X\(//\)[^/]' \| \
36635 X"$ac_file" : 'X\(//\)$' \| \
36636 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
36637 $as_echo X"$ac_file" |
36638 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
36639 s//\1/
36640 q
36641 }
36642 /^X\(\/\/\)[^/].*/{
36643 s//\1/
36644 q
36645 }
36646 /^X\(\/\/\)$/{
36647 s//\1/
36648 q
36649 }
36650 /^X\(\/\).*/{
36651 s//\1/
36652 q
36653 }
36654 s/.*/./; q'`
36655 as_dir="$ac_dir"; as_fn_mkdir_p
36656 ac_builddir=.
36657
36658 case "$ac_dir" in
36659 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
36660 *)
36661 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
36662 # A ".." for each directory in $ac_dir_suffix.
36663 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
36664 case $ac_top_builddir_sub in
36665 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
36666 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
36667 esac ;;
36668 esac
36669 ac_abs_top_builddir=$ac_pwd
36670 ac_abs_builddir=$ac_pwd$ac_dir_suffix
36671 # for backward compatibility:
36672 ac_top_builddir=$ac_top_build_prefix
36673
36674 case $srcdir in
36675 .) # We are building in place.
36676 ac_srcdir=.
36677 ac_top_srcdir=$ac_top_builddir_sub
36678 ac_abs_top_srcdir=$ac_pwd ;;
36679 [\\/]* | ?:[\\/]* ) # Absolute name.
36680 ac_srcdir=$srcdir$ac_dir_suffix;
36681 ac_top_srcdir=$srcdir
36682 ac_abs_top_srcdir=$srcdir ;;
36683 *) # Relative name.
36684 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
36685 ac_top_srcdir=$ac_top_build_prefix$srcdir
36686 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
36687 esac
36688 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
36689
36690
36691 case $ac_mode in
36692 :F)
36693 #
36694 # CONFIG_FILE
36695 #
36696
36697 case $INSTALL in
36698 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
36699 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
36700 esac
36701 ac_MKDIR_P=$MKDIR_P
36702 case $MKDIR_P in
36703 [\\/$]* | ?:[\\/]* ) ;;
36704 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
36705 esac
36706 _ACEOF
36707
36708 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36709 # If the template does not know about datarootdir, expand it.
36710 # FIXME: This hack should be removed a few years after 2.60.
36711 ac_datarootdir_hack=; ac_datarootdir_seen=
36712 ac_sed_dataroot='
36713 /datarootdir/ {
36714 p
36715 q
36716 }
36717 /@datadir@/p
36718 /@docdir@/p
36719 /@infodir@/p
36720 /@localedir@/p
36721 /@mandir@/p'
36722 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
36723 *datarootdir*) ac_datarootdir_seen=yes;;
36724 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
36725 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
36726 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
36727 _ACEOF
36728 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36729 ac_datarootdir_hack='
36730 s&@datadir@&$datadir&g
36731 s&@docdir@&$docdir&g
36732 s&@infodir@&$infodir&g
36733 s&@localedir@&$localedir&g
36734 s&@mandir@&$mandir&g
36735 s&\\\${datarootdir}&$datarootdir&g' ;;
36736 esac
36737 _ACEOF
36738
36739 # Neutralize VPATH when `$srcdir' = `.'.
36740 # Shell code in configure.ac might set extrasub.
36741 # FIXME: do we really want to maintain this feature?
36742 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36743 ac_sed_extra="$ac_vpsub
36744 $extrasub
36745 _ACEOF
36746 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36747 :t
36748 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
36749 s|@configure_input@|$ac_sed_conf_input|;t t
36750 s&@top_builddir@&$ac_top_builddir_sub&;t t
36751 s&@top_build_prefix@&$ac_top_build_prefix&;t t
36752 s&@srcdir@&$ac_srcdir&;t t
36753 s&@abs_srcdir@&$ac_abs_srcdir&;t t
36754 s&@top_srcdir@&$ac_top_srcdir&;t t
36755 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
36756 s&@builddir@&$ac_builddir&;t t
36757 s&@abs_builddir@&$ac_abs_builddir&;t t
36758 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
36759 s&@INSTALL@&$ac_INSTALL&;t t
36760 s&@MKDIR_P@&$ac_MKDIR_P&;t t
36761 $ac_datarootdir_hack
36762 "
36763 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
36764 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
36765
36766 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
36767 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
36768 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
36769 "$ac_tmp/out"`; test -z "$ac_out"; } &&
36770 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
36771 which seems to be undefined. Please make sure it is defined" >&5
36772 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
36773 which seems to be undefined. Please make sure it is defined" >&2;}
36774
36775 rm -f "$ac_tmp/stdin"
36776 case $ac_file in
36777 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
36778 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
36779 esac \
36780 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
36781 ;;
36782 :H)
36783 #
36784 # CONFIG_HEADER
36785 #
36786 if test x"$ac_file" != x-; then
36787 {
36788 $as_echo "/* $configure_input */" \
36789 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
36790 } >"$ac_tmp/config.h" \
36791 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
36792 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
36793 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
36794 $as_echo "$as_me: $ac_file is unchanged" >&6;}
36795 else
36796 rm -f "$ac_file"
36797 mv "$ac_tmp/config.h" "$ac_file" \
36798 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
36799 fi
36800 else
36801 $as_echo "/* $configure_input */" \
36802 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
36803 || as_fn_error $? "could not create -" "$LINENO" 5
36804 fi
36805 # Compute "$ac_file"'s index in $config_headers.
36806 _am_arg="$ac_file"
36807 _am_stamp_count=1
36808 for _am_header in $config_headers :; do
36809 case $_am_header in
36810 $_am_arg | $_am_arg:* )
36811 break ;;
36812 * )
36813 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
36814 esac
36815 done
36816 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
36817 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
36818 X"$_am_arg" : 'X\(//\)[^/]' \| \
36819 X"$_am_arg" : 'X\(//\)$' \| \
36820 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
36821 $as_echo X"$_am_arg" |
36822 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
36823 s//\1/
36824 q
36825 }
36826 /^X\(\/\/\)[^/].*/{
36827 s//\1/
36828 q
36829 }
36830 /^X\(\/\/\)$/{
36831 s//\1/
36832 q
36833 }
36834 /^X\(\/\).*/{
36835 s//\1/
36836 q
36837 }
36838 s/.*/./; q'`/stamp-h$_am_stamp_count
36839 ;;
36840 :L)
36841 #
36842 # CONFIG_LINK
36843 #
36844
36845 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
36846 :
36847 else
36848 # Prefer the file from the source tree if names are identical.
36849 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
36850 ac_source=$srcdir/$ac_source
36851 fi
36852
36853 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
36854 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
36855
36856 if test ! -r "$ac_source"; then
36857 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
36858 fi
36859 rm -f "$ac_file"
36860
36861 # Try a relative symlink, then a hard link, then a copy.
36862 case $ac_source in
36863 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
36864 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
36865 esac
36866 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
36867 ln "$ac_source" "$ac_file" 2>/dev/null ||
36868 cp -p "$ac_source" "$ac_file" ||
36869 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
36870 fi
36871 ;;
36872 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
36873 $as_echo "$as_me: executing $ac_file commands" >&6;}
36874 ;;
36875 esac
36876
36877
36878 case $ac_file$ac_mode in
36879 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
36880 # Older Autoconf quotes --file arguments for eval, but not when files
36881 # are listed without --file. Let's play safe and only enable the eval
36882 # if we detect the quoting.
36883 case $CONFIG_FILES in
36884 *\'*) eval set x "$CONFIG_FILES" ;;
36885 *) set x $CONFIG_FILES ;;
36886 esac
36887 shift
36888 for mf
36889 do
36890 # Strip MF so we end up with the name of the file.
36891 mf=`echo "$mf" | sed -e 's/:.*$//'`
36892 # Check whether this is an Automake generated Makefile or not.
36893 # We used to match only the files named 'Makefile.in', but
36894 # some people rename them; so instead we look at the file content.
36895 # Grep'ing the first line is not enough: some people post-process
36896 # each Makefile.in and add a new line on top of each file to say so.
36897 # Grep'ing the whole file is not good either: AIX grep has a line
36898 # limit of 2048, but all sed's we know have understand at least 4000.
36899 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
36900 dirpart=`$as_dirname -- "$mf" ||
36901 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
36902 X"$mf" : 'X\(//\)[^/]' \| \
36903 X"$mf" : 'X\(//\)$' \| \
36904 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
36905 $as_echo X"$mf" |
36906 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
36907 s//\1/
36908 q
36909 }
36910 /^X\(\/\/\)[^/].*/{
36911 s//\1/
36912 q
36913 }
36914 /^X\(\/\/\)$/{
36915 s//\1/
36916 q
36917 }
36918 /^X\(\/\).*/{
36919 s//\1/
36920 q
36921 }
36922 s/.*/./; q'`
36923 else
36924 continue
36925 fi
36926 # Extract the definition of DEPDIR, am__include, and am__quote
36927 # from the Makefile without running 'make'.
36928 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
36929 test -z "$DEPDIR" && continue
36930 am__include=`sed -n 's/^am__include = //p' < "$mf"`
36931 test -z "$am__include" && continue
36932 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
36933 # Find all dependency output files, they are included files with
36934 # $(DEPDIR) in their names. We invoke sed twice because it is the
36935 # simplest approach to changing $(DEPDIR) to its actual value in the
36936 # expansion.
36937 for file in `sed -n "
36938 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
36939 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
36940 # Make sure the directory exists.
36941 test -f "$dirpart/$file" && continue
36942 fdir=`$as_dirname -- "$file" ||
36943 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
36944 X"$file" : 'X\(//\)[^/]' \| \
36945 X"$file" : 'X\(//\)$' \| \
36946 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
36947 $as_echo X"$file" |
36948 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
36949 s//\1/
36950 q
36951 }
36952 /^X\(\/\/\)[^/].*/{
36953 s//\1/
36954 q
36955 }
36956 /^X\(\/\/\)$/{
36957 s//\1/
36958 q
36959 }
36960 /^X\(\/\).*/{
36961 s//\1/
36962 q
36963 }
36964 s/.*/./; q'`
36965 as_dir=$dirpart/$fdir; as_fn_mkdir_p
36966 # echo "creating $dirpart/$file"
36967 echo '# dummy' > "$dirpart/$file"
36968 done
36969 done
36970 }
36971 ;;
36972 "po-directories":C)
36973 for ac_file in $CONFIG_FILES; do
36974 # Support "outfile[:infile[:infile...]]"
36975 case "$ac_file" in
36976 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
36977 esac
36978 # PO directories have a Makefile.in generated from Makefile.in.in.
36979 case "$ac_file" in */Makefile.in)
36980 # Adjust a relative srcdir.
36981 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
36982 ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
36983 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
36984 # In autoconf-2.13 it is called $ac_given_srcdir.
36985 # In autoconf-2.50 it is called $srcdir.
36986 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
36987 case "$ac_given_srcdir" in
36988 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
36989 /*) top_srcdir="$ac_given_srcdir" ;;
36990 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
36991 esac
36992 # Treat a directory as a PO directory if and only if it has a
36993 # POTFILES.in file. This allows packages to have multiple PO
36994 # directories under different names or in different locations.
36995 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
36996 rm -f "$ac_dir/POTFILES"
36997 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
36998 gt_tab=`printf '\t'`
36999 cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
37000 POMAKEFILEDEPS="POTFILES.in"
37001 # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
37002 # on $ac_dir but don't depend on user-specified configuration
37003 # parameters.
37004 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
37005 # The LINGUAS file contains the set of available languages.
37006 if test -n "$OBSOLETE_ALL_LINGUAS"; then
37007 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
37008 fi
37009 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
37010 # Hide the ALL_LINGUAS assignment from automake < 1.5.
37011 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
37012 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
37013 else
37014 # The set of available languages was given in configure.in.
37015 # Hide the ALL_LINGUAS assignment from automake < 1.5.
37016 eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
37017 fi
37018 # Compute POFILES
37019 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
37020 # Compute UPDATEPOFILES
37021 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
37022 # Compute DUMMYPOFILES
37023 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
37024 # Compute GMOFILES
37025 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
37026 case "$ac_given_srcdir" in
37027 .) srcdirpre= ;;
37028 *) srcdirpre='$(srcdir)/' ;;
37029 esac
37030 POFILES=
37031 UPDATEPOFILES=
37032 DUMMYPOFILES=
37033 GMOFILES=
37034 for lang in $ALL_LINGUAS; do
37035 POFILES="$POFILES $srcdirpre$lang.po"
37036 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
37037 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
37038 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
37039 done
37040 # CATALOGS depends on both $ac_dir and the user's LINGUAS
37041 # environment variable.
37042 INST_LINGUAS=
37043 if test -n "$ALL_LINGUAS"; then
37044 for presentlang in $ALL_LINGUAS; do
37045 useit=no
37046 if test "%UNSET%" != "$LINGUAS"; then
37047 desiredlanguages="$LINGUAS"
37048 else
37049 desiredlanguages="$ALL_LINGUAS"
37050 fi
37051 for desiredlang in $desiredlanguages; do
37052 # Use the presentlang catalog if desiredlang is
37053 # a. equal to presentlang, or
37054 # b. a variant of presentlang (because in this case,
37055 # presentlang can be used as a fallback for messages
37056 # which are not translated in the desiredlang catalog).
37057 case "$desiredlang" in
37058 "$presentlang"*) useit=yes;;
37059 esac
37060 done
37061 if test $useit = yes; then
37062 INST_LINGUAS="$INST_LINGUAS $presentlang"
37063 fi
37064 done
37065 fi
37066 CATALOGS=
37067 if test -n "$INST_LINGUAS"; then
37068 for lang in $INST_LINGUAS; do
37069 CATALOGS="$CATALOGS $lang.gmo"
37070 done
37071 fi
37072 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
37073 sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
37074 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
37075 if test -f "$f"; then
37076 case "$f" in
37077 *.orig | *.bak | *~) ;;
37078 *) cat "$f" >> "$ac_dir/Makefile" ;;
37079 esac
37080 fi
37081 done
37082 fi
37083 ;;
37084 esac
37085 done ;;
37086 "stamp-h":F) echo timestamp > stamp-h ;;
37087
37088 esac
37089 done # for ac_tag
37090
37091
37092 as_fn_exit 0
37093 _ACEOF
37094 ac_clean_files=$ac_clean_files_save
37095
37096 test $ac_write_fail = 0 ||
37097 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
37098
37099
37100 # configure is writing to config.log, and then calls config.status.
37101 # config.status does its own redirection, appending to config.log.
37102 # Unfortunately, on DOS this fails, as config.log is still kept open
37103 # by configure, so config.status won't be able to write to it; its
37104 # output is simply discarded. So we exec the FD to /dev/null,
37105 # effectively closing config.log, so it can be properly (re)opened and
37106 # appended to by config.status. When coming back to configure, we
37107 # need to make the FD available again.
37108 if test "$no_create" != yes; then
37109 ac_cs_success=:
37110 ac_config_status_args=
37111 test "$silent" = yes &&
37112 ac_config_status_args="$ac_config_status_args --quiet"
37113 exec 5>/dev/null
37114 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
37115 exec 5>>config.log
37116 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
37117 # would make configure fail if this is the last instruction.
37118 $ac_cs_success || as_fn_exit 1
37119 fi
37120 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
37121 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
37122 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
37123 fi
37124
37125
37126 echo "*******************************************************"
37127 echo GRUB2 will be compiled with following components:
37128 echo Platform: "$target_cpu"-"$platform"
37129 if [ x"$platform" = xemu ]; then
37130 if [ x"$grub_emu_sdl_excuse" = x ]; then
37131 echo SDL support for grub-emu: Yes
37132 else
37133 echo SDL support for grub-emu: No "($grub_emu_sdl_excuse)"
37134 fi
37135 if [ x"$grub_emu_pci_excuse" = x ]; then
37136 echo PCI support for grub-emu: Yes
37137 else
37138 echo PCI support for grub-emu: No "($grub_emu_pci_excuse)"
37139 fi
37140 fi
37141 if test x"$device_mapper_excuse" = x ; then
37142 echo With devmapper support: Yes
37143 else
37144 echo With devmapper support: No "($device_mapper_excuse)"
37145 fi
37146 if [ x"$enable_mm_debug" = xyes ]; then
37147 echo With memory debugging: Yes
37148 else
37149 echo With memory debugging: No
37150 fi
37151 if [ x"$enable_cache_stats" = xyes ]; then
37152 echo With disk cache statistics: Yes
37153 else
37154 echo With disk cache statistics: No
37155 fi
37156
37157 if [ x"$enable_boot_time" = xyes ]; then
37158 echo With boot time statistics: Yes
37159 else
37160 echo With boot time statistics: No
37161 fi
37162
37163 if [ x"$efiemu_excuse" = x ]; then
37164 echo efiemu runtime: Yes
37165 else
37166 echo efiemu runtime: No "($efiemu_excuse)"
37167 fi
37168 if [ x"$grub_mkfont_excuse" = x ]; then
37169 echo grub-mkfont: Yes
37170 else
37171 echo grub-mkfont: No "($grub_mkfont_excuse)"
37172 fi
37173 if [ x"$grub_mount_excuse" = x ]; then
37174 echo grub-mount: Yes
37175 else
37176 echo grub-mount: No "($grub_mount_excuse)"
37177 fi
37178 if [ x"$starfield_excuse" = x ]; then
37179 echo starfield theme: Yes
37180 echo With DejaVuSans font from $DJVU_FONT_SOURCE
37181 else
37182 echo starfield theme: No "($starfield_excuse)"
37183 fi
37184 if [ x"$libzfs_excuse" = x ]; then
37185 echo With libzfs support: Yes
37186 else
37187 echo With libzfs support: No "($libzfs_excuse)"
37188 fi
37189 if [ x"$grub_build_mkfont_excuse" = x ]; then
37190 echo Build-time grub-mkfont: Yes
37191 if test "x$FONT_SOURCE" = x ; then
37192 echo "Without unifont"
37193 else
37194 echo "With unifont from $FONT_SOURCE"
37195 fi
37196 else
37197 echo Build-time grub-mkfont: No "($grub_build_mkfont_excuse)"
37198 echo "Without unifont (no build-time grub-mkfont)"
37199 fi
37200 if test x"$liblzma_excuse" != x ; then
37201 echo "Without liblzma (no support for XZ-compressed mips images) ($liblzma_excuse)"
37202 else
37203 echo "With liblzma from $LIBLZMA (support for XZ-compressed mips images)"
37204 fi
37205 if test "x$enable_stack_protector" != xno; then
37206 echo "With stack smashing protector: Yes"
37207 else
37208 echo "With stack smashing protector: No"
37209 fi
37210 echo "*******************************************************"
37211