]> git.proxmox.com Git - grub2.git/blame - configure
Add a commented-out GRUB_DISABLE_OS_PROBER section
[grub2.git] / configure
CommitLineData
422889f9
CW
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
21f95442 3# Generated by GNU Autoconf 2.69 for GRUB 2.06.
422889f9
CW
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
18DUALCASE=1; export DUALCASE # for MKS sh
19if 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
26else
27 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
32esac
33fi
34
35
36as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_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.
45if 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 --'
49elif (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'
52else
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'
72fi
73
74# The user is always right.
75if 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 }
81fi
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.)
89IFS=" "" $as_nl"
90
91# Find who we are. Look in the path if we contain no directory separator.
92as_myself=
93case $0 in #((
94 *[\\/]* ) as_myself=$0 ;;
95 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
96for as_dir in $PATH
97do
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
102IFS=$as_save_IFS
103
104 ;;
105esac
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.
108if test "x$as_myself" = x; then
109 as_myself=$0
110fi
111if test ! -f "$as_myself"; then
112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113 exit 1
114fi
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.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export 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.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149 *v*x* | *x*v* ) as_opts=-vx ;;
150 *v* ) as_opts=-v ;;
151 *x* ) as_opts=-x ;;
152 * ) as_opts= ;;
153esac
154exec $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
158as_fn_exit 255
159 fi
160 # We don't want this to propagate to other subprocesses.
161 { _as_can_reexec=; unset _as_can_reexec;}
162if 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
170else
171 case \`(set -o) 2>/dev/null\` in #(
172 *posix*) :
173 set -o posix ;; #(
174 *) :
175 ;;
176esac
177fi
178"
179 as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193 exitcode=1; echo positional parameters were not saved.
194fi
195test x\$exitcode = x0 || exit 1
196test -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
201test \$(( 1 + 1 )) = 2 || exit 1"
202 if (eval "$as_required") 2>/dev/null; then :
203 as_have_required=yes
204else
205 as_have_required=no
206fi
207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
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
227fi
228fi
229 done;;
230 esac
231 as_found=false
232done
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
236fi; }
237IFS=$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.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250 *v*x* | *x*v* ) as_opts=-vx ;;
251 *v* ) as_opts=-v ;;
252 *x* ) as_opts=-x ;;
253 * ) as_opts= ;;
254esac
255exec $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
259exit 255
260fi
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
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293 { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_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.
308as_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.
318as_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.
366as_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.
376if (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 }'
381else
382 as_fn_append ()
383 {
384 eval $1=\$$1\$2
385 }
386fi # 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.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394 eval 'as_fn_arith ()
395 {
396 as_val=$(( $* ))
397 }'
398else
399 as_fn_arith ()
400 {
401 as_val=`expr "$@" || test $? -eq 1`
402 }
403fi # 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.
411as_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
422if expr a : '\(a\)' >/dev/null 2>&1 &&
423 test "X`expr 00001 : '.*\(...\)'`" = X001; then
424 as_expr=expr
425else
426 as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430 as_basename=basename
431else
432 as_basename=false
433fi
434
435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436 as_dirname=dirname
437else
438 as_dirname=false
439fi
440
441as_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.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_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
503ECHO_C= ECHO_N= ECHO_T=
504case `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';;
514esac
515
516rm -f conf$$ conf$$.exe conf$$.file
517if test -d conf$$.dir; then
518 rm -f conf$$.dir/conf$$.file
519else
520 rm -f conf$$.dir
521 mkdir conf$$.dir 2>/dev/null
522fi
523if (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
537else
538 as_ln_s='cp -pR'
539fi
540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
542
543if mkdir -p . 2>/dev/null; then
544 as_mkdir_p='mkdir -p "$as_dir"'
545else
546 test -d ./-p && rmdir ./-p
547 as_mkdir_p=false
548fi
549
550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
552
553# Sed expression to map a string onto a valid CPP name.
554as_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.
557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
558
559
560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 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.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
568#
569# Initializations.
570#
571ac_default_prefix=/usr/local
572ac_clean_files=
573ac_config_libobj_dir=.
574LIBOBJS=
575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
579
580# Identity of this package.
581PACKAGE_NAME='GRUB'
582PACKAGE_TARNAME='grub'
21f95442
CW
583PACKAGE_VERSION='2.06'
584PACKAGE_STRING='GRUB 2.06'
422889f9
CW
585PACKAGE_BUGREPORT='bug-grub@gnu.org'
586PACKAGE_URL=''
587
588ac_unique_file="include/grub/dl.h"
589# Factoring default headers for most tests.
590ac_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
00f6db22 625gl_use_threads_default=
422889f9 626gt_needs=
422889f9 627ac_header_list=
00f6db22 628ac_func_list=
422889f9
CW
629gl_fnmatch_required=POSIX
630gl_getopt_required=POSIX
422889f9
CW
631ac_subst_vars='gltests_LTLIBOBJS
632gltests_LIBOBJS
633gl_LTLIBOBJS
634gl_LIBOBJS
635am__EXEEXT_FALSE
636am__EXEEXT_TRUE
637LTLIBOBJS
638LIBOBJS
639COND_HAVE_EXEC_FALSE
640COND_HAVE_EXEC_TRUE
641COND_STARFIELD_FALSE
642COND_STARFIELD_TRUE
643COND_HAVE_ASM_USCORE_FALSE
644COND_HAVE_ASM_USCORE_TRUE
645COND_HAVE_CXX_FALSE
646COND_HAVE_CXX_TRUE
647COND_ENABLE_BOOT_TIME_STATS_FALSE
648COND_ENABLE_BOOT_TIME_STATS_TRUE
649COND_ENABLE_CACHE_STATS_FALSE
650COND_ENABLE_CACHE_STATS_TRUE
651COND_ENABLE_EFIEMU_FALSE
652COND_ENABLE_EFIEMU_TRUE
653COND_APPLE_LINKER_FALSE
654COND_APPLE_LINKER_TRUE
655HAVE_FONT_SOURCE
656COND_HAVE_FONT_SOURCE_FALSE
657COND_HAVE_FONT_SOURCE_TRUE
658COND_GRUB_MOUNT_FALSE
659COND_GRUB_MOUNT_TRUE
660COND_GRUB_MKFONT_FALSE
661COND_GRUB_MKFONT_TRUE
662COND_GRUB_EMU_PCI_FALSE
663COND_GRUB_EMU_PCI_TRUE
664COND_GRUB_EMU_SDL_FALSE
665COND_GRUB_EMU_SDL_TRUE
666COND_MAN_PAGES_FALSE
667COND_MAN_PAGES_TRUE
668COND_HOST_ILLUMOS_FALSE
669COND_HOST_ILLUMOS_TRUE
670COND_HOST_XNU_FALSE
671COND_HOST_XNU_TRUE
672COND_HOST_KFREEBSD_FALSE
673COND_HOST_KFREEBSD_TRUE
674COND_HOST_WINDOWS_FALSE
675COND_HOST_WINDOWS_TRUE
676COND_HOST_NETBSD_FALSE
677COND_HOST_NETBSD_TRUE
678COND_HOST_LINUX_FALSE
679COND_HOST_LINUX_TRUE
680COND_HOST_HURD_FALSE
681COND_HOST_HURD_TRUE
00f6db22
CW
682COND_riscv64_efi_FALSE
683COND_riscv64_efi_TRUE
684COND_riscv32_efi_FALSE
685COND_riscv32_efi_TRUE
686COND_riscv64_FALSE
687COND_riscv64_TRUE
688COND_riscv32_FALSE
689COND_riscv32_TRUE
422889f9
CW
690COND_arm64_efi_FALSE
691COND_arm64_efi_TRUE
692COND_arm64_FALSE
693COND_arm64_TRUE
694COND_arm_efi_FALSE
695COND_arm_efi_TRUE
00f6db22
CW
696COND_arm_coreboot_FALSE
697COND_arm_coreboot_TRUE
422889f9
CW
698COND_arm_uboot_FALSE
699COND_arm_uboot_TRUE
700COND_arm_FALSE
701COND_arm_TRUE
702COND_mipseb_FALSE
703COND_mipseb_TRUE
704COND_mipsel_FALSE
705COND_mipsel_TRUE
706COND_mips_FALSE
707COND_mips_TRUE
708COND_powerpc_ieee1275_FALSE
709COND_powerpc_ieee1275_TRUE
710COND_sparc64_emu_FALSE
711COND_sparc64_emu_TRUE
712COND_sparc64_ieee1275_FALSE
713COND_sparc64_ieee1275_TRUE
714COND_mips_arc_FALSE
715COND_mips_arc_TRUE
716COND_mips_qemu_mips_FALSE
717COND_mips_qemu_mips_TRUE
718COND_mips_loongson_FALSE
719COND_mips_loongson_TRUE
720COND_x86_64_xen_FALSE
721COND_x86_64_xen_TRUE
00f6db22
CW
722COND_i386_xen_pvh_FALSE
723COND_i386_xen_pvh_TRUE
422889f9
CW
724COND_i386_xen_FALSE
725COND_i386_xen_TRUE
726COND_x86_64_efi_FALSE
727COND_x86_64_efi_TRUE
728COND_i386_multiboot_FALSE
729COND_i386_multiboot_TRUE
730COND_i386_coreboot_FALSE
731COND_i386_coreboot_TRUE
732COND_i386_ieee1275_FALSE
733COND_i386_ieee1275_TRUE
734COND_i386_qemu_FALSE
735COND_i386_qemu_TRUE
736COND_ia64_efi_FALSE
737COND_ia64_efi_TRUE
738COND_i386_efi_FALSE
739COND_i386_efi_TRUE
740COND_i386_pc_FALSE
741COND_i386_pc_TRUE
742COND_emu_FALSE
743COND_emu_TRUE
744COND_real_platform_FALSE
745COND_real_platform_TRUE
746BUILD_LIBM
747HOST_CCASFLAGS
748HOST_CPPFLAGS
749HOST_LDFLAGS
750HOST_CFLAGS
751TARGET_APPLE_LINKER
752TARGET_IMG_BASE_LDOPT
753TARGET_IMG_CFLAGS
754TARGET_IMG_LDFLAGS
755TARGET_CCASFLAGS
756TARGET_CPPFLAGS
757TARGET_LDFLAGS
758TARGET_CFLAGS
759TARGET_CC_VERSION
760TARGET_MODULE_FORMAT
761TARGET_OBJ2ELF
762TARGET_CCAS
763TARGET_CPP
764GRUB_PLATFORM
765GRUB_TARGET_CPU
766END_SYMBOL
767BSS_START_SYMBOL
768HAVE_ASM_USCORE
769GRUB_BOOT_MACHINE_LINK_ADDR
770LIBNVPAIR
771LIBZFS
772LIBLZMA
773LIBGEOM
774LIBDEVMAPPER
775enable_grub_mount
776FONT_SOURCE
777DJVU_FONT_SOURCE
00f6db22
CW
778BUILD_FREETYPE_LIBS
779BUILD_FREETYPE_CFLAGS
422889f9
CW
780BUILD_WORDS_BIGENDIAN
781BUILD_SIZEOF_VOID_P
782BUILD_SIZEOF_LONG
422889f9 783enable_grub_mkfont
00f6db22
CW
784FREETYPE_LIBS
785FREETYPE_CFLAGS
422889f9
CW
786enable_grub_emu_pci
787enable_grub_emu_sdl
788LIBPCIACCESS
789LIBSDL
790BOOT_TIME_STATS
791DISK_CACHE_STATS
792TARGET_NMFLAGS_DEFINED_ONLY
793TARGET_NMFLAGS_MINUS_P
794TARGET_LDFLAGS_OLDMAGIC
795EFIEMU64_LINK_FORMAT
796enable_efiemu
797TARGET_OBJCONV
798BUILD_LDFLAGS
799BUILD_CPPFLAGS
800BUILD_CFLAGS
801HOST_CC
802TARGET_RANLIB
803TARGET_NM
804TARGET_STRIP
805TARGET_OBJCOPY
806ac_ct_TARGET_CC
807TARGET_CC
808LIBGNU_LTLIBDEPS
809LIBGNU_LIBDEPS
810gltests_WITNESS
811REPLACE_TOWLOWER
812REPLACE_ISWCNTRL
813HAVE_WCTYPE_H
814NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
815NEXT_WCTYPE_H
816HAVE_ISWCNTRL
817REPLACE_ISWBLANK
818HAVE_WCTRANS_T
819HAVE_WCTYPE_T
820HAVE_ISWBLANK
821GNULIB_TOWCTRANS
822GNULIB_WCTRANS
823GNULIB_ISWCTYPE
824GNULIB_WCTYPE
825GNULIB_ISWBLANK
00f6db22 826HAVE_CRTDEFS_H
422889f9
CW
827HAVE_WINT_T
828NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
829NEXT_WCHAR_H
830HAVE_FEATURES_H
831LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE
832LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE
833LIBUNISTRING_UNIWIDTH_H
834LIBUNISTRING_UNITYPES_H
835HAVE_UNISTD_H
836NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
837NEXT_UNISTD_H
00f6db22
CW
838UNISTD_H_DEFINES_STRUCT_TIMESPEC
839PTHREAD_H_DEFINES_STRUCT_TIMESPEC
840SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
841TIME_H_DEFINES_STRUCT_TIMESPEC
842NEXT_AS_FIRST_DIRECTIVE_TIME_H
843NEXT_TIME_H
844REPLACE_LOCALTIME
845REPLACE_GMTIME
846GNULIB_GETTIMEOFDAY
847REPLACE_TZSET
848REPLACE_TIMEGM
849REPLACE_STRFTIME
850REPLACE_NANOSLEEP
851REPLACE_MKTIME
852REPLACE_LOCALTIME_R
853REPLACE_CTIME
854HAVE_TIMEZONE_T
855HAVE_TZSET
856HAVE_TIMEGM
857HAVE_STRPTIME
858HAVE_NANOSLEEP
859HAVE_DECL_LOCALTIME_R
860GNULIB_TZSET
861GNULIB_TIME_RZ
862GNULIB_TIME_R
863GNULIB_TIMEGM
864GNULIB_STRPTIME
865GNULIB_STRFTIME
866GNULIB_NANOSLEEP
867GNULIB_LOCALTIME
868GNULIB_MKTIME
869GNULIB_CTIME
422889f9
CW
870GL_GENERATE_SYSEXITS_H_FALSE
871GL_GENERATE_SYSEXITS_H_TRUE
872SYSEXITS_H
873HAVE_SYSEXITS_H
874NEXT_AS_FIRST_DIRECTIVE_SYSEXITS_H
875NEXT_SYSEXITS_H
00f6db22 876WINDOWS_STAT_INODES
422889f9
CW
877WINDOWS_64_BIT_OFF_T
878NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
879NEXT_SYS_TYPES_H
880HAVE_STRINGS_H
881NEXT_AS_FIRST_DIRECTIVE_STRINGS_H
882NEXT_STRINGS_H
883NEXT_AS_FIRST_DIRECTIVE_STRING_H
884NEXT_STRING_H
422889f9
CW
885HAVE_DECL_STRNCASECMP
886HAVE_STRCASECMP
887HAVE_FFS
888GNULIB_FFS
889NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
890NEXT_STDLIB_H
891NEXT_AS_FIRST_DIRECTIVE_STDIO_H
892NEXT_STDIO_H
893GL_GENERATE_STDINT_H_FALSE
894GL_GENERATE_STDINT_H_TRUE
895STDINT_H
00f6db22
CW
896HAVE_SYS_INTTYPES_H
897HAVE_SYS_BITYPES_H
898HAVE_C99_STDINT_H
422889f9
CW
899WINT_T_SUFFIX
900WCHAR_T_SUFFIX
901SIG_ATOMIC_T_SUFFIX
902SIZE_T_SUFFIX
903PTRDIFF_T_SUFFIX
904HAVE_SIGNED_WINT_T
905HAVE_SIGNED_WCHAR_T
906HAVE_SIGNED_SIG_ATOMIC_T
907BITSIZEOF_WINT_T
908BITSIZEOF_WCHAR_T
909BITSIZEOF_SIG_ATOMIC_T
910BITSIZEOF_SIZE_T
911BITSIZEOF_PTRDIFF_T
422889f9
CW
912HAVE_STDINT_H
913NEXT_AS_FIRST_DIRECTIVE_STDINT_H
914NEXT_STDINT_H
915HAVE_SYS_TYPES_H
916HAVE_INTTYPES_H
917HAVE_WCHAR_H
918HAVE_UNSIGNED_LONG_LONG_INT
919HAVE_LONG_LONG_INT
00f6db22 920GNULIB_OVERRIDES_WINT_T
422889f9
CW
921HAVE__BOOL
922GL_GENERATE_STDBOOL_H_FALSE
923GL_GENERATE_STDBOOL_H_TRUE
924STDBOOL_H
925GL_GENERATE_STDALIGN_H_FALSE
926GL_GENERATE_STDALIGN_H_TRUE
927STDALIGN_H
00f6db22 928GLIBC21
422889f9 929APPLE_UNIVERSAL_BUILD
422889f9 930UNDEFINE_STRTOK_R
422889f9 931REPLACE_STRSIGNAL
422889f9
CW
932REPLACE_STRERROR_R
933REPLACE_STRERROR
00f6db22 934REPLACE_STRTOK_R
422889f9
CW
935REPLACE_STRCASESTR
936REPLACE_STRSTR
00f6db22
CW
937REPLACE_STRNLEN
938REPLACE_STRNDUP
939REPLACE_STRNCAT
422889f9 940REPLACE_STRDUP
00f6db22 941REPLACE_STRCHRNUL
422889f9
CW
942REPLACE_STPNCPY
943REPLACE_MEMMEM
944REPLACE_MEMCHR
945HAVE_STRVERSCMP
946HAVE_DECL_STRSIGNAL
947HAVE_DECL_STRERROR_R
948HAVE_DECL_STRTOK_R
949HAVE_STRCASESTR
950HAVE_STRSEP
951HAVE_STRPBRK
952HAVE_DECL_STRNLEN
953HAVE_DECL_STRNDUP
954HAVE_DECL_STRDUP
955HAVE_STRCHRNUL
956HAVE_STPNCPY
957HAVE_STPCPY
958HAVE_RAWMEMCHR
959HAVE_DECL_MEMRCHR
960HAVE_MEMPCPY
961HAVE_DECL_MEMMEM
962HAVE_MEMCHR
963HAVE_FFSLL
964HAVE_FFSL
00f6db22 965HAVE_EXPLICIT_BZERO
422889f9
CW
966HAVE_MBSLEN
967GNULIB_STRVERSCMP
968GNULIB_STRSIGNAL
969GNULIB_STRERROR_R
970GNULIB_STRERROR
971GNULIB_MBSTOK_R
972GNULIB_MBSSEP
973GNULIB_MBSSPN
974GNULIB_MBSPBRK
975GNULIB_MBSCSPN
976GNULIB_MBSCASESTR
977GNULIB_MBSPCASECMP
978GNULIB_MBSNCASECMP
979GNULIB_MBSCASECMP
980GNULIB_MBSSTR
981GNULIB_MBSRCHR
982GNULIB_MBSCHR
983GNULIB_MBSNLEN
984GNULIB_MBSLEN
985GNULIB_STRTOK_R
986GNULIB_STRCASESTR
987GNULIB_STRSTR
988GNULIB_STRSEP
989GNULIB_STRPBRK
990GNULIB_STRNLEN
991GNULIB_STRNDUP
992GNULIB_STRNCAT
993GNULIB_STRDUP
994GNULIB_STRCHRNUL
995GNULIB_STPNCPY
996GNULIB_STPCPY
997GNULIB_RAWMEMCHR
998GNULIB_MEMRCHR
999GNULIB_MEMPCPY
1000GNULIB_MEMMEM
1001GNULIB_MEMCHR
1002GNULIB_FFSLL
1003GNULIB_FFSL
00f6db22 1004GNULIB_EXPLICIT_BZERO
422889f9
CW
1005LOCALE_FR_UTF8
1006LOCALE_ZH_CN
1007LOCALE_JA
1008REPLACE_WCTOMB
1009REPLACE_UNSETENV
1010REPLACE_STRTOD
1011REPLACE_SETENV
1012REPLACE_REALPATH
1013REPLACE_REALLOC
1014REPLACE_RANDOM_R
00f6db22 1015REPLACE_QSORT_R
422889f9
CW
1016REPLACE_PUTENV
1017REPLACE_PTSNAME_R
1018REPLACE_PTSNAME
1019REPLACE_MKSTEMP
1020REPLACE_MBTOWC
1021REPLACE_MALLOC
1022REPLACE_CANONICALIZE_FILE_NAME
1023REPLACE_CALLOC
1024HAVE_DECL_UNSETENV
1025HAVE_UNLOCKPT
1026HAVE_SYS_LOADAVG_H
1027HAVE_STRUCT_RANDOM_DATA
1028HAVE_STRTOULL
1029HAVE_STRTOLL
1030HAVE_STRTOD
00f6db22 1031HAVE_DECL_SETSTATE
422889f9
CW
1032HAVE_DECL_SETENV
1033HAVE_SETENV
1034HAVE_SECURE_GETENV
1035HAVE_RPMATCH
1036HAVE_REALPATH
00f6db22 1037HAVE_REALLOCARRAY
422889f9
CW
1038HAVE_RANDOM_R
1039HAVE_RANDOM_H
1040HAVE_RANDOM
00f6db22 1041HAVE_QSORT_R
422889f9
CW
1042HAVE_PTSNAME_R
1043HAVE_PTSNAME
1044HAVE_POSIX_OPENPT
1045HAVE_MKSTEMPS
1046HAVE_MKSTEMP
1047HAVE_MKOSTEMPS
1048HAVE_MKOSTEMP
1049HAVE_MKDTEMP
00f6db22 1050HAVE_DECL_INITSTATE
422889f9
CW
1051HAVE_GRANTPT
1052HAVE_GETSUBOPT
1053HAVE_DECL_GETLOADAVG
1054HAVE_CANONICALIZE_FILE_NAME
1055HAVE_ATOLL
1056HAVE__EXIT
1057GNULIB_WCTOMB
1058GNULIB_UNSETENV
1059GNULIB_UNLOCKPT
1060GNULIB_SYSTEM_POSIX
1061GNULIB_STRTOULL
1062GNULIB_STRTOLL
1063GNULIB_STRTOD
1064GNULIB_SETENV
1065GNULIB_SECURE_GETENV
1066GNULIB_RPMATCH
1067GNULIB_REALPATH
1068GNULIB_REALLOC_POSIX
00f6db22 1069GNULIB_REALLOCARRAY
422889f9
CW
1070GNULIB_RANDOM_R
1071GNULIB_RANDOM
00f6db22 1072GNULIB_QSORT_R
422889f9
CW
1073GNULIB_PUTENV
1074GNULIB_PTSNAME_R
1075GNULIB_PTSNAME
1076GNULIB_POSIX_OPENPT
1077GNULIB_MKSTEMPS
1078GNULIB_MKSTEMP
1079GNULIB_MKOSTEMPS
1080GNULIB_MKOSTEMP
1081GNULIB_MKDTEMP
1082GNULIB_MBTOWC
1083GNULIB_MALLOC_POSIX
1084GNULIB_GRANTPT
1085GNULIB_GETSUBOPT
1086GNULIB_GETLOADAVG
1087GNULIB_CANONICALIZE_FILE_NAME
1088GNULIB_CALLOC_POSIX
1089GNULIB_ATOLL
1090GNULIB__EXIT
00f6db22
CW
1091LTLIBMULTITHREAD
1092LIBMULTITHREAD
1093LTLIBTHREAD
1094LIBTHREAD
1095LIBPTH_PREFIX
1096LTLIBPTH
1097LIBPTH
422889f9
CW
1098NEXT_AS_FIRST_DIRECTIVE_LOCALE_H
1099NEXT_LOCALE_H
1100HAVE_XLOCALE_H
1101NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
1102NEXT_STDDEF_H
1103GL_GENERATE_STDDEF_H_FALSE
1104GL_GENERATE_STDDEF_H_TRUE
1105STDDEF_H
1106HAVE_WCHAR_T
00f6db22 1107HAVE_MAX_ALIGN_T
422889f9
CW
1108REPLACE_NULL
1109REPLACE_STRUCT_LCONV
00f6db22 1110REPLACE_FREELOCALE
422889f9 1111REPLACE_DUPLOCALE
00f6db22 1112REPLACE_NEWLOCALE
422889f9
CW
1113REPLACE_SETLOCALE
1114REPLACE_LOCALECONV
00f6db22 1115HAVE_FREELOCALE
422889f9 1116HAVE_DUPLOCALE
00f6db22
CW
1117HAVE_NEWLOCALE
1118GNULIB_LOCALENAME
422889f9
CW
1119GNULIB_DUPLOCALE
1120GNULIB_SETLOCALE
1121GNULIB_LOCALECONV
1122LOCALCHARSET_TESTS_ENVIRONMENT
00f6db22
CW
1123GL_GENERATE_LIMITS_H_FALSE
1124GL_GENERATE_LIMITS_H_TRUE
1125LIMITS_H
1126NEXT_AS_FIRST_DIRECTIVE_LIMITS_H
1127NEXT_LIMITS_H
422889f9
CW
1128HAVE_LANGINFO_YESEXPR
1129HAVE_LANGINFO_ERA
00f6db22 1130HAVE_LANGINFO_ALTMON
422889f9
CW
1131HAVE_LANGINFO_T_FMT_AMPM
1132HAVE_LANGINFO_CODESET
1133HAVE_LANGINFO_H
1134NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H
1135NEXT_LANGINFO_H
1136REPLACE_NL_LANGINFO
1137HAVE_NL_LANGINFO
1138GNULIB_NL_LANGINFO
1139GNULIB_GL_UNISTD_H_GETOPT
00f6db22 1140GETOPT_CDEFS_H
422889f9 1141GETOPT_H
00f6db22 1142HAVE_SYS_CDEFS_H
422889f9
CW
1143HAVE_GETOPT_H
1144NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
1145NEXT_GETOPT_H
422889f9
CW
1146REPLACE_VSPRINTF
1147REPLACE_VSNPRINTF
1148REPLACE_VPRINTF
1149REPLACE_VFPRINTF
1150REPLACE_VDPRINTF
1151REPLACE_VASPRINTF
1152REPLACE_TMPFILE
1153REPLACE_STDIO_WRITE_FUNCS
1154REPLACE_STDIO_READ_FUNCS
1155REPLACE_SPRINTF
1156REPLACE_SNPRINTF
1157REPLACE_RENAMEAT
1158REPLACE_RENAME
1159REPLACE_REMOVE
1160REPLACE_PRINTF
1161REPLACE_POPEN
1162REPLACE_PERROR
1163REPLACE_OBSTACK_PRINTF
1164REPLACE_GETLINE
1165REPLACE_GETDELIM
1166REPLACE_FTELLO
1167REPLACE_FTELL
1168REPLACE_FSEEKO
1169REPLACE_FSEEK
1170REPLACE_FREOPEN
1171REPLACE_FPURGE
1172REPLACE_FPRINTF
1173REPLACE_FOPEN
1174REPLACE_FFLUSH
1175REPLACE_FDOPEN
1176REPLACE_FCLOSE
1177REPLACE_DPRINTF
1178HAVE_VDPRINTF
1179HAVE_VASPRINTF
1180HAVE_RENAMEAT
1181HAVE_POPEN
1182HAVE_PCLOSE
1183HAVE_FTELLO
1184HAVE_FSEEKO
1185HAVE_DPRINTF
1186HAVE_DECL_VSNPRINTF
1187HAVE_DECL_SNPRINTF
1188HAVE_DECL_OBSTACK_PRINTF
1189HAVE_DECL_GETLINE
1190HAVE_DECL_GETDELIM
1191HAVE_DECL_FTELLO
1192HAVE_DECL_FSEEKO
1193HAVE_DECL_FPURGE
1194GNULIB_VSPRINTF_POSIX
1195GNULIB_VSNPRINTF
1196GNULIB_VPRINTF_POSIX
1197GNULIB_VPRINTF
1198GNULIB_VFPRINTF_POSIX
1199GNULIB_VFPRINTF
1200GNULIB_VDPRINTF
1201GNULIB_VSCANF
1202GNULIB_VFSCANF
1203GNULIB_VASPRINTF
1204GNULIB_TMPFILE
1205GNULIB_STDIO_H_SIGPIPE
1206GNULIB_STDIO_H_NONBLOCKING
1207GNULIB_SPRINTF_POSIX
1208GNULIB_SNPRINTF
1209GNULIB_SCANF
1210GNULIB_RENAMEAT
1211GNULIB_RENAME
1212GNULIB_REMOVE
1213GNULIB_PUTS
1214GNULIB_PUTCHAR
1215GNULIB_PUTC
1216GNULIB_PRINTF_POSIX
1217GNULIB_PRINTF
1218GNULIB_POPEN
1219GNULIB_PERROR
1220GNULIB_PCLOSE
1221GNULIB_OBSTACK_PRINTF_POSIX
1222GNULIB_OBSTACK_PRINTF
1223GNULIB_GETLINE
1224GNULIB_GETDELIM
1225GNULIB_GETCHAR
1226GNULIB_GETC
1227GNULIB_FWRITE
1228GNULIB_FTELLO
1229GNULIB_FTELL
1230GNULIB_FSEEKO
1231GNULIB_FSEEK
1232GNULIB_FSCANF
1233GNULIB_FREOPEN
1234GNULIB_FREAD
1235GNULIB_FPUTS
1236GNULIB_FPUTC
1237GNULIB_FPURGE
1238GNULIB_FPRINTF_POSIX
1239GNULIB_FPRINTF
1240GNULIB_FOPEN
1241GNULIB_FGETS
1242GNULIB_FGETC
1243GNULIB_FFLUSH
1244GNULIB_FDOPEN
1245GNULIB_FCLOSE
1246GNULIB_DPRINTF
00f6db22
CW
1247WINDOWS_64_BIT_ST_SIZE
1248WINDOWS_STAT_TIMESPEC
1249NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
1250NEXT_SYS_STAT_H
1251REPLACE_UTIMENSAT
1252REPLACE_STAT
1253REPLACE_MKNOD
1254REPLACE_MKFIFO
1255REPLACE_MKDIR
1256REPLACE_LSTAT
1257REPLACE_FUTIMENS
1258REPLACE_FSTATAT
1259REPLACE_FSTAT
1260HAVE_UTIMENSAT
1261HAVE_MKNODAT
1262HAVE_MKNOD
1263HAVE_MKFIFOAT
1264HAVE_MKFIFO
1265HAVE_MKDIRAT
1266HAVE_LSTAT
1267HAVE_LCHMOD
1268HAVE_FUTIMENS
1269HAVE_FSTATAT
1270HAVE_FCHMODAT
1271GNULIB_OVERRIDES_STRUCT_STAT
1272GNULIB_UTIMENSAT
1273GNULIB_STAT
1274GNULIB_MKNODAT
1275GNULIB_MKNOD
1276GNULIB_MKFIFOAT
1277GNULIB_MKFIFO
1278GNULIB_MKDIRAT
1279GNULIB_LSTAT
1280GNULIB_LCHMOD
1281GNULIB_FUTIMENS
1282GNULIB_FSTATAT
1283GNULIB_FSTAT
1284GNULIB_FCHMODAT
422889f9
CW
1285GL_GENERATE_FNMATCH_H_FALSE
1286GL_GENERATE_FNMATCH_H_TRUE
1287FNMATCH_H
00f6db22
CW
1288HAVE_FNMATCH_H
1289NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H
1290NEXT_FNMATCH_H
1291REPLACE_FNMATCH
1292HAVE_FNMATCH
1293GNULIB_FNMATCH
422889f9
CW
1294REPLACE_ITOLD
1295GL_GENERATE_FLOAT_H_FALSE
1296GL_GENERATE_FLOAT_H_TRUE
1297FLOAT_H
1298NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1299NEXT_FLOAT_H
00f6db22
CW
1300NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1301NEXT_FCNTL_H
1302REPLACE_OPENAT
1303REPLACE_OPEN
1304REPLACE_FCNTL
1305HAVE_OPENAT
1306HAVE_FCNTL
1307GNULIB_OPENAT
1308GNULIB_OPEN
1309GNULIB_NONBLOCKING
1310GNULIB_FCNTL
422889f9
CW
1311EOVERFLOW_VALUE
1312EOVERFLOW_HIDDEN
1313ENOLINK_VALUE
1314ENOLINK_HIDDEN
1315EMULTIHOP_VALUE
1316EMULTIHOP_HIDDEN
1317GL_GENERATE_ERRNO_H_FALSE
1318GL_GENERATE_ERRNO_H_TRUE
1319ERRNO_H
1320NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1321NEXT_ERRNO_H
00f6db22
CW
1322HAVE_DIRENT_H
1323NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1324NEXT_DIRENT_H
422889f9
CW
1325PRAGMA_COLUMNS
1326PRAGMA_SYSTEM_HEADER
1327INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1328INCLUDE_NEXT
00f6db22
CW
1329REPLACE_FDOPENDIR
1330REPLACE_DIRFD
1331REPLACE_CLOSEDIR
1332REPLACE_OPENDIR
1333HAVE_ALPHASORT
1334HAVE_SCANDIR
1335HAVE_FDOPENDIR
1336HAVE_DECL_FDOPENDIR
1337HAVE_DECL_DIRFD
1338HAVE_CLOSEDIR
1339HAVE_REWINDDIR
1340HAVE_READDIR
1341HAVE_OPENDIR
1342GNULIB_ALPHASORT
1343GNULIB_SCANDIR
1344GNULIB_FDOPENDIR
1345GNULIB_DIRFD
1346GNULIB_CLOSEDIR
1347GNULIB_REWINDDIR
1348GNULIB_READDIR
1349GNULIB_OPENDIR
1350HAVE_WINSOCK2_H
1351HAVE_MSVC_INVALID_PARAMETER_HANDLER
1352UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1353UNISTD_H_HAVE_WINSOCK2_H
1354REPLACE_WRITE
1355REPLACE_USLEEP
1356REPLACE_UNLINKAT
1357REPLACE_UNLINK
1358REPLACE_TTYNAME_R
1359REPLACE_TRUNCATE
1360REPLACE_SYMLINKAT
1361REPLACE_SYMLINK
1362REPLACE_SLEEP
1363REPLACE_RMDIR
1364REPLACE_READLINKAT
1365REPLACE_READLINK
1366REPLACE_READ
1367REPLACE_PWRITE
1368REPLACE_PREAD
1369REPLACE_LSEEK
1370REPLACE_LINKAT
1371REPLACE_LINK
1372REPLACE_LCHOWN
1373REPLACE_ISATTY
1374REPLACE_GETPASS
1375REPLACE_GETPAGESIZE
1376REPLACE_GETGROUPS
1377REPLACE_GETLOGIN_R
1378REPLACE_GETDTABLESIZE
1379REPLACE_GETDOMAINNAME
1380REPLACE_GETCWD
1381REPLACE_FTRUNCATE
1382REPLACE_FCHOWNAT
1383REPLACE_FACCESSAT
1384REPLACE_DUP2
1385REPLACE_DUP
1386REPLACE_CLOSE
1387REPLACE_CHOWN
1388HAVE_SYS_PARAM_H
1389HAVE_OS_H
1390HAVE_DECL_TTYNAME_R
1391HAVE_DECL_TRUNCATE
1392HAVE_DECL_SETHOSTNAME
1393HAVE_DECL_GETUSERSHELL
1394HAVE_DECL_GETPAGESIZE
1395HAVE_DECL_GETLOGIN_R
1396HAVE_DECL_GETLOGIN
1397HAVE_DECL_GETDOMAINNAME
1398HAVE_DECL_FDATASYNC
1399HAVE_DECL_FCHDIR
1400HAVE_DECL_ENVIRON
1401HAVE_USLEEP
1402HAVE_UNLINKAT
1403HAVE_SYMLINKAT
1404HAVE_SYMLINK
1405HAVE_SLEEP
1406HAVE_SETHOSTNAME
1407HAVE_READLINKAT
1408HAVE_READLINK
1409HAVE_PWRITE
1410HAVE_PREAD
1411HAVE_PIPE2
1412HAVE_PIPE
1413HAVE_LINKAT
1414HAVE_LINK
1415HAVE_LCHOWN
1416HAVE_GROUP_MEMBER
1417HAVE_GETPASS
1418HAVE_GETPAGESIZE
1419HAVE_GETLOGIN
1420HAVE_GETHOSTNAME
1421HAVE_GETGROUPS
1422HAVE_GETDTABLESIZE
1423HAVE_FTRUNCATE
1424HAVE_FSYNC
1425HAVE_FDATASYNC
1426HAVE_FCHOWNAT
1427HAVE_FCHDIR
1428HAVE_FACCESSAT
1429HAVE_EUIDACCESS
1430HAVE_DUP3
1431HAVE_DUP2
1432HAVE_CHOWN
1433GNULIB_WRITE
1434GNULIB_USLEEP
1435GNULIB_UNLINKAT
1436GNULIB_UNLINK
1437GNULIB_UNISTD_H_SIGPIPE
1438GNULIB_UNISTD_H_NONBLOCKING
1439GNULIB_TTYNAME_R
1440GNULIB_TRUNCATE
1441GNULIB_SYMLINKAT
1442GNULIB_SYMLINK
1443GNULIB_SLEEP
1444GNULIB_SETHOSTNAME
1445GNULIB_RMDIR
1446GNULIB_READLINKAT
1447GNULIB_READLINK
1448GNULIB_READ
1449GNULIB_PWRITE
1450GNULIB_PREAD
1451GNULIB_PIPE2
1452GNULIB_PIPE
1453GNULIB_LSEEK
1454GNULIB_LINKAT
1455GNULIB_LINK
1456GNULIB_LCHOWN
1457GNULIB_ISATTY
1458GNULIB_GROUP_MEMBER
1459GNULIB_GETUSERSHELL
1460GNULIB_GETPASS
1461GNULIB_GETPAGESIZE
1462GNULIB_GETLOGIN_R
1463GNULIB_GETLOGIN
1464GNULIB_GETHOSTNAME
1465GNULIB_GETGROUPS
1466GNULIB_GETDTABLESIZE
1467GNULIB_GETDOMAINNAME
1468GNULIB_GETCWD
1469GNULIB_FTRUNCATE
1470GNULIB_FSYNC
1471GNULIB_FDATASYNC
1472GNULIB_FCHOWNAT
1473GNULIB_FCHDIR
1474GNULIB_FACCESSAT
1475GNULIB_EUIDACCESS
1476GNULIB_ENVIRON
1477GNULIB_DUP3
1478GNULIB_DUP2
1479GNULIB_DUP
1480GNULIB_CLOSE
1481GNULIB_CHOWN
1482GNULIB_CHDIR
1483LOCALE_FR
1484REPLACE_WCSFTIME
1485REPLACE_WCSWIDTH
1486REPLACE_WCWIDTH
1487REPLACE_WCSNRTOMBS
1488REPLACE_WCSRTOMBS
1489REPLACE_WCRTOMB
1490REPLACE_MBSNRTOWCS
1491REPLACE_MBSRTOWCS
1492REPLACE_MBRLEN
1493REPLACE_MBRTOWC
1494REPLACE_MBSINIT
1495REPLACE_WCTOB
1496REPLACE_BTOWC
1497REPLACE_MBSTATE_T
1498HAVE_DECL_WCWIDTH
1499HAVE_DECL_WCTOB
1500HAVE_WCSFTIME
1501HAVE_WCSWIDTH
1502HAVE_WCSTOK
1503HAVE_WCSSTR
1504HAVE_WCSPBRK
1505HAVE_WCSSPN
1506HAVE_WCSCSPN
1507HAVE_WCSRCHR
1508HAVE_WCSCHR
1509HAVE_WCSDUP
1510HAVE_WCSXFRM
1511HAVE_WCSCOLL
1512HAVE_WCSNCASECMP
1513HAVE_WCSCASECMP
1514HAVE_WCSNCMP
1515HAVE_WCSCMP
1516HAVE_WCSNCAT
1517HAVE_WCSCAT
1518HAVE_WCPNCPY
1519HAVE_WCSNCPY
1520HAVE_WCPCPY
1521HAVE_WCSCPY
1522HAVE_WCSNLEN
1523HAVE_WCSLEN
1524HAVE_WMEMSET
1525HAVE_WMEMMOVE
1526HAVE_WMEMCPY
1527HAVE_WMEMCMP
1528HAVE_WMEMCHR
1529HAVE_WCSNRTOMBS
1530HAVE_WCSRTOMBS
1531HAVE_WCRTOMB
1532HAVE_MBSNRTOWCS
1533HAVE_MBSRTOWCS
1534HAVE_MBRLEN
1535HAVE_MBRTOWC
1536HAVE_MBSINIT
1537HAVE_BTOWC
1538GNULIB_WCSFTIME
1539GNULIB_WCSWIDTH
1540GNULIB_WCSTOK
1541GNULIB_WCSSTR
1542GNULIB_WCSPBRK
1543GNULIB_WCSSPN
1544GNULIB_WCSCSPN
1545GNULIB_WCSRCHR
1546GNULIB_WCSCHR
1547GNULIB_WCSDUP
1548GNULIB_WCSXFRM
1549GNULIB_WCSCOLL
1550GNULIB_WCSNCASECMP
1551GNULIB_WCSCASECMP
1552GNULIB_WCSNCMP
1553GNULIB_WCSCMP
1554GNULIB_WCSNCAT
1555GNULIB_WCSCAT
1556GNULIB_WCPNCPY
1557GNULIB_WCSNCPY
1558GNULIB_WCPCPY
1559GNULIB_WCSCPY
1560GNULIB_WCSNLEN
1561GNULIB_WCSLEN
1562GNULIB_WMEMSET
1563GNULIB_WMEMMOVE
1564GNULIB_WMEMCPY
1565GNULIB_WMEMCMP
1566GNULIB_WMEMCHR
1567GNULIB_WCWIDTH
1568GNULIB_WCSNRTOMBS
1569GNULIB_WCSRTOMBS
1570GNULIB_WCRTOMB
1571GNULIB_MBSNRTOWCS
1572GNULIB_MBSRTOWCS
1573GNULIB_MBRLEN
1574GNULIB_MBRTOWC
1575GNULIB_MBSINIT
1576GNULIB_WCTOB
1577GNULIB_BTOWC
1578GL_GENERATE_ALLOCA_H_FALSE
1579GL_GENERATE_ALLOCA_H_TRUE
1580ALLOCA_H
1581ALLOCA
1582GL_COND_LIBTOOL_FALSE
1583GL_COND_LIBTOOL_TRUE
1584BUILD_SHEBANG
1585BUILD_EXEEXT
1586BUILD_CC
1587LIBUTIL
1588HELP2MAN
1589POSUB
1590LTLIBINTL
1591LIBINTL
1592INTLLIBS
1593LTLIBICONV
1594LIBICONV
1595INTL_MACOSX_LIBS
1596XGETTEXT_EXTRA_OPTIONS
1597MSGMERGE
1598XGETTEXT_015
1599XGETTEXT
1600GMSGFMT_015
1601MSGFMT_015
422889f9
CW
1602GMSGFMT
1603MSGFMT
1604GETTEXT_MACRO_VERSION
1605USE_NLS
00f6db22 1606SED
422889f9 1607HAVE_CXX
00f6db22
CW
1608pkgpyexecdir
1609pyexecdir
1610pkgpythondir
1611pythondir
1612PYTHON_PLATFORM
1613PYTHON_EXEC_PREFIX
1614PYTHON_PREFIX
1615PYTHON_VERSION
1616PYTHON
422889f9
CW
1617am__fastdepCCAS_FALSE
1618am__fastdepCCAS_TRUE
1619CCASDEPMODE
1620CCASFLAGS
1621CCAS
1622am__fastdepCXX_FALSE
1623am__fastdepCXX_TRUE
1624CXXDEPMODE
1625ac_ct_CXX
1626CXXFLAGS
1627CXX
1628ARFLAGS
1629AR
1630EGREP
1631GREP
1632CPP
1633LN_S
1634YFLAGS
1635LEXLIB
1636am__fastdepCC_FALSE
1637am__fastdepCC_TRUE
1638CCDEPMODE
1639am__nodep
1640AMDEPBACKSLASH
1641AMDEP_FALSE
1642AMDEP_TRUE
1643am__quote
1644am__include
1645DEPDIR
1646OBJEXT
1647EXEEXT
1648ac_ct_CC
1649CPPFLAGS
1650LDFLAGS
1651CFLAGS
1652CC
1653LEX_OUTPUT_ROOT
1654LEX
1655RANLIB
1656YACC
1657CMP
1658grubdirname
1659bootdirname
1660platform
1661host_kernel
1662TARGET_DECOMPRESSOR_LINK_ADDR
1663TARGET_LINK_ADDR
1664grub_file
1665grub_render_label
1666grub_sparc64_setup
1667grub_set_default
1668grub_script_check
1669grub_reboot
1670grub_probe
1671grub_mkrescue
1672grub_mkrelpath
1673grub_mkpasswd_pbkdf2
1674grub_mklayout
1675grub_glue_efi
1676grub_mkimage
1677grub_mkfont
1678grub_mkconfig
1679grub_install
1680grub_editenv
1681grub_bios_setup
00f6db22
CW
1682PKG_CONFIG_LIBDIR
1683PKG_CONFIG_PATH
1684PKG_CONFIG
422889f9
CW
1685AM_BACKSLASH
1686AM_DEFAULT_VERBOSITY
1687AM_DEFAULT_V
1688AM_V
1689am__untar
1690am__tar
1691AMTAR
1692am__leading_dot
1693SET_MAKE
1694AWK
1695mkdir_p
1696MKDIR_P
1697INSTALL_STRIP_PROGRAM
1698STRIP
1699install_sh
1700MAKEINFO
1701AUTOHEADER
1702AUTOMAKE
1703AUTOCONF
1704ACLOCAL
1705VERSION
1706PACKAGE
1707CYGPATH_W
1708am__isrc
1709INSTALL_DATA
1710INSTALL_SCRIPT
1711INSTALL_PROGRAM
1712target_os
1713target_vendor
1714target_cpu
1715target
1716host_os
1717host_vendor
1718host_cpu
1719host
1720build_os
1721build_vendor
1722build_cpu
1723build
1724target_alias
1725host_alias
1726build_alias
1727LIBS
1728ECHO_T
1729ECHO_N
1730ECHO_C
1731DEFS
1732mandir
1733localedir
1734libdir
1735psdir
1736pdfdir
1737dvidir
1738htmldir
1739infodir
1740docdir
1741oldincludedir
1742includedir
1743runstatedir
1744localstatedir
1745sharedstatedir
1746sysconfdir
1747datadir
1748datarootdir
1749libexecdir
1750sbindir
1751bindir
1752program_transform_name
1753prefix
1754exec_prefix
1755PACKAGE_URL
1756PACKAGE_BUGREPORT
1757PACKAGE_STRING
1758PACKAGE_VERSION
1759PACKAGE_TARNAME
1760PACKAGE_NAME
1761PATH_SEPARATOR
1762SHELL'
1763ac_subst_files=''
1764ac_user_opts='
1765enable_option_checking
1766enable_silent_rules
1767with_platform
1768with_bootdir
1769with_grubdir
1770enable_dependency_tracking
00f6db22
CW
1771enable_largefile
1772enable_threads
422889f9
CW
1773enable_nls
1774with_gnu_ld
1775enable_rpath
1776with_libiconv_prefix
1777with_libintl_prefix
00f6db22 1778with_libpth_prefix
422889f9
CW
1779with_included_regex
1780enable_efiemu
21f95442 1781enable_stack_protector
422889f9
CW
1782enable_mm_debug
1783enable_cache_stats
1784enable_boot_time
1785enable_grub_emu_sdl
1786enable_grub_emu_pci
1787enable_grub_mkfont
1788enable_grub_themes
1789enable_grub_mount
1790enable_device_mapper
1791enable_liblzma
1792enable_libzfs
1793enable_werror
1794'
1795 ac_precious_vars='build_alias
1796host_alias
1797target_alias
00f6db22
CW
1798PKG_CONFIG
1799PKG_CONFIG_PATH
1800PKG_CONFIG_LIBDIR
422889f9
CW
1801CC
1802CFLAGS
1803LDFLAGS
1804LIBS
1805CPPFLAGS
1806YACC
1807YFLAGS
1808CPP
1809CXX
1810CXXFLAGS
1811CCC
1812CCAS
00f6db22
CW
1813CCASFLAGS
1814PYTHON
1815FREETYPE_CFLAGS
1816FREETYPE_LIBS
1817BUILD_FREETYPE_CFLAGS
1818BUILD_FREETYPE_LIBS'
422889f9
CW
1819
1820
1821# Initialize some variables set by options.
1822ac_init_help=
1823ac_init_version=false
1824ac_unrecognized_opts=
1825ac_unrecognized_sep=
1826# The variables have the same names as the options, with
1827# dashes changed to underlines.
1828cache_file=/dev/null
1829exec_prefix=NONE
1830no_create=
1831no_recursion=
1832prefix=NONE
1833program_prefix=NONE
1834program_suffix=NONE
1835program_transform_name=s,x,x,
1836silent=
1837site=
1838srcdir=
1839verbose=
1840x_includes=NONE
1841x_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.)
1849bindir='${exec_prefix}/bin'
1850sbindir='${exec_prefix}/sbin'
1851libexecdir='${exec_prefix}/libexec'
1852datarootdir='${prefix}/share'
1853datadir='${datarootdir}'
1854sysconfdir='${prefix}/etc'
1855sharedstatedir='${prefix}/com'
1856localstatedir='${prefix}/var'
1857runstatedir='${localstatedir}/run'
1858includedir='${prefix}/include'
1859oldincludedir='/usr/include'
1860docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1861infodir='${datarootdir}/info'
1862htmldir='${docdir}'
1863dvidir='${docdir}'
1864pdfdir='${docdir}'
1865psdir='${docdir}'
1866libdir='${exec_prefix}/lib'
1867localedir='${datarootdir}/locale'
1868mandir='${datarootdir}/man'
1869
1870ac_prev=
1871ac_dashdash=
1872for ac_option
1873do
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'
2215Try \`$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
2237done
2238
2239if test -n "$ac_prev"; then
2240 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
2241 as_fn_error $? "missing argument to $ac_option"
2242fi
2243
2244if 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
2250fi
2251
2252# Check all directory arguments for consistency.
2253for 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
2257do
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"
2271done
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.
2276build=$build_alias
2277host=$host_alias
2278target=$target_alias
2279
2280# FIXME: To remove some day.
2281if 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
2287fi
2288
2289ac_tool_prefix=
2290test -n "$host_alias" && ac_tool_prefix=$host_alias-
2291
2292test "$silent" = yes && exec 6>/dev/null
2293
2294
2295ac_pwd=`pwd` && test -n "$ac_pwd" &&
2296ac_ls_di=`ls -di .` &&
2297ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2298 as_fn_error $? "working directory cannot be determined"
2299test "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.
2304if 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
2334else
2335 ac_srcdir_defaulted=no
2336fi
2337if 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"
2340fi
2341ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2342ac_abs_confdir=`(
2343 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
2344 pwd)`
2345# When building in place, set srcdir=.
2346if test "$ac_abs_confdir" = "$ac_pwd"; then
2347 srcdir=.
2348fi
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.
2352case $srcdir in
2353*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2354esac
2355for 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}
2360done
2361
2362#
2363# Report the --help message.
2364#
2365if 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
21f95442 2369\`configure' configures GRUB 2.06 to adapt to many kinds of systems.
422889f9
CW
2370
2371Usage: $0 [OPTION]... [VAR=VALUE]...
2372
2373To assign environment variables (e.g., CC, CFLAGS...), specify them as
2374VAR=VALUE. See below for descriptions of some of the useful variables.
2375
2376Defaults for the options are specified in brackets.
2377
2378Configuration:
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
2389Installation 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
2395By default, \`make install' will install all the files in
2396\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
2397an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2398for instance \`--prefix=\$HOME'.
2399
2400For better control, use the options below.
2401
2402Fine 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
2427Program 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
2432System 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
2437fi
2438
2439if test -n "$ac_init_help"; then
2440 case $ac_init_help in
21f95442 2441 short | recursive ) echo "Configuration of GRUB 2.06:";;
422889f9
CW
2442 esac
2443 cat <<\_ACEOF
2444
2445Optional 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
00f6db22
CW
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
422889f9
CW
2459 --disable-nls do not use Native Language Support
2460 --disable-rpath do not hardcode runtime library paths
422889f9
CW
2461 --enable-efiemu build and install the efiemu runtimes
2462 (default=guessed)
21f95442
CW
2463 --enable-stack-protector
2464 enable the stack protector
422889f9
CW
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
2483Optional 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
00f6db22
CW
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
422889f9
CW
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
2502Some influential environment variables:
00f6db22
CW
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
422889f9
CW
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)
00f6db22
CW
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
422889f9
CW
2535
2536Use these variables to override the choices made by `configure' or to help
2537it to find libraries and programs with nonstandard names/locations.
2538
2539Report bugs to <bug-grub@gnu.org>.
2540_ACEOF
2541ac_status=$?
2542fi
2543
2544if 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
2552case "$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 ;;
2562esac
2563ac_abs_top_builddir=$ac_pwd
2564ac_abs_builddir=$ac_pwd$ac_dir_suffix
2565# for backward compatibility:
2566ac_top_builddir=$ac_top_build_prefix
2567
2568case $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 ;;
2581esac
2582ac_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
2597fi
2598
2599test -n "$ac_init_help" && exit $ac_status
2600if $ac_init_version; then
2601 cat <<\_ACEOF
21f95442 2602GRUB configure 2.06
422889f9
CW
2603generated by GNU Autoconf 2.69
2604
2605Copyright (C) 2012 Free Software Foundation, Inc.
2606This configure script is free software; the Free Software Foundation
2607gives unlimited permission to copy, distribute and modify it.
2608_ACEOF
2609 exit
2610fi
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.
2619ac_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"
2624case "(($ac_try" in
2625 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2626 *) ac_try_echo=$ac_try;;
2627esac
2628eval 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
2643else
2644 $as_echo "$as_me: failed program was:" >&5
2645sed 's/^/| /' conftest.$ac_ext >&5
2646
2647 ac_retval=1
2648fi
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.
2657ac_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"
2662case "(($ac_try" in
2663 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2664 *) ac_try_echo=$ac_try;;
2665esac
2666eval 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
2684else
2685 $as_echo "$as_me: failed program was:" >&5
2686sed 's/^/| /' conftest.$ac_ext >&5
2687
2688 ac_retval=1
2689fi
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.
2703ac_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"
2707case "(($ac_try" in
2708 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2709 *) ac_try_echo=$ac_try;;
2710esac
2711eval 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
2726else
2727 $as_echo "$as_me: failed program was:" >&5
2728sed 's/^/| /' conftest.$ac_ext >&5
2729
2730 ac_retval=1
2731fi
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.
2742ac_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; }
2748if eval \${$3+:} false; then :
2749 $as_echo_n "(cached) " >&6
2750fi
2751eval ac_res=\$$3
2752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2753$as_echo "$ac_res" >&6; }
2754else
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; }
2758cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2759/* end confdefs.h. */
2760$4
2761#include <$2>
2762_ACEOF
2763if ac_fn_c_try_compile "$LINENO"; then :
2764 ac_header_compiler=yes
2765else
2766 ac_header_compiler=no
2767fi
2768rm -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; }
2775cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2776/* end confdefs.h. */
2777#include <$2>
2778_ACEOF
2779if ac_fn_c_try_cpp "$LINENO"; then :
2780 ac_header_preproc=yes
2781else
2782 ac_header_preproc=no
2783fi
2784rm -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?
2789case $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 ;;
2812esac
2813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2814$as_echo_n "checking for $2... " >&6; }
2815if eval \${$3+:} false; then :
2816 $as_echo_n "(cached) " >&6
2817else
2818 eval "$3=\$ac_header_compiler"
2819fi
2820eval ac_res=\$$3
2821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2822$as_echo "$ac_res" >&6; }
2823fi
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.
2832ac_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"
2836case "(($ac_try" in
2837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2838 *) ac_try_echo=$ac_try;;
2839esac
2840eval 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;;
2849esac
2850eval 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
2857else
2858 $as_echo "$as_me: program exited with status $ac_status" >&5
2859 $as_echo "$as_me: failed program was:" >&5
2860sed 's/^/| /' conftest.$ac_ext >&5
2861
2862 ac_retval=$ac_status
2863fi
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.
2874ac_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; }
2879if eval \${$3+:} false; then :
2880 $as_echo_n "(cached) " >&6
2881else
2882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2883/* end confdefs.h. */
2884$4
2885#include <$2>
2886_ACEOF
2887if ac_fn_c_try_compile "$LINENO"; then :
2888 eval "$3=yes"
2889else
2890 eval "$3=no"
2891fi
2892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2893fi
2894eval 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.
2904ac_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"
2909case "(($ac_try" in
2910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2911 *) ac_try_echo=$ac_try;;
2912esac
2913eval 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
2928else
2929 $as_echo "$as_me: failed program was:" >&5
2930sed 's/^/| /' conftest.$ac_ext >&5
2931
2932 ac_retval=1
2933fi
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
2944ac_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.
2949cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2950/* end confdefs.h. */
2951$4
2952int
2953main (void)
2954{
2955static int test_array [1 - 2 * !(($2) >= 0)];
2956test_array [0] = 0;
2957return test_array [0];
2958
2959 ;
2960 return 0;
2961}
2962_ACEOF
2963if 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
2969int
2970main (void)
2971{
2972static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2973test_array [0] = 0;
2974return test_array [0];
2975
2976 ;
2977 return 0;
2978}
2979_ACEOF
2980if ac_fn_c_try_compile "$LINENO"; then :
2981 ac_hi=$ac_mid; break
2982else
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
2989fi
2990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2991 done
2992else
2993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2994/* end confdefs.h. */
2995$4
2996int
2997main (void)
2998{
2999static int test_array [1 - 2 * !(($2) < 0)];
3000test_array [0] = 0;
3001return test_array [0];
3002
3003 ;
3004 return 0;
3005}
3006_ACEOF
3007if 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
3013int
3014main (void)
3015{
3016static int test_array [1 - 2 * !(($2) >= $ac_mid)];
3017test_array [0] = 0;
3018return test_array [0];
3019
3020 ;
3021 return 0;
3022}
3023_ACEOF
3024if ac_fn_c_try_compile "$LINENO"; then :
3025 ac_lo=$ac_mid; break
3026else
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
3033fi
3034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3035 done
3036else
3037 ac_lo= ac_hi=
3038fi
3039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3040fi
3041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3042# Binary search between lo and hi bounds.
3043while 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
3048int
3049main (void)
3050{
3051static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3052test_array [0] = 0;
3053return test_array [0];
3054
3055 ;
3056 return 0;
3057}
3058_ACEOF
3059if ac_fn_c_try_compile "$LINENO"; then :
3060 ac_hi=$ac_mid
3061else
3062 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
3063fi
3064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3065done
3066case $ac_lo in #((
3067?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
3068'') ac_retval=1 ;;
3069esac
3070 else
3071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3072/* end confdefs.h. */
3073$4
3074static long int longval () { return $2; }
3075static unsigned long int ulongval () { return $2; }
3076#include <stdio.h>
3077#include <stdlib.h>
3078int
3079main (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
3107if ac_fn_c_try_run "$LINENO"; then :
3108 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
3109else
3110 ac_retval=1
3111fi
3112rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3113 conftest.$ac_objext conftest.beam conftest.$ac_ext
3114rm -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
3125ac_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; }
3130if eval \${$3+:} false; then :
3131 $as_echo_n "(cached) " >&6
3132else
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
3156extern "C"
3157#endif
3158char $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
3163choke me
3164#endif
3165
3166int
3167main (void)
3168{
3169return $2 ();
3170 ;
3171 return 0;
3172}
3173_ACEOF
3174if ac_fn_c_try_link "$LINENO"; then :
3175 eval "$3=yes"
3176else
3177 eval "$3=no"
3178fi
3179rm -f core conftest.err conftest.$ac_objext \
3180 conftest$ac_exeext conftest.$ac_ext
3181fi
3182eval 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.
3193ac_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; }
3198if eval \${$4+:} false; then :
3199 $as_echo_n "(cached) " >&6
3200else
3201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3202/* end confdefs.h. */
3203$5
3204int
3205main (void)
3206{
3207static $2 ac_aggr;
3208if (ac_aggr.$3)
3209return 0;
3210 ;
3211 return 0;
3212}
3213_ACEOF
3214if ac_fn_c_try_compile "$LINENO"; then :
3215 eval "$4=yes"
3216else
3217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3218/* end confdefs.h. */
3219$5
3220int
3221main (void)
3222{
3223static $2 ac_aggr;
3224if (sizeof ac_aggr.$3)
3225return 0;
3226 ;
3227 return 0;
3228}
3229_ACEOF
3230if ac_fn_c_try_compile "$LINENO"; then :
3231 eval "$4=yes"
3232else
3233 eval "$4=no"
3234fi
3235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3236fi
3237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3238fi
3239eval 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.
3250ac_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; }
3255if eval \${$3+:} false; then :
3256 $as_echo_n "(cached) " >&6
3257else
3258 eval "$3=no"
3259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3260/* end confdefs.h. */
3261$4
3262int
3263main (void)
3264{
3265if (sizeof ($2))
3266 return 0;
3267 ;
3268 return 0;
3269}
3270_ACEOF
3271if ac_fn_c_try_compile "$LINENO"; then :
3272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3273/* end confdefs.h. */
3274$4
3275int
3276main (void)
3277{
3278if (sizeof (($2)))
3279 return 0;
3280 ;
3281 return 0;
3282}
3283_ACEOF
3284if ac_fn_c_try_compile "$LINENO"; then :
3285
3286else
3287 eval "$3=yes"
3288fi
3289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3290fi
3291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3292fi
3293eval 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.
3304ac_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; }
3311if eval \${$3+:} false; then :
3312 $as_echo_n "(cached) " >&6
3313else
3314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3315/* end confdefs.h. */
3316$4
3317int
3318main (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
3332if ac_fn_c_try_compile "$LINENO"; then :
3333 eval "$3=yes"
3334else
3335 eval "$3=no"
3336fi
3337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3338fi
3339eval 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
3345cat >config.log <<_ACEOF
3346This file contains any messages produced by compilers while
3347running configure, to aid debugging if configure makes a mistake.
3348
21f95442 3349It was created by GRUB $as_me 2.06, which was
422889f9
CW
3350generated by GNU Autoconf 2.69. Invocation command line was
3351
3352 $ $0 $@
3353
3354_ACEOF
3355exec 5>>config.log
3356{
3357cat <<_ASUNAME
3358## --------- ##
3359## Platform. ##
3360## --------- ##
3361
3362hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3363uname -m = `(uname -m) 2>/dev/null || echo unknown`
3364uname -r = `(uname -r) 2>/dev/null || echo unknown`
3365uname -s = `(uname -s) 2>/dev/null || echo unknown`
3366uname -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
3381as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3382for as_dir in $PATH
3383do
3384 IFS=$as_save_IFS
3385 test -z "$as_dir" && as_dir=.
3386 $as_echo "PATH: $as_dir"
3387 done
3388IFS=$as_save_IFS
3389
3390} >&5
3391
3392cat >&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.
3407ac_configure_args=
3408ac_configure_args0=
3409ac_configure_args1=
3410ac_must_keep_next=false
3411for ac_pass in 1 2
3412do
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
3446done
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.
3455trap '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
3542for ac_signal in 1 2 13 15; do
3543 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3544done
3545ac_signal=0
3546
3547# confdefs.h avoids OS command line length limits that DEFS can exceed.
3548rm -f -r conftest* confdefs.h
3549
3550$as_echo "/* confdefs.h */" > confdefs.h
3551
3552# Predefined preprocessor variables.
3553
3554cat >>confdefs.h <<_ACEOF
3555#define PACKAGE_NAME "$PACKAGE_NAME"
3556_ACEOF
3557
3558cat >>confdefs.h <<_ACEOF
3559#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3560_ACEOF
3561
3562cat >>confdefs.h <<_ACEOF
3563#define PACKAGE_VERSION "$PACKAGE_VERSION"
3564_ACEOF
3565
3566cat >>confdefs.h <<_ACEOF
3567#define PACKAGE_STRING "$PACKAGE_STRING"
3568_ACEOF
3569
3570cat >>confdefs.h <<_ACEOF
3571#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3572_ACEOF
3573
3574cat >>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.
3581ac_site_file1=NONE
3582ac_site_file2=NONE
3583if 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
3590elif test "x$prefix" != xNONE; then
3591 ac_site_file1=$prefix/share/config.site
3592 ac_site_file2=$prefix/etc/config.site
3593else
3594 ac_site_file1=$ac_default_prefix/share/config.site
3595 ac_site_file2=$ac_default_prefix/etc/config.site
3596fi
3597for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3598do
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;}
3607as_fn_error $? "failed to load site script $ac_site_file
3608See \`config.log' for more details" "$LINENO" 5; }
3609 fi
3610done
3611
3612if 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
3623else
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
3627fi
3628
3629gt_needs="$gt_needs "
00f6db22 3630as_fn_append ac_header_list " sys/types.h"
422889f9
CW
3631as_fn_append ac_func_list " flockfile"
3632as_fn_append ac_func_list " funlockfile"
3633as_fn_append ac_header_list " features.h"
3634as_fn_append ac_header_list " linewrap.h"
3635as_fn_append ac_func_list " btowc"
00f6db22
CW
3636as_fn_append ac_header_list " unistd.h"
3637as_fn_append ac_header_list " sys/param.h"
3638as_fn_append ac_func_list " _set_invalid_parameter_handler"
3639as_fn_append ac_header_list " sys/socket.h"
3640as_fn_append ac_func_list " fchdir"
3641as_fn_append ac_header_list " dirent.h"
3642as_fn_append ac_func_list " fcntl"
3643as_fn_append ac_func_list " symlink"
3644as_fn_append ac_func_list " mempcpy"
3645as_fn_append ac_header_list " fnmatch.h"
3646as_fn_append ac_func_list " fnmatch"
422889f9
CW
3647as_fn_append ac_func_list " isblank"
3648as_fn_append ac_func_list " iswctype"
3649as_fn_append ac_func_list " mbsrtowcs"
422889f9
CW
3650as_fn_append ac_func_list " wmemchr"
3651as_fn_append ac_func_list " wmemcpy"
3652as_fn_append ac_func_list " wmempcpy"
3653as_fn_append ac_header_list " wctype.h"
00f6db22 3654as_fn_append ac_header_list " sys/stat.h"
422889f9 3655as_fn_append ac_func_list " getdelim"
00f6db22 3656as_fn_append ac_func_list " getdtablesize"
422889f9
CW
3657gl_getopt_required=GNU
3658as_fn_append ac_header_list " getopt.h"
00f6db22
CW
3659as_fn_append ac_header_list " sys/cdefs.h"
3660as_fn_append ac_func_list " getprogname"
3661as_fn_append ac_func_list " getexecname"
422889f9 3662as_fn_append ac_header_list " langinfo.h"
00f6db22 3663as_fn_append ac_header_list " limits.h"
422889f9
CW
3664as_fn_append ac_header_list " xlocale.h"
3665as_fn_append ac_func_list " mbsinit"
3666as_fn_append ac_func_list " mbrtowc"
3667as_fn_append ac_header_list " wchar.h"
3668as_fn_append ac_func_list " isascii"
3669as_fn_append ac_header_list " sys/mman.h"
3670as_fn_append ac_func_list " mprotect"
422889f9 3671as_fn_append ac_func_list " nl_langinfo"
00f6db22
CW
3672as_fn_append ac_func_list " lstat"
3673as_fn_append ac_func_list " openat"
3674as_fn_append ac_header_list " malloc.h"
422889f9 3675as_fn_append ac_func_list " sleep"
00f6db22 3676as_fn_append ac_header_list " sys/time.h"
422889f9 3677as_fn_append ac_header_list " stdint.h"
00f6db22 3678as_fn_append ac_func_list " strdup"
422889f9
CW
3679as_fn_append ac_header_list " strings.h"
3680as_fn_append ac_func_list " strndup"
3681as_fn_append ac_header_list " sysexits.h"
00f6db22 3682as_fn_append ac_func_list " pipe"
422889f9
CW
3683as_fn_append ac_func_list " vasnprintf"
3684as_fn_append ac_func_list " snprintf"
00f6db22 3685as_fn_append ac_header_list " crtdefs.h"
422889f9
CW
3686as_fn_append ac_func_list " wcrtomb"
3687as_fn_append ac_func_list " iswcntrl"
3688as_fn_append ac_func_list " wcwidth"
3689# Check that the precious variables saved in the cache have kept the same
3690# value.
3691ac_cache_corrupted=false
3692for 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
3738done
3739if $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
3745fi
3746## -------------------- ##
3747## Main body of script. ##
3748## -------------------- ##
3749
3750ac_ext=c
3751ac_cpp='$CPP $CPPFLAGS'
3752ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3753ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3754ac_compiler_gnu=$ac_cv_c_compiler_gnu
3755
3756
3757
3758ac_aux_dir=
3759for 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
3773done
3774if 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
3776fi
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.
3782ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3783ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3784ac_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; }
3798if ${ac_cv_build+:} false; then :
3799 $as_echo_n "(cached) " >&6
3800else
3801 ac_build_alias=$build_alias
3802test "x$ac_build_alias" = x &&
3803 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3804test "x$ac_build_alias" = x &&
3805 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
3806ac_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
3809fi
3810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3811$as_echo "$ac_cv_build" >&6; }
3812case $ac_cv_build in
3813*-*-*) ;;
3814*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
3815esac
3816build=$ac_cv_build
3817ac_save_IFS=$IFS; IFS='-'
3818set x $ac_cv_build
3819shift
3820build_cpu=$1
3821build_vendor=$2
3822shift; shift
3823# Remember, the first character of IFS is used to create $*,
3824# except with old shells:
3825build_os=$*
3826IFS=$ac_save_IFS
3827case $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; }
3832if ${ac_cv_host+:} false; then :
3833 $as_echo_n "(cached) " >&6
3834else
3835 if test "x$host_alias" = x; then
3836 ac_cv_host=$ac_cv_build
3837else
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
3840fi
3841
3842fi
3843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3844$as_echo "$ac_cv_host" >&6; }
3845case $ac_cv_host in
3846*-*-*) ;;
3847*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
3848esac
3849host=$ac_cv_host
3850ac_save_IFS=$IFS; IFS='-'
3851set x $ac_cv_host
3852shift
3853host_cpu=$1
3854host_vendor=$2
3855shift; shift
3856# Remember, the first character of IFS is used to create $*,
3857# except with old shells:
3858host_os=$*
3859IFS=$ac_save_IFS
3860case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3861
3862
3863save_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; }
3866if ${ac_cv_target+:} false; then :
3867 $as_echo_n "(cached) " >&6
3868else
3869 if test "x$target_alias" = x; then
3870 ac_cv_target=$ac_cv_host
3871else
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
3874fi
3875
3876fi
3877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
3878$as_echo "$ac_cv_target" >&6; }
3879case $ac_cv_target in
3880*-*-*) ;;
3881*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
3882esac
3883target=$ac_cv_target
3884ac_save_IFS=$IFS; IFS='-'
3885set x $ac_cv_target
3886shift
3887target_cpu=$1
3888target_vendor=$2
3889shift; shift
3890# Remember, the first character of IFS is used to create $*,
3891# except with old shells:
3892target_os=$*
3893IFS=$ac_save_IFS
3894case $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.
3899test -n "$target_alias" &&
3900 test "$program_prefix$program_suffix$program_transform_name" = \
3901 NONENONEs,x,x, &&
3902 program_prefix=${target_alias}-
3903program_prefix="${save_program_prefix}"
3904
3905am__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; }
3923if test -z "$INSTALL"; then
3924if ${ac_cv_path_install+:} false; then :
3925 $as_echo_n "(cached) " >&6
3926else
3927 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3928for as_dir in $PATH
3929do
3930 IFS=$as_save_IFS
3931 test -z "$as_dir" && as_dir=.
3932 # Account for people who put trailing slashes in PATH elements.
3933case $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 ;;
3971esac
3972
3973 done
3974IFS=$as_save_IFS
3975
3976rm -rf conftest.one conftest.two conftest.dir
3977
3978fi
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
3988fi
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.
3994test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3995
3996test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3997
3998test -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.
4004am_lf='
4005'
4006case `pwd` in
4007 *[\\\"\#\$\&\'\`$am_lf]*)
4008 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
4009esac
4010case $srcdir in
4011 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
4012 as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
4013esac
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).
4020if (
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 )
4048then
4049 # Ok.
4050 :
4051else
4052 as_fn_error $? "newly created file is older than distributed files!
4053Check your system clock" "$LINENO" 5
4054fi
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.
4059am_sleep_pid=
4060if grep 'slept: no' conftest.file >/dev/null 2>&1; then
4061 ( sleep 1 ) &
4062 am_sleep_pid=$!
4063fi
4064
4065rm -f conftest.file
4066
4067test "$program_prefix" != NONE &&
4068 program_transform_name="s&^&$program_prefix&;$program_transform_name"
4069# Use a double $ so make ignores it.
4070test "$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.
4074ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
4075program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
4076
4077# Expand $ac_aux_dir to an absolute path.
4078am_aux_dir=`cd "$ac_aux_dir" && pwd`
4079
4080if 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
4087fi
4088# Use eval to expand $SHELL
4089if eval "$MISSING --is-lightweight"; then
4090 am_missing_run="$MISSING "
4091else
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;}
4095fi
4096
4097if 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
4104fi
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.
4110if 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.
4113set 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; }
4116if ${ac_cv_prog_STRIP+:} false; then :
4117 $as_echo_n "(cached) " >&6
4118else
4119 if test -n "$STRIP"; then
4120 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4121else
4122as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4123for as_dir in $PATH
4124do
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
4133done
4134 done
4135IFS=$as_save_IFS
4136
4137fi
4138fi
4139STRIP=$ac_cv_prog_STRIP
4140if test -n "$STRIP"; then
4141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4142$as_echo "$STRIP" >&6; }
4143else
4144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4145$as_echo "no" >&6; }
4146fi
4147
4148
4149fi
4150if 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.
4153set 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; }
4156if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
4157 $as_echo_n "(cached) " >&6
4158else
4159 if test -n "$ac_ct_STRIP"; then
4160 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4161else
4162as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4163for as_dir in $PATH
4164do
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
4173done
4174 done
4175IFS=$as_save_IFS
4176
4177fi
4178fi
4179ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4180if 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; }
4183else
4184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4185$as_echo "no" >&6; }
4186fi
4187
4188 if test "x$ac_ct_STRIP" = x; then
4189 STRIP=":"
4190 else
4191 case $cross_compiling:$ac_tool_warned in
4192yes:)
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;}
4195ac_tool_warned=yes ;;
4196esac
4197 STRIP=$ac_ct_STRIP
4198 fi
4199else
4200 STRIP="$ac_cv_prog_STRIP"
4201fi
4202
4203fi
4204INSTALL_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; }
4208if test -z "$MKDIR_P"; then
4209 if ${ac_cv_path_mkdir+:} false; then :
4210 $as_echo_n "(cached) " >&6
4211else
4212 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4213for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
4214do
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
4230IFS=$as_save_IFS
4231
4232fi
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
4244fi
4245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
4246$as_echo "$MKDIR_P" >&6; }
4247
4248for ac_prog in gawk mawk nawk awk
4249do
4250 # Extract the first word of "$ac_prog", so it can be a program name with args.
4251set 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; }
4254if ${ac_cv_prog_AWK+:} false; then :
4255 $as_echo_n "(cached) " >&6
4256else
4257 if test -n "$AWK"; then
4258 ac_cv_prog_AWK="$AWK" # Let the user override the test.
4259else
4260as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4261for as_dir in $PATH
4262do
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
4271done
4272 done
4273IFS=$as_save_IFS
4274
4275fi
4276fi
4277AWK=$ac_cv_prog_AWK
4278if test -n "$AWK"; then
4279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4280$as_echo "$AWK" >&6; }
4281else
4282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4283$as_echo "no" >&6; }
4284fi
4285
4286
4287 test -n "$AWK" && break
4288done
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; }
4292set x ${MAKE-make}
4293ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4294if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
4295 $as_echo_n "(cached) " >&6
4296else
4297 cat >conftest.make <<\_ACEOF
4298SHELL = /bin/sh
4299all:
4300 @echo '@@@%%%=$(MAKE)=@@@%%%'
4301_ACEOF
4302# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
4303case `${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;;
4308esac
4309rm -f conftest.make
4310fi
4311if 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=
4315else
4316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4317$as_echo "no" >&6; }
4318 SET_MAKE="MAKE=${MAKE-make}"
4319fi
4320
4321rm -rf .tst 2>/dev/null
4322mkdir .tst 2>/dev/null
4323if test -d .tst; then
4324 am__leading_dot=.
4325else
4326 am__leading_dot=_
4327fi
4328rmdir .tst 2>/dev/null
4329
4330# Check whether --enable-silent-rules was given.
4331if test "${enable_silent_rules+set}" = set; then :
4332 enableval=$enable_silent_rules;
4333fi
4334
4335case $enable_silent_rules in # (((
4336 yes) AM_DEFAULT_VERBOSITY=0;;
4337 no) AM_DEFAULT_VERBOSITY=1;;
4338 *) AM_DEFAULT_VERBOSITY=1;;
4339esac
4340am_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; }
4343if ${am_cv_make_support_nested_variables+:} false; then :
4344 $as_echo_n "(cached) " >&6
4345else
4346 if $as_echo 'TRUE=$(BAR$(V))
4347BAR0=false
4348BAR1=true
4349V=1
4350am__doit:
4351 @$(TRUE)
4352.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
4353 am_cv_make_support_nested_variables=yes
4354else
4355 am_cv_make_support_nested_variables=no
4356fi
4357fi
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; }
4360if test $am_cv_make_support_nested_variables = yes; then
4361 AM_V='$(V)'
4362 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
4363else
4364 AM_V=$AM_DEFAULT_VERBOSITY
4365 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
4366fi
4367AM_BACKSLASH='\'
4368
4369if 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
4377fi
4378
4379# test whether we have cygpath
4380if 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
4386fi
4387
4388
4389# Define the identity of the package.
4390 PACKAGE='grub'
21f95442 4391 VERSION='2.06'
422889f9
CW
4392
4393
4394cat >>confdefs.h <<_ACEOF
4395#define PACKAGE "$PACKAGE"
4396_ACEOF
4397
4398
4399cat >>confdefs.h <<_ACEOF
4400#define VERSION "$VERSION"
4401_ACEOF
4402
4403# Some tools Automake needs.
4404
4405ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
4406
4407
4408AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
4409
4410
4411AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
4412
4413
4414AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
4415
4416
4417MAKEINFO=${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>
4423mkdir_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 ...
4429AMTAR='$${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
4435am__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.
4450if rm -f && rm -fr && rm -rf; then : OK; else
4451 cat >&2 <<'END'
4452Oops!
4453
4454Your 'rm' program seems unable to run without file operands specified
4455on the command line, even when the '-f' option is present. This is contrary
4456to the behaviour of most rm programs out there, and not conforming with
4457the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
4458
4459Please tell bug-automake@gnu.org about your system, including the value
4460of your $PATH and any error possibly output before this message. This
4461can help us improve future automake versions.
4462
4463END
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'
4470Aborting the configuration process, to ensure you take notice of the issue.
4471
4472You can download and install GNU coreutils to get an 'rm' implementation
4473that behaves properly: <http://www.gnu.org/software/coreutils/>.
4474
4475If you want to complete the configuration process using your problematic
4476'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
4477to "yes", and re-run configure.
4478
4479END
4480 as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
4481 fi
4482fi
4483
4484
4485
4486ac_config_headers="$ac_config_headers config-util.h"
4487
4488
00f6db22
CW
4489# Explicitly check for pkg-config early on, since otherwise conditional
4490# calls are problematic.
422889f9 4491
422889f9 4492
422889f9 4493
00f6db22
CW
4494
4495
4496
4497
4498if 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.
4501set 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; }
4504if ${ac_cv_path_PKG_CONFIG+:} false; then :
4505 $as_echo_n "(cached) " >&6
4506else
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
4513for as_dir in $PATH
4514do
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
4523done
4524 done
4525IFS=$as_save_IFS
4526
4527 ;;
4528esac
4529fi
4530PKG_CONFIG=$ac_cv_path_PKG_CONFIG
4531if test -n "$PKG_CONFIG"; then
4532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
4533$as_echo "$PKG_CONFIG" >&6; }
4534else
4535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4536$as_echo "no" >&6; }
4537fi
4538
4539
4540fi
4541if 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.
4544set 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; }
4547if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
4548 $as_echo_n "(cached) " >&6
4549else
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
4556for as_dir in $PATH
4557do
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
4566done
4567 done
4568IFS=$as_save_IFS
4569
4570 ;;
4571esac
4572fi
4573ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
4574if 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; }
4577else
4578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4579$as_echo "no" >&6; }
4580fi
4581
4582 if test "x$ac_pt_PKG_CONFIG" = x; then
4583 PKG_CONFIG=""
4584 else
4585 case $cross_compiling:$ac_tool_warned in
4586yes:)
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;}
4589ac_tool_warned=yes ;;
4590esac
4591 PKG_CONFIG=$ac_pt_PKG_CONFIG
4592 fi
4593else
4594 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
4595fi
4596
4597fi
4598if 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
4610fi
4611
4612# Program name transformations
4613
4614grub_bios_setup=`$as_echo grub-bios-setup | sed "$program_transform_name"`
4615
4616grub_editenv=`$as_echo grub-editenv | sed "$program_transform_name"`
4617
4618grub_install=`$as_echo grub-install | sed "$program_transform_name"`
422889f9
CW
4619
4620grub_mkconfig=`$as_echo grub-mkconfig | sed "$program_transform_name"`
4621
4622grub_mkfont=`$as_echo grub-mkfont | sed "$program_transform_name"`
4623
4624grub_mkimage=`$as_echo grub-mkimage | sed "$program_transform_name"`
4625
4626grub_glue_efi=`$as_echo grub-glue-efi | sed "$program_transform_name"`
4627
4628grub_mklayout=`$as_echo grub-mklayout | sed "$program_transform_name"`
4629
4630grub_mkpasswd_pbkdf2=`$as_echo grub-mkpasswd-pbkdf2 | sed "$program_transform_name"`
4631
4632grub_mkrelpath=`$as_echo grub-mkrelpath | sed "$program_transform_name"`
4633
4634grub_mkrescue=`$as_echo grub-mkrescue | sed "$program_transform_name"`
4635
4636grub_probe=`$as_echo grub-probe | sed "$program_transform_name"`
4637
4638grub_reboot=`$as_echo grub-reboot | sed "$program_transform_name"`
4639
4640grub_script_check=`$as_echo grub-script-check | sed "$program_transform_name"`
4641
4642grub_set_default=`$as_echo grub-set-default | sed "$program_transform_name"`
4643
4644grub_sparc64_setup=`$as_echo grub-sparc64-setup | sed "$program_transform_name"`
4645
4646grub_render_label=`$as_echo grub-render-label | sed "$program_transform_name"`
4647
4648grub_file=`$as_echo grub-file | sed "$program_transform_name"`
4649
4650
4651# Optimization flag. Allow user to override.
4652if test "x$TARGET_CFLAGS" = x; then
21f95442 4653 TARGET_CFLAGS=-Os
422889f9
CW
4654fi
4655
21f95442
CW
4656# Enable support for "restrict" keyword and other
4657# features from gnu99 C language standard.
4658BUILD_CFLAGS="-std=gnu99 $BUILD_CFLAGS"
4659HOST_CFLAGS="-std=gnu99 $HOST_CFLAGS"
4660TARGET_CFLAGS="-std=gnu99 $TARGET_CFLAGS"
4661
422889f9
CW
4662# Default HOST_CPPFLAGS
4663HOST_CPPFLAGS="$HOST_CPPFLAGS -Wall -W"
4664HOST_CPPFLAGS="$HOST_CPPFLAGS -DGRUB_UTIL=1"
4665
4666TARGET_CPPFLAGS="$TARGET_CPPFLAGS -Wall -W"
4667
4668case "$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 ;;
00f6db22
CW
4686 riscv32*)
4687 target_cpu=riscv32
4688 ;;
4689 riscv64*)
4690 target_cpu=riscv64
4691 ;;
422889f9
CW
4692esac
4693
4694# Specify the platform (such as firmware).
4695
4696# Check whether --with-platform was given.
4697if test "${with_platform+set}" = set; then :
4698 withval=$with_platform;
4699fi
4700
4701
4702# Guess the platform if not specified.
4703if 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 ;;
00f6db22
CW
4718 riscv32-*) platform=efi ;;
4719 riscv64-*) platform=efi ;;
422889f9
CW
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
4726else
4727 platform="$with_platform"
4728fi
4729
4730case "$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 ;;
4738esac
4739
4740# Check if the platform is supported, make final adjustments.
4741case "$target_cpu"-"$platform" in
4742 i386-efi) ;;
4743 x86_64-efi) ;;
4744 i386-xen) ;;
00f6db22 4745 i386-xen_pvh) ;;
422889f9
CW
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) ;;
00f6db22 4766 arm-coreboot) ;;
422889f9
CW
4767 arm-efi) ;;
4768 arm64-efi) ;;
00f6db22
CW
4769 riscv32-efi) ;;
4770 riscv64-efi) ;;
422889f9
CW
4771 *-emu) ;;
4772 *-none) ;;
4773 *) as_fn_error $? "platform \"$platform\" is not supported for target CPU \"$target_cpu\"" "$LINENO" 5 ;;
4774esac
4775
4776if 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
4781fi
4782
4783if test x"$target_cpu-$platform" = xsparc64-emu ; then
4784 target_m64=1
4785fi
4786
4787case "$target_os" in
4788 windows* | mingw32*) target_os=cygwin ;;
4789esac
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).
4794case "$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 ;;
4802esac
4803
4804case "$host_os" in
00f6db22
CW
4805 cygwin) have_exec=y ;;
4806 windows* | mingw32*) have_exec=n ;;
422889f9
CW
4807 aros*) have_exec=n ;;
4808 *) have_exec=y;;
4809esac
4810
4811case "$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" ;;
00f6db22 4816 xen_pvh) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_XEN_PVH=1" ;;
422889f9
CW
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" ;;
4825esac
4826if test x${target_cpu} = xmipsel ; then
4827 machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE=`echo mips_$platform | sed y,abcdefghijklmnopqrstuvwxyz,ABCDEFGHIJKLMNOPQRSTUVWXYZ,`"
4828else
4829 machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE=`echo ${target_cpu}_$platform | sed y,abcdefghijklmnopqrstuvwxyz,ABCDEFGHIJKLMNOPQRSTUVWXYZ,`"
4830fi
4831
4832case "${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 ;;
4844esac
4845
4846
4847
4848
4849TARGET_CPPFLAGS="$TARGET_CPPFLAGS $machine_CPPFLAGS"
4850
4851
4852
4853
4854
4855
4856
4857
4858# Define default variables
4859
4860have_with_bootdir=n
4861
4862# Check whether --with-bootdir was given.
4863if test "${with_bootdir+set}" = set; then :
4864 withval=$with_bootdir; have_with_bootdir=y
4865else
4866 have_with_bootdir=n
4867fi
4868
4869if test x$have_with_bootdir = xy; then
4870 bootdirname="$with_bootdir"
4871else
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
4878fi
4879
4880
4881
4882cat >>confdefs.h <<_ACEOF
4883#define GRUB_BOOT_DIR_NAME "$bootdirname"
4884_ACEOF
4885
4886
4887
4888# Check whether --with-grubdir was given.
4889if test "${with_grubdir+set}" = set; then :
4890 withval=$with_grubdir; grubdirname="$with_grubdir"
4891else
4892 grubdirname="$PACKAGE"
4893fi
4894
4895
4896
4897
4898cat >>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.
4909for ac_prog in cmp
4910do
4911 # Extract the first word of "$ac_prog", so it can be a program name with args.
4912set 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; }
4915if ${ac_cv_prog_CMP+:} false; then :
4916 $as_echo_n "(cached) " >&6
4917else
4918 if test -n "$CMP"; then
4919 ac_cv_prog_CMP="$CMP" # Let the user override the test.
4920else
4921as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4922for as_dir in $PATH
4923do
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
4932done
4933 done
4934IFS=$as_save_IFS
4935
4936fi
4937fi
4938CMP=$ac_cv_prog_CMP
4939if test -n "$CMP"; then
4940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4941$as_echo "$CMP" >&6; }
4942else
4943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4944$as_echo "no" >&6; }
4945fi
4946
4947
4948 test -n "$CMP" && break
4949done
4950
4951if test "x$CMP" = x; then
4952 as_fn_error $? "cmp is not found" "$LINENO" 5
4953fi
4954
4955for ac_prog in bison
4956do
4957 # Extract the first word of "$ac_prog", so it can be a program name with args.
4958set 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; }
4961if ${ac_cv_prog_YACC+:} false; then :
4962 $as_echo_n "(cached) " >&6
4963else
4964 if test -n "$YACC"; then
4965 ac_cv_prog_YACC="$YACC" # Let the user override the test.
4966else
4967as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4968for as_dir in $PATH
4969do
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
4978done
4979 done
4980IFS=$as_save_IFS
4981
4982fi
4983fi
4984YACC=$ac_cv_prog_YACC
4985if test -n "$YACC"; then
4986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
4987$as_echo "$YACC" >&6; }
4988else
4989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4990$as_echo "no" >&6; }
4991fi
4992
4993
4994 test -n "$YACC" && break
4995done
4996
4997if test "x$YACC" = x; then
4998 as_fn_error $? "bison is not found" "$LINENO" 5
4999fi
5000
5001if 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.
5003set 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; }
5006if ${ac_cv_prog_RANLIB+:} false; then :
5007 $as_echo_n "(cached) " >&6
5008else
5009 if test -n "$RANLIB"; then
5010 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5011else
5012as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5013for as_dir in $PATH
5014do
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
5023done
5024 done
5025IFS=$as_save_IFS
5026
5027fi
5028fi
5029RANLIB=$ac_cv_prog_RANLIB
5030if test -n "$RANLIB"; then
5031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5032$as_echo "$RANLIB" >&6; }
5033else
5034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5035$as_echo "no" >&6; }
5036fi
5037
5038
5039fi
5040if 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.
5043set 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; }
5046if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
5047 $as_echo_n "(cached) " >&6
5048else
5049 if test -n "$ac_ct_RANLIB"; then
5050 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5051else
5052as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5053for as_dir in $PATH
5054do
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
5063done
5064 done
5065IFS=$as_save_IFS
5066
5067fi
5068fi
5069ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5070if 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; }
5073else
5074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5075$as_echo "no" >&6; }
5076fi
5077
5078 if test "x$ac_ct_RANLIB" = x; then
5079 RANLIB=":"
5080 else
5081 case $cross_compiling:$ac_tool_warned in
5082yes:)
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;}
5085ac_tool_warned=yes ;;
5086esac
5087 RANLIB=$ac_ct_RANLIB
5088 fi
5089else
5090 RANLIB="$ac_cv_prog_RANLIB"
5091fi
5092
5093
5094for ac_prog in gawk mawk nawk awk
5095do
5096 # Extract the first word of "$ac_prog", so it can be a program name with args.
5097set 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; }
5100if ${ac_cv_prog_AWK+:} false; then :
5101 $as_echo_n "(cached) " >&6
5102else
5103 if test -n "$AWK"; then
5104 ac_cv_prog_AWK="$AWK" # Let the user override the test.
5105else
5106as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5107for as_dir in $PATH
5108do
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
5117done
5118 done
5119IFS=$as_save_IFS
5120
5121fi
5122fi
5123AWK=$ac_cv_prog_AWK
5124if test -n "$AWK"; then
5125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5126$as_echo "$AWK" >&6; }
5127else
5128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5129$as_echo "no" >&6; }
5130fi
5131
5132
5133 test -n "$AWK" && break
5134done
5135
5136DEPDIR="${am__leading_dot}deps"
5137
5138ac_config_commands="$ac_config_commands depfiles"
5139
5140
5141am_make=${MAKE-make}
5142cat > confinc << 'END'
5143am__doit:
5144 @echo this is the am__doit target
5145.PHONY: am__doit
5146END
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; }
5150am__include="#"
5151am__quote=
5152_am_result=none
5153# First try GNU make style include.
5154echo "include confinc" > confmf
5155# Ignore all kinds of additional output from 'make'.
5156case `$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 ;;
5162esac
5163# Now try BSD make style include.
5164if 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
5173fi
5174
5175
5176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
5177$as_echo "$_am_result" >&6; }
5178rm -f confinc confmf
5179
5180# Check whether --enable-dependency-tracking was given.
5181if test "${enable_dependency_tracking+set}" = set; then :
5182 enableval=$enable_dependency_tracking;
5183fi
5184
5185if test "x$enable_dependency_tracking" != xno; then
5186 am_depcomp="$ac_aux_dir/depcomp"
5187 AMDEPBACKSLASH='\'
5188 am__nodep='_no'
5189fi
5190 if test "x$enable_dependency_tracking" != xno; then
5191 AMDEP_TRUE=
5192 AMDEP_FALSE='#'
5193else
5194 AMDEP_TRUE='#'
5195 AMDEP_FALSE=
5196fi
5197
5198
5199ac_ext=c
5200ac_cpp='$CPP $CPPFLAGS'
5201ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5202ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5203ac_compiler_gnu=$ac_cv_c_compiler_gnu
5204if 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.
5206set 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; }
5209if ${ac_cv_prog_CC+:} false; then :
5210 $as_echo_n "(cached) " >&6
5211else
5212 if test -n "$CC"; then
5213 ac_cv_prog_CC="$CC" # Let the user override the test.
5214else
5215as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5216for as_dir in $PATH
5217do
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
5226done
5227 done
5228IFS=$as_save_IFS
5229
5230fi
5231fi
5232CC=$ac_cv_prog_CC
5233if test -n "$CC"; then
5234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5235$as_echo "$CC" >&6; }
5236else
5237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5238$as_echo "no" >&6; }
5239fi
5240
5241
5242fi
5243if 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.
5246set 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; }
5249if ${ac_cv_prog_ac_ct_CC+:} false; then :
5250 $as_echo_n "(cached) " >&6
5251else
5252 if test -n "$ac_ct_CC"; then
5253 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5254else
5255as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5256for as_dir in $PATH
5257do
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
5266done
5267 done
5268IFS=$as_save_IFS
5269
5270fi
5271fi
5272ac_ct_CC=$ac_cv_prog_ac_ct_CC
5273if 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; }
5276else
5277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5278$as_echo "no" >&6; }
5279fi
5280
5281 if test "x$ac_ct_CC" = x; then
5282 CC=""
5283 else
5284 case $cross_compiling:$ac_tool_warned in
5285yes:)
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;}
5288ac_tool_warned=yes ;;
5289esac
5290 CC=$ac_ct_CC
5291 fi
5292else
5293 CC="$ac_cv_prog_CC"
5294fi
5295
5296if 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.
5299set 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; }
5302if ${ac_cv_prog_CC+:} false; then :
5303 $as_echo_n "(cached) " >&6
5304else
5305 if test -n "$CC"; then
5306 ac_cv_prog_CC="$CC" # Let the user override the test.
5307else
5308as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5309for as_dir in $PATH
5310do
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
5319done
5320 done
5321IFS=$as_save_IFS
5322
5323fi
5324fi
5325CC=$ac_cv_prog_CC
5326if test -n "$CC"; then
5327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5328$as_echo "$CC" >&6; }
5329else
5330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5331$as_echo "no" >&6; }
5332fi
5333
5334
5335 fi
5336fi
5337if test -z "$CC"; then
5338 # Extract the first word of "cc", so it can be a program name with args.
5339set 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; }
5342if ${ac_cv_prog_CC+:} false; then :
5343 $as_echo_n "(cached) " >&6
5344else
5345 if test -n "$CC"; then
5346 ac_cv_prog_CC="$CC" # Let the user override the test.
5347else
5348 ac_prog_rejected=no
5349as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5350for as_dir in $PATH
5351do
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
5364done
5365 done
5366IFS=$as_save_IFS
5367
5368if 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
5379fi
5380fi
5381fi
5382CC=$ac_cv_prog_CC
5383if test -n "$CC"; then
5384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5385$as_echo "$CC" >&6; }
5386else
5387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5388$as_echo "no" >&6; }
5389fi
5390
5391
5392fi
5393if 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.
5398set 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; }
5401if ${ac_cv_prog_CC+:} false; then :
5402 $as_echo_n "(cached) " >&6
5403else
5404 if test -n "$CC"; then
5405 ac_cv_prog_CC="$CC" # Let the user override the test.
5406else
5407as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5408for as_dir in $PATH
5409do
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
5418done
5419 done
5420IFS=$as_save_IFS
5421
5422fi
5423fi
5424CC=$ac_cv_prog_CC
5425if test -n "$CC"; then
5426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5427$as_echo "$CC" >&6; }
5428else
5429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5430$as_echo "no" >&6; }
5431fi
5432
5433
5434 test -n "$CC" && break
5435 done
5436fi
5437if test -z "$CC"; then
5438 ac_ct_CC=$CC
5439 for ac_prog in cl.exe
5440do
5441 # Extract the first word of "$ac_prog", so it can be a program name with args.
5442set 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; }
5445if ${ac_cv_prog_ac_ct_CC+:} false; then :
5446 $as_echo_n "(cached) " >&6
5447else
5448 if test -n "$ac_ct_CC"; then
5449 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5450else
5451as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5452for as_dir in $PATH
5453do
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
5462done
5463 done
5464IFS=$as_save_IFS
5465
5466fi
5467fi
5468ac_ct_CC=$ac_cv_prog_ac_ct_CC
5469if 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; }
5472else
5473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5474$as_echo "no" >&6; }
5475fi
5476
5477
5478 test -n "$ac_ct_CC" && break
5479done
5480
5481 if test "x$ac_ct_CC" = x; then
5482 CC=""
5483 else
5484 case $cross_compiling:$ac_tool_warned in
5485yes:)
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;}
5488ac_tool_warned=yes ;;
5489esac
5490 CC=$ac_ct_CC
5491 fi
5492fi
5493
5494fi
5495
5496
5497test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5498$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5499as_fn_error $? "no acceptable C compiler found in \$PATH
5500See \`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
5504set X $ac_compile
5505ac_compiler=$2
5506for ac_option in --version -v -V -qversion; do
5507 { { ac_try="$ac_compiler $ac_option >&5"
5508case "(($ac_try" in
5509 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5510 *) ac_try_echo=$ac_try;;
5511esac
5512eval 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; }
5525done
5526
5527cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5528/* end confdefs.h. */
5529
5530int
5531main (void)
5532{
5533
5534 ;
5535 return 0;
5536}
5537_ACEOF
5538ac_clean_files_save=$ac_clean_files
5539ac_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; }
5545ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
5546
5547# The possible output files:
5548ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
5549
5550ac_rmfiles=
5551for ac_file in $ac_files
5552do
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
5557done
5558rm -f $ac_rmfiles
5559
5560if { { ac_try="$ac_link_default"
5561case "(($ac_try" in
5562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5563 *) ac_try_echo=$ac_try;;
5564esac
5565eval 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.
5576for ac_file in $ac_files ''
5577do
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
5600done
5601test "$ac_cv_exeext" = no && ac_cv_exeext=
5602
5603else
5604 ac_file=''
5605fi
5606if 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
5610sed '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;}
5614as_fn_error 77 "C compiler cannot create executables
5615See \`config.log' for more details" "$LINENO" 5; }
5616else
5617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5618$as_echo "yes" >&6; }
5619fi
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; }
5624ac_exeext=$ac_cv_exeext
5625
5626rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
5627ac_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; }
5630if { { ac_try="$ac_link"
5631case "(($ac_try" in
5632 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5633 *) ac_try_echo=$ac_try;;
5634esac
5635eval 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'.
5645for 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
5653done
5654else
5655 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5656$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5657as_fn_error $? "cannot compute suffix of executables: cannot compile and link
5658See \`config.log' for more details" "$LINENO" 5; }
5659fi
5660rm -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
5664rm -f conftest.$ac_ext
5665EXEEXT=$ac_cv_exeext
5666ac_exeext=$EXEEXT
5667cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5668/* end confdefs.h. */
5669#include <stdio.h>
5670int
5671main (void)
5672{
5673FILE *f = fopen ("conftest.out", "w");
5674 return ferror (f) || fclose (f) != 0;
5675
5676 ;
5677 return 0;
5678}
5679_ACEOF
5680ac_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; }
5685if test "$cross_compiling" != yes; then
5686 { { ac_try="$ac_link"
5687case "(($ac_try" in
5688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5689 *) ac_try_echo=$ac_try;;
5690esac
5691eval 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;;
5701esac
5702eval 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;}
5715as_fn_error $? "cannot run C compiled programs.
5716If you meant to cross compile, use \`--host'.
5717See \`config.log' for more details" "$LINENO" 5; }
5718 fi
5719 fi
5720fi
5721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
5722$as_echo "$cross_compiling" >&6; }
5723
5724rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
5725ac_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; }
5728if ${ac_cv_objext+:} false; then :
5729 $as_echo_n "(cached) " >&6
5730else
5731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5732/* end confdefs.h. */
5733
5734int
5735main (void)
5736{
5737
5738 ;
5739 return 0;
5740}
5741_ACEOF
5742rm -f conftest.o conftest.obj
5743if { { ac_try="$ac_compile"
5744case "(($ac_try" in
5745 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5746 *) ac_try_echo=$ac_try;;
5747esac
5748eval 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
5761done
5762else
5763 $as_echo "$as_me: failed program was:" >&5
5764sed '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;}
5768as_fn_error $? "cannot compute suffix of object files: cannot compile
5769See \`config.log' for more details" "$LINENO" 5; }
5770fi
5771rm -f conftest.$ac_cv_objext conftest.$ac_ext
5772fi
5773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
5774$as_echo "$ac_cv_objext" >&6; }
5775OBJEXT=$ac_cv_objext
5776ac_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; }
5779if ${ac_cv_c_compiler_gnu+:} false; then :
5780 $as_echo_n "(cached) " >&6
5781else
5782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5783/* end confdefs.h. */
5784
5785int
5786main (void)
5787{
5788#ifndef __GNUC__
5789 choke me
5790#endif
5791
5792 ;
5793 return 0;
5794}
5795_ACEOF
5796if ac_fn_c_try_compile "$LINENO"; then :
5797 ac_compiler_gnu=yes
5798else
5799 ac_compiler_gnu=no
5800fi
5801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5802ac_cv_c_compiler_gnu=$ac_compiler_gnu
5803
5804fi
5805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
5806$as_echo "$ac_cv_c_compiler_gnu" >&6; }
5807if test $ac_compiler_gnu = yes; then
5808 GCC=yes
5809else
5810 GCC=
5811fi
5812ac_test_CFLAGS=${CFLAGS+set}
5813ac_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; }
5816if ${ac_cv_prog_cc_g+:} false; then :
5817 $as_echo_n "(cached) " >&6
5818else
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
5826int
5827main (void)
5828{
5829
5830 ;
5831 return 0;
5832}
5833_ACEOF
5834if ac_fn_c_try_compile "$LINENO"; then :
5835 ac_cv_prog_cc_g=yes
5836else
5837 CFLAGS=""
5838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5839/* end confdefs.h. */
5840
5841int
5842main (void)
5843{
5844
5845 ;
5846 return 0;
5847}
5848_ACEOF
5849if ac_fn_c_try_compile "$LINENO"; then :
5850
5851else
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
5857int
5858main (void)
5859{
5860
5861 ;
5862 return 0;
5863}
5864_ACEOF
5865if ac_fn_c_try_compile "$LINENO"; then :
5866 ac_cv_prog_cc_g=yes
5867fi
5868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5869fi
5870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5871fi
5872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5873 ac_c_werror_flag=$ac_save_c_werror_flag
5874fi
5875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5876$as_echo "$ac_cv_prog_cc_g" >&6; }
5877if test "$ac_test_CFLAGS" = set; then
5878 CFLAGS=$ac_save_CFLAGS
5879elif 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
5885else
5886 if test "$GCC" = yes; then
5887 CFLAGS="-O2"
5888 else
5889 CFLAGS=
5890 fi
5891fi
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; }
5894if ${ac_cv_prog_cc_c89+:} false; then :
5895 $as_echo_n "(cached) " >&6
5896else
5897 ac_cv_prog_cc_c89=no
5898ac_save_CC=$CC
5899cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5900/* end confdefs.h. */
5901#include <stdarg.h>
5902#include <stdio.h>
5903struct stat;
5904/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
5905struct buf { int x; };
5906FILE * (*rcsopen) (struct buf *, struct stat *, int);
5907static char *e (p, i)
5908 char **p;
5909 int i;
5910{
5911 return p[i];
5912}
5913static 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. */
5930int 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'
5935int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5936
5937int test (int i, double x);
5938struct s1 {int (*f) (int a);};
5939struct s2 {int (*f) (double a);};
5940int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5941int argc;
5942char **argv;
5943int
5944main (void)
5945{
5946return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5947 ;
5948 return 0;
5949}
5950_ACEOF
5951for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5952 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5953do
5954 CC="$ac_save_CC $ac_arg"
5955 if ac_fn_c_try_compile "$LINENO"; then :
5956 ac_cv_prog_cc_c89=$ac_arg
5957fi
5958rm -f core conftest.err conftest.$ac_objext
5959 test "x$ac_cv_prog_cc_c89" != "xno" && break
5960done
5961rm -f conftest.$ac_ext
5962CC=$ac_save_CC
5963
5964fi
5965# AC_CACHE_VAL
5966case "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; } ;;
5977esac
5978if test "x$ac_cv_prog_cc_c89" != xno; then :
5979
5980fi
5981
5982ac_ext=c
5983ac_cpp='$CPP $CPPFLAGS'
5984ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5985ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5986ac_compiler_gnu=$ac_cv_c_compiler_gnu
5987
5988ac_ext=c
5989ac_cpp='$CPP $CPPFLAGS'
5990ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5991ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5992ac_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; }
5995if ${am_cv_prog_cc_c_o+:} false; then :
5996 $as_echo_n "(cached) " >&6
5997else
5998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5999/* end confdefs.h. */
6000
6001int
6002main (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
6029fi
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; }
6032if 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"
6039fi
6040ac_ext=c
6041ac_cpp='$CPP $CPPFLAGS'
6042ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6043ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6044ac_compiler_gnu=$ac_cv_c_compiler_gnu
6045
6046
6047depcc="$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; }
6051if ${am_cv_CC_dependencies_compiler_type+:} false; then :
6052 $as_echo_n "(cached) " >&6
6053else
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
6155else
6156 am_cv_CC_dependencies_compiler_type=none
6157fi
6158
6159fi
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; }
6162CCDEPMODE=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='#'
6169else
6170 am__fastdepCC_TRUE='#'
6171 am__fastdepCC_FALSE=
6172fi
6173
6174
6175
6176for ac_prog in flex lex
6177do
6178 # Extract the first word of "$ac_prog", so it can be a program name with args.
6179set 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; }
6182if ${ac_cv_prog_LEX+:} false; then :
6183 $as_echo_n "(cached) " >&6
6184else
6185 if test -n "$LEX"; then
6186 ac_cv_prog_LEX="$LEX" # Let the user override the test.
6187else
6188as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6189for as_dir in $PATH
6190do
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
6199done
6200 done
6201IFS=$as_save_IFS
6202
6203fi
6204fi
6205LEX=$ac_cv_prog_LEX
6206if test -n "$LEX"; then
6207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
6208$as_echo "$LEX" >&6; }
6209else
6210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6211$as_echo "no" >&6; }
6212fi
6213
6214
6215 test -n "$LEX" && break
6216done
6217test -n "$LEX" || LEX=":"
6218
6219if test "x$LEX" != "x:"; then
6220 cat >conftest.l <<_ACEOF
6221%%
6222a { ECHO; }
6223b { REJECT; }
6224c { yymore (); }
6225d { yyless (1); }
6226e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument. */
6227 yyless ((input () != 0)); }
6228f { unput (yytext[0]); }
6229. { BEGIN INITIAL; }
6230%%
6231#ifdef YYTEXT_POINTER
6232extern char *yytext;
6233#endif
6234int
6235main (void)
6236{
6237 return ! yylex () + ! yywrap ();
6238}
6239_ACEOF
6240{ { ac_try="$LEX conftest.l"
6241case "(($ac_try" in
6242 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6243 *) ac_try_echo=$ac_try;;
6244esac
6245eval 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; }
6253if ${ac_cv_prog_lex_root+:} false; then :
6254 $as_echo_n "(cached) " >&6
6255else
6256
6257if test -f lex.yy.c; then
6258 ac_cv_prog_lex_root=lex.yy
6259elif test -f lexyy.c; then
6260 ac_cv_prog_lex_root=lexyy
6261else
6262 as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5
6263fi
6264fi
6265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
6266$as_echo "$ac_cv_prog_lex_root" >&6; }
6267LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
6268
6269if 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; }
6272if ${ac_cv_lib_lex+:} false; then :
6273 $as_echo_n "(cached) " >&6
6274else
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
6284if ac_fn_c_try_link "$LINENO"; then :
6285 ac_cv_lib_lex=$ac_lib
6286fi
6287rm -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
6293fi
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
6297fi
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; }
6302if ${ac_cv_prog_lex_yytext_pointer+:} false; then :
6303 $as_echo_n "(cached) " >&6
6304else
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.
6308ac_cv_prog_lex_yytext_pointer=no
6309ac_save_LIBS=$LIBS
6310LIBS="$LEXLIB $ac_save_LIBS"
6311cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6312/* end confdefs.h. */
6313
6314 #define YYTEXT_POINTER 1
6315`cat $LEX_OUTPUT_ROOT.c`
6316_ACEOF
6317if ac_fn_c_try_link "$LINENO"; then :
6318 ac_cv_prog_lex_yytext_pointer=yes
6319fi
6320rm -f core conftest.err conftest.$ac_objext \
6321 conftest$ac_exeext conftest.$ac_ext
6322LIBS=$ac_save_LIBS
6323
6324fi
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; }
6327if test $ac_cv_prog_lex_yytext_pointer = yes; then
6328
6329$as_echo "#define YYTEXT_POINTER 1" >>confdefs.h
6330
6331fi
6332rm -f conftest.l $LEX_OUTPUT_ROOT.c
6333
6334fi
6335for ac_prog in 'bison -y' byacc
6336do
6337 # Extract the first word of "$ac_prog", so it can be a program name with args.
6338set 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; }
6341if ${ac_cv_prog_YACC+:} false; then :
6342 $as_echo_n "(cached) " >&6
6343else
6344 if test -n "$YACC"; then
6345 ac_cv_prog_YACC="$YACC" # Let the user override the test.
6346else
6347as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6348for as_dir in $PATH
6349do
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
6358done
6359 done
6360IFS=$as_save_IFS
6361
6362fi
6363fi
6364YACC=$ac_cv_prog_YACC
6365if test -n "$YACC"; then
6366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
6367$as_echo "$YACC" >&6; }
6368else
6369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6370$as_echo "no" >&6; }
6371fi
6372
6373
6374 test -n "$YACC" && break
6375done
6376test -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; }
6380set x ${MAKE-make}
6381ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
6382if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
6383 $as_echo_n "(cached) " >&6
6384else
6385 cat >conftest.make <<\_ACEOF
6386SHELL = /bin/sh
6387all:
6388 @echo '@@@%%%=$(MAKE)=@@@%%%'
6389_ACEOF
6390# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
6391case `${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;;
6396esac
6397rm -f conftest.make
6398fi
6399if 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=
6403else
6404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6405$as_echo "no" >&6; }
6406 SET_MAKE="MAKE=${MAKE-make}"
6407fi
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; }
6412LN_S=$as_ln_s
6413if test "$LN_S" = "ln -s"; then
6414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6415$as_echo "yes" >&6; }
6416else
6417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
6418$as_echo "no, using $LN_S" >&6; }
6419fi
6420
6421
6422if test "x$LEX" = "x:"; then
6423 as_fn_error $? "flex is not found" "$LINENO" 5
6424else
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
6431fi
6432
6433# These are not a "must".
6434for ac_prog in makeinfo true
6435do
6436 # Extract the first word of "$ac_prog", so it can be a program name with args.
6437set 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; }
6440if ${ac_cv_path_MAKEINFO+:} false; then :
6441 $as_echo_n "(cached) " >&6
6442else
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
6449for as_dir in $PATH
6450do
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
6459done
6460 done
6461IFS=$as_save_IFS
6462
6463 ;;
6464esac
6465fi
6466MAKEINFO=$ac_cv_path_MAKEINFO
6467if test -n "$MAKEINFO"; then
6468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5
6469$as_echo "$MAKEINFO" >&6; }
6470else
6471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6472$as_echo "no" >&6; }
6473fi
6474
6475
6476 test -n "$MAKEINFO" && break
6477done
6478
6479
6480#
6481# Checks for host programs.
6482#
6483
6484ac_ext=c
6485ac_cpp='$CPP $CPPFLAGS'
6486ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6487ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6488ac_compiler_gnu=$ac_cv_c_compiler_gnu
6489if 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.
6491set 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; }
6494if ${ac_cv_prog_CC+:} false; then :
6495 $as_echo_n "(cached) " >&6
6496else
6497 if test -n "$CC"; then
6498 ac_cv_prog_CC="$CC" # Let the user override the test.
6499else
6500as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6501for as_dir in $PATH
6502do
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
6511done
6512 done
6513IFS=$as_save_IFS
6514
6515fi
6516fi
6517CC=$ac_cv_prog_CC
6518if test -n "$CC"; then
6519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6520$as_echo "$CC" >&6; }
6521else
6522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6523$as_echo "no" >&6; }
6524fi
6525
6526
6527fi
6528if 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.
6531set 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; }
6534if ${ac_cv_prog_ac_ct_CC+:} false; then :
6535 $as_echo_n "(cached) " >&6
6536else
6537 if test -n "$ac_ct_CC"; then
6538 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
6539else
6540as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6541for as_dir in $PATH
6542do
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
6551done
6552 done
6553IFS=$as_save_IFS
6554
6555fi
6556fi
6557ac_ct_CC=$ac_cv_prog_ac_ct_CC
6558if 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; }
6561else
6562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6563$as_echo "no" >&6; }
6564fi
6565
6566 if test "x$ac_ct_CC" = x; then
6567 CC=""
6568 else
6569 case $cross_compiling:$ac_tool_warned in
6570yes:)
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;}
6573ac_tool_warned=yes ;;
6574esac
6575 CC=$ac_ct_CC
6576 fi
6577else
6578 CC="$ac_cv_prog_CC"
6579fi
6580
6581if 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.
6584set 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; }
6587if ${ac_cv_prog_CC+:} false; then :
6588 $as_echo_n "(cached) " >&6
6589else
6590 if test -n "$CC"; then
6591 ac_cv_prog_CC="$CC" # Let the user override the test.
6592else
6593as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6594for as_dir in $PATH
6595do
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
6604done
6605 done
6606IFS=$as_save_IFS
6607
6608fi
6609fi
6610CC=$ac_cv_prog_CC
6611if test -n "$CC"; then
6612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6613$as_echo "$CC" >&6; }
6614else
6615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6616$as_echo "no" >&6; }
6617fi
6618
6619
6620 fi
6621fi
6622if test -z "$CC"; then
6623 # Extract the first word of "cc", so it can be a program name with args.
6624set 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; }
6627if ${ac_cv_prog_CC+:} false; then :
6628 $as_echo_n "(cached) " >&6
6629else
6630 if test -n "$CC"; then
6631 ac_cv_prog_CC="$CC" # Let the user override the test.
6632else
6633 ac_prog_rejected=no
6634as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6635for as_dir in $PATH
6636do
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
6649done
6650 done
6651IFS=$as_save_IFS
6652
6653if 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
6664fi
6665fi
6666fi
6667CC=$ac_cv_prog_CC
6668if test -n "$CC"; then
6669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6670$as_echo "$CC" >&6; }
6671else
6672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6673$as_echo "no" >&6; }
6674fi
6675
6676
6677fi
6678if 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.
6683set 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; }
6686if ${ac_cv_prog_CC+:} false; then :
6687 $as_echo_n "(cached) " >&6
6688else
6689 if test -n "$CC"; then
6690 ac_cv_prog_CC="$CC" # Let the user override the test.
6691else
6692as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6693for as_dir in $PATH
6694do
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
6703done
6704 done
6705IFS=$as_save_IFS
6706
6707fi
6708fi
6709CC=$ac_cv_prog_CC
6710if test -n "$CC"; then
6711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6712$as_echo "$CC" >&6; }
6713else
6714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6715$as_echo "no" >&6; }
6716fi
6717
6718
6719 test -n "$CC" && break
6720 done
6721fi
6722if test -z "$CC"; then
6723 ac_ct_CC=$CC
6724 for ac_prog in cl.exe
6725do
6726 # Extract the first word of "$ac_prog", so it can be a program name with args.
6727set 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; }
6730if ${ac_cv_prog_ac_ct_CC+:} false; then :
6731 $as_echo_n "(cached) " >&6
6732else
6733 if test -n "$ac_ct_CC"; then
6734 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
6735else
6736as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6737for as_dir in $PATH
6738do
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
6747done
6748 done
6749IFS=$as_save_IFS
6750
6751fi
6752fi
6753ac_ct_CC=$ac_cv_prog_ac_ct_CC
6754if 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; }
6757else
6758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6759$as_echo "no" >&6; }
6760fi
6761
6762
6763 test -n "$ac_ct_CC" && break
6764done
6765
6766 if test "x$ac_ct_CC" = x; then
6767 CC=""
6768 else
6769 case $cross_compiling:$ac_tool_warned in
6770yes:)
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;}
6773ac_tool_warned=yes ;;
6774esac
6775 CC=$ac_ct_CC
6776 fi
6777fi
6778
6779fi
6780
6781
6782test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6783$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6784as_fn_error $? "no acceptable C compiler found in \$PATH
6785See \`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
6789set X $ac_compile
6790ac_compiler=$2
6791for ac_option in --version -v -V -qversion; do
6792 { { ac_try="$ac_compiler $ac_option >&5"
6793case "(($ac_try" in
6794 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6795 *) ac_try_echo=$ac_try;;
6796esac
6797eval 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; }
6810done
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; }
6814if ${ac_cv_c_compiler_gnu+:} false; then :
6815 $as_echo_n "(cached) " >&6
6816else
6817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6818/* end confdefs.h. */
6819
6820int
6821main (void)
6822{
6823#ifndef __GNUC__
6824 choke me
6825#endif
6826
6827 ;
6828 return 0;
6829}
6830_ACEOF
6831if ac_fn_c_try_compile "$LINENO"; then :
6832 ac_compiler_gnu=yes
6833else
6834 ac_compiler_gnu=no
6835fi
6836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6837ac_cv_c_compiler_gnu=$ac_compiler_gnu
6838
6839fi
6840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
6841$as_echo "$ac_cv_c_compiler_gnu" >&6; }
6842if test $ac_compiler_gnu = yes; then
6843 GCC=yes
6844else
6845 GCC=
6846fi
6847ac_test_CFLAGS=${CFLAGS+set}
6848ac_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; }
6851if ${ac_cv_prog_cc_g+:} false; then :
6852 $as_echo_n "(cached) " >&6
6853else
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
6861int
6862main (void)
6863{
6864
6865 ;
6866 return 0;
6867}
6868_ACEOF
6869if ac_fn_c_try_compile "$LINENO"; then :
6870 ac_cv_prog_cc_g=yes
6871else
6872 CFLAGS=""
6873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6874/* end confdefs.h. */
6875
6876int
6877main (void)
6878{
6879
6880 ;
6881 return 0;
6882}
6883_ACEOF
6884if ac_fn_c_try_compile "$LINENO"; then :
6885
6886else
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
6892int
6893main (void)
6894{
6895
6896 ;
6897 return 0;
6898}
6899_ACEOF
6900if ac_fn_c_try_compile "$LINENO"; then :
6901 ac_cv_prog_cc_g=yes
6902fi
6903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6904fi
6905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6906fi
6907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6908 ac_c_werror_flag=$ac_save_c_werror_flag
6909fi
6910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
6911$as_echo "$ac_cv_prog_cc_g" >&6; }
6912if test "$ac_test_CFLAGS" = set; then
6913 CFLAGS=$ac_save_CFLAGS
6914elif 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
6920else
6921 if test "$GCC" = yes; then
6922 CFLAGS="-O2"
6923 else
6924 CFLAGS=
6925 fi
6926fi
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; }
6929if ${ac_cv_prog_cc_c89+:} false; then :
6930 $as_echo_n "(cached) " >&6
6931else
6932 ac_cv_prog_cc_c89=no
6933ac_save_CC=$CC
6934cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6935/* end confdefs.h. */
6936#include <stdarg.h>
6937#include <stdio.h>
6938struct stat;
6939/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
6940struct buf { int x; };
6941FILE * (*rcsopen) (struct buf *, struct stat *, int);
6942static char *e (p, i)
6943 char **p;
6944 int i;
6945{
6946 return p[i];
6947}
6948static 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. */
6965int 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'
6970int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
6971
6972int test (int i, double x);
6973struct s1 {int (*f) (int a);};
6974struct s2 {int (*f) (double a);};
6975int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
6976int argc;
6977char **argv;
6978int
6979main (void)
6980{
6981return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
6982 ;
6983 return 0;
6984}
6985_ACEOF
6986for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
6987 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6988do
6989 CC="$ac_save_CC $ac_arg"
6990 if ac_fn_c_try_compile "$LINENO"; then :
6991 ac_cv_prog_cc_c89=$ac_arg
6992fi
6993rm -f core conftest.err conftest.$ac_objext
6994 test "x$ac_cv_prog_cc_c89" != "xno" && break
6995done
6996rm -f conftest.$ac_ext
6997CC=$ac_save_CC
6998
6999fi
7000# AC_CACHE_VAL
7001case "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; } ;;
7012esac
7013if test "x$ac_cv_prog_cc_c89" != xno; then :
7014
7015fi
7016
7017ac_ext=c
7018ac_cpp='$CPP $CPPFLAGS'
7019ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7020ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7021ac_compiler_gnu=$ac_cv_c_compiler_gnu
7022
7023ac_ext=c
7024ac_cpp='$CPP $CPPFLAGS'
7025ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7026ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7027ac_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; }
7030if ${am_cv_prog_cc_c_o+:} false; then :
7031 $as_echo_n "(cached) " >&6
7032else
7033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7034/* end confdefs.h. */
7035
7036int
7037main (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
7064fi
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; }
7067if 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"
7074fi
7075ac_ext=c
7076ac_cpp='$CPP $CPPFLAGS'
7077ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7078ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7079ac_compiler_gnu=$ac_cv_c_compiler_gnu
7080
7081
7082depcc="$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; }
7086if ${am_cv_CC_dependencies_compiler_type+:} false; then :
7087 $as_echo_n "(cached) " >&6
7088else
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
7190else
7191 am_cv_CC_dependencies_compiler_type=none
7192fi
7193
7194fi
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; }
7197CCDEPMODE=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='#'
7204else
7205 am__fastdepCC_TRUE='#'
7206 am__fastdepCC_FALSE=
7207fi
7208
7209
7210ac_ext=c
7211ac_cpp='$CPP $CPPFLAGS'
7212ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7213ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7214ac_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.
7218if test -n "$CPP" && test -d "$CPP"; then
7219 CPP=
7220fi
7221if test -z "$CPP"; then
7222 if ${ac_cv_prog_CPP+:} false; then :
7223 $as_echo_n "(cached) " >&6
7224else
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
7229for ac_c_preproc_warn_flag in '' yes
7230do
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
7246if ac_fn_c_try_cpp "$LINENO"; then :
7247
7248else
7249 # Broken: fails on valid input.
7250continue
7251fi
7252rm -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
7260if ac_fn_c_try_cpp "$LINENO"; then :
7261 # Broken: success on invalid input.
7262continue
7263else
7264 # Passes both tests.
7265ac_preproc_ok=:
7266break
7267fi
7268rm -f conftest.err conftest.i conftest.$ac_ext
7269
7270done
7271# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7272rm -f conftest.i conftest.err conftest.$ac_ext
7273if $ac_preproc_ok; then :
7274 break
7275fi
7276
7277 done
7278 ac_cv_prog_CPP=$CPP
7279
7280fi
7281 CPP=$ac_cv_prog_CPP
7282else
7283 ac_cv_prog_CPP=$CPP
7284fi
7285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
7286$as_echo "$CPP" >&6; }
7287ac_preproc_ok=false
7288for ac_c_preproc_warn_flag in '' yes
7289do
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
7305if ac_fn_c_try_cpp "$LINENO"; then :
7306
7307else
7308 # Broken: fails on valid input.
7309continue
7310fi
7311rm -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
7319if ac_fn_c_try_cpp "$LINENO"; then :
7320 # Broken: success on invalid input.
7321continue
7322else
7323 # Passes both tests.
7324ac_preproc_ok=:
7325break
7326fi
7327rm -f conftest.err conftest.i conftest.$ac_ext
7328
7329done
7330# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7331rm -f conftest.i conftest.err conftest.$ac_ext
7332if $ac_preproc_ok; then :
7333
7334else
7335 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7336$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7337as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
7338See \`config.log' for more details" "$LINENO" 5; }
7339fi
7340
7341ac_ext=c
7342ac_cpp='$CPP $CPPFLAGS'
7343ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7344ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7345ac_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; }
7350if ${ac_cv_path_GREP+:} false; then :
7351 $as_echo_n "(cached) " >&6
7352else
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
7357for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
7358do
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
7367case `"$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;;
7391esac
7392
7393 $ac_path_GREP_found && break 3
7394 done
7395 done
7396 done
7397IFS=$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
7401else
7402 ac_cv_path_GREP=$GREP
7403fi
7404
7405fi
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; }
7413if ${ac_cv_path_EGREP+:} false; then :
7414 $as_echo_n "(cached) " >&6
7415else
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
7423for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
7424do
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
7433case `"$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;;
7457esac
7458
7459 $ac_path_EGREP_found && break 3
7460 done
7461 done
7462 done
7463IFS=$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
7467else
7468 ac_cv_path_EGREP=$EGREP
7469fi
7470
7471 fi
7472fi
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
00f6db22
CW
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; }
7480if ${ac_cv_header_stdc+:} false; then :
7481 $as_echo_n "(cached) " >&6
7482else
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>
422889f9 7489
00f6db22
CW
7490int
7491main (void)
7492{
422889f9 7493
00f6db22
CW
7494 ;
7495 return 0;
7496}
7497_ACEOF
7498if ac_fn_c_try_compile "$LINENO"; then :
7499 ac_cv_header_stdc=yes
422889f9 7500else
00f6db22
CW
7501 ac_cv_header_stdc=no
7502fi
7503rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
422889f9 7504
00f6db22
CW
7505if 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
422889f9 7508/* end confdefs.h. */
00f6db22 7509#include <string.h>
422889f9
CW
7510
7511_ACEOF
7512if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
00f6db22
CW
7513 $EGREP "memchr" >/dev/null 2>&1; then :
7514
422889f9 7515else
00f6db22 7516 ac_cv_header_stdc=no
422889f9
CW
7517fi
7518rm -f conftest*
7519
00f6db22
CW
7520fi
7521
7522if 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
7529if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7530 $EGREP "free" >/dev/null 2>&1; then :
422889f9 7531
00f6db22
CW
7532else
7533 ac_cv_header_stdc=no
422889f9 7534fi
00f6db22
CW
7535rm -f conftest*
7536
7537fi
7538
7539if 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 :
422889f9 7543else
00f6db22
CW
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)))
7560int
7561main ()
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
7571if ac_fn_c_try_run "$LINENO"; then :
7572
422889f9 7573else
00f6db22
CW
7574 ac_cv_header_stdc=no
7575fi
7576rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7577 conftest.$ac_objext conftest.beam conftest.$ac_ext
7578fi
422889f9
CW
7579
7580fi
7581fi
00f6db22
CW
7582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7583$as_echo "$ac_cv_header_stdc" >&6; }
7584if test $ac_cv_header_stdc = yes; then
7585
7586$as_echo "#define STDC_HEADERS 1" >>confdefs.h
7587
422889f9
CW
7588fi
7589
00f6db22
CW
7590# On IRIX 5.3, sys/types and inttypes.h are conflicting.
7591for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
7592 inttypes.h stdint.h unistd.h
7593do :
7594 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7595ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
7596"
7597if 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
422889f9
CW
7601
7602fi
00f6db22
CW
7603
7604done
7605
7606
7607
7608 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
7609if test "x$ac_cv_header_minix_config_h" = xyes; then :
7610 MINIX=yes
7611else
7612 MINIX=
7613fi
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; }
7634if ${ac_cv_safe_to_define___extensions__+:} false; then :
7635 $as_echo_n "(cached) " >&6
7636else
7637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7638/* end confdefs.h. */
7639
7640# define __EXTENSIONS__ 1
7641 $ac_includes_default
7642int
7643main (void)
7644{
7645
7646 ;
7647 return 0;
7648}
7649_ACEOF
7650if ac_fn_c_try_compile "$LINENO"; then :
7651 ac_cv_safe_to_define___extensions__=yes
7652else
7653 ac_cv_safe_to_define___extensions__=no
7654fi
7655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7656fi
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; }
7692if ${ac_cv_should_define__xopen_source+:} false; then :
7693 $as_echo_n "(cached) " >&6
7694else
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;
7701int
7702main (void)
7703{
7704
7705 ;
7706 return 0;
7707}
7708_ACEOF
7709if ac_fn_c_try_compile "$LINENO"; then :
7710
7711else
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;
7718int
7719main (void)
7720{
7721
7722 ;
7723 return 0;
7724}
7725_ACEOF
7726if ac_fn_c_try_compile "$LINENO"; then :
7727 ac_cv_should_define__xopen_source=yes
7728fi
7729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7730fi
7731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7732fi
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; }
7752if ${gl_cv_c_amsterdam_compiler+:} false; then :
7753 $as_echo_n "(cached) " >&6
7754else
7755
7756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7757/* end confdefs.h. */
7758
7759#ifdef __ACK__
7760Amsterdam
7761#endif
7762
7763_ACEOF
7764if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7765 $EGREP "Amsterdam" >/dev/null 2>&1; then :
7766 gl_cv_c_amsterdam_compiler=yes
7767else
7768 gl_cv_c_amsterdam_compiler=no
7769fi
7770rm -f conftest*
7771
7772
7773fi
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.
7790set 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; }
7793if ${ac_cv_prog_AR+:} false; then :
7794 $as_echo_n "(cached) " >&6
7795else
7796 if test -n "$AR"; then
7797 ac_cv_prog_AR="$AR" # Let the user override the test.
7798else
7799as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7800for as_dir in $PATH
7801do
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
7810done
7811 done
7812IFS=$as_save_IFS
7813
7814fi
7815fi
7816AR=$ac_cv_prog_AR
7817if test -n "$AR"; then
7818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7819$as_echo "$AR" >&6; }
7820else
7821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7822$as_echo "no" >&6; }
7823fi
7824
7825
7826fi
7827if 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.
7830set 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; }
7833if ${ac_cv_prog_ac_ct_AR+:} false; then :
7834 $as_echo_n "(cached) " >&6
422889f9
CW
7835else
7836 if test -n "$ac_ct_AR"; then
7837 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7838else
7839as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7840for as_dir in $PATH
7841do
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
7850done
7851 done
7852IFS=$as_save_IFS
7853
7854fi
7855fi
7856ac_ct_AR=$ac_cv_prog_ac_ct_AR
7857if 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; }
7860else
7861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7862$as_echo "no" >&6; }
7863fi
7864
7865 if test "x$ac_ct_AR" = x; then
7866 AR="ar"
7867 else
7868 case $cross_compiling:$ac_tool_warned in
7869yes:)
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;}
7872ac_tool_warned=yes ;;
7873esac
7874 AR=$ac_ct_AR
7875 fi
7876else
7877 AR="$ac_cv_prog_AR"
7878fi
7879
00f6db22
CW
7880 if test -z "$ARFLAGS"; then
7881 ARFLAGS='cr'
422889f9
CW
7882 fi
7883
7884
00f6db22 7885
422889f9
CW
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.
7892set 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; }
7895if ${ac_cv_prog_RANLIB+:} false; then :
7896 $as_echo_n "(cached) " >&6
7897else
7898 if test -n "$RANLIB"; then
7899 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7900else
7901as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7902for as_dir in $PATH
7903do
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
7912done
7913 done
7914IFS=$as_save_IFS
7915
7916fi
7917fi
7918RANLIB=$ac_cv_prog_RANLIB
7919if test -n "$RANLIB"; then
7920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7921$as_echo "$RANLIB" >&6; }
7922else
7923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7924$as_echo "no" >&6; }
7925fi
7926
7927
7928fi
7929if 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.
7932set 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; }
7935if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
7936 $as_echo_n "(cached) " >&6
7937else
7938 if test -n "$ac_ct_RANLIB"; then
7939 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7940else
7941as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7942for as_dir in $PATH
7943do
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
7952done
7953 done
7954IFS=$as_save_IFS
7955
7956fi
7957fi
7958ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7959if 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; }
7962else
7963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7964$as_echo "no" >&6; }
7965fi
7966
7967 if test "x$ac_ct_RANLIB" = x; then
7968 RANLIB=":"
7969 else
7970 case $cross_compiling:$ac_tool_warned in
7971yes:)
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;}
7974ac_tool_warned=yes ;;
7975esac
7976 RANLIB=$ac_ct_RANLIB
7977 fi
7978else
7979 RANLIB="$ac_cv_prog_RANLIB"
7980fi
7981
7982 fi
7983 fi
7984
7985
7986
00f6db22
CW
7987# Check whether --enable-largefile was given.
7988if test "${enable_largefile+set}" = set; then :
7989 enableval=$enable_largefile;
7990fi
7991
7992if 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; }
7996if ${ac_cv_sys_largefile_CC+:} false; then :
422889f9
CW
7997 $as_echo_n "(cached) " >&6
7998else
00f6db22
CW
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
422889f9 8006/* end confdefs.h. */
00f6db22
CW
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];
422889f9
CW
8016int
8017main (void)
8018{
8019
8020 ;
8021 return 0;
8022}
8023_ACEOF
00f6db22
CW
8024 if ac_fn_c_try_compile "$LINENO"; then :
8025 break
422889f9 8026fi
00f6db22
CW
8027rm -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
422889f9 8031fi
00f6db22
CW
8032rm -f core conftest.err conftest.$ac_objext
8033 break
8034 done
8035 CC=$ac_save_CC
8036 rm -f conftest.$ac_ext
8037 fi
422889f9 8038fi
00f6db22
CW
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
422889f9 8044
00f6db22
CW
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; }
8047if ${ac_cv_sys_file_offset_bits+:} false; then :
8048 $as_echo_n "(cached) " >&6
422889f9 8049else
00f6db22 8050 while :; do
422889f9
CW
8051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8052/* end confdefs.h. */
00f6db22
CW
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];
422889f9 8062int
00f6db22 8063main (void)
422889f9 8064{
00f6db22
CW
8065
8066 ;
422889f9
CW
8067 return 0;
8068}
8069_ACEOF
00f6db22
CW
8070if ac_fn_c_try_compile "$LINENO"; then :
8071 ac_cv_sys_file_offset_bits=no; break
422889f9 8072fi
00f6db22 8073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
422889f9
CW
8074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8075/* end confdefs.h. */
00f6db22
CW
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];
422889f9
CW
8086int
8087main (void)
8088{
8089
8090 ;
8091 return 0;
8092}
8093_ACEOF
8094if ac_fn_c_try_compile "$LINENO"; then :
00f6db22 8095 ac_cv_sys_file_offset_bits=64; break
422889f9
CW
8096fi
8097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
00f6db22
CW
8098 ac_cv_sys_file_offset_bits=unknown
8099 break
8100done
422889f9 8101fi
00f6db22
CW
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; }
8104case $ac_cv_sys_file_offset_bits in #(
8105 no | unknown) ;;
8106 *)
8107cat >>confdefs.h <<_ACEOF
8108#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
8109_ACEOF
8110;;
8111esac
8112rm -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; }
8116if ${ac_cv_sys_large_files+:} false; then :
422889f9
CW
8117 $as_echo_n "(cached) " >&6
8118else
00f6db22
CW
8119 while :; do
8120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
422889f9 8121/* end confdefs.h. */
00f6db22
CW
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];
422889f9
CW
8131int
8132main (void)
8133{
8134
8135 ;
8136 return 0;
8137}
8138_ACEOF
8139if ac_fn_c_try_compile "$LINENO"; then :
00f6db22
CW
8140 ac_cv_sys_large_files=no; break
8141fi
8142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
422889f9
CW
8143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8144/* end confdefs.h. */
00f6db22
CW
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];
422889f9
CW
8155int
8156main (void)
8157{
8158
8159 ;
8160 return 0;
8161}
8162_ACEOF
8163if ac_fn_c_try_compile "$LINENO"; then :
00f6db22 8164 ac_cv_sys_large_files=1; break
422889f9
CW
8165fi
8166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
00f6db22
CW
8167 ac_cv_sys_large_files=unknown
8168 break
8169done
422889f9 8170fi
00f6db22
CW
8171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
8172$as_echo "$ac_cv_sys_large_files" >&6; }
8173case $ac_cv_sys_large_files in #(
8174 no | unknown) ;;
8175 *)
8176cat >>confdefs.h <<_ACEOF
8177#define _LARGE_FILES $ac_cv_sys_large_files
8178_ACEOF
8179;;
8180esac
8181rm -rf conftest*
8182 fi
422889f9
CW
8183
8184
00f6db22 8185$as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
422889f9 8186
00f6db22 8187fi
422889f9
CW
8188
8189
8190
8191
8192
8193
00f6db22
CW
8194 # Check whether --enable-threads was given.
8195if test "${enable_threads+set}" = set; then :
8196 enableval=$enable_threads; gl_use_threads=$enableval
8197else
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
422889f9 8212
00f6db22 8213fi
422889f9 8214
00f6db22
CW
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:
422889f9 8247 # Code from module argp:
00f6db22
CW
8248 # Code from module assure:
8249 # Code from module at-internal:
21f95442 8250 # Code from module base64:
422889f9 8251 # Code from module btowc:
00f6db22
CW
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:
422889f9
CW
8259 # Code from module dirname-lgpl:
8260 # Code from module dosname:
8261 # Code from module double-slash-root:
00f6db22 8262 # Code from module dup2:
422889f9
CW
8263 # Code from module errno:
8264 # Code from module error:
00f6db22 8265 # Code from module exitfail:
422889f9 8266 # Code from module extensions:
422889f9 8267 # Code from module extern-inline:
00f6db22
CW
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:
422889f9
CW
8276 # Code from module float:
8277 # Code from module fnmatch:
00f6db22
CW
8278 # Code from module fnmatch-h:
8279 # Code from module fstat:
8280 # Code from module getcwd-lgpl:
422889f9 8281 # Code from module getdelim:
00f6db22 8282 # Code from module getdtablesize:
422889f9
CW
8283 # Code from module getline:
8284 # Code from module getopt-gnu:
8285 # Code from module getopt-posix:
00f6db22 8286 # Code from module getprogname:
422889f9 8287 # Code from module gettext-h:
00f6db22
CW
8288 # Code from module gitlog-to-changelog:
8289 # Code from module hard-locale:
422889f9
CW
8290 # Code from module havelib:
8291 # Code from module include_next:
8292 # Code from module intprops:
8293 # Code from module langinfo:
00f6db22
CW
8294 # Code from module largefile:
8295
8296 # Code from module libc-config:
8297 # Code from module limits-h:
422889f9
CW
8298 # Code from module localcharset:
8299 # Code from module locale:
8300 # Code from module localeconv:
00f6db22 8301 # Code from module lock:
422889f9
CW
8302 # Code from module malloc-gnu:
8303 # Code from module malloc-posix:
00f6db22 8304 # Code from module malloca:
422889f9
CW
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:
00f6db22 8312 # Code from module memrchr:
422889f9
CW
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:
00f6db22
CW
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:
422889f9
CW
8323 # Code from module progname:
8324 # Code from module rawmemchr:
00f6db22 8325 # Code from module realloc-gnu:
422889f9
CW
8326 # Code from module realloc-posix:
8327 # Code from module regex:
00f6db22 8328 # Code from module save-cwd:
422889f9
CW
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:
00f6db22
CW
8336 # Code from module stat:
8337 # Code from module stat-time:
422889f9
CW
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:
00f6db22 8346 # Code from module strdup-posix:
422889f9
CW
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:
00f6db22 8355 # Code from module sys_stat:
422889f9
CW
8356 # Code from module sys_types:
8357 # Code from module sysexits:
00f6db22
CW
8358 # Code from module threadlib:
8359
8360
8361
8362 # Code from module time:
422889f9 8363 # Code from module unistd:
00f6db22 8364 # Code from module unistd-safer:
422889f9
CW
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:
00f6db22 8375 # Code from module xalloc-oversized:
422889f9
CW
8376 # Code from module xsize:
8377
8378ac_ext=cpp
8379ac_cpp='$CXXCPP $CPPFLAGS'
8380ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8381ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8382ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
8383if 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.
8391set 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; }
8394if ${ac_cv_prog_CXX+:} false; then :
8395 $as_echo_n "(cached) " >&6
8396else
8397 if test -n "$CXX"; then
8398 ac_cv_prog_CXX="$CXX" # Let the user override the test.
8399else
8400as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8401for as_dir in $PATH
8402do
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
8411done
8412 done
8413IFS=$as_save_IFS
8414
8415fi
8416fi
8417CXX=$ac_cv_prog_CXX
8418if test -n "$CXX"; then
8419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
8420$as_echo "$CXX" >&6; }
8421else
8422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8423$as_echo "no" >&6; }
8424fi
8425
8426
8427 test -n "$CXX" && break
8428 done
8429fi
8430if 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
8433do
8434 # Extract the first word of "$ac_prog", so it can be a program name with args.
8435set 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; }
8438if ${ac_cv_prog_ac_ct_CXX+:} false; then :
8439 $as_echo_n "(cached) " >&6
8440else
8441 if test -n "$ac_ct_CXX"; then
8442 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
8443else
8444as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8445for as_dir in $PATH
8446do
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
8455done
8456 done
8457IFS=$as_save_IFS
8458
8459fi
8460fi
8461ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
8462if 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; }
8465else
8466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8467$as_echo "no" >&6; }
8468fi
8469
8470
8471 test -n "$ac_ct_CXX" && break
8472done
8473
8474 if test "x$ac_ct_CXX" = x; then
8475 CXX="g++"
8476 else
8477 case $cross_compiling:$ac_tool_warned in
8478yes:)
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;}
8481ac_tool_warned=yes ;;
8482esac
8483 CXX=$ac_ct_CXX
8484 fi
8485fi
8486
8487 fi
8488fi
8489# Provide some information about the compiler.
8490$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
8491set X $ac_compile
8492ac_compiler=$2
8493for ac_option in --version -v -V -qversion; do
8494 { { ac_try="$ac_compiler $ac_option >&5"
8495case "(($ac_try" in
8496 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8497 *) ac_try_echo=$ac_try;;
8498esac
8499eval 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; }
8512done
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; }
8516if ${ac_cv_cxx_compiler_gnu+:} false; then :
8517 $as_echo_n "(cached) " >&6
8518else
8519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8520/* end confdefs.h. */
8521
8522int
8523main ()
8524{
8525#ifndef __GNUC__
8526 choke me
8527#endif
8528
8529 ;
8530 return 0;
8531}
8532_ACEOF
8533if ac_fn_cxx_try_compile "$LINENO"; then :
8534 ac_compiler_gnu=yes
8535else
8536 ac_compiler_gnu=no
8537fi
8538rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8539ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
8540
8541fi
8542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
8543$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
8544if test $ac_compiler_gnu = yes; then
8545 GXX=yes
8546else
8547 GXX=
8548fi
8549ac_test_CXXFLAGS=${CXXFLAGS+set}
8550ac_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; }
8553if ${ac_cv_prog_cxx_g+:} false; then :
8554 $as_echo_n "(cached) " >&6
8555else
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
8563int
8564main ()
8565{
8566
8567 ;
8568 return 0;
8569}
8570_ACEOF
8571if ac_fn_cxx_try_compile "$LINENO"; then :
8572 ac_cv_prog_cxx_g=yes
8573else
8574 CXXFLAGS=""
8575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8576/* end confdefs.h. */
8577
8578int
8579main ()
8580{
8581
8582 ;
8583 return 0;
8584}
8585_ACEOF
8586if ac_fn_cxx_try_compile "$LINENO"; then :
8587
8588else
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
8594int
8595main ()
8596{
8597
8598 ;
8599 return 0;
8600}
8601_ACEOF
8602if ac_fn_cxx_try_compile "$LINENO"; then :
8603 ac_cv_prog_cxx_g=yes
8604fi
8605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8606fi
8607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8608fi
8609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8610 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
8611fi
8612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
8613$as_echo "$ac_cv_prog_cxx_g" >&6; }
8614if test "$ac_test_CXXFLAGS" = set; then
8615 CXXFLAGS=$ac_save_CXXFLAGS
8616elif 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
8622else
8623 if test "$GXX" = yes; then
8624 CXXFLAGS="-O2"
8625 else
8626 CXXFLAGS=
8627 fi
8628fi
8629ac_ext=c
8630ac_cpp='$CPP $CPPFLAGS'
8631ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8632ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8633ac_compiler_gnu=$ac_cv_c_compiler_gnu
8634
8635depcc="$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; }
8639if ${am_cv_CXX_dependencies_compiler_type+:} false; then :
8640 $as_echo_n "(cached) " >&6
8641else
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
8743else
8744 am_cv_CXX_dependencies_compiler_type=none
8745fi
8746
8747fi
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; }
8750CXXDEPMODE=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='#'
8757else
8758 am__fastdepCXX_TRUE='#'
8759 am__fastdepCXX_FALSE=
8760fi
8761
8762
8763
8764# By default we simply use the C compiler to build assembly code.
8765
8766test "${CCAS+set}" = set || CCAS=$CC
8767test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
8768
8769
8770
8771depcc="$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; }
8775if ${am_cv_CCAS_dependencies_compiler_type+:} false; then :
8776 $as_echo_n "(cached) " >&6
8777else
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
8877else
8878 am_cv_CCAS_dependencies_compiler_type=none
8879fi
8880
8881fi
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; }
8884CCASDEPMODE=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='#'
8891else
8892 am__fastdepCCAS_TRUE='#'
8893 am__fastdepCCAS_FALSE=
8894fi
8895
8896
8897
00f6db22
CW
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
8911minver = list(map(int, '2.6'.split('.'))) + [0, 0, 0]
8912minverhex = 0
8913# xrange is not present in Python 3.0 and range returns an iterator
8914for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i]
8915sys.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; }
8923else
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
8927fi
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; }
8934if ${am_cv_pathless_PYTHON+:} false; then :
8935 $as_echo_n "(cached) " >&6
8936else
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
8944minver = list(map(int, '2.6'.split('.'))) + [0, 0, 0]
8945minverhex = 0
8946# xrange is not present in Python 3.0 and range returns an iterator
8947for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i]
8948sys.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
8955fi
8956 done
8957fi
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.
8965set 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; }
8968if ${ac_cv_path_PYTHON+:} false; then :
8969 $as_echo_n "(cached) " >&6
8970else
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
8977for as_dir in $PATH
8978do
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
8987done
8988 done
8989IFS=$as_save_IFS
8990
8991 ;;
8992esac
8993fi
8994PYTHON=$ac_cv_path_PYTHON
8995if test -n "$PYTHON"; then
8996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
8997$as_echo "$PYTHON" >&6; }
8998else
8999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9000$as_echo "no" >&6; }
9001fi
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; }
9016if ${am_cv_python_version+:} false; then :
9017 $as_echo_n "(cached) " >&6
9018else
9019 am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[:3])"`
9020fi
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; }
9035if ${am_cv_python_platform+:} false; then :
9036 $as_echo_n "(cached) " >&6
9037else
9038 am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`
9039fi
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="\
9047import sys
9048# Prefer sysconfig over distutils.sysconfig, for better compatibility
9049# with python 3.x. See automake bug#10227.
9050try:
9051 import sysconfig
9052except ImportError:
9053 can_use_sysconfig = 0
9054else:
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>
9058try:
9059 from platform import python_implementation
9060 if python_implementation() == 'CPython' and sys.version[:3] == '2.7':
9061 can_use_sysconfig = 0
9062except 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; }
9068if ${am_cv_python_pythondir+:} false; then :
9069 $as_echo_n "(cached) " >&6
9070else
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
9079if can_use_sysconfig:
9080 sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'})
9081else:
9082 from distutils import sysconfig
9083 sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix')
9084sys.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
9100fi
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; }
9112if ${am_cv_python_pyexecdir+:} false; then :
9113 $as_echo_n "(cached) " >&6
9114else
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
9123if can_use_sysconfig:
9124 sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_prefix'})
9125else:
9126 from distutils import sysconfig
9127 sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_prefix')
9128sys.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
9144fi
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
422889f9
CW
9159# Must be GCC.
9160test "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.
9163set 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; }
9166if ${ac_cv_prog_HAVE_CXX+:} false; then :
9167 $as_echo_n "(cached) " >&6
9168else
9169 if test -n "$HAVE_CXX"; then
9170 ac_cv_prog_HAVE_CXX="$HAVE_CXX" # Let the user override the test.
9171else
9172as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9173for as_dir in $PATH
9174do
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
9183done
9184 done
9185IFS=$as_save_IFS
9186
9187 test -z "$ac_cv_prog_HAVE_CXX" && ac_cv_prog_HAVE_CXX="no"
9188fi
9189fi
9190HAVE_CXX=$ac_cv_prog_HAVE_CXX
9191if test -n "$HAVE_CXX"; then
9192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_CXX" >&5
9193$as_echo "$HAVE_CXX" >&6; }
9194else
9195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9196$as_echo "no" >&6; }
9197fi
9198
9199
9200
9201
00f6db22
CW
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; }
9204if ${ac_cv_path_SED+:} false; then :
9205 $as_echo_n "(cached) " >&6
9206else
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
9217for as_dir in $PATH
9218do
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
9227case `"$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;;
9251esac
9252
9253 $ac_path_SED_found && break 3
9254 done
9255 done
9256 done
9257IFS=$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
9261else
9262 ac_cv_path_SED=$SED
9263fi
9264
9265fi
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
422889f9
CW
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.
9275if test "${enable_nls+set}" = set; then :
9276 enableval=$enable_nls; USE_NLS=$enableval
9277else
9278 USE_NLS=yes
9279fi
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.
9294if 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 }
9303fi
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.
9307cat >conf$$.file <<_ASEOF
9308#! /bin/sh
9309exit 0
9310_ASEOF
9311chmod +x conf$$.file
9312if test -x conf$$.file >/dev/null 2>&1; then
9313 ac_executable_p="test -x"
9314else
9315 ac_executable_p="test -f"
9316fi
9317rm -f conf$$.file
9318
9319# Extract the first word of "msgfmt", so it can be a program name with args.
9320set 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; }
9323if ${ac_cv_path_MSGFMT+:} false; then :
9324 $as_echo_n "(cached) " >&6
9325else
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 ;;
9349esac
9350fi
9351MSGFMT="$ac_cv_path_MSGFMT"
9352if test "$MSGFMT" != ":"; then
9353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
9354$as_echo "$MSGFMT" >&6; }
9355else
9356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9357$as_echo "no" >&6; }
9358fi
9359
9360 # Extract the first word of "gmsgfmt", so it can be a program name with args.
9361set 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; }
9364if ${ac_cv_path_GMSGFMT+:} false; then :
9365 $as_echo_n "(cached) " >&6
9366else
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
9373for as_dir in $PATH
9374do
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
9383done
9384 done
9385IFS=$as_save_IFS
9386
9387 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
9388 ;;
9389esac
9390fi
9391GMSGFMT=$ac_cv_path_GMSGFMT
9392if test -n "$GMSGFMT"; then
9393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
9394$as_echo "$GMSGFMT" >&6; }
9395else
9396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9397$as_echo "no" >&6; }
9398fi
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.
9416if 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 }
9425fi
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.
9429cat >conf$$.file <<_ASEOF
9430#! /bin/sh
9431exit 0
9432_ASEOF
9433chmod +x conf$$.file
9434if test -x conf$$.file >/dev/null 2>&1; then
9435 ac_executable_p="test -x"
9436else
9437 ac_executable_p="test -f"
9438fi
9439rm -f conf$$.file
9440
9441# Extract the first word of "xgettext", so it can be a program name with args.
9442set 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; }
9445if ${ac_cv_path_XGETTEXT+:} false; then :
9446 $as_echo_n "(cached) " >&6
9447else
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 ;;
9471esac
9472fi
9473XGETTEXT="$ac_cv_path_XGETTEXT"
9474if test "$XGETTEXT" != ":"; then
9475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
9476$as_echo "$XGETTEXT" >&6; }
9477else
9478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9479$as_echo "no" >&6; }
9480fi
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.
9493if 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 }
9502fi
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.
9506cat >conf$$.file <<_ASEOF
9507#! /bin/sh
9508exit 0
9509_ASEOF
9510chmod +x conf$$.file
9511if test -x conf$$.file >/dev/null 2>&1; then
9512 ac_executable_p="test -x"
9513else
9514 ac_executable_p="test -f"
9515fi
9516rm -f conf$$.file
9517
9518# Extract the first word of "msgmerge", so it can be a program name with args.
9519set 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; }
9522if ${ac_cv_path_MSGMERGE+:} false; then :
9523 $as_echo_n "(cached) " >&6
9524else
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 ;;
9547esac
9548fi
9549MSGMERGE="$ac_cv_path_MSGMERGE"
9550if test "$MSGMERGE" != ":"; then
9551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
9552$as_echo "$MSGMERGE" >&6; }
9553else
9554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9555$as_echo "no" >&6; }
9556fi
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.
9587if test "${with_gnu_ld+set}" = set; then :
9588 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
9589else
9590 with_gnu_ld=no
9591fi
9592
9593# Prepare PATH_SEPARATOR.
9594# The user is always right.
9595if 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 }
9604fi
9605
00f6db22
CW
9606if test -n "$LD"; then
9607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld" >&5
9608$as_echo_n "checking for ld... " >&6; }
9609elif test "$GCC" = yes; then
422889f9
CW
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; }
422889f9
CW
9612elif 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; }
9615else
9616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
9617$as_echo_n "checking for non-GNU ld... " >&6; }
9618fi
00f6db22
CW
9619if test -n "$LD"; then
9620 # Let the user override the test with a path.
9621 :
9622else
9623 if ${acl_cv_path_LD+:} false; then :
9624 $as_echo_n "(cached) " >&6
9625else
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 ;;
422889f9
CW
9658 esac
9659 fi
00f6db22
CW
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
9694if 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
9702fi
9703rm -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
9715if ac_fn_c_try_compile "$LINENO"; then :
9716
422889f9 9717else
00f6db22
CW
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
422889f9 9725fi
00f6db22
CW
9726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9727 ;;
9728 esac
9729
422889f9
CW
9730fi
9731
00f6db22
CW
9732 LD="$acl_cv_path_LD"
9733fi
422889f9
CW
9734if test -n "$LD"; then
9735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
9736$as_echo "$LD" >&6; }
9737else
9738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9739$as_echo "no" >&6; }
00f6db22 9740 as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
422889f9 9741fi
422889f9
CW
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; }
9744if ${acl_cv_prog_gnu_ld+:} false; then :
9745 $as_echo_n "(cached) " >&6
9746else
9747 # I'd rather use --version here, but apparently some GNU lds only accept -v.
9748case `$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 ;;
9755esac
9756fi
9757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
9758$as_echo "$acl_cv_prog_gnu_ld" >&6; }
9759with_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; }
9766if ${acl_cv_rpath+:} false; then :
9767 $as_echo_n "(cached) " >&6
9768else
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
9776fi
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.
9789if test "${enable_rpath+set}" = set; then :
9790 enableval=$enable_rpath; :
9791else
9792 enable_rpath=yes
9793fi
9794
9795
9796
9797
00f6db22
CW
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; }
9800if ${gl_cv_host_cpu_c_abi_32bit+:} false; then :
422889f9
CW
9801 $as_echo_n "(cached) " >&6
9802else
00f6db22
CW
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
422889f9 9812
00f6db22
CW
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
422889f9
CW
9834
9835_ACEOF
00f6db22
CW
9836if ac_fn_c_try_compile "$LINENO"; then :
9837 gl_cv_host_cpu_c_abi_32bit=no
422889f9 9838else
00f6db22 9839 gl_cv_host_cpu_c_abi_32bit=yes
422889f9 9840fi
00f6db22
CW
9841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9842 ;;
422889f9 9843
00f6db22
CW
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
422889f9 9858
00f6db22
CW
9859_ACEOF
9860if ac_fn_c_try_compile "$LINENO"; then :
9861 gl_cv_host_cpu_c_abi_32bit=no
9862else
9863 gl_cv_host_cpu_c_abi_32bit=yes
422889f9 9864fi
00f6db22
CW
9865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9866 ;;
422889f9 9867
00f6db22
CW
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
9880if ac_fn_c_try_compile "$LINENO"; then :
9881 gl_cv_host_cpu_c_abi_32bit=no
9882else
9883 gl_cv_host_cpu_c_abi_32bit=yes
9884fi
9885rm -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
9900if ac_fn_c_try_compile "$LINENO"; then :
9901 gl_cv_host_cpu_c_abi_32bit=yes
9902else
9903 gl_cv_host_cpu_c_abi_32bit=no
9904fi
9905rm -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
9920if ac_fn_c_try_compile "$LINENO"; then :
9921 gl_cv_host_cpu_c_abi_32bit=no
9922else
9923 gl_cv_host_cpu_c_abi_32bit=yes
9924fi
9925rm -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
9944if ac_fn_c_try_compile "$LINENO"; then :
9945 gl_cv_host_cpu_c_abi_32bit=no
9946else
9947 gl_cv_host_cpu_c_abi_32bit=yes
9948fi
9949rm -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
9968if ac_fn_c_try_compile "$LINENO"; then :
9969 gl_cv_host_cpu_c_abi_32bit=no
9970else
9971 gl_cv_host_cpu_c_abi_32bit=yes
9972fi
9973rm -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
9988if ac_fn_c_try_compile "$LINENO"; then :
9989 gl_cv_host_cpu_c_abi_32bit=no
9990else
9991 gl_cv_host_cpu_c_abi_32bit=yes
9992fi
9993rm -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
10008if ac_fn_c_try_compile "$LINENO"; then :
10009 gl_cv_host_cpu_c_abi_32bit=no
10010else
10011 gl_cv_host_cpu_c_abi_32bit=yes
10012fi
10013rm -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
10022fi
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; }
10036if ${gl_cv_solaris_64bit+:} false; then :
10037 $as_echo_n "(cached) " >&6
10038else
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
10048if ac_fn_c_try_compile "$LINENO"; then :
10049 gl_cv_solaris_64bit=yes
10050else
10051 gl_cv_solaris_64bit=no
10052fi
10053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10054
10055fi
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; }
10062if ${acl_cv_libdirstems+:} false; then :
10063 $as_echo_n "(cached) " >&6
10064else
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
10110fi
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/.*,//'`
422889f9
CW
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.
10142if 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" \
00f6db22 10164 && test ! -d "$withval/$acl_libdirstem"; then
422889f9
CW
10165 additional_libdir="$withval/$acl_libdirstem2"
10166 fi
10167 fi
10168 fi
10169
10170fi
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
422889f9
CW
10603
10604
10605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
10606$as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; }
10607if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then :
10608 $as_echo_n "(cached) " >&6
10609else
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>
10615int
10616main (void)
10617{
10618CFPreferencesCopyAppValue(NULL, NULL)
10619 ;
10620 return 0;
10621}
10622_ACEOF
10623if ac_fn_c_try_link "$LINENO"; then :
10624 gt_cv_func_CFPreferencesCopyAppValue=yes
10625else
10626 gt_cv_func_CFPreferencesCopyAppValue=no
10627fi
10628rm -f core conftest.err conftest.$ac_objext \
10629 conftest$ac_exeext conftest.$ac_ext
10630 LIBS="$gt_save_LIBS"
10631fi
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; }
10641if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then :
10642 $as_echo_n "(cached) " >&6
10643else
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>
10649int
10650main (void)
10651{
10652CFLocaleCopyCurrent();
10653 ;
10654 return 0;
10655}
10656_ACEOF
10657if ac_fn_c_try_link "$LINENO"; then :
10658 gt_cv_func_CFLocaleCopyCurrent=yes
10659else
10660 gt_cv_func_CFLocaleCopyCurrent=no
10661fi
10662rm -f core conftest.err conftest.$ac_objext \
10663 conftest$ac_exeext conftest.$ac_ext
10664 LIBS="$gt_save_LIBS"
10665fi
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
10704typedef 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; }
10717if eval \${$gt_func_gnugettext_libc+:} false; then :
10718 $as_echo_n "(cached) " >&6
10719else
10720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10721/* end confdefs.h. */
10722
10723#include <libintl.h>
10724$gt_revision_test_code
10725extern int _nl_msg_cat_cntr;
10726extern int *_nl_domain_bindings;
10727
10728int
10729main (void)
10730{
10731
10732bindtextdomain ("", "");
10733return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings
10734
10735 ;
10736 return 0;
10737}
10738_ACEOF
10739if ac_fn_c_try_link "$LINENO"; then :
10740 eval "$gt_func_gnugettext_libc=yes"
10741else
10742 eval "$gt_func_gnugettext_libc=no"
10743fi
10744rm -f core conftest.err conftest.$ac_objext \
10745 conftest$ac_exeext conftest.$ac_ext
10746fi
10747eval 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; }
10784if ${am_cv_func_iconv+:} false; then :
10785 $as_echo_n "(cached) " >&6
10786else
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
10796int
10797main (void)
10798{
10799iconv_t cd = iconv_open("","");
10800 iconv(cd,NULL,NULL,NULL,NULL);
10801 iconv_close(cd);
10802 ;
10803 return 0;
10804}
10805_ACEOF
10806if ac_fn_c_try_link "$LINENO"; then :
10807 am_cv_func_iconv=yes
10808fi
10809rm -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
10820int
10821main (void)
10822{
10823iconv_t cd = iconv_open("","");
10824 iconv(cd,NULL,NULL,NULL,NULL);
10825 iconv_close(cd);
10826 ;
10827 return 0;
10828}
10829_ACEOF
10830if ac_fn_c_try_link "$LINENO"; then :
10831 am_cv_lib_iconv=yes
10832 am_cv_func_iconv=yes
10833fi
10834rm -f core conftest.err conftest.$ac_objext \
10835 conftest$ac_exeext conftest.$ac_ext
10836 LIBS="$am_save_LIBS"
10837 fi
10838
10839fi
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; }
10845if ${am_cv_func_iconv_works+:} false; then :
10846 $as_echo_n "(cached) " >&6
10847else
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
10860else
10861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10862/* end confdefs.h. */
10863
10864#include <iconv.h>
10865#include <string.h>
10866int 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
10963if ac_fn_c_try_run "$LINENO"; then :
10964 am_cv_func_iconv_works=yes
10965else
10966 am_cv_func_iconv_works=no
10967fi
10968rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10969 conftest.$ac_objext conftest.beam conftest.$ac_ext
10970fi
10971
10972 LIBS="$am_save_LIBS"
10973
10974fi
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
422889f9
CW
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.
11024if 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" \
00f6db22 11046 && test ! -d "$withval/$acl_libdirstem"; then
422889f9
CW
11047 additional_libdir="$withval/$acl_libdirstem2"
11048 fi
11049 fi
11050 fi
11051
11052fi
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
422889f9
CW
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; }
11464if eval \${$gt_func_gnugettext_libintl+:} false; then :
11465 $as_echo_n "(cached) " >&6
11466else
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
11476extern int _nl_msg_cat_cntr;
11477extern
11478#ifdef __cplusplus
11479"C"
11480#endif
11481const char *_nl_expand_alias (const char *);
11482
11483int
11484main (void)
11485{
11486
11487bindtextdomain ("", "");
11488return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
11489
11490 ;
11491 return 0;
11492}
11493_ACEOF
11494if ac_fn_c_try_link "$LINENO"; then :
11495 eval "$gt_func_gnugettext_libintl=yes"
11496else
11497 eval "$gt_func_gnugettext_libintl=no"
11498fi
11499rm -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
11508extern int _nl_msg_cat_cntr;
11509extern
11510#ifdef __cplusplus
11511"C"
11512#endif
11513const char *_nl_expand_alias (const char *);
11514
11515int
11516main (void)
11517{
11518
11519bindtextdomain ("", "");
11520return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
11521
11522 ;
11523 return 0;
11524}
11525_ACEOF
11526if ac_fn_c_try_link "$LINENO"; then :
11527 LIBINTL="$LIBINTL $LIBICONV"
11528 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
11529 eval "$gt_func_gnugettext_libintl=yes"
11530
11531fi
11532rm -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"
11537fi
11538eval 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
00f6db22 11647
422889f9
CW
11648# Check whether --enable-largefile was given.
11649if test "${enable_largefile+set}" = set; then :
11650 enableval=$enable_largefile;
11651fi
11652
11653if 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; }
11657if ${ac_cv_sys_largefile_CC+:} false; then :
11658 $as_echo_n "(cached) " >&6
11659else
11660 ac_cv_sys_largefile_CC=no
11661 if test "$GCC" != yes; then
11662 ac_save_CC=$CC
11663 while :; do
00f6db22
CW
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
422889f9
CW
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. */
00f6db22 11673#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
422889f9 11674 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
00f6db22
CW
11675 && LARGE_OFF_T % 2147483647 == 1)
11676 ? 1 : -1];
422889f9
CW
11677int
11678main (void)
11679{
11680
11681 ;
11682 return 0;
11683}
11684_ACEOF
00f6db22 11685 if ac_fn_c_try_compile "$LINENO"; then :
422889f9
CW
11686 break
11687fi
11688rm -f core conftest.err conftest.$ac_objext
00f6db22
CW
11689 CC="$CC -n32"
11690 if ac_fn_c_try_compile "$LINENO"; then :
422889f9
CW
11691 ac_cv_sys_largefile_CC=' -n32'; break
11692fi
11693rm -f core conftest.err conftest.$ac_objext
00f6db22 11694 break
422889f9
CW
11695 done
11696 CC=$ac_save_CC
11697 rm -f conftest.$ac_ext
11698 fi
11699fi
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; }
11708if ${ac_cv_sys_file_offset_bits+:} false; then :
11709 $as_echo_n "(cached) " >&6
11710else
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. */
00f6db22 11719#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
422889f9 11720 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
00f6db22
CW
11721 && LARGE_OFF_T % 2147483647 == 1)
11722 ? 1 : -1];
422889f9
CW
11723int
11724main (void)
11725{
11726
11727 ;
11728 return 0;
11729}
11730_ACEOF
11731if ac_fn_c_try_compile "$LINENO"; then :
11732 ac_cv_sys_file_offset_bits=no; break
11733fi
11734rm -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. */
00f6db22 11743#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
422889f9 11744 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
00f6db22
CW
11745 && LARGE_OFF_T % 2147483647 == 1)
11746 ? 1 : -1];
422889f9
CW
11747int
11748main (void)
11749{
11750
11751 ;
11752 return 0;
11753}
11754_ACEOF
11755if ac_fn_c_try_compile "$LINENO"; then :
11756 ac_cv_sys_file_offset_bits=64; break
11757fi
11758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11759 ac_cv_sys_file_offset_bits=unknown
11760 break
11761done
11762fi
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; }
11765case $ac_cv_sys_file_offset_bits in #(
11766 no | unknown) ;;
11767 *)
11768cat >>confdefs.h <<_ACEOF
11769#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
11770_ACEOF
11771;;
11772esac
11773rm -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; }
11777if ${ac_cv_sys_large_files+:} false; then :
11778 $as_echo_n "(cached) " >&6
11779else
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. */
00f6db22 11788#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
422889f9 11789 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
00f6db22
CW
11790 && LARGE_OFF_T % 2147483647 == 1)
11791 ? 1 : -1];
422889f9
CW
11792int
11793main (void)
11794{
11795
11796 ;
11797 return 0;
11798}
11799_ACEOF
11800if ac_fn_c_try_compile "$LINENO"; then :
11801 ac_cv_sys_large_files=no; break
11802fi
11803rm -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. */
00f6db22 11812#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
422889f9 11813 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
00f6db22
CW
11814 && LARGE_OFF_T % 2147483647 == 1)
11815 ? 1 : -1];
422889f9
CW
11816int
11817main (void)
11818{
11819
11820 ;
11821 return 0;
11822}
11823_ACEOF
11824if ac_fn_c_try_compile "$LINENO"; then :
11825 ac_cv_sys_large_files=1; break
11826fi
11827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11828 ac_cv_sys_large_files=unknown
11829 break
11830done
11831fi
11832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
11833$as_echo "$ac_cv_sys_large_files" >&6; }
11834case $ac_cv_sys_large_files in #(
11835 no | unknown) ;;
11836 *)
11837cat >>confdefs.h <<_ACEOF
11838#define _LARGE_FILES $ac_cv_sys_large_files
11839_ACEOF
11840;;
11841esac
11842rm -rf conftest*
11843 fi
11844
11845
00f6db22
CW
11846$as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
11847
422889f9
CW
11848fi
11849
11850
11851# Identify characteristics of the host architecture.
11852unset ac_cv_c_bigendian
11853
11854if test x"$target_cpu-$platform" = xsparc64-emu ; then
11855 CFLAGS="$CFLAGS -m64"
11856 HOST_CFLAGS="$HOST_CFLAGS -m64"
11857fi
11858
11859CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=64"
11860HOST_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; }
11864if ${ac_cv_c_bigendian+:} false; then :
11865 $as_echo_n "(cached) " >&6
11866else
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
11877if 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
11900fi
11901rm -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
11909int
11910main (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
11922if 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
11929int
11930main (void)
11931{
11932#if BYTE_ORDER != BIG_ENDIAN
11933 not big endian
11934 #endif
11935
11936 ;
11937 return 0;
11938}
11939_ACEOF
11940if ac_fn_c_try_compile "$LINENO"; then :
11941 ac_cv_c_bigendian=yes
11942else
11943 ac_cv_c_bigendian=no
11944fi
11945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11946fi
11947rm -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
11955int
11956main (void)
11957{
11958#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
11959 bogus endian macros
11960 #endif
11961
11962 ;
11963 return 0;
11964}
11965_ACEOF
11966if 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
11972int
11973main (void)
11974{
11975#ifndef _BIG_ENDIAN
11976 not big endian
11977 #endif
11978
11979 ;
11980 return 0;
11981}
11982_ACEOF
11983if ac_fn_c_try_compile "$LINENO"; then :
11984 ac_cv_c_bigendian=yes
11985else
11986 ac_cv_c_bigendian=no
11987fi
11988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11989fi
11990rm -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. */
11998short 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
12014int
12015main (void)
12016{
12017return use_ascii (foo) == use_ebcdic (foo);
12018 ;
12019 return 0;
12020}
12021_ACEOF
12022if 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
12034fi
12035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12036else
12037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12038/* end confdefs.h. */
12039$ac_includes_default
12040int
12041main (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
12057if ac_fn_c_try_run "$LINENO"; then :
12058 ac_cv_c_bigendian=no
12059else
12060 ac_cv_c_bigendian=yes
12061fi
12062rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12063 conftest.$ac_objext conftest.beam conftest.$ac_ext
12064fi
12065
12066 fi
12067fi
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; }
12092if ${ac_cv_sizeof_void_p+:} false; then :
12093 $as_echo_n "(cached) " >&6
12094else
12095 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
12096
12097else
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;}
12101as_fn_error 77 "cannot compute sizeof (void *)
12102See \`config.log' for more details" "$LINENO" 5; }
12103 else
12104 ac_cv_sizeof_void_p=0
12105 fi
12106fi
12107
12108fi
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
12114cat >>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; }
12125if ${ac_cv_sizeof_long+:} false; then :
12126 $as_echo_n "(cached) " >&6
12127else
12128 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
12129
12130else
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;}
12134as_fn_error 77 "cannot compute sizeof (long)
12135See \`config.log' for more details" "$LINENO" 5; }
12136 else
12137 ac_cv_sizeof_long=0
12138 fi
12139fi
12140
12141fi
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
12147cat >>confdefs.h <<_ACEOF
12148#define SIZEOF_LONG $ac_cv_sizeof_long
12149_ACEOF
12150
12151
12152
12153case "$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; }
12163if ${ac_cv_sizeof_TCHAR+:} false; then :
12164 $as_echo_n "(cached) " >&6
12165else
12166 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (TCHAR))" "ac_cv_sizeof_TCHAR" "#include <windows.h>
12167"; then :
12168
12169else
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;}
12173as_fn_error 77 "cannot compute sizeof (TCHAR)
12174See \`config.log' for more details" "$LINENO" 5; }
12175 else
12176 ac_cv_sizeof_TCHAR=0
12177 fi
12178fi
12179
12180fi
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
12186cat >>confdefs.h <<_ACEOF
12187#define SIZEOF_TCHAR $ac_cv_sizeof_TCHAR
12188_ACEOF
12189
12190
12191 ;;
12192esac
12193
12194case "$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; }
12204if ${ac_cv_sizeof_off_t+:} false; then :
12205 $as_echo_n "(cached) " >&6
12206else
12207 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"; then :
12208
12209else
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;}
12213as_fn_error 77 "cannot compute sizeof (off_t)
12214See \`config.log' for more details" "$LINENO" 5; }
12215 else
12216 ac_cv_sizeof_off_t=0
12217 fi
12218fi
12219
12220fi
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
12226cat >>confdefs.h <<_ACEOF
12227#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
12228_ACEOF
12229
12230
00f6db22
CW
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; }
12238if ${ac_cv_sizeof_off64_t+:} false; then :
12239 $as_echo_n "(cached) " >&6
12240else
12241 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off64_t))" "ac_cv_sizeof_off64_t" "$ac_includes_default"; then :
12242
12243else
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;}
12247as_fn_error 77 "cannot compute sizeof (off64_t)
12248See \`config.log' for more details" "$LINENO" 5; }
12249 else
12250 ac_cv_sizeof_off64_t=0
12251 fi
12252fi
12253
12254fi
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
12260cat >>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;;
422889f9
CW
12267esac
12268
12269if test x$USE_NLS = xno; then
12270 HOST_CFLAGS="$HOST_CFLAGS -fno-builtin-gettext"
12271fi
12272
12273if 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;}
12276else
12277 # Extract the first word of "help2man", so it can be a program name with args.
12278set 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; }
12281if ${ac_cv_path_HELP2MAN+:} false; then :
12282 $as_echo_n "(cached) " >&6
12283else
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
12290for as_dir in $PATH
12291do
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
12300done
12301 done
12302IFS=$as_save_IFS
12303
12304 ;;
12305esac
12306fi
12307HELP2MAN=$ac_cv_path_HELP2MAN
12308if test -n "$HELP2MAN"; then
12309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HELP2MAN" >&5
12310$as_echo "$HELP2MAN" >&6; }
12311else
12312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12313$as_echo "no" >&6; }
12314fi
12315
12316
12317fi
12318
12319# Check for functions and headers.
21f95442 12320for ac_func in posix_memalign memalign getextmntent atexit
422889f9
CW
12321do :
12322 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12323ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12324if 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
12329fi
12330done
12331
0992ffba 12332for ac_header in sys/param.h sys/mount.h sys/mnttab.h limits.h
422889f9
CW
12333do :
12334 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12335ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12336if 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
12341fi
12342
12343done
12344
12345
0992ffba
CW
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.
12349SAVED_CFLAGS="$CFLAGS"
12350CFLAGS="$HOST_CFLAGS -Werror"
00f6db22
CW
12351
12352
12353
12354 for ac_header in $ac_header_list
12355do :
12356 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12357ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
12358"
12359if 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
0992ffba 12362_ACEOF
0992ffba
CW
12363
12364fi
0992ffba 12365
00f6db22
CW
12366done
12367
12368
12369
12370
0992ffba
CW
12371ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
12372if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
12373
12374$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
12375
12376fi
12377
12378
00f6db22
CW
12379if 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"
0992ffba
CW
12381if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
12382
12383$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
12384
12385fi
12386
12387
0992ffba
CW
12388fi
12389
12390CFLAGS="$SAVED_CFLAGS"
12391
422889f9
CW
12392ac_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"
12396if test "x$ac_cv_member_struct_statfs_f_fstypename" = xyes; then :
12397
12398cat >>confdefs.h <<_ACEOF
12399#define HAVE_STRUCT_STATFS_F_FSTYPENAME 1
12400_ACEOF
12401
12402
12403fi
12404
12405
12406ac_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"
12410if test "x$ac_cv_member_struct_statfs_f_mntfromname" = xyes; then :
12411
12412cat >>confdefs.h <<_ACEOF
12413#define HAVE_STRUCT_STATFS_F_MNTFROMNAME 1
12414_ACEOF
12415
12416
12417fi
12418
12419
12420# For opendisk() and getrawpartition() on NetBSD.
12421# Used in util/deviceiter.c and in util/hostdisk.c.
12422ac_fn_c_check_header_mongrel "$LINENO" "util.h" "ac_cv_header_util_h" "$ac_includes_default"
12423if 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; }
12427if ${ac_cv_lib_util_opendisk+:} false; then :
12428 $as_echo_n "(cached) " >&6
12429else
12430 ac_check_lib_save_LIBS=$LIBS
12431LIBS="-lutil $LIBS"
12432cat 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
12439extern "C"
12440#endif
12441char opendisk ();
12442int
12443main (void)
12444{
12445return opendisk ();
12446 ;
12447 return 0;
12448}
12449_ACEOF
12450if ac_fn_c_try_link "$LINENO"; then :
12451 ac_cv_lib_util_opendisk=yes
12452else
12453 ac_cv_lib_util_opendisk=no
12454fi
12455rm -f core conftest.err conftest.$ac_objext \
12456 conftest$ac_exeext conftest.$ac_ext
12457LIBS=$ac_check_lib_save_LIBS
12458fi
12459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_opendisk" >&5
12460$as_echo "$ac_cv_lib_util_opendisk" >&6; }
12461if 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
12468fi
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; }
12472if ${ac_cv_lib_util_getrawpartition+:} false; then :
12473 $as_echo_n "(cached) " >&6
12474else
12475 ac_check_lib_save_LIBS=$LIBS
12476LIBS="-lutil $LIBS"
12477cat 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
12484extern "C"
12485#endif
12486char getrawpartition ();
12487int
12488main (void)
12489{
12490return getrawpartition ();
12491 ;
12492 return 0;
12493}
12494_ACEOF
12495if ac_fn_c_try_link "$LINENO"; then :
12496 ac_cv_lib_util_getrawpartition=yes
12497else
12498 ac_cv_lib_util_getrawpartition=no
12499fi
12500rm -f core conftest.err conftest.$ac_objext \
12501 conftest$ac_exeext conftest.$ac_ext
12502LIBS=$ac_check_lib_save_LIBS
12503fi
12504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_getrawpartition" >&5
12505$as_echo "$ac_cv_lib_util_getrawpartition" >&6; }
12506if 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
12513fi
12514
12515
12516fi
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; }
12523if ${grub_cv_host_cc_wtrampolines+:} false; then :
12524 $as_echo_n "(cached) " >&6
12525else
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>
12532int va_arg_func (int fixed, va_list args);
12533int
12534main (void)
12535{
12536
12537 ;
12538 return 0;
12539}
12540_ACEOF
12541if ac_fn_c_try_compile "$LINENO"; then :
12542 grub_cv_host_cc_wtrampolines=yes
12543else
12544 grub_cv_host_cc_wtrampolines=no
12545fi
12546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12547 CFLAGS="$SAVED_CFLAGS"
12548
12549fi
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
12553if test x"$grub_host_cv_cc_wtrampolines" = xyes ; then
12554 HOST_CFLAGS="$HOST_CFLAGS -Wtrampolines"
12555fi
12556
12557#
12558# Check for host and build compilers.
12559#
12560HOST_CC=$CC
12561for ac_prog in gcc egcs cc
12562do
12563 # Extract the first word of "$ac_prog", so it can be a program name with args.
12564set 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; }
12567if ${ac_cv_prog_BUILD_CC+:} false; then :
12568 $as_echo_n "(cached) " >&6
12569else
12570 if test -n "$BUILD_CC"; then
12571 ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
12572else
12573as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12574for as_dir in $PATH
12575do
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
12584done
12585 done
12586IFS=$as_save_IFS
12587
12588fi
12589fi
12590BUILD_CC=$ac_cv_prog_BUILD_CC
12591if test -n "$BUILD_CC"; then
12592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
12593$as_echo "$BUILD_CC" >&6; }
12594else
12595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12596$as_echo "no" >&6; }
12597fi
12598
12599
12600 test -n "$BUILD_CC" && break
12601done
12602
12603test -z "$BUILD_CC" && as_fn_error $? "none of gcc, egcs and cc is found. set BUILD_CC manually." "$LINENO" 5
12604BUILD_CPP="$BUILD_CC -E"
12605
12606case "$build_os" in
12607 haiku*) BUILD_LIBM= ;;
12608 *) BUILD_LIBM=-lm ;;
12609esac
12610
12611
12612case "$build_os" in
12613 cygwin*|mingw32*|mingw64*) BUILD_EXEEXT=.exe ;;
12614 *) BUILD_EXEEXT= ;;
12615esac
12616
12617
00f6db22
CW
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
12620BUILD_SHEBANG=/bin/sh
12621for she in /bin/sh "$SHELL"; do
12622 if test -x "$she" ; then
12623 BUILD_SHEBANG="$she"
12624 fi
12625done
12626
12627
422889f9
CW
12628# For gnulib.
12629
12630
12631
12632
12633
12634 LIBC_FATAL_STDERR_=1
12635 export LIBC_FATAL_STDERR_
12636
12637ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
12638if test "x$ac_cv_type_size_t" = xyes; then :
12639
12640else
12641
12642cat >>confdefs.h <<_ACEOF
12643#define size_t unsigned int
12644_ACEOF
12645
12646fi
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; }
12652if ${ac_cv_working_alloca_h+:} false; then :
12653 $as_echo_n "(cached) " >&6
12654else
12655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12656/* end confdefs.h. */
12657#include <alloca.h>
12658int
12659main (void)
12660{
12661char *p = (char *) alloca (2 * sizeof (int));
12662 if (p) return 0;
12663 ;
12664 return 0;
12665}
12666_ACEOF
12667if ac_fn_c_try_link "$LINENO"; then :
12668 ac_cv_working_alloca_h=yes
12669else
12670 ac_cv_working_alloca_h=no
12671fi
12672rm -f core conftest.err conftest.$ac_objext \
12673 conftest$ac_exeext conftest.$ac_ext
12674fi
12675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
12676$as_echo "$ac_cv_working_alloca_h" >&6; }
12677if test $ac_cv_working_alloca_h = yes; then
12678
12679$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
12680
12681fi
12682
12683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
12684$as_echo_n "checking for alloca... " >&6; }
12685if ${ac_cv_func_alloca_works+:} false; then :
12686 $as_echo_n "(cached) " >&6
12687else
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 */
12704void *alloca (size_t);
12705# endif
12706# endif
12707# endif
12708# endif
12709#endif
12710
12711int
12712main (void)
12713{
12714char *p = (char *) alloca (1);
12715 if (p) return 0;
12716 ;
12717 return 0;
12718}
12719_ACEOF
12720if ac_fn_c_try_link "$LINENO"; then :
12721 ac_cv_func_alloca_works=yes
12722else
12723 ac_cv_func_alloca_works=no
12724fi
12725rm -f core conftest.err conftest.$ac_objext \
12726 conftest$ac_exeext conftest.$ac_ext
12727fi
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
12731if test $ac_cv_func_alloca_works = yes; then
12732
12733$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
12734
12735else
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
12745ALLOCA=\${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; }
12752if ${ac_cv_os_cray+:} false; then :
12753 $as_echo_n "(cached) " >&6
12754else
12755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12756/* end confdefs.h. */
12757#if defined CRAY && ! defined CRAY2
12758webecray
12759#else
12760wenotbecray
12761#endif
12762
12763_ACEOF
12764if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12765 $EGREP "webecray" >/dev/null 2>&1; then :
12766 ac_cv_os_cray=yes
12767else
12768 ac_cv_os_cray=no
12769fi
12770rm -f conftest*
12771
12772fi
12773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
12774$as_echo "$ac_cv_os_cray" >&6; }
12775if 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`
12778ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12779if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12780
12781cat >>confdefs.h <<_ACEOF
12782#define CRAY_STACKSEG_END $ac_func
12783_ACEOF
12784
12785 break
12786fi
12787
12788 done
12789fi
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; }
12793if ${ac_cv_c_stack_direction+:} false; then :
12794 $as_echo_n "(cached) " >&6
12795else
12796 if test "$cross_compiling" = yes; then :
12797 ac_cv_c_stack_direction=0
12798else
12799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12800/* end confdefs.h. */
12801$ac_includes_default
12802int
12803find_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
12813int
12814main (int argc, char **argv)
12815{
12816 return find_stack_direction (0, argc + !argv + 20) < 0;
12817}
12818_ACEOF
12819if ac_fn_c_try_run "$LINENO"; then :
12820 ac_cv_c_stack_direction=1
12821else
12822 ac_cv_c_stack_direction=-1
12823fi
12824rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12825 conftest.$ac_objext conftest.beam conftest.$ac_ext
12826fi
12827
12828fi
12829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
12830$as_echo "$ac_cv_c_stack_direction" >&6; }
12831cat >>confdefs.h <<_ACEOF
12832#define STACK_DIRECTION $ac_cv_c_stack_direction
12833_ACEOF
12834
12835
12836fi
12837
12838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12839$as_echo_n "checking for inline... " >&6; }
12840if ${ac_cv_c_inline+:} false; then :
12841 $as_echo_n "(cached) " >&6
12842else
12843 ac_cv_c_inline=no
12844for ac_kw in inline __inline__ __inline; do
12845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12846/* end confdefs.h. */
12847#ifndef __cplusplus
12848typedef int foo_t;
12849static $ac_kw foo_t static_foo () {return 0; }
12850$ac_kw foo_t foo () {return 0; }
12851#endif
12852
12853_ACEOF
12854if ac_fn_c_try_compile "$LINENO"; then :
12855 ac_cv_c_inline=$ac_kw
12856fi
12857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12858 test "$ac_cv_c_inline" != no && break
12859done
12860
12861fi
12862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12863$as_echo "$ac_cv_c_inline" >&6; }
12864
12865case $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 ;;
12878esac
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; }
12882if ${ac_cv_c_restrict+:} false; then :
12883 $as_echo_n "(cached) " >&6
12884else
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. */
00f6db22
CW
12890typedef 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
422889f9
CW
12895int
12896main (void)
12897{
12898int s[1];
00f6db22
CW
12899 int *$ac_kw t = s;
12900 t[0] = 0;
12901 return foo (t) + bar (t);
12902
422889f9
CW
12903 ;
12904 return 0;
12905}
12906_ACEOF
12907if ac_fn_c_try_compile "$LINENO"; then :
12908 ac_cv_c_restrict=$ac_kw
12909fi
12910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12911 test "$ac_cv_c_restrict" != no && break
12912 done
12913
12914fi
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
12928ac_fn_c_check_decl "$LINENO" "clearerr_unlocked" "ac_cv_have_decl_clearerr_unlocked" "$ac_includes_default"
12929if test "x$ac_cv_have_decl_clearerr_unlocked" = xyes; then :
12930 ac_have_decl=1
12931else
12932 ac_have_decl=0
12933fi
12934
12935cat >>confdefs.h <<_ACEOF
12936#define HAVE_DECL_CLEARERR_UNLOCKED $ac_have_decl
12937_ACEOF
12938
12939ac_fn_c_check_decl "$LINENO" "feof_unlocked" "ac_cv_have_decl_feof_unlocked" "$ac_includes_default"
12940if test "x$ac_cv_have_decl_feof_unlocked" = xyes; then :
12941 ac_have_decl=1
12942else
12943 ac_have_decl=0
12944fi
12945
12946cat >>confdefs.h <<_ACEOF
12947#define HAVE_DECL_FEOF_UNLOCKED $ac_have_decl
12948_ACEOF
12949
12950ac_fn_c_check_decl "$LINENO" "ferror_unlocked" "ac_cv_have_decl_ferror_unlocked" "$ac_includes_default"
12951if test "x$ac_cv_have_decl_ferror_unlocked" = xyes; then :
12952 ac_have_decl=1
12953else
12954 ac_have_decl=0
12955fi
12956
12957cat >>confdefs.h <<_ACEOF
12958#define HAVE_DECL_FERROR_UNLOCKED $ac_have_decl
12959_ACEOF
12960
12961ac_fn_c_check_decl "$LINENO" "fflush_unlocked" "ac_cv_have_decl_fflush_unlocked" "$ac_includes_default"
12962if test "x$ac_cv_have_decl_fflush_unlocked" = xyes; then :
12963 ac_have_decl=1
12964else
12965 ac_have_decl=0
12966fi
12967
12968cat >>confdefs.h <<_ACEOF
12969#define HAVE_DECL_FFLUSH_UNLOCKED $ac_have_decl
12970_ACEOF
12971
12972ac_fn_c_check_decl "$LINENO" "fgets_unlocked" "ac_cv_have_decl_fgets_unlocked" "$ac_includes_default"
12973if test "x$ac_cv_have_decl_fgets_unlocked" = xyes; then :
12974 ac_have_decl=1
12975else
12976 ac_have_decl=0
12977fi
12978
12979cat >>confdefs.h <<_ACEOF
12980#define HAVE_DECL_FGETS_UNLOCKED $ac_have_decl
12981_ACEOF
12982
12983ac_fn_c_check_decl "$LINENO" "fputc_unlocked" "ac_cv_have_decl_fputc_unlocked" "$ac_includes_default"
12984if test "x$ac_cv_have_decl_fputc_unlocked" = xyes; then :
12985 ac_have_decl=1
12986else
12987 ac_have_decl=0
12988fi
12989
12990cat >>confdefs.h <<_ACEOF
12991#define HAVE_DECL_FPUTC_UNLOCKED $ac_have_decl
12992_ACEOF
12993
12994ac_fn_c_check_decl "$LINENO" "fputs_unlocked" "ac_cv_have_decl_fputs_unlocked" "$ac_includes_default"
12995if test "x$ac_cv_have_decl_fputs_unlocked" = xyes; then :
12996 ac_have_decl=1
12997else
12998 ac_have_decl=0
12999fi
13000
13001cat >>confdefs.h <<_ACEOF
13002#define HAVE_DECL_FPUTS_UNLOCKED $ac_have_decl
13003_ACEOF
13004
13005ac_fn_c_check_decl "$LINENO" "fread_unlocked" "ac_cv_have_decl_fread_unlocked" "$ac_includes_default"
13006if test "x$ac_cv_have_decl_fread_unlocked" = xyes; then :
13007 ac_have_decl=1
13008else
13009 ac_have_decl=0
13010fi
13011
13012cat >>confdefs.h <<_ACEOF
13013#define HAVE_DECL_FREAD_UNLOCKED $ac_have_decl
13014_ACEOF
13015
13016ac_fn_c_check_decl "$LINENO" "fwrite_unlocked" "ac_cv_have_decl_fwrite_unlocked" "$ac_includes_default"
13017if test "x$ac_cv_have_decl_fwrite_unlocked" = xyes; then :
13018 ac_have_decl=1
13019else
13020 ac_have_decl=0
13021fi
13022
13023cat >>confdefs.h <<_ACEOF
13024#define HAVE_DECL_FWRITE_UNLOCKED $ac_have_decl
13025_ACEOF
13026
13027ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
13028if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
13029 ac_have_decl=1
13030else
13031 ac_have_decl=0
13032fi
13033
13034cat >>confdefs.h <<_ACEOF
13035#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
13036_ACEOF
13037
13038ac_fn_c_check_decl "$LINENO" "getchar_unlocked" "ac_cv_have_decl_getchar_unlocked" "$ac_includes_default"
13039if test "x$ac_cv_have_decl_getchar_unlocked" = xyes; then :
13040 ac_have_decl=1
13041else
13042 ac_have_decl=0
13043fi
13044
13045cat >>confdefs.h <<_ACEOF
13046#define HAVE_DECL_GETCHAR_UNLOCKED $ac_have_decl
13047_ACEOF
13048
13049ac_fn_c_check_decl "$LINENO" "putc_unlocked" "ac_cv_have_decl_putc_unlocked" "$ac_includes_default"
13050if test "x$ac_cv_have_decl_putc_unlocked" = xyes; then :
13051 ac_have_decl=1
13052else
13053 ac_have_decl=0
13054fi
13055
13056cat >>confdefs.h <<_ACEOF
13057#define HAVE_DECL_PUTC_UNLOCKED $ac_have_decl
13058_ACEOF
13059
13060ac_fn_c_check_decl "$LINENO" "putchar_unlocked" "ac_cv_have_decl_putchar_unlocked" "$ac_includes_default"
13061if test "x$ac_cv_have_decl_putchar_unlocked" = xyes; then :
13062 ac_have_decl=1
13063else
13064 ac_have_decl=0
13065fi
13066
13067cat >>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
13075do :
13076 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13077ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13078if 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
13083fi
13084done
13085
13086
13087
13088
13089
13090
13091
13092
00f6db22
CW
13093
13094ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
13095if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
13096 ac_have_decl=1
13097else
13098 ac_have_decl=0
13099fi
13100
13101cat >>confdefs.h <<_ACEOF
13102#define HAVE_DECL_STRERROR_R $ac_have_decl
13103_ACEOF
13104
13105for ac_func in strerror_r
422889f9 13106do :
00f6db22
CW
13107 ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
13108if test "x$ac_cv_func_strerror_r" = xyes; then :
422889f9 13109 cat >>confdefs.h <<_ACEOF
00f6db22 13110#define HAVE_STRERROR_R 1
422889f9
CW
13111_ACEOF
13112
13113fi
422889f9
CW
13114done
13115
00f6db22
CW
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; }
13118if ${ac_cv_func_strerror_r_char_p+:} false; then :
13119 $as_echo_n "(cached) " >&6
13120else
422889f9 13121
00f6db22
CW
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
13127int
13128main (void)
13129{
422889f9 13130
00f6db22
CW
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;
422889f9 13135
00f6db22
CW
13136 ;
13137 return 0;
13138}
13139_ACEOF
13140if ac_fn_c_try_compile "$LINENO"; then :
13141 ac_cv_func_strerror_r_char_p=yes
13142fi
13143rm -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 :
13153else
13154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13155/* end confdefs.h. */
13156$ac_includes_default
13157 extern char *strerror_r ();
13158int
13159main (void)
13160{
13161char buf[100];
13162 char x = *strerror_r (0, buf, sizeof buf);
13163 return ! isalpha (x);
13164 ;
13165 return 0;
13166}
13167_ACEOF
13168if ac_fn_c_try_run "$LINENO"; then :
13169 ac_cv_func_strerror_r_char_p=yes
13170fi
13171rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13172 conftest.$ac_objext conftest.beam conftest.$ac_ext
13173fi
13174
13175 fi
13176
13177fi
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; }
13180if test $ac_cv_func_strerror_r_char_p = yes; then
13181
13182$as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
13183
13184fi
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;
422889f9
CW
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;
00f6db22 13229 GNULIB_WCSFTIME=0;
422889f9
CW
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;
00f6db22 13267 HAVE_WCSFTIME=1;
422889f9
CW
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;
00f6db22 13283 REPLACE_WCSFTIME=0;
422889f9
CW
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; }
13288if ${gl_cv_header_wchar_h_correct_inline+:} false; then :
13289 $as_echo_n "(cached) " >&6
13290else
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>
13304extern int zero (void);
13305int main () { return zero(); }
13306
13307_ACEOF
00f6db22
CW
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
422889f9
CW
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
422889f9
CW
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>
13328int zero (void) { return 0; }
13329
13330_ACEOF
00f6db22
CW
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
422889f9
CW
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
422889f9
CW
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
00f6db22
CW
13345 ac_compile="$save_ac_compile"
13346 rm -f conftest12.c conftest12.$ac_objext conftest$ac_exeext
422889f9
CW
13347
13348fi
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).
13353This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
13354C99 mode. You have four options:
13355 - Add the flag -fgnu89-inline to CC and reconfigure, or
13356 - Fix your include files, using parts of
00f6db22 13357 <https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
422889f9
CW
13358 - Use a gcc version older than 4.3, or
13359 - Don't use the flags -std=c99 or -std=gnu99.
13360Configuration 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; }
13368if ${am_cv_langinfo_codeset+:} false; then :
13369 $as_echo_n "(cached) " >&6
13370else
13371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13372/* end confdefs.h. */
13373#include <langinfo.h>
13374int
13375main (void)
13376{
13377char* cs = nl_langinfo(CODESET); return !cs;
13378 ;
13379 return 0;
13380}
13381_ACEOF
13382if ac_fn_c_try_link "$LINENO"; then :
13383 am_cv_langinfo_codeset=yes
13384else
13385 am_cv_langinfo_codeset=no
13386fi
13387rm -f core conftest.err conftest.$ac_objext \
13388 conftest$ac_exeext conftest.$ac_ext
13389
13390fi
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; }
13404if ${gt_cv_locale_fr+:} false; then :
13405 $as_echo_n "(cached) " >&6
13406else
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>
13418struct tm t;
13419char buf[16];
13420int main () {
00f6db22
CW
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
422889f9 13427 /* Check whether the given locale name is recognized by the system. */
00f6db22 13428# if defined _WIN32 && !defined __CYGWIN__
422889f9
CW
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;
00f6db22 13436# else
422889f9 13437 if (setlocale (LC_ALL, "") == NULL) return 1;
00f6db22 13438# endif
422889f9
CW
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". */
00f6db22 13447# if HAVE_LANGINFO_CODESET
422889f9
CW
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 }
00f6db22
CW
13454# endif
13455# ifdef __CYGWIN__
422889f9
CW
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;
00f6db22 13460# endif
422889f9
CW
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;
00f6db22 13466# if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
422889f9
CW
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;
00f6db22 13471# endif
422889f9 13472 return 0;
00f6db22 13473#endif
422889f9
CW
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
13535fi
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
00f6db22
CW
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;
422889f9 13673
422889f9 13674
422889f9 13675
422889f9
CW
13676
13677
13678
00f6db22
CW
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; }
13727if ${gl_cv_have_include_next+:} false; then :
13728 $as_echo_n "(cached) " >&6
13729else
422889f9
CW
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
13736int foo;
13737#else
13738#error "include_next doesn't work"
13739#endif
13740EOF
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
13746int foo;
13747#else
13748#error "include_next doesn't work"
13749#endif
13750EOF
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
13756EOF
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
13763if ac_fn_c_try_compile "$LINENO"; then :
13764 gl_cv_have_include_next=yes
13765else
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
13771if ac_fn_c_try_compile "$LINENO"; then :
13772 gl_cv_have_include_next=buggy
13773else
13774 gl_cv_have_include_next=no
13775fi
13776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13777
13778fi
13779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13780 CPPFLAGS="$gl_save_CPPFLAGS"
13781 rm -rf conftestd1a conftestd1b conftestd2
13782
13783fi
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; }
13807if ${gl_cv_pragma_columns+:} false; then :
13808 $as_echo_n "(cached) " >&6
13809else
13810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13811/* end confdefs.h. */
13812
13813#ifdef __TANDEM
13814choke me
13815#endif
13816
13817_ACEOF
13818if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13819 $EGREP "choke me" >/dev/null 2>&1; then :
13820 gl_cv_pragma_columns=yes
13821else
13822 gl_cv_pragma_columns=no
13823fi
13824rm -f conftest*
13825
13826
13827fi
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
00f6db22
CW
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; }
13843if ${gl_cv_double_slash_root+:} false; then :
13844 $as_echo_n "(cached) " >&6
13845else
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
13869fi
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
422889f9
CW
13880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
13881$as_echo_n "checking for complete errno.h... " >&6; }
13882if ${gl_cv_header_errno_h_complete+:} false; then :
13883 $as_echo_n "(cached) " >&6
13884else
13885
13886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13887/* end confdefs.h. */
13888
13889#include <errno.h>
13890#if !defined ETXTBSY
13891booboo
13892#endif
13893#if !defined ENOMSG
13894booboo
13895#endif
13896#if !defined EIDRM
13897booboo
13898#endif
13899#if !defined ENOLINK
13900booboo
13901#endif
13902#if !defined EPROTO
13903booboo
13904#endif
13905#if !defined EMULTIHOP
13906booboo
13907#endif
13908#if !defined EBADMSG
13909booboo
13910#endif
13911#if !defined EOVERFLOW
13912booboo
13913#endif
13914#if !defined ENOTSUP
13915booboo
13916#endif
13917#if !defined ENETRESET
13918booboo
13919#endif
13920#if !defined ECONNABORTED
13921booboo
13922#endif
13923#if !defined ESTALE
13924booboo
13925#endif
13926#if !defined EDQUOT
13927booboo
13928#endif
13929#if !defined ECANCELED
13930booboo
13931#endif
13932#if !defined EOWNERDEAD
13933booboo
13934#endif
13935#if !defined ENOTRECOVERABLE
13936booboo
13937#endif
13938#if !defined EILSEQ
13939booboo
13940#endif
13941
13942_ACEOF
13943if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13944 $EGREP "booboo" >/dev/null 2>&1; then :
13945 gl_cv_header_errno_h_complete=no
13946else
13947 gl_cv_header_errno_h_complete=yes
13948fi
13949rm -f conftest*
13950
13951
13952fi
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; }
13971if ${gl_cv_next_errno_h+:} false; then :
13972 $as_echo_n "(cached) " >&6
13973else
13974
00f6db22
CW
13975
13976
13977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
422889f9
CW
13978/* end confdefs.h. */
13979#include <errno.h>
422889f9 13980_ACEOF
00f6db22
CW
13981 case "$host_os" in
13982 aix*) gl_absname_cpp="$ac_cpp -C" ;;
13983 *) gl_absname_cpp="$ac_cpp" ;;
13984 esac
422889f9 13985
00f6db22
CW
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 }'
422889f9 14003
00f6db22
CW
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'"'
422889f9
CW
14009
14010
14011fi
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='#'
14035else
14036 GL_GENERATE_ERRNO_H_TRUE='#'
14037 GL_GENERATE_ERRNO_H_FALSE=
14038fi
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; }
14044if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then :
14045 $as_echo_n "(cached) " >&6
14046else
14047
14048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14049/* end confdefs.h. */
14050
14051#include <errno.h>
14052#ifdef EMULTIHOP
14053yes
14054#endif
14055
14056_ACEOF
14057if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14058 $EGREP "yes" >/dev/null 2>&1; then :
14059 gl_cv_header_errno_h_EMULTIHOP=yes
14060else
14061 gl_cv_header_errno_h_EMULTIHOP=no
14062fi
14063rm -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
14072yes
14073#endif
14074
14075_ACEOF
14076if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14077 $EGREP "yes" >/dev/null 2>&1; then :
14078 gl_cv_header_errno_h_EMULTIHOP=hidden
14079fi
14080rm -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
14091fi
14092
14093 fi
14094 fi
14095
14096fi
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; }
14115if ${gl_cv_header_errno_h_ENOLINK+:} false; then :
14116 $as_echo_n "(cached) " >&6
14117else
14118
14119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14120/* end confdefs.h. */
14121
14122#include <errno.h>
14123#ifdef ENOLINK
14124yes
14125#endif
14126
14127_ACEOF
14128if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14129 $EGREP "yes" >/dev/null 2>&1; then :
14130 gl_cv_header_errno_h_ENOLINK=yes
14131else
14132 gl_cv_header_errno_h_ENOLINK=no
14133fi
14134rm -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
14143yes
14144#endif
14145
14146_ACEOF
14147if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14148 $EGREP "yes" >/dev/null 2>&1; then :
14149 gl_cv_header_errno_h_ENOLINK=hidden
14150fi
14151rm -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
14162fi
14163
14164 fi
14165 fi
14166
14167fi
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; }
14186if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then :
14187 $as_echo_n "(cached) " >&6
14188else
14189
14190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14191/* end confdefs.h. */
14192
14193#include <errno.h>
14194#ifdef EOVERFLOW
14195yes
14196#endif
14197
14198_ACEOF
14199if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14200 $EGREP "yes" >/dev/null 2>&1; then :
14201 gl_cv_header_errno_h_EOVERFLOW=yes
14202else
14203 gl_cv_header_errno_h_EOVERFLOW=no
14204fi
14205rm -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
14214yes
14215#endif
14216
14217_ACEOF
14218if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14219 $EGREP "yes" >/dev/null 2>&1; then :
14220 gl_cv_header_errno_h_EOVERFLOW=hidden
14221fi
14222rm -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
14233fi
14234
14235 fi
14236 fi
14237
14238fi
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
00f6db22
CW
14254
14255
14256
14257ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default"
14258if test "x$ac_cv_have_decl_fchdir" = xyes; then :
422889f9
CW
14259 ac_have_decl=1
14260else
14261 ac_have_decl=0
14262fi
14263
14264cat >>confdefs.h <<_ACEOF
00f6db22 14265#define HAVE_DECL_FCHDIR $ac_have_decl
422889f9
CW
14266_ACEOF
14267
422889f9 14268
00f6db22
CW
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;
422889f9 14278
422889f9 14279
422889f9 14280
422889f9 14281
00f6db22
CW
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; }
14290if ${gl_cv_header_working_fcntl_h+:} false; then :
14291 $as_echo_n "(cached) " >&6
14292else
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
422889f9
CW
14300else
14301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14302/* end confdefs.h. */
00f6db22
CW
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
422889f9
CW
14325int
14326main (void)
14327{
00f6db22
CW
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;
422889f9
CW
14392 ;
14393 return 0;
14394}
14395_ACEOF
14396if ac_fn_c_try_run "$LINENO"; then :
00f6db22
CW
14397 gl_cv_header_working_fcntl_h=yes
14398else
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
422889f9
CW
14405fi
14406rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14407 conftest.$ac_objext conftest.beam conftest.$ac_ext
14408fi
14409
422889f9
CW
14410
14411fi
00f6db22
CW
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
14420cat >>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
14430cat >>confdefs.h <<_ACEOF
14431#define HAVE_WORKING_O_NOFOLLOW $ac_val
14432_ACEOF
14433
14434
14435ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
14436if test "x$ac_cv_type_pid_t" = xyes; then :
14437
14438else
14439
14440cat >>confdefs.h <<_ACEOF
14441#define pid_t int
14442_ACEOF
14443
14444fi
14445
14446ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
14447if test "x$ac_cv_type_mode_t" = xyes; then :
14448
14449else
14450
14451cat >>confdefs.h <<_ACEOF
14452#define mode_t int
14453_ACEOF
14454
14455fi
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; }
14484if ${gl_cv_next_fnmatch_h+:} false; then :
14485 $as_echo_n "(cached) " >&6
14486else
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
14530fi
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
422889f9 14546
422889f9 14547
00f6db22
CW
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='#'
14571else
14572 GL_GENERATE_FNMATCH_H_TRUE='#'
14573 GL_GENERATE_FNMATCH_H_FALSE=
422889f9
CW
14574fi
14575
14576
14577
14578
14579
14580
00f6db22
CW
14581
14582
14583
14584
422889f9
CW
14585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
14586$as_echo_n "checking for mbstate_t... " >&6; }
14587if ${ac_cv_type_mbstate_t+:} false; then :
14588 $as_echo_n "(cached) " >&6
14589else
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>
14601int
14602main (void)
14603{
14604mbstate_t x; return sizeof x;
14605 ;
14606 return 0;
14607}
14608_ACEOF
14609if ac_fn_c_try_compile "$LINENO"; then :
14610 ac_cv_type_mbstate_t=yes
14611else
14612 ac_cv_type_mbstate_t=no
14613fi
14614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14615fi
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
00f6db22
CW
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;
422889f9 14677
00f6db22
CW
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; }
14680if ${ac_cv_header_stat_broken+:} false; then :
14681 $as_echo_n "(cached) " >&6
14682else
14683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14684/* end confdefs.h. */
14685#include <sys/types.h>
14686#include <sys/stat.h>
422889f9 14687
00f6db22
CW
14688#if defined S_ISBLK && defined S_IFDIR
14689extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
14690#endif
422889f9 14691
00f6db22
CW
14692#if defined S_ISBLK && defined S_IFCHR
14693extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
14694#endif
14695
14696#if defined S_ISLNK && defined S_IFREG
14697extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
14698#endif
14699
14700#if defined S_ISSOCK && defined S_IFREG
14701extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
14702#endif
14703
14704_ACEOF
14705if ac_fn_c_try_compile "$LINENO"; then :
14706 ac_cv_header_stat_broken=no
422889f9 14707else
00f6db22
CW
14708 ac_cv_header_stat_broken=yes
14709fi
14710rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
422889f9 14711fi
00f6db22
CW
14712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
14713$as_echo "$ac_cv_header_stat_broken" >&6; }
14714if test $ac_cv_header_stat_broken = yes; then
422889f9 14715
00f6db22 14716$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
422889f9 14717
00f6db22 14718fi
422889f9
CW
14719
14720
422889f9 14721
422889f9
CW
14722
14723
00f6db22
CW
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; }
14728if ${gl_cv_type_off_t_64+:} false; then :
14729 $as_echo_n "(cached) " >&6
14730else
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
14736int
14737main (void)
14738{
14739
14740 ;
14741 return 0;
14742}
14743_ACEOF
14744if ac_fn_c_try_compile "$LINENO"; then :
14745 gl_cv_type_off_t_64=yes
14746else
14747 gl_cv_type_off_t_64=no
14748fi
14749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14750
14751fi
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; }
14761if ${gl_cv_member_st_size_64+:} false; then :
14762 $as_echo_n "(cached) " >&6
14763else
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];
422889f9 14769
00f6db22
CW
14770int
14771main (void)
14772{
14773
14774 ;
14775 return 0;
14776}
14777_ACEOF
14778if ac_fn_c_try_compile "$LINENO"; then :
14779 gl_cv_member_st_size_64=yes
14780else
14781 gl_cv_member_st_size_64=no
14782fi
14783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
422889f9 14784
00f6db22
CW
14785fi
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
422889f9
CW
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
00f6db22 14815 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
422889f9 14816 else
00f6db22
CW
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; }
14819if ${gl_cv_next_sys_stat_h+:} false; then :
422889f9
CW
14820 $as_echo_n "(cached) " >&6
14821else
14822
00f6db22
CW
14823 if test $ac_cv_header_sys_stat_h = yes; then
14824
422889f9
CW
14825
14826
422889f9 14827
00f6db22
CW
14828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14829/* end confdefs.h. */
14830#include <sys/stat.h>
422889f9 14831_ACEOF
00f6db22
CW
14832 case "$host_os" in
14833 aix*) gl_absname_cpp="$ac_cpp -C" ;;
14834 *) gl_absname_cpp="$ac_cpp" ;;
14835 esac
422889f9 14836
00f6db22
CW
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'"'
422889f9 14860 else
00f6db22 14861 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
422889f9
CW
14862 fi
14863
14864
14865fi
00f6db22
CW
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; }
422889f9 14868 fi
00f6db22 14869 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
422889f9
CW
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'
00f6db22 14873 gl_next_as_first_directive='<'sys/stat.h'>'
422889f9
CW
14874 else
14875 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
00f6db22 14876 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
422889f9 14877 fi
00f6db22 14878 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
422889f9
CW
14879
14880
14881
14882
422889f9
CW
14883
14884
422889f9 14885
422889f9 14886
00f6db22 14887 WINDOWS_STAT_TIMESPEC=0
422889f9 14888
422889f9 14889
422889f9 14890
00f6db22
CW
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"
14899if test "x$ac_cv_type_nlink_t" = xyes; then :
422889f9
CW
14900
14901else
00f6db22
CW
14902
14903$as_echo "#define nlink_t int" >>confdefs.h
14904
422889f9 14905fi
422889f9 14906
422889f9 14907
00f6db22
CW
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; }
14916if ${gl_cv_func_getcwd_null+:} false; then :
422889f9
CW
14917 $as_echo_n "(cached) " >&6
14918else
00f6db22
CW
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
422889f9 14928
422889f9
CW
14929else
14930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14931/* end confdefs.h. */
14932
00f6db22
CW
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
422889f9
CW
14942
14943int
00f6db22 14944main (void)
422889f9 14945{
422889f9 14946
00f6db22
CW
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 ;
422889f9
CW
14968 return 0;
14969}
422889f9
CW
14970_ACEOF
14971if ac_fn_c_try_run "$LINENO"; then :
00f6db22 14972 gl_cv_func_getcwd_null=yes
422889f9 14973else
00f6db22 14974 gl_cv_func_getcwd_null=no
422889f9
CW
14975fi
14976rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14977 conftest.$ac_objext conftest.beam conftest.$ac_ext
14978fi
14979
00f6db22
CW
14980fi
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; }
14987if ${gl_cv_func_getcwd_posix_signature+:} false; then :
14988 $as_echo_n "(cached) " >&6
422889f9
CW
14989else
14990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14991/* end confdefs.h. */
422889f9 14992#include <unistd.h>
422889f9 14993int
00f6db22 14994main (void)
422889f9 14995{
00f6db22
CW
14996extern
14997 #ifdef __cplusplus
14998 "C"
14999 #endif
15000 char *getcwd (char *, size_t);
422889f9 15001
00f6db22 15002 ;
422889f9
CW
15003 return 0;
15004}
15005
15006_ACEOF
00f6db22
CW
15007if ac_fn_c_try_compile "$LINENO"; then :
15008 gl_cv_func_getcwd_posix_signature=yes
422889f9 15009else
00f6db22 15010 gl_cv_func_getcwd_posix_signature=no
422889f9 15011fi
00f6db22
CW
15012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15013
422889f9 15014fi
00f6db22
CW
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; }
422889f9 15017
422889f9 15018
00f6db22
CW
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;
422889f9 15120
00f6db22
CW
15121ac_fn_c_check_decl "$LINENO" "getdelim" "ac_cv_have_decl_getdelim" "$ac_includes_default"
15122if test "x$ac_cv_have_decl_getdelim" = xyes; then :
15123 ac_have_decl=1
15124else
15125 ac_have_decl=0
15126fi
422889f9 15127
00f6db22
CW
15128cat >>confdefs.h <<_ACEOF
15129#define HAVE_DECL_GETDELIM $ac_have_decl
422889f9 15130_ACEOF
00f6db22
CW
15131
15132
15133
15134
15135
15136ac_fn_c_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default"
15137if test "x$ac_cv_have_decl_getdtablesize" = xyes; then :
15138 ac_have_decl=1
422889f9 15139else
00f6db22 15140 ac_have_decl=0
422889f9
CW
15141fi
15142
00f6db22
CW
15143cat >>confdefs.h <<_ACEOF
15144#define HAVE_DECL_GETDTABLESIZE $ac_have_decl
15145_ACEOF
422889f9 15146
00f6db22
CW
15147ac_fn_c_check_decl "$LINENO" "getline" "ac_cv_have_decl_getline" "$ac_includes_default"
15148if test "x$ac_cv_have_decl_getline" = xyes; then :
15149 ac_have_decl=1
15150else
15151 ac_have_decl=0
422889f9 15152fi
422889f9 15153
00f6db22
CW
15154cat >>confdefs.h <<_ACEOF
15155#define HAVE_DECL_GETLINE $ac_have_decl
15156_ACEOF
422889f9 15157
422889f9 15158
422889f9
CW
15159
15160
422889f9 15161
422889f9 15162
422889f9 15163
422889f9 15164
422889f9 15165
422889f9 15166
422889f9 15167
00f6db22
CW
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; }
15178if ${gl_cv_next_getopt_h+:} false; then :
422889f9
CW
15179 $as_echo_n "(cached) " >&6
15180else
422889f9 15181
00f6db22
CW
15182 if test $ac_cv_header_getopt_h = yes; then
15183
15184
15185
15186
422889f9
CW
15187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15188/* end confdefs.h. */
15189#include <getopt.h>
00f6db22
CW
15190_ACEOF
15191 case "$host_os" in
15192 aix*) gl_absname_cpp="$ac_cpp -C" ;;
15193 *) gl_absname_cpp="$ac_cpp" ;;
15194 esac
422889f9 15195
00f6db22
CW
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
422889f9
CW
15222
15223
15224fi
00f6db22
CW
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
422889f9 15229
00f6db22
CW
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
422889f9 15238
422889f9 15239
422889f9 15240
422889f9 15241
00f6db22
CW
15242 if test $ac_cv_header_getopt_h = yes; then
15243 HAVE_GETOPT_H=1
15244 else
15245 HAVE_GETOPT_H=0
15246 fi
422889f9
CW
15247
15248
00f6db22 15249 gl_replace_getopt=
422889f9 15250
00f6db22
CW
15251 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
15252 for ac_header in getopt.h
15253do :
15254 ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
15255if test "x$ac_cv_header_getopt_h" = xyes; then :
15256 cat >>confdefs.h <<_ACEOF
15257#define HAVE_GETOPT_H 1
15258_ACEOF
422889f9 15259
422889f9 15260else
00f6db22 15261 gl_replace_getopt=yes
422889f9
CW
15262fi
15263
00f6db22 15264done
422889f9 15265
00f6db22 15266 fi
422889f9 15267
00f6db22
CW
15268 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
15269 for ac_func in getopt_long_only
15270do :
15271 ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
15272if test "x$ac_cv_func_getopt_long_only" = xyes; then :
15273 cat >>confdefs.h <<_ACEOF
15274#define HAVE_GETOPT_LONG_ONLY 1
15275_ACEOF
422889f9 15276
00f6db22
CW
15277else
15278 gl_replace_getopt=yes
15279fi
15280done
422889f9 15281
00f6db22 15282 fi
422889f9 15283
00f6db22
CW
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; }
15287if ${gl_cv_func_getopt_posix+:} false; then :
422889f9
CW
15288 $as_echo_n "(cached) " >&6
15289else
00f6db22
CW
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;}
15295as_fn_error $? "cannot run test program while cross compiling
15296See \`config.log' for more details" "$LINENO" 5; }
422889f9
CW
15297else
15298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15299/* end confdefs.h. */
00f6db22
CW
15300
15301#include <unistd.h>
15302#include <stdlib.h>
15303#include <string.h>
422889f9
CW
15304
15305int
00f6db22 15306main ()
422889f9 15307{
00f6db22
CW
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;
422889f9 15314
00f6db22
CW
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;
422889f9
CW
15323 return 0;
15324}
00f6db22 15325
422889f9
CW
15326_ACEOF
15327if ac_fn_c_try_run "$LINENO"; then :
00f6db22 15328 gl_cv_func_getopt_posix=maybe
422889f9 15329else
00f6db22 15330 gl_cv_func_getopt_posix=no
422889f9
CW
15331fi
15332rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15333 conftest.$ac_objext conftest.beam conftest.$ac_ext
15334fi
15335
00f6db22
CW
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;}
15340as_fn_error $? "cannot run test program while cross compiling
15341See \`config.log' for more details" "$LINENO" 5; }
15342else
15343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15344/* end confdefs.h. */
422889f9 15345
00f6db22
CW
15346#include <unistd.h>
15347#include <stdlib.h>
15348#include <string.h>
422889f9 15349
422889f9 15350int
00f6db22 15351main ()
422889f9 15352{
00f6db22
CW
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;
422889f9 15362
00f6db22
CW
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;
422889f9
CW
15382 return 0;
15383}
00f6db22 15384
422889f9 15385_ACEOF
00f6db22
CW
15386if ac_fn_c_try_run "$LINENO"; then :
15387 gl_cv_func_getopt_posix=maybe
422889f9 15388else
00f6db22 15389 gl_cv_func_getopt_posix=no
422889f9 15390fi
00f6db22
CW
15391rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15392 conftest.$ac_objext conftest.beam conftest.$ac_ext
422889f9 15393fi
422889f9 15394
00f6db22
CW
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;}
15400as_fn_error $? "cannot run test program while cross compiling
15401See \`config.log' for more details" "$LINENO" 5; }
422889f9
CW
15402else
15403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15404/* end confdefs.h. */
00f6db22
CW
15405
15406#include <unistd.h>
15407#include <stdlib.h>
15408#include <string.h>
422889f9
CW
15409
15410int
00f6db22 15411main ()
422889f9 15412{
00f6db22
CW
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;
422889f9
CW
15424 return 0;
15425}
00f6db22 15426
422889f9 15427_ACEOF
00f6db22
CW
15428if ac_fn_c_try_run "$LINENO"; then :
15429 gl_cv_func_getopt_posix=yes
422889f9 15430else
00f6db22 15431 gl_cv_func_getopt_posix=no
422889f9 15432fi
00f6db22
CW
15433rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15434 conftest.$ac_objext conftest.beam conftest.$ac_ext
422889f9
CW
15435fi
15436
00f6db22
CW
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
422889f9 15444
00f6db22
CW
15445fi
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
422889f9 15452
00f6db22
CW
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; }
15456if ${gl_cv_func_getopt_gnu+:} false; then :
422889f9
CW
15457 $as_echo_n "(cached) " >&6
15458else
00f6db22
CW
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"
422889f9 15475
00f6db22
CW
15476else
15477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
422889f9 15478/* end confdefs.h. */
00f6db22
CW
15479#include <getopt.h>
15480 #include <stddef.h>
15481 #include <string.h>
422889f9 15482
00f6db22
CW
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. */
15493static mach_port_t our_exception_port;
15494/* The main function of the thread listening for exceptions of type
15495 EXC_BAD_ACCESS. */
15496static void *
15497mach_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}
15513static void
15514nocrash_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>
15551static LONG WINAPI
15552exception_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}
15569static void
15570nocrash_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. */
15579static void
15580exception_handler (int sig)
15581{
15582 _exit (1);
15583}
15584static void
15585nocrash_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
15597int
15598main (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
15676if ac_fn_c_try_run "$LINENO"; then :
15677 gl_cv_func_getopt_gnu=yes
15678else
15679 gl_cv_func_getopt_gnu=no
15680fi
15681rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15682 conftest.$ac_objext conftest.beam conftest.$ac_ext
15683fi
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
15691fi
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; }
15699if ${gl_cv_func_getopt_long_gnu+:} false; then :
15700 $as_echo_n "(cached) " >&6
15701else
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
15708else
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
15715int
15716main (void)
15717{
15718static 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
15742if ac_fn_c_try_run "$LINENO"; then :
15743 gl_cv_func_getopt_long_gnu=yes
15744else
15745 gl_cv_func_getopt_long_gnu=no
15746fi
15747rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15748 conftest.$ac_objext conftest.beam conftest.$ac_ext
15749fi
15750
15751
15752fi
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; }
15792if ${gl_cv_next_limits_h+:} false; then :
15793 $as_echo_n "(cached) " >&6
15794else
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
15838fi
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; }
15859if ${gl_cv_header_limits_width+:} false; then :
15860 $as_echo_n "(cached) " >&6
15861else
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
15872int
15873main (void)
15874{
15875
15876 ;
15877 return 0;
15878}
15879_ACEOF
15880if ac_fn_c_try_compile "$LINENO"; then :
15881 gl_cv_header_limits_width=yes
15882else
15883 gl_cv_header_limits_width=no
15884fi
15885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15886fi
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='#'
15898else
15899 GL_GENERATE_LIMITS_H_TRUE='#'
15900 GL_GENERATE_LIMITS_H_FALSE=
15901fi
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; }
15927if ${gt_cv_c_wchar_t+:} false; then :
15928 $as_echo_n "(cached) " >&6
15929else
15930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15931/* end confdefs.h. */
15932#include <stddef.h>
15933 wchar_t foo = (wchar_t)'\0';
15934int
15935main (void)
15936{
15937
15938 ;
15939 return 0;
15940}
15941_ACEOF
15942if ac_fn_c_try_compile "$LINENO"; then :
15943 gt_cv_c_wchar_t=yes
15944else
15945 gt_cv_c_wchar_t=no
15946fi
15947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15948fi
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; }
15964if ${gl_cv_type_max_align_t+:} false; then :
15965 $as_echo_n "(cached) " >&6
15966else
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
15976int
15977main (void)
15978{
15979
15980 ;
15981 return 0;
15982}
15983_ACEOF
15984if ac_fn_c_try_compile "$LINENO"; then :
15985 gl_cv_type_max_align_t=yes
15986else
15987 gl_cv_type_max_align_t=no
15988fi
15989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15990
15991fi
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; }
16006if ${gl_cv_decl_null_works+:} false; then :
16007 $as_echo_n "(cached) " >&6
16008else
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
16014int
16015main (void)
16016{
16017
16018 ;
16019 return 0;
16020}
16021_ACEOF
16022if ac_fn_c_try_compile "$LINENO"; then :
16023 gl_cv_decl_null_works=yes
16024else
16025 gl_cv_decl_null_works=no
16026fi
16027rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16028fi
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='#'
16040else
16041 GL_GENERATE_STDDEF_H_TRUE='#'
16042 GL_GENERATE_STDDEF_H_FALSE=
16043fi
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; }
16059if ${gl_cv_next_stddef_h+:} false; then :
16060 $as_echo_n "(cached) " >&6
16061else
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
16099fi
16100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
422889f9
CW
16101$as_echo "$gl_cv_next_stddef_h" >&6; }
16102 fi
00f6db22
CW
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; }
16131if ${gl_cv_have_weak+:} false; then :
16132 $as_echo_n "(cached) " >&6
16133else
16134 gl_cv_have_weak=no
16135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16136/* end confdefs.h. */
16137extern void xyzzy ();
16138#pragma weak xyzzy
16139int
16140main (void)
16141{
16142xyzzy();
16143 ;
16144 return 0;
16145}
16146_ACEOF
16147if ac_fn_c_try_link "$LINENO"; then :
16148 gl_cv_have_weak=maybe
16149fi
16150rm -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
16161if (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"
16164else
16165 gl_cv_have_weak="guessing no"
16166fi
16167rm -f conftest*
16168
16169
16170else
16171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16172/* end confdefs.h. */
16173
16174#include <stdio.h>
16175#pragma weak fputs
16176int main ()
16177{
16178 return (fputs == NULL);
16179}
16180_ACEOF
16181if ac_fn_c_try_run "$LINENO"; then :
16182 gl_cv_have_weak=yes
16183else
16184 gl_cv_have_weak=no
16185fi
16186rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16187 conftest.$ac_objext conftest.beam conftest.$ac_ext
16188fi
16189
16190 fi
16191 case " $LDFLAGS " in
16192 *" -static "*) gl_cv_have_weak=no ;;
16193 esac
16194
16195fi
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; }
16200if ${gl_cv_linker_have_as_needed+:} false; then :
16201 $as_echo_n "(cached) " >&6
16202else
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
16209int
16210main (void)
16211{
16212
16213 ;
16214 return 0;
16215}
16216_ACEOF
16217if ac_fn_c_try_link "$LINENO"; then :
16218 gl_cv_linker_have_as_needed=yes
16219else
16220 gl_cv_linker_have_as_needed=no
16221fi
16222rm -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
16229fi
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; }
16234if ${gl_cv_linker_have_push_state+:} false; then :
16235 $as_echo_n "(cached) " >&6
16236else
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
16243int
16244main (void)
16245{
16246
16247 ;
16248 return 0;
16249}
16250_ACEOF
16251if ac_fn_c_try_link "$LINENO"; then :
16252 gl_cv_linker_have_push_state=yes
16253else
16254 gl_cv_linker_have_push_state=no
16255fi
16256rm -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
16263fi
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"
16270if test "x$ac_cv_header_pthread_h" = xyes; then :
16271 gl_have_pthread_h=yes
16272else
16273 gl_have_pthread_h=no
16274fi
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
16298int
16299main (void)
16300{
16301pthread_mutex_lock (&m);
16302 pthread_mutexattr_init (&ma);
16303 ;
16304 return 0;
16305}
16306_ACEOF
16307if 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
16311fi
16312rm -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; }
16325if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
16326 $as_echo_n "(cached) " >&6
16327else
16328 ac_check_lib_save_LIBS=$LIBS
16329LIBS="-lpthread $LIBS"
16330cat 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
16337extern "C"
16338#endif
16339char pthread_kill ();
16340int
16341main (void)
16342{
16343return pthread_kill ();
16344 ;
16345 return 0;
16346}
16347_ACEOF
16348if ac_fn_c_try_link "$LINENO"; then :
16349 ac_cv_lib_pthread_pthread_kill=yes
16350else
16351 ac_cv_lib_pthread_pthread_kill=no
16352fi
16353rm -f core conftest.err conftest.$ac_objext \
16354 conftest$ac_exeext conftest.$ac_ext
16355LIBS=$ac_check_lib_save_LIBS
16356fi
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; }
16359if 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
16374fi
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; }
16380if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
16381 $as_echo_n "(cached) " >&6
16382else
16383 ac_check_lib_save_LIBS=$LIBS
16384LIBS="-lpthread $LIBS"
16385cat 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
16392extern "C"
16393#endif
16394char pthread_kill ();
16395int
16396main (void)
16397{
16398return pthread_kill ();
16399 ;
16400 return 0;
16401}
16402_ACEOF
16403if ac_fn_c_try_link "$LINENO"; then :
16404 ac_cv_lib_pthread_pthread_kill=yes
16405else
16406 ac_cv_lib_pthread_pthread_kill=no
16407fi
16408rm -f core conftest.err conftest.$ac_objext \
16409 conftest$ac_exeext conftest.$ac_ext
16410LIBS=$ac_check_lib_save_LIBS
16411fi
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; }
16414if 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
16418fi
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; }
16424if ${ac_cv_lib_c_r_pthread_kill+:} false; then :
16425 $as_echo_n "(cached) " >&6
16426else
16427 ac_check_lib_save_LIBS=$LIBS
16428LIBS="-lc_r $LIBS"
16429cat 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
16436extern "C"
16437#endif
16438char pthread_kill ();
16439int
16440main (void)
16441{
16442return pthread_kill ();
16443 ;
16444 return 0;
16445}
16446_ACEOF
16447if ac_fn_c_try_link "$LINENO"; then :
16448 ac_cv_lib_c_r_pthread_kill=yes
16449else
16450 ac_cv_lib_c_r_pthread_kill=no
16451fi
16452rm -f core conftest.err conftest.$ac_objext \
16453 conftest$ac_exeext conftest.$ac_ext
16454LIBS=$ac_check_lib_save_LIBS
16455fi
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; }
16458if 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
16462fi
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
16516int
16517main (void)
16518{
16519thr_self();
16520 ;
16521 return 0;
16522}
16523_ACEOF
16524if ac_fn_c_try_link "$LINENO"; then :
16525 gl_have_solaristhread=yes
16526fi
16527rm -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; }
16566if ${ac_cv_libpth_libs+:} false; then :
16567 $as_echo_n "(cached) " >&6
16568else
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.
16591if 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
16619fi
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
17034fi
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>
17077int
17078main (void)
17079{
17080pth_self();
17081 ;
17082 return 0;
17083}
17084_ACEOF
17085if ac_fn_c_try_link "$LINENO"; then :
17086 gl_have_pth=yes
17087fi
17088rm -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; }
17239if ${gl_cv_func_malloc_posix+:} false; then :
17240 $as_echo_n "(cached) " >&6
17241else
17242
17243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17244/* end confdefs.h. */
17245
17246int
17247main (void)
17248{
17249#if defined _WIN32 && ! defined __CYGWIN__
17250 choke me
17251 #endif
17252
17253 ;
17254 return 0;
17255}
17256_ACEOF
17257if ac_fn_c_try_compile "$LINENO"; then :
17258 gl_cv_func_malloc_posix=yes
17259else
17260 gl_cv_func_malloc_posix=no
17261fi
17262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17263
17264fi
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
17271do :
17272 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
17273if test "x$ac_cv_header_stdlib_h" = xyes; then :
17274 cat >>confdefs.h <<_ACEOF
17275#define HAVE_STDLIB_H 1
17276_ACEOF
17277
17278fi
17279
17280done
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; }
17284if ${ac_cv_func_malloc_0_nonnull+:} false; then :
17285 $as_echo_n "(cached) " >&6
17286else
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
17297else
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
17306int
17307main (void)
17308{
17309char *p = malloc (0);
17310 int result = !p;
17311 free (p);
17312 return result;
17313 ;
17314 return 0;
17315}
17316
17317_ACEOF
17318if ac_fn_c_try_run "$LINENO"; then :
17319 ac_cv_func_malloc_0_nonnull=yes
17320else
17321 ac_cv_func_malloc_0_nonnull=no
17322fi
17323rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17324 conftest.$ac_objext conftest.beam conftest.$ac_ext
17325fi
17326
17327
17328fi
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
17333else
17334 gl_cv_func_malloc_0_nonnull=0
17335fi
17336
17337
17338cat >>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; }
17346if ${ac_cv_type_unsigned_long_long_int+:} false; then :
17347 $as_echo_n "(cached) " >&6
17348else
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;
17368int
17369main (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
17383if ac_fn_c_try_link "$LINENO"; then :
17384
17385else
17386 ac_cv_type_unsigned_long_long_int=no
17387fi
17388rm -f core conftest.err conftest.$ac_objext \
17389 conftest$ac_exeext conftest.$ac_ext
17390 fi
17391fi
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; }
17404if ${ac_cv_type_long_long_int+:} false; then :
17405 $as_echo_n "(cached) " >&6
17406else
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 :
17413else
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
17422int
17423main (void)
17424{
17425long 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
17440if ac_fn_c_try_run "$LINENO"; then :
17441
17442else
17443 ac_cv_type_long_long_int=no
17444fi
17445rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17446 conftest.$ac_objext conftest.beam conftest.$ac_ext
17447fi
17448
17449 fi
17450 fi
17451fi
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; }
17469if ${gt_cv_locale_ja+:} false; then :
17470 $as_echo_n "(cached) " >&6
17471else
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>
17483struct tm t;
17484char buf[16];
17485int 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
17606fi
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; }
17617if ${gt_cv_locale_zh_CN+:} false; then :
17618 $as_echo_n "(cached) " >&6
17619else
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>
17632struct tm t;
17633char buf[16];
17634int 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
17748fi
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; }
17758if ${gt_cv_locale_fr_utf8+:} false; then :
17759 $as_echo_n "(cached) " >&6
17760else
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>
17772struct tm t;
17773char buf[16];
17774int 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
17876fi
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"
17976if test "x$ac_cv_func_mmap" = xyes; then :
17977 gl_have_mmap=yes
17978else
17979 gl_have_mmap=no
17980fi
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
17997if (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
18000fi
18001rm -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
18013if (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
18019fi
18020rm -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; }
18047if ${gl_cv_func_memchr_works+:} false; then :
18048 $as_echo_n "(cached) " >&6
18049else
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
18058else
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
18073int
18074main (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
18114if ac_fn_c_try_run "$LINENO"; then :
18115 gl_cv_func_memchr_works=yes
18116else
18117 gl_cv_func_memchr_works=no
18118fi
18119rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18120 conftest.$ac_objext conftest.beam conftest.$ac_ext
18121fi
18122
18123
18124fi
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
18133ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
18134if test "x$ac_cv_have_decl_memrchr" = xyes; then :
18135 ac_have_decl=1
18136else
18137 ac_have_decl=0
18138fi
18139
18140cat >>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
18157if 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
18180fi
18181rm -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; }
18194if ${gl_cv_macro_O_CLOEXEC+:} false; then :
18195 $as_echo_n "(cached) " >&6
18196else
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
18204int
18205main (void)
18206{
18207return O_CLOEXEC;
18208 ;
18209 return 0;
18210}
18211_ACEOF
18212if ac_fn_c_try_compile "$LINENO"; then :
18213 gl_cv_macro_O_CLOEXEC=yes
18214else
18215 gl_cv_macro_O_CLOEXEC=no
18216fi
18217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18218fi
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; }
18228if ${gl_cv_promoted_mode_t+:} false; then :
18229 $as_echo_n "(cached) " >&6
18230else
18231
18232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18233/* end confdefs.h. */
18234#include <sys/types.h>
18235int
18236main (void)
18237{
18238typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
18239 ;
18240 return 0;
18241}
18242_ACEOF
18243if ac_fn_c_try_compile "$LINENO"; then :
18244 gl_cv_promoted_mode_t='int'
18245else
18246 gl_cv_promoted_mode_t='mode_t'
18247fi
18248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18249
18250fi
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
18254cat >>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; }
18264if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
18265 $as_echo_n "(cached) " >&6
18266else
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
18285else
18286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18287/* end confdefs.h. */
18288$ac_includes_default
18289int
18290main (void)
18291{
18292struct 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
18304if ac_fn_c_try_run "$LINENO"; then :
18305 gl_cv_func_lstat_dereferences_slashed_symlink=yes
18306else
18307 gl_cv_func_lstat_dereferences_slashed_symlink=no
18308fi
18309rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18310 conftest.$ac_objext conftest.beam conftest.$ac_ext
18311fi
18312
18313 rm -f conftest.sym conftest.file
18314
18315fi
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
18321cat >>confdefs.h <<_ACEOF
18322#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
18323_ACEOF
18324
18325 ;;
18326 esac
18327
18328ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
18329if test "x$ac_cv_have_decl_alarm" = xyes; then :
18330 ac_have_decl=1
18331else
18332 ac_have_decl=0
18333fi
18334
18335cat >>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; }
18344if ${ac_cv_gnu_library_2_1+:} false; then :
18345 $as_echo_n "(cached) " >&6
18346else
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
18361if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18362 $EGREP "Lucky" >/dev/null 2>&1; then :
18363 ac_cv_gnu_library_2_1=yes
18364else
18365 ac_cv_gnu_library_2_1=no
18366fi
18367rm -f conftest*
18368
18369
18370
18371fi
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; }
18384if ${ac_cv_header_stdbool_h+:} false; then :
18385 $as_echo_n "(cached) " >&6
18386else
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
18442int
18443main (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
18457if ac_fn_c_try_compile "$LINENO"; then :
18458 ac_cv_header_stdbool_h=yes
18459else
18460 ac_cv_header_stdbool_h=no
18461fi
18462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18463fi
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"
18467if test "x$ac_cv_type__Bool" = xyes; then :
18468
18469cat >>confdefs.h <<_ACEOF
18470#define HAVE__BOOL 1
18471_ACEOF
18472
18473
18474fi
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; }
18480if ${gt_cv_c_wint_t+:} false; then :
18481 $as_echo_n "(cached) " >&6
18482else
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';
18495int
18496main (void)
18497{
18498
18499 ;
18500 return 0;
18501}
18502_ACEOF
18503if ac_fn_c_try_compile "$LINENO"; then :
18504 gt_cv_c_wint_t=yes
18505else
18506 gt_cv_c_wint_t=no
18507fi
18508rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18509fi
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; }
18519if ${gl_cv_type_wint_t_too_small+:} false; then :
18520 $as_echo_n "(cached) " >&6
18521else
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
18537int
18538main (void)
18539{
18540
18541 ;
18542 return 0;
18543}
18544_ACEOF
18545if ac_fn_c_try_compile "$LINENO"; then :
18546 gl_cv_type_wint_t_too_small=no
18547else
18548 gl_cv_type_wint_t_too_small=yes
18549fi
18550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18551fi
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; }
18622if ${gl_cv_next_stdint_h+:} false; then :
18623 $as_echo_n "(cached) " >&6
18624else
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
18668fi
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; }
18696if ${gl_cv_header_working_stdint_h+:} false; then :
18697 $as_echo_n "(cached) " >&6
18698else
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
18726int8_t a1 = INT8_MAX;
18727int8_t a1min = INT8_MIN;
18728#endif
18729#ifdef INT16_MAX
18730int16_t a2 = INT16_MAX;
18731int16_t a2min = INT16_MIN;
18732#endif
18733#ifdef INT32_MAX
18734int32_t a3 = INT32_MAX;
18735int32_t a3min = INT32_MIN;
18736#endif
18737#ifdef INT64_MAX
18738int64_t a4 = INT64_MAX;
18739int64_t a4min = INT64_MIN;
18740#endif
18741#ifdef UINT8_MAX
18742uint8_t b1 = UINT8_MAX;
18743#else
18744typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
18745#endif
18746#ifdef UINT16_MAX
18747uint16_t b2 = UINT16_MAX;
18748#endif
18749#ifdef UINT32_MAX
18750uint32_t b3 = UINT32_MAX;
18751#endif
18752#ifdef UINT64_MAX
18753uint64_t b4 = UINT64_MAX;
18754#endif
18755int_least8_t c1 = INT8_C (0x7f);
18756int_least8_t c1max = INT_LEAST8_MAX;
18757int_least8_t c1min = INT_LEAST8_MIN;
18758int_least16_t c2 = INT16_C (0x7fff);
18759int_least16_t c2max = INT_LEAST16_MAX;
18760int_least16_t c2min = INT_LEAST16_MIN;
18761int_least32_t c3 = INT32_C (0x7fffffff);
18762int_least32_t c3max = INT_LEAST32_MAX;
18763int_least32_t c3min = INT_LEAST32_MIN;
18764int_least64_t c4 = INT64_C (0x7fffffffffffffff);
18765int_least64_t c4max = INT_LEAST64_MAX;
18766int_least64_t c4min = INT_LEAST64_MIN;
18767uint_least8_t d1 = UINT8_C (0xff);
18768uint_least8_t d1max = UINT_LEAST8_MAX;
18769uint_least16_t d2 = UINT16_C (0xffff);
18770uint_least16_t d2max = UINT_LEAST16_MAX;
18771uint_least32_t d3 = UINT32_C (0xffffffff);
18772uint_least32_t d3max = UINT_LEAST32_MAX;
18773uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
18774uint_least64_t d4max = UINT_LEAST64_MAX;
18775int_fast8_t e1 = INT_FAST8_MAX;
18776int_fast8_t e1min = INT_FAST8_MIN;
18777int_fast16_t e2 = INT_FAST16_MAX;
18778int_fast16_t e2min = INT_FAST16_MIN;
18779int_fast32_t e3 = INT_FAST32_MAX;
18780int_fast32_t e3min = INT_FAST32_MIN;
18781int_fast64_t e4 = INT_FAST64_MAX;
18782int_fast64_t e4min = INT_FAST64_MIN;
18783uint_fast8_t f1 = UINT_FAST8_MAX;
18784uint_fast16_t f2 = UINT_FAST16_MAX;
18785uint_fast32_t f3 = UINT_FAST32_MAX;
18786uint_fast64_t f4 = UINT_FAST64_MAX;
18787#ifdef INTPTR_MAX
18788intptr_t g = INTPTR_MAX;
18789intptr_t gmin = INTPTR_MIN;
18790#endif
18791#ifdef UINTPTR_MAX
18792uintptr_t h = UINTPTR_MAX;
18793#endif
18794intmax_t i = INTMAX_MAX;
18795uintmax_t j = UINTMAX_MAX;
18796
18797/* Check that SIZE_MAX has the correct type, if possible. */
18798#if 201112 <= __STDC_VERSION__
18799int k = _Generic (SIZE_MAX, size_t: 0);
18800#elif (2 <= __GNUC__ || defined __IBM__TYPEOF__ \
18801 || (0x5110 <= __SUNPRO_C && !__STDC__))
18802extern size_t k;
18803extern __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)))
18813struct 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
18866int
18867main (void)
18868{
18869
18870 ;
18871 return 0;
18872}
18873_ACEOF
18874if 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
18883else
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
18909static 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
18938int
18939main (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
18961if ac_fn_c_try_run "$LINENO"; then :
18962 gl_cv_header_working_stdint_h=yes
18963fi
18964rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18965 conftest.$ac_objext conftest.beam conftest.$ac_ext
18966fi
18967
18968
18969fi
18970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18971
18972fi
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; }
18986if ${gl_cv_header_stdint_predates_cxx11_h+:} false; then :
18987 $as_echo_n "(cached) " >&6
18988else
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
19009intmax_t im = INTMAX_MAX;
19010int32_t i32 = INT32_C (0x7fffffff);
19011
19012int
19013main (void)
19014{
19015
19016 ;
19017 return 0;
19018}
19019_ACEOF
19020if ac_fn_c_try_compile "$LINENO"; then :
19021 gl_cv_header_stdint_predates_cxx11_h=no
19022fi
19023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19024fi
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; }
19038if ${gl_cv_header_stdint_width+:} false; then :
19039 $as_echo_n "(cached) " >&6
19040else
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
19064int
19065main (void)
19066{
19067
19068 ;
19069 return 0;
19070}
19071_ACEOF
19072if ac_fn_c_try_compile "$LINENO"; then :
19073 gl_cv_header_stdint_width=yes
19074fi
19075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19076fi
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
19085do :
19086 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
19087ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
19088if 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
19093fi
19094
19095done
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; }
19111if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
19112 $as_echo_n "(cached) " >&6
19113else
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
19127else
19128 result=unknown
19129fi
19130
19131 eval gl_cv_bitsizeof_${gltype}=\$result
19132
19133fi
19134eval 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; }
19156if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
19157 $as_echo_n "(cached) " >&6
19158else
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
422889f9 19169
00f6db22 19170#include <limits.h>"; then :
422889f9 19171
00f6db22
CW
19172else
19173 result=unknown
19174fi
422889f9 19175
00f6db22 19176 eval gl_cv_bitsizeof_${gltype}=\$result
422889f9 19177
00f6db22
CW
19178fi
19179eval 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
422889f9 19190
00f6db22
CW
19191 eval BITSIZEOF_${GLTYPE}=\$result
19192 done
422889f9
CW
19193
19194
19195
19196
00f6db22
CW
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; }
19200if eval \${gl_cv_type_${gltype}_signed+:} false; then :
19201 $as_echo_n "(cached) " >&6
19202else
19203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19204/* end confdefs.h. */
422889f9 19205
00f6db22
CW
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
422889f9 19215
00f6db22
CW
19216 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
19217int
19218main (void)
19219{
19220
19221 ;
19222 return 0;
19223}
19224_ACEOF
19225if ac_fn_c_try_compile "$LINENO"; then :
19226 result=yes
19227else
19228 result=no
19229fi
19230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19231 eval gl_cv_type_${gltype}_signed=\$result
19232
19233fi
19234eval 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; }
19259if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
422889f9
CW
19260 $as_echo_n "(cached) " >&6
19261else
00f6db22
CW
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. */
422889f9 19282
00f6db22
CW
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;
19295int
19296main (void)
19297{
19298
19299 ;
19300 return 0;
19301}
19302_ACEOF
19303if ac_fn_c_try_compile "$LINENO"; then :
19304 eval gl_cv_type_${gltype}_suffix=\$glsuf
19305fi
19306rm -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
19310fi
19311eval 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; }
19331if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
19332 $as_echo_n "(cached) " >&6
19333else
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
422889f9
CW
19353/* end confdefs.h. */
19354
00f6db22
CW
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;
422889f9
CW
19367int
19368main (void)
19369{
422889f9
CW
19370
19371 ;
19372 return 0;
19373}
19374_ACEOF
19375if ac_fn_c_try_compile "$LINENO"; then :
00f6db22 19376 eval gl_cv_type_${gltype}_suffix=\$glsuf
422889f9
CW
19377fi
19378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
00f6db22
CW
19379 eval result=\$gl_cv_type_${gltype}_suffix
19380 test "$result" != no && break
19381 done
19382fi
19383eval 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='#'
19411else
19412 GL_GENERATE_LIMITS_H_TRUE='#'
19413 GL_GENERATE_LIMITS_H_FALSE=
19414fi
19415
19416
19417
19418
19419
19420
422889f9 19421
00f6db22
CW
19422 if test -n "$STDINT_H"; then
19423 GL_GENERATE_STDINT_H_TRUE=
19424 GL_GENERATE_STDINT_H_FALSE='#'
19425else
19426 GL_GENERATE_STDINT_H_TRUE='#'
19427 GL_GENERATE_STDINT_H_FALSE=
422889f9 19428fi
422889f9
CW
19429
19430
19431
00f6db22
CW
19432 GNULIB_FFS=0;
19433 HAVE_FFS=1;
19434 HAVE_STRCASECMP=1;
19435 HAVE_DECL_STRNCASECMP=1;
422889f9
CW
19436
19437
19438
00f6db22
CW
19439ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
19440if test "x$ac_cv_have_decl_strdup" = xyes; then :
19441 ac_have_decl=1
19442else
19443 ac_have_decl=0
19444fi
19445
19446cat >>confdefs.h <<_ACEOF
19447#define HAVE_DECL_STRDUP $ac_have_decl
19448_ACEOF
422889f9
CW
19449
19450
00f6db22
CW
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; }
19454if ${gl_cv_func_strerror_0_works+:} false; then :
422889f9
CW
19455 $as_echo_n "(cached) " >&6
19456else
00f6db22
CW
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
422889f9 19466
00f6db22
CW
19467else
19468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
422889f9 19469/* end confdefs.h. */
422889f9 19470#include <string.h>
00f6db22
CW
19471 #include <errno.h>
19472
19473int
19474main (void)
422889f9 19475{
00f6db22
CW
19476int 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 ;
422889f9
CW
19486 return 0;
19487}
422889f9 19488_ACEOF
00f6db22
CW
19489if ac_fn_c_try_run "$LINENO"; then :
19490 gl_cv_func_strerror_0_works=yes
19491else
19492 gl_cv_func_strerror_0_works=no
19493fi
19494rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19495 conftest.$ac_objext conftest.beam conftest.$ac_ext
19496fi
19497
19498
19499fi
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
422889f9 19517
422889f9
CW
19518
19519
19520
19521
19522
00f6db22
CW
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; }
19528if ${gl_cv_next_string_h+:} false; then :
422889f9
CW
19529 $as_echo_n "(cached) " >&6
19530else
19531
422889f9 19532
00f6db22
CW
19533
19534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19535/* end confdefs.h. */
422889f9 19536#include <string.h>
00f6db22
CW
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
19568fi
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; }
19610if ${gl_cv_next_strings_h+:} false; then :
19611 $as_echo_n "(cached) " >&6
19612else
422889f9 19613
00f6db22
CW
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>
422889f9 19622_ACEOF
00f6db22
CW
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'"'
422889f9 19651 else
00f6db22
CW
19652 gl_cv_next_strings_h='<'strings.h'>'
19653 fi
19654
422889f9
CW
19655
19656fi
00f6db22
CW
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
19685ac_fn_c_check_decl "$LINENO" "strndup" "ac_cv_have_decl_strndup" "$ac_includes_default"
19686if test "x$ac_cv_have_decl_strndup" = xyes; then :
19687 ac_have_decl=1
19688else
19689 ac_have_decl=0
19690fi
19691
19692cat >>confdefs.h <<_ACEOF
19693#define HAVE_DECL_STRNDUP $ac_have_decl
19694_ACEOF
19695
19696
19697
19698ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
19699if test "x$ac_cv_have_decl_strnlen" = xyes; then :
19700 ac_have_decl=1
19701else
19702 ac_have_decl=0
19703fi
19704
19705cat >>confdefs.h <<_ACEOF
19706#define HAVE_DECL_STRNLEN $ac_have_decl
19707_ACEOF
19708
19709
19710
19711
19712
422889f9
CW
19713
19714
19715
19716
422889f9 19717
422889f9 19718
00f6db22 19719$as_echo "#define _USE_STD_STAT 1" >>confdefs.h
422889f9 19720
422889f9 19721
422889f9
CW
19722
19723
19724
19725
19726
19727
19728
19729
19730
00f6db22
CW
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; }
19736if ${gl_cv_next_sys_types_h+:} false; then :
19737 $as_echo_n "(cached) " >&6
19738else
422889f9
CW
19739
19740
422889f9 19741
00f6db22
CW
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 }'
422889f9 19768
00f6db22
CW
19769 gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19770 sed -n "$gl_absolute_header_sed"`
422889f9 19771
00f6db22
CW
19772 gl_header=$gl_cv_absolute_sys_types_h
19773 gl_cv_next_sys_types_h='"'$gl_header'"'
422889f9
CW
19774
19775
422889f9 19776fi
00f6db22
CW
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
422889f9
CW
19791
19792
422889f9 19793
422889f9 19794
422889f9 19795
422889f9 19796
422889f9 19797
422889f9 19798
422889f9 19799
422889f9 19800
422889f9 19801
00f6db22 19802 WINDOWS_STAT_INODES=0
422889f9 19803
422889f9
CW
19804
19805
19806
19807
19808
00f6db22
CW
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;
422889f9 19832
00f6db22
CW
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; }
19841if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then :
422889f9 19842 $as_echo_n "(cached) " >&6
422889f9
CW
19843else
19844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19845/* end confdefs.h. */
00f6db22 19846#include <time.h>
422889f9
CW
19847
19848int
19849main (void)
19850{
00f6db22
CW
19851static struct timespec x; x.tv_sec = x.tv_nsec;
19852 ;
19853 return 0;
19854}
19855_ACEOF
19856if ac_fn_c_try_compile "$LINENO"; then :
19857 gl_cv_sys_struct_timespec_in_time_h=yes
19858else
19859 gl_cv_sys_struct_timespec_in_time_h=no
19860fi
19861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19862fi
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; }
422889f9 19865
00f6db22
CW
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; }
19875if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then :
19876 $as_echo_n "(cached) " >&6
19877else
19878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19879/* end confdefs.h. */
19880#include <sys/time.h>
422889f9 19881
00f6db22
CW
19882int
19883main (void)
19884{
19885static struct timespec x; x.tv_sec = x.tv_nsec;
422889f9
CW
19886 ;
19887 return 0;
19888}
19889_ACEOF
00f6db22
CW
19890if ac_fn_c_try_compile "$LINENO"; then :
19891 gl_cv_sys_struct_timespec_in_sys_time_h=yes
422889f9 19892else
00f6db22 19893 gl_cv_sys_struct_timespec_in_sys_time_h=no
422889f9 19894fi
00f6db22 19895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
422889f9 19896fi
00f6db22
CW
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; }
19904if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then :
19905 $as_echo_n "(cached) " >&6
19906else
19907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19908/* end confdefs.h. */
19909#include <pthread.h>
422889f9 19910
00f6db22
CW
19911int
19912main (void)
19913{
19914static struct timespec x; x.tv_sec = x.tv_nsec;
19915 ;
19916 return 0;
19917}
19918_ACEOF
19919if ac_fn_c_try_compile "$LINENO"; then :
19920 gl_cv_sys_struct_timespec_in_pthread_h=yes
19921else
19922 gl_cv_sys_struct_timespec_in_pthread_h=no
422889f9 19923fi
00f6db22
CW
19924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19925fi
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; }
19933if ${gl_cv_sys_struct_timespec_in_unistd_h+:} false; then :
19934 $as_echo_n "(cached) " >&6
19935else
19936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19937/* end confdefs.h. */
19938#include <unistd.h>
19939
19940int
19941main (void)
19942{
19943static struct timespec x; x.tv_sec = x.tv_nsec;
19944 ;
19945 return 0;
19946}
19947_ACEOF
19948if ac_fn_c_try_compile "$LINENO"; then :
19949 gl_cv_sys_struct_timespec_in_unistd_h=yes
19950else
19951 gl_cv_sys_struct_timespec_in_unistd_h=no
19952fi
19953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19954fi
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
422889f9
CW
19961 fi
19962 fi
19963
19964
19965
19966
00f6db22
CW
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; }
19984if ${gl_cv_next_time_h+:} false; then :
19985 $as_echo_n "(cached) " >&6
19986else
19987
19988
19989
422889f9
CW
19990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19991/* end confdefs.h. */
00f6db22 19992#include <time.h>
422889f9 19993_ACEOF
00f6db22
CW
19994 case "$host_os" in
19995 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19996 *) gl_absname_cpp="$ac_cpp" ;;
19997 esac
422889f9 19998
00f6db22
CW
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
20024fi
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
20052gl_libunistring_sed_extract_major='/^[0-9]/{s/^\([0-9]*\).*/\1/p;q;}
20053i\
200540
20055q
20056'
20057gl_libunistring_sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{s/^[0-9]*[.]\([0-9]*\).*/\1/p;q;}
20058i\
200590
20060q
20061'
20062gl_libunistring_sed_extract_subminor='/^[0-9][0-9]*[.][0-9][0-9]*[.][0-9]/{s/^[0-9]*[.][0-9]*[.]\([0-9]*\).*/\1/p;q;}
20063i\
200640
20065q
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; }
20089if ${gl_cv_header_inttypes_h+:} false; then :
20090 $as_echo_n "(cached) " >&6
20091else
20092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20093/* end confdefs.h. */
422889f9 20094
00f6db22
CW
20095#include <sys/types.h>
20096#include <inttypes.h>
20097
20098int
20099main (void)
20100{
20101uintmax_t i = (uintmax_t) -1; return !i;
20102 ;
20103 return 0;
20104}
20105_ACEOF
20106if ac_fn_c_try_compile "$LINENO"; then :
20107 gl_cv_header_inttypes_h=yes
20108else
20109 gl_cv_header_inttypes_h=no
422889f9
CW
20110fi
20111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
00f6db22
CW
20112fi
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
422889f9 20116
00f6db22
CW
20117cat >>confdefs.h <<_ACEOF
20118#define HAVE_INTTYPES_H_WITH_UINTMAX 1
20119_ACEOF
422889f9 20120
00f6db22 20121 fi
422889f9
CW
20122
20123
00f6db22
CW
20124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5
20125$as_echo_n "checking for stdint.h... " >&6; }
20126if ${gl_cv_header_stdint_h+:} false; then :
20127 $as_echo_n "(cached) " >&6
422889f9 20128else
00f6db22
CW
20129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20130/* end confdefs.h. */
20131#include <sys/types.h>
20132 #include <stdint.h>
20133int
20134main (void)
20135{
20136uintmax_t i = (uintmax_t) -1; return !i;
20137 ;
20138 return 0;
20139}
20140_ACEOF
20141if ac_fn_c_try_compile "$LINENO"; then :
20142 gl_cv_header_stdint_h=yes
20143else
20144 gl_cv_header_stdint_h=no
422889f9 20145fi
00f6db22
CW
20146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20147fi
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
422889f9
CW
20151
20152cat >>confdefs.h <<_ACEOF
00f6db22 20153#define HAVE_STDINT_H_WITH_UINTMAX 1
422889f9
CW
20154_ACEOF
20155
00f6db22 20156 fi
422889f9
CW
20157
20158
422889f9 20159
422889f9 20160
00f6db22
CW
20161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
20162$as_echo_n "checking for intmax_t... " >&6; }
20163if ${gt_cv_c_intmax_t+:} false; then :
422889f9 20164 $as_echo_n "(cached) " >&6
422889f9
CW
20165else
20166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20167/* end confdefs.h. */
00f6db22
CW
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
422889f9
CW
20177
20178int
20179main (void)
20180{
00f6db22 20181intmax_t x = -1; return !x;
422889f9
CW
20182 ;
20183 return 0;
20184}
422889f9 20185_ACEOF
00f6db22
CW
20186if ac_fn_c_try_compile "$LINENO"; then :
20187 gt_cv_c_intmax_t=yes
422889f9 20188else
00f6db22 20189 gt_cv_c_intmax_t=no
422889f9 20190fi
00f6db22 20191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
422889f9 20192fi
00f6db22
CW
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
422889f9 20196
00f6db22 20197$as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h
422889f9 20198
00f6db22 20199 else
422889f9 20200
00f6db22
CW
20201 test $ac_cv_type_long_long_int = yes \
20202 && ac_type='long long' \
20203 || ac_type='long'
422889f9
CW
20204
20205cat >>confdefs.h <<_ACEOF
00f6db22 20206#define intmax_t $ac_type
422889f9
CW
20207_ACEOF
20208
00f6db22 20209 fi
422889f9
CW
20210
20211
00f6db22
CW
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; }
20214if ${gl_cv_cc_double_expbit0+:} false; then :
20215 $as_echo_n "(cached) " >&6
20216else
422889f9 20217
00f6db22 20218 if test "$cross_compiling" = yes; then :
422889f9 20219
00f6db22
CW
20220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20221/* end confdefs.h. */
422889f9 20222
00f6db22
CW
20223#if defined arm || defined __arm || defined __arm__
20224 mixed_endianness
20225#endif
20226
20227_ACEOF
20228if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20229 $EGREP "mixed_endianness" >/dev/null 2>&1; then :
20230 gl_cv_cc_double_expbit0="unknown"
20231else
20232
20233 :
20234if ${ac_cv_c_bigendian+:} false; then :
422889f9
CW
20235 $as_echo_n "(cached) " >&6
20236else
00f6db22
CW
20237 ac_cv_c_bigendian=unknown
20238 # See if we're dealing with a universal compiler.
20239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
422889f9 20240/* end confdefs.h. */
00f6db22
CW
20241#ifndef __APPLE_CC__
20242 not a universal capable compiler
20243 #endif
20244 typedef int dummy;
422889f9 20245
00f6db22
CW
20246_ACEOF
20247if 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
20270fi
20271rm -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>
422889f9 20278
00f6db22
CW
20279int
20280main (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
422889f9 20287
00f6db22
CW
20288 ;
20289 return 0;
20290}
20291_ACEOF
20292if 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
20299int
20300main (void)
20301{
20302#if BYTE_ORDER != BIG_ENDIAN
20303 not big endian
20304 #endif
20305
20306 ;
20307 return 0;
20308}
20309_ACEOF
20310if ac_fn_c_try_compile "$LINENO"; then :
20311 ac_cv_c_bigendian=yes
20312else
20313 ac_cv_c_bigendian=no
20314fi
20315rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20316fi
20317rm -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>
422889f9
CW
20324
20325int
20326main (void)
20327{
00f6db22
CW
20328#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
20329 bogus endian macros
20330 #endif
422889f9
CW
20331
20332 ;
20333 return 0;
20334}
20335_ACEOF
20336if ac_fn_c_try_compile "$LINENO"; then :
00f6db22
CW
20337 # It does; now see whether it defined to _BIG_ENDIAN or not.
20338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
422889f9 20339/* end confdefs.h. */
00f6db22 20340#include <limits.h>
422889f9 20341
422889f9
CW
20342int
20343main (void)
20344{
00f6db22
CW
20345#ifndef _BIG_ENDIAN
20346 not big endian
20347 #endif
20348
422889f9
CW
20349 ;
20350 return 0;
20351}
422889f9 20352_ACEOF
00f6db22
CW
20353if ac_fn_c_try_compile "$LINENO"; then :
20354 ac_cv_c_bigendian=yes
422889f9 20355else
00f6db22 20356 ac_cv_c_bigendian=no
422889f9 20357fi
00f6db22 20358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
422889f9 20359fi
00f6db22
CW
20360rm -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
422889f9 20367/* end confdefs.h. */
00f6db22
CW
20368short 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
422889f9
CW
20384int
20385main (void)
20386{
00f6db22 20387return use_ascii (foo) == use_ebcdic (foo);
422889f9
CW
20388 ;
20389 return 0;
20390}
20391_ACEOF
00f6db22
CW
20392if 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
422889f9 20404fi
00f6db22 20405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
422889f9 20406else
00f6db22 20407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
422889f9 20408/* end confdefs.h. */
00f6db22
CW
20409$ac_includes_default
20410int
20411main (void)
20412{
422889f9 20413
00f6db22
CW
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;
422889f9 20422
00f6db22
CW
20423 ;
20424 return 0;
20425}
20426_ACEOF
20427if ac_fn_c_try_run "$LINENO"; then :
20428 ac_cv_c_bigendian=no
20429else
20430 ac_cv_c_bigendian=yes
20431fi
20432rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20433 conftest.$ac_objext conftest.beam conftest.$ac_ext
422889f9 20434fi
422889f9 20435
00f6db22
CW
20436 fi
20437fi
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)
422889f9 20445
00f6db22 20446$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
422889f9 20447
00f6db22
CW
20448 ;; #(
20449 *)
20450 gl_cv_cc_double_expbit0="unknown" ;;
20451 esac
422889f9
CW
20452
20453
00f6db22
CW
20454fi
20455rm -f conftest*
422889f9
CW
20456
20457
422889f9 20458else
00f6db22 20459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
422889f9
CW
20460/* end confdefs.h. */
20461
00f6db22
CW
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))
20468typedef union { double value; unsigned int word[NWORDS]; } memory_double;
20469static unsigned int ored_words[NWORDS];
20470static unsigned int anded_words[NWORDS];
20471static 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}
20484int 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}
422889f9 20524
00f6db22
CW
20525_ACEOF
20526if ac_fn_c_try_run "$LINENO"; then :
20527 gl_cv_cc_double_expbit0=`cat conftest.out`
20528else
20529 gl_cv_cc_double_expbit0="unknown"
20530fi
20531rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20532 conftest.$ac_objext conftest.beam conftest.$ac_ext
20533fi
422889f9 20534
00f6db22 20535 rm -f conftest.out
422889f9 20536
00f6db22
CW
20537fi
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
20545cat >>confdefs.h <<_ACEOF
20546#define DBL_EXPBIT0_WORD $word
20547_ACEOF
20548
20549
20550cat >>confdefs.h <<_ACEOF
20551#define DBL_EXPBIT0_BIT $bit
20552_ACEOF
20553
20554 ;;
20555 esac
422889f9
CW
20556
20557
422889f9 20558
422889f9 20559
422889f9 20560
422889f9 20561
422889f9 20562
422889f9 20563
00f6db22
CW
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; }
20567if ${gl_cv_func_snprintf_retval_c99+:} false; then :
20568 $as_echo_n "(cached) " >&6
422889f9 20569else
422889f9 20570
00f6db22
CW
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. */
422889f9 20600
00f6db22
CW
20601#ifdef _MSC_VER
20602 Known
20603#endif
422889f9 20604
00f6db22
CW
20605_ACEOF
20606if (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"
20609else
20610 gl_cv_func_snprintf_retval_c99="guessing no"
20611fi
20612rm -f conftest*
422889f9 20613
00f6db22
CW
20614 ;;
20615 # If we don't know, assume the worst.
20616 *) gl_cv_func_snprintf_retval_c99="guessing no";;
20617 esac
422889f9 20618
00f6db22
CW
20619else
20620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20621/* end confdefs.h. */
422889f9
CW
20622
20623#include <stdio.h>
20624#include <string.h>
00f6db22
CW
20625#if HAVE_SNPRINTF
20626# define my_snprintf snprintf
20627#else
20628# include <stdarg.h>
20629static 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}
422889f9 20638#endif
00f6db22
CW
20639static char buf[100];
20640int main ()
422889f9 20641{
00f6db22
CW
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;
422889f9
CW
20649 return 0;
20650}
20651_ACEOF
20652if ac_fn_c_try_run "$LINENO"; then :
00f6db22
CW
20653 gl_cv_func_snprintf_retval_c99=yes
20654else
20655 gl_cv_func_snprintf_retval_c99=no
422889f9
CW
20656fi
20657rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20658 conftest.$ac_objext conftest.beam conftest.$ac_ext
20659fi
20660
20661
20662fi
00f6db22
CW
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; }
422889f9 20665
00f6db22
CW
20666
20667
20668
20669
20670
20671 for ac_func in snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb
422889f9 20672do :
00f6db22
CW
20673 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20674ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
20675if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
422889f9 20676 cat >>confdefs.h <<_ACEOF
00f6db22 20677#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
422889f9
CW
20678_ACEOF
20679
20680fi
422889f9
CW
20681done
20682
00f6db22
CW
20683 ac_fn_c_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include <stdio.h>
20684"
20685if test "x$ac_cv_have_decl__snprintf" = xyes; then :
20686 ac_have_decl=1
20687else
20688 ac_have_decl=0
20689fi
422889f9 20690
00f6db22
CW
20691cat >>confdefs.h <<_ACEOF
20692#define HAVE_DECL__SNPRINTF $ac_have_decl
20693_ACEOF
422889f9
CW
20694
20695
422889f9 20696
00f6db22
CW
20697 case "$gl_cv_func_snprintf_retval_c99" in
20698 *yes)
422889f9 20699
00f6db22 20700$as_echo "#define HAVE_SNPRINTF_RETVAL_C99 1" >>confdefs.h
422889f9 20701
00f6db22
CW
20702 ;;
20703 esac
422889f9 20704
00f6db22
CW
20705ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
20706if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
20707 ac_have_decl=1
422889f9 20708else
00f6db22 20709 ac_have_decl=0
422889f9 20710fi
422889f9 20711
00f6db22
CW
20712cat >>confdefs.h <<_ACEOF
20713#define HAVE_DECL_VSNPRINTF $ac_have_decl
20714_ACEOF
422889f9
CW
20715
20716
422889f9
CW
20717
20718
422889f9 20719
00f6db22
CW
20720 if test $ac_cv_header_crtdefs_h = yes; then
20721 HAVE_CRTDEFS_H=1
20722 else
20723 HAVE_CRTDEFS_H=0
20724 fi
422889f9 20725
422889f9 20726
422889f9 20727
422889f9 20728
422889f9 20729
00f6db22
CW
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;
422889f9
CW
20739
20740
20741
422889f9 20742
422889f9 20743
422889f9 20744
00f6db22
CW
20745 if false; then
20746 GL_COND_LIBTOOL_TRUE=
20747 GL_COND_LIBTOOL_FALSE='#'
422889f9 20748else
00f6db22
CW
20749 GL_COND_LIBTOOL_TRUE='#'
20750 GL_COND_LIBTOOL_FALSE=
422889f9 20751fi
422889f9 20752
00f6db22
CW
20753 gl_cond_libtool=false
20754 gl_libdeps=
20755 gl_ltlibdeps=
20756 gl_m4_base='m4'
422889f9 20757
422889f9
CW
20758
20759
422889f9
CW
20760
20761
422889f9 20762
422889f9 20763
422889f9 20764
422889f9 20765
00f6db22 20766 gl_source_base='grub-core/lib/gnulib'
422889f9
CW
20767
20768
00f6db22
CW
20769 if test $ac_cv_func_alloca_works = no; then
20770 :
422889f9
CW
20771 fi
20772
00f6db22
CW
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; }
20777if ${gl_cv_rpl_alloca+:} false; then :
422889f9
CW
20778 $as_echo_n "(cached) " >&6
20779else
422889f9 20780
00f6db22
CW
20781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20782/* end confdefs.h. */
422889f9 20783
00f6db22
CW
20784#if defined __GNUC__ || defined _AIX || defined _MSC_VER
20785 Need own alloca
20786#endif
422889f9 20787
422889f9 20788_ACEOF
00f6db22
CW
20789if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20790 $EGREP "Need own alloca" >/dev/null 2>&1; then :
20791 gl_cv_rpl_alloca=yes
20792else
20793 gl_cv_rpl_alloca=no
422889f9 20794fi
00f6db22
CW
20795rm -f conftest*
20796
20797
20798fi
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='#'
20816else
20817 GL_GENERATE_ALLOCA_H_TRUE='#'
20818 GL_GENERATE_ALLOCA_H_FALSE=
422889f9 20819fi
422889f9 20820
422889f9
CW
20821
20822
20823
422889f9 20824
422889f9 20825
00f6db22
CW
20826
20827 ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
20828"
20829if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
20830 ac_have_decl=1
422889f9 20831else
00f6db22 20832 ac_have_decl=0
422889f9
CW
20833fi
20834
00f6db22
CW
20835cat >>confdefs.h <<_ACEOF
20836#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
20837_ACEOF
20838if test $ac_have_decl = 1; then :
422889f9 20839
00f6db22 20840else
422889f9 20841
00f6db22 20842$as_echo "#define GNULIB_PROGRAM_INVOCATION_NAME 1" >>confdefs.h
422889f9 20843
00f6db22 20844fi
422889f9 20845
00f6db22
CW
20846 ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
20847"
20848if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
20849 ac_have_decl=1
422889f9 20850else
00f6db22
CW
20851 ac_have_decl=0
20852fi
20853
20854cat >>confdefs.h <<_ACEOF
20855#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
20856_ACEOF
20857if test $ac_have_decl = 1; then :
422889f9
CW
20858
20859else
00f6db22
CW
20860
20861$as_echo "#define GNULIB_PROGRAM_INVOCATION_SHORT_NAME 1" >>confdefs.h
20862
20863fi
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; }
422889f9
CW
20872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20873/* end confdefs.h. */
00f6db22 20874#include <argp.h>
422889f9
CW
20875int
20876main (void)
20877{
00f6db22 20878program_invocation_name = "test";
422889f9
CW
20879 ;
20880 return 0;
20881}
20882_ACEOF
00f6db22
CW
20883if 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; }
422889f9 20889else
00f6db22
CW
20890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20891$as_echo "no" >&6; }
422889f9 20892fi
00f6db22
CW
20893rm -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>
20901int
20902main (void)
20903{
20904program_invocation_short_name = "test";
20905 ;
20906 return 0;
20907}
20908_ACEOF
20909if ac_fn_c_try_link "$LINENO"; then :
422889f9 20910
00f6db22 20911$as_echo "#define HAVE_PROGRAM_INVOCATION_SHORT_NAME 1" >>confdefs.h
422889f9 20912
00f6db22
CW
20913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20914$as_echo "yes" >&6; }
20915else
20916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20917$as_echo "no" >&6; }
422889f9 20918fi
00f6db22
CW
20919rm -f core conftest.err conftest.$ac_objext \
20920 conftest$ac_exeext conftest.$ac_ext
422889f9 20921
422889f9 20922
422889f9
CW
20923
20924
20925
20926
20927
20928
20929
20930
20931
20932
20933
20934
20935
20936
422889f9 20937
422889f9 20938
422889f9 20939
422889f9 20940
00f6db22 20941 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=argp_error:2:c-format"
422889f9
CW
20942
20943
422889f9 20944
00f6db22
CW
20945 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=argp_failure:4:c-format"
20946
422889f9
CW
20947
20948
20949
20950
20951
20952
00f6db22
CW
20953
20954
20955 gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
20956
20957
20958
20959
20960
20961
20962
21f95442
CW
20963
20964
20965
20966
20967
00f6db22
CW
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; }
20977if ${gl_cv_func_btowc_nul+:} false; then :
422889f9 20978 $as_echo_n "(cached) " >&6
00f6db22
CW
20979else
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
422889f9
CW
20992else
20993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20994/* end confdefs.h. */
00f6db22 20995
422889f9 20996#include <string.h>
00f6db22
CW
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>
21005int main ()
21006{
21007 if (btowc ('\0') != 0)
21008 return 1;
21009 return 0;
21010}
21011_ACEOF
21012if ac_fn_c_try_run "$LINENO"; then :
21013 gl_cv_func_btowc_nul=yes
21014else
21015 gl_cv_func_btowc_nul=no
21016fi
21017rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21018 conftest.$ac_objext conftest.beam conftest.$ac_ext
21019fi
422889f9 21020
00f6db22
CW
21021
21022fi
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; }
21028if ${gl_cv_func_btowc_eof+:} false; then :
21029 $as_echo_n "(cached) " >&6
21030else
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 :
21043else
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>
21057int main ()
422889f9 21058{
00f6db22
CW
21059 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
21060 {
21061 if (btowc (EOF) != WEOF)
21062 return 1;
21063 }
422889f9
CW
21064 return 0;
21065}
21066_ACEOF
00f6db22
CW
21067if ac_fn_c_try_run "$LINENO"; then :
21068 gl_cv_func_btowc_eof=yes
422889f9 21069else
00f6db22 21070 gl_cv_func_btowc_eof=no
422889f9 21071fi
00f6db22
CW
21072rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21073 conftest.$ac_objext conftest.beam conftest.$ac_ext
422889f9 21074fi
422889f9 21075
00f6db22 21076 fi
422889f9 21077
00f6db22
CW
21078fi
21079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5
21080$as_echo "$gl_cv_func_btowc_eof" >&6; }
422889f9 21081
00f6db22
CW
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
422889f9 21091
00f6db22 21092 if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
422889f9
CW
21093
21094
21095
21096
21097
21098
21099
21100
00f6db22 21101 gl_LIBOBJS="$gl_LIBOBJS btowc.$ac_objext"
422889f9
CW
21102
21103
00f6db22 21104 :
422889f9 21105
00f6db22 21106 fi
422889f9
CW
21107
21108
422889f9 21109
422889f9 21110
422889f9 21111
00f6db22 21112 GNULIB_BTOWC=1
422889f9 21113
422889f9 21114
422889f9
CW
21115
21116
21117
00f6db22 21118$as_echo "#define GNULIB_TEST_BTOWC 1" >>confdefs.h
422889f9 21119
422889f9
CW
21120
21121
21122
00f6db22
CW
21123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_expect" >&5
21124$as_echo_n "checking for __builtin_expect... " >&6; }
21125if ${gl_cv___builtin_expect+:} false; then :
422889f9
CW
21126 $as_echo_n "(cached) " >&6
21127else
21128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21129/* end confdefs.h. */
21130
00f6db22
CW
21131 int
21132 main (int argc, char **argv)
21133 {
21134 argc = __builtin_expect (argc, 100);
21135 return argv[argc != 100][0];
21136 }
21137_ACEOF
21138if ac_fn_c_try_link "$LINENO"; then :
21139 gl_cv___builtin_expect=yes
21140else
21141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21142/* end confdefs.h. */
422889f9 21143
00f6db22
CW
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 }
422889f9 21151_ACEOF
00f6db22
CW
21152if ac_fn_c_try_link "$LINENO"; then :
21153 gl_cv___builtin_expect="in <builtins.h>"
422889f9 21154else
00f6db22 21155 gl_cv___builtin_expect=no
422889f9 21156fi
00f6db22
CW
21157rm -f core conftest.err conftest.$ac_objext \
21158 conftest$ac_exeext conftest.$ac_ext
422889f9 21159fi
00f6db22
CW
21160rm -f core conftest.err conftest.$ac_objext \
21161 conftest$ac_exeext conftest.$ac_ext
422889f9 21162fi
00f6db22
CW
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
422889f9 21167
00f6db22
CW
21168 elif test "$gl_cv___builtin_expect" = "in <builtins.h>"; then
21169 $as_echo "#define HAVE___BUILTIN_EXPECT 2" >>confdefs.h
422889f9 21170
00f6db22 21171 fi
422889f9 21172
422889f9
CW
21173
21174
21175
422889f9 21176
422889f9
CW
21177
21178
00f6db22 21179 GNULIB_CHDIR=1
422889f9 21180
422889f9 21181
422889f9 21182
422889f9 21183
422889f9 21184
00f6db22
CW
21185$as_echo "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
21186
422889f9 21187
00f6db22
CW
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; }
21193if ${gl_cv_have_arbitrary_file_name_length_limit+:} false; then :
21194 $as_echo_n "(cached) " >&6
422889f9 21195else
00f6db22
CW
21196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21197/* end confdefs.h. */
422889f9 21198
00f6db22
CW
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
21220have_arbitrary_file_name_length_limit
21221#endif
422889f9 21222_ACEOF
00f6db22
CW
21223if (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
21226else
21227 gl_cv_have_arbitrary_file_name_length_limit=no
21228fi
21229rm -f conftest*
422889f9
CW
21230
21231fi
00f6db22
CW
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; }
422889f9 21234
00f6db22 21235 if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then
422889f9
CW
21236
21237
422889f9
CW
21238
21239
21240
21241
21242
21243
00f6db22 21244 gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext"
422889f9 21245
00f6db22
CW
21246 :
21247 fi
422889f9
CW
21248
21249
00f6db22 21250$as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
422889f9
CW
21251
21252
21253
21254
422889f9 21255
422889f9 21256
00f6db22
CW
21257 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
21258 REPLACE_CLOSE=1
21259 fi
422889f9 21260
422889f9 21261
422889f9
CW
21262
21263
422889f9 21264
422889f9 21265
00f6db22
CW
21266 if test $ac_cv_header_sys_socket_h != yes; then
21267 for ac_header in winsock2.h
21268do :
21269 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
21270if test "x$ac_cv_header_winsock2_h" = xyes; then :
21271 cat >>confdefs.h <<_ACEOF
21272#define HAVE_WINSOCK2_H 1
21273_ACEOF
422889f9 21274
00f6db22
CW
21275fi
21276
21277done
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
422889f9
CW
21287
21288
00f6db22
CW
21289 if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
21290 REPLACE_CLOSE=1
21291 fi
422889f9
CW
21292
21293
00f6db22 21294 if test $REPLACE_CLOSE = 0; then
422889f9
CW
21295
21296
21297
00f6db22
CW
21298 if test $ac_cv_func_fchdir = no; then
21299 HAVE_FCHDIR=0
21300 fi
422889f9 21301
00f6db22
CW
21302 if test $HAVE_FCHDIR = 0; then
21303 REPLACE_CLOSE=1
21304 fi
21305 fi
422889f9
CW
21306
21307
00f6db22 21308 if test $REPLACE_CLOSE = 1; then
422889f9
CW
21309
21310
21311
21312
21313
21314
21315
422889f9 21316
00f6db22 21317 gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
422889f9 21318
422889f9
CW
21319 fi
21320
21321
21322
21323
422889f9 21324
00f6db22 21325 GNULIB_CLOSE=1
422889f9 21326
422889f9 21327
422889f9 21328
00f6db22
CW
21329
21330
21331$as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
21332
21333
422889f9
CW
21334
21335
21336
422889f9
CW
21337
21338
21339
422889f9 21340
422889f9 21341
422889f9 21342
422889f9 21343
422889f9
CW
21344
21345
00f6db22
CW
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; }
21352if ${gl_cv_next_dirent_h+:} false; then :
422889f9
CW
21353 $as_echo_n "(cached) " >&6
21354else
422889f9 21355
00f6db22 21356 if test $ac_cv_header_dirent_h = yes; then
422889f9
CW
21357
21358
21359
21360
422889f9
CW
21361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21362/* end confdefs.h. */
00f6db22
CW
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
422889f9 21396
422889f9 21397
422889f9 21398fi
00f6db22
CW
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
422889f9 21403
00f6db22
CW
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
422889f9 21412
422889f9 21413
422889f9 21414
422889f9 21415
00f6db22
CW
21416 if test $ac_cv_header_dirent_h = yes; then
21417 HAVE_DIRENT_H=1
21418 else
21419 HAVE_DIRENT_H=0
422889f9
CW
21420 fi
21421
21422
422889f9 21423
422889f9 21424
422889f9 21425
422889f9 21426
422889f9 21427
422889f9 21428
422889f9 21429
422889f9 21430
422889f9 21431
00f6db22
CW
21432 for ac_func in dirfd
21433do :
21434 ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
21435if test "x$ac_cv_func_dirfd" = xyes; then :
21436 cat >>confdefs.h <<_ACEOF
21437#define HAVE_DIRFD 1
422889f9 21438_ACEOF
422889f9 21439
00f6db22
CW
21440fi
21441done
422889f9 21442
00f6db22
CW
21443 ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
21444 #include <dirent.h>
21445"
21446if test "x$ac_cv_have_decl_dirfd" = xyes; then :
21447 ac_have_decl=1
422889f9 21448else
00f6db22 21449 ac_have_decl=0
422889f9 21450fi
422889f9 21451
00f6db22
CW
21452cat >>confdefs.h <<_ACEOF
21453#define HAVE_DECL_DIRFD $ac_have_decl
422889f9 21454_ACEOF
422889f9 21455
00f6db22
CW
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; }
21462if ${gl_cv_func_dirfd_macro+:} false; then :
21463 $as_echo_n "(cached) " >&6
21464else
21465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21466/* end confdefs.h. */
422889f9 21467
00f6db22
CW
21468#include <sys/types.h>
21469#include <dirent.h>
21470#ifdef dirfd
21471 dirent_header_defines_dirfd
21472#endif
422889f9 21473_ACEOF
00f6db22
CW
21474if (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
422889f9 21477else
00f6db22 21478 gl_cv_func_dirfd_macro=no
422889f9 21479fi
00f6db22
CW
21480rm -f conftest*
21481
422889f9 21482fi
00f6db22
CW
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; }
21512if ${gl_cv_sys_dir_fd_member_name+:} false; then :
21513 $as_echo_n "(cached) " >&6
21514else
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
422889f9 21521/* end confdefs.h. */
422889f9 21522
00f6db22
CW
21523 #include <sys/types.h>
21524 #include <dirent.h>
422889f9
CW
21525int
21526main (void)
21527{
00f6db22 21528DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
422889f9
CW
21529 ;
21530 return 0;
21531}
21532_ACEOF
21533if ac_fn_c_try_compile "$LINENO"; then :
00f6db22
CW
21534 dir_fd_found=yes
21535
422889f9
CW
21536fi
21537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
00f6db22
CW
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
422889f9 21542
00f6db22 21543 gl_cv_sys_dir_fd_member_name=$ac_expr
422889f9 21544
422889f9 21545
422889f9 21546fi
00f6db22
CW
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
422889f9 21550
00f6db22
CW
21551cat >>confdefs.h <<_ACEOF
21552#define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name
21553_ACEOF
422889f9 21554
00f6db22 21555 fi
422889f9
CW
21556
21557
00f6db22 21558 fi
422889f9
CW
21559
21560
422889f9 21561
422889f9 21562
422889f9 21563
00f6db22 21564 GNULIB_DIRFD=1
422889f9 21565
422889f9 21566
422889f9
CW
21567
21568
422889f9 21569
00f6db22 21570$as_echo "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
422889f9
CW
21571
21572
21573
21574
21575
21576
21577
21578
21579
00f6db22
CW
21580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
21581$as_echo_n "checking whether // is distinct from /... " >&6; }
21582if ${gl_cv_double_slash_root+:} false; then :
422889f9
CW
21583 $as_echo_n "(cached) " >&6
21584else
00f6db22
CW
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
21608fi
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
422889f9 21624
00f6db22
CW
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; }
21628if ${gl_cv_func_dup2_works+:} false; then :
21629 $as_echo_n "(cached) " >&6
21630else
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
422889f9
CW
21649else
21650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21651/* end confdefs.h. */
21652
00f6db22
CW
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
21665int
21666main (void)
422889f9 21667{
00f6db22
CW
21668int 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 ;
422889f9
CW
21710 return 0;
21711}
00f6db22 21712
422889f9
CW
21713_ACEOF
21714if ac_fn_c_try_run "$LINENO"; then :
00f6db22 21715 gl_cv_func_dup2_works=yes
422889f9 21716else
00f6db22 21717 gl_cv_func_dup2_works=no
422889f9
CW
21718fi
21719rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21720 conftest.$ac_objext conftest.beam conftest.$ac_ext
21721fi
21722
21723
21724fi
00f6db22
CW
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
422889f9 21732do :
00f6db22
CW
21733 ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
21734if test "x$ac_cv_func_setdtablesize" = xyes; then :
422889f9 21735 cat >>confdefs.h <<_ACEOF
00f6db22 21736#define HAVE_SETDTABLESIZE 1
422889f9
CW
21737_ACEOF
21738
21739fi
21740done
21741
00f6db22
CW
21742 ;;
21743 esac
21744 fi
422889f9 21745
422889f9
CW
21746
21747
21748
00f6db22
CW
21749 if test $ac_cv_func_fchdir = no; then
21750 HAVE_FCHDIR=0
21751 fi
422889f9 21752
00f6db22
CW
21753 if test $HAVE_FCHDIR = 0; then
21754 if test $HAVE_DUP2 = 1; then
21755 REPLACE_DUP2=1
21756 fi
21757 fi
422889f9 21758
422889f9 21759
00f6db22
CW
21760 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
21761
422889f9 21762
422889f9
CW
21763
21764
21765
21766
422889f9
CW
21767
21768
00f6db22 21769 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
422889f9
CW
21770
21771
00f6db22 21772 fi
422889f9
CW
21773
21774
422889f9 21775
422889f9
CW
21776
21777
00f6db22 21778 GNULIB_DUP2=1
422889f9
CW
21779
21780
21781
21782
21783
00f6db22 21784$as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h
422889f9
CW
21785
21786
422889f9
CW
21787
21788
422889f9 21789
00f6db22
CW
21790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
21791$as_echo_n "checking for error_at_line... " >&6; }
21792if ${ac_cv_lib_error_at_line+:} false; then :
422889f9
CW
21793 $as_echo_n "(cached) " >&6
21794else
00f6db22 21795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
422889f9 21796/* end confdefs.h. */
00f6db22
CW
21797#include <error.h>
21798int
21799main (void)
21800{
21801error_at_line (0, 0, "", 0, "an error occurred");
21802 ;
21803 return 0;
21804}
422889f9 21805_ACEOF
00f6db22
CW
21806if ac_fn_c_try_link "$LINENO"; then :
21807 ac_cv_lib_error_at_line=yes
422889f9 21808else
00f6db22 21809 ac_cv_lib_error_at_line=no
422889f9 21810fi
00f6db22
CW
21811rm -f core conftest.err conftest.$ac_objext \
21812 conftest$ac_exeext conftest.$ac_ext
21813fi
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; }
422889f9 21816
00f6db22 21817 if test $ac_cv_lib_error_at_line = no; then
422889f9 21818
422889f9 21819
422889f9 21820
422889f9 21821
422889f9
CW
21822
21823
21824
21825
00f6db22 21826 gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
422889f9
CW
21827
21828
21829
00f6db22 21830 :
422889f9 21831
00f6db22 21832 fi
422889f9 21833
422889f9 21834
00f6db22 21835 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format"
422889f9 21836
422889f9 21837
422889f9 21838
00f6db22 21839 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format"
422889f9 21840
422889f9 21841
422889f9 21842
422889f9
CW
21843
21844
422889f9 21845
422889f9 21846
00f6db22
CW
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; }
21869if ${gl_cv_func_open_directory_works+:} false; then :
21870 $as_echo_n "(cached) " >&6
422889f9 21871else
00f6db22
CW
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
422889f9 21883
00f6db22 21884else
422889f9
CW
21885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21886/* end confdefs.h. */
00f6db22
CW
21887#include <fcntl.h>
21888
422889f9
CW
21889int
21890main (void)
21891{
00f6db22 21892return open(".", O_RDONLY) < 0;
422889f9
CW
21893 ;
21894 return 0;
21895}
21896_ACEOF
00f6db22
CW
21897if ac_fn_c_try_run "$LINENO"; then :
21898 gl_cv_func_open_directory_works=yes
422889f9 21899else
00f6db22
CW
21900 gl_cv_func_open_directory_works=no
21901fi
21902rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21903 conftest.$ac_objext conftest.beam conftest.$ac_ext
422889f9 21904fi
422889f9 21905
00f6db22
CW
21906fi
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 *)
422889f9 21912
00f6db22 21913$as_echo "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h
422889f9 21914
00f6db22
CW
21915 ;;
21916 esac
21917 fi
422889f9
CW
21918
21919
21920
21921
21922
21923
00f6db22 21924 GNULIB_FCHDIR=1
422889f9
CW
21925
21926
21927
21928
21929
00f6db22 21930$as_echo "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h
422889f9 21931
422889f9
CW
21932
21933
21934
422889f9
CW
21935
21936
21937
21938
00f6db22 21939 if test $ac_cv_func_fcntl = no; then
422889f9
CW
21940
21941
21942
00f6db22
CW
21943 if test $ac_cv_func_fcntl = no; then
21944 HAVE_FCNTL=0
422889f9 21945 else
00f6db22
CW
21946 REPLACE_FCNTL=1
21947 fi
422889f9 21948
00f6db22
CW
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; }
21952if ${gl_cv_func_fcntl_f_dupfd_works+:} false; then :
422889f9
CW
21953 $as_echo_n "(cached) " >&6
21954else
00f6db22
CW
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
422889f9
CW
21961else
21962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21963/* end confdefs.h. */
00f6db22
CW
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
422889f9 21975
00f6db22
CW
21976int
21977main (void)
422889f9 21978{
00f6db22
CW
21979int 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 ;
422889f9
CW
22005 return 0;
22006}
22007_ACEOF
22008if ac_fn_c_try_run "$LINENO"; then :
00f6db22 22009 gl_cv_func_fcntl_f_dupfd_works=yes
422889f9 22010else
00f6db22 22011 gl_cv_func_fcntl_f_dupfd_works=no
422889f9
CW
22012fi
22013rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22014 conftest.$ac_objext conftest.beam conftest.$ac_ext
22015fi
22016
422889f9 22017fi
00f6db22
CW
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 *)
422889f9 22023
00f6db22
CW
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; }
22038if ${gl_cv_func_fcntl_f_dupfd_cloexec+:} false; then :
422889f9
CW
22039 $as_echo_n "(cached) " >&6
22040else
00f6db22
CW
22041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22042/* end confdefs.h. */
422889f9 22043
00f6db22
CW
22044#include <fcntl.h>
22045#ifndef F_DUPFD_CLOEXEC
22046choke me
22047#endif
22048
22049int
22050main (void)
22051{
22052
22053 ;
22054 return 0;
22055}
22056_ACEOF
22057if ac_fn_c_try_compile "$LINENO"; then :
422889f9
CW
22058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22059/* end confdefs.h. */
22060
00f6db22
CW
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. */
22064choke me
22065#endif
22066
22067int
22068main (void)
422889f9 22069{
00f6db22
CW
22070
22071 ;
422889f9
CW
22072 return 0;
22073}
22074_ACEOF
00f6db22
CW
22075if ac_fn_c_try_compile "$LINENO"; then :
22076 gl_cv_func_fcntl_f_dupfd_cloexec=yes
422889f9 22077else
00f6db22 22078 gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
422889f9 22079fi
00f6db22
CW
22080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22081else
22082 gl_cv_func_fcntl_f_dupfd_cloexec=no
422889f9 22083fi
00f6db22
CW
22084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22085fi
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
422889f9 22089
422889f9 22090
422889f9 22091
00f6db22
CW
22092 if test $ac_cv_func_fcntl = no; then
22093 HAVE_FCNTL=0
22094 else
22095 REPLACE_FCNTL=1
422889f9
CW
22096 fi
22097
00f6db22
CW
22098 fi
22099 fi
422889f9
CW
22100
22101
22102
22103
00f6db22
CW
22104 if test $ac_cv_func_fchdir = no; then
22105 HAVE_FCHDIR=0
22106 fi
422889f9 22107
00f6db22 22108 if test $HAVE_FCHDIR = 0; then
422889f9
CW
22109
22110
22111
00f6db22
CW
22112 if test $ac_cv_func_fcntl = no; then
22113 HAVE_FCNTL=0
22114 else
22115 REPLACE_FCNTL=1
22116 fi
422889f9 22117
00f6db22 22118 fi
422889f9 22119
422889f9 22120
00f6db22 22121 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
422889f9
CW
22122
22123
22124
22125
22126
422889f9
CW
22127
22128
22129
00f6db22 22130 gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
422889f9 22131
00f6db22 22132 fi
422889f9 22133
422889f9
CW
22134
22135
22136
22137
00f6db22 22138 GNULIB_FCNTL=1
422889f9 22139
422889f9 22140
422889f9 22141
422889f9 22142
422889f9 22143
00f6db22 22144$as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
422889f9 22145
422889f9 22146
422889f9 22147
422889f9 22148
422889f9
CW
22149
22150
22151
22152
22153
22154
22155
22156
00f6db22
CW
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; }
22164if ${gl_cv_next_fcntl_h+:} false; then :
422889f9
CW
22165 $as_echo_n "(cached) " >&6
22166else
00f6db22
CW
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
422889f9 22204fi
00f6db22
CW
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
422889f9 22218
422889f9 22219
422889f9
CW
22220
22221
22222
422889f9 22223
422889f9
CW
22224
22225
22226
22227
22228
22229
22230
22231
422889f9 22232
00f6db22
CW
22233cat >>confdefs.h <<_ACEOF
22234#define GNULIB_FD_SAFER_FLAG 1
22235_ACEOF
422889f9
CW
22236
22237
422889f9 22238
422889f9
CW
22239
22240
422889f9 22241
00f6db22
CW
22242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
22243$as_echo_n "checking for flexible array member... " >&6; }
22244if ${ac_cv_c_flexmember+:} false; then :
22245 $as_echo_n "(cached) " >&6
22246else
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[]; };
22254int
22255main (void)
22256{
22257int 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
22270if ac_fn_c_try_compile "$LINENO"; then :
22271 ac_cv_c_flexmember=yes
22272else
22273 ac_cv_c_flexmember=no
22274fi
22275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22276fi
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
422889f9 22280
00f6db22 22281$as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
422889f9 22282
00f6db22
CW
22283 else
22284 $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
422889f9 22285
00f6db22 22286 fi
422889f9
CW
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 ;;
00f6db22 22297 freebsd* | dragonfly*)
422889f9
CW
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__
00f6db22
CW
22308 int ok;
22309 #else
22310 error fail
22311 #endif
22312
422889f9 22313_ACEOF
00f6db22 22314if ac_fn_c_try_compile "$LINENO"; then :
422889f9
CW
22315
22316else
22317 FLOAT_H=float.h
22318fi
00f6db22 22319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
422889f9
CW
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
00f6db22 22332 aix* | freebsd* | dragonfly* | linux*)
422889f9
CW
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; }
22342if ${gl_cv_func_itold_works+:} false; then :
22343 $as_echo_n "(cached) " >&6
22344else
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__
00f6db22
CW
22352 int ok;
22353 #else
22354 error fail
22355 #endif
22356
422889f9 22357_ACEOF
00f6db22 22358if ac_fn_c_try_compile "$LINENO"; then :
422889f9
CW
22359 gl_cv_func_itold_works="guessing no"
22360else
22361 gl_cv_func_itold_works="guessing yes"
22362fi
00f6db22 22363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
422889f9 22364 ;;
00f6db22
CW
22365 # Guess yes on native Windows.
22366 mingw*) gl_cv_func_itold_works="guessing yes" ;;
22367 *) gl_cv_func_itold_works="guessing yes" ;;
422889f9
CW
22368 esac
22369
22370else
22371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22372/* end confdefs.h. */
22373
22374int i = -1;
22375volatile long double ld;
22376int main ()
22377{
22378 ld += i * 1.0L;
22379 if (ld > 0)
22380 return 1;
22381 return 0;
22382}
22383_ACEOF
22384if ac_fn_c_try_run "$LINENO"; then :
22385 gl_cv_func_itold_works=yes
22386else
22387 gl_cv_func_itold_works=no
22388fi
22389rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22390 conftest.$ac_objext conftest.beam conftest.$ac_ext
22391fi
22392
22393
22394fi
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; }
22418if ${gl_cv_next_float_h+:} false; then :
22419 $as_echo_n "(cached) " >&6
22420else
22421
00f6db22
CW
22422
22423
22424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
422889f9
CW
22425/* end confdefs.h. */
22426#include <float.h>
422889f9 22427_ACEOF
00f6db22
CW
22428 case "$host_os" in
22429 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22430 *) gl_absname_cpp="$ac_cpp" ;;
22431 esac
422889f9 22432
00f6db22
CW
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 }'
422889f9 22450
00f6db22
CW
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'"'
422889f9
CW
22456
22457
22458fi
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
00f6db22
CW
22476 fi
22477
22478 if test -n "$FLOAT_H"; then
22479 GL_GENERATE_FLOAT_H_TRUE=
22480 GL_GENERATE_FLOAT_H_FALSE='#'
22481else
22482 GL_GENERATE_FLOAT_H_TRUE='#'
22483 GL_GENERATE_FLOAT_H_FALSE=
22484fi
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; }
22526if eval \${$gl_fnmatch_cache_var+:} false; then :
22527 $as_echo_n "(cached) " >&6
22528else
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\""
22538else
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
22553int
22554main (void)
22555{
22556char 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
22625if ac_fn_c_try_run "$LINENO"; then :
22626 eval "$gl_fnmatch_cache_var=yes"
22627else
22628 eval "$gl_fnmatch_cache_var=no"
22629fi
22630rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22631 conftest.$ac_objext conftest.beam conftest.$ac_ext
22632fi
22633
22634
22635fi
22636eval 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='#'
22651else
22652 GL_GENERATE_FNMATCH_H_TRUE='#'
22653 GL_GENERATE_FNMATCH_H_FALSE=
22654fi
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"
22674if test "x$ac_cv_have_decl_isblank" = xyes; then :
22675 ac_have_decl=1
22676else
22677 ac_have_decl=0
22678fi
22679
22680cat >>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
422889f9 22736
422889f9
CW
22737
22738
22739
422889f9 22740
00f6db22 22741 gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
422889f9 22742
00f6db22
CW
22743 case "$host_os" in
22744 mingw*)
422889f9
CW
22745
22746
22747
22748
22749
22750
00f6db22
CW
22751
22752
22753 gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
22754
22755 ;;
22756 esac
22757
22758
22759 :
422889f9
CW
22760
22761 fi
422889f9
CW
22762
22763
22764
22765
22766
00f6db22 22767 GNULIB_FSTAT=1
422889f9
CW
22768
22769
22770
422889f9 22771
422889f9 22772
00f6db22 22773$as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
422889f9
CW
22774
22775
22776
22777
422889f9 22778
422889f9 22779
422889f9
CW
22780
22781
00f6db22
CW
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
422889f9 22788
00f6db22 22789 if test $REPLACE_GETCWD = 1; then
422889f9
CW
22790
22791
422889f9
CW
22792
22793
22794
22795
22796
22797
00f6db22 22798 gl_LIBOBJS="$gl_LIBOBJS getcwd-lgpl.$ac_objext"
422889f9 22799
00f6db22 22800 fi
422889f9 22801
422889f9
CW
22802
22803
22804
422889f9 22805
00f6db22 22806 GNULIB_GETCWD=1
422889f9 22807
422889f9 22808
422889f9
CW
22809
22810
22811
00f6db22
CW
22812$as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
22813
22814
422889f9 22815
422889f9
CW
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; }
22828if ${gl_cv_func_working_getdelim+:} false; then :
22829 $as_echo_n "(cached) " >&6
22830else
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
22844if (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"
22847else
22848 gl_cv_func_working_getdelim="guessing no"
22849fi
22850rm -f conftest*
22851
22852
22853else
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))
00f6db22 22872 { free (line); fclose (in); return 2; }
422889f9
CW
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)
00f6db22
CW
22880 { fclose (in); return 3; }
22881 free (line);
422889f9 22882 }
00f6db22 22883 fclose (in);
422889f9
CW
22884 return 0;
22885 }
22886
22887_ACEOF
22888if ac_fn_c_try_run "$LINENO"; then :
22889 gl_cv_func_working_getdelim=yes
22890else
22891 gl_cv_func_working_getdelim=no
22892fi
22893rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22894 conftest.$ac_objext conftest.beam conftest.$ac_ext
22895fi
22896
22897fi
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
22926do :
22927 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
22928ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
22929if 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
22934fi
22935done
22936
22937 ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
22938if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
22939 ac_have_decl=1
22940else
22941 ac_have_decl=0
22942fi
22943
22944cat >>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
00f6db22
CW
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; }
22974if ${gl_cv_func_getdtablesize_works+:} false; then :
22975 $as_echo_n "(cached) " >&6
22976else
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
22987else
22988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22989/* end confdefs.h. */
22990
22991 #include <unistd.h>
22992int
22993main (void)
22994{
22995int 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
23005if ac_fn_c_try_run "$LINENO"; then :
23006 gl_cv_func_getdtablesize_works=yes
23007else
23008 gl_cv_func_getdtablesize_works=no
23009fi
23010rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23011 conftest.$ac_objext conftest.beam conftest.$ac_ext
23012fi
23013
23014 ;;
23015 esac
23016
23017fi
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
422889f9
CW
23061
23062
23063 gl_getline_needs_run_time_check=no
23064 ac_fn_c_check_func "$LINENO" "getline" "ac_cv_func_getline"
23065if test "x$ac_cv_func_getline" = xyes; then :
23066 gl_getline_needs_run_time_check=yes
23067else
23068 am_cv_func_working_getline=no
23069fi
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; }
23074if ${am_cv_func_working_getline+:} false; then :
23075 $as_echo_n "(cached) " >&6
23076else
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
23090if (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"
23093else
23094 am_cv_func_working_getline="guessing no"
23095fi
23096rm -f conftest*
23097
23098
23099else
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))
00f6db22
CW
23118 { free (line); fclose (in); return 2; }
23119 free (line);
422889f9
CW
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)
00f6db22
CW
23127 { fclose (in); return 3; }
23128 free (line);
422889f9 23129 }
00f6db22 23130 fclose (in);
422889f9
CW
23131 return 0;
23132 }
23133
23134_ACEOF
23135if ac_fn_c_try_run "$LINENO"; then :
23136 am_cv_func_working_getline=yes
23137else
23138 am_cv_func_working_getline=no
23139fi
23140rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23141 conftest.$ac_objext conftest.beam conftest.$ac_ext
23142fi
23143
23144fi
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
422889f9 23194
422889f9
CW
23195
23196
23197
00f6db22 23198 REPLACE_GETOPT=1
422889f9 23199
00f6db22 23200 if test $REPLACE_GETOPT = 1; then
422889f9
CW
23201
23202
00f6db22
CW
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
422889f9
CW
23208
23209
23210
00f6db22 23211$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
422889f9 23212
00f6db22
CW
23213 GETOPT_H=getopt.h
23214 GETOPT_CDEFS_H=getopt-cdefs.h
422889f9
CW
23215
23216
23217
422889f9
CW
23218 fi
23219
00f6db22 23220 if test $REPLACE_GETOPT = 1; then
422889f9
CW
23221
23222
422889f9
CW
23223
23224
23225
23226
23227
23228
00f6db22 23229 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
422889f9 23230
422889f9 23231
422889f9 23232
422889f9
CW
23233
23234
23235
422889f9 23236
422889f9
CW
23237
23238
00f6db22 23239 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
422889f9 23240
00f6db22
CW
23241 GNULIB_GL_UNISTD_H_GETOPT=1
23242 fi
422889f9
CW
23243
23244
23245
23246
00f6db22
CW
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"
23250if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
23251 ac_have_decl=1
23252else
23253 ac_have_decl=0
23254fi
422889f9 23255
00f6db22
CW
23256cat >>confdefs.h <<_ACEOF
23257#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
23258_ACEOF
23259if test $ac_have_decl = 1; then :
23260 ac_found=1
23261fi
422889f9 23262
00f6db22
CW
23263 ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
23264"
23265if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
23266 ac_have_decl=1
23267else
23268 ac_have_decl=0
23269fi
422889f9 23270
00f6db22
CW
23271cat >>confdefs.h <<_ACEOF
23272#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
23273_ACEOF
23274if test $ac_have_decl = 1; then :
23275 ac_found=1
23276fi
422889f9 23277
00f6db22
CW
23278 ac_fn_c_check_decl "$LINENO" "__argv" "ac_cv_have_decl___argv" "#include <stdlib.h>
23279"
23280if test "x$ac_cv_have_decl___argv" = xyes; then :
23281 ac_have_decl=1
23282else
23283 ac_have_decl=0
23284fi
422889f9 23285
00f6db22
CW
23286cat >>confdefs.h <<_ACEOF
23287#define HAVE_DECL___ARGV $ac_have_decl
23288_ACEOF
23289if test $ac_have_decl = 1; then :
23290 ac_found=1
23291fi
422889f9
CW
23292
23293
00f6db22
CW
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; }
23300if ${gl_cv_var___progname+:} false; then :
23301 $as_echo_n "(cached) " >&6
23302else
422889f9 23303
00f6db22
CW
23304 gl_cv_var___progname=
23305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23306/* end confdefs.h. */
23307extern char *__progname;
23308int
23309main (void)
23310{
23311return *__progname;
422889f9 23312
00f6db22
CW
23313 ;
23314 return 0;
23315}
23316_ACEOF
23317if ac_fn_c_try_link "$LINENO"; then :
23318 gl_cv_var___progname=yes
422889f9 23319
00f6db22
CW
23320fi
23321rm -f core conftest.err conftest.$ac_objext \
23322 conftest$ac_exeext conftest.$ac_ext
422889f9
CW
23323
23324
00f6db22
CW
23325fi
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
422889f9 23329
00f6db22 23330$as_echo "#define HAVE_VAR___PROGNAME 1" >>confdefs.h
422889f9 23331
00f6db22 23332 fi
422889f9
CW
23333 fi
23334
23335
23336
23337
23338
23339
23340
23341
23342
23343
23344
23345
23346
23347
23348
23349
23350
422889f9
CW
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; }
23356if ${gl_cv_next_langinfo_h+:} false; then :
23357 $as_echo_n "(cached) " >&6
23358else
23359
23360 if test $ac_cv_header_langinfo_h = yes; then
23361
23362
00f6db22
CW
23363
23364
23365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
422889f9
CW
23366/* end confdefs.h. */
23367#include <langinfo.h>
422889f9 23368_ACEOF
00f6db22
CW
23369 case "$host_os" in
23370 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23371 *) gl_absname_cpp="$ac_cpp" ;;
23372 esac
422889f9 23373
00f6db22
CW
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'"'
422889f9
CW
23397 else
23398 gl_cv_next_langinfo_h='<'langinfo.h'>'
23399 fi
23400
23401
23402fi
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
00f6db22 23423 HAVE_LANGINFO_ALTMON=0
422889f9
CW
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
00f6db22 23429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines CODESET" >&5
422889f9
CW
23430$as_echo_n "checking whether langinfo.h defines CODESET... " >&6; }
23431if ${gl_cv_header_langinfo_codeset+:} false; then :
23432 $as_echo_n "(cached) " >&6
23433else
23434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23435/* end confdefs.h. */
23436#include <langinfo.h>
23437int a = CODESET;
23438
23439int
23440main (void)
23441{
23442
23443 ;
23444 return 0;
23445}
23446_ACEOF
23447if ac_fn_c_try_compile "$LINENO"; then :
23448 gl_cv_header_langinfo_codeset=yes
23449else
23450 gl_cv_header_langinfo_codeset=no
23451fi
23452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23453
23454fi
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; }
23462if ${gl_cv_header_langinfo_t_fmt_ampm+:} false; then :
23463 $as_echo_n "(cached) " >&6
23464else
23465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23466/* end confdefs.h. */
23467#include <langinfo.h>
23468int a = T_FMT_AMPM;
23469
23470int
23471main (void)
23472{
23473
23474 ;
23475 return 0;
23476}
23477_ACEOF
23478if ac_fn_c_try_compile "$LINENO"; then :
23479 gl_cv_header_langinfo_t_fmt_ampm=yes
23480else
23481 gl_cv_header_langinfo_t_fmt_ampm=no
23482fi
23483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23484
23485fi
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
00f6db22
CW
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; }
23493if ${gl_cv_header_langinfo_altmon+:} false; then :
23494 $as_echo_n "(cached) " >&6
23495else
23496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23497/* end confdefs.h. */
23498#include <langinfo.h>
23499int a = ALTMON_1;
23500
23501int
23502main (void)
23503{
23504
23505 ;
23506 return 0;
23507}
23508_ACEOF
23509if ac_fn_c_try_compile "$LINENO"; then :
23510 gl_cv_header_langinfo_altmon=yes
23511else
23512 gl_cv_header_langinfo_altmon=no
23513fi
23514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23515
23516fi
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
422889f9
CW
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; }
23524if ${gl_cv_header_langinfo_era+:} false; then :
23525 $as_echo_n "(cached) " >&6
23526else
23527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23528/* end confdefs.h. */
23529#include <langinfo.h>
23530int a = ERA;
23531
23532int
23533main (void)
23534{
23535
23536 ;
23537 return 0;
23538}
23539_ACEOF
23540if ac_fn_c_try_compile "$LINENO"; then :
23541 gl_cv_header_langinfo_era=yes
23542else
23543 gl_cv_header_langinfo_era=no
23544fi
23545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23546
23547fi
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; }
23555if ${gl_cv_header_langinfo_yesexpr+:} false; then :
23556 $as_echo_n "(cached) " >&6
23557else
23558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23559/* end confdefs.h. */
23560#include <langinfo.h>
23561int a = YESEXPR;
23562
23563int
23564main (void)
23565{
23566
23567 ;
23568 return 0;
23569}
23570_ACEOF
23571if ac_fn_c_try_compile "$LINENO"; then :
23572 gl_cv_header_langinfo_yesexpr=yes
23573else
23574 gl_cv_header_langinfo_yesexpr=no
23575fi
23576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23577
23578fi
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
00f6db22
CW
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; }
23602if ${gl_cv_c___inline+:} false; then :
422889f9
CW
23603 $as_echo_n "(cached) " >&6
23604else
23605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23606/* end confdefs.h. */
00f6db22
CW
23607typedef int foo_t;
23608 static __inline foo_t foo (void) { return 0; }
422889f9
CW
23609int
23610main (void)
23611{
00f6db22 23612return foo ();
422889f9
CW
23613 ;
23614 return 0;
23615}
23616_ACEOF
23617if ac_fn_c_try_compile "$LINENO"; then :
00f6db22 23618 gl_cv_c___inline=yes
422889f9 23619else
00f6db22 23620 gl_cv_c___inline=no
422889f9
CW
23621fi
23622rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23623fi
00f6db22
CW
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
422889f9 23627
00f6db22 23628$as_echo "#define HAVE___INLINE 1" >>confdefs.h
422889f9 23629
00f6db22 23630 fi
422889f9
CW
23631
23632
23633
23634
23635
00f6db22 23636 LOCALCHARSET_TESTS_ENVIRONMENT=
422889f9
CW
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; }
23656if ${gl_cv_header_locale_h_posix2001+:} false; then :
23657 $as_echo_n "(cached) " >&6
23658else
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);
23664int
23665main (void)
23666{
23667
23668 ;
23669 return 0;
23670}
23671_ACEOF
23672if ac_fn_c_try_compile "$LINENO"; then :
23673 gl_cv_header_locale_h_posix2001=yes
23674else
23675 gl_cv_header_locale_h_posix2001=no
23676fi
23677rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23678fi
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; }
23687if ${gl_cv_header_locale_has_locale_t+:} false; then :
23688 $as_echo_n "(cached) " >&6
23689else
23690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23691/* end confdefs.h. */
23692#include <locale.h>
23693 locale_t x;
23694int
23695main (void)
23696{
23697
23698 ;
23699 return 0;
23700}
23701_ACEOF
23702if ac_fn_c_try_compile "$LINENO"; then :
23703 gl_cv_header_locale_has_locale_t=yes
23704else
23705 gl_cv_header_locale_has_locale_t=no
23706fi
23707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23708
23709fi
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; }
23725if ${gl_cv_sys_struct_lconv_ok+:} false; then :
23726 $as_echo_n "(cached) " >&6
23727else
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);
23734int
23735main (void)
23736{
23737
23738 ;
23739 return 0;
23740}
23741_ACEOF
23742if ac_fn_c_try_compile "$LINENO"; then :
23743 gl_cv_sys_struct_lconv_ok=yes
23744else
23745 gl_cv_sys_struct_lconv_ok=no
23746fi
23747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23748
23749fi
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; }
23769if ${gl_cv_next_locale_h+:} false; then :
23770 $as_echo_n "(cached) " >&6
23771else
23772
00f6db22
CW
23773
23774
23775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
422889f9
CW
23776/* end confdefs.h. */
23777#include <locale.h>
422889f9 23778_ACEOF
00f6db22
CW
23779 case "$host_os" in
23780 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23781 *) gl_absname_cpp="$ac_cpp" ;;
23782 esac
422889f9 23783
00f6db22
CW
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 }'
422889f9 23801
00f6db22
CW
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'"'
422889f9
CW
23807
23808
23809fi
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
422889f9 23829
422889f9
CW
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"
23854if test "x$ac_cv_member_struct_lconv_decimal_point" = xyes; then :
23855
23856cat >>confdefs.h <<_ACEOF
23857#define HAVE_STRUCT_LCONV_DECIMAL_POINT 1
23858_ACEOF
23859
23860
23861fi
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
00f6db22
CW
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"
23888if 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
23893fi
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; }
23900if ${gl_cv_pthread_rwlock_rdlock_prefer_writer+:} false; then :
23901 $as_echo_n "(cached) " >&6
23902else
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"
23907else
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
23924static pthread_rwlock_t lock;
23925static pthread_t reader1;
23926static pthread_t writer;
23927static pthread_t reader2;
23928static 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. */
23933static pthread_mutex_t baton;
23934
23935static void *
23936timer_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
23949static void *
23950reader2_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
23980static void *
23981writer_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
23999int
24000main ()
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
24023if ac_fn_c_try_run "$LINENO"; then :
24024 gl_cv_pthread_rwlock_rdlock_prefer_writer=yes
24025else
24026 gl_cv_pthread_rwlock_rdlock_prefer_writer=no
24027fi
24028rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24029 conftest.$ac_objext conftest.beam conftest.$ac_ext
24030fi
24031
24032 LIBS="$save_LIBS"
24033
24034fi
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>
24051int
24052main (void)
24053{
24054
24055#if __FreeBSD__ == 4
24056error "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)
24059error "No, in Mac OS X < 10.7 recursive mutexes actually don't work."
24060#else
24061int x = (int)PTHREAD_MUTEX_RECURSIVE;
24062return !x;
24063#endif
24064
24065 ;
24066 return 0;
24067}
24068_ACEOF
24069if ac_fn_c_try_compile "$LINENO"; then :
24070
24071$as_echo "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h
24072
24073fi
24074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24075 fi
24076 :
24077
24078
24079
24080cat >>confdefs.h <<_ACEOF
24081#define GNULIB_LOCK 1
24082_ACEOF
24083
24084
24085
24086
422889f9
CW
24087
24088 for ac_header in stdlib.h
24089do :
24090 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
24091if test "x$ac_cv_header_stdlib_h" = xyes; then :
24092 cat >>confdefs.h <<_ACEOF
24093#define HAVE_STDLIB_H 1
24094_ACEOF
24095
24096fi
24097
24098done
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; }
24102if ${ac_cv_func_malloc_0_nonnull+:} false; then :
24103 $as_echo_n "(cached) " >&6
24104else
24105 if test "$cross_compiling" = yes; then :
24106 case "$host_os" in
24107 # Guess yes on platforms where we know the result.
00f6db22 24108 *-gnu* | gnu* | freebsd* | netbsd* | openbsd* \
422889f9
CW
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
24115else
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
24124int
24125main (void)
24126{
00f6db22
CW
24127char *p = malloc (0);
24128 int result = !p;
24129 free (p);
24130 return result;
422889f9
CW
24131 ;
24132 return 0;
24133}
24134
24135_ACEOF
24136if ac_fn_c_try_run "$LINENO"; then :
24137 ac_cv_func_malloc_0_nonnull=yes
24138else
24139 ac_cv_func_malloc_0_nonnull=no
24140fi
24141rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24142 conftest.$ac_objext conftest.beam conftest.$ac_ext
24143fi
24144
24145
24146fi
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
24153else
24154 $as_echo "#define HAVE_MALLOC_GNU 0" >>confdefs.h
24155
24156 REPLACE_MALLOC=1
24157
24158fi
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
24175cat >>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
00f6db22
CW
24228
24229
24230
24231
422889f9
CW
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; }
24238if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
24239 $as_echo_n "(cached) " >&6
24240else
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 :
24251else
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>
24265int 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))
00f6db22 24276 return 2;
422889f9
CW
24277 }
24278 return 0;
24279}
24280_ACEOF
24281if ac_fn_c_try_run "$LINENO"; then :
24282 gl_cv_func_mbrtowc_incomplete_state=yes
24283else
24284 gl_cv_func_mbrtowc_incomplete_state=no
24285fi
24286rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24287 conftest.$ac_objext conftest.beam conftest.$ac_ext
24288fi
24289
24290 fi
24291
24292fi
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; }
24301if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
24302 $as_echo_n "(cached) " >&6
24303else
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 :
24314else
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>
24329int 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)
00f6db22 24343 return 2;
422889f9
CW
24344 }
24345 return 0;
24346}
24347_ACEOF
24348if ac_fn_c_try_run "$LINENO"; then :
24349 gl_cv_func_mbrtowc_sanitycheck=yes
24350else
24351 gl_cv_func_mbrtowc_sanitycheck=no
24352fi
24353rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24354 conftest.$ac_objext conftest.beam conftest.$ac_ext
24355fi
24356
24357 fi
24358
24359fi
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"
24391if test "x$ac_cv_have_decl_mbrtowc" = xyes; then :
24392 ac_have_decl=1
24393else
24394 ac_have_decl=0
24395fi
24396
24397cat >>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; }
24413if ${gl_cv_func_mbrtowc_null_arg1+:} false; then :
24414 $as_echo_n "(cached) " >&6
24415else
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 :
24426else
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>
24441int 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
24470if ac_fn_c_try_run "$LINENO"; then :
24471 gl_cv_func_mbrtowc_null_arg1=yes
24472else
24473 gl_cv_func_mbrtowc_null_arg1=no
24474fi
24475rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24476 conftest.$ac_objext conftest.beam conftest.$ac_ext
24477fi
24478
24479 fi
24480
24481fi
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; }
24490if ${gl_cv_func_mbrtowc_null_arg2+:} false; then :
24491 $as_echo_n "(cached) " >&6
24492else
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 :
24503else
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>
24517int 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)
00f6db22 24530 return 2;
422889f9
CW
24531 }
24532 return 0;
24533}
24534_ACEOF
24535if ac_fn_c_try_run "$LINENO"; then :
24536 gl_cv_func_mbrtowc_null_arg2=yes
24537else
24538 gl_cv_func_mbrtowc_null_arg2=no
24539fi
24540rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24541 conftest.$ac_objext conftest.beam conftest.$ac_ext
24542fi
24543
24544 fi
24545
24546fi
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; }
24557if ${gl_cv_func_mbrtowc_retval+:} false; then :
24558 $as_echo_n "(cached) " >&6
24559else
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 :
24571else
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>
24585int 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
24670if ac_fn_c_try_run "$LINENO"; then :
24671 gl_cv_func_mbrtowc_retval=yes
24672else
24673 if test $? != 77; then
24674 gl_cv_func_mbrtowc_retval=no
24675 fi
24676
24677fi
24678rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24679 conftest.$ac_objext conftest.beam conftest.$ac_ext
24680fi
24681
24682 fi
24683
24684fi
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; }
24693if ${gl_cv_func_mbrtowc_nul_retval+:} false; then :
24694 $as_echo_n "(cached) " >&6
24695else
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 :
24706else
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>
24720int 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)
00f6db22 24730 return 2;
422889f9
CW
24731 }
24732 return 0;
24733}
24734_ACEOF
24735if ac_fn_c_try_run "$LINENO"; then :
24736 gl_cv_func_mbrtowc_nul_retval=yes
24737else
24738 gl_cv_func_mbrtowc_nul_retval=no
24739fi
24740rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24741 conftest.$ac_objext conftest.beam conftest.$ac_ext
24742fi
24743
24744 fi
24745
24746fi
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
00f6db22
CW
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; }
24754if ${gl_cv_func_mbrtowc_empty_input+:} false; then :
24755 $as_echo_n "(cached) " >&6
24756else
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 :
24767else
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
24780if ac_fn_c_try_run "$LINENO"; then :
24781 gl_cv_func_mbrtowc_empty_input=yes
24782else
24783 gl_cv_func_mbrtowc_empty_input=no
24784fi
24785rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24786 conftest.$ac_objext conftest.beam conftest.$ac_ext
24787fi
24788
24789
24790fi
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; }
24797if ${gl_cv_C_locale_sans_EILSEQ+:} false; then :
24798 $as_echo_n "(cached) " >&6
24799else
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
24809else
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
24816int
24817main (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
24839if ac_fn_c_try_run "$LINENO"; then :
24840 gl_cv_C_locale_sans_EILSEQ=yes
24841else
24842 gl_cv_C_locale_sans_EILSEQ=no
24843fi
24844rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24845 conftest.$ac_objext conftest.beam conftest.$ac_ext
24846fi
24847
24848
24849fi
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
422889f9
CW
24853 case "$gl_cv_func_mbrtowc_null_arg1" in
24854 *yes) ;;
24855 *)
00f6db22
CW
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
422889f9
CW
24873
24874 REPLACE_MBRTOWC=1
24875 ;;
24876 esac
00f6db22 24877 case "$gl_cv_func_mbrtowc_nul_retval" in
422889f9
CW
24878 *yes) ;;
24879 *)
00f6db22 24880$as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
422889f9
CW
24881
24882 REPLACE_MBRTOWC=1
24883 ;;
24884 esac
00f6db22 24885 case "$gl_cv_func_mbrtowc_empty_input" in
422889f9
CW
24886 *yes) ;;
24887 *)
00f6db22 24888$as_echo "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h
422889f9
CW
24889
24890 REPLACE_MBRTOWC=1
24891 ;;
24892 esac
00f6db22 24893 case $gl_cv_C_locale_sans_EILSEQ in
422889f9
CW
24894 *yes) ;;
24895 *)
00f6db22 24896$as_echo "#define C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
422889f9
CW
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
00f6db22 24916
422889f9
CW
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; }
24952if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
24953 $as_echo_n "(cached) " >&6
24954else
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 :
24965else
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>
24979int 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))
00f6db22 24990 return 2;
422889f9
CW
24991 }
24992 return 0;
24993}
24994_ACEOF
24995if ac_fn_c_try_run "$LINENO"; then :
24996 gl_cv_func_mbrtowc_incomplete_state=yes
24997else
24998 gl_cv_func_mbrtowc_incomplete_state=no
24999fi
25000rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25001 conftest.$ac_objext conftest.beam conftest.$ac_ext
25002fi
25003
25004 fi
25005
25006fi
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; }
25015if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
25016 $as_echo_n "(cached) " >&6
25017else
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 :
25028else
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>
25043int 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)
00f6db22 25057 return 2;
422889f9
CW
25058 }
25059 return 0;
25060}
25061_ACEOF
25062if ac_fn_c_try_run "$LINENO"; then :
25063 gl_cv_func_mbrtowc_sanitycheck=yes
25064else
25065 gl_cv_func_mbrtowc_sanitycheck=no
25066fi
25067rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25068 conftest.$ac_objext conftest.beam conftest.$ac_ext
25069fi
25070
25071 fi
25072
25073fi
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"
25105if test "x$ac_cv_have_decl_mbsinit" = xyes; then :
25106 ac_have_decl=1
25107else
25108 ac_have_decl=0
25109fi
25110
25111cat >>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; }
25174if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
25175 $as_echo_n "(cached) " >&6
25176else
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 :
25187else
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>
25201int 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))
00f6db22 25212 return 2;
422889f9
CW
25213 }
25214 return 0;
25215}
25216_ACEOF
25217if ac_fn_c_try_run "$LINENO"; then :
25218 gl_cv_func_mbrtowc_incomplete_state=yes
25219else
25220 gl_cv_func_mbrtowc_incomplete_state=no
25221fi
25222rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25223 conftest.$ac_objext conftest.beam conftest.$ac_ext
25224fi
25225
25226 fi
25227
25228fi
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; }
25237if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
25238 $as_echo_n "(cached) " >&6
25239else
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 :
25250else
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>
25265int 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)
00f6db22 25279 return 2;
422889f9
CW
25280 }
25281 return 0;
25282}
25283_ACEOF
25284if ac_fn_c_try_run "$LINENO"; then :
25285 gl_cv_func_mbrtowc_sanitycheck=yes
25286else
25287 gl_cv_func_mbrtowc_sanitycheck=no
25288fi
25289rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25290 conftest.$ac_objext conftest.beam conftest.$ac_ext
25291fi
25292
25293 fi
25294
25295fi
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"
25327if test "x$ac_cv_have_decl_mbsrtowcs" = xyes; then :
25328 ac_have_decl=1
25329else
25330 ac_have_decl=0
25331fi
25332
25333cat >>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; }
25352if ${gl_cv_func_mbsrtowcs_works+:} false; then :
25353 $as_echo_n "(cached) " >&6
25354else
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 :
25365else
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>
25379int 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
25442if ac_fn_c_try_run "$LINENO"; then :
25443 gl_cv_func_mbsrtowcs_works=yes
25444else
25445 gl_cv_func_mbsrtowcs_works=no
25446fi
25447rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25448 conftest.$ac_objext conftest.beam conftest.$ac_ext
25449fi
25450
25451 fi
25452
25453fi
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; }
25510if ${ac_cv_have_decl_mbswidth+:} false; then :
25511 $as_echo_n "(cached) " >&6
25512else
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
25525int
25526main (void)
25527{
25528
25529 char *p = (char *) mbswidth;
25530 return !p;
25531
25532 ;
25533 return 0;
25534}
25535_ACEOF
25536if ac_fn_c_try_compile "$LINENO"; then :
25537 ac_cv_have_decl_mbswidth=yes
25538else
25539 ac_cv_have_decl_mbswidth=no
25540fi
25541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25542fi
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
25551cat >>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; }
25560if ${ac_cv_type_mbstate_t+:} false; then :
25561 $as_echo_n "(cached) " >&6
25562else
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>
25574int
25575main (void)
25576{
25577mbstate_t x; return sizeof x;
25578 ;
25579 return 0;
25580}
25581_ACEOF
25582if ac_fn_c_try_compile "$LINENO"; then :
25583 ac_cv_type_mbstate_t=yes
25584else
25585 ac_cv_type_mbstate_t=no
25586fi
25587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25588fi
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
25653do :
25654 ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
25655if 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
25660fi
25661
25662done
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
25688do :
25689 ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
25690if test "x$ac_cv_func_mempcpy" = xyes; then :
25691 cat >>confdefs.h <<_ACEOF
25692#define HAVE_MEMPCPY 1
25693_ACEOF
25694
25695fi
25696done
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
422889f9 25734
422889f9 25735
00f6db22
CW
25736
25737 if test $ac_cv_have_decl_memrchr = no; then
25738 HAVE_DECL_MEMRCHR=0
422889f9
CW
25739 fi
25740
00f6db22
CW
25741 for ac_func in memrchr
25742do :
25743 ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
25744if test "x$ac_cv_func_memrchr" = xyes; then :
25745 cat >>confdefs.h <<_ACEOF
25746#define HAVE_MEMRCHR 1
25747_ACEOF
25748
25749fi
25750done
422889f9 25751
422889f9 25752
00f6db22 25753 if test $ac_cv_func_memrchr = no; then
422889f9
CW
25754
25755
25756
25757
25758
25759
25760
422889f9 25761
00f6db22
CW
25762 gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
25763
25764 :
422889f9
CW
25765 fi
25766
25767
25768
00f6db22
CW
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
422889f9
CW
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
00f6db22
CW
25809cat >>confdefs.h <<_ACEOF
25810#define GNULIB_MSVC_NOTHROW 1
25811_ACEOF
25812
25813
25814
25815
422889f9
CW
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; }
25823if ${gl_cv_func_nl_langinfo_yesexpr_works+:} false; then :
25824 $as_echo_n "(cached) " >&6
25825else
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
25835else
25836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25837/* end confdefs.h. */
25838#include <langinfo.h>
25839
25840int
25841main (void)
25842{
25843return !*nl_langinfo(YESEXPR);
25844
25845 ;
25846 return 0;
25847}
25848_ACEOF
25849if ac_fn_c_try_run "$LINENO"; then :
25850 gl_cv_func_nl_langinfo_yesexpr_works=yes
25851else
25852 gl_cv_func_nl_langinfo_yesexpr_works=no
25853fi
25854rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25855 conftest.$ac_objext conftest.beam conftest.$ac_ext
25856fi
25857
25858
25859fi
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
25867cat >>confdefs.h <<_ACEOF
25868#define FUNC_NL_LANGINFO_YESEXPR_WORKS $FUNC_NL_LANGINFO_YESEXPR_WORKS
25869_ACEOF
25870
00f6db22
CW
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
422889f9
CW
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
00f6db22
CW
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; }
25928if ${gl_cv_func_open_slash+:} false; then :
25929 $as_echo_n "(cached) " >&6
25930else
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
25945else
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
25953int 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
25965if ac_fn_c_try_run "$LINENO"; then :
25966 gl_cv_func_open_slash=yes
25967else
25968 gl_cv_func_open_slash=no
25969fi
25970rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25971 conftest.$ac_objext conftest.beam conftest.$ac_ext
25972fi
25973
25974 rm -f conftest.sl conftest.tmp conftest.lnk
25975
25976fi
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
26074cat >>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
422889f9
CW
26096 ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
26097"
26098if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
26099 ac_have_decl=1
26100else
26101 ac_have_decl=0
26102fi
26103
26104cat >>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"
26110if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
26111 ac_have_decl=1
26112else
26113 ac_have_decl=0
26114fi
26115
26116cat >>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
26125do :
26126 ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
26127if test "x$ac_cv_func_rawmemchr" = xyes; then :
26128 cat >>confdefs.h <<_ACEOF
26129#define HAVE_RAWMEMCHR 1
26130_ACEOF
26131
26132fi
26133done
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
00f6db22
CW
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
26171do :
26172 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
26173if test "x$ac_cv_header_stdlib_h" = xyes; then :
26174 cat >>confdefs.h <<_ACEOF
26175#define HAVE_STDLIB_H 1
26176_ACEOF
26177
26178fi
26179
26180done
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; }
26184if ${ac_cv_func_realloc_0_nonnull+:} false; then :
26185 $as_echo_n "(cached) " >&6
26186else
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
26197else
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
26206int
26207main (void)
26208{
26209char *p = realloc (0, 0);
26210 int result = !p;
26211 free (p);
26212 return result;
26213 ;
26214 return 0;
26215}
26216
26217_ACEOF
26218if ac_fn_c_try_run "$LINENO"; then :
26219 ac_cv_func_realloc_0_nonnull=yes
26220else
26221 ac_cv_func_realloc_0_nonnull=no
26222fi
26223rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26224 conftest.$ac_objext conftest.beam conftest.$ac_ext
26225fi
26226
26227
26228fi
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
26235else
26236 $as_echo "#define HAVE_REALLOC_GNU 0" >>confdefs.h
26237
26238 REPLACE_REALLOC=1
26239
26240fi
26241
422889f9 26242
00f6db22 26243 if test $REPLACE_REALLOC = 1; then
422889f9
CW
26244
26245
26246
26247
26248
422889f9
CW
26249
26250
26251
00f6db22 26252 gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
422889f9 26253
00f6db22 26254 fi
422889f9 26255
422889f9 26256
00f6db22
CW
26257cat >>confdefs.h <<_ACEOF
26258#define GNULIB_REALLOC_GNU 1
26259_ACEOF
422889f9
CW
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.
26303if test "${with_included_regex+set}" = set; then :
26304 withval=$with_included_regex;
26305fi
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
00f6db22 26317
422889f9
CW
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; }
26320if ${gl_cv_func_re_compile_pattern_working+:} false; then :
26321 $as_echo_n "(cached) " >&6
26322else
26323 if test "$cross_compiling" = yes; then :
00f6db22
CW
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
422889f9
CW
26331else
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>
00f6db22
CW
26339
26340 #if defined M_CHECK_ACTION || HAVE_DECL_ALARM
422889f9 26341 # include <signal.h>
00f6db22
CW
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); }
422889f9
CW
26352 #endif
26353
26354int
26355main (void)
26356{
26357int 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
00f6db22
CW
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. */
422889f9 26367#if HAVE_DECL_ALARM
422889f9
CW
26368 signal (SIGALRM, SIG_DFL);
26369 alarm (2);
26370#endif
00f6db22
CW
26371#ifdef M_CHECK_ACTION
26372 signal (SIGABRT, sigabrt_no_core);
26373 mallopt (M_CHECK_ACTION, 2);
26374#endif
26375
422889f9
CW
26376 if (setlocale (LC_ALL, "en_US.UTF-8"))
26377 {
26378 {
00f6db22 26379 /* https://sourceware.org/ml/libc-hacker/2006-09/msg00008.html
422889f9
CW
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;
00f6db22 26397 regfree (&regex);
422889f9
CW
26398 }
26399
26400 {
26401 /* This test is from glibc bug 15078.
26402 The test case is from Andreas Schwab in
00f6db22 26403 <https://sourceware.org/ml/libc-alpha/2013-01/msg00967.html>.
422889f9
CW
26404 */
26405 static char const pat[] = "[^x]x";
26406 static char const data[] =
00f6db22
CW
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";
422889f9
CW
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;
00f6db22
CW
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);
422889f9
CW
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
00f6db22 26501 https://lists.gnu.org/r/bug-coreutils/2007-06/msg00089.html
422889f9
CW
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
00f6db22
CW
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
422889f9
CW
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
26545if ac_fn_c_try_run "$LINENO"; then :
26546 gl_cv_func_re_compile_pattern_working=yes
26547else
26548 gl_cv_func_re_compile_pattern_working=no
26549fi
26550rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26551 conftest.$ac_objext conftest.beam conftest.$ac_ext
26552fi
26553
00f6db22 26554
422889f9
CW
26555fi
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; }
00f6db22
CW
26558 case "$gl_cv_func_re_compile_pattern_working" in #(
26559 *yes) ac_use_included_regex=no;; #(
26560 *no) ac_use_included_regex=yes;;
422889f9
CW
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
00f6db22 26638
422889f9
CW
26639 for ac_header in libintl.h
26640do :
26641 ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
26642if test "x$ac_cv_header_libintl_h" = xyes; then :
26643 cat >>confdefs.h <<_ACEOF
26644#define HAVE_LIBINTL_H 1
26645_ACEOF
26646
26647fi
26648
26649done
26650
26651
26652 ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
26653"
26654if test "x$ac_cv_have_decl_isblank" = xyes; then :
26655 ac_have_decl=1
26656else
26657 ac_have_decl=0
26658fi
26659
26660cat >>confdefs.h <<_ACEOF
26661#define HAVE_DECL_ISBLANK $ac_have_decl
26662_ACEOF
26663
26664
26665 fi
26666
00f6db22
CW
26667
26668
26669
422889f9
CW
26670 for ac_header in stdint.h
26671do :
26672 ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
26673if test "x$ac_cv_header_stdint_h" = xyes; then :
26674 cat >>confdefs.h <<_ACEOF
26675#define HAVE_STDINT_H 1
26676_ACEOF
26677
26678fi
26679
26680done
26681
26682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5
26683$as_echo_n "checking for SIZE_MAX... " >&6; }
26684if ${gl_cv_size_max+:} false; then :
26685 $as_echo_n "(cached) " >&6
26686else
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
26697Found it
26698#endif
26699
26700_ACEOF
26701if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26702 $EGREP "Found it" >/dev/null 2>&1; then :
26703 gl_cv_size_max=yes
26704fi
26705rm -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
26711else
26712 size_t_bits_minus_1=
26713fi
26714
26715 if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint" "#include <stddef.h>"; then :
26716
26717else
26718 fits_in_uint=
26719fi
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
26729int
26730main (void)
26731{
26732
26733 ;
26734 return 0;
26735}
26736_ACEOF
26737if ac_fn_c_try_compile "$LINENO"; then :
26738 fits_in_uint=0
26739fi
26740rm -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
26752fi
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
26757cat >>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"
26768if test "x$ac_cv_have_decl_sleep" = xyes; then :
26769 ac_have_decl=1
26770else
26771 ac_have_decl=0
26772fi
26773
26774cat >>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; }
26784if ${gl_cv_func_sleep_works+:} false; then :
26785 $as_echo_n "(cached) " >&6
26786else
26787 if test "$cross_compiling" = yes; then :
26788 case "$host_os" in
00f6db22
CW
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" ;;
422889f9
CW
26795 esac
26796
26797else
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>
26804static void
26805handle_alarm (int sig)
26806{
26807 if (sig != SIGALRM)
26808 _exit (2);
26809}
26810
26811int
26812main (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
26832if ac_fn_c_try_run "$LINENO"; then :
26833 gl_cv_func_sleep_works=yes
26834else
26835 gl_cv_func_sleep_works=no
26836fi
26837rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26838 conftest.$ac_objext conftest.beam conftest.$ac_ext
26839fi
26840
26841fi
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; }
26882if ${gt_cv_ssize_t+:} false; then :
26883 $as_echo_n "(cached) " >&6
26884else
26885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26886/* end confdefs.h. */
26887#include <sys/types.h>
26888int
26889main (void)
26890{
26891int x = sizeof (ssize_t *) + sizeof (ssize_t);
26892 return !x;
26893 ;
26894 return 0;
26895}
26896_ACEOF
26897if ac_fn_c_try_compile "$LINENO"; then :
26898 gt_cv_ssize_t=yes
26899else
26900 gt_cv_ssize_t=no
26901fi
26902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26903fi
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
00f6db22
CW
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; }
26923if ${gl_cv_func_stat_file_slash+:} false; then :
26924 $as_echo_n "(cached) " >&6
26925else
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
26941else
26942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26943/* end confdefs.h. */
26944#include <sys/stat.h>
26945
26946int
26947main (void)
26948{
26949int 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
26963if ac_fn_c_try_run "$LINENO"; then :
26964 gl_cv_func_stat_file_slash=yes
26965else
26966 gl_cv_func_stat_file_slash=no
26967fi
26968rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26969 conftest.$ac_objext conftest.beam conftest.$ac_ext
26970fi
26971
26972 rm -f conftest.tmp conftest.lnk
26973fi
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"
27042if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes; then :
27043
27044cat >>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; }
27050if ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+:} false; then :
27051 $as_echo_n "(cached) " >&6
27052else
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
27065int
27066main (void)
27067{
27068
27069 st.st_atim = ts;
27070
27071 ;
27072 return 0;
27073}
27074_ACEOF
27075if ac_fn_c_try_compile "$LINENO"; then :
27076 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
27077else
27078 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
27079fi
27080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27081fi
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
27089else
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"
27093if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes; then :
27094
27095cat >>confdefs.h <<_ACEOF
27096#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
27097_ACEOF
27098
27099
27100else
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"
27104if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes; then :
27105
27106cat >>confdefs.h <<_ACEOF
27107#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
27108_ACEOF
27109
27110
27111else
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"
27115if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes; then :
27116
27117cat >>confdefs.h <<_ACEOF
27118#define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
27119_ACEOF
27120
27121
27122fi
27123
27124fi
27125
27126fi
27127
27128fi
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"
27137if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes; then :
27138
27139cat >>confdefs.h <<_ACEOF
27140#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
27141_ACEOF
27142
27143
27144else
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"
27148if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes; then :
27149
27150cat >>confdefs.h <<_ACEOF
27151#define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
27152_ACEOF
27153
27154
27155else
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"
27159if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes; then :
27160
27161cat >>confdefs.h <<_ACEOF
27162#define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
27163_ACEOF
27164
27165
27166fi
27167
27168fi
27169
27170fi
27171
27172
27173
422889f9
CW
27174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
27175$as_echo_n "checking for working stdalign.h... " >&6; }
27176if ${gl_cv_header_working_stdalign_h+:} false; then :
27177 $as_echo_n "(cached) " >&6
27178else
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
00f6db22 27186 <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
422889f9
CW
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 \
00f6db22
CW
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)
422889f9
CW
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
27211int
27212main (void)
27213{
27214
27215 ;
27216 return 0;
27217}
27218_ACEOF
27219if ac_fn_c_try_compile "$LINENO"; then :
27220 gl_cv_header_working_stdalign_h=yes
27221else
27222 gl_cv_header_working_stdalign_h=no
27223fi
27224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27225fi
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='#'
27239else
27240 GL_GENERATE_STDALIGN_H_TRUE='#'
27241 GL_GENERATE_STDALIGN_H_FALSE=
27242fi
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='#'
27259else
00f6db22
CW
27260 GL_GENERATE_STDBOOL_H_TRUE='#'
27261 GL_GENERATE_STDBOOL_H_FALSE=
27262fi
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; }
27279if ${gl_cv_type_max_align_t+:} false; then :
27280 $as_echo_n "(cached) " >&6
27281else
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
27291int
27292main (void)
27293{
27294
27295 ;
27296 return 0;
27297}
27298_ACEOF
27299if ac_fn_c_try_compile "$LINENO"; then :
27300 gl_cv_type_max_align_t=yes
27301else
27302 gl_cv_type_max_align_t=no
422889f9 27303fi
00f6db22 27304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
422889f9 27305
00f6db22
CW
27306fi
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
422889f9
CW
27312 fi
27313
422889f9
CW
27314 if test $gt_cv_c_wchar_t = no; then
27315 HAVE_WCHAR_T=0
27316 STDDEF_H=stddef.h
27317 fi
00f6db22 27318
422889f9
CW
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; }
27321if ${gl_cv_decl_null_works+:} false; then :
27322 $as_echo_n "(cached) " >&6
27323else
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
27329int
27330main (void)
27331{
27332
27333 ;
27334 return 0;
27335}
27336_ACEOF
27337if ac_fn_c_try_compile "$LINENO"; then :
27338 gl_cv_decl_null_works=yes
27339else
27340 gl_cv_decl_null_works=no
27341fi
27342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27343fi
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
00f6db22 27351
422889f9
CW
27352 if test -n "$STDDEF_H"; then
27353 GL_GENERATE_STDDEF_H_TRUE=
27354 GL_GENERATE_STDDEF_H_FALSE='#'
27355else
27356 GL_GENERATE_STDDEF_H_TRUE='#'
27357 GL_GENERATE_STDDEF_H_FALSE=
27358fi
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; }
27374if ${gl_cv_next_stddef_h+:} false; then :
27375 $as_echo_n "(cached) " >&6
27376else
27377
00f6db22
CW
27378
27379
27380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
422889f9
CW
27381/* end confdefs.h. */
27382#include <stddef.h>
422889f9 27383_ACEOF
00f6db22
CW
27384 case "$host_os" in
27385 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27386 *) gl_absname_cpp="$ac_cpp" ;;
27387 esac
422889f9 27388
00f6db22
CW
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"`
422889f9 27409
00f6db22
CW
27410 gl_header=$gl_cv_absolute_stddef_h
27411 gl_cv_next_stddef_h='"'$gl_header'"'
422889f9
CW
27412
27413
27414fi
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
00f6db22
CW
27437 $as_echo "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
27438
27439
422889f9
CW
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; }
27453if ${gl_cv_next_stdio_h+:} false; then :
27454 $as_echo_n "(cached) " >&6
27455else
27456
00f6db22
CW
27457
27458
27459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
422889f9
CW
27460/* end confdefs.h. */
27461#include <stdio.h>
422889f9 27462_ACEOF
00f6db22
CW
27463 case "$host_os" in
27464 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27465 *) gl_absname_cpp="$ac_cpp" ;;
27466 esac
422889f9 27467
00f6db22
CW
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"`
422889f9 27488
00f6db22
CW
27489 gl_header=$gl_cv_absolute_stdio_h
27490 gl_cv_next_stdio_h='"'$gl_header'"'
422889f9
CW
27491
27492
27493fi
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
00f6db22
CW
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; }
27514if ${gl_cv_func_printf_attribute_flavor+:} false; then :
27515 $as_echo_n "(cached) " >&6
27516else
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
27531int
27532main (void)
27533{
27534
27535 ;
27536 return 0;
27537}
27538_ACEOF
27539if ac_fn_c_try_compile "$LINENO"; then :
27540 gl_cv_func_printf_attribute_flavor=system
27541else
27542 gl_cv_func_printf_attribute_flavor=gnu
27543fi
27544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27545fi
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
422889f9
CW
27554 GNULIB_FSCANF=1
27555
27556
27557cat >>confdefs.h <<_ACEOF
27558#define GNULIB_FSCANF 1
27559_ACEOF
27560
27561
27562 GNULIB_SCANF=1
27563
27564
27565cat >>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
422889f9 27591
422889f9
CW
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; }
27609if ${gl_cv_next_stdlib_h+:} false; then :
27610 $as_echo_n "(cached) " >&6
27611else
27612
00f6db22
CW
27613
27614
27615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
422889f9
CW
27616/* end confdefs.h. */
27617#include <stdlib.h>
422889f9 27618_ACEOF
00f6db22
CW
27619 case "$host_os" in
27620 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27621 *) gl_absname_cpp="$ac_cpp" ;;
27622 esac
422889f9 27623
00f6db22
CW
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 }'
422889f9 27641
00f6db22
CW
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'"'
422889f9
CW
27647
27648
27649fi
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
422889f9 27669
422889f9
CW
27670
27671
27672
27673
27674
27675 for ac_func in strcasecmp
27676do :
27677 ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
27678if test "x$ac_cv_func_strcasecmp" = xyes; then :
27679 cat >>confdefs.h <<_ACEOF
27680#define HAVE_STRCASECMP 1
27681_ACEOF
27682
27683fi
27684done
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
27693do :
27694 ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp"
27695if test "x$ac_cv_func_strncasecmp" = xyes; then :
27696 cat >>confdefs.h <<_ACEOF
27697#define HAVE_STRNCASECMP 1
27698_ACEOF
27699
27700fi
27701done
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"
27709if test "x$ac_cv_have_decl_strncasecmp" = xyes; then :
27710 ac_have_decl=1
27711else
27712 ac_have_decl=0
27713fi
27714
27715cat >>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
27759do :
27760 ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
27761if test "x$ac_cv_func_strchrnul" = xyes; then :
27762 cat >>confdefs.h <<_ACEOF
27763#define HAVE_STRCHRNUL 1
27764_ACEOF
27765
27766fi
27767done
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; }
27774if ${gl_cv_func_strchrnul_works+:} false; then :
27775 $as_echo_n "(cached) " >&6
27776else
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
27791if (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"
27794else
27795 gl_cv_func_strchrnul_works="guessing no"
27796fi
27797rm -f conftest*
27798
27799
27800else
27801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27802/* end confdefs.h. */
27803
27804#include <string.h> /* for strchrnul */
27805
27806int
27807main (void)
27808{
27809const char *buf = "a";
27810 return strchrnul (buf, 'b') != buf + 1;
27811
27812 ;
27813 return 0;
27814}
27815_ACEOF
27816if ac_fn_c_try_run "$LINENO"; then :
27817 gl_cv_func_strchrnul_works=yes
27818else
27819 gl_cv_func_strchrnul_works=no
27820fi
27821rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27822 conftest.$ac_objext conftest.beam conftest.$ac_ext
27823fi
27824
27825
27826fi
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
00f6db22
CW
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
422889f9
CW
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; }
27913if ${gl_cv_func_working_strerror+:} false; then :
27914 $as_echo_n "(cached) " >&6
27915else
27916 if test "$cross_compiling" = yes; then :
27917 case "$host_os" in
00f6db22
CW
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" ;;
422889f9
CW
27922 esac
27923
27924else
27925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27926/* end confdefs.h. */
27927#include <string.h>
27928
27929int
27930main (void)
27931{
27932if (!*strerror (-2)) return 1;
27933 ;
27934 return 0;
27935}
27936_ACEOF
27937if ac_fn_c_try_run "$LINENO"; then :
27938 gl_cv_func_working_strerror=yes
27939else
27940 gl_cv_func_working_strerror=no
27941fi
27942rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27943 conftest.$ac_objext conftest.beam conftest.$ac_ext
27944fi
27945
27946
27947fi
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
27975cat >>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
28014do :
28015 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
28016if test "x$ac_cv_header_winsock2_h" = xyes; then :
28017 cat >>confdefs.h <<_ACEOF
28018#define HAVE_WINSOCK2_H 1
28019_ACEOF
28020
28021fi
28022
28023done
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; }
28057if ${gl_cv_func_strndup_works+:} false; then :
28058 $as_echo_n "(cached) " >&6
28059else
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
28067else
28068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28069/* end confdefs.h. */
28070
28071 #include <string.h>
28072 #include <stdlib.h>
28073int
28074main (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
00f6db22 28084 int result;
422889f9
CW
28085 char *s;
28086 s = strndup ("some longer string", 15);
28087 free (s);
28088 s = strndup ("shorter string", 13);
00f6db22
CW
28089 result = s[13] != '\0';
28090 free (s);
28091 return result;
422889f9
CW
28092 ;
28093 return 0;
28094}
28095_ACEOF
28096if ac_fn_c_try_run "$LINENO"; then :
28097 gl_cv_func_strndup_works=yes
28098else
28099 gl_cv_func_strndup_works=no
28100fi
28101rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28102 conftest.$ac_objext conftest.beam conftest.$ac_ext
28103fi
28104
28105fi
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; }
28154if ${ac_cv_func_strnlen_working+:} false; then :
28155 $as_echo_n "(cached) " >&6
28156else
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
28163else
00f6db22
CW
28164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28165/* end confdefs.h. */
28166$ac_includes_default
28167int
28168main (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
28190if ac_fn_c_try_run "$LINENO"; then :
28191 ac_cv_func_strnlen_working=yes
28192else
28193 ac_cv_func_strnlen_working=no
28194fi
28195rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28196 conftest.$ac_objext conftest.beam conftest.$ac_ext
28197fi
28198
28199fi
28200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5
28201$as_echo "$ac_cv_func_strnlen_working" >&6; }
28202test $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; }
28257if ${gl_cv_next_sys_stat_h+:} false; then :
28258 $as_echo_n "(cached) " >&6
28259else
422889f9 28260
00f6db22 28261 if test $ac_cv_header_sys_stat_h = yes; then
422889f9 28262
422889f9 28263
422889f9 28264
00f6db22
CW
28265
28266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28267/* end confdefs.h. */
28268#include <sys/stat.h>
422889f9 28269_ACEOF
00f6db22
CW
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
422889f9
CW
28302
28303fi
00f6db22
CW
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
422889f9 28308
00f6db22
CW
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
422889f9 28317
422889f9 28318
422889f9
CW
28319
28320
28321
28322
28323
28324
00f6db22 28325 WINDOWS_STAT_TIMESPEC=0
422889f9
CW
28326
28327
422889f9 28328
422889f9
CW
28329
28330
28331
28332
28333
00f6db22
CW
28334 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
28335 #include <sys/stat.h>
28336"
28337if test "x$ac_cv_type_nlink_t" = xyes; then :
28338
28339else
28340
28341$as_echo "#define nlink_t int" >>confdefs.h
422889f9 28342
00f6db22 28343fi
422889f9
CW
28344
28345
28346
28347
422889f9
CW
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; }
28371if ${gl_cv_next_sysexits_h+:} false; then :
28372 $as_echo_n "(cached) " >&6
28373else
28374
28375 if test $ac_cv_header_sysexits_h = yes; then
28376
28377
00f6db22
CW
28378
28379
28380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
422889f9
CW
28381/* end confdefs.h. */
28382#include <sysexits.h>
422889f9 28383_ACEOF
00f6db22
CW
28384 case "$host_os" in
28385 aix*) gl_absname_cpp="$ac_cpp -C" ;;
28386 *) gl_absname_cpp="$ac_cpp" ;;
28387 esac
422889f9 28388
00f6db22
CW
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'"'
422889f9
CW
28412 else
28413 gl_cv_next_sysexits_h='<'sysexits.h'>'
28414 fi
28415
28416
28417fi
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>
28438int
28439main (void)
28440{
28441switch (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
28466if ac_fn_c_try_compile "$LINENO"; then :
28467 SYSEXITS_H=
28468else
28469 SYSEXITS_H=sysexits.h
28470fi
28471rm -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='#'
28481else
28482 GL_GENERATE_SYSEXITS_H_TRUE='#'
28483 GL_GENERATE_SYSEXITS_H_FALSE=
28484fi
28485
28486
28487
28488
28489
28490
28491
28492
28493
28494
28495
28496
28497
00f6db22
CW
28498
28499
28500
28501
28502
28503
28504
422889f9
CW
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; }
28511if ${gl_cv_next_unistd_h+:} false; then :
28512 $as_echo_n "(cached) " >&6
28513else
28514
28515 if test $ac_cv_header_unistd_h = yes; then
28516
28517
00f6db22
CW
28518
28519
28520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
422889f9
CW
28521/* end confdefs.h. */
28522#include <unistd.h>
422889f9 28523_ACEOF
00f6db22
CW
28524 case "$host_os" in
28525 aix*) gl_absname_cpp="$ac_cpp -C" ;;
28526 *) gl_absname_cpp="$ac_cpp" ;;
28527 esac
422889f9 28528
00f6db22
CW
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'"'
422889f9
CW
28552 else
28553 gl_cv_next_unistd_h='<'unistd.h'>'
28554 fi
28555
28556
28557fi
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
422889f9 28587
422889f9 28588
422889f9 28589
00f6db22 28590
422889f9
CW
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 \
00f6db22 28604 && test $LIBUNISTRING_VERSION_SUBMINOR -lt 4
422889f9
CW
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 \
00f6db22 28631 && test $LIBUNISTRING_VERSION_SUBMINOR -lt 4
422889f9
CW
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 \
00f6db22 28658 && test $LIBUNISTRING_VERSION_SUBMINOR -lt 8
422889f9
CW
28659 }
28660 }
28661 }
28662
28663
28664
28665
28666 }
28667 }; then
28668 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE=
28669 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE='#'
28670else
28671 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE='#'
28672 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE=
28673fi
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"
28738if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
28739
28740else
28741
28742$as_echo "#define ptrdiff_t long" >>confdefs.h
28743
28744
28745fi
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
28759do :
28760 ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
28761if test "x$ac_cv_func_vsnprintf" = xyes; then :
28762 cat >>confdefs.h <<_ACEOF
28763#define HAVE_VSNPRINTF 1
28764_ACEOF
28765
28766fi
28767done
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; }
28775if ${gl_cv_func_snprintf_size1+:} false; then :
28776 $as_echo_n "(cached) " >&6
28777else
28778
28779 if test "$cross_compiling" = yes; then :
00f6db22
CW
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
422889f9
CW
28786else
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>
28795static 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
28805int 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
28812if ac_fn_c_try_run "$LINENO"; then :
28813 gl_cv_func_snprintf_size1=yes
28814else
28815 gl_cv_func_snprintf_size1=no
28816fi
28817rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28818 conftest.$ac_objext conftest.beam conftest.$ac_ext
28819fi
28820
28821
28822fi
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; }
28835if ${gl_cv_func_printf_positions+:} false; then :
28836 $as_echo_n "(cached) " >&6
28837else
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";;
00f6db22 28845 # Guess no on native Windows.
422889f9
CW
28846 mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
28847 *) gl_cv_func_printf_positions="guessing yes";;
28848 esac
28849
28850else
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). */
28858static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
28859static char buf[100];
28860int main ()
28861{
28862 sprintf (buf, format, 33, 55);
28863 return (strcmp (buf, "55 33") != 0);
28864}
28865_ACEOF
28866if ac_fn_c_try_run "$LINENO"; then :
28867 gl_cv_func_printf_positions=yes
28868else
28869 gl_cv_func_printf_positions=no
28870fi
28871rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28872 conftest.$ac_objext conftest.beam conftest.$ac_ext
28873fi
28874
28875
28876fi
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
00f6db22
CW
28905 else
28906
28907 if test $ac_cv_have_decl_vsnprintf = yes; then
28908 REPLACE_VSNPRINTF=1
28909 fi
422889f9
CW
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; }
28951if ${gl_cv_next_wchar_h+:} false; then :
28952 $as_echo_n "(cached) " >&6
28953else
28954
28955 if test $ac_cv_header_wchar_h = yes; then
28956
28957
00f6db22
CW
28958
28959
28960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
422889f9
CW
28961/* end confdefs.h. */
28962#include <wchar.h>
422889f9 28963_ACEOF
00f6db22
CW
28964 case "$host_os" in
28965 aix*) gl_absname_cpp="$ac_cpp -C" ;;
28966 *) gl_absname_cpp="$ac_cpp" ;;
28967 esac
422889f9 28968
00f6db22
CW
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'"'
422889f9
CW
28992 else
28993 gl_cv_next_wchar_h='<'wchar.h'>'
28994 fi
28995
28996
28997fi
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
422889f9 29033
422889f9 29034
422889f9 29035
422889f9
CW
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; }
29054if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
29055 $as_echo_n "(cached) " >&6
29056else
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 :
29067else
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>
29081int 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))
00f6db22 29092 return 2;
422889f9
CW
29093 }
29094 return 0;
29095}
29096_ACEOF
29097if ac_fn_c_try_run "$LINENO"; then :
29098 gl_cv_func_mbrtowc_incomplete_state=yes
29099else
29100 gl_cv_func_mbrtowc_incomplete_state=no
29101fi
29102rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29103 conftest.$ac_objext conftest.beam conftest.$ac_ext
29104fi
29105
29106 fi
29107
29108fi
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; }
29117if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
29118 $as_echo_n "(cached) " >&6
29119else
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 :
29130else
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>
29145int 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)
00f6db22 29159 return 2;
422889f9
CW
29160 }
29161 return 0;
29162}
29163_ACEOF
29164if ac_fn_c_try_run "$LINENO"; then :
29165 gl_cv_func_mbrtowc_sanitycheck=yes
29166else
29167 gl_cv_func_mbrtowc_sanitycheck=no
29168fi
29169rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29170 conftest.$ac_objext conftest.beam conftest.$ac_ext
29171fi
29172
29173 fi
29174
29175fi
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"
29207if test "x$ac_cv_have_decl_wcrtomb" = xyes; then :
29208 ac_have_decl=1
29209else
29210 ac_have_decl=0
29211fi
29212
29213cat >>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; }
29231if ${gl_cv_func_wcrtomb_retval+:} false; then :
29232 $as_echo_n "(cached) " >&6
29233else
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" ;;
00f6db22
CW
29238 # Guess yes on native Windows.
29239 mingw*) gl_cv_func_wcrtomb_retval="guessing yes" ;;
422889f9
CW
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 :
29246else
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>
29260int 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
29286if ac_fn_c_try_run "$LINENO"; then :
29287 gl_cv_func_wcrtomb_retval=yes
29288else
29289 gl_cv_func_wcrtomb_retval=no
29290fi
29291rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29292 conftest.$ac_objext conftest.beam conftest.$ac_ext
29293fi
29294
29295 fi
29296
29297fi
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
00f6db22
CW
29366
29367
422889f9
CW
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; }
29373if ${gl_cv_next_wctype_h+:} false; then :
29374 $as_echo_n "(cached) " >&6
29375else
29376
29377 if test $ac_cv_header_wctype_h = yes; then
29378
29379
00f6db22
CW
29380
29381
29382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
422889f9
CW
29383/* end confdefs.h. */
29384#include <wctype.h>
422889f9 29385_ACEOF
00f6db22
CW
29386 case "$host_os" in
29387 aix*) gl_absname_cpp="$ac_cpp -C" ;;
29388 *) gl_absname_cpp="$ac_cpp" ;;
29389 esac
422889f9 29390
00f6db22
CW
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'"'
422889f9
CW
29414 else
29415 gl_cv_next_wctype_h='<'wctype.h'>'
29416 fi
29417
29418
29419fi
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; }
29441if ${gl_cv_func_iswcntrl_works+:} false; then :
29442 $as_echo_n "(cached) " >&6
29443else
29444
29445 if test "$cross_compiling" = yes; then :
00f6db22 29446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
422889f9
CW
29447/* end confdefs.h. */
29448#include <stdlib.h>
29449 #if __GNU_LIBRARY__ == 1
29450 Linux libc5 i18n is broken.
29451 #endif
29452int
29453main (void)
29454{
29455
29456 ;
29457 return 0;
29458}
29459_ACEOF
29460if ac_fn_c_try_compile "$LINENO"; then :
29461 gl_cv_func_iswcntrl_works="guessing yes"
29462else
29463 gl_cv_func_iswcntrl_works="guessing no"
29464fi
29465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29466
29467else
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
29483if ac_fn_c_try_run "$LINENO"; then :
29484 gl_cv_func_iswcntrl_works=yes
29485else
29486 gl_cv_func_iswcntrl_works=no
29487fi
29488rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29489 conftest.$ac_objext conftest.beam conftest.$ac_ext
29490fi
29491
29492
29493fi
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
29517do :
29518 ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
29519if test "x$ac_cv_func_towlower" = xyes; then :
29520 cat >>confdefs.h <<_ACEOF
29521#define HAVE_TOWLOWER 1
29522_ACEOF
29523
29524fi
29525done
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"
29543if test "x$ac_cv_have_decl_towlower" = xyes; then :
29544 ac_have_decl=1
29545else
29546 ac_have_decl=0
29547fi
29548
29549cat >>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; }
29568if ${gl_cv_type_wctype_t+:} false; then :
29569 $as_echo_n "(cached) " >&6
29570else
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
29586int
29587main (void)
29588{
29589
29590 ;
29591 return 0;
29592}
29593_ACEOF
29594if ac_fn_c_try_compile "$LINENO"; then :
29595 gl_cv_type_wctype_t=yes
29596else
29597 gl_cv_type_wctype_t=no
29598fi
29599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29600
29601fi
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; }
29610if ${gl_cv_type_wctrans_t+:} false; then :
29611 $as_echo_n "(cached) " >&6
29612else
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>
00f6db22
CW
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;
422889f9
CW
29625
29626int
29627main (void)
29628{
00f6db22 29629
422889f9
CW
29630 ;
29631 return 0;
29632}
29633_ACEOF
29634if ac_fn_c_try_compile "$LINENO"; then :
00f6db22 29635 gl_cv_type_wctrans_t=yes
422889f9 29636else
00f6db22 29637 gl_cv_type_wctrans_t=no
422889f9
CW
29638fi
29639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
422889f9 29640
422889f9 29641fi
00f6db22
CW
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
422889f9
CW
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"
29676if test "x$ac_cv_have_decl_wcwidth" = xyes; then :
29677 ac_have_decl=1
29678else
29679 ac_have_decl=0
29680fi
29681
29682cat >>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
00f6db22
CW
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; }
29693if ${gl_cv_func_wcwidth_macro+:} false; then :
29694 $as_echo_n "(cached) " >&6
29695else
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
29704if (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
29707else
29708 gl_cv_func_wcwidth_macro=no
29709fi
29710rm -f conftest*
29711
29712
29713fi
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
422889f9 29719 HAVE_WCWIDTH=1
00f6db22 29720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcwidth works reasonably in UTF-8 locales" >&5
422889f9
CW
29721$as_echo_n "checking whether wcwidth works reasonably in UTF-8 locales... " >&6; }
29722if ${gl_cv_func_wcwidth_works+:} false; then :
29723 $as_echo_n "(cached) " >&6
29724else
29725
29726 if test "$cross_compiling" = yes; then :
29727
29728 case "$host_os" in
00f6db22
CW
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";;
422889f9
CW
29732 esac
29733
29734else
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
29750extern
29751# ifdef __cplusplus
29752"C"
29753# endif
29754int wcwidth (int);
29755#endif
29756int 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;
00f6db22
CW
29767 if (wcwidth (0xFF1A) == 0)
29768 result |= 8;
422889f9
CW
29769 }
29770 return result;
29771}
29772_ACEOF
29773if ac_fn_c_try_run "$LINENO"; then :
29774 gl_cv_func_wcwidth_works=yes
29775else
29776 gl_cv_func_wcwidth_works=no
29777fi
29778rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29779 conftest.$ac_objext conftest.beam conftest.$ac_ext
29780fi
29781
29782
29783fi
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
00f6db22
CW
29805
29806
29807 :
29808
422889f9
CW
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
29828do :
29829 ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
29830if test "x$ac_cv_header_stdint_h" = xyes; then :
29831 cat >>confdefs.h <<_ACEOF
29832#define HAVE_STDINT_H 1
29833_ACEOF
29834
29835fi
29836
29837done
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
29880WARN_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"
29881EXTRA_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
29883HOST_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; }
29887if ${grub_cv_cc_w_extra_flags+:} false; then :
29888 $as_echo_n "(cached) " >&6
29889else
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
29898int
29899main (void)
29900{
29901
29902 ;
29903 return 0;
29904}
29905_ACEOF
29906if ac_fn_c_try_link "$LINENO"; then :
29907 flag=1
29908else
29909 flag=0
29910fi
29911rm -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
29919fi
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
29923HOST_CFLAGS="$HOST_CFLAGS $grub_cv_cc_w_extra_flags"
29924
29925#
29926# Check for target programs.
29927#
29928
29929# Find tools for the target.
29930if 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.
29938set 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; }
29941if ${ac_cv_prog_TARGET_CC+:} false; then :
29942 $as_echo_n "(cached) " >&6
29943else
29944 if test -n "$TARGET_CC"; then
29945 ac_cv_prog_TARGET_CC="$TARGET_CC" # Let the user override the test.
29946else
29947as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29948for as_dir in $PATH
29949do
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
29958done
29959 done
29960IFS=$as_save_IFS
29961
29962fi
29963fi
29964TARGET_CC=$ac_cv_prog_TARGET_CC
29965if test -n "$TARGET_CC"; then
29966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TARGET_CC" >&5
29967$as_echo "$TARGET_CC" >&6; }
29968else
29969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29970$as_echo "no" >&6; }
29971fi
29972
29973
29974 test -n "$TARGET_CC" && break
29975 done
29976fi
29977if test -z "$TARGET_CC"; then
29978 ac_ct_TARGET_CC=$TARGET_CC
29979 for ac_prog in gcc egcs cc
29980do
29981 # Extract the first word of "$ac_prog", so it can be a program name with args.
29982set 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; }
29985if ${ac_cv_prog_ac_ct_TARGET_CC+:} false; then :
29986 $as_echo_n "(cached) " >&6
29987else
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.
29990else
29991as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29992for as_dir in $PATH
29993do
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
30002done
30003 done
30004IFS=$as_save_IFS
30005
30006fi
30007fi
30008ac_ct_TARGET_CC=$ac_cv_prog_ac_ct_TARGET_CC
30009if 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; }
30012else
30013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30014$as_echo "no" >&6; }
30015fi
30016
30017
30018 test -n "$ac_ct_TARGET_CC" && break
30019done
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
30025yes:)
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;}
30028ac_tool_warned=yes ;;
30029esac
30030 TARGET_CC=$ac_ct_TARGET_CC
30031 fi
30032fi
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.
30036set 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; }
30039if ${ac_cv_prog_TARGET_OBJCOPY+:} false; then :
30040 $as_echo_n "(cached) " >&6
30041else
30042 if test -n "$TARGET_OBJCOPY"; then
30043 ac_cv_prog_TARGET_OBJCOPY="$TARGET_OBJCOPY" # Let the user override the test.
30044else
30045as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30046for as_dir in $PATH
30047do
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
30056done
30057 done
30058IFS=$as_save_IFS
30059
30060fi
30061fi
30062TARGET_OBJCOPY=$ac_cv_prog_TARGET_OBJCOPY
30063if test -n "$TARGET_OBJCOPY"; then
30064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TARGET_OBJCOPY" >&5
30065$as_echo "$TARGET_OBJCOPY" >&6; }
30066else
30067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30068$as_echo "no" >&6; }
30069fi
30070
30071
30072fi
30073if 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.
30076set 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; }
30079if ${ac_cv_prog_ac_ct_TARGET_OBJCOPY+:} false; then :
30080 $as_echo_n "(cached) " >&6
30081else
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.
30084else
30085as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30086for as_dir in $PATH
30087do
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
30096done
30097 done
30098IFS=$as_save_IFS
30099
30100fi
30101fi
30102ac_ct_TARGET_OBJCOPY=$ac_cv_prog_ac_ct_TARGET_OBJCOPY
30103if 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; }
30106else
30107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30108$as_echo "no" >&6; }
30109fi
30110
30111 if test "x$ac_ct_TARGET_OBJCOPY" = x; then
30112 TARGET_OBJCOPY=""
30113 else
30114 case $cross_compiling:$ac_tool_warned in
30115yes:)
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;}
30118ac_tool_warned=yes ;;
30119esac
30120 TARGET_OBJCOPY=$ac_ct_TARGET_OBJCOPY
30121 fi
30122else
30123 TARGET_OBJCOPY="$ac_cv_prog_TARGET_OBJCOPY"
30124fi
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.
30128set 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; }
30131if ${ac_cv_prog_TARGET_STRIP+:} false; then :
30132 $as_echo_n "(cached) " >&6
30133else
30134 if test -n "$TARGET_STRIP"; then
30135 ac_cv_prog_TARGET_STRIP="$TARGET_STRIP" # Let the user override the test.
30136else
30137as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30138for as_dir in $PATH
30139do
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
30148done
30149 done
30150IFS=$as_save_IFS
30151
30152fi
30153fi
30154TARGET_STRIP=$ac_cv_prog_TARGET_STRIP
30155if test -n "$TARGET_STRIP"; then
30156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TARGET_STRIP" >&5
30157$as_echo "$TARGET_STRIP" >&6; }
30158else
30159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30160$as_echo "no" >&6; }
30161fi
30162
30163
30164fi
30165if 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.
30168set 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; }
30171if ${ac_cv_prog_ac_ct_TARGET_STRIP+:} false; then :
30172 $as_echo_n "(cached) " >&6
30173else
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.
30176else
30177as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30178for as_dir in $PATH
30179do
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
30188done
30189 done
30190IFS=$as_save_IFS
30191
30192fi
30193fi
30194ac_ct_TARGET_STRIP=$ac_cv_prog_ac_ct_TARGET_STRIP
30195if 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; }
30198else
30199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30200$as_echo "no" >&6; }
30201fi
30202
30203 if test "x$ac_ct_TARGET_STRIP" = x; then
30204 TARGET_STRIP=""
30205 else
30206 case $cross_compiling:$ac_tool_warned in
30207yes:)
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;}
30210ac_tool_warned=yes ;;
30211esac
30212 TARGET_STRIP=$ac_ct_TARGET_STRIP
30213 fi
30214else
30215 TARGET_STRIP="$ac_cv_prog_TARGET_STRIP"
30216fi
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.
30220set 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; }
30223if ${ac_cv_prog_TARGET_NM+:} false; then :
30224 $as_echo_n "(cached) " >&6
30225else
30226 if test -n "$TARGET_NM"; then
30227 ac_cv_prog_TARGET_NM="$TARGET_NM" # Let the user override the test.
30228else
30229as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30230for as_dir in $PATH
30231do
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
30240done
30241 done
30242IFS=$as_save_IFS
30243
30244fi
30245fi
30246TARGET_NM=$ac_cv_prog_TARGET_NM
30247if test -n "$TARGET_NM"; then
30248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TARGET_NM" >&5
30249$as_echo "$TARGET_NM" >&6; }
30250else
30251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30252$as_echo "no" >&6; }
30253fi
30254
30255
30256fi
30257if 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.
30260set 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; }
30263if ${ac_cv_prog_ac_ct_TARGET_NM+:} false; then :
30264 $as_echo_n "(cached) " >&6
30265else
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.
30268else
30269as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30270for as_dir in $PATH
30271do
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
30280done
30281 done
30282IFS=$as_save_IFS
30283
30284fi
30285fi
30286ac_ct_TARGET_NM=$ac_cv_prog_ac_ct_TARGET_NM
30287if 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; }
30290else
30291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30292$as_echo "no" >&6; }
30293fi
30294
30295 if test "x$ac_ct_TARGET_NM" = x; then
30296 TARGET_NM=""
30297 else
30298 case $cross_compiling:$ac_tool_warned in
30299yes:)
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;}
30302ac_tool_warned=yes ;;
30303esac
30304 TARGET_NM=$ac_ct_TARGET_NM
30305 fi
30306else
30307 TARGET_NM="$ac_cv_prog_TARGET_NM"
30308fi
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.
30312set 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; }
30315if ${ac_cv_prog_TARGET_RANLIB+:} false; then :
30316 $as_echo_n "(cached) " >&6
30317else
30318 if test -n "$TARGET_RANLIB"; then
30319 ac_cv_prog_TARGET_RANLIB="$TARGET_RANLIB" # Let the user override the test.
30320else
30321as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30322for as_dir in $PATH
30323do
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
30332done
30333 done
30334IFS=$as_save_IFS
30335
30336fi
30337fi
30338TARGET_RANLIB=$ac_cv_prog_TARGET_RANLIB
30339if test -n "$TARGET_RANLIB"; then
30340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TARGET_RANLIB" >&5
30341$as_echo "$TARGET_RANLIB" >&6; }
30342else
30343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30344$as_echo "no" >&6; }
30345fi
30346
30347
30348fi
30349if 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.
30352set 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; }
30355if ${ac_cv_prog_ac_ct_TARGET_RANLIB+:} false; then :
30356 $as_echo_n "(cached) " >&6
30357else
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.
30360else
30361as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30362for as_dir in $PATH
30363do
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
30372done
30373 done
30374IFS=$as_save_IFS
30375
30376fi
30377fi
30378ac_ct_TARGET_RANLIB=$ac_cv_prog_ac_ct_TARGET_RANLIB
30379if 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; }
30382else
30383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30384$as_echo "no" >&6; }
30385fi
30386
30387 if test "x$ac_ct_TARGET_RANLIB" = x; then
30388 TARGET_RANLIB=""
30389 else
30390 case $cross_compiling:$ac_tool_warned in
30391yes:)
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;}
30394ac_tool_warned=yes ;;
30395esac
30396 TARGET_RANLIB=$ac_ct_TARGET_RANLIB
30397 fi
30398else
30399 TARGET_RANLIB="$ac_cv_prog_TARGET_RANLIB"
30400fi
30401
30402
30403 ac_tool_prefix="$tmp_ac_tool_prefix"
30404else
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.
30410set 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; }
30413if ${ac_cv_prog_TARGET_OBJCOPY+:} false; then :
30414 $as_echo_n "(cached) " >&6
30415else
30416 if test -n "$TARGET_OBJCOPY"; then
30417 ac_cv_prog_TARGET_OBJCOPY="$TARGET_OBJCOPY" # Let the user override the test.
30418else
30419as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30420for as_dir in $PATH
30421do
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
30430done
30431 done
30432IFS=$as_save_IFS
30433
30434fi
30435fi
30436TARGET_OBJCOPY=$ac_cv_prog_TARGET_OBJCOPY
30437if test -n "$TARGET_OBJCOPY"; then
30438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TARGET_OBJCOPY" >&5
30439$as_echo "$TARGET_OBJCOPY" >&6; }
30440else
30441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30442$as_echo "no" >&6; }
30443fi
30444
30445
30446fi
30447if 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.
30450set 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; }
30453if ${ac_cv_prog_ac_ct_TARGET_OBJCOPY+:} false; then :
30454 $as_echo_n "(cached) " >&6
30455else
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.
30458else
30459as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30460for as_dir in $PATH
30461do
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
30470done
30471 done
30472IFS=$as_save_IFS
30473
30474fi
30475fi
30476ac_ct_TARGET_OBJCOPY=$ac_cv_prog_ac_ct_TARGET_OBJCOPY
30477if 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; }
30480else
30481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30482$as_echo "no" >&6; }
30483fi
30484
30485 if test "x$ac_ct_TARGET_OBJCOPY" = x; then
30486 TARGET_OBJCOPY=""
30487 else
30488 case $cross_compiling:$ac_tool_warned in
30489yes:)
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;}
30492ac_tool_warned=yes ;;
30493esac
30494 TARGET_OBJCOPY=$ac_ct_TARGET_OBJCOPY
30495 fi
30496else
30497 TARGET_OBJCOPY="$ac_cv_prog_TARGET_OBJCOPY"
30498fi
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.
30502set 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; }
30505if ${ac_cv_prog_TARGET_STRIP+:} false; then :
30506 $as_echo_n "(cached) " >&6
30507else
30508 if test -n "$TARGET_STRIP"; then
30509 ac_cv_prog_TARGET_STRIP="$TARGET_STRIP" # Let the user override the test.
30510else
30511as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30512for as_dir in $PATH
30513do
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
30522done
30523 done
30524IFS=$as_save_IFS
30525
30526fi
30527fi
30528TARGET_STRIP=$ac_cv_prog_TARGET_STRIP
30529if test -n "$TARGET_STRIP"; then
30530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TARGET_STRIP" >&5
30531$as_echo "$TARGET_STRIP" >&6; }
30532else
30533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30534$as_echo "no" >&6; }
30535fi
30536
30537
30538fi
30539if 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.
30542set 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; }
30545if ${ac_cv_prog_ac_ct_TARGET_STRIP+:} false; then :
30546 $as_echo_n "(cached) " >&6
30547else
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.
30550else
30551as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30552for as_dir in $PATH
30553do
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
30562done
30563 done
30564IFS=$as_save_IFS
30565
30566fi
30567fi
30568ac_ct_TARGET_STRIP=$ac_cv_prog_ac_ct_TARGET_STRIP
30569if 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; }
30572else
30573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30574$as_echo "no" >&6; }
30575fi
30576
30577 if test "x$ac_ct_TARGET_STRIP" = x; then
30578 TARGET_STRIP=""
30579 else
30580 case $cross_compiling:$ac_tool_warned in
30581yes:)
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;}
30584ac_tool_warned=yes ;;
30585esac
30586 TARGET_STRIP=$ac_ct_TARGET_STRIP
30587 fi
30588else
30589 TARGET_STRIP="$ac_cv_prog_TARGET_STRIP"
30590fi
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.
30594set 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; }
30597if ${ac_cv_prog_TARGET_NM+:} false; then :
30598 $as_echo_n "(cached) " >&6
30599else
30600 if test -n "$TARGET_NM"; then
30601 ac_cv_prog_TARGET_NM="$TARGET_NM" # Let the user override the test.
30602else
30603as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30604for as_dir in $PATH
30605do
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
30614done
30615 done
30616IFS=$as_save_IFS
30617
30618fi
30619fi
30620TARGET_NM=$ac_cv_prog_TARGET_NM
30621if test -n "$TARGET_NM"; then
30622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TARGET_NM" >&5
30623$as_echo "$TARGET_NM" >&6; }
30624else
30625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30626$as_echo "no" >&6; }
30627fi
30628
30629
30630fi
30631if 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.
30634set 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; }
30637if ${ac_cv_prog_ac_ct_TARGET_NM+:} false; then :
30638 $as_echo_n "(cached) " >&6
30639else
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.
30642else
30643as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30644for as_dir in $PATH
30645do
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
30654done
30655 done
30656IFS=$as_save_IFS
30657
30658fi
30659fi
30660ac_ct_TARGET_NM=$ac_cv_prog_ac_ct_TARGET_NM
30661if 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; }
30664else
30665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30666$as_echo "no" >&6; }
30667fi
30668
30669 if test "x$ac_ct_TARGET_NM" = x; then
30670 TARGET_NM=""
30671 else
30672 case $cross_compiling:$ac_tool_warned in
30673yes:)
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;}
30676ac_tool_warned=yes ;;
30677esac
30678 TARGET_NM=$ac_ct_TARGET_NM
30679 fi
30680else
30681 TARGET_NM="$ac_cv_prog_TARGET_NM"
30682fi
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.
30686set 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; }
30689if ${ac_cv_prog_TARGET_RANLIB+:} false; then :
30690 $as_echo_n "(cached) " >&6
30691else
30692 if test -n "$TARGET_RANLIB"; then
30693 ac_cv_prog_TARGET_RANLIB="$TARGET_RANLIB" # Let the user override the test.
30694else
30695as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30696for as_dir in $PATH
30697do
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
30706done
30707 done
30708IFS=$as_save_IFS
30709
30710fi
30711fi
30712TARGET_RANLIB=$ac_cv_prog_TARGET_RANLIB
30713if test -n "$TARGET_RANLIB"; then
30714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TARGET_RANLIB" >&5
30715$as_echo "$TARGET_RANLIB" >&6; }
30716else
30717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30718$as_echo "no" >&6; }
30719fi
30720
30721
30722fi
30723if 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.
30726set 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; }
30729if ${ac_cv_prog_ac_ct_TARGET_RANLIB+:} false; then :
30730 $as_echo_n "(cached) " >&6
30731else
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.
30734else
30735as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30736for as_dir in $PATH
30737do
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
30746done
30747 done
30748IFS=$as_save_IFS
30749
30750fi
30751fi
30752ac_ct_TARGET_RANLIB=$ac_cv_prog_ac_ct_TARGET_RANLIB
30753if 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; }
30756else
30757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30758$as_echo "no" >&6; }
30759fi
30760
30761 if test "x$ac_ct_TARGET_RANLIB" = x; then
30762 TARGET_RANLIB=""
30763 else
30764 case $cross_compiling:$ac_tool_warned in
30765yes:)
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;}
30768ac_tool_warned=yes ;;
30769esac
30770 TARGET_RANLIB=$ac_ct_TARGET_RANLIB
30771 fi
30772else
30773 TARGET_RANLIB="$ac_cv_prog_TARGET_RANLIB"
30774fi
30775
30776fi
30777
30778
30779
30780
30781
30782
30783
30784
30785
30786
30787
30788
30789# Test the C compiler for the target environment.
30790tmp_CC="$CC"
30791tmp_CFLAGS="$CFLAGS"
30792tmp_LDFLAGS="$LDFLAGS"
30793tmp_CPPFLAGS="$CPPFLAGS"
30794tmp_LIBS="$LIBS"
30795CC="$TARGET_CC"
30796CFLAGS="$TARGET_CFLAGS"
30797CPPFLAGS="$TARGET_CPPFLAGS"
30798LDFLAGS="$TARGET_LDFLAGS"
30799LIBS=""
30800
21f95442
CW
30801if 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"
30808fi
30809
30810if 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"
30817fi
30818
422889f9
CW
30819# debug flags.
30820TARGET_CFLAGS="$TARGET_CFLAGS $WARN_FLAGS -g -Wredundant-decls -Wmissing-prototypes -Wmissing-declarations"
30821TARGET_CCASFLAGS="$TARGET_CCASFLAGS -g"
30822
30823if test "x$target_cpu" != xi386 && test "x$target_cpu" != xx86_64; then
30824TARGET_CFLAGS="$TARGET_CFLAGS -Wcast-align"
30825fi
30826
30827TARGET_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; }
30831if ${grub_cv_target_cc_w_extra_flags+:} false; then :
30832 $as_echo_n "(cached) " >&6
30833else
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
30843asm (".globl start; start:");
30844void __main (void);
30845void __main (void) {}
30846int main (void);
30847
30848int
30849main (void)
30850{
30851
30852 ;
30853 return 0;
30854}
30855_ACEOF
30856if ac_fn_c_try_link "$LINENO"; then :
30857 flag=1
30858else
30859 flag=0
30860fi
30861rm -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
30868fi
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
30872TARGET_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; }
30876if ${grub_cv_cc_target_clang+:} false; then :
30877 $as_echo_n "(cached) " >&6
30878else
30879
30880CFLAGS="$TARGET_CFLAGS"
30881cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30882/* end confdefs.h. */
30883
30884int
30885main (void)
30886{
30887
30888#ifdef __clang__
30889#error "is clang"
30890#endif
30891
30892 ;
30893 return 0;
30894}
30895_ACEOF
30896if ac_fn_c_try_compile "$LINENO"; then :
30897 grub_cv_cc_target_clang=no
30898else
30899 grub_cv_cc_target_clang=yes
30900fi
30901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30902fi
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
30906if 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; }
30909if ${grub_cv_target_cc_big_endian+:} false; then :
30910 $as_echo_n "(cached) " >&6
30911else
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
30927asm (".globl start; start:");
30928asm (".globl _start; _start:");
30929asm (".globl __start; __start:");
30930void __main (void);
30931void __main (void) {}
30932int main (void);
30933
30934int
30935main (void)
30936{
30937
30938 ;
30939 return 0;
30940}
30941_ACEOF
30942if ac_fn_c_try_link "$LINENO"; then :
30943 grub_cv_target_cc_big_endian="$cand"
30944fi
30945rm -f core conftest.err conftest.$ac_objext \
30946 conftest$ac_exeext conftest.$ac_ext
30947 done
30948
30949fi
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"
30963elif 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; }
30966if ${grub_cv_target_cc_little_endian+:} false; then :
30967 $as_echo_n "(cached) " >&6
30968else
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
30984asm (".globl start; start:");
30985asm (".globl _start; _start:");
30986asm (".globl __start; __start:");
30987void __main (void);
30988void __main (void) {}
30989int main (void);
30990
30991int
30992main (void)
30993{
30994
30995 ;
30996 return 0;
30997}
30998_ACEOF
30999if ac_fn_c_try_link "$LINENO"; then :
31000 grub_cv_target_cc_little_endian="$cand"
31001fi
31002rm -f core conftest.err conftest.$ac_objext \
31003 conftest$ac_exeext conftest.$ac_ext
31004 done
31005
31006fi
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"
31020fi
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.
31025if 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; }
31028if ${grub_cv_target_cc_mips_o32_abi+:} false; then :
31029 $as_echo_n "(cached) " >&6
31030else
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
31044asm (".globl start; start:");
31045asm (".globl _start; _start:");
31046asm (".globl __start; __start:");
31047void __main (void);
31048void __main (void) {}
31049int main (void);
31050
31051int
31052main (void)
31053{
31054
31055 ;
31056 return 0;
31057}
31058_ACEOF
31059if ac_fn_c_try_link "$LINENO"; then :
31060 grub_cv_target_cc_mips_o32_abi="$arg"
31061fi
31062rm -f core conftest.err conftest.$ac_objext \
31063 conftest$ac_exeext conftest.$ac_ext
31064 done
31065
31066fi
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"
31076fi
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; }
31080if ${grub_cv_cc_target_asm_compile+:} false; then :
31081 $as_echo_n "(cached) " >&6
31082else
31083
31084test_program=
31085case "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 ;;
31098esac
31099if test x"$test_program" = x ; then
31100 grub_cv_cc_target_asm_compile=
31101else
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
31115fi
31116
31117fi
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
31121TARGET_CCASFLAGS="$TARGET_CCASFLAGS $grub_cv_cc_target_asm_compile"
31122
31123if test "x$target_cpu" = xi386 && test "x$platform" != xemu; then
31124 TARGET_CFLAGS="$TARGET_CFLAGS -march=i386"
31125fi
31126
422889f9
CW
31127if 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"
31129fi
31130
31131# on mips redirect cache flushing function to non-existant one.
31132if 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; }
31135if ${grub_cv_cc_mflush_func+:} false; then :
31136 $as_echo_n "(cached) " >&6
31137else
31138
31139 CFLAGS="$TARGET_CFLAGS -mflush-func=grub_red_herring -Werror"
31140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31141/* end confdefs.h. */
31142
31143int
31144main (void)
31145{
31146
31147 ;
31148 return 0;
31149}
31150_ACEOF
31151if ac_fn_c_try_compile "$LINENO"; then :
31152 grub_cv_cc_mflush_func=yes
31153else
31154 grub_cv_cc_mflush_func=no
31155fi
31156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31157
31158fi
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
31165fi
31166
31167
31168# Force no alignment to save space on i386.
31169if 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; }
31172if ${grub_cv_cc_falign_loop+:} false; then :
31173 $as_echo_n "(cached) " >&6
31174else
31175
31176 CFLAGS="$TARGET_CFLAGS -falign-loops=1 -Werror"
31177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31178/* end confdefs.h. */
31179
31180int
31181main (void)
31182{
31183
31184 ;
31185 return 0;
31186}
31187_ACEOF
31188if ac_fn_c_try_compile "$LINENO"; then :
31189 grub_cv_cc_falign_loop=yes
31190else
31191 grub_cv_cc_falign_loop=no
31192fi
31193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31194
31195fi
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; }
31201if ${grub_cv_cc_malign_loop+:} false; then :
31202 $as_echo_n "(cached) " >&6
31203else
31204
31205 CFLAGS="$TARGET_CFLAGS -malign-loops=1 -Werror"
31206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31207/* end confdefs.h. */
31208
31209int
31210main (void)
31211{
31212
31213 ;
31214 return 0;
31215}
31216_ACEOF
31217if ac_fn_c_try_compile "$LINENO"; then :
31218 grub_cv_cc_malign_loop=yes
31219else
31220 grub_cv_cc_malign_loop=no
31221fi
31222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31223
31224fi
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
31233fi
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; }
31237if ${grub_cv_cc_freg_struct_return+:} false; then :
31238 $as_echo_n "(cached) " >&6
31239else
31240
31241 CFLAGS="$TARGET_CFLAGS -freg-struct-return -Werror"
31242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31243/* end confdefs.h. */
31244
31245int
31246main (void)
31247{
31248
31249 ;
31250 return 0;
31251}
31252_ACEOF
31253if ac_fn_c_try_compile "$LINENO"; then :
31254 grub_cv_cc_freg_struct_return=yes
31255else
31256 grub_cv_cc_freg_struct_return=no
31257fi
31258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31259
31260fi
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
31264if test "x$grub_cv_cc_freg_struct_return" = xyes; then
31265 TARGET_CFLAGS="$TARGET_CFLAGS -freg-struct-return"
31266fi
31267
31268if ( 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"
31272fi
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.
31278if 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; }
31281if ${grub_cv_target_cc_soft_float+:} false; then :
31282 $as_echo_n "(cached) " >&6
31283else
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
31291int
31292main (void)
31293{
31294
31295 ;
31296 return 0;
31297}
31298_ACEOF
31299if ac_fn_c_try_compile "$LINENO"; then :
31300 grub_cv_target_cc_soft_float="-mgeneral-regs-only"
31301fi
00f6db22
CW
31302rm -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
31309int
31310main (void)
31311{
31312
31313 ;
31314 return 0;
31315}
31316_ACEOF
31317if ac_fn_c_try_compile "$LINENO"; then :
31318 grub_cv_target_cc_soft_float="-march=rv32imac -mabi=ilp32"
31319fi
31320rm -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
31327int
31328main (void)
31329{
31330
31331 ;
31332 return 0;
31333}
31334_ACEOF
31335if ac_fn_c_try_compile "$LINENO"; then :
31336 grub_cv_target_cc_soft_float="-march=rv64imac -mabi=lp64"
31337fi
422889f9
CW
31338rm -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
31345int
31346main (void)
31347{
31348
31349 ;
31350 return 0;
31351}
31352_ACEOF
31353if ac_fn_c_try_compile "$LINENO"; then :
31354 grub_cv_target_cc_soft_float="-mno-inline-float-divide -mno-inline-sqrt"
31355fi
21f95442
CW
31356rm -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
31363int
31364main (void)
31365{
31366
31367 ;
31368 return 0;
31369}
31370_ACEOF
31371if ac_fn_c_try_compile "$LINENO"; then :
31372 grub_cv_target_cc_soft_float="-m4-nofpu"
31373fi
422889f9
CW
31374rm -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
31386int
31387main (void)
31388{
31389
31390 ;
31391 return 0;
31392}
31393_ACEOF
31394if ac_fn_c_try_compile "$LINENO"; then :
31395 grub_cv_target_cc_soft_float="$cand"
31396fi
31397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31398 done
31399
31400fi
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
31419fi
31420
31421if 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; }
31424if ${grub_cv_target_cc_mno_app_regs+:} false; then :
31425 $as_echo_n "(cached) " >&6
31426else
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
31439int
31440main (void)
31441{
31442
31443 ;
31444 return 0;
31445}
31446_ACEOF
31447if ac_fn_c_try_compile "$LINENO"; then :
31448 grub_cv_target_cc_mno_app_regs="$cand"
31449fi
31450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31451 done
31452
31453fi
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; }
31469if ${grub_cv_target_cc_mno_relax+:} false; then :
31470 $as_echo_n "(cached) " >&6
31471else
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
31488int
31489main (void)
31490{
31491
31492 ;
31493 return 0;
31494}
31495_ACEOF
31496if ac_fn_c_try_link "$LINENO"; then :
31497 grub_cv_target_cc_mno_relax="$cand"
31498fi
31499rm -f core conftest.err conftest.$ac_objext \
31500 conftest$ac_exeext conftest.$ac_ext
31501 done
31502
31503fi
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"
31513fi
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; }
31521if ${grub_cv_cc_fno_dwarf2_cfi_asm+:} false; then :
31522 $as_echo_n "(cached) " >&6
31523else
31524
31525 CFLAGS="$TARGET_CFLAGS -fno-dwarf2-cfi-asm"
31526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31527/* end confdefs.h. */
31528
31529int
31530main (void)
31531{
31532
31533 ;
31534 return 0;
31535}
31536_ACEOF
31537if ac_fn_c_try_compile "$LINENO"; then :
31538 grub_cv_cc_fno_dwarf2_cfi_asm=yes
31539else
31540 grub_cv_cc_fno_dwarf2_cfi_asm=no
31541fi
31542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31543
31544fi
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
31548if test "x$grub_cv_cc_fno_dwarf2_cfi_asm" = xyes; then
31549 TARGET_CFLAGS="$TARGET_CFLAGS -fno-dwarf2-cfi-asm"
31550fi
31551
31552if 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; }
31555if ${grub_cv_cc_no_reorder_functions+:} false; then :
31556 $as_echo_n "(cached) " >&6
31557else
31558
31559 CFLAGS="$TARGET_CFLAGS -fno-reorder-functions"
31560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31561/* end confdefs.h. */
31562
31563int
31564main (void)
31565{
31566
31567 ;
31568 return 0;
31569}
31570_ACEOF
31571if ac_fn_c_try_compile "$LINENO"; then :
31572 grub_cv_cc_no_reorder_functions=yes
31573else
31574 grub_cv_cc_no_reorder_functions=no
31575fi
31576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31577
31578fi
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; }
31581fi
31582
31583if test x"$target_os" = xcygwin && test "x$grub_cv_cc_no_reorder_functions" = xyes; then
31584 TARGET_CFLAGS="$TARGET_CFLAGS -fno-reorder-functions"
31585fi
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; }
31589if ${grub_cv_cc_mno_stack_arg_probe+:} false; then :
31590 $as_echo_n "(cached) " >&6
31591else
31592
31593 CFLAGS="$TARGET_CFLAGS -mno-stack-arg-probe"
31594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31595/* end confdefs.h. */
31596
31597int
31598main (void)
31599{
31600
31601 ;
31602 return 0;
31603}
31604_ACEOF
31605if ac_fn_c_try_compile "$LINENO"; then :
31606 grub_cv_cc_mno_stack_arg_probe=yes
31607else
31608 grub_cv_cc_mno_stack_arg_probe=no
31609fi
31610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31611
31612fi
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
31616if test "x$grub_cv_cc_mno_stack_arg_probe" = xyes; then
31617 TARGET_CFLAGS="$TARGET_CFLAGS -mno-stack-arg-probe"
31618fi
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; }
31627if ${grub_cv_cc_fno_asynchronous_unwind_tables+:} false; then :
31628 $as_echo_n "(cached) " >&6
31629else
31630
31631 CFLAGS="$TARGET_CFLAGS -fno-asynchronous-unwind-tables"
31632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31633/* end confdefs.h. */
31634
31635int
31636main (void)
31637{
31638
31639 ;
31640 return 0;
31641}
31642_ACEOF
31643if ac_fn_c_try_compile "$LINENO"; then :
31644 grub_cv_cc_fno_asynchronous_unwind_tables=yes
31645else
31646 grub_cv_cc_fno_asynchronous_unwind_tables=no
31647fi
31648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31649
31650fi
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
31654if test "x$grub_cv_cc_fno_asynchronous_unwind_tables" = xyes; then
31655 TARGET_CFLAGS="$TARGET_CFLAGS -fno-asynchronous-unwind-tables"
31656fi
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; }
31660if ${grub_cv_cc_fno_unwind_tables+:} false; then :
31661 $as_echo_n "(cached) " >&6
31662else
31663
31664 CFLAGS="$TARGET_CFLAGS -fno-unwind-tables"
31665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31666/* end confdefs.h. */
31667
31668int
31669main (void)
31670{
31671
31672 ;
31673 return 0;
31674}
31675_ACEOF
31676if ac_fn_c_try_compile "$LINENO"; then :
31677 grub_cv_cc_fno_unwind_tables=yes
31678else
31679 grub_cv_cc_fno_unwind_tables=no
31680fi
31681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31682
31683fi
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
31687if test "x$grub_cv_cc_fno_unwind_tables" = xyes; then
31688 TARGET_CFLAGS="$TARGET_CFLAGS -fno-unwind-tables"
31689fi
31690
21f95442
CW
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; }
31694if ${grub_cv_cc_fno_ident+:} false; then :
31695 $as_echo_n "(cached) " >&6
31696else
31697
31698 CFLAGS="$TARGET_CFLAGS -fno-ident"
31699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31700/* end confdefs.h. */
31701
31702int
31703main (void)
31704{
31705
31706 ;
31707 return 0;
31708}
31709_ACEOF
31710if ac_fn_c_try_compile "$LINENO"; then :
31711 grub_cv_cc_fno_ident=yes
31712else
31713 grub_cv_cc_fno_ident=no
31714fi
31715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31716
31717fi
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
31721if test "x$grub_cv_cc_fno_ident" = xyes; then
31722 TARGET_CFLAGS="$TARGET_CFLAGS -fno-ident"
31723fi
422889f9
CW
31724
31725CFLAGS="$TARGET_CFLAGS"
31726
31727
31728if 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
31748elif 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; }
31751if ${grub_cv_target_cc_link_format+:} false; then :
31752 $as_echo_n "(cached) " >&6
31753else
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
31774int
31775main (void)
31776{
31777
31778 ;
31779 return 0;
31780}
31781_ACEOF
31782if ac_fn_c_try_link "$LINENO"; then :
31783 flag=1
31784else
31785 flag=0
31786fi
31787rm -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
31794fi
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
31807fi
31808
31809if 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.
31812set 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; }
31815if ${ac_cv_prog_TARGET_OBJCONV+:} false; then :
31816 $as_echo_n "(cached) " >&6
31817else
31818 if test -n "$TARGET_OBJCONV"; then
31819 ac_cv_prog_TARGET_OBJCONV="$TARGET_OBJCONV" # Let the user override the test.
31820else
31821as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31822for as_dir in $PATH
31823do
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
31832done
31833 done
31834IFS=$as_save_IFS
31835
31836fi
31837fi
31838TARGET_OBJCONV=$ac_cv_prog_TARGET_OBJCONV
31839if test -n "$TARGET_OBJCONV"; then
31840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TARGET_OBJCONV" >&5
31841$as_echo "$TARGET_OBJCONV" >&6; }
31842else
31843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31844$as_echo "no" >&6; }
31845fi
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.
31850set 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; }
31853if ${ac_cv_prog_TARGET_OBJCONV+:} false; then :
31854 $as_echo_n "(cached) " >&6
31855else
31856 if test -n "$TARGET_OBJCONV"; then
31857 ac_cv_prog_TARGET_OBJCONV="$TARGET_OBJCONV" # Let the user override the test.
31858else
31859as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31860for as_dir in .
31861do
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
31870done
31871 done
31872IFS=$as_save_IFS
31873
31874fi
31875fi
31876TARGET_OBJCONV=$ac_cv_prog_TARGET_OBJCONV
31877if test -n "$TARGET_OBJCONV"; then
31878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TARGET_OBJCONV" >&5
31879$as_echo "$TARGET_OBJCONV" >&6; }
31880else
31881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31882$as_echo "no" >&6; }
31883fi
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=""
31896elif 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=
31904else
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=
31912fi
31913
31914CFLAGS="$TARGET_CFLAGS"
31915
31916# Check whether --enable-efiemu was given.
31917if test "${enable_efiemu+set}" = set; then :
31918 enableval=$enable_efiemu;
31919fi
31920
31921if test x"$enable_efiemu" = xno ; then
31922 efiemu_excuse="explicitly disabled"
31923fi
31924
31925if 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"
31927fi
31928if test x"$target_cpu" != xi386 ; then
31929 efiemu_excuse="only available on i386"
31930fi
31931if test x"$platform" = xefi ; then
31932 efiemu_excuse="not available on efi"
31933fi
31934
31935if 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; }
31938if ${grub_cv_cc_efiemu+:} false; then :
31939 $as_echo_n "(cached) " >&6
31940else
31941
31942 CFLAGS="-m64 -nostdlib -O2 -mcmodel=large -mno-red-zone"
31943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31944/* end confdefs.h. */
31945
31946int
31947main (void)
31948{
31949
31950 ;
31951 return 0;
31952}
31953_ACEOF
31954if ac_fn_c_try_compile "$LINENO"; then :
31955 grub_cv_cc_efiemu=yes
31956else
31957 grub_cv_cc_efiemu=no
31958fi
31959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31960
31961fi
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
31967fi
31968if 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; }
31971if ${grub_cv_target_cc_efiemu64_link_format+:} false; then :
31972 $as_echo_n "(cached) " >&6
31973else
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
31988int
31989main (void)
31990{
31991
31992 ;
31993 return 0;
31994}
31995_ACEOF
31996if ac_fn_c_try_link "$LINENO"; then :
31997 flag=1
31998else
31999 flag=0
32000fi
32001rm -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
32008fi
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
32016fi
32017if 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
32019fi
32020if test x"$efiemu_excuse" = x ; then
32021enable_efiemu=yes
32022else
32023enable_efiemu=no
32024fi
32025
32026
32027
32028CFLAGS="$TARGET_CFLAGS"
32029
32030
32031
32032
32033LDFLAGS="$TARGET_LDFLAGS"
32034
00f6db22 32035if test "$target_cpu" = x86_64 || test "$target_cpu" = sparc64 || test "$target_cpu" = riscv64 ; then
422889f9
CW
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; }
32039if ${grub_cv_cc_mcmodel+:} false; then :
32040 $as_echo_n "(cached) " >&6
32041else
32042
32043 CFLAGS="$TARGET_CFLAGS -mcmodel=large"
32044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32045/* end confdefs.h. */
32046
32047int
32048main (void)
32049{
32050
32051 ;
32052 return 0;
32053}
32054_ACEOF
32055if ac_fn_c_try_compile "$LINENO"; then :
32056 grub_cv_cc_mcmodel=yes
32057else
32058 grub_cv_cc_mcmodel=no
32059fi
32060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32061
32062fi
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"
00f6db22 32067 elif test "$target_cpu" = sparc64 || test "$target_cpu" = riscv64; then
422889f9
CW
32068 TARGET_CFLAGS="$TARGET_CFLAGS -mcmodel=medany"
32069 fi
32070fi
32071
32072if 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; }
32076if ${grub_cv_cc_no_red_zone+:} false; then :
32077 $as_echo_n "(cached) " >&6
32078else
32079
32080 CFLAGS="$TARGET_CFLAGS -mno-red-zone"
32081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32082/* end confdefs.h. */
32083
32084int
32085main (void)
32086{
32087
32088 ;
32089 return 0;
32090}
32091_ACEOF
32092if ac_fn_c_try_compile "$LINENO"; then :
32093 grub_cv_cc_no_red_zone=yes
32094else
32095 grub_cv_cc_no_red_zone=no
32096fi
32097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32098
32099fi
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"
32107fi
32108
32109if test "x$target_cpu" = xarm; then
0992ffba
CW
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; }
32112if ${grub_cv_target_cc_mno_movt+:} false; then :
422889f9
CW
32113 $as_echo_n "(cached) " >&6
32114else
32115
0992ffba
CW
32116 grub_cv_target_cc_mno_movt=no
32117 for cand in "-mno-movt" \
21f95442
CW
32118 "-mllvm -arm-use-movt=0" \
32119 "-mword-relocations"; do
0992ffba
CW
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
422889f9
CW
32126/* end confdefs.h. */
32127
32128int
32129main (void)
32130{
32131
32132 ;
32133 return 0;
32134}
32135_ACEOF
32136if ac_fn_c_try_compile "$LINENO"; then :
0992ffba 32137 grub_cv_target_cc_mno_movt="$cand"
422889f9
CW
32138fi
32139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
0992ffba 32140 done
422889f9
CW
32141
32142fi
0992ffba
CW
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"
422889f9
CW
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; }
32152if ${grub_cv_cc_mthumb_interwork+:} false; then :
32153 $as_echo_n "(cached) " >&6
32154else
32155
32156 CFLAGS="$TARGET_CFLAGS -mthumb-interwork -Werror"
32157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32158/* end confdefs.h. */
32159
32160int
32161main (void)
32162{
32163
32164 ;
32165 return 0;
32166}
32167_ACEOF
32168if ac_fn_c_try_compile "$LINENO"; then :
32169 grub_cv_cc_mthumb_interwork=yes
32170else
32171 grub_cv_cc_mthumb_interwork=no
32172fi
32173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32174
32175fi
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
32184fi
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; }
32188if ${grub_cv_target_cc_qn+:} false; then :
32189 $as_echo_n "(cached) " >&6
32190else
32191
00f6db22 32192 CFLAGS="$TARGET_CFLAGS -Qn -Qunused-arguments -Werror"
422889f9
CW
32193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32194/* end confdefs.h. */
32195
32196int
32197main (void)
32198{
32199
32200 ;
32201 return 0;
32202}
32203_ACEOF
32204if ac_fn_c_try_compile "$LINENO"; then :
32205 grub_cv_target_cc_qn=yes
32206else
32207 grub_cv_target_cc_qn=no
32208fi
32209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32210fi
32211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $grub_cv_target_cc_qn" >&5
32212$as_echo "$grub_cv_target_cc_qn" >&6; }
32213if test "x$grub_cv_target_cc_qn" = xyes; then
00f6db22 32214 TARGET_CFLAGS="$TARGET_CFLAGS -Qn -Qunused-arguments"
422889f9
CW
32215fi
32216
32217#
32218# Compiler features.
32219#
32220
32221CFLAGS="$TARGET_CFLAGS"
32222
32223# Position independent executable.
32224
32225# Position independent executable.
32226pie_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?
32230cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32231/* end confdefs.h. */
32232
32233#ifdef __PIE__
32234int 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?
32245if 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
32250else
32251 pie_possible=no
32252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32253$as_echo "no" >&6; }
32254fi
32255
0992ffba
CW
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; }
32258if ${grub_cv_cc_ld_no_pie+:} false; then :
32259 $as_echo_n "(cached) " >&6
32260else
32261 save_LDFLAGS="$LDFLAGS"
32262LDFLAGS="$LDFLAGS -no-pie -nostdlib -Werror"
32263cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32264/* end confdefs.h. */
32265
32266int
32267main (void)
32268{
32269
32270 ;
32271 return 0;
32272}
32273_ACEOF
32274if ac_fn_c_try_link "$LINENO"; then :
32275 grub_cv_cc_ld_no_pie=yes
32276else
32277 grub_cv_cc_ld_no_pie=no
32278fi
32279rm -f core conftest.err conftest.$ac_objext \
32280 conftest$ac_exeext conftest.$ac_ext
32281LDFLAGS="$save_LDFLAGS"
32282
32283fi
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; }
32287nopie_possible=no
32288if test "x$grub_cv_cc_ld_no_pie" = xyes ; then
32289 nopie_possible=yes
32290fi
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; }
32294if ${grub_cv_cc_ld_no_pie_oneword+:} false; then :
32295 $as_echo_n "(cached) " >&6
32296else
32297 save_LDFLAGS="$LDFLAGS"
32298LDFLAGS="$LDFLAGS -nopie -nostdlib -Werror"
32299cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32300/* end confdefs.h. */
32301
32302int
32303main (void)
32304{
32305
32306 ;
32307 return 0;
32308}
32309_ACEOF
32310if ac_fn_c_try_link "$LINENO"; then :
32311 grub_cv_cc_ld_no_pie_oneword=yes
32312else
32313 grub_cv_cc_ld_no_pie_oneword=no
32314fi
32315rm -f core conftest.err conftest.$ac_objext \
32316 conftest$ac_exeext conftest.$ac_ext
32317LDFLAGS="$save_LDFLAGS"
32318
32319fi
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; }
32323nopie_oneword_possible=no
32324if test "x$grub_cv_cc_ld_no_pie_oneword" = xyes ; then
32325 nopie_oneword_possible=yes
32326fi
32327
32328
32329# Position independent executable.
32330link_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; }
32333cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32334/* end confdefs.h. */
32335
32336_ACEOF
32337
32338if 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
32343else
32344 link_nopie_needed=yes
32345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32346$as_echo "yes" >&6; }
32347fi
32348
422889f9 32349# Need that, because some distributions ship compilers that include
0992ffba 32350# `-fPIE' or '-fpie' and '-pie' in the default specs.
422889f9 32351if [ x"$pie_possible" = xyes ]; then
0992ffba 32352 TARGET_CFLAGS="$TARGET_CFLAGS -fno-PIE -fno-pie"
21f95442 32353 TARGET_CCASFLAGS="$TARGET_CCASFLAGS -fno-PIE -fno-pie"
0992ffba
CW
32354fi
32355
32356if [ 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
422889f9
CW
32363fi
32364
32365CFLAGS="$TARGET_CFLAGS"
0992ffba 32366LDFLAGS="$TARGET_LDFLAGS"
422889f9
CW
32367
32368# Position independent executable.
32369
32370# Position independent executable.
32371pic_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?
32375cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32376/* end confdefs.h. */
32377
32378#ifdef __PIC__
32379int 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?
32390if 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
32395else
32396 pic_possible=no
32397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32398$as_echo "no" >&6; }
32399fi
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.
0992ffba
CW
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.
422889f9
CW
32409# Since default varies across dictributions use either -fPIC or -fno-PIC
32410# explicitly.
0992ffba 32411if ( test x$target_cpu = xmips || test x$target_cpu = xmipsel || test x$target_cpu = xarm64 ) && test "x$grub_cv_cc_target_clang" = xyes ; then
422889f9
CW
32412 TARGET_CFLAGS="$TARGET_CFLAGS -fPIC"
32413elif [ x"$pic_possible" = xyes ]; then
32414 TARGET_CFLAGS="$TARGET_CFLAGS -fno-PIC"
32415fi
32416
32417CFLAGS="$TARGET_CFLAGS"
32418
21f95442 32419# Stack smashing protector.
422889f9 32420
21f95442 32421# Stack smashing protector.
422889f9
CW
32422ssp_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?
32426cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32427/* end confdefs.h. */
32428
32429void 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?
32434if 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
32439else
32440 ssp_possible=no
32441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32442$as_echo "no" >&6; }
32443fi
21f95442
CW
32444# Strong stack smashing protector.
32445ssp_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?
32449cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32450/* end confdefs.h. */
422889f9 32451
21f95442
CW
32452void 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?
32457if 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
32462else
32463 ssp_strong_possible=no
32464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32465$as_echo "no" >&6; }
32466fi
32467# Global stack smashing protector.
32468ssp_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?
32472cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32473/* end confdefs.h. */
32474
32475void 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?
32480if 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
32485else
32486 ssp_global_possible=no
32487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32488$as_echo "no" >&6; }
32489fi
32490
32491# Check whether --enable-stack-protector was given.
32492if test "${enable_stack_protector+set}" = set; then :
32493 enableval=$enable_stack_protector;
32494else
32495 enable_stack_protector=no
32496fi
32497
32498if 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
32504elif test "x$platform" != xefi; then
32505 as_fn_error $? "--enable-stack-protector is only supported on EFI platforms" "$LINENO" 5
32506elif 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
32508else
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"
422889f9
CW
32526fi
32527
32528CFLAGS="$TARGET_CFLAGS"
32529
32530
32531# Smashing stack arg probe.
32532sap_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; }
32535cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32536/* end confdefs.h. */
32537
32538void foo (void) { volatile char a[8]; a[3]; }
32539
32540_ACEOF
32541if 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
32546else
32547 sap_possible=no
32548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32549$as_echo "no" >&6; }
32550fi
32551
32552# Cygwin's GCC uses alloca() to probe the stackframe on static
32553# stack allocations above some threshold.
32554if test x"$sap_possible" = xyes; then
32555 TARGET_CFLAGS="$TARGET_CFLAGS -mno-stack-arg-probe"
32556fi
32557
32558CFLAGS="$TARGET_CFLAGS"
32559
32560# -mno-unaligned-access -mstrict-align
32561if 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; }
32564if ${grub_cv_target_cc_strict_align+:} false; then :
32565 $as_echo_n "(cached) " >&6
32566else
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
32575int
32576main (void)
32577{
32578
32579 ;
32580 return 0;
32581}
32582_ACEOF
32583if ac_fn_c_try_compile "$LINENO"; then :
32584 flag=1
32585else
32586 flag=0
32587fi
32588rm -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
32594fi
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; }
32604if ${grub_cv_cc_target_emits_unaligned+:} false; then :
32605 $as_echo_n "(cached) " >&6
32606else
32607 CFLAGS="$TARGET_CFLAGS"
32608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32609/* end confdefs.h. */
32610
32611int
32612main (void)
32613{
32614
32615#ifdef __ARM_FEATURE_UNALIGNED
32616#error "unaligned"
32617#endif
32618
32619 ;
32620 return 0;
32621}
32622_ACEOF
32623if ac_fn_c_try_compile "$LINENO"; then :
32624 grub_cv_cc_target_emits_unaligned=no
32625else
32626 grub_cv_cc_target_emits_unaligned=yes
32627fi
32628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32629fi
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
32635fi
32636
32637# Set them to their new values for the tests below.
32638CC="$TARGET_CC"
32639if test x"$platform" = xemu ; then
32640CFLAGS="$TARGET_CFLAGS -Wno-error"
32641elif test "x$TARGET_APPLE_LINKER" = x1 ; then
32642CFLAGS="$TARGET_CFLAGS -nostdlib -static -Wno-error"
32643else
32644CFLAGS="$TARGET_CFLAGS -nostdlib -Wno-error"
32645fi
32646CPPFLAGS="$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; }
32652if ${grub_cv_asm_uscore+:} false; then :
32653 $as_echo_n "(cached) " >&6
32654else
32655 cat > conftest.c <<\EOF
32656int func (int *);
32657int
32658func (int *list)
32659{
32660 *list = 0;
32661 return *list;
32662}
32663EOF
32664
32665if { 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
32672else
32673 as_fn_error $? "${CC-cc} failed to produce assembly code" "$LINENO" 5
32674fi
32675
32676if $EGREP '(^|^_[:alnum])_func' conftest.s >/dev/null 2>&1; then
32677 HAVE_ASM_USCORE=1
32678 grub_cv_asm_uscore=yes
32679else
32680 HAVE_ASM_USCORE=0
32681 grub_cv_asm_uscore=no
32682fi
32683
32684rm -f conftest*
32685fi
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
32691if test "x$TARGET_APPLE_LINKER" = x0 && test x"$platform" != xemu; then
32692if test x$grub_cv_asm_uscore = xyes; then
32693DEFSYM="-Wl,--defsym,_abort=_main -Wl,--defsym,__main=_main"
32694else
32695DEFSYM="-Wl,--defsym,abort=main -Wl,--defsym,_main=main -Wl,--defsym,__main=main"
32696fi
32697CFLAGS="$TARGET_CFLAGS -nostdlib $DEFSYM"
32698fi
32699
32700# Check for libgcc symbols
32701if test x"$platform" = xemu; then
21f95442 32702for 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
422889f9
CW
32703do :
32704 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
32705ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
32706if 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
32711fi
32712done
32713
32714fi
32715
32716if test "x$TARGET_APPLE_LINKER" = x1 ; then
32717CFLAGS="$TARGET_CFLAGS -nostdlib -static"
32718else
32719CFLAGS="$TARGET_CFLAGS -nostdlib"
32720fi
32721LIBS=""
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; }
32726if ${grub_cv_prog_target_cc+:} false; then :
32727 $as_echo_n "(cached) " >&6
32728else
32729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32730/* end confdefs.h. */
32731
32732asm (".globl start; start:");
32733void __main (void);
32734void __main (void) {}
32735int main (void);
32736
32737int
32738main (void)
32739{
32740
32741 ;
32742 return 0;
32743}
32744_ACEOF
32745if ac_fn_c_try_link "$LINENO"; then :
32746 grub_cv_prog_target_cc=yes
32747else
32748 grub_cv_prog_target_cc=no
32749fi
32750rm -f core conftest.err conftest.$ac_objext \
32751 conftest$ac_exeext conftest.$ac_ext
32752
32753fi
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
32758if test "x$grub_cv_prog_target_cc" = xno; then
32759 as_fn_error $? "cannot compile for the target" "$LINENO" 5
32760fi
32761
32762if 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; }
32765if ${grub_cv_prog_objcopy_absolute+:} false; then :
32766 $as_echo_n "(cached) " >&6
32767else
32768 cat > conftest.c <<\EOF
32769void cmain (void);
32770void
32771cmain (void)
32772{
32773 *((int *) 0x1000) = 2;
32774}
32775EOF
32776
32777if { { 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 :
32782else
32783 as_fn_error $? "${CC-cc} cannot compile C source code" "$LINENO" 5
32784fi
32785grub_cv_prog_objcopy_absolute=yes
32786for 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
32816done
32817rm -f conftest*
32818fi
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
32823if test "x$grub_cv_prog_objcopy_absolute" = xno; then
32824 as_fn_error $? "GRUB requires a working absolute objcopy; upgrade your binutils" "$LINENO" 5
32825fi
32826
32827fi
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; }
32830if ${grub_cv_prog_ld_build_id_none+:} false; then :
32831 $as_echo_n "(cached) " >&6
32832else
32833 save_LDFLAGS="$LDFLAGS"
32834LDFLAGS="$LDFLAGS -Wl,--build-id=none"
32835cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32836/* end confdefs.h. */
32837
32838int
32839main (void)
32840{
32841
32842 ;
32843 return 0;
32844}
32845_ACEOF
32846if ac_fn_c_try_link "$LINENO"; then :
32847 grub_cv_prog_ld_build_id_none=yes
32848else
32849 grub_cv_prog_ld_build_id_none=no
32850fi
32851rm -f core conftest.err conftest.$ac_objext \
32852 conftest$ac_exeext conftest.$ac_ext
32853LDFLAGS="$save_LDFLAGS"
32854
32855fi
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
32860if test "x$grub_cv_prog_ld_build_id_none" = xyes; then
32861 TARGET_LDFLAGS="$TARGET_LDFLAGS -Wl,--build-id=none"
32862fi
32863
32864if 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; }
32873if ${grub_cv_check_uscore_uscore_bss_start_symbol+:} false; then :
32874 $as_echo_n "(cached) " >&6
32875else
32876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32877/* end confdefs.h. */
32878
32879asm (".globl start; start:");
32880void __main (void);
32881void __main (void) {}
32882int main (void);
32883
32884int
32885main (void)
32886{
32887asm ("incl __bss_start")
32888 ;
32889 return 0;
32890}
32891_ACEOF
32892if ac_fn_c_try_link "$LINENO"; then :
32893 grub_cv_check_uscore_uscore_bss_start_symbol=yes
32894else
32895 grub_cv_check_uscore_uscore_bss_start_symbol=no
32896fi
32897rm -f core conftest.err conftest.$ac_objext \
32898 conftest$ac_exeext conftest.$ac_ext
32899fi
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; }
32907if ${grub_cv_check_edata_symbol+:} false; then :
32908 $as_echo_n "(cached) " >&6
32909else
32910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32911/* end confdefs.h. */
32912
32913asm (".globl start; start:");
32914void __main (void);
32915void __main (void) {}
32916int main (void);
32917int
32918main (void)
32919{
32920asm ("incl edata")
32921 ;
32922 return 0;
32923}
32924_ACEOF
32925if ac_fn_c_try_link "$LINENO"; then :
32926 grub_cv_check_edata_symbol=yes
32927else
32928 grub_cv_check_edata_symbol=no
32929fi
32930rm -f core conftest.err conftest.$ac_objext \
32931 conftest$ac_exeext conftest.$ac_ext
32932fi
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; }
32940if ${grub_cv_check_uscore_edata_symbol+:} false; then :
32941 $as_echo_n "(cached) " >&6
32942else
32943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32944/* end confdefs.h. */
32945
32946asm (".globl start; start:");
32947void __main (void);
32948void __main (void) {}
32949int main (void);
32950int
32951main (void)
32952{
32953asm ("incl _edata")
32954 ;
32955 return 0;
32956}
32957_ACEOF
32958if ac_fn_c_try_link "$LINENO"; then :
32959 grub_cv_check_uscore_edata_symbol=yes
32960else
32961 grub_cv_check_uscore_edata_symbol=no
32962fi
32963rm -f core conftest.err conftest.$ac_objext \
32964 conftest$ac_exeext conftest.$ac_ext
32965fi
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
32971if test "x$grub_cv_check_uscore_uscore_bss_start_symbol" = xyes; then
32972 BSS_START_SYMBOL=__bss_start
32973elif test "x$grub_cv_check_edata_symbol" = xyes; then
32974 BSS_START_SYMBOL=edata
32975elif test "x$grub_cv_check_uscore_edata_symbol" = xyes; then
32976 BSS_START_SYMBOL=_edata
32977else
32978 as_fn_error $? "none of __bss_start, edata or _edata is defined" "$LINENO" 5
32979fi
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; }
32984if ${grub_cv_check_end_symbol+:} false; then :
32985 $as_echo_n "(cached) " >&6
32986else
32987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32988/* end confdefs.h. */
32989
32990asm (".globl start; start:");
32991void __main (void);
32992void __main (void) {}
32993int main (void);
32994int
32995main (void)
32996{
32997asm ("incl end")
32998 ;
32999 return 0;
33000}
33001_ACEOF
33002if ac_fn_c_try_link "$LINENO"; then :
33003 grub_cv_check_end_symbol=yes
33004else
33005 grub_cv_check_end_symbol=no
33006fi
33007rm -f core conftest.err conftest.$ac_objext \
33008 conftest$ac_exeext conftest.$ac_ext
33009fi
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; }
33017if ${grub_cv_check_uscore_end_symbol+:} false; then :
33018 $as_echo_n "(cached) " >&6
33019else
33020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33021/* end confdefs.h. */
33022
33023asm (".globl start; start:");
33024void __main (void);
33025void __main (void) {}
33026int main (void);
33027int
33028main (void)
33029{
33030asm ("incl _end")
33031 ;
33032 return 0;
33033}
33034_ACEOF
33035if ac_fn_c_try_link "$LINENO"; then :
33036 grub_cv_check_uscore_end_symbol=yes
33037else
33038 grub_cv_check_uscore_end_symbol=no
33039fi
33040rm -f core conftest.err conftest.$ac_objext \
33041 conftest$ac_exeext conftest.$ac_ext
33042fi
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
33048if test "x$grub_cv_check_end_symbol" = xyes; then
33049 END_SYMBOL=end
33050elif test "x$grub_cv_check_uscore_end_symbol" = xyes; then
33051 END_SYMBOL=_end
33052else
33053 as_fn_error $? "neither end nor _end is defined" "$LINENO" 5
33054fi
33055
33056 fi
33057 CFLAGS="$TARGET_CFLAGS"
33058fi
33059
33060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether nm works" >&5
33061$as_echo_n "checking whether nm works... " >&6; }
33062if ${grub_cv_prog_nm_works+:} false; then :
33063 $as_echo_n "(cached) " >&6
33064else
33065
33066nm_works_tmp_dir="$(mktemp -d "./confXXXXXX")"
33067cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33068/* end confdefs.h. */
33069
33070int
33071main (void)
33072{
33073
33074 ;
33075 return 0;
33076}
33077_ACEOF
33078$TARGET_CC $TARGET_CFLAGS -c conftest.c -o "$nm_works_tmp_dir/ef"
33079if $TARGET_NM "$nm_works_tmp_dir/ef" > /dev/null; then
33080 grub_cv_prog_nm_works=yes
33081else
33082 grub_cv_prog_nm_minus_p=no
33083fi
33084rm "$nm_works_tmp_dir/ef"
33085rmdir "$nm_works_tmp_dir"
33086
33087fi
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
33092if test "x$grub_cv_prog_nm_works" != xyes; then
33093 as_fn_error $? "nm does not work" "$LINENO" 5
33094fi
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; }
33098if ${grub_cv_prog_nm_minus_p+:} false; then :
33099 $as_echo_n "(cached) " >&6
33100else
33101
33102nm_minus_p_tmp_dir="$(mktemp -d "./confXXXXXX")"
33103cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33104/* end confdefs.h. */
33105
33106int
33107main (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"
33115if $TARGET_NM -P "$nm_minus_p_tmp_dir/ef" 2>&1 > /dev/null; then
33116 grub_cv_prog_nm_minus_p=yes
33117else
33118 grub_cv_prog_nm_minus_p=no
33119fi
33120rm "$nm_minus_p_tmp_dir/ef"
33121rmdir "$nm_minus_p_tmp_dir"
33122
33123fi
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
33128if test "x$grub_cv_prog_nm_minus_p" = xyes; then
33129 TARGET_NMFLAGS_MINUS_P="-P"
33130else
33131 TARGET_NMFLAGS_MINUS_P=
33132fi
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; }
33136if ${grub_cv_prog_nm_defined_only+:} false; then :
33137 $as_echo_n "(cached) " >&6
33138else
33139
33140nm_defined_only_tmp_dir="$(mktemp -d "./confXXXXXX")"
33141cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33142/* end confdefs.h. */
33143
33144int
33145main (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"
33153if $TARGET_NM --defined-only "$nm_defined_only_tmp_dir/ef" 2>&1 > /dev/null; then
33154 grub_cv_prog_nm_defined_only=yes
33155else
33156 grub_cv_prog_nm_defined_only=no
33157fi
33158rm "$nm_defined_only_tmp_dir/ef"
33159rmdir "$nm_defined_only_tmp_dir"
33160
33161fi
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
33166if test "x$grub_cv_prog_nm_defined_only" = xyes; then
33167 TARGET_NMFLAGS_DEFINED_ONLY=--defined-only
33168else
33169 TARGET_NMFLAGS_DEFINED_ONLY=
33170fi
33171
33172
33173
33174
33175if 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; }
33178if ${grub_cv_cc_isystem+:} false; then :
33179 $as_echo_n "(cached) " >&6
33180else
33181
33182 SAVED_CPPFLAGS="$CPPFLAGS"
00f6db22 33183 CPPFLAGS="$TARGET_CPPFLAGS -nostdlib -nostdinc -isystem `$TARGET_CC -print-file-name=include`"
422889f9
CW
33184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33185/* end confdefs.h. */
33186#include <stdarg.h>
33187#include <stddef.h>
33188int va_arg_func (int fixed, va_list args);
33189int
33190main (void)
33191{
33192
33193 ;
33194 return 0;
33195}
33196_ACEOF
33197if ac_fn_c_try_compile "$LINENO"; then :
33198 grub_cv_cc_isystem=yes
33199else
33200 grub_cv_cc_isystem=no
33201fi
33202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33203 CPPFLAGS="$SAVED_CPPFLAGS"
33204
33205fi
33206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $grub_cv_cc_isystem" >&5
33207$as_echo "$grub_cv_cc_isystem" >&6; }
33208
33209if test x"$grub_cv_cc_isystem" = xyes ; then
33210 TARGET_CPPFLAGS="$TARGET_CPPFLAGS -nostdinc -isystem `$TARGET_CC -print-file-name=include`"
33211fi
33212fi
33213
33214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wtrampolines work" >&5
33215$as_echo_n "checking whether -Wtrampolines work... " >&6; }
33216if ${grub_cv_cc_wtrampolines+:} false; then :
33217 $as_echo_n "(cached) " >&6
33218else
33219
33220 CFLAGS="$TARGET_CFLAGS -Wtrampolines -Werror"
33221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33222/* end confdefs.h. */
33223#include <stdarg.h>
33224int va_arg_func (int fixed, va_list args);
33225int
33226main (void)
33227{
33228
33229 ;
33230 return 0;
33231}
33232_ACEOF
33233if ac_fn_c_try_compile "$LINENO"; then :
33234 grub_cv_cc_wtrampolines=yes
33235else
33236 grub_cv_cc_wtrampolines=no
33237fi
33238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33239
33240fi
33241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $grub_cv_cc_wtrampolines" >&5
33242$as_echo "$grub_cv_cc_wtrampolines" >&6; }
33243
33244if test x"$grub_cv_cc_wtrampolines" = xyes ; then
33245 TARGET_CFLAGS="$TARGET_CFLAGS -Wtrampolines"
33246fi
33247
33248# Restore the flags.
33249CC="$tmp_CC"
33250CFLAGS="$tmp_CFLAGS"
33251CPPFLAGS="$tmp_CPPFLAGS"
33252LDFLAGS="$tmp_LDFLAGS"
33253LIBS="$tmp_LIBS"
33254
33255#
33256# Check for options.
33257#
33258
33259# Memory manager debugging.
33260# Check whether --enable-mm-debug was given.
33261if test "${enable_mm_debug+set}" = set; then :
33262 enableval=$enable_mm_debug;
21f95442
CW
33263fi
33264
33265if test x$enable_mm_debug = xyes; then
33266
422889f9
CW
33267$as_echo "#define MM_DEBUG 1" >>confdefs.h
33268
33269fi
33270
422889f9
CW
33271# Check whether --enable-cache-stats was given.
33272if test "${enable_cache_stats+set}" = set; then :
33273 enableval=$enable_cache_stats;
33274fi
33275
33276
33277if test x$enable_cache_stats = xyes; then
33278 DISK_CACHE_STATS=1
33279else
33280 DISK_CACHE_STATS=0
33281fi
33282
33283
33284# Check whether --enable-boot-time was given.
33285if test "${enable_boot_time+set}" = set; then :
33286 enableval=$enable_boot_time;
33287fi
33288
33289
33290if test x$enable_boot_time = xyes; then
33291 BOOT_TIME_STATS=1
33292else
33293 BOOT_TIME_STATS=0
33294fi
33295
33296
33297# Check whether --enable-grub-emu-sdl was given.
33298if test "${enable_grub_emu_sdl+set}" = set; then :
33299 enableval=$enable_grub_emu_sdl;
33300fi
33301
33302
33303# Check whether --enable-grub-emu-pci was given.
33304if test "${enable_grub_emu_pci+set}" = set; then :
33305 enableval=$enable_grub_emu_pci;
33306fi
33307
33308
33309if test "$platform" = emu; then
33310
33311if test x"$enable_grub_emu_sdl" = xno ; then
33312 grub_emu_sdl_excuse="explicitly disabled"
33313fi
33314if [ 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; }
33318if ${ac_cv_lib_SDL_SDL_Init+:} false; then :
33319 $as_echo_n "(cached) " >&6
33320else
33321 ac_check_lib_save_LIBS=$LIBS
33322LIBS="-lSDL $LIBS"
33323cat 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
33330extern "C"
33331#endif
33332char SDL_Init ();
33333int
33334main (void)
33335{
33336return SDL_Init ();
33337 ;
33338 return 0;
33339}
33340_ACEOF
33341if ac_fn_c_try_link "$LINENO"; then :
33342 ac_cv_lib_SDL_SDL_Init=yes
33343else
33344 ac_cv_lib_SDL_SDL_Init=no
33345fi
33346rm -f core conftest.err conftest.$ac_objext \
33347 conftest$ac_exeext conftest.$ac_ext
33348LIBS=$ac_check_lib_save_LIBS
33349fi
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; }
33352if test "x$ac_cv_lib_SDL_SDL_Init" = xyes; then :
33353 LIBSDL="-lSDL"
33354else
33355 grub_emu_sdl_excuse="libSDL libraries are required to build \`grub-emu' with SDL support"
33356fi
33357
33358
33359fi
33360
33361if [ x"$grub_emu_sdl_excuse" = x ]; then
33362 # Check for headers.
33363 for ac_header in SDL/SDL.h
33364do :
33365 ac_fn_c_check_header_mongrel "$LINENO" "SDL/SDL.h" "ac_cv_header_SDL_SDL_h" "$ac_includes_default"
33366if 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
33371else
33372 grub_emu_sdl_excuse="libSDL header file is required to build \`grub-emu' with SDL support"
33373fi
33374
33375done
33376
33377fi
33378
33379if 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
33381fi
33382if test x"$grub_emu_sdl_excuse" = x ; then
33383enable_grub_emu_sdl=yes
33384else
33385enable_grub_emu_sdl=no
33386fi
33387
33388if test x"$enable_grub_emu_pci" != xyes ; then
33389 grub_emu_pci_excuse="not enabled"
33390fi
33391
33392if [ 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; }
33396if ${ac_cv_lib_pciaccess_pci_system_init+:} false; then :
33397 $as_echo_n "(cached) " >&6
33398else
33399 ac_check_lib_save_LIBS=$LIBS
33400LIBS="-lpciaccess $LIBS"
33401cat 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
33408extern "C"
33409#endif
33410char pci_system_init ();
33411int
33412main (void)
33413{
33414return pci_system_init ();
33415 ;
33416 return 0;
33417}
33418_ACEOF
33419if ac_fn_c_try_link "$LINENO"; then :
33420 ac_cv_lib_pciaccess_pci_system_init=yes
33421else
33422 ac_cv_lib_pciaccess_pci_system_init=no
33423fi
33424rm -f core conftest.err conftest.$ac_objext \
33425 conftest$ac_exeext conftest.$ac_ext
33426LIBS=$ac_check_lib_save_LIBS
33427fi
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; }
33430if test "x$ac_cv_lib_pciaccess_pci_system_init" = xyes; then :
33431 LIBPCIACCESS="-lpciaccess"
33432else
33433 grub_emu_pci_excuse="need libpciaccess library"
33434fi
33435
33436
33437fi
33438if [ x"$grub_emu_pci_excuse" = x ]; then
33439 # Check for headers.
33440 for ac_header in pciaccess.h
33441do :
33442 ac_fn_c_check_header_mongrel "$LINENO" "pciaccess.h" "ac_cv_header_pciaccess_h" "$ac_includes_default"
33443if test "x$ac_cv_header_pciaccess_h" = xyes; then :
33444 cat >>confdefs.h <<_ACEOF
33445#define HAVE_PCIACCESS_H 1
33446_ACEOF
33447
33448else
33449 grub_emu_pci_excuse="need libpciaccess headers"
33450fi
33451
33452done
33453
33454fi
33455
33456if test x"$grub_emu_pci_excuse" = x ; then
33457enable_grub_emu_pci=yes
33458else
33459
33460enable_grub_emu_pci=no
33461fi
33462
33463
33464
33465
33466else
33467
33468# Ignore --enable-emu-* if platform is not emu
33469enable_grub_emu_sdl=no
33470enable_grub_emu_pci=no
33471fi
33472
33473# Check whether --enable-grub-mkfont was given.
33474if test "${enable_grub_mkfont+set}" = set; then :
33475 enableval=$enable_grub_mkfont;
33476fi
33477
33478if test x"$enable_grub_mkfont" = xno ; then
33479 grub_mkfont_excuse="explicitly disabled"
33480fi
33481
00f6db22
CW
33482unset ac_cv_header_ft2build_h
33483
422889f9
CW
33484if test x"$grub_mkfont_excuse" = x ; then
33485 # Check for freetype libraries.
422889f9 33486
00f6db22
CW
33487pkg_failed=no
33488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
33489$as_echo_n "checking for FREETYPE... " >&6; }
422889f9 33490
00f6db22
CW
33491if 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
422889f9 33502else
00f6db22 33503 pkg_failed=yes
422889f9 33504fi
00f6db22
CW
33505 else
33506 pkg_failed=untried
422889f9 33507fi
00f6db22
CW
33508if 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
422889f9 33519else
00f6db22
CW
33520 pkg_failed=yes
33521fi
33522 else
33523 pkg_failed=untried
422889f9
CW
33524fi
33525
33526
422889f9 33527
00f6db22
CW
33528if test $pkg_failed = yes; then
33529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33530$as_echo "no" >&6; }
422889f9 33531
00f6db22
CW
33532if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
33533 _pkg_short_errors_supported=yes
33534else
33535 _pkg_short_errors_supported=no
422889f9 33536fi
00f6db22
CW
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
422889f9 33544
00f6db22
CW
33545 grub_mkfont_excuse="need freetype2 library"
33546elif 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"
33550else
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; }
422889f9 33555
00f6db22
CW
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
422889f9
CW
33561do :
33562 ac_fn_c_check_header_mongrel "$LINENO" "ft2build.h" "ac_cv_header_ft2build_h" "$ac_includes_default"
33563if test "x$ac_cv_header_ft2build_h" = xyes; then :
33564 cat >>confdefs.h <<_ACEOF
33565#define HAVE_FT2BUILD_H 1
33566_ACEOF
33567
33568else
33569 grub_mkfont_excuse="need freetype2 headers"
33570fi
33571
33572done
33573
00f6db22 33574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
422889f9
CW
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
33581extern "C"
33582#endif
33583char FT_Load_Glyph ();
33584int
33585main (void)
33586{
33587return FT_Load_Glyph ();
33588 ;
33589 return 0;
33590}
33591_ACEOF
33592if ac_fn_c_try_link "$LINENO"; then :
33593
33594else
33595 grub_mkfont_excuse="freetype2 library unusable"
33596fi
33597rm -f core conftest.err conftest.$ac_objext \
33598 conftest$ac_exeext conftest.$ac_ext
00f6db22
CW
33599 CPPFLAGS="$SAVED_CPPFLAGS"
33600 LIBS="$SAVED_LIBS"
33601
33602fi
422889f9
CW
33603fi
33604
33605if 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
33607fi
33608if test x"$grub_mkfont_excuse" = x ; then
33609enable_grub_mkfont=yes
33610else
33611enable_grub_mkfont=no
33612fi
33613
33614
422889f9
CW
33615SAVED_CC="$CC"
33616SAVED_CPP="$CPP"
33617SAVED_CFLAGS="$CFLAGS"
33618SAVED_CPPFLAGS="$CPPFLAGS"
33619SAVED_LDFLAGS="$LDFLAGS"
33620CC="$BUILD_CC"
33621CPP="$BUILD_CPP"
33622CFLAGS="$BUILD_CFLAGS"
33623CPPFLAGS="$BUILD_CPPFLAGS"
33624LDFLAGS="$BUILD_LDFAGS"
33625
33626unset ac_cv_c_bigendian
33627unset ac_cv_header_ft2build_h
33628
33629if ac_fn_c_compute_int "$LINENO" "sizeof (void *)" "BUILD_SIZEOF_VOID_P" ""; then :
33630
33631fi
33632
33633if ac_fn_c_compute_int "$LINENO" "sizeof (long)" "BUILD_SIZEOF_LONG" ""; then :
33634
33635fi
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; }
33639if ${ac_cv_c_bigendian+:} false; then :
33640 $as_echo_n "(cached) " >&6
33641else
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
33652if 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
33675fi
33676rm -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
33684int
33685main (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
33697if 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
33704int
33705main (void)
33706{
33707#if BYTE_ORDER != BIG_ENDIAN
33708 not big endian
33709 #endif
33710
33711 ;
33712 return 0;
33713}
33714_ACEOF
33715if ac_fn_c_try_compile "$LINENO"; then :
33716 ac_cv_c_bigendian=yes
33717else
33718 ac_cv_c_bigendian=no
33719fi
33720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33721fi
33722rm -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
33730int
33731main (void)
33732{
33733#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
33734 bogus endian macros
33735 #endif
33736
33737 ;
33738 return 0;
33739}
33740_ACEOF
33741if 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
33747int
33748main (void)
33749{
33750#ifndef _BIG_ENDIAN
33751 not big endian
33752 #endif
33753
33754 ;
33755 return 0;
33756}
33757_ACEOF
33758if ac_fn_c_try_compile "$LINENO"; then :
33759 ac_cv_c_bigendian=yes
33760else
33761 ac_cv_c_bigendian=no
33762fi
33763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33764fi
33765rm -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. */
33773short 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
33789int
33790main (void)
33791{
33792return use_ascii (foo) == use_ebcdic (foo);
33793 ;
33794 return 0;
33795}
33796_ACEOF
33797if 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
33809fi
33810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33811else
33812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33813/* end confdefs.h. */
33814$ac_includes_default
33815int
33816main (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
33832if ac_fn_c_try_run "$LINENO"; then :
33833 ac_cv_c_bigendian=no
33834else
33835 ac_cv_c_bigendian=yes
33836fi
33837rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33838 conftest.$ac_objext conftest.beam conftest.$ac_ext
33839fi
33840
33841 fi
33842fi
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
33858if test x$BUILD_WORDS_BIGENDIAN = xerr ; then
33859 as_fn_error $? "couldnt determine build endianness" "$LINENO" 5
33860fi
33861
33862
33863
33864
33865
33866if test x"$grub_build_mkfont_excuse" = x ; then
33867 # Check for freetype libraries.
00f6db22
CW
33868 SAVED_PKG_CONFIG="$PKG_CONFIG"
33869 test -z "$BUILD_PKG_CONFIG" || PKG_CONFIG="$BUILD_PKG_CONFIG"
33870
33871pkg_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
33875if 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
422889f9 33886else
00f6db22 33887 pkg_failed=yes
422889f9 33888fi
00f6db22
CW
33889 else
33890 pkg_failed=untried
422889f9 33891fi
00f6db22
CW
33892if 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
422889f9 33903else
00f6db22
CW
33904 pkg_failed=yes
33905fi
33906 else
33907 pkg_failed=untried
422889f9
CW
33908fi
33909
33910
422889f9 33911
00f6db22
CW
33912if test $pkg_failed = yes; then
33913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33914$as_echo "no" >&6; }
33915
33916if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
33917 _pkg_short_errors_supported=yes
33918else
33919 _pkg_short_errors_supported=no
422889f9 33920fi
00f6db22
CW
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
422889f9 33928
00f6db22
CW
33929 grub_build_mkfont_excuse="need freetype2 library"
33930elif 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"
33934else
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
422889f9
CW
33945do :
33946 ac_fn_c_check_header_mongrel "$LINENO" "ft2build.h" "ac_cv_header_ft2build_h" "$ac_includes_default"
33947if test "x$ac_cv_header_ft2build_h" = xyes; then :
33948 cat >>confdefs.h <<_ACEOF
33949#define HAVE_FT2BUILD_H 1
33950_ACEOF
33951
33952else
33953 grub_build_mkfont_excuse="need freetype2 headers"
33954fi
33955
33956done
33957
00f6db22 33958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
422889f9
CW
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
33965extern "C"
33966#endif
33967char FT_Load_Glyph ();
33968int
33969main (void)
33970{
33971return FT_Load_Glyph ();
33972 ;
33973 return 0;
33974}
33975_ACEOF
33976if ac_fn_c_try_link "$LINENO"; then :
33977
33978else
33979 grub_build_mkfont_excuse="freetype2 library unusable"
33980fi
33981rm -f core conftest.err conftest.$ac_objext \
33982 conftest$ac_exeext conftest.$ac_ext
00f6db22
CW
33983 LIBS="$SAVED_LIBS"
33984 CPPFLAGS="$SAVED_CPPFLAGS_2"
33985
33986fi
33987 PKG_CONFIG="$SAVED_PKG_CONFIG"
422889f9
CW
33988fi
33989
33990if 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
33992fi
33993if test x"$grub_build_mkfont_excuse" = x ; then
33994 enable_build_grub_mkfont=yes
33995else
33996 enable_build_grub_mkfont=no
33997fi
0992ffba 33998if 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
422889f9 33999 if test x"$grub_build_mkfont_excuse" = x ; then
0992ffba 34000 as_fn_error $? "qemu, coreboot and loongson ports need build-time grub-mkfont" "$LINENO" 5
422889f9 34001 else
0992ffba 34002 as_fn_error $? "qemu, coreboot and loongson ports need build-time grub-mkfont ($grub_build_mkfont_excuse)" "$LINENO" 5
422889f9
CW
34003 fi
34004fi
34005
422889f9
CW
34006CC="$SAVED_CC"
34007CPP="$SAVED_CPP"
34008CFLAGS="$SAVED_CFLAGS"
34009CPPFLAGS="$SAVED_CPPFLAGS"
34010LDFLAGS="$SAVED_LDFLAGS"
34011
34012
34013DJVU_FONT_SOURCE=
34014
34015starfield_excuse=
34016
34017# Check whether --enable-grub-themes was given.
34018if test "${enable_grub_themes+set}" = set; then :
34019 enableval=$enable_grub_themes;
34020fi
34021
34022if test x"$enable_grub_themes" = xno ; then
34023 starfield_excuse="explicitly disabled"
34024fi
34025
34026if test x"$starfield_excuse" = x && test x"$enable_build_grub_mkfont" = xno ; then
34027 starfield_excuse="No build-time grub-mkfont"
34028fi
34029
34030if 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
34043fi
34044
34045if 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
34047fi
34048
34049
34050
34051FONT_SOURCE=
34052
34053for 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
34065done
34066
34067if test x"$enable_build_grub_mkfont" = xno ; then
34068 FONT_SOURCE=
34069fi
34070
0992ffba 34071if test "x$FONT_SOURCE" = x && ( test "x$platform" = xqemu || test "x$platform" = xloongson || test "x$platform" = xqemu_mips || test "x$platform" = xcoreboot ); then
422889f9 34072 if test x"$grub_build_mkfont_excuse" = x ; then
0992ffba 34073 as_fn_error $? "qemu, coreboot and loongson ports need unifont" "$LINENO" 5
422889f9 34074 else
0992ffba 34075 as_fn_error $? "qemu, coreboot and loongson ports need unifont ($grub_build_mkfont_excuse)" "$LINENO" 5
422889f9
CW
34076 fi
34077fi
34078
34079
34080
34081if 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"
34083fi
34084
34085
34086# Check whether --enable-grub-mount was given.
34087if test "${enable_grub_mount+set}" = set; then :
34088 enableval=$enable_grub_mount;
34089fi
34090
34091if test x"$enable_grub_mount" = xno ; then
34092 grub_mount_excuse="explicitly disabled"
34093fi
34094
34095if 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; }
34098if ${ac_cv_lib_fuse_fuse_main_real+:} false; then :
34099 $as_echo_n "(cached) " >&6
34100else
34101 ac_check_lib_save_LIBS=$LIBS
34102LIBS="-lfuse $LIBS"
34103cat 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
34110extern "C"
34111#endif
34112char fuse_main_real ();
34113int
34114main (void)
34115{
34116return fuse_main_real ();
34117 ;
34118 return 0;
34119}
34120_ACEOF
34121if ac_fn_c_try_link "$LINENO"; then :
34122 ac_cv_lib_fuse_fuse_main_real=yes
34123else
34124 ac_cv_lib_fuse_fuse_main_real=no
34125fi
34126rm -f core conftest.err conftest.$ac_objext \
34127 conftest$ac_exeext conftest.$ac_ext
34128LIBS=$ac_check_lib_save_LIBS
34129fi
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; }
34132if 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
34139else
34140 grub_mount_excuse="need FUSE library"
34141fi
34142
34143fi
34144
34145if 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
34150do :
34151 ac_fn_c_check_header_mongrel "$LINENO" "fuse/fuse.h" "ac_cv_header_fuse_fuse_h" "$ac_includes_default"
34152if 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
34157else
34158 grub_mount_excuse="need FUSE headers"
34159fi
34160
34161done
34162
34163 CPPFLAGS="$SAVED_CPPFLAGS"
34164fi
34165
34166if 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
34168fi
34169if test x"$grub_mount_excuse" = x ; then
34170enable_grub_mount=yes
34171else
34172enable_grub_mount=no
34173fi
34174
34175
34176# Check whether --enable-device-mapper was given.
34177if test "${enable_device_mapper+set}" = set; then :
34178 enableval=$enable_device_mapper;
34179fi
34180
34181if test x"$enable_device_mapper" = xno ; then
34182 device_mapper_excuse="explicitly disabled"
34183fi
34184
34185if 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"
34188if test "x$ac_cv_header_libdevmapper_h" = xyes; then :
34189
34190else
34191 device_mapper_excuse="need libdevmapper header"
34192fi
34193
34194
34195fi
34196
34197if 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; }
34201if ${ac_cv_lib_devmapper_dm_task_create+:} false; then :
34202 $as_echo_n "(cached) " >&6
34203else
34204 ac_check_lib_save_LIBS=$LIBS
34205LIBS="-ldevmapper $LIBS"
34206cat 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
34213extern "C"
34214#endif
34215char dm_task_create ();
34216int
34217main (void)
34218{
34219return dm_task_create ();
34220 ;
34221 return 0;
34222}
34223_ACEOF
34224if ac_fn_c_try_link "$LINENO"; then :
34225 ac_cv_lib_devmapper_dm_task_create=yes
34226else
34227 ac_cv_lib_devmapper_dm_task_create=no
34228fi
34229rm -f core conftest.err conftest.$ac_objext \
34230 conftest$ac_exeext conftest.$ac_ext
34231LIBS=$ac_check_lib_save_LIBS
34232fi
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; }
34235if 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
34242else
34243 device_mapper_excuse="need devmapper library"
34244fi
34245
34246fi
34247
34248if 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; }
34252if ${ac_cv_lib_devmapper_dm_log_with_errno_init+:} false; then :
34253 $as_echo_n "(cached) " >&6
34254else
34255 ac_check_lib_save_LIBS=$LIBS
34256LIBS="-ldevmapper $LIBS"
34257cat 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
34264extern "C"
34265#endif
34266char dm_log_with_errno_init ();
34267int
34268main (void)
34269{
34270return dm_log_with_errno_init ();
34271 ;
34272 return 0;
34273}
34274_ACEOF
34275if ac_fn_c_try_link "$LINENO"; then :
34276 ac_cv_lib_devmapper_dm_log_with_errno_init=yes
34277else
34278 ac_cv_lib_devmapper_dm_log_with_errno_init=no
34279fi
34280rm -f core conftest.err conftest.$ac_objext \
34281 conftest$ac_exeext conftest.$ac_ext
34282LIBS=$ac_check_lib_save_LIBS
34283fi
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; }
34286if 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
34293else
34294 device_mapper_excuse="need devmapper library"
34295fi
34296
34297fi
34298
34299if test x"$device_mapper_excuse" = x ; then
34300 LIBDEVMAPPER="-ldevmapper"
34301
34302$as_echo "#define HAVE_DEVICE_MAPPER 1" >>confdefs.h
34303
34304fi
34305
34306
34307
34308LIBGEOM=
34309if 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; }
34312if ${ac_cv_lib_geom_geom_gettree+:} false; then :
34313 $as_echo_n "(cached) " >&6
34314else
34315 ac_check_lib_save_LIBS=$LIBS
34316LIBS="-lgeom $LIBS"
34317cat 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
34324extern "C"
34325#endif
34326char geom_gettree ();
34327int
34328main (void)
34329{
34330return geom_gettree ();
34331 ;
34332 return 0;
34333}
34334_ACEOF
34335if ac_fn_c_try_link "$LINENO"; then :
34336 ac_cv_lib_geom_geom_gettree=yes
34337else
34338 ac_cv_lib_geom_geom_gettree=no
34339fi
34340rm -f core conftest.err conftest.$ac_objext \
34341 conftest$ac_exeext conftest.$ac_ext
34342LIBS=$ac_check_lib_save_LIBS
34343fi
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; }
34346if 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
34353else
34354 as_fn_error $? "Your platform requires libgeom" "$LINENO" 5
34355fi
34356
34357 LIBGEOM="-lgeom"
34358fi
34359
34360
34361
34362# Check whether --enable-liblzma was given.
34363if test "${enable_liblzma+set}" = set; then :
34364 enableval=$enable_liblzma;
34365fi
34366
34367if test x"$enable_liblzma" = xno ; then
34368 liblzma_excuse="explicitly disabled"
34369fi
34370
34371if 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; }
34374if ${ac_cv_lib_lzma_lzma_code+:} false; then :
34375 $as_echo_n "(cached) " >&6
34376else
34377 ac_check_lib_save_LIBS=$LIBS
34378LIBS="-llzma $LIBS"
34379cat 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
34386extern "C"
34387#endif
34388char lzma_code ();
34389int
34390main (void)
34391{
34392return lzma_code ();
34393 ;
34394 return 0;
34395}
34396_ACEOF
34397if ac_fn_c_try_link "$LINENO"; then :
34398 ac_cv_lib_lzma_lzma_code=yes
34399else
34400 ac_cv_lib_lzma_lzma_code=no
34401fi
34402rm -f core conftest.err conftest.$ac_objext \
34403 conftest$ac_exeext conftest.$ac_ext
34404LIBS=$ac_check_lib_save_LIBS
34405fi
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; }
34408if 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
34415else
34416 liblzma_excuse="need lzma library"
34417fi
34418
34419fi
34420if test x"$liblzma_excuse" = x ; then
34421ac_fn_c_check_header_mongrel "$LINENO" "lzma.h" "ac_cv_header_lzma_h" "$ac_includes_default"
34422if test "x$ac_cv_header_lzma_h" = xyes; then :
34423
34424else
34425 liblzma_excuse="need lzma header"
34426fi
34427
34428
34429fi
34430
34431if 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
34433fi
34434
34435
34436if test x"$liblzma_excuse" = x ; then
34437 LIBLZMA="-llzma"
34438
34439$as_echo "#define USE_LIBLZMA 1" >>confdefs.h
34440
34441fi
34442
34443
34444
34445# Check whether --enable-libzfs was given.
34446if test "${enable_libzfs+set}" = set; then :
34447 enableval=$enable_libzfs;
34448fi
34449
34450if test x"$enable_libzfs" = xno ; then
34451 libzfs_excuse="explicitly disabled"
34452fi
34453
34454if 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
34457do :
34458 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
34459ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
34460if 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
34465fi
34466
34467done
34468
34469fi
34470
34471if 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; }
34474if ${ac_cv_lib_zfs_libzfs_init+:} false; then :
34475 $as_echo_n "(cached) " >&6
34476else
34477 ac_check_lib_save_LIBS=$LIBS
34478LIBS="-lzfs $LIBS"
34479cat 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
34486extern "C"
34487#endif
34488char libzfs_init ();
34489int
34490main (void)
34491{
34492return libzfs_init ();
34493 ;
34494 return 0;
34495}
34496_ACEOF
34497if ac_fn_c_try_link "$LINENO"; then :
34498 ac_cv_lib_zfs_libzfs_init=yes
34499else
34500 ac_cv_lib_zfs_libzfs_init=no
34501fi
34502rm -f core conftest.err conftest.$ac_objext \
34503 conftest$ac_exeext conftest.$ac_ext
34504LIBS=$ac_check_lib_save_LIBS
34505fi
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; }
34508if 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
34515else
34516 libzfs_excuse="need zfs library"
34517fi
34518
34519fi
34520
34521if 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; }
34524if ${ac_cv_lib_nvpair_nvlist_lookup_string+:} false; then :
34525 $as_echo_n "(cached) " >&6
34526else
34527 ac_check_lib_save_LIBS=$LIBS
34528LIBS="-lnvpair $LIBS"
34529cat 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
34536extern "C"
34537#endif
34538char nvlist_lookup_string ();
34539int
34540main (void)
34541{
34542return nvlist_lookup_string ();
34543 ;
34544 return 0;
34545}
34546_ACEOF
34547if ac_fn_c_try_link "$LINENO"; then :
34548 ac_cv_lib_nvpair_nvlist_lookup_string=yes
34549else
34550 ac_cv_lib_nvpair_nvlist_lookup_string=no
34551fi
34552rm -f core conftest.err conftest.$ac_objext \
34553 conftest$ac_exeext conftest.$ac_ext
34554LIBS=$ac_check_lib_save_LIBS
34555fi
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; }
34558if 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
34565else
34566 libzfs_excuse="need nvpair library"
34567fi
34568
34569fi
34570
34571if 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
34573fi
34574
34575if 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
34585fi
34586
34587
34588
34589
34590LIBS=""
34591
34592
34593if test x$target_cpu = xi386 -a x$platform = xqemu; then :
34594 GRUB_BOOT_MACHINE_LINK_ADDR=0xffe00
34595
34596fi
34597
34598
34599
34600
34601
34602
34603
34604# Check whether --enable-werror was given.
34605if test "${enable_werror+set}" = set; then :
34606 enableval=$enable_werror;
34607fi
34608
34609if test x"$enable_werror" != xno ; then
34610 TARGET_CFLAGS="$TARGET_CFLAGS -Werror"
34611 HOST_CFLAGS="$HOST_CFLAGS -Werror"
34612fi
34613
34614TARGET_CPP="$TARGET_CC -E"
34615TARGET_CCAS=$TARGET_CC
34616
34617# Includes which include make-time substitutions. They must come last
34618# as to avoid executing top_builddir in shell.
34619HOST_CPPFLAGS="$HOST_CPPFLAGS -I\$(top_builddir)/include"
34620TARGET_CPPFLAGS="$TARGET_CPPFLAGS -I\$(top_srcdir)/include"
34621TARGET_CPPFLAGS="$TARGET_CPPFLAGS -I\$(top_builddir)/include"
34622
34623GRUB_TARGET_CPU="${target_cpu}"
34624GRUB_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='#'
34660else
34661 COND_real_platform_TRUE='#'
34662 COND_real_platform_FALSE=
34663fi
34664
34665 if test x$platform = xemu; then
34666 COND_emu_TRUE=
34667 COND_emu_FALSE='#'
34668else
34669 COND_emu_TRUE='#'
34670 COND_emu_FALSE=
34671fi
34672
34673 if test x$target_cpu = xi386 -a x$platform = xpc; then
34674 COND_i386_pc_TRUE=
34675 COND_i386_pc_FALSE='#'
34676else
34677 COND_i386_pc_TRUE='#'
34678 COND_i386_pc_FALSE=
34679fi
34680
34681 if test x$target_cpu = xi386 -a x$platform = xefi; then
34682 COND_i386_efi_TRUE=
34683 COND_i386_efi_FALSE='#'
34684else
34685 COND_i386_efi_TRUE='#'
34686 COND_i386_efi_FALSE=
34687fi
34688
34689 if test x$target_cpu = xia64 -a x$platform = xefi; then
34690 COND_ia64_efi_TRUE=
34691 COND_ia64_efi_FALSE='#'
34692else
34693 COND_ia64_efi_TRUE='#'
34694 COND_ia64_efi_FALSE=
34695fi
34696
34697 if test x$target_cpu = xi386 -a x$platform = xqemu; then
34698 COND_i386_qemu_TRUE=
34699 COND_i386_qemu_FALSE='#'
34700else
34701 COND_i386_qemu_TRUE='#'
34702 COND_i386_qemu_FALSE=
34703fi
34704
34705 if test x$target_cpu = xi386 -a x$platform = xieee1275; then
34706 COND_i386_ieee1275_TRUE=
34707 COND_i386_ieee1275_FALSE='#'
34708else
34709 COND_i386_ieee1275_TRUE='#'
34710 COND_i386_ieee1275_FALSE=
34711fi
34712
34713 if test x$target_cpu = xi386 -a x$platform = xcoreboot; then
34714 COND_i386_coreboot_TRUE=
34715 COND_i386_coreboot_FALSE='#'
34716else
34717 COND_i386_coreboot_TRUE='#'
34718 COND_i386_coreboot_FALSE=
34719fi
34720
34721 if test x$target_cpu = xi386 -a x$platform = xmultiboot; then
34722 COND_i386_multiboot_TRUE=
34723 COND_i386_multiboot_FALSE='#'
34724else
34725 COND_i386_multiboot_TRUE='#'
34726 COND_i386_multiboot_FALSE=
34727fi
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='#'
34732else
34733 COND_x86_64_efi_TRUE='#'
34734 COND_x86_64_efi_FALSE=
34735fi
34736
34737 if test x$target_cpu = xi386 -a x$platform = xxen; then
34738 COND_i386_xen_TRUE=
34739 COND_i386_xen_FALSE='#'
34740else
34741 COND_i386_xen_TRUE='#'
34742 COND_i386_xen_FALSE=
34743fi
34744
00f6db22
CW
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='#'
34748else
34749 COND_i386_xen_pvh_TRUE='#'
34750 COND_i386_xen_pvh_FALSE=
34751fi
34752
422889f9
CW
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='#'
34756else
34757 COND_x86_64_xen_TRUE='#'
34758 COND_x86_64_xen_FALSE=
34759fi
34760
34761 if test x$target_cpu = xmipsel -a x$platform = xloongson; then
34762 COND_mips_loongson_TRUE=
34763 COND_mips_loongson_FALSE='#'
34764else
34765 COND_mips_loongson_TRUE='#'
34766 COND_mips_loongson_FALSE=
34767fi
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='#'
34772else
34773 COND_mips_qemu_mips_TRUE='#'
34774 COND_mips_qemu_mips_FALSE=
34775fi
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='#'
34780else
34781 COND_mips_arc_TRUE='#'
34782 COND_mips_arc_FALSE=
34783fi
34784
34785 if test x$target_cpu = xsparc64 -a x$platform = xieee1275; then
34786 COND_sparc64_ieee1275_TRUE=
34787 COND_sparc64_ieee1275_FALSE='#'
34788else
34789 COND_sparc64_ieee1275_TRUE='#'
34790 COND_sparc64_ieee1275_FALSE=
34791fi
34792
34793 if test x$target_cpu = xsparc64 -a x$platform = xemu; then
34794 COND_sparc64_emu_TRUE=
34795 COND_sparc64_emu_FALSE='#'
34796else
34797 COND_sparc64_emu_TRUE='#'
34798 COND_sparc64_emu_FALSE=
34799fi
34800
34801 if test x$target_cpu = xpowerpc -a x$platform = xieee1275; then
34802 COND_powerpc_ieee1275_TRUE=
34803 COND_powerpc_ieee1275_FALSE='#'
34804else
34805 COND_powerpc_ieee1275_TRUE='#'
34806 COND_powerpc_ieee1275_FALSE=
34807fi
34808
34809 if test x$target_cpu = xmips -o x$target_cpu = xmipsel; then
34810 COND_mips_TRUE=
34811 COND_mips_FALSE='#'
34812else
34813 COND_mips_TRUE='#'
34814 COND_mips_FALSE=
34815fi
34816
34817 if test x$target_cpu = xmipsel; then
34818 COND_mipsel_TRUE=
34819 COND_mipsel_FALSE='#'
34820else
34821 COND_mipsel_TRUE='#'
34822 COND_mipsel_FALSE=
34823fi
34824
34825 if test x$target_cpu = xmips; then
34826 COND_mipseb_TRUE=
34827 COND_mipseb_FALSE='#'
34828else
34829 COND_mipseb_TRUE='#'
34830 COND_mipseb_FALSE=
34831fi
34832
34833 if test x$target_cpu = xarm ; then
34834 COND_arm_TRUE=
34835 COND_arm_FALSE='#'
34836else
34837 COND_arm_TRUE='#'
34838 COND_arm_FALSE=
34839fi
34840
34841 if test x$target_cpu = xarm -a x$platform = xuboot; then
34842 COND_arm_uboot_TRUE=
34843 COND_arm_uboot_FALSE='#'
34844else
34845 COND_arm_uboot_TRUE='#'
34846 COND_arm_uboot_FALSE=
34847fi
34848
00f6db22
CW
34849 if test x$target_cpu = xarm -a x$platform = xcoreboot; then
34850 COND_arm_coreboot_TRUE=
34851 COND_arm_coreboot_FALSE='#'
34852else
34853 COND_arm_coreboot_TRUE='#'
34854 COND_arm_coreboot_FALSE=
34855fi
34856
422889f9
CW
34857 if test x$target_cpu = xarm -a x$platform = xefi; then
34858 COND_arm_efi_TRUE=
34859 COND_arm_efi_FALSE='#'
34860else
34861 COND_arm_efi_TRUE='#'
34862 COND_arm_efi_FALSE=
34863fi
34864
34865 if test x$target_cpu = xarm64 ; then
34866 COND_arm64_TRUE=
34867 COND_arm64_FALSE='#'
34868else
34869 COND_arm64_TRUE='#'
34870 COND_arm64_FALSE=
34871fi
34872
34873 if test x$target_cpu = xarm64 -a x$platform = xefi; then
34874 COND_arm64_efi_TRUE=
34875 COND_arm64_efi_FALSE='#'
34876else
34877 COND_arm64_efi_TRUE='#'
34878 COND_arm64_efi_FALSE=
34879fi
34880
00f6db22
CW
34881 if test x$target_cpu = xriscv32 ; then
34882 COND_riscv32_TRUE=
34883 COND_riscv32_FALSE='#'
34884else
34885 COND_riscv32_TRUE='#'
34886 COND_riscv32_FALSE=
34887fi
34888
34889 if test x$target_cpu = xriscv64 ; then
34890 COND_riscv64_TRUE=
34891 COND_riscv64_FALSE='#'
34892else
34893 COND_riscv64_TRUE='#'
34894 COND_riscv64_FALSE=
34895fi
34896
34897 if test x$target_cpu = xriscv32 -a x$platform = xefi; then
34898 COND_riscv32_efi_TRUE=
34899 COND_riscv32_efi_FALSE='#'
34900else
34901 COND_riscv32_efi_TRUE='#'
34902 COND_riscv32_efi_FALSE=
34903fi
34904
34905 if test x$target_cpu = xriscv64 -a x$platform = xefi; then
34906 COND_riscv64_efi_TRUE=
34907 COND_riscv64_efi_FALSE='#'
34908else
34909 COND_riscv64_efi_TRUE='#'
34910 COND_riscv64_efi_FALSE=
34911fi
34912
422889f9
CW
34913
34914 if test x$host_kernel = xhurd; then
34915 COND_HOST_HURD_TRUE=
34916 COND_HOST_HURD_FALSE='#'
34917else
34918 COND_HOST_HURD_TRUE='#'
34919 COND_HOST_HURD_FALSE=
34920fi
34921
34922 if test x$host_kernel = xlinux; then
34923 COND_HOST_LINUX_TRUE=
34924 COND_HOST_LINUX_FALSE='#'
34925else
34926 COND_HOST_LINUX_TRUE='#'
34927 COND_HOST_LINUX_FALSE=
34928fi
34929
34930 if test x$host_kernel = xnetbsd; then
34931 COND_HOST_NETBSD_TRUE=
34932 COND_HOST_NETBSD_FALSE='#'
34933else
34934 COND_HOST_NETBSD_TRUE='#'
34935 COND_HOST_NETBSD_FALSE=
34936fi
34937
34938 if test x$host_kernel = xwindows; then
34939 COND_HOST_WINDOWS_TRUE=
34940 COND_HOST_WINDOWS_FALSE='#'
34941else
34942 COND_HOST_WINDOWS_TRUE='#'
34943 COND_HOST_WINDOWS_FALSE=
34944fi
34945
34946 if test x$host_kernel = xkfreebsd; then
34947 COND_HOST_KFREEBSD_TRUE=
34948 COND_HOST_KFREEBSD_FALSE='#'
34949else
34950 COND_HOST_KFREEBSD_TRUE='#'
34951 COND_HOST_KFREEBSD_FALSE=
34952fi
34953
34954 if test x$host_kernel = xxnu; then
34955 COND_HOST_XNU_TRUE=
34956 COND_HOST_XNU_FALSE='#'
34957else
34958 COND_HOST_XNU_TRUE='#'
34959 COND_HOST_XNU_FALSE=
34960fi
34961
34962 if test x$host_kernel = xillumos; then
34963 COND_HOST_ILLUMOS_TRUE=
34964 COND_HOST_ILLUMOS_FALSE='#'
34965else
34966 COND_HOST_ILLUMOS_TRUE='#'
34967 COND_HOST_ILLUMOS_FALSE=
34968fi
34969
34970
34971 if test x$cross_compiling = xno -a x$HELP2MAN != x; then
34972 COND_MAN_PAGES_TRUE=
34973 COND_MAN_PAGES_FALSE='#'
34974else
34975 COND_MAN_PAGES_TRUE='#'
34976 COND_MAN_PAGES_FALSE=
34977fi
34978
34979 if test x$enable_grub_emu_sdl = xyes; then
34980 COND_GRUB_EMU_SDL_TRUE=
34981 COND_GRUB_EMU_SDL_FALSE='#'
34982else
34983 COND_GRUB_EMU_SDL_TRUE='#'
34984 COND_GRUB_EMU_SDL_FALSE=
34985fi
34986
34987 if test x$enable_grub_emu_pci = xyes; then
34988 COND_GRUB_EMU_PCI_TRUE=
34989 COND_GRUB_EMU_PCI_FALSE='#'
34990else
34991 COND_GRUB_EMU_PCI_TRUE='#'
34992 COND_GRUB_EMU_PCI_FALSE=
34993fi
34994
34995 if test x$enable_grub_mkfont = xyes; then
34996 COND_GRUB_MKFONT_TRUE=
34997 COND_GRUB_MKFONT_FALSE='#'
34998else
34999 COND_GRUB_MKFONT_TRUE='#'
35000 COND_GRUB_MKFONT_FALSE=
35001fi
35002
35003 if test x$enable_grub_mount = xyes; then
35004 COND_GRUB_MOUNT_TRUE=
35005 COND_GRUB_MOUNT_FALSE='#'
35006else
35007 COND_GRUB_MOUNT_TRUE='#'
35008 COND_GRUB_MOUNT_FALSE=
35009fi
35010
35011 if test x$FONT_SOURCE != x; then
35012 COND_HAVE_FONT_SOURCE_TRUE=
35013 COND_HAVE_FONT_SOURCE_FALSE='#'
35014else
35015 COND_HAVE_FONT_SOURCE_TRUE='#'
35016 COND_HAVE_FONT_SOURCE_FALSE=
35017fi
35018
35019if test x$FONT_SOURCE != x ; then
35020 HAVE_FONT_SOURCE=1
35021else
35022 HAVE_FONT_SOURCE=0
35023fi
35024
35025 if test x$TARGET_APPLE_LINKER = x1; then
35026 COND_APPLE_LINKER_TRUE=
35027 COND_APPLE_LINKER_FALSE='#'
35028else
35029 COND_APPLE_LINKER_TRUE='#'
35030 COND_APPLE_LINKER_FALSE=
35031fi
35032
35033 if test x$enable_efiemu = xyes; then
35034 COND_ENABLE_EFIEMU_TRUE=
35035 COND_ENABLE_EFIEMU_FALSE='#'
35036else
35037 COND_ENABLE_EFIEMU_TRUE='#'
35038 COND_ENABLE_EFIEMU_FALSE=
35039fi
35040
35041 if test x$DISK_CACHE_STATS = x1; then
35042 COND_ENABLE_CACHE_STATS_TRUE=
35043 COND_ENABLE_CACHE_STATS_FALSE='#'
35044else
35045 COND_ENABLE_CACHE_STATS_TRUE='#'
35046 COND_ENABLE_CACHE_STATS_FALSE=
35047fi
35048
35049 if test x$BOOT_TIME_STATS = x1; then
35050 COND_ENABLE_BOOT_TIME_STATS_TRUE=
35051 COND_ENABLE_BOOT_TIME_STATS_FALSE='#'
35052else
35053 COND_ENABLE_BOOT_TIME_STATS_TRUE='#'
35054 COND_ENABLE_BOOT_TIME_STATS_FALSE=
35055fi
35056
35057
35058 if test x$HAVE_CXX = xyes; then
35059 COND_HAVE_CXX_TRUE=
35060 COND_HAVE_CXX_FALSE='#'
35061else
35062 COND_HAVE_CXX_TRUE='#'
35063 COND_HAVE_CXX_FALSE=
35064fi
35065
35066
35067 if test x$HAVE_ASM_USCORE = x1; then
35068 COND_HAVE_ASM_USCORE_TRUE=
35069 COND_HAVE_ASM_USCORE_FALSE='#'
35070else
35071 COND_HAVE_ASM_USCORE_TRUE='#'
35072 COND_HAVE_ASM_USCORE_FALSE=
35073fi
35074
35075 if test "x$starfield_excuse" = x; then
35076 COND_STARFIELD_TRUE=
35077 COND_STARFIELD_FALSE='#'
35078else
35079 COND_STARFIELD_TRUE='#'
35080 COND_STARFIELD_FALSE=
35081fi
35082
35083 if test "x$have_exec" = xy; then
35084 COND_HAVE_EXEC_TRUE=
35085 COND_HAVE_EXEC_FALSE='#'
35086else
35087 COND_HAVE_EXEC_TRUE='#'
35088 COND_HAVE_EXEC_FALSE=
35089fi
35090
35091
35092test "x$prefix" = xNONE && prefix="$ac_default_prefix"
35093test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
35094datarootdir="$(eval echo "$datarootdir")"
35095grub_libdir="$(eval echo "$libdir")"
35096grub_localedir="$(eval echo "$localedir")"
35097grub_datadir="$(eval echo "$datadir")"
35098grub_sysconfdir="$(eval echo "$sysconfdir")"
35099
35100cat >>confdefs.h <<_ACEOF
35101#define LOCALEDIR "$grub_localedir"
35102_ACEOF
35103
35104
35105cat >>confdefs.h <<_ACEOF
35106#define GRUB_LIBDIR "$grub_libdir"
35107_ACEOF
35108
35109
35110cat >>confdefs.h <<_ACEOF
35111#define GRUB_DATADIR "$grub_datadir"
35112_ACEOF
35113
35114
35115cat >>confdefs.h <<_ACEOF
35116#define GRUB_SYSCONFDIR "$grub_sysconfdir"
35117_ACEOF
35118
35119
35120
35121# Output files.
35122if 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; }
35130mkdir testdir 2>/dev/null
35131case $srcdir in
35132[\\/$]* | ?:[\\/]* ) reldir=$srcdir/include/grub/util ;;
35133 *) reldir=../$srcdir/include/grub/util ;;
35134esac
35135if 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
35139else
35140 link_dir=no
35141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35142$as_echo "no" >&6; }
35143fi
35144rm -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
35162else
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
35166fi
35167
35168ac_config_files="$ac_config_files Makefile"
35169
35170ac_config_files="$ac_config_files grub-core/Makefile"
35171
00f6db22 35172ac_config_files="$ac_config_files grub-core/lib/gnulib/Makefile"
422889f9
CW
35173
35174ac_config_files="$ac_config_files po/Makefile.in"
35175
35176ac_config_files="$ac_config_files docs/Makefile"
35177
35178ac_config_files="$ac_config_files util/bash-completion.d/Makefile"
35179
35180ac_config_files="$ac_config_files stamp-h"
35181
35182ac_config_files="$ac_config_files config.h"
35183
35184
35185cat >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
35247if 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
35268fi
35269rm -f confcache
35270
35271test "x$prefix" = xNONE && prefix=$ac_default_prefix
35272# Let make expand exec_prefix.
35273test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
35274
35275DEFS=-DHAVE_CONFIG_H
35276
35277ac_libobjs=
35278ac_ltlibobjs=
35279U=
35280for 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'
35288done
35289LIBOBJS=$ac_libobjs
35290
35291LTLIBOBJS=$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='#'
35305else
35306 am__EXEEXT_TRUE='#'
35307 am__EXEEXT_FALSE=
35308fi
35309
35310if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
35311 as_fn_error $? "conditional \"AMDEP\" was never defined.
35312Usually this means the macro was only invoked conditionally." "$LINENO" 5
35313fi
35314if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
35315 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
35316Usually this means the macro was only invoked conditionally." "$LINENO" 5
35317fi
35318if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
35319 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
35320Usually this means the macro was only invoked conditionally." "$LINENO" 5
35321fi
35322if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
35323 as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
35324Usually this means the macro was only invoked conditionally." "$LINENO" 5
35325fi
35326if test -z "${am__fastdepCCAS_TRUE}" && test -z "${am__fastdepCCAS_FALSE}"; then
35327 as_fn_error $? "conditional \"am__fastdepCCAS\" was never defined.
35328Usually this means the macro was only invoked conditionally." "$LINENO" 5
35329fi
35330
35331if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
35332 as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
35333Usually this means the macro was only invoked conditionally." "$LINENO" 5
35334fi
35335if 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.
35337Usually this means the macro was only invoked conditionally." "$LINENO" 5
35338fi
35339if 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.
35341Usually this means the macro was only invoked conditionally." "$LINENO" 5
35342fi
35343if 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.
35345Usually this means the macro was only invoked conditionally." "$LINENO" 5
35346fi
35347if 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.
35349Usually this means the macro was only invoked conditionally." "$LINENO" 5
35350fi
00f6db22
CW
35351if 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.
35353Usually this means the macro was only invoked conditionally." "$LINENO" 5
35354fi
35355if 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.
35357Usually this means the macro was only invoked conditionally." "$LINENO" 5
35358fi
422889f9
CW
35359if 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.
35361Usually this means the macro was only invoked conditionally." "$LINENO" 5
35362fi
35363if 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.
35365Usually this means the macro was only invoked conditionally." "$LINENO" 5
35366fi
35367if 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.
35369Usually this means the macro was only invoked conditionally." "$LINENO" 5
35370fi
35371if 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.
35373Usually this means the macro was only invoked conditionally." "$LINENO" 5
35374fi
00f6db22
CW
35375if 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.
35377Usually this means the macro was only invoked conditionally." "$LINENO" 5
35378fi
422889f9
CW
35379if 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.
35381Usually this means the macro was only invoked conditionally." "$LINENO" 5
35382fi
35383if 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.
35385Usually this means the macro was only invoked conditionally." "$LINENO" 5
35386fi
35387if 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.
35389Usually this means the macro was only invoked conditionally." "$LINENO" 5
35390fi
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
35424if test -z "${COND_real_platform_TRUE}" && test -z "${COND_real_platform_FALSE}"; then
35425 as_fn_error $? "conditional \"COND_real_platform\" was never defined.
35426Usually this means the macro was only invoked conditionally." "$LINENO" 5
35427fi
35428if test -z "${COND_emu_TRUE}" && test -z "${COND_emu_FALSE}"; then
35429 as_fn_error $? "conditional \"COND_emu\" was never defined.
35430Usually this means the macro was only invoked conditionally." "$LINENO" 5
35431fi
35432if test -z "${COND_i386_pc_TRUE}" && test -z "${COND_i386_pc_FALSE}"; then
35433 as_fn_error $? "conditional \"COND_i386_pc\" was never defined.
35434Usually this means the macro was only invoked conditionally." "$LINENO" 5
35435fi
35436if test -z "${COND_i386_efi_TRUE}" && test -z "${COND_i386_efi_FALSE}"; then
35437 as_fn_error $? "conditional \"COND_i386_efi\" was never defined.
35438Usually this means the macro was only invoked conditionally." "$LINENO" 5
35439fi
35440if test -z "${COND_ia64_efi_TRUE}" && test -z "${COND_ia64_efi_FALSE}"; then
35441 as_fn_error $? "conditional \"COND_ia64_efi\" was never defined.
35442Usually this means the macro was only invoked conditionally." "$LINENO" 5
35443fi
35444if test -z "${COND_i386_qemu_TRUE}" && test -z "${COND_i386_qemu_FALSE}"; then
35445 as_fn_error $? "conditional \"COND_i386_qemu\" was never defined.
35446Usually this means the macro was only invoked conditionally." "$LINENO" 5
35447fi
35448if test -z "${COND_i386_ieee1275_TRUE}" && test -z "${COND_i386_ieee1275_FALSE}"; then
35449 as_fn_error $? "conditional \"COND_i386_ieee1275\" was never defined.
35450Usually this means the macro was only invoked conditionally." "$LINENO" 5
35451fi
35452if test -z "${COND_i386_coreboot_TRUE}" && test -z "${COND_i386_coreboot_FALSE}"; then
35453 as_fn_error $? "conditional \"COND_i386_coreboot\" was never defined.
35454Usually this means the macro was only invoked conditionally." "$LINENO" 5
35455fi
35456if test -z "${COND_i386_multiboot_TRUE}" && test -z "${COND_i386_multiboot_FALSE}"; then
35457 as_fn_error $? "conditional \"COND_i386_multiboot\" was never defined.
35458Usually this means the macro was only invoked conditionally." "$LINENO" 5
35459fi
35460if 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.
35462Usually this means the macro was only invoked conditionally." "$LINENO" 5
35463fi
35464if test -z "${COND_i386_xen_TRUE}" && test -z "${COND_i386_xen_FALSE}"; then
35465 as_fn_error $? "conditional \"COND_i386_xen\" was never defined.
35466Usually this means the macro was only invoked conditionally." "$LINENO" 5
35467fi
00f6db22
CW
35468if 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.
35470Usually this means the macro was only invoked conditionally." "$LINENO" 5
35471fi
422889f9
CW
35472if 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.
35474Usually this means the macro was only invoked conditionally." "$LINENO" 5
35475fi
35476if test -z "${COND_mips_loongson_TRUE}" && test -z "${COND_mips_loongson_FALSE}"; then
35477 as_fn_error $? "conditional \"COND_mips_loongson\" was never defined.
35478Usually this means the macro was only invoked conditionally." "$LINENO" 5
35479fi
35480if 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.
35482Usually this means the macro was only invoked conditionally." "$LINENO" 5
35483fi
35484if test -z "${COND_mips_arc_TRUE}" && test -z "${COND_mips_arc_FALSE}"; then
35485 as_fn_error $? "conditional \"COND_mips_arc\" was never defined.
35486Usually this means the macro was only invoked conditionally." "$LINENO" 5
35487fi
35488if test -z "${COND_sparc64_ieee1275_TRUE}" && test -z "${COND_sparc64_ieee1275_FALSE}"; then
35489 as_fn_error $? "conditional \"COND_sparc64_ieee1275\" was never defined.
35490Usually this means the macro was only invoked conditionally." "$LINENO" 5
35491fi
35492if test -z "${COND_sparc64_emu_TRUE}" && test -z "${COND_sparc64_emu_FALSE}"; then
35493 as_fn_error $? "conditional \"COND_sparc64_emu\" was never defined.
35494Usually this means the macro was only invoked conditionally." "$LINENO" 5
35495fi
35496if test -z "${COND_powerpc_ieee1275_TRUE}" && test -z "${COND_powerpc_ieee1275_FALSE}"; then
35497 as_fn_error $? "conditional \"COND_powerpc_ieee1275\" was never defined.
35498Usually this means the macro was only invoked conditionally." "$LINENO" 5
35499fi
35500if test -z "${COND_mips_TRUE}" && test -z "${COND_mips_FALSE}"; then
35501 as_fn_error $? "conditional \"COND_mips\" was never defined.
35502Usually this means the macro was only invoked conditionally." "$LINENO" 5
35503fi
35504if test -z "${COND_mipsel_TRUE}" && test -z "${COND_mipsel_FALSE}"; then
35505 as_fn_error $? "conditional \"COND_mipsel\" was never defined.
35506Usually this means the macro was only invoked conditionally." "$LINENO" 5
35507fi
35508if test -z "${COND_mipseb_TRUE}" && test -z "${COND_mipseb_FALSE}"; then
35509 as_fn_error $? "conditional \"COND_mipseb\" was never defined.
35510Usually this means the macro was only invoked conditionally." "$LINENO" 5
35511fi
35512if test -z "${COND_arm_TRUE}" && test -z "${COND_arm_FALSE}"; then
35513 as_fn_error $? "conditional \"COND_arm\" was never defined.
35514Usually this means the macro was only invoked conditionally." "$LINENO" 5
35515fi
35516if test -z "${COND_arm_uboot_TRUE}" && test -z "${COND_arm_uboot_FALSE}"; then
35517 as_fn_error $? "conditional \"COND_arm_uboot\" was never defined.
35518Usually this means the macro was only invoked conditionally." "$LINENO" 5
35519fi
00f6db22
CW
35520if test -z "${COND_arm_coreboot_TRUE}" && test -z "${COND_arm_coreboot_FALSE}"; then
35521 as_fn_error $? "conditional \"COND_arm_coreboot\" was never defined.
35522Usually this means the macro was only invoked conditionally." "$LINENO" 5
35523fi
422889f9
CW
35524if test -z "${COND_arm_efi_TRUE}" && test -z "${COND_arm_efi_FALSE}"; then
35525 as_fn_error $? "conditional \"COND_arm_efi\" was never defined.
35526Usually this means the macro was only invoked conditionally." "$LINENO" 5
35527fi
35528if test -z "${COND_arm64_TRUE}" && test -z "${COND_arm64_FALSE}"; then
35529 as_fn_error $? "conditional \"COND_arm64\" was never defined.
35530Usually this means the macro was only invoked conditionally." "$LINENO" 5
35531fi
35532if test -z "${COND_arm64_efi_TRUE}" && test -z "${COND_arm64_efi_FALSE}"; then
35533 as_fn_error $? "conditional \"COND_arm64_efi\" was never defined.
35534Usually this means the macro was only invoked conditionally." "$LINENO" 5
35535fi
00f6db22
CW
35536if test -z "${COND_riscv32_TRUE}" && test -z "${COND_riscv32_FALSE}"; then
35537 as_fn_error $? "conditional \"COND_riscv32\" was never defined.
35538Usually this means the macro was only invoked conditionally." "$LINENO" 5
35539fi
35540if test -z "${COND_riscv64_TRUE}" && test -z "${COND_riscv64_FALSE}"; then
35541 as_fn_error $? "conditional \"COND_riscv64\" was never defined.
35542Usually this means the macro was only invoked conditionally." "$LINENO" 5
35543fi
35544if test -z "${COND_riscv32_efi_TRUE}" && test -z "${COND_riscv32_efi_FALSE}"; then
35545 as_fn_error $? "conditional \"COND_riscv32_efi\" was never defined.
35546Usually this means the macro was only invoked conditionally." "$LINENO" 5
35547fi
35548if test -z "${COND_riscv64_efi_TRUE}" && test -z "${COND_riscv64_efi_FALSE}"; then
35549 as_fn_error $? "conditional \"COND_riscv64_efi\" was never defined.
35550Usually this means the macro was only invoked conditionally." "$LINENO" 5
35551fi
422889f9
CW
35552if test -z "${COND_HOST_HURD_TRUE}" && test -z "${COND_HOST_HURD_FALSE}"; then
35553 as_fn_error $? "conditional \"COND_HOST_HURD\" was never defined.
35554Usually this means the macro was only invoked conditionally." "$LINENO" 5
35555fi
35556if test -z "${COND_HOST_LINUX_TRUE}" && test -z "${COND_HOST_LINUX_FALSE}"; then
35557 as_fn_error $? "conditional \"COND_HOST_LINUX\" was never defined.
35558Usually this means the macro was only invoked conditionally." "$LINENO" 5
35559fi
35560if test -z "${COND_HOST_NETBSD_TRUE}" && test -z "${COND_HOST_NETBSD_FALSE}"; then
35561 as_fn_error $? "conditional \"COND_HOST_NETBSD\" was never defined.
35562Usually this means the macro was only invoked conditionally." "$LINENO" 5
35563fi
35564if test -z "${COND_HOST_WINDOWS_TRUE}" && test -z "${COND_HOST_WINDOWS_FALSE}"; then
35565 as_fn_error $? "conditional \"COND_HOST_WINDOWS\" was never defined.
35566Usually this means the macro was only invoked conditionally." "$LINENO" 5
35567fi
35568if test -z "${COND_HOST_KFREEBSD_TRUE}" && test -z "${COND_HOST_KFREEBSD_FALSE}"; then
35569 as_fn_error $? "conditional \"COND_HOST_KFREEBSD\" was never defined.
35570Usually this means the macro was only invoked conditionally." "$LINENO" 5
35571fi
35572if test -z "${COND_HOST_XNU_TRUE}" && test -z "${COND_HOST_XNU_FALSE}"; then
35573 as_fn_error $? "conditional \"COND_HOST_XNU\" was never defined.
35574Usually this means the macro was only invoked conditionally." "$LINENO" 5
35575fi
35576if test -z "${COND_HOST_ILLUMOS_TRUE}" && test -z "${COND_HOST_ILLUMOS_FALSE}"; then
35577 as_fn_error $? "conditional \"COND_HOST_ILLUMOS\" was never defined.
35578Usually this means the macro was only invoked conditionally." "$LINENO" 5
35579fi
35580if test -z "${COND_MAN_PAGES_TRUE}" && test -z "${COND_MAN_PAGES_FALSE}"; then
35581 as_fn_error $? "conditional \"COND_MAN_PAGES\" was never defined.
35582Usually this means the macro was only invoked conditionally." "$LINENO" 5
35583fi
35584if 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.
35586Usually this means the macro was only invoked conditionally." "$LINENO" 5
35587fi
35588if 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.
35590Usually this means the macro was only invoked conditionally." "$LINENO" 5
35591fi
35592if test -z "${COND_GRUB_MKFONT_TRUE}" && test -z "${COND_GRUB_MKFONT_FALSE}"; then
35593 as_fn_error $? "conditional \"COND_GRUB_MKFONT\" was never defined.
35594Usually this means the macro was only invoked conditionally." "$LINENO" 5
35595fi
35596if test -z "${COND_GRUB_MOUNT_TRUE}" && test -z "${COND_GRUB_MOUNT_FALSE}"; then
35597 as_fn_error $? "conditional \"COND_GRUB_MOUNT\" was never defined.
35598Usually this means the macro was only invoked conditionally." "$LINENO" 5
35599fi
35600if 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.
35602Usually this means the macro was only invoked conditionally." "$LINENO" 5
35603fi
35604if test -z "${COND_APPLE_LINKER_TRUE}" && test -z "${COND_APPLE_LINKER_FALSE}"; then
35605 as_fn_error $? "conditional \"COND_APPLE_LINKER\" was never defined.
35606Usually this means the macro was only invoked conditionally." "$LINENO" 5
35607fi
35608if test -z "${COND_ENABLE_EFIEMU_TRUE}" && test -z "${COND_ENABLE_EFIEMU_FALSE}"; then
35609 as_fn_error $? "conditional \"COND_ENABLE_EFIEMU\" was never defined.
35610Usually this means the macro was only invoked conditionally." "$LINENO" 5
35611fi
35612if 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.
35614Usually this means the macro was only invoked conditionally." "$LINENO" 5
35615fi
35616if 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.
35618Usually this means the macro was only invoked conditionally." "$LINENO" 5
35619fi
35620if test -z "${COND_HAVE_CXX_TRUE}" && test -z "${COND_HAVE_CXX_FALSE}"; then
35621 as_fn_error $? "conditional \"COND_HAVE_CXX\" was never defined.
35622Usually this means the macro was only invoked conditionally." "$LINENO" 5
35623fi
35624if 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.
35626Usually this means the macro was only invoked conditionally." "$LINENO" 5
35627fi
35628if test -z "${COND_STARFIELD_TRUE}" && test -z "${COND_STARFIELD_FALSE}"; then
35629 as_fn_error $? "conditional \"COND_STARFIELD\" was never defined.
35630Usually this means the macro was only invoked conditionally." "$LINENO" 5
35631fi
35632if test -z "${COND_HAVE_EXEC_TRUE}" && test -z "${COND_HAVE_EXEC_FALSE}"; then
35633 as_fn_error $? "conditional \"COND_HAVE_EXEC\" was never defined.
35634Usually this means the macro was only invoked conditionally." "$LINENO" 5
35635fi
35636
35637: "${CONFIG_STATUS=./config.status}"
35638ac_write_fail=0
35639ac_clean_files_save=$ac_clean_files
35640ac_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;}
35643as_write_fail=0
35644cat >$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
35651debug=false
35652ac_cs_recheck=false
35653ac_cs_silent=false
35654
35655SHELL=\${CONFIG_SHELL-$SHELL}
35656export SHELL
35657_ASEOF
35658cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
35659## -------------------- ##
35660## M4sh Initialization. ##
35661## -------------------- ##
35662
35663# Be more Bourne compatible
35664DUALCASE=1; export DUALCASE # for MKS sh
35665if 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
35672else
35673 case `(set -o) 2>/dev/null` in #(
35674 *posix*) :
35675 set -o posix ;; #(
35676 *) :
35677 ;;
35678esac
35679fi
35680
35681
35682as_nl='
35683'
35684export as_nl
35685# Printing a long string crashes Solaris 7 /usr/bin/printf.
35686as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
35687as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
35688as_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.
35691if 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 --'
35695elif (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'
35698else
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'
35718fi
35719
35720# The user is always right.
35721if 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 }
35727fi
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.)
35735IFS=" "" $as_nl"
35736
35737# Find who we are. Look in the path if we contain no directory separator.
35738as_myself=
35739case $0 in #((
35740 *[\\/]* ) as_myself=$0 ;;
35741 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35742for as_dir in $PATH
35743do
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
35748IFS=$as_save_IFS
35749
35750 ;;
35751esac
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.
35754if test "x$as_myself" = x; then
35755 as_myself=$0
35756fi
35757if test ! -f "$as_myself"; then
35758 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
35759 exit 1
35760fi
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.
35766for as_var in BASH_ENV ENV MAIL MAILPATH
35767do eval test x\${$as_var+set} = xset \
35768 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
35769done
35770PS1='$ '
35771PS2='> '
35772PS4='+ '
35773
35774# NLS nuisances.
35775LC_ALL=C
35776export LC_ALL
35777LANGUAGE=C
35778export 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.
35789as_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.
35804as_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.
35812as_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.
35822as_fn_unset ()
35823{
35824 { eval $1=; unset $1;}
35825}
35826as_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.
35833if (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 }'
35838else
35839 as_fn_append ()
35840 {
35841 eval $1=\$$1\$2
35842 }
35843fi # 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.
35850if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
35851 eval 'as_fn_arith ()
35852 {
35853 as_val=$(( $* ))
35854 }'
35855else
35856 as_fn_arith ()
35857 {
35858 as_val=`expr "$@" || test $? -eq 1`
35859 }
35860fi # as_fn_arith
35861
35862
35863if expr a : '\(a\)' >/dev/null 2>&1 &&
35864 test "X`expr 00001 : '.*\(...\)'`" = X001; then
35865 as_expr=expr
35866else
35867 as_expr=false
35868fi
35869
35870if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
35871 as_basename=basename
35872else
35873 as_basename=false
35874fi
35875
35876if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
35877 as_dirname=dirname
35878else
35879 as_dirname=false
35880fi
35881
35882as_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.
35902as_cr_letters='abcdefghijklmnopqrstuvwxyz'
35903as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
35904as_cr_Letters=$as_cr_letters$as_cr_LETTERS
35905as_cr_digits='0123456789'
35906as_cr_alnum=$as_cr_Letters$as_cr_digits
35907
35908ECHO_C= ECHO_N= ECHO_T=
35909case `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';;
35919esac
35920
35921rm -f conf$$ conf$$.exe conf$$.file
35922if test -d conf$$.dir; then
35923 rm -f conf$$.dir/conf$$.file
35924else
35925 rm -f conf$$.dir
35926 mkdir conf$$.dir 2>/dev/null
35927fi
35928if (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
35942else
35943 as_ln_s='cp -pR'
35944fi
35945rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
35946rmdir conf$$.dir 2>/dev/null
35947
35948
35949# as_fn_mkdir_p
35950# -------------
35951# Create "$as_dir" as a directory, including parents if necessary.
35952as_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
35996if mkdir -p . 2>/dev/null; then
35997 as_mkdir_p='mkdir -p "$as_dir"'
35998else
35999 test -d ./-p && rmdir ./-p
36000 as_mkdir_p=false
36001fi
36002
36003
36004# as_fn_executable_p FILE
36005# -----------------------
36006# Test if FILE is an executable regular file.
36007as_fn_executable_p ()
36008{
36009 test -f "$1" && test -x "$1"
36010} # as_fn_executable_p
36011as_test_x='test -x'
36012as_executable_p=as_fn_executable_p
36013
36014# Sed expression to map a string onto a valid CPP name.
36015as_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.
36018as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
36019
36020
36021exec 6>&1
36022## ----------------------------------- ##
36023## Main body of $CONFIG_STATUS script. ##
36024## ----------------------------------- ##
36025_ASEOF
36026test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
36027
36028cat >>$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.
36032ac_log="
21f95442 36033This file was extended by GRUB $as_me 2.06, which was
422889f9
CW
36034generated 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
36042on `(hostname || uname -n) 2>/dev/null | sed 1q`
36043"
36044
36045_ACEOF
36046
36047case $ac_config_files in *"
36048"*) set x $ac_config_files; shift; ac_config_files=$*;;
36049esac
36050
36051case $ac_config_headers in *"
36052"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
36053esac
36054
36055
36056cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36057# Files that config.status was made for.
36058config_files="$ac_config_files"
36059config_headers="$ac_config_headers"
36060config_links="$ac_config_links"
36061config_commands="$ac_config_commands"
36062
36063_ACEOF
36064
36065cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36066ac_cs_usage="\
36067\`$as_me' instantiates files and other configuration actions
36068from templates according to the current configuration. Unless the files
36069and actions are specified as TAGs, all are instantiated by default.
36070
36071Usage: $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
36085Configuration files:
36086$config_files
36087
36088Configuration headers:
36089$config_headers
36090
36091Configuration links:
36092$config_links
36093
36094Configuration commands:
36095$config_commands
36096
36097Report bugs to <bug-grub@gnu.org>."
36098
36099_ACEOF
36100cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36101ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
36102ac_cs_version="\\
21f95442 36103GRUB config.status 2.06
422889f9
CW
36104configured by $0, generated by GNU Autoconf 2.69,
36105 with options \\"\$ac_cs_config\\"
36106
36107Copyright (C) 2012 Free Software Foundation, Inc.
36108This config.status script is free software; the Free Software Foundation
36109gives unlimited permission to copy, distribute and modify it."
36110
36111ac_pwd='$ac_pwd'
36112srcdir='$srcdir'
36113INSTALL='$INSTALL'
36114MKDIR_P='$MKDIR_P'
36115AWK='$AWK'
36116test -n "\$AWK" || AWK=awk
36117_ACEOF
36118
36119cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36120# The default lists apply if the user does not specify any file.
36121ac_need_defaults=:
36122while test $# != 0
36123do
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'
36170Try \`$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'
36179Try \`$0 --help' for more information." ;;
36180
36181 *) as_fn_append ac_config_targets " $1"
36182 ac_need_defaults=false ;;
36183
36184 esac
36185 shift
36186done
36187
36188ac_configure_extra_args=
36189
36190if $ac_cs_silent; then
36191 exec 6>/dev/null
36192 ac_configure_extra_args="$ac_configure_extra_args --silent"
36193fi
36194
36195_ACEOF
36196cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36197if \$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 "\$@"
36204fi
36205
36206_ACEOF
36207cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36208exec 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
36218cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36219#
36220# INIT-COMMANDS
36221#
36222AMDEP_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
36233cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36234
36235# Handling of arguments.
36236for ac_config_target in $ac_config_targets
36237do
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" ;;
00f6db22 36246 "grub-core/lib/gnulib/Makefile") CONFIG_FILES="$CONFIG_FILES grub-core/lib/gnulib/Makefile" ;;
422889f9
CW
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
36255done
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.
36262if $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
36267fi
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
36294ac_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'.
36299if test -n "$CONFIG_FILES"; then
36300
36301
36302ac_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.
36306if test "x$ac_cr" = x; then
36307 eval ac_cr=\$\'\\r\'
36308fi
36309ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
36310if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
36311 ac_cs_awk_cr='\\r'
36312else
36313 ac_cs_awk_cr=$ac_cr
36314fi
36315
36316echo '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
36326ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
36327ac_delim='%!_!# '
36328for 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
36340done
36341rm -f conf$$subs.sh
36342
36343cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36344cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
36345_ACEOF
36346sed -n '
36347h
36348s/^/S["/; s/!.*/"]=/
36349p
36350g
36351s/^[^!]*!//
36352:repl
36353t repl
36354s/'"$ac_delim"'$//
36355t delim
36356:nl
36357h
36358s/\(.\{148\}\)..*/\1/
36359t more1
36360s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
36361p
36362n
36363b repl
36364:more1
36365s/["\\]/\\&/g; s/^/"/; s/$/"\\/
36366p
36367g
36368s/.\{148\}//
36369t nl
36370:delim
36371h
36372s/\(.\{148\}\)..*/\1/
36373t more2
36374s/["\\]/\\&/g; s/^/"/; s/$/"/
36375p
36376b
36377:more2
36378s/["\\]/\\&/g; s/^/"/; s/$/"\\/
36379p
36380g
36381s/.\{148\}//
36382t delim
36383' <conf$$subs.awk | sed '
36384/^[^""]/{
36385 N
36386 s/\n//
36387}
36388' >>$CONFIG_STATUS || ac_write_fail=1
36389rm -f conf$$subs.awk
36390cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36391_ACAWK
36392cat >>"\$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
36419cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36420if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
36421 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
36422else
36423 cat
36424fi < "$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).
36432if test "x$srcdir" = x.; then
36433 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
36434h
36435s///
36436s/^/:/
36437s/[ ]*$/:/
36438s/:\$(srcdir):/:/g
36439s/:\${srcdir}:/:/g
36440s/:@srcdir@:/:/g
36441s/^:*//
36442s/:*$//
36443x
36444s/\(=[ ]*\).*/\1/
36445G
36446s/\n//
36447s/^[^=]*=[ ]*$//
36448}'
36449fi
36450
36451cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36452fi # 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'.
36457if test -n "$CONFIG_HEADERS"; then
36458cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
36459BEGIN {
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.
36468ac_delim='%!_!# '
36469for 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
36478done
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
36484ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
36485sed -n '
36486s/.\{148\}/&'"$ac_delim"'/g
36487t rset
36488:rset
36489s/^[ ]*#[ ]*define[ ][ ]*/ /
36490t def
36491d
36492:def
36493s/\\$//
36494t bsnl
36495s/["\\]/\\&/g
36496s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
36497D["\1"]=" \3"/p
36498s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
36499d
36500:bsnl
36501s/["\\]/\\&/g
36502s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
36503D["\1"]=" \3\\\\\\n"\\/p
36504t cont
36505s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
36506t cont
36507d
36508:cont
36509n
36510s/.\{148\}/&'"$ac_delim"'/g
36511t clear
36512:clear
36513s/\\$//
36514t bsnlc
36515s/["\\]/\\&/g; s/^/"/; s/$/"/p
36516d
36517:bsnlc
36518s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
36519b cont
36520' <confdefs.h | sed '
36521s/'"$ac_delim"'/"\\\
36522"/g' >>$CONFIG_STATUS || ac_write_fail=1
36523
36524cat >>$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
36558cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36559 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
36560fi # test -n "$CONFIG_HEADERS"
36561
36562
36563eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
36564shift
36565for ac_tag
36566do
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
36658case "$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 ;;
36668esac
36669ac_abs_top_builddir=$ac_pwd
36670ac_abs_builddir=$ac_pwd$ac_dir_suffix
36671# for backward compatibility:
36672ac_top_builddir=$ac_top_build_prefix
36673
36674case $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 ;;
36687esac
36688ac_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
36708cat >>$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.
36711ac_datarootdir_hack=; ac_datarootdir_seen=
36712ac_sed_dataroot='
36713/datarootdir/ {
36714 p
36715 q
36716}
36717/@datadir@/p
36718/@docdir@/p
36719/@infodir@/p
36720/@localedir@/p
36721/@mandir@/p'
36722case `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
36728cat >>$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' ;;
36736esac
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?
36742cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36743ac_sed_extra="$ac_vpsub
36744$extrasub
36745_ACEOF
36746cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36747:t
36748/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
36749s|@configure_input@|$ac_sed_conf_input|;t t
36750s&@top_builddir@&$ac_top_builddir_sub&;t t
36751s&@top_build_prefix@&$ac_top_build_prefix&;t t
36752s&@srcdir@&$ac_srcdir&;t t
36753s&@abs_srcdir@&$ac_abs_srcdir&;t t
36754s&@top_srcdir@&$ac_top_srcdir&;t t
36755s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
36756s&@builddir@&$ac_builddir&;t t
36757s&@abs_builddir@&$ac_abs_builddir&;t t
36758s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
36759s&@INSTALL@&$ac_INSTALL&;t t
36760s&@MKDIR_P@&$ac_MKDIR_P&;t t
36761$ac_datarootdir_hack
36762"
36763eval 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
36766test -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'
36771which 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'
36773which 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
36808for _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
36815done
36816echo "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
37089done # for ac_tag
37090
37091
37092as_fn_exit 0
37093_ACEOF
37094ac_clean_files=$ac_clean_files_save
37095
37096test $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.
37108if 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
37119fi
37120if 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;}
37123fi
37124
37125
37126echo "*******************************************************"
37127echo GRUB2 will be compiled with following components:
37128echo Platform: "$target_cpu"-"$platform"
37129if [ x"$platform" = xemu ]; then
37130if [ x"$grub_emu_sdl_excuse" = x ]; then
37131echo SDL support for grub-emu: Yes
37132else
37133echo SDL support for grub-emu: No "($grub_emu_sdl_excuse)"
37134fi
37135if [ x"$grub_emu_pci_excuse" = x ]; then
37136echo PCI support for grub-emu: Yes
37137else
37138echo PCI support for grub-emu: No "($grub_emu_pci_excuse)"
37139fi
37140fi
37141if test x"$device_mapper_excuse" = x ; then
37142echo With devmapper support: Yes
37143else
37144echo With devmapper support: No "($device_mapper_excuse)"
37145fi
37146if [ x"$enable_mm_debug" = xyes ]; then
37147echo With memory debugging: Yes
37148else
37149echo With memory debugging: No
37150fi
37151if [ x"$enable_cache_stats" = xyes ]; then
37152echo With disk cache statistics: Yes
37153else
37154echo With disk cache statistics: No
37155fi
37156
37157if [ x"$enable_boot_time" = xyes ]; then
37158echo With boot time statistics: Yes
37159else
37160echo With boot time statistics: No
37161fi
37162
37163if [ x"$efiemu_excuse" = x ]; then
37164echo efiemu runtime: Yes
37165else
37166echo efiemu runtime: No "($efiemu_excuse)"
37167fi
37168if [ x"$grub_mkfont_excuse" = x ]; then
37169echo grub-mkfont: Yes
37170else
37171echo grub-mkfont: No "($grub_mkfont_excuse)"
37172fi
37173if [ x"$grub_mount_excuse" = x ]; then
37174echo grub-mount: Yes
37175else
37176echo grub-mount: No "($grub_mount_excuse)"
37177fi
37178if [ x"$starfield_excuse" = x ]; then
37179echo starfield theme: Yes
37180echo With DejaVuSans font from $DJVU_FONT_SOURCE
37181else
37182echo starfield theme: No "($starfield_excuse)"
37183fi
37184if [ x"$libzfs_excuse" = x ]; then
37185echo With libzfs support: Yes
37186else
37187echo With libzfs support: No "($libzfs_excuse)"
37188fi
37189if [ 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
37196else
37197 echo Build-time grub-mkfont: No "($grub_build_mkfont_excuse)"
37198 echo "Without unifont (no build-time grub-mkfont)"
37199fi
37200if test x"$liblzma_excuse" != x ; then
37201echo "Without liblzma (no support for XZ-compressed mips images) ($liblzma_excuse)"
37202else
37203echo "With liblzma from $LIBLZMA (support for XZ-compressed mips images)"
37204fi
21f95442
CW
37205if test "x$enable_stack_protector" != xno; then
37206echo "With stack smashing protector: Yes"
37207else
37208echo "With stack smashing protector: No"
37209fi
422889f9
CW
37210echo "*******************************************************"
37211